diff --git a/dotnet/src/Generated/Rpc.cs b/dotnet/src/Generated/Rpc.cs index 604ed0960..71d49d526 100644 --- a/dotnet/src/Generated/Rpc.cs +++ b/dotnet/src/Generated/Rpc.cs @@ -2314,11 +2314,6 @@ public sealed class SessionOpenResult [JsonPropertyName("remoteSessionId")] public string? RemoteSessionId { get; set; } - /// In-process SessionClientApi handle for the opened session, returned to CLI callers as a transitional shortcut. Marked internal so the public SDK surface does not expose it; SDK consumers should construct per-session clients from `sessionId` instead. - [JsonInclude] - [JsonPropertyName("sessionApi")] - internal JsonElement? SessionApi { get; set; } - /// Opened session ID. Omitted when status is `not_found`. [JsonPropertyName("sessionId")] public string? SessionId { get; set; } @@ -3110,12 +3105,6 @@ public partial class RemoteControlStatusActive : RemoteControlStatus /// Whether the MC session may steer this session. [JsonPropertyName("isSteerable")] public required bool IsSteerable { get; set; } - - /// In-process prompt-manager handle (CLI-only optimization). Marked internal: this field is excluded from the public SDK surface. When the CLI migrates to a process-separated SDK, the same bidirectional prompt-routing handshake is expressed via dedicated remote-control RPCs (register/resolve) rather than a shared in-process object. - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - [JsonInclude] - [JsonPropertyName("promptManager")] - internal JsonElement? PromptManager { get; set; } } /// The last setup attempt failed. The singleton is otherwise off. @@ -3266,31 +3255,18 @@ internal sealed class SessionsStopRemoteControlRequest [Experimental(Diagnostics.Experimental)] internal sealed class RegisterExtensionToolsResult { - /// In-process unsubscribe function (CLI-only optimization). Marked internal: replaced by an explicit `extensions.unregister` RPC in the SDK migration. - [JsonInclude] - [JsonPropertyName("unsubscribe")] - internal JsonElement Unsubscribe { get; set; } } /// Optional registration options. [Experimental(Diagnostics.Experimental)] public sealed class SessionsRegisterExtensionToolsOnSessionOptions { - /// In-process `() => boolean` gating callback (CLI-only optimization). Marked internal: replaced by runtime-side enable/disable RPCs in the SDK migration. - [JsonInclude] - [JsonPropertyName("enabled")] - internal JsonElement? Enabled { get; set; } } /// Params to attach an extension loader's tools to a session. [Experimental(Diagnostics.Experimental)] internal sealed class RegisterExtensionToolsParams { - /// In-process ExtensionLoader handle (CLI-only optimization). Marked internal: this field is excluded from the public SDK surface. When the CLI migrates to a process-separated SDK, extension discovery/launch moves entirely into the runtime — the CLI passes pure config (search paths, disabled ids) via SessionOptions instead. - [JsonInclude] - [JsonPropertyName("loader")] - internal JsonElement Loader { get; set; } - /// Optional registration options. [JsonPropertyName("options")] public SessionsRegisterExtensionToolsOnSessionOptions? Options { get; set; } @@ -3304,11 +3280,6 @@ internal sealed class RegisterExtensionToolsParams [Experimental(Diagnostics.Experimental)] internal sealed class ConfigureSessionExtensionsParams { - /// In-process ExtensionController delegate (CLI-only optimization). Marked internal: this field is excluded from the public SDK surface. The post-SDK extension surface exposes list/enable/disable/reload via dedicated RPCs served by the runtime. - [JsonInclude] - [JsonPropertyName("controller")] - internal JsonElement? Controller { get; set; } - /// Session to attach the extension controller delegate to. [JsonPropertyName("sessionId")] public string SessionId { get; set; } = string.Empty; @@ -4309,6 +4280,7 @@ internal sealed class CanvasActionInvokeRequest [JsonDerivedType(typeof(FactoryRunFailureFactoryLimitReached), "factory_limit_reached")] [JsonDerivedType(typeof(FactoryRunFailureFactoryResumeDeclined), "factory_resume_declined")] [JsonDerivedType(typeof(FactoryRunFailureFactoryDurableFailure), "factory_durable_failure")] +[JsonDerivedType(typeof(FactoryRunFailureFactoryAccountingIncomplete), "factory_accounting_incomplete")] public partial class FactoryRunFailure { /// The type discriminator. @@ -4376,6 +4348,24 @@ public partial class FactoryRunFailureFactoryDurableFailure : FactoryRunFailure public required string RunId { get; set; } } +/// The run stopped because its usage accounting could not be completed. +/// The factory_accounting_incomplete variant of . +[Experimental(Diagnostics.Experimental)] +public partial class FactoryRunFailureFactoryAccountingIncomplete : FactoryRunFailure +{ + /// + [JsonIgnore] + public override string Type => "factory_accounting_incomplete"; + + /// Confirmed usage in nano-AIU, representing the floor of what the run spent. + [JsonPropertyName("drainedNanoAiu")] + public required long DrainedNanoAiu { get; set; } + + /// Factory run identifier. + [JsonPropertyName("runId")] + public required string RunId { get; set; } +} + /// Complete current or terminal factory run envelope. [Experimental(Diagnostics.Experimental)] public sealed class FactoryRunResult @@ -4660,19 +4650,47 @@ public sealed class FactoryRunSummary public long UpdatedAt { get; set; } } -/// Factory runs in durable creation order. +/// A page of factory runs in durable creation order. [Experimental(Diagnostics.Experimental)] public sealed class FactoryListRunsResult { + /// Whether terminal runs newer than this page exist. + [JsonPropertyName("hasMoreNewer")] + public bool? HasMoreNewer { get; set; } + + /// Newest terminal-run cursor in this page, or null when the terminal window is empty. + [JsonPropertyName("newestSeq")] + public long? NewestSeq { get; set; } + + /// Oldest terminal-run cursor in this page, or null when the terminal window is empty. + [JsonPropertyName("oldestSeq")] + public long? OldestSeq { get; set; } + + /// Number of terminal runs older than this page. + [JsonPropertyName("omittedOlder")] + public long? OmittedOlder { get; set; } + /// Gets or sets the runs value. [JsonPropertyName("runs")] public IList Runs { get => field ??= []; set; } } -/// Empty parameters for listing factory runs. +/// Parameters for paging factory runs. [Experimental(Diagnostics.Experimental)] internal sealed class FactoryListRunsRequest { + /// Exclusive forward cursor. + [JsonPropertyName("afterSeq")] + public long? AfterSeq { get; set; } + + /// Exclusive backward cursor. + [JsonPropertyName("beforeSeq")] + public long? BeforeSeq { get; set; } + + /// Maximum terminal runs to return. Defaults to 200 and is capped at 500. + [JsonPropertyName("limit")] + public int? Limit { get; set; } + /// Target session identifier. [JsonPropertyName("sessionId")] public string SessionId { get; set; } = string.Empty; @@ -5042,6 +5060,14 @@ 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. + [JsonPropertyName("agent")] + public string? Agent { get; set; } + + /// Optional context tier for the subagent. This field is accepted but not yet honored. + [JsonPropertyName("contextTier")] + public ContextTier? ContextTier { get; set; } + /// Optional label distinguishing otherwise identical memoized agent calls. [JsonPropertyName("label")] public string? Label { get; set; } @@ -5050,6 +5076,10 @@ 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. + [JsonPropertyName("reasoningEffort")] + public string? ReasoningEffort { get; set; } + /// Optional JSON Schema for structured agent output. [JsonPropertyName("schema")] public JsonElement? Schema { get; set; } @@ -7162,11 +7192,6 @@ internal sealed class McpStartServersResult [Experimental(Diagnostics.Experimental)] internal sealed class McpReloadWithConfigRequest { - /// Opaque runtime MCP reload configuration. Marked internal: an in-process runtime shape (reloadMcpServers throws over the wire). - [JsonInclude] - [JsonPropertyName("config")] - internal JsonElement Config { get; set; } - /// Target session identifier. [JsonPropertyName("sessionId")] public string SessionId { get; set; } = string.Empty; @@ -7301,11 +7326,6 @@ internal sealed class McpConfigureGitHubResult [Experimental(Diagnostics.Experimental)] internal sealed class McpConfigureGitHubRequest { - /// Opaque runtime auth info for GitHub MCP configuration. Marked internal: an in-process runtime shape (configureGitHubMcp is a no-op over the wire). - [JsonInclude] - [JsonPropertyName("authInfo")] - internal JsonElement AuthInfo { get; set; } - /// Target session identifier. [JsonPropertyName("sessionId")] public string SessionId { get; set; } = string.Empty; @@ -7362,16 +7382,6 @@ internal sealed class McpStopServerRequest [Experimental(Diagnostics.Experimental)] internal sealed class McpRegisterExternalClientRequest { - /// In-process MCP Client instance. Marked internal: cannot be serialized across the JSON-RPC boundary. - [JsonInclude] - [JsonPropertyName("client")] - internal JsonElement Client { get; set; } - - /// In-process server config (MCPServerConfig) paired with the in-process client/transport. Marked internal alongside its companions. - [JsonInclude] - [JsonPropertyName("config")] - internal JsonElement Config { get; set; } - /// Logical server name for the external client. [JsonPropertyName("serverName")] public string ServerName { get; set; } = string.Empty; @@ -7379,11 +7389,6 @@ internal sealed class McpRegisterExternalClientRequest /// Target session identifier. [JsonPropertyName("sessionId")] public string SessionId { get; set; } = string.Empty; - - /// In-process MCP Transport instance. Marked internal: cannot be serialized across the JSON-RPC boundary. - [JsonInclude] - [JsonPropertyName("transport")] - internal JsonElement Transport { get; set; } } /// Server name identifying the external client to remove. @@ -8649,6 +8654,19 @@ public sealed class ProviderConfig public string? WireModel { get; set; } } +/// Credential-injection capability flags applied while the sandbox is enabled. +[Experimental(Diagnostics.Experimental)] +public sealed class SandboxConfigAuth +{ + /// Whether to export `GH_TOKEN` so the `gh` CLI authenticates inside the sandbox without the OS keyring the sandbox blocks. Default: false (opt-in). + [JsonPropertyName("gh")] + public bool? Gh { get; set; } + + /// Whether to inject git credentials as an `http.<url>.extraheader` so authenticated HTTPS git works inside the sandbox without the shell-based credential helper the sandbox blocks. github.com is served by the Copilot token; every other forge (Azure DevOps, GitHub Enterprise Server, GitLab, ...) by a credential the host resolves from the user's own helper before the sandbox is applied. Default: false (opt-in). + [JsonPropertyName("git")] + public bool? Git { get; set; } +} + /// macOS seatbelt experimental options. [Experimental(Diagnostics.Experimental)] public sealed class SandboxConfigUserPolicyExperimentalSeatbelt @@ -8764,18 +8782,14 @@ public sealed class SandboxConfig [JsonPropertyName("allowDevToolAccess")] public bool? AllowDevToolAccess { get; set; } + /// Credential-injection capability flags. + [JsonPropertyName("auth")] + public SandboxConfigAuth? Auth { get; set; } + /// Whether sandboxing is enabled for the session. [JsonPropertyName("enabled")] public bool Enabled { get; set; } - /// Whether to export `GH_TOKEN` so the `gh` CLI authenticates inside the sandbox without the OS keyring the sandbox blocks. Default: false (opt-in). - [JsonPropertyName("ghAuth")] - public bool? GhAuth { get; set; } - - /// Whether to inject the Copilot GitHub token as an `http.<host>.extraheader` so authenticated HTTPS git works inside the sandbox without the shell-based credential helper the sandbox blocks. Default: false (opt-in). - [JsonPropertyName("gitAuth")] - public bool? GitAuth { get; set; } - /// User-managed sandbox policy fragment merged into the auto-discovered base policy. [JsonPropertyName("userPolicy")] public SandboxConfigUserPolicy? UserPolicy { get; set; } @@ -10193,16 +10207,6 @@ public sealed class UIEphemeralQueryResult [Experimental(Diagnostics.Experimental)] internal sealed class UIEphemeralQueryRequest { - /// In-process `AbortSignal` forwarded to the model client to cancel an in-flight request. Marked internal: excluded from the public SDK surface. Replaced by an explicit cancellation token + cancel RPC in the SDK migration. - [JsonInclude] - [JsonPropertyName("abortSignal")] - internal JsonElement? AbortSignal { get; set; } - - /// In-process streaming callback `(text) => void` invoked with each token as the model emits it. Marked internal: excluded from the public SDK surface. In a process-separated SDK this is replaced by a streaming RPC that yields chunks and a final answer. - [JsonInclude] - [JsonPropertyName("onChunk")] - internal JsonElement? OnChunk { get; set; } - /// Question to answer from the current conversation context. [JsonPropertyName("question")] public string Question { get; set; } = string.Empty; @@ -24646,28 +24650,25 @@ public async Task GetRemoteControlStatusAsync(Cancell /// Registers extension-provided tools on the given session, gated by an optional `enabled` callback. Returns an opaque unsubscribe function the caller must invoke to deregister the tools when the extension is torn down. Marked internal because `loader`, `enabled`, and the returned `unsubscribe` are in-process handles that cannot cross the JSON-RPC boundary. Disappears once extension discovery / launch / tool registration are owned by the runtime: SDK consumers will pass pure config (search paths, disabled ids) via `SessionOptions` and the runtime will resolve, launch, register, and tear down extensions itself. /// Session to register extension tools on. - /// In-process ExtensionLoader handle (CLI-only optimization). Marked internal: this field is excluded from the public SDK surface. When the CLI migrates to a process-separated SDK, extension discovery/launch moves entirely into the runtime — the CLI passes pure config (search paths, disabled ids) via SessionOptions instead. /// Optional registration options. /// The to monitor for cancellation requests. The default is . /// Handle for releasing the extension tool registration. - internal async Task RegisterExtensionToolsOnSessionAsync(string sessionId, object loader, SessionsRegisterExtensionToolsOnSessionOptions? options = null, CancellationToken cancellationToken = default) + internal async Task RegisterExtensionToolsOnSessionAsync(string sessionId, SessionsRegisterExtensionToolsOnSessionOptions? options = null, CancellationToken cancellationToken = default) { ArgumentNullException.ThrowIfNull(sessionId); - ArgumentNullException.ThrowIfNull(loader); - var request = new RegisterExtensionToolsParams { SessionId = sessionId, Loader = CopilotClient.ToJsonElementForWire(loader)!.Value, Options = options }; + var request = new RegisterExtensionToolsParams { SessionId = sessionId, Options = options }; return await CopilotClient.InvokeRpcAsync(_rpc, "sessions.registerExtensionToolsOnSession", [request], cancellationToken); } /// Attaches (or detaches) an in-process ExtensionController delegate for the given session, used by shared-API surfaces that need to query or modify the session's extension state. Pass `controller: undefined` to detach. Marked internal because the controller is an in-process object that cannot cross the JSON-RPC boundary. Disappears alongside `registerExtensionToolsOnSession`: once the runtime owns extension management, the public surface exposes list/enable/disable/reload as dedicated RPCs served by the runtime. /// Session to attach the extension controller delegate to. - /// In-process ExtensionController delegate (CLI-only optimization). Marked internal: this field is excluded from the public SDK surface. The post-SDK extension surface exposes list/enable/disable/reload via dedicated RPCs served by the runtime. /// The to monitor for cancellation requests. The default is . - internal async Task ConfigureSessionExtensionsAsync(string sessionId, object? controller = null, CancellationToken cancellationToken = default) + internal async Task ConfigureSessionExtensionsAsync(string sessionId, CancellationToken cancellationToken = default) { ArgumentNullException.ThrowIfNull(sessionId); - var request = new ConfigureSessionExtensionsParams { SessionId = sessionId, Controller = CopilotClient.ToJsonElementForWire(controller) }; + var request = new ConfigureSessionExtensionsParams { SessionId = sessionId }; await CopilotClient.InvokeRpcAsync(_rpc, "sessions.configureSessionExtensions", [request], cancellationToken); } } @@ -25299,13 +25300,16 @@ public async Task GetRunAsync(string runId, CancellationToken } /// Lists durable factory runs for this session in creation order. + /// Exclusive forward cursor. + /// Exclusive backward cursor. + /// Maximum terminal runs to return. Defaults to 200 and is capped at 500. /// The to monitor for cancellation requests. The default is . - /// Factory runs in durable creation order. - public async Task ListRunsAsync(CancellationToken cancellationToken = default) + /// A page of factory runs in durable creation order. + public async Task ListRunsAsync(long? afterSeq = null, long? beforeSeq = null, int? limit = null, CancellationToken cancellationToken = default) { _session.ThrowIfDisposed(); - var request = new FactoryListRunsRequest { SessionId = _session.SessionId }; + var request = new FactoryListRunsRequest { SessionId = _session.SessionId, AfterSeq = afterSeq, BeforeSeq = beforeSeq, Limit = limit }; return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.factory.listRuns", [request], cancellationToken); } @@ -26337,15 +26341,13 @@ public async Task ReloadAsync(CancellationToken cancellationToken = default) } /// Reloads MCP server connections for the session with an explicit host-provided configuration. - /// Opaque runtime MCP reload configuration. Marked internal: an in-process runtime shape (reloadMcpServers throws over the wire). /// The to monitor for cancellation requests. The default is . /// MCP server startup filtering result. - internal async Task ReloadWithConfigAsync(object config, CancellationToken cancellationToken = default) + internal async Task ReloadWithConfigAsync(CancellationToken cancellationToken = default) { - ArgumentNullException.ThrowIfNull(config); _session.ThrowIfDisposed(); - var request = new McpReloadWithConfigRequest { SessionId = _session.SessionId, Config = CopilotClient.ToJsonElementForWire(config)!.Value }; + var request = new McpReloadWithConfigRequest { SessionId = _session.SessionId }; return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.mcp.reloadWithConfig", [request], cancellationToken); } @@ -26405,15 +26407,13 @@ public async Task RemoveGitHubAsync(CancellationToken can } /// Configures the built-in GitHub MCP server for the session's current auth context. - /// Opaque runtime auth info for GitHub MCP configuration. Marked internal: an in-process runtime shape (configureGitHubMcp is a no-op over the wire). /// The to monitor for cancellation requests. The default is . /// Result of configuring GitHub MCP. - internal async Task ConfigureGitHubAsync(object authInfo, CancellationToken cancellationToken = default) + internal async Task ConfigureGitHubAsync(CancellationToken cancellationToken = default) { - ArgumentNullException.ThrowIfNull(authInfo); _session.ThrowIfDisposed(); - var request = new McpConfigureGitHubRequest { SessionId = _session.SessionId, AuthInfo = CopilotClient.ToJsonElementForWire(authInfo)!.Value }; + var request = new McpConfigureGitHubRequest { SessionId = _session.SessionId }; return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.mcp.configureGitHub", [request], cancellationToken); } @@ -26457,19 +26457,13 @@ public async Task StopServerAsync(string serverName, CancellationToken cancellat /// Registers a pre-connected external MCP client (e.g. IDE) on the session's host. The caller retains lifecycle ownership of the client and transport. Marked internal because the `client` and `transport` arguments are in-process MCP SDK instances that cannot be serialized across the JSON-RPC boundary; once the CLI moves on top of the SDK, external clients will be expressed as transport configs the runtime can construct itself. /// Logical server name for the external client. - /// In-process MCP Client instance. Marked internal: cannot be serialized across the JSON-RPC boundary. - /// In-process MCP Transport instance. Marked internal: cannot be serialized across the JSON-RPC boundary. - /// In-process server config (MCPServerConfig) paired with the in-process client/transport. Marked internal alongside its companions. /// The to monitor for cancellation requests. The default is . - internal async Task RegisterExternalClientAsync(string serverName, object client, object transport, object config, CancellationToken cancellationToken = default) + internal async Task RegisterExternalClientAsync(string serverName, CancellationToken cancellationToken = default) { ArgumentNullException.ThrowIfNull(serverName); - ArgumentNullException.ThrowIfNull(client); - ArgumentNullException.ThrowIfNull(transport); - ArgumentNullException.ThrowIfNull(config); _session.ThrowIfDisposed(); - var request = new McpRegisterExternalClientRequest { SessionId = _session.SessionId, ServerName = serverName, Client = CopilotClient.ToJsonElementForWire(client)!.Value, Transport = CopilotClient.ToJsonElementForWire(transport)!.Value, Config = CopilotClient.ToJsonElementForWire(config)!.Value }; + var request = new McpRegisterExternalClientRequest { SessionId = _session.SessionId, ServerName = serverName }; await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.mcp.registerExternalClient", [request], cancellationToken); } @@ -27223,16 +27217,14 @@ internal UiApi(CopilotSession session) /// Runs a transient no-tools model query against the current conversation context. /// Question to answer from the current conversation context. - /// In-process streaming callback `(text) => void` invoked with each token as the model emits it. Marked internal: excluded from the public SDK surface. In a process-separated SDK this is replaced by a streaming RPC that yields chunks and a final answer. - /// In-process `AbortSignal` forwarded to the model client to cancel an in-flight request. Marked internal: excluded from the public SDK surface. Replaced by an explicit cancellation token + cancel RPC in the SDK migration. /// The to monitor for cancellation requests. The default is . /// Transient answer generated from current conversation context. - public async Task EphemeralQueryAsync(string question, object? onChunk = null, object? abortSignal = null, CancellationToken cancellationToken = default) + public async Task EphemeralQueryAsync(string question, CancellationToken cancellationToken = default) { ArgumentNullException.ThrowIfNull(question); _session.ThrowIfDisposed(); - var request = new UIEphemeralQueryRequest { SessionId = _session.SessionId, Question = question, OnChunk = CopilotClient.ToJsonElementForWire(onChunk), AbortSignal = CopilotClient.ToJsonElementForWire(abortSignal) }; + var request = new UIEphemeralQueryRequest { SessionId = _session.SessionId, Question = question }; return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.ui.ephemeralQuery", [request], cancellationToken); } @@ -29818,6 +29810,7 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH [JsonSerializable(typeof(RemoteSessionMetadataValue))] [JsonSerializable(typeof(RunOptions))] [JsonSerializable(typeof(SandboxConfig))] +[JsonSerializable(typeof(SandboxConfigAuth))] [JsonSerializable(typeof(SandboxConfigUserPolicy))] [JsonSerializable(typeof(SandboxConfigUserPolicyExperimental))] [JsonSerializable(typeof(SandboxConfigUserPolicyExperimentalSeatbelt))] diff --git a/dotnet/src/Generated/SessionEvents.cs b/dotnet/src/Generated/SessionEvents.cs index 47c13846f..90eb08263 100644 --- a/dotnet/src/Generated/SessionEvents.cs +++ b/dotnet/src/Generated/SessionEvents.cs @@ -3553,6 +3553,11 @@ public sealed partial class SubagentCompletedData [JsonPropertyName("agentName")] public required string AgentName { get; set; } + /// Whether the sub-agent was torn down by cancellation - its own abort, or an ancestor being killed - instead of finishing its work. Cancellation is not a failure, so the run still reports completion; this distinguishes a torn-down sub-agent from one that ran to the end. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("cancelled")] + public bool? Cancelled { get; set; } + /// Wall-clock duration of the sub-agent execution in milliseconds. [JsonConverter(typeof(MillisecondsTimeSpanConverter))] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] diff --git a/dotnet/test/E2E/ClientE2ETests.cs b/dotnet/test/E2E/ClientE2ETests.cs index d166223d6..b6bdfd90f 100644 --- a/dotnet/test/E2E/ClientE2ETests.cs +++ b/dotnet/test/E2E/ClientE2ETests.cs @@ -11,6 +11,9 @@ namespace GitHub.Copilot.Test.E2E; // Other test classes should instead inherit from E2ETestBase public class ClientE2ETests(E2ETestFixture fixture) : IClassFixture { + private const string FailingCliScript = + "process.stderr.write('nonexistent test flag on stderr\\n'); process.exit(1);"; + private E2ETestContext Ctx => fixture.Ctx; [Theory] @@ -177,11 +180,14 @@ public async Task Should_Not_Throw_When_Disposing_Session_After_Stopping_Client( [InlineData(false)] // TCP transport public async Task Should_Report_Error_With_Stderr_When_CLI_Fails_To_Start(bool useStdio) { + var cliPath = Path.Join(Ctx.WorkDir, $"failing-cli-{Guid.NewGuid():N}.js"); + await File.WriteAllTextAsync(cliPath, FailingCliScript); + var client = new CopilotClient(new CopilotClientOptions { Connection = useStdio - ? RuntimeConnection.ForStdio(args: ["--nonexistent-flag-for-testing"]) - : RuntimeConnection.ForTcp(args: ["--nonexistent-flag-for-testing"]) + ? RuntimeConnection.ForStdio(path: cliPath) + : RuntimeConnection.ForTcp(path: cliPath) }); var ex = await Assert.ThrowsAsync(() => client.StartAsync()); diff --git a/dotnet/test/Harness/E2ETestContext.cs b/dotnet/test/Harness/E2ETestContext.cs index af34de6ec..1c88d809b 100644 --- a/dotnet/test/Harness/E2ETestContext.cs +++ b/dotnet/test/Harness/E2ETestContext.cs @@ -13,6 +13,7 @@ namespace GitHub.Copilot.Test.Harness; public sealed class E2ETestContext : IAsyncDisposable { private const string DefaultGitHubToken = "fake-token-for-e2e-tests"; + private static readonly TimeSpan s_gracefulClientStopTimeout = TimeSpan.FromSeconds(30); public string HomeDir { get; } public string WorkDir { get; } @@ -549,7 +550,6 @@ private static bool IsInProcess(RuntimeConnection? connection) return false; } - // Inproc holds the session-store SQLite handle in-process; graceful StopAsync releases it so the temp-dir delete succeeds on Windows. private static async Task StopClientForCleanupAsync(CopilotClient client) { var isInProcess = string.Equals( @@ -558,7 +558,21 @@ private static async Task StopClientForCleanupAsync(CopilotClient client) StringComparison.OrdinalIgnoreCase); if (isInProcess) { - await client.StopAsync(); + var gracefulStop = client.StopAsync(); + try + { + await gracefulStop.WaitAsync(s_gracefulClientStopTimeout); + } + catch (TimeoutException) + { + Console.Error.WriteLine( + $"Graceful in-process client cleanup exceeded {s_gracefulClientStopTimeout}; forcing shutdown."); + await client.ForceStopAsync(); + + // Disposing the connection completes any session.destroy RPC that + // blocked graceful cleanup. Observe that task before continuing. + await gracefulStop.WaitAsync(s_gracefulClientStopTimeout); + } } else { diff --git a/dotnet/test/Unit/ClientSessionLifetimeTests.cs b/dotnet/test/Unit/ClientSessionLifetimeTests.cs index d4b4100b4..da04ff38b 100644 --- a/dotnet/test/Unit/ClientSessionLifetimeTests.cs +++ b/dotnet/test/Unit/ClientSessionLifetimeTests.cs @@ -183,6 +183,27 @@ public async Task StopAsync_Keeps_Session_Rooted_Until_Destroy_Completes() AssertSessionCount(client, sessions: 0); } + [Fact] + public async Task ForceStopAsync_Unblocks_StopAsync_When_Session_Destroy_Hangs() + { + await using var server = await FakeCopilotServer.StartAsync(); + server.DelayDestroy(); + await using var client = new CopilotClient(new CopilotClientOptions { Connection = RuntimeConnection.ForUri(server.Url) }); + + _ = await client.CreateSessionAsync(new SessionConfig + { + OnPermissionRequest = PermissionHandler.ApproveAll + }); + + var stopTask = client.StopAsync(); + await server.DestroyStarted; + + await client.ForceStopAsync(); + await stopTask.WaitAsync(TimeSpan.FromSeconds(5)); + + AssertSessionCount(client, sessions: 0); + } + [Fact] public async Task ResumeSessionAsync_Throws_When_Same_Client_Already_Tracks_Session() { diff --git a/go/rpc/zrpc.go b/go/rpc/zrpc.go index 6de48d06c..622c7a0cb 100644 --- a/go/rpc/zrpc.go +++ b/go/rpc/zrpc.go @@ -2452,10 +2452,16 @@ 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. + Agent *string `json:"agent,omitempty"` + // Optional context tier for the subagent. This field is accepted but not yet honored. + 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. + ReasoningEffort *string `json:"reasoningEffort,omitempty"` // Optional JSON Schema for structured agent output. Schema any `json:"schema,omitempty"` } @@ -2611,17 +2617,31 @@ type FactoryJournalPutRequest struct { RunID string `json:"runId"` } -// Empty parameters for listing factory runs. +// Parameters for paging factory runs. // Experimental: FactoryListRunsRequest is part of an experimental API and may change or be // removed. type FactoryListRunsRequest struct { + // Exclusive forward cursor. + AfterSeq *int64 `json:"afterSeq,omitempty"` + // Exclusive backward cursor. + BeforeSeq *int64 `json:"beforeSeq,omitempty"` + // Maximum terminal runs to return. Defaults to 200 and is capped at 500. + Limit *int32 `json:"limit,omitempty"` } -// Factory runs in durable creation order. +// A page of factory runs in durable creation order. // Experimental: FactoryListRunsResult is part of an experimental API and may change or be // removed. type FactoryListRunsResult struct { - Runs []FactoryRunSummary `json:"runs"` + // Whether terminal runs newer than this page exist. + HasMoreNewer *bool `json:"hasMoreNewer,omitempty"` + // Newest terminal-run cursor in this page, or null when the terminal window is empty. + NewestSeq *int64 `json:"newestSeq,omitempty"` + // Oldest terminal-run cursor in this page, or null when the terminal window is empty. + OldestSeq *int64 `json:"oldestSeq,omitempty"` + // Number of terminal runs older than this page. + OmittedOlder *int64 `json:"omittedOlder,omitempty"` + Runs []FactoryRunSummary `json:"runs"` } // One ordered factory progress line. @@ -2772,6 +2792,19 @@ func (r RawFactoryRunFailureData) Type() FactoryRunFailureType { return r.Discriminator } +// The run stopped because its usage accounting could not be completed. +type FactoryRunFailureFactoryAccountingIncomplete struct { + // Confirmed usage in nano-AIU, representing the floor of what the run spent. + DrainedNanoAiu int64 `json:"drainedNanoAiu"` + // Factory run identifier. + RunID string `json:"runId"` +} + +func (FactoryRunFailureFactoryAccountingIncomplete) factoryRunFailure() {} +func (FactoryRunFailureFactoryAccountingIncomplete) Type() FactoryRunFailureType { + return FactoryRunFailureTypeFactoryAccountingIncomplete +} + type FactoryRunFailureFactoryDurableFailure struct { // Stable failure code. Code string `json:"code"` @@ -8208,19 +8241,29 @@ type SandboxConfig struct { // Cargo lock files granted read-write. Default: true (enabled by default; set to false to // opt out). AllowDevToolAccess *bool `json:"allowDevToolAccess,omitempty"` + // Credential-injection capability flags. + Auth *SandboxConfigAuth `json:"auth,omitempty"` // Whether sandboxing is enabled for the session. Enabled bool `json:"enabled"` - // Whether to export `GH_TOKEN` so the `gh` CLI authenticates inside the sandbox without the - // OS keyring the sandbox blocks. Default: false (opt-in). - GhAuth *bool `json:"ghAuth,omitempty"` - // Whether to inject the Copilot GitHub token as an `http..extraheader` so - // authenticated HTTPS git works inside the sandbox without the shell-based credential - // helper the sandbox blocks. Default: false (opt-in). - GitAuth *bool `json:"gitAuth,omitempty"` // User-managed sandbox policy fragment merged into the auto-discovered base policy. UserPolicy *SandboxConfigUserPolicy `json:"userPolicy,omitempty"` } +// Credential-injection capability flags applied while the sandbox is enabled. +// Experimental: SandboxConfigAuth is part of an experimental API and may change or be +// removed. +type SandboxConfigAuth struct { + // Whether to export `GH_TOKEN` so the `gh` CLI authenticates inside the sandbox without the + // OS keyring the sandbox blocks. Default: false (opt-in). + Gh *bool `json:"gh,omitempty"` + // Whether to inject git credentials as an `http..extraheader` so authenticated HTTPS + // git works inside the sandbox without the shell-based credential helper the sandbox + // blocks. github.com is served by the Copilot token; every other forge (Azure DevOps, + // GitHub Enterprise Server, GitLab, ...) by a credential the host resolves from the user's + // own helper before the sandbox is applied. Default: false (opt-in). + Git *bool `json:"git,omitempty"` +} + // User-managed sandbox policy fragment merged into the auto-discovered base policy. // Experimental: SandboxConfigUserPolicy is part of an experimental API and may change or be // removed. @@ -13525,9 +13568,10 @@ const ( type FactoryRunFailureType string const ( - FactoryRunFailureTypeFactoryDurableFailure FactoryRunFailureType = "factory_durable_failure" - FactoryRunFailureTypeFactoryLimitReached FactoryRunFailureType = "factory_limit_reached" - FactoryRunFailureTypeFactoryResumeDeclined FactoryRunFailureType = "factory_resume_declined" + FactoryRunFailureTypeFactoryAccountingIncomplete FactoryRunFailureType = "factory_accounting_incomplete" + FactoryRunFailureTypeFactoryDurableFailure FactoryRunFailureType = "factory_durable_failure" + FactoryRunFailureTypeFactoryLimitReached FactoryRunFailureType = "factory_limit_reached" + FactoryRunFailureTypeFactoryResumeDeclined FactoryRunFailureType = "factory_resume_declined" ) // Current or terminal state of a factory run. @@ -18218,9 +18262,22 @@ func (a *FactoryAPI) GetRunProgress(ctx context.Context, params *FactoryGetRunPr // // RPC method: session.factory.listRuns. // -// Returns: Factory runs in durable creation order. -func (a *FactoryAPI) ListRuns(ctx context.Context) (*FactoryListRunsResult, error) { +// Parameters: Parameters for paging factory runs. +// +// Returns: A page of factory runs in durable creation order. +func (a *FactoryAPI) ListRuns(ctx context.Context, params *FactoryListRunsRequest) (*FactoryListRunsResult, error) { req := map[string]any{"sessionId": a.sessionID} + if params != nil { + if params.AfterSeq != nil { + req["afterSeq"] = *params.AfterSeq + } + if params.BeforeSeq != nil { + req["beforeSeq"] = *params.BeforeSeq + } + if params.Limit != nil { + req["limit"] = *params.Limit + } + } raw, err := a.client.Request(ctx, "session.factory.listRuns", req) if err != nil { return nil, err diff --git a/go/rpc/zrpc_encoding.go b/go/rpc/zrpc_encoding.go index 8b69c28c2..29c253e1c 100644 --- a/go/rpc/zrpc_encoding.go +++ b/go/rpc/zrpc_encoding.go @@ -1075,6 +1075,12 @@ func unmarshalFactoryRunFailure(data []byte) (FactoryRunFailure, error) { } switch raw.Type { + case FactoryRunFailureTypeFactoryAccountingIncomplete: + var d FactoryRunFailureFactoryAccountingIncomplete + if err := json.Unmarshal(data, &d); err != nil { + return nil, err + } + return &d, nil case FactoryRunFailureTypeFactoryDurableFailure: var d FactoryRunFailureFactoryDurableFailure if err := json.Unmarshal(data, &d); err != nil { @@ -1109,6 +1115,17 @@ func (r RawFactoryRunFailureData) MarshalJSON() ([]byte, error) { }) } +func (r FactoryRunFailureFactoryAccountingIncomplete) MarshalJSON() ([]byte, error) { + type alias FactoryRunFailureFactoryAccountingIncomplete + return json.Marshal(struct { + Type FactoryRunFailureType `json:"type"` + alias + }{ + Type: r.Type(), + alias: alias(r), + }) +} + func (r FactoryRunFailureFactoryDurableFailure) MarshalJSON() ([]byte, error) { type alias FactoryRunFailureFactoryDurableFailure return json.Marshal(struct { diff --git a/go/rpc/zsession_events.go b/go/rpc/zsession_events.go index 0034af6a7..05c8fd548 100644 --- a/go/rpc/zsession_events.go +++ b/go/rpc/zsession_events.go @@ -1882,6 +1882,8 @@ type SubagentCompletedData struct { AgentDisplayName string `json:"agentDisplayName"` // Internal name of the sub-agent AgentName string `json:"agentName"` + // Whether the sub-agent was torn down by cancellation - its own abort, or an ancestor being killed - instead of finishing its work. Cancellation is not a failure, so the run still reports completion; this distinguishes a torn-down sub-agent from one that ran to the end. + Cancelled *bool `json:"cancelled,omitempty"` // Wall-clock duration of the sub-agent execution in milliseconds DurationMs *int64 `json:"durationMs,omitempty"` // Model used by the sub-agent diff --git a/java/pom.xml b/java/pom.xml index 3a235705f..c5e9f62ad 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -88,7 +88,7 @@ DO NOT EDIT MANUALLY. Updated by the update-copilot-dependency workflow. --> - ^1.0.79-6 + ^1.0.79-9 diff --git a/java/scripts/codegen/package-lock.json b/java/scripts/codegen/package-lock.json index 5b3197f6f..d4824feba 100644 --- a/java/scripts/codegen/package-lock.json +++ b/java/scripts/codegen/package-lock.json @@ -6,7 +6,7 @@ "": { "name": "copilot-sdk-java-codegen", "dependencies": { - "@github/copilot": "^1.0.79-6", + "@github/copilot": "^1.0.79-9", "json-schema": "^0.4.0", "tsx": "^4.23.1" } @@ -428,9 +428,9 @@ } }, "node_modules/@github/copilot": { - "version": "1.0.79-6", - "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.79-6.tgz", - "integrity": "sha512-per2cqu8WYuRXXvdU38cYZ7lUSQP5uBDY2QfFZow9FgGOyOToEWz+ykw2NYVKMnx0u1gIiI20Ovl4zec9Dob6w==", + "version": "1.0.79-9", + "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.79-9.tgz", + "integrity": "sha512-1QRRV3z1HA8sr3JUo4e2l+zFVbIGIOqnmTwzdJ+ilfr+mkmC7LYWkJxV3+j+zN0nq8JAgusSL/Schc43MPIqug==", "license": "SEE LICENSE IN LICENSE.md", "dependencies": { "detect-libc": "^2.1.2" @@ -439,20 +439,20 @@ "copilot": "npm-loader.js" }, "optionalDependencies": { - "@github/copilot-darwin-arm64": "1.0.79-6", - "@github/copilot-darwin-x64": "1.0.79-6", - "@github/copilot-linux-arm64": "1.0.79-6", - "@github/copilot-linux-x64": "1.0.79-6", - "@github/copilot-linuxmusl-arm64": "1.0.79-6", - "@github/copilot-linuxmusl-x64": "1.0.79-6", - "@github/copilot-win32-arm64": "1.0.79-6", - "@github/copilot-win32-x64": "1.0.79-6" + "@github/copilot-darwin-arm64": "1.0.79-9", + "@github/copilot-darwin-x64": "1.0.79-9", + "@github/copilot-linux-arm64": "1.0.79-9", + "@github/copilot-linux-x64": "1.0.79-9", + "@github/copilot-linuxmusl-arm64": "1.0.79-9", + "@github/copilot-linuxmusl-x64": "1.0.79-9", + "@github/copilot-win32-arm64": "1.0.79-9", + "@github/copilot-win32-x64": "1.0.79-9" } }, "node_modules/@github/copilot-darwin-arm64": { - "version": "1.0.79-6", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.79-6.tgz", - "integrity": "sha512-22aYilTJsiZX4w55DPXHvJFHSNwZWGip4DcQCQTvzzVIGc8MjlCQVModE9B6ElGs18hUaM3NH4piTYYT0HqNGQ==", + "version": "1.0.79-9", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.79-9.tgz", + "integrity": "sha512-DBTtv06Lpka1R+bkYfCWH38838b66bTLvsRsNjSuQV9AzgMPHjIn+Q2wAmU89rUyw5ej9iCIL5ppps+roi7qRw==", "cpu": [ "arm64" ], @@ -466,9 +466,9 @@ } }, "node_modules/@github/copilot-darwin-x64": { - "version": "1.0.79-6", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.79-6.tgz", - "integrity": "sha512-1ESqmLenOGkfD4KwgxtUZh+Wt5+qKwtLHGpfpRl+d/BSKj4cNo9FUO2vFEmF3zQefpmady3vmDURSdi65hlC+w==", + "version": "1.0.79-9", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.79-9.tgz", + "integrity": "sha512-j+XOqtVWa0EZ8lBR+xIsPVI7ErpDepgr3WuSfUCkC9fOdvnVJ1rbyBY3gCM/urY4wJNdbHc4t1vN9MjtRNpTGA==", "cpu": [ "x64" ], @@ -482,9 +482,9 @@ } }, "node_modules/@github/copilot-linux-arm64": { - "version": "1.0.79-6", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.79-6.tgz", - "integrity": "sha512-R8ZmfoJuOj1CT0zamAnRJi7nxhUPRFi3vo3dWlzSkto0Uwez+j2IJmyGIZEZbN65BJJJMD2/kg0GZQG+l+PmUA==", + "version": "1.0.79-9", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.79-9.tgz", + "integrity": "sha512-eYsJlokogYeXo2tCwqoDW+rELbLs0ht7b3R1nrl9odO6U6ZabIm6BilSLSxjWCtE1ZpqDLmdJbOV0/6cQwjvlA==", "cpu": [ "arm64" ], @@ -498,9 +498,9 @@ } }, "node_modules/@github/copilot-linux-x64": { - "version": "1.0.79-6", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.79-6.tgz", - "integrity": "sha512-P8Dgq59MIoiWKTRUGLrzzQ+NX54sqsHQFAoTJPis2K0N1O7BUTN4RDl8aPN3v4c1MCkbH9YzjmT8ns1JPeIUuQ==", + "version": "1.0.79-9", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.79-9.tgz", + "integrity": "sha512-KknlE4hT3rw/Ne1aL+F1KEQrq40d4I8aGfxAEuahmn3NaM7CSBikDVIsAvkmTq7e2vHzaLytpclc8+gcEAIK6Q==", "cpu": [ "x64" ], @@ -514,9 +514,9 @@ } }, "node_modules/@github/copilot-linuxmusl-arm64": { - "version": "1.0.79-6", - "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.79-6.tgz", - "integrity": "sha512-6CS4YuL1x8YwoEfr/dPcq+ZQYTJQTukO/Uuv88eZ9/RWGdhcls14j/WWPcte8LLk2EFJXchM9WPmkOmZppPkwQ==", + "version": "1.0.79-9", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.79-9.tgz", + "integrity": "sha512-Wrk+vpzg9ho/uC7ajNgIEjPShtB+pGlaJV+8rvYcHeQG6Gyx8YrPMI+OMdYou6RI9firqIaywT0UPuy9PUzoOg==", "cpu": [ "arm64" ], @@ -530,9 +530,9 @@ } }, "node_modules/@github/copilot-linuxmusl-x64": { - "version": "1.0.79-6", - "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.79-6.tgz", - "integrity": "sha512-y+fX6P4oXKADqXsEWCTqWFmLECTm2jVmxkCEC6C1TGqHDzN0+X2pJQd/LTSOZFmtlgxVjusL93eCk1mwa2MapQ==", + "version": "1.0.79-9", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.79-9.tgz", + "integrity": "sha512-ERULakTfCb4KYK4hGcMPRp5qm5K7KqKFHhGrAdn1VLrm8QsXDYzl2vUO4tIU/TxRW5VA9pmWh30JpCjQScSnDA==", "cpu": [ "x64" ], @@ -546,9 +546,9 @@ } }, "node_modules/@github/copilot-win32-arm64": { - "version": "1.0.79-6", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.79-6.tgz", - "integrity": "sha512-E/JxBAA4Dqy7d81mCBfZ1L9XJH7eK1DBQn2Jlur5oBvA3qluX05kXcGTlmGkGVA2mkM9rD5zaSC8yZ5grq40HQ==", + "version": "1.0.79-9", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.79-9.tgz", + "integrity": "sha512-XAe2calnhhiAVdIb2jUn4Bh961nu4zz3N5tcrb5CNjDSbjEE2LQf8CaNV4h/QhHjjpcmqFIfMQBMYxW1+9xixg==", "cpu": [ "arm64" ], @@ -562,9 +562,9 @@ } }, "node_modules/@github/copilot-win32-x64": { - "version": "1.0.79-6", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.79-6.tgz", - "integrity": "sha512-7Hlfb438QNqU34OhhRiJiElWoyP7xED5iZunU1vC00L1RbrsTXDeC41y2oAxYiXa/bX60TV4x/oWuGli/0no6A==", + "version": "1.0.79-9", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.79-9.tgz", + "integrity": "sha512-/nK1IR5Vho2r6vuzq9xziVWwlgan41eL62Oo0feu7RaMvhS+f40l4jZCjuWLbeysh/we642qCyRjK8gkv730lA==", "cpu": [ "x64" ], diff --git a/java/scripts/codegen/package.json b/java/scripts/codegen/package.json index bb8936e75..5e3630ec0 100644 --- a/java/scripts/codegen/package.json +++ b/java/scripts/codegen/package.json @@ -7,7 +7,7 @@ "generate:java": "tsx java.ts" }, "dependencies": { - "@github/copilot": "^1.0.79-6", + "@github/copilot": "^1.0.79-9", "json-schema": "^0.4.0", "tsx": "^4.23.1" } diff --git a/java/src/generated/java/com/github/copilot/generated/SubagentCompletedEvent.java b/java/src/generated/java/com/github/copilot/generated/SubagentCompletedEvent.java index f32613579..f7300ddbf 100644 --- a/java/src/generated/java/com/github/copilot/generated/SubagentCompletedEvent.java +++ b/java/src/generated/java/com/github/copilot/generated/SubagentCompletedEvent.java @@ -47,7 +47,9 @@ public record SubagentCompletedEventData( /** Total tokens (input + output) consumed by the sub-agent */ @JsonProperty("totalTokens") Long totalTokens, /** Wall-clock duration of the sub-agent execution in milliseconds */ - @JsonProperty("durationMs") Long durationMs + @JsonProperty("durationMs") Long durationMs, + /** Whether the sub-agent was torn down by cancellation - its own abort, or an ancestor being killed - instead of finishing its work. Cancellation is not a failure, so the run still reports completion; this distinguishes a torn-down sub-agent from one that ran to the end. */ + @JsonProperty("cancelled") Boolean cancelled ) { } } diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/FactoryAgentOptions.java b/java/src/generated/java/com/github/copilot/generated/rpc/FactoryAgentOptions.java index 675e715e8..9910d4f7f 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/FactoryAgentOptions.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/FactoryAgentOptions.java @@ -26,6 +26,12 @@ public record FactoryAgentOptions( /** Optional JSON Schema for structured agent output. */ @JsonProperty("schema") Object schema, /** Optional model identifier for the subagent. */ - @JsonProperty("model") String model + @JsonProperty("model") String model, + /** Optional reasoning effort for the subagent. This field is accepted but not yet honored. */ + @JsonProperty("reasoningEffort") String reasoningEffort, + /** Optional context tier for the subagent. This field is accepted but not yet honored. */ + @JsonProperty("contextTier") ContextTier contextTier, + /** Optional custom agent name for the subagent. This field is accepted but not yet honored. */ + @JsonProperty("agent") String agent ) { } diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SandboxConfig.java b/java/src/generated/java/com/github/copilot/generated/rpc/SandboxConfig.java index cfb2c23ff..d9130eb81 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SandboxConfig.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SandboxConfig.java @@ -27,10 +27,8 @@ public record SandboxConfig( @JsonProperty("userPolicy") SandboxConfigUserPolicy userPolicy, /** Whether to auto-add the current working directory to readwritePaths. Default: true. */ @JsonProperty("addCurrentWorkingDirectory") Boolean addCurrentWorkingDirectory, - /** Whether to inject the Copilot GitHub token as an `http..extraheader` so authenticated HTTPS git works inside the sandbox without the shell-based credential helper the sandbox blocks. Default: false (opt-in). */ - @JsonProperty("gitAuth") Boolean gitAuth, - /** Whether to export `GH_TOKEN` so the `gh` CLI authenticates inside the sandbox without the OS keyring the sandbox blocks. Default: false (opt-in). */ - @JsonProperty("ghAuth") Boolean ghAuth, + /** Credential-injection capability flags. */ + @JsonProperty("auth") SandboxConfigAuth auth, /** Whether to auto-grant read access to common developer-tool caches, registries, and toolchains in their default home locations (cargo, go, npm, Maven, and more), plus read-write access to (and, on Unix, up-front creation of) the scratch caches builds write on every run (go-build, ccache, sccache, Gradle caches, Cargo lock/tracker files), so builds work without extra configuration; a relocated CARGO_HOME additionally gets its Cargo lock files granted read-write. Default: true (enabled by default; set to false to opt out). */ @JsonProperty("allowDevToolAccess") Boolean allowDevToolAccess ) { diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SandboxConfigAuth.java b/java/src/generated/java/com/github/copilot/generated/rpc/SandboxConfigAuth.java new file mode 100644 index 000000000..4a3612e0b --- /dev/null +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SandboxConfigAuth.java @@ -0,0 +1,29 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +// AUTO-GENERATED FILE - DO NOT EDIT +// Generated from: api.schema.json + +package com.github.copilot.generated.rpc; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import javax.annotation.processing.Generated; + +/** + * Credential-injection capability flags applied while the sandbox is enabled. + * + * @since 1.0.0 + */ +@javax.annotation.processing.Generated("copilot-sdk-codegen") +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public record SandboxConfigAuth( + /** Whether to inject git credentials as an `http..extraheader` so authenticated HTTPS git works inside the sandbox without the shell-based credential helper the sandbox blocks. github.com is served by the Copilot token; every other forge (Azure DevOps, GitHub Enterprise Server, GitLab, ...) by a credential the host resolves from the user's own helper before the sandbox is applied. Default: false (opt-in). */ + @JsonProperty("git") Boolean git, + /** Whether to export `GH_TOKEN` so the `gh` CLI authenticates inside the sandbox without the OS keyring the sandbox blocks. Default: false (opt-in). */ + @JsonProperty("gh") Boolean gh +) { +} diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryApi.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryApi.java index 6d15ac17c..e0628ea3d 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryApi.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryApi.java @@ -83,14 +83,19 @@ public CompletableFuture getRun(SessionFactoryGetRun } /** - * Empty parameters for listing factory runs. + * Parameters for paging factory runs. + *

+ * 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 listRuns() { - return caller.invoke("session.factory.listRuns", java.util.Map.of("sessionId", this.sessionId), SessionFactoryListRunsResult.class); + public CompletableFuture listRuns(SessionFactoryListRunsParams params) { + com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params); + _p.put("sessionId", this.sessionId); + return caller.invoke("session.factory.listRuns", _p, SessionFactoryListRunsResult.class); } /** diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryListRunsParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryListRunsParams.java index e3b90f07f..41de4ae4a 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryListRunsParams.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryListRunsParams.java @@ -14,7 +14,7 @@ import javax.annotation.processing.Generated; /** - * Empty parameters for listing factory runs. + * Parameters for paging factory runs. * * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 @@ -25,6 +25,12 @@ @JsonIgnoreProperties(ignoreUnknown = true) public record SessionFactoryListRunsParams( /** Target session identifier */ - @JsonProperty("sessionId") String sessionId + @JsonProperty("sessionId") String sessionId, + /** Exclusive forward cursor. */ + @JsonProperty("afterSeq") Long afterSeq, + /** Exclusive backward cursor. */ + @JsonProperty("beforeSeq") Long beforeSeq, + /** Maximum terminal runs to return. Defaults to 200 and is capped at 500. */ + @JsonProperty("limit") Long limit ) { } diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryListRunsResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryListRunsResult.java index 7d1ac45a9..3a23bc369 100644 --- a/java/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryListRunsResult.java +++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryListRunsResult.java @@ -15,7 +15,7 @@ import javax.annotation.processing.Generated; /** - * Factory runs in durable creation order. + * A page of factory runs in durable creation order. * * @apiNote This method is experimental and may change in a future version. * @since 1.0.0 @@ -25,6 +25,14 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public record SessionFactoryListRunsResult( - @JsonProperty("runs") List runs + @JsonProperty("runs") List runs, + /** Oldest terminal-run cursor in this page, or null when the terminal window is empty. */ + @JsonProperty("oldestSeq") Long oldestSeq, + /** Newest terminal-run cursor in this page, or null when the terminal window is empty. */ + @JsonProperty("newestSeq") Long newestSeq, + /** Whether terminal runs newer than this page exist. */ + @JsonProperty("hasMoreNewer") Boolean hasMoreNewer, + /** Number of terminal runs older than this page. */ + @JsonProperty("omittedOlder") Long omittedOlder ) { } diff --git a/nodejs/package-lock.json b/nodejs/package-lock.json index cd571ced1..39fa8b6fa 100644 --- a/nodejs/package-lock.json +++ b/nodejs/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.0-dev", "license": "MIT", "dependencies": { - "@github/copilot": "^1.0.79-6", + "@github/copilot": "^1.0.79-9", "koffi": "^3.1.0", "vscode-jsonrpc": "^8.2.1", "zod": "^4.3.6" @@ -700,9 +700,9 @@ } }, "node_modules/@github/copilot": { - "version": "1.0.79-6", - "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.79-6.tgz", - "integrity": "sha512-per2cqu8WYuRXXvdU38cYZ7lUSQP5uBDY2QfFZow9FgGOyOToEWz+ykw2NYVKMnx0u1gIiI20Ovl4zec9Dob6w==", + "version": "1.0.79-9", + "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.79-9.tgz", + "integrity": "sha512-1QRRV3z1HA8sr3JUo4e2l+zFVbIGIOqnmTwzdJ+ilfr+mkmC7LYWkJxV3+j+zN0nq8JAgusSL/Schc43MPIqug==", "license": "SEE LICENSE IN LICENSE.md", "dependencies": { "detect-libc": "^2.1.2" @@ -711,20 +711,20 @@ "copilot": "npm-loader.js" }, "optionalDependencies": { - "@github/copilot-darwin-arm64": "1.0.79-6", - "@github/copilot-darwin-x64": "1.0.79-6", - "@github/copilot-linux-arm64": "1.0.79-6", - "@github/copilot-linux-x64": "1.0.79-6", - "@github/copilot-linuxmusl-arm64": "1.0.79-6", - "@github/copilot-linuxmusl-x64": "1.0.79-6", - "@github/copilot-win32-arm64": "1.0.79-6", - "@github/copilot-win32-x64": "1.0.79-6" + "@github/copilot-darwin-arm64": "1.0.79-9", + "@github/copilot-darwin-x64": "1.0.79-9", + "@github/copilot-linux-arm64": "1.0.79-9", + "@github/copilot-linux-x64": "1.0.79-9", + "@github/copilot-linuxmusl-arm64": "1.0.79-9", + "@github/copilot-linuxmusl-x64": "1.0.79-9", + "@github/copilot-win32-arm64": "1.0.79-9", + "@github/copilot-win32-x64": "1.0.79-9" } }, "node_modules/@github/copilot-darwin-arm64": { - "version": "1.0.79-6", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.79-6.tgz", - "integrity": "sha512-22aYilTJsiZX4w55DPXHvJFHSNwZWGip4DcQCQTvzzVIGc8MjlCQVModE9B6ElGs18hUaM3NH4piTYYT0HqNGQ==", + "version": "1.0.79-9", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.79-9.tgz", + "integrity": "sha512-DBTtv06Lpka1R+bkYfCWH38838b66bTLvsRsNjSuQV9AzgMPHjIn+Q2wAmU89rUyw5ej9iCIL5ppps+roi7qRw==", "cpu": [ "arm64" ], @@ -738,9 +738,9 @@ } }, "node_modules/@github/copilot-darwin-x64": { - "version": "1.0.79-6", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.79-6.tgz", - "integrity": "sha512-1ESqmLenOGkfD4KwgxtUZh+Wt5+qKwtLHGpfpRl+d/BSKj4cNo9FUO2vFEmF3zQefpmady3vmDURSdi65hlC+w==", + "version": "1.0.79-9", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.79-9.tgz", + "integrity": "sha512-j+XOqtVWa0EZ8lBR+xIsPVI7ErpDepgr3WuSfUCkC9fOdvnVJ1rbyBY3gCM/urY4wJNdbHc4t1vN9MjtRNpTGA==", "cpu": [ "x64" ], @@ -754,9 +754,9 @@ } }, "node_modules/@github/copilot-linux-arm64": { - "version": "1.0.79-6", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.79-6.tgz", - "integrity": "sha512-R8ZmfoJuOj1CT0zamAnRJi7nxhUPRFi3vo3dWlzSkto0Uwez+j2IJmyGIZEZbN65BJJJMD2/kg0GZQG+l+PmUA==", + "version": "1.0.79-9", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.79-9.tgz", + "integrity": "sha512-eYsJlokogYeXo2tCwqoDW+rELbLs0ht7b3R1nrl9odO6U6ZabIm6BilSLSxjWCtE1ZpqDLmdJbOV0/6cQwjvlA==", "cpu": [ "arm64" ], @@ -770,9 +770,9 @@ } }, "node_modules/@github/copilot-linux-x64": { - "version": "1.0.79-6", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.79-6.tgz", - "integrity": "sha512-P8Dgq59MIoiWKTRUGLrzzQ+NX54sqsHQFAoTJPis2K0N1O7BUTN4RDl8aPN3v4c1MCkbH9YzjmT8ns1JPeIUuQ==", + "version": "1.0.79-9", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.79-9.tgz", + "integrity": "sha512-KknlE4hT3rw/Ne1aL+F1KEQrq40d4I8aGfxAEuahmn3NaM7CSBikDVIsAvkmTq7e2vHzaLytpclc8+gcEAIK6Q==", "cpu": [ "x64" ], @@ -786,9 +786,9 @@ } }, "node_modules/@github/copilot-linuxmusl-arm64": { - "version": "1.0.79-6", - "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.79-6.tgz", - "integrity": "sha512-6CS4YuL1x8YwoEfr/dPcq+ZQYTJQTukO/Uuv88eZ9/RWGdhcls14j/WWPcte8LLk2EFJXchM9WPmkOmZppPkwQ==", + "version": "1.0.79-9", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.79-9.tgz", + "integrity": "sha512-Wrk+vpzg9ho/uC7ajNgIEjPShtB+pGlaJV+8rvYcHeQG6Gyx8YrPMI+OMdYou6RI9firqIaywT0UPuy9PUzoOg==", "cpu": [ "arm64" ], @@ -802,9 +802,9 @@ } }, "node_modules/@github/copilot-linuxmusl-x64": { - "version": "1.0.79-6", - "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.79-6.tgz", - "integrity": "sha512-y+fX6P4oXKADqXsEWCTqWFmLECTm2jVmxkCEC6C1TGqHDzN0+X2pJQd/LTSOZFmtlgxVjusL93eCk1mwa2MapQ==", + "version": "1.0.79-9", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.79-9.tgz", + "integrity": "sha512-ERULakTfCb4KYK4hGcMPRp5qm5K7KqKFHhGrAdn1VLrm8QsXDYzl2vUO4tIU/TxRW5VA9pmWh30JpCjQScSnDA==", "cpu": [ "x64" ], @@ -818,9 +818,9 @@ } }, "node_modules/@github/copilot-win32-arm64": { - "version": "1.0.79-6", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.79-6.tgz", - "integrity": "sha512-E/JxBAA4Dqy7d81mCBfZ1L9XJH7eK1DBQn2Jlur5oBvA3qluX05kXcGTlmGkGVA2mkM9rD5zaSC8yZ5grq40HQ==", + "version": "1.0.79-9", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.79-9.tgz", + "integrity": "sha512-XAe2calnhhiAVdIb2jUn4Bh961nu4zz3N5tcrb5CNjDSbjEE2LQf8CaNV4h/QhHjjpcmqFIfMQBMYxW1+9xixg==", "cpu": [ "arm64" ], @@ -834,9 +834,9 @@ } }, "node_modules/@github/copilot-win32-x64": { - "version": "1.0.79-6", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.79-6.tgz", - "integrity": "sha512-7Hlfb438QNqU34OhhRiJiElWoyP7xED5iZunU1vC00L1RbrsTXDeC41y2oAxYiXa/bX60TV4x/oWuGli/0no6A==", + "version": "1.0.79-9", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.79-9.tgz", + "integrity": "sha512-/nK1IR5Vho2r6vuzq9xziVWwlgan41eL62Oo0feu7RaMvhS+f40l4jZCjuWLbeysh/we642qCyRjK8gkv730lA==", "cpu": [ "x64" ], diff --git a/nodejs/package.json b/nodejs/package.json index 5becc3d3c..a4160cd2c 100644 --- a/nodejs/package.json +++ b/nodejs/package.json @@ -56,7 +56,7 @@ "author": "GitHub", "license": "MIT", "dependencies": { - "@github/copilot": "^1.0.79-6", + "@github/copilot": "^1.0.79-9", "koffi": "^3.1.0", "vscode-jsonrpc": "^8.2.1", "zod": "^4.3.6" diff --git a/nodejs/samples/package-lock.json b/nodejs/samples/package-lock.json index 5794a0032..ad8403002 100644 --- a/nodejs/samples/package-lock.json +++ b/nodejs/samples/package-lock.json @@ -18,7 +18,7 @@ "version": "0.0.0-dev", "license": "MIT", "dependencies": { - "@github/copilot": "^1.0.79-6", + "@github/copilot": "^1.0.79-9", "koffi": "^3.1.0", "vscode-jsonrpc": "^8.2.1", "zod": "^4.3.6" diff --git a/nodejs/src/generated/rpc.ts b/nodejs/src/generated/rpc.ts index 7a8c66909..042a7d0bb 100644 --- a/nodejs/src/generated/rpc.ts +++ b/nodejs/src/generated/rpc.ts @@ -686,6 +686,17 @@ export type FactoryRunFailure = */ runId: string; type: "factory_durable_failure"; + } + | { + /** + * Factory run identifier. + */ + runId: string; + /** + * Confirmed usage in nano-AIU, representing the floor of what the run spent. + */ + drainedNanoAiu: number; + type: "factory_accounting_incomplete"; }; /** * Cumulative resource ceiling that stopped a factory run. @@ -5733,6 +5744,15 @@ export interface FactoryAgentOptions { * Optional model identifier for the subagent. */ model?: string; + /** + * Optional reasoning effort for the subagent. This field is accepted but not yet honored. + */ + reasoningEffort?: string; + contextTier?: ContextTier; + /** + * Optional custom agent name for the subagent. This field is accepted but not yet honored. + */ + agent?: string; } /** * Parameters for one factory-scoped subagent call. @@ -5986,15 +6006,28 @@ export interface FactoryJournalPutRequest { }; } /** - * Empty parameters for listing factory runs. + * Parameters for paging factory runs. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "FactoryListRunsRequest". */ /** @experimental */ -export interface FactoryListRunsRequest {} +export interface FactoryListRunsRequest { + /** + * Exclusive forward cursor. + */ + afterSeq?: number; + /** + * Exclusive backward cursor. + */ + beforeSeq?: number; + /** + * Maximum terminal runs to return. Defaults to 200 and is capped at 500. + */ + limit?: number; +} /** - * Factory runs in durable creation order. + * A page of factory runs in durable creation order. * * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema * via the `definition` "FactoryListRunsResult". @@ -6002,6 +6035,22 @@ export interface FactoryListRunsRequest {} /** @experimental */ export interface FactoryListRunsResult { runs: FactoryRunSummary[]; + /** + * Oldest terminal-run cursor in this page, or null when the terminal window is empty. + */ + oldestSeq?: number | null; + /** + * Newest terminal-run cursor in this page, or null when the terminal window is empty. + */ + newestSeq?: number | null; + /** + * Whether terminal runs newer than this page exist. + */ + hasMoreNewer?: boolean; + /** + * Number of terminal runs older than this page. + */ + omittedOlder?: number; } /** * Durable factory run summary with read-time live overlays. @@ -13240,14 +13289,7 @@ export interface SandboxConfig { * Whether to auto-add the current working directory to readwritePaths. Default: true. */ addCurrentWorkingDirectory?: boolean; - /** - * Whether to inject the Copilot GitHub token as an `http..extraheader` so authenticated HTTPS git works inside the sandbox without the shell-based credential helper the sandbox blocks. Default: false (opt-in). - */ - gitAuth?: boolean; - /** - * Whether to export `GH_TOKEN` so the `gh` CLI authenticates inside the sandbox without the OS keyring the sandbox blocks. Default: false (opt-in). - */ - ghAuth?: boolean; + auth?: SandboxConfigAuth; /** * Whether to auto-grant read access to common developer-tool caches, registries, and toolchains in their default home locations (cargo, go, npm, Maven, and more), plus read-write access to (and, on Unix, up-front creation of) the scratch caches builds write on every run (go-build, ccache, sccache, Gradle caches, Cargo lock/tracker files), so builds work without extra configuration; a relocated CARGO_HOME additionally gets its Cargo lock files granted read-write. Default: true (enabled by default; set to false to opt out). */ @@ -13366,6 +13408,23 @@ export interface SandboxConfigUserPolicyExperimentalSeatbelt { */ keychainAccess?: boolean; } +/** + * Credential-injection capability flags applied while the sandbox is enabled. + * + * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema + * via the `definition` "SandboxConfigAuth". + */ +/** @experimental */ +export interface SandboxConfigAuth { + /** + * Whether to inject git credentials as an `http..extraheader` so authenticated HTTPS git works inside the sandbox without the shell-based credential helper the sandbox blocks. github.com is served by the Copilot token; every other forge (Azure DevOps, GitHub Enterprise Server, GitLab, ...) by a credential the host resolves from the user's own helper before the sandbox is applied. Default: false (opt-in). + */ + git?: boolean; + /** + * Whether to export `GH_TOKEN` so the `gh` CLI authenticates inside the sandbox without the OS keyring the sandbox blocks. Default: false (opt-in). + */ + gh?: boolean; +} /** * Register an absolute-time scheduled prompt. * @@ -19726,10 +19785,12 @@ export function createSessionRpc(connection: MessageConnection, sessionId: strin /** * Lists durable factory runs for this session in creation order. * - * @returns Factory runs in durable creation order. + * @param params Parameters for paging factory runs. + * + * @returns A page of factory runs in durable creation order. */ - listRuns: async (): Promise => - connection.sendRequest("session.factory.listRuns", { sessionId }), + listRuns: async (params: FactoryListRunsRequest): Promise => + connection.sendRequest("session.factory.listRuns", { sessionId, ...params }), /** * Gets durable and live observability detail for one factory run. * diff --git a/nodejs/src/generated/session-events.ts b/nodejs/src/generated/session-events.ts index 19d044d6d..db24fc23e 100644 --- a/nodejs/src/generated/session-events.ts +++ b/nodejs/src/generated/session-events.ts @@ -5561,6 +5561,10 @@ export interface SubagentCompletedData { * Internal name of the sub-agent */ agentName: string; + /** + * Whether the sub-agent was torn down by cancellation - its own abort, or an ancestor being killed - instead of finishing its work. Cancellation is not a failure, so the run still reports completion; this distinguishes a torn-down sub-agent from one that ran to the end. + */ + cancelled?: boolean; /** * Wall-clock duration of the sub-agent execution in milliseconds */ diff --git a/nodejs/src/session.ts b/nodejs/src/session.ts index ed575a515..5cc49fb75 100644 --- a/nodejs/src/session.ts +++ b/nodejs/src/session.ts @@ -487,7 +487,7 @@ export class CopilotSession { }) as SessionFactoryApi["resume"], getRun: async (runId) => toPublicFactoryRunResult(await this.rpc.factory.getRun({ runId })), waitForRun: (runId, options) => this.waitForFactoryRun(runId, options?.signal), - listRuns: async () => (await this.rpc.factory.listRuns()).runs, + listRuns: async () => (await this.rpc.factory.listRuns({})).runs, getRunDetail: (runId) => this.rpc.factory.getRunDetail({ runId }), getRunProgress: (runId, options = {}) => this.rpc.factory.getRunProgress({ runId, ...options }), diff --git a/python/copilot/generated/rpc.py b/python/copilot/generated/rpc.py index a9511540c..103149088 100644 --- a/python/copilot/generated/rpc.py +++ b/python/copilot/generated/rpc.py @@ -2284,29 +2284,47 @@ class FactoryAgentOptions: Subagent execution options. """ + agent: str | None = None + """Optional custom agent name for the subagent. This field is accepted but not yet honored.""" + + context_tier: ContextTier | None = None + """Optional context tier for the subagent. This field is accepted but not yet honored.""" + label: str | None = None """Optional label distinguishing otherwise identical memoized agent calls.""" model: str | None = None """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.""" + schema: Any = None """Optional JSON Schema for structured agent output.""" @staticmethod def from_dict(obj: Any) -> 'FactoryAgentOptions': assert isinstance(obj, dict) + agent = from_union([from_str, from_none], obj.get("agent")) + context_tier = from_union([ContextTier, from_none], obj.get("contextTier")) label = from_union([from_str, from_none], obj.get("label")) model = from_union([from_str, from_none], obj.get("model")) + reasoning_effort = from_union([from_str, from_none], obj.get("reasoningEffort")) schema = obj.get("schema") - return FactoryAgentOptions(label, model, schema) + return FactoryAgentOptions(agent, context_tier, label, model, reasoning_effort, schema) def to_dict(self) -> dict: result: dict = {} + if self.agent is not None: + result["agent"] = from_union([from_str, from_none], self.agent) + if self.context_tier is not None: + result["contextTier"] = from_union([lambda x: to_enum(ContextTier, x), from_none], self.context_tier) if self.label is not None: result["label"] = from_union([from_str, from_none], self.label) if self.model is not None: result["model"] = from_union([from_str, from_none], self.model) + if self.reasoning_effort is not None: + result["reasoningEffort"] = from_union([from_str, from_none], self.reasoning_effort) if self.schema is not None: result["schema"] = self.schema return result @@ -2690,14 +2708,33 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class FactoryListRunsRequest: - """Empty parameters for listing factory runs.""" + """Parameters for paging factory runs.""" + + after_seq: int | None = None + """Exclusive forward cursor.""" + + before_seq: int | None = None + """Exclusive backward cursor.""" + + limit: int | None = None + """Maximum terminal runs to return. Defaults to 200 and is capped at 500.""" + @staticmethod def from_dict(obj: Any) -> 'FactoryListRunsRequest': assert isinstance(obj, dict) - return FactoryListRunsRequest() + after_seq = from_union([from_int, from_none], obj.get("afterSeq")) + before_seq = from_union([from_int, from_none], obj.get("beforeSeq")) + limit = from_union([from_int, from_none], obj.get("limit")) + return FactoryListRunsRequest(after_seq, before_seq, limit) def to_dict(self) -> dict: result: dict = {} + if self.after_seq is not None: + result["afterSeq"] = from_union([from_int, from_none], self.after_seq) + if self.before_seq is not None: + result["beforeSeq"] = from_union([from_int, from_none], self.before_seq) + if self.limit is not None: + result["limit"] = from_union([from_int, from_none], self.limit) return result # Experimental: this type is part of an experimental API and may change or be removed. @@ -2748,6 +2785,7 @@ class FactoryRunFailureKind(Enum): TIMEOUT_SECONDS = "timeoutSeconds" class FactoryRunFailureType(Enum): + FACTORY_ACCOUNTING_INCOMPLETE = "factory_accounting_incomplete" FACTORY_DURABLE_FAILURE = "factory_durable_failure" FACTORY_LIMIT_REACHED = "factory_limit_reached" FACTORY_RESUME_DECLINED = "factory_resume_declined" @@ -8102,6 +8140,40 @@ def to_dict(self) -> dict: result["branch"] = from_union([from_str, from_none], self.branch) return result +# Experimental: this type is part of an experimental API and may change or be removed. +@dataclass +class SandboxConfigAuth: + """Credential-injection capability flags. + + Credential-injection capability flags applied while the sandbox is enabled. + """ + gh: bool | None = None + """Whether to export `GH_TOKEN` so the `gh` CLI authenticates inside the sandbox without the + OS keyring the sandbox blocks. Default: false (opt-in). + """ + git: bool | None = None + """Whether to inject git credentials as an `http..extraheader` so authenticated HTTPS + git works inside the sandbox without the shell-based credential helper the sandbox + blocks. github.com is served by the Copilot token; every other forge (Azure DevOps, + GitHub Enterprise Server, GitLab, ...) by a credential the host resolves from the user's + own helper before the sandbox is applied. Default: false (opt-in). + """ + + @staticmethod + def from_dict(obj: Any) -> 'SandboxConfigAuth': + assert isinstance(obj, dict) + gh = from_union([from_bool, from_none], obj.get("gh")) + git = from_union([from_bool, from_none], obj.get("git")) + return SandboxConfigAuth(gh, git) + + def to_dict(self) -> dict: + result: dict = {} + if self.gh is not None: + result["gh"] = from_union([from_bool, from_none], self.gh) + if self.git is not None: + result["git"] = from_union([from_bool, from_none], self.git) + return result + # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class SandboxConfigUserPolicyExperimentalSeatbelt: @@ -14079,6 +14151,8 @@ class FactoryRunFailure: """Machine-readable factory run failure. Machine-readable failure details for an errored run. + + The run stopped because its usage accounting could not be completed. """ run_id: str """Factory run identifier. @@ -14101,6 +14175,9 @@ class FactoryRunFailure: operation: FactoryDurableOperation | None = None """Execution-critical durable operation that failed.""" + drained_nano_aiu: int | None = None + """Confirmed usage in nano-AIU, representing the floor of what the run spent.""" + @staticmethod def from_dict(obj: Any) -> 'FactoryRunFailure': assert isinstance(obj, dict) @@ -14111,7 +14188,8 @@ def from_dict(obj: Any) -> 'FactoryRunFailure': 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")) - return FactoryRunFailure(run_id, type, kind, value, reason, code, 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) def to_dict(self) -> dict: result: dict = {} @@ -14127,6 +14205,8 @@ def to_dict(self) -> dict: result["code"] = from_union([from_str, from_none], self.code) if self.operation is not None: result["operation"] = from_union([lambda x: to_enum(FactoryDurableOperation, x), from_none], self.operation) + if self.drained_nano_aiu is not None: + result["drainedNanoAiu"] = from_union([from_int, from_none], self.drained_nano_aiu) return result # Experimental: this type is part of an experimental API and may change or be removed. @@ -25647,15 +25727,9 @@ class SandboxConfig: Cargo lock files granted read-write. Default: true (enabled by default; set to false to opt out). """ - gh_auth: bool | None = None - """Whether to export `GH_TOKEN` so the `gh` CLI authenticates inside the sandbox without the - OS keyring the sandbox blocks. Default: false (opt-in). - """ - git_auth: bool | None = None - """Whether to inject the Copilot GitHub token as an `http..extraheader` so - authenticated HTTPS git works inside the sandbox without the shell-based credential - helper the sandbox blocks. Default: false (opt-in). - """ + auth: SandboxConfigAuth | None = None + """Credential-injection capability flags.""" + user_policy: SandboxConfigUserPolicy | None = None """User-managed sandbox policy fragment merged into the auto-discovered base policy.""" @@ -25665,10 +25739,9 @@ def from_dict(obj: Any) -> 'SandboxConfig': enabled = from_bool(obj.get("enabled")) add_current_working_directory = from_union([from_bool, from_none], obj.get("addCurrentWorkingDirectory")) allow_dev_tool_access = from_union([from_bool, from_none], obj.get("allowDevToolAccess")) - gh_auth = from_union([from_bool, from_none], obj.get("ghAuth")) - git_auth = from_union([from_bool, from_none], obj.get("gitAuth")) + auth = from_union([SandboxConfigAuth.from_dict, from_none], obj.get("auth")) user_policy = from_union([SandboxConfigUserPolicy.from_dict, from_none], obj.get("userPolicy")) - return SandboxConfig(enabled, add_current_working_directory, allow_dev_tool_access, gh_auth, git_auth, user_policy) + return SandboxConfig(enabled, add_current_working_directory, allow_dev_tool_access, auth, user_policy) def to_dict(self) -> dict: result: dict = {} @@ -25677,10 +25750,8 @@ def to_dict(self) -> dict: result["addCurrentWorkingDirectory"] = from_union([from_bool, from_none], self.add_current_working_directory) if self.allow_dev_tool_access is not None: result["allowDevToolAccess"] = from_union([from_bool, from_none], self.allow_dev_tool_access) - if self.gh_auth is not None: - result["ghAuth"] = from_union([from_bool, from_none], self.gh_auth) - if self.git_auth is not None: - result["gitAuth"] = from_union([from_bool, from_none], self.git_auth) + if self.auth is not None: + result["auth"] = from_union([lambda x: to_class(SandboxConfigAuth, x), from_none], self.auth) if self.user_policy is not None: result["userPolicy"] = from_union([lambda x: to_class(SandboxConfigUserPolicy, x), from_none], self.user_policy) return result @@ -25759,19 +25830,42 @@ def to_dict(self) -> dict: # Experimental: this type is part of an experimental API and may change or be removed. @dataclass class FactoryListRunsResult: - """Factory runs in durable creation order.""" + """A page of factory runs in durable creation order.""" runs: list[FactoryRunSummary] + has_more_newer: bool | None = None + """Whether terminal runs newer than this page exist.""" + + newest_seq: int | None = None + """Newest terminal-run cursor in this page, or null when the terminal window is empty.""" + + oldest_seq: int | None = None + """Oldest terminal-run cursor in this page, or null when the terminal window is empty.""" + + omitted_older: int | None = None + """Number of terminal runs older than this page.""" @staticmethod def from_dict(obj: Any) -> 'FactoryListRunsResult': assert isinstance(obj, dict) runs = from_list(FactoryRunSummary.from_dict, obj.get("runs")) - return FactoryListRunsResult(runs) + has_more_newer = from_union([from_bool, from_none], obj.get("hasMoreNewer")) + newest_seq = from_union([from_int, from_none], obj.get("newestSeq")) + oldest_seq = from_union([from_int, from_none], obj.get("oldestSeq")) + omitted_older = from_union([from_int, from_none], obj.get("omittedOlder")) + return FactoryListRunsResult(runs, has_more_newer, newest_seq, oldest_seq, omitted_older) def to_dict(self) -> dict: result: dict = {} result["runs"] = from_list(lambda x: to_class(FactoryRunSummary, x), self.runs) + if self.has_more_newer is not None: + result["hasMoreNewer"] = from_union([from_bool, from_none], self.has_more_newer) + if self.newest_seq is not None: + result["newestSeq"] = from_union([from_int, from_none], self.newest_seq) + if self.oldest_seq is not None: + result["oldestSeq"] = from_union([from_int, from_none], self.oldest_seq) + if self.omitted_older is not None: + result["omittedOlder"] = from_union([from_int, from_none], self.omitted_older) return result # Experimental: this type is part of an experimental API and may change or be removed. @@ -29380,6 +29474,7 @@ class RPC: remote_session_repository: RemoteSessionRepository run_options: RunOptions sandbox_config: SandboxConfig + sandbox_config_auth: SandboxConfigAuth sandbox_config_user_policy: SandboxConfigUserPolicy sandbox_config_user_policy_experimental: SandboxConfigUserPolicyExperimental sandbox_config_user_policy_experimental_seatbelt: SandboxConfigUserPolicyExperimentalSeatbelt @@ -30392,6 +30487,7 @@ def from_dict(obj: Any) -> 'RPC': remote_session_repository = RemoteSessionRepository.from_dict(obj.get("RemoteSessionRepository")) run_options = RunOptions.from_dict(obj.get("RunOptions")) sandbox_config = SandboxConfig.from_dict(obj.get("SandboxConfig")) + sandbox_config_auth = SandboxConfigAuth.from_dict(obj.get("SandboxConfigAuth")) sandbox_config_user_policy = SandboxConfigUserPolicy.from_dict(obj.get("SandboxConfigUserPolicy")) sandbox_config_user_policy_experimental = SandboxConfigUserPolicyExperimental.from_dict(obj.get("SandboxConfigUserPolicyExperimental")) sandbox_config_user_policy_experimental_seatbelt = SandboxConfigUserPolicyExperimentalSeatbelt.from_dict(obj.get("SandboxConfigUserPolicyExperimentalSeatbelt")) @@ -30745,7 +30841,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, allow_all_permission_set_result, allow_all_permission_state, api_key_auth_info, auth_info, auth_info_type, built_in_model_catalog, built_in_model_catalog_entry, cancel_user_requested_shell_command_result, canvas_action, canvas_action_invoke_request, canvas_action_invoke_result, canvas_close_request, canvas_host_context, canvas_host_context_capabilities, canvas_json_schema, canvas_list, canvas_list_open_result, canvas_open_request, canvas_provider_close_request, canvas_provider_invoke_action_request, canvas_provider_open_request, canvas_provider_open_result, canvas_session_context, capi_session_options, command_list, commands_handle_pending_command_request, commands_handle_pending_command_result, commands_invoke_request, commands_list_request, commands_respond_to_queued_command_request, commands_respond_to_queued_command_result, completions_get_trigger_characters_result, completions_request_request, completions_request_result, configure_session_extensions_params, connected_remote_session_metadata, connected_remote_session_metadata_kind, connected_remote_session_metadata_repository, connect_remote_session_params, connect_request, connect_result, content_exclusion_check_paths_request, content_exclusion_check_paths_result, content_exclusion_path_check, content_filter_mode, context_heaviest_message, copilot_api_token_auth_info, copilot_user_response, copilot_user_response_endpoints, copilot_user_response_quota_snapshots, copilot_user_response_quota_snapshots_chat, copilot_user_response_quota_snapshots_completions, copilot_user_response_quota_snapshots_premium_interactions, current_model, current_tool_metadata, debug_collect_logs_collected_entry, debug_collect_logs_destination, debug_collect_logs_entry, debug_collect_logs_entry_kind, debug_collect_logs_include, debug_collect_logs_redaction, debug_collect_logs_request, debug_collect_logs_result, debug_collect_logs_result_kind, debug_collect_logs_skipped_entry, debug_collect_logs_source, disable_bypass_permissions_mode, discovered_canvas, discovered_extension, discovered_extension_mode, discovered_extension_plugin, discovered_extensions, discovered_extensions_disable_request, discovered_extensions_enable_request, discovered_extension_source, discovered_mcp_server, discovered_mcp_server_type, enqueue_command_params, enqueue_command_result, env_auth_info, event_log_read_request, event_log_release_interest_result, event_log_tail_result, event_log_types, events_agent_scope, events_cursor_status, events_read_direction, events_read_result, execute_command_params, execute_command_result, extension, extension_context_push_input, extension_launch_profile, extension_launch_provider_resolve_request, extension_launch_provider_resolve_result, extension_list, extensions_disable_request, extensions_enable_request, extension_source, extension_status, external_tool_result, external_tool_text_result_for_llm, external_tool_text_result_for_llm_binary_results_for_llm, external_tool_text_result_for_llm_binary_results_for_llm_type, external_tool_text_result_for_llm_content, external_tool_text_result_for_llm_content_audio, external_tool_text_result_for_llm_content_image, external_tool_text_result_for_llm_content_resource, external_tool_text_result_for_llm_content_resource_details, external_tool_text_result_for_llm_content_resource_link, external_tool_text_result_for_llm_content_resource_link_icon, external_tool_text_result_for_llm_content_resource_link_icon_theme, external_tool_text_result_for_llm_content_shell_exit, external_tool_text_result_for_llm_content_terminal, external_tool_text_result_for_llm_content_text, factory_abort_request, factory_ack_result, factory_agent_options, factory_agent_request, factory_agent_result, factory_agent_summary, factory_cancel_request, factory_current_phase, factory_declared_limits, factory_durable_operation, factory_execute_request, factory_execute_result, factory_get_run_progress_request, factory_get_run_request, factory_journal_get_request, factory_journal_get_result, factory_journal_put_request, factory_list_runs_request, factory_list_runs_result, factory_log_line, factory_log_line_kind, factory_log_request, factory_phase_observation, factory_phase_status, factory_progress_line, factory_progress_page, factory_resume_request, factory_resume_result, factory_run_consumed, factory_run_detail, factory_run_failure, factory_run_failure_kind, factory_run_limits, factory_run_request, factory_run_result, factory_run_status, factory_run_summary, factory_run_terminal, filter_mapping, fleet_start_request, fleet_start_result, folder_trust_add_params, folder_trust_check_params, folder_trust_check_result, gh_cli_auth_info, git_hub_telemetry_client_info, git_hub_telemetry_event, git_hub_telemetry_notification, handle_pending_tool_call_request, handle_pending_tool_call_result, history_abort_manual_compaction_result, history_cancel_background_compaction_result, history_clear_context_request, history_clear_context_result, history_compact_context_window, history_compact_request, history_compact_result, history_file_restore_skip_reason, history_list_rewind_points_result, history_preview_rewind_request, history_preview_rewind_result, history_rewind_change_type, history_rewind_file_preview, history_rewind_mode, history_rewind_outcome, history_rewind_point, history_rewind_request, history_rewind_result, history_rewind_unavailable_reason, history_skipped_file_restore, history_summarize_for_handoff_result, history_truncate_request, history_truncate_result, hmac_auth_info, hook_invoke_request, hook_invoke_response, hook_type, installed_plugin, installed_plugin_info, installed_plugin_source, installed_plugin_source_git_hub, installed_plugin_source_local, installed_plugin_source_url, instruction_discovery_path, instruction_discovery_path_kind, instruction_discovery_path_list, instruction_discovery_path_location, instructions_discover_request, instructions_get_discovery_paths_request, instructions_get_sources_result, instruction_source, instruction_source_location, instruction_source_type, interrupt_main_turn_request, interrupt_main_turn_result, llm_inference_headers, llm_inference_http_request_chunk_request, llm_inference_http_request_chunk_result, llm_inference_http_request_start_request, llm_inference_http_request_start_result, llm_inference_http_request_start_transport, llm_inference_http_response_chunk_error, llm_inference_http_response_chunk_request, llm_inference_http_response_chunk_result, llm_inference_http_response_start_request, llm_inference_http_response_start_result, llm_inference_set_provider_result, local_session_metadata_value, log_request, log_result, lsp_initialize_request, managed_settings_read_result, marketplace_add_result, marketplace_browse_result, marketplace_info, marketplace_list_result, marketplace_plugin_info, marketplace_refresh_entry, marketplace_refresh_result, marketplace_remove_result, mcp_allowed_server, mcp_apps_call_tool_request, mcp_apps_diagnose_capability, mcp_apps_diagnose_request, mcp_apps_diagnose_result, mcp_apps_diagnose_server, mcp_apps_host_context, mcp_apps_host_context_details, mcp_apps_host_context_details_available_display_mode, mcp_apps_host_context_details_display_mode, mcp_apps_host_context_details_platform, mcp_apps_host_context_details_theme, mcp_apps_list_tools_request, mcp_apps_list_tools_result, mcp_apps_read_resource_request, mcp_apps_read_resource_result, mcp_apps_resource_content, mcp_apps_set_host_context_details, mcp_apps_set_host_context_details_available_display_mode, mcp_apps_set_host_context_details_display_mode, mcp_apps_set_host_context_details_platform, mcp_apps_set_host_context_details_theme, mcp_apps_set_host_context_request, mcp_cancel_sampling_execution_params, mcp_cancel_sampling_execution_result, mcp_config_add_request, mcp_config_disable_request, mcp_config_enable_request, mcp_config_list, mcp_config_remove_request, mcp_config_update_request, mcp_configure_git_hub_request, mcp_configure_git_hub_result, mcp_disable_request, mcp_discover_request, mcp_discover_result, mcp_enable_request, mcp_execute_sampling_params, mcp_execute_sampling_request, mcp_execute_sampling_result, mcp_filtered_server, mcp_headers_handle_pending_headers_refresh_request, mcp_headers_handle_pending_headers_refresh_request_request, mcp_headers_handle_pending_headers_refresh_request_result, mcp_host_state, mcp_is_server_running_request, mcp_is_server_running_result, mcp_list_tools_request, mcp_list_tools_result, mcp_oauth_authentication_state_changed_request, mcp_oauth_handle_pending_request, mcp_oauth_handle_pending_result, mcp_oauth_login_grant_type, mcp_oauth_login_request, mcp_oauth_login_result, mcp_oauth_pending_request_response, mcp_oauth_respond_request, mcp_oauth_respond_result, mcp_register_external_client_request, mcp_reload_with_config_request, mcp_remove_git_hub_result, mcp_resource, mcp_resource_annotations, mcp_resource_content, mcp_resource_icon, mcp_resources_list_request, mcp_resources_list_result, mcp_resources_list_templates_request, mcp_resources_list_templates_result, mcp_resources_read_request, mcp_resources_read_result, mcp_resource_template, mcp_restart_server_request, mcp_sampling_execution_action, mcp_sampling_execution_result, mcp_server, mcp_server_auth_config, mcp_server_auth_config_redirect_port, mcp_server_config, mcp_server_config_defer_tools, mcp_server_config_http, mcp_server_config_http_oauth_grant_type, mcp_server_config_http_type, mcp_server_config_stdio, mcp_server_failure_info, mcp_server_list, mcp_server_needs_auth_info, mcp_set_env_value_mode_details, mcp_set_env_value_mode_params, mcp_set_env_value_mode_result, mcp_start_server_request, mcp_start_servers_result, mcp_stop_server_request, mcp_tools, mcp_tool_ui, mcp_tool_ui_visibility, mcp_unregister_external_client_request, memory_configuration, metadata_context_attribution_result, metadata_context_heaviest_messages_request, metadata_context_heaviest_messages_result, metadata_context_info_request, metadata_context_info_result, metadata_is_processing_result, metadata_recompute_context_tokens_request, metadata_recompute_context_tokens_result, metadata_record_context_change_request, metadata_record_context_change_result, metadata_set_working_directory_request, metadata_set_working_directory_result, metadata_snapshot_current_mode, metadata_snapshot_remote_metadata, metadata_snapshot_remote_metadata_repository, metadata_snapshot_remote_metadata_task_type, model, model_billing, model_billing_promo, model_billing_token_prices, model_billing_token_prices_long_context, model_capabilities, model_capabilities_limits, model_capabilities_limits_vision, model_capabilities_override, model_capabilities_override_limits, model_capabilities_override_limits_vision, model_capabilities_override_supports, model_capabilities_supports, model_list, model_list_request, model_picker_category, model_picker_price_category, model_policy, model_policy_state, model_set_reasoning_effort_request, model_set_reasoning_effort_result, models_list_request, model_switch_to_request, model_switch_to_result, mode_set_request, named_provider_config, name_get_result, name_set_auto_request, name_set_auto_result, name_set_request, open_canvas_instance, options_update_additional_content_exclusion_policy, options_update_additional_content_exclusion_policy_rule, options_update_additional_content_exclusion_policy_rule_source, options_update_additional_content_exclusion_policy_scope, options_update_context_tier, options_update_env_value_mode, options_update_reasoning_summary, options_update_tool_filter_precedence, pending_permission_request, pending_permission_request_list, permission_decision, permission_decision_approved, permission_decision_approved_for_location, permission_decision_approved_for_session, permission_decision_approve_for_location, permission_decision_approve_for_location_approval, permission_decision_approve_for_location_approval_commands, permission_decision_approve_for_location_approval_custom_tool, permission_decision_approve_for_location_approval_extension_management, permission_decision_approve_for_location_approval_extension_permission_access, permission_decision_approve_for_location_approval_factory, permission_decision_approve_for_location_approval_mcp, permission_decision_approve_for_location_approval_mcp_sampling, permission_decision_approve_for_location_approval_memory, permission_decision_approve_for_location_approval_read, permission_decision_approve_for_location_approval_write, permission_decision_approve_for_session, permission_decision_approve_for_session_approval, permission_decision_approve_for_session_approval_commands, permission_decision_approve_for_session_approval_custom_tool, permission_decision_approve_for_session_approval_extension_management, permission_decision_approve_for_session_approval_extension_permission_access, permission_decision_approve_for_session_approval_factory, permission_decision_approve_for_session_approval_mcp, permission_decision_approve_for_session_approval_mcp_sampling, permission_decision_approve_for_session_approval_memory, permission_decision_approve_for_session_approval_read, permission_decision_approve_for_session_approval_write, permission_decision_approve_once, permission_decision_approve_permanently, permission_decision_cancelled, permission_decision_context, permission_decision_denied_by_content_exclusion_policy, permission_decision_denied_by_permission_request_hook, permission_decision_denied_by_rules, permission_decision_denied_interactively_by_user, permission_decision_denied_no_approval_rule_and_could_not_request_from_user, permission_decision_outcome, permission_decision_reject, permission_decision_request, permission_decision_source, permission_decision_surface, permission_decision_user_not_available, permission_location_add_tool_approval_params, permission_location_apply_params, permission_location_apply_result, permission_location_resolve_params, permission_location_resolve_result, permission_location_type, permission_paths_add_params, permission_paths_allowed_check_params, permission_paths_allowed_check_result, permission_paths_config, permission_paths_list, permission_paths_update_primary_params, permission_paths_workspace_check_params, permission_paths_workspace_check_result, permission_prompt_shown_notification, permission_request_result, permission_rules_set, permissions_allow_all_mode, permissions_configure_additional_content_exclusion_policy, permissions_configure_additional_content_exclusion_policy_rule, permissions_configure_additional_content_exclusion_policy_rule_source, permissions_configure_additional_content_exclusion_policy_scope, permissions_configure_params, permissions_configure_result, permissions_folder_trust_add_trusted_result, permissions_get_allow_all_request, permissions_locations_add_tool_approval_details, permissions_locations_add_tool_approval_details_commands, permissions_locations_add_tool_approval_details_custom_tool, permissions_locations_add_tool_approval_details_extension_management, permissions_locations_add_tool_approval_details_extension_permission_access, permissions_locations_add_tool_approval_details_factory, permissions_locations_add_tool_approval_details_mcp, permissions_locations_add_tool_approval_details_mcp_sampling, permissions_locations_add_tool_approval_details_memory, permissions_locations_add_tool_approval_details_read, permissions_locations_add_tool_approval_details_write, permissions_locations_add_tool_approval_result, permissions_modify_rules_params, permissions_modify_rules_result, permissions_modify_rules_scope, permissions_notify_prompt_shown_result, permissions_paths_add_result, permissions_paths_list_request, permissions_paths_update_primary_result, permissions_pending_requests_request, permissions_reset_session_approvals_request, permissions_reset_session_approvals_result, permissions_set_allow_all_request, permissions_set_allow_all_source, permissions_set_approve_all_request, permissions_set_approve_all_result, permissions_set_approve_all_source, permissions_set_required_request, permissions_set_required_result, permissions_urls_set_unrestricted_mode_result, permission_urls_config, permission_urls_set_unrestricted_mode_params, ping_request, ping_result, plan_read_result, plan_read_sql_todos_result, plan_read_sql_todos_with_dependencies_result, plan_sql_todo_dependency, plan_sql_todos_row, plan_update_request, plugin, plugin_install_result, plugin_list, plugin_list_result, plugins_disable_request, plugins_enable_request, plugins_install_request, plugins_marketplaces_add_request, plugins_marketplaces_browse_request, plugins_marketplaces_refresh_request, plugins_marketplaces_remove_request, plugins_reload_request, plugins_uninstall_request, plugins_update_request, plugin_update_all_entry, plugin_update_all_result, plugin_update_result, provider_add_request, provider_add_result, provider_config, provider_config_azure, provider_config_transport, provider_config_type, provider_config_wire_api, provider_endpoint, provider_endpoint_transport, provider_endpoint_type, provider_endpoint_wire_api, provider_get_endpoint_request, provider_model_config, provider_session_token, provider_token_acquire_request, provider_token_acquire_result, push_attachment, push_attachment_blob, push_attachment_directory, push_attachment_file, push_attachment_file_line_range, push_attachment_git_hub_actions_job, push_attachment_git_hub_commit, push_attachment_git_hub_file, push_attachment_git_hub_file_diff, push_attachment_git_hub_file_diff_side, push_attachment_git_hub_reference, push_attachment_git_hub_reference_type, push_attachment_git_hub_release, push_attachment_git_hub_repository, push_attachment_git_hub_snippet, push_attachment_git_hub_tree_comparison, push_attachment_git_hub_tree_comparison_side, push_attachment_git_hub_url, push_attachment_selection, push_attachment_selection_details, push_attachment_selection_details_end, push_attachment_selection_details_start, push_git_hub_repo_ref, queue_begin_deferred_idle_drain_request, queue_begin_deferred_idle_drain_result, queue_consume_system_notifications_request, queued_command_handled, queued_command_not_handled, queued_command_result, queue_defer_session_idle_request, queue_duplicate_at_request, queue_duplicate_at_result, queue_enqueue_resume_pending_result, queue_finish_deferred_idle_drain_request, queue_finish_deferred_idle_drain_result, queue_has_pending_result, queue_insert_at_request, queue_insert_at_result, queue_insert_message, queue_move_item_request, queue_move_item_result, queue_pending_items, queue_pending_items_kind, queue_pending_items_result, queue_remove_at_request, queue_remove_at_result, queue_remove_most_recent_result, queue_send_now_request, queue_send_now_result, queue_set_drain_paused_request, queue_snapshot_result, queue_update_text_request, queue_update_text_result, register_event_interest_params, register_event_interest_result, register_extension_tools_params, register_extension_tools_result, release_event_interest_params, remote_control_config, remote_control_config_existing_mc_session, remote_control_status, remote_control_status_active, remote_control_status_connecting, remote_control_status_error, remote_control_status_off, remote_control_status_result, remote_control_stop_result, remote_control_transfer_result, remote_enable_request, remote_enable_result, remote_notify_steerable_changed_request, remote_notify_steerable_changed_result, remote_session_connection_result, remote_session_metadata_repository, remote_session_metadata_task_type, remote_session_metadata_value, remote_session_mode, remote_session_repository, run_options, sandbox_config, sandbox_config_user_policy, sandbox_config_user_policy_experimental, sandbox_config_user_policy_experimental_seatbelt, sandbox_config_user_policy_filesystem, sandbox_config_user_policy_network, sandbox_config_user_policy_network_proxy, sandbox_config_user_policy_seatbelt, schedule_add_at_request, schedule_add_cron_request, schedule_add_request, schedule_add_result, schedule_add_self_paced_request, schedule_entry, schedule_has_self_paced_result, schedule_list, schedule_rearm_self_paced_request, schedule_stop_request, schedule_stop_result, secrets_add_filter_values_request, secrets_add_filter_values_result, send_agent_mode, send_attachments_to_message_params, send_message_item, send_messages_request, send_messages_result, send_mode, send_request, send_result, send_system_notification_request, server_agent_list, server_instruction_source_list, server_skill, server_skill_list, session_activity, session_agent_list_request, session_auth_status, session_bulk_delete_result, session_cancel_all_background_agents_result, session_capability, session_commands_list_request, session_completion_item, session_context, session_context_host_type, session_enrich_metadata_result, session_fs_append_file_request, session_fs_error, session_fs_error_code, session_fs_exists_request, session_fs_exists_result, session_fs_mkdir_request, session_fs_readdir_request, session_fs_readdir_result, session_fs_readdir_with_types_entry, session_fs_readdir_with_types_entry_type, session_fs_readdir_with_types_request, session_fs_readdir_with_types_result, session_fs_read_file_request, session_fs_read_file_result, session_fs_rename_request, session_fs_rm_request, session_fs_set_provider_capabilities, session_fs_set_provider_conventions, session_fs_set_provider_request, session_fs_set_provider_result, session_fs_sqlite_exists_request, session_fs_sqlite_exists_result, session_fs_sqlite_query_request, session_fs_sqlite_query_result, session_fs_sqlite_query_type, session_fs_sqlite_transaction_error, session_fs_sqlite_transaction_error_class, session_fs_sqlite_transaction_request, session_fs_sqlite_transaction_result, session_fs_sqlite_transaction_statement, session_fs_stat_request, session_fs_stat_result, session_fs_write_file_request, session_history_compact_request, session_installed_plugin, session_installed_plugin_source, session_installed_plugin_source_git_hub, session_installed_plugin_source_local, session_installed_plugin_source_url, session_limit_prediction_baseline_data, session_limit_prediction_client_type, session_limit_prediction_details, session_limit_prediction_predict_request, session_limit_prediction_request, session_limit_prediction_result, session_limit_prediction_source, session_limit_prediction_tier, session_limit_prediction_tier_option, session_limit_prediction_unavailable_reason, session_list, session_list_entry, session_list_filter, session_load_deferred_repo_hooks_result, session_log_level, session_managed_permissions, session_managed_settings, session_mcp_apps_call_tool_result, session_metadata_snapshot, session_mode, session_model_list, session_model_list_request, session_model_price_category, session_open_options, session_open_options_additional_content_exclusion_policy, session_open_options_additional_content_exclusion_policy_rule, session_open_options_additional_content_exclusion_policy_rule_source, session_open_options_additional_content_exclusion_policy_scope, session_open_options_env_value_mode, session_open_options_reasoning_summary, session_open_params, session_open_result, session_plugins_reload_request, session_provider_get_endpoint_request, session_prune_result, sessions_bulk_delete_request, sessions_check_in_use_request, sessions_check_in_use_result, sessions_close_request, sessions_close_result, sessions_delete_request, sessions_enrich_metadata_request, session_set_credentials_params, session_set_credentials_result, session_settings_built_in_tool_availability_snapshot, session_settings_evaluate_predicate_request, session_settings_evaluate_predicate_result, session_settings_job_snapshot, session_settings_model_snapshot, session_settings_online_evaluation_snapshot, session_settings_predicate_name, session_settings_repo_snapshot, session_settings_snapshot, session_settings_validation_snapshot, sessions_find_by_prefix_request, sessions_find_by_prefix_result, sessions_find_by_task_id_request, sessions_find_by_task_id_result, sessions_fork_request, sessions_fork_result, sessions_get_board_entry_count_request, sessions_get_board_entry_count_result, sessions_get_event_file_path_request, sessions_get_event_file_path_result, sessions_get_last_for_context_request, sessions_get_last_for_context_result, sessions_get_metadata_request, sessions_get_metadata_result, sessions_get_persisted_remote_steerable_request, sessions_get_persisted_remote_steerable_result, session_sizes, sessions_list_non_empty_session_ids_request, sessions_list_non_empty_session_ids_result, sessions_list_request, sessions_load_deferred_repo_hooks_request, sessions_open_attach, sessions_open_cloud, sessions_open_create, sessions_open_handoff, sessions_open_handoff_task_type, sessions_open_progress, sessions_open_progress_status, sessions_open_progress_step, sessions_open_remote, sessions_open_resume, sessions_open_resume_last, sessions_open_status, session_source, sessions_prune_old_request, sessions_register_extension_tools_on_session_options, sessions_release_lock_request, sessions_release_lock_result, sessions_reload_plugin_hooks_request, sessions_reload_plugin_hooks_result, sessions_save_request, sessions_save_result, sessions_set_additional_plugins_request, sessions_set_additional_plugins_result, sessions_set_remote_control_steering_request, sessions_start_remote_control_request, sessions_stop_remote_control_request, sessions_transfer_remote_control_request, session_telemetry_engagement, session_update_options_params, session_update_options_result, session_visibility_status, session_working_directory_context, session_working_directory_context_host_type, shell_cancel_user_requested_request, shell_exec_request, shell_exec_result, shell_execute_user_requested_request, shell_init_profile, shell_init_script, shell_init_script_shell, shell_kill_request, shell_kill_result, shell_kill_signal, shell_options, shutdown_request, skill, skill_discovery_path, skill_discovery_path_list, skill_discovery_scope, skill_list, skills_config_set_disabled_skills_request, skills_disable_request, skills_discover_request, skills_enable_request, skills_get_discovery_paths_request, skills_get_invoked_result, skills_invoked_skill, skills_load_diagnostics, slash_command_agent_prompt_result, slash_command_completed_result, slash_command_info, slash_command_input, slash_command_input_choice, slash_command_input_completion, slash_command_invocation_result, slash_command_kind, slash_command_select_subcommand_option, slash_command_select_subcommand_result, slash_command_text_result, subagent_settings_entry, subagent_settings_entry_context_tier, task_agent_info, task_agent_progress, task_execution_mode, task_info, task_list, task_progress_line, tasks_cancel_request, tasks_cancel_result, tasks_get_current_promotable_result, tasks_get_progress_request, tasks_get_progress_result, task_shell_info, task_shell_info_attachment_mode, task_shell_progress, tasks_promote_current_to_background_result, tasks_promote_to_background_request, tasks_promote_to_background_result, tasks_refresh_result, tasks_remove_request, tasks_remove_result, tasks_send_message_request, tasks_send_message_result, tasks_start_agent_request, tasks_start_agent_result, task_status, tasks_wait_for_pending_result, telemetry_set_feature_overrides_request, token_auth_info, tool, tool_list, tools_get_current_metadata_result, tools_initialize_and_validate_result, tools_list_request, tools_update_subagent_settings_result, ui_auto_mode_switch_response, ui_elicitation_array_any_of_field, ui_elicitation_array_any_of_field_items, ui_elicitation_array_any_of_field_items_any_of, ui_elicitation_array_enum_field, ui_elicitation_array_enum_field_items, ui_elicitation_field_value, ui_elicitation_request, ui_elicitation_response, ui_elicitation_response_action, ui_elicitation_response_content, ui_elicitation_result, ui_elicitation_schema, ui_elicitation_schema_property, ui_elicitation_schema_property_boolean, ui_elicitation_schema_property_number, ui_elicitation_schema_property_number_type, ui_elicitation_schema_property_string, ui_elicitation_schema_property_string_format, ui_elicitation_string_enum_field, ui_elicitation_string_one_of_field, ui_elicitation_string_one_of_field_one_of, ui_ephemeral_query_request, ui_ephemeral_query_result, ui_exit_plan_mode_action, ui_exit_plan_mode_response, ui_handle_pending_auto_mode_switch_request, ui_handle_pending_elicitation_request, ui_handle_pending_exit_plan_mode_request, ui_handle_pending_result, ui_handle_pending_sampling_request, ui_handle_pending_sampling_response, ui_handle_pending_session_limits_exhausted_request, ui_handle_pending_user_input_request, ui_register_direct_auto_mode_switch_handler_result, ui_session_limits_exhausted_response, ui_session_limits_exhausted_response_action, ui_unregister_direct_auto_mode_switch_handler_request, ui_unregister_direct_auto_mode_switch_handler_result, ui_user_input_response, update_subagent_settings_request, usage_get_metrics_result, usage_metrics_code_changes, usage_metrics_model_metric, usage_metrics_model_metric_requests, usage_metrics_model_metric_token_detail, usage_metrics_model_metric_usage, usage_metrics_token_detail, user_auth_info, user_requested_shell_command_result, user_setting_metadata, user_settings_get_result, user_settings_set_request, user_settings_set_result, visibility_get_result, visibility_set_request, visibility_set_result, workspace_diff_file_change, workspace_diff_file_change_type, workspace_diff_mode, workspace_diff_result, workspaces_add_summary_request, workspaces_add_summary_result, workspaces_autopilot_objective_exists_result, workspaces_checkpoints, workspaces_create_file_request, workspaces_delete_autopilot_objective_result, workspaces_diff_request, workspaces_ensure_request, workspaces_get_workspace_result, workspaces_list_checkpoints_result, workspaces_list_files_result, workspaces_read_autopilot_objective_result, workspaces_read_checkpoint_request, workspaces_read_checkpoint_result, workspaces_read_file_request, workspaces_read_file_result, workspaces_save_large_paste_request, workspaces_save_large_paste_result, workspaces_truncate_summaries_request, workspace_summary_host_type, workspaces_update_metadata_request, workspaces_workspace_details_host_type, workspaces_write_autopilot_objective_request, workspaces_write_autopilot_objective_result, session_context_attribution, session_context_info, subagent_settings, task_progress, workspace_summary) + return RPC(abort_request, abort_result, account_all_users, account_get_all_users_result, account_get_current_auth_result, account_get_quota_request, account_get_quota_result, account_login_request, account_login_result, account_logout_request, account_logout_result, account_quota_snapshot, adaptive_thinking_support, agent_discovery_path, agent_discovery_path_list, agent_discovery_path_scope, agent_get_current_result, agent_info, agent_info_source, agent_list, agent_list_request, agent_registry_live_target_entry, agent_registry_live_target_entry_attention_kind, agent_registry_live_target_entry_kind, agent_registry_live_target_entry_last_terminal_event, agent_registry_live_target_entry_status, agent_registry_log_capture, agent_registry_log_capture_open_error_reason, agent_registry_spawn_error, agent_registry_spawn_permission_mode, agent_registry_spawn_registry_timeout, agent_registry_spawn_request, agent_registry_spawn_result, agent_registry_spawn_spawned, agent_registry_spawn_validation_error, agent_registry_spawn_validation_error_field, agent_registry_spawn_validation_error_reason, agent_reload_result, agents_discover_request, agent_select_request, agent_select_result, agent_set_prompt_request, agents_get_discovery_paths_request, allow_all_permission_set_result, allow_all_permission_state, api_key_auth_info, auth_info, auth_info_type, built_in_model_catalog, built_in_model_catalog_entry, cancel_user_requested_shell_command_result, canvas_action, canvas_action_invoke_request, canvas_action_invoke_result, canvas_close_request, canvas_host_context, canvas_host_context_capabilities, canvas_json_schema, canvas_list, canvas_list_open_result, canvas_open_request, canvas_provider_close_request, canvas_provider_invoke_action_request, canvas_provider_open_request, canvas_provider_open_result, canvas_session_context, capi_session_options, command_list, commands_handle_pending_command_request, commands_handle_pending_command_result, commands_invoke_request, commands_list_request, commands_respond_to_queued_command_request, commands_respond_to_queued_command_result, completions_get_trigger_characters_result, completions_request_request, completions_request_result, configure_session_extensions_params, connected_remote_session_metadata, connected_remote_session_metadata_kind, connected_remote_session_metadata_repository, connect_remote_session_params, connect_request, connect_result, content_exclusion_check_paths_request, content_exclusion_check_paths_result, content_exclusion_path_check, content_filter_mode, context_heaviest_message, copilot_api_token_auth_info, copilot_user_response, copilot_user_response_endpoints, copilot_user_response_quota_snapshots, copilot_user_response_quota_snapshots_chat, copilot_user_response_quota_snapshots_completions, copilot_user_response_quota_snapshots_premium_interactions, current_model, current_tool_metadata, debug_collect_logs_collected_entry, debug_collect_logs_destination, debug_collect_logs_entry, debug_collect_logs_entry_kind, debug_collect_logs_include, debug_collect_logs_redaction, debug_collect_logs_request, debug_collect_logs_result, debug_collect_logs_result_kind, debug_collect_logs_skipped_entry, debug_collect_logs_source, disable_bypass_permissions_mode, discovered_canvas, discovered_extension, discovered_extension_mode, discovered_extension_plugin, discovered_extensions, discovered_extensions_disable_request, discovered_extensions_enable_request, discovered_extension_source, discovered_mcp_server, discovered_mcp_server_type, enqueue_command_params, enqueue_command_result, env_auth_info, event_log_read_request, event_log_release_interest_result, event_log_tail_result, event_log_types, events_agent_scope, events_cursor_status, events_read_direction, events_read_result, execute_command_params, execute_command_result, extension, extension_context_push_input, extension_launch_profile, extension_launch_provider_resolve_request, extension_launch_provider_resolve_result, extension_list, extensions_disable_request, extensions_enable_request, extension_source, extension_status, external_tool_result, external_tool_text_result_for_llm, external_tool_text_result_for_llm_binary_results_for_llm, external_tool_text_result_for_llm_binary_results_for_llm_type, external_tool_text_result_for_llm_content, external_tool_text_result_for_llm_content_audio, external_tool_text_result_for_llm_content_image, external_tool_text_result_for_llm_content_resource, external_tool_text_result_for_llm_content_resource_details, external_tool_text_result_for_llm_content_resource_link, external_tool_text_result_for_llm_content_resource_link_icon, external_tool_text_result_for_llm_content_resource_link_icon_theme, external_tool_text_result_for_llm_content_shell_exit, external_tool_text_result_for_llm_content_terminal, external_tool_text_result_for_llm_content_text, factory_abort_request, factory_ack_result, factory_agent_options, factory_agent_request, factory_agent_result, factory_agent_summary, factory_cancel_request, factory_current_phase, factory_declared_limits, factory_durable_operation, factory_execute_request, factory_execute_result, factory_get_run_progress_request, factory_get_run_request, factory_journal_get_request, factory_journal_get_result, factory_journal_put_request, factory_list_runs_request, factory_list_runs_result, factory_log_line, factory_log_line_kind, factory_log_request, factory_phase_observation, factory_phase_status, factory_progress_line, factory_progress_page, factory_resume_request, factory_resume_result, factory_run_consumed, factory_run_detail, factory_run_failure, factory_run_failure_kind, factory_run_limits, factory_run_request, factory_run_result, factory_run_status, factory_run_summary, factory_run_terminal, filter_mapping, fleet_start_request, fleet_start_result, folder_trust_add_params, folder_trust_check_params, folder_trust_check_result, gh_cli_auth_info, git_hub_telemetry_client_info, git_hub_telemetry_event, git_hub_telemetry_notification, handle_pending_tool_call_request, handle_pending_tool_call_result, history_abort_manual_compaction_result, history_cancel_background_compaction_result, history_clear_context_request, history_clear_context_result, history_compact_context_window, history_compact_request, history_compact_result, history_file_restore_skip_reason, history_list_rewind_points_result, history_preview_rewind_request, history_preview_rewind_result, history_rewind_change_type, history_rewind_file_preview, history_rewind_mode, history_rewind_outcome, history_rewind_point, history_rewind_request, history_rewind_result, history_rewind_unavailable_reason, history_skipped_file_restore, history_summarize_for_handoff_result, history_truncate_request, history_truncate_result, hmac_auth_info, hook_invoke_request, hook_invoke_response, hook_type, installed_plugin, installed_plugin_info, installed_plugin_source, installed_plugin_source_git_hub, installed_plugin_source_local, installed_plugin_source_url, instruction_discovery_path, instruction_discovery_path_kind, instruction_discovery_path_list, instruction_discovery_path_location, instructions_discover_request, instructions_get_discovery_paths_request, instructions_get_sources_result, instruction_source, instruction_source_location, instruction_source_type, interrupt_main_turn_request, interrupt_main_turn_result, llm_inference_headers, llm_inference_http_request_chunk_request, llm_inference_http_request_chunk_result, llm_inference_http_request_start_request, llm_inference_http_request_start_result, llm_inference_http_request_start_transport, llm_inference_http_response_chunk_error, llm_inference_http_response_chunk_request, llm_inference_http_response_chunk_result, llm_inference_http_response_start_request, llm_inference_http_response_start_result, llm_inference_set_provider_result, local_session_metadata_value, log_request, log_result, lsp_initialize_request, managed_settings_read_result, marketplace_add_result, marketplace_browse_result, marketplace_info, marketplace_list_result, marketplace_plugin_info, marketplace_refresh_entry, marketplace_refresh_result, marketplace_remove_result, mcp_allowed_server, mcp_apps_call_tool_request, mcp_apps_diagnose_capability, mcp_apps_diagnose_request, mcp_apps_diagnose_result, mcp_apps_diagnose_server, mcp_apps_host_context, mcp_apps_host_context_details, mcp_apps_host_context_details_available_display_mode, mcp_apps_host_context_details_display_mode, mcp_apps_host_context_details_platform, mcp_apps_host_context_details_theme, mcp_apps_list_tools_request, mcp_apps_list_tools_result, mcp_apps_read_resource_request, mcp_apps_read_resource_result, mcp_apps_resource_content, mcp_apps_set_host_context_details, mcp_apps_set_host_context_details_available_display_mode, mcp_apps_set_host_context_details_display_mode, mcp_apps_set_host_context_details_platform, mcp_apps_set_host_context_details_theme, mcp_apps_set_host_context_request, mcp_cancel_sampling_execution_params, mcp_cancel_sampling_execution_result, mcp_config_add_request, mcp_config_disable_request, mcp_config_enable_request, mcp_config_list, mcp_config_remove_request, mcp_config_update_request, mcp_configure_git_hub_request, mcp_configure_git_hub_result, mcp_disable_request, mcp_discover_request, mcp_discover_result, mcp_enable_request, mcp_execute_sampling_params, mcp_execute_sampling_request, mcp_execute_sampling_result, mcp_filtered_server, mcp_headers_handle_pending_headers_refresh_request, mcp_headers_handle_pending_headers_refresh_request_request, mcp_headers_handle_pending_headers_refresh_request_result, mcp_host_state, mcp_is_server_running_request, mcp_is_server_running_result, mcp_list_tools_request, mcp_list_tools_result, mcp_oauth_authentication_state_changed_request, mcp_oauth_handle_pending_request, mcp_oauth_handle_pending_result, mcp_oauth_login_grant_type, mcp_oauth_login_request, mcp_oauth_login_result, mcp_oauth_pending_request_response, mcp_oauth_respond_request, mcp_oauth_respond_result, mcp_register_external_client_request, mcp_reload_with_config_request, mcp_remove_git_hub_result, mcp_resource, mcp_resource_annotations, mcp_resource_content, mcp_resource_icon, mcp_resources_list_request, mcp_resources_list_result, mcp_resources_list_templates_request, mcp_resources_list_templates_result, mcp_resources_read_request, mcp_resources_read_result, mcp_resource_template, mcp_restart_server_request, mcp_sampling_execution_action, mcp_sampling_execution_result, mcp_server, mcp_server_auth_config, mcp_server_auth_config_redirect_port, mcp_server_config, mcp_server_config_defer_tools, mcp_server_config_http, mcp_server_config_http_oauth_grant_type, mcp_server_config_http_type, mcp_server_config_stdio, mcp_server_failure_info, mcp_server_list, mcp_server_needs_auth_info, mcp_set_env_value_mode_details, mcp_set_env_value_mode_params, mcp_set_env_value_mode_result, mcp_start_server_request, mcp_start_servers_result, mcp_stop_server_request, mcp_tools, mcp_tool_ui, mcp_tool_ui_visibility, mcp_unregister_external_client_request, memory_configuration, metadata_context_attribution_result, metadata_context_heaviest_messages_request, metadata_context_heaviest_messages_result, metadata_context_info_request, metadata_context_info_result, metadata_is_processing_result, metadata_recompute_context_tokens_request, metadata_recompute_context_tokens_result, metadata_record_context_change_request, metadata_record_context_change_result, metadata_set_working_directory_request, metadata_set_working_directory_result, metadata_snapshot_current_mode, metadata_snapshot_remote_metadata, metadata_snapshot_remote_metadata_repository, metadata_snapshot_remote_metadata_task_type, model, model_billing, model_billing_promo, model_billing_token_prices, model_billing_token_prices_long_context, model_capabilities, model_capabilities_limits, model_capabilities_limits_vision, model_capabilities_override, model_capabilities_override_limits, model_capabilities_override_limits_vision, model_capabilities_override_supports, model_capabilities_supports, model_list, model_list_request, model_picker_category, model_picker_price_category, model_policy, model_policy_state, model_set_reasoning_effort_request, model_set_reasoning_effort_result, models_list_request, model_switch_to_request, model_switch_to_result, mode_set_request, named_provider_config, name_get_result, name_set_auto_request, name_set_auto_result, name_set_request, open_canvas_instance, options_update_additional_content_exclusion_policy, options_update_additional_content_exclusion_policy_rule, options_update_additional_content_exclusion_policy_rule_source, options_update_additional_content_exclusion_policy_scope, options_update_context_tier, options_update_env_value_mode, options_update_reasoning_summary, options_update_tool_filter_precedence, pending_permission_request, pending_permission_request_list, permission_decision, permission_decision_approved, permission_decision_approved_for_location, permission_decision_approved_for_session, permission_decision_approve_for_location, permission_decision_approve_for_location_approval, permission_decision_approve_for_location_approval_commands, permission_decision_approve_for_location_approval_custom_tool, permission_decision_approve_for_location_approval_extension_management, permission_decision_approve_for_location_approval_extension_permission_access, permission_decision_approve_for_location_approval_factory, permission_decision_approve_for_location_approval_mcp, permission_decision_approve_for_location_approval_mcp_sampling, permission_decision_approve_for_location_approval_memory, permission_decision_approve_for_location_approval_read, permission_decision_approve_for_location_approval_write, permission_decision_approve_for_session, permission_decision_approve_for_session_approval, permission_decision_approve_for_session_approval_commands, permission_decision_approve_for_session_approval_custom_tool, permission_decision_approve_for_session_approval_extension_management, permission_decision_approve_for_session_approval_extension_permission_access, permission_decision_approve_for_session_approval_factory, permission_decision_approve_for_session_approval_mcp, permission_decision_approve_for_session_approval_mcp_sampling, permission_decision_approve_for_session_approval_memory, permission_decision_approve_for_session_approval_read, permission_decision_approve_for_session_approval_write, permission_decision_approve_once, permission_decision_approve_permanently, permission_decision_cancelled, permission_decision_context, permission_decision_denied_by_content_exclusion_policy, permission_decision_denied_by_permission_request_hook, permission_decision_denied_by_rules, permission_decision_denied_interactively_by_user, permission_decision_denied_no_approval_rule_and_could_not_request_from_user, permission_decision_outcome, permission_decision_reject, permission_decision_request, permission_decision_source, permission_decision_surface, permission_decision_user_not_available, permission_location_add_tool_approval_params, permission_location_apply_params, permission_location_apply_result, permission_location_resolve_params, permission_location_resolve_result, permission_location_type, permission_paths_add_params, permission_paths_allowed_check_params, permission_paths_allowed_check_result, permission_paths_config, permission_paths_list, permission_paths_update_primary_params, permission_paths_workspace_check_params, permission_paths_workspace_check_result, permission_prompt_shown_notification, permission_request_result, permission_rules_set, permissions_allow_all_mode, permissions_configure_additional_content_exclusion_policy, permissions_configure_additional_content_exclusion_policy_rule, permissions_configure_additional_content_exclusion_policy_rule_source, permissions_configure_additional_content_exclusion_policy_scope, permissions_configure_params, permissions_configure_result, permissions_folder_trust_add_trusted_result, permissions_get_allow_all_request, permissions_locations_add_tool_approval_details, permissions_locations_add_tool_approval_details_commands, permissions_locations_add_tool_approval_details_custom_tool, permissions_locations_add_tool_approval_details_extension_management, permissions_locations_add_tool_approval_details_extension_permission_access, permissions_locations_add_tool_approval_details_factory, permissions_locations_add_tool_approval_details_mcp, permissions_locations_add_tool_approval_details_mcp_sampling, permissions_locations_add_tool_approval_details_memory, permissions_locations_add_tool_approval_details_read, permissions_locations_add_tool_approval_details_write, permissions_locations_add_tool_approval_result, permissions_modify_rules_params, permissions_modify_rules_result, permissions_modify_rules_scope, permissions_notify_prompt_shown_result, permissions_paths_add_result, permissions_paths_list_request, permissions_paths_update_primary_result, permissions_pending_requests_request, permissions_reset_session_approvals_request, permissions_reset_session_approvals_result, permissions_set_allow_all_request, permissions_set_allow_all_source, permissions_set_approve_all_request, permissions_set_approve_all_result, permissions_set_approve_all_source, permissions_set_required_request, permissions_set_required_result, permissions_urls_set_unrestricted_mode_result, permission_urls_config, permission_urls_set_unrestricted_mode_params, ping_request, ping_result, plan_read_result, plan_read_sql_todos_result, plan_read_sql_todos_with_dependencies_result, plan_sql_todo_dependency, plan_sql_todos_row, plan_update_request, plugin, plugin_install_result, plugin_list, plugin_list_result, plugins_disable_request, plugins_enable_request, plugins_install_request, plugins_marketplaces_add_request, plugins_marketplaces_browse_request, plugins_marketplaces_refresh_request, plugins_marketplaces_remove_request, plugins_reload_request, plugins_uninstall_request, plugins_update_request, plugin_update_all_entry, plugin_update_all_result, plugin_update_result, provider_add_request, provider_add_result, provider_config, provider_config_azure, provider_config_transport, provider_config_type, provider_config_wire_api, provider_endpoint, provider_endpoint_transport, provider_endpoint_type, provider_endpoint_wire_api, provider_get_endpoint_request, provider_model_config, provider_session_token, provider_token_acquire_request, provider_token_acquire_result, push_attachment, push_attachment_blob, push_attachment_directory, push_attachment_file, push_attachment_file_line_range, push_attachment_git_hub_actions_job, push_attachment_git_hub_commit, push_attachment_git_hub_file, push_attachment_git_hub_file_diff, push_attachment_git_hub_file_diff_side, push_attachment_git_hub_reference, push_attachment_git_hub_reference_type, push_attachment_git_hub_release, push_attachment_git_hub_repository, push_attachment_git_hub_snippet, push_attachment_git_hub_tree_comparison, push_attachment_git_hub_tree_comparison_side, push_attachment_git_hub_url, push_attachment_selection, push_attachment_selection_details, push_attachment_selection_details_end, push_attachment_selection_details_start, push_git_hub_repo_ref, queue_begin_deferred_idle_drain_request, queue_begin_deferred_idle_drain_result, queue_consume_system_notifications_request, queued_command_handled, queued_command_not_handled, queued_command_result, queue_defer_session_idle_request, queue_duplicate_at_request, queue_duplicate_at_result, queue_enqueue_resume_pending_result, queue_finish_deferred_idle_drain_request, queue_finish_deferred_idle_drain_result, queue_has_pending_result, queue_insert_at_request, queue_insert_at_result, queue_insert_message, queue_move_item_request, queue_move_item_result, queue_pending_items, queue_pending_items_kind, queue_pending_items_result, queue_remove_at_request, queue_remove_at_result, queue_remove_most_recent_result, queue_send_now_request, queue_send_now_result, queue_set_drain_paused_request, queue_snapshot_result, queue_update_text_request, queue_update_text_result, register_event_interest_params, register_event_interest_result, register_extension_tools_params, register_extension_tools_result, release_event_interest_params, remote_control_config, remote_control_config_existing_mc_session, remote_control_status, remote_control_status_active, remote_control_status_connecting, remote_control_status_error, remote_control_status_off, remote_control_status_result, remote_control_stop_result, remote_control_transfer_result, remote_enable_request, remote_enable_result, remote_notify_steerable_changed_request, remote_notify_steerable_changed_result, remote_session_connection_result, remote_session_metadata_repository, remote_session_metadata_task_type, remote_session_metadata_value, remote_session_mode, remote_session_repository, run_options, sandbox_config, sandbox_config_auth, sandbox_config_user_policy, sandbox_config_user_policy_experimental, sandbox_config_user_policy_experimental_seatbelt, sandbox_config_user_policy_filesystem, sandbox_config_user_policy_network, sandbox_config_user_policy_network_proxy, sandbox_config_user_policy_seatbelt, schedule_add_at_request, schedule_add_cron_request, schedule_add_request, schedule_add_result, schedule_add_self_paced_request, schedule_entry, schedule_has_self_paced_result, schedule_list, schedule_rearm_self_paced_request, schedule_stop_request, schedule_stop_result, secrets_add_filter_values_request, secrets_add_filter_values_result, send_agent_mode, send_attachments_to_message_params, send_message_item, send_messages_request, send_messages_result, send_mode, send_request, send_result, send_system_notification_request, server_agent_list, server_instruction_source_list, server_skill, server_skill_list, session_activity, session_agent_list_request, session_auth_status, session_bulk_delete_result, session_cancel_all_background_agents_result, session_capability, session_commands_list_request, session_completion_item, session_context, session_context_host_type, session_enrich_metadata_result, session_fs_append_file_request, session_fs_error, session_fs_error_code, session_fs_exists_request, session_fs_exists_result, session_fs_mkdir_request, session_fs_readdir_request, session_fs_readdir_result, session_fs_readdir_with_types_entry, session_fs_readdir_with_types_entry_type, session_fs_readdir_with_types_request, session_fs_readdir_with_types_result, session_fs_read_file_request, session_fs_read_file_result, session_fs_rename_request, session_fs_rm_request, session_fs_set_provider_capabilities, session_fs_set_provider_conventions, session_fs_set_provider_request, session_fs_set_provider_result, session_fs_sqlite_exists_request, session_fs_sqlite_exists_result, session_fs_sqlite_query_request, session_fs_sqlite_query_result, session_fs_sqlite_query_type, session_fs_sqlite_transaction_error, session_fs_sqlite_transaction_error_class, session_fs_sqlite_transaction_request, session_fs_sqlite_transaction_result, session_fs_sqlite_transaction_statement, session_fs_stat_request, session_fs_stat_result, session_fs_write_file_request, session_history_compact_request, session_installed_plugin, session_installed_plugin_source, session_installed_plugin_source_git_hub, session_installed_plugin_source_local, session_installed_plugin_source_url, session_limit_prediction_baseline_data, session_limit_prediction_client_type, session_limit_prediction_details, session_limit_prediction_predict_request, session_limit_prediction_request, session_limit_prediction_result, session_limit_prediction_source, session_limit_prediction_tier, session_limit_prediction_tier_option, session_limit_prediction_unavailable_reason, session_list, session_list_entry, session_list_filter, session_load_deferred_repo_hooks_result, session_log_level, session_managed_permissions, session_managed_settings, session_mcp_apps_call_tool_result, session_metadata_snapshot, session_mode, session_model_list, session_model_list_request, session_model_price_category, session_open_options, session_open_options_additional_content_exclusion_policy, session_open_options_additional_content_exclusion_policy_rule, session_open_options_additional_content_exclusion_policy_rule_source, session_open_options_additional_content_exclusion_policy_scope, session_open_options_env_value_mode, session_open_options_reasoning_summary, session_open_params, session_open_result, session_plugins_reload_request, session_provider_get_endpoint_request, session_prune_result, sessions_bulk_delete_request, sessions_check_in_use_request, sessions_check_in_use_result, sessions_close_request, sessions_close_result, sessions_delete_request, sessions_enrich_metadata_request, session_set_credentials_params, session_set_credentials_result, session_settings_built_in_tool_availability_snapshot, session_settings_evaluate_predicate_request, session_settings_evaluate_predicate_result, session_settings_job_snapshot, session_settings_model_snapshot, session_settings_online_evaluation_snapshot, session_settings_predicate_name, session_settings_repo_snapshot, session_settings_snapshot, session_settings_validation_snapshot, sessions_find_by_prefix_request, sessions_find_by_prefix_result, sessions_find_by_task_id_request, sessions_find_by_task_id_result, sessions_fork_request, sessions_fork_result, sessions_get_board_entry_count_request, sessions_get_board_entry_count_result, sessions_get_event_file_path_request, sessions_get_event_file_path_result, sessions_get_last_for_context_request, sessions_get_last_for_context_result, sessions_get_metadata_request, sessions_get_metadata_result, sessions_get_persisted_remote_steerable_request, sessions_get_persisted_remote_steerable_result, session_sizes, sessions_list_non_empty_session_ids_request, sessions_list_non_empty_session_ids_result, sessions_list_request, sessions_load_deferred_repo_hooks_request, sessions_open_attach, sessions_open_cloud, sessions_open_create, sessions_open_handoff, sessions_open_handoff_task_type, sessions_open_progress, sessions_open_progress_status, sessions_open_progress_step, sessions_open_remote, sessions_open_resume, sessions_open_resume_last, sessions_open_status, session_source, sessions_prune_old_request, sessions_register_extension_tools_on_session_options, sessions_release_lock_request, sessions_release_lock_result, sessions_reload_plugin_hooks_request, sessions_reload_plugin_hooks_result, sessions_save_request, sessions_save_result, sessions_set_additional_plugins_request, sessions_set_additional_plugins_result, sessions_set_remote_control_steering_request, sessions_start_remote_control_request, sessions_stop_remote_control_request, sessions_transfer_remote_control_request, session_telemetry_engagement, session_update_options_params, session_update_options_result, session_visibility_status, session_working_directory_context, session_working_directory_context_host_type, shell_cancel_user_requested_request, shell_exec_request, shell_exec_result, shell_execute_user_requested_request, shell_init_profile, shell_init_script, shell_init_script_shell, shell_kill_request, shell_kill_result, shell_kill_signal, shell_options, shutdown_request, skill, skill_discovery_path, skill_discovery_path_list, skill_discovery_scope, skill_list, skills_config_set_disabled_skills_request, skills_disable_request, skills_discover_request, skills_enable_request, skills_get_discovery_paths_request, skills_get_invoked_result, skills_invoked_skill, skills_load_diagnostics, slash_command_agent_prompt_result, slash_command_completed_result, slash_command_info, slash_command_input, slash_command_input_choice, slash_command_input_completion, slash_command_invocation_result, slash_command_kind, slash_command_select_subcommand_option, slash_command_select_subcommand_result, slash_command_text_result, subagent_settings_entry, subagent_settings_entry_context_tier, task_agent_info, task_agent_progress, task_execution_mode, task_info, task_list, task_progress_line, tasks_cancel_request, tasks_cancel_result, tasks_get_current_promotable_result, tasks_get_progress_request, tasks_get_progress_result, task_shell_info, task_shell_info_attachment_mode, task_shell_progress, tasks_promote_current_to_background_result, tasks_promote_to_background_request, tasks_promote_to_background_result, tasks_refresh_result, tasks_remove_request, tasks_remove_result, tasks_send_message_request, tasks_send_message_result, tasks_start_agent_request, tasks_start_agent_result, task_status, tasks_wait_for_pending_result, telemetry_set_feature_overrides_request, token_auth_info, tool, tool_list, tools_get_current_metadata_result, tools_initialize_and_validate_result, tools_list_request, tools_update_subagent_settings_result, ui_auto_mode_switch_response, ui_elicitation_array_any_of_field, ui_elicitation_array_any_of_field_items, ui_elicitation_array_any_of_field_items_any_of, ui_elicitation_array_enum_field, ui_elicitation_array_enum_field_items, ui_elicitation_field_value, ui_elicitation_request, ui_elicitation_response, ui_elicitation_response_action, ui_elicitation_response_content, ui_elicitation_result, ui_elicitation_schema, ui_elicitation_schema_property, ui_elicitation_schema_property_boolean, ui_elicitation_schema_property_number, ui_elicitation_schema_property_number_type, ui_elicitation_schema_property_string, ui_elicitation_schema_property_string_format, ui_elicitation_string_enum_field, ui_elicitation_string_one_of_field, ui_elicitation_string_one_of_field_one_of, ui_ephemeral_query_request, ui_ephemeral_query_result, ui_exit_plan_mode_action, ui_exit_plan_mode_response, ui_handle_pending_auto_mode_switch_request, ui_handle_pending_elicitation_request, ui_handle_pending_exit_plan_mode_request, ui_handle_pending_result, ui_handle_pending_sampling_request, ui_handle_pending_sampling_response, ui_handle_pending_session_limits_exhausted_request, ui_handle_pending_user_input_request, ui_register_direct_auto_mode_switch_handler_result, ui_session_limits_exhausted_response, ui_session_limits_exhausted_response_action, ui_unregister_direct_auto_mode_switch_handler_request, ui_unregister_direct_auto_mode_switch_handler_result, ui_user_input_response, update_subagent_settings_request, usage_get_metrics_result, usage_metrics_code_changes, usage_metrics_model_metric, usage_metrics_model_metric_requests, usage_metrics_model_metric_token_detail, usage_metrics_model_metric_usage, usage_metrics_token_detail, user_auth_info, user_requested_shell_command_result, user_setting_metadata, user_settings_get_result, user_settings_set_request, user_settings_set_result, visibility_get_result, visibility_set_request, visibility_set_result, workspace_diff_file_change, workspace_diff_file_change_type, workspace_diff_mode, workspace_diff_result, workspaces_add_summary_request, workspaces_add_summary_result, workspaces_autopilot_objective_exists_result, workspaces_checkpoints, workspaces_create_file_request, workspaces_delete_autopilot_objective_result, workspaces_diff_request, workspaces_ensure_request, workspaces_get_workspace_result, workspaces_list_checkpoints_result, workspaces_list_files_result, workspaces_read_autopilot_objective_result, workspaces_read_checkpoint_request, workspaces_read_checkpoint_result, workspaces_read_file_request, workspaces_read_file_result, workspaces_save_large_paste_request, workspaces_save_large_paste_result, workspaces_truncate_summaries_request, workspace_summary_host_type, workspaces_update_metadata_request, workspaces_workspace_details_host_type, workspaces_write_autopilot_objective_request, workspaces_write_autopilot_objective_result, session_context_attribution, session_context_info, subagent_settings, task_progress, workspace_summary) def to_dict(self) -> dict: result: dict = {} @@ -31404,6 +31500,7 @@ def to_dict(self) -> dict: result["RemoteSessionRepository"] = to_class(RemoteSessionRepository, self.remote_session_repository) result["RunOptions"] = to_class(RunOptions, self.run_options) result["SandboxConfig"] = to_class(SandboxConfig, self.sandbox_config) + result["SandboxConfigAuth"] = to_class(SandboxConfigAuth, self.sandbox_config_auth) result["SandboxConfigUserPolicy"] = to_class(SandboxConfigUserPolicy, self.sandbox_config_user_policy) result["SandboxConfigUserPolicyExperimental"] = to_class(SandboxConfigUserPolicyExperimental, self.sandbox_config_user_policy_experimental) result["SandboxConfigUserPolicyExperimentalSeatbelt"] = to_class(SandboxConfigUserPolicyExperimentalSeatbelt, self.sandbox_config_user_policy_experimental_seatbelt) @@ -32766,9 +32863,11 @@ async def get_run(self, params: FactoryGetRunRequest, *, timeout: float | None = params_dict["sessionId"] = self._session_id return FactoryRunResult.from_dict(await self._client.request("session.factory.getRun", params_dict, **_timeout_kwargs(timeout))) - async def list_runs(self, *, timeout: float | None = None) -> FactoryListRunsResult: - "Lists durable factory runs for this session in creation order.\n\nReturns:\n Factory runs in durable creation order." - return FactoryListRunsResult.from_dict(await self._client.request("session.factory.listRuns", {"sessionId": self._session_id}, **_timeout_kwargs(timeout))) + async def list_runs(self, params: FactoryListRunsRequest, *, timeout: float | None = None) -> FactoryListRunsResult: + "Lists durable factory runs for this session in creation order.\n\nArgs:\n params: Parameters for paging factory runs.\n\nReturns:\n A page of factory runs in durable creation order." + 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 FactoryListRunsResult.from_dict(await self._client.request("session.factory.listRuns", params_dict, **_timeout_kwargs(timeout))) async def get_run_detail(self, params: FactoryGetRunRequest, *, timeout: float | None = None) -> FactoryRunDetail: "Gets durable and live observability detail for one factory run.\n\nArgs:\n params: Parameters for retrieving a factory run.\n\nReturns:\n Full factory run observability detail." @@ -35404,6 +35503,7 @@ async def handle_git_hub_telemetry_event(params: dict) -> None: "RemoteSessionRepository", "RunOptions", "SandboxConfig", + "SandboxConfigAuth", "SandboxConfigUserPolicy", "SandboxConfigUserPolicyExperimental", "SandboxConfigUserPolicyExperimentalSeatbelt", diff --git a/python/copilot/generated/session_events.py b/python/copilot/generated/session_events.py index d11317a82..4c3a53e53 100644 --- a/python/copilot/generated/session_events.py +++ b/python/copilot/generated/session_events.py @@ -7836,6 +7836,7 @@ class SubagentCompletedData: agent_display_name: str agent_name: str tool_call_id: str + cancelled: bool | None = None duration: timedelta | None = None model: str | None = None total_tokens: int | None = None @@ -7847,6 +7848,7 @@ def from_dict(obj: Any) -> "SubagentCompletedData": agent_display_name = from_str(obj.get("agentDisplayName")) agent_name = from_str(obj.get("agentName")) tool_call_id = from_str(obj.get("toolCallId")) + cancelled = from_union([from_none, from_bool], obj.get("cancelled")) duration = from_union([from_none, from_timedelta], obj.get("durationMs")) model = from_union([from_none, from_str], obj.get("model")) total_tokens = from_union([from_none, from_int], obj.get("totalTokens")) @@ -7855,6 +7857,7 @@ def from_dict(obj: Any) -> "SubagentCompletedData": agent_display_name=agent_display_name, agent_name=agent_name, tool_call_id=tool_call_id, + cancelled=cancelled, duration=duration, model=model, total_tokens=total_tokens, @@ -7866,6 +7869,8 @@ def to_dict(self) -> dict: result["agentDisplayName"] = from_str(self.agent_display_name) result["agentName"] = from_str(self.agent_name) result["toolCallId"] = from_str(self.tool_call_id) + if self.cancelled is not None: + result["cancelled"] = from_union([from_none, from_bool], self.cancelled) if self.duration is not None: result["durationMs"] = from_union([from_none, to_timedelta_int], self.duration) if self.model is not None: diff --git a/rust/src/generated/api_types.rs b/rust/src/generated/api_types.rs index c93f34cf6..caf9457a8 100644 --- a/rust/src/generated/api_types.rs +++ b/rust/src/generated/api_types.rs @@ -4093,12 +4093,21 @@ 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. + #[serde(skip_serializing_if = "Option::is_none")] + pub agent: Option, + /// Optional context tier for the subagent. This field is accepted but not yet honored. + #[serde(skip_serializing_if = "Option::is_none")] + pub context_tier: Option, /// Optional label distinguishing otherwise identical memoized agent calls. #[serde(skip_serializing_if = "Option::is_none")] pub label: Option, /// 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. + #[serde(skip_serializing_if = "Option::is_none")] + pub reasoning_effort: Option, /// Optional JSON Schema for structured agent output. #[serde(skip_serializing_if = "Option::is_none")] pub schema: Option, @@ -4362,7 +4371,7 @@ pub struct FactoryJournalPutRequest { pub run_id: String, } -/// Empty parameters for listing factory runs. +/// Parameters for paging factory runs. /// ///

/// @@ -4372,7 +4381,17 @@ pub struct FactoryJournalPutRequest { ///
#[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct FactoryListRunsRequest {} +pub struct FactoryListRunsRequest { + /// Exclusive forward cursor. + #[serde(skip_serializing_if = "Option::is_none")] + pub after_seq: Option, + /// Exclusive backward cursor. + #[serde(skip_serializing_if = "Option::is_none")] + pub before_seq: Option, + /// Maximum terminal runs to return. Defaults to 200 and is capped at 500. + #[serde(skip_serializing_if = "Option::is_none")] + pub limit: Option, +} /// Durable factory resource consumption. /// @@ -4443,7 +4462,7 @@ pub struct FactoryRunSummary { pub updated_at: i64, } -/// Factory runs in durable creation order. +/// A page of factory runs in durable creation order. /// ///
/// @@ -4454,6 +4473,18 @@ pub struct FactoryRunSummary { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct FactoryListRunsResult { + /// Whether terminal runs newer than this page exist. + #[serde(skip_serializing_if = "Option::is_none")] + pub has_more_newer: Option, + /// Newest terminal-run cursor in this page, or null when the terminal window is empty. + #[serde(skip_serializing_if = "Option::is_none")] + pub newest_seq: Option, + /// Oldest terminal-run cursor in this page, or null when the terminal window is empty. + #[serde(skip_serializing_if = "Option::is_none")] + pub oldest_seq: Option, + /// Number of terminal runs older than this page. + #[serde(skip_serializing_if = "Option::is_none")] + pub omitted_older: Option, pub runs: Vec, } @@ -12317,6 +12348,25 @@ pub struct RemoteSessionRepository { pub owner: String, } +/// Credential-injection capability flags applied while the sandbox is enabled. +/// +///
+/// +/// **Experimental.** This type is part of an experimental wire-protocol surface +/// and may change or be removed in future SDK or CLI releases. +/// +///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct SandboxConfigAuth { + /// Whether to export `GH_TOKEN` so the `gh` CLI authenticates inside the sandbox without the OS keyring the sandbox blocks. Default: false (opt-in). + #[serde(skip_serializing_if = "Option::is_none")] + pub gh: Option, + /// Whether to inject git credentials as an `http..extraheader` so authenticated HTTPS git works inside the sandbox without the shell-based credential helper the sandbox blocks. github.com is served by the Copilot token; every other forge (Azure DevOps, GitHub Enterprise Server, GitLab, ...) by a credential the host resolves from the user's own helper before the sandbox is applied. Default: false (opt-in). + #[serde(skip_serializing_if = "Option::is_none")] + pub git: Option, +} + /// macOS seatbelt experimental options. /// ///
@@ -12475,14 +12525,11 @@ pub struct SandboxConfig { /// Whether to auto-grant read access to common developer-tool caches, registries, and toolchains in their default home locations (cargo, go, npm, Maven, and more), plus read-write access to (and, on Unix, up-front creation of) the scratch caches builds write on every run (go-build, ccache, sccache, Gradle caches, Cargo lock/tracker files), so builds work without extra configuration; a relocated CARGO_HOME additionally gets its Cargo lock files granted read-write. Default: true (enabled by default; set to false to opt out). #[serde(skip_serializing_if = "Option::is_none")] pub allow_dev_tool_access: Option, + /// Credential-injection capability flags. + #[serde(skip_serializing_if = "Option::is_none")] + pub auth: Option, /// Whether sandboxing is enabled for the session. pub enabled: bool, - /// Whether to export `GH_TOKEN` so the `gh` CLI authenticates inside the sandbox without the OS keyring the sandbox blocks. Default: false (opt-in). - #[serde(skip_serializing_if = "Option::is_none")] - pub gh_auth: Option, - /// Whether to inject the Copilot GitHub token as an `http..extraheader` so authenticated HTTPS git works inside the sandbox without the shell-based credential helper the sandbox blocks. Default: false (opt-in). - #[serde(skip_serializing_if = "Option::is_none")] - pub git_auth: Option, /// User-managed sandbox policy fragment merged into the auto-discovered base policy. #[serde(skip_serializing_if = "Option::is_none")] pub user_policy: Option, @@ -19359,7 +19406,7 @@ pub struct SessionFactoryGetRunResult { pub status: FactoryRunStatus, } -/// Factory runs in durable creation order. +/// A page of factory runs in durable creation order. /// ///
/// @@ -19370,6 +19417,18 @@ pub struct SessionFactoryGetRunResult { #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SessionFactoryListRunsResult { + /// Whether terminal runs newer than this page exist. + #[serde(skip_serializing_if = "Option::is_none")] + pub has_more_newer: Option, + /// Newest terminal-run cursor in this page, or null when the terminal window is empty. + #[serde(skip_serializing_if = "Option::is_none")] + pub newest_seq: Option, + /// Oldest terminal-run cursor in this page, or null when the terminal window is empty. + #[serde(skip_serializing_if = "Option::is_none")] + pub oldest_seq: Option, + /// Number of terminal runs older than this page. + #[serde(skip_serializing_if = "Option::is_none")] + pub omitted_older: Option, pub runs: Vec, } diff --git a/rust/src/generated/rpc.rs b/rust/src/generated/rpc.rs index db69aa1e8..fae4d7e16 100644 --- a/rust/src/generated/rpc.rs +++ b/rust/src/generated/rpc.rs @@ -4511,9 +4511,13 @@ impl<'a> SessionRpcFactory<'a> { /// /// Wire method: `session.factory.listRuns`. /// + /// # Parameters + /// + /// * `params` - Parameters for paging factory runs. + /// /// # Returns /// - /// Factory runs in durable creation order. + /// A page of factory runs in durable creation order. /// ///
/// @@ -4522,8 +4526,12 @@ impl<'a> SessionRpcFactory<'a> { /// SDK and CLI versions if your code depends on it. /// ///
- pub async fn list_runs(&self) -> Result { - let wire_params = serde_json::json!({ "sessionId": self.session.id() }); + pub async fn list_runs( + &self, + params: FactoryListRunsRequest, + ) -> 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() diff --git a/rust/src/generated/session_events.rs b/rust/src/generated/session_events.rs index f5bfab83f..913499a6f 100644 --- a/rust/src/generated/session_events.rs +++ b/rust/src/generated/session_events.rs @@ -2860,6 +2860,9 @@ pub struct SubagentCompletedData { pub agent_display_name: String, /// Internal name of the sub-agent pub agent_name: String, + /// Whether the sub-agent was torn down by cancellation - its own abort, or an ancestor being killed - instead of finishing its work. Cancellation is not a failure, so the run still reports completion; this distinguishes a torn-down sub-agent from one that ran to the end. + #[serde(skip_serializing_if = "Option::is_none")] + pub cancelled: Option, /// Wall-clock duration of the sub-agent execution in milliseconds #[serde(skip_serializing_if = "Option::is_none")] pub duration_ms: Option, diff --git a/test/harness/package-lock.json b/test/harness/package-lock.json index b55238c17..1a73bb053 100644 --- a/test/harness/package-lock.json +++ b/test/harness/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "devDependencies": { - "@github/copilot": "^1.0.79-6", + "@github/copilot": "^1.0.79-9", "@modelcontextprotocol/sdk": "^1.26.0", "@types/node": "^25.3.3", "@types/node-forge": "^1.3.14", @@ -501,9 +501,9 @@ } }, "node_modules/@github/copilot": { - "version": "1.0.79-6", - "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.79-6.tgz", - "integrity": "sha512-per2cqu8WYuRXXvdU38cYZ7lUSQP5uBDY2QfFZow9FgGOyOToEWz+ykw2NYVKMnx0u1gIiI20Ovl4zec9Dob6w==", + "version": "1.0.79-9", + "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.79-9.tgz", + "integrity": "sha512-1QRRV3z1HA8sr3JUo4e2l+zFVbIGIOqnmTwzdJ+ilfr+mkmC7LYWkJxV3+j+zN0nq8JAgusSL/Schc43MPIqug==", "dev": true, "license": "SEE LICENSE IN LICENSE.md", "dependencies": { @@ -513,20 +513,20 @@ "copilot": "npm-loader.js" }, "optionalDependencies": { - "@github/copilot-darwin-arm64": "1.0.79-6", - "@github/copilot-darwin-x64": "1.0.79-6", - "@github/copilot-linux-arm64": "1.0.79-6", - "@github/copilot-linux-x64": "1.0.79-6", - "@github/copilot-linuxmusl-arm64": "1.0.79-6", - "@github/copilot-linuxmusl-x64": "1.0.79-6", - "@github/copilot-win32-arm64": "1.0.79-6", - "@github/copilot-win32-x64": "1.0.79-6" + "@github/copilot-darwin-arm64": "1.0.79-9", + "@github/copilot-darwin-x64": "1.0.79-9", + "@github/copilot-linux-arm64": "1.0.79-9", + "@github/copilot-linux-x64": "1.0.79-9", + "@github/copilot-linuxmusl-arm64": "1.0.79-9", + "@github/copilot-linuxmusl-x64": "1.0.79-9", + "@github/copilot-win32-arm64": "1.0.79-9", + "@github/copilot-win32-x64": "1.0.79-9" } }, "node_modules/@github/copilot-darwin-arm64": { - "version": "1.0.79-6", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.79-6.tgz", - "integrity": "sha512-22aYilTJsiZX4w55DPXHvJFHSNwZWGip4DcQCQTvzzVIGc8MjlCQVModE9B6ElGs18hUaM3NH4piTYYT0HqNGQ==", + "version": "1.0.79-9", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.79-9.tgz", + "integrity": "sha512-DBTtv06Lpka1R+bkYfCWH38838b66bTLvsRsNjSuQV9AzgMPHjIn+Q2wAmU89rUyw5ej9iCIL5ppps+roi7qRw==", "cpu": [ "arm64" ], @@ -541,9 +541,9 @@ } }, "node_modules/@github/copilot-darwin-x64": { - "version": "1.0.79-6", - "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.79-6.tgz", - "integrity": "sha512-1ESqmLenOGkfD4KwgxtUZh+Wt5+qKwtLHGpfpRl+d/BSKj4cNo9FUO2vFEmF3zQefpmady3vmDURSdi65hlC+w==", + "version": "1.0.79-9", + "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.79-9.tgz", + "integrity": "sha512-j+XOqtVWa0EZ8lBR+xIsPVI7ErpDepgr3WuSfUCkC9fOdvnVJ1rbyBY3gCM/urY4wJNdbHc4t1vN9MjtRNpTGA==", "cpu": [ "x64" ], @@ -558,9 +558,9 @@ } }, "node_modules/@github/copilot-linux-arm64": { - "version": "1.0.79-6", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.79-6.tgz", - "integrity": "sha512-R8ZmfoJuOj1CT0zamAnRJi7nxhUPRFi3vo3dWlzSkto0Uwez+j2IJmyGIZEZbN65BJJJMD2/kg0GZQG+l+PmUA==", + "version": "1.0.79-9", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.79-9.tgz", + "integrity": "sha512-eYsJlokogYeXo2tCwqoDW+rELbLs0ht7b3R1nrl9odO6U6ZabIm6BilSLSxjWCtE1ZpqDLmdJbOV0/6cQwjvlA==", "cpu": [ "arm64" ], @@ -575,9 +575,9 @@ } }, "node_modules/@github/copilot-linux-x64": { - "version": "1.0.79-6", - "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.79-6.tgz", - "integrity": "sha512-P8Dgq59MIoiWKTRUGLrzzQ+NX54sqsHQFAoTJPis2K0N1O7BUTN4RDl8aPN3v4c1MCkbH9YzjmT8ns1JPeIUuQ==", + "version": "1.0.79-9", + "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.79-9.tgz", + "integrity": "sha512-KknlE4hT3rw/Ne1aL+F1KEQrq40d4I8aGfxAEuahmn3NaM7CSBikDVIsAvkmTq7e2vHzaLytpclc8+gcEAIK6Q==", "cpu": [ "x64" ], @@ -592,9 +592,9 @@ } }, "node_modules/@github/copilot-linuxmusl-arm64": { - "version": "1.0.79-6", - "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.79-6.tgz", - "integrity": "sha512-6CS4YuL1x8YwoEfr/dPcq+ZQYTJQTukO/Uuv88eZ9/RWGdhcls14j/WWPcte8LLk2EFJXchM9WPmkOmZppPkwQ==", + "version": "1.0.79-9", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.79-9.tgz", + "integrity": "sha512-Wrk+vpzg9ho/uC7ajNgIEjPShtB+pGlaJV+8rvYcHeQG6Gyx8YrPMI+OMdYou6RI9firqIaywT0UPuy9PUzoOg==", "cpu": [ "arm64" ], @@ -609,9 +609,9 @@ } }, "node_modules/@github/copilot-linuxmusl-x64": { - "version": "1.0.79-6", - "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.79-6.tgz", - "integrity": "sha512-y+fX6P4oXKADqXsEWCTqWFmLECTm2jVmxkCEC6C1TGqHDzN0+X2pJQd/LTSOZFmtlgxVjusL93eCk1mwa2MapQ==", + "version": "1.0.79-9", + "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.79-9.tgz", + "integrity": "sha512-ERULakTfCb4KYK4hGcMPRp5qm5K7KqKFHhGrAdn1VLrm8QsXDYzl2vUO4tIU/TxRW5VA9pmWh30JpCjQScSnDA==", "cpu": [ "x64" ], @@ -626,9 +626,9 @@ } }, "node_modules/@github/copilot-win32-arm64": { - "version": "1.0.79-6", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.79-6.tgz", - "integrity": "sha512-E/JxBAA4Dqy7d81mCBfZ1L9XJH7eK1DBQn2Jlur5oBvA3qluX05kXcGTlmGkGVA2mkM9rD5zaSC8yZ5grq40HQ==", + "version": "1.0.79-9", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.79-9.tgz", + "integrity": "sha512-XAe2calnhhiAVdIb2jUn4Bh961nu4zz3N5tcrb5CNjDSbjEE2LQf8CaNV4h/QhHjjpcmqFIfMQBMYxW1+9xixg==", "cpu": [ "arm64" ], @@ -643,9 +643,9 @@ } }, "node_modules/@github/copilot-win32-x64": { - "version": "1.0.79-6", - "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.79-6.tgz", - "integrity": "sha512-7Hlfb438QNqU34OhhRiJiElWoyP7xED5iZunU1vC00L1RbrsTXDeC41y2oAxYiXa/bX60TV4x/oWuGli/0no6A==", + "version": "1.0.79-9", + "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.79-9.tgz", + "integrity": "sha512-/nK1IR5Vho2r6vuzq9xziVWwlgan41eL62Oo0feu7RaMvhS+f40l4jZCjuWLbeysh/we642qCyRjK8gkv730lA==", "cpu": [ "x64" ], diff --git a/test/harness/package.json b/test/harness/package.json index efb64a56d..3b9d8e289 100644 --- a/test/harness/package.json +++ b/test/harness/package.json @@ -14,7 +14,7 @@ "node": "^20.19.0 || >=22.12.0" }, "devDependencies": { - "@github/copilot": "^1.0.79-6", + "@github/copilot": "^1.0.79-9", "@modelcontextprotocol/sdk": "^1.26.0", "@types/node": "^25.3.3", "@types/node-forge": "^1.3.14",