diff --git a/dotnet/src/Generated/Rpc.cs b/dotnet/src/Generated/Rpc.cs index 2c74ab4bd..9c65d2fec 100644 --- a/dotnet/src/Generated/Rpc.cs +++ b/dotnet/src/Generated/Rpc.cs @@ -3021,22 +3021,30 @@ public sealed class PluginUpdateAllResult public IList Results { get => field ??= []; set; } } -/// Plugin names (or specs) to enable. +/// Plugin names (or specs) to enable, plus the optional working directory the repository-controlled guard is evaluated against. [Experimental(Diagnostics.Experimental)] internal sealed class PluginsEnableRequest { /// Plugin names or "plugin@marketplace" specs to enable. Unknown names are ignored. Non-marketplace direct installs are always enabled and cannot be toggled via this API. [JsonPropertyName("names")] public IList Names { get => field ??= []; set; } + + /// Working directory whose repository `enabledPlugins` overlay decides whether this mutation is repository-controlled. Hosts that serve sessions across several repositories (the SDK server) should pass the session's directory; otherwise the guard is evaluated against the server process's own working directory, which may belong to a different repository. Defaults to the server's current working directory. + [JsonPropertyName("workingDirectory")] + public string? WorkingDirectory { get; set; } } -/// Plugin names (or specs) to disable. +/// Plugin names (or specs) to disable, plus the optional working directory the repository-controlled guard is evaluated against. [Experimental(Diagnostics.Experimental)] internal sealed class PluginsDisableRequest { /// Plugin names or "plugin@marketplace" specs to disable. Unknown names are ignored. Non-marketplace direct installs cannot be disabled via this API; uninstall them instead. Plugin-owned MCP servers are stopped in active sessions immediately; other plugin contributions remain available until each session reloads plugins. [JsonPropertyName("names")] public IList Names { get => field ??= []; set; } + + /// Working directory whose repository `enabledPlugins` overlay decides whether this mutation is repository-controlled. Hosts that serve sessions across several repositories (the SDK server) should pass the session's directory; otherwise the guard is evaluated against the server process's own working directory, which may belong to a different repository. Defaults to the server's current working directory. + [JsonPropertyName("workingDirectory")] + public string? WorkingDirectory { get; set; } } /// Trusted built-in plugin directories to use for this runtime process. @@ -3332,6 +3340,10 @@ public sealed class AgentInfo [JsonPropertyName("description")] public string Description { get; set; } = string.Empty; + /// Whether model-driven invocation is disabled for this agent. + [JsonPropertyName("disableModelInvocation")] + public bool? DisableModelInvocation { get; set; } + /// Human-readable display name. [JsonPropertyName("displayName")] public string DisplayName { get; set; } = string.Empty; @@ -5566,6 +5578,57 @@ internal sealed class SessionSandboxGetEnforcementStatusRequest public string SessionId { get; set; } = string.Empty; } +/// Result of attempting to disable sandboxing for the current session. +[Experimental(Diagnostics.Experimental)] +public sealed class SandboxDisableForSessionResult +{ + /// The authoritative sandbox enabled state after the operation. + [JsonPropertyName("enabled")] + public bool Enabled { get; set; } + + /// Whether this call resolved the pending request and applied the session opt-out. + [JsonPropertyName("success")] + public bool Success { get; set; } +} + +/// Optional informational context describing how and where the permission decision was made. This does not affect permission behavior. +[Experimental(Diagnostics.Experimental)] +public sealed class PermissionDecisionContext +{ + /// Disposition of the permission request as observed by the responding client. + [JsonPropertyName("outcome")] + public PermissionDecisionOutcome Outcome { get; set; } + + /// Whether the responding client could ask a user interactively, was running headlessly, or had no response path. Omit when the client cannot determine this authoritatively. + [JsonPropertyName("responseCapability")] + public PermissionResponseCapability? ResponseCapability { get; set; } + + /// Controlled reason or actor responsible for the response. + [JsonPropertyName("source")] + public PermissionDecisionSource Source { get; set; } + + /// Client surface that submitted the response. + [JsonPropertyName("surface")] + public PermissionDecisionSurface Surface { get; set; } +} + +/// Request to disable sandboxing for the current session while resolving an active sandbox-bypass permission prompt. +[Experimental(Diagnostics.Experimental)] +internal sealed class SandboxDisableForSessionRequest +{ + /// Optional attribution for the permission decision. + [JsonPropertyName("decisionContext")] + public PermissionDecisionContext? DecisionContext { get; set; } + + /// Identifier of the exact pending sandbox-bypass permission request that authorized the session opt-out. + [JsonPropertyName("requestId")] + public string RequestId { get; set; } = string.Empty; + + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + /// Authentication status and account metadata for the session. [Experimental(Diagnostics.Experimental)] public sealed class SessionAuthStatus @@ -6416,6 +6479,11 @@ public partial class FactoryRunFailureFactoryLimitReached : FactoryRunFailure [JsonPropertyName("runId")] public required string RunId { get; set; } + /// Suggested larger ceiling when the runtime can derive one safely. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("suggestedValue")] + public double? SuggestedValue { get; set; } + /// Approved effective ceiling that was reached. [JsonPropertyName("value")] public required double Value { get; set; } @@ -6491,6 +6559,44 @@ public partial class FactoryRunFailureFactoryProviderDisconnected : FactoryRunFa public required string RunId { get; set; } } +/// Durable metadata describing who initiated a factory pause. +/// Polymorphic base type discriminated by type. +[Experimental(Diagnostics.Experimental)] +[JsonPolymorphic( + TypeDiscriminatorPropertyName = "type", + UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FallBackToBaseType)] +[JsonDerivedType(typeof(FactoryPauseInfoUser), "user")] +[JsonDerivedType(typeof(FactoryPauseInfoCheckpoint), "checkpoint")] +public partial class FactoryPauseInfo +{ + /// The type discriminator. + [JsonPropertyName("type")] + public virtual string Type { get; set; } = string.Empty; +} + + +/// The user variant of . +[Experimental(Diagnostics.Experimental)] +public partial class FactoryPauseInfoUser : FactoryPauseInfo +{ + /// + [JsonIgnore] + public override string Type => "user"; +} + +/// The checkpoint variant of . +[Experimental(Diagnostics.Experimental)] +public partial class FactoryPauseInfoCheckpoint : FactoryPauseInfo +{ + /// + [JsonIgnore] + public override string Type => "checkpoint"; + + /// Stable author-defined checkpoint key that initiated the pause. + [JsonPropertyName("key")] + public required string Key { get; set; } +} + /// Complete current or terminal factory run envelope. [Experimental(Diagnostics.Experimental)] public sealed class FactoryRunResult @@ -6507,6 +6613,10 @@ public sealed class FactoryRunResult [JsonPropertyName("failure")] public FactoryRunFailure? Failure { get; set; } + /// Structured pause initiator metadata for a paused attempt. + [JsonPropertyName("pauseInfo")] + public FactoryPauseInfo? PauseInfo { get; set; } + /// Reason for a halted or cancelled run. [JsonPropertyName("reason")] public string? Reason { get; set; } @@ -6764,6 +6874,10 @@ public sealed class FactoryRunTerminal [JsonPropertyName("failure")] public FactoryRunFailure? Failure { get; set; } + /// Pause initiator metadata, or null when the run did not pause. + [JsonPropertyName("pauseInfo")] + public FactoryPauseInfo? PauseInfo { get; set; } + /// Human-readable terminal reason. [JsonPropertyName("reason")] public string? Reason { get; set; } @@ -6785,6 +6899,10 @@ public sealed class FactoryRunSummary [JsonPropertyName("approved")] public FactoryDeclaredLimits? Approved { get; set; } + /// Whether the durable run state currently passes runtime resume eligibility checks. + [JsonPropertyName("canResume")] + public bool CanResume { get; set; } + /// Epoch milliseconds when the run completed, or null while nonterminal. [JsonPropertyName("completedAt")] public long? CompletedAt { get; set; } @@ -7092,6 +7210,10 @@ public sealed class FactoryRunDetail [JsonPropertyName("approved")] public FactoryDeclaredLimits? Approved { get; set; } + /// Whether the durable run state currently passes runtime resume eligibility checks. + [JsonPropertyName("canResume")] + public bool CanResume { get; set; } + /// Epoch milliseconds when the run completed, or null while nonterminal. [JsonPropertyName("completedAt")] public long? CompletedAt { get; set; } @@ -7211,6 +7333,49 @@ internal sealed class FactoryCancelRequest public string SessionId { get; set; } = string.Empty; } +/// Parameters for pausing a running factory. +[Experimental(Diagnostics.Experimental)] +internal sealed class FactoryPauseRequest +{ + /// Factory run identifier. + [JsonPropertyName("runId")] + public string RunId { get; set; } = string.Empty; + + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + +/// RPC data type for SessionFactoryPauseAtCheckpoint operations. +[Experimental(Diagnostics.Experimental)] +internal sealed class SessionFactoryPauseAtCheckpointResult +{ + /// Whether this execution attempt must pause or may continue. + [JsonPropertyName("action")] + public FactoryPauseCheckpointAction Action { get; set; } +} + +/// Parameters for an owned durable pause checkpoint. +[Experimental(Diagnostics.Experimental)] +internal sealed class FactoryPauseCheckpointRequest +{ + /// Opaque token identifying the execution attempt that reached the checkpoint. + [JsonPropertyName("executionToken")] + public string ExecutionToken { get; set; } = string.Empty; + + /// Stable author-defined checkpoint key. + [JsonPropertyName("key")] + public string Key { get; set; } = string.Empty; + + /// Factory run identifier. + [JsonPropertyName("runId")] + public string RunId { get; set; } = string.Empty; + + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + /// Acknowledgement that a factory request was accepted. [Experimental(Diagnostics.Experimental)] public sealed class FactoryAckResult @@ -7268,11 +7433,11 @@ public sealed class FactoryAgentResult [Experimental(Diagnostics.Experimental)] public sealed class FactoryAgentOptions { - /// Optional custom agent name for the subagent. This field is accepted but not yet honored. + /// Optional built-in or custom agent name whose definition configures the subagent. [JsonPropertyName("agent")] public string? Agent { get; set; } - /// Optional context tier for the subagent. This field is accepted but not yet honored. + /// Optional context tier override for the subagent. [JsonPropertyName("contextTier")] public ContextTier? ContextTier { get; set; } @@ -7284,7 +7449,7 @@ public sealed class FactoryAgentOptions [JsonPropertyName("model")] public string? Model { get; set; } - /// Optional reasoning effort for the subagent. This field is accepted but not yet honored. + /// Optional reasoning effort override for the subagent. [JsonPropertyName("reasoningEffort")] public string? ReasoningEffort { get; set; } @@ -7732,6 +7897,40 @@ internal sealed class ModelApplyStartupOverlayRequest public string SessionId { get; set; } = string.Empty; } +/// The applied host allowlist and effective session model policy after intersection. +[Experimental(Diagnostics.Experimental)] +public sealed class ModelSetAllowedModelsResult +{ + /// Normalized host allowlist. Omitted when the host restriction was cleared, or when a relay client does not return the host policy. + [JsonPropertyName("allowedModels")] + public IList? AllowedModels { get; set; } + + /// Effective exact IDs or repository policy patterns after applying the host restriction. Omitted by relay clients that do not return the host policy. + [JsonPropertyName("effectiveAllowedModels")] + public IList? EffectiveAllowedModels { get; set; } + + /// Effective deterministic fallback model, when the policy defines one. + [JsonPropertyName("fallbackModel")] + public string? FallbackModel { get; set; } + + /// Selected session model after reconciling a now-disallowed concrete selection. + [JsonPropertyName("modelId")] + public string? ModelId { get; set; } +} + +/// Host-supplied exact model selection IDs to allow for this running session. CAPI IDs are intersected with repository `.github/allowed_models.txt` policy; provider-qualified IDs remain exempt from repository-only policy but are restricted by this host list. Omit or pass null to clear the host restriction; an explicit empty or disjoint list is rejected. Validation and pre-selection fallback failures preserve the previous restriction. Failures after a fallback selection commits retain the new restriction and selected model; callers should inspect current session state after such an error. +[Experimental(Diagnostics.Experimental)] +internal sealed class ModelSetAllowedModelsRequest +{ + /// Exact model IDs to permit, or null to clear the host restriction. + [JsonPropertyName("allowedModels")] + public IList? AllowedModels { get; set; } + + /// Target session identifier. + [JsonPropertyName("sessionId")] + public string SessionId { get; set; } = string.Empty; +} + /// Update the session's reasoning effort without changing the selected model. Use `switchTo` instead when you also need to change the model. The runtime stores the effort on the session and applies it to subsequent turns. [Experimental(Diagnostics.Experimental)] public sealed class ModelSetReasoningEffortResult @@ -11750,7 +11949,7 @@ public sealed class OptionsUpdateAdditionalContentExclusionPolicy [Experimental(Diagnostics.Experimental)] public sealed class CapiSessionOptions { - /// Routing preference for sessions whose model is `auto`. On create or cold resume, this establishes the preference sent as `tier` on CAPI `/auto` requests; when omitted on cold resume, the runtime restores the last committed preference. On resident resume, a different value requests a safe switch after resume succeeds and cannot change an in-flight turn. Successful switches are persisted for later cold resume. When no preference is supplied or restored, CAPI default routing is used. + /// Routing preference for sessions whose model is `auto`. On create or cold resume, this establishes the preference sent as `tier` on CAPI `/auto` requests; when omitted on cold resume, the runtime restores the last committed preference. On resident resume, a different value requests a safe switch after resume succeeds and cannot change an in-flight turn. Successful switches are persisted for later cold resume. When no preference is supplied or restored, CAPI default routing is used. `fast` is an integrator-only latency preset, not a first-party GitHub Copilot product preference. [JsonPropertyName("autoTier")] public AutoTier? AutoTier { get; set; } @@ -14806,27 +15005,6 @@ public sealed class PermissionRequestResult public bool Success { get; set; } } -/// Optional informational context describing how and where the permission decision was made. This does not affect permission behavior. -[Experimental(Diagnostics.Experimental)] -public sealed class PermissionDecisionContext -{ - /// Disposition of the permission request as observed by the responding client. - [JsonPropertyName("outcome")] - public PermissionDecisionOutcome Outcome { get; set; } - - /// Whether the responding client could ask a user interactively, was running headlessly, or had no response path. Omit when the client cannot determine this authoritatively. - [JsonPropertyName("responseCapability")] - public PermissionResponseCapability? ResponseCapability { get; set; } - - /// Controlled reason or actor responsible for the response. - [JsonPropertyName("source")] - public PermissionDecisionSource Source { get; set; } - - /// Client surface that submitted the response. - [JsonPropertyName("surface")] - public PermissionDecisionSurface Surface { get; set; } -} - /// The client's response to the pending permission prompt. /// Polymorphic base type discriminated by kind. [Experimental(Diagnostics.Experimental)] @@ -18742,6 +18920,10 @@ public sealed class FactoryExecuteRequest [Experimental(Diagnostics.Experimental)] public sealed class FactoryAbortRequest { + /// Opaque token identifying the execution attempt to abort. + [JsonPropertyName("executionToken")] + public string ExecutionToken { get; set; } = string.Empty; + /// Factory run identifier. [JsonPropertyName("runId")] public string RunId { get; set; } = string.Empty; @@ -24303,6 +24485,279 @@ public override void Write(Utf8JsonWriter writer, SessionLogLevel value, JsonSer } +/// Disposition of a permission request as observed by the responding client. +[Experimental(Diagnostics.Experimental)] +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct PermissionDecisionOutcome : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public PermissionDecisionOutcome(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// The request was approved automatically without a new human decision. + public static PermissionDecisionOutcome AutoApproved { get; } = new("auto_approved"); + + /// The request was denied without an interactive user decision; source records why. + public static PermissionDecisionOutcome AutopilotDenied { get; } = new("autopilot_denied"); + + /// The response came from an interactive user prompt. + public static PermissionDecisionOutcome PromptedUser { get; } = new("prompted_user"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(PermissionDecisionOutcome left, PermissionDecisionOutcome right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(PermissionDecisionOutcome left, PermissionDecisionOutcome right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is PermissionDecisionOutcome other && Equals(other); + + /// + public bool Equals(PermissionDecisionOutcome 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 PermissionDecisionOutcome Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, PermissionDecisionOutcome value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(PermissionDecisionOutcome)); + } + } +} + + +/// Response capability available to the client when it settled a permission request. +[Experimental(Diagnostics.Experimental)] +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct PermissionResponseCapability : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public PermissionResponseCapability(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// The client could ask a user for this decision. + public static PermissionResponseCapability Interactive { get; } = new("interactive"); + + /// The client could return an automated response but could not ask a user. + public static PermissionResponseCapability Headless { get; } = new("headless"); + + /// The client had no response path available. + public static PermissionResponseCapability None { get; } = new("none"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(PermissionResponseCapability left, PermissionResponseCapability right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(PermissionResponseCapability left, PermissionResponseCapability right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is PermissionResponseCapability other && Equals(other); + + /// + public bool Equals(PermissionResponseCapability 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 PermissionResponseCapability Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, PermissionResponseCapability value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(PermissionResponseCapability)); + } + } +} + + +/// Controlled reason or actor responsible for a permission response. +[Experimental(Diagnostics.Experimental)] +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct PermissionDecisionSource : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public PermissionDecisionSource(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// The response followed the assisted-approval judge recommendation. + public static PermissionDecisionSource AssistedApproval { get; } = new("assisted_approval"); + + /// A human supplied the response through an interactive prompt. + public static PermissionDecisionSource HumanResponse { get; } = new("human_response"); + + /// The host applied a standing policy or override rather than a judge recommendation or human decision. + public static PermissionDecisionSource HostPolicy { get; } = new("host_policy"); + + /// The host denied the request because no interactive user response was available. + public static PermissionDecisionSource UnattendedFallback { get; } = new("unattended_fallback"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(PermissionDecisionSource left, PermissionDecisionSource right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(PermissionDecisionSource left, PermissionDecisionSource right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is PermissionDecisionSource other && Equals(other); + + /// + public bool Equals(PermissionDecisionSource 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 PermissionDecisionSource Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, PermissionDecisionSource value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(PermissionDecisionSource)); + } + } +} + + +/// Client surface that submitted a permission response. +[Experimental(Diagnostics.Experimental)] +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct PermissionDecisionSurface : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public PermissionDecisionSurface(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// The interactive Copilot CLI terminal UI. + public static PermissionDecisionSurface Tui { get; } = new("tui"); + + /// The non-interactive Copilot CLI prompt mode. + public static PermissionDecisionSurface PromptMode { get; } = new("prompt_mode"); + + /// The Copilot App client. + public static PermissionDecisionSurface CopilotApp { get; } = new("copilot_app"); + + /// An Agent Client Protocol host. + public static PermissionDecisionSurface Acp { get; } = new("acp"); + + /// A generic Copilot SDK client. + public static PermissionDecisionSurface Sdk { get; } = new("sdk"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(PermissionDecisionSurface left, PermissionDecisionSurface right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(PermissionDecisionSurface left, PermissionDecisionSurface right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is PermissionDecisionSurface other && Equals(other); + + /// + public bool Equals(PermissionDecisionSurface 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 PermissionDecisionSurface Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, PermissionDecisionSurface value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(PermissionDecisionSurface)); + } + } +} + + /// Authentication type. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] @@ -24830,6 +25285,9 @@ public FactoryRunStatus(string value) /// The run was interrupted while resource budget remained. public static FactoryRunStatus Halted { get; } = new("halted"); + /// The current attempt stopped intentionally and the run may be resumed. + public static FactoryRunStatus Paused { get; } = new("paused"); + /// The run was cancelled before completion. public static FactoryRunStatus Cancelled { get; } = new("cancelled"); @@ -25005,6 +25463,69 @@ public override void Write(Utf8JsonWriter writer, FactoryLogLineKind value, Json } +/// Action the runtime selected for a durable factory pause checkpoint. +[Experimental(Diagnostics.Experimental)] +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct FactoryPauseCheckpointAction : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public FactoryPauseCheckpointAction(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// The checkpoint was committed by a prior paused attempt, so execution may continue. + public static FactoryPauseCheckpointAction Continue { get; } = new("continue"); + + /// This attempt claimed the checkpoint and must cooperatively stop. + public static FactoryPauseCheckpointAction Pause { get; } = new("pause"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(FactoryPauseCheckpointAction left, FactoryPauseCheckpointAction right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(FactoryPauseCheckpointAction left, FactoryPauseCheckpointAction right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is FactoryPauseCheckpointAction other && Equals(other); + + /// + public bool Equals(FactoryPauseCheckpointAction 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 FactoryPauseCheckpointAction Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, FactoryPauseCheckpointAction value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(FactoryPauseCheckpointAction)); + } + } +} + + /// Whether the requested preference was already effective or was accepted for later transactional activation. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] @@ -28986,279 +29507,6 @@ public override void Write(Utf8JsonWriter writer, PermissionsConfigureAdditional } -/// Disposition of a permission request as observed by the responding client. -[Experimental(Diagnostics.Experimental)] -[JsonConverter(typeof(Converter))] -[DebuggerDisplay("{Value,nq}")] -public readonly struct PermissionDecisionOutcome : IEquatable -{ - private readonly string? _value; - - /// Initializes a new instance of the struct. - /// The value to associate with this . - [JsonConstructor] - public PermissionDecisionOutcome(string value) - { - ArgumentException.ThrowIfNullOrWhiteSpace(value); - _value = value; - } - - /// Gets the value associated with this . - public string Value => _value ?? string.Empty; - - /// The request was approved automatically without a new human decision. - public static PermissionDecisionOutcome AutoApproved { get; } = new("auto_approved"); - - /// The request was denied without an interactive user decision; source records why. - public static PermissionDecisionOutcome AutopilotDenied { get; } = new("autopilot_denied"); - - /// The response came from an interactive user prompt. - public static PermissionDecisionOutcome PromptedUser { get; } = new("prompted_user"); - - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(PermissionDecisionOutcome left, PermissionDecisionOutcome right) => left.Equals(right); - - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(PermissionDecisionOutcome left, PermissionDecisionOutcome right) => !(left == right); - - /// - public override bool Equals(object? obj) => obj is PermissionDecisionOutcome other && Equals(other); - - /// - public bool Equals(PermissionDecisionOutcome 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 PermissionDecisionOutcome Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); - } - - /// - public override void Write(Utf8JsonWriter writer, PermissionDecisionOutcome value, JsonSerializerOptions options) - { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(PermissionDecisionOutcome)); - } - } -} - - -/// Response capability available to the client when it settled a permission request. -[Experimental(Diagnostics.Experimental)] -[JsonConverter(typeof(Converter))] -[DebuggerDisplay("{Value,nq}")] -public readonly struct PermissionResponseCapability : IEquatable -{ - private readonly string? _value; - - /// Initializes a new instance of the struct. - /// The value to associate with this . - [JsonConstructor] - public PermissionResponseCapability(string value) - { - ArgumentException.ThrowIfNullOrWhiteSpace(value); - _value = value; - } - - /// Gets the value associated with this . - public string Value => _value ?? string.Empty; - - /// The client could ask a user for this decision. - public static PermissionResponseCapability Interactive { get; } = new("interactive"); - - /// The client could return an automated response but could not ask a user. - public static PermissionResponseCapability Headless { get; } = new("headless"); - - /// The client had no response path available. - public static PermissionResponseCapability None { get; } = new("none"); - - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(PermissionResponseCapability left, PermissionResponseCapability right) => left.Equals(right); - - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(PermissionResponseCapability left, PermissionResponseCapability right) => !(left == right); - - /// - public override bool Equals(object? obj) => obj is PermissionResponseCapability other && Equals(other); - - /// - public bool Equals(PermissionResponseCapability 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 PermissionResponseCapability Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); - } - - /// - public override void Write(Utf8JsonWriter writer, PermissionResponseCapability value, JsonSerializerOptions options) - { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(PermissionResponseCapability)); - } - } -} - - -/// Controlled reason or actor responsible for a permission response. -[Experimental(Diagnostics.Experimental)] -[JsonConverter(typeof(Converter))] -[DebuggerDisplay("{Value,nq}")] -public readonly struct PermissionDecisionSource : IEquatable -{ - private readonly string? _value; - - /// Initializes a new instance of the struct. - /// The value to associate with this . - [JsonConstructor] - public PermissionDecisionSource(string value) - { - ArgumentException.ThrowIfNullOrWhiteSpace(value); - _value = value; - } - - /// Gets the value associated with this . - public string Value => _value ?? string.Empty; - - /// The response followed the assisted-approval judge recommendation. - public static PermissionDecisionSource AssistedApproval { get; } = new("assisted_approval"); - - /// A human supplied the response through an interactive prompt. - public static PermissionDecisionSource HumanResponse { get; } = new("human_response"); - - /// The host applied a standing policy or override rather than a judge recommendation or human decision. - public static PermissionDecisionSource HostPolicy { get; } = new("host_policy"); - - /// The host denied the request because no interactive user response was available. - public static PermissionDecisionSource UnattendedFallback { get; } = new("unattended_fallback"); - - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(PermissionDecisionSource left, PermissionDecisionSource right) => left.Equals(right); - - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(PermissionDecisionSource left, PermissionDecisionSource right) => !(left == right); - - /// - public override bool Equals(object? obj) => obj is PermissionDecisionSource other && Equals(other); - - /// - public bool Equals(PermissionDecisionSource 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 PermissionDecisionSource Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); - } - - /// - public override void Write(Utf8JsonWriter writer, PermissionDecisionSource value, JsonSerializerOptions options) - { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(PermissionDecisionSource)); - } - } -} - - -/// Client surface that submitted a permission response. -[Experimental(Diagnostics.Experimental)] -[JsonConverter(typeof(Converter))] -[DebuggerDisplay("{Value,nq}")] -public readonly struct PermissionDecisionSurface : IEquatable -{ - private readonly string? _value; - - /// Initializes a new instance of the struct. - /// The value to associate with this . - [JsonConstructor] - public PermissionDecisionSurface(string value) - { - ArgumentException.ThrowIfNullOrWhiteSpace(value); - _value = value; - } - - /// Gets the value associated with this . - public string Value => _value ?? string.Empty; - - /// The interactive Copilot CLI terminal UI. - public static PermissionDecisionSurface Tui { get; } = new("tui"); - - /// The non-interactive Copilot CLI prompt mode. - public static PermissionDecisionSurface PromptMode { get; } = new("prompt_mode"); - - /// The Copilot App client. - public static PermissionDecisionSurface CopilotApp { get; } = new("copilot_app"); - - /// An Agent Client Protocol host. - public static PermissionDecisionSurface Acp { get; } = new("acp"); - - /// A generic Copilot SDK client. - public static PermissionDecisionSurface Sdk { get; } = new("sdk"); - - /// Returns a value indicating whether two instances are equivalent. - public static bool operator ==(PermissionDecisionSurface left, PermissionDecisionSurface right) => left.Equals(right); - - /// Returns a value indicating whether two instances are not equivalent. - public static bool operator !=(PermissionDecisionSurface left, PermissionDecisionSurface right) => !(left == right); - - /// - public override bool Equals(object? obj) => obj is PermissionDecisionSurface other && Equals(other); - - /// - public bool Equals(PermissionDecisionSurface 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 PermissionDecisionSurface Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); - } - - /// - public override void Write(Utf8JsonWriter writer, PermissionDecisionSurface value, JsonSerializerOptions options) - { - GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(PermissionDecisionSurface)); - } - } -} - - /// Optional source for allow-all telemetry. Defaults to `rpc` when omitted for SDK callers. [Experimental(Diagnostics.Experimental)] [JsonConverter(typeof(Converter))] @@ -31860,23 +32108,25 @@ public async Task UpdateAllAsync(CancellationToken cancel /// Enables installed plugins for new sessions. /// Plugin names or "plugin@marketplace" specs to enable. Unknown names are ignored. Non-marketplace direct installs are always enabled and cannot be toggled via this API. + /// Working directory whose repository `enabledPlugins` overlay decides whether this mutation is repository-controlled. Hosts that serve sessions across several repositories (the SDK server) should pass the session's directory; otherwise the guard is evaluated against the server process's own working directory, which may belong to a different repository. Defaults to the server's current working directory. /// The to monitor for cancellation requests. The default is . - public async Task EnableAsync(IList names, CancellationToken cancellationToken = default) + public async Task EnableAsync(IList names, string? workingDirectory = null, CancellationToken cancellationToken = default) { ArgumentNullException.ThrowIfNull(names); - var request = new PluginsEnableRequest { Names = names }; + var request = new PluginsEnableRequest { Names = names, WorkingDirectory = workingDirectory }; await CopilotClient.InvokeRpcAsync(_rpc, "plugins.enable", [request], cancellationToken); } /// Disables installed plugins for new sessions. /// Plugin names or "plugin@marketplace" specs to disable. Unknown names are ignored. Non-marketplace direct installs cannot be disabled via this API; uninstall them instead. Plugin-owned MCP servers are stopped in active sessions immediately; other plugin contributions remain available until each session reloads plugins. + /// Working directory whose repository `enabledPlugins` overlay decides whether this mutation is repository-controlled. Hosts that serve sessions across several repositories (the SDK server) should pass the session's directory; otherwise the guard is evaluated against the server process's own working directory, which may belong to a different repository. Defaults to the server's current working directory. /// The to monitor for cancellation requests. The default is . - public async Task DisableAsync(IList names, CancellationToken cancellationToken = default) + public async Task DisableAsync(IList names, string? workingDirectory = null, CancellationToken cancellationToken = default) { ArgumentNullException.ThrowIfNull(names); - var request = new PluginsDisableRequest { Names = names }; + var request = new PluginsDisableRequest { Names = names, WorkingDirectory = workingDirectory }; await CopilotClient.InvokeRpcAsync(_rpc, "plugins.disable", [request], cancellationToken); } @@ -33167,6 +33417,20 @@ public async Task GetEnforcementStatusAsync(Cancellati var request = new SessionSandboxGetEnforcementStatusRequest { SessionId = _session.SessionId }; return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.sandbox.getEnforcementStatus", [request], cancellationToken); } + + /// Disables sandboxing for the remainder of the current session and approves the referenced pending sandbox-bypass permission request. The request is rejected unless the exact request is still pending and the effective sandbox policy permits bypass. + /// Identifier of the exact pending sandbox-bypass permission request that authorized the session opt-out. + /// Optional attribution for the permission decision. + /// The to monitor for cancellation requests. The default is . + /// Result of attempting to disable sandboxing for the current session. + public async Task DisableForSessionAsync(string requestId, PermissionDecisionContext? decisionContext = null, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(requestId); + _session.ThrowIfDisposed(); + + var request = new SandboxDisableForSessionRequest { SessionId = _session.SessionId, RequestId = requestId, DecisionContext = decisionContext }; + return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.sandbox.disableForSession", [request], cancellationToken); + } } /// Provides session-scoped GitHubAuth APIs. @@ -33618,6 +33882,35 @@ public async Task CancelAsync(string runId, CancellationToken return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.factory.cancel", [request], cancellationToken); } + /// Pauses a running factory and returns its settled run envelope. + /// Factory run identifier. + /// The to monitor for cancellation requests. The default is . + /// Complete current or terminal factory run envelope. + public async Task PauseAsync(string runId, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(runId); + _session.ThrowIfDisposed(); + + var request = new FactoryPauseRequest { SessionId = _session.SessionId, RunId = runId }; + return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.factory.pause", [request], cancellationToken); + } + + /// Atomically pauses an owned factory attempt at a durable checkpoint. + /// Factory run identifier. + /// Opaque token identifying the execution attempt that reached the checkpoint. + /// Stable author-defined checkpoint key. + /// The to monitor for cancellation requests. The default is . + internal async Task PauseAtCheckpointAsync(string runId, string executionToken, string key, CancellationToken cancellationToken = default) + { + ArgumentNullException.ThrowIfNull(runId); + ArgumentNullException.ThrowIfNull(executionToken); + ArgumentNullException.ThrowIfNull(key); + _session.ThrowIfDisposed(); + + var request = new FactoryPauseCheckpointRequest { SessionId = _session.SessionId, RunId = runId, ExecutionToken = executionToken, Key = key }; + return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.factory.pauseAtCheckpoint", [request], cancellationToken); + } + /// Records a batch of ordered factory progress lines. /// Factory run identifier. /// Opaque token identifying the current factory execution attempt. @@ -33790,6 +34083,18 @@ internal async Task ApplyStartupOverlayAsync(string? device return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.model.applyStartupOverlay", [request], cancellationToken); } + /// Replaces or clears the host-supplied model allowlist for a running session. + /// Exact model IDs to permit, or null to clear the host restriction. + /// The to monitor for cancellation requests. The default is . + /// The applied host allowlist and effective session model policy after intersection. + public async Task SetAllowedModelsAsync(IList? allowedModels = null, CancellationToken cancellationToken = default) + { + _session.ThrowIfDisposed(); + + var request = new ModelSetAllowedModelsRequest { SessionId = _session.SessionId, AllowedModels = allowedModels }; + return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.model.setAllowedModels", [request], cancellationToken); + } + /// Updates the session's reasoning effort without changing the selected model. /// Reasoning effort level to apply to the currently selected model. The host is responsible for validating the value against the model's supported levels before calling. /// The to monitor for cancellation requests. The default is . @@ -37794,6 +38099,7 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH [JsonSerializable(typeof(GitHub.Copilot.PromptCacheBreakData), TypeInfoPropertyName = "SessionEventsPromptCacheBreakData")] [JsonSerializable(typeof(GitHub.Copilot.PromptCacheBreakEvent), TypeInfoPropertyName = "SessionEventsPromptCacheBreakEvent")] [JsonSerializable(typeof(GitHub.Copilot.ReasoningSummary), TypeInfoPropertyName = "SessionEventsReasoningSummary")] +[JsonSerializable(typeof(GitHub.Copilot.RecommendedAutoTier), TypeInfoPropertyName = "SessionEventsRecommendedAutoTier")] [JsonSerializable(typeof(GitHub.Copilot.RemediationAction), TypeInfoPropertyName = "SessionEventsRemediationAction")] [JsonSerializable(typeof(GitHub.Copilot.SamplingCompletedData), TypeInfoPropertyName = "SessionEventsSamplingCompletedData")] [JsonSerializable(typeof(GitHub.Copilot.SamplingCompletedEvent), TypeInfoPropertyName = "SessionEventsSamplingCompletedEvent")] @@ -37836,6 +38142,7 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH [JsonSerializable(typeof(GitHub.Copilot.SubagentSelectedEvent), TypeInfoPropertyName = "SessionEventsSubagentSelectedEvent")] [JsonSerializable(typeof(GitHub.Copilot.SubagentStartedData), TypeInfoPropertyName = "SessionEventsSubagentStartedData")] [JsonSerializable(typeof(GitHub.Copilot.SubagentStartedEvent), TypeInfoPropertyName = "SessionEventsSubagentStartedEvent")] +[JsonSerializable(typeof(GitHub.Copilot.SubagentTaskModelSource), TypeInfoPropertyName = "SessionEventsSubagentTaskModelSource")] [JsonSerializable(typeof(GitHub.Copilot.SystemMessageData), TypeInfoPropertyName = "SessionEventsSystemMessageData")] [JsonSerializable(typeof(GitHub.Copilot.SystemMessageEvent), TypeInfoPropertyName = "SessionEventsSystemMessageEvent")] [JsonSerializable(typeof(GitHub.Copilot.SystemMessageMetadata), TypeInfoPropertyName = "SessionEventsSystemMessageMetadata")] @@ -37848,6 +38155,7 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH [JsonSerializable(typeof(GitHub.Copilot.SystemNotificationEvent), TypeInfoPropertyName = "SessionEventsSystemNotificationEvent")] [JsonSerializable(typeof(GitHub.Copilot.SystemNotificationFactoryCompleted), TypeInfoPropertyName = "SessionEventsSystemNotificationFactoryCompleted")] [JsonSerializable(typeof(GitHub.Copilot.SystemNotificationFactoryCompletedStatus), TypeInfoPropertyName = "SessionEventsSystemNotificationFactoryCompletedStatus")] +[JsonSerializable(typeof(GitHub.Copilot.SystemNotificationFactoryPauseInfo), TypeInfoPropertyName = "SessionEventsSystemNotificationFactoryPauseInfo")] [JsonSerializable(typeof(GitHub.Copilot.SystemNotificationInstructionDiscovered), TypeInfoPropertyName = "SessionEventsSystemNotificationInstructionDiscovered")] [JsonSerializable(typeof(GitHub.Copilot.SystemNotificationNewInboxMessage), TypeInfoPropertyName = "SessionEventsSystemNotificationNewInboxMessage")] [JsonSerializable(typeof(GitHub.Copilot.SystemNotificationShellCompleted), TypeInfoPropertyName = "SessionEventsSystemNotificationShellCompleted")] @@ -38071,6 +38379,9 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH [JsonSerializable(typeof(FactoryListRunsResult))] [JsonSerializable(typeof(FactoryLogLine))] [JsonSerializable(typeof(FactoryLogRequest))] +[JsonSerializable(typeof(FactoryPauseCheckpointRequest))] +[JsonSerializable(typeof(FactoryPauseInfo))] +[JsonSerializable(typeof(FactoryPauseRequest))] [JsonSerializable(typeof(FactoryPhaseObservation))] [JsonSerializable(typeof(FactoryProgressLine))] [JsonSerializable(typeof(FactoryProgressPage))] @@ -38290,6 +38601,8 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH [JsonSerializable(typeof(ModelPickerSettingsContext))] [JsonSerializable(typeof(ModelPickerSettingsContextEnvironment))] [JsonSerializable(typeof(ModelPolicy))] +[JsonSerializable(typeof(ModelSetAllowedModelsRequest))] +[JsonSerializable(typeof(ModelSetAllowedModelsResult))] [JsonSerializable(typeof(ModelSetReasoningEffortRequest))] [JsonSerializable(typeof(ModelSetReasoningEffortResult))] [JsonSerializable(typeof(ModelSwitchAutoTierRequest))] @@ -38458,6 +38771,8 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH [JsonSerializable(typeof(SandboxConfigUserPolicyNetwork))] [JsonSerializable(typeof(SandboxConfigUserPolicyNetworkProxy))] [JsonSerializable(typeof(SandboxConfigUserPolicySeatbelt))] +[JsonSerializable(typeof(SandboxDisableForSessionRequest))] +[JsonSerializable(typeof(SandboxDisableForSessionResult))] [JsonSerializable(typeof(SandboxEnforcementStatus))] [JsonSerializable(typeof(ScheduleAddAtRequest))] [JsonSerializable(typeof(ScheduleAddCronRequest))] @@ -38507,6 +38822,7 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH [JsonSerializable(typeof(SessionEventLogTailRequest))] [JsonSerializable(typeof(SessionExtensionsListRequest))] [JsonSerializable(typeof(SessionExtensionsReloadRequest))] +[JsonSerializable(typeof(SessionFactoryPauseAtCheckpointResult))] [JsonSerializable(typeof(SessionFsAppendFileRequest))] [JsonSerializable(typeof(SessionFsError))] [JsonSerializable(typeof(SessionFsExistsRequest))] diff --git a/dotnet/src/Generated/SessionEvents.cs b/dotnet/src/Generated/SessionEvents.cs index 58c8a2c9c..b3c7a65d2 100644 --- a/dotnet/src/Generated/SessionEvents.cs +++ b/dotnet/src/Generated/SessionEvents.cs @@ -84,6 +84,7 @@ namespace GitHub.Copilot; [JsonDerivedType(typeof(SessionLimitsExhaustedCompletedEvent), "session_limits_exhausted.completed")] [JsonDerivedType(typeof(SessionLimitsExhaustedRequestedEvent), "session_limits_exhausted.requested")] [JsonDerivedType(typeof(SessionAutoModeResolvedEvent), "session.auto_mode_resolved")] +[JsonDerivedType(typeof(SessionAutoTierRecommendationEvent), "session.auto_tier_recommendation")] [JsonDerivedType(typeof(SessionAutoTierSwitchFailedEvent), "session.auto_tier_switch_failed")] [JsonDerivedType(typeof(SessionAutopilotObjectiveChangedEvent), "session.autopilot_objective_changed")] [JsonDerivedType(typeof(SessionBackgroundTasksChangedEvent), "session.background_tasks_changed")] @@ -371,6 +372,20 @@ public sealed partial class SessionModelChangeEvent : SessionEvent public required SessionModelChangeData Data { get; set; } } +/// Live-only Auto preference recommendation from Copilot API after a successful Auto model call. +/// Represents the session.auto_tier_recommendation event. +[Experimental(Diagnostics.Experimental)] +public sealed partial class SessionAutoTierRecommendationEvent : SessionEvent +{ + /// + [JsonIgnore] + public override string Type => "session.auto_tier_recommendation"; + + /// The session.auto_tier_recommendation event payload. + [JsonPropertyName("data")] + public required SessionAutoTierRecommendationData Data { get; set; } +} + /// A transient Auto preference failure emitted when the runtime cannot mint or accept a usable model and token pair. The previously effective preference remains active, so SDK clients can surface a non-blocking failure without changing their committed-tier state. This event is ephemeral and is not persisted or replayed on resume. /// Represents the session.auto_tier_switch_failed event. public sealed partial class SessionAutoTierSwitchFailedEvent : SessionEvent @@ -2440,6 +2455,15 @@ public sealed partial class SessionModelChangeData public Verbosity? Verbosity { get; set; } } +/// Live-only Auto preference recommendation from Copilot API after a successful Auto model call. +[Experimental(Diagnostics.Experimental)] +public sealed partial class SessionAutoTierRecommendationData +{ + /// Recommended Auto preference. + [JsonPropertyName("recommendedAutoTier")] + public required RecommendedAutoTier RecommendedAutoTier { get; set; } +} + /// A transient Auto preference failure emitted when the runtime cannot mint or accept a usable model and token pair. The previously effective preference remains active, so SDK clients can surface a non-blocking failure without changing their committed-tier state. This event is ephemeral and is not persisted or replayed on resume. public sealed partial class SessionAutoTierSwitchFailedData { @@ -2502,13 +2526,15 @@ public sealed partial class SessionPermissionsChangedData /// Permission mode after the change. [Experimental(Diagnostics.Experimental)] + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("mode")] - public required PermissionMode Mode { get; set; } + public PermissionMode? Mode { get; set; } /// Permission mode before the change. [Experimental(Diagnostics.Experimental)] + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("previousMode")] - public required PermissionMode PreviousMode { get; set; } + public PermissionMode? PreviousMode { get; set; } } /// Plan file operation details indicating what changed. @@ -2868,6 +2894,12 @@ public sealed partial class SessionCompactionStartData /// Conversation compaction results including success status, metrics, and optional error details. public sealed partial class SessionCompactionCompleteData { + /// Authoritative active-factory reminder appended to the compacted context. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonInclude] + [JsonPropertyName("activeFactorySummary")] + internal string? ActiveFactorySummary { get; set; } + /// Canonical model identifier used for model-specific behavior when replaying compaction. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("behaviorModelId")] @@ -4782,6 +4814,11 @@ public sealed partial class SubagentStartedData [JsonPropertyName("resumable")] public bool? Resumable { get; set; } + /// Where the model input for this sub-agent came from. Present when the task planner resolved the launch (the task tool and factory agents); absent for sub-agents created through other runtime paths. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("taskModelSource")] + public SubagentTaskModelSource? TaskModelSource { get; set; } + /// Tool call ID of the parent tool invocation that spawned this sub-agent. [JsonPropertyName("toolCallId")] public required string ToolCallId { get; set; } @@ -6409,6 +6446,11 @@ public sealed partial class CompactionCompleteCompactionTokensUsedCopilotUsageTo [JsonPropertyName("costPerBatch")] public required long CostPerBatch { get; set; } + /// Model responsible for this billing entry. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("model")] + public string? Model { get; set; } + /// Total token count for this entry. [JsonPropertyName("tokenCount")] public required long TokenCount { get; set; } @@ -6422,6 +6464,12 @@ public sealed partial class CompactionCompleteCompactionTokensUsedCopilotUsageTo /// Nested data type for CompactionCompleteCompactionTokensUsedCopilotUsage. internal sealed partial class CompactionCompleteCompactionTokensUsedCopilotUsage { + /// Default billing model for token details that do not identify their own model. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonInclude] + [JsonPropertyName("model")] + internal string? Model { get; set; } + /// Itemized token usage breakdown. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonInclude] @@ -7508,6 +7556,11 @@ public sealed partial class AssistantUsageCopilotUsageTokenDetail [JsonPropertyName("costPerBatch")] public required long CostPerBatch { get; set; } + /// Model responsible for this billing entry. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("model")] + public string? Model { get; set; } + /// Total token count for this entry. [JsonPropertyName("tokenCount")] public required long TokenCount { get; set; } @@ -7521,6 +7574,11 @@ public sealed partial class AssistantUsageCopilotUsageTokenDetail /// Nested data type for AssistantUsageCopilotUsage. public sealed partial class AssistantUsageCopilotUsage { + /// Default billing model for token details that do not identify their own model. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("model")] + public string? Model { get; set; } + /// Itemized token usage breakdown. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonInclude] @@ -8678,6 +8736,41 @@ public sealed partial class SystemNotificationInstructionDiscovered : SystemNoti public required string TriggerTool { get; set; } } +/// The user variant of . +public sealed partial class SystemNotificationFactoryPauseInfoUser : SystemNotificationFactoryPauseInfo +{ + /// + [JsonIgnore] + public override string Type => "user"; +} + +/// The checkpoint variant of . +public sealed partial class SystemNotificationFactoryPauseInfoCheckpoint : SystemNotificationFactoryPauseInfo +{ + /// + [JsonIgnore] + public override string Type => "checkpoint"; + + /// Stable author-defined checkpoint key that initiated the pause. + [JsonPropertyName("key")] + public required string Key { get; set; } +} + +/// Durable metadata describing who initiated a factory pause. +/// Polymorphic base type discriminated by type. +[JsonPolymorphic( + TypeDiscriminatorPropertyName = "type", + UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FallBackToBaseType)] +[JsonDerivedType(typeof(SystemNotificationFactoryPauseInfoUser), "user")] +[JsonDerivedType(typeof(SystemNotificationFactoryPauseInfoCheckpoint), "checkpoint")] +public partial class SystemNotificationFactoryPauseInfo +{ + /// The type discriminator. + [JsonPropertyName("type")] + public virtual string Type { get; set; } = string.Empty; +} + + /// System notification metadata for a factory execution attempt that reached a terminal state. /// The factory_completed variant of . public sealed partial class SystemNotificationFactoryCompleted : SystemNotification @@ -8711,6 +8804,11 @@ public sealed partial class SystemNotificationFactoryCompleted : SystemNotificat [JsonPropertyName("failure")] public JsonElement? Failure { get; set; } + /// Pause initiator metadata when this attempt settled as paused. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("pauseInfo")] + public SystemNotificationFactoryPauseInfo? PauseInfo { get; set; } + /// Bounded prompt-safe preview of the completed result. [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Safe for generated string properties: JSON Schema minLength/maxLength map to string length validation, not reflection over trimmed Count members")] [MaxLength(256)] @@ -8862,6 +8960,11 @@ public override bool? ManagedApprovalRequired [JsonPropertyName("requestSandboxBypassReason")] public string? RequestSandboxBypassReason { get; set; } + /// True when the requested escalation is a permissive retry rather than a full bypass: the command re-runs inside the sandbox with its file and process restrictions recording instead of blocking, while the network policy stays enforced. Always accompanied by requestSandboxBypass, so hosts that do not recognize this field still treat the request as the escalation it is. Hosts that do recognize it must not describe the command as running outside the sandbox, which would overstate the privilege being granted. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("requestSandboxPermissive")] + public bool? RequestSandboxPermissive { get; set; } + /// Tool call ID that triggered this permission request. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("toolCallId")] @@ -9423,6 +9526,21 @@ public sealed partial class PermissionPromptRequestCommands : PermissionPromptRe [JsonPropertyName("managedApprovalRequired")] public bool? ManagedApprovalRequired { get; set; } + /// True when the shell command is requesting sandbox escalation. This is a request, not a grant. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("requestSandboxBypass")] + public bool? RequestSandboxBypass { get; set; } + + /// Reason for the sandbox escalation request. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("requestSandboxBypassReason")] + public string? RequestSandboxBypassReason { get; set; } + + /// True when the escalation is a permissive retry that keeps the sandbox and network policy attached while recording file and process accesses instead of blocking them. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("requestSandboxPermissive")] + public bool? RequestSandboxPermissive { get; set; } + /// Tool call ID that triggered this permission request. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("toolCallId")] @@ -10478,6 +10596,11 @@ public sealed partial class CustomAgentsUpdatedAgent [JsonPropertyName("description")] public required string Description { get; set; } + /// Whether model-driven invocation is disabled for this agent. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("disableModelInvocation")] + public bool? DisableModelInvocation { get; set; } + /// Human-readable display name. [JsonPropertyName("displayName")] public required string DisplayName { get; set; } @@ -10689,7 +10812,7 @@ public sealed partial class McpAppToolCallCompleteToolMeta public McpAppToolCallCompleteToolMetaUI? Ui { get; set; } } -/// Routing preference used when the session model is `auto`. +/// Routing preference used when the session model is `auto`. `fast` is an integrator-only latency preset and is not a first-party GitHub Copilot product preference. [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] public readonly struct AutoTier : IEquatable @@ -10717,6 +10840,9 @@ public AutoTier(string value) /// Optimize for intelligence. public static AutoTier Intelligence { get; } = new("intelligence"); + /// Integrator-only preset that optimizes for latency. + public static AutoTier Fast { get; } = new("fast"); + /// Returns a value indicating whether two instances are equivalent. public static bool operator ==(AutoTier left, AutoTier right) => left.Equals(right); @@ -11417,6 +11543,70 @@ public override void Write(Utf8JsonWriter writer, ModelChangeSource value, JsonS } } +/// Auto preferences that Copilot API can recommend. +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct RecommendedAutoTier : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public RecommendedAutoTier(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// Optimize for efficiency. + public static RecommendedAutoTier Efficiency { get; } = new("efficiency"); + + /// Balance efficiency and intelligence. + public static RecommendedAutoTier Balance { get; } = new("balance"); + + /// Optimize for intelligence. + public static RecommendedAutoTier Intelligence { get; } = new("intelligence"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(RecommendedAutoTier left, RecommendedAutoTier right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(RecommendedAutoTier left, RecommendedAutoTier right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is RecommendedAutoTier other && Equals(other); + + /// + public bool Equals(RecommendedAutoTier 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 RecommendedAutoTier Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, RecommendedAutoTier value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(RecommendedAutoTier)); + } + } +} + /// Terminal reason an Auto preference activation failed. [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] @@ -14094,6 +14284,73 @@ public override void Write(Utf8JsonWriter writer, SkillInvokedTrigger value, Jso } } +/// Where the model input for a task-tool sub-agent came from. +[JsonConverter(typeof(Converter))] +[DebuggerDisplay("{Value,nq}")] +public readonly struct SubagentTaskModelSource : IEquatable +{ + private readonly string? _value; + + /// Initializes a new instance of the struct. + /// The value to associate with this . + [JsonConstructor] + public SubagentTaskModelSource(string value) + { + ArgumentException.ThrowIfNullOrWhiteSpace(value); + _value = value; + } + + /// Gets the value associated with this . + public string Value => _value ?? string.Empty; + + /// The spawning agent supplied the task tool's model argument. + public static SubagentTaskModelSource TaskArgument { get; } = new("task_argument"); + + /// The task omitted a model and the per-sub-agent settings entry supplied a concrete one. + public static SubagentTaskModelSource SubagentConfiguration { get; } = new("subagent_configuration"); + + /// The task omitted a model and the user-defined custom agent's definition supplied one. + public static SubagentTaskModelSource CustomAgentDefinition { get; } = new("custom_agent_definition"); + + /// Neither the task call, the per-sub-agent settings entry, nor a custom agent definition supplied a model. + public static SubagentTaskModelSource Unset { get; } = new("unset"); + + /// Returns a value indicating whether two instances are equivalent. + public static bool operator ==(SubagentTaskModelSource left, SubagentTaskModelSource right) => left.Equals(right); + + /// Returns a value indicating whether two instances are not equivalent. + public static bool operator !=(SubagentTaskModelSource left, SubagentTaskModelSource right) => !(left == right); + + /// + public override bool Equals(object? obj) => obj is SubagentTaskModelSource other && Equals(other); + + /// + public bool Equals(SubagentTaskModelSource 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 SubagentTaskModelSource Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert)); + } + + /// + public override void Write(Utf8JsonWriter writer, SubagentTaskModelSource value, JsonSerializerOptions options) + { + GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(SubagentTaskModelSource)); + } + } +} + /// Binary asset type discriminator. Use "image" for images and "resource" otherwise. [JsonConverter(typeof(Converter))] [DebuggerDisplay("{Value,nq}")] @@ -14302,6 +14559,9 @@ public SystemNotificationFactoryCompletedStatus(string value) /// The factory was halted. public static SystemNotificationFactoryCompletedStatus Halted { get; } = new("halted"); + /// The factory attempt paused intentionally. + public static SystemNotificationFactoryCompletedStatus Paused { get; } = new("paused"); + /// The factory was cancelled. public static SystemNotificationFactoryCompletedStatus Cancelled { get; } = new("cancelled"); @@ -15793,6 +16053,9 @@ public FactoryRunSettledStatus(string value) /// The run was stopped by a limit, an approval refusal or another policy decision. public static FactoryRunSettledStatus Halted { get; } = new("halted"); + /// The attempt paused intentionally while preserving resumable run state. + public static FactoryRunSettledStatus Paused { get; } = new("paused"); + /// The run was cancelled by its caller or by session disposal. public static FactoryRunSettledStatus Cancelled { get; } = new("cancelled"); @@ -16559,6 +16822,8 @@ public override void Write(Utf8JsonWriter writer, ExtensionsLoadedExtensionStatu [JsonSerializable(typeof(SandboxDecisionEvent))] [JsonSerializable(typeof(SessionAutoModeResolvedData))] [JsonSerializable(typeof(SessionAutoModeResolvedEvent))] +[JsonSerializable(typeof(SessionAutoTierRecommendationData))] +[JsonSerializable(typeof(SessionAutoTierRecommendationEvent))] [JsonSerializable(typeof(SessionAutoTierSwitchFailedData))] [JsonSerializable(typeof(SessionAutoTierSwitchFailedEvent))] [JsonSerializable(typeof(SessionAutopilotObjectiveChangedData))] @@ -16711,6 +16976,9 @@ public override void Write(Utf8JsonWriter writer, ExtensionsLoadedExtensionStatu [JsonSerializable(typeof(SystemNotificationData))] [JsonSerializable(typeof(SystemNotificationEvent))] [JsonSerializable(typeof(SystemNotificationFactoryCompleted))] +[JsonSerializable(typeof(SystemNotificationFactoryPauseInfo))] +[JsonSerializable(typeof(SystemNotificationFactoryPauseInfoCheckpoint))] +[JsonSerializable(typeof(SystemNotificationFactoryPauseInfoUser))] [JsonSerializable(typeof(SystemNotificationInstructionDiscovered))] [JsonSerializable(typeof(SystemNotificationNewInboxMessage))] [JsonSerializable(typeof(SystemNotificationShellCompleted))] diff --git a/go/rpc/zrpc.go b/go/rpc/zrpc.go index 3c9d2d46d..ccc7f1002 100644 --- a/go/rpc/zrpc.go +++ b/go/rpc/zrpc.go @@ -176,6 +176,8 @@ type AgentGetCurrentResult struct { type AgentInfo struct { // Description of the agent's purpose Description string `json:"description"` + // Whether model-driven invocation is disabled for this agent. + DisableModelInvocation *bool `json:"disableModelInvocation,omitempty"` // Human-readable display name DisplayName string `json:"displayName"` // Stable identifier for selection. For most agents this is the same as `name`; for @@ -1414,7 +1416,8 @@ type CapiSessionOptions struct { // resume, the runtime restores the last committed preference. On resident resume, a // different value requests a safe switch after resume succeeds and cannot change an // in-flight turn. Successful switches are persisted for later cold resume. When no - // preference is supplied or restored, CAPI default routing is used. + // preference is supplied or restored, CAPI default routing is used. `fast` is an + // integrator-only latency preset, not a first-party GitHub Copilot product preference. AutoTier *AutoTier `json:"autoTier,omitempty"` // Whether to use WebSocket transport for the CAPI Responses API. Enabled by default when // the model advertises `ws:/responses` support; set to `false` to force the HTTP Responses @@ -3219,6 +3222,8 @@ type ExternalToolTextResultForLlmContentResourceLinkIcon struct { // Experimental: FactoryAbortRequest is part of an experimental API and may change or be // removed. type FactoryAbortRequest struct { + // Opaque token identifying the execution attempt to abort. + ExecutionToken string `json:"executionToken"` // Factory run identifier. RunID string `json:"runId"` // Target session identifier @@ -3235,15 +3240,15 @@ type FactoryAckResult struct { // Experimental: FactoryAgentOptions is part of an experimental API and may change or be // removed. type FactoryAgentOptions struct { - // Optional custom agent name for the subagent. This field is accepted but not yet honored. + // Optional built-in or custom agent name whose definition configures the subagent. Agent *string `json:"agent,omitempty"` - // Optional context tier for the subagent. This field is accepted but not yet honored. + // Optional context tier override for the subagent. ContextTier *ContextTier `json:"contextTier,omitempty"` // Optional label distinguishing otherwise identical memoized agent calls. Label *string `json:"label,omitempty"` // Optional model identifier for the subagent. Model *string `json:"model,omitempty"` - // Optional reasoning effort for the subagent. This field is accepted but not yet honored. + // Optional reasoning effort override for the subagent. ReasoningEffort *string `json:"reasoningEffort,omitempty"` // Optional JSON Schema for structured agent output. Schema any `json:"schema,omitempty"` @@ -3472,6 +3477,69 @@ type FactoryLogRequest struct { RunID string `json:"runId"` } +// Parameters for an owned durable pause checkpoint. +// Experimental: FactoryPauseCheckpointRequest is part of an experimental API and may change +// or be removed. +type FactoryPauseCheckpointRequest struct { + // Opaque token identifying the execution attempt that reached the checkpoint. + ExecutionToken string `json:"executionToken"` + // Stable author-defined checkpoint key. + Key string `json:"key"` + // Factory run identifier. + RunID string `json:"runId"` +} + +// Experimental: FactoryPauseCheckpointResult is part of an experimental API and may change +// or be removed. +type FactoryPauseCheckpointResult struct { + // Whether this execution attempt must pause or may continue. + Action FactoryPauseCheckpointAction `json:"action"` +} + +// Durable metadata describing who initiated a factory pause. +// Experimental: FactoryPauseInfo is part of an experimental API and may change or be +// removed. +type FactoryPauseInfo interface { + factoryPauseInfo() + Type() FactoryPauseInfoType +} + +type RawFactoryPauseInfoData struct { + Discriminator FactoryPauseInfoType + Raw json.RawMessage +} + +func (RawFactoryPauseInfoData) factoryPauseInfo() {} +func (r RawFactoryPauseInfoData) Type() FactoryPauseInfoType { + return r.Discriminator +} + +type FactoryPauseInfoCheckpoint struct { + // Stable author-defined checkpoint key that initiated the pause. + Key string `json:"key"` +} + +func (FactoryPauseInfoCheckpoint) factoryPauseInfo() {} +func (FactoryPauseInfoCheckpoint) Type() FactoryPauseInfoType { + return FactoryPauseInfoTypeCheckpoint +} + +type FactoryPauseInfoUser struct { +} + +func (FactoryPauseInfoUser) factoryPauseInfo() {} +func (FactoryPauseInfoUser) Type() FactoryPauseInfoType { + return FactoryPauseInfoTypeUser +} + +// Parameters for pausing a running factory. +// Experimental: FactoryPauseRequest is part of an experimental API and may change or be +// removed. +type FactoryPauseRequest struct { + // Factory run identifier. + RunID string `json:"runId"` +} + // Durable lifecycle and timing for one factory phase. // Experimental: FactoryPhaseObservation is part of an experimental API and may change or be // removed. @@ -3589,6 +3657,8 @@ type FactoryRunDetail struct { Agents []FactoryAgentSummary `json:"agents"` // Approved effective resource ceilings, or null until approved. Approved *FactoryDeclaredLimits `json:"approved"` + // Whether the durable run state currently passes runtime resume eligibility checks. + CanResume bool `json:"canResume"` // Epoch milliseconds when the run completed, or null while nonterminal. CompletedAt *int64 `json:"completedAt"` // Durable resource consumption. @@ -3679,6 +3749,8 @@ type FactoryRunFailureFactoryLimitReached struct { Kind FactoryRunFailureKind `json:"kind"` // Factory run identifier. RunID string `json:"runId"` + // Suggested larger ceiling when the runtime can derive one safely. + SuggestedValue *float64 `json:"suggestedValue,omitempty"` // Approved effective ceiling that was reached. Value float64 `json:"value"` } @@ -3752,6 +3824,8 @@ type FactoryRunResult struct { Error *string `json:"error,omitempty"` // Machine-readable failure details for a halted or errored run. Failure FactoryRunFailure `json:"failure,omitempty"` + // Structured pause initiator metadata for a paused attempt. + PauseInfo FactoryPauseInfo `json:"pauseInfo,omitempty"` // Reason for a halted or cancelled run. Reason *string `json:"reason,omitempty"` // Completed factory result. @@ -3772,6 +3846,8 @@ type FactoryRunSummary struct { ActiveSegmentStartedAt *int64 `json:"activeSegmentStartedAt"` // Approved effective resource ceilings, or null until approved. Approved *FactoryDeclaredLimits `json:"approved"` + // Whether the durable run state currently passes runtime resume eligibility checks. + CanResume bool `json:"canResume"` // Epoch milliseconds when the run completed, or null while nonterminal. CompletedAt *int64 `json:"completedAt"` // Durable resource consumption. @@ -3816,6 +3892,8 @@ type FactoryRunTerminal struct { Error *string `json:"error,omitempty"` // Machine-readable terminal failure. Failure FactoryRunFailure `json:"failure,omitempty"` + // Pause initiator metadata, or null when the run did not pause. + PauseInfo FactoryPauseInfo `json:"pauseInfo"` // Human-readable terminal reason. Reason *string `json:"reason,omitempty"` // Prompt-safe preview of the completed result. @@ -7339,6 +7417,36 @@ type ModelPolicy struct { Terms *string `json:"terms,omitempty"` } +// Host-supplied exact model selection IDs to allow for this running session. CAPI IDs are +// intersected with repository `.github/allowed_models.txt` policy; provider-qualified IDs +// remain exempt from repository-only policy but are restricted by this host list. Omit or +// pass null to clear the host restriction; an explicit empty or disjoint list is rejected. +// Validation and pre-selection fallback failures preserve the previous restriction. +// Failures after a fallback selection commits retain the new restriction and selected +// model; callers should inspect current session state after such an error. +// Experimental: ModelSetAllowedModelsRequest is part of an experimental API and may change +// or be removed. +type ModelSetAllowedModelsRequest struct { + // Exact model IDs to permit, or null to clear the host restriction. + AllowedModels []string `json:"allowedModels,omitzero"` +} + +// The applied host allowlist and effective session model policy after intersection. +// Experimental: ModelSetAllowedModelsResult is part of an experimental API and may change +// or be removed. +type ModelSetAllowedModelsResult struct { + // Normalized host allowlist. Omitted when the host restriction was cleared, or when a relay + // client does not return the host policy. + AllowedModels []string `json:"allowedModels,omitzero"` + // Effective exact IDs or repository policy patterns after applying the host restriction. + // Omitted by relay clients that do not return the host policy. + EffectiveAllowedModels []string `json:"effectiveAllowedModels,omitzero"` + // Effective deterministic fallback model, when the policy defines one. + FallbackModel *string `json:"fallbackModel,omitempty"` + // Selected session model after reconciling a now-disallowed concrete selection. + ModelID *string `json:"modelId,omitempty"` +} + // Reasoning effort level to apply to the currently selected model. // Experimental: ModelSetReasoningEffortRequest is part of an experimental API and may // change or be removed. @@ -9100,7 +9208,8 @@ type PluginsBuiltinSetRequest struct { type PluginsBuiltinSetResult struct { } -// Plugin names (or specs) to disable. +// Plugin names (or specs) to disable, plus the optional working directory the +// repository-controlled guard is evaluated against. // Experimental: PluginsDisableRequest is part of an experimental API and may change or be // removed. type PluginsDisableRequest struct { @@ -9109,6 +9218,12 @@ type PluginsDisableRequest struct { // Plugin-owned MCP servers are stopped in active sessions immediately; other plugin // contributions remain available until each session reloads plugins. Names []string `json:"names"` + // Working directory whose repository `enabledPlugins` overlay decides whether this mutation + // is repository-controlled. Hosts that serve sessions across several repositories (the SDK + // server) should pass the session's directory; otherwise the guard is evaluated against the + // server process's own working directory, which may belong to a different repository. + // Defaults to the server's current working directory. + WorkingDirectory *string `json:"workingDirectory,omitempty"` } // Experimental: PluginsDisableResult is part of an experimental API and may change or be @@ -9116,13 +9231,20 @@ type PluginsDisableRequest struct { type PluginsDisableResult struct { } -// Plugin names (or specs) to enable. +// Plugin names (or specs) to enable, plus the optional working directory the +// repository-controlled guard is evaluated against. // Experimental: PluginsEnableRequest is part of an experimental API and may change or be // removed. type PluginsEnableRequest struct { // Plugin names or "plugin@marketplace" specs to enable. Unknown names are ignored. // Non-marketplace direct installs are always enabled and cannot be toggled via this API. Names []string `json:"names"` + // Working directory whose repository `enabledPlugins` overlay decides whether this mutation + // is repository-controlled. Hosts that serve sessions across several repositories (the SDK + // server) should pass the session's directory; otherwise the guard is evaluated against the + // server process's own working directory, which may belong to a different repository. + // Defaults to the server's current working directory. + WorkingDirectory *string `json:"workingDirectory,omitempty"` } // Experimental: PluginsEnableResult is part of an experimental API and may change or be @@ -10625,6 +10747,28 @@ type SandboxConfigUserPolicySeatbelt struct { KeychainAccess *bool `json:"keychainAccess,omitempty"` } +// Request to disable sandboxing for the current session while resolving an active +// sandbox-bypass permission prompt. +// Experimental: SandboxDisableForSessionRequest is part of an experimental API and may +// change or be removed. +type SandboxDisableForSessionRequest struct { + // Optional attribution for the permission decision. + DecisionContext *PermissionDecisionContext `json:"decisionContext,omitempty"` + // Identifier of the exact pending sandbox-bypass permission request that authorized the + // session opt-out. + RequestID string `json:"requestId"` +} + +// Result of attempting to disable sandboxing for the current session. +// Experimental: SandboxDisableForSessionResult is part of an experimental API and may +// change or be removed. +type SandboxDisableForSessionResult struct { + // The authoritative sandbox enabled state after the operation. + Enabled bool `json:"enabled"` + // Whether this call resolved the pending request and applied the session opt-out. + Success bool `json:"success"` +} + // Managed sandbox enforcement state for a session. // Experimental: SandboxEnforcementStatus is part of an experimental API and may change or // be removed. @@ -11321,6 +11465,13 @@ type SessionExtensionsReloadResult struct { type SessionExtensionsSendAttachmentsToMessageResult struct { } +// Experimental: SessionFactoryPauseAtCheckpointResult is part of an experimental API and +// may change or be removed. +type SessionFactoryPauseAtCheckpointResult struct { + // Whether this execution attempt must pause or may continue. + Action FactoryPauseCheckpointAction `json:"action"` +} + // File path, content to append, and optional mode for the client-provided session // filesystem. // Experimental: SessionFSAppendFileRequest is part of an experimental API and may change or @@ -16505,7 +16656,8 @@ const ( AutopilotObjectiveStatusPaused AutopilotObjectiveStatus = "paused" ) -// Routing preference used when the session model is `auto`. +// Routing preference used when the session model is `auto`. `fast` is an integrator-only +// latency preset and is not a first-party GitHub Copilot product preference. // Experimental: AutoTier is part of an experimental API and may change or be removed. type AutoTier string @@ -16514,6 +16666,8 @@ const ( AutoTierBalance AutoTier = "balance" // Optimize for efficiency. AutoTierEfficiency AutoTier = "efficiency" + // Integrator-only preset that optimizes for latency. + AutoTierFast AutoTier = "fast" // Optimize for intelligence. AutoTierIntelligence AutoTier = "intelligence" ) @@ -17208,6 +17362,26 @@ const ( FactoryLogLineKindPhase FactoryLogLineKind = "phase" ) +// Action the runtime selected for a durable factory pause checkpoint. +// Experimental: FactoryPauseCheckpointAction is part of an experimental API and may change +// or be removed. +type FactoryPauseCheckpointAction string + +const ( + // The checkpoint was committed by a prior paused attempt, so execution may continue. + FactoryPauseCheckpointActionContinue FactoryPauseCheckpointAction = "continue" + // This attempt claimed the checkpoint and must cooperatively stop. + FactoryPauseCheckpointActionPause FactoryPauseCheckpointAction = "pause" +) + +// Type discriminator for FactoryPauseInfo. +type FactoryPauseInfoType string + +const ( + FactoryPauseInfoTypeCheckpoint FactoryPauseInfoType = "checkpoint" + FactoryPauseInfoTypeUser FactoryPauseInfoType = "user" +) + // Derived lifecycle state of a factory phase. // Experimental: FactoryPhaseStatus is part of an experimental API and may change or be // removed. @@ -17265,6 +17439,8 @@ const ( FactoryRunStatusError FactoryRunStatus = "error" // The run was interrupted while resource budget remained. FactoryRunStatusHalted FactoryRunStatus = "halted" + // The current attempt stopped intentionally and the run may be resumed. + FactoryRunStatusPaused FactoryRunStatus = "paused" // The run was minted and is awaiting approval. FactoryRunStatusPending FactoryRunStatus = "pending" // The run is executing. @@ -20549,7 +20725,8 @@ type ServerPluginsAPI serverAPI // // RPC method: plugins.disable. // -// Parameters: Plugin names (or specs) to disable. +// Parameters: Plugin names (or specs) to disable, plus the optional working directory the +// repository-controlled guard is evaluated against. func (a *ServerPluginsAPI) Disable(ctx context.Context, params *PluginsDisableRequest) (*PluginsDisableResult, error) { raw, err := a.client.Request(ctx, "plugins.disable", params) if err != nil { @@ -20566,7 +20743,8 @@ func (a *ServerPluginsAPI) Disable(ctx context.Context, params *PluginsDisableRe // // RPC method: plugins.enable. // -// Parameters: Plugin names (or specs) to enable. +// Parameters: Plugin names (or specs) to enable, plus the optional working directory the +// repository-controlled guard is evaluated against. func (a *ServerPluginsAPI) Enable(ctx context.Context, params *PluginsEnableRequest) (*PluginsEnableResult, error) { raw, err := a.client.Request(ctx, "plugins.enable", params) if err != nil { @@ -22888,6 +23066,29 @@ func (a *FactoryAPI) Log(ctx context.Context, params *FactoryLogRequest) (*Facto return &result, nil } +// Pauses a running factory and returns its settled run envelope. +// +// RPC method: session.factory.pause. +// +// Parameters: Parameters for pausing a running factory. +// +// Returns: Complete current or terminal factory run envelope. +func (a *FactoryAPI) Pause(ctx context.Context, params *FactoryPauseRequest) (*FactoryRunResult, error) { + req := map[string]any{"sessionId": a.sessionID} + if params != nil { + req["runId"] = params.RunID + } + raw, err := a.client.Request(ctx, "session.factory.pause", req) + if err != nil { + return nil, err + } + var result FactoryRunResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + // Resumes a factory run using its persisted name, arguments, journal, and accounting. // // RPC method: session.factory.resume. @@ -24532,6 +24733,39 @@ func (a *ModelAPI) List(ctx context.Context, params ...*SessionModelListRequest) return &result, nil } +// SetAllowedModels replaces or clears the host-supplied model allowlist for a running +// session. +// +// RPC method: session.model.setAllowedModels. +// +// Parameters: Host-supplied exact model selection IDs to allow for this running session. +// CAPI IDs are intersected with repository `.github/allowed_models.txt` policy; +// provider-qualified IDs remain exempt from repository-only policy but are restricted by +// this host list. Omit or pass null to clear the host restriction; an explicit empty or +// disjoint list is rejected. Validation and pre-selection fallback failures preserve the +// previous restriction. Failures after a fallback selection commits retain the new +// restriction and selected model; callers should inspect current session state after such +// an error. +// +// Returns: The applied host allowlist and effective session model policy after intersection. +func (a *ModelAPI) SetAllowedModels(ctx context.Context, params *ModelSetAllowedModelsRequest) (*ModelSetAllowedModelsResult, error) { + req := map[string]any{"sessionId": a.sessionID} + if params != nil { + if params.AllowedModels != nil { + req["allowedModels"] = params.AllowedModels + } + } + raw, err := a.client.Request(ctx, "session.model.setAllowedModels", req) + if err != nil { + return nil, err + } + var result ModelSetAllowedModelsResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + // SetReasoningEffort updates the session's reasoning effort without changing the selected // model. // @@ -26032,6 +26266,36 @@ func (a *RemoteAPI) NotifySteerableChanged(ctx context.Context, params *RemoteNo // Experimental: SandboxAPI contains experimental APIs that may change or be removed. type SandboxAPI sessionAPI +// DisableForSession disables sandboxing for the remainder of the current session and +// approves the referenced pending sandbox-bypass permission request. The request is +// rejected unless the exact request is still pending and the effective sandbox policy +// permits bypass. +// +// RPC method: session.sandbox.disableForSession. +// +// Parameters: Request to disable sandboxing for the current session while resolving an +// active sandbox-bypass permission prompt. +// +// Returns: Result of attempting to disable sandboxing for the current session. +func (a *SandboxAPI) DisableForSession(ctx context.Context, params *SandboxDisableForSessionRequest) (*SandboxDisableForSessionResult, error) { + req := map[string]any{"sessionId": a.sessionID} + if params != nil { + if params.DecisionContext != nil { + req["decisionContext"] = *params.DecisionContext + } + req["requestId"] = params.RequestID + } + raw, err := a.client.Request(ctx, "session.sandbox.disableForSession", req) + if err != nil { + return nil, err + } + var result SandboxDisableForSessionResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + // GetEnforcementStatus returns whether managed policy requires sandbox enforcement and // whether an enforcement failure has permanently blocked the session. // @@ -28097,6 +28361,31 @@ func (a *InternalCommandsAPI) FinalizeInvocationEffect(ctx context.Context, para // Experimental: InternalFactoryAPI contains experimental APIs that may change or be removed. type InternalFactoryAPI internalSessionAPI +// PauseAtCheckpoint atomically pauses an owned factory attempt at a durable checkpoint. +// +// RPC method: session.factory.pauseAtCheckpoint. +// +// Parameters: Parameters for an owned durable pause checkpoint. +// Internal: PauseAtCheckpoint is part of the SDK's internal handshake/plumbing; external +// callers should not use it. +func (a *InternalFactoryAPI) PauseAtCheckpoint(ctx context.Context, params *FactoryPauseCheckpointRequest) (*SessionFactoryPauseAtCheckpointResult, error) { + req := map[string]any{"sessionId": a.sessionID} + if params != nil { + req["executionToken"] = params.ExecutionToken + req["key"] = params.Key + req["runId"] = params.RunID + } + raw, err := a.client.Request(ctx, "session.factory.pauseAtCheckpoint", req) + if err != nil { + return nil, err + } + var result SessionFactoryPauseAtCheckpointResult + if err := json.Unmarshal(raw, &result); err != nil { + return nil, err + } + return &result, nil +} + // ResumeFromTool internal tool-originated factory resume. // // RPC method: session.factory.resumeFromTool. diff --git a/go/rpc/zrpc_encoding.go b/go/rpc/zrpc_encoding.go index 13d190be2..9bd20eec3 100644 --- a/go/rpc/zrpc_encoding.go +++ b/go/rpc/zrpc_encoding.go @@ -1689,10 +1689,74 @@ func (r FactoryRunFailureFactoryResumeDeclined) MarshalJSON() ([]byte, error) { }) } +func unmarshalFactoryPauseInfo(data []byte) (FactoryPauseInfo, error) { + if string(data) == "null" { + return nil, nil + } + type rawUnion struct { + Type FactoryPauseInfoType `json:"type"` + } + var raw rawUnion + if err := json.Unmarshal(data, &raw); err != nil { + return nil, err + } + + switch raw.Type { + case FactoryPauseInfoTypeCheckpoint: + var d FactoryPauseInfoCheckpoint + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + case FactoryPauseInfoTypeUser: + var d FactoryPauseInfoUser + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + default: + return &RawFactoryPauseInfoData{Discriminator: raw.Type, Raw: data}, nil + } +} + +func (r RawFactoryPauseInfoData) MarshalJSON() ([]byte, error) { + if r.Raw != nil { + return r.Raw, nil + } + return json.Marshal(struct { + Type FactoryPauseInfoType `json:"type"` + }{ + Type: r.Discriminator, + }) +} + +func (r FactoryPauseInfoCheckpoint) MarshalJSON() ([]byte, error) { + type alias FactoryPauseInfoCheckpoint + return json.Marshal(struct { + Type FactoryPauseInfoType `json:"type"` + alias + }{ + Type: r.Type(), + alias: alias(r), + }) +} + +func (r FactoryPauseInfoUser) MarshalJSON() ([]byte, error) { + type alias FactoryPauseInfoUser + return json.Marshal(struct { + Type FactoryPauseInfoType `json:"type"` + alias + }{ + Type: r.Type(), + alias: alias(r), + }) +} + func (r *FactoryRunTerminal) UnmarshalJSON(data []byte) error { type rawFactoryRunTerminal struct { Error *string `json:"error,omitempty"` Failure json.RawMessage `json:"failure,omitempty"` + PauseInfo json.RawMessage `json:"pauseInfo"` Reason *string `json:"reason,omitempty"` ResultPreview *string `json:"resultPreview,omitempty"` } @@ -1708,6 +1772,13 @@ func (r *FactoryRunTerminal) UnmarshalJSON(data []byte) error { } r.Failure = value } + if raw.PauseInfo != nil { + value, err := unmarshalFactoryPauseInfo(raw.PauseInfo) + if err != nil { + return err + } + r.PauseInfo = value + } r.Reason = raw.Reason r.ResultPreview = raw.ResultPreview return nil @@ -1715,14 +1786,15 @@ func (r *FactoryRunTerminal) UnmarshalJSON(data []byte) error { func (r *FactoryRunResult) UnmarshalJSON(data []byte) error { type rawFactoryRunResult struct { - Attempt *int64 `json:"attempt,omitempty"` - Error *string `json:"error,omitempty"` - Failure json.RawMessage `json:"failure,omitempty"` - Reason *string `json:"reason,omitempty"` - Result any `json:"result,omitempty"` - RunID string `json:"runId"` - Snapshot any `json:"snapshot,omitempty"` - Status FactoryRunStatus `json:"status"` + Attempt *int64 `json:"attempt,omitempty"` + Error *string `json:"error,omitempty"` + Failure json.RawMessage `json:"failure,omitempty"` + PauseInfo json.RawMessage `json:"pauseInfo,omitempty"` + Reason *string `json:"reason,omitempty"` + Result any `json:"result,omitempty"` + RunID string `json:"runId"` + Snapshot any `json:"snapshot,omitempty"` + Status FactoryRunStatus `json:"status"` } var raw rawFactoryRunResult if err := json.Unmarshal(data, &raw); err != nil { @@ -1737,6 +1809,13 @@ func (r *FactoryRunResult) UnmarshalJSON(data []byte) error { } r.Failure = value } + if raw.PauseInfo != nil { + value, err := unmarshalFactoryPauseInfo(raw.PauseInfo) + if err != nil { + return err + } + r.PauseInfo = value + } r.Reason = raw.Reason r.Result = raw.Result r.RunID = raw.RunID diff --git a/go/rpc/zsession_encoding.go b/go/rpc/zsession_encoding.go index a220b79ad..db4db7f74 100644 --- a/go/rpc/zsession_encoding.go +++ b/go/rpc/zsession_encoding.go @@ -389,6 +389,12 @@ func (e *SessionEvent) UnmarshalJSON(data []byte) error { return err } e.Data = &d + case SessionEventTypeSessionAutoTierRecommendation: + var d SessionAutoTierRecommendationData + if err := json.Unmarshal(raw.Data, &d); err != nil { + return err + } + e.Data = &d case SessionEventTypeSessionAutoTierSwitchFailed: var d SessionAutoTierSwitchFailedData if err := json.Unmarshal(raw.Data, &d); err != nil { @@ -1562,6 +1568,107 @@ func (r SystemNotificationAgentIdle) MarshalJSON() ([]byte, error) { }) } +func unmarshalSystemNotificationFactoryPauseInfo(data []byte) (SystemNotificationFactoryPauseInfo, error) { + if string(data) == "null" { + return nil, nil + } + type rawUnion struct { + Type SystemNotificationFactoryPauseInfoType `json:"type"` + } + var raw rawUnion + if err := json.Unmarshal(data, &raw); err != nil { + return nil, err + } + + switch raw.Type { + case SystemNotificationFactoryPauseInfoTypeCheckpoint: + var d SystemNotificationFactoryPauseInfoCheckpoint + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + case SystemNotificationFactoryPauseInfoTypeUser: + var d SystemNotificationFactoryPauseInfoUser + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil + default: + return &RawSystemNotificationFactoryPauseInfo{Discriminator: raw.Type, Raw: data}, nil + } +} + +func (r RawSystemNotificationFactoryPauseInfo) MarshalJSON() ([]byte, error) { + if r.Raw != nil { + return r.Raw, nil + } + return json.Marshal(struct { + Type SystemNotificationFactoryPauseInfoType `json:"type"` + }{ + Type: r.Discriminator, + }) +} + +func (r SystemNotificationFactoryPauseInfoCheckpoint) MarshalJSON() ([]byte, error) { + type alias SystemNotificationFactoryPauseInfoCheckpoint + return json.Marshal(struct { + Type SystemNotificationFactoryPauseInfoType `json:"type"` + alias + }{ + Type: r.Type(), + alias: alias(r), + }) +} + +func (r SystemNotificationFactoryPauseInfoUser) MarshalJSON() ([]byte, error) { + type alias SystemNotificationFactoryPauseInfoUser + return json.Marshal(struct { + Type SystemNotificationFactoryPauseInfoType `json:"type"` + alias + }{ + Type: r.Type(), + alias: alias(r), + }) +} + +func (r *SystemNotificationFactoryCompleted) UnmarshalJSON(data []byte) error { + type rawSystemNotificationFactoryCompleted struct { + Attempt int64 `json:"attempt"` + ConsumedNanoAiu int64 `json:"consumedNanoAiu"` + ConsumedSubagents int64 `json:"consumedSubagents"` + ElapsedMs int64 `json:"elapsedMs"` + FactoryName string `json:"factoryName"` + Failure any `json:"failure,omitempty"` + PauseInfo json.RawMessage `json:"pauseInfo,omitempty"` + ResultPreview *string `json:"resultPreview,omitempty"` + RetryGuidance *string `json:"retryGuidance,omitempty"` + RunID string `json:"runId"` + Status SystemNotificationFactoryCompletedStatus `json:"status"` + } + var raw rawSystemNotificationFactoryCompleted + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + r.Attempt = raw.Attempt + r.ConsumedNanoAiu = raw.ConsumedNanoAiu + r.ConsumedSubagents = raw.ConsumedSubagents + r.ElapsedMs = raw.ElapsedMs + r.FactoryName = raw.FactoryName + r.Failure = raw.Failure + if raw.PauseInfo != nil { + value, err := unmarshalSystemNotificationFactoryPauseInfo(raw.PauseInfo) + if err != nil { + return err + } + r.PauseInfo = value + } + r.ResultPreview = raw.ResultPreview + r.RetryGuidance = raw.RetryGuidance + r.RunID = raw.RunID + r.Status = raw.Status + return nil +} + func (r SystemNotificationFactoryCompleted) MarshalJSON() ([]byte, error) { type alias SystemNotificationFactoryCompleted return json.Marshal(struct { diff --git a/go/rpc/zsession_events.go b/go/rpc/zsession_events.go index 2874e1f59..de6e32080 100644 --- a/go/rpc/zsession_events.go +++ b/go/rpc/zsession_events.go @@ -128,8 +128,11 @@ const ( // that may change or be removed. SessionEventTypeSessionAutoModeResolved SessionEventType = "session.auto_mode_resolved" SessionEventTypeSessionAutopilotObjectiveChanged SessionEventType = "session.autopilot_objective_changed" - SessionEventTypeSessionAutoTierSwitchFailed SessionEventType = "session.auto_tier_switch_failed" - SessionEventTypeSessionBackgroundTasksChanged SessionEventType = "session.background_tasks_changed" + // Experimental: SessionEventTypeSessionAutoTierRecommendation identifies an experimental + // event that may change or be removed. + SessionEventTypeSessionAutoTierRecommendation SessionEventType = "session.auto_tier_recommendation" + SessionEventTypeSessionAutoTierSwitchFailed SessionEventType = "session.auto_tier_switch_failed" + SessionEventTypeSessionBackgroundTasksChanged SessionEventType = "session.background_tasks_changed" // Experimental: SessionEventTypeSessionBinaryAsset identifies an experimental event that // may change or be removed. SessionEventTypeSessionBinaryAsset SessionEventType = "session.binary_asset" @@ -583,6 +586,9 @@ func (*SessionContextClearedData) Type() SessionEventType { // Conversation compaction results including success status, metrics, and optional error details type SessionCompactionCompleteData struct { + // Authoritative active-factory reminder appended to the compacted context + // Internal: ActiveFactorySummary is part of the SDK's internal API surface and is not intended for external use. + ActiveFactorySummary *string `json:"activeFactorySummary,omitempty"` // Canonical model identifier used for model-specific behavior when replaying compaction BehaviorModelID *string `json:"behaviorModelId,omitempty"` // Checkpoint snapshot number created for recovery @@ -1483,6 +1489,18 @@ func (*AssistantServerToolProgressData) Type() SessionEventType { return SessionEventTypeAssistantServerToolProgress } +// Live-only Auto preference recommendation from Copilot API after a successful Auto model call. +// Experimental: SessionAutoTierRecommendationData is part of an experimental API and may change or be removed. +type SessionAutoTierRecommendationData struct { + // Recommended Auto preference. + RecommendedAutoTier RecommendedAutoTier `json:"recommendedAutoTier"` +} + +func (*SessionAutoTierRecommendationData) sessionEventData() {} +func (*SessionAutoTierRecommendationData) Type() SessionEventType { + return SessionEventTypeSessionAutoTierRecommendation +} + // MCP App view called a tool on a connected MCP server (SEP-1865) type MCPAppToolCallCompleteData struct { // Arguments passed to the tool by the app view, if any @@ -1985,10 +2003,10 @@ type SessionPermissionsChangedData struct { AssistedApprovalModel *string `json:"assistedApprovalModel,omitempty"` // Permission mode after the change // Experimental: Mode is part of an experimental API and may change or be removed. - Mode PermissionMode `json:"mode"` + Mode *PermissionMode `json:"mode,omitempty"` // Permission mode before the change // Experimental: PreviousMode is part of an experimental API and may change or be removed. - PreviousMode PermissionMode `json:"previousMode"` + PreviousMode *PermissionMode `json:"previousMode,omitempty"` } func (*SessionPermissionsChangedData) sessionEventData() {} @@ -2642,6 +2660,8 @@ type SubagentStartedData struct { ParentID *string `json:"parentId,omitempty"` // Whether this sub-agent can be resumed. Currently always false. Resumable *bool `json:"resumable,omitempty"` + // Where the model input for this sub-agent came from. Present when the task planner resolved the launch (the task tool and factory agents); absent for sub-agents created through other runtime paths. + TaskModelSource *SubagentTaskModelSource `json:"taskModelSource,omitempty"` // Tool call ID of the parent tool invocation that spawned this sub-agent ToolCallID string `json:"toolCallId"` } @@ -2977,6 +2997,8 @@ type AssistantMessageToolRequestCaller struct { // Per-request cost and usage data from the CAPI copilot_usage response field type AssistantUsageCopilotUsage struct { + // Default billing model for token details that do not identify their own model + Model *string `json:"model,omitempty"` // Itemized token usage breakdown // Internal: TokenDetails is part of the SDK's internal API surface and is not intended for external use. TokenDetails []AssistantUsageCopilotUsageTokenDetail `json:"tokenDetails,omitzero"` @@ -2990,6 +3012,8 @@ type AssistantUsageCopilotUsageTokenDetail struct { BatchSize int64 `json:"batchSize"` // Cost per batch of tokens CostPerBatch int64 `json:"costPerBatch"` + // Model responsible for this billing entry + Model *string `json:"model,omitempty"` // Total token count for this entry TokenCount int64 `json:"tokenCount"` // Token category (e.g., "input", "output") @@ -3225,6 +3249,9 @@ type CompactionCompleteCompactionTokensUsed struct { // Per-request cost and usage data from the CAPI copilot_usage response field // Internal: CompactionCompleteCompactionTokensUsedCopilotUsage is an internal SDK API and is not part of the public surface. type CompactionCompleteCompactionTokensUsedCopilotUsage struct { + // Default billing model for token details that do not identify their own model + // Internal: Model is part of the SDK's internal API surface and is not intended for external use. + Model *string `json:"model,omitempty"` // Itemized token usage breakdown // Internal: TokenDetails is part of the SDK's internal API surface and is not intended for external use. TokenDetails []CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail `json:"tokenDetails,omitzero"` @@ -3238,6 +3265,8 @@ type CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail struct { BatchSize int64 `json:"batchSize"` // Cost per batch of tokens CostPerBatch int64 `json:"costPerBatch"` + // Model responsible for this billing entry + Model *string `json:"model,omitempty"` // Total token count for this entry TokenCount int64 `json:"tokenCount"` // Token category (e.g., "input", "output") @@ -3268,6 +3297,8 @@ type CompletionReceiptFinalTool struct { type CustomAgentsUpdatedAgent struct { // Description of what the agent does Description string `json:"description"` + // Whether model-driven invocation is disabled for this agent. + DisableModelInvocation *bool `json:"disableModelInvocation,omitempty"` // Human-readable display name DisplayName string `json:"displayName"` // Unique identifier for the agent @@ -3582,6 +3613,12 @@ type PermissionPromptRequestCommands struct { Intention string `json:"intention"` // Whether managed policy requires a human response and forbids host auto-approval ManagedApprovalRequired *bool `json:"managedApprovalRequired,omitempty"` + // True when the shell command is requesting sandbox escalation. This is a request, not a grant. + RequestSandboxBypass *bool `json:"requestSandboxBypass,omitempty"` + // Reason for the sandbox escalation request. + RequestSandboxBypassReason *string `json:"requestSandboxBypassReason,omitempty"` + // True when the escalation is a permissive retry that keeps the sandbox and network policy attached while recording file and process accesses instead of blocking them. + RequestSandboxPermissive *bool `json:"requestSandboxPermissive,omitempty"` // Tool call ID that triggered this permission request ToolCallID *string `json:"toolCallId,omitempty"` // Optional warning message about risks of running this command @@ -4126,6 +4163,8 @@ type PermissionRequestShell struct { RequestSandboxBypass *bool `json:"requestSandboxBypass,omitempty"` // What the tool tells the user about the bypass on offer: which policy rule blocked the call, or why it cannot be sandboxed. Only meaningful when requestSandboxBypass is true. RequestSandboxBypassReason *string `json:"requestSandboxBypassReason,omitempty"` + // True when the requested escalation is a permissive retry rather than a full bypass: the command re-runs inside the sandbox with its file and process restrictions recording instead of blocking, while the network policy stays enforced. Always accompanied by requestSandboxBypass, so hosts that do not recognize this field still treat the request as the escalation it is. Hosts that do recognize it must not describe the command as running outside the sandbox, which would overstate the privilege being granted. + RequestSandboxPermissive *bool `json:"requestSandboxPermissive,omitempty"` // Tool call ID that triggered this permission request ToolCallID *string `json:"toolCallId,omitempty"` // Optional warning message about risks of running this command @@ -4597,6 +4636,8 @@ type SystemNotificationFactoryCompleted struct { FactoryName string `json:"factoryName"` // Machine-readable terminal failure details, when present. Failure any `json:"failure,omitempty"` + // Pause initiator metadata when this attempt settled as paused. + PauseInfo SystemNotificationFactoryPauseInfo `json:"pauseInfo,omitempty"` // Bounded prompt-safe preview of the completed result. ResultPreview *string `json:"resultPreview,omitempty"` // Actionable run_factory resume guidance for a resource-limit failure. @@ -4685,6 +4726,40 @@ func (SystemNotificationUnclassified) Type() SystemNotificationType { return SystemNotificationTypeUnclassified } +// Durable metadata describing who initiated a factory pause. +type SystemNotificationFactoryPauseInfo interface { + systemNotificationFactoryPauseInfo() + Type() SystemNotificationFactoryPauseInfoType +} + +type RawSystemNotificationFactoryPauseInfo struct { + Discriminator SystemNotificationFactoryPauseInfoType + Raw json.RawMessage +} + +func (RawSystemNotificationFactoryPauseInfo) systemNotificationFactoryPauseInfo() {} +func (r RawSystemNotificationFactoryPauseInfo) Type() SystemNotificationFactoryPauseInfoType { + return r.Discriminator +} + +type SystemNotificationFactoryPauseInfoCheckpoint struct { + // Stable author-defined checkpoint key that initiated the pause. + Key string `json:"key"` +} + +func (SystemNotificationFactoryPauseInfoCheckpoint) systemNotificationFactoryPauseInfo() {} +func (SystemNotificationFactoryPauseInfoCheckpoint) Type() SystemNotificationFactoryPauseInfoType { + return SystemNotificationFactoryPauseInfoTypeCheckpoint +} + +type SystemNotificationFactoryPauseInfoUser struct { +} + +func (SystemNotificationFactoryPauseInfoUser) systemNotificationFactoryPauseInfo() {} +func (SystemNotificationFactoryPauseInfoUser) Type() SystemNotificationFactoryPauseInfoType { + return SystemNotificationFactoryPauseInfoTypeUser +} + // A content block within a tool result, which may be text, terminal output, image, audio, or a resource type ToolExecutionCompleteContent interface { toolExecutionCompleteContent() @@ -5365,6 +5440,8 @@ const ( FactoryRunSettledStatusError FactoryRunSettledStatus = "error" // The run was stopped by a limit, an approval refusal or another policy decision. FactoryRunSettledStatusHalted FactoryRunSettledStatus = "halted" + // The attempt paused intentionally while preserving resumable run state. + FactoryRunSettledStatusPaused FactoryRunSettledStatus = "paused" ) // Conversation scope in which a HydraFusion phase executes. @@ -5796,6 +5873,18 @@ const ( PlanChangedOperationUpdate PlanChangedOperation = "update" ) +// Auto preferences that Copilot API can recommend. +type RecommendedAutoTier string + +const ( + // Balance efficiency and intelligence. + RecommendedAutoTierBalance RecommendedAutoTier = "balance" + // Optimize for efficiency. + RecommendedAutoTierEfficiency RecommendedAutoTier = "efficiency" + // Optimize for intelligence. + RecommendedAutoTierIntelligence RecommendedAutoTier = "intelligence" +) + // Who created the schedule: `user` (an explicit user action such as `/every` or `/after`) or `model` (the agent via the `manage_schedule` tool). Gates whether a scheduled skill that opted out of model invocation may fire: only user-created schedules may. type ScheduleOrigin string @@ -5832,6 +5921,20 @@ const ( SkillInvokedTriggerUserInvoked SkillInvokedTrigger = "user-invoked" ) +// Where the model input for a task-tool sub-agent came from. +type SubagentTaskModelSource string + +const ( + // The task omitted a model and the user-defined custom agent's definition supplied one. + SubagentTaskModelSourceCustomAgentDefinition SubagentTaskModelSource = "custom_agent_definition" + // The task omitted a model and the per-sub-agent settings entry supplied a concrete one. + SubagentTaskModelSourceSubagentConfiguration SubagentTaskModelSource = "subagent_configuration" + // The spawning agent supplied the task tool's model argument. + SubagentTaskModelSourceTaskArgument SubagentTaskModelSource = "task_argument" + // Neither the task call, the per-sub-agent settings entry, nor a custom agent definition supplied a model. + SubagentTaskModelSourceUnset SubagentTaskModelSource = "unset" +) + // Message role: "system" for system prompts, "developer" for developer-injected instructions type SystemMessageRole string @@ -5864,6 +5967,16 @@ const ( SystemNotificationFactoryCompletedStatusError SystemNotificationFactoryCompletedStatus = "error" // The factory was halted. SystemNotificationFactoryCompletedStatusHalted SystemNotificationFactoryCompletedStatus = "halted" + // The factory attempt paused intentionally. + SystemNotificationFactoryCompletedStatusPaused SystemNotificationFactoryCompletedStatus = "paused" +) + +// Type discriminator for SystemNotificationFactoryPauseInfo. +type SystemNotificationFactoryPauseInfoType string + +const ( + SystemNotificationFactoryPauseInfoTypeCheckpoint SystemNotificationFactoryPauseInfoType = "checkpoint" + SystemNotificationFactoryPauseInfoTypeUser SystemNotificationFactoryPauseInfoType = "user" ) // Type discriminator for SystemNotification. diff --git a/go/zsession_events.go b/go/zsession_events.go index 9540968e5..cc914cb91 100644 --- a/go/zsession_events.go +++ b/go/zsession_events.go @@ -257,8 +257,10 @@ type ( RawPersistedBinaryResult = rpc.RawPersistedBinaryResult RawSessionEventData = rpc.RawSessionEventData RawSystemNotification = rpc.RawSystemNotification + RawSystemNotificationFactoryPauseInfo = rpc.RawSystemNotificationFactoryPauseInfo RawToolExecutionCompleteContent = rpc.RawToolExecutionCompleteContent ReasoningSummary = rpc.ReasoningSummary + RecommendedAutoTier = rpc.RecommendedAutoTier RemediationAction = rpc.RemediationAction SamplingCompletedData = rpc.SamplingCompletedData SamplingRequestedData = rpc.SamplingRequestedData @@ -266,6 +268,7 @@ type ( ScheduleOrigin = rpc.ScheduleOrigin SessionAutoModeResolvedData = rpc.SessionAutoModeResolvedData SessionAutopilotObjectiveChangedData = rpc.SessionAutopilotObjectiveChangedData + SessionAutoTierRecommendationData = rpc.SessionAutoTierRecommendationData SessionAutoTierSwitchFailedData = rpc.SessionAutoTierSwitchFailedData SessionBackgroundTasksChangedData = rpc.SessionBackgroundTasksChangedData SessionBinaryAssetData = rpc.SessionBinaryAssetData @@ -349,6 +352,7 @@ type ( SubagentFailedData = rpc.SubagentFailedData SubagentSelectedData = rpc.SubagentSelectedData SubagentStartedData = rpc.SubagentStartedData + SubagentTaskModelSource = rpc.SubagentTaskModelSource SystemMessageData = rpc.SystemMessageData SystemMessageMetadata = rpc.SystemMessageMetadata SystemMessageRole = rpc.SystemMessageRole @@ -359,6 +363,10 @@ type ( SystemNotificationData = rpc.SystemNotificationData SystemNotificationFactoryCompleted = rpc.SystemNotificationFactoryCompleted SystemNotificationFactoryCompletedStatus = rpc.SystemNotificationFactoryCompletedStatus + SystemNotificationFactoryPauseInfo = rpc.SystemNotificationFactoryPauseInfo + SystemNotificationFactoryPauseInfoCheckpoint = rpc.SystemNotificationFactoryPauseInfoCheckpoint + SystemNotificationFactoryPauseInfoType = rpc.SystemNotificationFactoryPauseInfoType + SystemNotificationFactoryPauseInfoUser = rpc.SystemNotificationFactoryPauseInfoUser SystemNotificationInstructionDiscovered = rpc.SystemNotificationInstructionDiscovered SystemNotificationNewInboxMessage = rpc.SystemNotificationNewInboxMessage SystemNotificationShellCompleted = rpc.SystemNotificationShellCompleted @@ -493,6 +501,7 @@ const ( AutopilotObjectiveChangedStatusCapReached = rpc.AutopilotObjectiveChangedStatusCapReached AutopilotObjectiveChangedStatusCompleted = rpc.AutopilotObjectiveChangedStatusCompleted AutopilotObjectiveChangedStatusPaused = rpc.AutopilotObjectiveChangedStatusPaused + AutoTierFast = rpc.AutoTierFast AutoTierSwitchFailureReasonPolicyRejected = rpc.AutoTierSwitchFailureReasonPolicyRejected AutoTierSwitchFailureReasonRequestFailed = rpc.AutoTierSwitchFailureReasonRequestFailed AutoTierSwitchFailureReasonSetupFailed = rpc.AutoTierSwitchFailureReasonSetupFailed @@ -546,6 +555,7 @@ const ( FactoryRunSettledStatusCompleted = rpc.FactoryRunSettledStatusCompleted FactoryRunSettledStatusError = rpc.FactoryRunSettledStatusError FactoryRunSettledStatusHalted = rpc.FactoryRunSettledStatusHalted + FactoryRunSettledStatusPaused = rpc.FactoryRunSettledStatusPaused FusionConversationScopeReview = rpc.FusionConversationScopeReview FusionConversationScopeRoot = rpc.FusionConversationScopeRoot FusionFollowUpActionReroute = rpc.FusionFollowUpActionReroute @@ -699,6 +709,9 @@ const ( ReasoningSummaryConcise = rpc.ReasoningSummaryConcise ReasoningSummaryDetailed = rpc.ReasoningSummaryDetailed ReasoningSummaryNone = rpc.ReasoningSummaryNone + RecommendedAutoTierBalance = rpc.RecommendedAutoTierBalance + RecommendedAutoTierEfficiency = rpc.RecommendedAutoTierEfficiency + RecommendedAutoTierIntelligence = rpc.RecommendedAutoTierIntelligence RemediationActionAllowSandboxOutbound = rpc.RemediationActionAllowSandboxOutbound RemediationActionReviewSandboxPolicy = rpc.RemediationActionReviewSandboxPolicy RemediationActionShowAccount = rpc.RemediationActionShowAccount @@ -765,6 +778,7 @@ const ( SessionEventTypeSandboxDecision = rpc.SessionEventTypeSandboxDecision SessionEventTypeSessionAutoModeResolved = rpc.SessionEventTypeSessionAutoModeResolved SessionEventTypeSessionAutopilotObjectiveChanged = rpc.SessionEventTypeSessionAutopilotObjectiveChanged + SessionEventTypeSessionAutoTierRecommendation = rpc.SessionEventTypeSessionAutoTierRecommendation SessionEventTypeSessionAutoTierSwitchFailed = rpc.SessionEventTypeSessionAutoTierSwitchFailed SessionEventTypeSessionBackgroundTasksChanged = rpc.SessionEventTypeSessionBackgroundTasksChanged SessionEventTypeSessionBinaryAsset = rpc.SessionEventTypeSessionBinaryAsset @@ -862,6 +876,10 @@ const ( SkillSourcePlugin = rpc.SkillSourcePlugin SkillSourceProject = rpc.SkillSourceProject SkillSourceSDK = rpc.SkillSourceSDK + SubagentTaskModelSourceCustomAgentDefinition = rpc.SubagentTaskModelSourceCustomAgentDefinition + SubagentTaskModelSourceSubagentConfiguration = rpc.SubagentTaskModelSourceSubagentConfiguration + SubagentTaskModelSourceTaskArgument = rpc.SubagentTaskModelSourceTaskArgument + SubagentTaskModelSourceUnset = rpc.SubagentTaskModelSourceUnset SystemMessageRoleDeveloper = rpc.SystemMessageRoleDeveloper SystemMessageRoleSystem = rpc.SystemMessageRoleSystem SystemNotificationAgentCompletedStatusCompleted = rpc.SystemNotificationAgentCompletedStatusCompleted @@ -870,6 +888,9 @@ const ( SystemNotificationFactoryCompletedStatusCompleted = rpc.SystemNotificationFactoryCompletedStatusCompleted SystemNotificationFactoryCompletedStatusError = rpc.SystemNotificationFactoryCompletedStatusError SystemNotificationFactoryCompletedStatusHalted = rpc.SystemNotificationFactoryCompletedStatusHalted + SystemNotificationFactoryCompletedStatusPaused = rpc.SystemNotificationFactoryCompletedStatusPaused + SystemNotificationFactoryPauseInfoTypeCheckpoint = rpc.SystemNotificationFactoryPauseInfoTypeCheckpoint + SystemNotificationFactoryPauseInfoTypeUser = rpc.SystemNotificationFactoryPauseInfoTypeUser SystemNotificationTypeAgentCompleted = rpc.SystemNotificationTypeAgentCompleted SystemNotificationTypeAgentIdle = rpc.SystemNotificationTypeAgentIdle SystemNotificationTypeFactoryCompleted = rpc.SystemNotificationTypeFactoryCompleted diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/AssistantUsageCopilotUsage.java b/java/sdk/src/generated/java/com/github/copilot/generated/AssistantUsageCopilotUsage.java index e9db8a530..c4c61556b 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/AssistantUsageCopilotUsage.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/AssistantUsageCopilotUsage.java @@ -22,6 +22,8 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record AssistantUsageCopilotUsage( + /** Default billing model for token details that do not identify their own model */ + @JsonProperty("model") String model, /** Itemized token usage breakdown */ @JsonProperty("tokenDetails") List tokenDetails, /** Total cost in nano-AI units for this request */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/AssistantUsageCopilotUsageTokenDetail.java b/java/sdk/src/generated/java/com/github/copilot/generated/AssistantUsageCopilotUsageTokenDetail.java index 9354568c7..79d61945c 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/AssistantUsageCopilotUsageTokenDetail.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/AssistantUsageCopilotUsageTokenDetail.java @@ -25,6 +25,8 @@ public record AssistantUsageCopilotUsageTokenDetail( @JsonProperty("batchSize") Long batchSize, /** Cost per batch of tokens */ @JsonProperty("costPerBatch") Long costPerBatch, + /** Model responsible for this billing entry */ + @JsonProperty("model") String model, /** Total token count for this entry */ @JsonProperty("tokenCount") Long tokenCount, /** Token category (e.g., "input", "output") */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/AutoTier.java b/java/sdk/src/generated/java/com/github/copilot/generated/AutoTier.java index 254543160..1c9d81b8e 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/AutoTier.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/AutoTier.java @@ -10,7 +10,7 @@ import javax.annotation.processing.Generated; /** - * Routing preference used when the session model is `auto`. + * Routing preference used when the session model is `auto`. `fast` is an integrator-only latency preset and is not a first-party GitHub Copilot product preference. * * @since 1.0.0 */ @@ -21,7 +21,9 @@ public enum AutoTier { /** The {@code balance} variant. */ BALANCE("balance"), /** The {@code intelligence} variant. */ - INTELLIGENCE("intelligence"); + INTELLIGENCE("intelligence"), + /** The {@code fast} variant. */ + FAST("fast"); private final String value; AutoTier(String value) { this.value = value; } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/CompactionCompleteCompactionTokensUsedCopilotUsage.java b/java/sdk/src/generated/java/com/github/copilot/generated/CompactionCompleteCompactionTokensUsedCopilotUsage.java index 886229cc6..7a2aebf3d 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/CompactionCompleteCompactionTokensUsedCopilotUsage.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/CompactionCompleteCompactionTokensUsedCopilotUsage.java @@ -22,6 +22,8 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record CompactionCompleteCompactionTokensUsedCopilotUsage( + /** Default billing model for token details that do not identify their own model */ + @JsonProperty("model") String model, /** Itemized token usage breakdown */ @JsonProperty("tokenDetails") List tokenDetails, /** Total cost in nano-AI units for this request */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail.java b/java/sdk/src/generated/java/com/github/copilot/generated/CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail.java index 83209f94c..5a9dbd3e6 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail.java @@ -25,6 +25,8 @@ public record CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail( @JsonProperty("batchSize") Long batchSize, /** Cost per batch of tokens */ @JsonProperty("costPerBatch") Long costPerBatch, + /** Model responsible for this billing entry */ + @JsonProperty("model") String model, /** Total token count for this entry */ @JsonProperty("tokenCount") Long tokenCount, /** Token category (e.g., "input", "output") */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/CustomAgentsUpdatedAgent.java b/java/sdk/src/generated/java/com/github/copilot/generated/CustomAgentsUpdatedAgent.java index 762f0b1ac..1fdf5bc13 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/CustomAgentsUpdatedAgent.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/CustomAgentsUpdatedAgent.java @@ -36,6 +36,8 @@ public record CustomAgentsUpdatedAgent( @JsonProperty("tools") List tools, /** Whether the agent can be selected by the user */ @JsonProperty("userInvocable") Boolean userInvocable, + /** Whether model-driven invocation is disabled for this agent. */ + @JsonProperty("disableModelInvocation") Boolean disableModelInvocation, /** Model override for this agent, if set */ @JsonProperty("model") String model, /** Authored model ids in priority order, if configured */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/FactoryRunSettledStatus.java b/java/sdk/src/generated/java/com/github/copilot/generated/FactoryRunSettledStatus.java index bbeffbbf4..828ddc9ee 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/FactoryRunSettledStatus.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/FactoryRunSettledStatus.java @@ -20,6 +20,8 @@ public enum FactoryRunSettledStatus { COMPLETED("completed"), /** The {@code halted} variant. */ HALTED("halted"), + /** The {@code paused} variant. */ + PAUSED("paused"), /** The {@code cancelled} variant. */ CANCELLED("cancelled"), /** The {@code error} variant. */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/RecommendedAutoTier.java b/java/sdk/src/generated/java/com/github/copilot/generated/RecommendedAutoTier.java new file mode 100644 index 000000000..acccaf5c8 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/RecommendedAutoTier.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; + +/** + * Auto preferences that Copilot API can recommend. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum RecommendedAutoTier { + /** The {@code efficiency} variant. */ + EFFICIENCY("efficiency"), + /** The {@code balance} variant. */ + BALANCE("balance"), + /** The {@code intelligence} variant. */ + INTELLIGENCE("intelligence"); + + private final String value; + RecommendedAutoTier(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static RecommendedAutoTier fromValue(String value) { + for (RecommendedAutoTier v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown RecommendedAutoTier value: " + value); + } +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/SessionAutoTierRecommendationEvent.java b/java/sdk/src/generated/java/com/github/copilot/generated/SessionAutoTierRecommendationEvent.java new file mode 100644 index 000000000..9dd00a458 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/SessionAutoTierRecommendationEvent.java @@ -0,0 +1,41 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: session-events.schema.json + +package com.github.copilot.generated; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Session event "session.auto_tier_recommendation". Live-only Auto preference recommendation from Copilot API after a successful Auto model call. + * @since 1.0.0 + */ +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public final class SessionAutoTierRecommendationEvent extends SessionEvent { + + @Override + public String getType() { return "session.auto_tier_recommendation"; } + + @JsonProperty("data") + private SessionAutoTierRecommendationEventData data; + + public SessionAutoTierRecommendationEventData getData() { return data; } + public void setData(SessionAutoTierRecommendationEventData data) { this.data = data; } + + /** Data payload for {@link SessionAutoTierRecommendationEvent}. */ + @JsonIgnoreProperties(ignoreUnknown = true) + @JsonInclude(JsonInclude.Include.NON_NULL) + public record SessionAutoTierRecommendationEventData( + /** Recommended Auto preference. */ + @JsonProperty("recommendedAutoTier") RecommendedAutoTier recommendedAutoTier + ) { + } +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/SessionCompactionCompleteEvent.java b/java/sdk/src/generated/java/com/github/copilot/generated/SessionCompactionCompleteEvent.java index 1925f6d89..70861fb97 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/SessionCompactionCompleteEvent.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/SessionCompactionCompleteEvent.java @@ -52,6 +52,8 @@ public record SessionCompactionCompleteEventData( @JsonProperty("customInstructions") String customInstructions, /** LLM-generated summary of the compacted conversation history */ @JsonProperty("summaryContent") String summaryContent, + /** Authoritative active-factory reminder appended to the compacted context */ + @JsonProperty("activeFactorySummary") String activeFactorySummary, /** Canonical model identifier used for model-specific behavior when replaying compaction */ @JsonProperty("behaviorModelId") String behaviorModelId, /** Checkpoint snapshot number created for recovery */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/SessionEvent.java b/java/sdk/src/generated/java/com/github/copilot/generated/SessionEvent.java index 367fa120b..a04aefe9f 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/SessionEvent.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/SessionEvent.java @@ -38,6 +38,7 @@ @JsonSubTypes.Type(value = SessionInfoEvent.class, name = "session.info"), @JsonSubTypes.Type(value = SessionWarningEvent.class, name = "session.warning"), @JsonSubTypes.Type(value = SessionModelChangeEvent.class, name = "session.model_change"), + @JsonSubTypes.Type(value = SessionAutoTierRecommendationEvent.class, name = "session.auto_tier_recommendation"), @JsonSubTypes.Type(value = SessionAutoTierSwitchFailedEvent.class, name = "session.auto_tier_switch_failed"), @JsonSubTypes.Type(value = SessionModeChangedEvent.class, name = "session.mode_changed"), @JsonSubTypes.Type(value = SessionModeNoticeDeliveredEvent.class, name = "session.mode_notice_delivered"), @@ -177,6 +178,7 @@ public abstract sealed class SessionEvent permits SessionInfoEvent, SessionWarningEvent, SessionModelChangeEvent, + SessionAutoTierRecommendationEvent, SessionAutoTierSwitchFailedEvent, SessionModeChangedEvent, SessionModeNoticeDeliveredEvent, diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/SubagentStartedEvent.java b/java/sdk/src/generated/java/com/github/copilot/generated/SubagentStartedEvent.java index c246fac1e..bef7c0138 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/SubagentStartedEvent.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/SubagentStartedEvent.java @@ -44,6 +44,8 @@ public record SubagentStartedEventData( @JsonProperty("agentDescription") String agentDescription, /** Model the sub-agent will run with, when known at start. */ @JsonProperty("model") String model, + /** Where the model input for this sub-agent came from. Present when the task planner resolved the launch (the task tool and factory agents); absent for sub-agents created through other runtime paths. */ + @JsonProperty("taskModelSource") SubagentTaskModelSource taskModelSource, /** Root id of the factory run that spawned this sub-agent, when it was spawned by one. */ @JsonProperty("factoryRunId") String factoryRunId, /** Task-registry ID of the spawning sub-agent. Absent when the root session spawned this child. */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/SubagentTaskModelSource.java b/java/sdk/src/generated/java/com/github/copilot/generated/SubagentTaskModelSource.java new file mode 100644 index 000000000..6b5ec9453 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/SubagentTaskModelSource.java @@ -0,0 +1,39 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: session-events.schema.json + +package com.github.copilot.generated; + +import javax.annotation.processing.Generated; + +/** + * Where the model input for a task-tool sub-agent came from. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum SubagentTaskModelSource { + /** The {@code task_argument} variant. */ + TASK_ARGUMENT("task_argument"), + /** The {@code subagent_configuration} variant. */ + SUBAGENT_CONFIGURATION("subagent_configuration"), + /** The {@code custom_agent_definition} variant. */ + CUSTOM_AGENT_DEFINITION("custom_agent_definition"), + /** The {@code unset} variant. */ + UNSET("unset"); + + private final String value; + SubagentTaskModelSource(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static SubagentTaskModelSource fromValue(String value) { + for (SubagentTaskModelSource v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown SubagentTaskModelSource value: " + value); + } +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AgentInfo.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AgentInfo.java index 3d9f9c2d7..8656baf39 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AgentInfo.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AgentInfo.java @@ -37,6 +37,8 @@ public record AgentInfo( @JsonProperty("source") AgentInfoSource source, /** Whether the agent can be selected directly by the user. Agents marked `false` are subagent-only. */ @JsonProperty("userInvocable") Boolean userInvocable, + /** Whether model-driven invocation is disabled for this agent. */ + @JsonProperty("disableModelInvocation") Boolean disableModelInvocation, /** Allowed tool names for this agent. Empty array means none; omitted means inherit defaults. */ @JsonProperty("tools") List tools, /** Authored preferred model id for this agent. Runtime model selection may choose a different model; omitted means no authored preference. */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AutoTier.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AutoTier.java index a4433e1ea..00b18bcc9 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AutoTier.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AutoTier.java @@ -10,7 +10,7 @@ import javax.annotation.processing.Generated; /** - * Routing preference used when the session model is `auto`. + * Routing preference used when the session model is `auto`. `fast` is an integrator-only latency preset and is not a first-party GitHub Copilot product preference. * * @since 1.0.0 */ @@ -21,7 +21,9 @@ public enum AutoTier { /** The {@code balance} variant. */ BALANCE("balance"), /** The {@code intelligence} variant. */ - INTELLIGENCE("intelligence"); + INTELLIGENCE("intelligence"), + /** The {@code fast} variant. */ + FAST("fast"); private final String value; AutoTier(String value) { this.value = value; } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CapiSessionOptions.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CapiSessionOptions.java index 4fd7a91ca..b1c2aff8b 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CapiSessionOptions.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/CapiSessionOptions.java @@ -21,7 +21,7 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record CapiSessionOptions( - /** Routing preference for sessions whose model is `auto`. On create or cold resume, this establishes the preference sent as `tier` on CAPI `/auto` requests; when omitted on cold resume, the runtime restores the last committed preference. On resident resume, a different value requests a safe switch after resume succeeds and cannot change an in-flight turn. Successful switches are persisted for later cold resume. When no preference is supplied or restored, CAPI default routing is used. */ + /** Routing preference for sessions whose model is `auto`. On create or cold resume, this establishes the preference sent as `tier` on CAPI `/auto` requests; when omitted on cold resume, the runtime restores the last committed preference. On resident resume, a different value requests a safe switch after resume succeeds and cannot change an in-flight turn. Successful switches are persisted for later cold resume. When no preference is supplied or restored, CAPI default routing is used. `fast` is an integrator-only latency preset, not a first-party GitHub Copilot product preference. */ @JsonProperty("autoTier") AutoTier autoTier, /** Whether to use WebSocket transport for the CAPI Responses API. Enabled by default when the model advertises `ws:/responses` support; set to `false` to force the HTTP Responses transport in environments where WebSockets are blocked (e.g. behind a proxy). Setting this to `false` is equivalent to the `COPILOT_CLI_DISABLE_WEBSOCKET_RESPONSES` environment variable. */ @JsonProperty("enableWebSocketResponses") Boolean enableWebSocketResponses diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryAbortParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryAbortParams.java index 35e0f276e..178c135cd 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryAbortParams.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryAbortParams.java @@ -27,6 +27,8 @@ public record FactoryAbortParams( /** Target session identifier */ @JsonProperty("sessionId") String sessionId, /** Factory run identifier. */ - @JsonProperty("runId") String runId + @JsonProperty("runId") String runId, + /** Opaque token identifying the execution attempt to abort. */ + @JsonProperty("executionToken") String executionToken ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryAgentOptions.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryAgentOptions.java index 9910d4f7f..51b9077ba 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryAgentOptions.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryAgentOptions.java @@ -27,11 +27,11 @@ public record FactoryAgentOptions( @JsonProperty("schema") Object schema, /** Optional model identifier for the subagent. */ @JsonProperty("model") String model, - /** Optional reasoning effort for the subagent. This field is accepted but not yet honored. */ + /** Optional reasoning effort override for the subagent. */ @JsonProperty("reasoningEffort") String reasoningEffort, - /** Optional context tier for the subagent. This field is accepted but not yet honored. */ + /** Optional context tier override for the subagent. */ @JsonProperty("contextTier") ContextTier contextTier, - /** Optional custom agent name for the subagent. This field is accepted but not yet honored. */ + /** Optional built-in or custom agent name whose definition configures the subagent. */ @JsonProperty("agent") String agent ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryPauseCheckpointAction.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryPauseCheckpointAction.java new file mode 100644 index 000000000..a07aa8a67 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryPauseCheckpointAction.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; + +/** + * Action the runtime selected for a durable factory pause checkpoint. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +public enum FactoryPauseCheckpointAction { + /** The {@code continue} variant. */ + CONTINUE("continue"), + /** The {@code pause} variant. */ + PAUSE("pause"); + + private final String value; + FactoryPauseCheckpointAction(String value) { this.value = value; } + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { return value; } + @com.fasterxml.jackson.annotation.JsonCreator + public static FactoryPauseCheckpointAction fromValue(String value) { + for (FactoryPauseCheckpointAction v : values()) { + if (v.value.equals(value)) return v; + } + throw new IllegalArgumentException("Unknown FactoryPauseCheckpointAction value: " + value); + } +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunResult.java index 71ee3c49e..436f969f6 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunResult.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunResult.java @@ -36,6 +36,8 @@ public record FactoryRunResult( /** Reason for a halted or cancelled run. */ @JsonProperty("reason") String reason, /** Partial journal and progress snapshot for a halted, cancelled, or errored run. */ - @JsonProperty("snapshot") Object snapshot + @JsonProperty("snapshot") Object snapshot, + /** Structured pause initiator metadata for a paused attempt. */ + @JsonProperty("pauseInfo") Object pauseInfo ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunStatus.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunStatus.java index 5d2348ec9..d5c87e730 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunStatus.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunStatus.java @@ -24,6 +24,8 @@ public enum FactoryRunStatus { COMPLETED("completed"), /** The {@code halted} variant. */ HALTED("halted"), + /** The {@code paused} variant. */ + PAUSED("paused"), /** The {@code cancelled} variant. */ CANCELLED("cancelled"), /** The {@code error} variant. */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunSummary.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunSummary.java index f482acfa1..e58b774bc 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunSummary.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunSummary.java @@ -58,6 +58,8 @@ public record FactoryRunSummary( /** Epoch milliseconds when the current active segment started, or null while inactive. */ @JsonProperty("activeSegmentStartedAt") Long activeSegmentStartedAt, /** Terminal run outcome, or null while nonterminal. */ - @JsonProperty("terminal") FactoryRunTerminal terminal + @JsonProperty("terminal") FactoryRunTerminal terminal, + /** Whether the durable run state currently passes runtime resume eligibility checks. */ + @JsonProperty("canResume") Boolean canResume ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunTerminal.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunTerminal.java index bf9bfa7db..0123e1979 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunTerminal.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunTerminal.java @@ -28,6 +28,8 @@ public record FactoryRunTerminal( /** Human-readable terminal error. */ @JsonProperty("error") String error, /** Prompt-safe preview of the completed result. */ - @JsonProperty("resultPreview") String resultPreview + @JsonProperty("resultPreview") String resultPreview, + /** Pause initiator metadata, or null when the run did not pause. */ + @JsonProperty("pauseInfo") Object pauseInfo ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/PluginsDisableParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/PluginsDisableParams.java index 661e998b7..3876c20b6 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/PluginsDisableParams.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/PluginsDisableParams.java @@ -15,7 +15,7 @@ import javax.annotation.processing.Generated; /** - * Plugin names (or specs) to disable. + * Plugin names (or specs) to disable, plus the optional working directory the repository-controlled guard is evaluated against. * * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 @@ -26,6 +26,8 @@ @JsonIgnoreProperties(ignoreUnknown = true) public record PluginsDisableParams( /** Plugin names or "plugin@marketplace" specs to disable. Unknown names are ignored. Non-marketplace direct installs cannot be disabled via this API; uninstall them instead. Plugin-owned MCP servers are stopped in active sessions immediately; other plugin contributions remain available until each session reloads plugins. */ - @JsonProperty("names") List names + @JsonProperty("names") List names, + /** Working directory whose repository `enabledPlugins` overlay decides whether this mutation is repository-controlled. Hosts that serve sessions across several repositories (the SDK server) should pass the session's directory; otherwise the guard is evaluated against the server process's own working directory, which may belong to a different repository. Defaults to the server's current working directory. */ + @JsonProperty("workingDirectory") String workingDirectory ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/PluginsEnableParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/PluginsEnableParams.java index 24404eee4..2be80af89 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/PluginsEnableParams.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/PluginsEnableParams.java @@ -15,7 +15,7 @@ import javax.annotation.processing.Generated; /** - * Plugin names (or specs) to enable. + * Plugin names (or specs) to enable, plus the optional working directory the repository-controlled guard is evaluated against. * * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 @@ -26,6 +26,8 @@ @JsonIgnoreProperties(ignoreUnknown = true) public record PluginsEnableParams( /** Plugin names or "plugin@marketplace" specs to enable. Unknown names are ignored. Non-marketplace direct installs are always enabled and cannot be toggled via this API. */ - @JsonProperty("names") List names + @JsonProperty("names") List names, + /** Working directory whose repository `enabledPlugins` overlay decides whether this mutation is repository-controlled. Hosts that serve sessions across several repositories (the SDK server) should pass the session's directory; otherwise the guard is evaluated against the server process's own working directory, which may belong to a different repository. Defaults to the server's current working directory. */ + @JsonProperty("workingDirectory") String workingDirectory ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ServerPluginsApi.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ServerPluginsApi.java index a7a28f5d1..da5ac6c0e 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ServerPluginsApi.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ServerPluginsApi.java @@ -89,7 +89,7 @@ public CompletableFuture updateAll() { } /** - * Plugin names (or specs) to enable. + * Plugin names (or specs) to enable, plus the optional working directory the repository-controlled guard is evaluated against. * * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 @@ -100,7 +100,7 @@ public CompletableFuture enable(PluginsEnableParams params) { } /** - * Plugin names (or specs) to disable. + * Plugin names (or specs) to disable, plus the optional working directory the repository-controlled guard is evaluated against. * * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryApi.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryApi.java index e9a3e9f08..12fa3cf6f 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryApi.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryApi.java @@ -178,6 +178,38 @@ public CompletableFuture cancel(SessionFactoryCancel return caller.invoke("session.factory.cancel", _p, SessionFactoryCancelResult.class); } + /** + * Parameters for pausing a running factory. + *

+ * 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 pause(SessionFactoryPauseParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.factory.pause", _p, SessionFactoryPauseResult.class); + } + + /** + * Parameters for an owned durable pause checkpoint. + *

+ * 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 pauseAtCheckpoint(SessionFactoryPauseAtCheckpointParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.factory.pauseAtCheckpoint", _p, SessionFactoryPauseAtCheckpointResult.class); + } + /** * Parameters for recording factory progress. *

diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryCancelResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryCancelResult.java index c9f9de2dc..42e1b3881 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryCancelResult.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryCancelResult.java @@ -39,6 +39,8 @@ public record SessionFactoryCancelResult( /** Reason for a halted or cancelled run. */ @JsonProperty("reason") String reason, /** Partial journal and progress snapshot for a halted, cancelled, or errored run. */ - @JsonProperty("snapshot") Object snapshot + @JsonProperty("snapshot") Object snapshot, + /** Structured pause initiator metadata for a paused attempt. */ + @JsonProperty("pauseInfo") Object pauseInfo ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryGetRunDetailResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryGetRunDetailResult.java index 01204cb83..0a3fb7f83 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryGetRunDetailResult.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryGetRunDetailResult.java @@ -63,6 +63,8 @@ public record SessionFactoryGetRunDetailResult( @JsonProperty("activeSegmentStartedAt") Long activeSegmentStartedAt, /** Terminal run outcome, or null while nonterminal. */ @JsonProperty("terminal") FactoryRunTerminal terminal, + /** Whether the durable run state currently passes runtime resume eligibility checks. */ + @JsonProperty("canResume") Boolean canResume, /** Lifecycle and timing observations for each factory phase. */ @JsonProperty("phases") List phases, /** Durable identities and live statuses for direct factory agents. */ diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryGetRunResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryGetRunResult.java index 2d6a5f52a..9c141b28d 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryGetRunResult.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryGetRunResult.java @@ -39,6 +39,8 @@ public record SessionFactoryGetRunResult( /** Reason for a halted or cancelled run. */ @JsonProperty("reason") String reason, /** Partial journal and progress snapshot for a halted, cancelled, or errored run. */ - @JsonProperty("snapshot") Object snapshot + @JsonProperty("snapshot") Object snapshot, + /** Structured pause initiator metadata for a paused attempt. */ + @JsonProperty("pauseInfo") Object pauseInfo ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryPauseAtCheckpointParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryPauseAtCheckpointParams.java new file mode 100644 index 000000000..a54c089e2 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryPauseAtCheckpointParams.java @@ -0,0 +1,36 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; +import javax.annotation.processing.Generated; + +/** + * Parameters for an owned durable pause checkpoint. + * + * @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 SessionFactoryPauseAtCheckpointParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Factory run identifier. */ + @JsonProperty("runId") String runId, + /** Opaque token identifying the execution attempt that reached the checkpoint. */ + @JsonProperty("executionToken") String executionToken, + /** Stable author-defined checkpoint key. */ + @JsonProperty("key") String key +) { +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryPauseAtCheckpointResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryPauseAtCheckpointResult.java new file mode 100644 index 000000000..4775fa0c6 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryPauseAtCheckpointResult.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; + +/** + * Result for the {@code session.factory.pauseAtCheckpoint} RPC method. + * + * @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 SessionFactoryPauseAtCheckpointResult( + /** Whether this execution attempt must pause or may continue. */ + @JsonProperty("action") FactoryPauseCheckpointAction action +) { +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryPauseParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryPauseParams.java new file mode 100644 index 000000000..00a1b4d66 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryPauseParams.java @@ -0,0 +1,32 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; +import javax.annotation.processing.Generated; + +/** + * Parameters for pausing a running factory. + * + * @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 SessionFactoryPauseParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Factory run identifier. */ + @JsonProperty("runId") String runId +) { +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryPauseResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryPauseResult.java new file mode 100644 index 000000000..aa93afbea --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryPauseResult.java @@ -0,0 +1,46 @@ +/*--------------------------------------------------------------------------------------------- + * 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; + +/** + * Complete current or terminal factory run envelope. + * + * @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 SessionFactoryPauseResult( + /** Factory run identifier. */ + @JsonProperty("runId") String runId, + /** One-based execution attempt represented by this envelope. Absent before the first attempt starts or when returned by an older runtime. */ + @JsonProperty("attempt") Long attempt, + /** Current or terminal factory run status. */ + @JsonProperty("status") FactoryRunStatus status, + /** Completed factory result. */ + @JsonProperty("result") Object result, + /** Error message for an errored run. */ + @JsonProperty("error") String error, + /** Machine-readable failure details for a halted or errored run. */ + @JsonProperty("failure") Object failure, + /** Reason for a halted or cancelled run. */ + @JsonProperty("reason") String reason, + /** Partial journal and progress snapshot for a halted, cancelled, or errored run. */ + @JsonProperty("snapshot") Object snapshot, + /** Structured pause initiator metadata for a paused attempt. */ + @JsonProperty("pauseInfo") Object pauseInfo +) { +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryRunFromToolResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryRunFromToolResult.java index 1a9dee592..b76daece8 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryRunFromToolResult.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryRunFromToolResult.java @@ -39,6 +39,8 @@ public record SessionFactoryRunFromToolResult( /** Reason for a halted or cancelled run. */ @JsonProperty("reason") String reason, /** Partial journal and progress snapshot for a halted, cancelled, or errored run. */ - @JsonProperty("snapshot") Object snapshot + @JsonProperty("snapshot") Object snapshot, + /** Structured pause initiator metadata for a paused attempt. */ + @JsonProperty("pauseInfo") Object pauseInfo ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryRunResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryRunResult.java index d8ce48189..4a7cc978e 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryRunResult.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryRunResult.java @@ -39,6 +39,8 @@ public record SessionFactoryRunResult( /** Reason for a halted or cancelled run. */ @JsonProperty("reason") String reason, /** Partial journal and progress snapshot for a halted, cancelled, or errored run. */ - @JsonProperty("snapshot") Object snapshot + @JsonProperty("snapshot") Object snapshot, + /** Structured pause initiator metadata for a paused attempt. */ + @JsonProperty("pauseInfo") Object pauseInfo ) { } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionModelApi.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionModelApi.java index b9adc3448..7afe40eb0 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionModelApi.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionModelApi.java @@ -89,6 +89,22 @@ public CompletableFuture applyStartupOver return caller.invoke("session.model.applyStartupOverlay", _p, SessionModelApplyStartupOverlayResult.class); } + /** + * Host-supplied exact model selection IDs to allow for this running session. CAPI IDs are intersected with repository `.github/allowed_models.txt` policy; provider-qualified IDs remain exempt from repository-only policy but are restricted by this host list. Omit or pass null to clear the host restriction; an explicit empty or disjoint list is rejected. Validation and pre-selection fallback failures preserve the previous restriction. Failures after a fallback selection commits retain the new restriction and selected model; callers should inspect current session state after such an error. + *

+ * 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 setAllowedModels(SessionModelSetAllowedModelsParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.model.setAllowedModels", _p, SessionModelSetAllowedModelsResult.class); + } + /** * Reasoning effort level to apply to the currently selected model. *

diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionModelSetAllowedModelsParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionModelSetAllowedModelsParams.java new file mode 100644 index 000000000..c46e1af7a --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionModelSetAllowedModelsParams.java @@ -0,0 +1,33 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; +import java.util.List; +import javax.annotation.processing.Generated; + +/** + * Host-supplied exact model selection IDs to allow for this running session. CAPI IDs are intersected with repository `.github/allowed_models.txt` policy; provider-qualified IDs remain exempt from repository-only policy but are restricted by this host list. Omit or pass null to clear the host restriction; an explicit empty or disjoint list is rejected. Validation and pre-selection fallback failures preserve the previous restriction. Failures after a fallback selection commits retain the new restriction and selected model; callers should inspect current session state after such an error. + * + * @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 SessionModelSetAllowedModelsParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Exact model IDs to permit, or null to clear the host restriction. */ + @JsonProperty("allowedModels") List allowedModels +) { +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionModelSetAllowedModelsResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionModelSetAllowedModelsResult.java new file mode 100644 index 000000000..d2552c2fc --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionModelSetAllowedModelsResult.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; + +/** + * The applied host allowlist and effective session model policy after intersection. + * + * @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 SessionModelSetAllowedModelsResult( + /** Normalized host allowlist. Omitted when the host restriction was cleared, or when a relay client does not return the host policy. */ + @JsonProperty("allowedModels") List allowedModels, + /** Effective exact IDs or repository policy patterns after applying the host restriction. Omitted by relay clients that do not return the host policy. */ + @JsonProperty("effectiveAllowedModels") List effectiveAllowedModels, + /** Effective deterministic fallback model, when the policy defines one. */ + @JsonProperty("fallbackModel") String fallbackModel, + /** Selected session model after reconciling a now-disallowed concrete selection. */ + @JsonProperty("modelId") String modelId +) { +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSandboxApi.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSandboxApi.java index 55efb9da7..02dbbea37 100644 --- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSandboxApi.java +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSandboxApi.java @@ -19,6 +19,8 @@ @javax.annotation.processing.Generated("copilot-sdk-codegen") public final class SessionSandboxApi { + private static final com.fasterxml.jackson.databind.ObjectMapper MAPPER = RpcMapper.INSTANCE; + private final RpcCaller caller; private final String sessionId; @@ -39,4 +41,20 @@ public CompletableFuture getEnforcemen return caller.invoke("session.sandbox.getEnforcementStatus", java.util.Map.of("sessionId", this.sessionId), SessionSandboxGetEnforcementStatusResult.class); } + /** + * Request to disable sandboxing for the current session while resolving an active sandbox-bypass permission prompt. + *

+ * 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 disableForSession(SessionSandboxDisableForSessionParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.sandbox.disableForSession", _p, SessionSandboxDisableForSessionResult.class); + } + } diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSandboxDisableForSessionParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSandboxDisableForSessionParams.java new file mode 100644 index 000000000..f7720f8f2 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSandboxDisableForSessionParams.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; + +/** + * Request to disable sandboxing for the current session while resolving an active sandbox-bypass permission prompt. + * + * @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 SessionSandboxDisableForSessionParams( + /** Target session identifier */ + @JsonProperty("sessionId") String sessionId, + /** Identifier of the exact pending sandbox-bypass permission request that authorized the session opt-out. */ + @JsonProperty("requestId") String requestId, + /** Optional attribution for the permission decision. */ + @JsonProperty("decisionContext") PermissionDecisionContext decisionContext +) { +} diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSandboxDisableForSessionResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSandboxDisableForSessionResult.java new file mode 100644 index 000000000..a46129ea4 --- /dev/null +++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionSandboxDisableForSessionResult.java @@ -0,0 +1,32 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.copilot.CopilotExperimental; +import javax.annotation.processing.Generated; + +/** + * Result of attempting to disable sandboxing for the current 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 SessionSandboxDisableForSessionResult( + /** Whether this call resolved the pending request and applied the session opt-out. */ + @JsonProperty("success") Boolean success, + /** The authoritative sandbox enabled state after the operation. */ + @JsonProperty("enabled") Boolean enabled +) { +} diff --git a/java/sdk/src/test/java/com/github/copilot/generated/rpc/GeneratedRpcRecordsCoverageTest.java b/java/sdk/src/test/java/com/github/copilot/generated/rpc/GeneratedRpcRecordsCoverageTest.java index 938e0609f..c0b1409c5 100644 --- a/java/sdk/src/test/java/com/github/copilot/generated/rpc/GeneratedRpcRecordsCoverageTest.java +++ b/java/sdk/src/test/java/com/github/copilot/generated/rpc/GeneratedRpcRecordsCoverageTest.java @@ -470,7 +470,7 @@ void pingResult_fields() { @Test void sessionAgentListResult_with_items() { var item = new AgentInfo("name1", "Name One", "Desc 1", "/path/to/agent1", null, null, null, null, null, null, - null, null, null, null); + null, null, null, null, null); var result = new SessionAgentListResult(List.of(item)); assertEquals(1, result.agents().size()); assertEquals("name1", result.agents().get(0).name()); @@ -482,7 +482,7 @@ void sessionAgentListResult_with_items() { @Test void sessionAgentGetCurrentResult_nested() { var agent = new AgentInfo("agent-1", "Agent One", "Does things", null, null, null, null, null, null, null, null, - null, null, null); + null, null, null, null); var result = new SessionAgentGetCurrentResult(agent); assertEquals("agent-1", result.agent().name()); assertEquals("Agent One", result.agent().displayName()); @@ -499,7 +499,7 @@ void sessionAgentGetCurrentResult_null_agent() { @Test void sessionAgentReloadResult_with_items() { var item = new AgentInfo("a", "A", "Desc", "/path/to/a", null, null, null, null, null, null, null, null, null, - null); + null, null); var result = new SessionAgentReloadResult(List.of(item)); assertEquals(1, result.agents().size()); assertEquals("a", result.agents().get(0).name()); @@ -508,7 +508,7 @@ void sessionAgentReloadResult_with_items() { @Test void sessionAgentSelectResult_nested() { var agent = new AgentInfo("selected", "Selected", "The selected agent", "/path/to/selected", null, null, null, - null, null, null, null, null, null, null); + null, null, null, null, null, null, null, null); var result = new SessionAgentSelectResult(agent); assertEquals("selected", result.agent().name()); } diff --git a/nodejs/package.json b/nodejs/package.json index ee02f32fb..24e0d5179 100644 --- a/nodejs/package.json +++ b/nodejs/package.json @@ -5,7 +5,7 @@ "url": "https://github.com/github/copilot-sdk.git" }, "version": "0.0.0-dev", - "copilotCliVersion": "1.0.83", + "copilotCliVersion": "1.0.84-2", "description": "TypeScript SDK for programmatic control of GitHub Copilot CLI via JSON-RPC", "main": "./dist/cjs/index.js", "types": "./dist/index.d.ts", diff --git a/nodejs/samples/package-lock.json b/nodejs/samples/package-lock.json index e2a9ab8a0..ce48a5886 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": { - "koffi": "^3.1.0", + "koffi": "^3.2.1", "vscode-jsonrpc": "^8.2.1", "zod": "^4.3.6" }, diff --git a/nodejs/src/cliVersion.ts b/nodejs/src/cliVersion.ts index b15767e82..cb99996e3 100644 --- a/nodejs/src/cliVersion.ts +++ b/nodejs/src/cliVersion.ts @@ -1,3 +1,3 @@ -export const COPILOT_CLI_VERSION = "1.0.83"; +export const COPILOT_CLI_VERSION = "1.0.84-2"; export const COPILOT_CLI_USE_NPM_PACKAGE = false; diff --git a/nodejs/src/generated/rpc.ts b/nodejs/src/generated/rpc.ts index f4978de1f..a93201d6c 100644 --- a/nodejs/src/generated/rpc.ts +++ b/nodejs/src/generated/rpc.ts @@ -1162,6 +1162,8 @@ export type FactoryRunStatus = | "completed" /** The run was interrupted while resource budget remained. */ | "halted" + /** The current attempt stopped intentionally and the run may be resumed. */ + | "paused" /** The run was cancelled before completion. */ | "cancelled" /** The factory body failed or reached a cumulative resource ceiling. */ @@ -1180,6 +1182,10 @@ export type FactoryRunFailure = * Approved effective ceiling that was reached. */ value: number; + /** + * Suggested larger ceiling when the runtime can derive one safely. + */ + suggestedValue?: number; /** * Factory run identifier. */ @@ -1256,6 +1262,30 @@ export type FactoryRunFailureKind = | "timeoutSeconds" /** The run's settled subagent model usage exceeded the approved AI-credit ceiling, or no headroom remained for another subagent. */ | "maxAiCredits"; +/** + * Durable metadata describing who initiated a factory pause. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "FactoryPauseInfo". + */ +/** @experimental */ +export type FactoryPauseInfo = + | { + /** + * Factory pause initiator discriminator. + */ + type: "user"; + } + | { + /** + * Stable author-defined checkpoint key that initiated the pause. + */ + key: string; + /** + * Factory pause initiator discriminator. + */ + type: "checkpoint"; + }; /** * Kind of factory progress line. * @@ -1268,6 +1298,18 @@ export type FactoryLogLineKind = | "log" /** A named factory phase marker. */ | "phase"; +/** + * Action the runtime selected for a durable factory pause checkpoint. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "FactoryPauseCheckpointAction". + */ +/** @experimental */ +export type FactoryPauseCheckpointAction = + /** The checkpoint was committed by a prior paused attempt, so execution may continue. */ + | "continue" + /** This attempt claimed the checkpoint and must cooperatively stop. */ + | "pause"; /** * Derived lifecycle state of a factory phase. * @@ -4845,6 +4887,10 @@ export interface AgentInfo { * Whether the agent can be selected directly by the user. Agents marked `false` are subagent-only. */ userInvocable?: boolean; + /** + * Whether model-driven invocation is disabled for this agent. + */ + disableModelInvocation?: boolean; /** * Allowed tool names for this agent. Empty array means none; omitted means inherit defaults. */ @@ -7818,6 +7864,10 @@ export interface FactoryAbortRequest { * Factory run identifier. */ runId: string; + /** + * Opaque token identifying the execution attempt to abort. + */ + executionToken: string; } /** * Acknowledgement that a factory request was accepted. @@ -7848,12 +7898,12 @@ export interface FactoryAgentOptions { */ model?: string; /** - * Optional reasoning effort for the subagent. This field is accepted but not yet honored. + * Optional reasoning effort override for the subagent. */ reasoningEffort?: string; contextTier?: ContextTier; /** - * Optional custom agent name for the subagent. This field is accepted but not yet honored. + * Optional built-in or custom agent name whose definition configures the subagent. */ agent?: string; } @@ -8284,6 +8334,10 @@ export interface FactoryRunSummary { * Terminal run outcome, or null while nonterminal. */ terminal: FactoryRunTerminal | null; + /** + * Whether the durable run state currently passes runtime resume eligibility checks. + */ + canResume: boolean; } /** * Durable factory resource consumption. @@ -8327,6 +8381,10 @@ export interface FactoryRunTerminal { * Prompt-safe preview of the completed result. */ resultPreview?: string; + /** + * Pause initiator metadata, or null when the run did not pause. + */ + pauseInfo: FactoryPauseInfo | null; } /** * One ordered factory progress line. @@ -8367,6 +8425,45 @@ export interface FactoryLogRequest { */ lines: FactoryLogLine[]; } +/** + * Parameters for an owned durable pause checkpoint. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "FactoryPauseCheckpointRequest". + */ +/** @experimental */ +export interface FactoryPauseCheckpointRequest { + /** + * Factory run identifier. + */ + runId: string; + /** + * Opaque token identifying the execution attempt that reached the checkpoint. + */ + executionToken: string; + /** + * Stable author-defined checkpoint key. + */ + key: string; +} + +/** @experimental */ +export interface FactoryPauseCheckpointResult { + action: FactoryPauseCheckpointAction; +} +/** + * Parameters for pausing a running factory. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "FactoryPauseRequest". + */ +/** @experimental */ +export interface FactoryPauseRequest { + /** + * Factory run identifier. + */ + runId: string; +} /** * Durable lifecycle and timing for one factory phase. * @@ -8521,19 +8618,19 @@ export interface FactoryRunLimits { /** * Maximum number of factory subagents that may run concurrently. */ - maxConcurrentSubagents?: number; + maxConcurrentSubagents?: number | null; /** * Maximum total number of factory subagents that may be admitted. */ - maxTotalSubagents?: number; + maxTotalSubagents?: number | null; /** * Maximum accumulated active-execution time in seconds. Active execution includes the entire extension body, subprocess waits, queued-agent waits, and sleeps; time between resumed attempts is not counted. */ - timeoutSeconds?: number; + timeoutSeconds?: number | null; /** * Maximum AI credits consumed by factory subagents and their descendants. The post-paid ceiling is soft: parallel turns can settle beyond it before the run stops. */ - maxAiCredits?: number; + maxAiCredits?: number | null; } /** * Resolved persisted factory identity and resumed run envelope. @@ -8583,6 +8680,7 @@ export interface FactoryRunResult { * Partial journal and progress snapshot for a halted, cancelled, or errored run. */ snapshot?: JsonValue; + pauseInfo?: FactoryPauseInfo; } /** * Full factory run observability detail. @@ -8659,6 +8757,10 @@ export interface FactoryRunDetail { * Terminal run outcome, or null while nonterminal. */ terminal: FactoryRunTerminal | null; + /** + * Whether the durable run state currently passes runtime resume eligibility checks. + */ + canResume: boolean; /** * Lifecycle and timing observations for each factory phase. */ @@ -13009,6 +13111,44 @@ export interface ModelPickerSettingsContext { */ environment: {}; } +/** + * Host-supplied exact model selection IDs to allow for this running session. CAPI IDs are intersected with repository `.github/allowed_models.txt` policy; provider-qualified IDs remain exempt from repository-only policy but are restricted by this host list. Omit or pass null to clear the host restriction; an explicit empty or disjoint list is rejected. Validation and pre-selection fallback failures preserve the previous restriction. Failures after a fallback selection commits retain the new restriction and selected model; callers should inspect current session state after such an error. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "ModelSetAllowedModelsRequest". + */ +/** @experimental */ +export interface ModelSetAllowedModelsRequest { + /** + * Exact model IDs to permit, or null to clear the host restriction. + */ + allowedModels?: string[] | null; +} +/** + * The applied host allowlist and effective session model policy after intersection. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "ModelSetAllowedModelsResult". + */ +/** @experimental */ +export interface ModelSetAllowedModelsResult { + /** + * Normalized host allowlist. Omitted when the host restriction was cleared, or when a relay client does not return the host policy. + */ + allowedModels?: string[]; + /** + * Effective exact IDs or repository policy patterns after applying the host restriction. Omitted by relay clients that do not return the host policy. + */ + effectiveAllowedModels?: string[]; + /** + * Effective deterministic fallback model, when the policy defines one. + */ + fallbackModel?: string; + /** + * Selected session model after reconciling a now-disallowed concrete selection. + */ + modelId?: string; +} /** * Reasoning effort level to apply to the currently selected model. * @@ -15174,7 +15314,7 @@ export interface PluginsBuiltinSetRequest { paths: string[]; } /** - * Plugin names (or specs) to disable. + * Plugin names (or specs) to disable, plus the optional working directory the repository-controlled guard is evaluated against. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PluginsDisableRequest". @@ -15185,9 +15325,13 @@ export interface PluginsDisableRequest { * Plugin names or "plugin@marketplace" specs to disable. Unknown names are ignored. Non-marketplace direct installs cannot be disabled via this API; uninstall them instead. Plugin-owned MCP servers are stopped in active sessions immediately; other plugin contributions remain available until each session reloads plugins. */ names: string[]; + /** + * Working directory whose repository `enabledPlugins` overlay decides whether this mutation is repository-controlled. Hosts that serve sessions across several repositories (the SDK server) should pass the session's directory; otherwise the guard is evaluated against the server process's own working directory, which may belong to a different repository. Defaults to the server's current working directory. + */ + workingDirectory?: string; } /** - * Plugin names (or specs) to enable. + * Plugin names (or specs) to enable, plus the optional working directory the repository-controlled guard is evaluated against. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "PluginsEnableRequest". @@ -15198,6 +15342,10 @@ export interface PluginsEnableRequest { * Plugin names or "plugin@marketplace" specs to enable. Unknown names are ignored. Non-marketplace direct installs are always enabled and cannot be toggled via this API. */ names: string[]; + /** + * Working directory whose repository `enabledPlugins` overlay decides whether this mutation is repository-controlled. Hosts that serve sessions across several repositories (the SDK server) should pass the session's directory; otherwise the guard is evaluated against the server process's own working directory, which may belong to a different repository. Defaults to the server's current working directory. + */ + workingDirectory?: string; } /** * Plugin source and optional working directory for relative-path resolution. @@ -17130,6 +17278,37 @@ export interface SandboxConfigAuth { */ gh?: boolean; } +/** + * Request to disable sandboxing for the current session while resolving an active sandbox-bypass permission prompt. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SandboxDisableForSessionRequest". + */ +/** @experimental */ +export interface SandboxDisableForSessionRequest { + /** + * Identifier of the exact pending sandbox-bypass permission request that authorized the session opt-out. + */ + requestId: string; + decisionContext?: PermissionDecisionContext; +} +/** + * Result of attempting to disable sandboxing for the current session. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SandboxDisableForSessionResult". + */ +/** @experimental */ +export interface SandboxDisableForSessionResult { + /** + * Whether this call resolved the pending request and applied the session opt-out. + */ + success: boolean; + /** + * The authoritative sandbox enabled state after the operation. + */ + enabled: boolean; +} /** * Managed sandbox enforcement state for a session. * @@ -23578,6 +23757,11 @@ export interface WorkspacesWriteAutopilotObjectiveResult { operation: string; } +/** @experimental */ +export interface SessionFactoryPauseAtCheckpointResult { + action: FactoryPauseCheckpointAction; +} + /** @experimental */ export interface SessionModelListRequest { /** @@ -23981,14 +24165,14 @@ export function createServerRpc(connection: MessageConnection) { /** * Enables installed plugins for new sessions. * - * @param params Plugin names (or specs) to enable. + * @param params Plugin names (or specs) to enable, plus the optional working directory the repository-controlled guard is evaluated against. */ enable: async (params: PluginsEnableRequest): Promise => connection.sendRequest("plugins.enable", params), /** * Disables installed plugins for new sessions. * - * @param params Plugin names (or specs) to disable. + * @param params Plugin names (or specs) to disable, plus the optional working directory the repository-controlled guard is evaluated against. */ disable: async (params: PluginsDisableRequest): Promise => connection.sendRequest("plugins.disable", params), @@ -24592,6 +24776,15 @@ export function createSessionRpc(connection: MessageConnection, sessionId: strin */ getEnforcementStatus: async (): Promise => connection.sendRequest("session.sandbox.getEnforcementStatus", { sessionId }), + /** + * Disables sandboxing for the remainder of the current session and approves the referenced pending sandbox-bypass permission request. The request is rejected unless the exact request is still pending and the effective sandbox policy permits bypass. + * + * @param params Request to disable sandboxing for the current session while resolving an active sandbox-bypass permission prompt. + * + * @returns Result of attempting to disable sandboxing for the current session. + */ + disableForSession: async (params: SandboxDisableForSessionRequest): Promise => + connection.sendRequest("session.sandbox.disableForSession", { sessionId, ...params }), }, /** * Aborts the current agent turn. @@ -24774,6 +24967,15 @@ export function createSessionRpc(connection: MessageConnection, sessionId: strin */ cancel: async (params: FactoryCancelRequest): Promise => connection.sendRequest("session.factory.cancel", { sessionId, ...params }), + /** + * Pauses a running factory and returns its settled run envelope. + * + * @param params Parameters for pausing a running factory. + * + * @returns Complete current or terminal factory run envelope. + */ + pause: async (params: FactoryPauseRequest): Promise => + connection.sendRequest("session.factory.pause", { sessionId, ...params }), /** * Records a batch of ordered factory progress lines. * @@ -24841,6 +25043,15 @@ export function createSessionRpc(connection: MessageConnection, sessionId: strin */ switchAutoTier: async (params: ModelSwitchAutoTierRequest): Promise => connection.sendRequest("session.model.switchAutoTier", { sessionId, ...params }), + /** + * Replaces or clears the host-supplied model allowlist for a running session. + * + * @param params Host-supplied exact model selection IDs to allow for this running session. CAPI IDs are intersected with repository `.github/allowed_models.txt` policy; provider-qualified IDs remain exempt from repository-only policy but are restricted by this host list. Omit or pass null to clear the host restriction; an explicit empty or disjoint list is rejected. Validation and pre-selection fallback failures preserve the previous restriction. Failures after a fallback selection commits retain the new restriction and selected model; callers should inspect current session state after such an error. + * + * @returns The applied host allowlist and effective session model policy after intersection. + */ + setAllowedModels: async (params: ModelSetAllowedModelsRequest): Promise => + connection.sendRequest("session.model.setAllowedModels", { sessionId, ...params }), /** * Updates the session's reasoning effort without changing the selected model. * @@ -26647,6 +26858,13 @@ export function createInternalSessionRpc(connection: MessageConnection, sessionI */ resumeFromTool: async (params: FactoryToolResumeRequest): Promise => connection.sendRequest("session.factory.resumeFromTool", { sessionId, ...params }), + /** + * Atomically pauses an owned factory attempt at a durable checkpoint. + * + * @param params Parameters for an owned durable pause checkpoint. + */ + pauseAtCheckpoint: async (params: FactoryPauseCheckpointRequest): Promise => + connection.sendRequest("session.factory.pauseAtCheckpoint", { sessionId, ...params }), }, /** @experimental */ model: { diff --git a/nodejs/src/generated/session-events.ts b/nodejs/src/generated/session-events.ts index 02fbad6c5..cafb08e20 100644 --- a/nodejs/src/generated/session-events.ts +++ b/nodejs/src/generated/session-events.ts @@ -23,6 +23,7 @@ export type SessionEvent = | InfoEvent | WarningEvent | ModelChangeEvent + | AutoTierRecommendationEvent | AutoTierSwitchFailedEvent | ModeChangedEvent | ModeNoticeDeliveredEvent @@ -142,7 +143,7 @@ export type SessionEvent = | ExtensionsAttachmentsPushedEvent | McpAppToolCallCompleteEvent; /** - * Routing preference used when the session model is `auto`. + * Routing preference used when the session model is `auto`. `fast` is an integrator-only latency preset and is not a first-party GitHub Copilot product preference. */ export type AutoTier = /** Optimize for efficiency. */ @@ -150,7 +151,9 @@ export type AutoTier = /** Balance efficiency and intelligence. */ | "balance" /** Optimize for intelligence. */ - | "intelligence"; + | "intelligence" + /** Integrator-only preset that optimizes for latency. */ + | "fast"; /** * Hosting platform type of the repository (github or ado) */ @@ -267,6 +270,16 @@ export type ModelChangeSource = | "automatic" /** An SDK or RPC caller selected the model. */ | "sdk"; +/** + * Auto preferences that Copilot API can recommend. + */ +export type RecommendedAutoTier = + /** Optimize for efficiency. */ + | "efficiency" + /** Balance efficiency and intelligence. */ + | "balance" + /** Optimize for intelligence. */ + | "intelligence"; /** * Terminal reason an Auto preference activation failed. */ @@ -706,6 +719,18 @@ export type SkillInvokedTrigger = | "agent-invoked" /** Skill content loaded as part of another context, such as a configured custom agent or subagent. */ | "context-load"; +/** + * Where the model input for a task-tool sub-agent came from. + */ +export type SubagentTaskModelSource = + /** The spawning agent supplied the task tool's model argument. */ + | "task_argument" + /** The task omitted a model and the per-sub-agent settings entry supplied a concrete one. */ + | "subagent_configuration" + /** The task omitted a model and the user-defined custom agent's definition supplied one. */ + | "custom_agent_definition" + /** Neither the task call, the per-sub-agent settings entry, nor a custom agent definition supplied a model. */ + | "unset"; /** * Binary asset type discriminator. Use "image" for images and "resource" otherwise. */ @@ -742,6 +767,26 @@ export type SystemNotificationAgentCompletedStatus = | "completed" /** The agent failed. */ | "failed"; +/** + * Durable metadata describing who initiated a factory pause. + */ +export type SystemNotificationFactoryPauseInfo = + | { + /** + * Factory pause initiator discriminator. + */ + type: "user"; + } + | { + /** + * Stable author-defined checkpoint key that initiated the pause. + */ + key: string; + /** + * Factory pause initiator discriminator. + */ + type: "checkpoint"; + }; /** * Terminal status reached by a factory execution attempt. */ @@ -750,6 +795,8 @@ export type SystemNotificationFactoryCompletedStatus = | "completed" /** The factory was halted. */ | "halted" + /** The factory attempt paused intentionally. */ + | "paused" /** The factory was cancelled. */ | "cancelled" /** The factory failed. */ @@ -1062,6 +1109,8 @@ export type FactoryRunSettledStatus = | "completed" /** The run was stopped by a limit, an approval refusal or another policy decision. */ | "halted" + /** The attempt paused intentionally while preserving resumable run state. */ + | "paused" /** The run was cancelled by its caller or by session disposal. */ | "cancelled" /** The run failed, with `failureType` carrying the class when it has one. */ @@ -1950,6 +1999,44 @@ export interface ModelChangeData { source?: ModelChangeSource; verbosity?: Verbosity; } +/** + * Session event "session.auto_tier_recommendation". Live-only Auto preference recommendation from Copilot API after a successful Auto model call. + */ +/** @experimental */ +export interface AutoTierRecommendationEvent { + /** + * Sub-agent instance identifier. Absent for events from the root/main agent and session-level events. + */ + agentId?: string; + data: AutoTierRecommendationData; + /** + * Always true for events that are transient and not persisted to the session event log on disk. + */ + ephemeral: true; + /** + * Unique event identifier (UUID v4), generated when the event is emitted + */ + id: string; + /** + * ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event. + */ + parentId: string | null; + /** + * ISO 8601 timestamp when the event was created + */ + timestamp: string; + /** + * Type discriminator. Always "session.auto_tier_recommendation". + */ + type: "session.auto_tier_recommendation"; +} +/** + * Live-only Auto preference recommendation from Copilot API after a successful Auto model call. + */ +/** @experimental */ +export interface AutoTierRecommendationData { + recommendedAutoTier: RecommendedAutoTier; +} /** * Session event "session.auto_tier_switch_failed". A transient Auto preference failure emitted when the runtime cannot mint or accept a usable model and token pair. The previously effective preference remains active, so SDK clients can surface a non-blocking failure without changing their committed-tier state. This event is ephemeral and is not persisted or replayed on resume. */ @@ -2154,13 +2241,13 @@ export interface PermissionsChangedData { * * @experimental */ - mode: PermissionMode; + mode?: PermissionMode; /** * Permission mode before the change * * @experimental */ - previousMode: PermissionMode; + previousMode?: PermissionMode; } /** * Session event "session.plan_changed". Plan file operation details indicating what changed @@ -2989,6 +3076,12 @@ export interface CompactionCompleteEvent { * Conversation compaction results including success status, metrics, and optional error details */ export interface CompactionCompleteData { + /** + * Authoritative active-factory reminder appended to the compacted context + * + * @internal + */ + activeFactorySummary?: string; /** * Canonical model identifier used for model-specific behavior when replaying compaction */ @@ -3108,6 +3201,12 @@ export interface CompactionCompleteCompactionTokensUsed { */ /** @internal */ export interface CompactionCompleteCompactionTokensUsedCopilotUsage { + /** + * Default billing model for token details that do not identify their own model + * + * @internal + */ + model?: string; /** * Itemized token usage breakdown * @@ -3131,6 +3230,10 @@ export interface CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail { * Cost per batch of tokens */ costPerBatch: number; + /** + * Model responsible for this billing entry + */ + model?: string; /** * Total token count for this entry */ @@ -5630,6 +5733,10 @@ export interface AssistantUsageData { * Per-request cost and usage data from the CAPI copilot_usage response field */ export interface AssistantUsageCopilotUsage { + /** + * Default billing model for token details that do not identify their own model + */ + model?: string; /** * Itemized token usage breakdown * @@ -5653,6 +5760,10 @@ export interface AssistantUsageCopilotUsageTokenDetail { * Cost per batch of tokens */ costPerBatch: number; + /** + * Model responsible for this billing entry + */ + model?: string; /** * Total token count for this entry */ @@ -7015,6 +7126,7 @@ export interface SubagentStartedData { * Whether this sub-agent can be resumed. Currently always false. */ resumable?: boolean; + taskModelSource?: SubagentTaskModelSource; /** * Tool call ID of the parent tool invocation that spawned this sub-agent */ @@ -7839,6 +7951,7 @@ export interface SystemNotificationFactoryCompleted { * Machine-readable terminal failure details, when present. */ failure?: JsonValue; + pauseInfo?: SystemNotificationFactoryPauseInfo; /** * Bounded prompt-safe preview of the completed result. */ @@ -7972,6 +8085,10 @@ export interface PermissionRequestShell { * What the tool tells the user about the bypass on offer: which policy rule blocked the call, or why it cannot be sandboxed. Only meaningful when requestSandboxBypass is true. */ requestSandboxBypassReason?: string; + /** + * True when the requested escalation is a permissive retry rather than a full bypass: the command re-runs inside the sandbox with its file and process restrictions recording instead of blocking, while the network policy stays enforced. Always accompanied by requestSandboxBypass, so hosts that do not recognize this field still treat the request as the escalation it is. Hosts that do recognize it must not describe the command as running outside the sandbox, which would overstate the privilege being granted. + */ + requestSandboxPermissive?: boolean; /** * Tool call ID that triggered this permission request */ @@ -8460,6 +8577,18 @@ export interface PermissionPromptRequestCommands { * Whether managed policy requires a human response and forbids host auto-approval */ managedApprovalRequired?: boolean; + /** + * True when the shell command is requesting sandbox escalation. This is a request, not a grant. + */ + requestSandboxBypass?: boolean; + /** + * Reason for the sandbox escalation request. + */ + requestSandboxBypassReason?: string; + /** + * True when the escalation is a permissive retry that keeps the sandbox and network policy attached while recording file and process accesses instead of blocking them. + */ + requestSandboxPermissive?: boolean; /** * Tool call ID that triggered this permission request */ @@ -11121,6 +11250,10 @@ export interface CustomAgentsUpdatedAgent { * Description of what the agent does */ description: string; + /** + * Whether model-driven invocation is disabled for this agent. + */ + disableModelInvocation?: boolean; /** * Human-readable display name */ diff --git a/python/copilot/generated/rpc.py b/python/copilot/generated/rpc.py index ac4cc5441..42855d7b9 100644 --- a/python/copilot/generated/rpc.py +++ b/python/copilot/generated/rpc.py @@ -1099,7 +1099,8 @@ class CapiSessionOptions: resume, the runtime restores the last committed preference. On resident resume, a different value requests a safe switch after resume succeeds and cannot change an in-flight turn. Successful switches are persisted for later cold resume. When no - preference is supplied or restored, CAPI default routing is used. + preference is supplied or restored, CAPI default routing is used. `fast` is an + integrator-only latency preset, not a first-party GitHub Copilot product preference. """ enable_web_socket_responses: bool | None = None """Whether to use WebSocket transport for the CAPI Responses API. Enabled by default when @@ -2971,6 +2972,9 @@ class KindEnum(Enum): class FactoryAbortRequest: """Parameters for cooperatively aborting a factory body.""" + execution_token: str + """Opaque token identifying the execution attempt to abort.""" + run_id: str """Factory run identifier.""" @@ -2980,12 +2984,14 @@ class FactoryAbortRequest: @staticmethod def from_dict(obj: Any) -> 'FactoryAbortRequest': assert isinstance(obj, dict) + execution_token = from_str(obj.get("executionToken")) run_id = from_str(obj.get("runId")) session_id = from_str(obj.get("sessionId")) - return FactoryAbortRequest(run_id, session_id) + return FactoryAbortRequest(execution_token, run_id, session_id) def to_dict(self) -> dict: result: dict = {} + result["executionToken"] = from_str(self.execution_token) result["runId"] = from_str(self.run_id) result["sessionId"] = from_str(self.session_id) return result @@ -3011,10 +3017,10 @@ class FactoryAgentOptions: Subagent execution options. """ agent: str | None = None - """Optional custom agent name for the subagent. This field is accepted but not yet honored.""" + """Optional built-in or custom agent name whose definition configures the subagent.""" context_tier: ContextTier | None = None - """Optional context tier for the subagent. This field is accepted but not yet honored.""" + """Optional context tier override for the subagent.""" label: str | None = None """Optional label distinguishing otherwise identical memoized agent calls.""" @@ -3023,7 +3029,7 @@ class FactoryAgentOptions: """Optional model identifier for the subagent.""" reasoning_effort: str | None = None - """Optional reasoning effort for the subagent. This field is accepted but not yet honored.""" + """Optional reasoning effort override for the subagent.""" schema: Any = None """Optional JSON Schema for structured agent output.""" @@ -3460,6 +3466,7 @@ class FactoryRunStatus(Enum): COMPLETED = "completed" ERROR = "error" HALTED = "halted" + PAUSED = "paused" PENDING = "pending" RUNNING = "running" @@ -3480,6 +3487,10 @@ class FactoryRunFailureType(Enum): FACTORY_PROVIDER_DISCONNECTED = "factory_provider_disconnected" FACTORY_RESUME_DECLINED = "factory_resume_declined" +class PauseInfoType(Enum): + CHECKPOINT = "checkpoint" + USER = "user" + # Experimental: this type is part of an experimental API and may change or be removed. class FactoryLogLineKind(Enum): """Progress line kind. @@ -3491,6 +3502,63 @@ class FactoryLogLineKind(Enum): LOG = "log" PHASE = "phase" +# Experimental: this type is part of an experimental API and may change or be removed. +class FactoryPauseCheckpointAction(Enum): + """Action the runtime selected for a durable factory pause checkpoint. + + Whether this execution attempt must pause or may continue. + """ + CONTINUE = "continue" + PAUSE = "pause" + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class FactoryPauseCheckpointRequest: + """Parameters for an owned durable pause checkpoint.""" + + execution_token: str + """Opaque token identifying the execution attempt that reached the checkpoint.""" + + key: str + """Stable author-defined checkpoint key.""" + + run_id: str + """Factory run identifier.""" + + @staticmethod + def from_dict(obj: Any) -> 'FactoryPauseCheckpointRequest': + assert isinstance(obj, dict) + execution_token = from_str(obj.get("executionToken")) + key = from_str(obj.get("key")) + run_id = from_str(obj.get("runId")) + return FactoryPauseCheckpointRequest(execution_token, key, run_id) + + def to_dict(self) -> dict: + result: dict = {} + result["executionToken"] = from_str(self.execution_token) + result["key"] = from_str(self.key) + result["runId"] = from_str(self.run_id) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class FactoryPauseRequest: + """Parameters for pausing a running factory.""" + + run_id: str + """Factory run identifier.""" + + @staticmethod + def from_dict(obj: Any) -> 'FactoryPauseRequest': + assert isinstance(obj, dict) + run_id = from_str(obj.get("runId")) + return FactoryPauseRequest(run_id) + + def to_dict(self) -> dict: + result: dict = {} + result["runId"] = from_str(self.run_id) + return result + # Experimental: this type is part of an experimental API and may change or be removed. class FactoryPhaseStatus(Enum): """Derived lifecycle state of the phase. @@ -3531,9 +3599,9 @@ class FactoryRunLimits: def from_dict(obj: Any) -> 'FactoryRunLimits': assert isinstance(obj, dict) max_ai_credits = from_union([from_float, from_none], obj.get("maxAiCredits")) - max_concurrent_subagents = from_union([from_int, from_none], obj.get("maxConcurrentSubagents")) - max_total_subagents = from_union([from_int, from_none], obj.get("maxTotalSubagents")) - timeout_seconds = from_union([from_float, from_none], obj.get("timeoutSeconds")) + max_concurrent_subagents = from_union([from_none, from_int], obj.get("maxConcurrentSubagents")) + max_total_subagents = from_union([from_none, from_int], obj.get("maxTotalSubagents")) + timeout_seconds = from_union([from_none, from_float], obj.get("timeoutSeconds")) return FactoryRunLimits(max_ai_credits, max_concurrent_subagents, max_total_subagents, timeout_seconds) def to_dict(self) -> dict: @@ -3541,11 +3609,11 @@ def to_dict(self) -> dict: if self.max_ai_credits is not None: result["maxAiCredits"] = from_union([to_float, from_none], self.max_ai_credits) if self.max_concurrent_subagents is not None: - result["maxConcurrentSubagents"] = from_union([from_int, from_none], self.max_concurrent_subagents) + result["maxConcurrentSubagents"] = from_union([from_none, from_int], self.max_concurrent_subagents) if self.max_total_subagents is not None: - result["maxTotalSubagents"] = from_union([from_int, from_none], self.max_total_subagents) + result["maxTotalSubagents"] = from_union([from_none, from_int], self.max_total_subagents) if self.timeout_seconds is not None: - result["timeoutSeconds"] = from_union([to_float, from_none], self.timeout_seconds) + result["timeoutSeconds"] = from_union([from_none, to_float], self.timeout_seconds) return result # Experimental: this type is part of an experimental API and may change or be removed. @@ -6966,6 +7034,46 @@ def to_dict(self) -> dict: result["supported_media_types"] = from_union([lambda x: from_list(from_str, x), from_none], self.supported_media_types) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class ModelSetAllowedModelsResult: + """The applied host allowlist and effective session model policy after intersection.""" + + allowed_models: list[str] | None = None + """Normalized host allowlist. Omitted when the host restriction was cleared, or when a relay + client does not return the host policy. + """ + effective_allowed_models: list[str] | None = None + """Effective exact IDs or repository policy patterns after applying the host restriction. + Omitted by relay clients that do not return the host policy. + """ + fallback_model: str | None = None + """Effective deterministic fallback model, when the policy defines one.""" + + model_id: str | None = None + """Selected session model after reconciling a now-disallowed concrete selection.""" + + @staticmethod + def from_dict(obj: Any) -> 'ModelSetAllowedModelsResult': + assert isinstance(obj, dict) + allowed_models = from_union([lambda x: from_list(from_str, x), from_none], obj.get("allowedModels")) + effective_allowed_models = from_union([lambda x: from_list(from_str, x), from_none], obj.get("effectiveAllowedModels")) + fallback_model = from_union([from_str, from_none], obj.get("fallbackModel")) + model_id = from_union([from_str, from_none], obj.get("modelId")) + return ModelSetAllowedModelsResult(allowed_models, effective_allowed_models, fallback_model, model_id) + + def to_dict(self) -> dict: + result: dict = {} + if self.allowed_models is not None: + result["allowedModels"] = from_union([lambda x: from_list(from_str, x), from_none], self.allowed_models) + if self.effective_allowed_models is not None: + result["effectiveAllowedModels"] = from_union([lambda x: from_list(from_str, x), from_none], self.effective_allowed_models) + if self.fallback_model is not None: + result["fallbackModel"] = from_union([from_str, from_none], self.fallback_model) + if self.model_id is not None: + result["modelId"] = from_union([from_str, from_none], self.model_id) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class ModelSetReasoningEffortRequest: @@ -9876,6 +9984,30 @@ class _SandboxConfigSource(Enum): USER_DISABLED = "user_disabled" USER_ENABLED = "user_enabled" +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SandboxDisableForSessionResult: + """Result of attempting to disable sandboxing for the current session.""" + + enabled: bool + """The authoritative sandbox enabled state after the operation.""" + + success: bool + """Whether this call resolved the pending request and applied the session opt-out.""" + + @staticmethod + def from_dict(obj: Any) -> 'SandboxDisableForSessionResult': + assert isinstance(obj, dict) + enabled = from_bool(obj.get("enabled")) + success = from_bool(obj.get("success")) + return SandboxDisableForSessionResult(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 SandboxEnforcementStatus: @@ -16715,6 +16847,32 @@ def to_dict(self) -> dict: result["items"] = from_list(lambda x: to_class(SessionCompletionItem, x), self.items) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class ModelSetAllowedModelsRequest: + """Host-supplied exact model selection IDs to allow for this running session. CAPI IDs are + intersected with repository `.github/allowed_models.txt` policy; provider-qualified IDs + remain exempt from repository-only policy but are restricted by this host list. Omit or + pass null to clear the host restriction; an explicit empty or disjoint list is rejected. + Validation and pre-selection fallback failures preserve the previous restriction. + Failures after a fallback selection commits retain the new restriction and selected + model; callers should inspect current session state after such an error. + """ + allowed_models: list[str] | None = None + """Exact model IDs to permit, or null to clear the host restriction.""" + + @staticmethod + def from_dict(obj: Any) -> 'ModelSetAllowedModelsRequest': + assert isinstance(obj, dict) + allowed_models = from_union([lambda x: from_list(from_str, x), from_none], obj.get("allowedModels")) + return ModelSetAllowedModelsRequest(allowed_models) + + def to_dict(self) -> dict: + result: dict = {} + if self.allowed_models is not None: + result["allowedModels"] = from_union([lambda x: from_list(from_str, x), from_none], self.allowed_models) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class DebugCollectLogsCollectedEntry: @@ -17645,6 +17803,9 @@ class FactoryRunFailure: kind: FactoryRunFailureKind | None = None """Resource ceiling that stopped the run.""" + suggested_value: float | None = None + """Suggested larger ceiling when the runtime can derive one safely.""" + value: float | None = None """Approved effective ceiling that was reached.""" @@ -17666,12 +17827,13 @@ def from_dict(obj: Any) -> 'FactoryRunFailure': run_id = from_str(obj.get("runId")) type = FactoryRunFailureType(obj.get("type")) kind = from_union([FactoryRunFailureKind, from_none], obj.get("kind")) + suggested_value = from_union([from_float, from_none], obj.get("suggestedValue")) value = from_union([from_float, from_none], obj.get("value")) reason = from_union([from_str, from_none], obj.get("reason")) code = from_union([from_str, from_none], obj.get("code")) operation = from_union([FactoryDurableOperation, from_none], obj.get("operation")) drained_nano_aiu = from_union([from_int, from_none], obj.get("drainedNanoAiu")) - return FactoryRunFailure(run_id, type, kind, value, reason, code, operation, drained_nano_aiu) + return FactoryRunFailure(run_id, type, kind, suggested_value, value, reason, code, operation, drained_nano_aiu) def to_dict(self) -> dict: result: dict = {} @@ -17679,6 +17841,8 @@ def to_dict(self) -> dict: result["type"] = to_enum(FactoryRunFailureType, self.type) if self.kind is not None: result["kind"] = from_union([lambda x: to_enum(FactoryRunFailureKind, x), from_none], self.kind) + if self.suggested_value is not None: + result["suggestedValue"] = from_union([to_float, from_none], self.suggested_value) if self.value is not None: result["value"] = from_union([to_float, from_none], self.value) if self.reason is not None: @@ -17691,6 +17855,55 @@ def to_dict(self) -> dict: result["drainedNanoAiu"] = from_union([from_int, from_none], self.drained_nano_aiu) return result +@dataclass +class PauseInfoClass: + type: PauseInfoType + """Factory pause initiator discriminator.""" + + key: str | None = None + """Stable author-defined checkpoint key that initiated the pause.""" + + @staticmethod + def from_dict(obj: Any) -> 'PauseInfoClass': + assert isinstance(obj, dict) + type = PauseInfoType(obj.get("type")) + key = from_union([from_str, from_none], obj.get("key")) + return PauseInfoClass(type, key) + + def to_dict(self) -> dict: + result: dict = {} + result["type"] = to_enum(PauseInfoType, self.type) + if self.key is not None: + result["key"] = from_union([from_str, from_none], self.key) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class FactoryPauseInfo: + """Durable metadata describing who initiated a factory pause. + + Structured pause initiator metadata for a paused attempt. + """ + type: PauseInfoType + """Factory pause initiator discriminator.""" + + key: str | None = None + """Stable author-defined checkpoint key that initiated the pause.""" + + @staticmethod + def from_dict(obj: Any) -> 'FactoryPauseInfo': + assert isinstance(obj, dict) + type = PauseInfoType(obj.get("type")) + key = from_union([from_str, from_none], obj.get("key")) + return FactoryPauseInfo(type, key) + + def to_dict(self) -> dict: + result: dict = {} + result["type"] = to_enum(PauseInfoType, self.type) + if self.key is not None: + result["key"] = from_union([from_str, from_none], self.key) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class FactoryLogLine: @@ -17764,6 +17977,40 @@ def to_dict(self) -> dict: result["phaseId"] = from_union([from_none, from_str], self.phase_id) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class FactoryPauseCheckpointResult: + action: FactoryPauseCheckpointAction + """Whether this execution attempt must pause or may continue.""" + + @staticmethod + def from_dict(obj: Any) -> 'FactoryPauseCheckpointResult': + assert isinstance(obj, dict) + action = FactoryPauseCheckpointAction(obj.get("action")) + return FactoryPauseCheckpointResult(action) + + def to_dict(self) -> dict: + result: dict = {} + result["action"] = to_enum(FactoryPauseCheckpointAction, self.action) + return result + +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionFactoryPauseAtCheckpointResult: + action: FactoryPauseCheckpointAction + """Whether this execution attempt must pause or may continue.""" + + @staticmethod + def from_dict(obj: Any) -> 'SessionFactoryPauseAtCheckpointResult': + assert isinstance(obj, dict) + action = FactoryPauseCheckpointAction(obj.get("action")) + return SessionFactoryPauseAtCheckpointResult(action) + + def to_dict(self) -> dict: + result: dict = {} + result["action"] = to_enum(FactoryPauseCheckpointAction, self.action) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class FactoryPhaseObservation: @@ -21491,6 +21738,8 @@ class PermissionDecisionContext: Optional informational context describing how and where this response was made. Omit it to preserve legacy behavior without attributing an origin. + + Optional attribution for the permission decision. """ outcome: PermissionDecisionOutcome """Disposition of the permission request as observed by the responding client.""" @@ -22185,45 +22434,67 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PluginsDisableRequest: - """Plugin names (or specs) to disable.""" - + """Plugin names (or specs) to disable, plus the optional working directory the + repository-controlled guard is evaluated against. + """ names: list[str] """Plugin names or "plugin@marketplace" specs to disable. Unknown names are ignored. Non-marketplace direct installs cannot be disabled via this API; uninstall them instead. Plugin-owned MCP servers are stopped in active sessions immediately; other plugin contributions remain available until each session reloads plugins. """ + working_directory: str | None = None + """Working directory whose repository `enabledPlugins` overlay decides whether this mutation + is repository-controlled. Hosts that serve sessions across several repositories (the SDK + server) should pass the session's directory; otherwise the guard is evaluated against the + server process's own working directory, which may belong to a different repository. + Defaults to the server's current working directory. + """ @staticmethod def from_dict(obj: Any) -> 'PluginsDisableRequest': assert isinstance(obj, dict) names = from_list(from_str, obj.get("names")) - return PluginsDisableRequest(names) + working_directory = from_union([from_str, from_none], obj.get("workingDirectory")) + return PluginsDisableRequest(names, working_directory) def to_dict(self) -> dict: result: dict = {} result["names"] = from_list(from_str, self.names) + if self.working_directory is not None: + result["workingDirectory"] = from_union([from_str, from_none], self.working_directory) return result # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PluginsEnableRequest: - """Plugin names (or specs) to enable.""" - + """Plugin names (or specs) to enable, plus the optional working directory the + repository-controlled guard is evaluated against. + """ names: list[str] """Plugin names or "plugin@marketplace" specs to enable. Unknown names are ignored. Non-marketplace direct installs are always enabled and cannot be toggled via this API. """ + working_directory: str | None = None + """Working directory whose repository `enabledPlugins` overlay decides whether this mutation + is repository-controlled. Hosts that serve sessions across several repositories (the SDK + server) should pass the session's directory; otherwise the guard is evaluated against the + server process's own working directory, which may belong to a different repository. + Defaults to the server's current working directory. + """ @staticmethod def from_dict(obj: Any) -> 'PluginsEnableRequest': assert isinstance(obj, dict) names = from_list(from_str, obj.get("names")) - return PluginsEnableRequest(names) + working_directory = from_union([from_str, from_none], obj.get("workingDirectory")) + return PluginsEnableRequest(names, working_directory) def to_dict(self) -> dict: result: dict = {} result["names"] = from_list(from_str, self.names) + if self.working_directory is not None: + result["workingDirectory"] = from_union([from_str, from_none], self.working_directory) return result # Experimental: this type is part of an experimental API and may change or be removed. @@ -24166,6 +24437,9 @@ class AgentInfo: name: str """Name of the agent. Use `id` as the stable selection identifier.""" + disable_model_invocation: bool | None = None + """Whether model-driven invocation is disabled for this agent.""" + mcp_servers: dict[str, Any] | None = None """MCP server configurations attached to this agent, keyed by server name. Server config shape mirrors the MCP `mcpServers` schema. @@ -24210,6 +24484,7 @@ def from_dict(obj: Any) -> 'AgentInfo': display_name = from_str(obj.get("displayName")) id = from_str(obj.get("id")) name = from_str(obj.get("name")) + disable_model_invocation = from_union([from_bool, from_none], obj.get("disableModelInvocation")) mcp_servers = from_union([lambda x: from_dict(lambda x: x, x), from_none], obj.get("mcpServers")) model = from_union([from_str, from_none], obj.get("model")) model_policy = from_union([AgentModelPolicy, from_none], obj.get("modelPolicy")) @@ -24220,7 +24495,7 @@ def from_dict(obj: Any) -> 'AgentInfo': source = from_union([AgentInfoSource, from_none], obj.get("source")) tools = from_union([lambda x: from_list(from_str, x), from_none], obj.get("tools")) user_invocable = from_union([from_bool, from_none], obj.get("userInvocable")) - return AgentInfo(description, display_name, id, name, mcp_servers, model, model_policy, models, path, prompt, skills, source, tools, user_invocable) + return AgentInfo(description, display_name, id, name, disable_model_invocation, mcp_servers, model, model_policy, models, path, prompt, skills, source, tools, user_invocable) def to_dict(self) -> dict: result: dict = {} @@ -24228,6 +24503,8 @@ def to_dict(self) -> dict: result["displayName"] = from_str(self.display_name) result["id"] = from_str(self.id) result["name"] = from_str(self.name) + if self.disable_model_invocation is not None: + result["disableModelInvocation"] = from_union([from_bool, from_none], self.disable_model_invocation) if self.mcp_servers is not None: result["mcpServers"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.mcp_servers) if self.model is not None: @@ -27092,6 +27369,9 @@ class FactoryRunTerminal: failure: FactoryRunFailure | None = None """Machine-readable terminal failure.""" + pause_info: PauseInfoClass | None = None + """Pause initiator metadata, or null when the run did not pause.""" + reason: str | None = None """Human-readable terminal reason.""" @@ -27103,9 +27383,10 @@ def from_dict(obj: Any) -> 'FactoryRunTerminal': assert isinstance(obj, dict) error = from_union([from_str, from_none], obj.get("error")) failure = from_union([FactoryRunFailure.from_dict, from_none], obj.get("failure")) + pause_info = from_union([PauseInfoClass.from_dict, from_none], obj.get("pauseInfo")) reason = from_union([from_str, from_none], obj.get("reason")) result_preview = from_union([from_str, from_none], obj.get("resultPreview")) - return FactoryRunTerminal(error, failure, reason, result_preview) + return FactoryRunTerminal(error, failure, pause_info, reason, result_preview) def to_dict(self) -> dict: result: dict = {} @@ -27113,6 +27394,7 @@ def to_dict(self) -> dict: result["error"] = from_union([from_str, from_none], self.error) if self.failure is not None: result["failure"] = from_union([lambda x: to_class(FactoryRunFailure, x), from_none], self.failure) + result["pauseInfo"] = from_union([lambda x: to_class(PauseInfoClass, x), from_none], self.pause_info) if self.reason is not None: result["reason"] = from_union([from_str, from_none], self.reason) if self.result_preview is not None: @@ -27142,6 +27424,9 @@ class FactoryRunResult: failure: FactoryRunFailure | None = None """Machine-readable failure details for a halted or errored run.""" + pause_info: FactoryPauseInfo | None = None + """Structured pause initiator metadata for a paused attempt.""" + reason: str | None = None """Reason for a halted or cancelled run.""" @@ -27159,10 +27444,11 @@ def from_dict(obj: Any) -> 'FactoryRunResult': attempt = from_union([from_int, from_none], obj.get("attempt")) error = from_union([from_str, from_none], obj.get("error")) failure = from_union([FactoryRunFailure.from_dict, from_none], obj.get("failure")) + pause_info = from_union([FactoryPauseInfo.from_dict, from_none], obj.get("pauseInfo")) reason = from_union([from_str, from_none], obj.get("reason")) result = obj.get("result") snapshot = obj.get("snapshot") - return FactoryRunResult(run_id, status, attempt, error, failure, reason, result, snapshot) + return FactoryRunResult(run_id, status, attempt, error, failure, pause_info, reason, result, snapshot) def to_dict(self) -> dict: result: dict = {} @@ -27174,6 +27460,8 @@ def to_dict(self) -> dict: result["error"] = from_union([from_str, from_none], self.error) if self.failure is not None: result["failure"] = from_union([lambda x: to_class(FactoryRunFailure, x), from_none], self.failure) + if self.pause_info is not None: + result["pauseInfo"] = from_union([lambda x: to_class(FactoryPauseInfo, x), from_none], self.pause_info) if self.reason is not None: result["reason"] = from_union([from_str, from_none], self.reason) if self.result is not None: @@ -28394,6 +28682,33 @@ def to_dict(self) -> dict: result["decisionContext"] = from_union([lambda x: to_class(PermissionDecisionContext, x), from_none], self.decision_context) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SandboxDisableForSessionRequest: + """Request to disable sandboxing for the current session while resolving an active + sandbox-bypass permission prompt. + """ + request_id: str + """Identifier of the exact pending sandbox-bypass permission request that authorized the + session opt-out. + """ + decision_context: PermissionDecisionContext | None = None + """Optional attribution for the permission decision.""" + + @staticmethod + def from_dict(obj: Any) -> 'SandboxDisableForSessionRequest': + assert isinstance(obj, dict) + request_id = from_str(obj.get("requestId")) + decision_context = from_union([PermissionDecisionContext.from_dict, from_none], obj.get("decisionContext")) + return SandboxDisableForSessionRequest(request_id, decision_context) + + def to_dict(self) -> dict: + result: dict = {} + result["requestId"] = from_str(self.request_id) + if self.decision_context is not None: + result["decisionContext"] = from_union([lambda x: to_class(PermissionDecisionContext, x), from_none], self.decision_context) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class PermissionsConfigureAdditionalContentExclusionPolicy: @@ -30901,6 +31216,9 @@ def to_dict(self) -> dict: class FactoryRunSummary: """Durable factory run summary with read-time live overlays.""" + can_resume: bool + """Whether the durable run state currently passes runtime resume eligibility checks.""" + consumed: FactoryRunConsumed """Durable resource consumption.""" @@ -30961,6 +31279,7 @@ class FactoryRunSummary: @staticmethod def from_dict(obj: Any) -> 'FactoryRunSummary': assert isinstance(obj, dict) + can_resume = from_bool(obj.get("canResume")) consumed = FactoryRunConsumed.from_dict(obj.get("consumed")) created_at = from_int(obj.get("createdAt")) declared_limits = FactoryDeclaredLimits.from_dict(obj.get("declaredLimits")) @@ -30980,10 +31299,11 @@ def from_dict(obj: Any) -> 'FactoryRunSummary': current_phase = from_union([FactoryCurrentPhase.from_dict, from_none], obj.get("currentPhase")) started_at = from_union([from_int, from_none], obj.get("startedAt")) terminal = from_union([FactoryRunTerminal.from_dict, from_none], obj.get("terminal")) - return FactoryRunSummary(consumed, created_at, declared_limits, declared_phase_count, description, factory_name, live_agent_count, observed_at, revision, run_id, status, total_spawned_agent_count, updated_at, active_segment_started_at, approved, completed_at, current_phase, started_at, terminal) + return FactoryRunSummary(can_resume, consumed, created_at, declared_limits, declared_phase_count, description, factory_name, live_agent_count, observed_at, revision, run_id, status, total_spawned_agent_count, updated_at, active_segment_started_at, approved, completed_at, current_phase, started_at, terminal) def to_dict(self) -> dict: result: dict = {} + result["canResume"] = from_bool(self.can_resume) result["consumed"] = to_class(FactoryRunConsumed, self.consumed) result["createdAt"] = from_int(self.created_at) result["declaredLimits"] = to_class(FactoryDeclaredLimits, self.declared_limits) @@ -34053,6 +34373,9 @@ class FactoryRunDetail: agents: list[FactoryAgentSummary] """Durable identities and live statuses for direct factory agents.""" + can_resume: bool + """Whether the durable run state currently passes runtime resume eligibility checks.""" + consumed: FactoryRunConsumed """Durable resource consumption.""" @@ -34120,6 +34443,7 @@ class FactoryRunDetail: def from_dict(obj: Any) -> 'FactoryRunDetail': assert isinstance(obj, dict) agents = from_list(FactoryAgentSummary.from_dict, obj.get("agents")) + can_resume = from_bool(obj.get("canResume")) consumed = FactoryRunConsumed.from_dict(obj.get("consumed")) created_at = from_int(obj.get("createdAt")) declared_limits = FactoryDeclaredLimits.from_dict(obj.get("declaredLimits")) @@ -34141,11 +34465,12 @@ def from_dict(obj: Any) -> 'FactoryRunDetail': current_phase = from_union([FactoryCurrentPhase.from_dict, from_none], obj.get("currentPhase")) started_at = from_union([from_int, from_none], obj.get("startedAt")) terminal = from_union([FactoryRunTerminal.from_dict, from_none], obj.get("terminal")) - return FactoryRunDetail(agents, consumed, created_at, declared_limits, declared_phase_count, description, factory_name, live_agent_count, observed_at, phases, progress, revision, run_id, status, total_spawned_agent_count, updated_at, active_segment_started_at, approved, completed_at, current_phase, started_at, terminal) + return FactoryRunDetail(agents, can_resume, consumed, created_at, declared_limits, declared_phase_count, description, factory_name, live_agent_count, observed_at, phases, progress, revision, run_id, status, total_spawned_agent_count, updated_at, active_segment_started_at, approved, completed_at, current_phase, started_at, terminal) def to_dict(self) -> dict: result: dict = {} result["agents"] = from_list(lambda x: to_class(FactoryAgentSummary, x), self.agents) + result["canResume"] = from_bool(self.can_resume) result["consumed"] = to_class(FactoryRunConsumed, self.consumed) result["createdAt"] = from_int(self.created_at) result["declaredLimits"] = to_class(FactoryDeclaredLimits, self.declared_limits) @@ -36736,6 +37061,11 @@ class RPC: factory_log_line: FactoryLogLine factory_log_line_kind: FactoryLogLineKind factory_log_request: FactoryLogRequest + factory_pause_checkpoint_action: FactoryPauseCheckpointAction + factory_pause_checkpoint_request: FactoryPauseCheckpointRequest + factory_pause_checkpoint_result: FactoryPauseCheckpointResult + factory_pause_info: FactoryPauseInfo + factory_pause_request: FactoryPauseRequest factory_phase_observation: FactoryPhaseObservation factory_phase_status: FactoryPhaseStatus factory_progress_line: FactoryProgressLine @@ -37034,6 +37364,8 @@ class RPC: model_picker_settings_context: ModelPickerSettingsContext model_policy: ModelPolicy model_policy_state: ModelPolicyState + model_set_allowed_models_request: ModelSetAllowedModelsRequest + model_set_allowed_models_result: ModelSetAllowedModelsResult model_set_reasoning_effort_request: ModelSetReasoningEffortRequest model_set_reasoning_effort_result: ModelSetReasoningEffortResult models_list_request: ModelsListRequest @@ -37304,6 +37636,8 @@ class RPC: sandbox_config_user_policy_network: SandboxConfigUserPolicyNetwork sandbox_config_user_policy_network_proxy: SandboxConfigUserPolicyNetworkProxy sandbox_config_user_policy_seatbelt: SandboxConfigUserPolicySeatbelt + sandbox_disable_for_session_request: SandboxDisableForSessionRequest + sandbox_disable_for_session_result: SandboxDisableForSessionResult sandbox_enforcement_status: SandboxEnforcementStatus schedule_add_at_request: ScheduleAddAtRequest schedule_add_cron_request: ScheduleAddCronRequest @@ -37345,6 +37679,7 @@ class RPC: session_context: SessionContext session_context_host_type: HostType session_enrich_metadata_result: SessionEnrichMetadataResult + session_factory_pause_at_checkpoint_result: SessionFactoryPauseAtCheckpointResult session_fs_append_file_request: SessionFSAppendFileRequest session_fs_error: SessionFSError session_fs_error_code: SessionFSErrorCode @@ -37956,6 +38291,11 @@ def from_dict(obj: Any) -> 'RPC': factory_log_line = FactoryLogLine.from_dict(obj.get("FactoryLogLine")) factory_log_line_kind = FactoryLogLineKind(obj.get("FactoryLogLineKind")) factory_log_request = FactoryLogRequest.from_dict(obj.get("FactoryLogRequest")) + factory_pause_checkpoint_action = FactoryPauseCheckpointAction(obj.get("FactoryPauseCheckpointAction")) + factory_pause_checkpoint_request = FactoryPauseCheckpointRequest.from_dict(obj.get("FactoryPauseCheckpointRequest")) + factory_pause_checkpoint_result = FactoryPauseCheckpointResult.from_dict(obj.get("FactoryPauseCheckpointResult")) + factory_pause_info = FactoryPauseInfo.from_dict(obj.get("FactoryPauseInfo")) + factory_pause_request = FactoryPauseRequest.from_dict(obj.get("FactoryPauseRequest")) factory_phase_observation = FactoryPhaseObservation.from_dict(obj.get("FactoryPhaseObservation")) factory_phase_status = FactoryPhaseStatus(obj.get("FactoryPhaseStatus")) factory_progress_line = FactoryProgressLine.from_dict(obj.get("FactoryProgressLine")) @@ -38254,6 +38594,8 @@ def from_dict(obj: Any) -> 'RPC': model_picker_settings_context = ModelPickerSettingsContext.from_dict(obj.get("ModelPickerSettingsContext")) model_policy = ModelPolicy.from_dict(obj.get("ModelPolicy")) model_policy_state = ModelPolicyState(obj.get("ModelPolicyState")) + model_set_allowed_models_request = ModelSetAllowedModelsRequest.from_dict(obj.get("ModelSetAllowedModelsRequest")) + model_set_allowed_models_result = ModelSetAllowedModelsResult.from_dict(obj.get("ModelSetAllowedModelsResult")) model_set_reasoning_effort_request = ModelSetReasoningEffortRequest.from_dict(obj.get("ModelSetReasoningEffortRequest")) model_set_reasoning_effort_result = ModelSetReasoningEffortResult.from_dict(obj.get("ModelSetReasoningEffortResult")) models_list_request = ModelsListRequest.from_dict(obj.get("ModelsListRequest")) @@ -38524,6 +38866,8 @@ def from_dict(obj: Any) -> 'RPC': sandbox_config_user_policy_network = SandboxConfigUserPolicyNetwork.from_dict(obj.get("SandboxConfigUserPolicyNetwork")) sandbox_config_user_policy_network_proxy = SandboxConfigUserPolicyNetworkProxy.from_dict(obj.get("SandboxConfigUserPolicyNetworkProxy")) sandbox_config_user_policy_seatbelt = SandboxConfigUserPolicySeatbelt.from_dict(obj.get("SandboxConfigUserPolicySeatbelt")) + sandbox_disable_for_session_request = SandboxDisableForSessionRequest.from_dict(obj.get("SandboxDisableForSessionRequest")) + sandbox_disable_for_session_result = SandboxDisableForSessionResult.from_dict(obj.get("SandboxDisableForSessionResult")) sandbox_enforcement_status = SandboxEnforcementStatus.from_dict(obj.get("SandboxEnforcementStatus")) schedule_add_at_request = ScheduleAddAtRequest.from_dict(obj.get("ScheduleAddAtRequest")) schedule_add_cron_request = ScheduleAddCronRequest.from_dict(obj.get("ScheduleAddCronRequest")) @@ -38565,6 +38909,7 @@ def from_dict(obj: Any) -> 'RPC': session_context = SessionContext.from_dict(obj.get("SessionContext")) session_context_host_type = HostType(obj.get("SessionContextHostType")) session_enrich_metadata_result = SessionEnrichMetadataResult.from_dict(obj.get("SessionEnrichMetadataResult")) + session_factory_pause_at_checkpoint_result = SessionFactoryPauseAtCheckpointResult.from_dict(obj.get("SessionFactoryPauseAtCheckpointResult")) session_fs_append_file_request = SessionFSAppendFileRequest.from_dict(obj.get("SessionFsAppendFileRequest")) session_fs_error = SessionFSError.from_dict(obj.get("SessionFsError")) session_fs_error_code = SessionFSErrorCode(obj.get("SessionFsErrorCode")) @@ -38924,7 +39269,7 @@ def from_dict(obj: Any) -> 'RPC': subagent_settings = from_union([SubagentSettings.from_dict, from_none], obj.get("SubagentSettings")) task_progress = from_union([TaskProgress.from_dict, from_none], obj.get("TaskProgress")) workspace_summary = from_union([WorkspaceSummary.from_dict, from_none], obj.get("WorkspaceSummary")) - return RPC(abort_request, abort_result, account_all_users, account_get_all_users_result, account_get_current_auth_result, account_get_quota_request, account_get_quota_result, account_login_request, account_login_result, account_logout_request, account_logout_result, account_quota_snapshot, adaptive_thinking_support, agent_discovery_path, agent_discovery_path_list, agent_discovery_path_scope, agent_get_current_result, agent_info, agent_info_source, agent_list, agent_list_request, agent_registry_live_target_entry, agent_registry_live_target_entry_attention_kind, agent_registry_live_target_entry_kind, agent_registry_live_target_entry_last_terminal_event, agent_registry_live_target_entry_status, agent_registry_log_capture, agent_registry_log_capture_open_error_reason, agent_registry_spawn_error, agent_registry_spawn_permission_mode, agent_registry_spawn_registry_timeout, agent_registry_spawn_request, agent_registry_spawn_result, agent_registry_spawn_spawned, agent_registry_spawn_validation_error, agent_registry_spawn_validation_error_field, agent_registry_spawn_validation_error_reason, agent_reload_result, agents_discover_request, agent_select_request, agent_select_result, agent_set_prompt_request, agents_get_discovery_paths_request, api_key_auth_info, auth_identity, auth_info, auth_info_type, auth_validation_error, auth_validation_errors, autopilot_objective_credit_limit, autopilot_objective_get_state_result, autopilot_objective_state, autopilot_objective_status, built_in_model_catalog, built_in_model_catalog_entry, builtin_tool_descriptor, builtin_tool_format, builtin_tool_format_type, builtin_tool_input_schema, builtin_tool_input_schema_type, builtin_tool_safe_for_telemetry, builtin_tool_safe_telemetry_fields, cancel_user_requested_shell_command_result, canvas_action, canvas_action_invoke_request, canvas_action_invoke_result, canvas_close_request, canvas_host_context, canvas_host_context_capabilities, canvas_json_schema, canvas_list, canvas_list_open_result, canvas_open_request, canvas_provider_close_request, canvas_provider_invoke_action_request, canvas_provider_open_request, canvas_provider_open_result, canvas_provider_register_request, canvas_provider_unregister_request, canvas_session_context, capi_session_options, card_digest, card_digest_algorithm, card_digest_value, catalog_ai_skill_candidate, catalog_ai_skill_candidate_provenance, catalog_authentication_required_error, catalog_authentication_required_reason, catalog_candidate, catalog_candidate_kind, catalog_candidate_source, catalog_candidate_source_embedded, catalog_candidate_source_url, catalog_capability, catalog_capability_id, catalog_client_contract, catalog_contract_violation_error, catalog_contract_violation_reason, catalog_handle_rejected_error, catalog_handle_rejection_reason, catalog_handle_type, catalog_invalid_request_error, catalog_invalid_request_field, catalog_malformed_card_error, catalog_malformed_card_reason, catalog_mcp_server_candidate, catalog_mcp_server_candidate_provenance, catalog_mcp_server_installability, catalog_media_type, catalog_negotiated_contract, catalog_negotiation_refused_error, catalog_negotiation_refused_reason, catalog_network_failure_error, catalog_network_failure_reason, catalog_not_installable_error, catalog_not_installable_reason, catalog_policy_rejected_error, catalog_search_request, catalog_search_result, catalog_search_succeeded, catalog_unavailable_error, catalog_unavailable_reason, catalog_unavailable_transport_error, catalog_unavailable_transport_reason, catalog_unsafe_retrieval_error, catalog_unsafe_retrieval_reason, catalog_unsupported_kind_error, client_task_cancel_reason, client_task_cancel_request, client_task_cancel_result, command_list, commands_finalize_invocation_effect_request, commands_finalize_invocation_effect_result, commands_handle_pending_command_request, commands_handle_pending_command_result, commands_invocation_effect_outcome, commands_invocation_origin, commands_invoke_request, commands_list_request, commands_respond_to_queued_command_request, commands_respond_to_queued_command_result, completions_get_trigger_characters_result, completions_request_request, completions_request_result, configure_session_extensions_params, connect_client_info, connected_remote_session_metadata, connected_remote_session_metadata_kind, connected_remote_session_metadata_repository, connect_remote_session_params, connect_request, connect_result, content_exclusion_check_paths_request, content_exclusion_check_paths_result, content_exclusion_path_check, content_filter_mode, context_heaviest_message, copilot_api_token_auth_info, copilot_user_response, copilot_user_response_endpoints, copilot_user_response_quota_snapshots, copilot_user_response_quota_snapshots_chat, copilot_user_response_quota_snapshots_completions, copilot_user_response_quota_snapshots_premium_interactions, current_model, current_tool_metadata, debug_collect_logs_collected_entry, debug_collect_logs_destination, debug_collect_logs_entry, debug_collect_logs_entry_kind, debug_collect_logs_include, debug_collect_logs_redaction, debug_collect_logs_request, debug_collect_logs_result, debug_collect_logs_result_kind, debug_collect_logs_skipped_entry, debug_collect_logs_source, discovered_canvas, discovered_extension, discovered_extension_mode, discovered_extension_plugin, discovered_extensions, discovered_extensions_disable_request, discovered_extensions_enable_request, discovered_extension_source, discovered_hook, discovered_mcp_server, discovered_mcp_server_type, enqueue_command_params, enqueue_command_result, env_auth_info, event_log_read_request, event_log_release_interest_result, event_log_tail_result, event_log_types, events_agent_scope, events_cursor_status, events_read_direction, events_read_result, execute_command_params, execute_command_result, extension, extension_context_push_input, extension_launch_profile, extension_launch_provider_resolve_request, extension_launch_provider_resolve_result, extension_list, extensions_disable_request, extensions_enable_request, extension_source, extension_status, external_tool_result, external_tool_text_result_for_llm, external_tool_text_result_for_llm_binary_results_for_llm, external_tool_text_result_for_llm_binary_results_for_llm_type, external_tool_text_result_for_llm_content, external_tool_text_result_for_llm_content_audio, external_tool_text_result_for_llm_content_image, external_tool_text_result_for_llm_content_resource, external_tool_text_result_for_llm_content_resource_details, external_tool_text_result_for_llm_content_resource_link, external_tool_text_result_for_llm_content_resource_link_icon, external_tool_text_result_for_llm_content_resource_link_icon_theme, external_tool_text_result_for_llm_content_shell_exit, external_tool_text_result_for_llm_content_terminal, external_tool_text_result_for_llm_content_text, factory_abort_request, factory_ack_result, factory_agent_options, factory_agent_request, factory_agent_result, factory_agent_summary, factory_cancel_request, factory_current_phase, factory_declared_limits, factory_durable_operation, factory_execute_request, factory_execute_result, factory_get_run_progress_request, factory_get_run_request, factory_journal_get_request, factory_journal_get_result, factory_journal_put_request, factory_list_runs_request, factory_list_runs_result, factory_log_line, factory_log_line_kind, factory_log_request, factory_phase_observation, factory_phase_status, factory_progress_line, factory_progress_page, factory_resume_request, factory_resume_result, factory_run_consumed, factory_run_detail, factory_run_failure, factory_run_failure_kind, factory_run_limits, factory_run_request, factory_run_result, factory_run_status, factory_run_summary, factory_run_terminal, factory_tool_resume_request, factory_tool_run_options, factory_tool_run_request, filter_mapping, fleet_start_request, fleet_start_result, folder_trust_add_params, folder_trust_check_params, folder_trust_check_result, gh_cli_auth_info, git_hub_telemetry_client_info, git_hub_telemetry_event, git_hub_telemetry_notification, git_hub_token_acquire_reason, git_hub_token_acquire_request, git_hub_token_acquire_result, handle_pending_tool_call_request, handle_pending_tool_call_result, history_abort_manual_compaction_result, history_cancel_background_compaction_result, history_clear_context_request, history_clear_context_result, history_compact_context_window, history_compact_request, history_compact_result, history_file_restore_skip_reason, history_list_rewind_points_result, history_preview_rewind_request, history_preview_rewind_result, history_rewind_change_type, history_rewind_file_preview, history_rewind_mode, history_rewind_outcome, history_rewind_point, history_rewind_request, history_rewind_result, history_rewind_unavailable_reason, history_skipped_file_restore, history_summarize_for_handoff_result, history_truncate_request, history_truncate_result, hmac_auth_info, hook_invoke_request, hook_invoke_response, hook_origin, hooks_discover_request, hooks_discover_result, hook_type, installed_plugin, installed_plugin_info, installed_plugin_source, installed_plugin_source_git_hub, installed_plugin_source_local, installed_plugin_source_url, instruction_discovery_path, instruction_discovery_path_kind, instruction_discovery_path_list, instruction_discovery_path_location, instructions_discover_request, instructions_get_discovery_paths_request, instructions_get_sources_result, instruction_source, instruction_source_location, instruction_source_type, interrupt_main_turn_request, interrupt_main_turn_result, llm_inference_headers, llm_inference_http_request_chunk_request, llm_inference_http_request_chunk_result, llm_inference_http_request_start_request, llm_inference_http_request_start_result, llm_inference_http_request_start_transport, llm_inference_http_response_chunk_error, llm_inference_http_response_chunk_request, llm_inference_http_response_chunk_result, llm_inference_http_response_start_request, llm_inference_http_response_start_result, llm_inference_set_provider_result, local_session_metadata_value, log_request, log_result, lsp_initialize_request, managed_settings_read_result, marketplace_add_result, marketplace_browse_result, marketplace_info, marketplace_list_result, marketplace_plugin_info, marketplace_refresh_entry, marketplace_refresh_result, marketplace_remove_result, mcp_allowed_server, mcp_apps_call_tool_request, mcp_apps_diagnose_capability, mcp_apps_diagnose_request, mcp_apps_diagnose_result, mcp_apps_diagnose_server, mcp_apps_host_context, mcp_apps_host_context_details, mcp_apps_host_context_details_available_display_mode, mcp_apps_host_context_details_display_mode, mcp_apps_host_context_details_platform, mcp_apps_host_context_details_theme, mcp_apps_list_tools_request, mcp_apps_list_tools_result, mcp_apps_read_resource_request, mcp_apps_read_resource_result, mcp_apps_resource_content, mcp_apps_set_host_context_details, mcp_apps_set_host_context_details_available_display_mode, mcp_apps_set_host_context_details_display_mode, mcp_apps_set_host_context_details_platform, mcp_apps_set_host_context_details_theme, mcp_apps_set_host_context_request, mcp_cancel_sampling_execution_params, mcp_cancel_sampling_execution_result, mcp_config_add_request, mcp_config_disable_request, mcp_config_enable_request, mcp_config_list, mcp_config_remove_request, mcp_config_update_request, mcp_configure_git_hub_request, mcp_configure_git_hub_result, mcp_disable_request, mcp_discover_request, mcp_discover_result, mcp_elicitation_form_mode, mcp_enable_request, mcp_execute_sampling_params, mcp_execute_sampling_request, mcp_execute_sampling_result, mcp_failed_server, mcp_filtered_server, mcp_headers_handle_pending_headers_refresh_request, mcp_headers_handle_pending_headers_refresh_request_request, mcp_headers_handle_pending_headers_refresh_request_result, mcp_host_state, mcp_install_plan, mcp_is_server_running_request, mcp_is_server_running_result, mcp_list_tools_request, mcp_list_tools_result, mcp_oauth_authentication_state_changed_request, mcp_oauth_handle_pending_request, mcp_oauth_handle_pending_result, mcp_oauth_login_grant_type, mcp_oauth_login_request, mcp_oauth_login_result, mcp_oauth_pending_request_response, mcp_oauth_probe_needs_auth_reason, mcp_oauth_probe_request, mcp_oauth_probe_result, mcp_oauth_respond_request, mcp_oauth_respond_result, mcp_plan_configuration_change, mcp_plan_configuration_operation, mcp_plan_enum_value_type, mcp_plan_install_planned, mcp_plan_install_request, mcp_plan_install_result, mcp_plan_install_source, mcp_plan_install_source_candidate, mcp_plan_install_source_candidate_kind, mcp_plan_install_source_card, mcp_plan_install_source_card_kind, mcp_plan_package_install_method, mcp_plan_package_transport, mcp_plan_policy_decision, mcp_plan_policy_result, mcp_plan_policy_source, mcp_plan_provenance, mcp_plan_remote_install_method, mcp_plan_remote_transport, mcp_plan_required_value, mcp_plan_required_value_enum, mcp_plan_required_value_enum_kind, mcp_plan_required_value_scalar, mcp_plan_required_value_scalar_kind, mcp_plan_resource_identity, mcp_plan_scalar_value_type, mcp_plan_scope, mcp_plan_secret_placeholder, mcp_plan_secret_reference, mcp_plan_target, mcp_plan_transport_choice, mcp_plan_transport_choice_package, mcp_plan_transport_choice_remote, mcp_plan_value_category, mcp_register_external_client_request, mcp_reload_config, mcp_reload_with_config_request, mcp_remove_git_hub_result, mcp_resource, mcp_resource_annotations, mcp_resource_content, mcp_resource_icon, mcp_resources_list_request, mcp_resources_list_result, mcp_resources_list_templates_request, mcp_resources_list_templates_result, mcp_resources_read_request, mcp_resources_read_result, mcp_resource_template, mcp_restart_server_request, mcp_safe_for_telemetry, mcp_safe_for_telemetry_fields, mcp_sampling_execution_action, mcp_sampling_execution_result, mcp_serializable_server_config, mcp_server, mcp_server_auth_config, mcp_server_auth_config_redirect_port, mcp_server_card_embedded, mcp_server_card_embedded_kind, mcp_server_card_media_type, mcp_server_card_reference, mcp_server_card_url, mcp_server_card_url_kind, mcp_server_config, mcp_server_config_defer_tools, mcp_server_config_http, mcp_server_config_http_oauth_grant_type, mcp_server_config_http_type, mcp_server_config_memory, mcp_server_config_memory_type, mcp_server_config_stdio, mcp_server_config_stdio_type, mcp_server_failure_info, mcp_server_list, mcp_server_needs_auth_info, mcp_set_env_value_mode_details, mcp_set_env_value_mode_params, mcp_set_env_value_mode_result, mcp_start_server_request, mcp_start_servers_result, mcp_stop_server_request, mcp_task_metadata, mcp_tools, mcp_tool_ui, mcp_tool_ui_visibility, mcp_unregister_external_client_request, memory_configuration, metadata_context_attribution_result, metadata_context_heaviest_messages_request, metadata_context_heaviest_messages_result, metadata_context_info_request, metadata_context_info_result, metadata_is_processing_result, metadata_recompute_context_tokens_request, metadata_recompute_context_tokens_result, metadata_record_context_change_request, metadata_record_context_change_result, metadata_set_working_directory_request, metadata_set_working_directory_result, metadata_snapshot_current_mode, metadata_snapshot_remote_metadata, metadata_snapshot_remote_metadata_repository, metadata_snapshot_remote_metadata_task_type, model, model_apply_startup_overlay_request, model_billing, model_billing_promo, model_billing_token_prices, model_billing_token_prices_long_context, model_capabilities, model_capabilities_limits, model_capabilities_limits_vision, model_capabilities_override, model_capabilities_override_limits, model_capabilities_override_limits_vision, model_capabilities_override_supports, model_capabilities_supports, model_list, model_list_request, model_message, model_picker_category, model_picker_persistence_request, model_picker_price_category, model_picker_settings_context, model_policy, model_policy_state, model_set_reasoning_effort_request, model_set_reasoning_effort_result, models_list_request, model_switch_auto_tier_request, model_switch_auto_tier_result, model_switch_auto_tier_status, model_switch_confirmation, model_switch_to_request, model_switch_to_result, model_warning_text, mode_set_request, mode_set_result, move_mcp_loading_to_background_result, named_provider_config, name_get_result, name_set_auto_request, name_set_auto_result, name_set_request, open_canvas_instance, options_update_additional_content_exclusion_policy, options_update_additional_content_exclusion_policy_rule, options_update_additional_content_exclusion_policy_rule_source, options_update_additional_content_exclusion_policy_scope, options_update_context_tier, options_update_env_value_mode, options_update_reasoning_summary, options_update_tool_filter_precedence, pending_permission_request, pending_permission_request_list, permission_decision, permission_decision_approved, permission_decision_approved_for_location, permission_decision_approved_for_session, permission_decision_approve_for_location, permission_decision_approve_for_location_approval, permission_decision_approve_for_location_approval_commands, permission_decision_approve_for_location_approval_custom_tool, permission_decision_approve_for_location_approval_extension_env_access, permission_decision_approve_for_location_approval_extension_management, permission_decision_approve_for_location_approval_extension_permission_access, permission_decision_approve_for_location_approval_factory, permission_decision_approve_for_location_approval_mcp, permission_decision_approve_for_location_approval_mcp_sampling, permission_decision_approve_for_location_approval_memory, permission_decision_approve_for_location_approval_read, permission_decision_approve_for_location_approval_write, permission_decision_approve_for_session, permission_decision_approve_for_session_approval, permission_decision_approve_for_session_approval_commands, permission_decision_approve_for_session_approval_custom_tool, permission_decision_approve_for_session_approval_extension_env_access, permission_decision_approve_for_session_approval_extension_management, permission_decision_approve_for_session_approval_extension_permission_access, permission_decision_approve_for_session_approval_factory, permission_decision_approve_for_session_approval_mcp, permission_decision_approve_for_session_approval_mcp_sampling, permission_decision_approve_for_session_approval_memory, permission_decision_approve_for_session_approval_read, permission_decision_approve_for_session_approval_write, permission_decision_approve_once, permission_decision_approve_permanently, permission_decision_cancelled, permission_decision_context, permission_decision_denied_by_content_exclusion_policy, permission_decision_denied_by_permission_request_hook, permission_decision_denied_by_rules, permission_decision_denied_interactively_by_user, permission_decision_denied_no_approval_rule_and_could_not_request_from_user, permission_decision_outcome, permission_decision_reject, permission_decision_request, permission_decision_source, permission_decision_surface, permission_decision_user_not_available, permission_location_add_tool_approval_params, permission_location_apply_params, permission_location_apply_result, permission_location_resolve_params, permission_location_resolve_result, permission_location_type, permission_mode_source, permission_paths_add_params, permission_paths_allowed_check_params, permission_paths_allowed_check_result, permission_paths_config, permission_paths_list, permission_paths_update_primary_params, permission_paths_workspace_check_params, permission_paths_workspace_check_result, permission_prompt_shown_notification, permission_request_result, permission_response_capability, permission_rules_set, permissions_configure_additional_content_exclusion_policy, permissions_configure_additional_content_exclusion_policy_rule, permissions_configure_additional_content_exclusion_policy_rule_source, permissions_configure_additional_content_exclusion_policy_scope, permissions_configure_params, permissions_configure_result, permissions_folder_trust_add_trusted_result, permissions_get_mode_request, permissions_get_mode_result, permissions_locations_add_tool_approval_details, permissions_locations_add_tool_approval_details_commands, permissions_locations_add_tool_approval_details_custom_tool, permissions_locations_add_tool_approval_details_extension_env_access, permissions_locations_add_tool_approval_details_extension_management, permissions_locations_add_tool_approval_details_extension_permission_access, permissions_locations_add_tool_approval_details_factory, permissions_locations_add_tool_approval_details_mcp, permissions_locations_add_tool_approval_details_mcp_sampling, permissions_locations_add_tool_approval_details_memory, permissions_locations_add_tool_approval_details_read, permissions_locations_add_tool_approval_details_write, permissions_locations_add_tool_approval_result, permissions_modify_rules_params, permissions_modify_rules_result, permissions_modify_rules_scope, permissions_notify_prompt_shown_result, permissions_paths_add_result, permissions_paths_list_request, permissions_paths_update_primary_result, permissions_pending_requests_request, permissions_reset_session_approvals_request, permissions_reset_session_approvals_result, permissions_set_approve_all_request, permissions_set_approve_all_result, permissions_set_approve_all_source, permissions_set_mode_request, permissions_set_mode_result, permissions_set_required_request, permissions_set_required_result, permissions_urls_set_unrestricted_mode_result, permission_urls_config, permission_urls_set_unrestricted_mode_params, ping_request, ping_result, plan_read_result, plan_read_sql_todos_result, plan_read_sql_todos_with_dependencies_result, plan_sql_todo_dependency, plan_sql_todos_row, plan_update_request, plugin, plugin_install_result, plugin_install_staging_mode, plugin_list, plugin_list_result, plugins_builtin_set_request, plugins_disable_request, plugins_enable_request, plugins_install_request, plugins_marketplaces_add_request, plugins_marketplaces_browse_request, plugins_marketplaces_refresh_request, plugins_marketplaces_remove_request, plugins_reload_request, plugins_uninstall_request, plugins_update_request, plugin_update_all_entry, plugin_update_all_result, plugin_update_result, protocol_external_tool_defer, protocol_external_tool_definition, provider_add_request, provider_add_result, provider_config, provider_config_azure, provider_config_transport, provider_config_type, provider_config_wire_api, provider_endpoint, provider_endpoint_transport, provider_endpoint_type, provider_endpoint_wire_api, provider_get_endpoint_request, provider_model_config, provider_session_token, provider_token_acquire_request, provider_token_acquire_result, push_attachment, push_attachment_blob, push_attachment_directory, push_attachment_file, push_attachment_file_line_range, push_attachment_git_hub_actions_job, push_attachment_git_hub_commit, push_attachment_git_hub_file, push_attachment_git_hub_file_diff, push_attachment_git_hub_file_diff_side, push_attachment_git_hub_reference, push_attachment_git_hub_reference_type, push_attachment_git_hub_release, push_attachment_git_hub_repository, push_attachment_git_hub_snippet, push_attachment_git_hub_tree_comparison, push_attachment_git_hub_tree_comparison_side, push_attachment_git_hub_url, push_attachment_selection, push_attachment_selection_details, push_attachment_selection_details_end, push_attachment_selection_details_start, push_git_hub_repo_ref, queue_begin_deferred_idle_drain_request, queue_begin_deferred_idle_drain_result, queue_consume_system_notifications_request, queued_command_handled, queued_command_not_handled, queued_command_result, queue_defer_session_idle_request, queue_duplicate_at_request, queue_duplicate_at_result, queue_enqueue_resume_pending_result, queue_finish_deferred_idle_drain_request, queue_finish_deferred_idle_drain_result, queue_has_pending_result, queue_insert_at_request, queue_insert_at_result, queue_insert_message, queue_move_item_request, queue_move_item_result, queue_pending_items, queue_pending_items_kind, queue_pending_items_result, queue_remove_at_request, queue_remove_at_result, queue_remove_most_recent_result, queue_send_now_request, queue_send_now_result, queue_set_drain_paused_request, queue_snapshot_result, queue_update_text_request, queue_update_text_result, register_event_interest_params, register_event_interest_result, register_extension_tools_params, register_extension_tools_result, release_event_interest_params, remote_control_config, remote_control_config_existing_mc_session, remote_control_status, remote_control_status_active, remote_control_status_connecting, remote_control_status_error, remote_control_status_off, remote_control_status_result, remote_control_stop_result, remote_control_transfer_result, remote_enable_request, remote_enable_result, remote_notify_steerable_changed_request, remote_notify_steerable_changed_result, remote_session_connection_result, remote_session_host_status, remote_session_metadata_repository, remote_session_metadata_task_type, remote_session_metadata_value, remote_session_mode, remote_session_repository, run_options, sandbox_config, sandbox_config_auth, sandbox_config_source, sandbox_config_user_policy, sandbox_config_user_policy_experimental, sandbox_config_user_policy_experimental_seatbelt, sandbox_config_user_policy_filesystem, sandbox_config_user_policy_network, sandbox_config_user_policy_network_proxy, sandbox_config_user_policy_seatbelt, sandbox_enforcement_status, schedule_add_at_request, schedule_add_cron_request, schedule_add_request, schedule_add_result, schedule_add_self_paced_request, schedule_entry, schedule_has_self_paced_result, schedule_list, schedule_rearm_self_paced_request, schedule_stop_request, schedule_stop_result, secrets_add_filter_values_request, secrets_add_filter_values_result, send_agent_mode, send_attachments_to_message_params, send_message_item, send_messages_request, send_messages_result, send_mode, send_request, send_result, send_system_notification_request, server_agent_list, server_instruction_source_list, server_skill, server_skill_list, session_activity, session_agent_list_request, session_auth_login_request, session_auth_logout_user_request, session_auth_status, session_auth_switch_request, session_bulk_delete_result, session_cancel_all_background_agents_result, session_capability, session_commands_list_request, session_completion_item, session_context, session_context_host_type, session_enrich_metadata_result, session_fs_append_file_request, session_fs_error, session_fs_error_code, session_fs_exists_request, session_fs_exists_result, session_fs_mkdir_request, session_fs_readdir_request, session_fs_readdir_result, session_fs_readdir_with_types_entry, session_fs_readdir_with_types_entry_type, session_fs_readdir_with_types_request, session_fs_readdir_with_types_result, session_fs_read_file_request, session_fs_read_file_result, session_fs_rename_request, session_fs_rm_request, session_fs_set_provider_capabilities, session_fs_set_provider_conventions, session_fs_set_provider_request, session_fs_set_provider_result, session_fs_sqlite_exists_request, session_fs_sqlite_exists_result, session_fs_sqlite_query_request, session_fs_sqlite_query_result, session_fs_sqlite_query_type, session_fs_sqlite_transaction_error, session_fs_sqlite_transaction_error_class, session_fs_sqlite_transaction_request, session_fs_sqlite_transaction_result, session_fs_sqlite_transaction_statement, session_fs_stat_request, session_fs_stat_result, session_fs_write_file_request, session_git_hub_auth_get_all_auth_available_result, session_git_hub_auth_logout_result, session_git_hub_auth_logout_user_result, session_history_compact_request, session_installed_plugin, session_installed_plugin_source, session_installed_plugin_source_git_hub, session_installed_plugin_source_local, session_installed_plugin_source_url, session_limit_prediction_baseline_data, session_limit_prediction_client_type, session_limit_prediction_details, session_limit_prediction_predict_request, session_limit_prediction_request, session_limit_prediction_result, session_limit_prediction_source, session_limit_prediction_tier, session_limit_prediction_tier_option, session_limit_prediction_unavailable_reason, session_list, session_list_entry, session_list_filter, session_load_deferred_repo_hooks_result, session_log_level, session_managed_permissions, session_managed_settings, session_mcp_apps_call_tool_result, session_metadata_snapshot, session_mode, session_model_list, session_model_list_request, session_model_price_category, session_open_options, session_open_options_additional_content_exclusion_policy, session_open_options_additional_content_exclusion_policy_rule, session_open_options_additional_content_exclusion_policy_rule_source, session_open_options_additional_content_exclusion_policy_scope, session_open_options_env_value_mode, session_open_options_reasoning_summary, session_open_params, session_open_result, session_plugins_reload_request, session_provider_get_endpoint_request, session_prune_result, sessions_bulk_delete_request, sessions_check_in_use_request, sessions_check_in_use_result, sessions_close_request, sessions_close_result, sessions_delete_request, sessions_enrich_metadata_request, session_set_credentials_params, session_set_credentials_result, session_settings_built_in_tool_availability_snapshot, session_settings_evaluate_predicate_request, session_settings_evaluate_predicate_result, session_settings_job_snapshot, session_settings_model_snapshot, session_settings_online_evaluation_snapshot, session_settings_predicate_name, session_settings_repo_snapshot, session_settings_snapshot, session_settings_validation_snapshot, sessions_find_by_prefix_request, sessions_find_by_prefix_result, sessions_find_by_task_id_request, sessions_find_by_task_id_result, sessions_fork_request, sessions_fork_result, sessions_get_board_entry_count_request, sessions_get_board_entry_count_result, sessions_get_event_file_path_request, sessions_get_event_file_path_result, sessions_get_last_for_context_request, sessions_get_last_for_context_result, sessions_get_metadata_request, sessions_get_metadata_result, sessions_get_persisted_remote_steerable_request, sessions_get_persisted_remote_steerable_result, session_sizes, sessions_list_non_empty_session_ids_request, sessions_list_non_empty_session_ids_result, sessions_list_request, sessions_load_deferred_repo_hooks_request, sessions_open_attach, sessions_open_cloud, sessions_open_create, sessions_open_handoff, sessions_open_handoff_task_type, sessions_open_progress, sessions_open_progress_status, sessions_open_progress_step, sessions_open_remote, sessions_open_resume, sessions_open_resume_last, sessions_open_status, session_source, sessions_prune_old_request, sessions_read_persisted_events_request, sessions_register_extension_tools_on_session_options, sessions_release_lock_request, sessions_release_lock_result, sessions_reload_plugin_hooks_request, sessions_reload_plugin_hooks_result, sessions_save_request, sessions_save_result, sessions_set_additional_plugins_request, sessions_set_additional_plugins_result, sessions_set_remote_control_steering_request, sessions_start_remote_control_request, sessions_stop_remote_control_request, sessions_transfer_remote_control_request, session_telemetry_engagement, session_update_options_params, session_update_options_result, session_visibility_status, session_working_directory_context, session_working_directory_context_host_type, settable_auth_info, settable_token_auth_info, shell_cancel_user_requested_request, shell_credentials, shell_exec_request, shell_exec_result, shell_execute_user_requested_request, shell_init_profile, shell_init_script, shell_init_script_shell, shell_kill_request, shell_kill_result, shell_kill_signal, shell_options, shutdown_request, skill, skill_discovery_path, skill_discovery_path_list, skill_discovery_scope, skill_list, skill_provider_descriptor, skill_provider_list_request, skill_provider_list_result, skill_provider_read_request, skill_provider_read_result, skills_config_set_disabled_skills_request, skills_config_set_skill_disabled_request, skills_disable_request, skills_discover_request, skills_enable_request, skills_get_discovery_paths_request, skills_get_invoked_result, skills_invoked_skill, skills_load_diagnostics, slash_command_add_timeline_entry_result, slash_command_agent_prompt_result, slash_command_completed_result, slash_command_info, slash_command_input, slash_command_input_choice, slash_command_input_completion, slash_command_invocation_result, slash_command_kind, slash_command_model_picker_dialog, slash_command_select_subcommand_option, slash_command_select_subcommand_result, slash_command_set_model_result, slash_command_set_plan_model_result, slash_command_show_dialog_result, slash_command_text_result, slash_command_timeline_entry, subagent_settings_entry, subagent_settings_entry_context_tier, task_agent_info, task_agent_progress, task_client_active_status, task_client_execution_mode, task_client_info, task_client_owner, task_client_owner_kind, task_client_owner_presence, task_client_progress, task_client_status, task_client_type, task_client_update, task_complete_data, task_completion_decision, task_execution_mode, task_info, task_kind, 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_register_request, tasks_register_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_update_request, tasks_update_result, tasks_wait_for_pending_result, telemetry_set_feature_overrides_request, token_auth_info, token_provider_auth_info, tool, tool_list, tool_result, tool_result_expanded, tool_result_new_message, tool_result_type, tools_execute_request, tools_get_builtin_descriptors_request, tools_get_builtin_descriptors_result, tools_get_current_metadata_result, tools_initialize_and_validate_result, tools_list_request, tools_set_request, tools_set_result, tools_shell_descriptor_config, tools_task_complete_event_data_request, tools_update_subagent_settings_result, ui_auto_mode_switch_response, ui_elicitation_array_any_of_field, ui_elicitation_array_any_of_field_items, ui_elicitation_array_any_of_field_items_any_of, ui_elicitation_array_enum_field, ui_elicitation_array_enum_field_items, ui_elicitation_field_value, ui_elicitation_request, ui_elicitation_response, ui_elicitation_response_action, ui_elicitation_response_content, ui_elicitation_result, ui_elicitation_schema, ui_elicitation_schema_property, ui_elicitation_schema_property_boolean, ui_elicitation_schema_property_number, ui_elicitation_schema_property_number_type, ui_elicitation_schema_property_string, ui_elicitation_schema_property_string_format, ui_elicitation_string_enum_field, ui_elicitation_string_one_of_field, ui_elicitation_string_one_of_field_one_of, ui_ephemeral_query_request, ui_ephemeral_query_result, ui_exit_plan_mode_action, ui_exit_plan_mode_response, ui_handle_pending_auto_mode_switch_request, ui_handle_pending_elicitation_request, ui_handle_pending_exit_plan_mode_request, ui_handle_pending_result, ui_handle_pending_sampling_request, ui_handle_pending_sampling_response, ui_handle_pending_session_limits_exhausted_request, ui_handle_pending_user_input_request, ui_register_direct_auto_mode_switch_handler_result, ui_session_limits_exhausted_response, ui_session_limits_exhausted_response_action, ui_unregister_direct_auto_mode_switch_handler_request, ui_unregister_direct_auto_mode_switch_handler_result, ui_user_input_response, update_subagent_settings_request, usage_get_metrics_result, usage_metrics_agent_metric, usage_metrics_code_changes, usage_metrics_model_metric, usage_metrics_model_metric_requests, usage_metrics_model_metric_token_detail, usage_metrics_model_metric_usage, usage_metrics_token_detail, user_auth_info, user_requested_shell_command_result, user_setting_metadata, user_settings_get_result, user_settings_set_request, user_settings_set_result, visibility_get_result, visibility_set_request, visibility_set_result, workspace_diff_file_change, workspace_diff_file_change_type, workspace_diff_mode, workspace_diff_result, workspaces_add_summary_request, workspaces_add_summary_result, workspaces_autopilot_objective_exists_result, workspaces_checkpoints, workspaces_create_file_request, workspaces_delete_autopilot_objective_result, workspaces_diff_request, workspaces_ensure_request, workspaces_get_workspace_result, workspaces_list_checkpoints_result, workspaces_list_files_result, workspaces_read_autopilot_objective_result, workspaces_read_checkpoint_request, workspaces_read_checkpoint_result, workspaces_read_file_request, workspaces_read_file_result, workspaces_save_large_paste_request, workspaces_save_large_paste_result, workspaces_truncate_summaries_request, workspace_summary_host_type, workspaces_update_metadata_request, workspaces_workspace_details_host_type, workspaces_write_autopilot_objective_request, workspaces_write_autopilot_objective_result, session_auth_info_result, session_context_attribution, session_context_info, subagent_settings, task_progress, workspace_summary) + return RPC(abort_request, abort_result, account_all_users, account_get_all_users_result, account_get_current_auth_result, account_get_quota_request, account_get_quota_result, account_login_request, account_login_result, account_logout_request, account_logout_result, account_quota_snapshot, adaptive_thinking_support, agent_discovery_path, agent_discovery_path_list, agent_discovery_path_scope, agent_get_current_result, agent_info, agent_info_source, agent_list, agent_list_request, agent_registry_live_target_entry, agent_registry_live_target_entry_attention_kind, agent_registry_live_target_entry_kind, agent_registry_live_target_entry_last_terminal_event, agent_registry_live_target_entry_status, agent_registry_log_capture, agent_registry_log_capture_open_error_reason, agent_registry_spawn_error, agent_registry_spawn_permission_mode, agent_registry_spawn_registry_timeout, agent_registry_spawn_request, agent_registry_spawn_result, agent_registry_spawn_spawned, agent_registry_spawn_validation_error, agent_registry_spawn_validation_error_field, agent_registry_spawn_validation_error_reason, agent_reload_result, agents_discover_request, agent_select_request, agent_select_result, agent_set_prompt_request, agents_get_discovery_paths_request, api_key_auth_info, auth_identity, auth_info, auth_info_type, auth_validation_error, auth_validation_errors, autopilot_objective_credit_limit, autopilot_objective_get_state_result, autopilot_objective_state, autopilot_objective_status, built_in_model_catalog, built_in_model_catalog_entry, builtin_tool_descriptor, builtin_tool_format, builtin_tool_format_type, builtin_tool_input_schema, builtin_tool_input_schema_type, builtin_tool_safe_for_telemetry, builtin_tool_safe_telemetry_fields, cancel_user_requested_shell_command_result, canvas_action, canvas_action_invoke_request, canvas_action_invoke_result, canvas_close_request, canvas_host_context, canvas_host_context_capabilities, canvas_json_schema, canvas_list, canvas_list_open_result, canvas_open_request, canvas_provider_close_request, canvas_provider_invoke_action_request, canvas_provider_open_request, canvas_provider_open_result, canvas_provider_register_request, canvas_provider_unregister_request, canvas_session_context, capi_session_options, card_digest, card_digest_algorithm, card_digest_value, catalog_ai_skill_candidate, catalog_ai_skill_candidate_provenance, catalog_authentication_required_error, catalog_authentication_required_reason, catalog_candidate, catalog_candidate_kind, catalog_candidate_source, catalog_candidate_source_embedded, catalog_candidate_source_url, catalog_capability, catalog_capability_id, catalog_client_contract, catalog_contract_violation_error, catalog_contract_violation_reason, catalog_handle_rejected_error, catalog_handle_rejection_reason, catalog_handle_type, catalog_invalid_request_error, catalog_invalid_request_field, catalog_malformed_card_error, catalog_malformed_card_reason, catalog_mcp_server_candidate, catalog_mcp_server_candidate_provenance, catalog_mcp_server_installability, catalog_media_type, catalog_negotiated_contract, catalog_negotiation_refused_error, catalog_negotiation_refused_reason, catalog_network_failure_error, catalog_network_failure_reason, catalog_not_installable_error, catalog_not_installable_reason, catalog_policy_rejected_error, catalog_search_request, catalog_search_result, catalog_search_succeeded, catalog_unavailable_error, catalog_unavailable_reason, catalog_unavailable_transport_error, catalog_unavailable_transport_reason, catalog_unsafe_retrieval_error, catalog_unsafe_retrieval_reason, catalog_unsupported_kind_error, client_task_cancel_reason, client_task_cancel_request, client_task_cancel_result, command_list, commands_finalize_invocation_effect_request, commands_finalize_invocation_effect_result, commands_handle_pending_command_request, commands_handle_pending_command_result, commands_invocation_effect_outcome, commands_invocation_origin, commands_invoke_request, commands_list_request, commands_respond_to_queued_command_request, commands_respond_to_queued_command_result, completions_get_trigger_characters_result, completions_request_request, completions_request_result, configure_session_extensions_params, connect_client_info, connected_remote_session_metadata, connected_remote_session_metadata_kind, connected_remote_session_metadata_repository, connect_remote_session_params, connect_request, connect_result, content_exclusion_check_paths_request, content_exclusion_check_paths_result, content_exclusion_path_check, content_filter_mode, context_heaviest_message, copilot_api_token_auth_info, copilot_user_response, copilot_user_response_endpoints, copilot_user_response_quota_snapshots, copilot_user_response_quota_snapshots_chat, copilot_user_response_quota_snapshots_completions, copilot_user_response_quota_snapshots_premium_interactions, current_model, current_tool_metadata, debug_collect_logs_collected_entry, debug_collect_logs_destination, debug_collect_logs_entry, debug_collect_logs_entry_kind, debug_collect_logs_include, debug_collect_logs_redaction, debug_collect_logs_request, debug_collect_logs_result, debug_collect_logs_result_kind, debug_collect_logs_skipped_entry, debug_collect_logs_source, discovered_canvas, discovered_extension, discovered_extension_mode, discovered_extension_plugin, discovered_extensions, discovered_extensions_disable_request, discovered_extensions_enable_request, discovered_extension_source, discovered_hook, discovered_mcp_server, discovered_mcp_server_type, enqueue_command_params, enqueue_command_result, env_auth_info, event_log_read_request, event_log_release_interest_result, event_log_tail_result, event_log_types, events_agent_scope, events_cursor_status, events_read_direction, events_read_result, execute_command_params, execute_command_result, extension, extension_context_push_input, extension_launch_profile, extension_launch_provider_resolve_request, extension_launch_provider_resolve_result, extension_list, extensions_disable_request, extensions_enable_request, extension_source, extension_status, external_tool_result, external_tool_text_result_for_llm, external_tool_text_result_for_llm_binary_results_for_llm, external_tool_text_result_for_llm_binary_results_for_llm_type, external_tool_text_result_for_llm_content, external_tool_text_result_for_llm_content_audio, external_tool_text_result_for_llm_content_image, external_tool_text_result_for_llm_content_resource, external_tool_text_result_for_llm_content_resource_details, external_tool_text_result_for_llm_content_resource_link, external_tool_text_result_for_llm_content_resource_link_icon, external_tool_text_result_for_llm_content_resource_link_icon_theme, external_tool_text_result_for_llm_content_shell_exit, external_tool_text_result_for_llm_content_terminal, external_tool_text_result_for_llm_content_text, factory_abort_request, factory_ack_result, factory_agent_options, factory_agent_request, factory_agent_result, factory_agent_summary, factory_cancel_request, factory_current_phase, factory_declared_limits, factory_durable_operation, factory_execute_request, factory_execute_result, factory_get_run_progress_request, factory_get_run_request, factory_journal_get_request, factory_journal_get_result, factory_journal_put_request, factory_list_runs_request, factory_list_runs_result, factory_log_line, factory_log_line_kind, factory_log_request, factory_pause_checkpoint_action, factory_pause_checkpoint_request, factory_pause_checkpoint_result, factory_pause_info, factory_pause_request, factory_phase_observation, factory_phase_status, factory_progress_line, factory_progress_page, factory_resume_request, factory_resume_result, factory_run_consumed, factory_run_detail, factory_run_failure, factory_run_failure_kind, factory_run_limits, factory_run_request, factory_run_result, factory_run_status, factory_run_summary, factory_run_terminal, factory_tool_resume_request, factory_tool_run_options, factory_tool_run_request, filter_mapping, fleet_start_request, fleet_start_result, folder_trust_add_params, folder_trust_check_params, folder_trust_check_result, gh_cli_auth_info, git_hub_telemetry_client_info, git_hub_telemetry_event, git_hub_telemetry_notification, git_hub_token_acquire_reason, git_hub_token_acquire_request, git_hub_token_acquire_result, handle_pending_tool_call_request, handle_pending_tool_call_result, history_abort_manual_compaction_result, history_cancel_background_compaction_result, history_clear_context_request, history_clear_context_result, history_compact_context_window, history_compact_request, history_compact_result, history_file_restore_skip_reason, history_list_rewind_points_result, history_preview_rewind_request, history_preview_rewind_result, history_rewind_change_type, history_rewind_file_preview, history_rewind_mode, history_rewind_outcome, history_rewind_point, history_rewind_request, history_rewind_result, history_rewind_unavailable_reason, history_skipped_file_restore, history_summarize_for_handoff_result, history_truncate_request, history_truncate_result, hmac_auth_info, hook_invoke_request, hook_invoke_response, hook_origin, hooks_discover_request, hooks_discover_result, hook_type, installed_plugin, installed_plugin_info, installed_plugin_source, installed_plugin_source_git_hub, installed_plugin_source_local, installed_plugin_source_url, instruction_discovery_path, instruction_discovery_path_kind, instruction_discovery_path_list, instruction_discovery_path_location, instructions_discover_request, instructions_get_discovery_paths_request, instructions_get_sources_result, instruction_source, instruction_source_location, instruction_source_type, interrupt_main_turn_request, interrupt_main_turn_result, llm_inference_headers, llm_inference_http_request_chunk_request, llm_inference_http_request_chunk_result, llm_inference_http_request_start_request, llm_inference_http_request_start_result, llm_inference_http_request_start_transport, llm_inference_http_response_chunk_error, llm_inference_http_response_chunk_request, llm_inference_http_response_chunk_result, llm_inference_http_response_start_request, llm_inference_http_response_start_result, llm_inference_set_provider_result, local_session_metadata_value, log_request, log_result, lsp_initialize_request, managed_settings_read_result, marketplace_add_result, marketplace_browse_result, marketplace_info, marketplace_list_result, marketplace_plugin_info, marketplace_refresh_entry, marketplace_refresh_result, marketplace_remove_result, mcp_allowed_server, mcp_apps_call_tool_request, mcp_apps_diagnose_capability, mcp_apps_diagnose_request, mcp_apps_diagnose_result, mcp_apps_diagnose_server, mcp_apps_host_context, mcp_apps_host_context_details, mcp_apps_host_context_details_available_display_mode, mcp_apps_host_context_details_display_mode, mcp_apps_host_context_details_platform, mcp_apps_host_context_details_theme, mcp_apps_list_tools_request, mcp_apps_list_tools_result, mcp_apps_read_resource_request, mcp_apps_read_resource_result, mcp_apps_resource_content, mcp_apps_set_host_context_details, mcp_apps_set_host_context_details_available_display_mode, mcp_apps_set_host_context_details_display_mode, mcp_apps_set_host_context_details_platform, mcp_apps_set_host_context_details_theme, mcp_apps_set_host_context_request, mcp_cancel_sampling_execution_params, mcp_cancel_sampling_execution_result, mcp_config_add_request, mcp_config_disable_request, mcp_config_enable_request, mcp_config_list, mcp_config_remove_request, mcp_config_update_request, mcp_configure_git_hub_request, mcp_configure_git_hub_result, mcp_disable_request, mcp_discover_request, mcp_discover_result, mcp_elicitation_form_mode, mcp_enable_request, mcp_execute_sampling_params, mcp_execute_sampling_request, mcp_execute_sampling_result, mcp_failed_server, mcp_filtered_server, mcp_headers_handle_pending_headers_refresh_request, mcp_headers_handle_pending_headers_refresh_request_request, mcp_headers_handle_pending_headers_refresh_request_result, mcp_host_state, mcp_install_plan, mcp_is_server_running_request, mcp_is_server_running_result, mcp_list_tools_request, mcp_list_tools_result, mcp_oauth_authentication_state_changed_request, mcp_oauth_handle_pending_request, mcp_oauth_handle_pending_result, mcp_oauth_login_grant_type, mcp_oauth_login_request, mcp_oauth_login_result, mcp_oauth_pending_request_response, mcp_oauth_probe_needs_auth_reason, mcp_oauth_probe_request, mcp_oauth_probe_result, mcp_oauth_respond_request, mcp_oauth_respond_result, mcp_plan_configuration_change, mcp_plan_configuration_operation, mcp_plan_enum_value_type, mcp_plan_install_planned, mcp_plan_install_request, mcp_plan_install_result, mcp_plan_install_source, mcp_plan_install_source_candidate, mcp_plan_install_source_candidate_kind, mcp_plan_install_source_card, mcp_plan_install_source_card_kind, mcp_plan_package_install_method, mcp_plan_package_transport, mcp_plan_policy_decision, mcp_plan_policy_result, mcp_plan_policy_source, mcp_plan_provenance, mcp_plan_remote_install_method, mcp_plan_remote_transport, mcp_plan_required_value, mcp_plan_required_value_enum, mcp_plan_required_value_enum_kind, mcp_plan_required_value_scalar, mcp_plan_required_value_scalar_kind, mcp_plan_resource_identity, mcp_plan_scalar_value_type, mcp_plan_scope, mcp_plan_secret_placeholder, mcp_plan_secret_reference, mcp_plan_target, mcp_plan_transport_choice, mcp_plan_transport_choice_package, mcp_plan_transport_choice_remote, mcp_plan_value_category, mcp_register_external_client_request, mcp_reload_config, mcp_reload_with_config_request, mcp_remove_git_hub_result, mcp_resource, mcp_resource_annotations, mcp_resource_content, mcp_resource_icon, mcp_resources_list_request, mcp_resources_list_result, mcp_resources_list_templates_request, mcp_resources_list_templates_result, mcp_resources_read_request, mcp_resources_read_result, mcp_resource_template, mcp_restart_server_request, mcp_safe_for_telemetry, mcp_safe_for_telemetry_fields, mcp_sampling_execution_action, mcp_sampling_execution_result, mcp_serializable_server_config, mcp_server, mcp_server_auth_config, mcp_server_auth_config_redirect_port, mcp_server_card_embedded, mcp_server_card_embedded_kind, mcp_server_card_media_type, mcp_server_card_reference, mcp_server_card_url, mcp_server_card_url_kind, mcp_server_config, mcp_server_config_defer_tools, mcp_server_config_http, mcp_server_config_http_oauth_grant_type, mcp_server_config_http_type, mcp_server_config_memory, mcp_server_config_memory_type, mcp_server_config_stdio, mcp_server_config_stdio_type, mcp_server_failure_info, mcp_server_list, mcp_server_needs_auth_info, mcp_set_env_value_mode_details, mcp_set_env_value_mode_params, mcp_set_env_value_mode_result, mcp_start_server_request, mcp_start_servers_result, mcp_stop_server_request, mcp_task_metadata, mcp_tools, mcp_tool_ui, mcp_tool_ui_visibility, mcp_unregister_external_client_request, memory_configuration, metadata_context_attribution_result, metadata_context_heaviest_messages_request, metadata_context_heaviest_messages_result, metadata_context_info_request, metadata_context_info_result, metadata_is_processing_result, metadata_recompute_context_tokens_request, metadata_recompute_context_tokens_result, metadata_record_context_change_request, metadata_record_context_change_result, metadata_set_working_directory_request, metadata_set_working_directory_result, metadata_snapshot_current_mode, metadata_snapshot_remote_metadata, metadata_snapshot_remote_metadata_repository, metadata_snapshot_remote_metadata_task_type, model, model_apply_startup_overlay_request, model_billing, model_billing_promo, model_billing_token_prices, model_billing_token_prices_long_context, model_capabilities, model_capabilities_limits, model_capabilities_limits_vision, model_capabilities_override, model_capabilities_override_limits, model_capabilities_override_limits_vision, model_capabilities_override_supports, model_capabilities_supports, model_list, model_list_request, model_message, model_picker_category, model_picker_persistence_request, model_picker_price_category, model_picker_settings_context, model_policy, model_policy_state, model_set_allowed_models_request, model_set_allowed_models_result, model_set_reasoning_effort_request, model_set_reasoning_effort_result, models_list_request, model_switch_auto_tier_request, model_switch_auto_tier_result, model_switch_auto_tier_status, model_switch_confirmation, model_switch_to_request, model_switch_to_result, model_warning_text, mode_set_request, mode_set_result, move_mcp_loading_to_background_result, named_provider_config, name_get_result, name_set_auto_request, name_set_auto_result, name_set_request, open_canvas_instance, options_update_additional_content_exclusion_policy, options_update_additional_content_exclusion_policy_rule, options_update_additional_content_exclusion_policy_rule_source, options_update_additional_content_exclusion_policy_scope, options_update_context_tier, options_update_env_value_mode, options_update_reasoning_summary, options_update_tool_filter_precedence, pending_permission_request, pending_permission_request_list, permission_decision, permission_decision_approved, permission_decision_approved_for_location, permission_decision_approved_for_session, permission_decision_approve_for_location, permission_decision_approve_for_location_approval, permission_decision_approve_for_location_approval_commands, permission_decision_approve_for_location_approval_custom_tool, permission_decision_approve_for_location_approval_extension_env_access, permission_decision_approve_for_location_approval_extension_management, permission_decision_approve_for_location_approval_extension_permission_access, permission_decision_approve_for_location_approval_factory, permission_decision_approve_for_location_approval_mcp, permission_decision_approve_for_location_approval_mcp_sampling, permission_decision_approve_for_location_approval_memory, permission_decision_approve_for_location_approval_read, permission_decision_approve_for_location_approval_write, permission_decision_approve_for_session, permission_decision_approve_for_session_approval, permission_decision_approve_for_session_approval_commands, permission_decision_approve_for_session_approval_custom_tool, permission_decision_approve_for_session_approval_extension_env_access, permission_decision_approve_for_session_approval_extension_management, permission_decision_approve_for_session_approval_extension_permission_access, permission_decision_approve_for_session_approval_factory, permission_decision_approve_for_session_approval_mcp, permission_decision_approve_for_session_approval_mcp_sampling, permission_decision_approve_for_session_approval_memory, permission_decision_approve_for_session_approval_read, permission_decision_approve_for_session_approval_write, permission_decision_approve_once, permission_decision_approve_permanently, permission_decision_cancelled, permission_decision_context, permission_decision_denied_by_content_exclusion_policy, permission_decision_denied_by_permission_request_hook, permission_decision_denied_by_rules, permission_decision_denied_interactively_by_user, permission_decision_denied_no_approval_rule_and_could_not_request_from_user, permission_decision_outcome, permission_decision_reject, permission_decision_request, permission_decision_source, permission_decision_surface, permission_decision_user_not_available, permission_location_add_tool_approval_params, permission_location_apply_params, permission_location_apply_result, permission_location_resolve_params, permission_location_resolve_result, permission_location_type, permission_mode_source, permission_paths_add_params, permission_paths_allowed_check_params, permission_paths_allowed_check_result, permission_paths_config, permission_paths_list, permission_paths_update_primary_params, permission_paths_workspace_check_params, permission_paths_workspace_check_result, permission_prompt_shown_notification, permission_request_result, permission_response_capability, permission_rules_set, permissions_configure_additional_content_exclusion_policy, permissions_configure_additional_content_exclusion_policy_rule, permissions_configure_additional_content_exclusion_policy_rule_source, permissions_configure_additional_content_exclusion_policy_scope, permissions_configure_params, permissions_configure_result, permissions_folder_trust_add_trusted_result, permissions_get_mode_request, permissions_get_mode_result, permissions_locations_add_tool_approval_details, permissions_locations_add_tool_approval_details_commands, permissions_locations_add_tool_approval_details_custom_tool, permissions_locations_add_tool_approval_details_extension_env_access, permissions_locations_add_tool_approval_details_extension_management, permissions_locations_add_tool_approval_details_extension_permission_access, permissions_locations_add_tool_approval_details_factory, permissions_locations_add_tool_approval_details_mcp, permissions_locations_add_tool_approval_details_mcp_sampling, permissions_locations_add_tool_approval_details_memory, permissions_locations_add_tool_approval_details_read, permissions_locations_add_tool_approval_details_write, permissions_locations_add_tool_approval_result, permissions_modify_rules_params, permissions_modify_rules_result, permissions_modify_rules_scope, permissions_notify_prompt_shown_result, permissions_paths_add_result, permissions_paths_list_request, permissions_paths_update_primary_result, permissions_pending_requests_request, permissions_reset_session_approvals_request, permissions_reset_session_approvals_result, permissions_set_approve_all_request, permissions_set_approve_all_result, permissions_set_approve_all_source, permissions_set_mode_request, permissions_set_mode_result, permissions_set_required_request, permissions_set_required_result, permissions_urls_set_unrestricted_mode_result, permission_urls_config, permission_urls_set_unrestricted_mode_params, ping_request, ping_result, plan_read_result, plan_read_sql_todos_result, plan_read_sql_todos_with_dependencies_result, plan_sql_todo_dependency, plan_sql_todos_row, plan_update_request, plugin, plugin_install_result, plugin_install_staging_mode, plugin_list, plugin_list_result, plugins_builtin_set_request, plugins_disable_request, plugins_enable_request, plugins_install_request, plugins_marketplaces_add_request, plugins_marketplaces_browse_request, plugins_marketplaces_refresh_request, plugins_marketplaces_remove_request, plugins_reload_request, plugins_uninstall_request, plugins_update_request, plugin_update_all_entry, plugin_update_all_result, plugin_update_result, protocol_external_tool_defer, protocol_external_tool_definition, provider_add_request, provider_add_result, provider_config, provider_config_azure, provider_config_transport, provider_config_type, provider_config_wire_api, provider_endpoint, provider_endpoint_transport, provider_endpoint_type, provider_endpoint_wire_api, provider_get_endpoint_request, provider_model_config, provider_session_token, provider_token_acquire_request, provider_token_acquire_result, push_attachment, push_attachment_blob, push_attachment_directory, push_attachment_file, push_attachment_file_line_range, push_attachment_git_hub_actions_job, push_attachment_git_hub_commit, push_attachment_git_hub_file, push_attachment_git_hub_file_diff, push_attachment_git_hub_file_diff_side, push_attachment_git_hub_reference, push_attachment_git_hub_reference_type, push_attachment_git_hub_release, push_attachment_git_hub_repository, push_attachment_git_hub_snippet, push_attachment_git_hub_tree_comparison, push_attachment_git_hub_tree_comparison_side, push_attachment_git_hub_url, push_attachment_selection, push_attachment_selection_details, push_attachment_selection_details_end, push_attachment_selection_details_start, push_git_hub_repo_ref, queue_begin_deferred_idle_drain_request, queue_begin_deferred_idle_drain_result, queue_consume_system_notifications_request, queued_command_handled, queued_command_not_handled, queued_command_result, queue_defer_session_idle_request, queue_duplicate_at_request, queue_duplicate_at_result, queue_enqueue_resume_pending_result, queue_finish_deferred_idle_drain_request, queue_finish_deferred_idle_drain_result, queue_has_pending_result, queue_insert_at_request, queue_insert_at_result, queue_insert_message, queue_move_item_request, queue_move_item_result, queue_pending_items, queue_pending_items_kind, queue_pending_items_result, queue_remove_at_request, queue_remove_at_result, queue_remove_most_recent_result, queue_send_now_request, queue_send_now_result, queue_set_drain_paused_request, queue_snapshot_result, queue_update_text_request, queue_update_text_result, register_event_interest_params, register_event_interest_result, register_extension_tools_params, register_extension_tools_result, release_event_interest_params, remote_control_config, remote_control_config_existing_mc_session, remote_control_status, remote_control_status_active, remote_control_status_connecting, remote_control_status_error, remote_control_status_off, remote_control_status_result, remote_control_stop_result, remote_control_transfer_result, remote_enable_request, remote_enable_result, remote_notify_steerable_changed_request, remote_notify_steerable_changed_result, remote_session_connection_result, remote_session_host_status, remote_session_metadata_repository, remote_session_metadata_task_type, remote_session_metadata_value, remote_session_mode, remote_session_repository, run_options, sandbox_config, sandbox_config_auth, sandbox_config_source, sandbox_config_user_policy, sandbox_config_user_policy_experimental, sandbox_config_user_policy_experimental_seatbelt, sandbox_config_user_policy_filesystem, sandbox_config_user_policy_network, sandbox_config_user_policy_network_proxy, sandbox_config_user_policy_seatbelt, sandbox_disable_for_session_request, sandbox_disable_for_session_result, sandbox_enforcement_status, schedule_add_at_request, schedule_add_cron_request, schedule_add_request, schedule_add_result, schedule_add_self_paced_request, schedule_entry, schedule_has_self_paced_result, schedule_list, schedule_rearm_self_paced_request, schedule_stop_request, schedule_stop_result, secrets_add_filter_values_request, secrets_add_filter_values_result, send_agent_mode, send_attachments_to_message_params, send_message_item, send_messages_request, send_messages_result, send_mode, send_request, send_result, send_system_notification_request, server_agent_list, server_instruction_source_list, server_skill, server_skill_list, session_activity, session_agent_list_request, session_auth_login_request, session_auth_logout_user_request, session_auth_status, session_auth_switch_request, session_bulk_delete_result, session_cancel_all_background_agents_result, session_capability, session_commands_list_request, session_completion_item, session_context, session_context_host_type, session_enrich_metadata_result, session_factory_pause_at_checkpoint_result, session_fs_append_file_request, session_fs_error, session_fs_error_code, session_fs_exists_request, session_fs_exists_result, session_fs_mkdir_request, session_fs_readdir_request, session_fs_readdir_result, session_fs_readdir_with_types_entry, session_fs_readdir_with_types_entry_type, session_fs_readdir_with_types_request, session_fs_readdir_with_types_result, session_fs_read_file_request, session_fs_read_file_result, session_fs_rename_request, session_fs_rm_request, session_fs_set_provider_capabilities, session_fs_set_provider_conventions, session_fs_set_provider_request, session_fs_set_provider_result, session_fs_sqlite_exists_request, session_fs_sqlite_exists_result, session_fs_sqlite_query_request, session_fs_sqlite_query_result, session_fs_sqlite_query_type, session_fs_sqlite_transaction_error, session_fs_sqlite_transaction_error_class, session_fs_sqlite_transaction_request, session_fs_sqlite_transaction_result, session_fs_sqlite_transaction_statement, session_fs_stat_request, session_fs_stat_result, session_fs_write_file_request, session_git_hub_auth_get_all_auth_available_result, session_git_hub_auth_logout_result, session_git_hub_auth_logout_user_result, session_history_compact_request, session_installed_plugin, session_installed_plugin_source, session_installed_plugin_source_git_hub, session_installed_plugin_source_local, session_installed_plugin_source_url, session_limit_prediction_baseline_data, session_limit_prediction_client_type, session_limit_prediction_details, session_limit_prediction_predict_request, session_limit_prediction_request, session_limit_prediction_result, session_limit_prediction_source, session_limit_prediction_tier, session_limit_prediction_tier_option, session_limit_prediction_unavailable_reason, session_list, session_list_entry, session_list_filter, session_load_deferred_repo_hooks_result, session_log_level, session_managed_permissions, session_managed_settings, session_mcp_apps_call_tool_result, session_metadata_snapshot, session_mode, session_model_list, session_model_list_request, session_model_price_category, session_open_options, session_open_options_additional_content_exclusion_policy, session_open_options_additional_content_exclusion_policy_rule, session_open_options_additional_content_exclusion_policy_rule_source, session_open_options_additional_content_exclusion_policy_scope, session_open_options_env_value_mode, session_open_options_reasoning_summary, session_open_params, session_open_result, session_plugins_reload_request, session_provider_get_endpoint_request, session_prune_result, sessions_bulk_delete_request, sessions_check_in_use_request, sessions_check_in_use_result, sessions_close_request, sessions_close_result, sessions_delete_request, sessions_enrich_metadata_request, session_set_credentials_params, session_set_credentials_result, session_settings_built_in_tool_availability_snapshot, session_settings_evaluate_predicate_request, session_settings_evaluate_predicate_result, session_settings_job_snapshot, session_settings_model_snapshot, session_settings_online_evaluation_snapshot, session_settings_predicate_name, session_settings_repo_snapshot, session_settings_snapshot, session_settings_validation_snapshot, sessions_find_by_prefix_request, sessions_find_by_prefix_result, sessions_find_by_task_id_request, sessions_find_by_task_id_result, sessions_fork_request, sessions_fork_result, sessions_get_board_entry_count_request, sessions_get_board_entry_count_result, sessions_get_event_file_path_request, sessions_get_event_file_path_result, sessions_get_last_for_context_request, sessions_get_last_for_context_result, sessions_get_metadata_request, sessions_get_metadata_result, sessions_get_persisted_remote_steerable_request, sessions_get_persisted_remote_steerable_result, session_sizes, sessions_list_non_empty_session_ids_request, sessions_list_non_empty_session_ids_result, sessions_list_request, sessions_load_deferred_repo_hooks_request, sessions_open_attach, sessions_open_cloud, sessions_open_create, sessions_open_handoff, sessions_open_handoff_task_type, sessions_open_progress, sessions_open_progress_status, sessions_open_progress_step, sessions_open_remote, sessions_open_resume, sessions_open_resume_last, sessions_open_status, session_source, sessions_prune_old_request, sessions_read_persisted_events_request, sessions_register_extension_tools_on_session_options, sessions_release_lock_request, sessions_release_lock_result, sessions_reload_plugin_hooks_request, sessions_reload_plugin_hooks_result, sessions_save_request, sessions_save_result, sessions_set_additional_plugins_request, sessions_set_additional_plugins_result, sessions_set_remote_control_steering_request, sessions_start_remote_control_request, sessions_stop_remote_control_request, sessions_transfer_remote_control_request, session_telemetry_engagement, session_update_options_params, session_update_options_result, session_visibility_status, session_working_directory_context, session_working_directory_context_host_type, settable_auth_info, settable_token_auth_info, shell_cancel_user_requested_request, shell_credentials, shell_exec_request, shell_exec_result, shell_execute_user_requested_request, shell_init_profile, shell_init_script, shell_init_script_shell, shell_kill_request, shell_kill_result, shell_kill_signal, shell_options, shutdown_request, skill, skill_discovery_path, skill_discovery_path_list, skill_discovery_scope, skill_list, skill_provider_descriptor, skill_provider_list_request, skill_provider_list_result, skill_provider_read_request, skill_provider_read_result, skills_config_set_disabled_skills_request, skills_config_set_skill_disabled_request, skills_disable_request, skills_discover_request, skills_enable_request, skills_get_discovery_paths_request, skills_get_invoked_result, skills_invoked_skill, skills_load_diagnostics, slash_command_add_timeline_entry_result, slash_command_agent_prompt_result, slash_command_completed_result, slash_command_info, slash_command_input, slash_command_input_choice, slash_command_input_completion, slash_command_invocation_result, slash_command_kind, slash_command_model_picker_dialog, slash_command_select_subcommand_option, slash_command_select_subcommand_result, slash_command_set_model_result, slash_command_set_plan_model_result, slash_command_show_dialog_result, slash_command_text_result, slash_command_timeline_entry, subagent_settings_entry, subagent_settings_entry_context_tier, task_agent_info, task_agent_progress, task_client_active_status, task_client_execution_mode, task_client_info, task_client_owner, task_client_owner_kind, task_client_owner_presence, task_client_progress, task_client_status, task_client_type, task_client_update, task_complete_data, task_completion_decision, task_execution_mode, task_info, task_kind, 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_register_request, tasks_register_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_update_request, tasks_update_result, tasks_wait_for_pending_result, telemetry_set_feature_overrides_request, token_auth_info, token_provider_auth_info, tool, tool_list, tool_result, tool_result_expanded, tool_result_new_message, tool_result_type, tools_execute_request, tools_get_builtin_descriptors_request, tools_get_builtin_descriptors_result, tools_get_current_metadata_result, tools_initialize_and_validate_result, tools_list_request, tools_set_request, tools_set_result, tools_shell_descriptor_config, tools_task_complete_event_data_request, tools_update_subagent_settings_result, ui_auto_mode_switch_response, ui_elicitation_array_any_of_field, ui_elicitation_array_any_of_field_items, ui_elicitation_array_any_of_field_items_any_of, ui_elicitation_array_enum_field, ui_elicitation_array_enum_field_items, ui_elicitation_field_value, ui_elicitation_request, ui_elicitation_response, ui_elicitation_response_action, ui_elicitation_response_content, ui_elicitation_result, ui_elicitation_schema, ui_elicitation_schema_property, ui_elicitation_schema_property_boolean, ui_elicitation_schema_property_number, ui_elicitation_schema_property_number_type, ui_elicitation_schema_property_string, ui_elicitation_schema_property_string_format, ui_elicitation_string_enum_field, ui_elicitation_string_one_of_field, ui_elicitation_string_one_of_field_one_of, ui_ephemeral_query_request, ui_ephemeral_query_result, ui_exit_plan_mode_action, ui_exit_plan_mode_response, ui_handle_pending_auto_mode_switch_request, ui_handle_pending_elicitation_request, ui_handle_pending_exit_plan_mode_request, ui_handle_pending_result, ui_handle_pending_sampling_request, ui_handle_pending_sampling_response, ui_handle_pending_session_limits_exhausted_request, ui_handle_pending_user_input_request, ui_register_direct_auto_mode_switch_handler_result, ui_session_limits_exhausted_response, ui_session_limits_exhausted_response_action, ui_unregister_direct_auto_mode_switch_handler_request, ui_unregister_direct_auto_mode_switch_handler_result, ui_user_input_response, update_subagent_settings_request, usage_get_metrics_result, usage_metrics_agent_metric, usage_metrics_code_changes, usage_metrics_model_metric, usage_metrics_model_metric_requests, usage_metrics_model_metric_token_detail, usage_metrics_model_metric_usage, usage_metrics_token_detail, user_auth_info, user_requested_shell_command_result, user_setting_metadata, user_settings_get_result, user_settings_set_request, user_settings_set_result, visibility_get_result, visibility_set_request, visibility_set_result, workspace_diff_file_change, workspace_diff_file_change_type, workspace_diff_mode, workspace_diff_result, workspaces_add_summary_request, workspaces_add_summary_result, workspaces_autopilot_objective_exists_result, workspaces_checkpoints, workspaces_create_file_request, workspaces_delete_autopilot_objective_result, workspaces_diff_request, workspaces_ensure_request, workspaces_get_workspace_result, workspaces_list_checkpoints_result, workspaces_list_files_result, workspaces_read_autopilot_objective_result, workspaces_read_checkpoint_request, workspaces_read_checkpoint_result, workspaces_read_file_request, workspaces_read_file_result, workspaces_save_large_paste_request, workspaces_save_large_paste_result, workspaces_truncate_summaries_request, workspace_summary_host_type, workspaces_update_metadata_request, workspaces_workspace_details_host_type, workspaces_write_autopilot_objective_request, workspaces_write_autopilot_objective_result, session_auth_info_result, session_context_attribution, session_context_info, subagent_settings, task_progress, workspace_summary) def to_dict(self) -> dict: result: dict = {} @@ -39176,6 +39521,11 @@ def to_dict(self) -> dict: result["FactoryLogLine"] = to_class(FactoryLogLine, self.factory_log_line) result["FactoryLogLineKind"] = to_enum(FactoryLogLineKind, self.factory_log_line_kind) result["FactoryLogRequest"] = to_class(FactoryLogRequest, self.factory_log_request) + result["FactoryPauseCheckpointAction"] = to_enum(FactoryPauseCheckpointAction, self.factory_pause_checkpoint_action) + result["FactoryPauseCheckpointRequest"] = to_class(FactoryPauseCheckpointRequest, self.factory_pause_checkpoint_request) + result["FactoryPauseCheckpointResult"] = to_class(FactoryPauseCheckpointResult, self.factory_pause_checkpoint_result) + result["FactoryPauseInfo"] = to_class(FactoryPauseInfo, self.factory_pause_info) + result["FactoryPauseRequest"] = to_class(FactoryPauseRequest, self.factory_pause_request) result["FactoryPhaseObservation"] = to_class(FactoryPhaseObservation, self.factory_phase_observation) result["FactoryPhaseStatus"] = to_enum(FactoryPhaseStatus, self.factory_phase_status) result["FactoryProgressLine"] = to_class(FactoryProgressLine, self.factory_progress_line) @@ -39474,6 +39824,8 @@ def to_dict(self) -> dict: result["ModelPickerSettingsContext"] = to_class(ModelPickerSettingsContext, self.model_picker_settings_context) result["ModelPolicy"] = to_class(ModelPolicy, self.model_policy) result["ModelPolicyState"] = to_enum(ModelPolicyState, self.model_policy_state) + result["ModelSetAllowedModelsRequest"] = to_class(ModelSetAllowedModelsRequest, self.model_set_allowed_models_request) + result["ModelSetAllowedModelsResult"] = to_class(ModelSetAllowedModelsResult, self.model_set_allowed_models_result) result["ModelSetReasoningEffortRequest"] = to_class(ModelSetReasoningEffortRequest, self.model_set_reasoning_effort_request) result["ModelSetReasoningEffortResult"] = to_class(ModelSetReasoningEffortResult, self.model_set_reasoning_effort_result) result["ModelsListRequest"] = to_class(ModelsListRequest, self.models_list_request) @@ -39744,6 +40096,8 @@ def to_dict(self) -> dict: result["SandboxConfigUserPolicyNetwork"] = to_class(SandboxConfigUserPolicyNetwork, self.sandbox_config_user_policy_network) result["SandboxConfigUserPolicyNetworkProxy"] = to_class(SandboxConfigUserPolicyNetworkProxy, self.sandbox_config_user_policy_network_proxy) result["SandboxConfigUserPolicySeatbelt"] = to_class(SandboxConfigUserPolicySeatbelt, self.sandbox_config_user_policy_seatbelt) + result["SandboxDisableForSessionRequest"] = to_class(SandboxDisableForSessionRequest, self.sandbox_disable_for_session_request) + result["SandboxDisableForSessionResult"] = to_class(SandboxDisableForSessionResult, self.sandbox_disable_for_session_result) result["SandboxEnforcementStatus"] = to_class(SandboxEnforcementStatus, self.sandbox_enforcement_status) result["ScheduleAddAtRequest"] = to_class(ScheduleAddAtRequest, self.schedule_add_at_request) result["ScheduleAddCronRequest"] = to_class(ScheduleAddCronRequest, self.schedule_add_cron_request) @@ -39785,6 +40139,7 @@ def to_dict(self) -> dict: result["SessionContext"] = to_class(SessionContext, self.session_context) result["SessionContextHostType"] = to_enum(HostType, self.session_context_host_type) result["SessionEnrichMetadataResult"] = to_class(SessionEnrichMetadataResult, self.session_enrich_metadata_result) + result["SessionFactoryPauseAtCheckpointResult"] = to_class(SessionFactoryPauseAtCheckpointResult, self.session_factory_pause_at_checkpoint_result) result["SessionFsAppendFileRequest"] = to_class(SessionFSAppendFileRequest, self.session_fs_append_file_request) result["SessionFsError"] = to_class(SessionFSError, self.session_fs_error) result["SessionFsErrorCode"] = to_enum(SessionFSErrorCode, self.session_fs_error_code) @@ -40842,12 +41197,12 @@ async def update_all(self, *, timeout: float | None = None) -> PluginUpdateAllRe return PluginUpdateAllResult.from_dict(await self._client.request("plugins.updateAll", {}, **_timeout_kwargs(timeout))) async def enable(self, params: PluginsEnableRequest, *, timeout: float | None = None) -> None: - "Enables installed plugins for new sessions.\n\nArgs:\n params: Plugin names (or specs) to enable." + "Enables installed plugins for new sessions.\n\nArgs:\n params: Plugin names (or specs) to enable, plus the optional working directory the repository-controlled guard is evaluated against." params_dict = {k: v for k, v in params.to_dict().items() if v is not None} await self._client.request("plugins.enable", params_dict, **_timeout_kwargs(timeout)) async def disable(self, params: PluginsDisableRequest, *, timeout: float | None = None) -> None: - "Disables installed plugins for new sessions.\n\nArgs:\n params: Plugin names (or specs) to disable." + "Disables installed plugins for new sessions.\n\nArgs:\n params: Plugin names (or specs) to disable, plus the optional working directory the repository-controlled guard is evaluated against." params_dict = {k: v for k, v in params.to_dict().items() if v is not None} await self._client.request("plugins.disable", params_dict, **_timeout_kwargs(timeout)) @@ -41246,6 +41601,12 @@ async def get_enforcement_status(self, *, timeout: float | None = None) -> Sandb "Returns whether managed policy requires sandbox enforcement and whether an enforcement failure has permanently blocked the session.\n\nReturns:\n Managed sandbox enforcement state for a session." return SandboxEnforcementStatus.from_dict(await self._client.request("session.sandbox.getEnforcementStatus", {"sessionId": self._session_id}, **_timeout_kwargs(timeout))) + async def disable_for_session(self, params: SandboxDisableForSessionRequest, *, timeout: float | None = None) -> SandboxDisableForSessionResult: + "Disables sandboxing for the remainder of the current session and approves the referenced pending sandbox-bypass permission request. The request is rejected unless the exact request is still pending and the effective sandbox policy permits bypass.\n\nArgs:\n params: Request to disable sandboxing for the current session while resolving an active sandbox-bypass permission prompt.\n\nReturns:\n Result of attempting to disable sandboxing for the current session." + 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 SandboxDisableForSessionResult.from_dict(await self._client.request("session.sandbox.disableForSession", params_dict, **_timeout_kwargs(timeout))) + # Experimental: this API group is experimental and may change or be removed. class GitHubAuthApi: @@ -41386,6 +41747,12 @@ async def cancel(self, params: FactoryCancelRequest, *, timeout: float | None = params_dict["sessionId"] = self._session_id return FactoryRunResult.from_dict(await self._client.request("session.factory.cancel", params_dict, **_timeout_kwargs(timeout))) + async def pause(self, params: FactoryPauseRequest, *, timeout: float | None = None) -> FactoryRunResult: + "Pauses a running factory and returns its settled run envelope.\n\nArgs:\n params: Parameters for pausing a running factory.\n\nReturns:\n Complete current or terminal factory run envelope." + 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 FactoryRunResult.from_dict(await self._client.request("session.factory.pause", params_dict, **_timeout_kwargs(timeout))) + async def log(self, params: FactoryLogRequest, *, timeout: float | None = None) -> FactoryACKResult: "Records a batch of ordered factory progress lines.\n\nArgs:\n params: Parameters for recording factory progress.\n\nReturns:\n Acknowledgement that a factory request was accepted." params_dict: dict[str, Any] = {k: v for k, v in params.to_dict().items() if v is not None} @@ -41421,6 +41788,12 @@ async def switch_auto_tier(self, params: ModelSwitchAutoTierRequest, *, timeout: params_dict["sessionId"] = self._session_id return ModelSwitchAutoTierResult.from_dict(await self._client.request("session.model.switchAutoTier", params_dict, **_timeout_kwargs(timeout))) + async def set_allowed_models(self, params: ModelSetAllowedModelsRequest, *, timeout: float | None = None) -> ModelSetAllowedModelsResult: + "Replaces or clears the host-supplied model allowlist for a running session.\n\nArgs:\n params: Host-supplied exact model selection IDs to allow for this running session. CAPI IDs are intersected with repository `.github/allowed_models.txt` policy; provider-qualified IDs remain exempt from repository-only policy but are restricted by this host list. Omit or pass null to clear the host restriction; an explicit empty or disjoint list is rejected. Validation and pre-selection fallback failures preserve the previous restriction. Failures after a fallback selection commits retain the new restriction and selected model; callers should inspect current session state after such an error.\n\nReturns:\n The applied host allowlist and effective session model policy after intersection." + 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 ModelSetAllowedModelsResult.from_dict(await self._client.request("session.model.setAllowedModels", params_dict, **_timeout_kwargs(timeout))) + async def set_reasoning_effort(self, params: ModelSetReasoningEffortRequest, *, timeout: float | None = None) -> ModelSetReasoningEffortResult: "Updates the session's reasoning effort without changing the selected model.\n\nArgs:\n params: Reasoning effort level to apply to the currently selected model.\n\nReturns:\n Update the session's reasoning effort without changing the selected model. Use `switchTo` instead when you also need to change the model. The runtime stores the effort on the session and applies it to subsequent turns." params_dict: dict[str, Any] = {k: v for k, v in params.to_dict().items() if v is not None} @@ -42929,6 +43302,12 @@ async def _resume_from_tool(self, params: _FactoryToolResumeRequest, *, timeout: params_dict["sessionId"] = self._session_id return FactoryResumeResult.from_dict(await self._client.request("session.factory.resumeFromTool", params_dict, **_timeout_kwargs(timeout))) + async def _pause_at_checkpoint(self, params: FactoryPauseCheckpointRequest, *, timeout: float | None = None) -> SessionFactoryPauseAtCheckpointResult: + "Atomically pauses an owned factory attempt at a durable checkpoint.\n\nArgs:\n params: Parameters for an owned durable pause checkpoint.\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 SessionFactoryPauseAtCheckpointResult.from_dict(await self._client.request("session.factory.pauseAtCheckpoint", params_dict, **_timeout_kwargs(timeout))) + # Experimental: this API group is experimental and may change or be removed. class _InternalModelApi: @@ -43746,6 +44125,11 @@ async def handle_git_hub_token_get_token(params: dict) -> dict | None: "FactoryLogLine", "FactoryLogLineKind", "FactoryLogRequest", + "FactoryPauseCheckpointAction", + "FactoryPauseCheckpointRequest", + "FactoryPauseCheckpointResult", + "FactoryPauseInfo", + "FactoryPauseRequest", "FactoryPhaseObservation", "FactoryPhaseStatus", "FactoryProgressLine", @@ -44091,6 +44475,8 @@ async def handle_git_hub_token_get_token(params: dict) -> dict | None: "ModelPickerSettingsContext", "ModelPolicy", "ModelPolicyState", + "ModelSetAllowedModelsRequest", + "ModelSetAllowedModelsResult", "ModelSetReasoningEffortRequest", "ModelSetReasoningEffortResult", "ModelSwitchAutoTierRequest", @@ -44118,6 +44504,8 @@ async def handle_git_hub_token_get_token(params: dict) -> dict | None: "OptionsUpdateEnvValueMode", "OptionsUpdateReasoningSummary", "OptionsUpdateToolFilterPrecedence", + "PauseInfoClass", + "PauseInfoType", "PendingPermissionRequest", "PendingPermissionRequestList", "PermissionDecision", @@ -44421,6 +44809,8 @@ async def handle_git_hub_token_get_token(params: dict) -> dict | None: "SandboxConfigUserPolicyNetwork", "SandboxConfigUserPolicyNetworkProxy", "SandboxConfigUserPolicySeatbelt", + "SandboxDisableForSessionRequest", + "SandboxDisableForSessionResult", "SandboxEnforcementStatus", "Saved", "ScheduleAddAtRequest", @@ -44525,6 +44915,7 @@ async def handle_git_hub_token_get_token(params: dict) -> dict | None: "SessionFSStatRequest", "SessionFSStatResult", "SessionFSWriteFileRequest", + "SessionFactoryPauseAtCheckpointResult", "SessionFsHandler", "SessionFsReaddirWithTypesEntryType", "SessionGitHubAuthGetAllAuthAvailableResult", diff --git a/python/copilot/generated/session_events.py b/python/copilot/generated/session_events.py index 52f1053a1..a2cea870f 100644 --- a/python/copilot/generated/session_events.py +++ b/python/copilot/generated/session_events.py @@ -136,6 +136,8 @@ class SessionEventType(Enum): SESSION_INFO = "session.info" SESSION_WARNING = "session.warning" SESSION_MODEL_CHANGE = "session.model_change" + # Experimental: this event is part of an experimental API and may change or be removed. + SESSION_AUTO_TIER_RECOMMENDATION = "session.auto_tier_recommendation" SESSION_AUTO_TIER_SWITCH_FAILED = "session.auto_tier_switch_failed" SESSION_MODE_CHANGED = "session.mode_changed" SESSION_MODE_NOTICE_DELIVERED = "session.mode_notice_delivered" @@ -1571,6 +1573,26 @@ def to_dict(self) -> dict: return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SessionAutoTierRecommendationData: + "Live-only Auto preference recommendation from Copilot API after a successful Auto model call." + recommended_auto_tier: RecommendedAutoTier + + @staticmethod + def from_dict(obj: Any) -> "SessionAutoTierRecommendationData": + assert isinstance(obj, dict) + recommended_auto_tier = parse_enum(RecommendedAutoTier, obj.get("recommendedAutoTier")) + return SessionAutoTierRecommendationData( + recommended_auto_tier=recommended_auto_tier, + ) + + def to_dict(self) -> dict: + result: dict = {} + result["recommendedAutoTier"] = to_enum(RecommendedAutoTier, self.recommended_auto_tier) + return result + + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SessionCanvasClosedData: @@ -2208,30 +2230,32 @@ def to_dict(self) -> dict: class SessionPermissionsChangedData: "Permission-mode transition details." # Experimental: this field is part of an experimental API and may change or be removed. - mode: PermissionMode + assisted_approval_model: str | None = None # Experimental: this field is part of an experimental API and may change or be removed. - previous_mode: PermissionMode + mode: PermissionMode | None = None # Experimental: this field is part of an experimental API and may change or be removed. - assisted_approval_model: str | None = None + previous_mode: PermissionMode | None = None @staticmethod def from_dict(obj: Any) -> "SessionPermissionsChangedData": assert isinstance(obj, dict) - mode = parse_enum(PermissionMode, obj.get("mode")) - previous_mode = parse_enum(PermissionMode, obj.get("previousMode")) assisted_approval_model = from_union([from_none, from_str], obj.get("assistedApprovalModel")) + mode = from_union([from_none, lambda x: parse_enum(PermissionMode, x)], obj.get("mode")) + previous_mode = from_union([from_none, lambda x: parse_enum(PermissionMode, x)], obj.get("previousMode")) return SessionPermissionsChangedData( + assisted_approval_model=assisted_approval_model, mode=mode, previous_mode=previous_mode, - assisted_approval_model=assisted_approval_model, ) def to_dict(self) -> dict: result: dict = {} - result["mode"] = to_enum(PermissionMode, self.mode) - result["previousMode"] = to_enum(PermissionMode, self.previous_mode) if self.assisted_approval_model is not None: result["assistedApprovalModel"] = from_union([from_none, from_str], self.assisted_approval_model) + if self.mode is not None: + result["mode"] = from_union([from_none, lambda x: to_enum(PermissionMode, x)], self.mode) + if self.previous_mode is not None: + result["previousMode"] = from_union([from_none, lambda x: to_enum(PermissionMode, x)], self.previous_mode) return result @@ -2895,6 +2919,7 @@ def to_dict(self) -> dict: class AssistantUsageCopilotUsage: "Per-request cost and usage data from the CAPI copilot_usage response field" total_nano_aiu: float + model: str | None = None # Internal: this field is an internal SDK API and is not part of the public surface. _token_details: list[AssistantUsageCopilotUsageTokenDetail] | None = None @@ -2902,15 +2927,19 @@ class AssistantUsageCopilotUsage: def from_dict(obj: Any) -> "AssistantUsageCopilotUsage": assert isinstance(obj, dict) total_nano_aiu = from_float(obj.get("totalNanoAiu")) + model = from_union([from_none, from_str], obj.get("model")) _token_details = from_union([from_none, lambda x: from_list(AssistantUsageCopilotUsageTokenDetail.from_dict, x)], obj.get("tokenDetails")) return AssistantUsageCopilotUsage( total_nano_aiu=total_nano_aiu, + model=model, _token_details=_token_details, ) def to_dict(self) -> dict: result: dict = {} result["totalNanoAiu"] = to_float(self.total_nano_aiu) + if self.model is not None: + result["model"] = from_union([from_none, from_str], self.model) if self._token_details is not None: result["tokenDetails"] = from_union([from_none, lambda x: from_list(lambda x: to_class(AssistantUsageCopilotUsageTokenDetail, x), x)], self._token_details) return result @@ -2923,6 +2952,7 @@ class AssistantUsageCopilotUsageTokenDetail: cost_per_batch: int token_count: int token_type: str + model: str | None = None @staticmethod def from_dict(obj: Any) -> "AssistantUsageCopilotUsageTokenDetail": @@ -2931,11 +2961,13 @@ def from_dict(obj: Any) -> "AssistantUsageCopilotUsageTokenDetail": cost_per_batch = from_int(obj.get("costPerBatch")) token_count = from_int(obj.get("tokenCount")) token_type = from_str(obj.get("tokenType")) + model = from_union([from_none, from_str], obj.get("model")) return AssistantUsageCopilotUsageTokenDetail( batch_size=batch_size, cost_per_batch=cost_per_batch, token_count=token_count, token_type=token_type, + model=model, ) def to_dict(self) -> dict: @@ -2944,6 +2976,8 @@ def to_dict(self) -> dict: result["costPerBatch"] = to_int(self.cost_per_batch) result["tokenCount"] = to_int(self.token_count) result["tokenType"] = from_str(self.token_type) + if self.model is not None: + result["model"] = from_union([from_none, from_str], self.model) return result @@ -4206,21 +4240,27 @@ class _CompactionCompleteCompactionTokensUsedCopilotUsage: "Per-request cost and usage data from the CAPI copilot_usage response field" total_nano_aiu: float # Internal: this field is an internal SDK API and is not part of the public surface. + _model: str | None = None + # Internal: this field is an internal SDK API and is not part of the public surface. _token_details: list[CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail] | None = None @staticmethod def from_dict(obj: Any) -> "_CompactionCompleteCompactionTokensUsedCopilotUsage": assert isinstance(obj, dict) total_nano_aiu = from_float(obj.get("totalNanoAiu")) + _model = from_union([from_none, from_str], obj.get("model")) _token_details = from_union([from_none, lambda x: from_list(CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail.from_dict, x)], obj.get("tokenDetails")) return _CompactionCompleteCompactionTokensUsedCopilotUsage( total_nano_aiu=total_nano_aiu, + _model=_model, _token_details=_token_details, ) def to_dict(self) -> dict: result: dict = {} result["totalNanoAiu"] = to_float(self.total_nano_aiu) + if self._model is not None: + result["model"] = from_union([from_none, from_str], self._model) if self._token_details is not None: result["tokenDetails"] = from_union([from_none, lambda x: from_list(lambda x: to_class(CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail, x), x)], self._token_details) return result @@ -4233,6 +4273,7 @@ class CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail: cost_per_batch: int token_count: int token_type: str + model: str | None = None @staticmethod def from_dict(obj: Any) -> "CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail": @@ -4241,11 +4282,13 @@ def from_dict(obj: Any) -> "CompactionCompleteCompactionTokensUsedCopilotUsageTo cost_per_batch = from_int(obj.get("costPerBatch")) token_count = from_int(obj.get("tokenCount")) token_type = from_str(obj.get("tokenType")) + model = from_union([from_none, from_str], obj.get("model")) return CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail( batch_size=batch_size, cost_per_batch=cost_per_batch, token_count=token_count, token_type=token_type, + model=model, ) def to_dict(self) -> dict: @@ -4254,6 +4297,8 @@ def to_dict(self) -> dict: result["costPerBatch"] = to_int(self.cost_per_batch) result["tokenCount"] = to_int(self.token_count) result["tokenType"] = from_str(self.token_type) + if self.model is not None: + result["model"] = from_union([from_none, from_str], self.model) return result @@ -4323,6 +4368,7 @@ class CustomAgentsUpdatedAgent: source: str tools: list[str] | None user_invocable: bool + disable_model_invocation: bool | None = None model: str | None = None model_policy: AgentModelPolicy | None = None models: list[str] | None = None @@ -4337,6 +4383,7 @@ def from_dict(obj: Any) -> "CustomAgentsUpdatedAgent": source = from_str(obj.get("source")) tools = from_union([from_none, lambda x: from_list(from_str, x)], obj.get("tools")) user_invocable = from_bool(obj.get("userInvocable")) + disable_model_invocation = from_union([from_none, from_bool], obj.get("disableModelInvocation")) model = from_union([from_none, from_str], obj.get("model")) model_policy = from_union([from_none, lambda x: parse_enum(AgentModelPolicy, x)], obj.get("modelPolicy")) models = from_union([from_none, lambda x: from_list(from_str, x)], obj.get("models")) @@ -4348,6 +4395,7 @@ def from_dict(obj: Any) -> "CustomAgentsUpdatedAgent": source=source, tools=tools, user_invocable=user_invocable, + disable_model_invocation=disable_model_invocation, model=model, model_policy=model_policy, models=models, @@ -4362,6 +4410,8 @@ def to_dict(self) -> dict: result["source"] = from_str(self.source) result["tools"] = from_union([from_none, lambda x: from_list(from_str, x)], self.tools) result["userInvocable"] = from_bool(self.user_invocable) + if self.disable_model_invocation is not None: + result["disableModelInvocation"] = from_union([from_none, from_bool], self.disable_model_invocation) if self.model is not None: result["model"] = from_union([from_none, from_str], self.model) if self.model_policy is not None: @@ -5977,6 +6027,9 @@ class PermissionPromptRequestCommands: # Experimental: this field is part of an experimental API and may change or be removed. assisted_approval: PermissionAssistedApproval | None = None managed_approval_required: bool | None = None + request_sandbox_bypass: bool | None = None + request_sandbox_bypass_reason: str | None = None + request_sandbox_permissive: bool | None = None tool_call_id: str | None = None warning: str | None = None @@ -5989,6 +6042,9 @@ def from_dict(obj: Any) -> "PermissionPromptRequestCommands": intention = from_str(obj.get("intention")) assisted_approval = from_union([from_none, PermissionAssistedApproval.from_dict], obj.get("assistedApproval")) managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) + request_sandbox_bypass = from_union([from_none, from_bool], obj.get("requestSandboxBypass")) + request_sandbox_bypass_reason = from_union([from_none, from_str], obj.get("requestSandboxBypassReason")) + request_sandbox_permissive = from_union([from_none, from_bool], obj.get("requestSandboxPermissive")) tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) warning = from_union([from_none, from_str], obj.get("warning")) return PermissionPromptRequestCommands( @@ -5998,6 +6054,9 @@ def from_dict(obj: Any) -> "PermissionPromptRequestCommands": intention=intention, assisted_approval=assisted_approval, managed_approval_required=managed_approval_required, + request_sandbox_bypass=request_sandbox_bypass, + request_sandbox_bypass_reason=request_sandbox_bypass_reason, + request_sandbox_permissive=request_sandbox_permissive, tool_call_id=tool_call_id, warning=warning, ) @@ -6013,6 +6072,12 @@ def to_dict(self) -> dict: result["assistedApproval"] = from_union([from_none, lambda x: to_class(PermissionAssistedApproval, x)], self.assisted_approval) if self.managed_approval_required is not None: result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) + if self.request_sandbox_bypass is not None: + result["requestSandboxBypass"] = from_union([from_none, from_bool], self.request_sandbox_bypass) + if self.request_sandbox_bypass_reason is not None: + result["requestSandboxBypassReason"] = from_union([from_none, from_str], self.request_sandbox_bypass_reason) + if self.request_sandbox_permissive is not None: + result["requestSandboxPermissive"] = from_union([from_none, from_bool], self.request_sandbox_permissive) 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: @@ -7078,6 +7143,7 @@ class PermissionRequestShell: managed_approval_required: bool | None = None request_sandbox_bypass: bool | None = None request_sandbox_bypass_reason: str | None = None + request_sandbox_permissive: bool | None = None tool_call_id: str | None = None warning: str | None = None @@ -7095,6 +7161,7 @@ def from_dict(obj: Any) -> "PermissionRequestShell": managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) request_sandbox_bypass = from_union([from_none, from_bool], obj.get("requestSandboxBypass")) request_sandbox_bypass_reason = from_union([from_none, from_str], obj.get("requestSandboxBypassReason")) + request_sandbox_permissive = from_union([from_none, from_bool], obj.get("requestSandboxPermissive")) tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) warning = from_union([from_none, from_str], obj.get("warning")) return PermissionRequestShell( @@ -7109,6 +7176,7 @@ def from_dict(obj: Any) -> "PermissionRequestShell": managed_approval_required=managed_approval_required, request_sandbox_bypass=request_sandbox_bypass, request_sandbox_bypass_reason=request_sandbox_bypass_reason, + request_sandbox_permissive=request_sandbox_permissive, tool_call_id=tool_call_id, warning=warning, ) @@ -7131,6 +7199,8 @@ def to_dict(self) -> dict: result["requestSandboxBypass"] = from_union([from_none, from_bool], self.request_sandbox_bypass) if self.request_sandbox_bypass_reason is not None: result["requestSandboxBypassReason"] = from_union([from_none, from_str], self.request_sandbox_bypass_reason) + if self.request_sandbox_permissive is not None: + result["requestSandboxPermissive"] = from_union([from_none, from_bool], self.request_sandbox_permissive) 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: @@ -7731,6 +7801,8 @@ def to_dict(self) -> dict: class SessionCompactionCompleteData: "Conversation compaction results including success status, metrics, and optional error details" success: bool + # Internal: this field is an internal SDK API and is not part of the public surface. + _active_factory_summary: str | None = None behavior_model_id: str | None = None checkpoint_number: int | None = None checkpoint_path: str | None = None @@ -7756,6 +7828,7 @@ class SessionCompactionCompleteData: def from_dict(obj: Any) -> "SessionCompactionCompleteData": assert isinstance(obj, dict) success = from_bool(obj.get("success")) + _active_factory_summary = from_union([from_none, from_str], obj.get("activeFactorySummary")) behavior_model_id = from_union([from_none, from_str], obj.get("behaviorModelId")) checkpoint_number = from_union([from_none, from_int], obj.get("checkpointNumber")) checkpoint_path = from_union([from_none, from_str], obj.get("checkpointPath")) @@ -7778,6 +7851,7 @@ def from_dict(obj: Any) -> "SessionCompactionCompleteData": trigger = from_union([from_none, lambda x: parse_enum(CompactionTrigger, x)], obj.get("trigger")) return SessionCompactionCompleteData( success=success, + _active_factory_summary=_active_factory_summary, behavior_model_id=behavior_model_id, checkpoint_number=checkpoint_number, checkpoint_path=checkpoint_path, @@ -7803,6 +7877,8 @@ def from_dict(obj: Any) -> "SessionCompactionCompleteData": def to_dict(self) -> dict: result: dict = {} result["success"] = from_bool(self.success) + if self._active_factory_summary is not None: + result["activeFactorySummary"] = from_union([from_none, from_str], self._active_factory_summary) if self.behavior_model_id is not None: result["behaviorModelId"] = from_union([from_none, from_str], self.behavior_model_id) if self.checkpoint_number is not None: @@ -9880,6 +9956,7 @@ class SubagentStartedData: model: str | None = None parent_id: str | None = None resumable: bool | None = None + task_model_source: SubagentTaskModelSource | None = None @staticmethod def from_dict(obj: Any) -> "SubagentStartedData": @@ -9894,6 +9971,7 @@ def from_dict(obj: Any) -> "SubagentStartedData": model = from_union([from_none, from_str], obj.get("model")) parent_id = from_union([from_none, from_str], obj.get("parentId")) resumable = from_union([from_none, from_bool], obj.get("resumable")) + task_model_source = from_union([from_none, lambda x: parse_enum(SubagentTaskModelSource, x)], obj.get("taskModelSource")) return SubagentStartedData( agent_description=agent_description, agent_display_name=agent_display_name, @@ -9905,6 +9983,7 @@ def from_dict(obj: Any) -> "SubagentStartedData": model=model, parent_id=parent_id, resumable=resumable, + task_model_source=task_model_source, ) def to_dict(self) -> dict: @@ -9925,6 +10004,8 @@ def to_dict(self) -> dict: result["parentId"] = from_union([from_none, from_str], self.parent_id) if self.resumable is not None: result["resumable"] = from_union([from_none, from_bool], self.resumable) + if self.task_model_source is not None: + result["taskModelSource"] = from_union([from_none, lambda x: to_enum(SubagentTaskModelSource, x)], self.task_model_source) return result @@ -10105,6 +10186,7 @@ class SystemNotificationFactoryCompleted: status: SystemNotificationFactoryCompletedStatus type: ClassVar[str] = "factory_completed" failure: Any = None + pause_info: SystemNotificationFactoryPauseInfo | None = None result_preview: str | None = None retry_guidance: str | None = None @@ -10119,6 +10201,7 @@ def from_dict(obj: Any) -> "SystemNotificationFactoryCompleted": run_id = from_str(obj.get("runId")) status = parse_enum(SystemNotificationFactoryCompletedStatus, obj.get("status")) failure = obj.get("failure") + pause_info = from_union([from_none, SystemNotificationFactoryPauseInfo.from_dict], obj.get("pauseInfo")) result_preview = from_union([from_none, from_str], obj.get("resultPreview")) retry_guidance = from_union([from_none, from_str], obj.get("retryGuidance")) return SystemNotificationFactoryCompleted( @@ -10130,6 +10213,7 @@ def from_dict(obj: Any) -> "SystemNotificationFactoryCompleted": run_id=run_id, status=status, failure=failure, + pause_info=pause_info, result_preview=result_preview, retry_guidance=retry_guidance, ) @@ -10146,6 +10230,8 @@ def to_dict(self) -> dict: result["type"] = self.type if self.failure is not None: result["failure"] = self.failure + if self.pause_info is not None: + result["pauseInfo"] = from_union([from_none, lambda x: to_class(SystemNotificationFactoryPauseInfo, x)], self.pause_info) if self.result_preview is not None: result["resultPreview"] = from_union([from_none, from_str], self.result_preview) if self.retry_guidance is not None: @@ -10153,6 +10239,30 @@ def to_dict(self) -> dict: return result +@dataclass +class SystemNotificationFactoryPauseInfo: + "Durable metadata describing who initiated a factory pause." + type: SystemNotificationFactoryPauseInfoType + key: str | None = None + + @staticmethod + def from_dict(obj: Any) -> "SystemNotificationFactoryPauseInfo": + assert isinstance(obj, dict) + type = parse_enum(SystemNotificationFactoryPauseInfoType, obj.get("type")) + key = from_union([from_none, from_str], obj.get("key")) + return SystemNotificationFactoryPauseInfo( + type=type, + key=key, + ) + + def to_dict(self) -> dict: + result: dict = {} + result["type"] = to_enum(SystemNotificationFactoryPauseInfoType, self.type) + if self.key is not None: + result["key"] = from_union([from_none, from_str], self.key) + return result + + @dataclass class SystemNotificationInstructionDiscovered: "System notification metadata for an instruction file discovered during tool access, including source, trigger file, and tool." @@ -12142,13 +12252,15 @@ class AutoModeSwitchResponse(Enum): class AutoTier(Enum): - "Routing preference used when the session model is `auto`." + "Routing preference used when the session model is `auto`. `fast` is an integrator-only latency preset and is not a first-party GitHub Copilot product preference." # Optimize for efficiency. EFFICIENCY = "efficiency" # Balance efficiency and intelligence. BALANCE = "balance" # Optimize for intelligence. INTELLIGENCE = "intelligence" + # Integrator-only preset that optimizes for latency. + FAST = "fast" class AutoTierSwitchFailureReason(Enum): @@ -12315,6 +12427,8 @@ class FactoryRunSettledStatus(Enum): COMPLETED = "completed" # The run was stopped by a limit, an approval refusal or another policy decision. HALTED = "halted" + # The attempt paused intentionally while preserving resumable run state. + PAUSED = "paused" # The run was cancelled by its caller or by session disposal. CANCELLED = "cancelled" # The run failed, with `failureType` carrying the class when it has one. @@ -12599,6 +12713,16 @@ class ReasoningSummary(Enum): DETAILED = "detailed" +class RecommendedAutoTier(Enum): + "Auto preferences that Copilot API can recommend." + # Optimize for efficiency. + EFFICIENCY = "efficiency" + # Balance efficiency and intelligence. + BALANCE = "balance" + # Optimize for intelligence. + INTELLIGENCE = "intelligence" + + class RemediationAction(Enum): "What the user must do to recover from a failure, named as an action rather than as one client's affordance. The runtime cannot know which affordance a client offers — a slash command, a settings pane, a link — so the accompanying message stays host-agnostic and each client renders its own copy from this value. Absent when the runtime knows of no action the user can take." # Authenticate again with the Copilot backend. The current credential is absent, expired, or rejected. @@ -12681,6 +12805,18 @@ class SkillSource(Enum): SDK = "sdk" +class SubagentTaskModelSource(Enum): + "Where the model input for a task-tool sub-agent came from." + # The spawning agent supplied the task tool's model argument. + TASK_ARGUMENT = "task_argument" + # The task omitted a model and the per-sub-agent settings entry supplied a concrete one. + SUBAGENT_CONFIGURATION = "subagent_configuration" + # The task omitted a model and the user-defined custom agent's definition supplied one. + CUSTOM_AGENT_DEFINITION = "custom_agent_definition" + # Neither the task call, the per-sub-agent settings entry, nor a custom agent definition supplied a model. + UNSET = "unset" + + class SystemMessageRole(Enum): "Message role: \"system\" for system prompts, \"developer\" for developer-injected instructions" # System prompt message. @@ -12703,12 +12839,20 @@ class SystemNotificationFactoryCompletedStatus(Enum): COMPLETED = "completed" # The factory was halted. HALTED = "halted" + # The factory attempt paused intentionally. + PAUSED = "paused" # The factory was cancelled. CANCELLED = "cancelled" # The factory failed. ERROR = "error" +class SystemNotificationFactoryPauseInfoType(Enum): + "Durable metadata describing who initiated a factory pause. discriminator" + USER = "user" + CHECKPOINT = "checkpoint" + + class TaskCompletionOutcome(Enum): "Semantic result of evaluating a task completion request" # The completion request was accepted and the objective is complete. @@ -12791,7 +12935,7 @@ class WorkspaceFileChangedOperation(Enum): UPDATE = "update" -SessionEventData = SessionStartData | SessionResumeData | SessionRemoteSteerableChangedData | SessionErrorData | SessionIdleData | SessionTitleChangedData | SessionScheduleCreatedData | SessionScheduleCancelledData | SessionScheduleRearmedData | SessionAutopilotObjectiveChangedData | SessionInfoData | SessionWarningData | SessionModelChangeData | SessionAutoTierSwitchFailedData | SessionModeChangedData | SessionModeNoticeDeliveredData | SessionSessionLimitsChangedData | SessionPermissionsChangedData | SessionPlanChangedData | SessionTodosChangedData | SessionWorkspaceFileChangedData | SessionHandoffData | SessionTruncationData | SessionSnapshotRewindData | SessionShutdownData | SessionUsageCheckpointData | SessionContextChangedData | SessionUsageInfoData | SessionContextClearedData | SessionCompactionStartData | SessionCompactionCompleteData | SessionTaskCompleteData | SessionCompletionReceiptData | SessionFusionRouteStartedData | SessionFusionRouteFailedData | SessionFusionResolvedData | SessionFusionCompletedData | UserMessageData | PendingMessagesModifiedData | AssistantTurnStartData | AssistantTurnRetryData | AgentInterruptedData | AssistantIntentData | AssistantFusionPhaseStartedData | AssistantFusionPhaseActivityData | AssistantFusionPhaseCompletedData | AssistantFusionPhaseFailedData | AssistantServerToolProgressData | AssistantReasoningData | AssistantReasoningDeltaData | AssistantToolCallDeltaData | AssistantStreamingDeltaData | AssistantMessageData | AssistantMessageStartData | AssistantMessageDeltaData | AssistantTurnEndData | AssistantIdleData | AssistantUsageData | PromptCacheBreakData | ModelCallFailureData | ModelCallFinishedData | ModelCallStartData | AbortData | ToolUserRequestedData | ToolExecutionStartData | ToolExecutionPartialResultData | ToolExecutionProgressData | ToolExecutionCompleteData | ToolSearchActivatedData | SkillInvokedData | SandboxDecisionData | SubagentStartedData | SubagentConfiguredData | SubagentCompletedData | SubagentFailedData | SubagentSelectedData | SubagentDeselectedData | HookStartData | HookEndData | HookProgressData | SessionBinaryAssetData | SystemMessageData | SystemNotificationData | PermissionRequestedData | PermissionCompletedData | UserInputRequestedData | UserInputCompletedData | ElicitationRequestedData | ElicitationCompletedData | SamplingRequestedData | SamplingCompletedData | McpOauthRequiredData | McpOauthCompletedData | McpHeadersRefreshRequiredData | McpHeadersRefreshCompletedData | SessionCustomNotificationData | UiEphemeralQueryData | ExternalToolRequestedData | ExternalToolCompletedData | CommandQueuedData | CommandExecuteData | CommandCompletedData | AutoModeSwitchRequestedData | AutoModeSwitchCompletedData | SessionLimitsExhaustedRequestedData | SessionLimitsExhaustedCompletedData | SessionAutoModeResolvedData | SessionManagedSettingsResolvedData | SessionManagedSettingsEnforcedData | CommandsChangedData | CapabilitiesChangedData | ExitPlanModeRequestedData | ExitPlanModeCompletedData | SessionToolsUpdatedData | SessionBackgroundTasksChangedData | FactoryRunUpdatedData | FactoryRunStartedData | FactoryRunSettledData | SessionSkillsLoadedData | SessionCustomAgentsUpdatedData | SessionMcpServersLoadedData | SessionMcpServerStatusChangedData | SessionMcpServerRemovedData | SessionMcpServerNeedsReconnectData | McpToolsListChangedData | McpResourcesListChangedData | McpPromptsListChangedData | SessionExtensionsLoadedData | SessionCanvasOpenedData | SessionCanvasRegistryChangedData | SessionCanvasClosedData | SessionCanvasUnavailableData | SessionCanvasRecordedData | SessionCanvasRemovedData | SessionExtensionsAttachmentsPushedData | McpAppToolCallCompleteData | RawSessionEventData | Data +SessionEventData = SessionStartData | SessionResumeData | SessionRemoteSteerableChangedData | SessionErrorData | SessionIdleData | SessionTitleChangedData | SessionScheduleCreatedData | SessionScheduleCancelledData | SessionScheduleRearmedData | SessionAutopilotObjectiveChangedData | SessionInfoData | SessionWarningData | SessionModelChangeData | SessionAutoTierRecommendationData | SessionAutoTierSwitchFailedData | SessionModeChangedData | SessionModeNoticeDeliveredData | SessionSessionLimitsChangedData | SessionPermissionsChangedData | SessionPlanChangedData | SessionTodosChangedData | SessionWorkspaceFileChangedData | SessionHandoffData | SessionTruncationData | SessionSnapshotRewindData | SessionShutdownData | SessionUsageCheckpointData | SessionContextChangedData | SessionUsageInfoData | SessionContextClearedData | SessionCompactionStartData | SessionCompactionCompleteData | SessionTaskCompleteData | SessionCompletionReceiptData | SessionFusionRouteStartedData | SessionFusionRouteFailedData | SessionFusionResolvedData | SessionFusionCompletedData | UserMessageData | PendingMessagesModifiedData | AssistantTurnStartData | AssistantTurnRetryData | AgentInterruptedData | AssistantIntentData | AssistantFusionPhaseStartedData | AssistantFusionPhaseActivityData | AssistantFusionPhaseCompletedData | AssistantFusionPhaseFailedData | AssistantServerToolProgressData | AssistantReasoningData | AssistantReasoningDeltaData | AssistantToolCallDeltaData | AssistantStreamingDeltaData | AssistantMessageData | AssistantMessageStartData | AssistantMessageDeltaData | AssistantTurnEndData | AssistantIdleData | AssistantUsageData | PromptCacheBreakData | ModelCallFailureData | ModelCallFinishedData | ModelCallStartData | AbortData | ToolUserRequestedData | ToolExecutionStartData | ToolExecutionPartialResultData | ToolExecutionProgressData | ToolExecutionCompleteData | ToolSearchActivatedData | SkillInvokedData | SandboxDecisionData | SubagentStartedData | SubagentConfiguredData | SubagentCompletedData | SubagentFailedData | SubagentSelectedData | SubagentDeselectedData | HookStartData | HookEndData | HookProgressData | SessionBinaryAssetData | SystemMessageData | SystemNotificationData | PermissionRequestedData | PermissionCompletedData | UserInputRequestedData | UserInputCompletedData | ElicitationRequestedData | ElicitationCompletedData | SamplingRequestedData | SamplingCompletedData | McpOauthRequiredData | McpOauthCompletedData | McpHeadersRefreshRequiredData | McpHeadersRefreshCompletedData | SessionCustomNotificationData | UiEphemeralQueryData | ExternalToolRequestedData | ExternalToolCompletedData | CommandQueuedData | CommandExecuteData | CommandCompletedData | AutoModeSwitchRequestedData | AutoModeSwitchCompletedData | SessionLimitsExhaustedRequestedData | SessionLimitsExhaustedCompletedData | SessionAutoModeResolvedData | SessionManagedSettingsResolvedData | SessionManagedSettingsEnforcedData | CommandsChangedData | CapabilitiesChangedData | ExitPlanModeRequestedData | ExitPlanModeCompletedData | SessionToolsUpdatedData | SessionBackgroundTasksChangedData | FactoryRunUpdatedData | FactoryRunStartedData | FactoryRunSettledData | SessionSkillsLoadedData | SessionCustomAgentsUpdatedData | SessionMcpServersLoadedData | SessionMcpServerStatusChangedData | SessionMcpServerRemovedData | SessionMcpServerNeedsReconnectData | McpToolsListChangedData | McpResourcesListChangedData | McpPromptsListChangedData | SessionExtensionsLoadedData | SessionCanvasOpenedData | SessionCanvasRegistryChangedData | SessionCanvasClosedData | SessionCanvasUnavailableData | SessionCanvasRecordedData | SessionCanvasRemovedData | SessionExtensionsAttachmentsPushedData | McpAppToolCallCompleteData | RawSessionEventData | Data @dataclass @@ -12830,6 +12974,7 @@ def from_dict(obj: Any) -> "SessionEvent": case SessionEventType.SESSION_INFO: data = SessionInfoData.from_dict(data_obj) case SessionEventType.SESSION_WARNING: data = SessionWarningData.from_dict(data_obj) case SessionEventType.SESSION_MODEL_CHANGE: data = SessionModelChangeData.from_dict(data_obj) + case SessionEventType.SESSION_AUTO_TIER_RECOMMENDATION: data = SessionAutoTierRecommendationData.from_dict(data_obj) case SessionEventType.SESSION_AUTO_TIER_SWITCH_FAILED: data = SessionAutoTierSwitchFailedData.from_dict(data_obj) case SessionEventType.SESSION_MODE_CHANGED: data = SessionModeChangedData.from_dict(data_obj) case SessionEventType.SESSION_MODE_NOTICE_DELIVERED: data = SessionModeNoticeDeliveredData.from_dict(data_obj) @@ -13225,12 +13370,14 @@ def session_event_to_dict(x: SessionEvent) -> Any: "PromptCacheBreakData", "RawSessionEventData", "ReasoningSummary", + "RecommendedAutoTier", "RemediationAction", "SamplingCompletedData", "SamplingRequestedData", "SandboxDecisionData", "ScheduleOrigin", "SessionAutoModeResolvedData", + "SessionAutoTierRecommendationData", "SessionAutoTierSwitchFailedData", "SessionAutopilotObjectiveChangedData", "SessionBackgroundTasksChangedData", @@ -13315,6 +13462,7 @@ def session_event_to_dict(x: SessionEvent) -> Any: "SubagentFailedData", "SubagentSelectedData", "SubagentStartedData", + "SubagentTaskModelSource", "SystemMessageData", "SystemMessageMetadata", "SystemMessageRole", @@ -13325,6 +13473,8 @@ def session_event_to_dict(x: SessionEvent) -> Any: "SystemNotificationData", "SystemNotificationFactoryCompleted", "SystemNotificationFactoryCompletedStatus", + "SystemNotificationFactoryPauseInfo", + "SystemNotificationFactoryPauseInfoType", "SystemNotificationInstructionDiscovered", "SystemNotificationNewInboxMessage", "SystemNotificationShellCompleted", diff --git a/rust/src/generated/api_types.rs b/rust/src/generated/api_types.rs index 1bd83a50f..8a728f89d 100644 --- a/rust/src/generated/api_types.rs +++ b/rust/src/generated/api_types.rs @@ -211,6 +211,8 @@ pub mod rpc_methods { pub const SESSION_SENDMESSAGES: &str = "session.sendMessages"; /// `session.sandbox.getEnforcementStatus` pub const SESSION_SANDBOX_GETENFORCEMENTSTATUS: &str = "session.sandbox.getEnforcementStatus"; + /// `session.sandbox.disableForSession` + pub const SESSION_SANDBOX_DISABLEFORSESSION: &str = "session.sandbox.disableForSession"; /// `session.sendSystemNotification` pub const SESSION_SENDSYSTEMNOTIFICATION: &str = "session.sendSystemNotification"; /// `session.abort` @@ -276,6 +278,10 @@ pub mod rpc_methods { pub const SESSION_FACTORY_GETRUNPROGRESS: &str = "session.factory.getRunProgress"; /// `session.factory.cancel` pub const SESSION_FACTORY_CANCEL: &str = "session.factory.cancel"; + /// `session.factory.pause` + pub const SESSION_FACTORY_PAUSE: &str = "session.factory.pause"; + /// `session.factory.pauseAtCheckpoint` + pub const SESSION_FACTORY_PAUSEATCHECKPOINT: &str = "session.factory.pauseAtCheckpoint"; /// `session.factory.log` pub const SESSION_FACTORY_LOG: &str = "session.factory.log"; /// `session.factory.agent` @@ -292,6 +298,8 @@ pub mod rpc_methods { pub const SESSION_MODEL_SWITCHAUTOTIER: &str = "session.model.switchAutoTier"; /// `session.model.applyStartupOverlay` pub const SESSION_MODEL_APPLYSTARTUPOVERLAY: &str = "session.model.applyStartupOverlay"; + /// `session.model.setAllowedModels` + pub const SESSION_MODEL_SETALLOWEDMODELS: &str = "session.model.setAllowedModels"; /// `session.model.setReasoningEffort` pub const SESSION_MODEL_SETREASONINGEFFORT: &str = "session.model.setReasoningEffort"; /// `session.model.list` @@ -1574,6 +1582,9 @@ pub struct AgentDiscoveryPathList { pub struct AgentInfo { /// Description of the agent's purpose pub description: String, + /// Whether model-driven invocation is disabled for this agent. + #[serde(skip_serializing_if = "Option::is_none")] + pub disable_model_invocation: Option, /// Human-readable display name pub display_name: String, /// Stable identifier for selection. For most agents this is the same as `name`; for plugin/builtin agents it may differ. Always populated; defaults to `name` when no distinct id was assigned. @@ -3115,7 +3126,7 @@ pub struct CanvasProviderUnregisterRequest { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct CapiSessionOptions { - /// Routing preference for sessions whose model is `auto`. On create or cold resume, this establishes the preference sent as `tier` on CAPI `/auto` requests; when omitted on cold resume, the runtime restores the last committed preference. On resident resume, a different value requests a safe switch after resume succeeds and cannot change an in-flight turn. Successful switches are persisted for later cold resume. When no preference is supplied or restored, CAPI default routing is used. + /// Routing preference for sessions whose model is `auto`. On create or cold resume, this establishes the preference sent as `tier` on CAPI `/auto` requests; when omitted on cold resume, the runtime restores the last committed preference. On resident resume, a different value requests a safe switch after resume succeeds and cannot change an in-flight turn. Successful switches are persisted for later cold resume. When no preference is supplied or restored, CAPI default routing is used. `fast` is an integrator-only latency preset, not a first-party GitHub Copilot product preference. #[serde(skip_serializing_if = "Option::is_none")] pub auto_tier: Option, /// Whether to use WebSocket transport for the CAPI Responses API. Enabled by default when the model advertises `ws:/responses` support; set to `false` to force the HTTP Responses transport in environments where WebSockets are blocked (e.g. behind a proxy). Setting this to `false` is equivalent to the `COPILOT_CLI_DISABLE_WEBSOCKET_RESPONSES` environment variable. @@ -5141,6 +5152,8 @@ pub struct FactoryAbortRequest { pub session_id: SessionId, /// Factory run identifier. pub run_id: String, + /// Opaque token identifying the execution attempt to abort. + pub execution_token: String, } /// Acknowledgement that a factory request was accepted. @@ -5166,10 +5179,10 @@ pub struct FactoryAckResult {} #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct FactoryAgentOptions { - /// Optional custom agent name for the subagent. This field is accepted but not yet honored. + /// Optional built-in or custom agent name whose definition configures the subagent. #[serde(skip_serializing_if = "Option::is_none")] pub agent: Option, - /// Optional context tier for the subagent. This field is accepted but not yet honored. + /// Optional context tier override for the subagent. #[serde(skip_serializing_if = "Option::is_none")] pub context_tier: Option, /// Optional label distinguishing otherwise identical memoized agent calls. @@ -5178,7 +5191,7 @@ pub struct FactoryAgentOptions { /// Optional model identifier for the subagent. #[serde(skip_serializing_if = "Option::is_none")] pub model: Option, - /// Optional reasoning effort for the subagent. This field is accepted but not yet honored. + /// Optional reasoning effort override for the subagent. #[serde(skip_serializing_if = "Option::is_none")] pub reasoning_effort: Option, /// Optional JSON Schema for structured agent output. @@ -5524,6 +5537,8 @@ pub struct FactoryRunTerminal { /// Machine-readable terminal failure. #[serde(skip_serializing_if = "Option::is_none")] pub failure: Option, + /// Pause initiator metadata, or null when the run did not pause. + pub pause_info: Option, /// Human-readable terminal reason. #[serde(skip_serializing_if = "Option::is_none")] pub reason: Option, @@ -5547,6 +5562,8 @@ pub struct FactoryRunSummary { pub active_segment_started_at: Option, /// Approved effective resource ceilings, or null until approved. pub approved: Option, + /// Whether the durable run state currently passes runtime resume eligibility checks. + pub can_resume: bool, /// Epoch milliseconds when the run completed, or null while nonterminal. pub completed_at: Option, /// Durable resource consumption. @@ -5648,6 +5665,54 @@ pub struct FactoryLogRequest { pub run_id: String, } +/// Parameters for an owned durable pause checkpoint. +/// +///

+/// +/// **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 FactoryPauseCheckpointRequest { + /// Opaque token identifying the execution attempt that reached the checkpoint. + pub execution_token: String, + /// Stable author-defined checkpoint key. + pub key: String, + /// Factory run identifier. + pub run_id: String, +} + +/// +///
+/// +/// **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 FactoryPauseCheckpointResult { + /// Whether this execution attempt must pause or may continue. + pub action: FactoryPauseCheckpointAction, +} + +/// Parameters for pausing a running factory. +/// +///
+/// +/// **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 FactoryPauseRequest { + /// Factory run identifier. + pub run_id: String, +} + /// Durable lifecycle and timing for one factory phase. /// ///
@@ -5809,6 +5874,9 @@ pub struct FactoryRunResult { /// Machine-readable failure details for a halted or errored run. #[serde(skip_serializing_if = "Option::is_none")] pub failure: Option, + /// Structured pause initiator metadata for a paused attempt. + #[serde(skip_serializing_if = "Option::is_none")] + pub pause_info: Option, /// Reason for a halted or cancelled run. #[serde(skip_serializing_if = "Option::is_none")] pub reason: Option, @@ -5858,6 +5926,8 @@ pub struct FactoryRunDetail { pub agents: Vec, /// Approved effective resource ceilings, or null until approved. pub approved: Option, + /// Whether the durable run state currently passes runtime resume eligibility checks. + pub can_resume: bool, /// Epoch milliseconds when the run completed, or null while nonterminal. pub completed_at: Option, /// Durable resource consumption. @@ -10628,6 +10698,47 @@ pub struct ModelPickerPersistenceRequest { pub settings_context: ModelPickerSettingsContext, } +/// Host-supplied exact model selection IDs to allow for this running session. CAPI IDs are intersected with repository `.github/allowed_models.txt` policy; provider-qualified IDs remain exempt from repository-only policy but are restricted by this host list. Omit or pass null to clear the host restriction; an explicit empty or disjoint list is rejected. Validation and pre-selection fallback failures preserve the previous restriction. Failures after a fallback selection commits retain the new restriction and selected model; callers should inspect current session state after such an error. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct ModelSetAllowedModelsRequest { + /// Exact model IDs to permit, or null to clear the host restriction. + #[serde(skip_serializing_if = "Option::is_none")] + pub allowed_models: Option>, +} + +/// The applied host allowlist and effective session model policy after intersection. +/// +///
+/// +/// **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 ModelSetAllowedModelsResult { + /// Normalized host allowlist. Omitted when the host restriction was cleared, or when a relay client does not return the host policy. + #[serde(skip_serializing_if = "Option::is_none")] + pub allowed_models: Option>, + /// Effective exact IDs or repository policy patterns after applying the host restriction. Omitted by relay clients that do not return the host policy. + #[serde(skip_serializing_if = "Option::is_none")] + pub effective_allowed_models: Option>, + /// Effective deterministic fallback model, when the policy defines one. + #[serde(skip_serializing_if = "Option::is_none")] + pub fallback_model: Option, + /// Selected session model after reconciling a now-disallowed concrete selection. + #[serde(skip_serializing_if = "Option::is_none")] + pub model_id: Option, +} + /// Reasoning effort level to apply to the currently selected model. /// ///
@@ -12974,7 +13085,7 @@ pub struct PluginsBuiltinSetRequest { pub paths: Vec, } -/// Plugin names (or specs) to disable. +/// Plugin names (or specs) to disable, plus the optional working directory the repository-controlled guard is evaluated against. /// ///
/// @@ -12987,9 +13098,12 @@ pub struct PluginsBuiltinSetRequest { pub struct PluginsDisableRequest { /// Plugin names or "plugin@marketplace" specs to disable. Unknown names are ignored. Non-marketplace direct installs cannot be disabled via this API; uninstall them instead. Plugin-owned MCP servers are stopped in active sessions immediately; other plugin contributions remain available until each session reloads plugins. pub names: Vec, + /// Working directory whose repository `enabledPlugins` overlay decides whether this mutation is repository-controlled. Hosts that serve sessions across several repositories (the SDK server) should pass the session's directory; otherwise the guard is evaluated against the server process's own working directory, which may belong to a different repository. Defaults to the server's current working directory. + #[serde(skip_serializing_if = "Option::is_none")] + pub working_directory: Option, } -/// Plugin names (or specs) to enable. +/// Plugin names (or specs) to enable, plus the optional working directory the repository-controlled guard is evaluated against. /// ///
/// @@ -13002,6 +13116,9 @@ pub struct PluginsDisableRequest { pub struct PluginsEnableRequest { /// Plugin names or "plugin@marketplace" specs to enable. Unknown names are ignored. Non-marketplace direct installs are always enabled and cannot be toggled via this API. pub names: Vec, + /// Working directory whose repository `enabledPlugins` overlay decides whether this mutation is repository-controlled. Hosts that serve sessions across several repositories (the SDK server) should pass the session's directory; otherwise the guard is evaluated against the server process's own working directory, which may belong to a different repository. Defaults to the server's current working directory. + #[serde(skip_serializing_if = "Option::is_none")] + pub working_directory: Option, } /// Plugin source and optional working directory for relative-path resolution. @@ -15073,6 +15190,41 @@ pub struct SandboxConfig { pub user_policy: Option, } +/// Request to disable sandboxing for the current session while resolving an active sandbox-bypass permission prompt. +/// +///
+/// +/// **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 SandboxDisableForSessionRequest { + /// Optional attribution for the permission decision. + #[serde(skip_serializing_if = "Option::is_none")] + pub decision_context: Option, + /// Identifier of the exact pending sandbox-bypass permission request that authorized the session opt-out. + pub request_id: RequestId, +} + +/// Result of attempting to disable sandboxing for the current 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 SandboxDisableForSessionResult { + /// The authoritative sandbox enabled state after the operation. + pub enabled: bool, + /// Whether this call resolved the pending request and applied the session opt-out. + pub success: bool, +} + /// Managed sandbox enforcement state for a session. /// ///
@@ -22791,6 +22943,23 @@ pub struct SessionSandboxGetEnforcementStatusResult { pub required: bool, } +/// Result of attempting to disable sandboxing for the current 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 SessionSandboxDisableForSessionResult { + /// The authoritative sandbox enabled state after the operation. + pub enabled: bool, + /// Whether this call resolved the pending request and applied the session opt-out. + pub success: bool, +} + /// Result of aborting the current turn /// ///
@@ -23132,6 +23301,9 @@ pub struct SessionFactoryRunResult { /// Machine-readable failure details for a halted or errored run. #[serde(skip_serializing_if = "Option::is_none")] pub failure: Option, + /// Structured pause initiator metadata for a paused attempt. + #[serde(skip_serializing_if = "Option::is_none")] + pub pause_info: Option, /// Reason for a halted or cancelled run. #[serde(skip_serializing_if = "Option::is_none")] pub reason: Option, @@ -23184,6 +23356,9 @@ pub struct SessionFactoryRunFromToolResult { /// Machine-readable failure details for a halted or errored run. #[serde(skip_serializing_if = "Option::is_none")] pub failure: Option, + /// Structured pause initiator metadata for a paused attempt. + #[serde(skip_serializing_if = "Option::is_none")] + pub pause_info: Option, /// Reason for a halted or cancelled run. #[serde(skip_serializing_if = "Option::is_none")] pub reason: Option, @@ -23236,6 +23411,9 @@ pub struct SessionFactoryGetRunResult { /// Machine-readable failure details for a halted or errored run. #[serde(skip_serializing_if = "Option::is_none")] pub failure: Option, + /// Structured pause initiator metadata for a paused attempt. + #[serde(skip_serializing_if = "Option::is_none")] + pub pause_info: Option, /// Reason for a halted or cancelled run. #[serde(skip_serializing_if = "Option::is_none")] pub reason: Option, @@ -23295,6 +23473,8 @@ pub struct SessionFactoryGetRunDetailResult { pub agents: Vec, /// Approved effective resource ceilings, or null until approved. pub approved: Option, + /// Whether the durable run state currently passes runtime resume eligibility checks. + pub can_resume: bool, /// Epoch milliseconds when the run completed, or null while nonterminal. pub completed_at: Option, /// Durable resource consumption. @@ -23380,6 +23560,47 @@ pub struct SessionFactoryCancelResult { /// Machine-readable failure details for a halted or errored run. #[serde(skip_serializing_if = "Option::is_none")] pub failure: Option, + /// Structured pause initiator metadata for a paused attempt. + #[serde(skip_serializing_if = "Option::is_none")] + pub pause_info: Option, + /// Reason for a halted or cancelled run. + #[serde(skip_serializing_if = "Option::is_none")] + pub reason: Option, + /// Completed factory result. + #[serde(skip_serializing_if = "Option::is_none")] + pub result: Option, + /// Factory run identifier. + pub run_id: String, + /// Partial journal and progress snapshot for a halted, cancelled, or errored run. + #[serde(skip_serializing_if = "Option::is_none")] + pub snapshot: Option, + /// Current or terminal factory run status. + pub status: FactoryRunStatus, +} + +/// Complete current or terminal factory run envelope. +/// +///
+/// +/// **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 SessionFactoryPauseResult { + /// One-based execution attempt represented by this envelope. Absent before the first attempt starts or when returned by an older runtime. + #[serde(skip_serializing_if = "Option::is_none")] + pub attempt: Option, + /// Error message for an errored run. + #[serde(skip_serializing_if = "Option::is_none")] + pub error: Option, + /// Machine-readable failure details for a halted or errored run. + #[serde(skip_serializing_if = "Option::is_none")] + pub failure: Option, + /// Structured pause initiator metadata for a paused attempt. + #[serde(skip_serializing_if = "Option::is_none")] + pub pause_info: Option, /// Reason for a halted or cancelled run. #[serde(skip_serializing_if = "Option::is_none")] pub reason: Option, @@ -23395,6 +23616,20 @@ pub struct SessionFactoryCancelResult { pub status: FactoryRunStatus, } +/// +///
+/// +/// **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 SessionFactoryPauseAtCheckpointResult { + /// Whether this execution attempt must pause or may continue. + pub action: FactoryPauseCheckpointAction, +} + /// Acknowledgement that a factory request was accepted. /// ///
@@ -23606,6 +23841,31 @@ pub struct SessionModelApplyStartupOverlayResult { pub warning: Option, } +/// The applied host allowlist and effective session model policy after intersection. +/// +///
+/// +/// **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 SessionModelSetAllowedModelsResult { + /// Normalized host allowlist. Omitted when the host restriction was cleared, or when a relay client does not return the host policy. + #[serde(skip_serializing_if = "Option::is_none")] + pub allowed_models: Option>, + /// Effective exact IDs or repository policy patterns after applying the host restriction. Omitted by relay clients that do not return the host policy. + #[serde(skip_serializing_if = "Option::is_none")] + pub effective_allowed_models: Option>, + /// Effective deterministic fallback model, when the policy defines one. + #[serde(skip_serializing_if = "Option::is_none")] + pub fallback_model: Option, + /// Selected session model after reconciling a now-disallowed concrete selection. + #[serde(skip_serializing_if = "Option::is_none")] + pub model_id: Option, +} + /// Update the session's reasoning effort without changing the selected model. Use `switchTo` instead when you also need to change the model. The runtime stores the effort on the session and applies it to subsequent turns. /// ///
@@ -30292,6 +30552,9 @@ pub enum FactoryRunStatus { /// The run was interrupted while resource budget remained. #[serde(rename = "halted")] Halted, + /// The current attempt stopped intentionally and the run may be resumed. + #[serde(rename = "paused")] + Paused, /// The run was cancelled before completion. #[serde(rename = "cancelled")] Cancelled, @@ -30326,6 +30589,28 @@ pub enum FactoryLogLineKind { Unknown, } +/// Action the runtime selected for a durable factory pause checkpoint. +/// +///
+/// +/// **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 FactoryPauseCheckpointAction { + /// The checkpoint was committed by a prior paused attempt, so execution may continue. + #[serde(rename = "continue")] + Continue, + /// This attempt claimed the checkpoint and must cooperatively stop. + #[serde(rename = "pause")] + Pause, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + /// Derived lifecycle state of a factory phase. /// ///
diff --git a/rust/src/generated/rpc.rs b/rust/src/generated/rpc.rs index 50eee0f1f..4e19060fe 100644 --- a/rust/src/generated/rpc.rs +++ b/rust/src/generated/rpc.rs @@ -1415,7 +1415,7 @@ impl<'a> ClientRpcPlugins<'a> { /// /// # Parameters /// - /// * `params` - Plugin names (or specs) to enable. + /// * `params` - Plugin names (or specs) to enable, plus the optional working directory the repository-controlled guard is evaluated against. /// ///
/// @@ -1439,7 +1439,7 @@ impl<'a> ClientRpcPlugins<'a> { /// /// # Parameters /// - /// * `params` - Plugin names (or specs) to disable. + /// * `params` - Plugin names (or specs) to disable, plus the optional working directory the repository-controlled guard is evaluated against. /// ///
/// @@ -5113,6 +5113,68 @@ impl<'a> SessionRpcFactory<'a> { Ok(serde_json::from_value(_value)?) } + /// Pauses a running factory and returns its settled run envelope. + /// + /// Wire method: `session.factory.pause`. + /// + /// # Parameters + /// + /// * `params` - Parameters for pausing a running factory. + /// + /// # Returns + /// + /// Complete current or terminal factory run envelope. + /// + ///
+ /// + /// **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 pause(&self, params: FactoryPauseRequest) -> 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_FACTORY_PAUSE, Some(wire_params)) + .await?; + Ok(serde_json::from_value(_value)?) + } + + /// Atomically pauses an owned factory attempt at a durable checkpoint. + /// + /// Wire method: `session.factory.pauseAtCheckpoint`. + /// + /// # Parameters + /// + /// * `params` - Parameters for an owned durable pause checkpoint. + /// + ///
+ /// + /// **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 pause_at_checkpoint( + &self, + params: FactoryPauseCheckpointRequest, + ) -> 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_FACTORY_PAUSEATCHECKPOINT, + Some(wire_params), + ) + .await?; + Ok(serde_json::from_value(_value)?) + } + /// Records a batch of ordered factory progress lines. /// /// Wire method: `session.factory.log`. @@ -7624,6 +7686,42 @@ impl<'a> SessionRpcModel<'a> { Ok(serde_json::from_value(_value)?) } + /// Replaces or clears the host-supplied model allowlist for a running session. + /// + /// Wire method: `session.model.setAllowedModels`. + /// + /// # Parameters + /// + /// * `params` - Host-supplied exact model selection IDs to allow for this running session. CAPI IDs are intersected with repository `.github/allowed_models.txt` policy; provider-qualified IDs remain exempt from repository-only policy but are restricted by this host list. Omit or pass null to clear the host restriction; an explicit empty or disjoint list is rejected. Validation and pre-selection fallback failures preserve the previous restriction. Failures after a fallback selection commits retain the new restriction and selected model; callers should inspect current session state after such an error. + /// + /// # Returns + /// + /// The applied host allowlist and effective session model policy after intersection. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn set_allowed_models( + &self, + params: ModelSetAllowedModelsRequest, + ) -> 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_MODEL_SETALLOWEDMODELS, + Some(wire_params), + ) + .await?; + Ok(serde_json::from_value(_value)?) + } + /// Updates the session's reasoning effort without changing the selected model. /// /// Wire method: `session.model.setReasoningEffort`. @@ -9627,6 +9725,42 @@ impl<'a> SessionRpcSandbox<'a> { .await?; Ok(serde_json::from_value(_value)?) } + + /// Disables sandboxing for the remainder of the current session and approves the referenced pending sandbox-bypass permission request. The request is rejected unless the exact request is still pending and the effective sandbox policy permits bypass. + /// + /// Wire method: `session.sandbox.disableForSession`. + /// + /// # Parameters + /// + /// * `params` - Request to disable sandboxing for the current session while resolving an active sandbox-bypass permission prompt. + /// + /// # Returns + /// + /// Result of attempting to disable sandboxing for the current session. + /// + ///
+ /// + /// **Experimental.** This API is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. Pin both the + /// SDK and CLI versions if your code depends on it. + /// + ///
+ pub async fn disable_for_session( + &self, + params: SandboxDisableForSessionRequest, + ) -> 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_SANDBOX_DISABLEFORSESSION, + Some(wire_params), + ) + .await?; + Ok(serde_json::from_value(_value)?) + } } /// `session.schedule.*` RPCs. diff --git a/rust/src/generated/session_events.rs b/rust/src/generated/session_events.rs index 1d4cdc7e4..6f832cffb 100644 --- a/rust/src/generated/session_events.rs +++ b/rust/src/generated/session_events.rs @@ -37,6 +37,15 @@ pub enum SessionEventType { SessionWarning, #[serde(rename = "session.model_change")] SessionModelChange, + /// + ///
+ /// + /// **Experimental.** This type is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. + /// + ///
+ #[serde(rename = "session.auto_tier_recommendation")] + SessionAutoTierRecommendation, #[serde(rename = "session.auto_tier_switch_failed")] SessionAutoTierSwitchFailed, #[serde(rename = "session.mode_changed")] @@ -489,6 +498,15 @@ pub enum SessionEventData { SessionWarning(SessionWarningData), #[serde(rename = "session.model_change")] SessionModelChange(SessionModelChangeData), + /// + ///
+ /// + /// **Experimental.** This type is part of an experimental wire-protocol surface + /// and may change or be removed in future SDK or CLI releases. + /// + ///
+ #[serde(rename = "session.auto_tier_recommendation")] + SessionAutoTierRecommendation(SessionAutoTierRecommendationData), #[serde(rename = "session.auto_tier_switch_failed")] SessionAutoTierSwitchFailed(SessionAutoTierSwitchFailedData), #[serde(rename = "session.mode_changed")] @@ -1289,6 +1307,21 @@ pub struct SessionModelChangeData { pub verbosity: Option, } +/// Session event "session.auto_tier_recommendation". Live-only Auto preference recommendation from Copilot API after a successful Auto model call. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SessionAutoTierRecommendationData { + /// Recommended Auto preference. + pub recommended_auto_tier: RecommendedAutoTier, +} + /// Session event "session.auto_tier_switch_failed". A transient Auto preference failure emitted when the runtime cannot mint or accept a usable model and token pair. The previously effective preference remains active, so SDK clients can surface a non-blocking failure without changing their committed-tier state. This event is ephemeral and is not persisted or replayed on resume. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] @@ -1360,7 +1393,8 @@ pub struct SessionPermissionsChangedData { /// and may change or be removed in future SDK or CLI releases. /// ///
- pub mode: PermissionMode, + #[serde(skip_serializing_if = "Option::is_none")] + pub mode: Option, /// Permission mode before the change /// ///
@@ -1369,7 +1403,8 @@ pub struct SessionPermissionsChangedData { /// and may change or be removed in future SDK or CLI releases. /// ///
- pub previous_mode: PermissionMode, + #[serde(skip_serializing_if = "Option::is_none")] + pub previous_mode: Option, } /// Session event "session.plan_changed". Plan file operation details indicating what changed @@ -1769,6 +1804,9 @@ pub struct CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail { pub batch_size: i64, /// Cost per batch of tokens pub cost_per_batch: i64, + /// Model responsible for this billing entry + #[serde(skip_serializing_if = "Option::is_none")] + pub model: Option, /// Total token count for this entry pub token_count: i64, /// Token category (e.g., "input", "output") @@ -1779,6 +1817,10 @@ pub struct CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub(crate) struct CompactionCompleteCompactionTokensUsedCopilotUsage { + /// Default billing model for token details that do not identify their own model + #[doc(hidden)] + #[serde(skip_serializing_if = "Option::is_none")] + pub(crate) model: Option, /// Itemized token usage breakdown #[doc(hidden)] #[serde(skip_serializing_if = "Option::is_none")] @@ -1820,6 +1862,10 @@ pub struct CompactionCompleteCompactionTokensUsed { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionCompactionCompleteData { + /// Authoritative active-factory reminder appended to the compacted context + #[doc(hidden)] + #[serde(skip_serializing_if = "Option::is_none")] + pub(crate) active_factory_summary: Option, /// Canonical model identifier used for model-specific behavior when replaying compaction #[serde(skip_serializing_if = "Option::is_none")] pub behavior_model_id: Option, @@ -2931,6 +2977,9 @@ pub struct AssistantUsageCopilotUsageTokenDetail { pub batch_size: i64, /// Cost per batch of tokens pub cost_per_batch: i64, + /// Model responsible for this billing entry + #[serde(skip_serializing_if = "Option::is_none")] + pub model: Option, /// Total token count for this entry pub token_count: i64, /// Token category (e.g., "input", "output") @@ -2941,6 +2990,9 @@ pub struct AssistantUsageCopilotUsageTokenDetail { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct AssistantUsageCopilotUsage { + /// Default billing model for token details that do not identify their own model + #[serde(skip_serializing_if = "Option::is_none")] + pub model: Option, /// Itemized token usage breakdown #[doc(hidden)] #[serde(skip_serializing_if = "Option::is_none")] @@ -4131,6 +4183,9 @@ pub struct SubagentStartedData { /// Whether this sub-agent can be resumed. Currently always false. #[serde(skip_serializing_if = "Option::is_none")] pub resumable: Option, + /// Where the model input for this sub-agent came from. Present when the task planner resolved the launch (the task tool and factory agents); absent for sub-agents created through other runtime paths. + #[serde(skip_serializing_if = "Option::is_none")] + pub task_model_source: Option, /// Tool call ID of the parent tool invocation that spawned this sub-agent pub tool_call_id: String, } @@ -4442,6 +4497,9 @@ pub struct PermissionRequestShell { /// What the tool tells the user about the bypass on offer: which policy rule blocked the call, or why it cannot be sandboxed. Only meaningful when requestSandboxBypass is true. #[serde(skip_serializing_if = "Option::is_none")] pub request_sandbox_bypass_reason: Option, + /// True when the requested escalation is a permissive retry rather than a full bypass: the command re-runs inside the sandbox with its file and process restrictions recording instead of blocking, while the network policy stays enforced. Always accompanied by requestSandboxBypass, so hosts that do not recognize this field still treat the request as the escalation it is. Hosts that do recognize it must not describe the command as running outside the sandbox, which would overstate the privilege being granted. + #[serde(skip_serializing_if = "Option::is_none")] + pub request_sandbox_permissive: Option, /// Tool call ID that triggered this permission request #[serde(skip_serializing_if = "Option::is_none")] pub tool_call_id: Option, @@ -4827,6 +4885,15 @@ pub struct PermissionPromptRequestCommands { /// Whether managed policy requires a human response and forbids host auto-approval #[serde(skip_serializing_if = "Option::is_none")] pub managed_approval_required: Option, + /// True when the shell command is requesting sandbox escalation. This is a request, not a grant. + #[serde(skip_serializing_if = "Option::is_none")] + pub request_sandbox_bypass: Option, + /// Reason for the sandbox escalation request. + #[serde(skip_serializing_if = "Option::is_none")] + pub request_sandbox_bypass_reason: Option, + /// True when the escalation is a permissive retry that keeps the sandbox and network policy attached while recording file and process accesses instead of blocking them. + #[serde(skip_serializing_if = "Option::is_none")] + pub request_sandbox_permissive: Option, /// Tool call ID that triggered this permission request #[serde(skip_serializing_if = "Option::is_none")] pub tool_call_id: Option, @@ -6197,6 +6264,9 @@ pub struct SessionSkillsLoadedData { pub struct CustomAgentsUpdatedAgent { /// Description of what the agent does pub description: String, + /// Whether model-driven invocation is disabled for this agent. + #[serde(skip_serializing_if = "Option::is_none")] + pub disable_model_invocation: Option, /// Human-readable display name pub display_name: String, /// Unique identifier for the agent @@ -6602,7 +6672,7 @@ pub struct McpAppToolCallCompleteData { pub tool_name: String, } -/// Routing preference used when the session model is `auto`. +/// Routing preference used when the session model is `auto`. `fast` is an integrator-only latency preset and is not a first-party GitHub Copilot product preference. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum AutoTier { /// Optimize for efficiency. @@ -6614,6 +6684,9 @@ pub enum AutoTier { /// Optimize for intelligence. #[serde(rename = "intelligence")] Intelligence, + /// Integrator-only preset that optimizes for latency. + #[serde(rename = "fast")] + Fast, /// Unknown variant for forward compatibility. #[default] #[serde(other)] @@ -6824,6 +6897,24 @@ pub enum ModelChangeSource { Unknown, } +/// Auto preferences that Copilot API can recommend. +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum RecommendedAutoTier { + /// Optimize for efficiency. + #[serde(rename = "efficiency")] + Efficiency, + /// Balance efficiency and intelligence. + #[serde(rename = "balance")] + Balance, + /// Optimize for intelligence. + #[serde(rename = "intelligence")] + Intelligence, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + /// Terminal reason an Auto preference activation failed. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum AutoTierSwitchFailureReason { @@ -7703,6 +7794,27 @@ pub enum SkillInvokedTrigger { Unknown, } +/// Where the model input for a task-tool sub-agent came from. +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub enum SubagentTaskModelSource { + /// The spawning agent supplied the task tool's model argument. + #[serde(rename = "task_argument")] + TaskArgument, + /// The task omitted a model and the per-sub-agent settings entry supplied a concrete one. + #[serde(rename = "subagent_configuration")] + SubagentConfiguration, + /// The task omitted a model and the user-defined custom agent's definition supplied one. + #[serde(rename = "custom_agent_definition")] + CustomAgentDefinition, + /// Neither the task call, the per-sub-agent settings entry, nor a custom agent definition supplied a model. + #[serde(rename = "unset")] + Unset, + /// Unknown variant for forward compatibility. + #[default] + #[serde(other)] + Unknown, +} + /// Binary asset type discriminator. Use "image" for images and "resource" otherwise. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub enum BinaryAssetType { @@ -8616,6 +8728,9 @@ pub enum FactoryRunSettledStatus { /// The run was stopped by a limit, an approval refusal or another policy decision. #[serde(rename = "halted")] Halted, + /// The attempt paused intentionally while preserving resumable run state. + #[serde(rename = "paused")] + Paused, /// The run was cancelled by its caller or by session disposal. #[serde(rename = "cancelled")] Cancelled, diff --git a/rust/tests/e2e/rpc_server_plugins.rs b/rust/tests/e2e/rpc_server_plugins.rs index df6072253..f180bd156 100644 --- a/rust/tests/e2e/rpc_server_plugins.rs +++ b/rust/tests/e2e/rpc_server_plugins.rs @@ -99,6 +99,7 @@ async fn should_enable_and_disable_marketplace_plugin() { .plugins() .disable(PluginsDisableRequest { names: vec![spec.clone()], + working_directory: None, }) .await .expect("disable plugin"); @@ -114,7 +115,10 @@ async fn should_enable_and_disable_marketplace_plugin() { client .rpc() .plugins() - .enable(PluginsEnableRequest { names: vec![spec] }) + .enable(PluginsEnableRequest { + names: vec![spec], + working_directory: None, + }) .await .expect("enable plugin"); assert!(