From c88bd325e78b49c9d1cbcbf18f3ccd81fbd2733a Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Fri, 24 Jul 2026 14:29:33 -0700 Subject: [PATCH 01/41] Expose managed approval requirement on permission requests Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 18f1bbc1-6001-43e2-b293-724505087f6a --- nodejs/src/types.ts | 10 ++++++++-- nodejs/test/session-event-types.test.ts | 12 ++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/nodejs/src/types.ts b/nodejs/src/types.ts index 3da5e3bc4c..5e564b6099 100644 --- a/nodejs/src/types.ts +++ b/nodejs/src/types.ts @@ -1100,9 +1100,15 @@ export type SystemMessageConfig = * discriminated union from the runtime schema — switch on `kind` to * access the variant-specific fields (e.g. shell `commands`, write * `fileName`/`diff`, mcp `toolName`/`args`). + * + * `managedApprovalRequired` indicates that managed policy requires an explicit + * user decision. Hosts should bypass automatic approval and present their + * normal confirmation UI. */ -export type { PermissionRequest } from "./generated/session-events.js"; -import type { PermissionRequest } from "./generated/session-events.js"; +import type { PermissionRequest as GeneratedPermissionRequest } from "./generated/session-events.js"; +export type PermissionRequest = GeneratedPermissionRequest & { + readonly managedApprovalRequired?: boolean; +}; import type { PermissionDecisionRequest } from "./generated/rpc.js"; diff --git a/nodejs/test/session-event-types.test.ts b/nodejs/test/session-event-types.test.ts index f20c2db338..b104afb047 100644 --- a/nodejs/test/session-event-types.test.ts +++ b/nodejs/test/session-event-types.test.ts @@ -18,6 +18,7 @@ import { describe, expect, it } from "vitest"; import type { // The aggregate union; must still resolve via the package root. SessionEvent, + PermissionRequest, // *Data payload types from the v0.3.0 generated session-event schema. AssistantMessageData, @@ -117,6 +118,17 @@ describe("Session event type exports (#1156)", () => { expect(data.turnId).toBe("turn-1"); }); + it("exposes whether managed policy requires explicit user approval", () => { + const request: PermissionRequest = { + kind: "read", + path: "/workspace/file.txt", + intention: "Read a file", + managedApprovalRequired: true, + }; + + expect(request.managedApprovalRequired).toBe(true); + }); + it("wraps ToolExecutionStartData inside the exported ToolExecutionStartEvent", () => { const event: ToolExecutionStartEvent = { id: "evt-1", From cedcd23fc133f627503c0b8e2df2639396106ac0 Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Tue, 28 Jul 2026 10:30:51 -0700 Subject: [PATCH 02/41] docs: align managed selector name with Domain Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: c7f00b84-b0a7-4cdf-aca9-ffd49737f26e --- nodejs/src/types.ts | 3 ++- nodejs/test/session-event-types.test.ts | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/nodejs/src/types.ts b/nodejs/src/types.ts index 5e564b6099..b2de1679f4 100644 --- a/nodejs/src/types.ts +++ b/nodejs/src/types.ts @@ -1103,7 +1103,8 @@ export type SystemMessageConfig = * * `managedApprovalRequired` indicates that managed policy requires an explicit * user decision. Hosts should bypass automatic approval and present their - * normal confirmation UI. + * normal confirmation UI. The runtime currently emits it for managed Shell, + * Read, Edit, and Domain selector asks. */ import type { PermissionRequest as GeneratedPermissionRequest } from "./generated/session-events.js"; export type PermissionRequest = GeneratedPermissionRequest & { diff --git a/nodejs/test/session-event-types.test.ts b/nodejs/test/session-event-types.test.ts index b104afb047..d5792e3adc 100644 --- a/nodejs/test/session-event-types.test.ts +++ b/nodejs/test/session-event-types.test.ts @@ -118,11 +118,11 @@ describe("Session event type exports (#1156)", () => { expect(data.turnId).toBe("turn-1"); }); - it("exposes whether managed policy requires explicit user approval", () => { + it("exposes explicit user approval metadata for managed Domain requests", () => { const request: PermissionRequest = { - kind: "read", - path: "/workspace/file.txt", - intention: "Read a file", + kind: "url", + url: "https://api.example.com/data", + intention: "Fetch domain data", managedApprovalRequired: true, }; From dbbb8d336a30f83f3d7e8dab15e9305a4184fd9f Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Tue, 28 Jul 2026 13:35:31 -0700 Subject: [PATCH 03/41] Fix managed permission approval surfaces Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- nodejs/src/index.ts | 15 ++++++----- nodejs/src/types.ts | 27 ++++++++++++++++--- nodejs/test/client.test.ts | 19 ++++++++++++++ nodejs/test/session-event-types.test.ts | 35 +++++++++++++++++++++++++ 4 files changed, 86 insertions(+), 10 deletions(-) diff --git a/nodejs/src/index.ts b/nodejs/src/index.ts index 99df267b5b..43d90b2f3d 100644 --- a/nodejs/src/index.ts +++ b/nodejs/src/index.ts @@ -41,13 +41,14 @@ export { // consumers can import them directly from "@github/copilot-sdk" instead of // reaching into the package's internal dist layout. See issue #1156. // -// Three names from this file are also explicitly exported elsewhere in this +// Five names from this file are also explicitly exported elsewhere in this // module — `SessionEvent` (re-exported below from `./types.js`), -// `PermissionRequest` (re-exported below from `./types.js`), and -// `AssistantMessageEvent` (re-exported above from `./session.js`). Per the -// ECMAScript module spec, the explicit named re-exports shadow the names -// arriving via `export type *`, so the hand-authored public API surface for -// those three identifiers is preserved unchanged. +// `PermissionRequest` (re-exported below from `./types.js`), +// `PermissionRequestedData`/`PermissionRequestedEvent` (also re-exported below +// from `./types.js`), and `AssistantMessageEvent` (re-exported above from +// `./session.js`). Per the ECMAScript module spec, the explicit named re-exports +// shadow the names arriving via `export type *`, so the hand-authored public API +// surface for those five identifiers is preserved unchanged. export type * from "./generated/session-events.js"; export type { CommandContext, @@ -113,6 +114,8 @@ export type { NamedProviderConfig, PermissionHandler, PermissionRequest, + PermissionRequestedData, + PermissionRequestedEvent, PermissionRequestResult, ProviderConfig, ProviderModelConfig, diff --git a/nodejs/src/types.ts b/nodejs/src/types.ts index b2de1679f4..5f7052c708 100644 --- a/nodejs/src/types.ts +++ b/nodejs/src/types.ts @@ -11,6 +11,9 @@ import type { Canvas } from "./canvas.js"; import type { SessionFsProvider } from "./sessionFsProvider.js"; import type { CopilotRequestHandler } from "./copilotRequestHandler.js"; import type { + PermissionRequest as GeneratedPermissionRequest, + PermissionRequestedData as GeneratedPermissionRequestedData, + PermissionRequestedEvent as GeneratedPermissionRequestedEvent, ReasoningSummary, SessionLimitsConfig, SessionEvent as GeneratedSessionEvent, @@ -35,7 +38,9 @@ export type { ModelBillingTokenPrices, ModelBillingTokenPricesLongContext, } from "./generated/rpc.js"; -export type SessionEvent = GeneratedSessionEvent; +export type SessionEvent = + | Exclude + | PermissionRequestedEvent; export type { ReasoningSummary } from "./generated/session-events.js"; export type { SessionFsProvider } from "./sessionFsProvider.js"; export { createSessionFsAdapter } from "./sessionFsProvider.js"; @@ -1095,6 +1100,8 @@ export type SystemMessageConfig = | SystemMessageReplaceConfig | SystemMessageCustomizeConfig; +import type { PermissionDecisionRequest } from "./generated/rpc.js"; + /** * Permission request types from the server. This is the generated * discriminated union from the runtime schema — switch on `kind` to @@ -1106,12 +1113,20 @@ export type SystemMessageConfig = * normal confirmation UI. The runtime currently emits it for managed Shell, * Read, Edit, and Domain selector asks. */ -import type { PermissionRequest as GeneratedPermissionRequest } from "./generated/session-events.js"; export type PermissionRequest = GeneratedPermissionRequest & { readonly managedApprovalRequired?: boolean; }; -import type { PermissionDecisionRequest } from "./generated/rpc.js"; +export type PermissionRequestedData = Omit< + GeneratedPermissionRequestedData, + "permissionRequest" +> & { + permissionRequest: PermissionRequest; +}; + +export type PermissionRequestedEvent = Omit & { + data: PermissionRequestedData; +}; /** * Permission decision result returned from a {@link PermissionHandler}. @@ -1126,7 +1141,11 @@ export type PermissionHandler = ( invocation: { sessionId: string } ) => Promise | PermissionRequestResult; -export const approveAll: PermissionHandler = () => ({ kind: "approve-once" }); +/** + * Approves permission requests unless managed policy requires an explicit human decision. + */ +export const approveAll: PermissionHandler = (request) => + request.managedApprovalRequired ? { kind: "no-result" } : { kind: "approve-once" }; export const defaultJoinSessionPermissionHandler: PermissionHandler = (): PermissionRequestResult => ({ diff --git a/nodejs/test/client.test.ts b/nodejs/test/client.test.ts index 77149bc4b9..4805b1148a 100644 --- a/nodejs/test/client.test.ts +++ b/nodejs/test/client.test.ts @@ -19,6 +19,25 @@ async function stopClient(client: CopilotClient): Promise { await client.stop(); } +describe("approveAll", () => { + const request = { + kind: "url" as const, + url: "https://api.example.com/data", + intention: "Fetch domain data", + }; + const invocation = { sessionId: "session-1" }; + + it("approves ordinary permission requests", () => { + expect(approveAll(request, invocation)).toEqual({ kind: "approve-once" }); + }); + + it("leaves managed permission requests pending for human approval", () => { + expect(approveAll({ ...request, managedApprovalRequired: true }, invocation)).toEqual({ + kind: "no-result", + }); + }); +}); + describe("CopilotClient", () => { it("disposes the stdio connection when child stdin emits an error", async () => { const client = new CopilotClient(); diff --git a/nodejs/test/session-event-types.test.ts b/nodejs/test/session-event-types.test.ts index d5792e3adc..694536580a 100644 --- a/nodejs/test/session-event-types.test.ts +++ b/nodejs/test/session-event-types.test.ts @@ -19,6 +19,8 @@ import type { // The aggregate union; must still resolve via the package root. SessionEvent, PermissionRequest, + PermissionRequestedData, + PermissionRequestedEvent, // *Data payload types from the v0.3.0 generated session-event schema. AssistantMessageData, @@ -95,6 +97,11 @@ const _defaultFactoryResultCheck: _DefaultFactoryResultIsJsonValueOrVoid = true; type _FactoryArgsRejectUndefined = FactoryContext; // @ts-expect-error Factory results must be JSON values or top-level void. type _FactoryResultRejectsFunction = FactoryDefinition void>; +type _PermissionRequestedEventStaysAlignedWithSessionEventUnion = _AssertEqual< + PermissionRequestedEvent, + Extract +>; +const _permissionRequestedEventAlignmentCheck: _PermissionRequestedEventStaysAlignedWithSessionEventUnion = true; describe("Session event type exports (#1156)", () => { it("exposes the headline ToolExecutionStartData type with a usable shape", () => { @@ -129,6 +136,32 @@ describe("Session event type exports (#1156)", () => { expect(request.managedApprovalRequired).toBe(true); }); + it("exposes managed approval metadata through permission event types", () => { + const data: PermissionRequestedData = { + permissionRequest: { + kind: "url", + url: "https://api.example.com/data", + intention: "Fetch domain data", + managedApprovalRequired: true, + }, + requestId: "permission-1", + }; + const event: SessionEvent = { + id: "evt-permission-1", + parentId: null, + timestamp: "2026-01-01T00:00:00.000Z", + type: "permission.requested", + data, + }; + + if (event.type !== "permission.requested") { + throw new Error("expected permission.requested narrowing"); + } + + const permissionEvent: PermissionRequestedEvent = event; + expect(permissionEvent.data.permissionRequest.managedApprovalRequired).toBe(true); + }); + it("wraps ToolExecutionStartData inside the exported ToolExecutionStartEvent", () => { const event: ToolExecutionStartEvent = { id: "evt-1", @@ -186,6 +219,7 @@ describe("Session event type exports (#1156)", () => { assertImportable(); assertImportable(); assertImportable(); + assertImportable(); assertImportable(); assertImportable(); @@ -195,6 +229,7 @@ describe("Session event type exports (#1156)", () => { assertImportable(); assertImportable(); assertImportable(); + assertImportable(); // Supporting auxiliary types referenced by the *Data shapes — these // must round-trip through the package root too, otherwise consumers From f48c5c7dde5ae9067ff43d7cde3c2faa002d2481 Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Tue, 28 Jul 2026 15:40:10 -0700 Subject: [PATCH 04/41] docs: clarify managed approval behavior Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- nodejs/README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nodejs/README.md b/nodejs/README.md index aef9c46831..ad39639f34 100644 --- a/nodejs/README.md +++ b/nodejs/README.md @@ -36,7 +36,7 @@ import { CopilotClient, approveAll } from "@github/copilot-sdk"; const client = new CopilotClient(); await client.start(); -// Create a session (onPermissionRequest is optional; approveAll allows every tool) +// approveAll approves ordinary requests; managed requests still require a human decision. const session = await client.createSession({ model: "gpt-5", onPermissionRequest: approveAll, @@ -137,7 +137,7 @@ Create a new conversation session. - `infiniteSessions?: InfiniteSessionConfig` - Configure automatic context compaction (see below) - `enableSessionStore?: boolean` - Enables the cross-session store for search and retrieval across sessions. When unset in `"copilot-cli"` mode, the runtime default applies (enabled). In `"empty"` mode, defaults to disabled. - `provider?: ProviderConfig` - Custom API provider configuration (BYOK - Bring Your Own Key). See [Custom Providers](#custom-providers) section. -- `onPermissionRequest?: PermissionHandler` - Optional handler called before each tool execution to approve or deny it. When omitted, permission requests are emitted as events and left pending for manual resolution. Use `approveAll` to allow everything, or provide a custom function for fine-grained control. See [Permission Handling](#permission-handling) section. +- `onPermissionRequest?: PermissionHandler` - Optional handler called before each tool execution to approve or deny it. When omitted, permission requests are emitted as events and left pending for manual resolution. Use `approveAll` to approve ordinary requests automatically; requests with `managedApprovalRequired: true` remain pending for explicit resolution through a human-facing host flow. Provide a custom function for other fine-grained control. See [Permission Handling](#permission-handling) section. - `onUserInputRequest?: UserInputHandler` - Handler for user input requests from the agent. Enables the `ask_user` tool. See [User Input Requests](#user-input-requests) section. - `onElicitationRequest?: ElicitationHandler` - Handler for elicitation requests dispatched by the server. Enables this client to present form-based UI dialogs on behalf of the agent or other session participants. See [Elicitation Requests](#elicitation-requests) section. - `hooks?: SessionHooks` - Hook handlers for session lifecycle events. See [Session Hooks](#session-hooks) section. @@ -862,7 +862,7 @@ An `onPermissionRequest` handler is optional when you create or resume a session ### Approve All (simplest) -Use the built-in `approveAll` helper to allow every tool call without any checks: +Use the built-in `approveAll` helper to approve ordinary permission requests automatically: ```typescript import { CopilotClient, approveAll } from "@github/copilot-sdk"; @@ -873,6 +873,8 @@ const session = await client.createSession({ }); ``` +For requests with `managedApprovalRequired: true`, `approveAll` returns `{ kind: "no-result" }`. The request remains pending and the host must present a human-facing confirmation flow to resolve it explicitly. + ### Custom Permission Handler Provide your own function to inspect each request and apply custom logic: From 00658d6661905ef8fa3a84f0a7683659dcfae018 Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Tue, 28 Jul 2026 17:41:48 -0700 Subject: [PATCH 05/41] docs: guard managed custom approvals Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- nodejs/README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nodejs/README.md b/nodejs/README.md index ad39639f34..ca9ed7db8c 100644 --- a/nodejs/README.md +++ b/nodejs/README.md @@ -877,7 +877,7 @@ For requests with `managedApprovalRequired: true`, `approveAll` returns `{ kind: ### Custom Permission Handler -Provide your own function to inspect each request and apply custom logic: +Provide your own function to inspect each request and apply custom logic. Check `managedApprovalRequired` before any automatic approval: ```typescript import type { PermissionRequest, PermissionRequestResult } from "@github/copilot-sdk"; @@ -885,6 +885,11 @@ import type { PermissionRequest, PermissionRequestResult } from "@github/copilot const session = await client.createSession({ model: "gpt-5", onPermissionRequest: (request: PermissionRequest, invocation): PermissionRequestResult => { + if (request.managedApprovalRequired === true) { + // Leave the request pending for the host's human-facing confirmation flow. + return { kind: "no-result" }; + } + // request.kind — what type of operation is being requested: // "shell" — executing a shell command // "write" — writing or editing a file From 8b9647ed0af3986636733d73f1e74ac31bc7febe Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Wed, 29 Jul 2026 11:06:44 -0700 Subject: [PATCH 06/41] Expose managed approvals across SDKs Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- dotnet/README.md | 15 +++- dotnet/src/PermissionHandlers.cs | 10 ++- dotnet/src/PermissionRequest.cs | 18 +++++ dotnet/test/Unit/PermissionHandlerTests.cs | 65 ++++++++++++++++ go/README.md | 14 +++- go/permissions.go | 8 +- go/permissions_test.go | 56 +++++++++++++ go/rpc/permission_request_managed_approval.go | 78 +++++++++++++++++++ go/rpc/zsession_events.go | 21 ++++- java/README.md | 23 ++++++ .../github/copilot/RpcHandlerDispatcher.java | 6 +- .../github/copilot/rpc/PermissionHandler.java | 15 +++- .../github/copilot/rpc/PermissionRequest.java | 63 +++++++++++++++ .../rpc/PermissionRequestResultKind.java | 8 +- .../copilot/PermissionRequestResultTest.java | 53 +++++++++++++ .../copilot/RpcHandlerDispatcherTest.java | 10 +-- python/README.md | 18 +++-- python/copilot/generated/session_events.py | 30 +++++++ python/copilot/session.py | 2 + python/test_managed_permissions.py | 44 +++++++++++ rust/README.md | 8 +- rust/src/generated/session_events.rs | 26 ++++++- rust/src/handler.rs | 28 +++++-- rust/src/permission.rs | 23 +++++- rust/src/session.rs | 39 +++++++--- rust/src/types.rs | 3 + rust/tests/api_types_test.rs | 20 +++++ scripts/codegen/go.ts | 8 +- scripts/codegen/python.ts | 5 +- scripts/codegen/rust.ts | 5 +- scripts/codegen/utils.ts | 41 ++++++++++ 31 files changed, 699 insertions(+), 64 deletions(-) create mode 100644 dotnet/src/PermissionRequest.cs create mode 100644 dotnet/test/Unit/PermissionHandlerTests.cs create mode 100644 go/permissions_test.go create mode 100644 go/rpc/permission_request_managed_approval.go create mode 100644 python/test_managed_permissions.py diff --git a/dotnet/README.md b/dotnet/README.md index 1f71926dcf..083691d84e 100644 --- a/dotnet/README.md +++ b/dotnet/README.md @@ -37,7 +37,7 @@ using GitHub.Copilot; await using var client = new CopilotClient(); await client.StartAsync(); -// Create a session (OnPermissionRequest is optional; ApproveAll allows every tool) +// ApproveAll approves ordinary requests; managed requests still require a human decision. await using var session = await client.CreateSessionAsync(new SessionConfig { Model = "gpt-5", @@ -132,7 +132,7 @@ Create a new conversation session. - `Streaming` - Enable streaming of response chunks (default: false) - `InfiniteSessions` - Configure automatic context compaction (see below) - `EnableSessionStore` - Enables the cross-session store for search and retrieval across sessions. When unset in `CopilotClientMode.CopilotCli`, the runtime default applies (enabled). In `CopilotClientMode.Empty`, defaults to disabled. -- `OnPermissionRequest` - Optional handler called before each tool execution to approve or deny it. When omitted, permission requests are emitted as events and left pending for manual resolution. Use `PermissionHandler.ApproveAll` to allow everything, or provide a custom function for fine-grained control. See [Permission Handling](#permission-handling) section. +- `OnPermissionRequest` - Optional handler called before each tool execution to approve or deny it. When omitted, permission requests are emitted as events and left pending for manual resolution. `PermissionHandler.ApproveAll` approves ordinary requests automatically; requests with `ManagedApprovalRequired == true` remain pending for explicit resolution through a human-facing host flow. See [Permission Handling](#permission-handling) section. - `OnUserInputRequest` - Handler for user input requests from the agent (enables ask_user tool). See [User Input Requests](#user-input-requests) section. - `Hooks` - Hook handlers for session lifecycle events. See [Session Hooks](#session-hooks) section. @@ -782,7 +782,7 @@ An `OnPermissionRequest` handler is optional when you create or resume a session ### Approve All (simplest) -Use the built-in `PermissionHandler.ApproveAll` helper to allow every tool call without any checks: +Use the built-in `PermissionHandler.ApproveAll` helper to approve ordinary permission requests automatically: ```csharp using GitHub.Copilot; @@ -794,9 +794,11 @@ var session = await client.CreateSessionAsync(new SessionConfig }); ``` +When `ManagedApprovalRequired` is `true`, `ApproveAll` returns `PermissionDecision.NoResult()`. The request remains pending and the host must present a human-facing confirmation flow to resolve it explicitly. + ### Custom Permission Handler -Provide your own permission handler (`Func>`) to inspect each request and apply custom logic: +Provide your own permission handler (`Func>`) to inspect each request and apply custom logic. Check `ManagedApprovalRequired` before any automatic approval: ```csharp var session = await client.CreateSessionAsync(new SessionConfig @@ -804,6 +806,11 @@ var session = await client.CreateSessionAsync(new SessionConfig Model = "gpt-5", OnPermissionRequest = async (request, invocation) => { + if (request.ManagedApprovalRequired == true) + { + return PermissionDecision.NoResult(); + } + // Pattern-match on the discriminated PermissionRequest union to access // per-kind fields (FullCommandText, Path, ToolName, …). return request switch diff --git a/dotnet/src/PermissionHandlers.cs b/dotnet/src/PermissionHandlers.cs index 4386e8ba64..e4e286534a 100644 --- a/dotnet/src/PermissionHandlers.cs +++ b/dotnet/src/PermissionHandlers.cs @@ -9,7 +9,13 @@ namespace GitHub.Copilot; /// Provides pre-built permission request handlers. public static class PermissionHandler { - /// A permission handler that approves all permission requests. + /// + /// A permission handler that approves ordinary requests and leaves managed + /// requests pending for an explicit human decision. + /// public static Func> ApproveAll { get; } = - (_, _) => Task.FromResult(PermissionDecision.ApproveOnce()); + (request, _) => Task.FromResult( + request.ManagedApprovalRequired == true + ? PermissionDecision.NoResult() + : PermissionDecision.ApproveOnce()); } diff --git a/dotnet/src/PermissionRequest.cs b/dotnet/src/PermissionRequest.cs new file mode 100644 index 0000000000..3752bb3c6b --- /dev/null +++ b/dotnet/src/PermissionRequest.cs @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +using System.Text.Json.Serialization; + +namespace GitHub.Copilot; + +public partial class PermissionRequest +{ + /// + /// Gets or sets whether managed policy requires an explicit human decision. + /// Automatic approval must be bypassed when this value is . + /// + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("managedApprovalRequired")] + public bool? ManagedApprovalRequired { get; set; } +} diff --git a/dotnet/test/Unit/PermissionHandlerTests.cs b/dotnet/test/Unit/PermissionHandlerTests.cs new file mode 100644 index 0000000000..e33d4e0afa --- /dev/null +++ b/dotnet/test/Unit/PermissionHandlerTests.cs @@ -0,0 +1,65 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + *--------------------------------------------------------------------------------------------*/ + +using System.Text.Json; +using System.Text.Json.Serialization.Metadata; +using GitHub.Copilot.Rpc; +using Xunit; + +namespace GitHub.Copilot.Test.Unit; + +public class PermissionHandlerTests +{ + private static readonly JsonSerializerOptions SerializerOptions = new() + { + TypeInfoResolver = new DefaultJsonTypeInfoResolver(), + }; + + [Fact] + public void PermissionEventExposesManagedApprovalRequired() + { + const string json = """ + { + "permissionRequest": { + "kind": "read", + "intention": "Read managed content", + "path": "/workspace/file.txt", + "managedApprovalRequired": true + }, + "requestId": "permission-1" + } + """; + + var data = JsonSerializer.Deserialize( + json, + SerializerOptions); + + Assert.NotNull(data); + Assert.True(data.PermissionRequest.ManagedApprovalRequired); + } + + [Fact] + public async Task ApproveAllLeavesManagedRequestPending() + { + var request = new PermissionRequest + { + Kind = "read", + ManagedApprovalRequired = true, + }; + + var decision = await PermissionHandler.ApproveAll(request, new PermissionInvocation()); + + Assert.IsType(decision); + } + + [Fact] + public async Task ApproveAllApprovesOrdinaryRequest() + { + var request = new PermissionRequest { Kind = "read" }; + + var decision = await PermissionHandler.ApproveAll(request, new PermissionInvocation()); + + Assert.IsType(decision); + } +} diff --git a/go/README.md b/go/README.md index 23cd100a15..14d144d4b4 100644 --- a/go/README.md +++ b/go/README.md @@ -55,7 +55,7 @@ func main() { } defer client.Stop() - // Create a session (OnPermissionRequest is optional; ApproveAll allows every tool) + // ApproveAll approves ordinary requests; managed requests still require a human decision. session, err := client.CreateSession(context.Background(), &copilot.SessionConfig{ Model: "gpt-5", OnPermissionRequest: copilot.PermissionHandler.ApproveAll, @@ -222,7 +222,7 @@ Event types: `SessionLifecycleCreated`, `SessionLifecycleDeleted`, `SessionLifec - `Streaming` (*bool): Enable streaming delta events (nil = runtime default) - `InfiniteSessions` (\*InfiniteSessionConfig): Automatic context compaction configuration - `EnableSessionStore` (\*bool): Enables the cross-session store for search and retrieval across sessions. When unset in `ModeCopilotCli`, the runtime default applies (enabled). In `ModeEmpty`, defaults to disabled. -- `OnPermissionRequest` (PermissionHandlerFunc): Optional handler called before each tool execution to approve or deny it. When nil, permission requests are emitted as events and left pending for manual resolution. Use `copilot.PermissionHandler.ApproveAll` to allow everything, or provide a custom function for fine-grained control. See [Permission Handling](#permission-handling) section. +- `OnPermissionRequest` (PermissionHandlerFunc): Optional handler called before each tool execution to approve or deny it. When nil, permission requests are emitted as events and left pending for manual resolution. `copilot.PermissionHandler.ApproveAll` approves ordinary requests automatically; requests where `RequiresManagedApproval()` is `true` remain pending for explicit resolution through a human-facing host flow. See [Permission Handling](#permission-handling) section. - `OnUserInputRequest` (UserInputHandler): Handler for user input requests from the agent (enables ask_user tool). See [User Input Requests](#user-input-requests) section. - `Hooks` (\*SessionHooks): Hook handlers for session lifecycle events. See [Session Hooks](#session-hooks) section. - `Commands` ([]CommandDefinition): Slash-commands registered for this session. See [Commands](#commands) section. @@ -681,7 +681,7 @@ An `OnPermissionRequest` handler is optional when you create or resume a session ### Approve All (simplest) -Use the built-in `PermissionHandler.ApproveAll` helper to allow every tool call without any checks: +Use the built-in `PermissionHandler.ApproveAll` helper to approve ordinary permission requests automatically: ```go session, err := client.CreateSession(context.Background(), &copilot.SessionConfig{ @@ -690,9 +690,11 @@ session, err := client.CreateSession(context.Background(), &copilot.SessionConfi }) ``` +When `RequiresManagedApproval()` returns `true`, `ApproveAll` returns `PermissionDecisionNoResult`. The request remains pending and the host must present a human-facing confirmation flow to resolve it explicitly. + ### Custom Permission Handler -Provide your own `PermissionHandlerFunc` to inspect each request and apply custom logic: +Provide your own `PermissionHandlerFunc` to inspect each request and apply custom logic. Check `RequiresManagedApproval()` before any automatic approval: ```go import ( @@ -705,6 +707,10 @@ import ( session, err := client.CreateSession(context.Background(), &copilot.SessionConfig{ Model: "gpt-5", OnPermissionRequest: func(request copilot.PermissionRequest, invocation copilot.PermissionInvocation) (rpc.PermissionDecision, error) { + if request.RequiresManagedApproval() { + return &rpc.PermissionDecisionNoResult{}, nil + } + // Type-switch on the discriminated PermissionRequest variants to // access per-kind fields: if shell, ok := request.(*copilot.PermissionRequestShell); ok { diff --git a/go/permissions.go b/go/permissions.go index f86a726834..dcbd5fb111 100644 --- a/go/permissions.go +++ b/go/permissions.go @@ -6,10 +6,14 @@ import ( // PermissionHandler provides pre-built OnPermissionRequest implementations. var PermissionHandler = struct { - // ApproveAll approves all permission requests. + // ApproveAll approves ordinary permission requests. Requests that require + // managed approval remain pending for an explicit human decision. ApproveAll PermissionHandlerFunc }{ - ApproveAll: func(_ PermissionRequest, _ PermissionInvocation) (rpc.PermissionDecision, error) { + ApproveAll: func(request PermissionRequest, _ PermissionInvocation) (rpc.PermissionDecision, error) { + if request.RequiresManagedApproval() { + return &rpc.PermissionDecisionNoResult{}, nil + } return &rpc.PermissionDecisionApproveOnce{}, nil }, } diff --git a/go/permissions_test.go b/go/permissions_test.go new file mode 100644 index 0000000000..086060542c --- /dev/null +++ b/go/permissions_test.go @@ -0,0 +1,56 @@ +package copilot_test + +import ( + "encoding/json" + "testing" + + copilot "github.com/github/copilot-sdk/go" + "github.com/github/copilot-sdk/go/rpc" +) + +func TestPermissionEventExposesManagedApprovalRequired(t *testing.T) { + var data copilot.PermissionRequestedData + err := json.Unmarshal([]byte(`{ + "permissionRequest": { + "kind": "read", + "intention": "Read managed content", + "path": "/workspace/file.txt", + "managedApprovalRequired": true + }, + "requestId": "permission-1" + }`), &data) + if err != nil { + t.Fatal(err) + } + + if !data.PermissionRequest.RequiresManagedApproval() { + t.Fatal("expected managed approval to be required") + } +} + +func TestApproveAllLeavesManagedRequestPending(t *testing.T) { + required := true + decision, err := copilot.PermissionHandler.ApproveAll( + &copilot.PermissionRequestRead{ManagedApprovalRequired: &required}, + copilot.PermissionInvocation{SessionID: "session-1"}, + ) + if err != nil { + t.Fatal(err) + } + if _, ok := decision.(*rpc.PermissionDecisionNoResult); !ok { + t.Fatalf("expected PermissionDecisionNoResult, got %T", decision) + } +} + +func TestApproveAllApprovesOrdinaryRequest(t *testing.T) { + decision, err := copilot.PermissionHandler.ApproveAll( + &copilot.PermissionRequestRead{}, + copilot.PermissionInvocation{SessionID: "session-1"}, + ) + if err != nil { + t.Fatal(err) + } + if _, ok := decision.(*rpc.PermissionDecisionApproveOnce); !ok { + t.Fatalf("expected PermissionDecisionApproveOnce, got %T", decision) + } +} diff --git a/go/rpc/permission_request_managed_approval.go b/go/rpc/permission_request_managed_approval.go new file mode 100644 index 0000000000..601c77f0e6 --- /dev/null +++ b/go/rpc/permission_request_managed_approval.go @@ -0,0 +1,78 @@ +// Copyright (c) GitHub. All rights reserved. + +package rpc + +import "encoding/json" + +func managedApprovalRequired(value *bool) bool { + return value != nil && *value +} + +// RequiresManagedApproval reports whether managed policy requires an explicit +// human decision for this request. +func (r PermissionRequestCustomTool) RequiresManagedApproval() bool { + return managedApprovalRequired(r.ManagedApprovalRequired) +} + +// RequiresManagedApproval reports whether managed policy requires an explicit +// human decision for this request. +func (r PermissionRequestExtensionManagement) RequiresManagedApproval() bool { + return managedApprovalRequired(r.ManagedApprovalRequired) +} + +// RequiresManagedApproval reports whether managed policy requires an explicit +// human decision for this request. +func (r PermissionRequestExtensionPermissionAccess) RequiresManagedApproval() bool { + return managedApprovalRequired(r.ManagedApprovalRequired) +} + +// RequiresManagedApproval reports whether managed policy requires an explicit +// human decision for this request. +func (r PermissionRequestHook) RequiresManagedApproval() bool { + return managedApprovalRequired(r.ManagedApprovalRequired) +} + +// RequiresManagedApproval reports whether managed policy requires an explicit +// human decision for this request. +func (r PermissionRequestMCP) RequiresManagedApproval() bool { + return managedApprovalRequired(r.ManagedApprovalRequired) +} + +// RequiresManagedApproval reports whether managed policy requires an explicit +// human decision for this request. +func (r PermissionRequestMemory) RequiresManagedApproval() bool { + return managedApprovalRequired(r.ManagedApprovalRequired) +} + +// RequiresManagedApproval reports whether managed policy requires an explicit +// human decision for this request. +func (r PermissionRequestRead) RequiresManagedApproval() bool { + return managedApprovalRequired(r.ManagedApprovalRequired) +} + +// RequiresManagedApproval reports whether managed policy requires an explicit +// human decision for this request. +func (r PermissionRequestShell) RequiresManagedApproval() bool { + return managedApprovalRequired(r.ManagedApprovalRequired) +} + +// RequiresManagedApproval reports whether managed policy requires an explicit +// human decision for this request. +func (r PermissionRequestURL) RequiresManagedApproval() bool { + return managedApprovalRequired(r.ManagedApprovalRequired) +} + +// RequiresManagedApproval reports whether managed policy requires an explicit +// human decision for this request. +func (r PermissionRequestWrite) RequiresManagedApproval() bool { + return managedApprovalRequired(r.ManagedApprovalRequired) +} + +// RequiresManagedApproval reports whether an unknown request carries managed +// approval metadata. +func (r RawPermissionRequest) RequiresManagedApproval() bool { + var metadata struct { + ManagedApprovalRequired *bool `json:"managedApprovalRequired"` + } + return json.Unmarshal(r.Raw, &metadata) == nil && managedApprovalRequired(metadata.ManagedApprovalRequired) +} diff --git a/go/rpc/zsession_events.go b/go/rpc/zsession_events.go index f12b3071a4..faee209697 100644 --- a/go/rpc/zsession_events.go +++ b/go/rpc/zsession_events.go @@ -2905,6 +2905,7 @@ func (PermissionPromptRequestWrite) Kind() PermissionPromptRequestKind { type PermissionRequest interface { permissionRequest() Kind() PermissionRequestKind + RequiresManagedApproval() bool } type RawPermissionRequest struct { @@ -2921,6 +2922,8 @@ func (r RawPermissionRequest) Kind() PermissionRequestKind { type PermissionRequestCustomTool struct { // Arguments to pass to the custom tool Args any `json:"args,omitempty"` + // When true, managed policy requires an explicit user decision and automatic approval must be bypassed. + ManagedApprovalRequired *bool `json:"managedApprovalRequired,omitempty"` // Tool call ID that triggered this permission request ToolCallID *string `json:"toolCallId,omitempty"` // Description of what the custom tool does @@ -2938,6 +2941,8 @@ func (PermissionRequestCustomTool) Kind() PermissionRequestKind { type PermissionRequestExtensionManagement struct { // Name of the extension being managed ExtensionName *string `json:"extensionName,omitempty"` + // When true, managed policy requires an explicit user decision and automatic approval must be bypassed. + ManagedApprovalRequired *bool `json:"managedApprovalRequired,omitempty"` // The extension management operation (scaffold, reload) Operation string `json:"operation"` // Tool call ID that triggered this permission request @@ -2955,6 +2960,8 @@ type PermissionRequestExtensionPermissionAccess struct { Capabilities []string `json:"capabilities"` // Name of the extension requesting permission access ExtensionName string `json:"extensionName"` + // When true, managed policy requires an explicit user decision and automatic approval must be bypassed. + ManagedApprovalRequired *bool `json:"managedApprovalRequired,omitempty"` // Tool call ID that triggered this permission request ToolCallID *string `json:"toolCallId,omitempty"` } @@ -2968,6 +2975,8 @@ func (PermissionRequestExtensionPermissionAccess) Kind() PermissionRequestKind { type PermissionRequestHook struct { // Optional message from the hook explaining why confirmation is needed HookMessage *string `json:"hookMessage,omitempty"` + // When true, managed policy requires an explicit user decision and automatic approval must be bypassed. + ManagedApprovalRequired *bool `json:"managedApprovalRequired,omitempty"` // Arguments of the tool call being gated ToolArgs any `json:"toolArgs,omitempty"` // Tool call ID that triggered this permission request @@ -2985,6 +2994,8 @@ func (PermissionRequestHook) Kind() PermissionRequestKind { type PermissionRequestMCP struct { // Arguments to pass to the MCP tool Args any `json:"args,omitempty"` + // When true, managed policy requires an explicit user decision and automatic approval must be bypassed. + ManagedApprovalRequired *bool `json:"managedApprovalRequired,omitempty"` // Whether this MCP tool is read-only (no side effects) ReadOnly bool `json:"readOnly"` // Name of the MCP server providing the tool @@ -3012,6 +3023,8 @@ type PermissionRequestMemory struct { Direction *PermissionRequestMemoryDirection `json:"direction,omitempty"` // The fact being stored or voted on Fact string `json:"fact"` + // When true, managed policy requires an explicit user decision and automatic approval must be bypassed. + ManagedApprovalRequired *bool `json:"managedApprovalRequired,omitempty"` // Reason for the vote (vote only) Reason *string `json:"reason,omitempty"` // Topic or subject of the memory (store only) @@ -3029,7 +3042,7 @@ func (PermissionRequestMemory) Kind() PermissionRequestKind { type PermissionRequestRead struct { // Human-readable description of why the file is being read Intention string `json:"intention"` - // Whether managed policy requires a human response and forbids host auto-approval + // When true, managed policy requires an explicit user decision and automatic approval must be bypassed. ManagedApprovalRequired *bool `json:"managedApprovalRequired,omitempty"` // Path of the file or directory being read Path string `json:"path"` @@ -3060,7 +3073,7 @@ type PermissionRequestShell struct { HasWriteFileRedirection bool `json:"hasWriteFileRedirection"` // Human-readable description of what the command intends to do Intention string `json:"intention"` - // Whether managed policy requires a human response and forbids host auto-approval + // When true, managed policy requires an explicit user decision and automatic approval must be bypassed. ManagedApprovalRequired *bool `json:"managedApprovalRequired,omitempty"` // File paths that may be read or written by the command PossiblePaths []string `json:"possiblePaths"` @@ -3085,7 +3098,7 @@ func (PermissionRequestShell) Kind() PermissionRequestKind { type PermissionRequestURL struct { // Human-readable description of why the URL is being accessed Intention string `json:"intention"` - // Whether managed policy requires a human response and forbids host auto-approval + // When true, managed policy requires an explicit user decision and automatic approval must be bypassed. ManagedApprovalRequired *bool `json:"managedApprovalRequired,omitempty"` // Immediately preceding URL when this request is for a redirect target RedirectedFrom *string `json:"redirectedFrom,omitempty"` @@ -3114,7 +3127,7 @@ type PermissionRequestWrite struct { FileName string `json:"fileName"` // Human-readable description of the intended file change Intention string `json:"intention"` - // Whether managed policy requires a human response and forbids host auto-approval + // When true, managed policy requires an explicit user decision and automatic approval must be bypassed. ManagedApprovalRequired *bool `json:"managedApprovalRequired,omitempty"` // Complete new file contents for newly created files NewFileContents *string `json:"newFileContents,omitempty"` diff --git a/java/README.md b/java/README.md index 3c3a9ca94b..84f5705af9 100644 --- a/java/README.md +++ b/java/README.md @@ -127,6 +127,29 @@ and `setExcludedTools(...)`, prefer the source-qualified filter form `DefaultAgentConfig.setExcludedTools(...)`, use `-` directly. +## Permission Handling + +`PermissionHandler.APPROVE_ALL` approves ordinary requests automatically. When `request.getManagedApprovalRequired()` is `true`, it returns `no-result`; the request remains pending and the host must present a human-facing confirmation flow to resolve it explicitly. + +When handling `PermissionRequestedEvent` directly, convert its generated event value with `PermissionRequest.fromJsonValue(event.getData().permissionRequest())` to access the typed metadata. + +Custom handlers must check managed approval before applying kind-specific automatic decisions: + +```java +import java.util.concurrent.CompletableFuture; + +import com.github.copilot.rpc.PermissionHandler; +import com.github.copilot.rpc.PermissionRequestResult; + +PermissionHandler handler = (request, invocation) -> { + if (Boolean.TRUE.equals(request.getManagedApprovalRequired())) { + return CompletableFuture.completedFuture(PermissionRequestResult.noResult()); + } + + return CompletableFuture.completedFuture(PermissionRequestResult.approveOnce()); +}; +``` + ## Try it with JBang You can run the SDK without setting up a full Java project, by using [JBang](https://www.jbang.dev/). diff --git a/java/src/main/java/com/github/copilot/RpcHandlerDispatcher.java b/java/src/main/java/com/github/copilot/RpcHandlerDispatcher.java index d2dff958dc..f19f14522d 100644 --- a/java/src/main/java/com/github/copilot/RpcHandlerDispatcher.java +++ b/java/src/main/java/com/github/copilot/RpcHandlerDispatcher.java @@ -220,11 +220,7 @@ private void handlePermissionRequest(JsonRpcClient rpc, String requestId, JsonNo session.handlePermissionRequest(permissionRequest).thenAccept(result -> { try { if (PermissionRequestResultKind.NO_RESULT.getValue().equalsIgnoreCase(result.getKind())) { - // Protocol v2 does not support NO_RESULT — the server - // expects exactly one response per request, so abstaining - // would leave it hanging. - throw new IllegalStateException( - "Permission handlers cannot return 'no-result' when connected to a protocol v2 server."); + return; } rpc.sendResponse(requestIdLong, Map.of("result", result)); } catch (IOException e) { diff --git a/java/src/main/java/com/github/copilot/rpc/PermissionHandler.java b/java/src/main/java/com/github/copilot/rpc/PermissionHandler.java index bd8e70b750..49164afc6d 100644 --- a/java/src/main/java/com/github/copilot/rpc/PermissionHandler.java +++ b/java/src/main/java/com/github/copilot/rpc/PermissionHandler.java @@ -17,6 +17,10 @@ * *
{@code
  * PermissionHandler handler = (request, invocation) -> {
+ * 	if (Boolean.TRUE.equals(request.getManagedApprovalRequired())) {
+ * 		return CompletableFuture.completedFuture(PermissionRequestResult.noResult());
+ * 	}
+ *
  * 	// Check the permission kind
  * 	if ("dangerous-action".equals(request.getKind())) {
  * 		// Deny dangerous actions
@@ -43,12 +47,17 @@
 public interface PermissionHandler {
 
     /**
-     * A pre-built handler that approves all permission requests.
+     * A pre-built handler that approves ordinary permission requests.
+     * 

+ * Requests that require managed approval return {@code no-result} and remain + * pending for an explicit human decision. * * @since 1.0.11 */ - PermissionHandler APPROVE_ALL = (request, invocation) -> CompletableFuture - .completedFuture(new PermissionRequestResult().setKind(PermissionRequestResultKind.APPROVED)); + PermissionHandler APPROVE_ALL = (request, + invocation) -> CompletableFuture.completedFuture(Boolean.TRUE.equals(request.getManagedApprovalRequired()) + ? PermissionRequestResult.noResult() + : PermissionRequestResult.approveOnce()); /** * Handles a permission request from the assistant. diff --git a/java/src/main/java/com/github/copilot/rpc/PermissionRequest.java b/java/src/main/java/com/github/copilot/rpc/PermissionRequest.java index 51a303feb0..2886491cd2 100644 --- a/java/src/main/java/com/github/copilot/rpc/PermissionRequest.java +++ b/java/src/main/java/com/github/copilot/rpc/PermissionRequest.java @@ -5,9 +5,13 @@ package com.github.copilot.rpc; import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.ObjectMapper; /** * Represents a permission request from the AI assistant. @@ -22,14 +26,36 @@ @JsonInclude(JsonInclude.Include.NON_NULL) public class PermissionRequest { + private static final ObjectMapper MAPPER = new ObjectMapper(); + @JsonProperty("kind") private String kind; @JsonProperty("toolCallId") private String toolCallId; + @JsonProperty("managedApprovalRequired") + private Boolean managedApprovalRequired; + private Map extensionData; + /** + * Converts the value exposed by a {@code permission.requested} event into a + * typed permission request. + * + * @param value + * the event's {@code permissionRequest} value + * @return the typed permission request + * @throws IllegalArgumentException + * if the value cannot be converted + */ + public static PermissionRequest fromJsonValue(Object value) { + if (value instanceof PermissionRequest request) { + return request; + } + return MAPPER.convertValue(value, PermissionRequest.class); + } + /** * Gets the kind of permission being requested. * @@ -68,11 +94,32 @@ public void setToolCallId(String toolCallId) { this.toolCallId = toolCallId; } + /** + * Gets whether managed policy requires an explicit human decision. + * + * @return {@code true} when automatic approval must be bypassed, otherwise + * {@code false} or {@code null} + */ + public Boolean getManagedApprovalRequired() { + return managedApprovalRequired; + } + + /** + * Sets whether managed policy requires an explicit human decision. + * + * @param managedApprovalRequired + * whether managed approval is required + */ + public void setManagedApprovalRequired(Boolean managedApprovalRequired) { + this.managedApprovalRequired = managedApprovalRequired; + } + /** * Gets additional extension data for the request. * * @return the extension data map */ + @JsonAnyGetter public Map getExtensionData() { return extensionData; } @@ -86,4 +133,20 @@ public Map getExtensionData() { public void setExtensionData(Map extensionData) { this.extensionData = extensionData; } + + /** + * Captures variant-specific permission request fields. + * + * @param name + * the JSON property name + * @param value + * the JSON property value + */ + @JsonAnySetter + public void setExtensionData(String name, Object value) { + if (extensionData == null) { + extensionData = new HashMap<>(); + } + extensionData.put(name, value); + } } diff --git a/java/src/main/java/com/github/copilot/rpc/PermissionRequestResultKind.java b/java/src/main/java/com/github/copilot/rpc/PermissionRequestResultKind.java index 95476c36f6..b17bffdc89 100644 --- a/java/src/main/java/com/github/copilot/rpc/PermissionRequestResultKind.java +++ b/java/src/main/java/com/github/copilot/rpc/PermissionRequestResultKind.java @@ -49,12 +49,8 @@ public final class PermissionRequestResultKind { * When the SDK is used as an extension and the extension's permission handler * cannot or chooses not to handle a given permission request, it can return * {@code NO_RESULT} to leave the request unanswered, allowing another client to - * handle it. - *

- * Warning: This kind is only valid with protocol v3 servers - * (broadcast permission model). When connected to a protocol v2 server, the SDK - * will throw {@link IllegalStateException} because v2 expects exactly one - * response per permission request. + * handle it. The SDK suppresses its response for this result so the request + * remains pending. */ public static final PermissionRequestResultKind NO_RESULT = new PermissionRequestResultKind("no-result"); diff --git a/java/src/test/java/com/github/copilot/PermissionRequestResultTest.java b/java/src/test/java/com/github/copilot/PermissionRequestResultTest.java index 4a1ff03137..ea80b0bed6 100644 --- a/java/src/test/java/com/github/copilot/PermissionRequestResultTest.java +++ b/java/src/test/java/com/github/copilot/PermissionRequestResultTest.java @@ -8,7 +8,11 @@ import org.junit.jupiter.api.Test; +import com.github.copilot.generated.PermissionRequestedEvent; import com.github.copilot.rpc.PermissionRequestResult; +import com.github.copilot.rpc.PermissionHandler; +import com.github.copilot.rpc.PermissionInvocation; +import com.github.copilot.rpc.PermissionRequest; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.json.JsonMapper; import com.fasterxml.jackson.annotation.JsonInclude; @@ -70,4 +74,53 @@ void testFeedbackNotSerializedWhenNull() throws Exception { var json = MAPPER.writeValueAsString(result); assertFalse(json.contains("feedback")); } + + @Test + void testPermissionRequestExposesManagedApprovalRequired() throws Exception { + var request = MAPPER.readValue(""" + { + "kind": "read", + "path": "/workspace/file.txt", + "managedApprovalRequired": true + } + """, PermissionRequest.class); + + assertTrue(request.getManagedApprovalRequired()); + assertEquals("/workspace/file.txt", request.getExtensionData().get("path")); + } + + @Test + void testPermissionEventValueConvertsToTypedRequest() { + var event = MAPPER + .convertValue( + java.util.Map.of("type", "permission.requested", "data", + java.util.Map.of("requestId", "permission-1", "permissionRequest", java.util.Map.of( + "kind", "url", "managedApprovalRequired", true, "url", "https://example.com"))), + PermissionRequestedEvent.class); + var request = PermissionRequest.fromJsonValue(event.getData().permissionRequest()); + + assertTrue(request.getManagedApprovalRequired()); + assertEquals("https://example.com", request.getExtensionData().get("url")); + } + + @Test + void testApproveAllLeavesManagedRequestPending() { + var request = new PermissionRequest(); + request.setKind("read"); + request.setManagedApprovalRequired(true); + + var result = PermissionHandler.APPROVE_ALL.handle(request, new PermissionInvocation()).join(); + + assertEquals("no-result", result.getKind()); + } + + @Test + void testApproveAllApprovesOrdinaryRequest() { + var request = new PermissionRequest(); + request.setKind("read"); + + var result = PermissionHandler.APPROVE_ALL.handle(request, new PermissionInvocation()).join(); + + assertEquals("approve-once", result.getKind()); + } } diff --git a/java/src/test/java/com/github/copilot/RpcHandlerDispatcherTest.java b/java/src/test/java/com/github/copilot/RpcHandlerDispatcherTest.java index 76c2d41b29..a5a1986df5 100644 --- a/java/src/test/java/com/github/copilot/RpcHandlerDispatcherTest.java +++ b/java/src/test/java/com/github/copilot/RpcHandlerDispatcherTest.java @@ -10,6 +10,7 @@ import java.lang.reflect.Field; import java.net.ServerSocket; import java.net.Socket; +import java.net.SocketTimeoutException; import java.util.List; import java.util.Map; import java.util.concurrent.CompletableFuture; @@ -343,7 +344,7 @@ void permissionRequestHandlerFails() throws Exception { } @Test - void permissionRequestV2RejectsNoResult() throws Exception { + void permissionRequestNoResultRemainsPending() throws Exception { CopilotSession session = createSession("s1"); session.registerPermissionHandler((request, invocation) -> CompletableFuture .completedFuture(new PermissionRequestResult().setKind(PermissionRequestResultKind.NO_RESULT))); @@ -354,11 +355,8 @@ void permissionRequestV2RejectsNoResult() throws Exception { invokeHandler("permission.request", "13", params); - // V2 protocol does not support NO_RESULT — the handler should fall through - // to the exception path and respond with denied. - JsonNode response = readResponse(); - JsonNode result = response.get("result").get("result"); - assertEquals("user-not-available", result.get("kind").asText()); + serverSideSocket.setSoTimeout(100); + assertThrows(SocketTimeoutException.class, this::readResponse); } // ===== userInput.request tests ===== diff --git a/python/README.md b/python/README.md index cd8ca43c4a..80a206b7ef 100644 --- a/python/README.md +++ b/python/README.md @@ -121,7 +121,7 @@ async def main(): client = CopilotClient() await client.start() - # Create a session (on_permission_request is optional; approve_all allows every tool) + # approve_all approves ordinary requests; managed requests still require a human decision. session = await client.create_session( on_permission_request=PermissionHandler.approve_all, model="gpt-5", @@ -280,7 +280,7 @@ These are passed as keyword arguments to `create_session()`: - `provider` (ProviderConfig): Custom API provider configuration (BYOK). See [Custom Providers](#custom-providers) section. - `infinite_sessions` (InfiniteSessionConfig): Automatic context compaction configuration - `enable_session_store` (bool): Enables the cross-session store for search and retrieval across sessions. When unset in `"copilot-cli"` mode, the runtime default applies (enabled). In `"empty"` mode, defaults to disabled. -- `on_permission_request` (callable): Optional handler called before each tool execution to approve or deny it. When omitted, permission requests are emitted as events and left pending for manual resolution. Use `PermissionHandler.approve_all` to allow everything, or provide a custom function for fine-grained control. See [Permission Handling](#permission-handling) section. +- `on_permission_request` (callable): Optional handler called before each tool execution to approve or deny it. When omitted, permission requests are emitted as events and left pending for manual resolution. `PermissionHandler.approve_all` approves ordinary requests automatically; requests with `managed_approval_required is True` remain pending for explicit resolution through a human-facing host flow. See [Permission Handling](#permission-handling) section. - `on_user_input_request` (callable): Handler for user input requests from the agent (enables ask_user tool). See [User Input Requests](#user-input-requests) section. - `hooks` (SessionHooks): Hook handlers for session lifecycle events. See [Session Hooks](#session-hooks) section. - `available_tools` / `excluded_tools` / `default_agent.excluded_tools` / custom-agent `tools`: MCP tools registered from `mcp_servers` are exposed to the runtime as `-`. For `available_tools` and `excluded_tools`, prefer `ToolSet().add_mcp("-")` or the raw `mcp:-` form. For custom-agent `tools` and `default_agent.excluded_tools`, use `-` directly. @@ -782,7 +782,7 @@ An `on_permission_request` handler is optional when you create or resume a sessi ### Approve All (simplest) -Use the built-in `PermissionHandler.approve_all` helper to allow every tool call without any checks: +Use the built-in `PermissionHandler.approve_all` helper to approve ordinary permission requests automatically: ```python from copilot import CopilotClient @@ -794,12 +794,14 @@ session = await client.create_session( ) ``` +For requests with `managed_approval_required is True`, `approve_all` returns `PermissionNoResult`. The request remains pending and the host must present a human-facing confirmation flow to resolve it explicitly. + ### Custom Permission Handler -Provide your own function to inspect each request and apply custom logic (sync or async): +Provide your own function to inspect each request and apply custom logic (sync or async). Check `managed_approval_required` before any automatic approval: ```python -from copilot import PermissionRequest, PermissionRequestResult +from copilot import PermissionNoResult, PermissionRequest, PermissionRequestResult from copilot.rpc import ( PermissionDecisionApproveOnce, PermissionDecisionReject, @@ -808,6 +810,9 @@ from copilot.session_events import PermissionRequestShell def on_permission_request(request: PermissionRequest, invocation: dict) -> PermissionRequestResult: + if request.managed_approval_required is True: + return PermissionNoResult() + # ``PermissionRequest`` is a discriminated union — pattern-match on # the variant class to access the per-kind fields. match request: @@ -830,6 +835,9 @@ Async handlers are also supported: async def on_permission_request( request: PermissionRequest, invocation: dict ) -> PermissionRequestResult: + if request.managed_approval_required is True: + return PermissionNoResult() + # Simulate an async approval check (e.g., prompting a user over a network) await asyncio.sleep(0) return PermissionDecisionApproveOnce() diff --git a/python/copilot/generated/session_events.py b/python/copilot/generated/session_events.py index 8099ecd59b..0b024dda02 100644 --- a/python/copilot/generated/session_events.py +++ b/python/copilot/generated/session_events.py @@ -4991,6 +4991,7 @@ class PermissionRequestCustomTool: tool_description: str tool_name: str args: Any = None + managed_approval_required: bool | None = None tool_call_id: str | None = None @staticmethod @@ -4999,11 +5000,13 @@ def from_dict(obj: Any) -> "PermissionRequestCustomTool": tool_description = from_str(obj.get("toolDescription")) tool_name = from_str(obj.get("toolName")) args = obj.get("args") + managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) return PermissionRequestCustomTool( tool_description=tool_description, tool_name=tool_name, args=args, + managed_approval_required=managed_approval_required, tool_call_id=tool_call_id, ) @@ -5014,6 +5017,8 @@ def to_dict(self) -> dict: result["toolName"] = from_str(self.tool_name) if self.args is not None: result["args"] = self.args + if self.managed_approval_required is not None: + result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) if self.tool_call_id is not None: result["toolCallId"] = from_union([from_none, from_str], self.tool_call_id) return result @@ -5025,6 +5030,7 @@ class PermissionRequestExtensionManagement: kind: ClassVar[str] = "extension-management" operation: str extension_name: str | None = None + managed_approval_required: bool | None = None tool_call_id: str | None = None @staticmethod @@ -5032,10 +5038,12 @@ def from_dict(obj: Any) -> "PermissionRequestExtensionManagement": assert isinstance(obj, dict) operation = from_str(obj.get("operation")) extension_name = from_union([from_none, from_str], obj.get("extensionName")) + managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) return PermissionRequestExtensionManagement( operation=operation, extension_name=extension_name, + managed_approval_required=managed_approval_required, tool_call_id=tool_call_id, ) @@ -5045,6 +5053,8 @@ def to_dict(self) -> dict: result["operation"] = from_str(self.operation) if self.extension_name is not None: result["extensionName"] = from_union([from_none, from_str], self.extension_name) + if self.managed_approval_required is not None: + result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) if self.tool_call_id is not None: result["toolCallId"] = from_union([from_none, from_str], self.tool_call_id) return result @@ -5056,6 +5066,7 @@ class PermissionRequestExtensionPermissionAccess: capabilities: list[str] extension_name: str kind: ClassVar[str] = "extension-permission-access" + managed_approval_required: bool | None = None tool_call_id: str | None = None @staticmethod @@ -5063,10 +5074,12 @@ def from_dict(obj: Any) -> "PermissionRequestExtensionPermissionAccess": assert isinstance(obj, dict) capabilities = from_list(from_str, obj.get("capabilities")) extension_name = from_str(obj.get("extensionName")) + managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) return PermissionRequestExtensionPermissionAccess( capabilities=capabilities, extension_name=extension_name, + managed_approval_required=managed_approval_required, tool_call_id=tool_call_id, ) @@ -5075,6 +5088,8 @@ def to_dict(self) -> dict: result["capabilities"] = from_list(from_str, self.capabilities) result["extensionName"] = from_str(self.extension_name) result["kind"] = self.kind + if self.managed_approval_required is not None: + result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) if self.tool_call_id is not None: result["toolCallId"] = from_union([from_none, from_str], self.tool_call_id) return result @@ -5086,6 +5101,7 @@ class PermissionRequestHook: kind: ClassVar[str] = "hook" tool_name: str hook_message: str | None = None + managed_approval_required: bool | None = None tool_args: Any = None tool_call_id: str | None = None @@ -5094,11 +5110,13 @@ def from_dict(obj: Any) -> "PermissionRequestHook": assert isinstance(obj, dict) tool_name = from_str(obj.get("toolName")) hook_message = from_union([from_none, from_str], obj.get("hookMessage")) + managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) tool_args = obj.get("toolArgs") tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) return PermissionRequestHook( tool_name=tool_name, hook_message=hook_message, + managed_approval_required=managed_approval_required, tool_args=tool_args, tool_call_id=tool_call_id, ) @@ -5109,6 +5127,8 @@ def to_dict(self) -> dict: result["toolName"] = from_str(self.tool_name) if self.hook_message is not None: result["hookMessage"] = from_union([from_none, from_str], self.hook_message) + if self.managed_approval_required is not None: + result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) if self.tool_args is not None: result["toolArgs"] = self.tool_args if self.tool_call_id is not None: @@ -5125,6 +5145,7 @@ class PermissionRequestMcp: tool_name: str tool_title: str args: Any = None + managed_approval_required: bool | None = None tool_call_id: str | None = None @staticmethod @@ -5135,6 +5156,7 @@ def from_dict(obj: Any) -> "PermissionRequestMcp": tool_name = from_str(obj.get("toolName")) tool_title = from_str(obj.get("toolTitle")) args = obj.get("args") + managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) return PermissionRequestMcp( read_only=read_only, @@ -5142,6 +5164,7 @@ def from_dict(obj: Any) -> "PermissionRequestMcp": tool_name=tool_name, tool_title=tool_title, args=args, + managed_approval_required=managed_approval_required, tool_call_id=tool_call_id, ) @@ -5154,6 +5177,8 @@ def to_dict(self) -> dict: result["toolTitle"] = from_str(self.tool_title) if self.args is not None: result["args"] = self.args + if self.managed_approval_required is not None: + result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) if self.tool_call_id is not None: result["toolCallId"] = from_union([from_none, from_str], self.tool_call_id) return result @@ -5167,6 +5192,7 @@ class PermissionRequestMemory: action: PermissionRequestMemoryAction | None = None citations: str | None = None direction: PermissionRequestMemoryDirection | None = None + managed_approval_required: bool | None = None reason: str | None = None subject: str | None = None tool_call_id: str | None = None @@ -5178,6 +5204,7 @@ def from_dict(obj: Any) -> "PermissionRequestMemory": action = from_union([from_none, lambda x: parse_enum(PermissionRequestMemoryAction, x)], obj.get("action")) citations = from_union([from_none, from_str], obj.get("citations")) direction = from_union([from_none, lambda x: parse_enum(PermissionRequestMemoryDirection, x)], obj.get("direction")) + managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) reason = from_union([from_none, from_str], obj.get("reason")) subject = from_union([from_none, from_str], obj.get("subject")) tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) @@ -5186,6 +5213,7 @@ def from_dict(obj: Any) -> "PermissionRequestMemory": action=action, citations=citations, direction=direction, + managed_approval_required=managed_approval_required, reason=reason, subject=subject, tool_call_id=tool_call_id, @@ -5201,6 +5229,8 @@ def to_dict(self) -> dict: result["citations"] = from_union([from_none, from_str], self.citations) if self.direction is not None: result["direction"] = from_union([from_none, lambda x: to_enum(PermissionRequestMemoryDirection, x)], self.direction) + if self.managed_approval_required is not None: + result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) if self.reason is not None: result["reason"] = from_union([from_none, from_str], self.reason) if self.subject is not None: diff --git a/python/copilot/session.py b/python/copilot/session.py index d9fc04dcef..d022e7a919 100644 --- a/python/copilot/session.py +++ b/python/copilot/session.py @@ -373,6 +373,8 @@ class PermissionHandler: def approve_all( request: PermissionRequest, invocation: dict[str, str] ) -> PermissionRequestResult: + if request.managed_approval_required is True: + return PermissionNoResult() return PermissionDecisionApproveOnce() diff --git a/python/test_managed_permissions.py b/python/test_managed_permissions.py new file mode 100644 index 0000000000..26575af0d3 --- /dev/null +++ b/python/test_managed_permissions.py @@ -0,0 +1,44 @@ +from copilot.rpc import PermissionDecisionApproveOnce +from copilot.session import PermissionHandler, PermissionNoResult +from copilot.session_events import PermissionRequestedData, PermissionRequestRead + + +def test_permission_event_exposes_managed_approval_required() -> None: + data = PermissionRequestedData.from_dict( + { + "permissionRequest": { + "kind": "read", + "intention": "Read managed content", + "path": "/workspace/file.txt", + "managedApprovalRequired": True, + }, + "requestId": "permission-1", + } + ) + + assert data.permission_request.managed_approval_required is True + assert data.to_dict()["permissionRequest"]["managedApprovalRequired"] is True + + +def test_approve_all_leaves_managed_request_pending() -> None: + request = PermissionRequestRead( + intention="Read managed content", + path="/workspace/file.txt", + managed_approval_required=True, + ) + + assert isinstance( + PermissionHandler.approve_all(request, {"sessionId": "session-1"}), PermissionNoResult + ) + + +def test_approve_all_approves_ordinary_request() -> None: + request = PermissionRequestRead( + intention="Read ordinary content", + path="/workspace/file.txt", + ) + + assert isinstance( + PermissionHandler.approve_all(request, {"sessionId": "session-1"}), + PermissionDecisionApproveOnce, + ) diff --git a/rust/README.md b/rust/README.md index 6f68dde1e0..eae49c8549 100644 --- a/rust/README.md +++ b/rust/README.md @@ -230,6 +230,10 @@ impl PermissionHandler for MyPermissions { _rid: RequestId, data: PermissionRequestData, ) -> PermissionResult { + if data.managed_approval_required == Some(true) { + return PermissionResult::no_result(); + } + if data.extra.get("tool").and_then(|v| v.as_str()) == Some("view") { PermissionResult::approve_once() } else { @@ -250,7 +254,7 @@ let config = SessionConfig::default() .with_user_input_handler(h); ``` -The built-in `ApproveAllHandler` and `DenyAllHandler` implement `PermissionHandler` for the common cases. To observe streamed session events (assistant messages, tool calls, etc.), call `session.subscribe()` — see [Streaming](#streaming) below. +The built-in `ApproveAllHandler` and `DenyAllHandler` implement `PermissionHandler` for the common cases. `ApproveAllHandler` leaves requests with `managed_approval_required == Some(true)` pending for an explicit human decision. To observe streamed session events (assistant messages, tool calls, etc.), call `session.subscribe()` — see [Streaming](#streaming) below. ### SessionConfig @@ -430,6 +434,8 @@ Reach for the `ToolHandler` trait directly when you need shared state across mul Set a permission policy directly on `SessionConfig` with the chainable builders. They install a synthesized `PermissionHandler` so only permission requests are intercepted; every other event flows through unchanged. +The approve-all policy leaves managed approval requests pending so a human-facing host flow can resolve them explicitly. + ```rust,ignore let session = client .create_session( diff --git a/rust/src/generated/session_events.rs b/rust/src/generated/session_events.rs index cb3a45b21a..232955ea39 100644 --- a/rust/src/generated/session_events.rs +++ b/rust/src/generated/session_events.rs @@ -3017,7 +3017,7 @@ pub struct PermissionRequestShell { pub intention: String, /// Permission kind discriminator pub kind: PermissionRequestShellKind, - /// Whether managed policy requires a human response and forbids host auto-approval + /// When true, managed policy requires an explicit user decision and automatic approval must be bypassed. #[serde(skip_serializing_if = "Option::is_none")] pub managed_approval_required: Option, /// File paths that may be read or written by the command @@ -3052,7 +3052,7 @@ pub struct PermissionRequestWrite { pub intention: String, /// Permission kind discriminator pub kind: PermissionRequestWriteKind, - /// Whether managed policy requires a human response and forbids host auto-approval + /// When true, managed policy requires an explicit user decision and automatic approval must be bypassed. #[serde(skip_serializing_if = "Option::is_none")] pub managed_approval_required: Option, /// Complete new file contents for newly created files @@ -3077,7 +3077,7 @@ pub struct PermissionRequestRead { pub intention: String, /// Permission kind discriminator pub kind: PermissionRequestReadKind, - /// Whether managed policy requires a human response and forbids host auto-approval + /// When true, managed policy requires an explicit user decision and automatic approval must be bypassed. #[serde(skip_serializing_if = "Option::is_none")] pub managed_approval_required: Option, /// Path of the file or directory being read @@ -3102,6 +3102,9 @@ pub struct PermissionRequestMcp { pub args: Option, /// Permission kind discriminator pub kind: PermissionRequestMcpKind, + /// When true, managed policy requires an explicit user decision and automatic approval must be bypassed. + #[serde(skip_serializing_if = "Option::is_none")] + pub managed_approval_required: Option, /// Whether this MCP tool is read-only (no side effects) pub read_only: bool, /// Name of the MCP server providing the tool @@ -3123,7 +3126,7 @@ pub struct PermissionRequestUrl { pub intention: String, /// Permission kind discriminator pub kind: PermissionRequestUrlKind, - /// Whether managed policy requires a human response and forbids host auto-approval + /// When true, managed policy requires an explicit user decision and automatic approval must be bypassed. #[serde(skip_serializing_if = "Option::is_none")] pub managed_approval_required: Option, /// Immediately preceding URL when this request is for a redirect target @@ -3159,6 +3162,9 @@ pub struct PermissionRequestMemory { pub fact: String, /// Permission kind discriminator pub kind: PermissionRequestMemoryKind, + /// When true, managed policy requires an explicit user decision and automatic approval must be bypassed. + #[serde(skip_serializing_if = "Option::is_none")] + pub managed_approval_required: Option, /// Reason for the vote (vote only) #[serde(skip_serializing_if = "Option::is_none")] pub reason: Option, @@ -3179,6 +3185,9 @@ pub struct PermissionRequestCustomTool { pub args: Option, /// Permission kind discriminator pub kind: PermissionRequestCustomToolKind, + /// When true, managed policy requires an explicit user decision and automatic approval must be bypassed. + #[serde(skip_serializing_if = "Option::is_none")] + pub managed_approval_required: Option, /// Tool call ID that triggered this permission request #[serde(skip_serializing_if = "Option::is_none")] pub tool_call_id: Option, @@ -3197,6 +3206,9 @@ pub struct PermissionRequestHook { pub hook_message: Option, /// Permission kind discriminator pub kind: PermissionRequestHookKind, + /// When true, managed policy requires an explicit user decision and automatic approval must be bypassed. + #[serde(skip_serializing_if = "Option::is_none")] + pub managed_approval_required: Option, /// Arguments of the tool call being gated #[serde(skip_serializing_if = "Option::is_none")] pub tool_args: Option, @@ -3216,6 +3228,9 @@ pub struct PermissionRequestExtensionManagement { pub extension_name: Option, /// Permission kind discriminator pub kind: PermissionRequestExtensionManagementKind, + /// When true, managed policy requires an explicit user decision and automatic approval must be bypassed. + #[serde(skip_serializing_if = "Option::is_none")] + pub managed_approval_required: Option, /// The extension management operation (scaffold, reload) pub operation: String, /// Tool call ID that triggered this permission request @@ -3233,6 +3248,9 @@ pub struct PermissionRequestExtensionPermissionAccess { pub extension_name: String, /// Permission kind discriminator pub kind: PermissionRequestExtensionPermissionAccessKind, + /// When true, managed policy requires an explicit user decision and automatic approval must be bypassed. + #[serde(skip_serializing_if = "Option::is_none")] + pub managed_approval_required: Option, /// Tool call ID that triggered this permission request #[serde(skip_serializing_if = "Option::is_none")] pub tool_call_id: Option, diff --git a/rust/src/handler.rs b/rust/src/handler.rs index 3287a4f093..6e3bab0485 100644 --- a/rust/src/handler.rs +++ b/rust/src/handler.rs @@ -273,9 +273,8 @@ pub trait AutoModeSwitchHandler: Send + Sync + 'static { ) -> AutoModeSwitchResponse; } -/// A [`PermissionHandler`] that approves every request. Useful for CLI -/// tools, scripts, and tests that don't need interactive permission -/// prompts. +/// A [`PermissionHandler`] that approves ordinary requests. Requests that +/// require managed approval remain pending for an explicit human decision. #[derive(Debug, Clone)] pub struct ApproveAllHandler; @@ -285,9 +284,13 @@ impl PermissionHandler for ApproveAllHandler { &self, _session_id: SessionId, _request_id: RequestId, - _data: PermissionRequestData, + data: PermissionRequestData, ) -> PermissionResult { - PermissionResult::approve_once() + if data.managed_approval_required == Some(true) { + PermissionResult::no_result() + } else { + PermissionResult::approve_once() + } } } @@ -326,6 +329,21 @@ mod tests { )); } + #[tokio::test] + async fn approve_all_handler_leaves_managed_request_pending() { + let result = ApproveAllHandler + .handle( + SessionId::from("s1"), + RequestId::new("1"), + PermissionRequestData { + managed_approval_required: Some(true), + ..Default::default() + }, + ) + .await; + assert!(matches!(result, PermissionResult::NoResult)); + } + #[tokio::test] async fn deny_all_handler_returns_denied() { let result = DenyAllHandler diff --git a/rust/src/permission.rs b/rust/src/permission.rs index 2ddd773a30..ed3586c076 100644 --- a/rust/src/permission.rs +++ b/rust/src/permission.rs @@ -19,7 +19,10 @@ use async_trait::async_trait; use crate::handler::{PermissionHandler, PermissionResult}; use crate::types::{PermissionRequestData, RequestId, SessionId}; -/// Return a [`PermissionHandler`] that approves every request. +/// Return a [`PermissionHandler`] that approves ordinary requests. +/// +/// Requests that require managed approval remain pending for an explicit +/// human decision. pub fn approve_all() -> Arc { Arc::new(PolicyHandler { policy: Policy::ApproveAll, @@ -110,6 +113,12 @@ impl PermissionHandler for PolicyHandler { _request_id: RequestId, data: PermissionRequestData, ) -> PermissionResult { + if matches!(&self.policy, Policy::ApproveAll) + && data.managed_approval_required == Some(true) + { + return PermissionResult::no_result(); + } + let approved = match &self.policy { Policy::ApproveAll => true, Policy::DenyAll => false, @@ -144,6 +153,18 @@ mod tests { )); } + #[tokio::test] + async fn approve_all_leaves_managed_request_pending() { + let h = approve_all(); + let mut request = data(); + request.managed_approval_required = Some(true); + assert!(matches!( + h.handle(SessionId::from("s"), RequestId::new("1"), request) + .await, + PermissionResult::NoResult + )); + } + #[tokio::test] async fn deny_all_denies() { let h = deny_all(); diff --git a/rust/src/session.rs b/rust/src/session.rs index 165dc2e17f..7d168baf44 100644 --- a/rust/src/session.rs +++ b/rust/src/session.rs @@ -1520,6 +1520,19 @@ fn extract_request_id(data: &Value) -> Option { .map(RequestId::new) } +fn permission_request_data(event_data: &Value) -> PermissionRequestData { + let request_data = event_data + .get("permissionRequest") + .cloned() + .unwrap_or_else(|| event_data.clone()); + serde_json::from_value(request_data.clone()).unwrap_or(PermissionRequestData { + kind: None, + tool_call_id: None, + managed_approval_required: None, + extra: request_data, + }) +} + /// Map a [`PermissionResult`] to the `result` payload sent back to the /// server via `session.permissions.handlePendingPermissionRequest`. /// @@ -1705,14 +1718,7 @@ async fn handle_notification( }; let client = client.clone(); let sid = session_id.clone(); - let data: PermissionRequestData = - serde_json::from_value(notification.event.data.clone()).unwrap_or_else(|_| { - PermissionRequestData { - kind: None, - tool_call_id: None, - extra: notification.event.data.clone(), - } - }); + let data = permission_request_data(¬ification.event.data); let span = tracing::error_span!( "permission_request_handler", session_id = %sid, @@ -2514,7 +2520,7 @@ fn inject_transform_sections_resume( mod tests { use serde_json::json; - use super::notification_permission_payload; + use super::{notification_permission_payload, permission_request_data}; use crate::handler::PermissionResult; #[test] @@ -2541,4 +2547,19 @@ mod tests { Some(json!({ "kind": "user-not-available" })) ); } + + #[test] + fn permission_request_data_reads_nested_managed_approval_metadata() { + let data = permission_request_data(&json!({ + "requestId": "permission-1", + "permissionRequest": { + "kind": "read", + "managedApprovalRequired": true, + "path": "/workspace/file.txt" + } + })); + + assert_eq!(data.managed_approval_required, Some(true)); + assert_eq!(data.extra["path"], "/workspace/file.txt"); + } } diff --git a/rust/src/types.rs b/rust/src/types.rs index 11a92ad514..165f08eb24 100644 --- a/rust/src/types.rs +++ b/rust/src/types.rs @@ -5445,6 +5445,9 @@ pub struct PermissionRequestData { /// to a specific tool invocation. #[serde(default, skip_serializing_if = "Option::is_none")] pub tool_call_id: Option, + /// Whether managed policy requires an explicit human decision. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub managed_approval_required: Option, /// The full permission request params from the CLI. The shape varies by /// permission type and CLI version, so we preserve it as `Value`. #[serde(flatten)] diff --git a/rust/tests/api_types_test.rs b/rust/tests/api_types_test.rs index bcf2266916..9b86b1367a 100644 --- a/rust/tests/api_types_test.rs +++ b/rust/tests/api_types_test.rs @@ -7,6 +7,7 @@ use github_copilot_sdk::rpc::{ Extension, ExtensionList, ExtensionSource, ExtensionStatus, ExtensionsDisableRequest, ExtensionsEnableRequest, FleetStartRequest, FleetStartResult, TasksStartAgentRequest, }; +use github_copilot_sdk::session_events::{PermissionRequest, PermissionRequestedData}; #[test] fn extension_running_has_expected_status_and_source() { @@ -84,6 +85,25 @@ fn tasks_start_agent_request_fields_are_accessible() { assert_eq!(request.description.as_deref(), Some("SDK task agent")); } +#[test] +fn permission_event_exposes_managed_approval_required() { + let data: PermissionRequestedData = serde_json::from_value(serde_json::json!({ + "permissionRequest": { + "kind": "read", + "intention": "Read managed content", + "path": "/workspace/file.txt", + "managedApprovalRequired": true + }, + "requestId": "permission-1" + })) + .unwrap(); + + let PermissionRequest::Read(request) = data.permission_request else { + panic!("expected read permission request"); + }; + assert_eq!(request.managed_approval_required, Some(true)); +} + fn running_extension(id: &str, name: &str) -> Extension { Extension { id: id.to_string(), diff --git a/scripts/codegen/go.ts b/scripts/codegen/go.ts index b1d7474b98..d6eda7f99a 100644 --- a/scripts/codegen/go.ts +++ b/scripts/codegen/go.ts @@ -14,6 +14,7 @@ import { fileURLToPath } from "url"; import { promisify } from "util"; import wordwrap from "wordwrap"; import { + addManagedApprovalRequiredToPermissionRequests, cloneSchemaForCodegen, collectDefinitionCollections, collectExperimentalOnlyRpcReferencedDefinitionNames, @@ -1812,6 +1813,9 @@ function emitGoFlatDiscriminatedUnion( lines.push(`type ${typeName} interface {`); lines.push(`\t${markerName}()`); lines.push(`\t${discriminatorMethodName}() ${discGoType}`); + if (typeName === "PermissionRequest") { + lines.push(`\tRequiresManagedApproval() bool`); + } lines.push(`}`); lines.push(``); @@ -3679,7 +3683,9 @@ async function generateSessionEvents(schemaPath?: string, apiSchema?: ApiSchema) console.log("Go: generating session-events..."); const resolvedPath = schemaPath ?? (await getSessionEventsSchemaPath()); - const schema = cloneSchemaForCodegen((await loadSchemaJson(resolvedPath)) as JSONSchema7); + const schema = addManagedApprovalRequiredToPermissionRequests( + (await loadSchemaJson(resolvedPath)) as JSONSchema7 + ); const processed = propagateInternalVisibility(postProcessSchema(schema)); const processedApiSchema = apiSchema ? propagateInternalVisibility(postProcessSchema(cloneSchemaForCodegen(apiSchema as JSONSchema7)) as JSONSchema7) diff --git a/scripts/codegen/python.ts b/scripts/codegen/python.ts index 7415914282..0752ef2736 100644 --- a/scripts/codegen/python.ts +++ b/scripts/codegen/python.ts @@ -11,6 +11,7 @@ import path from "path"; import type { JSONSchema7, JSONSchema7Definition } from "json-schema"; import { fileURLToPath } from "url"; import { + addManagedApprovalRequiredToPermissionRequests, cloneSchemaForCodegen, filterNodeByVisibility, fixNullableRequiredRefsInApiSchema, @@ -2841,7 +2842,9 @@ async function generateSessionEvents(schemaPath?: string): Promise { console.log("Python: generating session-events..."); const resolvedPath = schemaPath ?? (await getSessionEventsSchemaPath()); - const schema = (await loadSchemaJson(resolvedPath)) as JSONSchema7; + const schema = addManagedApprovalRequiredToPermissionRequests( + (await loadSchemaJson(resolvedPath)) as JSONSchema7 + ); const processed = propagateInternalVisibility(postProcessSchema(schema)); let code = generatePythonSessionEventsCode(processed); const { typeNames } = collectInternalSymbols(processed); diff --git a/scripts/codegen/rust.ts b/scripts/codegen/rust.ts index 127dc2e48d..4090318f05 100644 --- a/scripts/codegen/rust.ts +++ b/scripts/codegen/rust.ts @@ -17,6 +17,7 @@ import { fileURLToPath } from "url"; import { promisify } from "util"; import type { JSONSchema7, JSONSchema7Definition } from "json-schema"; import { + addManagedApprovalRequiredToPermissionRequests, type ApiSchema, type DefinitionCollections, EXCLUDED_EVENT_TYPES, @@ -2211,7 +2212,9 @@ async function generate(): Promise { const sessionEventsSchema = propagateInternalVisibility( postProcessSchema( - stripBooleanLiterals(sessionEventsRaw) as JSONSchema7, + stripBooleanLiterals( + addManagedApprovalRequiredToPermissionRequests(sessionEventsRaw as JSONSchema7), + ) as JSONSchema7, ), ); const apiSchema = propagateInternalVisibility( diff --git a/scripts/codegen/utils.ts b/scripts/codegen/utils.ts index 9ab335b05f..2138457dcd 100644 --- a/scripts/codegen/utils.ts +++ b/scripts/codegen/utils.ts @@ -453,6 +453,47 @@ export function cloneSchemaForCodegen(value: T): T { return value; } +const PERMISSION_REQUEST_DEFINITION_NAMES = [ + "PermissionRequestCustomTool", + "PermissionRequestExtensionManagement", + "PermissionRequestExtensionPermissionAccess", + "PermissionRequestHook", + "PermissionRequestMcp", + "PermissionRequestMemory", + "PermissionRequestRead", + "PermissionRequestShell", + "PermissionRequestUrl", + "PermissionRequestWrite", +] as const; + +/** + * Add managed approval metadata until the pinned CLI schema includes the field. + */ +export function addManagedApprovalRequiredToPermissionRequests(schema: T): T { + const cloned = cloneSchemaForCodegen(schema); + const property: JSONSchema7 = { + description: + "When true, managed policy requires an explicit user decision and automatic approval must be bypassed.", + type: ["boolean", "null"], + }; + + for (const definitions of [cloned.definitions, cloned.$defs]) { + if (!definitions) continue; + for (const name of PERMISSION_REQUEST_DEFINITION_NAMES) { + const definition = definitions[name]; + if (!definition || typeof definition !== "object") continue; + const objectDefinition = definition as JSONSchema7; + objectDefinition.properties = { + ...objectDefinition.properties, + managedApprovalRequired: + objectDefinition.properties?.managedApprovalRequired ?? cloneSchemaForCodegen(property), + }; + } + } + + return cloned; +} + export function getEnumValueDescriptions(schema: JSONSchema7 | null | undefined): EnumValueDescriptions | undefined { if (!schema || typeof schema !== "object") return undefined; From 2c9086aacf34b71e18c723d5121f57ec098f69c8 Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Wed, 29 Jul 2026 11:49:40 -0700 Subject: [PATCH 07/41] Respect managed approval in permission policies Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../github/copilot/RpcHandlerDispatcher.java | 3 +- .../rpc/PermissionRequestResultKind.java | 6 ++-- .../copilot/RpcHandlerDispatcherTest.java | 8 ++--- python/copilot/session.py | 6 ++-- rust/src/permission.rs | 36 +++++++++++++++---- 5 files changed, 41 insertions(+), 18 deletions(-) diff --git a/java/src/main/java/com/github/copilot/RpcHandlerDispatcher.java b/java/src/main/java/com/github/copilot/RpcHandlerDispatcher.java index f19f14522d..1fa331a71d 100644 --- a/java/src/main/java/com/github/copilot/RpcHandlerDispatcher.java +++ b/java/src/main/java/com/github/copilot/RpcHandlerDispatcher.java @@ -220,7 +220,8 @@ private void handlePermissionRequest(JsonRpcClient rpc, String requestId, JsonNo session.handlePermissionRequest(permissionRequest).thenAccept(result -> { try { if (PermissionRequestResultKind.NO_RESULT.getValue().equalsIgnoreCase(result.getKind())) { - return; + throw new IllegalStateException( + "Permission handlers cannot return 'no-result' when connected to a protocol v2 server."); } rpc.sendResponse(requestIdLong, Map.of("result", result)); } catch (IOException e) { diff --git a/java/src/main/java/com/github/copilot/rpc/PermissionRequestResultKind.java b/java/src/main/java/com/github/copilot/rpc/PermissionRequestResultKind.java index b17bffdc89..14b6413e78 100644 --- a/java/src/main/java/com/github/copilot/rpc/PermissionRequestResultKind.java +++ b/java/src/main/java/com/github/copilot/rpc/PermissionRequestResultKind.java @@ -49,8 +49,10 @@ public final class PermissionRequestResultKind { * When the SDK is used as an extension and the extension's permission handler * cannot or chooses not to handle a given permission request, it can return * {@code NO_RESULT} to leave the request unanswered, allowing another client to - * handle it. The SDK suppresses its response for this result so the request - * remains pending. + * handle it. + *

+ * This kind is supported by the broadcast permission flow. Legacy protocol-v2 + * request callbacks require an immediate response and reject this result. */ public static final PermissionRequestResultKind NO_RESULT = new PermissionRequestResultKind("no-result"); diff --git a/java/src/test/java/com/github/copilot/RpcHandlerDispatcherTest.java b/java/src/test/java/com/github/copilot/RpcHandlerDispatcherTest.java index a5a1986df5..9b1d7c6795 100644 --- a/java/src/test/java/com/github/copilot/RpcHandlerDispatcherTest.java +++ b/java/src/test/java/com/github/copilot/RpcHandlerDispatcherTest.java @@ -10,7 +10,6 @@ import java.lang.reflect.Field; import java.net.ServerSocket; import java.net.Socket; -import java.net.SocketTimeoutException; import java.util.List; import java.util.Map; import java.util.concurrent.CompletableFuture; @@ -344,7 +343,7 @@ void permissionRequestHandlerFails() throws Exception { } @Test - void permissionRequestNoResultRemainsPending() throws Exception { + void permissionRequestV2RejectsNoResult() throws Exception { CopilotSession session = createSession("s1"); session.registerPermissionHandler((request, invocation) -> CompletableFuture .completedFuture(new PermissionRequestResult().setKind(PermissionRequestResultKind.NO_RESULT))); @@ -355,8 +354,9 @@ void permissionRequestNoResultRemainsPending() throws Exception { invokeHandler("permission.request", "13", params); - serverSideSocket.setSoTimeout(100); - assertThrows(SocketTimeoutException.class, this::readResponse); + JsonNode response = readResponse(); + JsonNode result = response.get("result").get("result"); + assertEquals("user-not-available", result.get("kind").asText()); } // ===== userInput.request tests ===== diff --git a/python/copilot/session.py b/python/copilot/session.py index d022e7a919..4c80874ad1 100644 --- a/python/copilot/session.py +++ b/python/copilot/session.py @@ -344,10 +344,8 @@ class SystemMessageCustomizeConfig(TypedDict, total=False): class PermissionNoResult: """Sentinel returned by a permission handler to leave the request unanswered. - Only meaningful against protocol-v1 servers. v2 servers reject ``no-result`` - responses; the SDK raises :class:`ValueError` if a v2 server receives one. - Mirrors the ``{kind: "no-result"}`` extension TS adds to its ``PermissionDecision`` - union (see ``nodejs/src/types.ts:883``). + The SDK suppresses its response so another connected client, such as a + human-facing host, can answer the pending request. """ kind: Literal["no-result"] = "no-result" diff --git a/rust/src/permission.rs b/rust/src/permission.rs index ed3586c076..0114842a16 100644 --- a/rust/src/permission.rs +++ b/rust/src/permission.rs @@ -113,19 +113,17 @@ impl PermissionHandler for PolicyHandler { _request_id: RequestId, data: PermissionRequestData, ) -> PermissionResult { - if matches!(&self.policy, Policy::ApproveAll) - && data.managed_approval_required == Some(true) - { - return PermissionResult::no_result(); - } - let approved = match &self.policy { Policy::ApproveAll => true, Policy::DenyAll => false, Policy::Predicate(f) => f(&data), }; if approved { - PermissionResult::approve_once() + if data.managed_approval_required == Some(true) { + PermissionResult::no_result() + } else { + PermissionResult::approve_once() + } } else { PermissionResult::reject(None) } @@ -185,6 +183,30 @@ mod tests { )); } + #[tokio::test] + async fn approve_if_leaves_managed_approval_pending_when_predicate_approves() { + let h = approve_if(|_| true); + let mut request = data(); + request.managed_approval_required = Some(true); + assert!(matches!( + h.handle(SessionId::from("s"), RequestId::new("1"), request) + .await, + PermissionResult::NoResult + )); + } + + #[tokio::test] + async fn approve_if_still_rejects_managed_request_when_predicate_denies() { + let h = approve_if(|_| false); + let mut request = data(); + request.managed_approval_required = Some(true); + assert!(matches!( + h.handle(SessionId::from("s"), RequestId::new("1"), request) + .await, + PermissionResult::Decision(crate::types::PermissionDecision::Reject(_)) + )); + } + #[tokio::test] async fn resolve_handler_policy_wins() { struct AlwaysApprove; From c5dacda6a2ad9db3b20f9c5021b09b6951846b25 Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Wed, 29 Jul 2026 13:20:24 -0700 Subject: [PATCH 08/41] Minimize Java permission overlay Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../github/copilot/RpcHandlerDispatcher.java | 3 +++ .../github/copilot/rpc/PermissionRequest.java | 22 ++----------------- .../rpc/PermissionRequestResultKind.java | 6 +++-- .../copilot/PermissionRequestResultTest.java | 2 -- .../copilot/RpcHandlerDispatcherTest.java | 2 ++ 5 files changed, 11 insertions(+), 24 deletions(-) diff --git a/java/src/main/java/com/github/copilot/RpcHandlerDispatcher.java b/java/src/main/java/com/github/copilot/RpcHandlerDispatcher.java index 1fa331a71d..d2dff958dc 100644 --- a/java/src/main/java/com/github/copilot/RpcHandlerDispatcher.java +++ b/java/src/main/java/com/github/copilot/RpcHandlerDispatcher.java @@ -220,6 +220,9 @@ private void handlePermissionRequest(JsonRpcClient rpc, String requestId, JsonNo session.handlePermissionRequest(permissionRequest).thenAccept(result -> { try { if (PermissionRequestResultKind.NO_RESULT.getValue().equalsIgnoreCase(result.getKind())) { + // Protocol v2 does not support NO_RESULT — the server + // expects exactly one response per request, so abstaining + // would leave it hanging. throw new IllegalStateException( "Permission handlers cannot return 'no-result' when connected to a protocol v2 server."); } diff --git a/java/src/main/java/com/github/copilot/rpc/PermissionRequest.java b/java/src/main/java/com/github/copilot/rpc/PermissionRequest.java index 2886491cd2..936c570899 100644 --- a/java/src/main/java/com/github/copilot/rpc/PermissionRequest.java +++ b/java/src/main/java/com/github/copilot/rpc/PermissionRequest.java @@ -5,10 +5,8 @@ package com.github.copilot.rpc; import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.ObjectMapper; @@ -24,6 +22,7 @@ * @since 1.0.0 */ @JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) public class PermissionRequest { private static final ObjectMapper MAPPER = new ObjectMapper(); @@ -119,7 +118,6 @@ public void setManagedApprovalRequired(Boolean managedApprovalRequired) { * * @return the extension data map */ - @JsonAnyGetter public Map getExtensionData() { return extensionData; } @@ -133,20 +131,4 @@ public Map getExtensionData() { public void setExtensionData(Map extensionData) { this.extensionData = extensionData; } - - /** - * Captures variant-specific permission request fields. - * - * @param name - * the JSON property name - * @param value - * the JSON property value - */ - @JsonAnySetter - public void setExtensionData(String name, Object value) { - if (extensionData == null) { - extensionData = new HashMap<>(); - } - extensionData.put(name, value); - } } diff --git a/java/src/main/java/com/github/copilot/rpc/PermissionRequestResultKind.java b/java/src/main/java/com/github/copilot/rpc/PermissionRequestResultKind.java index 14b6413e78..95476c36f6 100644 --- a/java/src/main/java/com/github/copilot/rpc/PermissionRequestResultKind.java +++ b/java/src/main/java/com/github/copilot/rpc/PermissionRequestResultKind.java @@ -51,8 +51,10 @@ public final class PermissionRequestResultKind { * {@code NO_RESULT} to leave the request unanswered, allowing another client to * handle it. *

- * This kind is supported by the broadcast permission flow. Legacy protocol-v2 - * request callbacks require an immediate response and reject this result. + * Warning: This kind is only valid with protocol v3 servers + * (broadcast permission model). When connected to a protocol v2 server, the SDK + * will throw {@link IllegalStateException} because v2 expects exactly one + * response per permission request. */ public static final PermissionRequestResultKind NO_RESULT = new PermissionRequestResultKind("no-result"); diff --git a/java/src/test/java/com/github/copilot/PermissionRequestResultTest.java b/java/src/test/java/com/github/copilot/PermissionRequestResultTest.java index ea80b0bed6..07c8b22d4c 100644 --- a/java/src/test/java/com/github/copilot/PermissionRequestResultTest.java +++ b/java/src/test/java/com/github/copilot/PermissionRequestResultTest.java @@ -86,7 +86,6 @@ void testPermissionRequestExposesManagedApprovalRequired() throws Exception { """, PermissionRequest.class); assertTrue(request.getManagedApprovalRequired()); - assertEquals("/workspace/file.txt", request.getExtensionData().get("path")); } @Test @@ -100,7 +99,6 @@ void testPermissionEventValueConvertsToTypedRequest() { var request = PermissionRequest.fromJsonValue(event.getData().permissionRequest()); assertTrue(request.getManagedApprovalRequired()); - assertEquals("https://example.com", request.getExtensionData().get("url")); } @Test diff --git a/java/src/test/java/com/github/copilot/RpcHandlerDispatcherTest.java b/java/src/test/java/com/github/copilot/RpcHandlerDispatcherTest.java index 9b1d7c6795..76c2d41b29 100644 --- a/java/src/test/java/com/github/copilot/RpcHandlerDispatcherTest.java +++ b/java/src/test/java/com/github/copilot/RpcHandlerDispatcherTest.java @@ -354,6 +354,8 @@ void permissionRequestV2RejectsNoResult() throws Exception { invokeHandler("permission.request", "13", params); + // V2 protocol does not support NO_RESULT — the handler should fall through + // to the exception path and respond with denied. JsonNode response = readResponse(); JsonNode result = response.get("result").get("result"); assertEquals("user-not-available", result.get("kind").asText()); From bf6c00e4d316bd6ac6d4a4aa035062e9d40df5e7 Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Wed, 29 Jul 2026 14:51:34 -0700 Subject: [PATCH 09/41] Clarify Java managed permission deferral Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- java/README.md | 2 +- .../main/java/com/github/copilot/rpc/PermissionHandler.java | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/java/README.md b/java/README.md index 84f5705af9..0496877aa5 100644 --- a/java/README.md +++ b/java/README.md @@ -129,7 +129,7 @@ directly. ## Permission Handling -`PermissionHandler.APPROVE_ALL` approves ordinary requests automatically. When `request.getManagedApprovalRequired()` is `true`, it returns `no-result`; the request remains pending and the host must present a human-facing confirmation flow to resolve it explicitly. +`PermissionHandler.APPROVE_ALL` approves ordinary requests automatically. When `request.getManagedApprovalRequired()` is `true`, it returns `no-result`. On the event-based permission path, this leaves the request unanswered so another client can present a human-facing confirmation flow. The legacy protocol v2 callback cannot defer a response, so the SDK fails closed with `user-not-available`; a custom v2 handler must complete its future with the human's explicit decision. When handling `PermissionRequestedEvent` directly, convert its generated event value with `PermissionRequest.fromJsonValue(event.getData().permissionRequest())` to access the typed metadata. diff --git a/java/src/main/java/com/github/copilot/rpc/PermissionHandler.java b/java/src/main/java/com/github/copilot/rpc/PermissionHandler.java index 49164afc6d..2e135fb71e 100644 --- a/java/src/main/java/com/github/copilot/rpc/PermissionHandler.java +++ b/java/src/main/java/com/github/copilot/rpc/PermissionHandler.java @@ -49,8 +49,10 @@ public interface PermissionHandler { /** * A pre-built handler that approves ordinary permission requests. *

- * Requests that require managed approval return {@code no-result} and remain - * pending for an explicit human decision. + * Requests that require managed approval return {@code no-result}. This leaves + * event-based requests unanswered so another client can handle them. Legacy + * protocol v2 callbacks cannot defer a response and fail closed; a custom v2 + * handler must complete its future with the human's explicit decision. * * @since 1.0.11 */ From 241decc23ecf2b73deee07b5807b85c0e40f202c Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Wed, 29 Jul 2026 15:17:53 -0700 Subject: [PATCH 10/41] Preserve Rust permission event metadata Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- rust/src/session.rs | 41 ++++++++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/rust/src/session.rs b/rust/src/session.rs index 7d168baf44..9465addaf2 100644 --- a/rust/src/session.rs +++ b/rust/src/session.rs @@ -1525,12 +1525,21 @@ fn permission_request_data(event_data: &Value) -> PermissionRequestData { .get("permissionRequest") .cloned() .unwrap_or_else(|| event_data.clone()); - serde_json::from_value(request_data.clone()).unwrap_or(PermissionRequestData { - kind: None, - tool_call_id: None, - managed_approval_required: None, - extra: request_data, - }) + let managed_approval_required = request_data + .get("managedApprovalRequired") + .and_then(Value::as_bool); + match serde_json::from_value::(request_data) { + Ok(mut data) => { + data.extra = event_data.clone(); + data + } + Err(_) => PermissionRequestData { + kind: None, + tool_call_id: None, + managed_approval_required, + extra: event_data.clone(), + }, + } } /// Map a [`PermissionResult`] to the `result` payload sent back to the @@ -2560,6 +2569,24 @@ mod tests { })); assert_eq!(data.managed_approval_required, Some(true)); - assert_eq!(data.extra["path"], "/workspace/file.txt"); + assert_eq!( + data.extra["permissionRequest"]["path"], + "/workspace/file.txt" + ); + } + + #[test] + fn permission_request_data_preserves_managed_flag_when_other_fields_are_malformed() { + let data = permission_request_data(&json!({ + "requestId": "permission-1", + "permissionRequest": { + "kind": "read", + "managedApprovalRequired": true, + "toolCallId": 42 + } + })); + + assert_eq!(data.managed_approval_required, Some(true)); + assert_eq!(data.extra["requestId"], "permission-1"); } } From 9027d19567f533f4f6f21af618b1d86b14cd968b Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Wed, 29 Jul 2026 21:53:44 -0700 Subject: [PATCH 11/41] Fix managed approval C# example Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- dotnet/README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dotnet/README.md b/dotnet/README.md index 083691d84e..bc4488edb0 100644 --- a/dotnet/README.md +++ b/dotnet/README.md @@ -806,7 +806,10 @@ var session = await client.CreateSessionAsync(new SessionConfig Model = "gpt-5", OnPermissionRequest = async (request, invocation) => { - if (request.ManagedApprovalRequired == true) + if (request is PermissionRequestShell { ManagedApprovalRequired: true } + or PermissionRequestWrite { ManagedApprovalRequired: true } + or PermissionRequestRead { ManagedApprovalRequired: true } + or PermissionRequestUrl { ManagedApprovalRequired: true }) { return PermissionDecision.NoResult(); } From 53f44ebf7399b39ad55d6830318c3bb2b17c132f Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Wed, 29 Jul 2026 21:59:26 -0700 Subject: [PATCH 12/41] Fix managed approval documentation guards Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- nodejs/README.md | 2 +- python/README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nodejs/README.md b/nodejs/README.md index ca9ed7db8c..c20615e66b 100644 --- a/nodejs/README.md +++ b/nodejs/README.md @@ -885,7 +885,7 @@ import type { PermissionRequest, PermissionRequestResult } from "@github/copilot const session = await client.createSession({ model: "gpt-5", onPermissionRequest: (request: PermissionRequest, invocation): PermissionRequestResult => { - if (request.managedApprovalRequired === true) { + if ("managedApprovalRequired" in request && request.managedApprovalRequired === true) { // Leave the request pending for the host's human-facing confirmation flow. return { kind: "no-result" }; } diff --git a/python/README.md b/python/README.md index 80a206b7ef..cbcdadde7c 100644 --- a/python/README.md +++ b/python/README.md @@ -810,7 +810,7 @@ from copilot.session_events import PermissionRequestShell def on_permission_request(request: PermissionRequest, invocation: dict) -> PermissionRequestResult: - if request.managed_approval_required is True: + if getattr(request, "managed_approval_required", False) is True: return PermissionNoResult() # ``PermissionRequest`` is a discriminated union — pattern-match on @@ -835,7 +835,7 @@ Async handlers are also supported: async def on_permission_request( request: PermissionRequest, invocation: dict ) -> PermissionRequestResult: - if request.managed_approval_required is True: + if getattr(request, "managed_approval_required", False) is True: return PermissionNoResult() # Simulate an async approval check (e.g., prompting a user over a network) From 3c6d73d0f996608b40c7c632b7f5e488bc9a5b72 Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Wed, 29 Jul 2026 22:18:49 -0700 Subject: [PATCH 13/41] Fix .NET managed permission event test Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- dotnet/test/Unit/PermissionHandlerTests.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dotnet/test/Unit/PermissionHandlerTests.cs b/dotnet/test/Unit/PermissionHandlerTests.cs index e33d4e0afa..339a37f0d3 100644 --- a/dotnet/test/Unit/PermissionHandlerTests.cs +++ b/dotnet/test/Unit/PermissionHandlerTests.cs @@ -36,7 +36,8 @@ public void PermissionEventExposesManagedApprovalRequired() SerializerOptions); Assert.NotNull(data); - Assert.True(data.PermissionRequest.ManagedApprovalRequired); + var request = Assert.IsType(data.PermissionRequest); + Assert.True(request.ManagedApprovalRequired); } [Fact] From 4ac0667d65ad2e9a3edd3577ae33c6bc20ddc5fa Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Thu, 30 Jul 2026 06:19:33 -0700 Subject: [PATCH 14/41] Fail approve-all in managed sessions Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- dotnet/README.md | 4 +- dotnet/src/Client.cs | 4 +- dotnet/src/PermissionHandlers.cs | 11 ++-- dotnet/src/Session.cs | 13 ++++- dotnet/src/Types.cs | 3 + dotnet/test/Unit/PermissionHandlerTests.cs | 10 ++-- go/README.md | 4 +- go/client.go | 2 + go/permissions.go | 11 ++-- go/permissions_test.go | 15 +++-- go/session.go | 4 +- go/types.go | 3 +- java/README.md | 2 +- .../com/github/copilot/CopilotSession.java | 7 +++ .../github/copilot/SessionRequestBuilder.java | 2 + .../github/copilot/rpc/PermissionHandler.java | 16 ++---- .../copilot/rpc/PermissionInvocation.java | 22 +++++++ .../copilot/PermissionRequestResultTest.java | 8 ++- nodejs/README.md | 6 +- nodejs/src/client.ts | 10 +++- nodejs/src/session.ts | 5 +- nodejs/src/types.ts | 12 ++-- nodejs/test/client.test.ts | 13 +++-- python/README.md | 6 +- python/copilot/client.py | 14 ++++- python/copilot/session.py | 36 +++++++++--- python/test_managed_permissions.py | 19 +++++-- rust/README.md | 4 +- rust/src/handler.rs | 17 +++--- rust/src/permission.rs | 16 +++--- rust/src/session.rs | 57 +++++++++++++------ rust/src/types.rs | 3 + 32 files changed, 245 insertions(+), 114 deletions(-) diff --git a/dotnet/README.md b/dotnet/README.md index bc4488edb0..155be690a2 100644 --- a/dotnet/README.md +++ b/dotnet/README.md @@ -37,7 +37,7 @@ using GitHub.Copilot; await using var client = new CopilotClient(); await client.StartAsync(); -// ApproveAll approves ordinary requests; managed requests still require a human decision. +// ApproveAll is only valid when managed settings are disabled. await using var session = await client.CreateSessionAsync(new SessionConfig { Model = "gpt-5", @@ -132,7 +132,7 @@ Create a new conversation session. - `Streaming` - Enable streaming of response chunks (default: false) - `InfiniteSessions` - Configure automatic context compaction (see below) - `EnableSessionStore` - Enables the cross-session store for search and retrieval across sessions. When unset in `CopilotClientMode.CopilotCli`, the runtime default applies (enabled). In `CopilotClientMode.Empty`, defaults to disabled. -- `OnPermissionRequest` - Optional handler called before each tool execution to approve or deny it. When omitted, permission requests are emitted as events and left pending for manual resolution. `PermissionHandler.ApproveAll` approves ordinary requests automatically; requests with `ManagedApprovalRequired == true` remain pending for explicit resolution through a human-facing host flow. See [Permission Handling](#permission-handling) section. +- `OnPermissionRequest` - Optional handler called before each tool execution to approve or deny it. When omitted, permission requests are emitted as events and left pending for manual resolution. `PermissionHandler.ApproveAll` approves requests when managed settings are disabled and throws when `EnableManagedSettings` is true. Custom handlers can inspect `ManagedApprovalRequired` for human-facing confirmation logic. See [Permission Handling](#permission-handling) section. - `OnUserInputRequest` - Handler for user input requests from the agent (enables ask_user tool). See [User Input Requests](#user-input-requests) section. - `Hooks` - Hook handlers for session lifecycle events. See [Session Hooks](#session-hooks) section. diff --git a/dotnet/src/Client.cs b/dotnet/src/Client.cs index c8d83dfee2..b84e01b726 100644 --- a/dotnet/src/Client.cs +++ b/dotnet/src/Client.cs @@ -783,7 +783,9 @@ private CopilotSession InitializeSession( _logger, this); session.RegisterTools(config.Tools ?? []); - session.RegisterPermissionHandler(config.OnPermissionRequest); + session.RegisterPermissionHandler( + config.OnPermissionRequest, + config.EnableManagedSettings is true); session.RegisterMcpAuthHandler(config.OnMcpAuthRequest); session.RegisterCommands(config.Commands); session.RegisterElicitationHandler(config.OnElicitationRequest); diff --git a/dotnet/src/PermissionHandlers.cs b/dotnet/src/PermissionHandlers.cs index e4e286534a..6effeb063b 100644 --- a/dotnet/src/PermissionHandlers.cs +++ b/dotnet/src/PermissionHandlers.cs @@ -10,12 +10,11 @@ namespace GitHub.Copilot; public static class PermissionHandler { ///

- /// A permission handler that approves ordinary requests and leaves managed - /// requests pending for an explicit human decision. + /// A permission handler that approves requests when managed settings are disabled. /// public static Func> ApproveAll { get; } = - (request, _) => Task.FromResult( - request.ManagedApprovalRequired == true - ? PermissionDecision.NoResult() - : PermissionDecision.ApproveOnce()); + (_, invocation) => invocation.ManagedSettingsEnabled + ? Task.FromException( + new InvalidOperationException("ApproveAll cannot be used when managed settings are enabled")) + : Task.FromResult(PermissionDecision.ApproveOnce()); } diff --git a/dotnet/src/Session.cs b/dotnet/src/Session.cs index 6db0744b48..b0c1dc9886 100644 --- a/dotnet/src/Session.cs +++ b/dotnet/src/Session.cs @@ -63,6 +63,7 @@ public sealed partial class CopilotSession : IAsyncDisposable private readonly CopilotClient _parentClient; private volatile Func>? _permissionHandler; + private bool _managedSettingsEnabled; private volatile Func>? _mcpAuthHandler; private volatile Func>? _userInputHandler; private volatile Func>? _elicitationHandler; @@ -557,13 +558,17 @@ internal void RegisterTools(ICollection tools) /// Registers a handler for permission requests. /// /// The permission handler function. + /// Whether managed settings are enabled for the session. /// /// When the assistant needs permission to perform certain actions (e.g., file operations), /// this handler is called to approve or deny the request. /// - internal void RegisterPermissionHandler(Func>? handler) + internal void RegisterPermissionHandler( + Func>? handler, + bool managedSettingsEnabled) { _permissionHandler = handler; + _managedSettingsEnabled = managedSettingsEnabled; } internal void RegisterMcpAuthHandler(Func>? handler) @@ -590,7 +595,8 @@ internal async Task HandlePermissionRequestAsync(JsonElement var invocation = new PermissionInvocation { - SessionId = SessionId + SessionId = SessionId, + ManagedSettingsEnabled = _managedSettingsEnabled }; var permissionTimestamp = Stopwatch.GetTimestamp(); @@ -932,7 +938,8 @@ private async Task ExecutePermissionAndRespondAsync(string requestId, Permission { var invocation = new PermissionInvocation { - SessionId = SessionId + SessionId = SessionId, + ManagedSettingsEnabled = _managedSettingsEnabled }; var permissionTimestamp = Stopwatch.GetTimestamp(); diff --git a/dotnet/src/Types.cs b/dotnet/src/Types.cs index 565204d39d..a5b620702b 100644 --- a/dotnet/src/Types.cs +++ b/dotnet/src/Types.cs @@ -833,6 +833,9 @@ public sealed class PermissionInvocation /// Identifier of the session that triggered the permission request. /// public string SessionId { get; set; } = string.Empty; + + /// Whether managed settings are enabled for this session. + public bool ManagedSettingsEnabled { get; set; } } // ============================================================================ diff --git a/dotnet/test/Unit/PermissionHandlerTests.cs b/dotnet/test/Unit/PermissionHandlerTests.cs index 339a37f0d3..149f89ba0d 100644 --- a/dotnet/test/Unit/PermissionHandlerTests.cs +++ b/dotnet/test/Unit/PermissionHandlerTests.cs @@ -41,7 +41,7 @@ public void PermissionEventExposesManagedApprovalRequired() } [Fact] - public async Task ApproveAllLeavesManagedRequestPending() + public async Task ApproveAllThrowsWhenManagedSettingsEnabled() { var request = new PermissionRequest { @@ -49,9 +49,11 @@ public async Task ApproveAllLeavesManagedRequestPending() ManagedApprovalRequired = true, }; - var decision = await PermissionHandler.ApproveAll(request, new PermissionInvocation()); - - Assert.IsType(decision); + await Assert.ThrowsAsync(() => + PermissionHandler.ApproveAll(request, new PermissionInvocation + { + ManagedSettingsEnabled = true, + })); } [Fact] diff --git a/go/README.md b/go/README.md index 14d144d4b4..5e0d36dba6 100644 --- a/go/README.md +++ b/go/README.md @@ -55,7 +55,7 @@ func main() { } defer client.Stop() - // ApproveAll approves ordinary requests; managed requests still require a human decision. + // ApproveAll is only valid when managed settings are disabled. session, err := client.CreateSession(context.Background(), &copilot.SessionConfig{ Model: "gpt-5", OnPermissionRequest: copilot.PermissionHandler.ApproveAll, @@ -222,7 +222,7 @@ Event types: `SessionLifecycleCreated`, `SessionLifecycleDeleted`, `SessionLifec - `Streaming` (*bool): Enable streaming delta events (nil = runtime default) - `InfiniteSessions` (\*InfiniteSessionConfig): Automatic context compaction configuration - `EnableSessionStore` (\*bool): Enables the cross-session store for search and retrieval across sessions. When unset in `ModeCopilotCli`, the runtime default applies (enabled). In `ModeEmpty`, defaults to disabled. -- `OnPermissionRequest` (PermissionHandlerFunc): Optional handler called before each tool execution to approve or deny it. When nil, permission requests are emitted as events and left pending for manual resolution. `copilot.PermissionHandler.ApproveAll` approves ordinary requests automatically; requests where `RequiresManagedApproval()` is `true` remain pending for explicit resolution through a human-facing host flow. See [Permission Handling](#permission-handling) section. +- `OnPermissionRequest` (PermissionHandlerFunc): Optional handler called before each tool execution to approve or deny it. When nil, permission requests are emitted as events and left pending for manual resolution. `copilot.PermissionHandler.ApproveAll` approves requests when managed settings are disabled and returns an error when `EnableManagedSettings` is true. Custom handlers can inspect `RequiresManagedApproval()` for human-facing confirmation logic. See [Permission Handling](#permission-handling) section. - `OnUserInputRequest` (UserInputHandler): Handler for user input requests from the agent (enables ask_user tool). See [User Input Requests](#user-input-requests) section. - `Hooks` (\*SessionHooks): Hook handlers for session lifecycle events. See [Session Hooks](#session-hooks) section. - `Commands` ([]CommandDefinition): Slash-commands registered for this session. See [Commands](#commands) section. diff --git a/go/client.go b/go/client.go index 0d07e21f54..bb87641460 100644 --- a/go/client.go +++ b/go/client.go @@ -907,6 +907,7 @@ func (c *Client) CreateSession(ctx context.Context, config *SessionConfig) (*Ses // routed to a registered session. initializeSession := func(sessionID string) (*Session, error) { s := newSession(sessionID, c.client, "") + s.managedSettings = config.EnableManagedSettings != nil && *config.EnableManagedSettings s.registerTools(config.Tools) s.registerPermissionHandler(config.OnPermissionRequest) @@ -1228,6 +1229,7 @@ func (c *Client) ResumeSessionWithOptions(ctx context.Context, sessionID string, // Create and register the session before issuing the RPC so that // events emitted by the CLI (e.g. session.start) are not dropped. session := newSession(sessionID, c.client, "") + session.managedSettings = config.EnableManagedSettings != nil && *config.EnableManagedSettings session.registerTools(config.Tools) session.registerPermissionHandler(config.OnPermissionRequest) diff --git a/go/permissions.go b/go/permissions.go index dcbd5fb111..b21745bd3e 100644 --- a/go/permissions.go +++ b/go/permissions.go @@ -1,18 +1,19 @@ package copilot import ( + "errors" + "github.com/github/copilot-sdk/go/rpc" ) // PermissionHandler provides pre-built OnPermissionRequest implementations. var PermissionHandler = struct { - // ApproveAll approves ordinary permission requests. Requests that require - // managed approval remain pending for an explicit human decision. + // ApproveAll approves permission requests when managed settings are disabled. ApproveAll PermissionHandlerFunc }{ - ApproveAll: func(request PermissionRequest, _ PermissionInvocation) (rpc.PermissionDecision, error) { - if request.RequiresManagedApproval() { - return &rpc.PermissionDecisionNoResult{}, nil + ApproveAll: func(_ PermissionRequest, invocation PermissionInvocation) (rpc.PermissionDecision, error) { + if invocation.ManagedSettingsEnabled { + return nil, errors.New("ApproveAll cannot be used when managed settings are enabled") } return &rpc.PermissionDecisionApproveOnce{}, nil }, diff --git a/go/permissions_test.go b/go/permissions_test.go index 086060542c..7893faaa24 100644 --- a/go/permissions_test.go +++ b/go/permissions_test.go @@ -28,17 +28,16 @@ func TestPermissionEventExposesManagedApprovalRequired(t *testing.T) { } } -func TestApproveAllLeavesManagedRequestPending(t *testing.T) { - required := true +func TestApproveAllReturnsErrorWhenManagedSettingsEnabled(t *testing.T) { decision, err := copilot.PermissionHandler.ApproveAll( - &copilot.PermissionRequestRead{ManagedApprovalRequired: &required}, - copilot.PermissionInvocation{SessionID: "session-1"}, + &copilot.PermissionRequestRead{}, + copilot.PermissionInvocation{SessionID: "session-1", ManagedSettingsEnabled: true}, ) - if err != nil { - t.Fatal(err) + if err == nil { + t.Fatal("expected an error") } - if _, ok := decision.(*rpc.PermissionDecisionNoResult); !ok { - t.Fatalf("expected PermissionDecisionNoResult, got %T", decision) + if decision != nil { + t.Fatalf("expected no decision, got %T", decision) } } diff --git a/go/session.go b/go/session.go index 3059e3b3ae..9b37d42a4e 100644 --- a/go/session.go +++ b/go/session.go @@ -67,6 +67,7 @@ type Session struct { toolHandlersM sync.RWMutex permissionHandler PermissionHandlerFunc permissionMux sync.RWMutex + managedSettings bool mcpAuthHandler MCPAuthHandler mcpAuthMu sync.RWMutex userInputHandler UserInputHandler @@ -1593,7 +1594,8 @@ func (s *Session) executePermissionAndRespond(requestID string, permissionReques }() invocation := PermissionInvocation{ - SessionID: s.SessionID, + SessionID: s.SessionID, + ManagedSettingsEnabled: s.managedSettings, } decision, err := handler(permissionRequest, invocation) diff --git a/go/types.go b/go/types.go index d1fc34ecd2..d64aa77860 100644 --- a/go/types.go +++ b/go/types.go @@ -375,7 +375,8 @@ type PermissionHandlerFunc func(request PermissionRequest, invocation Permission // PermissionInvocation provides context about a permission request type PermissionInvocation struct { - SessionID string + SessionID string + ManagedSettingsEnabled bool } // MCPAuthWwwAuthenticateParams contains parsed parameters from an MCP server's WWW-Authenticate response. diff --git a/java/README.md b/java/README.md index 0496877aa5..2bbb2df31e 100644 --- a/java/README.md +++ b/java/README.md @@ -129,7 +129,7 @@ directly. ## Permission Handling -`PermissionHandler.APPROVE_ALL` approves ordinary requests automatically. When `request.getManagedApprovalRequired()` is `true`, it returns `no-result`. On the event-based permission path, this leaves the request unanswered so another client can present a human-facing confirmation flow. The legacy protocol v2 callback cannot defer a response, so the SDK fails closed with `user-not-available`; a custom v2 handler must complete its future with the human's explicit decision. +`PermissionHandler.APPROVE_ALL` approves requests when managed settings are disabled. When `enableManagedSettings` is true, it completes exceptionally. Custom handlers can inspect `request.getManagedApprovalRequired()` for human-facing confirmation logic. When handling `PermissionRequestedEvent` directly, convert its generated event value with `PermissionRequest.fromJsonValue(event.getData().permissionRequest())` to access the typed metadata. diff --git a/java/src/main/java/com/github/copilot/CopilotSession.java b/java/src/main/java/com/github/copilot/CopilotSession.java index c484fb1b16..721b021181 100644 --- a/java/src/main/java/com/github/copilot/CopilotSession.java +++ b/java/src/main/java/com/github/copilot/CopilotSession.java @@ -185,6 +185,7 @@ public final class CopilotSession implements AutoCloseable { private final Map commandHandlers = new ConcurrentHashMap<>(); private final Map bearerTokenProviders = new ConcurrentHashMap<>(); private final AtomicReference permissionHandler = new AtomicReference<>(); + private volatile boolean managedSettingsEnabled; private final AtomicReference mcpAuthHandler = new AtomicReference<>(); private final AtomicReference userInputHandler = new AtomicReference<>(); private final AtomicReference elicitationHandler = new AtomicReference<>(); @@ -1013,6 +1014,7 @@ private void executePermissionAndRespondAsync(String requestId, PermissionReques try { var invocation = new PermissionInvocation(); invocation.setSessionId(sessionId); + invocation.setManagedSettingsEnabled(managedSettingsEnabled); handler.handle(permissionRequest, invocation).thenAccept(result -> { try { PermissionRequestResultKind kind = new PermissionRequestResultKind(result.getKind()); @@ -1378,6 +1380,10 @@ void registerPermissionHandler(PermissionHandler handler) { permissionHandler.set(handler); } + void setManagedSettingsEnabled(boolean managedSettingsEnabled) { + this.managedSettingsEnabled = managedSettingsEnabled; + } + void registerMcpAuthHandler(McpAuthHandler handler) { mcpAuthHandler.set(handler); } @@ -1403,6 +1409,7 @@ CompletableFuture handlePermissionRequest(JsonNode perm PermissionRequest request = MAPPER.treeToValue(permissionRequestData, PermissionRequest.class); var invocation = new PermissionInvocation(); invocation.setSessionId(sessionId); + invocation.setManagedSettingsEnabled(managedSettingsEnabled); return handler.handle(request, invocation).exceptionally(ex -> { LOG.log(Level.SEVERE, "Permission handler threw an exception", ex); PermissionRequestResult result = new PermissionRequestResult(); diff --git a/java/src/main/java/com/github/copilot/SessionRequestBuilder.java b/java/src/main/java/com/github/copilot/SessionRequestBuilder.java index 57d9a46a21..68fcaa9899 100644 --- a/java/src/main/java/com/github/copilot/SessionRequestBuilder.java +++ b/java/src/main/java/com/github/copilot/SessionRequestBuilder.java @@ -333,6 +333,7 @@ static void configureSession(CopilotSession session, SessionConfig config) { if (config.getOnPermissionRequest() != null) { session.registerPermissionHandler(config.getOnPermissionRequest()); } + session.setManagedSettingsEnabled(config.getEnableManagedSettings().orElse(false)); if (config.getOnMcpAuthRequest() != null) { session.registerMcpAuthHandler(config.getOnMcpAuthRequest()); } @@ -383,6 +384,7 @@ static void configureSession(CopilotSession session, ResumeSessionConfig config) if (config.getOnPermissionRequest() != null) { session.registerPermissionHandler(config.getOnPermissionRequest()); } + session.setManagedSettingsEnabled(config.getEnableManagedSettings().orElse(false)); if (config.getOnMcpAuthRequest() != null) { session.registerMcpAuthHandler(config.getOnMcpAuthRequest()); } diff --git a/java/src/main/java/com/github/copilot/rpc/PermissionHandler.java b/java/src/main/java/com/github/copilot/rpc/PermissionHandler.java index 2e135fb71e..f7985b7d30 100644 --- a/java/src/main/java/com/github/copilot/rpc/PermissionHandler.java +++ b/java/src/main/java/com/github/copilot/rpc/PermissionHandler.java @@ -47,19 +47,15 @@ public interface PermissionHandler { /** - * A pre-built handler that approves ordinary permission requests. - *

- * Requests that require managed approval return {@code no-result}. This leaves - * event-based requests unanswered so another client can handle them. Legacy - * protocol v2 callbacks cannot defer a response and fail closed; a custom v2 - * handler must complete its future with the human's explicit decision. + * A pre-built handler that approves permission requests when managed settings + * are disabled. * * @since 1.0.11 */ - PermissionHandler APPROVE_ALL = (request, - invocation) -> CompletableFuture.completedFuture(Boolean.TRUE.equals(request.getManagedApprovalRequired()) - ? PermissionRequestResult.noResult() - : PermissionRequestResult.approveOnce()); + PermissionHandler APPROVE_ALL = (request, invocation) -> invocation.isManagedSettingsEnabled() + ? CompletableFuture.failedFuture( + new IllegalStateException("APPROVE_ALL cannot be used when managed settings are enabled")) + : CompletableFuture.completedFuture(PermissionRequestResult.approveOnce()); /** * Handles a permission request from the assistant. diff --git a/java/src/main/java/com/github/copilot/rpc/PermissionInvocation.java b/java/src/main/java/com/github/copilot/rpc/PermissionInvocation.java index bda5bdde0a..10988cc1b7 100644 --- a/java/src/main/java/com/github/copilot/rpc/PermissionInvocation.java +++ b/java/src/main/java/com/github/copilot/rpc/PermissionInvocation.java @@ -16,6 +16,7 @@ public final class PermissionInvocation { private String sessionId; + private boolean managedSettingsEnabled; /** * Gets the session ID where the permission was requested. @@ -37,4 +38,25 @@ public PermissionInvocation setSessionId(String sessionId) { this.sessionId = sessionId; return this; } + + /** + * Gets whether managed settings are enabled for this session. + * + * @return whether managed settings are enabled + */ + public boolean isManagedSettingsEnabled() { + return managedSettingsEnabled; + } + + /** + * Sets whether managed settings are enabled for this session. + * + * @param managedSettingsEnabled + * whether managed settings are enabled + * @return this invocation for method chaining + */ + public PermissionInvocation setManagedSettingsEnabled(boolean managedSettingsEnabled) { + this.managedSettingsEnabled = managedSettingsEnabled; + return this; + } } diff --git a/java/src/test/java/com/github/copilot/PermissionRequestResultTest.java b/java/src/test/java/com/github/copilot/PermissionRequestResultTest.java index 07c8b22d4c..deca0f4d23 100644 --- a/java/src/test/java/com/github/copilot/PermissionRequestResultTest.java +++ b/java/src/test/java/com/github/copilot/PermissionRequestResultTest.java @@ -102,14 +102,16 @@ void testPermissionEventValueConvertsToTypedRequest() { } @Test - void testApproveAllLeavesManagedRequestPending() { + void testApproveAllFailsWhenManagedSettingsEnabled() { var request = new PermissionRequest(); request.setKind("read"); request.setManagedApprovalRequired(true); - var result = PermissionHandler.APPROVE_ALL.handle(request, new PermissionInvocation()).join(); + var invocation = new PermissionInvocation().setManagedSettingsEnabled(true); + var error = assertThrows(java.util.concurrent.CompletionException.class, + () -> PermissionHandler.APPROVE_ALL.handle(request, invocation).join()); - assertEquals("no-result", result.getKind()); + assertTrue(error.getCause() instanceof IllegalStateException); } @Test diff --git a/nodejs/README.md b/nodejs/README.md index c20615e66b..a67be61457 100644 --- a/nodejs/README.md +++ b/nodejs/README.md @@ -36,7 +36,7 @@ import { CopilotClient, approveAll } from "@github/copilot-sdk"; const client = new CopilotClient(); await client.start(); -// approveAll approves ordinary requests; managed requests still require a human decision. +// approveAll is only valid when managed settings are disabled. const session = await client.createSession({ model: "gpt-5", onPermissionRequest: approveAll, @@ -862,7 +862,7 @@ An `onPermissionRequest` handler is optional when you create or resume a session ### Approve All (simplest) -Use the built-in `approveAll` helper to approve ordinary permission requests automatically: +Use the built-in `approveAll` helper when managed settings are disabled: ```typescript import { CopilotClient, approveAll } from "@github/copilot-sdk"; @@ -873,7 +873,7 @@ const session = await client.createSession({ }); ``` -For requests with `managedApprovalRequired: true`, `approveAll` returns `{ kind: "no-result" }`. The request remains pending and the host must present a human-facing confirmation flow to resolve it explicitly. +When `enableManagedSettings` is true for the session, `approveAll` throws. Use a custom handler for managed sessions; request-level `managedApprovalRequired` remains available for human-facing confirmation logic. ### Custom Permission Handler diff --git a/nodejs/src/client.ts b/nodejs/src/client.ts index 6d99ce49e3..fd3b06f871 100644 --- a/nodejs/src/client.ts +++ b/nodejs/src/client.ts @@ -1462,7 +1462,10 @@ export class CopilotClient { this.connection!, undefined, this.onGetTraceContext, - { mcpAuthHandler: config.onMcpAuthRequest } + { + mcpAuthHandler: config.onMcpAuthRequest, + managedSettingsEnabled: config.enableManagedSettings, + } ); s.registerTools(config.tools); s.registerCanvases(config.canvases); @@ -1692,7 +1695,10 @@ export class CopilotClient { this.connection!, undefined, this.onGetTraceContext, - { mcpAuthHandler: config.onMcpAuthRequest } + { + mcpAuthHandler: config.onMcpAuthRequest, + managedSettingsEnabled: config.enableManagedSettings, + } ); session.registerTools(config.tools); session.registerCanvases(config.canvases); diff --git a/nodejs/src/session.ts b/nodejs/src/session.ts index 8b946c7860..61729cdd12 100644 --- a/nodejs/src/session.ts +++ b/nodejs/src/session.ts @@ -423,6 +423,7 @@ export class CopilotSession { private transformCallbacks?: Map; private _rpc: ReturnType | null = null; private traceContextProvider?: TraceContextProvider; + private readonly managedSettingsEnabled: boolean; private _capabilities: SessionCapabilities = {}; private openCanvasInstances: OpenCanvasInstance[] = []; private disconnected = false; @@ -591,10 +592,11 @@ export class CopilotSession { private connection: MessageConnection, private _workspacePath?: string, traceContextProvider?: TraceContextProvider, - options?: { mcpAuthHandler?: McpAuthHandler } + options?: { mcpAuthHandler?: McpAuthHandler; managedSettingsEnabled?: boolean } ) { this.traceContextProvider = traceContextProvider; this.mcpAuthHandler = options?.mcpAuthHandler; + this.managedSettingsEnabled = options?.managedSettingsEnabled === true; } /** @@ -1108,6 +1110,7 @@ export class CopilotSession { try { const result = await this.permissionHandler!(permissionRequest, { sessionId: this.sessionId, + managedSettingsEnabled: this.managedSettingsEnabled, }); if (result.kind === "no-result") { return; diff --git a/nodejs/src/types.ts b/nodejs/src/types.ts index 5f7052c708..d5d3f6468d 100644 --- a/nodejs/src/types.ts +++ b/nodejs/src/types.ts @@ -1138,14 +1138,18 @@ export type PermissionRequestResult = PermissionDecisionRequest["result"] | { ki export type PermissionHandler = ( request: PermissionRequest, - invocation: { sessionId: string } + invocation: { sessionId: string; managedSettingsEnabled: boolean } ) => Promise | PermissionRequestResult; /** - * Approves permission requests unless managed policy requires an explicit human decision. + * Approves permission requests for sessions without managed settings. */ -export const approveAll: PermissionHandler = (request) => - request.managedApprovalRequired ? { kind: "no-result" } : { kind: "approve-once" }; +export const approveAll: PermissionHandler = (_request, invocation) => { + if (invocation.managedSettingsEnabled) { + throw new Error("approveAll cannot be used when managed settings are enabled"); + } + return { kind: "approve-once" }; +}; export const defaultJoinSessionPermissionHandler: PermissionHandler = (): PermissionRequestResult => ({ diff --git a/nodejs/test/client.test.ts b/nodejs/test/client.test.ts index 4805b1148a..85061d2d70 100644 --- a/nodejs/test/client.test.ts +++ b/nodejs/test/client.test.ts @@ -25,16 +25,19 @@ describe("approveAll", () => { url: "https://api.example.com/data", intention: "Fetch domain data", }; - const invocation = { sessionId: "session-1" }; + const invocation = { sessionId: "session-1", managedSettingsEnabled: false }; it("approves ordinary permission requests", () => { expect(approveAll(request, invocation)).toEqual({ kind: "approve-once" }); }); - it("leaves managed permission requests pending for human approval", () => { - expect(approveAll({ ...request, managedApprovalRequired: true }, invocation)).toEqual({ - kind: "no-result", - }); + it("rejects use when managed settings are enabled", () => { + expect(() => + approveAll( + { ...request, managedApprovalRequired: false }, + { ...invocation, managedSettingsEnabled: true } + ) + ).toThrow("approveAll cannot be used when managed settings are enabled"); }); }); diff --git a/python/README.md b/python/README.md index cbcdadde7c..c842886c9c 100644 --- a/python/README.md +++ b/python/README.md @@ -121,7 +121,7 @@ async def main(): client = CopilotClient() await client.start() - # approve_all approves ordinary requests; managed requests still require a human decision. + # approve_all is only valid when managed settings are disabled. session = await client.create_session( on_permission_request=PermissionHandler.approve_all, model="gpt-5", @@ -280,7 +280,7 @@ These are passed as keyword arguments to `create_session()`: - `provider` (ProviderConfig): Custom API provider configuration (BYOK). See [Custom Providers](#custom-providers) section. - `infinite_sessions` (InfiniteSessionConfig): Automatic context compaction configuration - `enable_session_store` (bool): Enables the cross-session store for search and retrieval across sessions. When unset in `"copilot-cli"` mode, the runtime default applies (enabled). In `"empty"` mode, defaults to disabled. -- `on_permission_request` (callable): Optional handler called before each tool execution to approve or deny it. When omitted, permission requests are emitted as events and left pending for manual resolution. `PermissionHandler.approve_all` approves ordinary requests automatically; requests with `managed_approval_required is True` remain pending for explicit resolution through a human-facing host flow. See [Permission Handling](#permission-handling) section. +- `on_permission_request` (callable): Optional handler called before each tool execution to approve or deny it. When omitted, permission requests are emitted as events and left pending for manual resolution. `PermissionHandler.approve_all` approves requests when managed settings are disabled and raises an error when `enable_managed_settings` is true. Custom handlers can inspect `managed_approval_required` for human-facing confirmation logic. See [Permission Handling](#permission-handling) section. - `on_user_input_request` (callable): Handler for user input requests from the agent (enables ask_user tool). See [User Input Requests](#user-input-requests) section. - `hooks` (SessionHooks): Hook handlers for session lifecycle events. See [Session Hooks](#session-hooks) section. - `available_tools` / `excluded_tools` / `default_agent.excluded_tools` / custom-agent `tools`: MCP tools registered from `mcp_servers` are exposed to the runtime as `-`. For `available_tools` and `excluded_tools`, prefer `ToolSet().add_mcp("-")` or the raw `mcp:-` form. For custom-agent `tools` and `default_agent.excluded_tools`, use `-` directly. @@ -794,7 +794,7 @@ session = await client.create_session( ) ``` -For requests with `managed_approval_required is True`, `approve_all` returns `PermissionNoResult`. The request remains pending and the host must present a human-facing confirmation flow to resolve it explicitly. +When `enable_managed_settings` is true for the session, `approve_all` raises an error. Use a custom handler for managed sessions; request-level `managed_approval_required` remains available for human-facing confirmation logic. ### Custom Permission Handler diff --git a/python/copilot/client.py b/python/copilot/client.py index 6f29e96596..62732f607c 100644 --- a/python/copilot/client.py +++ b/python/copilot/client.py @@ -2517,7 +2517,12 @@ def _initialize_session(sid: str) -> CopilotSession: to a registered session. """ setup_start = time.perf_counter() - s = CopilotSession(sid, self._client, workspace_path=None) + s = CopilotSession( + sid, + self._client, + workspace_path=None, + managed_settings_enabled=enable_managed_settings is True, + ) if self._session_fs_config: if create_session_fs_handler is None: raise ValueError( @@ -3136,7 +3141,12 @@ async def resume_session( # Create and register the session before issuing the RPC so that # events emitted by the CLI (e.g. session.start) are not dropped. setup_start = time.perf_counter() - session = CopilotSession(session_id, self._client, workspace_path=None) + session = CopilotSession( + session_id, + self._client, + workspace_path=None, + managed_settings_enabled=enable_managed_settings is True, + ) if self._session_fs_config: if create_session_fs_handler is None: raise ValueError( diff --git a/python/copilot/session.py b/python/copilot/session.py index 4c80874ad1..22d825bbd2 100644 --- a/python/copilot/session.py +++ b/python/copilot/session.py @@ -360,8 +360,13 @@ class PermissionNoResult: PermissionRequestResult = PermissionDecision | PermissionNoResult +class PermissionInvocation(TypedDict): + session_id: str + managed_settings_enabled: bool + + _PermissionHandlerFn = Callable[ - [PermissionRequest, dict[str, str]], + [PermissionRequest, PermissionInvocation], PermissionRequestResult | Awaitable[PermissionRequestResult], ] @@ -369,10 +374,10 @@ class PermissionNoResult: class PermissionHandler: @staticmethod def approve_all( - request: PermissionRequest, invocation: dict[str, str] + request: PermissionRequest, invocation: PermissionInvocation ) -> PermissionRequestResult: - if request.managed_approval_required is True: - return PermissionNoResult() + if invocation["managed_settings_enabled"]: + raise RuntimeError("approve_all cannot be used when managed settings are enabled") return PermissionDecisionApproveOnce() @@ -1449,7 +1454,11 @@ class CopilotSession: """ def __init__( - self, session_id: str, client: Any, workspace_path: os.PathLike[str] | str | None = None + self, + session_id: str, + client: Any, + workspace_path: os.PathLike[str] | str | None = None, + managed_settings_enabled: bool = False, ): """ Initialize a new CopilotSession. @@ -1465,6 +1474,7 @@ def __init__( (when infinite sessions enabled). """ self.session_id = session_id + self._managed_settings_enabled = managed_settings_enabled self._client = client self._workspace_path = os.fsdecode(workspace_path) if workspace_path is not None else None self._event_handlers: set[Callable[[SessionEvent], None]] = set() @@ -2102,7 +2112,13 @@ async def _execute_permission_and_respond( """Execute a permission handler and respond via RPC.""" try: handler_start = time.perf_counter() - result = handler(permission_request, {"session_id": self.session_id}) + result = handler( + permission_request, + { + "session_id": self.session_id, + "managed_settings_enabled": self._managed_settings_enabled, + }, + ) if inspect.isawaitable(result): result = await result log_timing( @@ -2528,7 +2544,13 @@ async def _handle_permission_request( try: handler_start = time.perf_counter() - result = handler(request, {"session_id": self.session_id}) + result = handler( + request, + { + "session_id": self.session_id, + "managed_settings_enabled": self._managed_settings_enabled, + }, + ) if inspect.isawaitable(result): result = await result log_timing( diff --git a/python/test_managed_permissions.py b/python/test_managed_permissions.py index 26575af0d3..4e23256c54 100644 --- a/python/test_managed_permissions.py +++ b/python/test_managed_permissions.py @@ -1,5 +1,7 @@ +import pytest + from copilot.rpc import PermissionDecisionApproveOnce -from copilot.session import PermissionHandler, PermissionNoResult +from copilot.session import PermissionHandler from copilot.session_events import PermissionRequestedData, PermissionRequestRead @@ -20,16 +22,18 @@ def test_permission_event_exposes_managed_approval_required() -> None: assert data.to_dict()["permissionRequest"]["managedApprovalRequired"] is True -def test_approve_all_leaves_managed_request_pending() -> None: +def test_approve_all_errors_when_managed_settings_enabled() -> None: request = PermissionRequestRead( intention="Read managed content", path="/workspace/file.txt", managed_approval_required=True, ) - assert isinstance( - PermissionHandler.approve_all(request, {"sessionId": "session-1"}), PermissionNoResult - ) + with pytest.raises(RuntimeError, match="managed settings are enabled"): + PermissionHandler.approve_all( + request, + {"session_id": "session-1", "managed_settings_enabled": True}, + ) def test_approve_all_approves_ordinary_request() -> None: @@ -39,6 +43,9 @@ def test_approve_all_approves_ordinary_request() -> None: ) assert isinstance( - PermissionHandler.approve_all(request, {"sessionId": "session-1"}), + PermissionHandler.approve_all( + request, + {"session_id": "session-1", "managed_settings_enabled": False}, + ), PermissionDecisionApproveOnce, ) diff --git a/rust/README.md b/rust/README.md index eae49c8549..e8ebab8ff0 100644 --- a/rust/README.md +++ b/rust/README.md @@ -254,7 +254,7 @@ let config = SessionConfig::default() .with_user_input_handler(h); ``` -The built-in `ApproveAllHandler` and `DenyAllHandler` implement `PermissionHandler` for the common cases. `ApproveAllHandler` leaves requests with `managed_approval_required == Some(true)` pending for an explicit human decision. To observe streamed session events (assistant messages, tool calls, etc.), call `session.subscribe()` — see [Streaming](#streaming) below. +The built-in `ApproveAllHandler` and `DenyAllHandler` implement `PermissionHandler` for the common cases. `ApproveAllHandler` returns an error when `enable_managed_settings` is true; custom handlers can inspect `managed_approval_required` when implementing a human-facing confirmation flow. To observe streamed session events (assistant messages, tool calls, etc.), call `session.subscribe()` — see [Streaming](#streaming) below. ### SessionConfig @@ -434,7 +434,7 @@ Reach for the `ToolHandler` trait directly when you need shared state across mul Set a permission policy directly on `SessionConfig` with the chainable builders. They install a synthesized `PermissionHandler` so only permission requests are intercepted; every other event flows through unchanged. -The approve-all policy leaves managed approval requests pending so a human-facing host flow can resolve them explicitly. +The approve-all policy returns an error when `enable_managed_settings` is true. Custom handlers can inspect `managed_approval_required` for human-facing confirmation logic. ```rust,ignore let session = client diff --git a/rust/src/handler.rs b/rust/src/handler.rs index 6e3bab0485..c0e0ef0901 100644 --- a/rust/src/handler.rs +++ b/rust/src/handler.rs @@ -45,6 +45,8 @@ pub enum PermissionResult { /// Decline to respond to this request, allowing another connected /// client to answer instead. The SDK suppresses the response. NoResult, + /// The handler could not safely decide the request. + Error(String), } impl PermissionResult { @@ -273,8 +275,7 @@ pub trait AutoModeSwitchHandler: Send + Sync + 'static { ) -> AutoModeSwitchResponse; } -/// A [`PermissionHandler`] that approves ordinary requests. Requests that -/// require managed approval remain pending for an explicit human decision. +/// A [`PermissionHandler`] that approves requests when managed settings are disabled. #[derive(Debug, Clone)] pub struct ApproveAllHandler; @@ -286,8 +287,10 @@ impl PermissionHandler for ApproveAllHandler { _request_id: RequestId, data: PermissionRequestData, ) -> PermissionResult { - if data.managed_approval_required == Some(true) { - PermissionResult::no_result() + if data.managed_settings_enabled { + PermissionResult::Error( + "ApproveAllHandler cannot be used when managed settings are enabled".into(), + ) } else { PermissionResult::approve_once() } @@ -330,18 +333,18 @@ mod tests { } #[tokio::test] - async fn approve_all_handler_leaves_managed_request_pending() { + async fn approve_all_handler_errors_when_managed_settings_enabled() { let result = ApproveAllHandler .handle( SessionId::from("s1"), RequestId::new("1"), PermissionRequestData { - managed_approval_required: Some(true), + managed_settings_enabled: true, ..Default::default() }, ) .await; - assert!(matches!(result, PermissionResult::NoResult)); + assert!(matches!(result, PermissionResult::Error(_))); } #[tokio::test] diff --git a/rust/src/permission.rs b/rust/src/permission.rs index 0114842a16..56ea8c4b12 100644 --- a/rust/src/permission.rs +++ b/rust/src/permission.rs @@ -119,8 +119,10 @@ impl PermissionHandler for PolicyHandler { Policy::Predicate(f) => f(&data), }; if approved { - if data.managed_approval_required == Some(true) { - PermissionResult::no_result() + if matches!(self.policy, Policy::ApproveAll) && data.managed_settings_enabled { + PermissionResult::Error( + "approve-all policy cannot be used when managed settings are enabled".into(), + ) } else { PermissionResult::approve_once() } @@ -152,14 +154,14 @@ mod tests { } #[tokio::test] - async fn approve_all_leaves_managed_request_pending() { + async fn approve_all_errors_when_managed_settings_enabled() { let h = approve_all(); let mut request = data(); - request.managed_approval_required = Some(true); + request.managed_settings_enabled = true; assert!(matches!( h.handle(SessionId::from("s"), RequestId::new("1"), request) .await, - PermissionResult::NoResult + PermissionResult::Error(_) )); } @@ -184,14 +186,14 @@ mod tests { } #[tokio::test] - async fn approve_if_leaves_managed_approval_pending_when_predicate_approves() { + async fn approve_if_can_approve_managed_request() { let h = approve_if(|_| true); let mut request = data(); request.managed_approval_required = Some(true); assert!(matches!( h.handle(SessionId::from("s"), RequestId::new("1"), request) .await, - PermissionResult::NoResult + PermissionResult::Decision(crate::types::PermissionDecision::ApproveOnce(_)) )); } diff --git a/rust/src/session.rs b/rust/src/session.rs index 9465addaf2..c107a7df33 100644 --- a/rust/src/session.rs +++ b/rust/src/session.rs @@ -57,6 +57,7 @@ const TOOL_SEARCH_TOOL_NAME: &str = "tool_search_tool"; #[derive(Clone)] pub(crate) struct SessionHandlers { pub permission: Option>, + pub managed_settings_enabled: bool, pub elicitation: Option>, pub mcp_auth: Option>, pub user_input: Option>, @@ -894,6 +895,7 @@ impl Client { ); let handlers = SessionHandlers { permission: permission_handler, + managed_settings_enabled: wire.enable_managed_settings == Some(true), elicitation: runtime.elicitation_handler.take(), mcp_auth: runtime.mcp_auth_handler.take(), user_input: runtime.user_input_handler.take(), @@ -1159,6 +1161,7 @@ impl Client { ); let handlers = SessionHandlers { permission: permission_handler, + managed_settings_enabled: wire.enable_managed_settings == Some(true), elicitation: runtime.elicitation_handler.take(), mcp_auth: runtime.mcp_auth_handler.take(), user_input: runtime.user_input_handler.take(), @@ -1520,7 +1523,10 @@ fn extract_request_id(data: &Value) -> Option { .map(RequestId::new) } -fn permission_request_data(event_data: &Value) -> PermissionRequestData { +fn permission_request_data( + event_data: &Value, + managed_settings_enabled: bool, +) -> PermissionRequestData { let request_data = event_data .get("permissionRequest") .cloned() @@ -1531,12 +1537,14 @@ fn permission_request_data(event_data: &Value) -> PermissionRequestData { match serde_json::from_value::(request_data) { Ok(mut data) => { data.extra = event_data.clone(); + data.managed_settings_enabled = managed_settings_enabled; data } Err(_) => PermissionRequestData { kind: None, tool_call_id: None, managed_approval_required, + managed_settings_enabled, extra: event_data.clone(), }, } @@ -1549,6 +1557,10 @@ fn permission_request_data(event_data: &Value) -> PermissionRequestData { fn notification_permission_payload(result: &PermissionResult) -> Option { match result { PermissionResult::NoResult => None, + PermissionResult::Error(message) => { + tracing::error!(error = %message, "permission handler failed"); + Some(serde_json::json!({ "kind": "user-not-available" })) + } PermissionResult::Decision(decision) => Some( serde_json::to_value(decision).expect("serializing permission decision should succeed"), ), @@ -1727,7 +1739,10 @@ async fn handle_notification( }; let client = client.clone(); let sid = session_id.clone(); - let data = permission_request_data(¬ification.event.data); + let data = permission_request_data( + ¬ification.event.data, + handlers.managed_settings_enabled, + ); let span = tracing::error_span!( "permission_request_handler", session_id = %sid, @@ -2559,14 +2574,17 @@ mod tests { #[test] fn permission_request_data_reads_nested_managed_approval_metadata() { - let data = permission_request_data(&json!({ - "requestId": "permission-1", - "permissionRequest": { - "kind": "read", - "managedApprovalRequired": true, - "path": "/workspace/file.txt" - } - })); + let data = permission_request_data( + &json!({ + "requestId": "permission-1", + "permissionRequest": { + "kind": "read", + "managedApprovalRequired": true, + "path": "/workspace/file.txt" + } + }), + false, + ); assert_eq!(data.managed_approval_required, Some(true)); assert_eq!( @@ -2577,14 +2595,17 @@ mod tests { #[test] fn permission_request_data_preserves_managed_flag_when_other_fields_are_malformed() { - let data = permission_request_data(&json!({ - "requestId": "permission-1", - "permissionRequest": { - "kind": "read", - "managedApprovalRequired": true, - "toolCallId": 42 - } - })); + let data = permission_request_data( + &json!({ + "requestId": "permission-1", + "permissionRequest": { + "kind": "read", + "managedApprovalRequired": true, + "toolCallId": 42 + } + }), + false, + ); assert_eq!(data.managed_approval_required, Some(true)); assert_eq!(data.extra["requestId"], "permission-1"); diff --git a/rust/src/types.rs b/rust/src/types.rs index 165f08eb24..7e1414d966 100644 --- a/rust/src/types.rs +++ b/rust/src/types.rs @@ -5448,6 +5448,9 @@ pub struct PermissionRequestData { /// Whether managed policy requires an explicit human decision. #[serde(default, skip_serializing_if = "Option::is_none")] pub managed_approval_required: Option, + /// Whether managed settings are enabled for this session. + #[serde(default)] + pub managed_settings_enabled: bool, /// The full permission request params from the CLI. The shape varies by /// permission type and CLI version, so we preserve it as `Value`. #[serde(flatten)] From c1ae85f236bf95084e73bb6a1c274fa5122f7e8e Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Thu, 30 Jul 2026 07:14:45 -0700 Subject: [PATCH 15/41] Avoid expanding Rust permission result API Preserve approve-all fail-closed behavior by logging and returning the existing user-not-available decision instead of adding a public enum variant. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- rust/src/handler.rs | 18 ++++++++++++------ rust/src/permission.rs | 10 +++++----- rust/src/session.rs | 4 ---- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/rust/src/handler.rs b/rust/src/handler.rs index c0e0ef0901..a5cfac3f99 100644 --- a/rust/src/handler.rs +++ b/rust/src/handler.rs @@ -45,8 +45,6 @@ pub enum PermissionResult { /// Decline to respond to this request, allowing another connected /// client to answer instead. The SDK suppresses the response. NoResult, - /// The handler could not safely decide the request. - Error(String), } impl PermissionResult { @@ -85,6 +83,11 @@ impl From for PermissionResult { } } +pub(crate) fn permission_handler_failure(message: &str) -> PermissionResult { + tracing::error!(error = message, "permission handler failed"); + PermissionResult::user_not_available() +} + /// Response to a user input request. #[derive(Debug, Clone)] pub struct UserInputResponse { @@ -288,8 +291,8 @@ impl PermissionHandler for ApproveAllHandler { data: PermissionRequestData, ) -> PermissionResult { if data.managed_settings_enabled { - PermissionResult::Error( - "ApproveAllHandler cannot be used when managed settings are enabled".into(), + permission_handler_failure( + "ApproveAllHandler cannot be used when managed settings are enabled", ) } else { PermissionResult::approve_once() @@ -333,7 +336,7 @@ mod tests { } #[tokio::test] - async fn approve_all_handler_errors_when_managed_settings_enabled() { + async fn approve_all_handler_fails_when_managed_settings_enabled() { let result = ApproveAllHandler .handle( SessionId::from("s1"), @@ -344,7 +347,10 @@ mod tests { }, ) .await; - assert!(matches!(result, PermissionResult::Error(_))); + assert!(matches!( + result, + PermissionResult::Decision(PermissionDecision::UserNotAvailable(_)) + )); } #[tokio::test] diff --git a/rust/src/permission.rs b/rust/src/permission.rs index 56ea8c4b12..049a51023b 100644 --- a/rust/src/permission.rs +++ b/rust/src/permission.rs @@ -16,7 +16,7 @@ use std::sync::Arc; use async_trait::async_trait; -use crate::handler::{PermissionHandler, PermissionResult}; +use crate::handler::{PermissionHandler, PermissionResult, permission_handler_failure}; use crate::types::{PermissionRequestData, RequestId, SessionId}; /// Return a [`PermissionHandler`] that approves ordinary requests. @@ -120,8 +120,8 @@ impl PermissionHandler for PolicyHandler { }; if approved { if matches!(self.policy, Policy::ApproveAll) && data.managed_settings_enabled { - PermissionResult::Error( - "approve-all policy cannot be used when managed settings are enabled".into(), + permission_handler_failure( + "approve-all policy cannot be used when managed settings are enabled", ) } else { PermissionResult::approve_once() @@ -154,14 +154,14 @@ mod tests { } #[tokio::test] - async fn approve_all_errors_when_managed_settings_enabled() { + async fn approve_all_fails_when_managed_settings_enabled() { let h = approve_all(); let mut request = data(); request.managed_settings_enabled = true; assert!(matches!( h.handle(SessionId::from("s"), RequestId::new("1"), request) .await, - PermissionResult::Error(_) + PermissionResult::Decision(crate::types::PermissionDecision::UserNotAvailable(_)) )); } diff --git a/rust/src/session.rs b/rust/src/session.rs index c107a7df33..d31b4e0550 100644 --- a/rust/src/session.rs +++ b/rust/src/session.rs @@ -1557,10 +1557,6 @@ fn permission_request_data( fn notification_permission_payload(result: &PermissionResult) -> Option { match result { PermissionResult::NoResult => None, - PermissionResult::Error(message) => { - tracing::error!(error = %message, "permission handler failed"); - Some(serde_json::json!({ "kind": "user-not-available" })) - } PermissionResult::Decision(decision) => Some( serde_json::to_value(decision).expect("serializing permission decision should succeed"), ), From f3060712f01463a62252614d1c32f31b88fcef8a Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Thu, 30 Jul 2026 07:48:30 -0700 Subject: [PATCH 16/41] Keep managed permission helpers fail-closed Align Rust approve-all paths for request-level managed approval and correct cross-SDK documentation of session-level fail-fast behavior. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- dotnet/README.md | 2 +- go/README.md | 2 +- nodejs/README.md | 2 +- rust/README.md | 4 ++-- rust/src/handler.rs | 20 ++++++++++++++++++++ rust/src/permission.rs | 14 +++++++++----- 6 files changed, 34 insertions(+), 10 deletions(-) diff --git a/dotnet/README.md b/dotnet/README.md index 155be690a2..6f2de39af0 100644 --- a/dotnet/README.md +++ b/dotnet/README.md @@ -794,7 +794,7 @@ var session = await client.CreateSessionAsync(new SessionConfig }); ``` -When `ManagedApprovalRequired` is `true`, `ApproveAll` returns `PermissionDecision.NoResult()`. The request remains pending and the host must present a human-facing confirmation flow to resolve it explicitly. +When `EnableManagedSettings` is true for the session, `ApproveAll` throws on the first permission request. Use a custom handler for managed sessions; request-level `ManagedApprovalRequired` remains available for human-facing confirmation logic. ### Custom Permission Handler diff --git a/go/README.md b/go/README.md index 5e0d36dba6..bfd1eabe5e 100644 --- a/go/README.md +++ b/go/README.md @@ -690,7 +690,7 @@ session, err := client.CreateSession(context.Background(), &copilot.SessionConfi }) ``` -When `RequiresManagedApproval()` returns `true`, `ApproveAll` returns `PermissionDecisionNoResult`. The request remains pending and the host must present a human-facing confirmation flow to resolve it explicitly. +When `EnableManagedSettings` is true for the session, `ApproveAll` returns an error on the first permission request. Use a custom handler for managed sessions; request-level `RequiresManagedApproval()` remains available for human-facing confirmation logic. ### Custom Permission Handler diff --git a/nodejs/README.md b/nodejs/README.md index a67be61457..d3c22e8b43 100644 --- a/nodejs/README.md +++ b/nodejs/README.md @@ -137,7 +137,7 @@ Create a new conversation session. - `infiniteSessions?: InfiniteSessionConfig` - Configure automatic context compaction (see below) - `enableSessionStore?: boolean` - Enables the cross-session store for search and retrieval across sessions. When unset in `"copilot-cli"` mode, the runtime default applies (enabled). In `"empty"` mode, defaults to disabled. - `provider?: ProviderConfig` - Custom API provider configuration (BYOK - Bring Your Own Key). See [Custom Providers](#custom-providers) section. -- `onPermissionRequest?: PermissionHandler` - Optional handler called before each tool execution to approve or deny it. When omitted, permission requests are emitted as events and left pending for manual resolution. Use `approveAll` to approve ordinary requests automatically; requests with `managedApprovalRequired: true` remain pending for explicit resolution through a human-facing host flow. Provide a custom function for other fine-grained control. See [Permission Handling](#permission-handling) section. +- `onPermissionRequest?: PermissionHandler` - Optional handler called before each tool execution to approve or deny it. When omitted, permission requests are emitted as events and left pending for manual resolution. `approveAll` approves requests when managed settings are disabled and throws when `enableManagedSettings` is true. Custom handlers can inspect `managedApprovalRequired` for human-facing confirmation logic. See [Permission Handling](#permission-handling) section. - `onUserInputRequest?: UserInputHandler` - Handler for user input requests from the agent. Enables the `ask_user` tool. See [User Input Requests](#user-input-requests) section. - `onElicitationRequest?: ElicitationHandler` - Handler for elicitation requests dispatched by the server. Enables this client to present form-based UI dialogs on behalf of the agent or other session participants. See [Elicitation Requests](#elicitation-requests) section. - `hooks?: SessionHooks` - Hook handlers for session lifecycle events. See [Session Hooks](#session-hooks) section. diff --git a/rust/README.md b/rust/README.md index e8ebab8ff0..eccc29aa27 100644 --- a/rust/README.md +++ b/rust/README.md @@ -254,7 +254,7 @@ let config = SessionConfig::default() .with_user_input_handler(h); ``` -The built-in `ApproveAllHandler` and `DenyAllHandler` implement `PermissionHandler` for the common cases. `ApproveAllHandler` returns an error when `enable_managed_settings` is true; custom handlers can inspect `managed_approval_required` when implementing a human-facing confirmation flow. To observe streamed session events (assistant messages, tool calls, etc.), call `session.subscribe()` — see [Streaming](#streaming) below. +The built-in `ApproveAllHandler` and `DenyAllHandler` implement `PermissionHandler` for the common cases. When `enable_managed_settings` is true, `ApproveAllHandler` logs an error and returns a user-not-available decision; custom handlers can inspect `managed_approval_required` when implementing a human-facing confirmation flow. To observe streamed session events (assistant messages, tool calls, etc.), call `session.subscribe()` — see [Streaming](#streaming) below. ### SessionConfig @@ -434,7 +434,7 @@ Reach for the `ToolHandler` trait directly when you need shared state across mul Set a permission policy directly on `SessionConfig` with the chainable builders. They install a synthesized `PermissionHandler` so only permission requests are intercepted; every other event flows through unchanged. -The approve-all policy returns an error when `enable_managed_settings` is true. Custom handlers can inspect `managed_approval_required` for human-facing confirmation logic. +When `enable_managed_settings` is true, the approve-all policy logs an error and returns a user-not-available decision. Custom handlers can inspect `managed_approval_required` for human-facing confirmation logic. ```rust,ignore let session = client diff --git a/rust/src/handler.rs b/rust/src/handler.rs index a5cfac3f99..c6d6f9875a 100644 --- a/rust/src/handler.rs +++ b/rust/src/handler.rs @@ -279,6 +279,9 @@ pub trait AutoModeSwitchHandler: Send + Sync + 'static { } /// A [`PermissionHandler`] that approves requests when managed settings are disabled. +/// +/// Requests that require managed approval remain pending for an explicit human +/// decision. #[derive(Debug, Clone)] pub struct ApproveAllHandler; @@ -294,6 +297,8 @@ impl PermissionHandler for ApproveAllHandler { permission_handler_failure( "ApproveAllHandler cannot be used when managed settings are enabled", ) + } else if data.managed_approval_required == Some(true) { + PermissionResult::no_result() } else { PermissionResult::approve_once() } @@ -353,6 +358,21 @@ mod tests { )); } + #[tokio::test] + async fn approve_all_handler_leaves_managed_approval_pending() { + let result = ApproveAllHandler + .handle( + SessionId::from("s1"), + RequestId::new("1"), + PermissionRequestData { + managed_approval_required: Some(true), + ..Default::default() + }, + ) + .await; + assert!(matches!(result, PermissionResult::NoResult)); + } + #[tokio::test] async fn deny_all_handler_returns_denied() { let result = DenyAllHandler diff --git a/rust/src/permission.rs b/rust/src/permission.rs index 049a51023b..50ae53517f 100644 --- a/rust/src/permission.rs +++ b/rust/src/permission.rs @@ -19,10 +19,12 @@ use async_trait::async_trait; use crate::handler::{PermissionHandler, PermissionResult, permission_handler_failure}; use crate::types::{PermissionRequestData, RequestId, SessionId}; -/// Return a [`PermissionHandler`] that approves ordinary requests. +/// Return a [`PermissionHandler`] that approves requests when managed settings +/// are disabled. /// -/// Requests that require managed approval remain pending for an explicit -/// human decision. +/// When managed settings are enabled, the handler logs an error and returns a +/// user-not-available decision. Requests that require managed approval remain +/// pending for an explicit human decision. pub fn approve_all() -> Arc { Arc::new(PolicyHandler { policy: Policy::ApproveAll, @@ -123,6 +125,8 @@ impl PermissionHandler for PolicyHandler { permission_handler_failure( "approve-all policy cannot be used when managed settings are enabled", ) + } else if data.managed_approval_required == Some(true) { + PermissionResult::no_result() } else { PermissionResult::approve_once() } @@ -186,14 +190,14 @@ mod tests { } #[tokio::test] - async fn approve_if_can_approve_managed_request() { + async fn approve_if_leaves_managed_approval_pending_when_predicate_approves() { let h = approve_if(|_| true); let mut request = data(); request.managed_approval_required = Some(true); assert!(matches!( h.handle(SessionId::from("s"), RequestId::new("1"), request) .await, - PermissionResult::Decision(crate::types::PermissionDecision::ApproveOnce(_)) + PermissionResult::NoResult )); } From 24dd043deb7c6282bbcd30b3eb05116b0f161f7c Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Thu, 30 Jul 2026 08:07:44 -0700 Subject: [PATCH 17/41] Fix Java Gradle snapshot coordinate Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- java/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/README.md b/java/README.md index 2bbb2df31e..a1fce0ff4a 100644 --- a/java/README.md +++ b/java/README.md @@ -67,7 +67,7 @@ Snapshot builds of the next development version are published to Maven Central S Replace `${copilot.sdk.version}` with the latest release from Maven Central. ```groovy -implementation 'com.github:copilot-sdk-java:1.0.9-preview.1-01-SNAPSHOT' +implementation 'com.github:copilot-sdk-java:1.0.10-preview.0-SNAPSHOT' ``` ## Quick Start From 33e1bb4122e13e1b8768b0a34af8d8bd89b962b6 Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Thu, 30 Jul 2026 08:21:02 -0700 Subject: [PATCH 18/41] Align managed permission documentation Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- nodejs/README.md | 2 +- python/README.md | 5 +++-- python/copilot/session.py | 3 ++- rust/src/handler.rs | 4 ++-- rust/src/permission.rs | 3 +-- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/nodejs/README.md b/nodejs/README.md index d3c22e8b43..4c430da05c 100644 --- a/nodejs/README.md +++ b/nodejs/README.md @@ -927,7 +927,7 @@ The handler must return one of the `PermissionDecision` shapes (or `{ kind: "no- | `"approve-permanently"` | Allow this request and persist the approval across sessions (currently used for URL domains) | `domain` (URL domain to approve) | | `"reject"` | Deny the request | `feedback?` (optional string surfaced to the agent) | | `"user-not-available"` | Deny the request because no user is available to confirm it | — | -| `"no-result"` | Leave the request unanswered (only valid with protocol v1; rejected by protocol v2 servers) | — | +| `"no-result"` | Suppress this SDK client's response so another connected client can answer the pending request | — | ### Resuming Sessions diff --git a/python/README.md b/python/README.md index c842886c9c..81fa7b13d1 100644 --- a/python/README.md +++ b/python/README.md @@ -847,7 +847,8 @@ async def on_permission_request( The handler returns a ``PermissionRequestResult``, which is an alias for ``PermissionDecision | PermissionNoResult`` (the generated wire-level -union of every decision variant, plus a small sentinel for v1 servers). +union of every decision variant, plus a sentinel that suppresses this SDK +client's response). Approval decisions are present-tense — they describe the decision to apply, not the past-tense outcome reported back on `permission.completed` session events. @@ -857,7 +858,7 @@ session events. | `PermissionDecisionApproveOnce()` | Allow this single request | | `PermissionDecisionReject(feedback="…")` | Deny the request (optional feedback string forwarded to the LLM) | | `PermissionDecisionUserNotAvailable()` | Deny the request because no user is available to confirm it (the default) | -| `PermissionNoResult()` | Leave the request unanswered (only valid with protocol v1; rejected by protocol v2 servers) | +| `PermissionNoResult()` | Suppress this SDK client's response so another connected client can answer the pending request | Several richer variants (``PermissionDecisionApproveForSession``, ``PermissionDecisionApproveForLocation``, ``PermissionDecisionApprovePermanently``, diff --git a/python/copilot/session.py b/python/copilot/session.py index 22d825bbd2..fee7f383f9 100644 --- a/python/copilot/session.py +++ b/python/copilot/session.py @@ -353,7 +353,8 @@ class PermissionNoResult: # The decision returned by a permission handler. Identical shape to the wire # ``PermissionDecision`` discriminated union, plus a :class:`PermissionNoResult` -# sentinel for v1 servers. Construct via the generated variant classes: +# sentinel that suppresses this SDK client's response. Construct via the +# generated variant classes: # ``PermissionDecisionApproveOnce()``, ``PermissionDecisionReject(feedback=...)``, # etc. The ``kind`` discriminator is baked in as a ``ClassVar`` default by # codegen, so callers must not pass it. diff --git a/rust/src/handler.rs b/rust/src/handler.rs index c6d6f9875a..7ec8919650 100644 --- a/rust/src/handler.rs +++ b/rust/src/handler.rs @@ -280,8 +280,8 @@ pub trait AutoModeSwitchHandler: Send + Sync + 'static { /// A [`PermissionHandler`] that approves requests when managed settings are disabled. /// -/// Requests that require managed approval remain pending for an explicit human -/// decision. +/// When managed settings are enabled, the handler logs an error and returns a +/// user-not-available decision. #[derive(Debug, Clone)] pub struct ApproveAllHandler; diff --git a/rust/src/permission.rs b/rust/src/permission.rs index 50ae53517f..e353ce3153 100644 --- a/rust/src/permission.rs +++ b/rust/src/permission.rs @@ -23,8 +23,7 @@ use crate::types::{PermissionRequestData, RequestId, SessionId}; /// are disabled. /// /// When managed settings are enabled, the handler logs an error and returns a -/// user-not-available decision. Requests that require managed approval remain -/// pending for an explicit human decision. +/// user-not-available decision. pub fn approve_all() -> Arc { Arc::new(PolicyHandler { policy: Policy::ApproveAll, From d34362c58fb734be9e465ea91ebf92293351c221 Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Thu, 30 Jul 2026 08:32:35 -0700 Subject: [PATCH 19/41] Clarify Java managed approval handling Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../java/com/github/copilot/rpc/PermissionHandler.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/java/src/main/java/com/github/copilot/rpc/PermissionHandler.java b/java/src/main/java/com/github/copilot/rpc/PermissionHandler.java index f7985b7d30..5d91e2c20a 100644 --- a/java/src/main/java/com/github/copilot/rpc/PermissionHandler.java +++ b/java/src/main/java/com/github/copilot/rpc/PermissionHandler.java @@ -18,7 +18,8 @@ *

{@code
  * PermissionHandler handler = (request, invocation) -> {
  * 	if (Boolean.TRUE.equals(request.getManagedApprovalRequired())) {
- * 		return CompletableFuture.completedFuture(PermissionRequestResult.noResult());
+ * 		// Obtain an explicit human decision before approving this request.
+ * 		return requestHumanApproval(request);
  * 	}
  *
  * 	// Check the permission kind
@@ -33,6 +34,11 @@
  * 			.completedFuture(new PermissionRequestResult().setKind(PermissionRequestResultKind.APPROVED));
  * };
  * }
+ *

+ * Event-based permission dispatch can use + * {@link PermissionRequestResult#noResult()} to let another connected client + * answer a pending request. Legacy protocol-v2 callbacks require a decision and + * cannot abstain. * *

* A pre-built handler that approves all requests is available as From 8b4ba8cc1ab13d0869240a444c76c3cd4c74ec9f Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Thu, 30 Jul 2026 08:50:45 -0700 Subject: [PATCH 20/41] Surface permission handler failures Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- dotnet/src/Session.cs | 3 ++- go/session.go | 1 + java/src/main/java/com/github/copilot/CopilotSession.java | 1 + nodejs/src/session.ts | 3 ++- python/copilot/session.py | 4 ++++ 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/dotnet/src/Session.cs b/dotnet/src/Session.cs index b0c1dc9886..8a46f9c3eb 100644 --- a/dotnet/src/Session.cs +++ b/dotnet/src/Session.cs @@ -961,8 +961,9 @@ private async Task ExecutePermissionAndRespondAsync(string requestId, Permission SessionId, requestId); } - catch (Exception) + catch (Exception ex) { + _logger.LogError(ex, "Permission handler failed. SessionId={SessionId}, RequestId={RequestId}", SessionId, requestId); try { await Rpc.Permissions.HandlePendingPermissionRequestAsync(requestId, PermissionDecision.UserNotAvailable()); diff --git a/go/session.go b/go/session.go index 9b37d42a4e..5232efb1e8 100644 --- a/go/session.go +++ b/go/session.go @@ -1600,6 +1600,7 @@ func (s *Session) executePermissionAndRespond(requestID string, permissionReques decision, err := handler(permissionRequest, invocation) if err != nil { + log.Printf("permission handler failed: session_id=%s request_id=%s error=%v", s.SessionID, requestID, err) s.RPC.Permissions.HandlePendingPermissionRequest(context.Background(), &rpc.PermissionDecisionRequest{ RequestID: requestID, Result: &rpc.PermissionDecisionUserNotAvailable{}, diff --git a/java/src/main/java/com/github/copilot/CopilotSession.java b/java/src/main/java/com/github/copilot/CopilotSession.java index 721b021181..30c9152777 100644 --- a/java/src/main/java/com/github/copilot/CopilotSession.java +++ b/java/src/main/java/com/github/copilot/CopilotSession.java @@ -964,6 +964,7 @@ private void executeToolAndRespondAsync(String requestId, String toolName, Strin LOG.log(Level.WARNING, "Error sending tool result for requestId=" + requestId, e); } }).exceptionally(ex -> { + LOG.log(Level.SEVERE, "Permission handler failed for requestId=" + requestId, ex); try { getRpc().tools.handlePendingToolCall(new SessionToolsHandlePendingToolCallParams(sessionId, requestId, null, ex.getMessage() != null ? ex.getMessage() : ex.toString())); diff --git a/nodejs/src/session.ts b/nodejs/src/session.ts index 61729cdd12..9f4d4834f5 100644 --- a/nodejs/src/session.ts +++ b/nodejs/src/session.ts @@ -1119,10 +1119,11 @@ export class CopilotSession { return; } await this.rpc.permissions.handlePendingPermissionRequest({ requestId, result }); - } catch (_error) { + } catch (error) { if (this.disconnected) { return; } + console.error("Permission handler failed", error); try { await this.rpc.permissions.handlePendingPermissionRequest({ requestId, diff --git a/python/copilot/session.py b/python/copilot/session.py index fee7f383f9..58587201cf 100644 --- a/python/copilot/session.py +++ b/python/copilot/session.py @@ -2151,6 +2151,10 @@ async def _execute_permission_and_respond( request_id=request_id, ) except Exception: + logger.exception( + "Permission handler failed", + extra={"session_id": self.session_id, "request_id": request_id}, + ) try: await self.rpc.permissions.handle_pending_permission_request( PermissionDecisionRequest( From 909a5165f002f2732b44aa0772a43a65f41edd7c Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Thu, 30 Jul 2026 09:01:32 -0700 Subject: [PATCH 21/41] Log Java permission handler failures Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- java/src/main/java/com/github/copilot/CopilotSession.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/src/main/java/com/github/copilot/CopilotSession.java b/java/src/main/java/com/github/copilot/CopilotSession.java index 30c9152777..aacd9ee481 100644 --- a/java/src/main/java/com/github/copilot/CopilotSession.java +++ b/java/src/main/java/com/github/copilot/CopilotSession.java @@ -964,7 +964,6 @@ private void executeToolAndRespondAsync(String requestId, String toolName, Strin LOG.log(Level.WARNING, "Error sending tool result for requestId=" + requestId, e); } }).exceptionally(ex -> { - LOG.log(Level.SEVERE, "Permission handler failed for requestId=" + requestId, ex); try { getRpc().tools.handlePendingToolCall(new SessionToolsHandlePendingToolCallParams(sessionId, requestId, null, ex.getMessage() != null ? ex.getMessage() : ex.toString())); @@ -1031,6 +1030,7 @@ private void executePermissionAndRespondAsync(String requestId, PermissionReques LOG.log(Level.WARNING, "Error sending permission result for requestId=" + requestId, e); } }).exceptionally(ex -> { + LOG.log(Level.SEVERE, "Permission handler failed for requestId=" + requestId, ex); try { PermissionRequestResult denied = new PermissionRequestResult(); denied.setKind(PermissionRequestResultKind.DENIED_COULD_NOT_REQUEST_FROM_USER); From 13bb69dba36a1517515b10cee76e2e4552fda5e2 Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Thu, 30 Jul 2026 09:06:44 -0700 Subject: [PATCH 22/41] Clarify permission failure diagnostics Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- nodejs/src/session.ts | 6 +++++- python/README.md | 2 +- python/copilot/session.py | 7 ++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/nodejs/src/session.ts b/nodejs/src/session.ts index 9f4d4834f5..2a4513d47b 100644 --- a/nodejs/src/session.ts +++ b/nodejs/src/session.ts @@ -1123,7 +1123,11 @@ export class CopilotSession { if (this.disconnected) { return; } - console.error("Permission handler failed", error); + console.error("Permission handler failed", { + sessionId: this.sessionId, + requestId, + error, + }); try { await this.rpc.permissions.handlePendingPermissionRequest({ requestId, diff --git a/python/README.md b/python/README.md index 81fa7b13d1..0206ad49b3 100644 --- a/python/README.md +++ b/python/README.md @@ -858,7 +858,7 @@ session events. | `PermissionDecisionApproveOnce()` | Allow this single request | | `PermissionDecisionReject(feedback="…")` | Deny the request (optional feedback string forwarded to the LLM) | | `PermissionDecisionUserNotAvailable()` | Deny the request because no user is available to confirm it (the default) | -| `PermissionNoResult()` | Suppress this SDK client's response so another connected client can answer the pending request | +| `PermissionNoResult()` | During event-based dispatch, suppress this SDK client's response so another connected client can answer the pending request; legacy direct callbacks cannot abstain | Several richer variants (``PermissionDecisionApproveForSession``, ``PermissionDecisionApproveForLocation``, ``PermissionDecisionApprovePermanently``, diff --git a/python/copilot/session.py b/python/copilot/session.py index 58587201cf..f8a229ae75 100644 --- a/python/copilot/session.py +++ b/python/copilot/session.py @@ -342,10 +342,11 @@ class SystemMessageCustomizeConfig(TypedDict, total=False): @dataclass class PermissionNoResult: - """Sentinel returned by a permission handler to leave the request unanswered. + """Sentinel that leaves an event-dispatched permission request unanswered. - The SDK suppresses its response so another connected client, such as a - human-facing host, can answer the pending request. + During event-based permission dispatch, the SDK suppresses its response so + another connected client, such as a human-facing host, can answer the pending + request. Legacy direct callbacks require a concrete decision and cannot abstain. """ kind: Literal["no-result"] = "no-result" From bee8b3a2f6928c447695a857d88270f2c4ac4956 Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Thu, 30 Jul 2026 09:21:35 -0700 Subject: [PATCH 23/41] Clarify Rust managed approval fallback Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- rust/src/handler.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rust/src/handler.rs b/rust/src/handler.rs index 7ec8919650..77edf919c9 100644 --- a/rust/src/handler.rs +++ b/rust/src/handler.rs @@ -278,10 +278,12 @@ pub trait AutoModeSwitchHandler: Send + Sync + 'static { ) -> AutoModeSwitchResponse; } -/// A [`PermissionHandler`] that approves requests when managed settings are disabled. +/// A [`PermissionHandler`] that approves ordinary requests when managed settings are disabled. /// /// When managed settings are enabled, the handler logs an error and returns a -/// user-not-available decision. +/// user-not-available decision. As a defense-in-depth fallback, a request marked +/// as requiring managed approval is left unanswered even if the session flag is +/// absent. #[derive(Debug, Clone)] pub struct ApproveAllHandler; From 48f7959386e31fa95b3450f6930e742646345a7c Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Thu, 30 Jul 2026 09:48:36 -0700 Subject: [PATCH 24/41] Reject no-result in legacy Python callbacks Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- python/copilot/session.py | 5 ++++- python/test_managed_permissions.py | 18 ++++++++++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/python/copilot/session.py b/python/copilot/session.py index f8a229ae75..87e86727de 100644 --- a/python/copilot/session.py +++ b/python/copilot/session.py @@ -2566,7 +2566,10 @@ async def _handle_permission_request( handler_start, session_id=self.session_id, ) - return cast(PermissionRequestResult, result) + result = cast(PermissionRequestResult, result) + if isinstance(result, PermissionNoResult): + return PermissionDecisionUserNotAvailable() + return result except Exception: # pylint: disable=broad-except # Handler failed, deny permission. logger.debug( diff --git a/python/test_managed_permissions.py b/python/test_managed_permissions.py index 4e23256c54..affe9c01f0 100644 --- a/python/test_managed_permissions.py +++ b/python/test_managed_permissions.py @@ -1,7 +1,7 @@ import pytest -from copilot.rpc import PermissionDecisionApproveOnce -from copilot.session import PermissionHandler +from copilot.rpc import PermissionDecisionApproveOnce, PermissionDecisionUserNotAvailable +from copilot.session import CopilotSession, PermissionHandler, PermissionNoResult from copilot.session_events import PermissionRequestedData, PermissionRequestRead @@ -49,3 +49,17 @@ def test_approve_all_approves_ordinary_request() -> None: ), PermissionDecisionApproveOnce, ) + + +async def test_legacy_permission_callback_rejects_no_result() -> None: + request = PermissionRequestRead( + intention="Read managed content", + path="/workspace/file.txt", + managed_approval_required=True, + ) + session = CopilotSession("session-1", client=None) + session._register_permission_handler(lambda _request, _invocation: PermissionNoResult()) + + result = await session._handle_permission_request(request) + + assert isinstance(result, PermissionDecisionUserNotAvailable) From b4525ff96c1487b52e8564ba15adf768330a120b Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Thu, 30 Jul 2026 10:04:41 -0700 Subject: [PATCH 25/41] Fail closed on managed approval metadata Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- dotnet/src/PermissionHandlers.cs | 15 +++++++++++++-- dotnet/test/Unit/PermissionHandlerTests.cs | 15 +++++++++++++++ go/permissions.go | 7 +++++-- go/permissions_test.go | 17 +++++++++++++++++ .../github/copilot/rpc/PermissionHandler.java | 14 ++++++++++---- .../copilot/PermissionRequestResultTest.java | 11 +++++++++++ nodejs/src/types.ts | 5 ++++- nodejs/test/client.test.ts | 6 ++++++ python/copilot/session.py | 2 ++ python/test_managed_permissions.py | 16 ++++++++++++++++ 10 files changed, 99 insertions(+), 9 deletions(-) diff --git a/dotnet/src/PermissionHandlers.cs b/dotnet/src/PermissionHandlers.cs index 6effeb063b..acf82de115 100644 --- a/dotnet/src/PermissionHandlers.cs +++ b/dotnet/src/PermissionHandlers.cs @@ -13,8 +13,19 @@ public static class PermissionHandler /// A permission handler that approves requests when managed settings are disabled. /// public static Func> ApproveAll { get; } = - (_, invocation) => invocation.ManagedSettingsEnabled + (request, invocation) => invocation.ManagedSettingsEnabled ? Task.FromException( new InvalidOperationException("ApproveAll cannot be used when managed settings are enabled")) - : Task.FromResult(PermissionDecision.ApproveOnce()); + : RequiresManagedApproval(request) + ? Task.FromResult(PermissionDecision.NoResult()) + : Task.FromResult(PermissionDecision.ApproveOnce()); + + private static bool RequiresManagedApproval(PermissionRequest request) => request switch + { + PermissionRequestShell shell => shell.ManagedApprovalRequired is true, + PermissionRequestWrite write => write.ManagedApprovalRequired is true, + PermissionRequestRead read => read.ManagedApprovalRequired is true, + PermissionRequestUrl url => url.ManagedApprovalRequired is true, + _ => false, + }; } diff --git a/dotnet/test/Unit/PermissionHandlerTests.cs b/dotnet/test/Unit/PermissionHandlerTests.cs index 149f89ba0d..840ae9e101 100644 --- a/dotnet/test/Unit/PermissionHandlerTests.cs +++ b/dotnet/test/Unit/PermissionHandlerTests.cs @@ -65,4 +65,19 @@ public async Task ApproveAllApprovesOrdinaryRequest() Assert.IsType(decision); } + + [Fact] + public async Task ApproveAllLeavesManagedRequestPendingWhenSessionFlagIsAbsent() + { + var request = new PermissionRequestRead + { + Intention = "Read managed content", + ManagedApprovalRequired = true, + Path = "/workspace/file.txt", + }; + + var decision = await PermissionHandler.ApproveAll(request, new PermissionInvocation()); + + Assert.IsType(decision); + } } diff --git a/go/permissions.go b/go/permissions.go index b21745bd3e..24b9cc7f13 100644 --- a/go/permissions.go +++ b/go/permissions.go @@ -11,9 +11,12 @@ var PermissionHandler = struct { // ApproveAll approves permission requests when managed settings are disabled. ApproveAll PermissionHandlerFunc }{ - ApproveAll: func(_ PermissionRequest, invocation PermissionInvocation) (rpc.PermissionDecision, error) { + ApproveAll: func(request PermissionRequest, invocation PermissionInvocation) (rpc.PermissionDecision, error) { if invocation.ManagedSettingsEnabled { - return nil, errors.New("ApproveAll cannot be used when managed settings are enabled") + return nil, errors.New("approveAll cannot be used when managed settings are enabled") + } + if request.RequiresManagedApproval() { + return &rpc.PermissionDecisionNoResult{}, nil } return &rpc.PermissionDecisionApproveOnce{}, nil }, diff --git a/go/permissions_test.go b/go/permissions_test.go index 7893faaa24..69919eb2d2 100644 --- a/go/permissions_test.go +++ b/go/permissions_test.go @@ -53,3 +53,20 @@ func TestApproveAllApprovesOrdinaryRequest(t *testing.T) { t.Fatalf("expected PermissionDecisionApproveOnce, got %T", decision) } } + +func TestApproveAllLeavesManagedRequestPendingWhenSessionFlagIsAbsent(t *testing.T) { + decision, err := copilot.PermissionHandler.ApproveAll( + &copilot.PermissionRequestRead{ManagedApprovalRequired: ptrTo(true)}, + copilot.PermissionInvocation{SessionID: "session-1"}, + ) + if err != nil { + t.Fatal(err) + } + if _, ok := decision.(*rpc.PermissionDecisionNoResult); !ok { + t.Fatalf("expected PermissionDecisionNoResult, got %T", decision) + } +} + +func ptrTo[T any](value T) *T { + return &value +} diff --git a/java/src/main/java/com/github/copilot/rpc/PermissionHandler.java b/java/src/main/java/com/github/copilot/rpc/PermissionHandler.java index 5d91e2c20a..58639beda2 100644 --- a/java/src/main/java/com/github/copilot/rpc/PermissionHandler.java +++ b/java/src/main/java/com/github/copilot/rpc/PermissionHandler.java @@ -58,10 +58,16 @@ public interface PermissionHandler { * * @since 1.0.11 */ - PermissionHandler APPROVE_ALL = (request, invocation) -> invocation.isManagedSettingsEnabled() - ? CompletableFuture.failedFuture( - new IllegalStateException("APPROVE_ALL cannot be used when managed settings are enabled")) - : CompletableFuture.completedFuture(PermissionRequestResult.approveOnce()); + PermissionHandler APPROVE_ALL = (request, invocation) -> { + if (invocation.isManagedSettingsEnabled()) { + return CompletableFuture.failedFuture( + new IllegalStateException("APPROVE_ALL cannot be used when managed settings are enabled")); + } + if (Boolean.TRUE.equals(request.getManagedApprovalRequired())) { + return CompletableFuture.completedFuture(PermissionRequestResult.noResult()); + } + return CompletableFuture.completedFuture(PermissionRequestResult.approveOnce()); + }; /** * Handles a permission request from the assistant. diff --git a/java/src/test/java/com/github/copilot/PermissionRequestResultTest.java b/java/src/test/java/com/github/copilot/PermissionRequestResultTest.java index deca0f4d23..d1cb6137ce 100644 --- a/java/src/test/java/com/github/copilot/PermissionRequestResultTest.java +++ b/java/src/test/java/com/github/copilot/PermissionRequestResultTest.java @@ -123,4 +123,15 @@ void testApproveAllApprovesOrdinaryRequest() { assertEquals("approve-once", result.getKind()); } + + @Test + void testApproveAllLeavesManagedRequestPendingWhenSessionFlagIsAbsent() { + var request = new PermissionRequest(); + request.setKind("read"); + request.setManagedApprovalRequired(true); + + var result = PermissionHandler.APPROVE_ALL.handle(request, new PermissionInvocation()).join(); + + assertEquals("no-result", result.getKind()); + } } diff --git a/nodejs/src/types.ts b/nodejs/src/types.ts index d5d3f6468d..1a7134959c 100644 --- a/nodejs/src/types.ts +++ b/nodejs/src/types.ts @@ -1144,10 +1144,13 @@ export type PermissionHandler = ( /** * Approves permission requests for sessions without managed settings. */ -export const approveAll: PermissionHandler = (_request, invocation) => { +export const approveAll: PermissionHandler = (request, invocation) => { if (invocation.managedSettingsEnabled) { throw new Error("approveAll cannot be used when managed settings are enabled"); } + if ("managedApprovalRequired" in request && request.managedApprovalRequired === true) { + return { kind: "no-result" }; + } return { kind: "approve-once" }; }; diff --git a/nodejs/test/client.test.ts b/nodejs/test/client.test.ts index 85061d2d70..a88b48c948 100644 --- a/nodejs/test/client.test.ts +++ b/nodejs/test/client.test.ts @@ -39,6 +39,12 @@ describe("approveAll", () => { ) ).toThrow("approveAll cannot be used when managed settings are enabled"); }); + + it("does not approve managed requests when the session flag is absent", () => { + expect(approveAll({ ...request, managedApprovalRequired: true }, invocation)).toEqual({ + kind: "no-result", + }); + }); }); describe("CopilotClient", () => { diff --git a/python/copilot/session.py b/python/copilot/session.py index 87e86727de..1a93a17b3c 100644 --- a/python/copilot/session.py +++ b/python/copilot/session.py @@ -380,6 +380,8 @@ def approve_all( ) -> PermissionRequestResult: if invocation["managed_settings_enabled"]: raise RuntimeError("approve_all cannot be used when managed settings are enabled") + if getattr(request, "managed_approval_required", False) is True: + return PermissionNoResult() return PermissionDecisionApproveOnce() diff --git a/python/test_managed_permissions.py b/python/test_managed_permissions.py index affe9c01f0..4cf213f82f 100644 --- a/python/test_managed_permissions.py +++ b/python/test_managed_permissions.py @@ -51,6 +51,22 @@ def test_approve_all_approves_ordinary_request() -> None: ) +def test_approve_all_leaves_managed_request_pending_when_session_flag_is_absent() -> None: + request = PermissionRequestRead( + intention="Read managed content", + path="/workspace/file.txt", + managed_approval_required=True, + ) + + assert isinstance( + PermissionHandler.approve_all( + request, + {"session_id": "session-1", "managed_settings_enabled": False}, + ), + PermissionNoResult, + ) + + async def test_legacy_permission_callback_rejects_no_result() -> None: request = PermissionRequestRead( intention="Read managed content", From c80aadef07f20866b5c15e4a889cac4546ad1e38 Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Thu, 30 Jul 2026 10:09:51 -0700 Subject: [PATCH 26/41] Initialize managed settings before Go events Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- go/client.go | 16 ++++++++++++---- go/session.go | 8 +++++++- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/go/client.go b/go/client.go index bb87641460..2202e92a14 100644 --- a/go/client.go +++ b/go/client.go @@ -906,8 +906,12 @@ func (c *Client) CreateSession(ctx context.Context, config *SessionConfig) (*Ses // message is dispatched) so notifications for the new session id are // routed to a registered session. initializeSession := func(sessionID string) (*Session, error) { - s := newSession(sessionID, c.client, "") - s.managedSettings = config.EnableManagedSettings != nil && *config.EnableManagedSettings + s := newSession( + sessionID, + c.client, + "", + config.EnableManagedSettings != nil && *config.EnableManagedSettings, + ) s.registerTools(config.Tools) s.registerPermissionHandler(config.OnPermissionRequest) @@ -1228,8 +1232,12 @@ func (c *Client) ResumeSessionWithOptions(ctx context.Context, sessionID string, // Create and register the session before issuing the RPC so that // events emitted by the CLI (e.g. session.start) are not dropped. - session := newSession(sessionID, c.client, "") - session.managedSettings = config.EnableManagedSettings != nil && *config.EnableManagedSettings + session := newSession( + sessionID, + c.client, + "", + config.EnableManagedSettings != nil && *config.EnableManagedSettings, + ) session.registerTools(config.Tools) session.registerPermissionHandler(config.OnPermissionRequest) diff --git a/go/session.go b/go/session.go index 5232efb1e8..74e68cc7f3 100644 --- a/go/session.go +++ b/go/session.go @@ -366,10 +366,16 @@ func canvasResultError(err error) error { } // newSession creates a new session wrapper with the given session ID and client. -func newSession(sessionID string, client *jsonrpc2.Client, workspacePath string) *Session { +func newSession( + sessionID string, + client *jsonrpc2.Client, + workspacePath string, + managedSettings bool, +) *Session { s := &Session{ SessionID: sessionID, workspacePath: workspacePath, + managedSettings: managedSettings, client: client, clientSessionAPIs: &rpc.ClientSessionAPIHandlers{}, handlers: make([]sessionHandler, 0), From 565f2474cf8654555acb946cd0756545653f2b29 Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Thu, 30 Jul 2026 10:13:25 -0700 Subject: [PATCH 27/41] Fail closed on unknown permission requests Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- dotnet/src/PermissionHandlers.cs | 8 +++++++- dotnet/test/Unit/PermissionHandlerTests.cs | 10 ++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/dotnet/src/PermissionHandlers.cs b/dotnet/src/PermissionHandlers.cs index acf82de115..f5e1dc0f8c 100644 --- a/dotnet/src/PermissionHandlers.cs +++ b/dotnet/src/PermissionHandlers.cs @@ -26,6 +26,12 @@ public static class PermissionHandler PermissionRequestWrite write => write.ManagedApprovalRequired is true, PermissionRequestRead read => read.ManagedApprovalRequired is true, PermissionRequestUrl url => url.ManagedApprovalRequired is true, - _ => false, + PermissionRequestMcp + or PermissionRequestMemory + or PermissionRequestCustomTool + or PermissionRequestHook + or PermissionRequestExtensionManagement + or PermissionRequestExtensionPermissionAccess => false, + _ => true, }; } diff --git a/dotnet/test/Unit/PermissionHandlerTests.cs b/dotnet/test/Unit/PermissionHandlerTests.cs index 840ae9e101..dc4ffbbcae 100644 --- a/dotnet/test/Unit/PermissionHandlerTests.cs +++ b/dotnet/test/Unit/PermissionHandlerTests.cs @@ -80,4 +80,14 @@ public async Task ApproveAllLeavesManagedRequestPendingWhenSessionFlagIsAbsent() Assert.IsType(decision); } + + [Fact] + public async Task ApproveAllLeavesUnknownRequestPending() + { + var request = new PermissionRequest { Kind = "future-managed-kind" }; + + var decision = await PermissionHandler.ApproveAll(request, new PermissionInvocation()); + + Assert.IsType(decision); + } } From 604848090b7f165503c7d0a649accb588f103273 Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Thu, 30 Jul 2026 10:14:37 -0700 Subject: [PATCH 28/41] Preserve legacy Python approve-all calls Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- python/copilot/session.py | 2 +- python/test_managed_permissions.py | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/python/copilot/session.py b/python/copilot/session.py index 1a93a17b3c..b5be174ddb 100644 --- a/python/copilot/session.py +++ b/python/copilot/session.py @@ -378,7 +378,7 @@ class PermissionHandler: def approve_all( request: PermissionRequest, invocation: PermissionInvocation ) -> PermissionRequestResult: - if invocation["managed_settings_enabled"]: + if invocation.get("managed_settings_enabled", False): raise RuntimeError("approve_all cannot be used when managed settings are enabled") if getattr(request, "managed_approval_required", False) is True: return PermissionNoResult() diff --git a/python/test_managed_permissions.py b/python/test_managed_permissions.py index 4cf213f82f..16861a5112 100644 --- a/python/test_managed_permissions.py +++ b/python/test_managed_permissions.py @@ -1,3 +1,5 @@ +from typing import Any + import pytest from copilot.rpc import PermissionDecisionApproveOnce, PermissionDecisionUserNotAvailable @@ -58,13 +60,9 @@ def test_approve_all_leaves_managed_request_pending_when_session_flag_is_absent( managed_approval_required=True, ) - assert isinstance( - PermissionHandler.approve_all( - request, - {"session_id": "session-1", "managed_settings_enabled": False}, - ), - PermissionNoResult, - ) + legacy_invocation: Any = {"session_id": "session-1"} + + assert isinstance(PermissionHandler.approve_all(request, legacy_invocation), PermissionNoResult) async def test_legacy_permission_callback_rejects_no_result() -> None: From fb0c782c15fe73f10712f53f010637de93ca95ed Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Thu, 30 Jul 2026 10:20:39 -0700 Subject: [PATCH 29/41] Clarify Rust permission event payload Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- rust/src/types.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rust/src/types.rs b/rust/src/types.rs index 7e1414d966..4cfcc50ffc 100644 --- a/rust/src/types.rs +++ b/rust/src/types.rs @@ -5451,8 +5451,9 @@ pub struct PermissionRequestData { /// Whether managed settings are enabled for this session. #[serde(default)] pub managed_settings_enabled: bool, - /// The full permission request params from the CLI. The shape varies by - /// permission type and CLI version, so we preserve it as `Value`. + /// The full permission event params from the CLI, including the request ID + /// and nested permission request. The shape varies by permission type and + /// CLI version, so we preserve it as `Value`. #[serde(flatten)] pub extra: Value, } From 67527da322e921d7160c68af716ab6a56395c4b5 Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Thu, 30 Jul 2026 10:24:44 -0700 Subject: [PATCH 30/41] Harden managed permission fallbacks Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- go/permissions_test.go | 7 +++++++ go/rpc/permission_request_managed_approval.go | 5 ++++- python/copilot/session.py | 2 ++ rust/src/types.rs | 2 +- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/go/permissions_test.go b/go/permissions_test.go index 69919eb2d2..ed4c3a040b 100644 --- a/go/permissions_test.go +++ b/go/permissions_test.go @@ -67,6 +67,13 @@ func TestApproveAllLeavesManagedRequestPendingWhenSessionFlagIsAbsent(t *testing } } +func TestRawPermissionRequestWithMalformedJSONRequiresManagedApproval(t *testing.T) { + request := rpc.RawPermissionRequest{Raw: json.RawMessage(`{"managedApprovalRequired":`)} + if !request.RequiresManagedApproval() { + t.Fatal("expected malformed raw request to fail closed") + } +} + func ptrTo[T any](value T) *T { return &value } diff --git a/go/rpc/permission_request_managed_approval.go b/go/rpc/permission_request_managed_approval.go index 601c77f0e6..816181f204 100644 --- a/go/rpc/permission_request_managed_approval.go +++ b/go/rpc/permission_request_managed_approval.go @@ -74,5 +74,8 @@ func (r RawPermissionRequest) RequiresManagedApproval() bool { var metadata struct { ManagedApprovalRequired *bool `json:"managedApprovalRequired"` } - return json.Unmarshal(r.Raw, &metadata) == nil && managedApprovalRequired(metadata.ManagedApprovalRequired) + if json.Unmarshal(r.Raw, &metadata) != nil { + return true + } + return managedApprovalRequired(metadata.ManagedApprovalRequired) } diff --git a/python/copilot/session.py b/python/copilot/session.py index b5be174ddb..3cb41553ff 100644 --- a/python/copilot/session.py +++ b/python/copilot/session.py @@ -1476,6 +1476,8 @@ def __init__( client: The internal client connection to the Copilot CLI. workspace_path: Path to the session workspace directory (when infinite sessions enabled). + managed_settings_enabled: Whether managed settings were enabled when + creating or resuming the session. """ self.session_id = session_id self._managed_settings_enabled = managed_settings_enabled diff --git a/rust/src/types.rs b/rust/src/types.rs index 4cfcc50ffc..e9f077a231 100644 --- a/rust/src/types.rs +++ b/rust/src/types.rs @@ -5449,7 +5449,7 @@ pub struct PermissionRequestData { #[serde(default, skip_serializing_if = "Option::is_none")] pub managed_approval_required: Option, /// Whether managed settings are enabled for this session. - #[serde(default)] + #[serde(default, skip_serializing_if = "is_false")] pub managed_settings_enabled: bool, /// The full permission event params from the CLI, including the request ID /// and nested permission request. The shape varies by permission type and From a7fab6abb87bbdeab7f282654cd59fdf5a830bdc Mon Sep 17 00:00:00 2001 From: GitHub Copilot Date: Fri, 31 Jul 2026 14:43:11 +0000 Subject: [PATCH 31/41] Regenerate managed approval outputs Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- go/rpc/zrpc.go | 831 +++---- go/rpc/zrpc_encoding.go | 644 ++--- go/rpc/zsession_encoding.go | 225 +- go/rpc/zsession_events.go | 721 +++--- go/zsession_events.go | 1446 +++++------ rust/src/generated/api_types.rs | 335 +-- rust/src/generated/rpc.rs | 3336 +++++--------------------- rust/src/generated/session_events.rs | 39 +- 8 files changed, 2544 insertions(+), 5033 deletions(-) diff --git a/go/rpc/zrpc.go b/go/rpc/zrpc.go index 341eb6f617..25af6a9df6 100644 --- a/go/rpc/zrpc.go +++ b/go/rpc/zrpc.go @@ -6,10 +6,10 @@ package rpc import ( "context" "encoding/json" + "time" "errors" "fmt" "github.com/github/copilot-sdk/go/internal/jsonrpc2" - "time" ) // Parameters for aborting the current turn @@ -322,7 +322,6 @@ func (RawAgentRegistrySpawnResultData) agentRegistrySpawnResult() {} func (r RawAgentRegistrySpawnResultData) Kind() AgentRegistrySpawnResultKind { return r.Discriminator } - // `child_process.spawn` itself failed before the child entered the registry. // Experimental: AgentRegistrySpawnError is part of an experimental API and may change or be // removed. @@ -337,7 +336,6 @@ func (AgentRegistrySpawnError) agentRegistrySpawnResult() {} func (AgentRegistrySpawnError) Kind() AgentRegistrySpawnResultKind { return AgentRegistrySpawnResultKindSpawnError } - // Spawn succeeded but the child did not publish a matching managed-server entry within the // timeout. // Experimental: AgentRegistrySpawnRegistryTimeout is part of an experimental API and may @@ -353,7 +351,6 @@ func (AgentRegistrySpawnRegistryTimeout) agentRegistrySpawnResult() {} func (AgentRegistrySpawnRegistryTimeout) Kind() AgentRegistrySpawnResultKind { return AgentRegistrySpawnResultKindRegistryTimeout } - // Managed-server child was spawned and registered successfully. // Experimental: AgentRegistrySpawnSpawned is part of an experimental API and may change or // be removed. @@ -377,7 +374,6 @@ func (AgentRegistrySpawnSpawned) agentRegistrySpawnResult() {} func (AgentRegistrySpawnSpawned) Kind() AgentRegistrySpawnResultKind { return AgentRegistrySpawnResultKindSpawned } - // Synchronous pre-validation rejected the spawn request. // Experimental: AgentRegistrySpawnValidationError is part of an experimental API and may // change or be removed. @@ -484,7 +480,6 @@ func (RawAttachmentData) attachment() {} func (r RawAttachmentData) Type() AttachmentType { return r.Discriminator } - // Blob attachment with inline base64-encoded data // Experimental: AttachmentBlob is part of an experimental API and may change or be removed. type AttachmentBlob struct { @@ -509,7 +504,6 @@ func (AttachmentBlob) attachment() {} func (AttachmentBlob) Type() AttachmentType { return AttachmentTypeBlob } - // Directory attachment // Experimental: AttachmentDirectory is part of an experimental API and may change or be // removed. @@ -528,7 +522,6 @@ func (AttachmentDirectory) attachment() {} func (AttachmentDirectory) Type() AttachmentType { return AttachmentTypeDirectory } - // Structured context contributed by an extension. Composer pills displayed in the host are // forwarded back through session.send.attachments, then rendered into the model prompt as // an XML block. @@ -555,7 +548,6 @@ func (AttachmentExtensionContext) attachment() {} func (AttachmentExtensionContext) Type() AttachmentType { return AttachmentTypeExtensionContext } - // File attachment // Experimental: AttachmentFile is part of an experimental API and may change or be removed. type AttachmentFile struct { @@ -587,7 +579,6 @@ func (AttachmentFile) attachment() {} func (AttachmentFile) Type() AttachmentType { return AttachmentTypeFile } - // Pointer to a GitHub Actions job. // Experimental: AttachmentGitHubActionsJob is part of an experimental API and may change or // be removed. @@ -611,7 +602,6 @@ func (AttachmentGitHubActionsJob) attachment() {} func (AttachmentGitHubActionsJob) Type() AttachmentType { return AttachmentTypeGitHubActionsJob } - // Pointer to a GitHub commit. // Experimental: AttachmentGitHubCommit is part of an experimental API and may change or be // removed. @@ -630,7 +620,6 @@ func (AttachmentGitHubCommit) attachment() {} func (AttachmentGitHubCommit) Type() AttachmentType { return AttachmentTypeGitHubCommit } - // Pointer to a file in a GitHub repository at a specific ref. // Experimental: AttachmentGitHubFile is part of an experimental API and may change or be // removed. @@ -649,7 +638,6 @@ func (AttachmentGitHubFile) attachment() {} func (AttachmentGitHubFile) Type() AttachmentType { return AttachmentTypeGitHubFile } - // Pointer to a single-file diff. At least one of `head` and `base` must be present. // Experimental: AttachmentGitHubFileDiff is part of an experimental API and may change or // be removed. @@ -666,7 +654,6 @@ func (AttachmentGitHubFileDiff) attachment() {} func (AttachmentGitHubFileDiff) Type() AttachmentType { return AttachmentTypeGitHubFileDiff } - // GitHub issue, pull request, or discussion reference // Experimental: AttachmentGitHubReference is part of an experimental API and may change or // be removed. @@ -687,7 +674,6 @@ func (AttachmentGitHubReference) attachment() {} func (AttachmentGitHubReference) Type() AttachmentType { return AttachmentTypeGitHubReference } - // Pointer to a GitHub release. // Experimental: AttachmentGitHubRelease is part of an experimental API and may change or be // removed. @@ -706,7 +692,6 @@ func (AttachmentGitHubRelease) attachment() {} func (AttachmentGitHubRelease) Type() AttachmentType { return AttachmentTypeGitHubRelease } - // Pointer to a GitHub repository. // Experimental: AttachmentGitHubRepository is part of an experimental API and may change or // be removed. @@ -726,7 +711,6 @@ func (AttachmentGitHubRepository) attachment() {} func (AttachmentGitHubRepository) Type() AttachmentType { return AttachmentTypeGitHubRepository } - // Pointer to a line range inside a file in a GitHub repository. // Experimental: AttachmentGitHubSnippet is part of an experimental API and may change or be // removed. @@ -747,7 +731,6 @@ func (AttachmentGitHubSnippet) attachment() {} func (AttachmentGitHubSnippet) Type() AttachmentType { return AttachmentTypeGitHubSnippet } - // Pointer to a comparison between two git revisions. // Experimental: AttachmentGitHubTreeComparison is part of an experimental API and may // change or be removed. @@ -764,7 +747,6 @@ func (AttachmentGitHubTreeComparison) attachment() {} func (AttachmentGitHubTreeComparison) Type() AttachmentType { return AttachmentTypeGitHubTreeComparison } - // Generic GitHub URL reference. // Experimental: AttachmentGitHubURL is part of an experimental API and may change or be // removed. @@ -777,7 +759,6 @@ func (AttachmentGitHubURL) attachment() {} func (AttachmentGitHubURL) Type() AttachmentType { return AttachmentTypeGitHubURL } - // Code selection attachment from an editor // Experimental: AttachmentSelection is part of an experimental API and may change or be // removed. @@ -875,7 +856,6 @@ func (RawAuthInfoData) authInfo() {} func (r RawAuthInfoData) Type() AuthInfoType { return r.Discriminator } - // Authentication-info variant for API-key authentication to a non-GitHub LLM provider, // carrying the secret `apiKey` and host. // Experimental: APIKeyAuthInfo is part of an experimental API and may change or be removed. @@ -894,7 +874,6 @@ func (APIKeyAuthInfo) authInfo() {} func (APIKeyAuthInfo) Type() AuthInfoType { return AuthInfoTypeAPIKey } - // Authentication-info variant for direct Copilot API token auth sourced from environment // variables, with public GitHub host. // Experimental: CopilotAPITokenAuthInfo is part of an experimental API and may change or be @@ -912,7 +891,6 @@ func (CopilotAPITokenAuthInfo) authInfo() {} func (CopilotAPITokenAuthInfo) Type() AuthInfoType { return AuthInfoTypeCopilotAPIToken } - // Authentication-info variant for a token sourced from an environment variable, with host, // optional login, token, and env var name. // Experimental: EnvAuthInfo is part of an experimental API and may change or be removed. @@ -936,7 +914,6 @@ func (EnvAuthInfo) authInfo() {} func (EnvAuthInfo) Type() AuthInfoType { return AuthInfoTypeEnv } - // Authentication-info variant for GitHub CLI credentials, carrying host, login, and the `gh // auth token` value. // Experimental: GhCLIAuthInfo is part of an experimental API and may change or be removed. @@ -957,7 +934,6 @@ func (GhCLIAuthInfo) authInfo() {} func (GhCLIAuthInfo) Type() AuthInfoType { return AuthInfoTypeGhCLI } - // Authentication-info variant for GitHub-internal HMAC auth, carrying the public GitHub // host and HMAC secret. // Experimental: HMACAuthInfo is part of an experimental API and may change or be removed. @@ -976,7 +952,6 @@ func (HMACAuthInfo) authInfo() {} func (HMACAuthInfo) Type() AuthInfoType { return AuthInfoTypeHMAC } - // Authentication-info variant for SDK-configured token authentication, carrying host and // the secret token value. // Experimental: TokenAuthInfo is part of an experimental API and may change or be removed. @@ -995,7 +970,6 @@ func (TokenAuthInfo) authInfo() {} func (TokenAuthInfo) Type() AuthInfoType { return AuthInfoTypeToken } - // Authentication-info variant for OAuth user auth, with host and login; the token remains // in the runtime secret store. // Experimental: UserAuthInfo is part of an experimental API and may change or be removed. @@ -1537,15 +1511,15 @@ type CopilotUserResponse struct { // Experimental: CopilotUserResponseEndpoints is part of an experimental API and may change // or be removed. type CopilotUserResponseEndpoints struct { - API *string `json:"api,omitempty"` + API *string `json:"api,omitempty"` OriginTracker *string `json:"origin-tracker,omitempty"` - Proxy *string `json:"proxy,omitempty"` - Telemetry *string `json:"telemetry,omitempty"` + Proxy *string `json:"proxy,omitempty"` + Telemetry *string `json:"telemetry,omitempty"` } type CopilotUserResponseOrganizationListItem struct { Login *string `json:"login,omitempty"` - Name *string `json:"name,omitempty"` + Name *string `json:"name,omitempty"` } // Quota snapshot map from the raw Copilot user-response passthrough, with chat, @@ -1730,7 +1704,6 @@ func (RawDebugCollectLogsDestinationData) debugCollectLogsDestination() {} func (r RawDebugCollectLogsDestinationData) Kind() DebugCollectLogsDestinationKind { return r.Discriminator } - type DebugCollectLogsDestinationArchive struct { // When true, create the archive atomically without overwriting an existing file by // appending ` (N)` before the extension as needed. Defaults to false. @@ -1743,7 +1716,6 @@ func (DebugCollectLogsDestinationArchive) debugCollectLogsDestination() {} func (DebugCollectLogsDestinationArchive) Kind() DebugCollectLogsDestinationKind { return DebugCollectLogsDestinationKindArchive } - type DebugCollectLogsDestinationDirectory struct { // Directory where redacted files should be staged. The directory is created if needed. OutputDirectory string `json:"outputDirectory"` @@ -1950,7 +1922,7 @@ type EventLogTailResult struct { // Either '*' to receive all event types, or a non-empty list of event types to receive // Experimental: EventLogTypes is part of an experimental API and may change or be removed. type EventLogTypes struct { - String *EventLogTypesString + String *EventLogTypesString StringArray []string } @@ -2110,7 +2082,6 @@ func (RawExternalToolTextResultForLlmContentData) externalToolTextResultForLlmCo func (r RawExternalToolTextResultForLlmContentData) Type() ExternalToolTextResultForLlmContentType { return r.Discriminator } - // Audio content block with base64-encoded data // Experimental: ExternalToolTextResultForLlmContentAudio is part of an experimental API and // may change or be removed. @@ -2125,7 +2096,6 @@ func (ExternalToolTextResultForLlmContentAudio) externalToolTextResultForLlmCont func (ExternalToolTextResultForLlmContentAudio) Type() ExternalToolTextResultForLlmContentType { return ExternalToolTextResultForLlmContentTypeAudio } - // Image content block with base64-encoded data // Experimental: ExternalToolTextResultForLlmContentImage is part of an experimental API and // may change or be removed. @@ -2140,7 +2110,6 @@ func (ExternalToolTextResultForLlmContentImage) externalToolTextResultForLlmCont func (ExternalToolTextResultForLlmContentImage) Type() ExternalToolTextResultForLlmContentType { return ExternalToolTextResultForLlmContentTypeImage } - // Embedded resource content block with inline text or binary data // Experimental: ExternalToolTextResultForLlmContentResource is part of an experimental API // and may change or be removed. @@ -2153,7 +2122,6 @@ func (ExternalToolTextResultForLlmContentResource) externalToolTextResultForLlmC func (ExternalToolTextResultForLlmContentResource) Type() ExternalToolTextResultForLlmContentType { return ExternalToolTextResultForLlmContentTypeResource } - // Resource link content block referencing an external resource // Experimental: ExternalToolTextResultForLlmContentResourceLink is part of an experimental // API and may change or be removed. @@ -2178,7 +2146,6 @@ func (ExternalToolTextResultForLlmContentResourceLink) externalToolTextResultFor func (ExternalToolTextResultForLlmContentResourceLink) Type() ExternalToolTextResultForLlmContentType { return ExternalToolTextResultForLlmContentTypeResourceLink } - // Shell command exit metadata with optional output preview // Experimental: ExternalToolTextResultForLlmContentShellExit is part of an experimental API // and may change or be removed. @@ -2200,7 +2167,6 @@ func (ExternalToolTextResultForLlmContentShellExit) externalToolTextResultForLlm func (ExternalToolTextResultForLlmContentShellExit) Type() ExternalToolTextResultForLlmContentType { return ExternalToolTextResultForLlmContentTypeShellExit } - // Terminal/shell output content block with optional exit code and working directory // Experimental: ExternalToolTextResultForLlmContentTerminal is part of an experimental API // and may change or be removed. @@ -2217,7 +2183,6 @@ func (ExternalToolTextResultForLlmContentTerminal) externalToolTextResultForLlmC func (ExternalToolTextResultForLlmContentTerminal) Type() ExternalToolTextResultForLlmContentType { return ExternalToolTextResultForLlmContentTypeTerminal } - // Plain text content block // Experimental: ExternalToolTextResultForLlmContentText is part of an experimental API and // may change or be removed. @@ -2242,9 +2207,7 @@ type RawExternalToolTextResultForLlmContentResourceDetailsData struct { Raw json.RawMessage } -func (RawExternalToolTextResultForLlmContentResourceDetailsData) externalToolTextResultForLlmContentResourceDetails() { -} - +func (RawExternalToolTextResultForLlmContentResourceDetailsData) externalToolTextResultForLlmContentResourceDetails() {} // Embedded binary resource contents identified by a URI, with an optional MIME type and a // base64-encoded blob. // Experimental: EmbeddedBlobResourceContents is part of an experimental API and may change @@ -2275,6 +2238,7 @@ type EmbeddedTextResourceContents struct { func (EmbeddedTextResourceContents) externalToolTextResultForLlmContentResourceDetails() {} + // Icon image for a resource // Experimental: ExternalToolTextResultForLlmContentResourceLinkIcon is part of an // experimental API and may change or be removed. @@ -2343,19 +2307,19 @@ type FactoryAgentResult struct { // Experimental: FactoryAgentSummary is part of an experimental API and may change or be // removed. type FactoryAgentSummary struct { - ActiveMs int64 `json:"activeMs"` - Activity *string `json:"activity,omitempty"` - AgentID string `json:"agentId"` - AgentType string `json:"agentType"` - CompletedAt *int64 `json:"completedAt,omitempty"` - Label string `json:"label"` - PhaseID *string `json:"phaseId"` + ActiveMs int64 `json:"activeMs"` + Activity *string `json:"activity,omitempty"` + AgentID string `json:"agentId"` + AgentType string `json:"agentType"` + CompletedAt *int64 `json:"completedAt,omitempty"` + Label string `json:"label"` + PhaseID *string `json:"phaseId"` RequestedModel *string `json:"requestedModel,omitempty"` - ResolvedModel *string `json:"resolvedModel,omitempty"` - RunID string `json:"runId"` - StartedAt *int64 `json:"startedAt,omitempty"` - Status string `json:"status"` - ToolCallID string `json:"toolCallId"` + ResolvedModel *string `json:"resolvedModel,omitempty"` + RunID string `json:"runId"` + StartedAt *int64 `json:"startedAt,omitempty"` + Status string `json:"status"` + ToolCallID string `json:"toolCallId"` } // Parameters for cancelling a factory run. @@ -2370,7 +2334,7 @@ type FactoryCancelRequest struct { // Experimental: FactoryCurrentPhase is part of an experimental API and may change or be // removed. type FactoryCurrentPhase struct { - ID string `json:"id"` + ID string `json:"id"` Ordinal *int64 `json:"ordinal"` } @@ -2378,10 +2342,10 @@ type FactoryCurrentPhase struct { // Experimental: FactoryDeclaredLimits is part of an experimental API and may change or be // removed. type FactoryDeclaredLimits struct { - MaxAiCredits *float64 `json:"maxAiCredits,omitempty"` - MaxConcurrentSubagents *int64 `json:"maxConcurrentSubagents,omitempty"` - MaxTotalSubagents *int64 `json:"maxTotalSubagents,omitempty"` - TimeoutSeconds *float64 `json:"timeoutSeconds,omitempty"` + MaxAiCredits *float64 `json:"maxAiCredits,omitempty"` + MaxConcurrentSubagents *int64 `json:"maxConcurrentSubagents,omitempty"` + MaxTotalSubagents *int64 `json:"maxTotalSubagents,omitempty"` + TimeoutSeconds *float64 `json:"timeoutSeconds,omitempty"` } // Parameters sent to the owning extension to execute a factory closure. @@ -2508,19 +2472,19 @@ type FactoryLogRequest struct { // Experimental: FactoryPhaseObservation is part of an experimental API and may change or be // removed. type FactoryPhaseObservation struct { - AccumulatedActiveMs int64 `json:"accumulatedActiveMs"` - CompletedAt *int64 `json:"completedAt,omitempty"` - CurrentActiveMs int64 `json:"currentActiveMs"` - Detail *string `json:"detail,omitempty"` - EntryCount int64 `json:"entryCount"` - ID string `json:"id"` - LastEnteredRunAttempt int64 `json:"lastEnteredRunAttempt"` - LiveAgentCount int64 `json:"liveAgentCount"` - Ordinal *int64 `json:"ordinal"` - StartedAt *int64 `json:"startedAt,omitempty"` - Status FactoryPhaseStatus `json:"status"` - Title string `json:"title"` - TotalAgentCount int64 `json:"totalAgentCount"` + AccumulatedActiveMs int64 `json:"accumulatedActiveMs"` + CompletedAt *int64 `json:"completedAt,omitempty"` + CurrentActiveMs int64 `json:"currentActiveMs"` + Detail *string `json:"detail,omitempty"` + EntryCount int64 `json:"entryCount"` + ID string `json:"id"` + LastEnteredRunAttempt int64 `json:"lastEnteredRunAttempt"` + LiveAgentCount int64 `json:"liveAgentCount"` + Ordinal *int64 `json:"ordinal"` + StartedAt *int64 `json:"startedAt,omitempty"` + Status FactoryPhaseStatus `json:"status"` + Title string `json:"title"` + TotalAgentCount int64 `json:"totalAgentCount"` } // One durable factory progress record. @@ -2545,11 +2509,11 @@ type FactoryProgressLine struct { // Experimental: FactoryProgressPage is part of an experimental API and may change or be // removed. type FactoryProgressPage struct { - HasMoreNewer bool `json:"hasMoreNewer"` - HasMoreOlder bool `json:"hasMoreOlder"` - NewestSeq *int64 `json:"newestSeq"` - OldestSeq *int64 `json:"oldestSeq"` - Records []FactoryProgressLine `json:"records"` + HasMoreNewer bool `json:"hasMoreNewer"` + HasMoreOlder bool `json:"hasMoreOlder"` + NewestSeq *int64 `json:"newestSeq"` + OldestSeq *int64 `json:"oldestSeq"` + Records []FactoryProgressLine `json:"records"` // Run revision reflected by this page. Revision int64 `json:"revision"` } @@ -2578,8 +2542,8 @@ type FactoryResumeResult struct { // Experimental: FactoryRunConsumed is part of an experimental API and may change or be // removed. type FactoryRunConsumed struct { - ActiveMs int64 `json:"activeMs"` - NanoAiu int64 `json:"nanoAiu"` + ActiveMs int64 `json:"activeMs"` + NanoAiu int64 `json:"nanoAiu"` Subagents int64 `json:"subagents"` } @@ -2587,28 +2551,28 @@ type FactoryRunConsumed struct { // Experimental: FactoryRunDetail is part of an experimental API and may change or be // removed. type FactoryRunDetail struct { - ActiveSegmentStartedAt *int64 `json:"activeSegmentStartedAt"` - Agents []FactoryAgentSummary `json:"agents"` - Approved *FactoryDeclaredLimits `json:"approved"` - CompletedAt *int64 `json:"completedAt"` - Consumed FactoryRunConsumed `json:"consumed"` - CreatedAt int64 `json:"createdAt"` - CurrentPhase *FactoryCurrentPhase `json:"currentPhase"` - DeclaredLimits FactoryDeclaredLimits `json:"declaredLimits"` - DeclaredPhaseCount int64 `json:"declaredPhaseCount"` - Description string `json:"description"` - FactoryName string `json:"factoryName"` - LiveAgentCount int64 `json:"liveAgentCount"` - ObservedAt int64 `json:"observedAt"` - Phases []FactoryPhaseObservation `json:"phases"` - Progress FactoryProgressPage `json:"progress"` - Revision int64 `json:"revision"` - RunID string `json:"runId"` - StartedAt *int64 `json:"startedAt"` - Status FactoryRunStatus `json:"status"` - Terminal *FactoryRunTerminal `json:"terminal"` - TotalSpawnedAgentCount int64 `json:"totalSpawnedAgentCount"` - UpdatedAt int64 `json:"updatedAt"` + ActiveSegmentStartedAt *int64 `json:"activeSegmentStartedAt"` + Agents []FactoryAgentSummary `json:"agents"` + Approved *FactoryDeclaredLimits `json:"approved"` + CompletedAt *int64 `json:"completedAt"` + Consumed FactoryRunConsumed `json:"consumed"` + CreatedAt int64 `json:"createdAt"` + CurrentPhase *FactoryCurrentPhase `json:"currentPhase"` + DeclaredLimits FactoryDeclaredLimits `json:"declaredLimits"` + DeclaredPhaseCount int64 `json:"declaredPhaseCount"` + Description string `json:"description"` + FactoryName string `json:"factoryName"` + LiveAgentCount int64 `json:"liveAgentCount"` + ObservedAt int64 `json:"observedAt"` + Phases []FactoryPhaseObservation `json:"phases"` + Progress FactoryProgressPage `json:"progress"` + Revision int64 `json:"revision"` + RunID string `json:"runId"` + StartedAt *int64 `json:"startedAt"` + Status FactoryRunStatus `json:"status"` + Terminal *FactoryRunTerminal `json:"terminal"` + TotalSpawnedAgentCount int64 `json:"totalSpawnedAgentCount"` + UpdatedAt int64 `json:"updatedAt"` } // Machine-readable factory run failure. @@ -2628,7 +2592,6 @@ func (RawFactoryRunFailureData) factoryRunFailure() {} func (r RawFactoryRunFailureData) Type() FactoryRunFailureType { return r.Discriminator } - type FactoryRunFailureFactoryDurableFailure struct { // Stable failure code. Code string `json:"code"` @@ -2642,7 +2605,6 @@ func (FactoryRunFailureFactoryDurableFailure) factoryRunFailure() {} func (FactoryRunFailureFactoryDurableFailure) Type() FactoryRunFailureType { return FactoryRunFailureTypeFactoryDurableFailure } - type FactoryRunFailureFactoryLimitReached struct { // Resource ceiling that stopped the run. Kind FactoryRunFailureKind `json:"kind"` @@ -2656,7 +2618,6 @@ func (FactoryRunFailureFactoryLimitReached) factoryRunFailure() {} func (FactoryRunFailureFactoryLimitReached) Type() FactoryRunFailureType { return FactoryRunFailureTypeFactoryLimitReached } - type FactoryRunFailureFactoryResumeDeclined struct { // Human-readable reason the resume did not proceed. Reason string `json:"reason"` @@ -2722,35 +2683,35 @@ type FactoryRunResult struct { // Experimental: FactoryRunSummary is part of an experimental API and may change or be // removed. type FactoryRunSummary struct { - ActiveSegmentStartedAt *int64 `json:"activeSegmentStartedAt"` - Approved *FactoryDeclaredLimits `json:"approved"` - CompletedAt *int64 `json:"completedAt"` - Consumed FactoryRunConsumed `json:"consumed"` - CreatedAt int64 `json:"createdAt"` - CurrentPhase *FactoryCurrentPhase `json:"currentPhase"` - DeclaredLimits FactoryDeclaredLimits `json:"declaredLimits"` - DeclaredPhaseCount int64 `json:"declaredPhaseCount"` - Description string `json:"description"` - FactoryName string `json:"factoryName"` - LiveAgentCount int64 `json:"liveAgentCount"` - ObservedAt int64 `json:"observedAt"` - Revision int64 `json:"revision"` - RunID string `json:"runId"` - StartedAt *int64 `json:"startedAt"` - Status FactoryRunStatus `json:"status"` - Terminal *FactoryRunTerminal `json:"terminal"` - TotalSpawnedAgentCount int64 `json:"totalSpawnedAgentCount"` - UpdatedAt int64 `json:"updatedAt"` + ActiveSegmentStartedAt *int64 `json:"activeSegmentStartedAt"` + Approved *FactoryDeclaredLimits `json:"approved"` + CompletedAt *int64 `json:"completedAt"` + Consumed FactoryRunConsumed `json:"consumed"` + CreatedAt int64 `json:"createdAt"` + CurrentPhase *FactoryCurrentPhase `json:"currentPhase"` + DeclaredLimits FactoryDeclaredLimits `json:"declaredLimits"` + DeclaredPhaseCount int64 `json:"declaredPhaseCount"` + Description string `json:"description"` + FactoryName string `json:"factoryName"` + LiveAgentCount int64 `json:"liveAgentCount"` + ObservedAt int64 `json:"observedAt"` + Revision int64 `json:"revision"` + RunID string `json:"runId"` + StartedAt *int64 `json:"startedAt"` + Status FactoryRunStatus `json:"status"` + Terminal *FactoryRunTerminal `json:"terminal"` + TotalSpawnedAgentCount int64 `json:"totalSpawnedAgentCount"` + UpdatedAt int64 `json:"updatedAt"` } // Prompt-safe terminal factory outcome. // Experimental: FactoryRunTerminal is part of an experimental API and may change or be // removed. type FactoryRunTerminal struct { - Error *string `json:"error,omitempty"` - Failure FactoryRunFailure `json:"failure,omitempty"` - Reason *string `json:"reason,omitempty"` - ResultPreview *string `json:"resultPreview,omitempty"` + Error *string `json:"error,omitempty"` + Failure FactoryRunFailure `json:"failure,omitempty"` + Reason *string `json:"reason,omitempty"` + ResultPreview *string `json:"resultPreview,omitempty"` } // Content filtering mode to apply to all tools, or a map of tool name to content filtering @@ -3159,9 +3120,9 @@ type HistoryTruncateResult struct { type HookInvokeRequest struct { // Internal: HookType is part of the SDK's internal API surface and is not intended for // external use. - HookType HookType `json:"hookType"` - Input any `json:"input"` - SessionID string `json:"sessionId"` + HookType HookType `json:"hookType"` + Input any `json:"input"` + SessionID string `json:"sessionId"` } // Optional output returned by an SDK callback hook. @@ -3216,9 +3177,9 @@ type InstalledPluginInfo struct { // removed. type InstalledPluginSource struct { InstalledPluginSourceGitHub *InstalledPluginSourceGitHub - InstalledPluginSourceLocal *InstalledPluginSourceLocal - InstalledPluginSourceURL *InstalledPluginSourceURL - String *string + InstalledPluginSourceLocal *InstalledPluginSourceLocal + InstalledPluginSourceURL *InstalledPluginSourceURL + String *string } // Source descriptor for a direct GitHub plugin install, with `owner/repo`, optional ref or @@ -3227,8 +3188,8 @@ type InstalledPluginSource struct { // or be removed. type InstalledPluginSourceGitHub struct { Path *string `json:"path,omitempty"` - Ref *string `json:"ref,omitempty"` - Repo string `json:"repo"` + Ref *string `json:"ref,omitempty"` + Repo string `json:"repo"` // Optional full 40-character hexadecimal commit SHA. Sha *string `json:"sha,omitempty"` // Constant value. Always "github". @@ -3250,12 +3211,12 @@ type InstalledPluginSourceLocal struct { // be removed. type InstalledPluginSourceURL struct { Path *string `json:"path,omitempty"` - Ref *string `json:"ref,omitempty"` + Ref *string `json:"ref,omitempty"` // Optional full 40-character hexadecimal commit SHA. Sha *string `json:"sha,omitempty"` // Constant value. Always "url". Source InstalledPluginSourceURLSource `json:"source"` - URL string `json:"url"` + URL string `json:"url"` } // Canonical file or directory where custom instructions can be discovered or created, with @@ -3424,8 +3385,8 @@ type LlmInferenceHTTPRequestStartRequest struct { // covers auxiliary calls that have no model call id). Otherwise, first-party CAPI requests // fall back to the runtime's agent task id — the same value the runtime emits as the // `X-Agent-Task-Id` header — while custom-provider requests fall back to the model call id. - AgentInvocationID *string `json:"agentInvocationId,omitempty"` - Headers map[string][]string `json:"headers"` + AgentInvocationID *string `json:"agentInvocationId,omitempty"` + Headers map[string][]string `json:"headers"` // Coarse classification of the interaction that produced this request. Open string for // forward-compatibility; known values include `conversation-agent`, // `conversation-subagent`, `conversation-sampling`, `conversation-background`, @@ -4083,29 +4044,24 @@ type RawMCPHeadersHandlePendingHeadersRefreshRequestData struct { Raw json.RawMessage } -func (RawMCPHeadersHandlePendingHeadersRefreshRequestData) mcpHeadersHandlePendingHeadersRefreshRequest() { -} +func (RawMCPHeadersHandlePendingHeadersRefreshRequestData) mcpHeadersHandlePendingHeadersRefreshRequest() {} func (r RawMCPHeadersHandlePendingHeadersRefreshRequestData) Kind() MCPHeadersHandlePendingHeadersRefreshRequestKind { return r.Discriminator } - type MCPHeadersHandlePendingHeadersRefreshRequestHeaders struct { // Headers to overlay onto the MCP request. Dynamic headers override static config headers // but do not replace SDK-managed request headers. Headers map[string]string `json:"headers"` } -func (MCPHeadersHandlePendingHeadersRefreshRequestHeaders) mcpHeadersHandlePendingHeadersRefreshRequest() { -} +func (MCPHeadersHandlePendingHeadersRefreshRequestHeaders) mcpHeadersHandlePendingHeadersRefreshRequest() {} func (MCPHeadersHandlePendingHeadersRefreshRequestHeaders) Kind() MCPHeadersHandlePendingHeadersRefreshRequestKind { return MCPHeadersHandlePendingHeadersRefreshRequestKindHeaders } - type MCPHeadersHandlePendingHeadersRefreshRequestNone struct { } -func (MCPHeadersHandlePendingHeadersRefreshRequestNone) mcpHeadersHandlePendingHeadersRefreshRequest() { -} +func (MCPHeadersHandlePendingHeadersRefreshRequestNone) mcpHeadersHandlePendingHeadersRefreshRequest() {} func (MCPHeadersHandlePendingHeadersRefreshRequestNone) Kind() MCPHeadersHandlePendingHeadersRefreshRequestKind { return MCPHeadersHandlePendingHeadersRefreshRequestKindNone } @@ -4266,7 +4222,6 @@ func (RawMCPOauthPendingRequestResponseData) mcpOauthPendingRequestResponse() {} func (r RawMCPOauthPendingRequestResponseData) Kind() MCPOauthPendingRequestResponseKind { return r.Discriminator } - type MCPOauthPendingRequestResponseCancelled struct { } @@ -4274,7 +4229,6 @@ func (MCPOauthPendingRequestResponseCancelled) mcpOauthPendingRequestResponse() func (MCPOauthPendingRequestResponseCancelled) Kind() MCPOauthPendingRequestResponseKind { return MCPOauthPendingRequestResponseKindCancelled } - type MCPOauthPendingRequestResponseToken struct { // Access token acquired by the SDK host AccessToken string `json:"accessToken"` @@ -4586,7 +4540,6 @@ type RawMCPServerConfigData struct { } func (RawMCPServerConfigData) mcpServerConfig() {} - // Remote MCP server configuration accessed over HTTP or SSE. // Experimental: MCPServerConfigHTTP is part of an experimental API and may change or be // removed. @@ -4663,6 +4616,7 @@ type MCPServerConfigStdio struct { func (MCPServerConfigStdio) mcpServerConfig() {} + // Recorded MCP server connection failure. // Experimental: MCPServerFailureInfo is part of an experimental API and may change or be // removed. @@ -5346,8 +5300,8 @@ type OpenCanvasInstance struct { // Experimental: OptionsUpdateAdditionalContentExclusionPolicy is part of an experimental // API and may change or be removed. type OptionsUpdateAdditionalContentExclusionPolicy struct { - LastUpdatedAt any `json:"last_updated_at"` - Rules []OptionsUpdateAdditionalContentExclusionPolicyRule `json:"rules"` + LastUpdatedAt any `json:"last_updated_at"` + Rules []OptionsUpdateAdditionalContentExclusionPolicyRule `json:"rules"` // Allowed values for the `OptionsUpdateAdditionalContentExclusionPolicyScope` enumeration. Scope OptionsUpdateAdditionalContentExclusionPolicyScope `json:"scope"` } @@ -5357,9 +5311,9 @@ type OptionsUpdateAdditionalContentExclusionPolicy struct { // Experimental: OptionsUpdateAdditionalContentExclusionPolicyRule is part of an // experimental API and may change or be removed. type OptionsUpdateAdditionalContentExclusionPolicyRule struct { - IfAnyMatch []string `json:"ifAnyMatch,omitzero"` + IfAnyMatch []string `json:"ifAnyMatch,omitzero"` IfNoneMatch []string `json:"ifNoneMatch,omitzero"` - Paths []string `json:"paths"` + Paths []string `json:"paths"` // Source descriptor for a `session.options.update` content-exclusion rule, with source name // and type. Source OptionsUpdateAdditionalContentExclusionPolicyRuleSource `json:"source"` @@ -5414,7 +5368,6 @@ func (RawPermissionDecisionData) permissionDecision() {} func (r RawPermissionDecisionData) Kind() PermissionDecisionKind { return r.Discriminator } - // Permission-decision variant indicating the request was approved. // Experimental: PermissionDecisionApproved is part of an experimental API and may change or // be removed. @@ -5425,7 +5378,6 @@ func (PermissionDecisionApproved) permissionDecision() {} func (PermissionDecisionApproved) Kind() PermissionDecisionKind { return PermissionDecisionKindApproved } - // Permission-decision variant indicating approval was persisted for a project location, // with approval details and location key. // Experimental: PermissionDecisionApprovedForLocation is part of an experimental API and @@ -5441,7 +5393,6 @@ func (PermissionDecisionApprovedForLocation) permissionDecision() {} func (PermissionDecisionApprovedForLocation) Kind() PermissionDecisionKind { return PermissionDecisionKindApprovedForLocation } - // Permission-decision variant indicating approval was remembered for the session, with // approval details. // Experimental: PermissionDecisionApprovedForSession is part of an experimental API and may @@ -5455,7 +5406,6 @@ func (PermissionDecisionApprovedForSession) permissionDecision() {} func (PermissionDecisionApprovedForSession) Kind() PermissionDecisionKind { return PermissionDecisionKindApprovedForSession } - // Permission-decision request variant to approve and persist a permission for a project // location, with approval details and location key. // Experimental: PermissionDecisionApproveForLocation is part of an experimental API and may @@ -5471,7 +5421,6 @@ func (PermissionDecisionApproveForLocation) permissionDecision() {} func (PermissionDecisionApproveForLocation) Kind() PermissionDecisionKind { return PermissionDecisionKindApproveForLocation } - // Permission-decision request variant to approve for the rest of the session, with optional // tool approval or URL domain. // Experimental: PermissionDecisionApproveForSession is part of an experimental API and may @@ -5487,7 +5436,6 @@ func (PermissionDecisionApproveForSession) permissionDecision() {} func (PermissionDecisionApproveForSession) Kind() PermissionDecisionKind { return PermissionDecisionKindApproveForSession } - // Permission-decision request variant to approve only the current permission request. // Experimental: PermissionDecisionApproveOnce is part of an experimental API and may change // or be removed. @@ -5500,7 +5448,6 @@ func (PermissionDecisionApproveOnce) permissionDecision() {} func (PermissionDecisionApproveOnce) Kind() PermissionDecisionKind { return PermissionDecisionKindApproveOnce } - // Permission-decision request variant to permanently approve a URL domain across sessions. // Experimental: PermissionDecisionApprovePermanently is part of an experimental API and may // change or be removed. @@ -5513,7 +5460,6 @@ func (PermissionDecisionApprovePermanently) permissionDecision() {} func (PermissionDecisionApprovePermanently) Kind() PermissionDecisionKind { return PermissionDecisionKindApprovePermanently } - // Permission-decision variant indicating the request was cancelled before use, with an // optional reason. // Experimental: PermissionDecisionCancelled is part of an experimental API and may change @@ -5527,7 +5473,6 @@ func (PermissionDecisionCancelled) permissionDecision() {} func (PermissionDecisionCancelled) Kind() PermissionDecisionKind { return PermissionDecisionKindCancelled } - // Permission-decision variant indicating denial by content-exclusion policy, with path and // message. // Experimental: PermissionDecisionDeniedByContentExclusionPolicy is part of an experimental @@ -5543,7 +5488,6 @@ func (PermissionDecisionDeniedByContentExclusionPolicy) permissionDecision() {} func (PermissionDecisionDeniedByContentExclusionPolicy) Kind() PermissionDecisionKind { return PermissionDecisionKindDeniedByContentExclusionPolicy } - // Permission-decision variant indicating denial by a permission request hook, with optional // message and interrupt flag. // Experimental: PermissionDecisionDeniedByPermissionRequestHook is part of an experimental @@ -5559,7 +5503,6 @@ func (PermissionDecisionDeniedByPermissionRequestHook) permissionDecision() {} func (PermissionDecisionDeniedByPermissionRequestHook) Kind() PermissionDecisionKind { return PermissionDecisionKindDeniedByPermissionRequestHook } - // Permission-decision variant indicating explicit denial by permission rules, with the // matching rules. // Experimental: PermissionDecisionDeniedByRules is part of an experimental API and may @@ -5573,7 +5516,6 @@ func (PermissionDecisionDeniedByRules) permissionDecision() {} func (PermissionDecisionDeniedByRules) Kind() PermissionDecisionKind { return PermissionDecisionKindDeniedByRules } - // Permission-decision variant indicating the user denied an interactive prompt, with // optional feedback and force-reject flag. // Experimental: PermissionDecisionDeniedInteractivelyByUser is part of an experimental API @@ -5589,7 +5531,6 @@ func (PermissionDecisionDeniedInteractivelyByUser) permissionDecision() {} func (PermissionDecisionDeniedInteractivelyByUser) Kind() PermissionDecisionKind { return PermissionDecisionKindDeniedInteractivelyByUser } - // Permission-decision variant indicating no approval rule matched and user confirmation was // unavailable. // Experimental: PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser is part of @@ -5601,7 +5542,6 @@ func (PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser) permissi func (PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser) Kind() PermissionDecisionKind { return PermissionDecisionKindDeniedNoApprovalRuleAndCouldNotRequestFromUser } - // Permission-decision request variant to reject a pending permission request, with optional // feedback. // Experimental: PermissionDecisionReject is part of an experimental API and may change or @@ -5615,7 +5555,6 @@ func (PermissionDecisionReject) permissionDecision() {} func (PermissionDecisionReject) Kind() PermissionDecisionKind { return PermissionDecisionKindReject } - // Permission-decision variant indicating no user was available to confirm the request. // Experimental: PermissionDecisionUserNotAvailable is part of an experimental API and may // change or be removed. @@ -5640,12 +5579,10 @@ type RawPermissionDecisionApproveForLocationApprovalData struct { Raw json.RawMessage } -func (RawPermissionDecisionApproveForLocationApprovalData) permissionDecisionApproveForLocationApproval() { -} +func (RawPermissionDecisionApproveForLocationApprovalData) permissionDecisionApproveForLocationApproval() {} func (r RawPermissionDecisionApproveForLocationApprovalData) Kind() PermissionDecisionApproveForLocationApprovalKind { return r.Discriminator } - // Location-scoped approval details for specific command identifiers. // Experimental: PermissionDecisionApproveForLocationApprovalCommands is part of an // experimental API and may change or be removed. @@ -5654,12 +5591,10 @@ type PermissionDecisionApproveForLocationApprovalCommands struct { CommandIdentifiers []string `json:"commandIdentifiers"` } -func (PermissionDecisionApproveForLocationApprovalCommands) permissionDecisionApproveForLocationApproval() { -} +func (PermissionDecisionApproveForLocationApprovalCommands) permissionDecisionApproveForLocationApproval() {} func (PermissionDecisionApproveForLocationApprovalCommands) Kind() PermissionDecisionApproveForLocationApprovalKind { return PermissionDecisionApproveForLocationApprovalKindCommands } - // Location-scoped approval details for a custom tool, keyed by tool name. // Experimental: PermissionDecisionApproveForLocationApprovalCustomTool is part of an // experimental API and may change or be removed. @@ -5668,12 +5603,10 @@ type PermissionDecisionApproveForLocationApprovalCustomTool struct { ToolName string `json:"toolName"` } -func (PermissionDecisionApproveForLocationApprovalCustomTool) permissionDecisionApproveForLocationApproval() { -} +func (PermissionDecisionApproveForLocationApprovalCustomTool) permissionDecisionApproveForLocationApproval() {} func (PermissionDecisionApproveForLocationApprovalCustomTool) Kind() PermissionDecisionApproveForLocationApprovalKind { return PermissionDecisionApproveForLocationApprovalKindCustomTool } - // Location-scoped approval details for extension-management operations, optionally narrowed // by operation. // Experimental: PermissionDecisionApproveForLocationApprovalExtensionManagement is part of @@ -5684,12 +5617,10 @@ type PermissionDecisionApproveForLocationApprovalExtensionManagement struct { Operation *string `json:"operation,omitempty"` } -func (PermissionDecisionApproveForLocationApprovalExtensionManagement) permissionDecisionApproveForLocationApproval() { -} +func (PermissionDecisionApproveForLocationApprovalExtensionManagement) permissionDecisionApproveForLocationApproval() {} func (PermissionDecisionApproveForLocationApprovalExtensionManagement) Kind() PermissionDecisionApproveForLocationApprovalKind { return PermissionDecisionApproveForLocationApprovalKindExtensionManagement } - // Location-scoped approval details for an extension's permission-gated capability access, // keyed by extension name. // Experimental: PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess is @@ -5699,12 +5630,10 @@ type PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess struc ExtensionName string `json:"extensionName"` } -func (PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess) permissionDecisionApproveForLocationApproval() { -} +func (PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess) permissionDecisionApproveForLocationApproval() {} func (PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess) Kind() PermissionDecisionApproveForLocationApprovalKind { return PermissionDecisionApproveForLocationApprovalKindExtensionPermissionAccess } - // Location-scoped approval details for an MCP server tool, or all tools on the server when // `toolName` is null. // Experimental: PermissionDecisionApproveForLocationApprovalMCP is part of an experimental @@ -5716,12 +5645,10 @@ type PermissionDecisionApproveForLocationApprovalMCP struct { ToolName *string `json:"toolName"` } -func (PermissionDecisionApproveForLocationApprovalMCP) permissionDecisionApproveForLocationApproval() { -} +func (PermissionDecisionApproveForLocationApprovalMCP) permissionDecisionApproveForLocationApproval() {} func (PermissionDecisionApproveForLocationApprovalMCP) Kind() PermissionDecisionApproveForLocationApprovalKind { return PermissionDecisionApproveForLocationApprovalKindMCP } - // Location-scoped approval details for MCP sampling requests from a server. // Experimental: PermissionDecisionApproveForLocationApprovalMCPSampling is part of an // experimental API and may change or be removed. @@ -5730,44 +5657,37 @@ type PermissionDecisionApproveForLocationApprovalMCPSampling struct { ServerName string `json:"serverName"` } -func (PermissionDecisionApproveForLocationApprovalMCPSampling) permissionDecisionApproveForLocationApproval() { -} +func (PermissionDecisionApproveForLocationApprovalMCPSampling) permissionDecisionApproveForLocationApproval() {} func (PermissionDecisionApproveForLocationApprovalMCPSampling) Kind() PermissionDecisionApproveForLocationApprovalKind { return PermissionDecisionApproveForLocationApprovalKindMCPSampling } - // Location-scoped approval details for writes to long-term memory. // Experimental: PermissionDecisionApproveForLocationApprovalMemory is part of an // experimental API and may change or be removed. type PermissionDecisionApproveForLocationApprovalMemory struct { } -func (PermissionDecisionApproveForLocationApprovalMemory) permissionDecisionApproveForLocationApproval() { -} +func (PermissionDecisionApproveForLocationApprovalMemory) permissionDecisionApproveForLocationApproval() {} func (PermissionDecisionApproveForLocationApprovalMemory) Kind() PermissionDecisionApproveForLocationApprovalKind { return PermissionDecisionApproveForLocationApprovalKindMemory } - // Location-scoped approval details for read-only filesystem operations. // Experimental: PermissionDecisionApproveForLocationApprovalRead is part of an experimental // API and may change or be removed. type PermissionDecisionApproveForLocationApprovalRead struct { } -func (PermissionDecisionApproveForLocationApprovalRead) permissionDecisionApproveForLocationApproval() { -} +func (PermissionDecisionApproveForLocationApprovalRead) permissionDecisionApproveForLocationApproval() {} func (PermissionDecisionApproveForLocationApprovalRead) Kind() PermissionDecisionApproveForLocationApprovalKind { return PermissionDecisionApproveForLocationApprovalKindRead } - // Location-scoped approval details for filesystem write operations. // Experimental: PermissionDecisionApproveForLocationApprovalWrite is part of an // experimental API and may change or be removed. type PermissionDecisionApproveForLocationApprovalWrite struct { } -func (PermissionDecisionApproveForLocationApprovalWrite) permissionDecisionApproveForLocationApproval() { -} +func (PermissionDecisionApproveForLocationApprovalWrite) permissionDecisionApproveForLocationApproval() {} func (PermissionDecisionApproveForLocationApprovalWrite) Kind() PermissionDecisionApproveForLocationApprovalKind { return PermissionDecisionApproveForLocationApprovalKindWrite } @@ -5785,12 +5705,10 @@ type RawPermissionDecisionApproveForSessionApprovalData struct { Raw json.RawMessage } -func (RawPermissionDecisionApproveForSessionApprovalData) permissionDecisionApproveForSessionApproval() { -} +func (RawPermissionDecisionApproveForSessionApprovalData) permissionDecisionApproveForSessionApproval() {} func (r RawPermissionDecisionApproveForSessionApprovalData) Kind() PermissionDecisionApproveForSessionApprovalKind { return r.Discriminator } - // Session-scoped approval details for specific command identifiers. // Experimental: PermissionDecisionApproveForSessionApprovalCommands is part of an // experimental API and may change or be removed. @@ -5799,12 +5717,10 @@ type PermissionDecisionApproveForSessionApprovalCommands struct { CommandIdentifiers []string `json:"commandIdentifiers"` } -func (PermissionDecisionApproveForSessionApprovalCommands) permissionDecisionApproveForSessionApproval() { -} +func (PermissionDecisionApproveForSessionApprovalCommands) permissionDecisionApproveForSessionApproval() {} func (PermissionDecisionApproveForSessionApprovalCommands) Kind() PermissionDecisionApproveForSessionApprovalKind { return PermissionDecisionApproveForSessionApprovalKindCommands } - // Session-scoped approval details for a custom tool, keyed by tool name. // Experimental: PermissionDecisionApproveForSessionApprovalCustomTool is part of an // experimental API and may change or be removed. @@ -5813,12 +5729,10 @@ type PermissionDecisionApproveForSessionApprovalCustomTool struct { ToolName string `json:"toolName"` } -func (PermissionDecisionApproveForSessionApprovalCustomTool) permissionDecisionApproveForSessionApproval() { -} +func (PermissionDecisionApproveForSessionApprovalCustomTool) permissionDecisionApproveForSessionApproval() {} func (PermissionDecisionApproveForSessionApprovalCustomTool) Kind() PermissionDecisionApproveForSessionApprovalKind { return PermissionDecisionApproveForSessionApprovalKindCustomTool } - // Session-scoped approval details for extension-management operations, optionally narrowed // by operation. // Experimental: PermissionDecisionApproveForSessionApprovalExtensionManagement is part of @@ -5829,12 +5743,10 @@ type PermissionDecisionApproveForSessionApprovalExtensionManagement struct { Operation *string `json:"operation,omitempty"` } -func (PermissionDecisionApproveForSessionApprovalExtensionManagement) permissionDecisionApproveForSessionApproval() { -} +func (PermissionDecisionApproveForSessionApprovalExtensionManagement) permissionDecisionApproveForSessionApproval() {} func (PermissionDecisionApproveForSessionApprovalExtensionManagement) Kind() PermissionDecisionApproveForSessionApprovalKind { return PermissionDecisionApproveForSessionApprovalKindExtensionManagement } - // Session-scoped approval details for an extension's permission-gated capability access, // keyed by extension name. // Experimental: PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess is @@ -5844,12 +5756,10 @@ type PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess struct ExtensionName string `json:"extensionName"` } -func (PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess) permissionDecisionApproveForSessionApproval() { -} +func (PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess) permissionDecisionApproveForSessionApproval() {} func (PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess) Kind() PermissionDecisionApproveForSessionApprovalKind { return PermissionDecisionApproveForSessionApprovalKindExtensionPermissionAccess } - // Session-scoped approval details for an MCP server tool, or all tools on the server when // `toolName` is null. // Experimental: PermissionDecisionApproveForSessionApprovalMCP is part of an experimental @@ -5865,7 +5775,6 @@ func (PermissionDecisionApproveForSessionApprovalMCP) permissionDecisionApproveF func (PermissionDecisionApproveForSessionApprovalMCP) Kind() PermissionDecisionApproveForSessionApprovalKind { return PermissionDecisionApproveForSessionApprovalKindMCP } - // Session-scoped approval details for MCP sampling requests from a server. // Experimental: PermissionDecisionApproveForSessionApprovalMCPSampling is part of an // experimental API and may change or be removed. @@ -5874,44 +5783,37 @@ type PermissionDecisionApproveForSessionApprovalMCPSampling struct { ServerName string `json:"serverName"` } -func (PermissionDecisionApproveForSessionApprovalMCPSampling) permissionDecisionApproveForSessionApproval() { -} +func (PermissionDecisionApproveForSessionApprovalMCPSampling) permissionDecisionApproveForSessionApproval() {} func (PermissionDecisionApproveForSessionApprovalMCPSampling) Kind() PermissionDecisionApproveForSessionApprovalKind { return PermissionDecisionApproveForSessionApprovalKindMCPSampling } - // Session-scoped approval details for writes to long-term memory. // Experimental: PermissionDecisionApproveForSessionApprovalMemory is part of an // experimental API and may change or be removed. type PermissionDecisionApproveForSessionApprovalMemory struct { } -func (PermissionDecisionApproveForSessionApprovalMemory) permissionDecisionApproveForSessionApproval() { -} +func (PermissionDecisionApproveForSessionApprovalMemory) permissionDecisionApproveForSessionApproval() {} func (PermissionDecisionApproveForSessionApprovalMemory) Kind() PermissionDecisionApproveForSessionApprovalKind { return PermissionDecisionApproveForSessionApprovalKindMemory } - // Session-scoped approval details for read-only filesystem operations. // Experimental: PermissionDecisionApproveForSessionApprovalRead is part of an experimental // API and may change or be removed. type PermissionDecisionApproveForSessionApprovalRead struct { } -func (PermissionDecisionApproveForSessionApprovalRead) permissionDecisionApproveForSessionApproval() { -} +func (PermissionDecisionApproveForSessionApprovalRead) permissionDecisionApproveForSessionApproval() {} func (PermissionDecisionApproveForSessionApprovalRead) Kind() PermissionDecisionApproveForSessionApprovalKind { return PermissionDecisionApproveForSessionApprovalKindRead } - // Session-scoped approval details for filesystem write operations. // Experimental: PermissionDecisionApproveForSessionApprovalWrite is part of an experimental // API and may change or be removed. type PermissionDecisionApproveForSessionApprovalWrite struct { } -func (PermissionDecisionApproveForSessionApprovalWrite) permissionDecisionApproveForSessionApproval() { -} +func (PermissionDecisionApproveForSessionApprovalWrite) permissionDecisionApproveForSessionApproval() {} func (PermissionDecisionApproveForSessionApprovalWrite) Kind() PermissionDecisionApproveForSessionApprovalKind { return PermissionDecisionApproveForSessionApprovalKindWrite } @@ -6107,8 +6009,8 @@ type PermissionRulesSet struct { // Experimental: PermissionsConfigureAdditionalContentExclusionPolicy is part of an // experimental API and may change or be removed. type PermissionsConfigureAdditionalContentExclusionPolicy struct { - LastUpdatedAt any `json:"last_updated_at"` - Rules []PermissionsConfigureAdditionalContentExclusionPolicyRule `json:"rules"` + LastUpdatedAt any `json:"last_updated_at"` + Rules []PermissionsConfigureAdditionalContentExclusionPolicyRule `json:"rules"` // Allowed values for the `PermissionsConfigureAdditionalContentExclusionPolicyScope` // enumeration. Scope PermissionsConfigureAdditionalContentExclusionPolicyScope `json:"scope"` @@ -6119,9 +6021,9 @@ type PermissionsConfigureAdditionalContentExclusionPolicy struct { // Experimental: PermissionsConfigureAdditionalContentExclusionPolicyRule is part of an // experimental API and may change or be removed. type PermissionsConfigureAdditionalContentExclusionPolicyRule struct { - IfAnyMatch []string `json:"ifAnyMatch,omitzero"` + IfAnyMatch []string `json:"ifAnyMatch,omitzero"` IfNoneMatch []string `json:"ifNoneMatch,omitzero"` - Paths []string `json:"paths"` + Paths []string `json:"paths"` // Source descriptor for a `session.permissions.configure` content-exclusion rule, with // source name and type. Source PermissionsConfigureAdditionalContentExclusionPolicyRuleSource `json:"source"` @@ -6198,12 +6100,10 @@ type RawPermissionsLocationsAddToolApprovalDetailsData struct { Raw json.RawMessage } -func (RawPermissionsLocationsAddToolApprovalDetailsData) permissionsLocationsAddToolApprovalDetails() { -} +func (RawPermissionsLocationsAddToolApprovalDetailsData) permissionsLocationsAddToolApprovalDetails() {} func (r RawPermissionsLocationsAddToolApprovalDetailsData) Kind() PermissionsLocationsAddToolApprovalDetailsKind { return r.Discriminator } - // Location-persisted tool approval details for specific command identifiers. // Experimental: PermissionsLocationsAddToolApprovalDetailsCommands is part of an // experimental API and may change or be removed. @@ -6212,12 +6112,10 @@ type PermissionsLocationsAddToolApprovalDetailsCommands struct { CommandIdentifiers []string `json:"commandIdentifiers"` } -func (PermissionsLocationsAddToolApprovalDetailsCommands) permissionsLocationsAddToolApprovalDetails() { -} +func (PermissionsLocationsAddToolApprovalDetailsCommands) permissionsLocationsAddToolApprovalDetails() {} func (PermissionsLocationsAddToolApprovalDetailsCommands) Kind() PermissionsLocationsAddToolApprovalDetailsKind { return PermissionsLocationsAddToolApprovalDetailsKindCommands } - // Location-persisted tool approval details for a custom tool, keyed by tool name. // Experimental: PermissionsLocationsAddToolApprovalDetailsCustomTool is part of an // experimental API and may change or be removed. @@ -6226,12 +6124,10 @@ type PermissionsLocationsAddToolApprovalDetailsCustomTool struct { ToolName string `json:"toolName"` } -func (PermissionsLocationsAddToolApprovalDetailsCustomTool) permissionsLocationsAddToolApprovalDetails() { -} +func (PermissionsLocationsAddToolApprovalDetailsCustomTool) permissionsLocationsAddToolApprovalDetails() {} func (PermissionsLocationsAddToolApprovalDetailsCustomTool) Kind() PermissionsLocationsAddToolApprovalDetailsKind { return PermissionsLocationsAddToolApprovalDetailsKindCustomTool } - // Location-persisted tool approval details for extension-management operations, optionally // narrowed by operation. // Experimental: PermissionsLocationsAddToolApprovalDetailsExtensionManagement is part of an @@ -6242,12 +6138,10 @@ type PermissionsLocationsAddToolApprovalDetailsExtensionManagement struct { Operation *string `json:"operation,omitempty"` } -func (PermissionsLocationsAddToolApprovalDetailsExtensionManagement) permissionsLocationsAddToolApprovalDetails() { -} +func (PermissionsLocationsAddToolApprovalDetailsExtensionManagement) permissionsLocationsAddToolApprovalDetails() {} func (PermissionsLocationsAddToolApprovalDetailsExtensionManagement) Kind() PermissionsLocationsAddToolApprovalDetailsKind { return PermissionsLocationsAddToolApprovalDetailsKindExtensionManagement } - // Location-persisted tool approval details for an extension's permission-gated capability // access, keyed by extension name. // Experimental: PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess is part @@ -6257,12 +6151,10 @@ type PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess struct ExtensionName string `json:"extensionName"` } -func (PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess) permissionsLocationsAddToolApprovalDetails() { -} +func (PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess) permissionsLocationsAddToolApprovalDetails() {} func (PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess) Kind() PermissionsLocationsAddToolApprovalDetailsKind { return PermissionsLocationsAddToolApprovalDetailsKindExtensionPermissionAccess } - // Location-persisted tool approval details for an MCP server tool, or all tools when // `toolName` is null. // Experimental: PermissionsLocationsAddToolApprovalDetailsMCP is part of an experimental @@ -6278,7 +6170,6 @@ func (PermissionsLocationsAddToolApprovalDetailsMCP) permissionsLocationsAddTool func (PermissionsLocationsAddToolApprovalDetailsMCP) Kind() PermissionsLocationsAddToolApprovalDetailsKind { return PermissionsLocationsAddToolApprovalDetailsKindMCP } - // Location-persisted tool approval details for MCP sampling requests from a server. // Experimental: PermissionsLocationsAddToolApprovalDetailsMCPSampling is part of an // experimental API and may change or be removed. @@ -6287,24 +6178,20 @@ type PermissionsLocationsAddToolApprovalDetailsMCPSampling struct { ServerName string `json:"serverName"` } -func (PermissionsLocationsAddToolApprovalDetailsMCPSampling) permissionsLocationsAddToolApprovalDetails() { -} +func (PermissionsLocationsAddToolApprovalDetailsMCPSampling) permissionsLocationsAddToolApprovalDetails() {} func (PermissionsLocationsAddToolApprovalDetailsMCPSampling) Kind() PermissionsLocationsAddToolApprovalDetailsKind { return PermissionsLocationsAddToolApprovalDetailsKindMCPSampling } - // Location-persisted tool approval details for writes to long-term memory. // Experimental: PermissionsLocationsAddToolApprovalDetailsMemory is part of an experimental // API and may change or be removed. type PermissionsLocationsAddToolApprovalDetailsMemory struct { } -func (PermissionsLocationsAddToolApprovalDetailsMemory) permissionsLocationsAddToolApprovalDetails() { -} +func (PermissionsLocationsAddToolApprovalDetailsMemory) permissionsLocationsAddToolApprovalDetails() {} func (PermissionsLocationsAddToolApprovalDetailsMemory) Kind() PermissionsLocationsAddToolApprovalDetailsKind { return PermissionsLocationsAddToolApprovalDetailsKindMemory } - // Location-persisted tool approval details for read-only filesystem operations. // Experimental: PermissionsLocationsAddToolApprovalDetailsRead is part of an experimental // API and may change or be removed. @@ -6315,7 +6202,6 @@ func (PermissionsLocationsAddToolApprovalDetailsRead) permissionsLocationsAddToo func (PermissionsLocationsAddToolApprovalDetailsRead) Kind() PermissionsLocationsAddToolApprovalDetailsKind { return PermissionsLocationsAddToolApprovalDetailsKindRead } - // Location-persisted tool approval details for filesystem write operations. // Experimental: PermissionsLocationsAddToolApprovalDetailsWrite is part of an experimental // API and may change or be removed. @@ -6979,7 +6865,6 @@ func (RawPushAttachmentData) pushAttachment() {} func (r RawPushAttachmentData) Type() PushAttachmentType { return r.Discriminator } - // Slim input shape for extension_context attachments; identity fields are runtime-derived. // Experimental: ExtensionContextPushInput is part of an experimental API and may change or // be removed. @@ -6994,7 +6879,6 @@ func (ExtensionContextPushInput) pushAttachment() {} func (ExtensionContextPushInput) Type() PushAttachmentType { return PushAttachmentTypeExtensionContext } - // Blob attachment with inline base64-encoded data // Experimental: PushAttachmentBlob is part of an experimental API and may change or be // removed. @@ -7011,7 +6895,6 @@ func (PushAttachmentBlob) pushAttachment() {} func (PushAttachmentBlob) Type() PushAttachmentType { return PushAttachmentTypeBlob } - // Directory attachment // Experimental: PushAttachmentDirectory is part of an experimental API and may change or be // removed. @@ -7026,7 +6909,6 @@ func (PushAttachmentDirectory) pushAttachment() {} func (PushAttachmentDirectory) Type() PushAttachmentType { return PushAttachmentTypeDirectory } - // File attachment // Experimental: PushAttachmentFile is part of an experimental API and may change or be // removed. @@ -7043,7 +6925,6 @@ func (PushAttachmentFile) pushAttachment() {} func (PushAttachmentFile) Type() PushAttachmentType { return PushAttachmentTypeFile } - // Pointer to a GitHub Actions job. // Experimental: PushAttachmentGitHubActionsJob is part of an experimental API and may // change or be removed. @@ -7067,7 +6948,6 @@ func (PushAttachmentGitHubActionsJob) pushAttachment() {} func (PushAttachmentGitHubActionsJob) Type() PushAttachmentType { return PushAttachmentTypeGitHubActionsJob } - // Pointer to a GitHub commit. // Experimental: PushAttachmentGitHubCommit is part of an experimental API and may change or // be removed. @@ -7086,7 +6966,6 @@ func (PushAttachmentGitHubCommit) pushAttachment() {} func (PushAttachmentGitHubCommit) Type() PushAttachmentType { return PushAttachmentTypeGitHubCommit } - // Pointer to a file in a GitHub repository at a specific ref. // Experimental: PushAttachmentGitHubFile is part of an experimental API and may change or // be removed. @@ -7105,7 +6984,6 @@ func (PushAttachmentGitHubFile) pushAttachment() {} func (PushAttachmentGitHubFile) Type() PushAttachmentType { return PushAttachmentTypeGitHubFile } - // Pointer to a single-file diff. At least one of `head` and `base` must be present. // Experimental: PushAttachmentGitHubFileDiff is part of an experimental API and may change // or be removed. @@ -7122,7 +7000,6 @@ func (PushAttachmentGitHubFileDiff) pushAttachment() {} func (PushAttachmentGitHubFileDiff) Type() PushAttachmentType { return PushAttachmentTypeGitHubFileDiff } - // GitHub issue, pull request, or discussion reference // Experimental: PushAttachmentGitHubReference is part of an experimental API and may change // or be removed. @@ -7143,7 +7020,6 @@ func (PushAttachmentGitHubReference) pushAttachment() {} func (PushAttachmentGitHubReference) Type() PushAttachmentType { return PushAttachmentTypeGitHubReference } - // Pointer to a GitHub release. // Experimental: PushAttachmentGitHubRelease is part of an experimental API and may change // or be removed. @@ -7162,7 +7038,6 @@ func (PushAttachmentGitHubRelease) pushAttachment() {} func (PushAttachmentGitHubRelease) Type() PushAttachmentType { return PushAttachmentTypeGitHubRelease } - // Pointer to a GitHub repository. // Experimental: PushAttachmentGitHubRepository is part of an experimental API and may // change or be removed. @@ -7182,7 +7057,6 @@ func (PushAttachmentGitHubRepository) pushAttachment() {} func (PushAttachmentGitHubRepository) Type() PushAttachmentType { return PushAttachmentTypeGitHubRepository } - // Pointer to a line range inside a file in a GitHub repository. // Experimental: PushAttachmentGitHubSnippet is part of an experimental API and may change // or be removed. @@ -7203,7 +7077,6 @@ func (PushAttachmentGitHubSnippet) pushAttachment() {} func (PushAttachmentGitHubSnippet) Type() PushAttachmentType { return PushAttachmentTypeGitHubSnippet } - // Pointer to a comparison between two git revisions. // Experimental: PushAttachmentGitHubTreeComparison is part of an experimental API and may // change or be removed. @@ -7220,7 +7093,6 @@ func (PushAttachmentGitHubTreeComparison) pushAttachment() {} func (PushAttachmentGitHubTreeComparison) Type() PushAttachmentType { return PushAttachmentTypeGitHubTreeComparison } - // Generic GitHub URL reference. // Experimental: PushAttachmentGitHubURL is part of an experimental API and may change or be // removed. @@ -7233,7 +7105,6 @@ func (PushAttachmentGitHubURL) pushAttachment() {} func (PushAttachmentGitHubURL) Type() PushAttachmentType { return PushAttachmentTypeGitHubURL } - // Code selection attachment from an editor // Experimental: PushAttachmentSelection is part of an experimental API and may change or be // removed. @@ -7373,7 +7244,6 @@ func (QueuedCommandHandled) queuedCommandResult() {} func (QueuedCommandHandled) Handled() bool { return true } - // Queued-command response indicating the host did not execute the command and the queue may // continue. // Experimental: QueuedCommandNotHandled is part of an experimental API and may change or be @@ -7617,8 +7487,8 @@ type QueueSnapshotResult struct { // removed. type QueueUpdateTextRequest struct { DisplayPrompt *string `json:"displayPrompt,omitempty"` - ID string `json:"id"` - Prompt string `json:"prompt"` + ID string `json:"id"` + Prompt string `json:"prompt"` } // Result of editing a queued message. @@ -7750,7 +7620,6 @@ func (RawRemoteControlStatusData) remoteControlStatus() {} func (r RawRemoteControlStatusData) State() RemoteControlStatusState { return r.Discriminator } - // Remote control is connected to a local session. // Experimental: RemoteControlStatusActive is part of an experimental API and may change or // be removed. @@ -7780,7 +7649,6 @@ func (RemoteControlStatusActive) remoteControlStatus() {} func (RemoteControlStatusActive) State() RemoteControlStatusState { return RemoteControlStatusStateActive } - // Remote control is in the middle of initial setup. // Experimental: RemoteControlStatusConnecting is part of an experimental API and may change // or be removed. @@ -7793,7 +7661,6 @@ func (RemoteControlStatusConnecting) remoteControlStatus() {} func (RemoteControlStatusConnecting) State() RemoteControlStatusState { return RemoteControlStatusStateConnecting } - // The last setup attempt failed. The singleton is otherwise off. // Experimental: RemoteControlStatusError is part of an experimental API and may change or // be removed. @@ -7808,7 +7675,6 @@ func (RemoteControlStatusError) remoteControlStatus() {} func (RemoteControlStatusError) State() RemoteControlStatusState { return RemoteControlStatusStateError } - // Remote control is not connected. // Experimental: RemoteControlStatusOff is part of an experimental API and may change or be // removed. @@ -8857,7 +8723,7 @@ type SessionFSSqliteQueryResult struct { // change or be removed. type SessionFSSqliteTransactionError struct { ErrorClass SessionFSSqliteTransactionErrorClass `json:"errorClass"` - Message string `json:"message"` + Message string `json:"message"` } // Statements to execute atomically. Providers apply busy handling for every call. @@ -8865,7 +8731,7 @@ type SessionFSSqliteTransactionError struct { // change or be removed. type SessionFSSqliteTransactionRequest struct { // Target session identifier - SessionID string `json:"sessionId"` + SessionID string `json:"sessionId"` Statements []SessionFSSqliteTransactionStatement `json:"statements"` } @@ -8873,8 +8739,8 @@ type SessionFSSqliteTransactionRequest struct { // Experimental: SessionFSSqliteTransactionResult is part of an experimental API and may // change or be removed. type SessionFSSqliteTransactionResult struct { - Error *SessionFSSqliteTransactionError `json:"error,omitempty"` - Results []SessionFSSqliteQueryResult `json:"results"` + Error *SessionFSSqliteTransactionError `json:"error,omitempty"` + Results []SessionFSSqliteQueryResult `json:"results"` } // One statement in an atomic SQLite transaction. @@ -8976,9 +8842,9 @@ type SessionInstalledPlugin struct { // or be removed. type SessionInstalledPluginSource struct { SessionInstalledPluginSourceGitHub *SessionInstalledPluginSourceGitHub - SessionInstalledPluginSourceLocal *SessionInstalledPluginSourceLocal - SessionInstalledPluginSourceURL *SessionInstalledPluginSourceURL - String *string + SessionInstalledPluginSourceLocal *SessionInstalledPluginSourceLocal + SessionInstalledPluginSourceURL *SessionInstalledPluginSourceURL + String *string } // Source descriptor for a direct GitHub plugin install, with `owner/repo`, optional ref or @@ -8987,8 +8853,8 @@ type SessionInstalledPluginSource struct { // change or be removed. type SessionInstalledPluginSourceGitHub struct { Path *string `json:"path,omitempty"` - Ref *string `json:"ref,omitempty"` - Repo string `json:"repo"` + Ref *string `json:"ref,omitempty"` + Repo string `json:"repo"` // Optional full 40-character hexadecimal commit SHA. Sha *string `json:"sha,omitempty"` // Constant value. Always "github". @@ -9010,12 +8876,12 @@ type SessionInstalledPluginSourceLocal struct { // change or be removed. type SessionInstalledPluginSourceURL struct { Path *string `json:"path,omitempty"` - Ref *string `json:"ref,omitempty"` + Ref *string `json:"ref,omitempty"` // Optional full 40-character hexadecimal commit SHA. Sha *string `json:"sha,omitempty"` // Constant value. Always "url". Source SessionInstalledPluginSourceURLSource `json:"source"` - URL string `json:"url"` + URL string `json:"url"` } // Baseline data provenance for a prediction. @@ -9086,7 +8952,6 @@ func (RawSessionLimitPredictionResultData) sessionLimitPredictionResult() {} func (r RawSessionLimitPredictionResultData) Kind() SessionLimitPredictionResultKind { return r.Discriminator } - type SessionLimitPredictionResultAvailable struct { // Predicted session limit details. Prediction SessionLimitPredictionDetails `json:"prediction"` @@ -9096,7 +8961,6 @@ func (SessionLimitPredictionResultAvailable) sessionLimitPredictionResult() {} func (SessionLimitPredictionResultAvailable) Kind() SessionLimitPredictionResultKind { return SessionLimitPredictionResultKindAvailable } - type SessionLimitPredictionResultUnavailable struct { // Reason no prediction is available. Reason SessionLimitPredictionUnavailableReason `json:"reason"` @@ -9112,7 +8976,7 @@ func (SessionLimitPredictionResultUnavailable) Kind() SessionLimitPredictionResu // change or be removed. type SessionLimitPredictionTierOption struct { // AI-credit cap for this tier. - Cap float64 `json:"cap"` + Cap float64 `json:"cap"` Tier SessionLimitPredictionTier `json:"tier"` } @@ -9144,7 +9008,6 @@ func (LocalSessionMetadataValue) sessionListEntry() {} func (LocalSessionMetadataValue) sessionListEntryIsRemote() bool { return false } - // Remote session metadata for the session to hand off (typically obtained from // `sessions.list` with `source: "remote"`). // Experimental: RemoteSessionMetadataValue is part of an experimental API and may change or @@ -9338,7 +9201,7 @@ type SessionModelListRequest struct { // Experimental: SessionModelPriceCategory is part of an experimental API and may change or // be removed. type SessionModelPriceCategory struct { - ID string `json:"id"` + ID string `json:"id"` PriceCategory ModelPickerPriceCategory `json:"priceCategory"` } @@ -9539,8 +9402,8 @@ type SessionOpenOptions struct { // Experimental: SessionOpenOptionsAdditionalContentExclusionPolicy is part of an // experimental API and may change or be removed. type SessionOpenOptionsAdditionalContentExclusionPolicy struct { - LastUpdatedAt any `json:"last_updated_at"` - Rules []SessionOpenOptionsAdditionalContentExclusionPolicyRule `json:"rules"` + LastUpdatedAt any `json:"last_updated_at"` + Rules []SessionOpenOptionsAdditionalContentExclusionPolicyRule `json:"rules"` // Allowed values for the `SessionOpenOptionsAdditionalContentExclusionPolicyScope` // enumeration. Scope SessionOpenOptionsAdditionalContentExclusionPolicyScope `json:"scope"` @@ -9551,9 +9414,9 @@ type SessionOpenOptionsAdditionalContentExclusionPolicy struct { // Experimental: SessionOpenOptionsAdditionalContentExclusionPolicyRule is part of an // experimental API and may change or be removed. type SessionOpenOptionsAdditionalContentExclusionPolicyRule struct { - IfAnyMatch []string `json:"ifAnyMatch,omitzero"` + IfAnyMatch []string `json:"ifAnyMatch,omitzero"` IfNoneMatch []string `json:"ifNoneMatch,omitzero"` - Paths []string `json:"paths"` + Paths []string `json:"paths"` // Source descriptor for a `sessions.open` content-exclusion rule, with source name and type. Source SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource `json:"source"` } @@ -9583,7 +9446,6 @@ func (RawSessionOpenParamsData) sessionOpenParams() {} func (r RawSessionOpenParamsData) Kind() SessionOpenParamsKind { return r.Discriminator } - // Parameters for attaching to an already-active session by ID. // Experimental: SessionsOpenAttach is part of an experimental API and may change or be // removed. @@ -9596,7 +9458,6 @@ func (SessionsOpenAttach) sessionOpenParams() {} func (SessionsOpenAttach) Kind() SessionOpenParamsKind { return SessionOpenParamsKindAttach } - // Parameters for creating a new cloud session. // Experimental: SessionsOpenCloud is part of an experimental API and may change or be // removed. @@ -9622,7 +9483,6 @@ func (SessionsOpenCloud) sessionOpenParams() {} func (SessionsOpenCloud) Kind() SessionOpenParamsKind { return SessionOpenParamsKindCloud } - // Parameters for creating a new local session. // Experimental: SessionsOpenCreate is part of an experimental API and may change or be // removed. @@ -9637,7 +9497,6 @@ func (SessionsOpenCreate) sessionOpenParams() {} func (SessionsOpenCreate) Kind() SessionOpenParamsKind { return SessionOpenParamsKindCreate } - // Parameters for fetching a remote session and handing it off to a new local session. // Experimental: SessionsOpenHandoff is part of an experimental API and may change or be // removed. @@ -9674,7 +9533,6 @@ func (SessionsOpenHandoff) sessionOpenParams() {} func (SessionsOpenHandoff) Kind() SessionOpenParamsKind { return SessionOpenParamsKindHandoff } - // Parameters for connecting to a live remote session. // Experimental: SessionsOpenRemote is part of an experimental API and may change or be // removed. @@ -9691,7 +9549,6 @@ func (SessionsOpenRemote) sessionOpenParams() {} func (SessionsOpenRemote) Kind() SessionOpenParamsKind { return SessionOpenParamsKindRemote } - // Parameters for resuming a specific local session. // Experimental: SessionsOpenResume is part of an experimental API and may change or be // removed. @@ -9710,7 +9567,6 @@ func (SessionsOpenResume) sessionOpenParams() {} func (SessionsOpenResume) Kind() SessionOpenParamsKind { return SessionOpenParamsKindResume } - // Parameters for resuming the most relevant local session. // Experimental: SessionsOpenResumeLast is part of an experimental API and may change or be // removed. @@ -9955,7 +9811,7 @@ type SessionSetCredentialsResult struct { // API and may change or be removed. type SessionSettingsBuiltInToolAvailabilitySnapshot struct { CreatePullRequest *bool `json:"createPullRequest,omitempty"` - ReportProgress *bool `json:"reportProgress,omitempty"` + ReportProgress *bool `json:"reportProgress,omitempty"` } // Named Rust-owned settings predicate to evaluate for this session. @@ -9980,25 +9836,25 @@ type SessionSettingsEvaluatePredicateResult struct { // be removed. type SessionSettingsJobSnapshot struct { BuiltInToolAvailability *SessionSettingsBuiltInToolAvailabilitySnapshot `json:"builtInToolAvailability,omitempty"` - EventType *string `json:"eventType,omitempty"` - IsTriggerJob *bool `json:"isTriggerJob,omitempty"` + EventType *string `json:"eventType,omitempty"` + IsTriggerJob *bool `json:"isTriggerJob,omitempty"` } // Redacted model routing settings for a session. // Experimental: SessionSettingsModelSnapshot is part of an experimental API and may change // or be removed. type SessionSettingsModelSnapshot struct { - CallbackURL *string `json:"callbackUrl,omitempty"` + CallbackURL *string `json:"callbackUrl,omitempty"` DefaultReasoningEffort *string `json:"defaultReasoningEffort,omitempty"` - InstanceID *string `json:"instanceId,omitempty"` - Model *string `json:"model,omitempty"` + InstanceID *string `json:"instanceId,omitempty"` + Model *string `json:"model,omitempty"` } // Online-evaluation settings safe to expose across the SDK boundary. // Experimental: SessionSettingsOnlineEvaluationSnapshot is part of an experimental API and // may change or be removed. type SessionSettingsOnlineEvaluationSnapshot struct { - DisableOnlineEvaluation *bool `json:"disableOnlineEvaluation,omitempty"` + DisableOnlineEvaluation *bool `json:"disableOnlineEvaluation,omitempty"` EnableOnlineEvaluationOutputFile *bool `json:"enableOnlineEvaluationOutputFile,omitempty"` } @@ -10006,18 +9862,18 @@ type SessionSettingsOnlineEvaluationSnapshot struct { // Experimental: SessionSettingsRepoSnapshot is part of an experimental API and may change // or be removed. type SessionSettingsRepoSnapshot struct { - Branch *string `json:"branch,omitempty"` - Commit *string `json:"commit,omitempty"` - Host *string `json:"host,omitempty"` - HostProtocol *string `json:"hostProtocol,omitempty"` - ID *float64 `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - OwnerID *float64 `json:"ownerId,omitempty"` - OwnerName *string `json:"ownerName,omitempty"` - PrCommitCount *float64 `json:"prCommitCount,omitempty"` - ReadWrite *bool `json:"readWrite,omitempty"` - SecretScanningURL *string `json:"secretScanningUrl,omitempty"` - ServerURL *string `json:"serverUrl,omitempty"` + Branch *string `json:"branch,omitempty"` + Commit *string `json:"commit,omitempty"` + Host *string `json:"host,omitempty"` + HostProtocol *string `json:"hostProtocol,omitempty"` + ID *float64 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + OwnerID *float64 `json:"ownerId,omitempty"` + OwnerName *string `json:"ownerName,omitempty"` + PrCommitCount *float64 `json:"prCommitCount,omitempty"` + ReadWrite *bool `json:"readWrite,omitempty"` + SecretScanningURL *string `json:"secretScanningUrl,omitempty"` + ServerURL *string `json:"serverUrl,omitempty"` } // Redacted, serializable view of session runtime settings for SDK boundary consumers. @@ -10025,30 +9881,30 @@ type SessionSettingsRepoSnapshot struct { // Experimental: SessionSettingsSnapshot is part of an experimental API and may change or be // removed. type SessionSettingsSnapshot struct { - ClientName *string `json:"clientName,omitempty"` - Job SessionSettingsJobSnapshot `json:"job"` - Model SessionSettingsModelSnapshot `json:"model"` + ClientName *string `json:"clientName,omitempty"` + Job SessionSettingsJobSnapshot `json:"job"` + Model SessionSettingsModelSnapshot `json:"model"` OnlineEvaluation SessionSettingsOnlineEvaluationSnapshot `json:"onlineEvaluation"` - Repo SessionSettingsRepoSnapshot `json:"repo"` - StartTimeMs *float64 `json:"startTimeMs,omitempty"` - TimeoutMs *float64 `json:"timeoutMs,omitempty"` - Validation SessionSettingsValidationSnapshot `json:"validation"` - Version *string `json:"version,omitempty"` + Repo SessionSettingsRepoSnapshot `json:"repo"` + StartTimeMs *float64 `json:"startTimeMs,omitempty"` + TimeoutMs *float64 `json:"timeoutMs,omitempty"` + Validation SessionSettingsValidationSnapshot `json:"validation"` + Version *string `json:"version,omitempty"` } // Redacted validation and memory-tool settings for a session. // Experimental: SessionSettingsValidationSnapshot is part of an experimental API and may // change or be removed. type SessionSettingsValidationSnapshot struct { - AdvisoryEnabled *bool `json:"advisoryEnabled,omitempty"` - CodeqlEnabled *bool `json:"codeqlEnabled,omitempty"` - CodeReviewEnabled *bool `json:"codeReviewEnabled,omitempty"` - CodeReviewModel *string `json:"codeReviewModel,omitempty"` - DependabotTimeout *float64 `json:"dependabotTimeout,omitempty"` - MemoryStoreEnabled *bool `json:"memoryStoreEnabled,omitempty"` - MemoryVoteEnabled *bool `json:"memoryVoteEnabled,omitempty"` - SecretScanningEnabled *bool `json:"secretScanningEnabled,omitempty"` - Timeout *float64 `json:"timeout,omitempty"` + AdvisoryEnabled *bool `json:"advisoryEnabled,omitempty"` + CodeqlEnabled *bool `json:"codeqlEnabled,omitempty"` + CodeReviewEnabled *bool `json:"codeReviewEnabled,omitempty"` + CodeReviewModel *string `json:"codeReviewModel,omitempty"` + DependabotTimeout *float64 `json:"dependabotTimeout,omitempty"` + MemoryStoreEnabled *bool `json:"memoryStoreEnabled,omitempty"` + MemoryVoteEnabled *bool `json:"memoryVoteEnabled,omitempty"` + SecretScanningEnabled *bool `json:"secretScanningEnabled,omitempty"` + Timeout *float64 `json:"timeout,omitempty"` } // UUID prefix to resolve to a unique session ID. @@ -10934,7 +10790,6 @@ func (RawSlashCommandInvocationResultData) slashCommandInvocationResult() {} func (r RawSlashCommandInvocationResultData) Kind() SlashCommandInvocationResultKind { return r.Discriminator } - // Slash-command invocation result that submits an agent prompt, with display prompt, // optional mode, optional user-facing notice, and settings-change flag. // Experimental: SlashCommandAgentPromptResult is part of an experimental API and may change @@ -10957,7 +10812,6 @@ func (SlashCommandAgentPromptResult) slashCommandInvocationResult() {} func (SlashCommandAgentPromptResult) Kind() SlashCommandInvocationResultKind { return SlashCommandInvocationResultKindAgentPrompt } - // Slash-command invocation result indicating completion, with optional message and // settings-change flag. // Experimental: SlashCommandCompletedResult is part of an experimental API and may change @@ -10974,7 +10828,6 @@ func (SlashCommandCompletedResult) slashCommandInvocationResult() {} func (SlashCommandCompletedResult) Kind() SlashCommandInvocationResultKind { return SlashCommandInvocationResultKindCompleted } - // Slash-command invocation result asking the client to present subcommand options for a // parent command. // Experimental: SlashCommandSelectSubcommandResult is part of an experimental API and may @@ -10995,7 +10848,6 @@ func (SlashCommandSelectSubcommandResult) slashCommandInvocationResult() {} func (SlashCommandSelectSubcommandResult) Kind() SlashCommandInvocationResultKind { return SlashCommandInvocationResultKindSelectSubcommand } - // Slash-command invocation result containing text output plus Markdown/ANSI rendering flags. // Experimental: SlashCommandTextResult is part of an experimental API and may change or be // removed. @@ -11072,7 +10924,6 @@ func (RawTaskInfoData) taskInfo() {} func (r RawTaskInfoData) Type() TaskInfoType { return r.Discriminator } - // Tracked background agent task metadata, including IDs, status, timing, agent type, // prompt, model, result, and latest response. // Experimental: TaskAgentInfo is part of an experimental API and may change or be removed. @@ -11122,7 +10973,6 @@ func (TaskAgentInfo) taskInfo() {} func (TaskAgentInfo) Type() TaskInfoType { return TaskInfoTypeAgent } - // Tracked shell task metadata, including ID, command, status, timing, attachment/execution // mode, log path, and PID. // Experimental: TaskShellInfo is part of an experimental API and may change or be removed. @@ -11179,7 +11029,6 @@ func (RawTaskProgressData) taskProgress() {} func (r RawTaskProgressData) Type() TaskProgressType { return r.Discriminator } - // Progress snapshot for an agent task, with recent activity lines and optional latest // intent. // Experimental: TaskAgentProgress is part of an experimental API and may change or be @@ -11195,7 +11044,6 @@ func (TaskAgentProgress) taskProgress() {} func (TaskAgentProgress) Type() TaskProgressType { return TaskProgressTypeAgent } - // Progress snapshot for a shell task, with recent stdout/stderr output and optional process // ID. // Experimental: TaskShellProgress is part of an experimental API and may change or be @@ -11553,7 +11401,6 @@ func (RawUIElicitationSchemaPropertyData) uiElicitationSchemaProperty() {} func (r RawUIElicitationSchemaPropertyData) Type() UIElicitationSchemaPropertyType { return r.Discriminator } - // Multi-select string field where each option pairs a value with a display label. // Experimental: UIElicitationArrayAnyOfField is part of an experimental API and may change // or be removed. @@ -11576,7 +11423,6 @@ func (UIElicitationArrayAnyOfField) uiElicitationSchemaProperty() {} func (UIElicitationArrayAnyOfField) Type() UIElicitationSchemaPropertyType { return UIElicitationSchemaPropertyTypeArray } - // Multi-select string field whose allowed values are defined inline. // Experimental: UIElicitationArrayEnumField is part of an experimental API and may change // or be removed. @@ -11599,7 +11445,6 @@ func (UIElicitationArrayEnumField) uiElicitationSchemaProperty() {} func (UIElicitationArrayEnumField) Type() UIElicitationSchemaPropertyType { return UIElicitationSchemaPropertyTypeArray } - // Boolean field rendered as a yes/no toggle. // Experimental: UIElicitationSchemaPropertyBoolean is part of an experimental API and may // change or be removed. @@ -11616,7 +11461,6 @@ func (UIElicitationSchemaPropertyBoolean) uiElicitationSchemaProperty() {} func (UIElicitationSchemaPropertyBoolean) Type() UIElicitationSchemaPropertyType { return UIElicitationSchemaPropertyTypeBoolean } - // Numeric field accepting either a number or an integer. // Experimental: UIElicitationSchemaPropertyNumber is part of an experimental API and may // change or be removed. @@ -11630,7 +11474,7 @@ type UIElicitationSchemaPropertyNumber struct { // Minimum allowed value (inclusive). Minimum *float64 `json:"minimum,omitempty"` // Human-readable label for the field. - Title *string `json:"title,omitempty"` + Title *string `json:"title,omitempty"` Discriminator UIElicitationSchemaPropertyNumberType `json:"type,omitempty"` } @@ -11641,7 +11485,6 @@ func (r UIElicitationSchemaPropertyNumber) Type() UIElicitationSchemaPropertyTyp } return UIElicitationSchemaPropertyType(r.Discriminator) } - // Free-text string field with optional length and format constraints. // Experimental: UIElicitationSchemaPropertyString is part of an experimental API and may // change or be removed. @@ -11664,7 +11507,6 @@ func (UIElicitationSchemaPropertyString) uiElicitationSchemaProperty() {} func (UIElicitationSchemaPropertyString) Type() UIElicitationSchemaPropertyType { return UIElicitationSchemaPropertyTypeString } - // Single-select string field whose allowed values are defined inline. // Experimental: UIElicitationStringEnumField is part of an experimental API and may change // or be removed. @@ -11685,7 +11527,6 @@ func (UIElicitationStringEnumField) uiElicitationSchemaProperty() {} func (UIElicitationStringEnumField) Type() UIElicitationSchemaPropertyType { return UIElicitationSchemaPropertyTypeString } - // Single-select string field where each option pairs a value with a display label. // Experimental: UIElicitationStringOneOfField is part of an experimental API and may change // or be removed. @@ -12100,7 +11941,6 @@ func (RawUserToolSessionApprovalData) userToolSessionApproval() {} func (r RawUserToolSessionApprovalData) Kind() UserToolSessionApprovalKind { return r.Discriminator } - // Session-scoped tool-approval rule for specific shell command identifiers. // Experimental: UserToolSessionApprovalCommands is part of an experimental API and may // change or be removed. @@ -12113,7 +11953,6 @@ func (UserToolSessionApprovalCommands) userToolSessionApproval() {} func (UserToolSessionApprovalCommands) Kind() UserToolSessionApprovalKind { return UserToolSessionApprovalKindCommands } - // Session-scoped tool-approval rule for a custom tool, keyed by tool name. // Experimental: UserToolSessionApprovalCustomTool is part of an experimental API and may // change or be removed. @@ -12126,7 +11965,6 @@ func (UserToolSessionApprovalCustomTool) userToolSessionApproval() {} func (UserToolSessionApprovalCustomTool) Kind() UserToolSessionApprovalKind { return UserToolSessionApprovalKindCustomTool } - // Session-scoped tool-approval rule for extension-management operations, optionally // narrowed by operation. // Experimental: UserToolSessionApprovalExtensionManagement is part of an experimental API @@ -12140,7 +11978,6 @@ func (UserToolSessionApprovalExtensionManagement) userToolSessionApproval() {} func (UserToolSessionApprovalExtensionManagement) Kind() UserToolSessionApprovalKind { return UserToolSessionApprovalKindExtensionManagement } - // Session-scoped tool-approval rule for an extension's permission-gated capability access, // keyed by extension name. // Experimental: UserToolSessionApprovalExtensionPermissionAccess is part of an experimental @@ -12154,7 +11991,6 @@ func (UserToolSessionApprovalExtensionPermissionAccess) userToolSessionApproval( func (UserToolSessionApprovalExtensionPermissionAccess) Kind() UserToolSessionApprovalKind { return UserToolSessionApprovalKindExtensionPermissionAccess } - // Session-scoped tool-approval rule for an MCP server tool, or all tools on the server when // `toolName` is null. // Experimental: UserToolSessionApprovalMCP is part of an experimental API and may change or @@ -12170,7 +12006,6 @@ func (UserToolSessionApprovalMCP) userToolSessionApproval() {} func (UserToolSessionApprovalMCP) Kind() UserToolSessionApprovalKind { return UserToolSessionApprovalKindMCP } - // Session-scoped tool-approval rule for writes to long-term memory. // Experimental: UserToolSessionApprovalMemory is part of an experimental API and may change // or be removed. @@ -12181,7 +12016,6 @@ func (UserToolSessionApprovalMemory) userToolSessionApproval() {} func (UserToolSessionApprovalMemory) Kind() UserToolSessionApprovalKind { return UserToolSessionApprovalKindMemory } - // Session-scoped tool-approval rule for read-only filesystem operations. // Experimental: UserToolSessionApprovalRead is part of an experimental API and may change // or be removed. @@ -12192,7 +12026,6 @@ func (UserToolSessionApprovalRead) userToolSessionApproval() {} func (UserToolSessionApprovalRead) Kind() UserToolSessionApprovalKind { return UserToolSessionApprovalKindRead } - // Session-scoped tool-approval rule for filesystem write operations. // Experimental: UserToolSessionApprovalWrite is part of an experimental API and may change // or be removed. @@ -12301,7 +12134,7 @@ type WorkspacesAddSummaryRequest struct { // Experimental: WorkspacesAddSummaryResult is part of an experimental API and may change or // be removed. type WorkspacesAddSummaryResult struct { - Summary any `json:"summary,omitempty"` + Summary any `json:"summary,omitempty"` Workspace any `json:"workspace,omitempty"` } @@ -12375,24 +12208,24 @@ type WorkspacesGetWorkspaceResult struct { } type WorkspacesGetWorkspaceResultWorkspace struct { - Branch *string `json:"branch,omitempty"` - ChronicleSyncDismissed *bool `json:"chronicle_sync_dismissed,omitempty"` - ClientName *string `json:"client_name,omitempty"` - CreatedAt *time.Time `json:"created_at,omitempty"` - Cwd *string `json:"cwd,omitempty"` - GitRoot *string `json:"git_root,omitempty"` + Branch *string `json:"branch,omitempty"` + ChronicleSyncDismissed *bool `json:"chronicle_sync_dismissed,omitempty"` + ClientName *string `json:"client_name,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + Cwd *string `json:"cwd,omitempty"` + GitRoot *string `json:"git_root,omitempty"` // Allowed values for the `WorkspacesWorkspaceDetailsHostType` enumeration. - HostType *WorkspacesWorkspaceDetailsHostType `json:"host_type,omitempty"` - ID string `json:"id"` - McLastEventID *string `json:"mc_last_event_id,omitempty"` - McSessionID *string `json:"mc_session_id,omitempty"` - McTaskID *string `json:"mc_task_id,omitempty"` - Name *string `json:"name,omitempty"` - RemoteSteerable *bool `json:"remote_steerable,omitempty"` - Repository *string `json:"repository,omitempty"` - SummaryCount *int64 `json:"summary_count,omitempty"` - UpdatedAt *time.Time `json:"updated_at,omitempty"` - UserNamed *bool `json:"user_named,omitempty"` + HostType *WorkspacesWorkspaceDetailsHostType `json:"host_type,omitempty"` + ID string `json:"id"` + McLastEventID *string `json:"mc_last_event_id,omitempty"` + McSessionID *string `json:"mc_session_id,omitempty"` + McTaskID *string `json:"mc_task_id,omitempty"` + Name *string `json:"name,omitempty"` + RemoteSteerable *bool `json:"remote_steerable,omitempty"` + Repository *string `json:"repository,omitempty"` + SummaryCount *int64 `json:"summary_count,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` + UserNamed *bool `json:"user_named,omitempty"` } // Workspace checkpoints in chronological order; empty when the workspace is not enabled. @@ -12688,8 +12521,8 @@ type AgentRegistrySpawnResultKind string const ( AgentRegistrySpawnResultKindRegistryTimeout AgentRegistrySpawnResultKind = "registry-timeout" - AgentRegistrySpawnResultKindSpawned AgentRegistrySpawnResultKind = "spawned" - AgentRegistrySpawnResultKindSpawnError AgentRegistrySpawnResultKind = "spawn-error" + AgentRegistrySpawnResultKindSpawned AgentRegistrySpawnResultKind = "spawned" + AgentRegistrySpawnResultKindSpawnError AgentRegistrySpawnResultKind = "spawn-error" AgentRegistrySpawnResultKindValidationError AgentRegistrySpawnResultKind = "validation-error" ) @@ -12751,21 +12584,21 @@ const ( type AttachmentType string const ( - AttachmentTypeBlob AttachmentType = "blob" - AttachmentTypeDirectory AttachmentType = "directory" - AttachmentTypeExtensionContext AttachmentType = "extension_context" - AttachmentTypeFile AttachmentType = "file" - AttachmentTypeGitHubActionsJob AttachmentType = "github_actions_job" - AttachmentTypeGitHubCommit AttachmentType = "github_commit" - AttachmentTypeGitHubFile AttachmentType = "github_file" - AttachmentTypeGitHubFileDiff AttachmentType = "github_file_diff" - AttachmentTypeGitHubReference AttachmentType = "github_reference" - AttachmentTypeGitHubRelease AttachmentType = "github_release" - AttachmentTypeGitHubRepository AttachmentType = "github_repository" - AttachmentTypeGitHubSnippet AttachmentType = "github_snippet" + AttachmentTypeBlob AttachmentType = "blob" + AttachmentTypeDirectory AttachmentType = "directory" + AttachmentTypeExtensionContext AttachmentType = "extension_context" + AttachmentTypeFile AttachmentType = "file" + AttachmentTypeGitHubActionsJob AttachmentType = "github_actions_job" + AttachmentTypeGitHubCommit AttachmentType = "github_commit" + AttachmentTypeGitHubFile AttachmentType = "github_file" + AttachmentTypeGitHubFileDiff AttachmentType = "github_file_diff" + AttachmentTypeGitHubReference AttachmentType = "github_reference" + AttachmentTypeGitHubRelease AttachmentType = "github_release" + AttachmentTypeGitHubRepository AttachmentType = "github_repository" + AttachmentTypeGitHubSnippet AttachmentType = "github_snippet" AttachmentTypeGitHubTreeComparison AttachmentType = "github_tree_comparison" - AttachmentTypeGitHubURL AttachmentType = "github_url" - AttachmentTypeSelection AttachmentType = "selection" + AttachmentTypeGitHubURL AttachmentType = "github_url" + AttachmentTypeSelection AttachmentType = "selection" ) // Type discriminator for AuthInfo. @@ -12773,13 +12606,13 @@ const ( type AuthInfoType string const ( - AuthInfoTypeAPIKey AuthInfoType = "api-key" + AuthInfoTypeAPIKey AuthInfoType = "api-key" AuthInfoTypeCopilotAPIToken AuthInfoType = "copilot-api-token" - AuthInfoTypeEnv AuthInfoType = "env" - AuthInfoTypeGhCLI AuthInfoType = "gh-cli" - AuthInfoTypeHMAC AuthInfoType = "hmac" - AuthInfoTypeToken AuthInfoType = "token" - AuthInfoTypeUser AuthInfoType = "user" + AuthInfoTypeEnv AuthInfoType = "env" + AuthInfoTypeGhCLI AuthInfoType = "gh-cli" + AuthInfoTypeHMAC AuthInfoType = "hmac" + AuthInfoTypeToken AuthInfoType = "token" + AuthInfoTypeUser AuthInfoType = "user" ) // Neutral SDK discriminator for the connected remote session kind. @@ -12832,7 +12665,7 @@ const ( type DebugCollectLogsDestinationKind string const ( - DebugCollectLogsDestinationKindArchive DebugCollectLogsDestinationKind = "archive" + DebugCollectLogsDestinationKindArchive DebugCollectLogsDestinationKind = "archive" DebugCollectLogsDestinationKindDirectory DebugCollectLogsDestinationKind = "directory" ) @@ -13001,13 +12834,13 @@ const ( type ExternalToolTextResultForLlmContentType string const ( - ExternalToolTextResultForLlmContentTypeAudio ExternalToolTextResultForLlmContentType = "audio" - ExternalToolTextResultForLlmContentTypeImage ExternalToolTextResultForLlmContentType = "image" - ExternalToolTextResultForLlmContentTypeResource ExternalToolTextResultForLlmContentType = "resource" + ExternalToolTextResultForLlmContentTypeAudio ExternalToolTextResultForLlmContentType = "audio" + ExternalToolTextResultForLlmContentTypeImage ExternalToolTextResultForLlmContentType = "image" + ExternalToolTextResultForLlmContentTypeResource ExternalToolTextResultForLlmContentType = "resource" ExternalToolTextResultForLlmContentTypeResourceLink ExternalToolTextResultForLlmContentType = "resource_link" - ExternalToolTextResultForLlmContentTypeShellExit ExternalToolTextResultForLlmContentType = "shell_exit" - ExternalToolTextResultForLlmContentTypeTerminal ExternalToolTextResultForLlmContentType = "terminal" - ExternalToolTextResultForLlmContentTypeText ExternalToolTextResultForLlmContentType = "text" + ExternalToolTextResultForLlmContentTypeShellExit ExternalToolTextResultForLlmContentType = "shell_exit" + ExternalToolTextResultForLlmContentTypeTerminal ExternalToolTextResultForLlmContentType = "terminal" + ExternalToolTextResultForLlmContentTypeText ExternalToolTextResultForLlmContentType = "text" ) // Execution-critical factory storage operation. @@ -13087,7 +12920,7 @@ type FactoryRunFailureType string const ( FactoryRunFailureTypeFactoryDurableFailure FactoryRunFailureType = "factory_durable_failure" - FactoryRunFailureTypeFactoryLimitReached FactoryRunFailureType = "factory_limit_reached" + FactoryRunFailureTypeFactoryLimitReached FactoryRunFailureType = "factory_limit_reached" FactoryRunFailureTypeFactoryResumeDeclined FactoryRunFailureType = "factory_resume_declined" ) @@ -13481,7 +13314,7 @@ type MCPHeadersHandlePendingHeadersRefreshRequestKind string const ( MCPHeadersHandlePendingHeadersRefreshRequestKindHeaders MCPHeadersHandlePendingHeadersRefreshRequestKind = "headers" - MCPHeadersHandlePendingHeadersRefreshRequestKindNone MCPHeadersHandlePendingHeadersRefreshRequestKind = "none" + MCPHeadersHandlePendingHeadersRefreshRequestKindNone MCPHeadersHandlePendingHeadersRefreshRequestKind = "none" ) // OAuth grant type override for this login. @@ -13502,7 +13335,7 @@ type MCPOauthPendingRequestResponseKind string const ( MCPOauthPendingRequestResponseKindCancelled MCPOauthPendingRequestResponseKind = "cancelled" - MCPOauthPendingRequestResponseKindToken MCPOauthPendingRequestResponseKind = "token" + MCPOauthPendingRequestResponseKindToken MCPOauthPendingRequestResponseKind = "token" ) // Outcome of the sampling inference. 'success' produced a response; 'failure' encountered @@ -13778,51 +13611,51 @@ const ( type PermissionDecisionApproveForLocationApprovalKind string const ( - PermissionDecisionApproveForLocationApprovalKindCommands PermissionDecisionApproveForLocationApprovalKind = "commands" - PermissionDecisionApproveForLocationApprovalKindCustomTool PermissionDecisionApproveForLocationApprovalKind = "custom-tool" - PermissionDecisionApproveForLocationApprovalKindExtensionManagement PermissionDecisionApproveForLocationApprovalKind = "extension-management" + PermissionDecisionApproveForLocationApprovalKindCommands PermissionDecisionApproveForLocationApprovalKind = "commands" + PermissionDecisionApproveForLocationApprovalKindCustomTool PermissionDecisionApproveForLocationApprovalKind = "custom-tool" + PermissionDecisionApproveForLocationApprovalKindExtensionManagement PermissionDecisionApproveForLocationApprovalKind = "extension-management" PermissionDecisionApproveForLocationApprovalKindExtensionPermissionAccess PermissionDecisionApproveForLocationApprovalKind = "extension-permission-access" - PermissionDecisionApproveForLocationApprovalKindMCP PermissionDecisionApproveForLocationApprovalKind = "mcp" - PermissionDecisionApproveForLocationApprovalKindMCPSampling PermissionDecisionApproveForLocationApprovalKind = "mcp-sampling" - PermissionDecisionApproveForLocationApprovalKindMemory PermissionDecisionApproveForLocationApprovalKind = "memory" - PermissionDecisionApproveForLocationApprovalKindRead PermissionDecisionApproveForLocationApprovalKind = "read" - PermissionDecisionApproveForLocationApprovalKindWrite PermissionDecisionApproveForLocationApprovalKind = "write" + PermissionDecisionApproveForLocationApprovalKindMCP PermissionDecisionApproveForLocationApprovalKind = "mcp" + PermissionDecisionApproveForLocationApprovalKindMCPSampling PermissionDecisionApproveForLocationApprovalKind = "mcp-sampling" + PermissionDecisionApproveForLocationApprovalKindMemory PermissionDecisionApproveForLocationApprovalKind = "memory" + PermissionDecisionApproveForLocationApprovalKindRead PermissionDecisionApproveForLocationApprovalKind = "read" + PermissionDecisionApproveForLocationApprovalKindWrite PermissionDecisionApproveForLocationApprovalKind = "write" ) // Kind discriminator for PermissionDecisionApproveForSessionApproval. type PermissionDecisionApproveForSessionApprovalKind string const ( - PermissionDecisionApproveForSessionApprovalKindCommands PermissionDecisionApproveForSessionApprovalKind = "commands" - PermissionDecisionApproveForSessionApprovalKindCustomTool PermissionDecisionApproveForSessionApprovalKind = "custom-tool" - PermissionDecisionApproveForSessionApprovalKindExtensionManagement PermissionDecisionApproveForSessionApprovalKind = "extension-management" + PermissionDecisionApproveForSessionApprovalKindCommands PermissionDecisionApproveForSessionApprovalKind = "commands" + PermissionDecisionApproveForSessionApprovalKindCustomTool PermissionDecisionApproveForSessionApprovalKind = "custom-tool" + PermissionDecisionApproveForSessionApprovalKindExtensionManagement PermissionDecisionApproveForSessionApprovalKind = "extension-management" PermissionDecisionApproveForSessionApprovalKindExtensionPermissionAccess PermissionDecisionApproveForSessionApprovalKind = "extension-permission-access" - PermissionDecisionApproveForSessionApprovalKindMCP PermissionDecisionApproveForSessionApprovalKind = "mcp" - PermissionDecisionApproveForSessionApprovalKindMCPSampling PermissionDecisionApproveForSessionApprovalKind = "mcp-sampling" - PermissionDecisionApproveForSessionApprovalKindMemory PermissionDecisionApproveForSessionApprovalKind = "memory" - PermissionDecisionApproveForSessionApprovalKindRead PermissionDecisionApproveForSessionApprovalKind = "read" - PermissionDecisionApproveForSessionApprovalKindWrite PermissionDecisionApproveForSessionApprovalKind = "write" + PermissionDecisionApproveForSessionApprovalKindMCP PermissionDecisionApproveForSessionApprovalKind = "mcp" + PermissionDecisionApproveForSessionApprovalKindMCPSampling PermissionDecisionApproveForSessionApprovalKind = "mcp-sampling" + PermissionDecisionApproveForSessionApprovalKindMemory PermissionDecisionApproveForSessionApprovalKind = "memory" + PermissionDecisionApproveForSessionApprovalKindRead PermissionDecisionApproveForSessionApprovalKind = "read" + PermissionDecisionApproveForSessionApprovalKindWrite PermissionDecisionApproveForSessionApprovalKind = "write" ) // Kind discriminator for PermissionDecision. type PermissionDecisionKind string const ( - PermissionDecisionKindApproved PermissionDecisionKind = "approved" - PermissionDecisionKindApprovedForLocation PermissionDecisionKind = "approved-for-location" - PermissionDecisionKindApprovedForSession PermissionDecisionKind = "approved-for-session" - PermissionDecisionKindApproveForLocation PermissionDecisionKind = "approve-for-location" - PermissionDecisionKindApproveForSession PermissionDecisionKind = "approve-for-session" - PermissionDecisionKindApproveOnce PermissionDecisionKind = "approve-once" - PermissionDecisionKindApprovePermanently PermissionDecisionKind = "approve-permanently" - PermissionDecisionKindCancelled PermissionDecisionKind = "cancelled" - PermissionDecisionKindDeniedByContentExclusionPolicy PermissionDecisionKind = "denied-by-content-exclusion-policy" - PermissionDecisionKindDeniedByPermissionRequestHook PermissionDecisionKind = "denied-by-permission-request-hook" - PermissionDecisionKindDeniedByRules PermissionDecisionKind = "denied-by-rules" - PermissionDecisionKindDeniedInteractivelyByUser PermissionDecisionKind = "denied-interactively-by-user" + PermissionDecisionKindApproved PermissionDecisionKind = "approved" + PermissionDecisionKindApprovedForLocation PermissionDecisionKind = "approved-for-location" + PermissionDecisionKindApprovedForSession PermissionDecisionKind = "approved-for-session" + PermissionDecisionKindApproveForLocation PermissionDecisionKind = "approve-for-location" + PermissionDecisionKindApproveForSession PermissionDecisionKind = "approve-for-session" + PermissionDecisionKindApproveOnce PermissionDecisionKind = "approve-once" + PermissionDecisionKindApprovePermanently PermissionDecisionKind = "approve-permanently" + PermissionDecisionKindCancelled PermissionDecisionKind = "cancelled" + PermissionDecisionKindDeniedByContentExclusionPolicy PermissionDecisionKind = "denied-by-content-exclusion-policy" + PermissionDecisionKindDeniedByPermissionRequestHook PermissionDecisionKind = "denied-by-permission-request-hook" + PermissionDecisionKindDeniedByRules PermissionDecisionKind = "denied-by-rules" + PermissionDecisionKindDeniedInteractivelyByUser PermissionDecisionKind = "denied-interactively-by-user" PermissionDecisionKindDeniedNoApprovalRuleAndCouldNotRequestFromUser PermissionDecisionKind = "denied-no-approval-rule-and-could-not-request-from-user" - PermissionDecisionKindReject PermissionDecisionKind = "reject" - PermissionDecisionKindUserNotAvailable PermissionDecisionKind = "user-not-available" + PermissionDecisionKindReject PermissionDecisionKind = "reject" + PermissionDecisionKindUserNotAvailable PermissionDecisionKind = "user-not-available" ) // Whether the location is a git repo or directory @@ -13869,15 +13702,15 @@ const ( type PermissionsLocationsAddToolApprovalDetailsKind string const ( - PermissionsLocationsAddToolApprovalDetailsKindCommands PermissionsLocationsAddToolApprovalDetailsKind = "commands" - PermissionsLocationsAddToolApprovalDetailsKindCustomTool PermissionsLocationsAddToolApprovalDetailsKind = "custom-tool" - PermissionsLocationsAddToolApprovalDetailsKindExtensionManagement PermissionsLocationsAddToolApprovalDetailsKind = "extension-management" + PermissionsLocationsAddToolApprovalDetailsKindCommands PermissionsLocationsAddToolApprovalDetailsKind = "commands" + PermissionsLocationsAddToolApprovalDetailsKindCustomTool PermissionsLocationsAddToolApprovalDetailsKind = "custom-tool" + PermissionsLocationsAddToolApprovalDetailsKindExtensionManagement PermissionsLocationsAddToolApprovalDetailsKind = "extension-management" PermissionsLocationsAddToolApprovalDetailsKindExtensionPermissionAccess PermissionsLocationsAddToolApprovalDetailsKind = "extension-permission-access" - PermissionsLocationsAddToolApprovalDetailsKindMCP PermissionsLocationsAddToolApprovalDetailsKind = "mcp" - PermissionsLocationsAddToolApprovalDetailsKindMCPSampling PermissionsLocationsAddToolApprovalDetailsKind = "mcp-sampling" - PermissionsLocationsAddToolApprovalDetailsKindMemory PermissionsLocationsAddToolApprovalDetailsKind = "memory" - PermissionsLocationsAddToolApprovalDetailsKindRead PermissionsLocationsAddToolApprovalDetailsKind = "read" - PermissionsLocationsAddToolApprovalDetailsKindWrite PermissionsLocationsAddToolApprovalDetailsKind = "write" + PermissionsLocationsAddToolApprovalDetailsKindMCP PermissionsLocationsAddToolApprovalDetailsKind = "mcp" + PermissionsLocationsAddToolApprovalDetailsKindMCPSampling PermissionsLocationsAddToolApprovalDetailsKind = "mcp-sampling" + PermissionsLocationsAddToolApprovalDetailsKindMemory PermissionsLocationsAddToolApprovalDetailsKind = "memory" + PermissionsLocationsAddToolApprovalDetailsKindRead PermissionsLocationsAddToolApprovalDetailsKind = "read" + PermissionsLocationsAddToolApprovalDetailsKindWrite PermissionsLocationsAddToolApprovalDetailsKind = "write" ) // Whether the change applies to ephemeral session-scoped rules (cleared at session end) or @@ -14019,21 +13852,21 @@ const ( type PushAttachmentType string const ( - PushAttachmentTypeBlob PushAttachmentType = "blob" - PushAttachmentTypeDirectory PushAttachmentType = "directory" - PushAttachmentTypeExtensionContext PushAttachmentType = "extension_context" - PushAttachmentTypeFile PushAttachmentType = "file" - PushAttachmentTypeGitHubActionsJob PushAttachmentType = "github_actions_job" - PushAttachmentTypeGitHubCommit PushAttachmentType = "github_commit" - PushAttachmentTypeGitHubFile PushAttachmentType = "github_file" - PushAttachmentTypeGitHubFileDiff PushAttachmentType = "github_file_diff" - PushAttachmentTypeGitHubReference PushAttachmentType = "github_reference" - PushAttachmentTypeGitHubRelease PushAttachmentType = "github_release" - PushAttachmentTypeGitHubRepository PushAttachmentType = "github_repository" - PushAttachmentTypeGitHubSnippet PushAttachmentType = "github_snippet" + PushAttachmentTypeBlob PushAttachmentType = "blob" + PushAttachmentTypeDirectory PushAttachmentType = "directory" + PushAttachmentTypeExtensionContext PushAttachmentType = "extension_context" + PushAttachmentTypeFile PushAttachmentType = "file" + PushAttachmentTypeGitHubActionsJob PushAttachmentType = "github_actions_job" + PushAttachmentTypeGitHubCommit PushAttachmentType = "github_commit" + PushAttachmentTypeGitHubFile PushAttachmentType = "github_file" + PushAttachmentTypeGitHubFileDiff PushAttachmentType = "github_file_diff" + PushAttachmentTypeGitHubReference PushAttachmentType = "github_reference" + PushAttachmentTypeGitHubRelease PushAttachmentType = "github_release" + PushAttachmentTypeGitHubRepository PushAttachmentType = "github_repository" + PushAttachmentTypeGitHubSnippet PushAttachmentType = "github_snippet" PushAttachmentTypeGitHubTreeComparison PushAttachmentType = "github_tree_comparison" - PushAttachmentTypeGitHubURL PushAttachmentType = "github_url" - PushAttachmentTypeSelection PushAttachmentType = "selection" + PushAttachmentTypeGitHubURL PushAttachmentType = "github_url" + PushAttachmentTypeSelection PushAttachmentType = "selection" ) // Whether this item is a queued user message or a queued slash command / model change @@ -14066,10 +13899,10 @@ const ( type RemoteControlStatusState string const ( - RemoteControlStatusStateActive RemoteControlStatusState = "active" + RemoteControlStatusStateActive RemoteControlStatusState = "active" RemoteControlStatusStateConnecting RemoteControlStatusState = "connecting" - RemoteControlStatusStateError RemoteControlStatusState = "error" - RemoteControlStatusStateOff RemoteControlStatusState = "off" + RemoteControlStatusStateError RemoteControlStatusState = "error" + RemoteControlStatusStateOff RemoteControlStatusState = "off" ) // Whether the remote task originated from CCA or CLI `--remote`. @@ -14286,7 +14119,7 @@ const ( type SessionLimitPredictionResultKind string const ( - SessionLimitPredictionResultKindAvailable SessionLimitPredictionResultKind = "available" + SessionLimitPredictionResultKindAvailable SessionLimitPredictionResultKind = "available" SessionLimitPredictionResultKindUnavailable SessionLimitPredictionResultKind = "unavailable" ) @@ -14403,12 +14236,12 @@ const ( type SessionOpenParamsKind string const ( - SessionOpenParamsKindAttach SessionOpenParamsKind = "attach" - SessionOpenParamsKindCloud SessionOpenParamsKind = "cloud" - SessionOpenParamsKindCreate SessionOpenParamsKind = "create" - SessionOpenParamsKindHandoff SessionOpenParamsKind = "handoff" - SessionOpenParamsKindRemote SessionOpenParamsKind = "remote" - SessionOpenParamsKindResume SessionOpenParamsKind = "resume" + SessionOpenParamsKindAttach SessionOpenParamsKind = "attach" + SessionOpenParamsKindCloud SessionOpenParamsKind = "cloud" + SessionOpenParamsKindCreate SessionOpenParamsKind = "create" + SessionOpenParamsKindHandoff SessionOpenParamsKind = "handoff" + SessionOpenParamsKindRemote SessionOpenParamsKind = "remote" + SessionOpenParamsKindResume SessionOpenParamsKind = "resume" SessionOpenParamsKindResumeLast SessionOpenParamsKind = "resumeLast" ) @@ -14661,10 +14494,10 @@ const ( type SlashCommandInvocationResultKind string const ( - SlashCommandInvocationResultKindAgentPrompt SlashCommandInvocationResultKind = "agent-prompt" - SlashCommandInvocationResultKindCompleted SlashCommandInvocationResultKind = "completed" + SlashCommandInvocationResultKindAgentPrompt SlashCommandInvocationResultKind = "agent-prompt" + SlashCommandInvocationResultKindCompleted SlashCommandInvocationResultKind = "completed" SlashCommandInvocationResultKindSelectSubcommand SlashCommandInvocationResultKind = "select-subcommand" - SlashCommandInvocationResultKindText SlashCommandInvocationResultKind = "text" + SlashCommandInvocationResultKindText SlashCommandInvocationResultKind = "text" ) // Coarse command category for grouping and behavior: runtime built-in, skill-backed @@ -14822,11 +14655,11 @@ const ( type UIElicitationSchemaPropertyType string const ( - UIElicitationSchemaPropertyTypeArray UIElicitationSchemaPropertyType = "array" + UIElicitationSchemaPropertyTypeArray UIElicitationSchemaPropertyType = "array" UIElicitationSchemaPropertyTypeBoolean UIElicitationSchemaPropertyType = "boolean" UIElicitationSchemaPropertyTypeInteger UIElicitationSchemaPropertyType = "integer" - UIElicitationSchemaPropertyTypeNumber UIElicitationSchemaPropertyType = "number" - UIElicitationSchemaPropertyTypeString UIElicitationSchemaPropertyType = "string" + UIElicitationSchemaPropertyTypeNumber UIElicitationSchemaPropertyType = "number" + UIElicitationSchemaPropertyTypeString UIElicitationSchemaPropertyType = "string" ) // Schema type indicator (always 'object') @@ -14873,14 +14706,14 @@ const ( type UserToolSessionApprovalKind string const ( - UserToolSessionApprovalKindCommands UserToolSessionApprovalKind = "commands" - UserToolSessionApprovalKindCustomTool UserToolSessionApprovalKind = "custom-tool" - UserToolSessionApprovalKindExtensionManagement UserToolSessionApprovalKind = "extension-management" + UserToolSessionApprovalKindCommands UserToolSessionApprovalKind = "commands" + UserToolSessionApprovalKindCustomTool UserToolSessionApprovalKind = "custom-tool" + UserToolSessionApprovalKindExtensionManagement UserToolSessionApprovalKind = "extension-management" UserToolSessionApprovalKindExtensionPermissionAccess UserToolSessionApprovalKind = "extension-permission-access" - UserToolSessionApprovalKindMCP UserToolSessionApprovalKind = "mcp" - UserToolSessionApprovalKindMemory UserToolSessionApprovalKind = "memory" - UserToolSessionApprovalKindRead UserToolSessionApprovalKind = "read" - UserToolSessionApprovalKindWrite UserToolSessionApprovalKind = "write" + UserToolSessionApprovalKindMCP UserToolSessionApprovalKind = "mcp" + UserToolSessionApprovalKindMemory UserToolSessionApprovalKind = "memory" + UserToolSessionApprovalKindRead UserToolSessionApprovalKind = "read" + UserToolSessionApprovalKindWrite UserToolSessionApprovalKind = "write" ) // Output verbosity level for supported models @@ -16396,7 +16229,7 @@ func (s *ServerUserAPI) Settings() *ServerUserSettingsAPI { // ServerRPC provides typed server-scoped RPC methods. type ServerRPC struct { // Reuse a single struct instead of allocating one for each service on the heap. - common serverAPI + common serverAPI Account *ServerAccountAPI AgentRegistry *ServerAgentRegistryAPI @@ -16664,7 +16497,7 @@ func (a *InternalServerSessionsAPI) RegisterExtensionToolsOnSession(ctx context. // etc.). Not part of the public API. type InternalServerRPC struct { // Reuse a single struct instead of allocating one for each service on the heap. - common internalServerAPI + common internalServerAPI Sessions *InternalServerSessionsAPI } @@ -16706,7 +16539,7 @@ func NewInternalServerRPC(client *jsonrpc2.Client) *InternalServerRPC { } type sessionAPI struct { - client *jsonrpc2.Client + client *jsonrpc2.Client sessionID string } @@ -21940,7 +21773,7 @@ func (a *WorkspacesAPI) WriteAutopilotObjective(ctx context.Context, params *Wor // SessionRPC provides typed session-scoped RPC methods. type SessionRPC struct { // Reuse a single struct instead of allocating one for each service on the heap. - common sessionAPI + common sessionAPI Agent *AgentAPI Canvas *CanvasAPI @@ -22304,7 +22137,7 @@ func NewSessionRPC(client *jsonrpc2.Client, sessionID string) *SessionRPC { } type internalSessionAPI struct { - client *jsonrpc2.Client + client *jsonrpc2.Client sessionID string } @@ -22865,7 +22698,7 @@ func (a *InternalSettingsAPI) Snapshot(ctx context.Context) (*SessionSettingsSna // etc.). Not part of the public API. type InternalSessionRPC struct { // Reuse a single struct instead of allocating one for each service on the heap. - common internalSessionAPI + common internalSessionAPI MCP *InternalMCPAPI Queue *InternalQueueAPI @@ -23114,10 +22947,10 @@ type SessionFSHandler interface { // ClientSessionAPIHandlers provides all client session API handler groups for a session. type ClientSessionAPIHandlers struct { - Canvas CanvasHandler - Factory FactoryHandler + Canvas CanvasHandler + Factory FactoryHandler ProviderToken ProviderTokenHandler - SessionFS SessionFSHandler + SessionFS SessionFSHandler } func clientSessionHandlerError(err error) *jsonrpc2.Error { @@ -23564,8 +23397,8 @@ type LlmInferenceHandler interface { // key; a single set of handlers serves the entire connection. type ClientGlobalAPIHandlers struct { GitHubTelemetry GitHubTelemetryHandler - Hooks HooksHandler - LlmInference LlmInferenceHandler + Hooks HooksHandler + LlmInference LlmInferenceHandler } func clientGlobalHandlerError(err error) *jsonrpc2.Error { diff --git a/go/rpc/zrpc_encoding.go b/go/rpc/zrpc_encoding.go index 16cf00bab0..54c938da47 100644 --- a/go/rpc/zrpc_encoding.go +++ b/go/rpc/zrpc_encoding.go @@ -85,7 +85,7 @@ func (r APIKeyAuthInfo) MarshalJSON() ([]byte, error) { Type AuthInfoType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -96,7 +96,7 @@ func (r CopilotAPITokenAuthInfo) MarshalJSON() ([]byte, error) { Type AuthInfoType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -107,7 +107,7 @@ func (r EnvAuthInfo) MarshalJSON() ([]byte, error) { Type AuthInfoType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -118,7 +118,7 @@ func (r GhCLIAuthInfo) MarshalJSON() ([]byte, error) { Type AuthInfoType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -129,7 +129,7 @@ func (r HMACAuthInfo) MarshalJSON() ([]byte, error) { Type AuthInfoType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -140,7 +140,7 @@ func (r TokenAuthInfo) MarshalJSON() ([]byte, error) { Type AuthInfoType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -151,7 +151,7 @@ func (r UserAuthInfo) MarshalJSON() ([]byte, error) { Type AuthInfoType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -159,7 +159,7 @@ func (r UserAuthInfo) MarshalJSON() ([]byte, error) { func (r *AccountAllUsers) UnmarshalJSON(data []byte) error { type rawAccountAllUsers struct { AuthInfo json.RawMessage `json:"authInfo"` - Token *string `json:"token,omitempty"` + Token *string `json:"token,omitempty"` } var raw rawAccountAllUsers if err := json.Unmarshal(data, &raw); err != nil { @@ -178,8 +178,8 @@ func (r *AccountAllUsers) UnmarshalJSON(data []byte) error { func (r *AccountGetCurrentAuthResult) UnmarshalJSON(data []byte) error { type rawAccountGetCurrentAuthResult struct { - AuthErrors []string `json:"authErrors,omitzero"` - AuthInfo json.RawMessage `json:"authInfo,omitempty"` + AuthErrors []string `json:"authErrors,omitzero"` + AuthInfo json.RawMessage `json:"authInfo,omitempty"` } var raw rawAccountGetCurrentAuthResult if err := json.Unmarshal(data, &raw); err != nil { @@ -273,7 +273,7 @@ func (r AgentRegistrySpawnError) MarshalJSON() ([]byte, error) { Kind AgentRegistrySpawnResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -284,7 +284,7 @@ func (r AgentRegistrySpawnRegistryTimeout) MarshalJSON() ([]byte, error) { Kind AgentRegistrySpawnResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -295,7 +295,7 @@ func (r AgentRegistrySpawnSpawned) MarshalJSON() ([]byte, error) { Kind AgentRegistrySpawnResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -306,7 +306,7 @@ func (r AgentRegistrySpawnValidationError) MarshalJSON() ([]byte, error) { Kind AgentRegistrySpawnResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -436,7 +436,7 @@ func (r AttachmentBlob) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -447,7 +447,7 @@ func (r AttachmentDirectory) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -458,7 +458,7 @@ func (r AttachmentExtensionContext) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -469,7 +469,7 @@ func (r AttachmentFile) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -480,7 +480,7 @@ func (r AttachmentGitHubActionsJob) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -491,7 +491,7 @@ func (r AttachmentGitHubCommit) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -502,7 +502,7 @@ func (r AttachmentGitHubFile) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -513,7 +513,7 @@ func (r AttachmentGitHubFileDiff) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -524,7 +524,7 @@ func (r AttachmentGitHubReference) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -535,7 +535,7 @@ func (r AttachmentGitHubRelease) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -546,7 +546,7 @@ func (r AttachmentGitHubRepository) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -557,7 +557,7 @@ func (r AttachmentGitHubSnippet) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -568,7 +568,7 @@ func (r AttachmentGitHubTreeComparison) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -579,7 +579,7 @@ func (r AttachmentGitHubURL) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -590,7 +590,7 @@ func (r AttachmentSelection) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -634,7 +634,7 @@ func (r QueuedCommandHandled) MarshalJSON() ([]byte, error) { alias }{ Handled: r.Handled(), - alias: alias(r), + alias: alias(r), }) } @@ -645,14 +645,14 @@ func (r QueuedCommandNotHandled) MarshalJSON() ([]byte, error) { alias }{ Handled: r.Handled(), - alias: alias(r), + alias: alias(r), }) } func (r *CommandsRespondToQueuedCommandRequest) UnmarshalJSON(data []byte) error { type rawCommandsRespondToQueuedCommandRequest struct { - RequestID string `json:"requestId"` - Result json.RawMessage `json:"result"` + RequestID string `json:"requestId"` + Result json.RawMessage `json:"result"` } var raw rawCommandsRespondToQueuedCommandRequest if err := json.Unmarshal(data, &raw); err != nil { @@ -716,7 +716,7 @@ func (r DebugCollectLogsDestinationArchive) MarshalJSON() ([]byte, error) { Kind DebugCollectLogsDestinationKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -727,16 +727,16 @@ func (r DebugCollectLogsDestinationDirectory) MarshalJSON() ([]byte, error) { Kind DebugCollectLogsDestinationKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } func (r *DebugCollectLogsRequest) UnmarshalJSON(data []byte) error { type rawDebugCollectLogsRequest struct { - AdditionalEntries []DebugCollectLogsEntry `json:"additionalEntries,omitzero"` - Destination json.RawMessage `json:"destination"` - Include *DebugCollectLogsInclude `json:"include,omitempty"` + AdditionalEntries []DebugCollectLogsEntry `json:"additionalEntries,omitzero"` + Destination json.RawMessage `json:"destination"` + Include *DebugCollectLogsInclude `json:"include,omitempty"` } var raw rawDebugCollectLogsRequest if err := json.Unmarshal(data, &raw); err != nil { @@ -863,7 +863,7 @@ func (r ExternalToolTextResultForLlmContentAudio) MarshalJSON() ([]byte, error) Type ExternalToolTextResultForLlmContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -874,7 +874,7 @@ func (r ExternalToolTextResultForLlmContentImage) MarshalJSON() ([]byte, error) Type ExternalToolTextResultForLlmContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -959,7 +959,7 @@ func (r ExternalToolTextResultForLlmContentResource) MarshalJSON() ([]byte, erro Type ExternalToolTextResultForLlmContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -970,7 +970,7 @@ func (r ExternalToolTextResultForLlmContentResourceLink) MarshalJSON() ([]byte, Type ExternalToolTextResultForLlmContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -981,7 +981,7 @@ func (r ExternalToolTextResultForLlmContentShellExit) MarshalJSON() ([]byte, err Type ExternalToolTextResultForLlmContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -992,7 +992,7 @@ func (r ExternalToolTextResultForLlmContentTerminal) MarshalJSON() ([]byte, erro Type ExternalToolTextResultForLlmContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -1003,7 +1003,7 @@ func (r ExternalToolTextResultForLlmContentText) MarshalJSON() ([]byte, error) { Type ExternalToolTextResultForLlmContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -1011,13 +1011,13 @@ func (r ExternalToolTextResultForLlmContentText) MarshalJSON() ([]byte, error) { func (r *ExternalToolTextResultForLlm) UnmarshalJSON(data []byte) error { type rawExternalToolTextResultForLlm struct { BinaryResultsForLlm []ExternalToolTextResultForLlmBinaryResultsForLlm `json:"binaryResultsForLlm,omitzero"` - Contents []json.RawMessage `json:"contents,omitzero"` - Error *string `json:"error,omitempty"` - ResultType *string `json:"resultType,omitempty"` - SessionLog *string `json:"sessionLog,omitempty"` - TextResultForLlm string `json:"textResultForLlm"` - ToolReferences []string `json:"toolReferences,omitzero"` - ToolTelemetry map[string]any `json:"toolTelemetry,omitzero"` + Contents []json.RawMessage `json:"contents,omitzero"` + Error *string `json:"error,omitempty"` + ResultType *string `json:"resultType,omitempty"` + SessionLog *string `json:"sessionLog,omitempty"` + TextResultForLlm string `json:"textResultForLlm"` + ToolReferences []string `json:"toolReferences,omitzero"` + ToolTelemetry map[string]any `json:"toolTelemetry,omitzero"` } var raw rawExternalToolTextResultForLlm if err := json.Unmarshal(data, &raw); err != nil { @@ -1115,7 +1115,7 @@ func (r FactoryRunFailureFactoryDurableFailure) MarshalJSON() ([]byte, error) { Type FactoryRunFailureType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -1126,7 +1126,7 @@ func (r FactoryRunFailureFactoryLimitReached) MarshalJSON() ([]byte, error) { Type FactoryRunFailureType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -1137,17 +1137,17 @@ func (r FactoryRunFailureFactoryResumeDeclined) MarshalJSON() ([]byte, error) { Type FactoryRunFailureType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } func (r *FactoryRunTerminal) UnmarshalJSON(data []byte) error { type rawFactoryRunTerminal struct { - Error *string `json:"error,omitempty"` - Failure json.RawMessage `json:"failure,omitempty"` - Reason *string `json:"reason,omitempty"` - ResultPreview *string `json:"resultPreview,omitempty"` + Error *string `json:"error,omitempty"` + Failure json.RawMessage `json:"failure,omitempty"` + Reason *string `json:"reason,omitempty"` + ResultPreview *string `json:"resultPreview,omitempty"` } var raw rawFactoryRunTerminal if err := json.Unmarshal(data, &raw); err != nil { @@ -1168,13 +1168,13 @@ func (r *FactoryRunTerminal) UnmarshalJSON(data []byte) error { func (r *FactoryRunResult) UnmarshalJSON(data []byte) error { type rawFactoryRunResult struct { - Error *string `json:"error,omitempty"` - Failure json.RawMessage `json:"failure,omitempty"` - Reason *string `json:"reason,omitempty"` - Result any `json:"result,omitempty"` - RunID string `json:"runId"` - Snapshot any `json:"snapshot,omitempty"` - Status FactoryRunStatus `json:"status"` + Error *string `json:"error,omitempty"` + Failure json.RawMessage `json:"failure,omitempty"` + Reason *string `json:"reason,omitempty"` + Result any `json:"result,omitempty"` + RunID string `json:"runId"` + Snapshot any `json:"snapshot,omitempty"` + Status FactoryRunStatus `json:"status"` } var raw rawFactoryRunResult if err := json.Unmarshal(data, &raw); err != nil { @@ -1217,9 +1217,9 @@ func unmarshalFilterMapping(data []byte) (FilterMapping, error) { func (r *HandlePendingToolCallRequest) UnmarshalJSON(data []byte) error { type rawHandlePendingToolCallRequest struct { - Error *string `json:"error,omitempty"` - RequestID string `json:"requestId"` - Result json.RawMessage `json:"result,omitempty"` + Error *string `json:"error,omitempty"` + RequestID string `json:"requestId"` + Result json.RawMessage `json:"result,omitempty"` } var raw rawHandlePendingToolCallRequest if err := json.Unmarshal(data, &raw); err != nil { @@ -1292,7 +1292,7 @@ func (r *InstalledPluginSource) UnmarshalJSON(data []byte) error { func matchesMCPServerConfigHTTP(data []byte) bool { var rawGroup0 struct { Command json.RawMessage `json:"command"` - URL json.RawMessage `json:"url"` + URL json.RawMessage `json:"url"` } if err := json.Unmarshal(data, &rawGroup0); err != nil { return false @@ -1306,7 +1306,7 @@ func matchesMCPServerConfigHTTP(data []byte) bool { func matchesMCPServerConfigStdio(data []byte) bool { var rawGroup0 struct { Command json.RawMessage `json:"command"` - URL json.RawMessage `json:"url"` + URL json.RawMessage `json:"url"` } if err := json.Unmarshal(data, &rawGroup0); err != nil { return false @@ -1366,20 +1366,20 @@ func unmarshalMCPServerAuthConfig(data []byte) (MCPServerAuthConfig, error) { func (r *MCPServerConfigHTTP) UnmarshalJSON(data []byte) error { type rawMCPServerConfigHTTP struct { - Auth json.RawMessage `json:"auth,omitempty"` - DeferTools *MCPServerConfigDeferTools `json:"deferTools,omitempty"` - DisableToolCache *bool `json:"disableToolCache,omitempty"` - FilterMapping json.RawMessage `json:"filterMapping,omitempty"` - Headers map[string]string `json:"headers,omitzero"` - IsDefaultServer *bool `json:"isDefaultServer,omitempty"` - OauthClientID *string `json:"oauthClientId,omitempty"` - OauthGrantType *MCPServerConfigHTTPOauthGrantType `json:"oauthGrantType,omitempty"` - OauthPublicClient *bool `json:"oauthPublicClient,omitempty"` - Oidc json.RawMessage `json:"oidc,omitempty"` - Timeout *int64 `json:"timeout,omitempty"` - Tools []string `json:"tools,omitzero"` - Type *MCPServerConfigHTTPType `json:"type,omitempty"` - URL string `json:"url"` + Auth json.RawMessage `json:"auth,omitempty"` + DeferTools *MCPServerConfigDeferTools `json:"deferTools,omitempty"` + DisableToolCache *bool `json:"disableToolCache,omitempty"` + FilterMapping json.RawMessage `json:"filterMapping,omitempty"` + Headers map[string]string `json:"headers,omitzero"` + IsDefaultServer *bool `json:"isDefaultServer,omitempty"` + OauthClientID *string `json:"oauthClientId,omitempty"` + OauthGrantType *MCPServerConfigHTTPOauthGrantType `json:"oauthGrantType,omitempty"` + OauthPublicClient *bool `json:"oauthPublicClient,omitempty"` + Oidc json.RawMessage `json:"oidc,omitempty"` + Timeout *int64 `json:"timeout,omitempty"` + Tools []string `json:"tools,omitzero"` + Type *MCPServerConfigHTTPType `json:"type,omitempty"` + URL string `json:"url"` } var raw rawMCPServerConfigHTTP if err := json.Unmarshal(data, &raw); err != nil { @@ -1422,18 +1422,18 @@ func (r *MCPServerConfigHTTP) UnmarshalJSON(data []byte) error { func (r *MCPServerConfigStdio) UnmarshalJSON(data []byte) error { type rawMCPServerConfigStdio struct { - Args []string `json:"args,omitzero"` - Auth json.RawMessage `json:"auth,omitempty"` - Command string `json:"command"` - Cwd *string `json:"cwd,omitempty"` - DeferTools *MCPServerConfigDeferTools `json:"deferTools,omitempty"` - DisableToolCache *bool `json:"disableToolCache,omitempty"` - Env map[string]string `json:"env,omitzero"` - FilterMapping json.RawMessage `json:"filterMapping,omitempty"` - IsDefaultServer *bool `json:"isDefaultServer,omitempty"` - Oidc json.RawMessage `json:"oidc,omitempty"` - Timeout *int64 `json:"timeout,omitempty"` - Tools []string `json:"tools,omitzero"` + Args []string `json:"args,omitzero"` + Auth json.RawMessage `json:"auth,omitempty"` + Command string `json:"command"` + Cwd *string `json:"cwd,omitempty"` + DeferTools *MCPServerConfigDeferTools `json:"deferTools,omitempty"` + DisableToolCache *bool `json:"disableToolCache,omitempty"` + Env map[string]string `json:"env,omitzero"` + FilterMapping json.RawMessage `json:"filterMapping,omitempty"` + IsDefaultServer *bool `json:"isDefaultServer,omitempty"` + Oidc json.RawMessage `json:"oidc,omitempty"` + Timeout *int64 `json:"timeout,omitempty"` + Tools []string `json:"tools,omitzero"` } var raw rawMCPServerConfigStdio if err := json.Unmarshal(data, &raw); err != nil { @@ -1475,7 +1475,7 @@ func (r *MCPServerConfigStdio) UnmarshalJSON(data []byte) error { func (r *MCPConfigAddRequest) UnmarshalJSON(data []byte) error { type rawMCPConfigAddRequest struct { Config json.RawMessage `json:"config"` - Name string `json:"name"` + Name string `json:"name"` } var raw rawMCPConfigAddRequest if err := json.Unmarshal(data, &raw); err != nil { @@ -1516,7 +1516,7 @@ func (r *MCPConfigList) UnmarshalJSON(data []byte) error { func (r *MCPConfigUpdateRequest) UnmarshalJSON(data []byte) error { type rawMCPConfigUpdateRequest struct { Config json.RawMessage `json:"config"` - Name string `json:"name"` + Name string `json:"name"` } var raw rawMCPConfigUpdateRequest if err := json.Unmarshal(data, &raw); err != nil { @@ -1580,7 +1580,7 @@ func (r MCPHeadersHandlePendingHeadersRefreshRequestHeaders) MarshalJSON() ([]by Kind MCPHeadersHandlePendingHeadersRefreshRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1591,15 +1591,15 @@ func (r MCPHeadersHandlePendingHeadersRefreshRequestNone) MarshalJSON() ([]byte, Kind MCPHeadersHandlePendingHeadersRefreshRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } func (r *MCPHeadersHandlePendingHeadersRefreshRequestRequest) UnmarshalJSON(data []byte) error { type rawMCPHeadersHandlePendingHeadersRefreshRequestRequest struct { - RequestID string `json:"requestId"` - Result json.RawMessage `json:"result"` + RequestID string `json:"requestId"` + Result json.RawMessage `json:"result"` } var raw rawMCPHeadersHandlePendingHeadersRefreshRequestRequest if err := json.Unmarshal(data, &raw); err != nil { @@ -1663,7 +1663,7 @@ func (r MCPOauthPendingRequestResponseCancelled) MarshalJSON() ([]byte, error) { Kind MCPOauthPendingRequestResponseKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1674,15 +1674,15 @@ func (r MCPOauthPendingRequestResponseToken) MarshalJSON() ([]byte, error) { Kind MCPOauthPendingRequestResponseKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } func (r *MCPOauthHandlePendingRequest) UnmarshalJSON(data []byte) error { type rawMCPOauthHandlePendingRequest struct { - RequestID string `json:"requestId"` - Result json.RawMessage `json:"result"` + RequestID string `json:"requestId"` + Result json.RawMessage `json:"result"` } var raw rawMCPOauthHandlePendingRequest if err := json.Unmarshal(data, &raw); err != nil { @@ -1701,8 +1701,8 @@ func (r *MCPOauthHandlePendingRequest) UnmarshalJSON(data []byte) error { func (r *MCPRestartServerRequest) UnmarshalJSON(data []byte) error { type rawMCPRestartServerRequest struct { - Config json.RawMessage `json:"config,omitempty"` - ServerName string `json:"serverName"` + Config json.RawMessage `json:"config,omitempty"` + ServerName string `json:"serverName"` } var raw rawMCPRestartServerRequest if err := json.Unmarshal(data, &raw); err != nil { @@ -1721,8 +1721,8 @@ func (r *MCPRestartServerRequest) UnmarshalJSON(data []byte) error { func (r *MCPStartServerRequest) UnmarshalJSON(data []byte) error { type rawMCPStartServerRequest struct { - Config json.RawMessage `json:"config,omitempty"` - ServerName string `json:"serverName"` + Config json.RawMessage `json:"config,omitempty"` + ServerName string `json:"serverName"` } var raw rawMCPStartServerRequest if err := json.Unmarshal(data, &raw); err != nil { @@ -1864,7 +1864,7 @@ func (r PermissionDecisionApproved) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1952,7 +1952,7 @@ func (r UserToolSessionApprovalCommands) MarshalJSON() ([]byte, error) { Kind UserToolSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1963,7 +1963,7 @@ func (r UserToolSessionApprovalCustomTool) MarshalJSON() ([]byte, error) { Kind UserToolSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1974,7 +1974,7 @@ func (r UserToolSessionApprovalExtensionManagement) MarshalJSON() ([]byte, error Kind UserToolSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1985,7 +1985,7 @@ func (r UserToolSessionApprovalExtensionPermissionAccess) MarshalJSON() ([]byte, Kind UserToolSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1996,7 +1996,7 @@ func (r UserToolSessionApprovalMCP) MarshalJSON() ([]byte, error) { Kind UserToolSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2007,7 +2007,7 @@ func (r UserToolSessionApprovalMemory) MarshalJSON() ([]byte, error) { Kind UserToolSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2018,7 +2018,7 @@ func (r UserToolSessionApprovalRead) MarshalJSON() ([]byte, error) { Kind UserToolSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2029,15 +2029,15 @@ func (r UserToolSessionApprovalWrite) MarshalJSON() ([]byte, error) { Kind UserToolSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } func (r *PermissionDecisionApprovedForLocation) UnmarshalJSON(data []byte) error { type rawPermissionDecisionApprovedForLocation struct { - Approval json.RawMessage `json:"approval"` - LocationKey string `json:"locationKey"` + Approval json.RawMessage `json:"approval"` + LocationKey string `json:"locationKey"` } var raw rawPermissionDecisionApprovedForLocation if err := json.Unmarshal(data, &raw); err != nil { @@ -2060,7 +2060,7 @@ func (r PermissionDecisionApprovedForLocation) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2089,7 +2089,7 @@ func (r PermissionDecisionApprovedForSession) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2183,7 +2183,7 @@ func (r PermissionDecisionApproveForLocationApprovalCommands) MarshalJSON() ([]b Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2194,7 +2194,7 @@ func (r PermissionDecisionApproveForLocationApprovalCustomTool) MarshalJSON() ([ Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2205,7 +2205,7 @@ func (r PermissionDecisionApproveForLocationApprovalExtensionManagement) Marshal Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2216,7 +2216,7 @@ func (r PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess) M Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2227,7 +2227,7 @@ func (r PermissionDecisionApproveForLocationApprovalMCP) MarshalJSON() ([]byte, Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2238,7 +2238,7 @@ func (r PermissionDecisionApproveForLocationApprovalMCPSampling) MarshalJSON() ( Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2249,7 +2249,7 @@ func (r PermissionDecisionApproveForLocationApprovalMemory) MarshalJSON() ([]byt Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2260,7 +2260,7 @@ func (r PermissionDecisionApproveForLocationApprovalRead) MarshalJSON() ([]byte, Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2271,15 +2271,15 @@ func (r PermissionDecisionApproveForLocationApprovalWrite) MarshalJSON() ([]byte Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } func (r *PermissionDecisionApproveForLocation) UnmarshalJSON(data []byte) error { type rawPermissionDecisionApproveForLocation struct { - Approval json.RawMessage `json:"approval"` - LocationKey string `json:"locationKey"` + Approval json.RawMessage `json:"approval"` + LocationKey string `json:"locationKey"` } var raw rawPermissionDecisionApproveForLocation if err := json.Unmarshal(data, &raw); err != nil { @@ -2302,7 +2302,7 @@ func (r PermissionDecisionApproveForLocation) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2396,7 +2396,7 @@ func (r PermissionDecisionApproveForSessionApprovalCommands) MarshalJSON() ([]by Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2407,7 +2407,7 @@ func (r PermissionDecisionApproveForSessionApprovalCustomTool) MarshalJSON() ([] Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2418,7 +2418,7 @@ func (r PermissionDecisionApproveForSessionApprovalExtensionManagement) MarshalJ Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2429,7 +2429,7 @@ func (r PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess) Ma Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2440,7 +2440,7 @@ func (r PermissionDecisionApproveForSessionApprovalMCP) MarshalJSON() ([]byte, e Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2451,7 +2451,7 @@ func (r PermissionDecisionApproveForSessionApprovalMCPSampling) MarshalJSON() ([ Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2462,7 +2462,7 @@ func (r PermissionDecisionApproveForSessionApprovalMemory) MarshalJSON() ([]byte Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2473,7 +2473,7 @@ func (r PermissionDecisionApproveForSessionApprovalRead) MarshalJSON() ([]byte, Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2484,7 +2484,7 @@ func (r PermissionDecisionApproveForSessionApprovalWrite) MarshalJSON() ([]byte, Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2492,7 +2492,7 @@ func (r PermissionDecisionApproveForSessionApprovalWrite) MarshalJSON() ([]byte, func (r *PermissionDecisionApproveForSession) UnmarshalJSON(data []byte) error { type rawPermissionDecisionApproveForSession struct { Approval json.RawMessage `json:"approval,omitempty"` - Domain *string `json:"domain,omitempty"` + Domain *string `json:"domain,omitempty"` } var raw rawPermissionDecisionApproveForSession if err := json.Unmarshal(data, &raw); err != nil { @@ -2515,7 +2515,7 @@ func (r PermissionDecisionApproveForSession) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2526,7 +2526,7 @@ func (r PermissionDecisionApproveOnce) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2537,7 +2537,7 @@ func (r PermissionDecisionApprovePermanently) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2548,7 +2548,7 @@ func (r PermissionDecisionCancelled) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2559,7 +2559,7 @@ func (r PermissionDecisionDeniedByContentExclusionPolicy) MarshalJSON() ([]byte, Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2570,7 +2570,7 @@ func (r PermissionDecisionDeniedByPermissionRequestHook) MarshalJSON() ([]byte, Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2581,7 +2581,7 @@ func (r PermissionDecisionDeniedByRules) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2592,7 +2592,7 @@ func (r PermissionDecisionDeniedInteractivelyByUser) MarshalJSON() ([]byte, erro Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2603,7 +2603,7 @@ func (r PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser) Marsha Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2614,7 +2614,7 @@ func (r PermissionDecisionReject) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2625,15 +2625,15 @@ func (r PermissionDecisionUserNotAvailable) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } func (r *PermissionDecisionRequest) UnmarshalJSON(data []byte) error { type rawPermissionDecisionRequest struct { - RequestID string `json:"requestId"` - Result json.RawMessage `json:"result"` + RequestID string `json:"requestId"` + Result json.RawMessage `json:"result"` } var raw rawPermissionDecisionRequest if err := json.Unmarshal(data, &raw); err != nil { @@ -2739,7 +2739,7 @@ func (r PermissionsLocationsAddToolApprovalDetailsCommands) MarshalJSON() ([]byt Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2750,7 +2750,7 @@ func (r PermissionsLocationsAddToolApprovalDetailsCustomTool) MarshalJSON() ([]b Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2761,7 +2761,7 @@ func (r PermissionsLocationsAddToolApprovalDetailsExtensionManagement) MarshalJS Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2772,7 +2772,7 @@ func (r PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess) Mar Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2783,7 +2783,7 @@ func (r PermissionsLocationsAddToolApprovalDetailsMCP) MarshalJSON() ([]byte, er Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2794,7 +2794,7 @@ func (r PermissionsLocationsAddToolApprovalDetailsMCPSampling) MarshalJSON() ([] Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2805,7 +2805,7 @@ func (r PermissionsLocationsAddToolApprovalDetailsMemory) MarshalJSON() ([]byte, Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2816,7 +2816,7 @@ func (r PermissionsLocationsAddToolApprovalDetailsRead) MarshalJSON() ([]byte, e Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2827,15 +2827,15 @@ func (r PermissionsLocationsAddToolApprovalDetailsWrite) MarshalJSON() ([]byte, Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } func (r *PermissionLocationAddToolApprovalParams) UnmarshalJSON(data []byte) error { type rawPermissionLocationAddToolApprovalParams struct { - Approval json.RawMessage `json:"approval"` - LocationKey string `json:"locationKey"` + Approval json.RawMessage `json:"approval"` + LocationKey string `json:"locationKey"` } var raw rawPermissionLocationAddToolApprovalParams if err := json.Unmarshal(data, &raw); err != nil { @@ -2977,7 +2977,7 @@ func (r ExtensionContextPushInput) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -2988,7 +2988,7 @@ func (r PushAttachmentBlob) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -2999,7 +2999,7 @@ func (r PushAttachmentDirectory) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -3010,7 +3010,7 @@ func (r PushAttachmentFile) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -3021,7 +3021,7 @@ func (r PushAttachmentGitHubActionsJob) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -3032,7 +3032,7 @@ func (r PushAttachmentGitHubCommit) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -3043,7 +3043,7 @@ func (r PushAttachmentGitHubFile) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -3054,7 +3054,7 @@ func (r PushAttachmentGitHubFileDiff) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -3065,7 +3065,7 @@ func (r PushAttachmentGitHubReference) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -3076,7 +3076,7 @@ func (r PushAttachmentGitHubRelease) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -3087,7 +3087,7 @@ func (r PushAttachmentGitHubRepository) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -3098,7 +3098,7 @@ func (r PushAttachmentGitHubSnippet) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -3109,7 +3109,7 @@ func (r PushAttachmentGitHubTreeComparison) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -3120,7 +3120,7 @@ func (r PushAttachmentGitHubURL) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -3131,25 +3131,25 @@ func (r PushAttachmentSelection) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } func (r *QueueInsertMessage) UnmarshalJSON(data []byte) error { type rawQueueInsertMessage struct { - AgentMode *SendAgentMode `json:"agentMode,omitempty"` - Attachments []json.RawMessage `json:"attachments,omitzero"` - Billable *bool `json:"billable,omitempty"` - Delivery *string `json:"delivery,omitempty"` - DisplayPrompt *string `json:"displayPrompt,omitempty"` - Mode *SendMode `json:"mode,omitempty"` - Prepend *bool `json:"prepend,omitempty"` - Prompt string `json:"prompt"` + AgentMode *SendAgentMode `json:"agentMode,omitempty"` + Attachments []json.RawMessage `json:"attachments,omitzero"` + Billable *bool `json:"billable,omitempty"` + Delivery *string `json:"delivery,omitempty"` + DisplayPrompt *string `json:"displayPrompt,omitempty"` + Mode *SendMode `json:"mode,omitempty"` + Prepend *bool `json:"prepend,omitempty"` + Prompt string `json:"prompt"` RequestHeaders map[string]string `json:"requestHeaders,omitzero"` - RequiredTool *string `json:"requiredTool,omitempty"` - Source *string `json:"source,omitempty"` - Wait *bool `json:"wait,omitempty"` + RequiredTool *string `json:"requiredTool,omitempty"` + Source *string `json:"source,omitempty"` + Wait *bool `json:"wait,omitempty"` } var raw rawQueueInsertMessage if err := json.Unmarshal(data, &raw); err != nil { @@ -3296,8 +3296,8 @@ func (r *RemoteControlStatusResult) UnmarshalJSON(data []byte) error { func (r *RemoteControlStopResult) UnmarshalJSON(data []byte) error { type rawRemoteControlStopResult struct { - Status json.RawMessage `json:"status"` - Stopped bool `json:"stopped"` + Status json.RawMessage `json:"status"` + Stopped bool `json:"stopped"` } var raw rawRemoteControlStopResult if err := json.Unmarshal(data, &raw); err != nil { @@ -3316,8 +3316,8 @@ func (r *RemoteControlStopResult) UnmarshalJSON(data []byte) error { func (r *RemoteControlTransferResult) UnmarshalJSON(data []byte) error { type rawRemoteControlTransferResult struct { - Status json.RawMessage `json:"status"` - Transferred bool `json:"transferred"` + Status json.RawMessage `json:"status"` + Transferred bool `json:"transferred"` } var raw rawRemoteControlTransferResult if err := json.Unmarshal(data, &raw); err != nil { @@ -3337,7 +3337,7 @@ func (r *RemoteControlTransferResult) UnmarshalJSON(data []byte) error { func (r *SendAttachmentsToMessageParams) UnmarshalJSON(data []byte) error { type rawSendAttachmentsToMessageParams struct { Attachments []json.RawMessage `json:"attachments"` - InstanceID *string `json:"instanceId,omitempty"` + InstanceID *string `json:"instanceId,omitempty"` } var raw rawSendAttachmentsToMessageParams if err := json.Unmarshal(data, &raw); err != nil { @@ -3359,12 +3359,12 @@ func (r *SendAttachmentsToMessageParams) UnmarshalJSON(data []byte) error { func (r *SendMessageItem) UnmarshalJSON(data []byte) error { type rawSendMessageItem struct { - Attachments []json.RawMessage `json:"attachments,omitzero"` - Billable *bool `json:"billable,omitempty"` - DisplayPrompt *string `json:"displayPrompt,omitempty"` - Prompt string `json:"prompt"` - RequiredTool *string `json:"requiredTool,omitempty"` - Source *string `json:"source,omitempty"` + Attachments []json.RawMessage `json:"attachments,omitzero"` + Billable *bool `json:"billable,omitempty"` + DisplayPrompt *string `json:"displayPrompt,omitempty"` + Prompt string `json:"prompt"` + RequiredTool *string `json:"requiredTool,omitempty"` + Source *string `json:"source,omitempty"` } var raw rawSendMessageItem if err := json.Unmarshal(data, &raw); err != nil { @@ -3390,19 +3390,19 @@ func (r *SendMessageItem) UnmarshalJSON(data []byte) error { func (r *SendRequest) UnmarshalJSON(data []byte) error { type rawSendRequest struct { - AgentMode *SendAgentMode `json:"agentMode,omitempty"` - Attachments []json.RawMessage `json:"attachments,omitzero"` - Billable *bool `json:"billable,omitempty"` - DisplayPrompt *string `json:"displayPrompt,omitempty"` - Mode *SendMode `json:"mode,omitempty"` - Prepend *bool `json:"prepend,omitempty"` - Prompt string `json:"prompt"` + AgentMode *SendAgentMode `json:"agentMode,omitempty"` + Attachments []json.RawMessage `json:"attachments,omitzero"` + Billable *bool `json:"billable,omitempty"` + DisplayPrompt *string `json:"displayPrompt,omitempty"` + Mode *SendMode `json:"mode,omitempty"` + Prepend *bool `json:"prepend,omitempty"` + Prompt string `json:"prompt"` RequestHeaders map[string]string `json:"requestHeaders,omitzero"` - RequiredTool *string `json:"requiredTool,omitempty"` - Source *string `json:"source,omitempty"` - Traceparent *string `json:"traceparent,omitempty"` - Tracestate *string `json:"tracestate,omitempty"` - Wait *bool `json:"wait,omitempty"` + RequiredTool *string `json:"requiredTool,omitempty"` + Source *string `json:"source,omitempty"` + Traceparent *string `json:"traceparent,omitempty"` + Tracestate *string `json:"tracestate,omitempty"` + Wait *bool `json:"wait,omitempty"` } var raw rawSendRequest if err := json.Unmarshal(data, &raw); err != nil { @@ -3532,7 +3532,7 @@ func (r SessionLimitPredictionResultAvailable) MarshalJSON() ([]byte, error) { Kind SessionLimitPredictionResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -3543,7 +3543,7 @@ func (r SessionLimitPredictionResultUnavailable) MarshalJSON() ([]byte, error) { Kind SessionLimitPredictionResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -3587,7 +3587,7 @@ func (r LocalSessionMetadataValue) MarshalJSON() ([]byte, error) { alias }{ IsRemote: r.sessionListEntryIsRemote(), - alias: alias(r), + alias: alias(r), }) } @@ -3598,7 +3598,7 @@ func (r RemoteSessionMetadataValue) MarshalJSON() ([]byte, error) { alias }{ IsRemote: r.sessionListEntryIsRemote(), - alias: alias(r), + alias: alias(r), }) } @@ -3625,71 +3625,71 @@ func (r *SessionList) UnmarshalJSON(data []byte) error { func (r *SessionOpenOptions) UnmarshalJSON(data []byte) error { type rawSessionOpenOptions struct { - AdditionalContentExclusionPolicies []SessionOpenOptionsAdditionalContentExclusionPolicy `json:"additionalContentExclusionPolicies,omitzero"` - AdditionalDirectories []string `json:"additionalDirectories,omitzero"` - AgentContext *string `json:"agentContext,omitempty"` - AllowAllMCPServerInstructions *bool `json:"allowAllMcpServerInstructions,omitempty"` - AskUserDisabled *bool `json:"askUserDisabled,omitempty"` - AuthInfo json.RawMessage `json:"authInfo,omitempty"` - AvailableTools []string `json:"availableTools,omitzero"` - Capi *CapiSessionOptions `json:"capi,omitempty"` - ClientKind *string `json:"clientKind,omitempty"` - ClientName *string `json:"clientName,omitempty"` - CoauthorEnabled *bool `json:"coauthorEnabled,omitempty"` - ConfigDir *string `json:"configDir,omitempty"` - ContinueOnAutoMode *bool `json:"continueOnAutoMode,omitempty"` - CopilotURL *string `json:"copilotUrl,omitempty"` - CustomAgentsLocalOnly *bool `json:"customAgentsLocalOnly,omitempty"` - DetachedFromSpawningParentEngagementID *string `json:"detachedFromSpawningParentEngagementId,omitempty"` - DetachedFromSpawningParentSessionID *string `json:"detachedFromSpawningParentSessionId,omitempty"` - DisabledInstructionSources []string `json:"disabledInstructionSources,omitzero"` - DisabledSkills []string `json:"disabledSkills,omitzero"` - EnableCitations *bool `json:"enableCitations,omitempty"` - EnableFileChangeTracking *bool `json:"enableFileChangeTracking,omitempty"` - EnableManagedSettings *bool `json:"enableManagedSettings,omitempty"` - EnableOnDemandInstructionDiscovery *bool `json:"enableOnDemandInstructionDiscovery,omitempty"` - EnableScriptSafety *bool `json:"enableScriptSafety,omitempty"` - EnableStreaming *bool `json:"enableStreaming,omitempty"` - EnvValueMode *SessionOpenOptionsEnvValueMode `json:"envValueMode,omitempty"` - EventsLogDirectory *string `json:"eventsLogDirectory,omitempty"` - EventsLogIncludesSubagents *bool `json:"eventsLogIncludesSubagents,omitempty"` - ExcludedBuiltinAgents []string `json:"excludedBuiltinAgents,omitzero"` - ExcludedTools []string `json:"excludedTools,omitzero"` - ExpAssignments any `json:"expAssignments,omitempty"` - FeatureFlags map[string]bool `json:"featureFlags,omitzero"` - IncludedBuiltinAgents []string `json:"includedBuiltinAgents,omitzero"` - InstalledPlugins []InstalledPlugin `json:"installedPlugins,omitzero"` - IntegrationID *string `json:"integrationId,omitempty"` - IsExperimentalMode *bool `json:"isExperimentalMode,omitempty"` - LogInteractiveShells *bool `json:"logInteractiveShells,omitempty"` - LspClientName *string `json:"lspClientName,omitempty"` - MaxInlineBinaryBytes *int64 `json:"maxInlineBinaryBytes,omitempty"` - Memory *MemoryConfiguration `json:"memory,omitempty"` - Model *string `json:"model,omitempty"` - ModelCapabilitiesOverrides *ModelCapabilitiesOverride `json:"modelCapabilitiesOverrides,omitempty"` - Models []ProviderModelConfig `json:"models,omitzero"` - Name *string `json:"name,omitempty"` - Provider *ProviderConfig `json:"provider,omitempty"` - Providers []NamedProviderConfig `json:"providers,omitzero"` - ReasoningEffort *string `json:"reasoningEffort,omitempty"` - ReasoningSummary *SessionOpenOptionsReasoningSummary `json:"reasoningSummary,omitempty"` - RemoteDefaultedOn *bool `json:"remoteDefaultedOn,omitempty"` - RemoteExporting *bool `json:"remoteExporting,omitempty"` - RemoteSteerable *bool `json:"remoteSteerable,omitempty"` - RunningInInteractiveMode *bool `json:"runningInInteractiveMode,omitempty"` - SandboxConfig *SandboxConfig `json:"sandboxConfig,omitempty"` - SessionCapabilities []SessionCapability `json:"sessionCapabilities,omitzero"` - SessionID *string `json:"sessionId,omitempty"` - SessionLimits *SessionLimitsConfig `json:"sessionLimits,omitempty"` - Shell *ShellOptions `json:"shell,omitempty"` - ShellInitProfile *string `json:"shellInitProfile,omitempty"` - ShellProcessFlags []string `json:"shellProcessFlags,omitzero"` - SkillDirectories []string `json:"skillDirectories,omitzero"` - SkipCustomInstructions *bool `json:"skipCustomInstructions,omitempty"` - TrajectoryFile *string `json:"trajectoryFile,omitempty"` - Verbosity *Verbosity `json:"verbosity,omitempty"` - WorkingDirectory *string `json:"workingDirectory,omitempty"` - WorkingDirectoryContext *SessionContext `json:"workingDirectoryContext,omitempty"` + AdditionalContentExclusionPolicies []SessionOpenOptionsAdditionalContentExclusionPolicy `json:"additionalContentExclusionPolicies,omitzero"` + AdditionalDirectories []string `json:"additionalDirectories,omitzero"` + AgentContext *string `json:"agentContext,omitempty"` + AllowAllMCPServerInstructions *bool `json:"allowAllMcpServerInstructions,omitempty"` + AskUserDisabled *bool `json:"askUserDisabled,omitempty"` + AuthInfo json.RawMessage `json:"authInfo,omitempty"` + AvailableTools []string `json:"availableTools,omitzero"` + Capi *CapiSessionOptions `json:"capi,omitempty"` + ClientKind *string `json:"clientKind,omitempty"` + ClientName *string `json:"clientName,omitempty"` + CoauthorEnabled *bool `json:"coauthorEnabled,omitempty"` + ConfigDir *string `json:"configDir,omitempty"` + ContinueOnAutoMode *bool `json:"continueOnAutoMode,omitempty"` + CopilotURL *string `json:"copilotUrl,omitempty"` + CustomAgentsLocalOnly *bool `json:"customAgentsLocalOnly,omitempty"` + DetachedFromSpawningParentEngagementID *string `json:"detachedFromSpawningParentEngagementId,omitempty"` + DetachedFromSpawningParentSessionID *string `json:"detachedFromSpawningParentSessionId,omitempty"` + DisabledInstructionSources []string `json:"disabledInstructionSources,omitzero"` + DisabledSkills []string `json:"disabledSkills,omitzero"` + EnableCitations *bool `json:"enableCitations,omitempty"` + EnableFileChangeTracking *bool `json:"enableFileChangeTracking,omitempty"` + EnableManagedSettings *bool `json:"enableManagedSettings,omitempty"` + EnableOnDemandInstructionDiscovery *bool `json:"enableOnDemandInstructionDiscovery,omitempty"` + EnableScriptSafety *bool `json:"enableScriptSafety,omitempty"` + EnableStreaming *bool `json:"enableStreaming,omitempty"` + EnvValueMode *SessionOpenOptionsEnvValueMode `json:"envValueMode,omitempty"` + EventsLogDirectory *string `json:"eventsLogDirectory,omitempty"` + EventsLogIncludesSubagents *bool `json:"eventsLogIncludesSubagents,omitempty"` + ExcludedBuiltinAgents []string `json:"excludedBuiltinAgents,omitzero"` + ExcludedTools []string `json:"excludedTools,omitzero"` + ExpAssignments any `json:"expAssignments,omitempty"` + FeatureFlags map[string]bool `json:"featureFlags,omitzero"` + IncludedBuiltinAgents []string `json:"includedBuiltinAgents,omitzero"` + InstalledPlugins []InstalledPlugin `json:"installedPlugins,omitzero"` + IntegrationID *string `json:"integrationId,omitempty"` + IsExperimentalMode *bool `json:"isExperimentalMode,omitempty"` + LogInteractiveShells *bool `json:"logInteractiveShells,omitempty"` + LspClientName *string `json:"lspClientName,omitempty"` + MaxInlineBinaryBytes *int64 `json:"maxInlineBinaryBytes,omitempty"` + Memory *MemoryConfiguration `json:"memory,omitempty"` + Model *string `json:"model,omitempty"` + ModelCapabilitiesOverrides *ModelCapabilitiesOverride `json:"modelCapabilitiesOverrides,omitempty"` + Models []ProviderModelConfig `json:"models,omitzero"` + Name *string `json:"name,omitempty"` + Provider *ProviderConfig `json:"provider,omitempty"` + Providers []NamedProviderConfig `json:"providers,omitzero"` + ReasoningEffort *string `json:"reasoningEffort,omitempty"` + ReasoningSummary *SessionOpenOptionsReasoningSummary `json:"reasoningSummary,omitempty"` + RemoteDefaultedOn *bool `json:"remoteDefaultedOn,omitempty"` + RemoteExporting *bool `json:"remoteExporting,omitempty"` + RemoteSteerable *bool `json:"remoteSteerable,omitempty"` + RunningInInteractiveMode *bool `json:"runningInInteractiveMode,omitempty"` + SandboxConfig *SandboxConfig `json:"sandboxConfig,omitempty"` + SessionCapabilities []SessionCapability `json:"sessionCapabilities,omitzero"` + SessionID *string `json:"sessionId,omitempty"` + SessionLimits *SessionLimitsConfig `json:"sessionLimits,omitempty"` + Shell *ShellOptions `json:"shell,omitempty"` + ShellInitProfile *string `json:"shellInitProfile,omitempty"` + ShellProcessFlags []string `json:"shellProcessFlags,omitzero"` + SkillDirectories []string `json:"skillDirectories,omitzero"` + SkipCustomInstructions *bool `json:"skipCustomInstructions,omitempty"` + TrajectoryFile *string `json:"trajectoryFile,omitempty"` + Verbosity *Verbosity `json:"verbosity,omitempty"` + WorkingDirectory *string `json:"workingDirectory,omitempty"` + WorkingDirectoryContext *SessionContext `json:"workingDirectoryContext,omitempty"` } var raw rawSessionOpenOptions if err := json.Unmarshal(data, &raw); err != nil { @@ -3846,7 +3846,7 @@ func (r SessionsOpenAttach) MarshalJSON() ([]byte, error) { Kind SessionOpenParamsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -3857,7 +3857,7 @@ func (r SessionsOpenCloud) MarshalJSON() ([]byte, error) { Kind SessionOpenParamsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -3868,7 +3868,7 @@ func (r SessionsOpenCreate) MarshalJSON() ([]byte, error) { Kind SessionOpenParamsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -3879,7 +3879,7 @@ func (r SessionsOpenHandoff) MarshalJSON() ([]byte, error) { Kind SessionOpenParamsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -3890,7 +3890,7 @@ func (r SessionsOpenRemote) MarshalJSON() ([]byte, error) { Kind SessionOpenParamsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -3901,7 +3901,7 @@ func (r SessionsOpenResume) MarshalJSON() ([]byte, error) { Kind SessionOpenParamsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -3912,7 +3912,7 @@ func (r SessionsOpenResumeLast) MarshalJSON() ([]byte, error) { Kind SessionOpenParamsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -3994,7 +3994,7 @@ func (r SlashCommandAgentPromptResult) MarshalJSON() ([]byte, error) { Kind SlashCommandInvocationResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -4005,7 +4005,7 @@ func (r SlashCommandCompletedResult) MarshalJSON() ([]byte, error) { Kind SlashCommandInvocationResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -4016,7 +4016,7 @@ func (r SlashCommandSelectSubcommandResult) MarshalJSON() ([]byte, error) { Kind SlashCommandInvocationResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -4027,7 +4027,7 @@ func (r SlashCommandTextResult) MarshalJSON() ([]byte, error) { Kind SlashCommandInvocationResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -4079,7 +4079,7 @@ func (r TaskAgentInfo) MarshalJSON() ([]byte, error) { Type TaskInfoType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -4090,7 +4090,7 @@ func (r TaskShellInfo) MarshalJSON() ([]byte, error) { Type TaskInfoType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -4163,7 +4163,7 @@ func (r TaskAgentProgress) MarshalJSON() ([]byte, error) { Type TaskProgressType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -4174,7 +4174,7 @@ func (r TaskShellProgress) MarshalJSON() ([]byte, error) { Type TaskProgressType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -4276,8 +4276,8 @@ func matchesUIElicitationArrayAnyOfField(data []byte) bool { } var rawGroup0Items struct { AnyOf json.RawMessage `json:"anyOf"` - Enum json.RawMessage `json:"enum"` - Type json.RawMessage `json:"type"` + Enum json.RawMessage `json:"enum"` + Type json.RawMessage `json:"type"` } if err := json.Unmarshal(rawGroup0.Items, &rawGroup0Items); err != nil { return false @@ -4303,8 +4303,8 @@ func matchesUIElicitationArrayEnumField(data []byte) bool { } var rawGroup0Items struct { AnyOf json.RawMessage `json:"anyOf"` - Enum json.RawMessage `json:"enum"` - Type json.RawMessage `json:"type"` + Enum json.RawMessage `json:"enum"` + Type json.RawMessage `json:"type"` } if err := json.Unmarshal(rawGroup0.Items, &rawGroup0Items); err != nil { return false @@ -4329,7 +4329,7 @@ func matchesUIElicitationArrayEnumField(data []byte) bool { func matchesUIElicitationSchemaPropertyString(data []byte) bool { var rawGroup0 struct { - Enum json.RawMessage `json:"enum"` + Enum json.RawMessage `json:"enum"` OneOf json.RawMessage `json:"oneOf"` } if err := json.Unmarshal(data, &rawGroup0); err != nil { @@ -4343,7 +4343,7 @@ func matchesUIElicitationSchemaPropertyString(data []byte) bool { func matchesUIElicitationStringEnumField(data []byte) bool { var rawGroup0 struct { - Enum json.RawMessage `json:"enum"` + Enum json.RawMessage `json:"enum"` OneOf json.RawMessage `json:"oneOf"` } if err := json.Unmarshal(data, &rawGroup0); err != nil { @@ -4357,7 +4357,7 @@ func matchesUIElicitationStringEnumField(data []byte) bool { func matchesUIElicitationStringOneOfField(data []byte) bool { var rawGroup0 struct { - Enum json.RawMessage `json:"enum"` + Enum json.RawMessage `json:"enum"` OneOf json.RawMessage `json:"oneOf"` } if err := json.Unmarshal(data, &rawGroup0); err != nil { @@ -4461,7 +4461,7 @@ func (r UIElicitationArrayAnyOfField) MarshalJSON() ([]byte, error) { Type UIElicitationSchemaPropertyType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -4472,7 +4472,7 @@ func (r UIElicitationArrayEnumField) MarshalJSON() ([]byte, error) { Type UIElicitationSchemaPropertyType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -4483,7 +4483,7 @@ func (r UIElicitationSchemaPropertyBoolean) MarshalJSON() ([]byte, error) { Type UIElicitationSchemaPropertyType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -4494,7 +4494,7 @@ func (r UIElicitationSchemaPropertyNumber) MarshalJSON() ([]byte, error) { Type UIElicitationSchemaPropertyType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -4505,7 +4505,7 @@ func (r UIElicitationSchemaPropertyString) MarshalJSON() ([]byte, error) { Type UIElicitationSchemaPropertyType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -4516,7 +4516,7 @@ func (r UIElicitationStringEnumField) MarshalJSON() ([]byte, error) { Type UIElicitationSchemaPropertyType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -4527,7 +4527,7 @@ func (r UIElicitationStringOneOfField) MarshalJSON() ([]byte, error) { Type UIElicitationSchemaPropertyType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -4535,8 +4535,8 @@ func (r UIElicitationStringOneOfField) MarshalJSON() ([]byte, error) { func (r *UIElicitationSchema) UnmarshalJSON(data []byte) error { type rawUIElicitationSchema struct { Properties map[string]json.RawMessage `json:"properties"` - Required []string `json:"required,omitzero"` - Type UIElicitationSchemaType `json:"type"` + Required []string `json:"required,omitzero"` + Type UIElicitationSchemaType `json:"type"` } var raw rawUIElicitationSchema if err := json.Unmarshal(data, &raw); err != nil { @@ -4559,8 +4559,8 @@ func (r *UIElicitationSchema) UnmarshalJSON(data []byte) error { func (r *UIElicitationResponse) UnmarshalJSON(data []byte) error { type rawUIElicitationResponse struct { - Action UIElicitationResponseAction `json:"action"` - Content map[string]json.RawMessage `json:"content,omitzero"` + Action UIElicitationResponseAction `json:"action"` + Content map[string]json.RawMessage `json:"content,omitzero"` } var raw rawUIElicitationResponse if err := json.Unmarshal(data, &raw); err != nil { @@ -4578,4 +4578,4 @@ func (r *UIElicitationResponse) UnmarshalJSON(data []byte) error { } } return nil -} +} \ No newline at end of file diff --git a/go/rpc/zsession_encoding.go b/go/rpc/zsession_encoding.go index e472ffe679..4edfdbe194 100644 --- a/go/rpc/zsession_encoding.go +++ b/go/rpc/zsession_encoding.go @@ -16,13 +16,13 @@ func (r *SessionEvent) Marshal() ([]byte, error) { func (e *SessionEvent) UnmarshalJSON(data []byte) error { type rawEvent struct { - AgentID *string `json:"agentId,omitempty"` - Data json.RawMessage `json:"data"` - Ephemeral *bool `json:"ephemeral,omitempty"` - ID string `json:"id"` - ParentID *string `json:"parentId"` - Timestamp time.Time `json:"timestamp"` - Type SessionEventType `json:"type"` + AgentID *string `json:"agentId,omitempty"` + Data json.RawMessage `json:"data"` + Ephemeral *bool `json:"ephemeral,omitempty"` + ID string `json:"id"` + ParentID *string `json:"parentId"` + Timestamp time.Time `json:"timestamp"` + Type SessionEventType `json:"type"` } var raw rawEvent if err := json.Unmarshal(data, &raw); err != nil { @@ -727,20 +727,20 @@ func (e *SessionEvent) UnmarshalJSON(data []byte) error { func (e SessionEvent) MarshalJSON() ([]byte, error) { type rawEvent struct { - AgentID *string `json:"agentId,omitempty"` - Data any `json:"data"` - Ephemeral *bool `json:"ephemeral,omitempty"` - ID string `json:"id"` - ParentID *string `json:"parentId"` - Timestamp time.Time `json:"timestamp"` - Type SessionEventType `json:"type"` + AgentID *string `json:"agentId,omitempty"` + Data any `json:"data"` + Ephemeral *bool `json:"ephemeral,omitempty"` + ID string `json:"id"` + ParentID *string `json:"parentId"` + Timestamp time.Time `json:"timestamp"` + Type SessionEventType `json:"type"` } return json.Marshal(rawEvent{ - AgentID: e.AgentID, - Data: e.Data, + AgentID: e.AgentID, + Data: e.Data, Ephemeral: e.Ephemeral, - ID: e.ID, - ParentID: e.ParentID, + ID: e.ID, + ParentID: e.ParentID, Timestamp: e.Timestamp, Type: e.Type(), }) @@ -754,19 +754,20 @@ func (r RawSessionEventData) MarshalJSON() ([]byte, error) { return r.Raw, nil } + func (r *UserMessageData) UnmarshalJSON(data []byte) error { type rawUserMessageData struct { - AgentMode *UserMessageAgentMode `json:"agentMode,omitempty"` - Attachments []json.RawMessage `json:"attachments,omitzero"` - Content string `json:"content"` - Delivery *UserMessageDelivery `json:"delivery,omitempty"` - InteractionID *string `json:"interactionId,omitempty"` - IsAutopilotContinuation *bool `json:"isAutopilotContinuation,omitempty"` - NativeDocumentPathFallbackPaths []string `json:"nativeDocumentPathFallbackPaths,omitzero"` - ParentAgentTaskID *string `json:"parentAgentTaskId,omitempty"` - Source *string `json:"source,omitempty"` - SupportedNativeDocumentMIMETypes []string `json:"supportedNativeDocumentMimeTypes,omitzero"` - TransformedContent *string `json:"transformedContent,omitempty"` + AgentMode *UserMessageAgentMode `json:"agentMode,omitempty"` + Attachments []json.RawMessage `json:"attachments,omitzero"` + Content string `json:"content"` + Delivery *UserMessageDelivery `json:"delivery,omitempty"` + InteractionID *string `json:"interactionId,omitempty"` + IsAutopilotContinuation *bool `json:"isAutopilotContinuation,omitempty"` + NativeDocumentPathFallbackPaths []string `json:"nativeDocumentPathFallbackPaths,omitzero"` + ParentAgentTaskID *string `json:"parentAgentTaskId,omitempty"` + Source *string `json:"source,omitempty"` + SupportedNativeDocumentMIMETypes []string `json:"supportedNativeDocumentMimeTypes,omitzero"` + TransformedContent *string `json:"transformedContent,omitempty"` } var raw rawUserMessageData if err := json.Unmarshal(data, &raw); err != nil { @@ -848,7 +849,7 @@ func (r CitationLocationBlock) MarshalJSON() ([]byte, error) { Type CitationLocationType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -859,7 +860,7 @@ func (r CitationLocationChar) MarshalJSON() ([]byte, error) { Type CitationLocationType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -870,17 +871,17 @@ func (r CitationLocationPage) MarshalJSON() ([]byte, error) { Type CitationLocationType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } func (r *CitationReference) UnmarshalJSON(data []byte) error { type rawCitationReference struct { - CitedText *string `json:"citedText,omitempty"` - Location json.RawMessage `json:"location,omitempty"` - ProviderMetadata any `json:"providerMetadata,omitempty"` - SourceID string `json:"sourceId"` + CitedText *string `json:"citedText,omitempty"` + Location json.RawMessage `json:"location,omitempty"` + ProviderMetadata any `json:"providerMetadata,omitempty"` + SourceID string `json:"sourceId"` } var raw rawCitationReference if err := json.Unmarshal(data, &raw); err != nil { @@ -901,9 +902,9 @@ func (r *CitationReference) UnmarshalJSON(data []byte) error { func matchesBinaryAssetReference(data []byte) bool { var rawGroup0 struct { - AssetID json.RawMessage `json:"assetId"` - ByteLength json.RawMessage `json:"byteLength"` - Data json.RawMessage `json:"data"` + AssetID json.RawMessage `json:"assetId"` + ByteLength json.RawMessage `json:"byteLength"` + Data json.RawMessage `json:"data"` OmittedReason json.RawMessage `json:"omittedReason"` } if err := json.Unmarshal(data, &rawGroup0); err != nil { @@ -923,9 +924,9 @@ func matchesBinaryAssetReference(data []byte) bool { func matchesOmittedBinaryResult(data []byte) bool { var rawGroup0 struct { - AssetID json.RawMessage `json:"assetId"` - ByteLength json.RawMessage `json:"byteLength"` - Data json.RawMessage `json:"data"` + AssetID json.RawMessage `json:"assetId"` + ByteLength json.RawMessage `json:"byteLength"` + Data json.RawMessage `json:"data"` OmittedReason json.RawMessage `json:"omittedReason"` } if err := json.Unmarshal(data, &rawGroup0); err != nil { @@ -945,9 +946,9 @@ func matchesOmittedBinaryResult(data []byte) bool { func matchesPersistedBinaryImage(data []byte) bool { var rawGroup0 struct { - AssetID json.RawMessage `json:"assetId"` - ByteLength json.RawMessage `json:"byteLength"` - Data json.RawMessage `json:"data"` + AssetID json.RawMessage `json:"assetId"` + ByteLength json.RawMessage `json:"byteLength"` + Data json.RawMessage `json:"data"` OmittedReason json.RawMessage `json:"omittedReason"` } if err := json.Unmarshal(data, &rawGroup0); err != nil { @@ -1046,7 +1047,7 @@ func (r BinaryAssetReference) MarshalJSON() ([]byte, error) { Type PersistedBinaryResultType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -1057,7 +1058,7 @@ func (r OmittedBinaryResult) MarshalJSON() ([]byte, error) { Type PersistedBinaryResultType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -1068,7 +1069,7 @@ func (r PersistedBinaryImage) MarshalJSON() ([]byte, error) { Type PersistedBinaryResultType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -1150,7 +1151,7 @@ func (r ToolExecutionCompleteContentAudio) MarshalJSON() ([]byte, error) { Type ToolExecutionCompleteContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -1161,7 +1162,7 @@ func (r ToolExecutionCompleteContentImage) MarshalJSON() ([]byte, error) { Type ToolExecutionCompleteContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -1234,7 +1235,7 @@ func (r ToolExecutionCompleteContentResource) MarshalJSON() ([]byte, error) { Type ToolExecutionCompleteContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -1245,7 +1246,7 @@ func (r ToolExecutionCompleteContentResourceLink) MarshalJSON() ([]byte, error) Type ToolExecutionCompleteContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -1256,7 +1257,7 @@ func (r ToolExecutionCompleteContentShellExit) MarshalJSON() ([]byte, error) { Type ToolExecutionCompleteContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -1267,7 +1268,7 @@ func (r ToolExecutionCompleteContentTerminal) MarshalJSON() ([]byte, error) { Type ToolExecutionCompleteContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -1278,21 +1279,21 @@ func (r ToolExecutionCompleteContentText) MarshalJSON() ([]byte, error) { Type ToolExecutionCompleteContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } func (r *ToolExecutionCompleteResult) UnmarshalJSON(data []byte) error { type rawToolExecutionCompleteResult struct { - BinaryResultsForLlm []json.RawMessage `json:"binaryResultsForLlm,omitzero"` - CitableSources []CitableSource `json:"citableSources,omitzero"` - Content string `json:"content"` - Contents []json.RawMessage `json:"contents,omitzero"` - DetailedContent *string `json:"detailedContent,omitempty"` - MCPMeta any `json:"mcpMeta,omitempty"` - StructuredContent any `json:"structuredContent,omitempty"` - UIResource *ToolExecutionCompleteUIResource `json:"uiResource,omitempty"` + BinaryResultsForLlm []json.RawMessage `json:"binaryResultsForLlm,omitzero"` + CitableSources []CitableSource `json:"citableSources,omitzero"` + Content string `json:"content"` + Contents []json.RawMessage `json:"contents,omitzero"` + DetailedContent *string `json:"detailedContent,omitempty"` + MCPMeta any `json:"mcpMeta,omitempty"` + StructuredContent any `json:"structuredContent,omitempty"` + UIResource *ToolExecutionCompleteUIResource `json:"uiResource,omitempty"` } var raw rawToolExecutionCompleteResult if err := json.Unmarshal(data, &raw); err != nil { @@ -1404,7 +1405,7 @@ func (r SystemNotificationAgentCompleted) MarshalJSON() ([]byte, error) { Type SystemNotificationType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -1415,7 +1416,7 @@ func (r SystemNotificationAgentIdle) MarshalJSON() ([]byte, error) { Type SystemNotificationType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -1426,7 +1427,7 @@ func (r SystemNotificationInstructionDiscovered) MarshalJSON() ([]byte, error) { Type SystemNotificationType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -1437,7 +1438,7 @@ func (r SystemNotificationNewInboxMessage) MarshalJSON() ([]byte, error) { Type SystemNotificationType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -1448,7 +1449,7 @@ func (r SystemNotificationShellCompleted) MarshalJSON() ([]byte, error) { Type SystemNotificationType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -1459,7 +1460,7 @@ func (r SystemNotificationShellDetachedCompleted) MarshalJSON() ([]byte, error) Type SystemNotificationType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -1470,15 +1471,15 @@ func (r SystemNotificationUnclassified) MarshalJSON() ([]byte, error) { Type SystemNotificationType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } func (r *SystemNotificationData) UnmarshalJSON(data []byte) error { type rawSystemNotificationData struct { - Content string `json:"content"` - Kind json.RawMessage `json:"kind"` + Content string `json:"content"` + Kind json.RawMessage `json:"kind"` } var raw rawSystemNotificationData if err := json.Unmarshal(data, &raw); err != nil { @@ -1590,7 +1591,7 @@ func (r PermissionRequestCustomTool) MarshalJSON() ([]byte, error) { Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1601,7 +1602,7 @@ func (r PermissionRequestExtensionManagement) MarshalJSON() ([]byte, error) { Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1612,7 +1613,7 @@ func (r PermissionRequestExtensionPermissionAccess) MarshalJSON() ([]byte, error Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1623,7 +1624,7 @@ func (r PermissionRequestHook) MarshalJSON() ([]byte, error) { Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1634,7 +1635,7 @@ func (r PermissionRequestMCP) MarshalJSON() ([]byte, error) { Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1645,7 +1646,7 @@ func (r PermissionRequestMemory) MarshalJSON() ([]byte, error) { Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1656,7 +1657,7 @@ func (r PermissionRequestRead) MarshalJSON() ([]byte, error) { Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1667,7 +1668,7 @@ func (r PermissionRequestShell) MarshalJSON() ([]byte, error) { Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1678,7 +1679,7 @@ func (r PermissionRequestURL) MarshalJSON() ([]byte, error) { Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1689,7 +1690,7 @@ func (r PermissionRequestWrite) MarshalJSON() ([]byte, error) { Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1795,7 +1796,7 @@ func (r PermissionPromptRequestCommands) MarshalJSON() ([]byte, error) { Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1806,7 +1807,7 @@ func (r PermissionPromptRequestCustomTool) MarshalJSON() ([]byte, error) { Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1817,7 +1818,7 @@ func (r PermissionPromptRequestExtensionManagement) MarshalJSON() ([]byte, error Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1828,7 +1829,7 @@ func (r PermissionPromptRequestExtensionPermissionAccess) MarshalJSON() ([]byte, Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1839,7 +1840,7 @@ func (r PermissionPromptRequestHook) MarshalJSON() ([]byte, error) { Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1850,7 +1851,7 @@ func (r PermissionPromptRequestMCP) MarshalJSON() ([]byte, error) { Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1861,7 +1862,7 @@ func (r PermissionPromptRequestMemory) MarshalJSON() ([]byte, error) { Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1872,7 +1873,7 @@ func (r PermissionPromptRequestPath) MarshalJSON() ([]byte, error) { Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1883,7 +1884,7 @@ func (r PermissionPromptRequestRead) MarshalJSON() ([]byte, error) { Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1894,7 +1895,7 @@ func (r PermissionPromptRequestURL) MarshalJSON() ([]byte, error) { Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1905,7 +1906,7 @@ func (r PermissionPromptRequestWrite) MarshalJSON() ([]byte, error) { Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1913,10 +1914,10 @@ func (r PermissionPromptRequestWrite) MarshalJSON() ([]byte, error) { func (r *PermissionRequestedData) UnmarshalJSON(data []byte) error { type rawPermissionRequestedData struct { PermissionRequest json.RawMessage `json:"permissionRequest"` - PromptRequest json.RawMessage `json:"promptRequest,omitempty"` - RequestID string `json:"requestId"` - ResolvedByHook *bool `json:"resolvedByHook,omitempty"` - RiskAssessment any `json:"riskAssessment,omitempty"` + PromptRequest json.RawMessage `json:"promptRequest,omitempty"` + RequestID string `json:"requestId"` + ResolvedByHook *bool `json:"resolvedByHook,omitempty"` + RiskAssessment any `json:"riskAssessment,omitempty"` } var raw rawPermissionRequestedData if err := json.Unmarshal(data, &raw); err != nil { @@ -2031,15 +2032,15 @@ func (r PermissionApproved) MarshalJSON() ([]byte, error) { Kind PermissionResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } func (r *PermissionApprovedForLocation) UnmarshalJSON(data []byte) error { type rawPermissionApprovedForLocation struct { - Approval json.RawMessage `json:"approval"` - LocationKey string `json:"locationKey"` + Approval json.RawMessage `json:"approval"` + LocationKey string `json:"locationKey"` } var raw rawPermissionApprovedForLocation if err := json.Unmarshal(data, &raw); err != nil { @@ -2062,7 +2063,7 @@ func (r PermissionApprovedForLocation) MarshalJSON() ([]byte, error) { Kind PermissionResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2091,7 +2092,7 @@ func (r PermissionApprovedForSession) MarshalJSON() ([]byte, error) { Kind PermissionResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2102,7 +2103,7 @@ func (r PermissionCancelled) MarshalJSON() ([]byte, error) { Kind PermissionResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2113,7 +2114,7 @@ func (r PermissionDeniedByContentExclusionPolicy) MarshalJSON() ([]byte, error) Kind PermissionResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2124,7 +2125,7 @@ func (r PermissionDeniedByPermissionRequestHook) MarshalJSON() ([]byte, error) { Kind PermissionResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2135,7 +2136,7 @@ func (r PermissionDeniedByRules) MarshalJSON() ([]byte, error) { Kind PermissionResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2146,7 +2147,7 @@ func (r PermissionDeniedInteractivelyByUser) MarshalJSON() ([]byte, error) { Kind PermissionResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2157,16 +2158,16 @@ func (r PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser) MarshalJSON() Kind PermissionResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } func (r *PermissionCompletedData) UnmarshalJSON(data []byte) error { type rawPermissionCompletedData struct { - RequestID string `json:"requestId"` - Result json.RawMessage `json:"result"` - ToolCallID *string `json:"toolCallId,omitempty"` + RequestID string `json:"requestId"` + Result json.RawMessage `json:"result"` + ToolCallID *string `json:"toolCallId,omitempty"` } var raw rawPermissionCompletedData if err := json.Unmarshal(data, &raw); err != nil { @@ -2203,4 +2204,4 @@ func (r *SessionExtensionsAttachmentsPushedData) UnmarshalJSON(data []byte) erro } } return nil -} +} \ No newline at end of file diff --git a/go/rpc/zsession_events.go b/go/rpc/zsession_events.go index faee209697..fd6420d3d0 100644 --- a/go/rpc/zsession_events.go +++ b/go/rpc/zsession_events.go @@ -48,65 +48,64 @@ func (RawSessionEventData) sessionEventData() {} func (r RawSessionEventData) Type() SessionEventType { return r.EventType } - // SessionEventType identifies the kind of session event. type SessionEventType string const ( - SessionEventTypeAbort SessionEventType = "abort" - SessionEventTypeAssistantIdle SessionEventType = "assistant.idle" - SessionEventTypeAssistantIntent SessionEventType = "assistant.intent" - SessionEventTypeAssistantMessage SessionEventType = "assistant.message" - SessionEventTypeAssistantMessageDelta SessionEventType = "assistant.message_delta" - SessionEventTypeAssistantMessageStart SessionEventType = "assistant.message_start" - SessionEventTypeAssistantReasoning SessionEventType = "assistant.reasoning" - SessionEventTypeAssistantReasoningDelta SessionEventType = "assistant.reasoning_delta" + SessionEventTypeAbort SessionEventType = "abort" + SessionEventTypeAssistantIdle SessionEventType = "assistant.idle" + SessionEventTypeAssistantIntent SessionEventType = "assistant.intent" + SessionEventTypeAssistantMessage SessionEventType = "assistant.message" + SessionEventTypeAssistantMessageDelta SessionEventType = "assistant.message_delta" + SessionEventTypeAssistantMessageStart SessionEventType = "assistant.message_start" + SessionEventTypeAssistantReasoning SessionEventType = "assistant.reasoning" + SessionEventTypeAssistantReasoningDelta SessionEventType = "assistant.reasoning_delta" SessionEventTypeAssistantServerToolProgress SessionEventType = "assistant.server_tool_progress" - SessionEventTypeAssistantStreamingDelta SessionEventType = "assistant.streaming_delta" - SessionEventTypeAssistantToolCallDelta SessionEventType = "assistant.tool_call_delta" - SessionEventTypeAssistantTurnEnd SessionEventType = "assistant.turn_end" - SessionEventTypeAssistantTurnRetry SessionEventType = "assistant.turn_retry" - SessionEventTypeAssistantTurnStart SessionEventType = "assistant.turn_start" - SessionEventTypeAssistantUsage SessionEventType = "assistant.usage" - SessionEventTypeAutoModeSwitchCompleted SessionEventType = "auto_mode_switch.completed" - SessionEventTypeAutoModeSwitchRequested SessionEventType = "auto_mode_switch.requested" - SessionEventTypeCapabilitiesChanged SessionEventType = "capabilities.changed" - SessionEventTypeCommandCompleted SessionEventType = "command.completed" - SessionEventTypeCommandExecute SessionEventType = "command.execute" - SessionEventTypeCommandQueued SessionEventType = "command.queued" - SessionEventTypeCommandsChanged SessionEventType = "commands.changed" - SessionEventTypeElicitationCompleted SessionEventType = "elicitation.completed" - SessionEventTypeElicitationRequested SessionEventType = "elicitation.requested" - SessionEventTypeExitPlanModeCompleted SessionEventType = "exit_plan_mode.completed" - SessionEventTypeExitPlanModeRequested SessionEventType = "exit_plan_mode.requested" - SessionEventTypeExternalToolCompleted SessionEventType = "external_tool.completed" - SessionEventTypeExternalToolRequested SessionEventType = "external_tool.requested" + SessionEventTypeAssistantStreamingDelta SessionEventType = "assistant.streaming_delta" + SessionEventTypeAssistantToolCallDelta SessionEventType = "assistant.tool_call_delta" + SessionEventTypeAssistantTurnEnd SessionEventType = "assistant.turn_end" + SessionEventTypeAssistantTurnRetry SessionEventType = "assistant.turn_retry" + SessionEventTypeAssistantTurnStart SessionEventType = "assistant.turn_start" + SessionEventTypeAssistantUsage SessionEventType = "assistant.usage" + SessionEventTypeAutoModeSwitchCompleted SessionEventType = "auto_mode_switch.completed" + SessionEventTypeAutoModeSwitchRequested SessionEventType = "auto_mode_switch.requested" + SessionEventTypeCapabilitiesChanged SessionEventType = "capabilities.changed" + SessionEventTypeCommandCompleted SessionEventType = "command.completed" + SessionEventTypeCommandExecute SessionEventType = "command.execute" + SessionEventTypeCommandQueued SessionEventType = "command.queued" + SessionEventTypeCommandsChanged SessionEventType = "commands.changed" + SessionEventTypeElicitationCompleted SessionEventType = "elicitation.completed" + SessionEventTypeElicitationRequested SessionEventType = "elicitation.requested" + SessionEventTypeExitPlanModeCompleted SessionEventType = "exit_plan_mode.completed" + SessionEventTypeExitPlanModeRequested SessionEventType = "exit_plan_mode.requested" + SessionEventTypeExternalToolCompleted SessionEventType = "external_tool.completed" + SessionEventTypeExternalToolRequested SessionEventType = "external_tool.requested" // Experimental: SessionEventTypeFactoryRunUpdated identifies an experimental event that may // change or be removed. - SessionEventTypeFactoryRunUpdated SessionEventType = "factory.run_updated" - SessionEventTypeHookEnd SessionEventType = "hook.end" - SessionEventTypeHookProgress SessionEventType = "hook.progress" - SessionEventTypeHookStart SessionEventType = "hook.start" - SessionEventTypeMCPAppToolCallComplete SessionEventType = "mcp_app.tool_call_complete" + SessionEventTypeFactoryRunUpdated SessionEventType = "factory.run_updated" + SessionEventTypeHookEnd SessionEventType = "hook.end" + SessionEventTypeHookProgress SessionEventType = "hook.progress" + SessionEventTypeHookStart SessionEventType = "hook.start" + SessionEventTypeMCPAppToolCallComplete SessionEventType = "mcp_app.tool_call_complete" SessionEventTypeMCPHeadersRefreshCompleted SessionEventType = "mcp.headers_refresh_completed" - SessionEventTypeMCPHeadersRefreshRequired SessionEventType = "mcp.headers_refresh_required" - SessionEventTypeMCPOauthCompleted SessionEventType = "mcp.oauth_completed" - SessionEventTypeMCPOauthRequired SessionEventType = "mcp.oauth_required" - SessionEventTypeMCPPromptsListChanged SessionEventType = "mcp.prompts.list_changed" - SessionEventTypeMCPResourcesListChanged SessionEventType = "mcp.resources.list_changed" - SessionEventTypeMCPToolsListChanged SessionEventType = "mcp.tools.list_changed" - SessionEventTypeModelCallFailure SessionEventType = "model.call_failure" - SessionEventTypeModelCallStart SessionEventType = "model.call_start" - SessionEventTypePendingMessagesModified SessionEventType = "pending_messages.modified" - SessionEventTypePermissionCompleted SessionEventType = "permission.completed" - SessionEventTypePermissionRequested SessionEventType = "permission.requested" - SessionEventTypeSamplingCompleted SessionEventType = "sampling.completed" - SessionEventTypeSamplingRequested SessionEventType = "sampling.requested" + SessionEventTypeMCPHeadersRefreshRequired SessionEventType = "mcp.headers_refresh_required" + SessionEventTypeMCPOauthCompleted SessionEventType = "mcp.oauth_completed" + SessionEventTypeMCPOauthRequired SessionEventType = "mcp.oauth_required" + SessionEventTypeMCPPromptsListChanged SessionEventType = "mcp.prompts.list_changed" + SessionEventTypeMCPResourcesListChanged SessionEventType = "mcp.resources.list_changed" + SessionEventTypeMCPToolsListChanged SessionEventType = "mcp.tools.list_changed" + SessionEventTypeModelCallFailure SessionEventType = "model.call_failure" + SessionEventTypeModelCallStart SessionEventType = "model.call_start" + SessionEventTypePendingMessagesModified SessionEventType = "pending_messages.modified" + SessionEventTypePermissionCompleted SessionEventType = "permission.completed" + SessionEventTypePermissionRequested SessionEventType = "permission.requested" + SessionEventTypeSamplingCompleted SessionEventType = "sampling.completed" + SessionEventTypeSamplingRequested SessionEventType = "sampling.requested" // Experimental: SessionEventTypeSessionAutoModeResolved identifies an experimental event // that may change or be removed. - SessionEventTypeSessionAutoModeResolved SessionEventType = "session.auto_mode_resolved" + SessionEventTypeSessionAutoModeResolved SessionEventType = "session.auto_mode_resolved" SessionEventTypeSessionAutopilotObjectiveChanged SessionEventType = "session.autopilot_objective_changed" - SessionEventTypeSessionBackgroundTasksChanged SessionEventType = "session.background_tasks_changed" + SessionEventTypeSessionBackgroundTasksChanged SessionEventType = "session.background_tasks_changed" // Experimental: SessionEventTypeSessionBinaryAsset identifies an experimental event that // may change or be removed. SessionEventTypeSessionBinaryAsset SessionEventType = "session.binary_asset" @@ -127,68 +126,68 @@ const ( SessionEventTypeSessionCanvasRemoved SessionEventType = "session.canvas.removed" // Experimental: SessionEventTypeSessionCanvasUnavailable identifies an experimental event // that may change or be removed. - SessionEventTypeSessionCanvasUnavailable SessionEventType = "session.canvas.unavailable" - SessionEventTypeSessionCompactionComplete SessionEventType = "session.compaction_complete" - SessionEventTypeSessionCompactionStart SessionEventType = "session.compaction_start" - SessionEventTypeSessionContextChanged SessionEventType = "session.context_changed" - SessionEventTypeSessionCustomAgentsUpdated SessionEventType = "session.custom_agents_updated" - SessionEventTypeSessionCustomNotification SessionEventType = "session.custom_notification" - SessionEventTypeSessionError SessionEventType = "session.error" + SessionEventTypeSessionCanvasUnavailable SessionEventType = "session.canvas.unavailable" + SessionEventTypeSessionCompactionComplete SessionEventType = "session.compaction_complete" + SessionEventTypeSessionCompactionStart SessionEventType = "session.compaction_start" + SessionEventTypeSessionContextChanged SessionEventType = "session.context_changed" + SessionEventTypeSessionCustomAgentsUpdated SessionEventType = "session.custom_agents_updated" + SessionEventTypeSessionCustomNotification SessionEventType = "session.custom_notification" + SessionEventTypeSessionError SessionEventType = "session.error" SessionEventTypeSessionExtensionsAttachmentsPushed SessionEventType = "session.extensions.attachments_pushed" - SessionEventTypeSessionExtensionsLoaded SessionEventType = "session.extensions_loaded" - SessionEventTypeSessionHandoff SessionEventType = "session.handoff" - SessionEventTypeSessionIdle SessionEventType = "session.idle" - SessionEventTypeSessionInfo SessionEventType = "session.info" - SessionEventTypeSessionLimitsExhaustedCompleted SessionEventType = "session_limits_exhausted.completed" - SessionEventTypeSessionLimitsExhaustedRequested SessionEventType = "session_limits_exhausted.requested" + SessionEventTypeSessionExtensionsLoaded SessionEventType = "session.extensions_loaded" + SessionEventTypeSessionHandoff SessionEventType = "session.handoff" + SessionEventTypeSessionIdle SessionEventType = "session.idle" + SessionEventTypeSessionInfo SessionEventType = "session.info" + SessionEventTypeSessionLimitsExhaustedCompleted SessionEventType = "session_limits_exhausted.completed" + SessionEventTypeSessionLimitsExhaustedRequested SessionEventType = "session_limits_exhausted.requested" // Experimental: SessionEventTypeSessionManagedSettingsEnforced identifies an experimental // event that may change or be removed. SessionEventTypeSessionManagedSettingsEnforced SessionEventType = "session.managed_settings_enforced" // Experimental: SessionEventTypeSessionManagedSettingsResolved identifies an experimental // event that may change or be removed. SessionEventTypeSessionManagedSettingsResolved SessionEventType = "session.managed_settings_resolved" - SessionEventTypeSessionMCPServersLoaded SessionEventType = "session.mcp_servers_loaded" - SessionEventTypeSessionMCPServerStatusChanged SessionEventType = "session.mcp_server_status_changed" - SessionEventTypeSessionModeChanged SessionEventType = "session.mode_changed" - SessionEventTypeSessionModelChange SessionEventType = "session.model_change" - SessionEventTypeSessionPermissionsChanged SessionEventType = "session.permissions_changed" - SessionEventTypeSessionPlanChanged SessionEventType = "session.plan_changed" - SessionEventTypeSessionRemoteSteerableChanged SessionEventType = "session.remote_steerable_changed" - SessionEventTypeSessionResume SessionEventType = "session.resume" - SessionEventTypeSessionScheduleCancelled SessionEventType = "session.schedule_cancelled" - SessionEventTypeSessionScheduleCreated SessionEventType = "session.schedule_created" - SessionEventTypeSessionScheduleRearmed SessionEventType = "session.schedule_rearmed" - SessionEventTypeSessionSessionLimitsChanged SessionEventType = "session.session_limits_changed" - SessionEventTypeSessionShutdown SessionEventType = "session.shutdown" - SessionEventTypeSessionSkillsLoaded SessionEventType = "session.skills_loaded" - SessionEventTypeSessionSnapshotRewind SessionEventType = "session.snapshot_rewind" - SessionEventTypeSessionStart SessionEventType = "session.start" - SessionEventTypeSessionTaskComplete SessionEventType = "session.task_complete" - SessionEventTypeSessionTitleChanged SessionEventType = "session.title_changed" - SessionEventTypeSessionTodosChanged SessionEventType = "session.todos_changed" - SessionEventTypeSessionToolsUpdated SessionEventType = "session.tools_updated" - SessionEventTypeSessionTruncation SessionEventType = "session.truncation" - SessionEventTypeSessionUsageCheckpoint SessionEventType = "session.usage_checkpoint" - SessionEventTypeSessionUsageInfo SessionEventType = "session.usage_info" - SessionEventTypeSessionWarning SessionEventType = "session.warning" - SessionEventTypeSessionWorkspaceFileChanged SessionEventType = "session.workspace_file_changed" - SessionEventTypeSkillInvoked SessionEventType = "skill.invoked" - SessionEventTypeSubagentCompleted SessionEventType = "subagent.completed" - SessionEventTypeSubagentDeselected SessionEventType = "subagent.deselected" - SessionEventTypeSubagentFailed SessionEventType = "subagent.failed" - SessionEventTypeSubagentSelected SessionEventType = "subagent.selected" - SessionEventTypeSubagentStarted SessionEventType = "subagent.started" - SessionEventTypeSystemMessage SessionEventType = "system.message" - SessionEventTypeSystemNotification SessionEventType = "system.notification" - SessionEventTypeToolExecutionComplete SessionEventType = "tool.execution_complete" - SessionEventTypeToolExecutionPartialResult SessionEventType = "tool.execution_partial_result" - SessionEventTypeToolExecutionProgress SessionEventType = "tool.execution_progress" - SessionEventTypeToolExecutionStart SessionEventType = "tool.execution_start" - SessionEventTypeToolSearchActivated SessionEventType = "tool_search.activated" - SessionEventTypeToolUserRequested SessionEventType = "tool.user_requested" - SessionEventTypeUserInputCompleted SessionEventType = "user_input.completed" - SessionEventTypeUserInputRequested SessionEventType = "user_input.requested" - SessionEventTypeUserMessage SessionEventType = "user.message" + SessionEventTypeSessionMCPServersLoaded SessionEventType = "session.mcp_servers_loaded" + SessionEventTypeSessionMCPServerStatusChanged SessionEventType = "session.mcp_server_status_changed" + SessionEventTypeSessionModeChanged SessionEventType = "session.mode_changed" + SessionEventTypeSessionModelChange SessionEventType = "session.model_change" + SessionEventTypeSessionPermissionsChanged SessionEventType = "session.permissions_changed" + SessionEventTypeSessionPlanChanged SessionEventType = "session.plan_changed" + SessionEventTypeSessionRemoteSteerableChanged SessionEventType = "session.remote_steerable_changed" + SessionEventTypeSessionResume SessionEventType = "session.resume" + SessionEventTypeSessionScheduleCancelled SessionEventType = "session.schedule_cancelled" + SessionEventTypeSessionScheduleCreated SessionEventType = "session.schedule_created" + SessionEventTypeSessionScheduleRearmed SessionEventType = "session.schedule_rearmed" + SessionEventTypeSessionSessionLimitsChanged SessionEventType = "session.session_limits_changed" + SessionEventTypeSessionShutdown SessionEventType = "session.shutdown" + SessionEventTypeSessionSkillsLoaded SessionEventType = "session.skills_loaded" + SessionEventTypeSessionSnapshotRewind SessionEventType = "session.snapshot_rewind" + SessionEventTypeSessionStart SessionEventType = "session.start" + SessionEventTypeSessionTaskComplete SessionEventType = "session.task_complete" + SessionEventTypeSessionTitleChanged SessionEventType = "session.title_changed" + SessionEventTypeSessionTodosChanged SessionEventType = "session.todos_changed" + SessionEventTypeSessionToolsUpdated SessionEventType = "session.tools_updated" + SessionEventTypeSessionTruncation SessionEventType = "session.truncation" + SessionEventTypeSessionUsageCheckpoint SessionEventType = "session.usage_checkpoint" + SessionEventTypeSessionUsageInfo SessionEventType = "session.usage_info" + SessionEventTypeSessionWarning SessionEventType = "session.warning" + SessionEventTypeSessionWorkspaceFileChanged SessionEventType = "session.workspace_file_changed" + SessionEventTypeSkillInvoked SessionEventType = "skill.invoked" + SessionEventTypeSubagentCompleted SessionEventType = "subagent.completed" + SessionEventTypeSubagentDeselected SessionEventType = "subagent.deselected" + SessionEventTypeSubagentFailed SessionEventType = "subagent.failed" + SessionEventTypeSubagentSelected SessionEventType = "subagent.selected" + SessionEventTypeSubagentStarted SessionEventType = "subagent.started" + SessionEventTypeSystemMessage SessionEventType = "system.message" + SessionEventTypeSystemNotification SessionEventType = "system.notification" + SessionEventTypeToolExecutionComplete SessionEventType = "tool.execution_complete" + SessionEventTypeToolExecutionPartialResult SessionEventType = "tool.execution_partial_result" + SessionEventTypeToolExecutionProgress SessionEventType = "tool.execution_progress" + SessionEventTypeToolExecutionStart SessionEventType = "tool.execution_start" + SessionEventTypeToolSearchActivated SessionEventType = "tool_search.activated" + SessionEventTypeToolUserRequested SessionEventType = "tool.user_requested" + SessionEventTypeUserInputCompleted SessionEventType = "user_input.completed" + SessionEventTypeUserInputRequested SessionEventType = "user_input.requested" + SessionEventTypeUserMessage SessionEventType = "user.message" ) // Agent intent description for current activity or plan @@ -197,7 +196,7 @@ type AssistantIntentData struct { Intent string `json:"intent"` } -func (*AssistantIntentData) sessionEventData() {} +func (*AssistantIntentData) sessionEventData() {} func (*AssistantIntentData) Type() SessionEventType { return SessionEventTypeAssistantIntent } // Agent mode change details including previous and new modes @@ -208,7 +207,7 @@ type SessionModeChangedData struct { PreviousMode SessionMode `json:"previousMode"` } -func (*SessionModeChangedData) sessionEventData() {} +func (*SessionModeChangedData) sessionEventData() {} func (*SessionModeChangedData) Type() SessionEventType { return SessionEventTypeSessionModeChanged } // Assistant reasoning content for timeline display with complete thinking text @@ -217,10 +216,10 @@ type AssistantReasoningData struct { Content string `json:"content"` // Unique identifier for this reasoning block ReasoningID string `json:"reasoningId"` - Rte *bool `json:"rte,omitempty"` + Rte *bool `json:"rte,omitempty"` } -func (*AssistantReasoningData) sessionEventData() {} +func (*AssistantReasoningData) sessionEventData() {} func (*AssistantReasoningData) Type() SessionEventType { return SessionEventTypeAssistantReasoning } // Assistant response containing text content, optional tool requests, and interaction metadata @@ -257,7 +256,7 @@ type AssistantMessageData struct { ReasoningWireField *string `json:"reasoningWireField,omitempty"` // GitHub request tracing ID (x-github-request-id header) for correlating with server-side logs RequestID *string `json:"requestId,omitempty"` - Rte *bool `json:"rte,omitempty"` + Rte *bool `json:"rte,omitempty"` // Neutral provider-tagged server-side tool-use payload (tool search, advisor) for verbatim round-tripping ServerTools *AssistantMessageServerTools `json:"serverTools,omitempty"` // Copilot service request ID (x-copilot-service-request-id header) for CAPI log correlation @@ -268,7 +267,7 @@ type AssistantMessageData struct { TurnID *string `json:"turnId,omitempty"` } -func (*AssistantMessageData) sessionEventData() {} +func (*AssistantMessageData) sessionEventData() {} func (*AssistantMessageData) Type() SessionEventType { return SessionEventTypeAssistantMessage } // Auto Intent resolution: the concrete model the session settled on for the first prompt of an auto-mode session, and why. Lets SDK clients render the chosen model and the full reason it was picked. The core selection fields (chosenModel/reasoningBucket/categoryScores) are stable; the routing-analytics fields (predictedLabel/confidence/candidateModels) mirror the upstream intent service and may evolve, hence the event's experimental stability. @@ -307,9 +306,7 @@ type SessionAutoModeResolvedData struct { } func (*SessionAutoModeResolvedData) sessionEventData() {} -func (*SessionAutoModeResolvedData) Type() SessionEventType { - return SessionEventTypeSessionAutoModeResolved -} +func (*SessionAutoModeResolvedData) Type() SessionEventType { return SessionEventTypeSessionAutoModeResolved } // Auto mode switch completion notification type AutoModeSwitchCompletedData struct { @@ -320,9 +317,7 @@ type AutoModeSwitchCompletedData struct { } func (*AutoModeSwitchCompletedData) sessionEventData() {} -func (*AutoModeSwitchCompletedData) Type() SessionEventType { - return SessionEventTypeAutoModeSwitchCompleted -} +func (*AutoModeSwitchCompletedData) Type() SessionEventType { return SessionEventTypeAutoModeSwitchCompleted } // Auto mode switch request notification requiring user approval type AutoModeSwitchRequestedData struct { @@ -335,9 +330,7 @@ type AutoModeSwitchRequestedData struct { } func (*AutoModeSwitchRequestedData) sessionEventData() {} -func (*AutoModeSwitchRequestedData) Type() SessionEventType { - return SessionEventTypeAutoModeSwitchRequested -} +func (*AutoModeSwitchRequestedData) Type() SessionEventType { return SessionEventTypeAutoModeSwitchRequested } // Autopilot objective state file operation details indicating what changed type SessionAutopilotObjectiveChangedData struct { @@ -350,9 +343,7 @@ type SessionAutopilotObjectiveChangedData struct { } func (*SessionAutopilotObjectiveChangedData) sessionEventData() {} -func (*SessionAutopilotObjectiveChangedData) Type() SessionEventType { - return SessionEventTypeSessionAutopilotObjectiveChanged -} +func (*SessionAutopilotObjectiveChangedData) Type() SessionEventType { return SessionEventTypeSessionAutopilotObjectiveChanged } // Canonical bytes for a content-addressed binary asset shared by reference across events type SessionBinaryAssetData struct { @@ -372,7 +363,7 @@ type SessionBinaryAssetData struct { Discriminator BinaryAssetType `json:"type"` } -func (*SessionBinaryAssetData) sessionEventData() {} +func (*SessionBinaryAssetData) sessionEventData() {} func (*SessionBinaryAssetData) Type() SessionEventType { return SessionEventTypeSessionBinaryAsset } // Context window breakdown at the start of LLM-powered conversation compaction @@ -394,9 +385,7 @@ type SessionCompactionStartData struct { } func (*SessionCompactionStartData) sessionEventData() {} -func (*SessionCompactionStartData) Type() SessionEventType { - return SessionEventTypeSessionCompactionStart -} +func (*SessionCompactionStartData) Type() SessionEventType { return SessionEventTypeSessionCompactionStart } // Conversation compaction results including success status, metrics, and optional error details type SessionCompactionCompleteData struct { @@ -443,9 +432,7 @@ type SessionCompactionCompleteData struct { } func (*SessionCompactionCompleteData) sessionEventData() {} -func (*SessionCompactionCompleteData) Type() SessionEventType { - return SessionEventTypeSessionCompactionComplete -} +func (*SessionCompactionCompleteData) Type() SessionEventType { return SessionEventTypeSessionCompactionComplete } // Conversation truncation statistics including token counts and removed content metrics type SessionTruncationData struct { @@ -467,7 +454,7 @@ type SessionTruncationData struct { TokensRemovedDuringTruncation int64 `json:"tokensRemovedDuringTruncation"` } -func (*SessionTruncationData) sessionEventData() {} +func (*SessionTruncationData) sessionEventData() {} func (*SessionTruncationData) Type() SessionEventType { return SessionEventTypeSessionTruncation } // Current context window usage statistics including token and message counts @@ -488,7 +475,7 @@ type SessionUsageInfoData struct { ToolDefinitionsTokens *int64 `json:"toolDefinitionsTokens,omitempty"` } -func (*SessionUsageInfoData) sessionEventData() {} +func (*SessionUsageInfoData) sessionEventData() {} func (*SessionUsageInfoData) Type() SessionEventType { return SessionEventTypeSessionUsageInfo } // Custom agent selection details including name and available tools @@ -501,7 +488,7 @@ type SubagentSelectedData struct { Tools []string `json:"tools"` } -func (*SubagentSelectedData) sessionEventData() {} +func (*SubagentSelectedData) sessionEventData() {} func (*SubagentSelectedData) Type() SessionEventType { return SessionEventTypeSubagentSelected } // Durable record that a canvas instance is open, used to restore open canvases on cold session resume. Intentionally omits the transient url and availability. @@ -520,9 +507,7 @@ type SessionCanvasRecordedData struct { } func (*SessionCanvasRecordedData) sessionEventData() {} -func (*SessionCanvasRecordedData) Type() SessionEventType { - return SessionEventTypeSessionCanvasRecorded -} +func (*SessionCanvasRecordedData) Type() SessionEventType { return SessionEventTypeSessionCanvasRecorded } // Durable record that a canvas instance was closed, superseding a prior instance_recorded during resume replay. // Experimental: SessionCanvasRemovedData is part of an experimental API and may change or be removed. @@ -535,7 +520,7 @@ type SessionCanvasRemovedData struct { InstanceID string `json:"instanceId"` } -func (*SessionCanvasRemovedData) sessionEventData() {} +func (*SessionCanvasRemovedData) sessionEventData() {} func (*SessionCanvasRemovedData) Type() SessionEventType { return SessionEventTypeSessionCanvasRemoved } // Durable session usage checkpoint for reconstructing aggregate accounting on resume @@ -551,9 +536,7 @@ type SessionUsageCheckpointData struct { } func (*SessionUsageCheckpointData) sessionEventData() {} -func (*SessionUsageCheckpointData) Type() SessionEventType { - return SessionEventTypeSessionUsageCheckpoint -} +func (*SessionUsageCheckpointData) Type() SessionEventType { return SessionEventTypeSessionUsageCheckpoint } // Dynamic headers refresh request for a remote MCP server type MCPHeadersRefreshRequiredData struct { @@ -568,9 +551,7 @@ type MCPHeadersRefreshRequiredData struct { } func (*MCPHeadersRefreshRequiredData) sessionEventData() {} -func (*MCPHeadersRefreshRequiredData) Type() SessionEventType { - return SessionEventTypeMCPHeadersRefreshRequired -} +func (*MCPHeadersRefreshRequiredData) Type() SessionEventType { return SessionEventTypeMCPHeadersRefreshRequired } // Elicitation request completion with the user's response type ElicitationCompletedData struct { @@ -582,7 +563,7 @@ type ElicitationCompletedData struct { RequestID string `json:"requestId"` } -func (*ElicitationCompletedData) sessionEventData() {} +func (*ElicitationCompletedData) sessionEventData() {} func (*ElicitationCompletedData) Type() SessionEventType { return SessionEventTypeElicitationCompleted } // Elicitation request; may be form-based (structured input) or URL-based (browser redirect) @@ -603,7 +584,7 @@ type ElicitationRequestedData struct { URL *string `json:"url,omitempty"` } -func (*ElicitationRequestedData) sessionEventData() {} +func (*ElicitationRequestedData) sessionEventData() {} func (*ElicitationRequestedData) Type() SessionEventType { return SessionEventTypeElicitationRequested } // Empty payload for `session.background_tasks_changed`, indicating background task state changed. @@ -611,15 +592,13 @@ type SessionBackgroundTasksChangedData struct { } func (*SessionBackgroundTasksChangedData) sessionEventData() {} -func (*SessionBackgroundTasksChangedData) Type() SessionEventType { - return SessionEventTypeSessionBackgroundTasksChanged -} +func (*SessionBackgroundTasksChangedData) Type() SessionEventType { return SessionEventTypeSessionBackgroundTasksChanged } // Empty payload; the event signals that the custom agent was deselected, returning to the default agent type SubagentDeselectedData struct { } -func (*SubagentDeselectedData) sessionEventData() {} +func (*SubagentDeselectedData) sessionEventData() {} func (*SubagentDeselectedData) Type() SessionEventType { return SessionEventTypeSubagentDeselected } // Empty payload; the event signals that the pending message queue has changed @@ -627,9 +606,7 @@ type PendingMessagesModifiedData struct { } func (*PendingMessagesModifiedData) sessionEventData() {} -func (*PendingMessagesModifiedData) Type() SessionEventType { - return SessionEventTypePendingMessagesModified -} +func (*PendingMessagesModifiedData) Type() SessionEventType { return SessionEventTypePendingMessagesModified } // Enterprise managed-settings resolution: the effective managed settings the session applied and where they came from, so SDK clients can show users what is enterprise-managed and by which authority. Fires whenever managed policy is (re)applied — at session start, on resume, and on account switch. This is an ephemeral live snapshot (delivered to subscribers but not persisted to the session event log), because at session start it resolves before `session.start` is emitted; for a session-independent pull, use the SDK `getManagedSettings()` API, which returns the identical payload. Managed settings have a single authoritative source, so the highest-authority present layer (server > device) wins wholesale; `bypassPermissionsDisabled` is deny-wins across layers. Marked experimental while the managed-settings surface stabilizes. // Experimental: SessionManagedSettingsResolvedData is part of an experimental API and may change or be removed. @@ -653,19 +630,17 @@ type SessionManagedSettingsResolvedData struct { } func (*SessionManagedSettingsResolvedData) sessionEventData() {} -func (*SessionManagedSettingsResolvedData) Type() SessionEventType { - return SessionEventTypeSessionManagedSettingsResolved -} +func (*SessionManagedSettingsResolvedData) Type() SessionEventType { return SessionEventTypeSessionManagedSettingsResolved } // Ephemeral invalidation signal for a changed factory run. // Experimental: FactoryRunUpdatedData is part of an experimental API and may change or be removed. type FactoryRunUpdatedData struct { // Monotonic revision now available for the run. - Revision int64 `json:"revision"` - RunID string `json:"runId"` + Revision int64 `json:"revision"` + RunID string `json:"runId"` } -func (*FactoryRunUpdatedData) sessionEventData() {} +func (*FactoryRunUpdatedData) sessionEventData() {} func (*FactoryRunUpdatedData) Type() SessionEventType { return SessionEventTypeFactoryRunUpdated } // Ephemeral progress update from a running hook process @@ -676,7 +651,7 @@ type HookProgressData struct { Temporary *bool `json:"temporary,omitempty"` } -func (*HookProgressData) sessionEventData() {} +func (*HookProgressData) sessionEventData() {} func (*HookProgressData) Type() SessionEventType { return SessionEventTypeHookProgress } // Error details for timeline display including message and optional diagnostic information @@ -701,7 +676,7 @@ type SessionErrorData struct { URL *string `json:"url,omitempty"` } -func (*SessionErrorData) sessionEventData() {} +func (*SessionErrorData) sessionEventData() {} func (*SessionErrorData) Type() SessionEventType { return SessionEventTypeSessionError } // External tool completion notification signaling UI dismissal @@ -711,9 +686,7 @@ type ExternalToolCompletedData struct { } func (*ExternalToolCompletedData) sessionEventData() {} -func (*ExternalToolCompletedData) Type() SessionEventType { - return SessionEventTypeExternalToolCompleted -} +func (*ExternalToolCompletedData) Type() SessionEventType { return SessionEventTypeExternalToolCompleted } // External tool invocation request for client-side tool execution type ExternalToolRequestedData struct { @@ -736,9 +709,7 @@ type ExternalToolRequestedData struct { } func (*ExternalToolRequestedData) sessionEventData() {} -func (*ExternalToolRequestedData) Type() SessionEventType { - return SessionEventTypeExternalToolRequested -} +func (*ExternalToolRequestedData) Type() SessionEventType { return SessionEventTypeExternalToolRequested } // Failed LLM API call metadata for telemetry type ModelCallFailureData struct { @@ -779,7 +750,7 @@ type ModelCallFailureData struct { ReasoningEffort *string `json:"reasoningEffort,omitempty"` // Content-free structural summary of the failing request. Contains only counts and shape flags (no prompt content), so it is safe for unrestricted telemetry. Populated only for client-error (4xx) failures. RequestFingerprint *ModelCallFailureRequestFingerprint `json:"requestFingerprint,omitempty"` - Rte *bool `json:"rte,omitempty"` + Rte *bool `json:"rte,omitempty"` // Copilot service request ID (x-copilot-service-request-id header) for CAPI log correlation ServiceRequestID *string `json:"serviceRequestId,omitempty"` // Where the failed model call originated @@ -790,7 +761,7 @@ type ModelCallFailureData struct { Transport *ModelCallFailureTransport `json:"transport,omitempty"` } -func (*ModelCallFailureData) sessionEventData() {} +func (*ModelCallFailureData) sessionEventData() {} func (*ModelCallFailureData) Type() SessionEventType { return SessionEventTypeModelCallFailure } // Hook invocation completion details including output, success status, and error information @@ -807,7 +778,7 @@ type HookEndData struct { Success bool `json:"success"` } -func (*HookEndData) sessionEventData() {} +func (*HookEndData) sessionEventData() {} func (*HookEndData) Type() SessionEventType { return SessionEventTypeHookEnd } // Hook invocation start details including type and input data @@ -820,7 +791,7 @@ type HookStartData struct { Input any `json:"input,omitempty"` } -func (*HookStartData) sessionEventData() {} +func (*HookStartData) sessionEventData() {} func (*HookStartData) Type() SessionEventType { return SessionEventTypeHookStart } // Informational message for timeline display with categorization @@ -835,7 +806,7 @@ type SessionInfoData struct { URL *string `json:"url,omitempty"` } -func (*SessionInfoData) sessionEventData() {} +func (*SessionInfoData) sessionEventData() {} func (*SessionInfoData) Type() SessionEventType { return SessionEventTypeSessionInfo } // LLM API call usage metrics including tokens, costs, quotas, and billing information @@ -885,14 +856,14 @@ type AssistantUsageData struct { ReasoningEffort *string `json:"reasoningEffort,omitempty"` // Number of output tokens used for reasoning (e.g., chain-of-thought) ReasoningTokens *int64 `json:"reasoningTokens,omitempty"` - Rte *bool `json:"rte,omitempty"` + Rte *bool `json:"rte,omitempty"` // Copilot service request ID (x-copilot-service-request-id header) for CAPI log correlation ServiceRequestID *string `json:"serviceRequestId,omitempty"` // Time to first token in milliseconds. Only available for streaming requests TimeToFirstTokenMs *float64 `json:"timeToFirstTokenMs,omitempty"` } -func (*AssistantUsageData) sessionEventData() {} +func (*AssistantUsageData) sessionEventData() {} func (*AssistantUsageData) Type() SessionEventType { return SessionEventTypeAssistantUsage } // Live progress signal for a provider-hosted server tool (e.g. hosted web search) while it runs, before the finalized serverTools envelope lands on the terminal assistant.message @@ -906,9 +877,7 @@ type AssistantServerToolProgressData struct { } func (*AssistantServerToolProgressData) sessionEventData() {} -func (*AssistantServerToolProgressData) Type() SessionEventType { - return SessionEventTypeAssistantServerToolProgress -} +func (*AssistantServerToolProgressData) Type() SessionEventType { return SessionEventTypeAssistantServerToolProgress } // MCP App view called a tool on a connected MCP server (SEP-1865) type MCPAppToolCallCompleteData struct { @@ -931,9 +900,7 @@ type MCPAppToolCallCompleteData struct { } func (*MCPAppToolCallCompleteData) sessionEventData() {} -func (*MCPAppToolCallCompleteData) Type() SessionEventType { - return SessionEventTypeMCPAppToolCallComplete -} +func (*MCPAppToolCallCompleteData) Type() SessionEventType { return SessionEventTypeMCPAppToolCallComplete } // MCP OAuth request completion notification type MCPOauthCompletedData struct { @@ -943,7 +910,7 @@ type MCPOauthCompletedData struct { RequestID string `json:"requestId"` } -func (*MCPOauthCompletedData) sessionEventData() {} +func (*MCPOauthCompletedData) sessionEventData() {} func (*MCPOauthCompletedData) Type() SessionEventType { return SessionEventTypeMCPOauthCompleted } // MCP headers refresh request completion notification @@ -955,9 +922,7 @@ type MCPHeadersRefreshCompletedData struct { } func (*MCPHeadersRefreshCompletedData) sessionEventData() {} -func (*MCPHeadersRefreshCompletedData) Type() SessionEventType { - return SessionEventTypeMCPHeadersRefreshCompleted -} +func (*MCPHeadersRefreshCompletedData) Type() SessionEventType { return SessionEventTypeMCPHeadersRefreshCompleted } // Metadata for an additional model inference attempt within an existing assistant turn type AssistantTurnRetryData struct { @@ -969,7 +934,7 @@ type AssistantTurnRetryData struct { TurnID string `json:"turnId"` } -func (*AssistantTurnRetryData) sessionEventData() {} +func (*AssistantTurnRetryData) sessionEventData() {} func (*AssistantTurnRetryData) Type() SessionEventType { return SessionEventTypeAssistantTurnRetry } // Model API dispatch metadata for internal telemetry @@ -983,7 +948,7 @@ type ModelCallStartData struct { TurnID string `json:"turnId"` } -func (*ModelCallStartData) sessionEventData() {} +func (*ModelCallStartData) sessionEventData() {} func (*ModelCallStartData) Type() SessionEventType { return SessionEventTypeModelCallStart } // Model change details including previous and new model identifiers @@ -1010,7 +975,7 @@ type SessionModelChangeData struct { Verbosity *Verbosity `json:"verbosity,omitempty"` } -func (*SessionModelChangeData) sessionEventData() {} +func (*SessionModelChangeData) sessionEventData() {} func (*SessionModelChangeData) Type() SessionEventType { return SessionEventTypeSessionModelChange } // Notifies that the session's remote steering capability has changed @@ -1020,9 +985,7 @@ type SessionRemoteSteerableChangedData struct { } func (*SessionRemoteSteerableChangedData) sessionEventData() {} -func (*SessionRemoteSteerableChangedData) Type() SessionEventType { - return SessionEventTypeSessionRemoteSteerableChanged -} +func (*SessionRemoteSteerableChangedData) Type() SessionEventType { return SessionEventTypeSessionRemoteSteerableChanged } // OAuth authentication request for an MCP server type MCPOauthRequiredData struct { @@ -1044,7 +1007,7 @@ type MCPOauthRequiredData struct { WwwAuthenticateParams *MCPOauthWwwAuthenticateParams `json:"wwwAuthenticateParams,omitempty"` } -func (*MCPOauthRequiredData) sessionEventData() {} +func (*MCPOauthRequiredData) sessionEventData() {} func (*MCPOauthRequiredData) Type() SessionEventType { return SessionEventTypeMCPOauthRequired } // Opaque custom notification data. Consumers may branch on source and name, but payload semantics are source-defined. @@ -1062,9 +1025,7 @@ type SessionCustomNotificationData struct { } func (*SessionCustomNotificationData) sessionEventData() {} -func (*SessionCustomNotificationData) Type() SessionEventType { - return SessionEventTypeSessionCustomNotification -} +func (*SessionCustomNotificationData) Type() SessionEventType { return SessionEventTypeSessionCustomNotification } // Payload emitted whenever the main agent's processing loop goes idle, including while related background work (running agents or in-flight attached shell commands) is still pending and the session-level idle event is therefore deferred type AssistantIdleData struct { @@ -1072,7 +1033,7 @@ type AssistantIdleData struct { Aborted *bool `json:"aborted,omitempty"` } -func (*AssistantIdleData) sessionEventData() {} +func (*AssistantIdleData) sessionEventData() {} func (*AssistantIdleData) Type() SessionEventType { return SessionEventTypeAssistantIdle } // Payload identifying the MCP server associated with a list change. @@ -1082,9 +1043,7 @@ type MCPPromptsListChangedData struct { } func (*MCPPromptsListChangedData) sessionEventData() {} -func (*MCPPromptsListChangedData) Type() SessionEventType { - return SessionEventTypeMCPPromptsListChanged -} +func (*MCPPromptsListChangedData) Type() SessionEventType { return SessionEventTypeMCPPromptsListChanged } // Payload identifying the MCP server associated with a list change. type MCPResourcesListChangedData struct { @@ -1093,9 +1052,7 @@ type MCPResourcesListChangedData struct { } func (*MCPResourcesListChangedData) sessionEventData() {} -func (*MCPResourcesListChangedData) Type() SessionEventType { - return SessionEventTypeMCPResourcesListChanged -} +func (*MCPResourcesListChangedData) Type() SessionEventType { return SessionEventTypeMCPResourcesListChanged } // Payload identifying the MCP server associated with a list change. type MCPToolsListChangedData struct { @@ -1103,7 +1060,7 @@ type MCPToolsListChangedData struct { ServerName string `json:"serverName"` } -func (*MCPToolsListChangedData) sessionEventData() {} +func (*MCPToolsListChangedData) sessionEventData() {} func (*MCPToolsListChangedData) Type() SessionEventType { return SessionEventTypeMCPToolsListChanged } // Payload indicating the session is idle with no background agents or attached shell commands in flight @@ -1112,7 +1069,7 @@ type SessionIdleData struct { Aborted *bool `json:"aborted,omitempty"` } -func (*SessionIdleData) sessionEventData() {} +func (*SessionIdleData) sessionEventData() {} func (*SessionIdleData) Type() SessionEventType { return SessionEventTypeSessionIdle } // Payload of `session.canvas.closed` with the closed canvas instance ID, provider ID, and canvas ID. @@ -1126,7 +1083,7 @@ type SessionCanvasClosedData struct { InstanceID string `json:"instanceId"` } -func (*SessionCanvasClosedData) sessionEventData() {} +func (*SessionCanvasClosedData) sessionEventData() {} func (*SessionCanvasClosedData) Type() SessionEventType { return SessionEventTypeSessionCanvasClosed } // Payload of `session.canvas.opened` with canvas instance and provider IDs plus optional icon, title, status, URL, and input. @@ -1152,7 +1109,7 @@ type SessionCanvasOpenedData struct { URL *string `json:"url,omitempty"` } -func (*SessionCanvasOpenedData) sessionEventData() {} +func (*SessionCanvasOpenedData) sessionEventData() {} func (*SessionCanvasOpenedData) Type() SessionEventType { return SessionEventTypeSessionCanvasOpened } // Payload of `session.canvas.registry_changed` listing the canvas declarations currently available. @@ -1163,9 +1120,7 @@ type SessionCanvasRegistryChangedData struct { } func (*SessionCanvasRegistryChangedData) sessionEventData() {} -func (*SessionCanvasRegistryChangedData) Type() SessionEventType { - return SessionEventTypeSessionCanvasRegistryChanged -} +func (*SessionCanvasRegistryChangedData) Type() SessionEventType { return SessionEventTypeSessionCanvasRegistryChanged } // Payload of `session.custom_agents_updated` with loaded custom agents plus non-fatal warnings and fatal errors. type SessionCustomAgentsUpdatedData struct { @@ -1178,9 +1133,7 @@ type SessionCustomAgentsUpdatedData struct { } func (*SessionCustomAgentsUpdatedData) sessionEventData() {} -func (*SessionCustomAgentsUpdatedData) Type() SessionEventType { - return SessionEventTypeSessionCustomAgentsUpdated -} +func (*SessionCustomAgentsUpdatedData) Type() SessionEventType { return SessionEventTypeSessionCustomAgentsUpdated } // Payload of `session.extensions.attachments_pushed` with extension-contributed attachments for the next send. type SessionExtensionsAttachmentsPushedData struct { @@ -1189,9 +1142,7 @@ type SessionExtensionsAttachmentsPushedData struct { } func (*SessionExtensionsAttachmentsPushedData) sessionEventData() {} -func (*SessionExtensionsAttachmentsPushedData) Type() SessionEventType { - return SessionEventTypeSessionExtensionsAttachmentsPushed -} +func (*SessionExtensionsAttachmentsPushedData) Type() SessionEventType { return SessionEventTypeSessionExtensionsAttachmentsPushed } // Payload of `session.extensions_loaded` listing discovered extensions and their statuses. type SessionExtensionsLoadedData struct { @@ -1200,9 +1151,7 @@ type SessionExtensionsLoadedData struct { } func (*SessionExtensionsLoadedData) sessionEventData() {} -func (*SessionExtensionsLoadedData) Type() SessionEventType { - return SessionEventTypeSessionExtensionsLoaded -} +func (*SessionExtensionsLoadedData) Type() SessionEventType { return SessionEventTypeSessionExtensionsLoaded } // Payload of `session.mcp_server_status_changed` for one MCP server's status and optional failure error. type SessionMCPServerStatusChangedData struct { @@ -1215,9 +1164,7 @@ type SessionMCPServerStatusChangedData struct { } func (*SessionMCPServerStatusChangedData) sessionEventData() {} -func (*SessionMCPServerStatusChangedData) Type() SessionEventType { - return SessionEventTypeSessionMCPServerStatusChanged -} +func (*SessionMCPServerStatusChangedData) Type() SessionEventType { return SessionEventTypeSessionMCPServerStatusChanged } // Payload of `session.mcp_servers_loaded` listing MCP server status summaries. type SessionMCPServersLoadedData struct { @@ -1226,9 +1173,7 @@ type SessionMCPServersLoadedData struct { } func (*SessionMCPServersLoadedData) sessionEventData() {} -func (*SessionMCPServersLoadedData) Type() SessionEventType { - return SessionEventTypeSessionMCPServersLoaded -} +func (*SessionMCPServersLoadedData) Type() SessionEventType { return SessionEventTypeSessionMCPServersLoaded } // Payload of `session.skills_loaded` listing resolved skill metadata. type SessionSkillsLoadedData struct { @@ -1236,7 +1181,7 @@ type SessionSkillsLoadedData struct { Skills []SkillsLoadedSkill `json:"skills"` } -func (*SessionSkillsLoadedData) sessionEventData() {} +func (*SessionSkillsLoadedData) sessionEventData() {} func (*SessionSkillsLoadedData) Type() SessionEventType { return SessionEventTypeSessionSkillsLoaded } // Payload of `session.tools_updated` identifying the model whose resolved tools were updated. @@ -1245,7 +1190,7 @@ type SessionToolsUpdatedData struct { Model string `json:"model"` } -func (*SessionToolsUpdatedData) sessionEventData() {} +func (*SessionToolsUpdatedData) sessionEventData() {} func (*SessionToolsUpdatedData) Type() SessionEventType { return SessionEventTypeSessionToolsUpdated } // Payload of `user.message` with displayed and model-transformed content, attachments, source/delivery metadata, mode, and telemetry IDs. @@ -1274,7 +1219,7 @@ type UserMessageData struct { TransformedContent *string `json:"transformedContent,omitempty"` } -func (*UserMessageData) sessionEventData() {} +func (*UserMessageData) sessionEventData() {} func (*UserMessageData) Type() SessionEventType { return SessionEventTypeUserMessage } // Permission request completion notification signaling UI dismissal @@ -1287,7 +1232,7 @@ type PermissionCompletedData struct { ToolCallID *string `json:"toolCallId,omitempty"` } -func (*PermissionCompletedData) sessionEventData() {} +func (*PermissionCompletedData) sessionEventData() {} func (*PermissionCompletedData) Type() SessionEventType { return SessionEventTypePermissionCompleted } // Permission request notification requiring client approval with request details @@ -1304,7 +1249,7 @@ type PermissionRequestedData struct { RiskAssessment any `json:"riskAssessment,omitempty"` } -func (*PermissionRequestedData) sessionEventData() {} +func (*PermissionRequestedData) sessionEventData() {} func (*PermissionRequestedData) Type() SessionEventType { return SessionEventTypePermissionRequested } // Permissions change details carrying the aggregate allow-all transition. @@ -1322,9 +1267,7 @@ type SessionPermissionsChangedData struct { } func (*SessionPermissionsChangedData) sessionEventData() {} -func (*SessionPermissionsChangedData) Type() SessionEventType { - return SessionEventTypeSessionPermissionsChanged -} +func (*SessionPermissionsChangedData) Type() SessionEventType { return SessionEventTypeSessionPermissionsChanged } // Persisted generic client-side tool activations restored when a session resumes. type ToolSearchActivatedData struct { @@ -1334,7 +1277,7 @@ type ToolSearchActivatedData struct { ToolNames []string `json:"toolNames"` } -func (*ToolSearchActivatedData) sessionEventData() {} +func (*ToolSearchActivatedData) sessionEventData() {} func (*ToolSearchActivatedData) Type() SessionEventType { return SessionEventTypeToolSearchActivated } // Plan approval request with plan content and available user actions @@ -1352,9 +1295,7 @@ type ExitPlanModeRequestedData struct { } func (*ExitPlanModeRequestedData) sessionEventData() {} -func (*ExitPlanModeRequestedData) Type() SessionEventType { - return SessionEventTypeExitPlanModeRequested -} +func (*ExitPlanModeRequestedData) Type() SessionEventType { return SessionEventTypeExitPlanModeRequested } // Plan file operation details indicating what changed type SessionPlanChangedData struct { @@ -1362,7 +1303,7 @@ type SessionPlanChangedData struct { Operation PlanChangedOperation `json:"operation"` } -func (*SessionPlanChangedData) sessionEventData() {} +func (*SessionPlanChangedData) sessionEventData() {} func (*SessionPlanChangedData) Type() SessionEventType { return SessionEventTypeSessionPlanChanged } // Plan mode exit completion with the user's approval decision and optional feedback @@ -1380,9 +1321,7 @@ type ExitPlanModeCompletedData struct { } func (*ExitPlanModeCompletedData) sessionEventData() {} -func (*ExitPlanModeCompletedData) Type() SessionEventType { - return SessionEventTypeExitPlanModeCompleted -} +func (*ExitPlanModeCompletedData) Type() SessionEventType { return SessionEventTypeExitPlanModeCompleted } // Queued command completion notification signaling UI dismissal type CommandCompletedData struct { @@ -1390,7 +1329,7 @@ type CommandCompletedData struct { RequestID string `json:"requestId"` } -func (*CommandCompletedData) sessionEventData() {} +func (*CommandCompletedData) sessionEventData() {} func (*CommandCompletedData) Type() SessionEventType { return SessionEventTypeCommandCompleted } // Queued slash command dispatch request for client execution @@ -1401,7 +1340,7 @@ type CommandQueuedData struct { RequestID string `json:"requestId"` } -func (*CommandQueuedData) sessionEventData() {} +func (*CommandQueuedData) sessionEventData() {} func (*CommandQueuedData) Type() SessionEventType { return SessionEventTypeCommandQueued } // Registered command dispatch request routed to the owning client @@ -1416,7 +1355,7 @@ type CommandExecuteData struct { RequestID string `json:"requestId"` } -func (*CommandExecuteData) sessionEventData() {} +func (*CommandExecuteData) sessionEventData() {} func (*CommandExecuteData) Type() SessionEventType { return SessionEventTypeCommandExecute } // Runtime enforcement of enterprise managed settings: fires when the session blocks or caps a runtime action because enterprise policy governs it, so SDK clients can explain *why* an action was governed. Unlike `session.managed_settings_resolved` (which reports *what* is managed), this reports a concrete governed action — e.g. a user or host tried to turn on a bypass-permissions escalation while policy disables it. Emitted live (not persisted to the session event log) on user/host-initiated attempts only, never for silent policy application. Marked experimental while the managed-settings surface stabilizes. @@ -1435,9 +1374,7 @@ type SessionManagedSettingsEnforcedData struct { } func (*SessionManagedSettingsEnforcedData) sessionEventData() {} -func (*SessionManagedSettingsEnforcedData) Type() SessionEventType { - return SessionEventTypeSessionManagedSettingsEnforced -} +func (*SessionManagedSettingsEnforcedData) Type() SessionEventType { return SessionEventTypeSessionManagedSettingsEnforced } // SDK command registration change notification type CommandsChangedData struct { @@ -1445,7 +1382,7 @@ type CommandsChangedData struct { Commands []CommandsChangedCommand `json:"commands"` } -func (*CommandsChangedData) sessionEventData() {} +func (*CommandsChangedData) sessionEventData() {} func (*CommandsChangedData) Type() SessionEventType { return SessionEventTypeCommandsChanged } // Sampling request completion notification signaling UI dismissal @@ -1454,7 +1391,7 @@ type SamplingCompletedData struct { RequestID string `json:"requestId"` } -func (*SamplingCompletedData) sessionEventData() {} +func (*SamplingCompletedData) sessionEventData() {} func (*SamplingCompletedData) Type() SessionEventType { return SessionEventTypeSamplingCompleted } // Sampling request from an MCP server; contains the server name and a requestId for correlation @@ -1467,7 +1404,7 @@ type SamplingRequestedData struct { ServerName string `json:"serverName"` } -func (*SamplingRequestedData) sessionEventData() {} +func (*SamplingRequestedData) sessionEventData() {} func (*SamplingRequestedData) Type() SessionEventType { return SessionEventTypeSamplingRequested } // Scheduled prompt cancelled from the schedule manager dialog @@ -1477,9 +1414,7 @@ type SessionScheduleCancelledData struct { } func (*SessionScheduleCancelledData) sessionEventData() {} -func (*SessionScheduleCancelledData) Type() SessionEventType { - return SessionEventTypeSessionScheduleCancelled -} +func (*SessionScheduleCancelledData) Type() SessionEventType { return SessionEventTypeSessionScheduleCancelled } // Scheduled prompt registered via /every or /after type SessionScheduleCreatedData struct { @@ -1506,9 +1441,7 @@ type SessionScheduleCreatedData struct { } func (*SessionScheduleCreatedData) sessionEventData() {} -func (*SessionScheduleCreatedData) Type() SessionEventType { - return SessionEventTypeSessionScheduleCreated -} +func (*SessionScheduleCreatedData) Type() SessionEventType { return SessionEventTypeSessionScheduleCreated } // Self-paced schedule re-armed for its next run type SessionScheduleRearmedData struct { @@ -1519,9 +1452,7 @@ type SessionScheduleRearmedData struct { } func (*SessionScheduleRearmedData) sessionEventData() {} -func (*SessionScheduleRearmedData) Type() SessionEventType { - return SessionEventTypeSessionScheduleRearmed -} +func (*SessionScheduleRearmedData) Type() SessionEventType { return SessionEventTypeSessionScheduleRearmed } // Session capability change notification type CapabilitiesChangedData struct { @@ -1529,7 +1460,7 @@ type CapabilitiesChangedData struct { UI *CapabilitiesChangedUI `json:"ui,omitempty"` } -func (*CapabilitiesChangedData) sessionEventData() {} +func (*CapabilitiesChangedData) sessionEventData() {} func (*CapabilitiesChangedData) Type() SessionEventType { return SessionEventTypeCapabilitiesChanged } // Session handoff metadata including source, context, and repository information @@ -1550,7 +1481,7 @@ type SessionHandoffData struct { Summary *string `json:"summary,omitempty"` } -func (*SessionHandoffData) sessionEventData() {} +func (*SessionHandoffData) sessionEventData() {} func (*SessionHandoffData) Type() SessionEventType { return SessionEventTypeSessionHandoff } // Session initialization metadata including context and configuration @@ -1587,7 +1518,7 @@ type SessionStartData struct { Version int64 `json:"version"` } -func (*SessionStartData) sessionEventData() {} +func (*SessionStartData) sessionEventData() {} func (*SessionStartData) Type() SessionEventType { return SessionEventTypeSessionStart } // Session limit exhaustion notification requiring user action. @@ -1601,9 +1532,7 @@ type SessionLimitsExhaustedRequestedData struct { } func (*SessionLimitsExhaustedRequestedData) sessionEventData() {} -func (*SessionLimitsExhaustedRequestedData) Type() SessionEventType { - return SessionEventTypeSessionLimitsExhaustedRequested -} +func (*SessionLimitsExhaustedRequestedData) Type() SessionEventType { return SessionEventTypeSessionLimitsExhaustedRequested } // Session limit exhaustion prompt completion notification. type SessionLimitsExhaustedCompletedData struct { @@ -1614,9 +1543,7 @@ type SessionLimitsExhaustedCompletedData struct { } func (*SessionLimitsExhaustedCompletedData) sessionEventData() {} -func (*SessionLimitsExhaustedCompletedData) Type() SessionEventType { - return SessionEventTypeSessionLimitsExhaustedCompleted -} +func (*SessionLimitsExhaustedCompletedData) Type() SessionEventType { return SessionEventTypeSessionLimitsExhaustedCompleted } // Session limits update details. Null clears the limits. type SessionSessionLimitsChangedData struct { @@ -1625,9 +1552,7 @@ type SessionSessionLimitsChangedData struct { } func (*SessionSessionLimitsChangedData) sessionEventData() {} -func (*SessionSessionLimitsChangedData) Type() SessionEventType { - return SessionEventTypeSessionSessionLimitsChanged -} +func (*SessionSessionLimitsChangedData) Type() SessionEventType { return SessionEventTypeSessionSessionLimitsChanged } // Session resume metadata including current context and event count type SessionResumeData struct { @@ -1661,7 +1586,7 @@ type SessionResumeData struct { Verbosity *Verbosity `json:"verbosity,omitempty"` } -func (*SessionResumeData) sessionEventData() {} +func (*SessionResumeData) sessionEventData() {} func (*SessionResumeData) Type() SessionEventType { return SessionEventTypeSessionResume } // Session rewind details including target event and count of removed events @@ -1673,9 +1598,7 @@ type SessionSnapshotRewindData struct { } func (*SessionSnapshotRewindData) sessionEventData() {} -func (*SessionSnapshotRewindData) Type() SessionEventType { - return SessionEventTypeSessionSnapshotRewind -} +func (*SessionSnapshotRewindData) Type() SessionEventType { return SessionEventTypeSessionSnapshotRewind } // Session termination metrics including usage statistics, code changes, and shutdown reason type SessionShutdownData struct { @@ -1713,7 +1636,7 @@ type SessionShutdownData struct { TotalPremiumRequests *float64 `json:"totalPremiumRequests,omitempty"` } -func (*SessionShutdownData) sessionEventData() {} +func (*SessionShutdownData) sessionEventData() {} func (*SessionShutdownData) Type() SessionEventType { return SessionEventTypeSessionShutdown } // Session title change payload containing the new display title @@ -1722,14 +1645,14 @@ type SessionTitleChangedData struct { Title string `json:"title"` } -func (*SessionTitleChangedData) sessionEventData() {} +func (*SessionTitleChangedData) sessionEventData() {} func (*SessionTitleChangedData) Type() SessionEventType { return SessionEventTypeSessionTitleChanged } // Signal-only event: the agent's todos or todo_deps table was written to. No payload — clients should call session.plan.readSqlTodosWithDependencies() to fetch the current state. Events arrive in order; clients can debounce on arrival if needed. type SessionTodosChangedData struct { } -func (*SessionTodosChangedData) sessionEventData() {} +func (*SessionTodosChangedData) sessionEventData() {} func (*SessionTodosChangedData) Type() SessionEventType { return SessionEventTypeSessionTodosChanged } // Skill invocation details including content, allowed tools, and plugin metadata @@ -1756,7 +1679,7 @@ type SkillInvokedData struct { Trigger *SkillInvokedTrigger `json:"trigger,omitempty"` } -func (*SkillInvokedData) sessionEventData() {} +func (*SkillInvokedData) sessionEventData() {} func (*SkillInvokedData) Type() SessionEventType { return SessionEventTypeSkillInvoked } // Streaming assistant message delta for incremental response updates @@ -1771,9 +1694,7 @@ type AssistantMessageDeltaData struct { } func (*AssistantMessageDeltaData) sessionEventData() {} -func (*AssistantMessageDeltaData) Type() SessionEventType { - return SessionEventTypeAssistantMessageDelta -} +func (*AssistantMessageDeltaData) Type() SessionEventType { return SessionEventTypeAssistantMessageDelta } // Streaming assistant message start metadata type AssistantMessageStartData struct { @@ -1784,9 +1705,7 @@ type AssistantMessageStartData struct { } func (*AssistantMessageStartData) sessionEventData() {} -func (*AssistantMessageStartData) Type() SessionEventType { - return SessionEventTypeAssistantMessageStart -} +func (*AssistantMessageStartData) Type() SessionEventType { return SessionEventTypeAssistantMessageStart } // Streaming reasoning delta for incremental extended thinking updates type AssistantReasoningDeltaData struct { @@ -1797,9 +1716,7 @@ type AssistantReasoningDeltaData struct { } func (*AssistantReasoningDeltaData) sessionEventData() {} -func (*AssistantReasoningDeltaData) Type() SessionEventType { - return SessionEventTypeAssistantReasoningDelta -} +func (*AssistantReasoningDeltaData) Type() SessionEventType { return SessionEventTypeAssistantReasoningDelta } // Streaming response progress with cumulative byte count type AssistantStreamingDeltaData struct { @@ -1808,9 +1725,7 @@ type AssistantStreamingDeltaData struct { } func (*AssistantStreamingDeltaData) sessionEventData() {} -func (*AssistantStreamingDeltaData) Type() SessionEventType { - return SessionEventTypeAssistantStreamingDelta -} +func (*AssistantStreamingDeltaData) Type() SessionEventType { return SessionEventTypeAssistantStreamingDelta } // Streaming tool execution output for incremental result display type ToolExecutionPartialResultData struct { @@ -1821,9 +1736,7 @@ type ToolExecutionPartialResultData struct { } func (*ToolExecutionPartialResultData) sessionEventData() {} -func (*ToolExecutionPartialResultData) Type() SessionEventType { - return SessionEventTypeToolExecutionPartialResult -} +func (*ToolExecutionPartialResultData) Type() SessionEventType { return SessionEventTypeToolExecutionPartialResult } // Streaming tool-call input delta for incremental tool-call updates type AssistantToolCallDeltaData struct { @@ -1838,9 +1751,7 @@ type AssistantToolCallDeltaData struct { } func (*AssistantToolCallDeltaData) sessionEventData() {} -func (*AssistantToolCallDeltaData) Type() SessionEventType { - return SessionEventTypeAssistantToolCallDelta -} +func (*AssistantToolCallDeltaData) Type() SessionEventType { return SessionEventTypeAssistantToolCallDelta } // Sub-agent completion details for successful execution type SubagentCompletedData struct { @@ -1860,7 +1771,7 @@ type SubagentCompletedData struct { TotalToolCalls *int64 `json:"totalToolCalls,omitempty"` } -func (*SubagentCompletedData) sessionEventData() {} +func (*SubagentCompletedData) sessionEventData() {} func (*SubagentCompletedData) Type() SessionEventType { return SessionEventTypeSubagentCompleted } // Sub-agent failure details including error message and agent information @@ -1883,7 +1794,7 @@ type SubagentFailedData struct { TotalToolCalls *int64 `json:"totalToolCalls,omitempty"` } -func (*SubagentFailedData) sessionEventData() {} +func (*SubagentFailedData) sessionEventData() {} func (*SubagentFailedData) Type() SessionEventType { return SessionEventTypeSubagentFailed } // Sub-agent startup details including parent tool call and agent information @@ -1900,7 +1811,7 @@ type SubagentStartedData struct { ToolCallID string `json:"toolCallId"` } -func (*SubagentStartedData) sessionEventData() {} +func (*SubagentStartedData) sessionEventData() {} func (*SubagentStartedData) Type() SessionEventType { return SessionEventTypeSubagentStarted } // System-generated notification for runtime events like background task completion @@ -1911,7 +1822,7 @@ type SystemNotificationData struct { Kind SystemNotification `json:"kind"` } -func (*SystemNotificationData) sessionEventData() {} +func (*SystemNotificationData) sessionEventData() {} func (*SystemNotificationData) Type() SessionEventType { return SessionEventTypeSystemNotification } // System/developer instruction content with role and optional template metadata @@ -1928,7 +1839,7 @@ type SystemMessageData struct { Role SystemMessageRole `json:"role"` } -func (*SystemMessageData) sessionEventData() {} +func (*SystemMessageData) sessionEventData() {} func (*SystemMessageData) Type() SessionEventType { return SessionEventTypeSystemMessage } // Task completion notification with summary from the agent @@ -1945,7 +1856,7 @@ type SessionTaskCompleteData struct { Summary *string `json:"summary,omitempty"` } -func (*SessionTaskCompleteData) sessionEventData() {} +func (*SessionTaskCompleteData) sessionEventData() {} func (*SessionTaskCompleteData) Type() SessionEventType { return SessionEventTypeSessionTaskComplete } // Tool execution completion results including success status, detailed output, and error information @@ -1966,7 +1877,7 @@ type ToolExecutionCompleteData struct { ParentToolCallID *string `json:"parentToolCallId,omitempty"` // Tool execution result on success Result *ToolExecutionCompleteResult `json:"result,omitempty"` - Rte *bool `json:"rte,omitempty"` + Rte *bool `json:"rte,omitempty"` // Whether this tool execution ran inside a sandbox container Sandboxed *bool `json:"sandboxed,omitempty"` // Whether the tool execution completed successfully @@ -1982,9 +1893,7 @@ type ToolExecutionCompleteData struct { } func (*ToolExecutionCompleteData) sessionEventData() {} -func (*ToolExecutionCompleteData) Type() SessionEventType { - return SessionEventTypeToolExecutionComplete -} +func (*ToolExecutionCompleteData) Type() SessionEventType { return SessionEventTypeToolExecutionComplete } // Tool execution progress notification with status message type ToolExecutionProgressData struct { @@ -1995,9 +1904,7 @@ type ToolExecutionProgressData struct { } func (*ToolExecutionProgressData) sessionEventData() {} -func (*ToolExecutionProgressData) Type() SessionEventType { - return SessionEventTypeToolExecutionProgress -} +func (*ToolExecutionProgressData) Type() SessionEventType { return SessionEventTypeToolExecutionProgress } // Tool execution startup details including MCP server information when applicable type ToolExecutionStartData struct { @@ -2014,7 +1921,7 @@ type ToolExecutionStartData struct { // Tool call ID of the parent tool invocation when this event originates from a sub-agent // Deprecated: ParentToolCallID is deprecated. ParentToolCallID *string `json:"parentToolCallId,omitempty"` - Rte *bool `json:"rte,omitempty"` + Rte *bool `json:"rte,omitempty"` // Shell-tool path hints derived from the command at start time for shell tools (bash/powershell/local_shell). Produced by the same shell-aware extractor as PermissionRequestShell.possiblePaths, so it is present even when the command is auto-approved and no permission request fires. Absent for non-shell tools. ShellToolInfo *ToolExecutionStartShellToolInfo `json:"shellToolInfo,omitempty"` // Unique identifier for this tool call @@ -2027,7 +1934,7 @@ type ToolExecutionStartData struct { TurnID *string `json:"turnId,omitempty"` } -func (*ToolExecutionStartData) sessionEventData() {} +func (*ToolExecutionStartData) sessionEventData() {} func (*ToolExecutionStartData) Type() SessionEventType { return SessionEventTypeToolExecutionStart } // Transient signal that an open canvas instance's provider has dropped (for example the extension is reloading mid-session). The host should keep the panel mounted and surface a reconnecting affordance rather than tearing it down; a subsequent `session.canvas.opened` for the same instanceId clears the affordance once the provider reconnects with a fresh url. Ephemeral and never persisted, so it is never replayed on cold resume. @@ -2042,9 +1949,7 @@ type SessionCanvasUnavailableData struct { } func (*SessionCanvasUnavailableData) sessionEventData() {} -func (*SessionCanvasUnavailableData) Type() SessionEventType { - return SessionEventTypeSessionCanvasUnavailable -} +func (*SessionCanvasUnavailableData) Type() SessionEventType { return SessionEventTypeSessionCanvasUnavailable } // Turn abort information including the reason for termination type AbortData struct { @@ -2052,7 +1957,7 @@ type AbortData struct { Reason AbortReason `json:"reason"` } -func (*AbortData) sessionEventData() {} +func (*AbortData) sessionEventData() {} func (*AbortData) Type() SessionEventType { return SessionEventTypeAbort } // Turn completion metadata including the turn identifier @@ -2063,7 +1968,7 @@ type AssistantTurnEndData struct { TurnID string `json:"turnId"` } -func (*AssistantTurnEndData) sessionEventData() {} +func (*AssistantTurnEndData) sessionEventData() {} func (*AssistantTurnEndData) Type() SessionEventType { return SessionEventTypeAssistantTurnEnd } // Turn initialization metadata including identifier and interaction tracking @@ -2076,7 +1981,7 @@ type AssistantTurnStartData struct { TurnID string `json:"turnId"` } -func (*AssistantTurnStartData) sessionEventData() {} +func (*AssistantTurnStartData) sessionEventData() {} func (*AssistantTurnStartData) Type() SessionEventType { return SessionEventTypeAssistantTurnStart } // User input request completion with the user's response @@ -2089,7 +1994,7 @@ type UserInputCompletedData struct { WasFreeform *bool `json:"wasFreeform,omitempty"` } -func (*UserInputCompletedData) sessionEventData() {} +func (*UserInputCompletedData) sessionEventData() {} func (*UserInputCompletedData) Type() SessionEventType { return SessionEventTypeUserInputCompleted } // User input request notification with question and optional predefined choices @@ -2106,7 +2011,7 @@ type UserInputRequestedData struct { ToolCallID *string `json:"toolCallId,omitempty"` } -func (*UserInputRequestedData) sessionEventData() {} +func (*UserInputRequestedData) sessionEventData() {} func (*UserInputRequestedData) Type() SessionEventType { return SessionEventTypeUserInputRequested } // User-initiated tool invocation request with tool name and arguments @@ -2119,7 +2024,7 @@ type ToolUserRequestedData struct { ToolName string `json:"toolName"` } -func (*ToolUserRequestedData) sessionEventData() {} +func (*ToolUserRequestedData) sessionEventData() {} func (*ToolUserRequestedData) Type() SessionEventType { return SessionEventTypeToolUserRequested } // Warning message for timeline display with categorization @@ -2132,7 +2037,7 @@ type SessionWarningData struct { WarningType string `json:"warningType"` } -func (*SessionWarningData) sessionEventData() {} +func (*SessionWarningData) sessionEventData() {} func (*SessionWarningData) Type() SessionEventType { return SessionEventTypeSessionWarning } // Working directory and git context at session start @@ -2158,9 +2063,7 @@ type SessionContextChangedData struct { } func (*SessionContextChangedData) sessionEventData() {} -func (*SessionContextChangedData) Type() SessionEventType { - return SessionEventTypeSessionContextChanged -} +func (*SessionContextChangedData) Type() SessionEventType { return SessionEventTypeSessionContextChanged } // Workspace file change details including path and operation type type SessionWorkspaceFileChangedData struct { @@ -2171,18 +2074,16 @@ type SessionWorkspaceFileChangedData struct { } func (*SessionWorkspaceFileChangedData) sessionEventData() {} -func (*SessionWorkspaceFileChangedData) Type() SessionEventType { - return SessionEventTypeSessionWorkspaceFileChanged -} +func (*SessionWorkspaceFileChangedData) Type() SessionEventType { return SessionEventTypeSessionWorkspaceFileChanged } // Neutral provider-tagged server-side tool-use payload (tool search, advisor) for verbatim round-tripping // Experimental: AssistantMessageServerTools is part of an experimental API and may change or be removed. type AssistantMessageServerTools struct { - AdvisorModel *string `json:"advisorModel,omitempty"` + AdvisorModel *string `json:"advisorModel,omitempty"` FunctionCallNamespaces map[string]string `json:"functionCallNamespaces,omitzero"` - Items []any `json:"items,omitzero"` - Provider string `json:"provider"` - RawContentBlocks []any `json:"rawContentBlocks,omitzero"` + Items []any `json:"items,omitzero"` + Provider string `json:"provider"` + RawContentBlocks []any `json:"rawContentBlocks,omitzero"` } // A tool invocation request from the assistant @@ -2337,7 +2238,6 @@ func (RawCitationLocation) citationLocation() {} func (r RawCitationLocation) Type() CitationLocationType { return r.Discriminator } - // A content-block range within a structured source document. type CitationLocationBlock struct { // Index of the last content block of the cited range (zero-based, exclusive). @@ -2350,7 +2250,6 @@ func (CitationLocationBlock) citationLocation() {} func (CitationLocationBlock) Type() CitationLocationType { return CitationLocationTypeBlock } - // A character range within the source's text content. type CitationLocationChar struct { // End character offset within the source text (zero-based, exclusive). @@ -2363,7 +2262,6 @@ func (CitationLocationChar) citationLocation() {} func (CitationLocationChar) Type() CitationLocationType { return CitationLocationTypeChar } - // A page range within a paginated source document. type CitationLocationPage struct { // Last page number of the cited range (inclusive). @@ -2660,7 +2558,6 @@ func (RawPermissionPromptRequest) permissionPromptRequest() {} func (r RawPermissionPromptRequest) Kind() PermissionPromptRequestKind { return r.Discriminator } - // Shell command permission prompt type PermissionPromptRequestCommands struct { // Auto-approval judge information for this request; present only when auto mode is enabled. @@ -2686,7 +2583,6 @@ func (PermissionPromptRequestCommands) permissionPromptRequest() {} func (PermissionPromptRequestCommands) Kind() PermissionPromptRequestKind { return PermissionPromptRequestKindCommands } - // Custom tool invocation permission prompt type PermissionPromptRequestCustomTool struct { // Arguments to pass to the custom tool @@ -2706,7 +2602,6 @@ func (PermissionPromptRequestCustomTool) permissionPromptRequest() {} func (PermissionPromptRequestCustomTool) Kind() PermissionPromptRequestKind { return PermissionPromptRequestKindCustomTool } - // Extension management permission prompt type PermissionPromptRequestExtensionManagement struct { // Auto-approval judge information for this request; present only when auto mode is enabled. @@ -2724,7 +2619,6 @@ func (PermissionPromptRequestExtensionManagement) permissionPromptRequest() {} func (PermissionPromptRequestExtensionManagement) Kind() PermissionPromptRequestKind { return PermissionPromptRequestKindExtensionManagement } - // Extension permission access prompt type PermissionPromptRequestExtensionPermissionAccess struct { // Auto-approval judge information for this request; present only when auto mode is enabled. @@ -2742,7 +2636,6 @@ func (PermissionPromptRequestExtensionPermissionAccess) permissionPromptRequest( func (PermissionPromptRequestExtensionPermissionAccess) Kind() PermissionPromptRequestKind { return PermissionPromptRequestKindExtensionPermissionAccess } - // Hook confirmation permission prompt type PermissionPromptRequestHook struct { // Auto-approval judge information for this request; present only when auto mode is enabled. @@ -2762,7 +2655,6 @@ func (PermissionPromptRequestHook) permissionPromptRequest() {} func (PermissionPromptRequestHook) Kind() PermissionPromptRequestKind { return PermissionPromptRequestKindHook } - // MCP tool invocation permission prompt type PermissionPromptRequestMCP struct { // Arguments to pass to the MCP tool @@ -2784,7 +2676,6 @@ func (PermissionPromptRequestMCP) permissionPromptRequest() {} func (PermissionPromptRequestMCP) Kind() PermissionPromptRequestKind { return PermissionPromptRequestKindMCP } - // Memory operation permission prompt type PermissionPromptRequestMemory struct { // Whether this is a store or vote memory operation @@ -2810,7 +2701,6 @@ func (PermissionPromptRequestMemory) permissionPromptRequest() {} func (PermissionPromptRequestMemory) Kind() PermissionPromptRequestKind { return PermissionPromptRequestKindMemory } - // Path access permission prompt type PermissionPromptRequestPath struct { // Underlying permission kind that needs path approval @@ -2828,7 +2718,6 @@ func (PermissionPromptRequestPath) permissionPromptRequest() {} func (PermissionPromptRequestPath) Kind() PermissionPromptRequestKind { return PermissionPromptRequestKindPath } - // File read permission prompt type PermissionPromptRequestRead struct { // Auto-approval judge information for this request; present only when auto mode is enabled. @@ -2848,7 +2737,6 @@ func (PermissionPromptRequestRead) permissionPromptRequest() {} func (PermissionPromptRequestRead) Kind() PermissionPromptRequestKind { return PermissionPromptRequestKindRead } - // URL access permission prompt type PermissionPromptRequestURL struct { // Auto-approval judge information for this request; present only when auto mode is enabled. @@ -2874,7 +2762,6 @@ func (PermissionPromptRequestURL) permissionPromptRequest() {} func (PermissionPromptRequestURL) Kind() PermissionPromptRequestKind { return PermissionPromptRequestKindURL } - // File write permission prompt type PermissionPromptRequestWrite struct { // Auto-approval judge information for this request; present only when auto mode is enabled. @@ -2917,7 +2804,6 @@ func (RawPermissionRequest) permissionRequest() {} func (r RawPermissionRequest) Kind() PermissionRequestKind { return r.Discriminator } - // Custom tool invocation permission request type PermissionRequestCustomTool struct { // Arguments to pass to the custom tool @@ -2936,7 +2822,6 @@ func (PermissionRequestCustomTool) permissionRequest() {} func (PermissionRequestCustomTool) Kind() PermissionRequestKind { return PermissionRequestKindCustomTool } - // Extension management permission request type PermissionRequestExtensionManagement struct { // Name of the extension being managed @@ -2953,7 +2838,6 @@ func (PermissionRequestExtensionManagement) permissionRequest() {} func (PermissionRequestExtensionManagement) Kind() PermissionRequestKind { return PermissionRequestKindExtensionManagement } - // Extension permission access request type PermissionRequestExtensionPermissionAccess struct { // Capabilities the extension is requesting @@ -2970,7 +2854,6 @@ func (PermissionRequestExtensionPermissionAccess) permissionRequest() {} func (PermissionRequestExtensionPermissionAccess) Kind() PermissionRequestKind { return PermissionRequestKindExtensionPermissionAccess } - // Hook confirmation permission request type PermissionRequestHook struct { // Optional message from the hook explaining why confirmation is needed @@ -2989,7 +2872,6 @@ func (PermissionRequestHook) permissionRequest() {} func (PermissionRequestHook) Kind() PermissionRequestKind { return PermissionRequestKindHook } - // MCP tool invocation permission request type PermissionRequestMCP struct { // Arguments to pass to the MCP tool @@ -3012,7 +2894,6 @@ func (PermissionRequestMCP) permissionRequest() {} func (PermissionRequestMCP) Kind() PermissionRequestKind { return PermissionRequestKindMCP } - // Memory operation permission request type PermissionRequestMemory struct { // Whether this is a store or vote memory operation @@ -3037,12 +2918,11 @@ func (PermissionRequestMemory) permissionRequest() {} func (PermissionRequestMemory) Kind() PermissionRequestKind { return PermissionRequestKindMemory } - // File or directory read permission request type PermissionRequestRead struct { // Human-readable description of why the file is being read Intention string `json:"intention"` - // When true, managed policy requires an explicit user decision and automatic approval must be bypassed. + // Whether managed policy requires a human response and forbids host auto-approval ManagedApprovalRequired *bool `json:"managedApprovalRequired,omitempty"` // Path of the file or directory being read Path string `json:"path"` @@ -3058,7 +2938,6 @@ func (PermissionRequestRead) permissionRequest() {} func (PermissionRequestRead) Kind() PermissionRequestKind { return PermissionRequestKindRead } - // Shell command permission request type PermissionRequestShell struct { // Whether the UI can offer session-wide approval for this command pattern @@ -3073,7 +2952,7 @@ type PermissionRequestShell struct { HasWriteFileRedirection bool `json:"hasWriteFileRedirection"` // Human-readable description of what the command intends to do Intention string `json:"intention"` - // When true, managed policy requires an explicit user decision and automatic approval must be bypassed. + // Whether managed policy requires a human response and forbids host auto-approval ManagedApprovalRequired *bool `json:"managedApprovalRequired,omitempty"` // File paths that may be read or written by the command PossiblePaths []string `json:"possiblePaths"` @@ -3093,12 +2972,11 @@ func (PermissionRequestShell) permissionRequest() {} func (PermissionRequestShell) Kind() PermissionRequestKind { return PermissionRequestKindShell } - // URL access permission request type PermissionRequestURL struct { // Human-readable description of why the URL is being accessed Intention string `json:"intention"` - // When true, managed policy requires an explicit user decision and automatic approval must be bypassed. + // Whether managed policy requires a human response and forbids host auto-approval ManagedApprovalRequired *bool `json:"managedApprovalRequired,omitempty"` // Immediately preceding URL when this request is for a redirect target RedirectedFrom *string `json:"redirectedFrom,omitempty"` @@ -3116,7 +2994,6 @@ func (PermissionRequestURL) permissionRequest() {} func (PermissionRequestURL) Kind() PermissionRequestKind { return PermissionRequestKindURL } - // File write permission request type PermissionRequestWrite struct { // Whether the UI can offer session-wide approval for file write operations @@ -3127,7 +3004,7 @@ type PermissionRequestWrite struct { FileName string `json:"fileName"` // Human-readable description of the intended file change Intention string `json:"intention"` - // When true, managed policy requires an explicit user decision and automatic approval must be bypassed. + // Whether managed policy requires a human response and forbids host auto-approval ManagedApprovalRequired *bool `json:"managedApprovalRequired,omitempty"` // Complete new file contents for newly created files NewFileContents *string `json:"newFileContents,omitempty"` @@ -3181,7 +3058,6 @@ func (RawPermissionResult) permissionResult() {} func (r RawPermissionResult) Kind() PermissionResultKind { return r.Discriminator } - // Permission response variant indicating the request was approved without persisting an approval rule. type PermissionApproved struct { } @@ -3190,7 +3066,6 @@ func (PermissionApproved) permissionResult() {} func (PermissionApproved) Kind() PermissionResultKind { return PermissionResultKindApproved } - // Permission response variant that approves a request and persists the provided approval to a project location key. type PermissionApprovedForLocation struct { // The approval to persist for this location @@ -3203,7 +3078,6 @@ func (PermissionApprovedForLocation) permissionResult() {} func (PermissionApprovedForLocation) Kind() PermissionResultKind { return PermissionResultKindApprovedForLocation } - // Permission response variant that approves a request and remembers the provided approval for the rest of the session. type PermissionApprovedForSession struct { // The approval to add as a session-scoped rule @@ -3214,7 +3088,6 @@ func (PermissionApprovedForSession) permissionResult() {} func (PermissionApprovedForSession) Kind() PermissionResultKind { return PermissionResultKindApprovedForSession } - // Permission response variant indicating the request was cancelled before use, with an optional reason. type PermissionCancelled struct { // Optional explanation of why the request was cancelled @@ -3225,7 +3098,6 @@ func (PermissionCancelled) permissionResult() {} func (PermissionCancelled) Kind() PermissionResultKind { return PermissionResultKindCancelled } - // Permission response variant denying a path under content exclusion policy, with the path and message. type PermissionDeniedByContentExclusionPolicy struct { // Human-readable explanation of why the path was excluded @@ -3238,7 +3110,6 @@ func (PermissionDeniedByContentExclusionPolicy) permissionResult() {} func (PermissionDeniedByContentExclusionPolicy) Kind() PermissionResultKind { return PermissionResultKindDeniedByContentExclusionPolicy } - // Permission response variant denied by a permission-request hook, with optional message and interrupt flag. type PermissionDeniedByPermissionRequestHook struct { // Whether to interrupt the current agent turn @@ -3251,7 +3122,6 @@ func (PermissionDeniedByPermissionRequestHook) permissionResult() {} func (PermissionDeniedByPermissionRequestHook) Kind() PermissionResultKind { return PermissionResultKindDeniedByPermissionRequestHook } - // Permission response variant denied because matching approval rules explicitly blocked the request. type PermissionDeniedByRules struct { // Rules that denied the request @@ -3262,7 +3132,6 @@ func (PermissionDeniedByRules) permissionResult() {} func (PermissionDeniedByRules) Kind() PermissionResultKind { return PermissionResultKindDeniedByRules } - // Permission response variant denied in an interactive user prompt, with optional feedback and force-reject flag. type PermissionDeniedInteractivelyByUser struct { // Optional feedback from the user explaining the denial @@ -3275,7 +3144,6 @@ func (PermissionDeniedInteractivelyByUser) permissionResult() {} func (PermissionDeniedInteractivelyByUser) Kind() PermissionResultKind { return PermissionResultKindDeniedInteractivelyByUser } - // Permission response variant denied because no approval rule matched and user confirmation was unavailable. type PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser struct { } @@ -3301,7 +3169,6 @@ func (RawPersistedBinaryResult) persistedBinaryResult() {} func (r RawPersistedBinaryResult) Type() PersistedBinaryResultType { return r.Discriminator } - // A reference to binary data persisted once on a session.binary_asset event and shared by id type BinaryAssetReference struct { // Content-addressed id of the session.binary_asset event that holds this binary's bytes (e.g. "sha256:..."). @@ -3313,7 +3180,7 @@ type BinaryAssetReference struct { // Optional metadata from the producing tool. Metadata map[string]any `json:"metadata,omitzero"` // MIME type of the referenced binary data - MIMEType string `json:"mimeType"` + MIMEType string `json:"mimeType"` Discriminator BinaryAssetReferenceType `json:"type,omitempty"` } @@ -3324,7 +3191,6 @@ func (r BinaryAssetReference) Type() PersistedBinaryResultType { } return PersistedBinaryResultType(r.Discriminator) } - // A binary result whose data was omitted from persistence due to the inline size limit type OmittedBinaryResult struct { // Decoded byte length of the omitted binary data @@ -3337,7 +3203,7 @@ type OmittedBinaryResult struct { MIMEType string `json:"mimeType"` // Why the binary data is absent: it exceeded the inline size limit, or its asset was unavailable OmittedReason OmittedBinaryOmittedReason `json:"omittedReason"` - Discriminator OmittedBinaryType `json:"type,omitempty"` + Discriminator OmittedBinaryType `json:"type,omitempty"` } func (OmittedBinaryResult) persistedBinaryResult() {} @@ -3347,7 +3213,6 @@ func (r OmittedBinaryResult) Type() PersistedBinaryResultType { } return PersistedBinaryResultType(r.Discriminator) } - // Binary result returned by a tool for the model type PersistedBinaryImage struct { // Base64-encoded binary data @@ -3357,7 +3222,7 @@ type PersistedBinaryImage struct { // Optional metadata from the producing tool. Metadata map[string]any `json:"metadata,omitzero"` // MIME type of the binary data - MIMEType string `json:"mimeType"` + MIMEType string `json:"mimeType"` Discriminator PersistedBinaryImageType `json:"type,omitempty"` } @@ -3479,7 +3344,6 @@ func (RawSystemNotification) systemNotification() {} func (r RawSystemNotification) Type() SystemNotificationType { return r.Discriminator } - // System notification metadata for a background agent that completed or failed, including agent ID, type, status, description, and prompt. type SystemNotificationAgentCompleted struct { // Unique identifier of the background agent @@ -3498,7 +3362,6 @@ func (SystemNotificationAgentCompleted) systemNotification() {} func (SystemNotificationAgentCompleted) Type() SystemNotificationType { return SystemNotificationTypeAgentCompleted } - // System notification metadata for a background agent that became idle, including agent ID, type, and description. type SystemNotificationAgentIdle struct { // Unique identifier of the background agent @@ -3513,7 +3376,6 @@ func (SystemNotificationAgentIdle) systemNotification() {} func (SystemNotificationAgentIdle) Type() SystemNotificationType { return SystemNotificationTypeAgentIdle } - // System notification metadata for an instruction file discovered during tool access, including source, trigger file, and tool. type SystemNotificationInstructionDiscovered struct { // Human-readable label for the timeline (e.g., 'AGENTS.md from packages/billing/') @@ -3530,7 +3392,6 @@ func (SystemNotificationInstructionDiscovered) systemNotification() {} func (SystemNotificationInstructionDiscovered) Type() SystemNotificationType { return SystemNotificationTypeInstructionDiscovered } - // System notification metadata for a new inbox message, including entry ID, sender details, and summary. type SystemNotificationNewInboxMessage struct { // Unique identifier of the inbox entry @@ -3547,7 +3408,6 @@ func (SystemNotificationNewInboxMessage) systemNotification() {} func (SystemNotificationNewInboxMessage) Type() SystemNotificationType { return SystemNotificationTypeNewInboxMessage } - // System notification metadata for a shell session that completed, including shell ID, optional exit code, and description. type SystemNotificationShellCompleted struct { // Human-readable description of the command @@ -3562,7 +3422,6 @@ func (SystemNotificationShellCompleted) systemNotification() {} func (SystemNotificationShellCompleted) Type() SystemNotificationType { return SystemNotificationTypeShellCompleted } - // System notification metadata for a detached shell session that completed, including shell ID and description. type SystemNotificationShellDetachedCompleted struct { // Human-readable description of the command @@ -3575,7 +3434,6 @@ func (SystemNotificationShellDetachedCompleted) systemNotification() {} func (SystemNotificationShellDetachedCompleted) Type() SystemNotificationType { return SystemNotificationTypeShellDetachedCompleted } - // System notification metadata from an external host that does not match a runtime-owned notification kind. type SystemNotificationUnclassified struct { // Opaque metadata supplied by the external host, when present. @@ -3602,7 +3460,6 @@ func (RawToolExecutionCompleteContent) toolExecutionCompleteContent() {} func (r RawToolExecutionCompleteContent) Type() ToolExecutionCompleteContentType { return r.Discriminator } - // Audio content block with base64-encoded data type ToolExecutionCompleteContentAudio struct { // Base64-encoded audio data @@ -3615,7 +3472,6 @@ func (ToolExecutionCompleteContentAudio) toolExecutionCompleteContent() {} func (ToolExecutionCompleteContentAudio) Type() ToolExecutionCompleteContentType { return ToolExecutionCompleteContentTypeAudio } - // Image content block with base64-encoded data type ToolExecutionCompleteContentImage struct { // Base64-encoded image data @@ -3628,7 +3484,6 @@ func (ToolExecutionCompleteContentImage) toolExecutionCompleteContent() {} func (ToolExecutionCompleteContentImage) Type() ToolExecutionCompleteContentType { return ToolExecutionCompleteContentTypeImage } - // Embedded resource content block with inline text or binary data type ToolExecutionCompleteContentResource struct { // The embedded resource contents, either text or base64-encoded binary @@ -3639,7 +3494,6 @@ func (ToolExecutionCompleteContentResource) toolExecutionCompleteContent() {} func (ToolExecutionCompleteContentResource) Type() ToolExecutionCompleteContentType { return ToolExecutionCompleteContentTypeResource } - // Resource link content block referencing an external resource type ToolExecutionCompleteContentResourceLink struct { // Human-readable description of the resource @@ -3662,7 +3516,6 @@ func (ToolExecutionCompleteContentResourceLink) toolExecutionCompleteContent() { func (ToolExecutionCompleteContentResourceLink) Type() ToolExecutionCompleteContentType { return ToolExecutionCompleteContentTypeResourceLink } - // Shell command exit metadata with optional output preview type ToolExecutionCompleteContentShellExit struct { // Working directory where the shell command was executed @@ -3681,7 +3534,6 @@ func (ToolExecutionCompleteContentShellExit) toolExecutionCompleteContent() {} func (ToolExecutionCompleteContentShellExit) Type() ToolExecutionCompleteContentType { return ToolExecutionCompleteContentTypeShellExit } - // Deprecated for shell command exit metadata. Use ToolExecutionCompleteContentShellExit instead. type ToolExecutionCompleteContentTerminal struct { // Working directory where the command was executed @@ -3696,7 +3548,6 @@ func (ToolExecutionCompleteContentTerminal) toolExecutionCompleteContent() {} func (ToolExecutionCompleteContentTerminal) Type() ToolExecutionCompleteContentType { return ToolExecutionCompleteContentTypeTerminal } - // Plain text content block type ToolExecutionCompleteContentText struct { // The text content @@ -3804,18 +3655,18 @@ type ToolExecutionCompleteUIResourceMeta struct { // MCP Apps UI resource metadata for a completed tool result, including CSP, permissions, domain, and border preference. type ToolExecutionCompleteUIResourceMetaUI struct { // CSP domain allowlists for an MCP Apps UI resource, including connect, resource, frame, and base URI domains. - Csp *ToolExecutionCompleteUIResourceMetaUICsp `json:"csp,omitempty"` - Domain *string `json:"domain,omitempty"` + Csp *ToolExecutionCompleteUIResourceMetaUICsp `json:"csp,omitempty"` + Domain *string `json:"domain,omitempty"` // Browser permission metadata for an MCP Apps UI resource, including camera, microphone, geolocation, and clipboard-write. - Permissions *ToolExecutionCompleteUIResourceMetaUIPermissions `json:"permissions,omitempty"` - PrefersBorder *bool `json:"prefersBorder,omitempty"` + Permissions *ToolExecutionCompleteUIResourceMetaUIPermissions `json:"permissions,omitempty"` + PrefersBorder *bool `json:"prefersBorder,omitempty"` } // CSP domain allowlists for an MCP Apps UI resource, including connect, resource, frame, and base URI domains. type ToolExecutionCompleteUIResourceMetaUICsp struct { - BaseURIDomains []string `json:"baseUriDomains,omitzero"` - ConnectDomains []string `json:"connectDomains,omitzero"` - FrameDomains []string `json:"frameDomains,omitzero"` + BaseURIDomains []string `json:"baseUriDomains,omitzero"` + ConnectDomains []string `json:"connectDomains,omitzero"` + FrameDomains []string `json:"frameDomains,omitzero"` ResourceDomains []string `json:"resourceDomains,omitzero"` } @@ -4045,8 +3896,8 @@ type CitationLocationType string const ( CitationLocationTypeBlock CitationLocationType = "block" - CitationLocationTypeChar CitationLocationType = "char" - CitationLocationTypePage CitationLocationType = "page" + CitationLocationTypeChar CitationLocationType = "char" + CitationLocationTypePage CitationLocationType = "page" ) // The system that produced a citation. @@ -4333,17 +4184,17 @@ const ( type PermissionPromptRequestKind string const ( - PermissionPromptRequestKindCommands PermissionPromptRequestKind = "commands" - PermissionPromptRequestKindCustomTool PermissionPromptRequestKind = "custom-tool" - PermissionPromptRequestKindExtensionManagement PermissionPromptRequestKind = "extension-management" + PermissionPromptRequestKindCommands PermissionPromptRequestKind = "commands" + PermissionPromptRequestKindCustomTool PermissionPromptRequestKind = "custom-tool" + PermissionPromptRequestKindExtensionManagement PermissionPromptRequestKind = "extension-management" PermissionPromptRequestKindExtensionPermissionAccess PermissionPromptRequestKind = "extension-permission-access" - PermissionPromptRequestKindHook PermissionPromptRequestKind = "hook" - PermissionPromptRequestKindMCP PermissionPromptRequestKind = "mcp" - PermissionPromptRequestKindMemory PermissionPromptRequestKind = "memory" - PermissionPromptRequestKindPath PermissionPromptRequestKind = "path" - PermissionPromptRequestKindRead PermissionPromptRequestKind = "read" - PermissionPromptRequestKindURL PermissionPromptRequestKind = "url" - PermissionPromptRequestKindWrite PermissionPromptRequestKind = "write" + PermissionPromptRequestKindHook PermissionPromptRequestKind = "hook" + PermissionPromptRequestKindMCP PermissionPromptRequestKind = "mcp" + PermissionPromptRequestKindMemory PermissionPromptRequestKind = "memory" + PermissionPromptRequestKindPath PermissionPromptRequestKind = "path" + PermissionPromptRequestKindRead PermissionPromptRequestKind = "read" + PermissionPromptRequestKindURL PermissionPromptRequestKind = "url" + PermissionPromptRequestKindWrite PermissionPromptRequestKind = "write" ) // Underlying permission kind that needs path approval @@ -4362,16 +4213,16 @@ const ( type PermissionRequestKind string const ( - PermissionRequestKindCustomTool PermissionRequestKind = "custom-tool" - PermissionRequestKindExtensionManagement PermissionRequestKind = "extension-management" + PermissionRequestKindCustomTool PermissionRequestKind = "custom-tool" + PermissionRequestKindExtensionManagement PermissionRequestKind = "extension-management" PermissionRequestKindExtensionPermissionAccess PermissionRequestKind = "extension-permission-access" - PermissionRequestKindHook PermissionRequestKind = "hook" - PermissionRequestKindMCP PermissionRequestKind = "mcp" - PermissionRequestKindMemory PermissionRequestKind = "memory" - PermissionRequestKindRead PermissionRequestKind = "read" - PermissionRequestKindShell PermissionRequestKind = "shell" - PermissionRequestKindURL PermissionRequestKind = "url" - PermissionRequestKindWrite PermissionRequestKind = "write" + PermissionRequestKindHook PermissionRequestKind = "hook" + PermissionRequestKindMCP PermissionRequestKind = "mcp" + PermissionRequestKindMemory PermissionRequestKind = "memory" + PermissionRequestKindRead PermissionRequestKind = "read" + PermissionRequestKindShell PermissionRequestKind = "shell" + PermissionRequestKindURL PermissionRequestKind = "url" + PermissionRequestKindWrite PermissionRequestKind = "write" ) // Whether this is a store or vote memory operation @@ -4398,14 +4249,14 @@ const ( type PermissionResultKind string const ( - PermissionResultKindApproved PermissionResultKind = "approved" - PermissionResultKindApprovedForLocation PermissionResultKind = "approved-for-location" - PermissionResultKindApprovedForSession PermissionResultKind = "approved-for-session" - PermissionResultKindCancelled PermissionResultKind = "cancelled" - PermissionResultKindDeniedByContentExclusionPolicy PermissionResultKind = "denied-by-content-exclusion-policy" - PermissionResultKindDeniedByPermissionRequestHook PermissionResultKind = "denied-by-permission-request-hook" - PermissionResultKindDeniedByRules PermissionResultKind = "denied-by-rules" - PermissionResultKindDeniedInteractivelyByUser PermissionResultKind = "denied-interactively-by-user" + PermissionResultKindApproved PermissionResultKind = "approved" + PermissionResultKindApprovedForLocation PermissionResultKind = "approved-for-location" + PermissionResultKindApprovedForSession PermissionResultKind = "approved-for-session" + PermissionResultKindCancelled PermissionResultKind = "cancelled" + PermissionResultKindDeniedByContentExclusionPolicy PermissionResultKind = "denied-by-content-exclusion-policy" + PermissionResultKindDeniedByPermissionRequestHook PermissionResultKind = "denied-by-permission-request-hook" + PermissionResultKindDeniedByRules PermissionResultKind = "denied-by-rules" + PermissionResultKindDeniedInteractivelyByUser PermissionResultKind = "denied-interactively-by-user" PermissionResultKindDeniedNoApprovalRuleAndCouldNotRequestFromUser PermissionResultKind = "denied-no-approval-rule-and-could-not-request-from-user" ) @@ -4424,7 +4275,7 @@ const ( type PersistedBinaryResultType string const ( - PersistedBinaryResultTypeImage PersistedBinaryResultType = "image" + PersistedBinaryResultTypeImage PersistedBinaryResultType = "image" PersistedBinaryResultTypeResource PersistedBinaryResultType = "resource" ) @@ -4500,13 +4351,13 @@ const ( type SystemNotificationType string const ( - SystemNotificationTypeAgentCompleted SystemNotificationType = "agent_completed" - SystemNotificationTypeAgentIdle SystemNotificationType = "agent_idle" - SystemNotificationTypeInstructionDiscovered SystemNotificationType = "instruction_discovered" - SystemNotificationTypeNewInboxMessage SystemNotificationType = "new_inbox_message" - SystemNotificationTypeShellCompleted SystemNotificationType = "shell_completed" + SystemNotificationTypeAgentCompleted SystemNotificationType = "agent_completed" + SystemNotificationTypeAgentIdle SystemNotificationType = "agent_idle" + SystemNotificationTypeInstructionDiscovered SystemNotificationType = "instruction_discovered" + SystemNotificationTypeNewInboxMessage SystemNotificationType = "new_inbox_message" + SystemNotificationTypeShellCompleted SystemNotificationType = "shell_completed" SystemNotificationTypeShellDetachedCompleted SystemNotificationType = "shell_detached_completed" - SystemNotificationTypeUnclassified SystemNotificationType = "unclassified" + SystemNotificationTypeUnclassified SystemNotificationType = "unclassified" ) // Semantic result of evaluating a task completion request @@ -4535,13 +4386,13 @@ const ( type ToolExecutionCompleteContentType string const ( - ToolExecutionCompleteContentTypeAudio ToolExecutionCompleteContentType = "audio" - ToolExecutionCompleteContentTypeImage ToolExecutionCompleteContentType = "image" - ToolExecutionCompleteContentTypeResource ToolExecutionCompleteContentType = "resource" + ToolExecutionCompleteContentTypeAudio ToolExecutionCompleteContentType = "audio" + ToolExecutionCompleteContentTypeImage ToolExecutionCompleteContentType = "image" + ToolExecutionCompleteContentTypeResource ToolExecutionCompleteContentType = "resource" ToolExecutionCompleteContentTypeResourceLink ToolExecutionCompleteContentType = "resource_link" - ToolExecutionCompleteContentTypeShellExit ToolExecutionCompleteContentType = "shell_exit" - ToolExecutionCompleteContentTypeTerminal ToolExecutionCompleteContentType = "terminal" - ToolExecutionCompleteContentTypeText ToolExecutionCompleteContentType = "text" + ToolExecutionCompleteContentTypeShellExit ToolExecutionCompleteContentType = "shell_exit" + ToolExecutionCompleteContentTypeTerminal ToolExecutionCompleteContentType = "terminal" + ToolExecutionCompleteContentTypeText ToolExecutionCompleteContentType = "text" ) // Allowed values for the `ToolExecutionCompleteToolDescriptionMetaUIVisibility` enumeration. @@ -4613,5 +4464,5 @@ const ( // Type aliases for convenience. type ( PermissionRequestCommand = PermissionRequestShellCommand - PossibleURL = PermissionRequestShellPossibleURL -) + PossibleURL = PermissionRequestShellPossibleURL +) \ No newline at end of file diff --git a/go/zsession_events.go b/go/zsession_events.go index c98ddc7049..01f22e768e 100644 --- a/go/zsession_events.go +++ b/go/zsession_events.go @@ -7,732 +7,732 @@ import "github.com/github/copilot-sdk/go/rpc" // Session-event types are generated in the rpc package and aliased here for source compatibility. type ( - AbortData = rpc.AbortData - AbortReason = rpc.AbortReason - AssistantIdleData = rpc.AssistantIdleData - AssistantIntentData = rpc.AssistantIntentData - AssistantMessageData = rpc.AssistantMessageData - AssistantMessageDeltaData = rpc.AssistantMessageDeltaData - AssistantMessageServerTools = rpc.AssistantMessageServerTools - AssistantMessageStartData = rpc.AssistantMessageStartData - AssistantMessageToolRequest = rpc.AssistantMessageToolRequest - AssistantMessageToolRequestType = rpc.AssistantMessageToolRequestType - AssistantReasoningData = rpc.AssistantReasoningData - AssistantReasoningDeltaData = rpc.AssistantReasoningDeltaData - AssistantServerToolProgressData = rpc.AssistantServerToolProgressData - AssistantStreamingDeltaData = rpc.AssistantStreamingDeltaData - AssistantToolCallDeltaData = rpc.AssistantToolCallDeltaData - AssistantTurnEndData = rpc.AssistantTurnEndData - AssistantTurnRetryData = rpc.AssistantTurnRetryData - AssistantTurnStartData = rpc.AssistantTurnStartData - AssistantUsageAPIEndpoint = rpc.AssistantUsageAPIEndpoint - AssistantUsageCopilotUsage = rpc.AssistantUsageCopilotUsage - AssistantUsageCopilotUsageTokenDetail = rpc.AssistantUsageCopilotUsageTokenDetail - AssistantUsageData = rpc.AssistantUsageData - Attachment = rpc.Attachment - AttachmentBlob = rpc.AttachmentBlob - AttachmentDirectory = rpc.AttachmentDirectory - AttachmentExtensionContext = rpc.AttachmentExtensionContext - AttachmentFile = rpc.AttachmentFile - AttachmentFileLineRange = rpc.AttachmentFileLineRange - AttachmentGitHubActionsJob = rpc.AttachmentGitHubActionsJob - AttachmentGitHubCommit = rpc.AttachmentGitHubCommit - AttachmentGitHubFile = rpc.AttachmentGitHubFile - AttachmentGitHubFileDiff = rpc.AttachmentGitHubFileDiff - AttachmentGitHubFileDiffSide = rpc.AttachmentGitHubFileDiffSide - AttachmentGitHubReference = rpc.AttachmentGitHubReference - AttachmentGitHubReferenceType = rpc.AttachmentGitHubReferenceType - AttachmentGitHubRelease = rpc.AttachmentGitHubRelease - AttachmentGitHubRepository = rpc.AttachmentGitHubRepository - AttachmentGitHubSnippet = rpc.AttachmentGitHubSnippet - AttachmentGitHubTreeComparison = rpc.AttachmentGitHubTreeComparison - AttachmentGitHubTreeComparisonSide = rpc.AttachmentGitHubTreeComparisonSide - AttachmentGitHubURL = rpc.AttachmentGitHubURL - AttachmentSelection = rpc.AttachmentSelection - AttachmentSelectionDetails = rpc.AttachmentSelectionDetails - AttachmentSelectionDetailsEnd = rpc.AttachmentSelectionDetailsEnd - AttachmentSelectionDetailsStart = rpc.AttachmentSelectionDetailsStart - AttachmentType = rpc.AttachmentType - AutoApprovalJudgeFailureReason = rpc.AutoApprovalJudgeFailureReason - AutoApprovalRecommendation = rpc.AutoApprovalRecommendation - AutoModeResolvedReasoningBucket = rpc.AutoModeResolvedReasoningBucket - AutoModeSwitchCompletedData = rpc.AutoModeSwitchCompletedData - AutoModeSwitchRequestedData = rpc.AutoModeSwitchRequestedData - AutoModeSwitchResponse = rpc.AutoModeSwitchResponse - AutopilotObjectiveChangedOperation = rpc.AutopilotObjectiveChangedOperation - AutopilotObjectiveChangedStatus = rpc.AutopilotObjectiveChangedStatus - BinaryAssetReference = rpc.BinaryAssetReference - BinaryAssetReferenceType = rpc.BinaryAssetReferenceType - BinaryAssetType = rpc.BinaryAssetType - CanvasRegistryChangedCanvas = rpc.CanvasRegistryChangedCanvas - CanvasRegistryChangedCanvasAction = rpc.CanvasRegistryChangedCanvasAction - CapabilitiesChangedData = rpc.CapabilitiesChangedData - CapabilitiesChangedUI = rpc.CapabilitiesChangedUI - CitableSource = rpc.CitableSource - CitationLocation = rpc.CitationLocation - CitationLocationBlock = rpc.CitationLocationBlock - CitationLocationChar = rpc.CitationLocationChar - CitationLocationPage = rpc.CitationLocationPage - CitationLocationType = rpc.CitationLocationType - CitationProvider = rpc.CitationProvider - CitationReference = rpc.CitationReference - Citations = rpc.Citations - CitationSource = rpc.CitationSource - CitationSpan = rpc.CitationSpan - CommandCompletedData = rpc.CommandCompletedData - CommandExecuteData = rpc.CommandExecuteData - CommandQueuedData = rpc.CommandQueuedData - CommandsChangedCommand = rpc.CommandsChangedCommand - CommandsChangedData = rpc.CommandsChangedData - CompactionCompleteCompactionTokensUsed = rpc.CompactionCompleteCompactionTokensUsed - CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail = rpc.CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail - CompactionTrigger = rpc.CompactionTrigger - ContextTier = rpc.ContextTier - CustomAgentsUpdatedAgent = rpc.CustomAgentsUpdatedAgent - ElicitationCompletedAction = rpc.ElicitationCompletedAction - ElicitationCompletedData = rpc.ElicitationCompletedData - ElicitationRequestedData = rpc.ElicitationRequestedData - ElicitationRequestedMode = rpc.ElicitationRequestedMode - ElicitationRequestedSchema = rpc.ElicitationRequestedSchema - ElicitationRequestedSchemaType = rpc.ElicitationRequestedSchemaType - EmbeddedBlobResourceContents = rpc.EmbeddedBlobResourceContents - EmbeddedTextResourceContents = rpc.EmbeddedTextResourceContents - ExitPlanModeAction = rpc.ExitPlanModeAction - ExitPlanModeCompletedData = rpc.ExitPlanModeCompletedData - ExitPlanModeRequestedData = rpc.ExitPlanModeRequestedData - ExtensionsLoadedExtension = rpc.ExtensionsLoadedExtension - ExtensionsLoadedExtensionSource = rpc.ExtensionsLoadedExtensionSource - ExtensionsLoadedExtensionStatus = rpc.ExtensionsLoadedExtensionStatus - ExternalToolCompletedData = rpc.ExternalToolCompletedData - ExternalToolRequestedData = rpc.ExternalToolRequestedData - FactoryRunUpdatedData = rpc.FactoryRunUpdatedData - GitHubRepoRef = rpc.GitHubRepoRef - HandoffRepository = rpc.HandoffRepository - HandoffSourceType = rpc.HandoffSourceType - HeaderEntry = rpc.HeaderEntry - HookEndData = rpc.HookEndData - HookEndError = rpc.HookEndError - HookProgressData = rpc.HookProgressData - HookStartData = rpc.HookStartData - ManagedSettingsEnforcedAction = rpc.ManagedSettingsEnforcedAction - ManagedSettingsEnforcedEscalation = rpc.ManagedSettingsEnforcedEscalation - ManagedSettingsResolvedSource = rpc.ManagedSettingsResolvedSource - MCPAppToolCallCompleteData = rpc.MCPAppToolCallCompleteData - MCPAppToolCallCompleteError = rpc.MCPAppToolCallCompleteError - MCPAppToolCallCompleteToolMeta = rpc.MCPAppToolCallCompleteToolMeta - MCPAppToolCallCompleteToolMetaUI = rpc.MCPAppToolCallCompleteToolMetaUI - MCPHeadersRefreshCompletedData = rpc.MCPHeadersRefreshCompletedData - MCPHeadersRefreshCompletedOutcome = rpc.MCPHeadersRefreshCompletedOutcome - MCPHeadersRefreshRequiredData = rpc.MCPHeadersRefreshRequiredData - MCPHeadersRefreshRequiredReason = rpc.MCPHeadersRefreshRequiredReason - MCPOauthCompletedData = rpc.MCPOauthCompletedData - MCPOauthCompletionOutcome = rpc.MCPOauthCompletionOutcome - MCPOauthHTTPResponse = rpc.MCPOauthHTTPResponse - MCPOauthRequestReason = rpc.MCPOauthRequestReason - MCPOauthRequiredData = rpc.MCPOauthRequiredData - MCPOauthRequiredStaticClientConfig = rpc.MCPOauthRequiredStaticClientConfig - MCPOauthRequiredStaticClientConfigGrantType = rpc.MCPOauthRequiredStaticClientConfigGrantType - MCPOauthWwwAuthenticateParams = rpc.MCPOauthWwwAuthenticateParams - MCPPromptsListChangedData = rpc.MCPPromptsListChangedData - MCPResourcesListChangedData = rpc.MCPResourcesListChangedData - MCPServersLoadedServer = rpc.MCPServersLoadedServer - MCPServerSource = rpc.MCPServerSource - MCPServerStatus = rpc.MCPServerStatus - MCPServerTransport = rpc.MCPServerTransport - MCPToolsListChangedData = rpc.MCPToolsListChangedData - ModelCallFailureBadRequestKind = rpc.ModelCallFailureBadRequestKind - ModelCallFailureData = rpc.ModelCallFailureData - ModelCallFailureKind = rpc.ModelCallFailureKind - ModelCallFailureRequestFingerprint = rpc.ModelCallFailureRequestFingerprint - ModelCallFailureSource = rpc.ModelCallFailureSource - ModelCallFailureTransport = rpc.ModelCallFailureTransport - ModelCallStartData = rpc.ModelCallStartData - OmittedBinaryOmittedReason = rpc.OmittedBinaryOmittedReason - OmittedBinaryResult = rpc.OmittedBinaryResult - OmittedBinaryType = rpc.OmittedBinaryType - PendingMessagesModifiedData = rpc.PendingMessagesModifiedData - PermissionAllowAllMode = rpc.PermissionAllowAllMode - PermissionApproved = rpc.PermissionApproved - PermissionApprovedForLocation = rpc.PermissionApprovedForLocation - PermissionApprovedForSession = rpc.PermissionApprovedForSession - PermissionAutoApproval = rpc.PermissionAutoApproval - PermissionCancelled = rpc.PermissionCancelled - PermissionCompletedData = rpc.PermissionCompletedData - PermissionDeniedByContentExclusionPolicy = rpc.PermissionDeniedByContentExclusionPolicy - PermissionDeniedByPermissionRequestHook = rpc.PermissionDeniedByPermissionRequestHook - PermissionDeniedByRules = rpc.PermissionDeniedByRules - PermissionDeniedInteractivelyByUser = rpc.PermissionDeniedInteractivelyByUser - PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser = rpc.PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser - PermissionPromptRequest = rpc.PermissionPromptRequest - PermissionPromptRequestCommands = rpc.PermissionPromptRequestCommands - PermissionPromptRequestCustomTool = rpc.PermissionPromptRequestCustomTool - PermissionPromptRequestExtensionManagement = rpc.PermissionPromptRequestExtensionManagement - PermissionPromptRequestExtensionPermissionAccess = rpc.PermissionPromptRequestExtensionPermissionAccess - PermissionPromptRequestHook = rpc.PermissionPromptRequestHook - PermissionPromptRequestKind = rpc.PermissionPromptRequestKind - PermissionPromptRequestMCP = rpc.PermissionPromptRequestMCP - PermissionPromptRequestMemory = rpc.PermissionPromptRequestMemory - PermissionPromptRequestPath = rpc.PermissionPromptRequestPath - PermissionPromptRequestPathAccessKind = rpc.PermissionPromptRequestPathAccessKind - PermissionPromptRequestRead = rpc.PermissionPromptRequestRead - PermissionPromptRequestURL = rpc.PermissionPromptRequestURL - PermissionPromptRequestWrite = rpc.PermissionPromptRequestWrite - PermissionRequest = rpc.PermissionRequest - PermissionRequestCommand = rpc.PermissionRequestCommand - PermissionRequestCustomTool = rpc.PermissionRequestCustomTool - PermissionRequestedData = rpc.PermissionRequestedData - PermissionRequestExtensionManagement = rpc.PermissionRequestExtensionManagement - PermissionRequestExtensionPermissionAccess = rpc.PermissionRequestExtensionPermissionAccess - PermissionRequestHook = rpc.PermissionRequestHook - PermissionRequestKind = rpc.PermissionRequestKind - PermissionRequestMCP = rpc.PermissionRequestMCP - PermissionRequestMemory = rpc.PermissionRequestMemory - PermissionRequestMemoryAction = rpc.PermissionRequestMemoryAction - PermissionRequestMemoryDirection = rpc.PermissionRequestMemoryDirection - PermissionRequestRead = rpc.PermissionRequestRead - PermissionRequestShell = rpc.PermissionRequestShell - PermissionRequestShellCommand = rpc.PermissionRequestShellCommand - PermissionRequestShellCommandSegment = rpc.PermissionRequestShellCommandSegment - PermissionRequestShellPossibleURL = rpc.PermissionRequestShellPossibleURL - PermissionRequestURL = rpc.PermissionRequestURL - PermissionRequestWrite = rpc.PermissionRequestWrite - PermissionResult = rpc.PermissionResult - PermissionResultKind = rpc.PermissionResultKind - PermissionRule = rpc.PermissionRule - PersistedBinaryImage = rpc.PersistedBinaryImage - PersistedBinaryImageType = rpc.PersistedBinaryImageType - PersistedBinaryResult = rpc.PersistedBinaryResult - PersistedBinaryResultType = rpc.PersistedBinaryResultType - PlanChangedOperation = rpc.PlanChangedOperation - PossibleURL = rpc.PossibleURL - RawCitationLocation = rpc.RawCitationLocation - RawPermissionPromptRequest = rpc.RawPermissionPromptRequest - RawPermissionRequest = rpc.RawPermissionRequest - RawPermissionResult = rpc.RawPermissionResult - RawPersistedBinaryResult = rpc.RawPersistedBinaryResult - RawSessionEventData = rpc.RawSessionEventData - RawSystemNotification = rpc.RawSystemNotification - RawToolExecutionCompleteContent = rpc.RawToolExecutionCompleteContent - ReasoningSummary = rpc.ReasoningSummary - SamplingCompletedData = rpc.SamplingCompletedData - SamplingRequestedData = rpc.SamplingRequestedData - ScheduleOrigin = rpc.ScheduleOrigin - SessionAutoModeResolvedData = rpc.SessionAutoModeResolvedData - SessionAutopilotObjectiveChangedData = rpc.SessionAutopilotObjectiveChangedData - SessionBackgroundTasksChangedData = rpc.SessionBackgroundTasksChangedData - SessionBinaryAssetData = rpc.SessionBinaryAssetData - SessionCanvasClosedData = rpc.SessionCanvasClosedData - SessionCanvasOpenedData = rpc.SessionCanvasOpenedData - SessionCanvasRecordedData = rpc.SessionCanvasRecordedData - SessionCanvasRegistryChangedData = rpc.SessionCanvasRegistryChangedData - SessionCanvasRemovedData = rpc.SessionCanvasRemovedData - SessionCanvasUnavailableData = rpc.SessionCanvasUnavailableData - SessionCompactionCompleteData = rpc.SessionCompactionCompleteData - SessionCompactionStartData = rpc.SessionCompactionStartData - SessionContextChangedData = rpc.SessionContextChangedData - SessionCustomAgentsUpdatedData = rpc.SessionCustomAgentsUpdatedData - SessionCustomNotificationData = rpc.SessionCustomNotificationData - SessionErrorData = rpc.SessionErrorData - SessionEvent = rpc.SessionEvent - SessionEventData = rpc.SessionEventData - SessionEventType = rpc.SessionEventType - SessionExtensionsAttachmentsPushedData = rpc.SessionExtensionsAttachmentsPushedData - SessionExtensionsLoadedData = rpc.SessionExtensionsLoadedData - SessionHandoffData = rpc.SessionHandoffData - SessionIdleData = rpc.SessionIdleData - SessionInfoData = rpc.SessionInfoData - SessionLimitsConfig = rpc.SessionLimitsConfig - SessionLimitsExhaustedCompletedData = rpc.SessionLimitsExhaustedCompletedData - SessionLimitsExhaustedRequestedData = rpc.SessionLimitsExhaustedRequestedData - SessionLimitsExhaustedResponse = rpc.SessionLimitsExhaustedResponse - SessionLimitsExhaustedResponseAction = rpc.SessionLimitsExhaustedResponseAction - SessionManagedSettingsEnforcedData = rpc.SessionManagedSettingsEnforcedData - SessionManagedSettingsResolvedData = rpc.SessionManagedSettingsResolvedData - SessionMCPServersLoadedData = rpc.SessionMCPServersLoadedData - SessionMCPServerStatusChangedData = rpc.SessionMCPServerStatusChangedData - SessionMode = rpc.SessionMode - SessionModeChangedData = rpc.SessionModeChangedData - SessionModelChangeData = rpc.SessionModelChangeData - SessionPermissionsChangedData = rpc.SessionPermissionsChangedData - SessionPlanChangedData = rpc.SessionPlanChangedData - SessionRemoteSteerableChangedData = rpc.SessionRemoteSteerableChangedData - SessionResumeData = rpc.SessionResumeData - SessionScheduleCancelledData = rpc.SessionScheduleCancelledData - SessionScheduleCreatedData = rpc.SessionScheduleCreatedData - SessionScheduleRearmedData = rpc.SessionScheduleRearmedData - SessionSessionLimitsChangedData = rpc.SessionSessionLimitsChangedData - SessionShutdownData = rpc.SessionShutdownData - SessionSkillsLoadedData = rpc.SessionSkillsLoadedData - SessionSnapshotRewindData = rpc.SessionSnapshotRewindData - SessionStartData = rpc.SessionStartData - SessionTaskCompleteData = rpc.SessionTaskCompleteData - SessionTitleChangedData = rpc.SessionTitleChangedData - SessionTodosChangedData = rpc.SessionTodosChangedData - SessionToolsUpdatedData = rpc.SessionToolsUpdatedData - SessionTruncationData = rpc.SessionTruncationData - SessionUsageCheckpointData = rpc.SessionUsageCheckpointData - SessionUsageInfoData = rpc.SessionUsageInfoData - SessionWarningData = rpc.SessionWarningData - SessionWorkspaceFileChangedData = rpc.SessionWorkspaceFileChangedData - ShutdownCodeChanges = rpc.ShutdownCodeChanges - ShutdownModelMetric = rpc.ShutdownModelMetric - ShutdownModelMetricRequests = rpc.ShutdownModelMetricRequests - ShutdownModelMetricTokenDetail = rpc.ShutdownModelMetricTokenDetail - ShutdownModelMetricUsage = rpc.ShutdownModelMetricUsage - ShutdownTokenDetail = rpc.ShutdownTokenDetail - ShutdownType = rpc.ShutdownType - SkillInvokedData = rpc.SkillInvokedData - SkillInvokedTrigger = rpc.SkillInvokedTrigger - SkillsLoadedSkill = rpc.SkillsLoadedSkill - SkillSource = rpc.SkillSource - SubagentCompletedData = rpc.SubagentCompletedData - SubagentDeselectedData = rpc.SubagentDeselectedData - SubagentFailedData = rpc.SubagentFailedData - SubagentSelectedData = rpc.SubagentSelectedData - SubagentStartedData = rpc.SubagentStartedData - SystemMessageData = rpc.SystemMessageData - SystemMessageMetadata = rpc.SystemMessageMetadata - SystemMessageRole = rpc.SystemMessageRole - SystemNotification = rpc.SystemNotification - SystemNotificationAgentCompleted = rpc.SystemNotificationAgentCompleted - SystemNotificationAgentCompletedStatus = rpc.SystemNotificationAgentCompletedStatus - SystemNotificationAgentIdle = rpc.SystemNotificationAgentIdle - SystemNotificationData = rpc.SystemNotificationData - SystemNotificationInstructionDiscovered = rpc.SystemNotificationInstructionDiscovered - SystemNotificationNewInboxMessage = rpc.SystemNotificationNewInboxMessage - SystemNotificationShellCompleted = rpc.SystemNotificationShellCompleted - SystemNotificationShellDetachedCompleted = rpc.SystemNotificationShellDetachedCompleted - SystemNotificationType = rpc.SystemNotificationType - SystemNotificationUnclassified = rpc.SystemNotificationUnclassified - TaskCompletionOutcome = rpc.TaskCompletionOutcome - ToolExecutionCompleteContent = rpc.ToolExecutionCompleteContent - ToolExecutionCompleteContentAudio = rpc.ToolExecutionCompleteContentAudio - ToolExecutionCompleteContentImage = rpc.ToolExecutionCompleteContentImage - ToolExecutionCompleteContentResource = rpc.ToolExecutionCompleteContentResource - ToolExecutionCompleteContentResourceDetails = rpc.ToolExecutionCompleteContentResourceDetails - ToolExecutionCompleteContentResourceLink = rpc.ToolExecutionCompleteContentResourceLink - ToolExecutionCompleteContentResourceLinkIcon = rpc.ToolExecutionCompleteContentResourceLinkIcon - ToolExecutionCompleteContentResourceLinkIconTheme = rpc.ToolExecutionCompleteContentResourceLinkIconTheme - ToolExecutionCompleteContentShellExit = rpc.ToolExecutionCompleteContentShellExit - ToolExecutionCompleteContentTerminal = rpc.ToolExecutionCompleteContentTerminal - ToolExecutionCompleteContentText = rpc.ToolExecutionCompleteContentText - ToolExecutionCompleteContentType = rpc.ToolExecutionCompleteContentType - ToolExecutionCompleteData = rpc.ToolExecutionCompleteData - ToolExecutionCompleteError = rpc.ToolExecutionCompleteError - ToolExecutionCompleteResult = rpc.ToolExecutionCompleteResult - ToolExecutionCompleteToolDescription = rpc.ToolExecutionCompleteToolDescription - ToolExecutionCompleteToolDescriptionMeta = rpc.ToolExecutionCompleteToolDescriptionMeta - ToolExecutionCompleteToolDescriptionMetaUI = rpc.ToolExecutionCompleteToolDescriptionMetaUI - ToolExecutionCompleteToolDescriptionMetaUIVisibility = rpc.ToolExecutionCompleteToolDescriptionMetaUIVisibility - ToolExecutionCompleteUIResource = rpc.ToolExecutionCompleteUIResource - ToolExecutionCompleteUIResourceMeta = rpc.ToolExecutionCompleteUIResourceMeta - ToolExecutionCompleteUIResourceMetaUI = rpc.ToolExecutionCompleteUIResourceMetaUI - ToolExecutionCompleteUIResourceMetaUICsp = rpc.ToolExecutionCompleteUIResourceMetaUICsp - ToolExecutionCompleteUIResourceMetaUIPermissions = rpc.ToolExecutionCompleteUIResourceMetaUIPermissions - ToolExecutionCompleteUIResourceMetaUIPermissionsCamera = rpc.ToolExecutionCompleteUIResourceMetaUIPermissionsCamera + AbortData = rpc.AbortData + AbortReason = rpc.AbortReason + AssistantIdleData = rpc.AssistantIdleData + AssistantIntentData = rpc.AssistantIntentData + AssistantMessageData = rpc.AssistantMessageData + AssistantMessageDeltaData = rpc.AssistantMessageDeltaData + AssistantMessageServerTools = rpc.AssistantMessageServerTools + AssistantMessageStartData = rpc.AssistantMessageStartData + AssistantMessageToolRequest = rpc.AssistantMessageToolRequest + AssistantMessageToolRequestType = rpc.AssistantMessageToolRequestType + AssistantReasoningData = rpc.AssistantReasoningData + AssistantReasoningDeltaData = rpc.AssistantReasoningDeltaData + AssistantServerToolProgressData = rpc.AssistantServerToolProgressData + AssistantStreamingDeltaData = rpc.AssistantStreamingDeltaData + AssistantToolCallDeltaData = rpc.AssistantToolCallDeltaData + AssistantTurnEndData = rpc.AssistantTurnEndData + AssistantTurnRetryData = rpc.AssistantTurnRetryData + AssistantTurnStartData = rpc.AssistantTurnStartData + AssistantUsageAPIEndpoint = rpc.AssistantUsageAPIEndpoint + AssistantUsageCopilotUsage = rpc.AssistantUsageCopilotUsage + AssistantUsageCopilotUsageTokenDetail = rpc.AssistantUsageCopilotUsageTokenDetail + AssistantUsageData = rpc.AssistantUsageData + Attachment = rpc.Attachment + AttachmentBlob = rpc.AttachmentBlob + AttachmentDirectory = rpc.AttachmentDirectory + AttachmentExtensionContext = rpc.AttachmentExtensionContext + AttachmentFile = rpc.AttachmentFile + AttachmentFileLineRange = rpc.AttachmentFileLineRange + AttachmentGitHubActionsJob = rpc.AttachmentGitHubActionsJob + AttachmentGitHubCommit = rpc.AttachmentGitHubCommit + AttachmentGitHubFile = rpc.AttachmentGitHubFile + AttachmentGitHubFileDiff = rpc.AttachmentGitHubFileDiff + AttachmentGitHubFileDiffSide = rpc.AttachmentGitHubFileDiffSide + AttachmentGitHubReference = rpc.AttachmentGitHubReference + AttachmentGitHubReferenceType = rpc.AttachmentGitHubReferenceType + AttachmentGitHubRelease = rpc.AttachmentGitHubRelease + AttachmentGitHubRepository = rpc.AttachmentGitHubRepository + AttachmentGitHubSnippet = rpc.AttachmentGitHubSnippet + AttachmentGitHubTreeComparison = rpc.AttachmentGitHubTreeComparison + AttachmentGitHubTreeComparisonSide = rpc.AttachmentGitHubTreeComparisonSide + AttachmentGitHubURL = rpc.AttachmentGitHubURL + AttachmentSelection = rpc.AttachmentSelection + AttachmentSelectionDetails = rpc.AttachmentSelectionDetails + AttachmentSelectionDetailsEnd = rpc.AttachmentSelectionDetailsEnd + AttachmentSelectionDetailsStart = rpc.AttachmentSelectionDetailsStart + AttachmentType = rpc.AttachmentType + AutoApprovalJudgeFailureReason = rpc.AutoApprovalJudgeFailureReason + AutoApprovalRecommendation = rpc.AutoApprovalRecommendation + AutoModeResolvedReasoningBucket = rpc.AutoModeResolvedReasoningBucket + AutoModeSwitchCompletedData = rpc.AutoModeSwitchCompletedData + AutoModeSwitchRequestedData = rpc.AutoModeSwitchRequestedData + AutoModeSwitchResponse = rpc.AutoModeSwitchResponse + AutopilotObjectiveChangedOperation = rpc.AutopilotObjectiveChangedOperation + AutopilotObjectiveChangedStatus = rpc.AutopilotObjectiveChangedStatus + BinaryAssetReference = rpc.BinaryAssetReference + BinaryAssetReferenceType = rpc.BinaryAssetReferenceType + BinaryAssetType = rpc.BinaryAssetType + CanvasRegistryChangedCanvas = rpc.CanvasRegistryChangedCanvas + CanvasRegistryChangedCanvasAction = rpc.CanvasRegistryChangedCanvasAction + CapabilitiesChangedData = rpc.CapabilitiesChangedData + CapabilitiesChangedUI = rpc.CapabilitiesChangedUI + CitableSource = rpc.CitableSource + CitationLocation = rpc.CitationLocation + CitationLocationBlock = rpc.CitationLocationBlock + CitationLocationChar = rpc.CitationLocationChar + CitationLocationPage = rpc.CitationLocationPage + CitationLocationType = rpc.CitationLocationType + CitationProvider = rpc.CitationProvider + CitationReference = rpc.CitationReference + Citations = rpc.Citations + CitationSource = rpc.CitationSource + CitationSpan = rpc.CitationSpan + CommandCompletedData = rpc.CommandCompletedData + CommandExecuteData = rpc.CommandExecuteData + CommandQueuedData = rpc.CommandQueuedData + CommandsChangedCommand = rpc.CommandsChangedCommand + CommandsChangedData = rpc.CommandsChangedData + CompactionCompleteCompactionTokensUsed = rpc.CompactionCompleteCompactionTokensUsed + CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail = rpc.CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail + CompactionTrigger = rpc.CompactionTrigger + ContextTier = rpc.ContextTier + CustomAgentsUpdatedAgent = rpc.CustomAgentsUpdatedAgent + ElicitationCompletedAction = rpc.ElicitationCompletedAction + ElicitationCompletedData = rpc.ElicitationCompletedData + ElicitationRequestedData = rpc.ElicitationRequestedData + ElicitationRequestedMode = rpc.ElicitationRequestedMode + ElicitationRequestedSchema = rpc.ElicitationRequestedSchema + ElicitationRequestedSchemaType = rpc.ElicitationRequestedSchemaType + EmbeddedBlobResourceContents = rpc.EmbeddedBlobResourceContents + EmbeddedTextResourceContents = rpc.EmbeddedTextResourceContents + ExitPlanModeAction = rpc.ExitPlanModeAction + ExitPlanModeCompletedData = rpc.ExitPlanModeCompletedData + ExitPlanModeRequestedData = rpc.ExitPlanModeRequestedData + ExtensionsLoadedExtension = rpc.ExtensionsLoadedExtension + ExtensionsLoadedExtensionSource = rpc.ExtensionsLoadedExtensionSource + ExtensionsLoadedExtensionStatus = rpc.ExtensionsLoadedExtensionStatus + ExternalToolCompletedData = rpc.ExternalToolCompletedData + ExternalToolRequestedData = rpc.ExternalToolRequestedData + FactoryRunUpdatedData = rpc.FactoryRunUpdatedData + GitHubRepoRef = rpc.GitHubRepoRef + HandoffRepository = rpc.HandoffRepository + HandoffSourceType = rpc.HandoffSourceType + HeaderEntry = rpc.HeaderEntry + HookEndData = rpc.HookEndData + HookEndError = rpc.HookEndError + HookProgressData = rpc.HookProgressData + HookStartData = rpc.HookStartData + ManagedSettingsEnforcedAction = rpc.ManagedSettingsEnforcedAction + ManagedSettingsEnforcedEscalation = rpc.ManagedSettingsEnforcedEscalation + ManagedSettingsResolvedSource = rpc.ManagedSettingsResolvedSource + MCPAppToolCallCompleteData = rpc.MCPAppToolCallCompleteData + MCPAppToolCallCompleteError = rpc.MCPAppToolCallCompleteError + MCPAppToolCallCompleteToolMeta = rpc.MCPAppToolCallCompleteToolMeta + MCPAppToolCallCompleteToolMetaUI = rpc.MCPAppToolCallCompleteToolMetaUI + MCPHeadersRefreshCompletedData = rpc.MCPHeadersRefreshCompletedData + MCPHeadersRefreshCompletedOutcome = rpc.MCPHeadersRefreshCompletedOutcome + MCPHeadersRefreshRequiredData = rpc.MCPHeadersRefreshRequiredData + MCPHeadersRefreshRequiredReason = rpc.MCPHeadersRefreshRequiredReason + MCPOauthCompletedData = rpc.MCPOauthCompletedData + MCPOauthCompletionOutcome = rpc.MCPOauthCompletionOutcome + MCPOauthHTTPResponse = rpc.MCPOauthHTTPResponse + MCPOauthRequestReason = rpc.MCPOauthRequestReason + MCPOauthRequiredData = rpc.MCPOauthRequiredData + MCPOauthRequiredStaticClientConfig = rpc.MCPOauthRequiredStaticClientConfig + MCPOauthRequiredStaticClientConfigGrantType = rpc.MCPOauthRequiredStaticClientConfigGrantType + MCPOauthWwwAuthenticateParams = rpc.MCPOauthWwwAuthenticateParams + MCPPromptsListChangedData = rpc.MCPPromptsListChangedData + MCPResourcesListChangedData = rpc.MCPResourcesListChangedData + MCPServersLoadedServer = rpc.MCPServersLoadedServer + MCPServerSource = rpc.MCPServerSource + MCPServerStatus = rpc.MCPServerStatus + MCPServerTransport = rpc.MCPServerTransport + MCPToolsListChangedData = rpc.MCPToolsListChangedData + ModelCallFailureBadRequestKind = rpc.ModelCallFailureBadRequestKind + ModelCallFailureData = rpc.ModelCallFailureData + ModelCallFailureKind = rpc.ModelCallFailureKind + ModelCallFailureRequestFingerprint = rpc.ModelCallFailureRequestFingerprint + ModelCallFailureSource = rpc.ModelCallFailureSource + ModelCallFailureTransport = rpc.ModelCallFailureTransport + ModelCallStartData = rpc.ModelCallStartData + OmittedBinaryOmittedReason = rpc.OmittedBinaryOmittedReason + OmittedBinaryResult = rpc.OmittedBinaryResult + OmittedBinaryType = rpc.OmittedBinaryType + PendingMessagesModifiedData = rpc.PendingMessagesModifiedData + PermissionAllowAllMode = rpc.PermissionAllowAllMode + PermissionApproved = rpc.PermissionApproved + PermissionApprovedForLocation = rpc.PermissionApprovedForLocation + PermissionApprovedForSession = rpc.PermissionApprovedForSession + PermissionAutoApproval = rpc.PermissionAutoApproval + PermissionCancelled = rpc.PermissionCancelled + PermissionCompletedData = rpc.PermissionCompletedData + PermissionDeniedByContentExclusionPolicy = rpc.PermissionDeniedByContentExclusionPolicy + PermissionDeniedByPermissionRequestHook = rpc.PermissionDeniedByPermissionRequestHook + PermissionDeniedByRules = rpc.PermissionDeniedByRules + PermissionDeniedInteractivelyByUser = rpc.PermissionDeniedInteractivelyByUser + PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser = rpc.PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser + PermissionPromptRequest = rpc.PermissionPromptRequest + PermissionPromptRequestCommands = rpc.PermissionPromptRequestCommands + PermissionPromptRequestCustomTool = rpc.PermissionPromptRequestCustomTool + PermissionPromptRequestExtensionManagement = rpc.PermissionPromptRequestExtensionManagement + PermissionPromptRequestExtensionPermissionAccess = rpc.PermissionPromptRequestExtensionPermissionAccess + PermissionPromptRequestHook = rpc.PermissionPromptRequestHook + PermissionPromptRequestKind = rpc.PermissionPromptRequestKind + PermissionPromptRequestMCP = rpc.PermissionPromptRequestMCP + PermissionPromptRequestMemory = rpc.PermissionPromptRequestMemory + PermissionPromptRequestPath = rpc.PermissionPromptRequestPath + PermissionPromptRequestPathAccessKind = rpc.PermissionPromptRequestPathAccessKind + PermissionPromptRequestRead = rpc.PermissionPromptRequestRead + PermissionPromptRequestURL = rpc.PermissionPromptRequestURL + PermissionPromptRequestWrite = rpc.PermissionPromptRequestWrite + PermissionRequest = rpc.PermissionRequest + PermissionRequestCommand = rpc.PermissionRequestCommand + PermissionRequestCustomTool = rpc.PermissionRequestCustomTool + PermissionRequestedData = rpc.PermissionRequestedData + PermissionRequestExtensionManagement = rpc.PermissionRequestExtensionManagement + PermissionRequestExtensionPermissionAccess = rpc.PermissionRequestExtensionPermissionAccess + PermissionRequestHook = rpc.PermissionRequestHook + PermissionRequestKind = rpc.PermissionRequestKind + PermissionRequestMCP = rpc.PermissionRequestMCP + PermissionRequestMemory = rpc.PermissionRequestMemory + PermissionRequestMemoryAction = rpc.PermissionRequestMemoryAction + PermissionRequestMemoryDirection = rpc.PermissionRequestMemoryDirection + PermissionRequestRead = rpc.PermissionRequestRead + PermissionRequestShell = rpc.PermissionRequestShell + PermissionRequestShellCommand = rpc.PermissionRequestShellCommand + PermissionRequestShellCommandSegment = rpc.PermissionRequestShellCommandSegment + PermissionRequestShellPossibleURL = rpc.PermissionRequestShellPossibleURL + PermissionRequestURL = rpc.PermissionRequestURL + PermissionRequestWrite = rpc.PermissionRequestWrite + PermissionResult = rpc.PermissionResult + PermissionResultKind = rpc.PermissionResultKind + PermissionRule = rpc.PermissionRule + PersistedBinaryImage = rpc.PersistedBinaryImage + PersistedBinaryImageType = rpc.PersistedBinaryImageType + PersistedBinaryResult = rpc.PersistedBinaryResult + PersistedBinaryResultType = rpc.PersistedBinaryResultType + PlanChangedOperation = rpc.PlanChangedOperation + PossibleURL = rpc.PossibleURL + RawCitationLocation = rpc.RawCitationLocation + RawPermissionPromptRequest = rpc.RawPermissionPromptRequest + RawPermissionRequest = rpc.RawPermissionRequest + RawPermissionResult = rpc.RawPermissionResult + RawPersistedBinaryResult = rpc.RawPersistedBinaryResult + RawSessionEventData = rpc.RawSessionEventData + RawSystemNotification = rpc.RawSystemNotification + RawToolExecutionCompleteContent = rpc.RawToolExecutionCompleteContent + ReasoningSummary = rpc.ReasoningSummary + SamplingCompletedData = rpc.SamplingCompletedData + SamplingRequestedData = rpc.SamplingRequestedData + ScheduleOrigin = rpc.ScheduleOrigin + SessionAutoModeResolvedData = rpc.SessionAutoModeResolvedData + SessionAutopilotObjectiveChangedData = rpc.SessionAutopilotObjectiveChangedData + SessionBackgroundTasksChangedData = rpc.SessionBackgroundTasksChangedData + SessionBinaryAssetData = rpc.SessionBinaryAssetData + SessionCanvasClosedData = rpc.SessionCanvasClosedData + SessionCanvasOpenedData = rpc.SessionCanvasOpenedData + SessionCanvasRecordedData = rpc.SessionCanvasRecordedData + SessionCanvasRegistryChangedData = rpc.SessionCanvasRegistryChangedData + SessionCanvasRemovedData = rpc.SessionCanvasRemovedData + SessionCanvasUnavailableData = rpc.SessionCanvasUnavailableData + SessionCompactionCompleteData = rpc.SessionCompactionCompleteData + SessionCompactionStartData = rpc.SessionCompactionStartData + SessionContextChangedData = rpc.SessionContextChangedData + SessionCustomAgentsUpdatedData = rpc.SessionCustomAgentsUpdatedData + SessionCustomNotificationData = rpc.SessionCustomNotificationData + SessionErrorData = rpc.SessionErrorData + SessionEvent = rpc.SessionEvent + SessionEventData = rpc.SessionEventData + SessionEventType = rpc.SessionEventType + SessionExtensionsAttachmentsPushedData = rpc.SessionExtensionsAttachmentsPushedData + SessionExtensionsLoadedData = rpc.SessionExtensionsLoadedData + SessionHandoffData = rpc.SessionHandoffData + SessionIdleData = rpc.SessionIdleData + SessionInfoData = rpc.SessionInfoData + SessionLimitsConfig = rpc.SessionLimitsConfig + SessionLimitsExhaustedCompletedData = rpc.SessionLimitsExhaustedCompletedData + SessionLimitsExhaustedRequestedData = rpc.SessionLimitsExhaustedRequestedData + SessionLimitsExhaustedResponse = rpc.SessionLimitsExhaustedResponse + SessionLimitsExhaustedResponseAction = rpc.SessionLimitsExhaustedResponseAction + SessionManagedSettingsEnforcedData = rpc.SessionManagedSettingsEnforcedData + SessionManagedSettingsResolvedData = rpc.SessionManagedSettingsResolvedData + SessionMCPServersLoadedData = rpc.SessionMCPServersLoadedData + SessionMCPServerStatusChangedData = rpc.SessionMCPServerStatusChangedData + SessionMode = rpc.SessionMode + SessionModeChangedData = rpc.SessionModeChangedData + SessionModelChangeData = rpc.SessionModelChangeData + SessionPermissionsChangedData = rpc.SessionPermissionsChangedData + SessionPlanChangedData = rpc.SessionPlanChangedData + SessionRemoteSteerableChangedData = rpc.SessionRemoteSteerableChangedData + SessionResumeData = rpc.SessionResumeData + SessionScheduleCancelledData = rpc.SessionScheduleCancelledData + SessionScheduleCreatedData = rpc.SessionScheduleCreatedData + SessionScheduleRearmedData = rpc.SessionScheduleRearmedData + SessionSessionLimitsChangedData = rpc.SessionSessionLimitsChangedData + SessionShutdownData = rpc.SessionShutdownData + SessionSkillsLoadedData = rpc.SessionSkillsLoadedData + SessionSnapshotRewindData = rpc.SessionSnapshotRewindData + SessionStartData = rpc.SessionStartData + SessionTaskCompleteData = rpc.SessionTaskCompleteData + SessionTitleChangedData = rpc.SessionTitleChangedData + SessionTodosChangedData = rpc.SessionTodosChangedData + SessionToolsUpdatedData = rpc.SessionToolsUpdatedData + SessionTruncationData = rpc.SessionTruncationData + SessionUsageCheckpointData = rpc.SessionUsageCheckpointData + SessionUsageInfoData = rpc.SessionUsageInfoData + SessionWarningData = rpc.SessionWarningData + SessionWorkspaceFileChangedData = rpc.SessionWorkspaceFileChangedData + ShutdownCodeChanges = rpc.ShutdownCodeChanges + ShutdownModelMetric = rpc.ShutdownModelMetric + ShutdownModelMetricRequests = rpc.ShutdownModelMetricRequests + ShutdownModelMetricTokenDetail = rpc.ShutdownModelMetricTokenDetail + ShutdownModelMetricUsage = rpc.ShutdownModelMetricUsage + ShutdownTokenDetail = rpc.ShutdownTokenDetail + ShutdownType = rpc.ShutdownType + SkillInvokedData = rpc.SkillInvokedData + SkillInvokedTrigger = rpc.SkillInvokedTrigger + SkillsLoadedSkill = rpc.SkillsLoadedSkill + SkillSource = rpc.SkillSource + SubagentCompletedData = rpc.SubagentCompletedData + SubagentDeselectedData = rpc.SubagentDeselectedData + SubagentFailedData = rpc.SubagentFailedData + SubagentSelectedData = rpc.SubagentSelectedData + SubagentStartedData = rpc.SubagentStartedData + SystemMessageData = rpc.SystemMessageData + SystemMessageMetadata = rpc.SystemMessageMetadata + SystemMessageRole = rpc.SystemMessageRole + SystemNotification = rpc.SystemNotification + SystemNotificationAgentCompleted = rpc.SystemNotificationAgentCompleted + SystemNotificationAgentCompletedStatus = rpc.SystemNotificationAgentCompletedStatus + SystemNotificationAgentIdle = rpc.SystemNotificationAgentIdle + SystemNotificationData = rpc.SystemNotificationData + SystemNotificationInstructionDiscovered = rpc.SystemNotificationInstructionDiscovered + SystemNotificationNewInboxMessage = rpc.SystemNotificationNewInboxMessage + SystemNotificationShellCompleted = rpc.SystemNotificationShellCompleted + SystemNotificationShellDetachedCompleted = rpc.SystemNotificationShellDetachedCompleted + SystemNotificationType = rpc.SystemNotificationType + SystemNotificationUnclassified = rpc.SystemNotificationUnclassified + TaskCompletionOutcome = rpc.TaskCompletionOutcome + ToolExecutionCompleteContent = rpc.ToolExecutionCompleteContent + ToolExecutionCompleteContentAudio = rpc.ToolExecutionCompleteContentAudio + ToolExecutionCompleteContentImage = rpc.ToolExecutionCompleteContentImage + ToolExecutionCompleteContentResource = rpc.ToolExecutionCompleteContentResource + ToolExecutionCompleteContentResourceDetails = rpc.ToolExecutionCompleteContentResourceDetails + ToolExecutionCompleteContentResourceLink = rpc.ToolExecutionCompleteContentResourceLink + ToolExecutionCompleteContentResourceLinkIcon = rpc.ToolExecutionCompleteContentResourceLinkIcon + ToolExecutionCompleteContentResourceLinkIconTheme = rpc.ToolExecutionCompleteContentResourceLinkIconTheme + ToolExecutionCompleteContentShellExit = rpc.ToolExecutionCompleteContentShellExit + ToolExecutionCompleteContentTerminal = rpc.ToolExecutionCompleteContentTerminal + ToolExecutionCompleteContentText = rpc.ToolExecutionCompleteContentText + ToolExecutionCompleteContentType = rpc.ToolExecutionCompleteContentType + ToolExecutionCompleteData = rpc.ToolExecutionCompleteData + ToolExecutionCompleteError = rpc.ToolExecutionCompleteError + ToolExecutionCompleteResult = rpc.ToolExecutionCompleteResult + ToolExecutionCompleteToolDescription = rpc.ToolExecutionCompleteToolDescription + ToolExecutionCompleteToolDescriptionMeta = rpc.ToolExecutionCompleteToolDescriptionMeta + ToolExecutionCompleteToolDescriptionMetaUI = rpc.ToolExecutionCompleteToolDescriptionMetaUI + ToolExecutionCompleteToolDescriptionMetaUIVisibility = rpc.ToolExecutionCompleteToolDescriptionMetaUIVisibility + ToolExecutionCompleteUIResource = rpc.ToolExecutionCompleteUIResource + ToolExecutionCompleteUIResourceMeta = rpc.ToolExecutionCompleteUIResourceMeta + ToolExecutionCompleteUIResourceMetaUI = rpc.ToolExecutionCompleteUIResourceMetaUI + ToolExecutionCompleteUIResourceMetaUICsp = rpc.ToolExecutionCompleteUIResourceMetaUICsp + ToolExecutionCompleteUIResourceMetaUIPermissions = rpc.ToolExecutionCompleteUIResourceMetaUIPermissions + ToolExecutionCompleteUIResourceMetaUIPermissionsCamera = rpc.ToolExecutionCompleteUIResourceMetaUIPermissionsCamera ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite = rpc.ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite - ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation = rpc.ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation - ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone = rpc.ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone - ToolExecutionPartialResultData = rpc.ToolExecutionPartialResultData - ToolExecutionProgressData = rpc.ToolExecutionProgressData - ToolExecutionStartData = rpc.ToolExecutionStartData - ToolExecutionStartShellToolInfo = rpc.ToolExecutionStartShellToolInfo - ToolExecutionStartToolDescription = rpc.ToolExecutionStartToolDescription - ToolExecutionStartToolDescriptionMeta = rpc.ToolExecutionStartToolDescriptionMeta - ToolExecutionStartToolDescriptionMetaUI = rpc.ToolExecutionStartToolDescriptionMetaUI - ToolExecutionStartToolDescriptionMetaUIVisibility = rpc.ToolExecutionStartToolDescriptionMetaUIVisibility - ToolSearchActivatedData = rpc.ToolSearchActivatedData - ToolUserRequestedData = rpc.ToolUserRequestedData - UserInputCompletedData = rpc.UserInputCompletedData - UserInputRequestedData = rpc.UserInputRequestedData - UserMessageAgentMode = rpc.UserMessageAgentMode - UserMessageData = rpc.UserMessageData - UserMessageDelivery = rpc.UserMessageDelivery - UserToolSessionApproval = rpc.UserToolSessionApproval - UserToolSessionApprovalCommands = rpc.UserToolSessionApprovalCommands - UserToolSessionApprovalCustomTool = rpc.UserToolSessionApprovalCustomTool - UserToolSessionApprovalExtensionManagement = rpc.UserToolSessionApprovalExtensionManagement - UserToolSessionApprovalExtensionPermissionAccess = rpc.UserToolSessionApprovalExtensionPermissionAccess - UserToolSessionApprovalKind = rpc.UserToolSessionApprovalKind - UserToolSessionApprovalMCP = rpc.UserToolSessionApprovalMCP - UserToolSessionApprovalMemory = rpc.UserToolSessionApprovalMemory - UserToolSessionApprovalRead = rpc.UserToolSessionApprovalRead - UserToolSessionApprovalWrite = rpc.UserToolSessionApprovalWrite - Verbosity = rpc.Verbosity - WorkingDirectoryContext = rpc.WorkingDirectoryContext - WorkingDirectoryContextHostType = rpc.WorkingDirectoryContextHostType - WorkspaceFileChangedOperation = rpc.WorkspaceFileChangedOperation + ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation = rpc.ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation + ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone = rpc.ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone + ToolExecutionPartialResultData = rpc.ToolExecutionPartialResultData + ToolExecutionProgressData = rpc.ToolExecutionProgressData + ToolExecutionStartData = rpc.ToolExecutionStartData + ToolExecutionStartShellToolInfo = rpc.ToolExecutionStartShellToolInfo + ToolExecutionStartToolDescription = rpc.ToolExecutionStartToolDescription + ToolExecutionStartToolDescriptionMeta = rpc.ToolExecutionStartToolDescriptionMeta + ToolExecutionStartToolDescriptionMetaUI = rpc.ToolExecutionStartToolDescriptionMetaUI + ToolExecutionStartToolDescriptionMetaUIVisibility = rpc.ToolExecutionStartToolDescriptionMetaUIVisibility + ToolSearchActivatedData = rpc.ToolSearchActivatedData + ToolUserRequestedData = rpc.ToolUserRequestedData + UserInputCompletedData = rpc.UserInputCompletedData + UserInputRequestedData = rpc.UserInputRequestedData + UserMessageAgentMode = rpc.UserMessageAgentMode + UserMessageData = rpc.UserMessageData + UserMessageDelivery = rpc.UserMessageDelivery + UserToolSessionApproval = rpc.UserToolSessionApproval + UserToolSessionApprovalCommands = rpc.UserToolSessionApprovalCommands + UserToolSessionApprovalCustomTool = rpc.UserToolSessionApprovalCustomTool + UserToolSessionApprovalExtensionManagement = rpc.UserToolSessionApprovalExtensionManagement + UserToolSessionApprovalExtensionPermissionAccess = rpc.UserToolSessionApprovalExtensionPermissionAccess + UserToolSessionApprovalKind = rpc.UserToolSessionApprovalKind + UserToolSessionApprovalMCP = rpc.UserToolSessionApprovalMCP + UserToolSessionApprovalMemory = rpc.UserToolSessionApprovalMemory + UserToolSessionApprovalRead = rpc.UserToolSessionApprovalRead + UserToolSessionApprovalWrite = rpc.UserToolSessionApprovalWrite + Verbosity = rpc.Verbosity + WorkingDirectoryContext = rpc.WorkingDirectoryContext + WorkingDirectoryContextHostType = rpc.WorkingDirectoryContextHostType + WorkspaceFileChangedOperation = rpc.WorkspaceFileChangedOperation ) // Session-event constants are generated in the rpc package and re-exported here for source compatibility. const ( - AbortReasonRemoteCommand = rpc.AbortReasonRemoteCommand - AbortReasonUserAbort = rpc.AbortReasonUserAbort - AbortReasonUserInitiated = rpc.AbortReasonUserInitiated - AssistantMessageToolRequestTypeCustom = rpc.AssistantMessageToolRequestTypeCustom - AssistantMessageToolRequestTypeFunction = rpc.AssistantMessageToolRequestTypeFunction - AssistantUsageAPIEndpointChatCompletions = rpc.AssistantUsageAPIEndpointChatCompletions - AssistantUsageAPIEndpointResponses = rpc.AssistantUsageAPIEndpointResponses - AssistantUsageAPIEndpointV1Messages = rpc.AssistantUsageAPIEndpointV1Messages - AssistantUsageAPIEndpointWsResponses = rpc.AssistantUsageAPIEndpointWsResponses - AttachmentGitHubReferenceTypeDiscussion = rpc.AttachmentGitHubReferenceTypeDiscussion - AttachmentGitHubReferenceTypeIssue = rpc.AttachmentGitHubReferenceTypeIssue - AttachmentGitHubReferenceTypePr = rpc.AttachmentGitHubReferenceTypePr - AttachmentTypeBlob = rpc.AttachmentTypeBlob - AttachmentTypeDirectory = rpc.AttachmentTypeDirectory - AttachmentTypeExtensionContext = rpc.AttachmentTypeExtensionContext - AttachmentTypeFile = rpc.AttachmentTypeFile - AttachmentTypeGitHubActionsJob = rpc.AttachmentTypeGitHubActionsJob - AttachmentTypeGitHubCommit = rpc.AttachmentTypeGitHubCommit - AttachmentTypeGitHubFile = rpc.AttachmentTypeGitHubFile - AttachmentTypeGitHubFileDiff = rpc.AttachmentTypeGitHubFileDiff - AttachmentTypeGitHubReference = rpc.AttachmentTypeGitHubReference - AttachmentTypeGitHubRelease = rpc.AttachmentTypeGitHubRelease - AttachmentTypeGitHubRepository = rpc.AttachmentTypeGitHubRepository - AttachmentTypeGitHubSnippet = rpc.AttachmentTypeGitHubSnippet - AttachmentTypeGitHubTreeComparison = rpc.AttachmentTypeGitHubTreeComparison - AttachmentTypeGitHubURL = rpc.AttachmentTypeGitHubURL - AttachmentTypeSelection = rpc.AttachmentTypeSelection - AutoApprovalJudgeFailureReasonAbort = rpc.AutoApprovalJudgeFailureReasonAbort - AutoApprovalJudgeFailureReasonEmptyResponse = rpc.AutoApprovalJudgeFailureReasonEmptyResponse - AutoApprovalJudgeFailureReasonModelError = rpc.AutoApprovalJudgeFailureReasonModelError - AutoApprovalJudgeFailureReasonParseError = rpc.AutoApprovalJudgeFailureReasonParseError - AutoApprovalJudgeFailureReasonTimeout = rpc.AutoApprovalJudgeFailureReasonTimeout - AutoApprovalRecommendationApprove = rpc.AutoApprovalRecommendationApprove - AutoApprovalRecommendationError = rpc.AutoApprovalRecommendationError - AutoApprovalRecommendationExcluded = rpc.AutoApprovalRecommendationExcluded - AutoApprovalRecommendationRequireApproval = rpc.AutoApprovalRecommendationRequireApproval - AutoModeResolvedReasoningBucketHigh = rpc.AutoModeResolvedReasoningBucketHigh - AutoModeResolvedReasoningBucketLow = rpc.AutoModeResolvedReasoningBucketLow - AutoModeResolvedReasoningBucketMedium = rpc.AutoModeResolvedReasoningBucketMedium - AutoModeSwitchResponseNo = rpc.AutoModeSwitchResponseNo - AutoModeSwitchResponseYes = rpc.AutoModeSwitchResponseYes - AutoModeSwitchResponseYesAlways = rpc.AutoModeSwitchResponseYesAlways - AutopilotObjectiveChangedOperationCreate = rpc.AutopilotObjectiveChangedOperationCreate - AutopilotObjectiveChangedOperationDelete = rpc.AutopilotObjectiveChangedOperationDelete - AutopilotObjectiveChangedOperationUpdate = rpc.AutopilotObjectiveChangedOperationUpdate - AutopilotObjectiveChangedStatusActive = rpc.AutopilotObjectiveChangedStatusActive - AutopilotObjectiveChangedStatusCapReached = rpc.AutopilotObjectiveChangedStatusCapReached - AutopilotObjectiveChangedStatusCompleted = rpc.AutopilotObjectiveChangedStatusCompleted - AutopilotObjectiveChangedStatusPaused = rpc.AutopilotObjectiveChangedStatusPaused - BinaryAssetReferenceTypeImage = rpc.BinaryAssetReferenceTypeImage - BinaryAssetReferenceTypeResource = rpc.BinaryAssetReferenceTypeResource - BinaryAssetTypeImage = rpc.BinaryAssetTypeImage - BinaryAssetTypeResource = rpc.BinaryAssetTypeResource - CitationLocationTypeBlock = rpc.CitationLocationTypeBlock - CitationLocationTypeChar = rpc.CitationLocationTypeChar - CitationLocationTypePage = rpc.CitationLocationTypePage - CitationProviderAnthropic = rpc.CitationProviderAnthropic - CitationProviderClient = rpc.CitationProviderClient - CitationProviderOpenai = rpc.CitationProviderOpenai - CompactionTriggerContextLimitRetry = rpc.CompactionTriggerContextLimitRetry - CompactionTriggerManual = rpc.CompactionTriggerManual - CompactionTriggerMemoryPressure = rpc.CompactionTriggerMemoryPressure - CompactionTriggerModelSwitch = rpc.CompactionTriggerModelSwitch - CompactionTriggerThreshold = rpc.CompactionTriggerThreshold - ContextTierDefault = rpc.ContextTierDefault - ContextTierLongContext = rpc.ContextTierLongContext - ElicitationCompletedActionAccept = rpc.ElicitationCompletedActionAccept - ElicitationCompletedActionCancel = rpc.ElicitationCompletedActionCancel - ElicitationCompletedActionDecline = rpc.ElicitationCompletedActionDecline - ElicitationRequestedModeForm = rpc.ElicitationRequestedModeForm - ElicitationRequestedModeURL = rpc.ElicitationRequestedModeURL - ElicitationRequestedSchemaTypeObject = rpc.ElicitationRequestedSchemaTypeObject - ExitPlanModeActionAutopilot = rpc.ExitPlanModeActionAutopilot - ExitPlanModeActionAutopilotFleet = rpc.ExitPlanModeActionAutopilotFleet - ExitPlanModeActionExitOnly = rpc.ExitPlanModeActionExitOnly - ExitPlanModeActionInteractive = rpc.ExitPlanModeActionInteractive - ExtensionsLoadedExtensionSourcePlugin = rpc.ExtensionsLoadedExtensionSourcePlugin - ExtensionsLoadedExtensionSourceProject = rpc.ExtensionsLoadedExtensionSourceProject - ExtensionsLoadedExtensionSourceSession = rpc.ExtensionsLoadedExtensionSourceSession - ExtensionsLoadedExtensionSourceUser = rpc.ExtensionsLoadedExtensionSourceUser - ExtensionsLoadedExtensionStatusDisabled = rpc.ExtensionsLoadedExtensionStatusDisabled - ExtensionsLoadedExtensionStatusFailed = rpc.ExtensionsLoadedExtensionStatusFailed - ExtensionsLoadedExtensionStatusRunning = rpc.ExtensionsLoadedExtensionStatusRunning - ExtensionsLoadedExtensionStatusStarting = rpc.ExtensionsLoadedExtensionStatusStarting - HandoffSourceTypeLocal = rpc.HandoffSourceTypeLocal - HandoffSourceTypeRemote = rpc.HandoffSourceTypeRemote - ManagedSettingsEnforcedActionBypassPermissionsBlocked = rpc.ManagedSettingsEnforcedActionBypassPermissionsBlocked - ManagedSettingsEnforcedEscalationAllowAll = rpc.ManagedSettingsEnforcedEscalationAllowAll - ManagedSettingsEnforcedEscalationApproveAll = rpc.ManagedSettingsEnforcedEscalationApproveAll - ManagedSettingsEnforcedEscalationAutoApproval = rpc.ManagedSettingsEnforcedEscalationAutoApproval - ManagedSettingsEnforcedEscalationUnrestrictedPaths = rpc.ManagedSettingsEnforcedEscalationUnrestrictedPaths - ManagedSettingsEnforcedEscalationUnrestrictedURLs = rpc.ManagedSettingsEnforcedEscalationUnrestrictedURLs - ManagedSettingsResolvedSourceDevice = rpc.ManagedSettingsResolvedSourceDevice - ManagedSettingsResolvedSourceNone = rpc.ManagedSettingsResolvedSourceNone - ManagedSettingsResolvedSourceServer = rpc.ManagedSettingsResolvedSourceServer - MCPHeadersRefreshCompletedOutcomeHeaders = rpc.MCPHeadersRefreshCompletedOutcomeHeaders - MCPHeadersRefreshCompletedOutcomeNone = rpc.MCPHeadersRefreshCompletedOutcomeNone - MCPHeadersRefreshCompletedOutcomeTimeout = rpc.MCPHeadersRefreshCompletedOutcomeTimeout - MCPHeadersRefreshRequiredReasonAuthFailed = rpc.MCPHeadersRefreshRequiredReasonAuthFailed - MCPHeadersRefreshRequiredReasonStartup = rpc.MCPHeadersRefreshRequiredReasonStartup - MCPHeadersRefreshRequiredReasonTtlExpired = rpc.MCPHeadersRefreshRequiredReasonTtlExpired - MCPOauthCompletionOutcomeCancelled = rpc.MCPOauthCompletionOutcomeCancelled - MCPOauthCompletionOutcomeToken = rpc.MCPOauthCompletionOutcomeToken - MCPOauthRequestReasonInitial = rpc.MCPOauthRequestReasonInitial - MCPOauthRequestReasonReauth = rpc.MCPOauthRequestReasonReauth - MCPOauthRequestReasonRefresh = rpc.MCPOauthRequestReasonRefresh - MCPOauthRequestReasonUpscope = rpc.MCPOauthRequestReasonUpscope - MCPOauthRequiredStaticClientConfigGrantTypeClientCredentials = rpc.MCPOauthRequiredStaticClientConfigGrantTypeClientCredentials - MCPServerSourceBuiltin = rpc.MCPServerSourceBuiltin - MCPServerSourcePlugin = rpc.MCPServerSourcePlugin - MCPServerSourceUser = rpc.MCPServerSourceUser - MCPServerSourceWorkspace = rpc.MCPServerSourceWorkspace - MCPServerStatusConnected = rpc.MCPServerStatusConnected - MCPServerStatusDisabled = rpc.MCPServerStatusDisabled - MCPServerStatusFailed = rpc.MCPServerStatusFailed - MCPServerStatusNeedsAuth = rpc.MCPServerStatusNeedsAuth - MCPServerStatusNotConfigured = rpc.MCPServerStatusNotConfigured - MCPServerStatusPending = rpc.MCPServerStatusPending - MCPServerTransportHTTP = rpc.MCPServerTransportHTTP - MCPServerTransportMemory = rpc.MCPServerTransportMemory - MCPServerTransportSSE = rpc.MCPServerTransportSSE - MCPServerTransportStdio = rpc.MCPServerTransportStdio - ModelCallFailureBadRequestKindBodyless = rpc.ModelCallFailureBadRequestKindBodyless - ModelCallFailureBadRequestKindStructuredError = rpc.ModelCallFailureBadRequestKindStructuredError - ModelCallFailureKindAPI = rpc.ModelCallFailureKindAPI - ModelCallFailureKindTransport = rpc.ModelCallFailureKindTransport - ModelCallFailureSourceMCPSampling = rpc.ModelCallFailureSourceMCPSampling - ModelCallFailureSourceSubagent = rpc.ModelCallFailureSourceSubagent - ModelCallFailureSourceTopLevel = rpc.ModelCallFailureSourceTopLevel - ModelCallFailureTransportHTTP = rpc.ModelCallFailureTransportHTTP - ModelCallFailureTransportWebsocket = rpc.ModelCallFailureTransportWebsocket - OmittedBinaryOmittedReasonAssetUnavailable = rpc.OmittedBinaryOmittedReasonAssetUnavailable - OmittedBinaryOmittedReasonTooLarge = rpc.OmittedBinaryOmittedReasonTooLarge - OmittedBinaryTypeImage = rpc.OmittedBinaryTypeImage - OmittedBinaryTypeResource = rpc.OmittedBinaryTypeResource - PermissionAllowAllModeAuto = rpc.PermissionAllowAllModeAuto - PermissionAllowAllModeOff = rpc.PermissionAllowAllModeOff - PermissionAllowAllModeOn = rpc.PermissionAllowAllModeOn - PermissionPromptRequestKindCommands = rpc.PermissionPromptRequestKindCommands - PermissionPromptRequestKindCustomTool = rpc.PermissionPromptRequestKindCustomTool - PermissionPromptRequestKindExtensionManagement = rpc.PermissionPromptRequestKindExtensionManagement - PermissionPromptRequestKindExtensionPermissionAccess = rpc.PermissionPromptRequestKindExtensionPermissionAccess - PermissionPromptRequestKindHook = rpc.PermissionPromptRequestKindHook - PermissionPromptRequestKindMCP = rpc.PermissionPromptRequestKindMCP - PermissionPromptRequestKindMemory = rpc.PermissionPromptRequestKindMemory - PermissionPromptRequestKindPath = rpc.PermissionPromptRequestKindPath - PermissionPromptRequestKindRead = rpc.PermissionPromptRequestKindRead - PermissionPromptRequestKindURL = rpc.PermissionPromptRequestKindURL - PermissionPromptRequestKindWrite = rpc.PermissionPromptRequestKindWrite - PermissionPromptRequestPathAccessKindRead = rpc.PermissionPromptRequestPathAccessKindRead - PermissionPromptRequestPathAccessKindShell = rpc.PermissionPromptRequestPathAccessKindShell - PermissionPromptRequestPathAccessKindWrite = rpc.PermissionPromptRequestPathAccessKindWrite - PermissionRequestKindCustomTool = rpc.PermissionRequestKindCustomTool - PermissionRequestKindExtensionManagement = rpc.PermissionRequestKindExtensionManagement - PermissionRequestKindExtensionPermissionAccess = rpc.PermissionRequestKindExtensionPermissionAccess - PermissionRequestKindHook = rpc.PermissionRequestKindHook - PermissionRequestKindMCP = rpc.PermissionRequestKindMCP - PermissionRequestKindMemory = rpc.PermissionRequestKindMemory - PermissionRequestKindRead = rpc.PermissionRequestKindRead - PermissionRequestKindShell = rpc.PermissionRequestKindShell - PermissionRequestKindURL = rpc.PermissionRequestKindURL - PermissionRequestKindWrite = rpc.PermissionRequestKindWrite - PermissionRequestMemoryActionStore = rpc.PermissionRequestMemoryActionStore - PermissionRequestMemoryActionVote = rpc.PermissionRequestMemoryActionVote - PermissionRequestMemoryDirectionDownvote = rpc.PermissionRequestMemoryDirectionDownvote - PermissionRequestMemoryDirectionUpvote = rpc.PermissionRequestMemoryDirectionUpvote - PermissionResultKindApproved = rpc.PermissionResultKindApproved - PermissionResultKindApprovedForLocation = rpc.PermissionResultKindApprovedForLocation - PermissionResultKindApprovedForSession = rpc.PermissionResultKindApprovedForSession - PermissionResultKindCancelled = rpc.PermissionResultKindCancelled - PermissionResultKindDeniedByContentExclusionPolicy = rpc.PermissionResultKindDeniedByContentExclusionPolicy - PermissionResultKindDeniedByPermissionRequestHook = rpc.PermissionResultKindDeniedByPermissionRequestHook - PermissionResultKindDeniedByRules = rpc.PermissionResultKindDeniedByRules - PermissionResultKindDeniedInteractivelyByUser = rpc.PermissionResultKindDeniedInteractivelyByUser + AbortReasonRemoteCommand = rpc.AbortReasonRemoteCommand + AbortReasonUserAbort = rpc.AbortReasonUserAbort + AbortReasonUserInitiated = rpc.AbortReasonUserInitiated + AssistantMessageToolRequestTypeCustom = rpc.AssistantMessageToolRequestTypeCustom + AssistantMessageToolRequestTypeFunction = rpc.AssistantMessageToolRequestTypeFunction + AssistantUsageAPIEndpointChatCompletions = rpc.AssistantUsageAPIEndpointChatCompletions + AssistantUsageAPIEndpointResponses = rpc.AssistantUsageAPIEndpointResponses + AssistantUsageAPIEndpointV1Messages = rpc.AssistantUsageAPIEndpointV1Messages + AssistantUsageAPIEndpointWsResponses = rpc.AssistantUsageAPIEndpointWsResponses + AttachmentGitHubReferenceTypeDiscussion = rpc.AttachmentGitHubReferenceTypeDiscussion + AttachmentGitHubReferenceTypeIssue = rpc.AttachmentGitHubReferenceTypeIssue + AttachmentGitHubReferenceTypePr = rpc.AttachmentGitHubReferenceTypePr + AttachmentTypeBlob = rpc.AttachmentTypeBlob + AttachmentTypeDirectory = rpc.AttachmentTypeDirectory + AttachmentTypeExtensionContext = rpc.AttachmentTypeExtensionContext + AttachmentTypeFile = rpc.AttachmentTypeFile + AttachmentTypeGitHubActionsJob = rpc.AttachmentTypeGitHubActionsJob + AttachmentTypeGitHubCommit = rpc.AttachmentTypeGitHubCommit + AttachmentTypeGitHubFile = rpc.AttachmentTypeGitHubFile + AttachmentTypeGitHubFileDiff = rpc.AttachmentTypeGitHubFileDiff + AttachmentTypeGitHubReference = rpc.AttachmentTypeGitHubReference + AttachmentTypeGitHubRelease = rpc.AttachmentTypeGitHubRelease + AttachmentTypeGitHubRepository = rpc.AttachmentTypeGitHubRepository + AttachmentTypeGitHubSnippet = rpc.AttachmentTypeGitHubSnippet + AttachmentTypeGitHubTreeComparison = rpc.AttachmentTypeGitHubTreeComparison + AttachmentTypeGitHubURL = rpc.AttachmentTypeGitHubURL + AttachmentTypeSelection = rpc.AttachmentTypeSelection + AutoApprovalJudgeFailureReasonAbort = rpc.AutoApprovalJudgeFailureReasonAbort + AutoApprovalJudgeFailureReasonEmptyResponse = rpc.AutoApprovalJudgeFailureReasonEmptyResponse + AutoApprovalJudgeFailureReasonModelError = rpc.AutoApprovalJudgeFailureReasonModelError + AutoApprovalJudgeFailureReasonParseError = rpc.AutoApprovalJudgeFailureReasonParseError + AutoApprovalJudgeFailureReasonTimeout = rpc.AutoApprovalJudgeFailureReasonTimeout + AutoApprovalRecommendationApprove = rpc.AutoApprovalRecommendationApprove + AutoApprovalRecommendationError = rpc.AutoApprovalRecommendationError + AutoApprovalRecommendationExcluded = rpc.AutoApprovalRecommendationExcluded + AutoApprovalRecommendationRequireApproval = rpc.AutoApprovalRecommendationRequireApproval + AutoModeResolvedReasoningBucketHigh = rpc.AutoModeResolvedReasoningBucketHigh + AutoModeResolvedReasoningBucketLow = rpc.AutoModeResolvedReasoningBucketLow + AutoModeResolvedReasoningBucketMedium = rpc.AutoModeResolvedReasoningBucketMedium + AutoModeSwitchResponseNo = rpc.AutoModeSwitchResponseNo + AutoModeSwitchResponseYes = rpc.AutoModeSwitchResponseYes + AutoModeSwitchResponseYesAlways = rpc.AutoModeSwitchResponseYesAlways + AutopilotObjectiveChangedOperationCreate = rpc.AutopilotObjectiveChangedOperationCreate + AutopilotObjectiveChangedOperationDelete = rpc.AutopilotObjectiveChangedOperationDelete + AutopilotObjectiveChangedOperationUpdate = rpc.AutopilotObjectiveChangedOperationUpdate + AutopilotObjectiveChangedStatusActive = rpc.AutopilotObjectiveChangedStatusActive + AutopilotObjectiveChangedStatusCapReached = rpc.AutopilotObjectiveChangedStatusCapReached + AutopilotObjectiveChangedStatusCompleted = rpc.AutopilotObjectiveChangedStatusCompleted + AutopilotObjectiveChangedStatusPaused = rpc.AutopilotObjectiveChangedStatusPaused + BinaryAssetReferenceTypeImage = rpc.BinaryAssetReferenceTypeImage + BinaryAssetReferenceTypeResource = rpc.BinaryAssetReferenceTypeResource + BinaryAssetTypeImage = rpc.BinaryAssetTypeImage + BinaryAssetTypeResource = rpc.BinaryAssetTypeResource + CitationLocationTypeBlock = rpc.CitationLocationTypeBlock + CitationLocationTypeChar = rpc.CitationLocationTypeChar + CitationLocationTypePage = rpc.CitationLocationTypePage + CitationProviderAnthropic = rpc.CitationProviderAnthropic + CitationProviderClient = rpc.CitationProviderClient + CitationProviderOpenai = rpc.CitationProviderOpenai + CompactionTriggerContextLimitRetry = rpc.CompactionTriggerContextLimitRetry + CompactionTriggerManual = rpc.CompactionTriggerManual + CompactionTriggerMemoryPressure = rpc.CompactionTriggerMemoryPressure + CompactionTriggerModelSwitch = rpc.CompactionTriggerModelSwitch + CompactionTriggerThreshold = rpc.CompactionTriggerThreshold + ContextTierDefault = rpc.ContextTierDefault + ContextTierLongContext = rpc.ContextTierLongContext + ElicitationCompletedActionAccept = rpc.ElicitationCompletedActionAccept + ElicitationCompletedActionCancel = rpc.ElicitationCompletedActionCancel + ElicitationCompletedActionDecline = rpc.ElicitationCompletedActionDecline + ElicitationRequestedModeForm = rpc.ElicitationRequestedModeForm + ElicitationRequestedModeURL = rpc.ElicitationRequestedModeURL + ElicitationRequestedSchemaTypeObject = rpc.ElicitationRequestedSchemaTypeObject + ExitPlanModeActionAutopilot = rpc.ExitPlanModeActionAutopilot + ExitPlanModeActionAutopilotFleet = rpc.ExitPlanModeActionAutopilotFleet + ExitPlanModeActionExitOnly = rpc.ExitPlanModeActionExitOnly + ExitPlanModeActionInteractive = rpc.ExitPlanModeActionInteractive + ExtensionsLoadedExtensionSourcePlugin = rpc.ExtensionsLoadedExtensionSourcePlugin + ExtensionsLoadedExtensionSourceProject = rpc.ExtensionsLoadedExtensionSourceProject + ExtensionsLoadedExtensionSourceSession = rpc.ExtensionsLoadedExtensionSourceSession + ExtensionsLoadedExtensionSourceUser = rpc.ExtensionsLoadedExtensionSourceUser + ExtensionsLoadedExtensionStatusDisabled = rpc.ExtensionsLoadedExtensionStatusDisabled + ExtensionsLoadedExtensionStatusFailed = rpc.ExtensionsLoadedExtensionStatusFailed + ExtensionsLoadedExtensionStatusRunning = rpc.ExtensionsLoadedExtensionStatusRunning + ExtensionsLoadedExtensionStatusStarting = rpc.ExtensionsLoadedExtensionStatusStarting + HandoffSourceTypeLocal = rpc.HandoffSourceTypeLocal + HandoffSourceTypeRemote = rpc.HandoffSourceTypeRemote + ManagedSettingsEnforcedActionBypassPermissionsBlocked = rpc.ManagedSettingsEnforcedActionBypassPermissionsBlocked + ManagedSettingsEnforcedEscalationAllowAll = rpc.ManagedSettingsEnforcedEscalationAllowAll + ManagedSettingsEnforcedEscalationApproveAll = rpc.ManagedSettingsEnforcedEscalationApproveAll + ManagedSettingsEnforcedEscalationAutoApproval = rpc.ManagedSettingsEnforcedEscalationAutoApproval + ManagedSettingsEnforcedEscalationUnrestrictedPaths = rpc.ManagedSettingsEnforcedEscalationUnrestrictedPaths + ManagedSettingsEnforcedEscalationUnrestrictedURLs = rpc.ManagedSettingsEnforcedEscalationUnrestrictedURLs + ManagedSettingsResolvedSourceDevice = rpc.ManagedSettingsResolvedSourceDevice + ManagedSettingsResolvedSourceNone = rpc.ManagedSettingsResolvedSourceNone + ManagedSettingsResolvedSourceServer = rpc.ManagedSettingsResolvedSourceServer + MCPHeadersRefreshCompletedOutcomeHeaders = rpc.MCPHeadersRefreshCompletedOutcomeHeaders + MCPHeadersRefreshCompletedOutcomeNone = rpc.MCPHeadersRefreshCompletedOutcomeNone + MCPHeadersRefreshCompletedOutcomeTimeout = rpc.MCPHeadersRefreshCompletedOutcomeTimeout + MCPHeadersRefreshRequiredReasonAuthFailed = rpc.MCPHeadersRefreshRequiredReasonAuthFailed + MCPHeadersRefreshRequiredReasonStartup = rpc.MCPHeadersRefreshRequiredReasonStartup + MCPHeadersRefreshRequiredReasonTtlExpired = rpc.MCPHeadersRefreshRequiredReasonTtlExpired + MCPOauthCompletionOutcomeCancelled = rpc.MCPOauthCompletionOutcomeCancelled + MCPOauthCompletionOutcomeToken = rpc.MCPOauthCompletionOutcomeToken + MCPOauthRequestReasonInitial = rpc.MCPOauthRequestReasonInitial + MCPOauthRequestReasonReauth = rpc.MCPOauthRequestReasonReauth + MCPOauthRequestReasonRefresh = rpc.MCPOauthRequestReasonRefresh + MCPOauthRequestReasonUpscope = rpc.MCPOauthRequestReasonUpscope + MCPOauthRequiredStaticClientConfigGrantTypeClientCredentials = rpc.MCPOauthRequiredStaticClientConfigGrantTypeClientCredentials + MCPServerSourceBuiltin = rpc.MCPServerSourceBuiltin + MCPServerSourcePlugin = rpc.MCPServerSourcePlugin + MCPServerSourceUser = rpc.MCPServerSourceUser + MCPServerSourceWorkspace = rpc.MCPServerSourceWorkspace + MCPServerStatusConnected = rpc.MCPServerStatusConnected + MCPServerStatusDisabled = rpc.MCPServerStatusDisabled + MCPServerStatusFailed = rpc.MCPServerStatusFailed + MCPServerStatusNeedsAuth = rpc.MCPServerStatusNeedsAuth + MCPServerStatusNotConfigured = rpc.MCPServerStatusNotConfigured + MCPServerStatusPending = rpc.MCPServerStatusPending + MCPServerTransportHTTP = rpc.MCPServerTransportHTTP + MCPServerTransportMemory = rpc.MCPServerTransportMemory + MCPServerTransportSSE = rpc.MCPServerTransportSSE + MCPServerTransportStdio = rpc.MCPServerTransportStdio + ModelCallFailureBadRequestKindBodyless = rpc.ModelCallFailureBadRequestKindBodyless + ModelCallFailureBadRequestKindStructuredError = rpc.ModelCallFailureBadRequestKindStructuredError + ModelCallFailureKindAPI = rpc.ModelCallFailureKindAPI + ModelCallFailureKindTransport = rpc.ModelCallFailureKindTransport + ModelCallFailureSourceMCPSampling = rpc.ModelCallFailureSourceMCPSampling + ModelCallFailureSourceSubagent = rpc.ModelCallFailureSourceSubagent + ModelCallFailureSourceTopLevel = rpc.ModelCallFailureSourceTopLevel + ModelCallFailureTransportHTTP = rpc.ModelCallFailureTransportHTTP + ModelCallFailureTransportWebsocket = rpc.ModelCallFailureTransportWebsocket + OmittedBinaryOmittedReasonAssetUnavailable = rpc.OmittedBinaryOmittedReasonAssetUnavailable + OmittedBinaryOmittedReasonTooLarge = rpc.OmittedBinaryOmittedReasonTooLarge + OmittedBinaryTypeImage = rpc.OmittedBinaryTypeImage + OmittedBinaryTypeResource = rpc.OmittedBinaryTypeResource + PermissionAllowAllModeAuto = rpc.PermissionAllowAllModeAuto + PermissionAllowAllModeOff = rpc.PermissionAllowAllModeOff + PermissionAllowAllModeOn = rpc.PermissionAllowAllModeOn + PermissionPromptRequestKindCommands = rpc.PermissionPromptRequestKindCommands + PermissionPromptRequestKindCustomTool = rpc.PermissionPromptRequestKindCustomTool + PermissionPromptRequestKindExtensionManagement = rpc.PermissionPromptRequestKindExtensionManagement + PermissionPromptRequestKindExtensionPermissionAccess = rpc.PermissionPromptRequestKindExtensionPermissionAccess + PermissionPromptRequestKindHook = rpc.PermissionPromptRequestKindHook + PermissionPromptRequestKindMCP = rpc.PermissionPromptRequestKindMCP + PermissionPromptRequestKindMemory = rpc.PermissionPromptRequestKindMemory + PermissionPromptRequestKindPath = rpc.PermissionPromptRequestKindPath + PermissionPromptRequestKindRead = rpc.PermissionPromptRequestKindRead + PermissionPromptRequestKindURL = rpc.PermissionPromptRequestKindURL + PermissionPromptRequestKindWrite = rpc.PermissionPromptRequestKindWrite + PermissionPromptRequestPathAccessKindRead = rpc.PermissionPromptRequestPathAccessKindRead + PermissionPromptRequestPathAccessKindShell = rpc.PermissionPromptRequestPathAccessKindShell + PermissionPromptRequestPathAccessKindWrite = rpc.PermissionPromptRequestPathAccessKindWrite + PermissionRequestKindCustomTool = rpc.PermissionRequestKindCustomTool + PermissionRequestKindExtensionManagement = rpc.PermissionRequestKindExtensionManagement + PermissionRequestKindExtensionPermissionAccess = rpc.PermissionRequestKindExtensionPermissionAccess + PermissionRequestKindHook = rpc.PermissionRequestKindHook + PermissionRequestKindMCP = rpc.PermissionRequestKindMCP + PermissionRequestKindMemory = rpc.PermissionRequestKindMemory + PermissionRequestKindRead = rpc.PermissionRequestKindRead + PermissionRequestKindShell = rpc.PermissionRequestKindShell + PermissionRequestKindURL = rpc.PermissionRequestKindURL + PermissionRequestKindWrite = rpc.PermissionRequestKindWrite + PermissionRequestMemoryActionStore = rpc.PermissionRequestMemoryActionStore + PermissionRequestMemoryActionVote = rpc.PermissionRequestMemoryActionVote + PermissionRequestMemoryDirectionDownvote = rpc.PermissionRequestMemoryDirectionDownvote + PermissionRequestMemoryDirectionUpvote = rpc.PermissionRequestMemoryDirectionUpvote + PermissionResultKindApproved = rpc.PermissionResultKindApproved + PermissionResultKindApprovedForLocation = rpc.PermissionResultKindApprovedForLocation + PermissionResultKindApprovedForSession = rpc.PermissionResultKindApprovedForSession + PermissionResultKindCancelled = rpc.PermissionResultKindCancelled + PermissionResultKindDeniedByContentExclusionPolicy = rpc.PermissionResultKindDeniedByContentExclusionPolicy + PermissionResultKindDeniedByPermissionRequestHook = rpc.PermissionResultKindDeniedByPermissionRequestHook + PermissionResultKindDeniedByRules = rpc.PermissionResultKindDeniedByRules + PermissionResultKindDeniedInteractivelyByUser = rpc.PermissionResultKindDeniedInteractivelyByUser PermissionResultKindDeniedNoApprovalRuleAndCouldNotRequestFromUser = rpc.PermissionResultKindDeniedNoApprovalRuleAndCouldNotRequestFromUser - PersistedBinaryImageTypeImage = rpc.PersistedBinaryImageTypeImage - PersistedBinaryImageTypeResource = rpc.PersistedBinaryImageTypeResource - PersistedBinaryResultTypeImage = rpc.PersistedBinaryResultTypeImage - PersistedBinaryResultTypeResource = rpc.PersistedBinaryResultTypeResource - PlanChangedOperationCreate = rpc.PlanChangedOperationCreate - PlanChangedOperationDelete = rpc.PlanChangedOperationDelete - PlanChangedOperationUpdate = rpc.PlanChangedOperationUpdate - ReasoningSummaryConcise = rpc.ReasoningSummaryConcise - ReasoningSummaryDetailed = rpc.ReasoningSummaryDetailed - ReasoningSummaryNone = rpc.ReasoningSummaryNone - ScheduleOriginModel = rpc.ScheduleOriginModel - ScheduleOriginUser = rpc.ScheduleOriginUser - SessionEventTypeAbort = rpc.SessionEventTypeAbort - SessionEventTypeAssistantIdle = rpc.SessionEventTypeAssistantIdle - SessionEventTypeAssistantIntent = rpc.SessionEventTypeAssistantIntent - SessionEventTypeAssistantMessage = rpc.SessionEventTypeAssistantMessage - SessionEventTypeAssistantMessageDelta = rpc.SessionEventTypeAssistantMessageDelta - SessionEventTypeAssistantMessageStart = rpc.SessionEventTypeAssistantMessageStart - SessionEventTypeAssistantReasoning = rpc.SessionEventTypeAssistantReasoning - SessionEventTypeAssistantReasoningDelta = rpc.SessionEventTypeAssistantReasoningDelta - SessionEventTypeAssistantServerToolProgress = rpc.SessionEventTypeAssistantServerToolProgress - SessionEventTypeAssistantStreamingDelta = rpc.SessionEventTypeAssistantStreamingDelta - SessionEventTypeAssistantToolCallDelta = rpc.SessionEventTypeAssistantToolCallDelta - SessionEventTypeAssistantTurnEnd = rpc.SessionEventTypeAssistantTurnEnd - SessionEventTypeAssistantTurnRetry = rpc.SessionEventTypeAssistantTurnRetry - SessionEventTypeAssistantTurnStart = rpc.SessionEventTypeAssistantTurnStart - SessionEventTypeAssistantUsage = rpc.SessionEventTypeAssistantUsage - SessionEventTypeAutoModeSwitchCompleted = rpc.SessionEventTypeAutoModeSwitchCompleted - SessionEventTypeAutoModeSwitchRequested = rpc.SessionEventTypeAutoModeSwitchRequested - SessionEventTypeCapabilitiesChanged = rpc.SessionEventTypeCapabilitiesChanged - SessionEventTypeCommandCompleted = rpc.SessionEventTypeCommandCompleted - SessionEventTypeCommandExecute = rpc.SessionEventTypeCommandExecute - SessionEventTypeCommandQueued = rpc.SessionEventTypeCommandQueued - SessionEventTypeCommandsChanged = rpc.SessionEventTypeCommandsChanged - SessionEventTypeElicitationCompleted = rpc.SessionEventTypeElicitationCompleted - SessionEventTypeElicitationRequested = rpc.SessionEventTypeElicitationRequested - SessionEventTypeExitPlanModeCompleted = rpc.SessionEventTypeExitPlanModeCompleted - SessionEventTypeExitPlanModeRequested = rpc.SessionEventTypeExitPlanModeRequested - SessionEventTypeExternalToolCompleted = rpc.SessionEventTypeExternalToolCompleted - SessionEventTypeExternalToolRequested = rpc.SessionEventTypeExternalToolRequested - SessionEventTypeFactoryRunUpdated = rpc.SessionEventTypeFactoryRunUpdated - SessionEventTypeHookEnd = rpc.SessionEventTypeHookEnd - SessionEventTypeHookProgress = rpc.SessionEventTypeHookProgress - SessionEventTypeHookStart = rpc.SessionEventTypeHookStart - SessionEventTypeMCPAppToolCallComplete = rpc.SessionEventTypeMCPAppToolCallComplete - SessionEventTypeMCPHeadersRefreshCompleted = rpc.SessionEventTypeMCPHeadersRefreshCompleted - SessionEventTypeMCPHeadersRefreshRequired = rpc.SessionEventTypeMCPHeadersRefreshRequired - SessionEventTypeMCPOauthCompleted = rpc.SessionEventTypeMCPOauthCompleted - SessionEventTypeMCPOauthRequired = rpc.SessionEventTypeMCPOauthRequired - SessionEventTypeMCPPromptsListChanged = rpc.SessionEventTypeMCPPromptsListChanged - SessionEventTypeMCPResourcesListChanged = rpc.SessionEventTypeMCPResourcesListChanged - SessionEventTypeMCPToolsListChanged = rpc.SessionEventTypeMCPToolsListChanged - SessionEventTypeModelCallFailure = rpc.SessionEventTypeModelCallFailure - SessionEventTypeModelCallStart = rpc.SessionEventTypeModelCallStart - SessionEventTypePendingMessagesModified = rpc.SessionEventTypePendingMessagesModified - SessionEventTypePermissionCompleted = rpc.SessionEventTypePermissionCompleted - SessionEventTypePermissionRequested = rpc.SessionEventTypePermissionRequested - SessionEventTypeSamplingCompleted = rpc.SessionEventTypeSamplingCompleted - SessionEventTypeSamplingRequested = rpc.SessionEventTypeSamplingRequested - SessionEventTypeSessionAutoModeResolved = rpc.SessionEventTypeSessionAutoModeResolved - SessionEventTypeSessionAutopilotObjectiveChanged = rpc.SessionEventTypeSessionAutopilotObjectiveChanged - SessionEventTypeSessionBackgroundTasksChanged = rpc.SessionEventTypeSessionBackgroundTasksChanged - SessionEventTypeSessionBinaryAsset = rpc.SessionEventTypeSessionBinaryAsset - SessionEventTypeSessionCanvasClosed = rpc.SessionEventTypeSessionCanvasClosed - SessionEventTypeSessionCanvasOpened = rpc.SessionEventTypeSessionCanvasOpened - SessionEventTypeSessionCanvasRecorded = rpc.SessionEventTypeSessionCanvasRecorded - SessionEventTypeSessionCanvasRegistryChanged = rpc.SessionEventTypeSessionCanvasRegistryChanged - SessionEventTypeSessionCanvasRemoved = rpc.SessionEventTypeSessionCanvasRemoved - SessionEventTypeSessionCanvasUnavailable = rpc.SessionEventTypeSessionCanvasUnavailable - SessionEventTypeSessionCompactionComplete = rpc.SessionEventTypeSessionCompactionComplete - SessionEventTypeSessionCompactionStart = rpc.SessionEventTypeSessionCompactionStart - SessionEventTypeSessionContextChanged = rpc.SessionEventTypeSessionContextChanged - SessionEventTypeSessionCustomAgentsUpdated = rpc.SessionEventTypeSessionCustomAgentsUpdated - SessionEventTypeSessionCustomNotification = rpc.SessionEventTypeSessionCustomNotification - SessionEventTypeSessionError = rpc.SessionEventTypeSessionError - SessionEventTypeSessionExtensionsAttachmentsPushed = rpc.SessionEventTypeSessionExtensionsAttachmentsPushed - SessionEventTypeSessionExtensionsLoaded = rpc.SessionEventTypeSessionExtensionsLoaded - SessionEventTypeSessionHandoff = rpc.SessionEventTypeSessionHandoff - SessionEventTypeSessionIdle = rpc.SessionEventTypeSessionIdle - SessionEventTypeSessionInfo = rpc.SessionEventTypeSessionInfo - SessionEventTypeSessionLimitsExhaustedCompleted = rpc.SessionEventTypeSessionLimitsExhaustedCompleted - SessionEventTypeSessionLimitsExhaustedRequested = rpc.SessionEventTypeSessionLimitsExhaustedRequested - SessionEventTypeSessionManagedSettingsEnforced = rpc.SessionEventTypeSessionManagedSettingsEnforced - SessionEventTypeSessionManagedSettingsResolved = rpc.SessionEventTypeSessionManagedSettingsResolved - SessionEventTypeSessionMCPServersLoaded = rpc.SessionEventTypeSessionMCPServersLoaded - SessionEventTypeSessionMCPServerStatusChanged = rpc.SessionEventTypeSessionMCPServerStatusChanged - SessionEventTypeSessionModeChanged = rpc.SessionEventTypeSessionModeChanged - SessionEventTypeSessionModelChange = rpc.SessionEventTypeSessionModelChange - SessionEventTypeSessionPermissionsChanged = rpc.SessionEventTypeSessionPermissionsChanged - SessionEventTypeSessionPlanChanged = rpc.SessionEventTypeSessionPlanChanged - SessionEventTypeSessionRemoteSteerableChanged = rpc.SessionEventTypeSessionRemoteSteerableChanged - SessionEventTypeSessionResume = rpc.SessionEventTypeSessionResume - SessionEventTypeSessionScheduleCancelled = rpc.SessionEventTypeSessionScheduleCancelled - SessionEventTypeSessionScheduleCreated = rpc.SessionEventTypeSessionScheduleCreated - SessionEventTypeSessionScheduleRearmed = rpc.SessionEventTypeSessionScheduleRearmed - SessionEventTypeSessionSessionLimitsChanged = rpc.SessionEventTypeSessionSessionLimitsChanged - SessionEventTypeSessionShutdown = rpc.SessionEventTypeSessionShutdown - SessionEventTypeSessionSkillsLoaded = rpc.SessionEventTypeSessionSkillsLoaded - SessionEventTypeSessionSnapshotRewind = rpc.SessionEventTypeSessionSnapshotRewind - SessionEventTypeSessionStart = rpc.SessionEventTypeSessionStart - SessionEventTypeSessionTaskComplete = rpc.SessionEventTypeSessionTaskComplete - SessionEventTypeSessionTitleChanged = rpc.SessionEventTypeSessionTitleChanged - SessionEventTypeSessionTodosChanged = rpc.SessionEventTypeSessionTodosChanged - SessionEventTypeSessionToolsUpdated = rpc.SessionEventTypeSessionToolsUpdated - SessionEventTypeSessionTruncation = rpc.SessionEventTypeSessionTruncation - SessionEventTypeSessionUsageCheckpoint = rpc.SessionEventTypeSessionUsageCheckpoint - SessionEventTypeSessionUsageInfo = rpc.SessionEventTypeSessionUsageInfo - SessionEventTypeSessionWarning = rpc.SessionEventTypeSessionWarning - SessionEventTypeSessionWorkspaceFileChanged = rpc.SessionEventTypeSessionWorkspaceFileChanged - SessionEventTypeSkillInvoked = rpc.SessionEventTypeSkillInvoked - SessionEventTypeSubagentCompleted = rpc.SessionEventTypeSubagentCompleted - SessionEventTypeSubagentDeselected = rpc.SessionEventTypeSubagentDeselected - SessionEventTypeSubagentFailed = rpc.SessionEventTypeSubagentFailed - SessionEventTypeSubagentSelected = rpc.SessionEventTypeSubagentSelected - SessionEventTypeSubagentStarted = rpc.SessionEventTypeSubagentStarted - SessionEventTypeSystemMessage = rpc.SessionEventTypeSystemMessage - SessionEventTypeSystemNotification = rpc.SessionEventTypeSystemNotification - SessionEventTypeToolExecutionComplete = rpc.SessionEventTypeToolExecutionComplete - SessionEventTypeToolExecutionPartialResult = rpc.SessionEventTypeToolExecutionPartialResult - SessionEventTypeToolExecutionProgress = rpc.SessionEventTypeToolExecutionProgress - SessionEventTypeToolExecutionStart = rpc.SessionEventTypeToolExecutionStart - SessionEventTypeToolSearchActivated = rpc.SessionEventTypeToolSearchActivated - SessionEventTypeToolUserRequested = rpc.SessionEventTypeToolUserRequested - SessionEventTypeUserInputCompleted = rpc.SessionEventTypeUserInputCompleted - SessionEventTypeUserInputRequested = rpc.SessionEventTypeUserInputRequested - SessionEventTypeUserMessage = rpc.SessionEventTypeUserMessage - SessionLimitsExhaustedResponseActionAdd = rpc.SessionLimitsExhaustedResponseActionAdd - SessionLimitsExhaustedResponseActionCancel = rpc.SessionLimitsExhaustedResponseActionCancel - SessionLimitsExhaustedResponseActionSet = rpc.SessionLimitsExhaustedResponseActionSet - SessionLimitsExhaustedResponseActionUnset = rpc.SessionLimitsExhaustedResponseActionUnset - SessionModeAutopilot = rpc.SessionModeAutopilot - SessionModeInteractive = rpc.SessionModeInteractive - SessionModePlan = rpc.SessionModePlan - ShutdownTypeError = rpc.ShutdownTypeError - ShutdownTypeRoutine = rpc.ShutdownTypeRoutine - SkillInvokedTriggerAgentInvoked = rpc.SkillInvokedTriggerAgentInvoked - SkillInvokedTriggerContextLoad = rpc.SkillInvokedTriggerContextLoad - SkillInvokedTriggerUserInvoked = rpc.SkillInvokedTriggerUserInvoked - SkillSourceBuiltin = rpc.SkillSourceBuiltin - SkillSourceCustom = rpc.SkillSourceCustom - SkillSourceInherited = rpc.SkillSourceInherited - SkillSourcePersonalAgents = rpc.SkillSourcePersonalAgents - SkillSourcePersonalCopilot = rpc.SkillSourcePersonalCopilot - SkillSourcePlugin = rpc.SkillSourcePlugin - SkillSourceProject = rpc.SkillSourceProject - SystemMessageRoleDeveloper = rpc.SystemMessageRoleDeveloper - SystemMessageRoleSystem = rpc.SystemMessageRoleSystem - SystemNotificationAgentCompletedStatusCompleted = rpc.SystemNotificationAgentCompletedStatusCompleted - SystemNotificationAgentCompletedStatusFailed = rpc.SystemNotificationAgentCompletedStatusFailed - SystemNotificationTypeAgentCompleted = rpc.SystemNotificationTypeAgentCompleted - SystemNotificationTypeAgentIdle = rpc.SystemNotificationTypeAgentIdle - SystemNotificationTypeInstructionDiscovered = rpc.SystemNotificationTypeInstructionDiscovered - SystemNotificationTypeNewInboxMessage = rpc.SystemNotificationTypeNewInboxMessage - SystemNotificationTypeShellCompleted = rpc.SystemNotificationTypeShellCompleted - SystemNotificationTypeShellDetachedCompleted = rpc.SystemNotificationTypeShellDetachedCompleted - SystemNotificationTypeUnclassified = rpc.SystemNotificationTypeUnclassified - TaskCompletionOutcomeBlocked = rpc.TaskCompletionOutcomeBlocked - TaskCompletionOutcomeCompleted = rpc.TaskCompletionOutcomeCompleted - TaskCompletionOutcomeContinue = rpc.TaskCompletionOutcomeContinue - ToolExecutionCompleteContentResourceLinkIconThemeDark = rpc.ToolExecutionCompleteContentResourceLinkIconThemeDark - ToolExecutionCompleteContentResourceLinkIconThemeLight = rpc.ToolExecutionCompleteContentResourceLinkIconThemeLight - ToolExecutionCompleteContentTypeAudio = rpc.ToolExecutionCompleteContentTypeAudio - ToolExecutionCompleteContentTypeImage = rpc.ToolExecutionCompleteContentTypeImage - ToolExecutionCompleteContentTypeResource = rpc.ToolExecutionCompleteContentTypeResource - ToolExecutionCompleteContentTypeResourceLink = rpc.ToolExecutionCompleteContentTypeResourceLink - ToolExecutionCompleteContentTypeShellExit = rpc.ToolExecutionCompleteContentTypeShellExit - ToolExecutionCompleteContentTypeTerminal = rpc.ToolExecutionCompleteContentTypeTerminal - ToolExecutionCompleteContentTypeText = rpc.ToolExecutionCompleteContentTypeText - ToolExecutionCompleteToolDescriptionMetaUIVisibilityApp = rpc.ToolExecutionCompleteToolDescriptionMetaUIVisibilityApp - ToolExecutionCompleteToolDescriptionMetaUIVisibilityModel = rpc.ToolExecutionCompleteToolDescriptionMetaUIVisibilityModel - ToolExecutionStartToolDescriptionMetaUIVisibilityApp = rpc.ToolExecutionStartToolDescriptionMetaUIVisibilityApp - ToolExecutionStartToolDescriptionMetaUIVisibilityModel = rpc.ToolExecutionStartToolDescriptionMetaUIVisibilityModel - UserMessageAgentModeAutopilot = rpc.UserMessageAgentModeAutopilot - UserMessageAgentModeInteractive = rpc.UserMessageAgentModeInteractive - UserMessageAgentModePlan = rpc.UserMessageAgentModePlan - UserMessageAgentModeShell = rpc.UserMessageAgentModeShell - UserMessageDeliveryIdle = rpc.UserMessageDeliveryIdle - UserMessageDeliveryQueued = rpc.UserMessageDeliveryQueued - UserMessageDeliverySteering = rpc.UserMessageDeliverySteering - UserToolSessionApprovalKindCommands = rpc.UserToolSessionApprovalKindCommands - UserToolSessionApprovalKindCustomTool = rpc.UserToolSessionApprovalKindCustomTool - UserToolSessionApprovalKindExtensionManagement = rpc.UserToolSessionApprovalKindExtensionManagement - UserToolSessionApprovalKindExtensionPermissionAccess = rpc.UserToolSessionApprovalKindExtensionPermissionAccess - UserToolSessionApprovalKindMCP = rpc.UserToolSessionApprovalKindMCP - UserToolSessionApprovalKindMemory = rpc.UserToolSessionApprovalKindMemory - UserToolSessionApprovalKindRead = rpc.UserToolSessionApprovalKindRead - UserToolSessionApprovalKindWrite = rpc.UserToolSessionApprovalKindWrite - VerbosityHigh = rpc.VerbosityHigh - VerbosityLow = rpc.VerbosityLow - VerbosityMedium = rpc.VerbosityMedium - WorkingDirectoryContextHostTypeADO = rpc.WorkingDirectoryContextHostTypeADO - WorkingDirectoryContextHostTypeGitHub = rpc.WorkingDirectoryContextHostTypeGitHub - WorkspaceFileChangedOperationCreate = rpc.WorkspaceFileChangedOperationCreate - WorkspaceFileChangedOperationUpdate = rpc.WorkspaceFileChangedOperationUpdate -) + PersistedBinaryImageTypeImage = rpc.PersistedBinaryImageTypeImage + PersistedBinaryImageTypeResource = rpc.PersistedBinaryImageTypeResource + PersistedBinaryResultTypeImage = rpc.PersistedBinaryResultTypeImage + PersistedBinaryResultTypeResource = rpc.PersistedBinaryResultTypeResource + PlanChangedOperationCreate = rpc.PlanChangedOperationCreate + PlanChangedOperationDelete = rpc.PlanChangedOperationDelete + PlanChangedOperationUpdate = rpc.PlanChangedOperationUpdate + ReasoningSummaryConcise = rpc.ReasoningSummaryConcise + ReasoningSummaryDetailed = rpc.ReasoningSummaryDetailed + ReasoningSummaryNone = rpc.ReasoningSummaryNone + ScheduleOriginModel = rpc.ScheduleOriginModel + ScheduleOriginUser = rpc.ScheduleOriginUser + SessionEventTypeAbort = rpc.SessionEventTypeAbort + SessionEventTypeAssistantIdle = rpc.SessionEventTypeAssistantIdle + SessionEventTypeAssistantIntent = rpc.SessionEventTypeAssistantIntent + SessionEventTypeAssistantMessage = rpc.SessionEventTypeAssistantMessage + SessionEventTypeAssistantMessageDelta = rpc.SessionEventTypeAssistantMessageDelta + SessionEventTypeAssistantMessageStart = rpc.SessionEventTypeAssistantMessageStart + SessionEventTypeAssistantReasoning = rpc.SessionEventTypeAssistantReasoning + SessionEventTypeAssistantReasoningDelta = rpc.SessionEventTypeAssistantReasoningDelta + SessionEventTypeAssistantServerToolProgress = rpc.SessionEventTypeAssistantServerToolProgress + SessionEventTypeAssistantStreamingDelta = rpc.SessionEventTypeAssistantStreamingDelta + SessionEventTypeAssistantToolCallDelta = rpc.SessionEventTypeAssistantToolCallDelta + SessionEventTypeAssistantTurnEnd = rpc.SessionEventTypeAssistantTurnEnd + SessionEventTypeAssistantTurnRetry = rpc.SessionEventTypeAssistantTurnRetry + SessionEventTypeAssistantTurnStart = rpc.SessionEventTypeAssistantTurnStart + SessionEventTypeAssistantUsage = rpc.SessionEventTypeAssistantUsage + SessionEventTypeAutoModeSwitchCompleted = rpc.SessionEventTypeAutoModeSwitchCompleted + SessionEventTypeAutoModeSwitchRequested = rpc.SessionEventTypeAutoModeSwitchRequested + SessionEventTypeCapabilitiesChanged = rpc.SessionEventTypeCapabilitiesChanged + SessionEventTypeCommandCompleted = rpc.SessionEventTypeCommandCompleted + SessionEventTypeCommandExecute = rpc.SessionEventTypeCommandExecute + SessionEventTypeCommandQueued = rpc.SessionEventTypeCommandQueued + SessionEventTypeCommandsChanged = rpc.SessionEventTypeCommandsChanged + SessionEventTypeElicitationCompleted = rpc.SessionEventTypeElicitationCompleted + SessionEventTypeElicitationRequested = rpc.SessionEventTypeElicitationRequested + SessionEventTypeExitPlanModeCompleted = rpc.SessionEventTypeExitPlanModeCompleted + SessionEventTypeExitPlanModeRequested = rpc.SessionEventTypeExitPlanModeRequested + SessionEventTypeExternalToolCompleted = rpc.SessionEventTypeExternalToolCompleted + SessionEventTypeExternalToolRequested = rpc.SessionEventTypeExternalToolRequested + SessionEventTypeFactoryRunUpdated = rpc.SessionEventTypeFactoryRunUpdated + SessionEventTypeHookEnd = rpc.SessionEventTypeHookEnd + SessionEventTypeHookProgress = rpc.SessionEventTypeHookProgress + SessionEventTypeHookStart = rpc.SessionEventTypeHookStart + SessionEventTypeMCPAppToolCallComplete = rpc.SessionEventTypeMCPAppToolCallComplete + SessionEventTypeMCPHeadersRefreshCompleted = rpc.SessionEventTypeMCPHeadersRefreshCompleted + SessionEventTypeMCPHeadersRefreshRequired = rpc.SessionEventTypeMCPHeadersRefreshRequired + SessionEventTypeMCPOauthCompleted = rpc.SessionEventTypeMCPOauthCompleted + SessionEventTypeMCPOauthRequired = rpc.SessionEventTypeMCPOauthRequired + SessionEventTypeMCPPromptsListChanged = rpc.SessionEventTypeMCPPromptsListChanged + SessionEventTypeMCPResourcesListChanged = rpc.SessionEventTypeMCPResourcesListChanged + SessionEventTypeMCPToolsListChanged = rpc.SessionEventTypeMCPToolsListChanged + SessionEventTypeModelCallFailure = rpc.SessionEventTypeModelCallFailure + SessionEventTypeModelCallStart = rpc.SessionEventTypeModelCallStart + SessionEventTypePendingMessagesModified = rpc.SessionEventTypePendingMessagesModified + SessionEventTypePermissionCompleted = rpc.SessionEventTypePermissionCompleted + SessionEventTypePermissionRequested = rpc.SessionEventTypePermissionRequested + SessionEventTypeSamplingCompleted = rpc.SessionEventTypeSamplingCompleted + SessionEventTypeSamplingRequested = rpc.SessionEventTypeSamplingRequested + SessionEventTypeSessionAutoModeResolved = rpc.SessionEventTypeSessionAutoModeResolved + SessionEventTypeSessionAutopilotObjectiveChanged = rpc.SessionEventTypeSessionAutopilotObjectiveChanged + SessionEventTypeSessionBackgroundTasksChanged = rpc.SessionEventTypeSessionBackgroundTasksChanged + SessionEventTypeSessionBinaryAsset = rpc.SessionEventTypeSessionBinaryAsset + SessionEventTypeSessionCanvasClosed = rpc.SessionEventTypeSessionCanvasClosed + SessionEventTypeSessionCanvasOpened = rpc.SessionEventTypeSessionCanvasOpened + SessionEventTypeSessionCanvasRecorded = rpc.SessionEventTypeSessionCanvasRecorded + SessionEventTypeSessionCanvasRegistryChanged = rpc.SessionEventTypeSessionCanvasRegistryChanged + SessionEventTypeSessionCanvasRemoved = rpc.SessionEventTypeSessionCanvasRemoved + SessionEventTypeSessionCanvasUnavailable = rpc.SessionEventTypeSessionCanvasUnavailable + SessionEventTypeSessionCompactionComplete = rpc.SessionEventTypeSessionCompactionComplete + SessionEventTypeSessionCompactionStart = rpc.SessionEventTypeSessionCompactionStart + SessionEventTypeSessionContextChanged = rpc.SessionEventTypeSessionContextChanged + SessionEventTypeSessionCustomAgentsUpdated = rpc.SessionEventTypeSessionCustomAgentsUpdated + SessionEventTypeSessionCustomNotification = rpc.SessionEventTypeSessionCustomNotification + SessionEventTypeSessionError = rpc.SessionEventTypeSessionError + SessionEventTypeSessionExtensionsAttachmentsPushed = rpc.SessionEventTypeSessionExtensionsAttachmentsPushed + SessionEventTypeSessionExtensionsLoaded = rpc.SessionEventTypeSessionExtensionsLoaded + SessionEventTypeSessionHandoff = rpc.SessionEventTypeSessionHandoff + SessionEventTypeSessionIdle = rpc.SessionEventTypeSessionIdle + SessionEventTypeSessionInfo = rpc.SessionEventTypeSessionInfo + SessionEventTypeSessionLimitsExhaustedCompleted = rpc.SessionEventTypeSessionLimitsExhaustedCompleted + SessionEventTypeSessionLimitsExhaustedRequested = rpc.SessionEventTypeSessionLimitsExhaustedRequested + SessionEventTypeSessionManagedSettingsEnforced = rpc.SessionEventTypeSessionManagedSettingsEnforced + SessionEventTypeSessionManagedSettingsResolved = rpc.SessionEventTypeSessionManagedSettingsResolved + SessionEventTypeSessionMCPServersLoaded = rpc.SessionEventTypeSessionMCPServersLoaded + SessionEventTypeSessionMCPServerStatusChanged = rpc.SessionEventTypeSessionMCPServerStatusChanged + SessionEventTypeSessionModeChanged = rpc.SessionEventTypeSessionModeChanged + SessionEventTypeSessionModelChange = rpc.SessionEventTypeSessionModelChange + SessionEventTypeSessionPermissionsChanged = rpc.SessionEventTypeSessionPermissionsChanged + SessionEventTypeSessionPlanChanged = rpc.SessionEventTypeSessionPlanChanged + SessionEventTypeSessionRemoteSteerableChanged = rpc.SessionEventTypeSessionRemoteSteerableChanged + SessionEventTypeSessionResume = rpc.SessionEventTypeSessionResume + SessionEventTypeSessionScheduleCancelled = rpc.SessionEventTypeSessionScheduleCancelled + SessionEventTypeSessionScheduleCreated = rpc.SessionEventTypeSessionScheduleCreated + SessionEventTypeSessionScheduleRearmed = rpc.SessionEventTypeSessionScheduleRearmed + SessionEventTypeSessionSessionLimitsChanged = rpc.SessionEventTypeSessionSessionLimitsChanged + SessionEventTypeSessionShutdown = rpc.SessionEventTypeSessionShutdown + SessionEventTypeSessionSkillsLoaded = rpc.SessionEventTypeSessionSkillsLoaded + SessionEventTypeSessionSnapshotRewind = rpc.SessionEventTypeSessionSnapshotRewind + SessionEventTypeSessionStart = rpc.SessionEventTypeSessionStart + SessionEventTypeSessionTaskComplete = rpc.SessionEventTypeSessionTaskComplete + SessionEventTypeSessionTitleChanged = rpc.SessionEventTypeSessionTitleChanged + SessionEventTypeSessionTodosChanged = rpc.SessionEventTypeSessionTodosChanged + SessionEventTypeSessionToolsUpdated = rpc.SessionEventTypeSessionToolsUpdated + SessionEventTypeSessionTruncation = rpc.SessionEventTypeSessionTruncation + SessionEventTypeSessionUsageCheckpoint = rpc.SessionEventTypeSessionUsageCheckpoint + SessionEventTypeSessionUsageInfo = rpc.SessionEventTypeSessionUsageInfo + SessionEventTypeSessionWarning = rpc.SessionEventTypeSessionWarning + SessionEventTypeSessionWorkspaceFileChanged = rpc.SessionEventTypeSessionWorkspaceFileChanged + SessionEventTypeSkillInvoked = rpc.SessionEventTypeSkillInvoked + SessionEventTypeSubagentCompleted = rpc.SessionEventTypeSubagentCompleted + SessionEventTypeSubagentDeselected = rpc.SessionEventTypeSubagentDeselected + SessionEventTypeSubagentFailed = rpc.SessionEventTypeSubagentFailed + SessionEventTypeSubagentSelected = rpc.SessionEventTypeSubagentSelected + SessionEventTypeSubagentStarted = rpc.SessionEventTypeSubagentStarted + SessionEventTypeSystemMessage = rpc.SessionEventTypeSystemMessage + SessionEventTypeSystemNotification = rpc.SessionEventTypeSystemNotification + SessionEventTypeToolExecutionComplete = rpc.SessionEventTypeToolExecutionComplete + SessionEventTypeToolExecutionPartialResult = rpc.SessionEventTypeToolExecutionPartialResult + SessionEventTypeToolExecutionProgress = rpc.SessionEventTypeToolExecutionProgress + SessionEventTypeToolExecutionStart = rpc.SessionEventTypeToolExecutionStart + SessionEventTypeToolSearchActivated = rpc.SessionEventTypeToolSearchActivated + SessionEventTypeToolUserRequested = rpc.SessionEventTypeToolUserRequested + SessionEventTypeUserInputCompleted = rpc.SessionEventTypeUserInputCompleted + SessionEventTypeUserInputRequested = rpc.SessionEventTypeUserInputRequested + SessionEventTypeUserMessage = rpc.SessionEventTypeUserMessage + SessionLimitsExhaustedResponseActionAdd = rpc.SessionLimitsExhaustedResponseActionAdd + SessionLimitsExhaustedResponseActionCancel = rpc.SessionLimitsExhaustedResponseActionCancel + SessionLimitsExhaustedResponseActionSet = rpc.SessionLimitsExhaustedResponseActionSet + SessionLimitsExhaustedResponseActionUnset = rpc.SessionLimitsExhaustedResponseActionUnset + SessionModeAutopilot = rpc.SessionModeAutopilot + SessionModeInteractive = rpc.SessionModeInteractive + SessionModePlan = rpc.SessionModePlan + ShutdownTypeError = rpc.ShutdownTypeError + ShutdownTypeRoutine = rpc.ShutdownTypeRoutine + SkillInvokedTriggerAgentInvoked = rpc.SkillInvokedTriggerAgentInvoked + SkillInvokedTriggerContextLoad = rpc.SkillInvokedTriggerContextLoad + SkillInvokedTriggerUserInvoked = rpc.SkillInvokedTriggerUserInvoked + SkillSourceBuiltin = rpc.SkillSourceBuiltin + SkillSourceCustom = rpc.SkillSourceCustom + SkillSourceInherited = rpc.SkillSourceInherited + SkillSourcePersonalAgents = rpc.SkillSourcePersonalAgents + SkillSourcePersonalCopilot = rpc.SkillSourcePersonalCopilot + SkillSourcePlugin = rpc.SkillSourcePlugin + SkillSourceProject = rpc.SkillSourceProject + SystemMessageRoleDeveloper = rpc.SystemMessageRoleDeveloper + SystemMessageRoleSystem = rpc.SystemMessageRoleSystem + SystemNotificationAgentCompletedStatusCompleted = rpc.SystemNotificationAgentCompletedStatusCompleted + SystemNotificationAgentCompletedStatusFailed = rpc.SystemNotificationAgentCompletedStatusFailed + SystemNotificationTypeAgentCompleted = rpc.SystemNotificationTypeAgentCompleted + SystemNotificationTypeAgentIdle = rpc.SystemNotificationTypeAgentIdle + SystemNotificationTypeInstructionDiscovered = rpc.SystemNotificationTypeInstructionDiscovered + SystemNotificationTypeNewInboxMessage = rpc.SystemNotificationTypeNewInboxMessage + SystemNotificationTypeShellCompleted = rpc.SystemNotificationTypeShellCompleted + SystemNotificationTypeShellDetachedCompleted = rpc.SystemNotificationTypeShellDetachedCompleted + SystemNotificationTypeUnclassified = rpc.SystemNotificationTypeUnclassified + TaskCompletionOutcomeBlocked = rpc.TaskCompletionOutcomeBlocked + TaskCompletionOutcomeCompleted = rpc.TaskCompletionOutcomeCompleted + TaskCompletionOutcomeContinue = rpc.TaskCompletionOutcomeContinue + ToolExecutionCompleteContentResourceLinkIconThemeDark = rpc.ToolExecutionCompleteContentResourceLinkIconThemeDark + ToolExecutionCompleteContentResourceLinkIconThemeLight = rpc.ToolExecutionCompleteContentResourceLinkIconThemeLight + ToolExecutionCompleteContentTypeAudio = rpc.ToolExecutionCompleteContentTypeAudio + ToolExecutionCompleteContentTypeImage = rpc.ToolExecutionCompleteContentTypeImage + ToolExecutionCompleteContentTypeResource = rpc.ToolExecutionCompleteContentTypeResource + ToolExecutionCompleteContentTypeResourceLink = rpc.ToolExecutionCompleteContentTypeResourceLink + ToolExecutionCompleteContentTypeShellExit = rpc.ToolExecutionCompleteContentTypeShellExit + ToolExecutionCompleteContentTypeTerminal = rpc.ToolExecutionCompleteContentTypeTerminal + ToolExecutionCompleteContentTypeText = rpc.ToolExecutionCompleteContentTypeText + ToolExecutionCompleteToolDescriptionMetaUIVisibilityApp = rpc.ToolExecutionCompleteToolDescriptionMetaUIVisibilityApp + ToolExecutionCompleteToolDescriptionMetaUIVisibilityModel = rpc.ToolExecutionCompleteToolDescriptionMetaUIVisibilityModel + ToolExecutionStartToolDescriptionMetaUIVisibilityApp = rpc.ToolExecutionStartToolDescriptionMetaUIVisibilityApp + ToolExecutionStartToolDescriptionMetaUIVisibilityModel = rpc.ToolExecutionStartToolDescriptionMetaUIVisibilityModel + UserMessageAgentModeAutopilot = rpc.UserMessageAgentModeAutopilot + UserMessageAgentModeInteractive = rpc.UserMessageAgentModeInteractive + UserMessageAgentModePlan = rpc.UserMessageAgentModePlan + UserMessageAgentModeShell = rpc.UserMessageAgentModeShell + UserMessageDeliveryIdle = rpc.UserMessageDeliveryIdle + UserMessageDeliveryQueued = rpc.UserMessageDeliveryQueued + UserMessageDeliverySteering = rpc.UserMessageDeliverySteering + UserToolSessionApprovalKindCommands = rpc.UserToolSessionApprovalKindCommands + UserToolSessionApprovalKindCustomTool = rpc.UserToolSessionApprovalKindCustomTool + UserToolSessionApprovalKindExtensionManagement = rpc.UserToolSessionApprovalKindExtensionManagement + UserToolSessionApprovalKindExtensionPermissionAccess = rpc.UserToolSessionApprovalKindExtensionPermissionAccess + UserToolSessionApprovalKindMCP = rpc.UserToolSessionApprovalKindMCP + UserToolSessionApprovalKindMemory = rpc.UserToolSessionApprovalKindMemory + UserToolSessionApprovalKindRead = rpc.UserToolSessionApprovalKindRead + UserToolSessionApprovalKindWrite = rpc.UserToolSessionApprovalKindWrite + VerbosityHigh = rpc.VerbosityHigh + VerbosityLow = rpc.VerbosityLow + VerbosityMedium = rpc.VerbosityMedium + WorkingDirectoryContextHostTypeADO = rpc.WorkingDirectoryContextHostTypeADO + WorkingDirectoryContextHostTypeGitHub = rpc.WorkingDirectoryContextHostTypeGitHub + WorkspaceFileChangedOperationCreate = rpc.WorkspaceFileChangedOperationCreate + WorkspaceFileChangedOperationUpdate = rpc.WorkspaceFileChangedOperationUpdate +) \ No newline at end of file diff --git a/rust/src/generated/api_types.rs b/rust/src/generated/api_types.rs index 909b3b8f58..339882d411 100644 --- a/rust/src/generated/api_types.rs +++ b/rust/src/generated/api_types.rs @@ -9,12 +9,8 @@ use std::collections::HashMap; use serde::{Deserialize, Serialize}; -use super::session_events::{ - AbortReason, ContextTier, McpServerSource, McpServerStatus, PermissionPromptRequest, - PermissionRule, ReasoningSummary, SessionLimitsConfig, SessionMode, ShutdownType, SkillSource, - UserToolSessionApproval, Verbosity, -}; use crate::types::{RequestId, SessionEvent, SessionId}; +use super::session_events::{AbortReason, ContextTier, McpServerSource, McpServerStatus, PermissionPromptRequest, PermissionRule, ReasoningSummary, SessionLimitsConfig, SessionMode, ShutdownType, SkillSource, UserToolSessionApproval, Verbosity}; /// JSON-RPC method name constants. pub mod rpc_methods { @@ -171,8 +167,7 @@ pub mod rpc_methods { /// `sessions.getRemoteControlStatus` pub const SESSIONS_GETREMOTECONTROLSTATUS: &str = "sessions.getRemoteControlStatus"; /// `sessions.registerExtensionToolsOnSession` - pub const SESSIONS_REGISTEREXTENSIONTOOLSONSESSION: &str = - "sessions.registerExtensionToolsOnSession"; + pub const SESSIONS_REGISTEREXTENSIONTOOLSONSESSION: &str = "sessions.registerExtensionToolsOnSession"; /// `sessions.configureSessionExtensions` pub const SESSIONS_CONFIGURESESSIONEXTENSIONS: &str = "sessions.configureSessionExtensions"; /// `agentRegistry.spawn` @@ -258,8 +253,7 @@ pub mod rpc_methods { /// `session.plan.readSqlTodos` pub const SESSION_PLAN_READSQLTODOS: &str = "session.plan.readSqlTodos"; /// `session.plan.readSqlTodosWithDependencies` - pub const SESSION_PLAN_READSQLTODOSWITHDEPENDENCIES: &str = - "session.plan.readSqlTodosWithDependencies"; + pub const SESSION_PLAN_READSQLTODOSWITHDEPENDENCIES: &str = "session.plan.readSqlTodosWithDependencies"; /// `session.workspaces.getWorkspace` pub const SESSION_WORKSPACES_GETWORKSPACE: &str = "session.workspaces.getWorkspace"; /// `session.workspaces.updateMetadata` @@ -281,24 +275,19 @@ pub mod rpc_methods { /// `session.workspaces.truncateSummaries` pub const SESSION_WORKSPACES_TRUNCATESUMMARIES: &str = "session.workspaces.truncateSummaries"; /// `session.workspaces.readAutopilotObjective` - pub const SESSION_WORKSPACES_READAUTOPILOTOBJECTIVE: &str = - "session.workspaces.readAutopilotObjective"; + pub const SESSION_WORKSPACES_READAUTOPILOTOBJECTIVE: &str = "session.workspaces.readAutopilotObjective"; /// `session.workspaces.writeAutopilotObjective` - pub const SESSION_WORKSPACES_WRITEAUTOPILOTOBJECTIVE: &str = - "session.workspaces.writeAutopilotObjective"; + pub const SESSION_WORKSPACES_WRITEAUTOPILOTOBJECTIVE: &str = "session.workspaces.writeAutopilotObjective"; /// `session.workspaces.deleteAutopilotObjective` - pub const SESSION_WORKSPACES_DELETEAUTOPILOTOBJECTIVE: &str = - "session.workspaces.deleteAutopilotObjective"; + pub const SESSION_WORKSPACES_DELETEAUTOPILOTOBJECTIVE: &str = "session.workspaces.deleteAutopilotObjective"; /// `session.workspaces.autopilotObjectiveExists` - pub const SESSION_WORKSPACES_AUTOPILOTOBJECTIVEEXISTS: &str = - "session.workspaces.autopilotObjectiveExists"; + pub const SESSION_WORKSPACES_AUTOPILOTOBJECTIVEEXISTS: &str = "session.workspaces.autopilotObjectiveExists"; /// `session.workspaces.saveLargePaste` pub const SESSION_WORKSPACES_SAVELARGEPASTE: &str = "session.workspaces.saveLargePaste"; /// `session.workspaces.diff` pub const SESSION_WORKSPACES_DIFF: &str = "session.workspaces.diff"; /// `session.completions.getTriggerCharacters` - pub const SESSION_COMPLETIONS_GETTRIGGERCHARACTERS: &str = - "session.completions.getTriggerCharacters"; + pub const SESSION_COMPLETIONS_GETTRIGGERCHARACTERS: &str = "session.completions.getTriggerCharacters"; /// `session.completions.request` pub const SESSION_COMPLETIONS_REQUEST: &str = "session.completions.request"; /// `session.instructions.getSources` @@ -330,8 +319,7 @@ pub mod rpc_methods { /// `session.tasks.promoteToBackground` pub const SESSION_TASKS_PROMOTETOBACKGROUND: &str = "session.tasks.promoteToBackground"; /// `session.tasks.promoteCurrentToBackground` - pub const SESSION_TASKS_PROMOTECURRENTTOBACKGROUND: &str = - "session.tasks.promoteCurrentToBackground"; + pub const SESSION_TASKS_PROMOTECURRENTTOBACKGROUND: &str = "session.tasks.promoteCurrentToBackground"; /// `session.tasks.cancel` pub const SESSION_TASKS_CANCEL: &str = "session.tasks.cancel"; /// `session.tasks.remove` @@ -385,15 +373,13 @@ pub mod rpc_methods { /// `session.mcp.isServerRunning` pub const SESSION_MCP_ISSERVERRUNNING: &str = "session.mcp.isServerRunning"; /// `session.mcp.oauth.handlePendingRequest` - pub const SESSION_MCP_OAUTH_HANDLEPENDINGREQUEST: &str = - "session.mcp.oauth.handlePendingRequest"; + pub const SESSION_MCP_OAUTH_HANDLEPENDINGREQUEST: &str = "session.mcp.oauth.handlePendingRequest"; /// `session.mcp.oauth.login` pub const SESSION_MCP_OAUTH_LOGIN: &str = "session.mcp.oauth.login"; /// `session.mcp.oauth.respond` pub const SESSION_MCP_OAUTH_RESPOND: &str = "session.mcp.oauth.respond"; /// `session.mcp.headers.handlePendingHeadersRefreshRequest` - pub const SESSION_MCP_HEADERS_HANDLEPENDINGHEADERSREFRESHREQUEST: &str = - "session.mcp.headers.handlePendingHeadersRefreshRequest"; + pub const SESSION_MCP_HEADERS_HANDLEPENDINGHEADERSREFRESHREQUEST: &str = "session.mcp.headers.handlePendingHeadersRefreshRequest"; /// `session.mcp.apps.readResource` pub const SESSION_MCP_APPS_READRESOURCE: &str = "session.mcp.apps.readResource"; /// `session.mcp.apps.listTools` @@ -433,8 +419,7 @@ pub mod rpc_methods { /// `session.extensions.reload` pub const SESSION_EXTENSIONS_RELOAD: &str = "session.extensions.reload"; /// `session.extensions.sendAttachmentsToMessage` - pub const SESSION_EXTENSIONS_SENDATTACHMENTSTOMESSAGE: &str = - "session.extensions.sendAttachmentsToMessage"; + pub const SESSION_EXTENSIONS_SENDATTACHMENTSTOMESSAGE: &str = "session.extensions.sendAttachmentsToMessage"; /// `session.tools.handlePendingToolCall` pub const SESSION_TOOLS_HANDLEPENDINGTOOLCALL: &str = "session.tools.handlePendingToolCall"; /// `session.tools.initializeAndValidate` @@ -454,8 +439,7 @@ pub mod rpc_methods { /// `session.commands.enqueue` pub const SESSION_COMMANDS_ENQUEUE: &str = "session.commands.enqueue"; /// `session.commands.respondToQueuedCommand` - pub const SESSION_COMMANDS_RESPONDTOQUEUEDCOMMAND: &str = - "session.commands.respondToQueuedCommand"; + pub const SESSION_COMMANDS_RESPONDTOQUEUEDCOMMAND: &str = "session.commands.respondToQueuedCommand"; /// `session.telemetry.getEngagementId` pub const SESSION_TELEMETRY_GETENGAGEMENTID: &str = "session.telemetry.getEngagementId"; /// `session.telemetry.setFeatureOverrides` @@ -471,24 +455,19 @@ pub mod rpc_methods { /// `session.ui.handlePendingSampling` pub const SESSION_UI_HANDLEPENDINGSAMPLING: &str = "session.ui.handlePendingSampling"; /// `session.ui.handlePendingAutoModeSwitch` - pub const SESSION_UI_HANDLEPENDINGAUTOMODESWITCH: &str = - "session.ui.handlePendingAutoModeSwitch"; + pub const SESSION_UI_HANDLEPENDINGAUTOMODESWITCH: &str = "session.ui.handlePendingAutoModeSwitch"; /// `session.ui.handlePendingSessionLimitsExhausted` - pub const SESSION_UI_HANDLEPENDINGSESSIONLIMITSEXHAUSTED: &str = - "session.ui.handlePendingSessionLimitsExhausted"; + pub const SESSION_UI_HANDLEPENDINGSESSIONLIMITSEXHAUSTED: &str = "session.ui.handlePendingSessionLimitsExhausted"; /// `session.ui.handlePendingExitPlanMode` pub const SESSION_UI_HANDLEPENDINGEXITPLANMODE: &str = "session.ui.handlePendingExitPlanMode"; /// `session.ui.registerDirectAutoModeSwitchHandler` - pub const SESSION_UI_REGISTERDIRECTAUTOMODESWITCHHANDLER: &str = - "session.ui.registerDirectAutoModeSwitchHandler"; + pub const SESSION_UI_REGISTERDIRECTAUTOMODESWITCHHANDLER: &str = "session.ui.registerDirectAutoModeSwitchHandler"; /// `session.ui.unregisterDirectAutoModeSwitchHandler` - pub const SESSION_UI_UNREGISTERDIRECTAUTOMODESWITCHHANDLER: &str = - "session.ui.unregisterDirectAutoModeSwitchHandler"; + pub const SESSION_UI_UNREGISTERDIRECTAUTOMODESWITCHHANDLER: &str = "session.ui.unregisterDirectAutoModeSwitchHandler"; /// `session.permissions.configure` pub const SESSION_PERMISSIONS_CONFIGURE: &str = "session.permissions.configure"; /// `session.permissions.handlePendingPermissionRequest` - pub const SESSION_PERMISSIONS_HANDLEPENDINGPERMISSIONREQUEST: &str = - "session.permissions.handlePendingPermissionRequest"; + pub const SESSION_PERMISSIONS_HANDLEPENDINGPERMISSIONREQUEST: &str = "session.permissions.handlePendingPermissionRequest"; /// `session.permissions.pendingRequests` pub const SESSION_PERMISSIONS_PENDINGREQUESTS: &str = "session.permissions.pendingRequests"; /// `session.permissions.setApproveAll` @@ -502,8 +481,7 @@ pub mod rpc_methods { /// `session.permissions.setRequired` pub const SESSION_PERMISSIONS_SETREQUIRED: &str = "session.permissions.setRequired"; /// `session.permissions.resetSessionApprovals` - pub const SESSION_PERMISSIONS_RESETSESSIONAPPROVALS: &str = - "session.permissions.resetSessionApprovals"; + pub const SESSION_PERMISSIONS_RESETSESSIONAPPROVALS: &str = "session.permissions.resetSessionApprovals"; /// `session.permissions.notifyPromptShown` pub const SESSION_PERMISSIONS_NOTIFYPROMPTSHOWN: &str = "session.permissions.notifyPromptShown"; /// `session.permissions.paths.list` @@ -511,30 +489,23 @@ pub mod rpc_methods { /// `session.permissions.paths.add` pub const SESSION_PERMISSIONS_PATHS_ADD: &str = "session.permissions.paths.add"; /// `session.permissions.paths.updatePrimary` - pub const SESSION_PERMISSIONS_PATHS_UPDATEPRIMARY: &str = - "session.permissions.paths.updatePrimary"; + pub const SESSION_PERMISSIONS_PATHS_UPDATEPRIMARY: &str = "session.permissions.paths.updatePrimary"; /// `session.permissions.paths.isPathWithinAllowedDirectories` - pub const SESSION_PERMISSIONS_PATHS_ISPATHWITHINALLOWEDDIRECTORIES: &str = - "session.permissions.paths.isPathWithinAllowedDirectories"; + pub const SESSION_PERMISSIONS_PATHS_ISPATHWITHINALLOWEDDIRECTORIES: &str = "session.permissions.paths.isPathWithinAllowedDirectories"; /// `session.permissions.paths.isPathWithinWorkspace` - pub const SESSION_PERMISSIONS_PATHS_ISPATHWITHINWORKSPACE: &str = - "session.permissions.paths.isPathWithinWorkspace"; + pub const SESSION_PERMISSIONS_PATHS_ISPATHWITHINWORKSPACE: &str = "session.permissions.paths.isPathWithinWorkspace"; /// `session.permissions.locations.resolve` pub const SESSION_PERMISSIONS_LOCATIONS_RESOLVE: &str = "session.permissions.locations.resolve"; /// `session.permissions.locations.apply` pub const SESSION_PERMISSIONS_LOCATIONS_APPLY: &str = "session.permissions.locations.apply"; /// `session.permissions.locations.addToolApproval` - pub const SESSION_PERMISSIONS_LOCATIONS_ADDTOOLAPPROVAL: &str = - "session.permissions.locations.addToolApproval"; + pub const SESSION_PERMISSIONS_LOCATIONS_ADDTOOLAPPROVAL: &str = "session.permissions.locations.addToolApproval"; /// `session.permissions.folderTrust.isTrusted` - pub const SESSION_PERMISSIONS_FOLDERTRUST_ISTRUSTED: &str = - "session.permissions.folderTrust.isTrusted"; + pub const SESSION_PERMISSIONS_FOLDERTRUST_ISTRUSTED: &str = "session.permissions.folderTrust.isTrusted"; /// `session.permissions.folderTrust.addTrusted` - pub const SESSION_PERMISSIONS_FOLDERTRUST_ADDTRUSTED: &str = - "session.permissions.folderTrust.addTrusted"; + pub const SESSION_PERMISSIONS_FOLDERTRUST_ADDTRUSTED: &str = "session.permissions.folderTrust.addTrusted"; /// `session.permissions.urls.setUnrestrictedMode` - pub const SESSION_PERMISSIONS_URLS_SETUNRESTRICTEDMODE: &str = - "session.permissions.urls.setUnrestrictedMode"; + pub const SESSION_PERMISSIONS_URLS_SETUNRESTRICTEDMODE: &str = "session.permissions.urls.setUnrestrictedMode"; /// `session.log` pub const SESSION_LOG: &str = "session.log"; /// `session.metadata.snapshot` @@ -546,18 +517,15 @@ pub mod rpc_methods { /// `session.metadata.contextInfo` pub const SESSION_METADATA_CONTEXTINFO: &str = "session.metadata.contextInfo"; /// `session.metadata.getContextAttribution` - pub const SESSION_METADATA_GETCONTEXTATTRIBUTION: &str = - "session.metadata.getContextAttribution"; + pub const SESSION_METADATA_GETCONTEXTATTRIBUTION: &str = "session.metadata.getContextAttribution"; /// `session.metadata.getContextHeaviestMessages` - pub const SESSION_METADATA_GETCONTEXTHEAVIESTMESSAGES: &str = - "session.metadata.getContextHeaviestMessages"; + pub const SESSION_METADATA_GETCONTEXTHEAVIESTMESSAGES: &str = "session.metadata.getContextHeaviestMessages"; /// `session.metadata.recordContextChange` pub const SESSION_METADATA_RECORDCONTEXTCHANGE: &str = "session.metadata.recordContextChange"; /// `session.metadata.setWorkingDirectory` pub const SESSION_METADATA_SETWORKINGDIRECTORY: &str = "session.metadata.setWorkingDirectory"; /// `session.metadata.recomputeContextTokens` - pub const SESSION_METADATA_RECOMPUTECONTEXTTOKENS: &str = - "session.metadata.recomputeContextTokens"; + pub const SESSION_METADATA_RECOMPUTECONTEXTTOKENS: &str = "session.metadata.recomputeContextTokens"; /// `session.settings.snapshot` pub const SESSION_SETTINGS_SNAPSHOT: &str = "session.settings.snapshot"; /// `session.settings.evaluatePredicate` @@ -583,8 +551,7 @@ pub mod rpc_methods { /// `session.history.rewind` pub const SESSION_HISTORY_REWIND: &str = "session.history.rewind"; /// `session.history.cancelBackgroundCompaction` - pub const SESSION_HISTORY_CANCELBACKGROUNDCOMPACTION: &str = - "session.history.cancelBackgroundCompaction"; + pub const SESSION_HISTORY_CANCELBACKGROUNDCOMPACTION: &str = "session.history.cancelBackgroundCompaction"; /// `session.history.abortManualCompaction` pub const SESSION_HISTORY_ABORTMANUALCOMPACTION: &str = "session.history.abortManualCompaction"; /// `session.history.summarizeForHandoff` @@ -620,8 +587,7 @@ pub mod rpc_methods { /// `session.queue.clear` pub const SESSION_QUEUE_CLEAR: &str = "session.queue.clear"; /// `session.queue.consumeSystemNotifications` - pub const SESSION_QUEUE_CONSUMESYSTEMNOTIFICATIONS: &str = - "session.queue.consumeSystemNotifications"; + pub const SESSION_QUEUE_CONSUMESYSTEMNOTIFICATIONS: &str = "session.queue.consumeSystemNotifications"; /// `session.queue.enqueueResumePending` pub const SESSION_QUEUE_ENQUEUERESUMEPENDING: &str = "session.queue.enqueueResumePending"; /// `session.queue.process` @@ -1426,10 +1392,7 @@ pub struct CopilotUserResponseQuotaSnapshotsChat { #[serde(rename = "timestamp_utc", skip_serializing_if = "Option::is_none")] pub timestamp_utc: Option, /// Whether this category uses usage-based (token/AI-credit) billing rather than a fixed premium-request count. - #[serde( - rename = "token_based_billing", - skip_serializing_if = "Option::is_none" - )] + #[serde(rename = "token_based_billing", skip_serializing_if = "Option::is_none")] pub token_based_billing: Option, /// Whether the entitlement for this category is unlimited. #[serde(skip_serializing_if = "Option::is_none")] @@ -1478,10 +1441,7 @@ pub struct CopilotUserResponseQuotaSnapshotsCompletions { #[serde(rename = "timestamp_utc", skip_serializing_if = "Option::is_none")] pub timestamp_utc: Option, /// Whether this category uses usage-based (token/AI-credit) billing rather than a fixed premium-request count. - #[serde( - rename = "token_based_billing", - skip_serializing_if = "Option::is_none" - )] + #[serde(rename = "token_based_billing", skip_serializing_if = "Option::is_none")] pub token_based_billing: Option, /// Whether the entitlement for this category is unlimited. #[serde(skip_serializing_if = "Option::is_none")] @@ -1530,10 +1490,7 @@ pub struct CopilotUserResponseQuotaSnapshotsPremiumInteractions { #[serde(rename = "timestamp_utc", skip_serializing_if = "Option::is_none")] pub timestamp_utc: Option, /// Whether this category uses usage-based (token/AI-credit) billing rather than a fixed premium-request count. - #[serde( - rename = "token_based_billing", - skip_serializing_if = "Option::is_none" - )] + #[serde(rename = "token_based_billing", skip_serializing_if = "Option::is_none")] pub token_based_billing: Option, /// Whether the entitlement for this category is unlimited. #[serde(skip_serializing_if = "Option::is_none")] @@ -1558,10 +1515,7 @@ pub struct CopilotUserResponseQuotaSnapshots { #[serde(skip_serializing_if = "Option::is_none")] pub completions: Option, /// Premium-interactions quota snapshot from the raw Copilot user-response passthrough, with entitlement, overage, remaining quota, reset, and billing fields. - #[serde( - rename = "premium_interactions", - skip_serializing_if = "Option::is_none" - )] + #[serde(rename = "premium_interactions", skip_serializing_if = "Option::is_none")] pub premium_interactions: Option, } @@ -1580,19 +1534,13 @@ pub struct CopilotUserResponse { #[serde(rename = "access_type_sku", skip_serializing_if = "Option::is_none")] pub access_type_sku: Option, /// Opaque analytics tracking identifier for the user, forwarded from the Copilot API. - #[serde( - rename = "analytics_tracking_id", - skip_serializing_if = "Option::is_none" - )] + #[serde(rename = "analytics_tracking_id", skip_serializing_if = "Option::is_none")] pub analytics_tracking_id: Option, /// Date the Copilot seat was assigned to the user, if applicable. #[serde(rename = "assigned_date", skip_serializing_if = "Option::is_none")] pub assigned_date: Option, /// Whether the user is eligible to sign up for the free/limited Copilot tier. - #[serde( - rename = "can_signup_for_limited", - skip_serializing_if = "Option::is_none" - )] + #[serde(rename = "can_signup_for_limited", skip_serializing_if = "Option::is_none")] pub can_signup_for_limited: Option, /// Whether the user is able to upgrade their Copilot plan. #[serde(rename = "can_upgrade_plan", skip_serializing_if = "Option::is_none")] @@ -1601,31 +1549,19 @@ pub struct CopilotUserResponse { #[serde(rename = "chat_enabled", skip_serializing_if = "Option::is_none")] pub chat_enabled: Option, /// Whether CLI remote control is enabled for the user. - #[serde( - rename = "cli_remote_control_enabled", - skip_serializing_if = "Option::is_none" - )] + #[serde(rename = "cli_remote_control_enabled", skip_serializing_if = "Option::is_none")] pub cli_remote_control_enabled: Option, /// Whether cloud session storage is enabled for the user. - #[serde( - rename = "cloud_session_storage_enabled", - skip_serializing_if = "Option::is_none" - )] + #[serde(rename = "cloud_session_storage_enabled", skip_serializing_if = "Option::is_none")] pub cloud_session_storage_enabled: Option, /// Whether the Codex agent is enabled for the user. - #[serde( - rename = "codex_agent_enabled", - skip_serializing_if = "Option::is_none" - )] + #[serde(rename = "codex_agent_enabled", skip_serializing_if = "Option::is_none")] pub codex_agent_enabled: Option, /// Copilot plan name for the user (e.g. `individual`, `business`, `enterprise`). #[serde(rename = "copilot_plan", skip_serializing_if = "Option::is_none")] pub copilot_plan: Option, /// Whether `.copilotignore` content-exclusion support is enabled for the user. - #[serde( - rename = "copilotignore_enabled", - skip_serializing_if = "Option::is_none" - )] + #[serde(rename = "copilotignore_enabled", skip_serializing_if = "Option::is_none")] pub copilotignore_enabled: Option, /// Endpoint URLs from the raw Copilot `/copilot_internal/v2/token` user-response passthrough. #[serde(skip_serializing_if = "Option::is_none")] @@ -1637,16 +1573,10 @@ pub struct CopilotUserResponse { #[serde(rename = "is_staff", skip_serializing_if = "Option::is_none")] pub is_staff: Option, /// Per-category quota allotments for free/limited-tier users, keyed by quota category. - #[serde( - rename = "limited_user_quotas", - skip_serializing_if = "Option::is_none" - )] + #[serde(rename = "limited_user_quotas", skip_serializing_if = "Option::is_none")] pub limited_user_quotas: Option>, /// Date the free/limited-tier user's quotas next reset, as a raw string from the Copilot API. - #[serde( - rename = "limited_user_reset_date", - skip_serializing_if = "Option::is_none" - )] + #[serde(rename = "limited_user_reset_date", skip_serializing_if = "Option::is_none")] pub limited_user_reset_date: Option, /// GitHub login of the authenticated user. #[serde(skip_serializing_if = "Option::is_none")] @@ -1658,37 +1588,25 @@ pub struct CopilotUserResponse { #[serde(rename = "organization_list", skip_serializing_if = "Option::is_none")] pub organization_list: Option, /// Logins of the organizations the user belongs to. - #[serde( - rename = "organization_login_list", - skip_serializing_if = "Option::is_none" - )] + #[serde(rename = "organization_login_list", skip_serializing_if = "Option::is_none")] pub organization_login_list: Option>, /// Date the user's usage quota next resets, as a raw string from the Copilot API; see `quota_reset_date_utc` for the UTC-normalized value. #[serde(rename = "quota_reset_date", skip_serializing_if = "Option::is_none")] pub quota_reset_date: Option, /// UTC-normalized form of `quota_reset_date` (the date the user's usage quota next resets). - #[serde( - rename = "quota_reset_date_utc", - skip_serializing_if = "Option::is_none" - )] + #[serde(rename = "quota_reset_date_utc", skip_serializing_if = "Option::is_none")] pub quota_reset_date_utc: Option, /// Quota snapshot map from the raw Copilot user-response passthrough, with chat, completions, premium-interactions, and other entries. #[serde(rename = "quota_snapshots", skip_serializing_if = "Option::is_none")] pub quota_snapshots: Option, /// Whether the user's telemetry is subject to restricted-data handling. - #[serde( - rename = "restricted_telemetry", - skip_serializing_if = "Option::is_none" - )] + #[serde(rename = "restricted_telemetry", skip_serializing_if = "Option::is_none")] pub restricted_telemetry: Option, /// Raw passthrough of the Copilot API `te` flag for the user (an opaque server-side eligibility signal surfaced in telemetry); not otherwise interpreted by the runtime. #[serde(skip_serializing_if = "Option::is_none")] pub te: Option, /// Whether the account is on usage-based (token/AI-credit) billing rather than a fixed premium-request quota. - #[serde( - rename = "token_based_billing", - skip_serializing_if = "Option::is_none" - )] + #[serde(rename = "token_based_billing", skip_serializing_if = "Option::is_none")] pub token_based_billing: Option, } @@ -3894,7 +3812,8 @@ pub struct FactoryAbortRequest { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct FactoryAckResult {} +pub struct FactoryAckResult { +} /// Options for one factory-scoped subagent call. /// @@ -4186,7 +4105,8 @@ pub struct FactoryJournalPutRequest { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct FactoryListRunsRequest {} +pub struct FactoryListRunsRequest { +} /// Durable factory resource consumption. /// @@ -4707,19 +4627,13 @@ pub struct GitHubTelemetryEvent { #[serde(skip_serializing_if = "Option::is_none")] pub client: Option, /// Copilot tracking ID for user-level attribution. - #[serde( - rename = "copilot_tracking_id", - skip_serializing_if = "Option::is_none" - )] + #[serde(rename = "copilot_tracking_id", skip_serializing_if = "Option::is_none")] pub copilot_tracking_id: Option, /// Timestamp when the event was created (ISO 8601 format). #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] pub created_at: Option, /// Experiment assignment context. - #[serde( - rename = "exp_assignment_context", - skip_serializing_if = "Option::is_none" - )] + #[serde(rename = "exp_assignment_context", skip_serializing_if = "Option::is_none")] pub exp_assignment_context: Option, /// Feature flags enabled for this session, as a map from flag to value. #[serde(skip_serializing_if = "Option::is_none")] @@ -5464,7 +5378,8 @@ pub struct LlmInferenceHttpRequestChunkRequest { /// Acknowledgement. The SDK is free to ignore the ack and treat chunk delivery as fire-and-forget. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct LlmInferenceHttpRequestChunkResult {} +pub struct LlmInferenceHttpRequestChunkResult { +} /// The head of an outbound model-layer HTTP request. #[derive(Debug, Clone, Default, Serialize, Deserialize)] @@ -5500,7 +5415,8 @@ pub struct LlmInferenceHttpRequestStartRequest { /// Acknowledgement. Returning successfully simply means the SDK accepted the start frame; it does not imply the request will succeed. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct LlmInferenceHttpRequestStartResult {} +pub struct LlmInferenceHttpRequestStartResult { +} /// Set to terminate the response with a transport-level failure. Implies end-of-stream; any further chunks for this requestId are ignored. /// @@ -6408,7 +6324,8 @@ pub struct McpEnableRequest { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct McpExecuteSamplingRequest {} +pub struct McpExecuteSamplingRequest { +} /// Identifiers and raw MCP CreateMessageRequest params used to run a sampling inference. /// @@ -7685,7 +7602,8 @@ pub struct MetadataRecordContextChangeRequest { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct MetadataRecordContextChangeResult {} +pub struct MetadataRecordContextChangeResult { +} /// Absolute path to set as the session's new working directory. For local sessions the path must be absolute and exist on disk: it is validated before any session state changes, and a failing validation rejects the call with nothing mutated, persisted, or emitted. Remote sessions record the path as-is. /// @@ -7926,10 +7844,7 @@ pub struct ModelCapabilitiesLimitsVision { #[serde(rename_all = "camelCase")] pub struct ModelCapabilitiesLimits { /// Maximum total context window size in tokens - #[serde( - rename = "max_context_window_tokens", - skip_serializing_if = "Option::is_none" - )] + #[serde(rename = "max_context_window_tokens", skip_serializing_if = "Option::is_none")] pub max_context_window_tokens: Option, /// Maximum number of output/completion tokens #[serde(rename = "max_output_tokens", skip_serializing_if = "Option::is_none")] @@ -8050,19 +7965,13 @@ pub struct Model { #[serde(rename_all = "camelCase")] pub struct ModelCapabilitiesOverrideLimitsVision { /// Maximum image size in bytes - #[serde( - rename = "max_prompt_image_size", - skip_serializing_if = "Option::is_none" - )] + #[serde(rename = "max_prompt_image_size", skip_serializing_if = "Option::is_none")] pub max_prompt_image_size: Option, /// Maximum number of images per prompt #[serde(rename = "max_prompt_images", skip_serializing_if = "Option::is_none")] pub max_prompt_images: Option, /// MIME types the model accepts - #[serde( - rename = "supported_media_types", - skip_serializing_if = "Option::is_none" - )] + #[serde(rename = "supported_media_types", skip_serializing_if = "Option::is_none")] pub supported_media_types: Option>, } @@ -8078,10 +7987,7 @@ pub struct ModelCapabilitiesOverrideLimitsVision { #[serde(rename_all = "camelCase")] pub struct ModelCapabilitiesOverrideLimits { /// Maximum total context window size in tokens - #[serde( - rename = "max_context_window_tokens", - skip_serializing_if = "Option::is_none" - )] + #[serde(rename = "max_context_window_tokens", skip_serializing_if = "Option::is_none")] pub max_context_window_tokens: Option, /// Maximum number of output/completion tokens #[serde(rename = "max_output_tokens", skip_serializing_if = "Option::is_none")] @@ -9571,8 +9477,7 @@ pub struct PermissionUrlsConfig { pub struct PermissionsConfigureParams { /// If specified, replaces the host-supplied GitHub Content Exclusion policies on the session (combined with natively-discovered policies when evaluating tool/file access). Omit to leave the current policies unchanged. #[serde(skip_serializing_if = "Option::is_none")] - pub additional_content_exclusion_policies: - Option>, + pub additional_content_exclusion_policies: Option>, /// If specified, sets whether path/URL read permission requests are auto-approved. Omit to leave the current value unchanged. #[serde(skip_serializing_if = "Option::is_none")] pub approve_all_read_permission_requests: Option, @@ -9630,7 +9535,8 @@ pub struct PermissionsFolderTrustAddTrustedResult { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct PermissionsGetAllowAllRequest {} +pub struct PermissionsGetAllowAllRequest { +} /// Indicates whether the operation succeeded. /// @@ -9726,7 +9632,8 @@ pub struct PermissionsPathsAddResult { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct PermissionsPathsListRequest {} +pub struct PermissionsPathsListRequest { +} /// Indicates whether the operation succeeded. /// @@ -9753,7 +9660,8 @@ pub struct PermissionsPathsUpdatePrimaryResult { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct PermissionsPendingRequestsRequest {} +pub struct PermissionsPendingRequestsRequest { +} /// Clears session-scoped tool permission approvals, and optionally the location-scoped ones. /// @@ -11846,7 +11754,8 @@ pub struct RemoteNotifySteerableChangedRequest { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct RemoteNotifySteerableChangedResult {} +pub struct RemoteNotifySteerableChangedResult { +} /// Remote session connection result. /// @@ -13799,8 +13708,7 @@ pub struct SessionOpenOptions { /// /// #[serde(skip_serializing_if = "Option::is_none")] - pub additional_content_exclusion_policies: - Option>, + pub additional_content_exclusion_policies: Option>, /// Additional directories the agent may access beyond the working directory. Each entry is granted to the session's file-access allow-list and surfaced to the model (system prompt context and `@`-mention completion). Absolute paths are recommended; a relative path is resolved against the session's working directory. Nonexistent or unresolvable entries are skipped with a warning. This is applied on both session creation and resume, and is not persisted: a resumed session that omits this option does not retain previously supplied directories (re-supply them, exactly as the CLI re-passes `--add-dir`). #[serde(skip_serializing_if = "Option::is_none")] pub additional_directories: Option>, @@ -14336,7 +14244,8 @@ pub struct SessionsCloseRequest { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionsCloseResult {} +pub struct SessionsCloseResult { +} /// Session ID to delete from disk. /// @@ -14999,7 +14908,8 @@ pub struct SessionsReleaseLockRequest { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionsReleaseLockResult {} +pub struct SessionsReleaseLockResult { +} /// Active session ID and an optional flag for deferring repo-level hooks until folder trust. /// @@ -15029,7 +14939,8 @@ pub struct SessionsReloadPluginHooksRequest { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionsReloadPluginHooksResult {} +pub struct SessionsReloadPluginHooksResult { +} /// Session ID whose pending events should be flushed to disk. /// @@ -15056,7 +14967,8 @@ pub struct SessionsSaveRequest { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionsSaveResult {} +pub struct SessionsSaveResult { +} /// Manager-wide additional plugins to register; replaces any previously-configured set. /// @@ -15083,7 +14995,8 @@ pub struct SessionsSetAdditionalPluginsRequest { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionsSetAdditionalPluginsResult {} +pub struct SessionsSetAdditionalPluginsResult { +} /// Patch for the singleton's steering state. /// @@ -15190,8 +15103,7 @@ pub struct SessionUpdateOptionsParams { /// /// #[serde(skip_serializing_if = "Option::is_none")] - pub additional_content_exclusion_policies: - Option>, + pub additional_content_exclusion_policies: Option>, /// Runtime context discriminator (e.g., `cli`, `actions`). #[serde(skip_serializing_if = "Option::is_none")] pub agent_context: Option, @@ -16202,7 +16114,8 @@ pub struct TasksPromoteToBackgroundResult { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct TasksRefreshResult {} +pub struct TasksRefreshResult { +} /// Identifier of the completed or cancelled task to remove from tracking. /// @@ -16322,7 +16235,8 @@ pub struct TasksStartAgentResult { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct TasksWaitForPendingResult {} +pub struct TasksWaitForPendingResult { +} /// Feature override key/value pairs to attach to subsequent telemetry events from this session. /// @@ -16427,7 +16341,8 @@ pub struct ToolsGetCurrentMetadataResult { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct ToolsInitializeAndValidateResult {} +pub struct ToolsInitializeAndValidateResult { +} /// Optional model identifier whose tool overrides should be applied to the listing. /// @@ -16455,7 +16370,8 @@ pub struct ToolsListRequest { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct ToolsUpdateSubagentSettingsResult {} +pub struct ToolsUpdateSubagentSettingsResult { +} /// Selectable option for a UI elicitation multi-select array item, with submitted value and display label. /// @@ -16940,7 +16856,8 @@ pub struct UIHandlePendingResult { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct UIHandlePendingSamplingResponse {} +pub struct UIHandlePendingSamplingResponse { +} /// Request ID of a pending `sampling.requested` event and an optional sampling result payload (omit to reject). /// @@ -17625,10 +17542,7 @@ pub struct WorkspacesEnsureRequest { pub struct WorkspacesGetWorkspaceResultWorkspace { #[serde(skip_serializing_if = "Option::is_none")] pub branch: Option, - #[serde( - rename = "chronicle_sync_dismissed", - skip_serializing_if = "Option::is_none" - )] + #[serde(rename = "chronicle_sync_dismissed", skip_serializing_if = "Option::is_none")] pub chronicle_sync_dismissed: Option, #[serde(rename = "client_name", skip_serializing_if = "Option::is_none")] pub client_name: Option, @@ -18997,7 +18911,8 @@ pub struct SessionFactoryCancelResult { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionFactoryLogResult {} +pub struct SessionFactoryLogResult { +} /// Result of one factory-scoped subagent call. /// @@ -19043,7 +18958,8 @@ pub struct SessionFactoryJournalGetResult { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionFactoryJournalPutResult {} +pub struct SessionFactoryJournalPutResult { +} /// Identifies the target session. /// @@ -19328,10 +19244,7 @@ pub struct SessionWorkspacesGetWorkspaceParams { pub struct SessionWorkspacesGetWorkspaceResultWorkspace { #[serde(skip_serializing_if = "Option::is_none")] pub branch: Option, - #[serde( - rename = "chronicle_sync_dismissed", - skip_serializing_if = "Option::is_none" - )] + #[serde(rename = "chronicle_sync_dismissed", skip_serializing_if = "Option::is_none")] pub chronicle_sync_dismissed: Option, #[serde(rename = "client_name", skip_serializing_if = "Option::is_none")] pub client_name: Option, @@ -19388,10 +19301,7 @@ pub struct SessionWorkspacesGetWorkspaceResult { pub struct SessionWorkspacesUpdateMetadataResultWorkspace { #[serde(skip_serializing_if = "Option::is_none")] pub branch: Option, - #[serde( - rename = "chronicle_sync_dismissed", - skip_serializing_if = "Option::is_none" - )] + #[serde(rename = "chronicle_sync_dismissed", skip_serializing_if = "Option::is_none")] pub chronicle_sync_dismissed: Option, #[serde(rename = "client_name", skip_serializing_if = "Option::is_none")] pub client_name: Option, @@ -19448,10 +19358,7 @@ pub struct SessionWorkspacesUpdateMetadataResult { pub struct SessionWorkspacesEnsureResultWorkspace { #[serde(skip_serializing_if = "Option::is_none")] pub branch: Option, - #[serde( - rename = "chronicle_sync_dismissed", - skip_serializing_if = "Option::is_none" - )] + #[serde(rename = "chronicle_sync_dismissed", skip_serializing_if = "Option::is_none")] pub chronicle_sync_dismissed: Option, #[serde(rename = "client_name", skip_serializing_if = "Option::is_none")] pub client_name: Option, @@ -19615,10 +19522,7 @@ pub struct SessionWorkspacesAddSummaryResult { pub struct SessionWorkspacesTruncateSummariesResultWorkspace { #[serde(skip_serializing_if = "Option::is_none")] pub branch: Option, - #[serde( - rename = "chronicle_sync_dismissed", - skip_serializing_if = "Option::is_none" - )] + #[serde(rename = "chronicle_sync_dismissed", skip_serializing_if = "Option::is_none")] pub chronicle_sync_dismissed: Option, #[serde(rename = "client_name", skip_serializing_if = "Option::is_none")] pub client_name: Option, @@ -20093,7 +19997,8 @@ pub struct SessionTasksRefreshParams { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionTasksRefreshResult {} +pub struct SessionTasksRefreshResult { +} /// Identifies the target session. /// @@ -20120,7 +20025,8 @@ pub struct SessionTasksWaitForPendingParams { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionTasksWaitForPendingResult {} +pub struct SessionTasksWaitForPendingResult { +} /// Progress information for the task, or null when no task with that ID is tracked. /// @@ -20929,7 +20835,8 @@ pub struct SessionToolsInitializeAndValidateParams { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionToolsInitializeAndValidateResult {} +pub struct SessionToolsInitializeAndValidateResult { +} /// Identifies the target session. /// @@ -20971,7 +20878,8 @@ pub struct SessionToolsGetCurrentMetadataResult { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionToolsUpdateSubagentSettingsResult {} +pub struct SessionToolsUpdateSubagentSettingsResult { +} /// Slash commands available in the session, after applying any include/exclude filters. /// @@ -21897,7 +21805,8 @@ pub struct SessionMetadataGetContextHeaviestMessagesResult { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionMetadataRecordContextChangeResult {} +pub struct SessionMetadataRecordContextChangeResult { +} /// Update the session's working directory. Used by the host when the user explicitly changes cwd (e.g., the `/cd` slash command). The host is responsible for any related side-effects (file index, etc.); it does NOT change the process working directory (a session's cwd is per-session, not process-global). For local sessions the runtime validates the target first (an absolute path that exists on disk) and re-bases the permission primary directory; a rejected validation fails the call before anything is mutated, persisted, or emitted. Location-scoped permission rules are then re-keyed to the new directory (best-effort). Remote sessions only record the path. /// @@ -22783,7 +22692,8 @@ pub struct SessionRemoteDisableParams { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionRemoteNotifySteerableChangedResult {} +pub struct SessionRemoteNotifySteerableChangedResult { +} /// Identifies the target session. /// @@ -23053,7 +22963,8 @@ pub struct ProviderTokenGetTokenResult { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct FactoryAbortResult {} +pub struct FactoryAbortResult { +} /// Identifies the target session. /// @@ -25731,9 +25642,7 @@ pub enum PermissionDecisionApproveForLocationApproval { Memory(PermissionDecisionApproveForLocationApprovalMemory), CustomTool(PermissionDecisionApproveForLocationApprovalCustomTool), ExtensionManagement(PermissionDecisionApproveForLocationApprovalExtensionManagement), - ExtensionPermissionAccess( - PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess, - ), + ExtensionPermissionAccess(PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess), } /// Approve and persist for this project location @@ -25862,9 +25771,7 @@ pub enum PermissionDecision { ApprovedForLocation(PermissionDecisionApprovedForLocation), Cancelled(PermissionDecisionCancelled), DeniedByRules(PermissionDecisionDeniedByRules), - DeniedNoApprovalRuleAndCouldNotRequestFromUser( - PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser, - ), + DeniedNoApprovalRuleAndCouldNotRequestFromUser(PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser), DeniedInteractivelyByUser(PermissionDecisionDeniedInteractivelyByUser), DeniedByContentExclusionPolicy(PermissionDecisionDeniedByContentExclusionPolicy), DeniedByPermissionRequestHook(PermissionDecisionDeniedByPermissionRequestHook), diff --git a/rust/src/generated/rpc.rs b/rust/src/generated/rpc.rs index e9bbef1d1a..15204f8f7e 100644 --- a/rust/src/generated/rpc.rs +++ b/rust/src/generated/rpc.rs @@ -11,7 +11,7 @@ #![allow(dead_code)] use super::api_types::{rpc_methods, *}; -use super::session_events::SessionMode; +use super::session_events::{SessionMode}; use crate::session::Session; use crate::{Client, Error}; @@ -24,114 +24,82 @@ pub struct ClientRpc<'a> { impl<'a> ClientRpc<'a> { /// `account.*` sub-namespace. pub fn account(&self) -> ClientRpcAccount<'a> { - ClientRpcAccount { - client: self.client, - } + ClientRpcAccount { client: self.client } } /// `agentRegistry.*` sub-namespace. pub fn agent_registry(&self) -> ClientRpcAgentRegistry<'a> { - ClientRpcAgentRegistry { - client: self.client, - } + ClientRpcAgentRegistry { client: self.client } } /// `agents.*` sub-namespace. pub fn agents(&self) -> ClientRpcAgents<'a> { - ClientRpcAgents { - client: self.client, - } + ClientRpcAgents { client: self.client } } /// `commands.*` sub-namespace. pub fn commands(&self) -> ClientRpcCommands<'a> { - ClientRpcCommands { - client: self.client, - } + ClientRpcCommands { client: self.client } } /// `instructions.*` sub-namespace. pub fn instructions(&self) -> ClientRpcInstructions<'a> { - ClientRpcInstructions { - client: self.client, - } + ClientRpcInstructions { client: self.client } } /// `llmInference.*` sub-namespace. pub fn llm_inference(&self) -> ClientRpcLlmInference<'a> { - ClientRpcLlmInference { - client: self.client, - } + ClientRpcLlmInference { client: self.client } } /// `mcp.*` sub-namespace. pub fn mcp(&self) -> ClientRpcMcp<'a> { - ClientRpcMcp { - client: self.client, - } + ClientRpcMcp { client: self.client } } /// `models.*` sub-namespace. pub fn models(&self) -> ClientRpcModels<'a> { - ClientRpcModels { - client: self.client, - } + ClientRpcModels { client: self.client } } /// `plugins.*` sub-namespace. pub fn plugins(&self) -> ClientRpcPlugins<'a> { - ClientRpcPlugins { - client: self.client, - } + ClientRpcPlugins { client: self.client } } /// `runtime.*` sub-namespace. pub fn runtime(&self) -> ClientRpcRuntime<'a> { - ClientRpcRuntime { - client: self.client, - } + ClientRpcRuntime { client: self.client } } /// `secrets.*` sub-namespace. pub fn secrets(&self) -> ClientRpcSecrets<'a> { - ClientRpcSecrets { - client: self.client, - } + ClientRpcSecrets { client: self.client } } /// `sessionFs.*` sub-namespace. pub fn session_fs(&self) -> ClientRpcSessionFs<'a> { - ClientRpcSessionFs { - client: self.client, - } + ClientRpcSessionFs { client: self.client } } /// `sessions.*` sub-namespace. pub fn sessions(&self) -> ClientRpcSessions<'a> { - ClientRpcSessions { - client: self.client, - } + ClientRpcSessions { client: self.client } } /// `skills.*` sub-namespace. pub fn skills(&self) -> ClientRpcSkills<'a> { - ClientRpcSkills { - client: self.client, - } + ClientRpcSkills { client: self.client } } /// `tools.*` sub-namespace. pub fn tools(&self) -> ClientRpcTools<'a> { - ClientRpcTools { - client: self.client, - } + ClientRpcTools { client: self.client } } /// `user.*` sub-namespace. pub fn user(&self) -> ClientRpcUser<'a> { - ClientRpcUser { - client: self.client, - } + ClientRpcUser { client: self.client } } /// Checks server responsiveness and returns protocol information. @@ -155,10 +123,7 @@ impl<'a> ClientRpc<'a> { /// pub async fn ping(&self, params: PingRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::PING, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::PING, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -183,12 +148,10 @@ impl<'a> ClientRpc<'a> { /// pub(crate) async fn connect(&self, params: ConnectRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::CONNECT, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::CONNECT, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `account.*` RPCs. @@ -215,10 +178,7 @@ impl<'a> ClientRpcAccount<'a> { /// pub async fn get_quota(&self) -> Result { let wire_params = serde_json::json!({}); - let _value = self - .client - .call(rpc_methods::ACCOUNT_GETQUOTA, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::ACCOUNT_GETQUOTA, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -241,15 +201,9 @@ impl<'a> ClientRpcAccount<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn get_quota_with_params( - &self, - params: AccountGetQuotaRequest, - ) -> Result { + pub async fn get_quota_with_params(&self, params: AccountGetQuotaRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::ACCOUNT_GETQUOTA, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::ACCOUNT_GETQUOTA, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -270,10 +224,7 @@ impl<'a> ClientRpcAccount<'a> { /// pub async fn get_current_auth(&self) -> Result { let wire_params = serde_json::json!({}); - let _value = self - .client - .call(rpc_methods::ACCOUNT_GETCURRENTAUTH, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::ACCOUNT_GETCURRENTAUTH, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -294,10 +245,7 @@ impl<'a> ClientRpcAccount<'a> { /// pub async fn get_all_users(&self) -> Result { let wire_params = serde_json::json!({}); - let _value = self - .client - .call(rpc_methods::ACCOUNT_GETALLUSERS, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::ACCOUNT_GETALLUSERS, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -322,10 +270,7 @@ impl<'a> ClientRpcAccount<'a> { /// pub async fn login(&self, params: AccountLoginRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::ACCOUNT_LOGIN, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::ACCOUNT_LOGIN, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -350,12 +295,10 @@ impl<'a> ClientRpcAccount<'a> { /// pub async fn logout(&self, params: AccountLogoutRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::ACCOUNT_LOGOUT, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::ACCOUNT_LOGOUT, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `agentRegistry.*` RPCs. @@ -384,17 +327,12 @@ impl<'a> ClientRpcAgentRegistry<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn spawn( - &self, - params: AgentRegistrySpawnRequest, - ) -> Result { + pub async fn spawn(&self, params: AgentRegistrySpawnRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::AGENTREGISTRY_SPAWN, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::AGENTREGISTRY_SPAWN, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `agents.*` RPCs. @@ -425,10 +363,7 @@ impl<'a> ClientRpcAgents<'a> { /// pub async fn discover(&self, params: AgentsDiscoverRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::AGENTS_DISCOVER, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::AGENTS_DISCOVER, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -451,17 +386,12 @@ impl<'a> ClientRpcAgents<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn get_discovery_paths( - &self, - params: AgentsGetDiscoveryPathsRequest, - ) -> Result { + pub async fn get_discovery_paths(&self, params: AgentsGetDiscoveryPathsRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::AGENTS_GETDISCOVERYPATHS, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::AGENTS_GETDISCOVERYPATHS, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `commands.*` RPCs. @@ -488,12 +418,10 @@ impl<'a> ClientRpcCommands<'a> { /// pub async fn list(&self) -> Result { let wire_params = serde_json::json!({}); - let _value = self - .client - .call(rpc_methods::COMMANDS_LIST, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::COMMANDS_LIST, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `instructions.*` RPCs. @@ -522,15 +450,9 @@ impl<'a> ClientRpcInstructions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn discover( - &self, - params: InstructionsDiscoverRequest, - ) -> Result { + pub async fn discover(&self, params: InstructionsDiscoverRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::INSTRUCTIONS_DISCOVER, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::INSTRUCTIONS_DISCOVER, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -553,20 +475,12 @@ impl<'a> ClientRpcInstructions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn get_discovery_paths( - &self, - params: InstructionsGetDiscoveryPathsRequest, - ) -> Result { + pub async fn get_discovery_paths(&self, params: InstructionsGetDiscoveryPathsRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call( - rpc_methods::INSTRUCTIONS_GETDISCOVERYPATHS, - Some(wire_params), - ) - .await?; + let _value = self.client.call(rpc_methods::INSTRUCTIONS_GETDISCOVERYPATHS, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `llmInference.*` RPCs. @@ -593,10 +507,7 @@ impl<'a> ClientRpcLlmInference<'a> { /// pub async fn set_provider(&self) -> Result { let wire_params = serde_json::json!({}); - let _value = self - .client - .call(rpc_methods::LLMINFERENCE_SETPROVIDER, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::LLMINFERENCE_SETPROVIDER, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -619,18 +530,9 @@ impl<'a> ClientRpcLlmInference<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn http_response_start( - &self, - params: LlmInferenceHttpResponseStartRequest, - ) -> Result { + pub async fn http_response_start(&self, params: LlmInferenceHttpResponseStartRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call( - rpc_methods::LLMINFERENCE_HTTPRESPONSESTART, - Some(wire_params), - ) - .await?; + let _value = self.client.call(rpc_methods::LLMINFERENCE_HTTPRESPONSESTART, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -653,20 +555,12 @@ impl<'a> ClientRpcLlmInference<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn http_response_chunk( - &self, - params: LlmInferenceHttpResponseChunkRequest, - ) -> Result { + pub async fn http_response_chunk(&self, params: LlmInferenceHttpResponseChunkRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call( - rpc_methods::LLMINFERENCE_HTTPRESPONSECHUNK, - Some(wire_params), - ) - .await?; + let _value = self.client.call(rpc_methods::LLMINFERENCE_HTTPRESPONSECHUNK, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `mcp.*` RPCs. @@ -678,9 +572,7 @@ pub struct ClientRpcMcp<'a> { impl<'a> ClientRpcMcp<'a> { /// `mcp.config.*` sub-namespace. pub fn config(&self) -> ClientRpcMcpConfig<'a> { - ClientRpcMcpConfig { - client: self.client, - } + ClientRpcMcpConfig { client: self.client } } /// Discovers MCP servers from user, workspace, plugin, and builtin sources. @@ -704,12 +596,10 @@ impl<'a> ClientRpcMcp<'a> { /// pub async fn discover(&self, params: McpDiscoverRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::MCP_DISCOVER, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::MCP_DISCOVER, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `mcp.config.*` RPCs. @@ -736,10 +626,7 @@ impl<'a> ClientRpcMcpConfig<'a> { /// pub async fn list(&self) -> Result { let wire_params = serde_json::json!({}); - let _value = self - .client - .call(rpc_methods::MCP_CONFIG_LIST, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::MCP_CONFIG_LIST, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -760,10 +647,7 @@ impl<'a> ClientRpcMcpConfig<'a> { /// pub async fn add(&self, params: McpConfigAddRequest) -> Result<(), Error> { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::MCP_CONFIG_ADD, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::MCP_CONFIG_ADD, Some(wire_params)).await?; Ok(()) } @@ -784,10 +668,7 @@ impl<'a> ClientRpcMcpConfig<'a> { /// pub async fn update(&self, params: McpConfigUpdateRequest) -> Result<(), Error> { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::MCP_CONFIG_UPDATE, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::MCP_CONFIG_UPDATE, Some(wire_params)).await?; Ok(()) } @@ -808,10 +689,7 @@ impl<'a> ClientRpcMcpConfig<'a> { /// pub async fn remove(&self, params: McpConfigRemoveRequest) -> Result<(), Error> { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::MCP_CONFIG_REMOVE, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::MCP_CONFIG_REMOVE, Some(wire_params)).await?; Ok(()) } @@ -832,10 +710,7 @@ impl<'a> ClientRpcMcpConfig<'a> { /// pub async fn enable(&self, params: McpConfigEnableRequest) -> Result<(), Error> { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::MCP_CONFIG_ENABLE, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::MCP_CONFIG_ENABLE, Some(wire_params)).await?; Ok(()) } @@ -856,10 +731,7 @@ impl<'a> ClientRpcMcpConfig<'a> { /// pub async fn disable(&self, params: McpConfigDisableRequest) -> Result<(), Error> { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::MCP_CONFIG_DISABLE, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::MCP_CONFIG_DISABLE, Some(wire_params)).await?; Ok(()) } @@ -876,12 +748,10 @@ impl<'a> ClientRpcMcpConfig<'a> { /// pub async fn reload(&self) -> Result<(), Error> { let wire_params = serde_json::json!({}); - let _value = self - .client - .call(rpc_methods::MCP_CONFIG_RELOAD, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::MCP_CONFIG_RELOAD, Some(wire_params)).await?; Ok(()) } + } /// `models.*` RPCs. @@ -908,10 +778,7 @@ impl<'a> ClientRpcModels<'a> { /// pub async fn list(&self) -> Result { let wire_params = serde_json::json!({}); - let _value = self - .client - .call(rpc_methods::MODELS_LIST, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::MODELS_LIST, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -936,10 +803,7 @@ impl<'a> ClientRpcModels<'a> { /// pub async fn list_with_params(&self, params: ModelsListRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::MODELS_LIST, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::MODELS_LIST, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -960,12 +824,10 @@ impl<'a> ClientRpcModels<'a> { /// pub async fn get_built_in_catalog(&self) -> Result { let wire_params = serde_json::json!({}); - let _value = self - .client - .call(rpc_methods::MODELS_GETBUILTINCATALOG, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::MODELS_GETBUILTINCATALOG, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `plugins.*` RPCs. @@ -977,9 +839,7 @@ pub struct ClientRpcPlugins<'a> { impl<'a> ClientRpcPlugins<'a> { /// `plugins.marketplaces.*` sub-namespace. pub fn marketplaces(&self) -> ClientRpcPluginsMarketplaces<'a> { - ClientRpcPluginsMarketplaces { - client: self.client, - } + ClientRpcPluginsMarketplaces { client: self.client } } /// Lists plugins installed in user/global state. @@ -999,10 +859,7 @@ impl<'a> ClientRpcPlugins<'a> { /// pub async fn list(&self) -> Result { let wire_params = serde_json::json!({}); - let _value = self - .client - .call(rpc_methods::PLUGINS_LIST, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::PLUGINS_LIST, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -1025,15 +882,9 @@ impl<'a> ClientRpcPlugins<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn install( - &self, - params: PluginsInstallRequest, - ) -> Result { + pub async fn install(&self, params: PluginsInstallRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::PLUGINS_INSTALL, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::PLUGINS_INSTALL, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -1054,10 +905,7 @@ impl<'a> ClientRpcPlugins<'a> { /// pub async fn uninstall(&self, params: PluginsUninstallRequest) -> Result<(), Error> { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::PLUGINS_UNINSTALL, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::PLUGINS_UNINSTALL, Some(wire_params)).await?; Ok(()) } @@ -1082,10 +930,7 @@ impl<'a> ClientRpcPlugins<'a> { /// pub async fn update(&self, params: PluginsUpdateRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::PLUGINS_UPDATE, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::PLUGINS_UPDATE, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -1106,10 +951,7 @@ impl<'a> ClientRpcPlugins<'a> { /// pub async fn update_all(&self) -> Result { let wire_params = serde_json::json!({}); - let _value = self - .client - .call(rpc_methods::PLUGINS_UPDATEALL, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::PLUGINS_UPDATEALL, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -1130,10 +972,7 @@ impl<'a> ClientRpcPlugins<'a> { /// pub async fn enable(&self, params: PluginsEnableRequest) -> Result<(), Error> { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::PLUGINS_ENABLE, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::PLUGINS_ENABLE, Some(wire_params)).await?; Ok(()) } @@ -1154,12 +993,10 @@ impl<'a> ClientRpcPlugins<'a> { /// pub async fn disable(&self, params: PluginsDisableRequest) -> Result<(), Error> { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::PLUGINS_DISABLE, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::PLUGINS_DISABLE, Some(wire_params)).await?; Ok(()) } + } /// `plugins.marketplaces.*` RPCs. @@ -1186,10 +1023,7 @@ impl<'a> ClientRpcPluginsMarketplaces<'a> { /// pub async fn list(&self) -> Result { let wire_params = serde_json::json!({}); - let _value = self - .client - .call(rpc_methods::PLUGINS_MARKETPLACES_LIST, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::PLUGINS_MARKETPLACES_LIST, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -1212,15 +1046,9 @@ impl<'a> ClientRpcPluginsMarketplaces<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn add( - &self, - params: PluginsMarketplacesAddRequest, - ) -> Result { + pub async fn add(&self, params: PluginsMarketplacesAddRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::PLUGINS_MARKETPLACES_ADD, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::PLUGINS_MARKETPLACES_ADD, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -1243,15 +1071,9 @@ impl<'a> ClientRpcPluginsMarketplaces<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn remove( - &self, - params: PluginsMarketplacesRemoveRequest, - ) -> Result { + pub async fn remove(&self, params: PluginsMarketplacesRemoveRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::PLUGINS_MARKETPLACES_REMOVE, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::PLUGINS_MARKETPLACES_REMOVE, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -1274,15 +1096,9 @@ impl<'a> ClientRpcPluginsMarketplaces<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn browse( - &self, - params: PluginsMarketplacesBrowseRequest, - ) -> Result { + pub async fn browse(&self, params: PluginsMarketplacesBrowseRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::PLUGINS_MARKETPLACES_BROWSE, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::PLUGINS_MARKETPLACES_BROWSE, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -1303,10 +1119,7 @@ impl<'a> ClientRpcPluginsMarketplaces<'a> { /// pub async fn refresh(&self) -> Result { let wire_params = serde_json::json!({}); - let _value = self - .client - .call(rpc_methods::PLUGINS_MARKETPLACES_REFRESH, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::PLUGINS_MARKETPLACES_REFRESH, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -1329,17 +1142,12 @@ impl<'a> ClientRpcPluginsMarketplaces<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn refresh_with_params( - &self, - params: PluginsMarketplacesRefreshRequest, - ) -> Result { + pub async fn refresh_with_params(&self, params: PluginsMarketplacesRefreshRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::PLUGINS_MARKETPLACES_REFRESH, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::PLUGINS_MARKETPLACES_REFRESH, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `runtime.*` RPCs. @@ -1362,12 +1170,10 @@ impl<'a> ClientRpcRuntime<'a> { /// pub async fn shutdown(&self) -> Result<(), Error> { let wire_params = serde_json::json!({}); - let _value = self - .client - .call(rpc_methods::RUNTIME_SHUTDOWN, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::RUNTIME_SHUTDOWN, Some(wire_params)).await?; Ok(()) } + } /// `secrets.*` RPCs. @@ -1396,17 +1202,12 @@ impl<'a> ClientRpcSecrets<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn add_filter_values( - &self, - params: SecretsAddFilterValuesRequest, - ) -> Result { + pub async fn add_filter_values(&self, params: SecretsAddFilterValuesRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::SECRETS_ADDFILTERVALUES, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::SECRETS_ADDFILTERVALUES, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `sessionFs.*` RPCs. @@ -1435,17 +1236,12 @@ impl<'a> ClientRpcSessionFs<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn set_provider( - &self, - params: SessionFsSetProviderRequest, - ) -> Result { + pub async fn set_provider(&self, params: SessionFsSetProviderRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::SESSIONFS_SETPROVIDER, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::SESSIONFS_SETPROVIDER, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `sessions.*` RPCs. @@ -1472,10 +1268,7 @@ impl<'a> ClientRpcSessions<'a> { /// pub async fn open(&self) -> Result { let wire_params = serde_json::json!({}); - let _value = self - .client - .call(rpc_methods::SESSIONS_OPEN, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::SESSIONS_OPEN, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -1500,10 +1293,7 @@ impl<'a> ClientRpcSessions<'a> { /// pub async fn fork(&self, params: SessionsForkRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::SESSIONS_FORK, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::SESSIONS_FORK, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -1526,15 +1316,9 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn connect( - &self, - params: ConnectRemoteSessionParams, - ) -> Result { + pub async fn connect(&self, params: ConnectRemoteSessionParams) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::SESSIONS_CONNECT, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::SESSIONS_CONNECT, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -1555,10 +1339,7 @@ impl<'a> ClientRpcSessions<'a> { /// pub async fn list(&self) -> Result { let wire_params = serde_json::json!({}); - let _value = self - .client - .call(rpc_methods::SESSIONS_LIST, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::SESSIONS_LIST, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -1581,15 +1362,9 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn list_with_params( - &self, - params: SessionsListRequest, - ) -> Result { + pub async fn list_with_params(&self, params: SessionsListRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::SESSIONS_LIST, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::SESSIONS_LIST, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -1612,15 +1387,9 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn get_metadata( - &self, - params: SessionsGetMetadataRequest, - ) -> Result { + pub(crate) async fn get_metadata(&self, params: SessionsGetMetadataRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::SESSIONS_GETMETADATA, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::SESSIONS_GETMETADATA, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -1643,18 +1412,9 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn list_non_empty_session_ids( - &self, - params: SessionsListNonEmptySessionIdsRequest, - ) -> Result { + pub(crate) async fn list_non_empty_session_ids(&self, params: SessionsListNonEmptySessionIdsRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call( - rpc_methods::SESSIONS_LISTNONEMPTYSESSIONIDS, - Some(wire_params), - ) - .await?; + let _value = self.client.call(rpc_methods::SESSIONS_LISTNONEMPTYSESSIONIDS, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -1677,15 +1437,9 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn find_by_task_id( - &self, - params: SessionsFindByTaskIDRequest, - ) -> Result { + pub async fn find_by_task_id(&self, params: SessionsFindByTaskIDRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::SESSIONS_FINDBYTASKID, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::SESSIONS_FINDBYTASKID, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -1708,15 +1462,9 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn find_by_prefix( - &self, - params: SessionsFindByPrefixRequest, - ) -> Result { + pub async fn find_by_prefix(&self, params: SessionsFindByPrefixRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::SESSIONS_FINDBYPREFIX, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::SESSIONS_FINDBYPREFIX, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -1739,15 +1487,9 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn get_last_for_context( - &self, - params: SessionsGetLastForContextRequest, - ) -> Result { + pub async fn get_last_for_context(&self, params: SessionsGetLastForContextRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::SESSIONS_GETLASTFORCONTEXT, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::SESSIONS_GETLASTFORCONTEXT, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -1770,15 +1512,9 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn get_event_file_path( - &self, - params: SessionsGetEventFilePathRequest, - ) -> Result { + pub(crate) async fn get_event_file_path(&self, params: SessionsGetEventFilePathRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::SESSIONS_GETEVENTFILEPATH, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::SESSIONS_GETEVENTFILEPATH, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -1799,10 +1535,7 @@ impl<'a> ClientRpcSessions<'a> { /// pub async fn get_sizes(&self) -> Result { let wire_params = serde_json::json!({}); - let _value = self - .client - .call(rpc_methods::SESSIONS_GETSIZES, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::SESSIONS_GETSIZES, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -1825,15 +1558,9 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn check_in_use( - &self, - params: SessionsCheckInUseRequest, - ) -> Result { + pub async fn check_in_use(&self, params: SessionsCheckInUseRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::SESSIONS_CHECKINUSE, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::SESSIONS_CHECKINUSE, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -1856,18 +1583,9 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn get_persisted_remote_steerable( - &self, - params: SessionsGetPersistedRemoteSteerableRequest, - ) -> Result { + pub(crate) async fn get_persisted_remote_steerable(&self, params: SessionsGetPersistedRemoteSteerableRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call( - rpc_methods::SESSIONS_GETPERSISTEDREMOTESTEERABLE, - Some(wire_params), - ) - .await?; + let _value = self.client.call(rpc_methods::SESSIONS_GETPERSISTEDREMOTESTEERABLE, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -1892,10 +1610,7 @@ impl<'a> ClientRpcSessions<'a> { /// pub async fn close(&self, params: SessionsCloseRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::SESSIONS_CLOSE, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::SESSIONS_CLOSE, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -1918,15 +1633,9 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn bulk_delete( - &self, - params: SessionsBulkDeleteRequest, - ) -> Result { + pub async fn bulk_delete(&self, params: SessionsBulkDeleteRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::SESSIONS_BULKDELETE, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::SESSIONS_BULKDELETE, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -1947,10 +1656,7 @@ impl<'a> ClientRpcSessions<'a> { /// pub(crate) async fn delete(&self, params: SessionsDeleteRequest) -> Result<(), Error> { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::SESSIONS_DELETE, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::SESSIONS_DELETE, Some(wire_params)).await?; Ok(()) } @@ -1973,15 +1679,9 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn prune_old( - &self, - params: SessionsPruneOldRequest, - ) -> Result { + pub async fn prune_old(&self, params: SessionsPruneOldRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::SESSIONS_PRUNEOLD, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::SESSIONS_PRUNEOLD, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -2006,10 +1706,7 @@ impl<'a> ClientRpcSessions<'a> { /// pub async fn save(&self, params: SessionsSaveRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::SESSIONS_SAVE, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::SESSIONS_SAVE, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -2032,15 +1729,9 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn release_lock( - &self, - params: SessionsReleaseLockRequest, - ) -> Result { + pub async fn release_lock(&self, params: SessionsReleaseLockRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::SESSIONS_RELEASELOCK, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::SESSIONS_RELEASELOCK, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -2063,15 +1754,9 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn enrich_metadata( - &self, - params: SessionsEnrichMetadataRequest, - ) -> Result { + pub async fn enrich_metadata(&self, params: SessionsEnrichMetadataRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::SESSIONS_ENRICHMETADATA, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::SESSIONS_ENRICHMETADATA, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -2094,15 +1779,9 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn reload_plugin_hooks( - &self, - params: SessionsReloadPluginHooksRequest, - ) -> Result { + pub async fn reload_plugin_hooks(&self, params: SessionsReloadPluginHooksRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::SESSIONS_RELOADPLUGINHOOKS, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::SESSIONS_RELOADPLUGINHOOKS, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -2125,18 +1804,9 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn load_deferred_repo_hooks( - &self, - params: SessionsLoadDeferredRepoHooksRequest, - ) -> Result { + pub async fn load_deferred_repo_hooks(&self, params: SessionsLoadDeferredRepoHooksRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call( - rpc_methods::SESSIONS_LOADDEFERREDREPOHOOKS, - Some(wire_params), - ) - .await?; + let _value = self.client.call(rpc_methods::SESSIONS_LOADDEFERREDREPOHOOKS, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -2159,18 +1829,9 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn set_additional_plugins( - &self, - params: SessionsSetAdditionalPluginsRequest, - ) -> Result { + pub async fn set_additional_plugins(&self, params: SessionsSetAdditionalPluginsRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call( - rpc_methods::SESSIONS_SETADDITIONALPLUGINS, - Some(wire_params), - ) - .await?; + let _value = self.client.call(rpc_methods::SESSIONS_SETADDITIONALPLUGINS, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -2193,15 +1854,9 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn get_board_entry_count( - &self, - params: SessionsGetBoardEntryCountRequest, - ) -> Result { + pub(crate) async fn get_board_entry_count(&self, params: SessionsGetBoardEntryCountRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::SESSIONS_GETBOARDENTRYCOUNT, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::SESSIONS_GETBOARDENTRYCOUNT, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -2224,15 +1879,9 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn start_remote_control( - &self, - params: SessionsStartRemoteControlRequest, - ) -> Result { + pub async fn start_remote_control(&self, params: SessionsStartRemoteControlRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::SESSIONS_STARTREMOTECONTROL, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::SESSIONS_STARTREMOTECONTROL, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -2255,18 +1904,9 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn transfer_remote_control( - &self, - params: SessionsTransferRemoteControlRequest, - ) -> Result { + pub async fn transfer_remote_control(&self, params: SessionsTransferRemoteControlRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call( - rpc_methods::SESSIONS_TRANSFERREMOTECONTROL, - Some(wire_params), - ) - .await?; + let _value = self.client.call(rpc_methods::SESSIONS_TRANSFERREMOTECONTROL, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -2289,18 +1929,9 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn set_remote_control_steering( - &self, - params: SessionsSetRemoteControlSteeringRequest, - ) -> Result { + pub async fn set_remote_control_steering(&self, params: SessionsSetRemoteControlSteeringRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call( - rpc_methods::SESSIONS_SETREMOTECONTROLSTEERING, - Some(wire_params), - ) - .await?; + let _value = self.client.call(rpc_methods::SESSIONS_SETREMOTECONTROLSTEERING, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -2321,10 +1952,7 @@ impl<'a> ClientRpcSessions<'a> { /// pub async fn stop_remote_control(&self) -> Result { let wire_params = serde_json::json!({}); - let _value = self - .client - .call(rpc_methods::SESSIONS_STOPREMOTECONTROL, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::SESSIONS_STOPREMOTECONTROL, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -2347,15 +1975,9 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn stop_remote_control_with_params( - &self, - params: SessionsStopRemoteControlRequest, - ) -> Result { + pub async fn stop_remote_control_with_params(&self, params: SessionsStopRemoteControlRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::SESSIONS_STOPREMOTECONTROL, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::SESSIONS_STOPREMOTECONTROL, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -2376,13 +1998,7 @@ impl<'a> ClientRpcSessions<'a> { /// pub async fn get_remote_control_status(&self) -> Result { let wire_params = serde_json::json!({}); - let _value = self - .client - .call( - rpc_methods::SESSIONS_GETREMOTECONTROLSTATUS, - Some(wire_params), - ) - .await?; + let _value = self.client.call(rpc_methods::SESSIONS_GETREMOTECONTROLSTATUS, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -2405,18 +2021,9 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn register_extension_tools_on_session( - &self, - params: RegisterExtensionToolsParams, - ) -> Result { + pub(crate) async fn register_extension_tools_on_session(&self, params: RegisterExtensionToolsParams) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call( - rpc_methods::SESSIONS_REGISTEREXTENSIONTOOLSONSESSION, - Some(wire_params), - ) - .await?; + let _value = self.client.call(rpc_methods::SESSIONS_REGISTEREXTENSIONTOOLSONSESSION, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -2435,20 +2042,12 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn configure_session_extensions( - &self, - params: ConfigureSessionExtensionsParams, - ) -> Result<(), Error> { + pub(crate) async fn configure_session_extensions(&self, params: ConfigureSessionExtensionsParams) -> Result<(), Error> { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call( - rpc_methods::SESSIONS_CONFIGURESESSIONEXTENSIONS, - Some(wire_params), - ) - .await?; + let _value = self.client.call(rpc_methods::SESSIONS_CONFIGURESESSIONEXTENSIONS, Some(wire_params)).await?; Ok(()) } + } /// `skills.*` RPCs. @@ -2460,9 +2059,7 @@ pub struct ClientRpcSkills<'a> { impl<'a> ClientRpcSkills<'a> { /// `skills.config.*` sub-namespace. pub fn config(&self) -> ClientRpcSkillsConfig<'a> { - ClientRpcSkillsConfig { - client: self.client, - } + ClientRpcSkillsConfig { client: self.client } } /// Discovers skills across global and project sources. @@ -2486,10 +2083,7 @@ impl<'a> ClientRpcSkills<'a> { /// pub async fn discover(&self, params: SkillsDiscoverRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::SKILLS_DISCOVER, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::SKILLS_DISCOVER, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -2512,17 +2106,12 @@ impl<'a> ClientRpcSkills<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn get_discovery_paths( - &self, - params: SkillsGetDiscoveryPathsRequest, - ) -> Result { + pub async fn get_discovery_paths(&self, params: SkillsGetDiscoveryPathsRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::SKILLS_GETDISCOVERYPATHS, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::SKILLS_GETDISCOVERYPATHS, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `skills.config.*` RPCs. @@ -2547,20 +2136,12 @@ impl<'a> ClientRpcSkillsConfig<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn set_disabled_skills( - &self, - params: SkillsConfigSetDisabledSkillsRequest, - ) -> Result<(), Error> { + pub async fn set_disabled_skills(&self, params: SkillsConfigSetDisabledSkillsRequest) -> Result<(), Error> { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call( - rpc_methods::SKILLS_CONFIG_SETDISABLEDSKILLS, - Some(wire_params), - ) - .await?; + let _value = self.client.call(rpc_methods::SKILLS_CONFIG_SETDISABLEDSKILLS, Some(wire_params)).await?; Ok(()) } + } /// `tools.*` RPCs. @@ -2591,12 +2172,10 @@ impl<'a> ClientRpcTools<'a> { /// pub async fn list(&self, params: ToolsListRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::TOOLS_LIST, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::TOOLS_LIST, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `user.*` RPCs. @@ -2608,10 +2187,9 @@ pub struct ClientRpcUser<'a> { impl<'a> ClientRpcUser<'a> { /// `user.settings.*` sub-namespace. pub fn settings(&self) -> ClientRpcUserSettings<'a> { - ClientRpcUserSettings { - client: self.client, - } + ClientRpcUserSettings { client: self.client } } + } /// `user.settings.*` RPCs. @@ -2634,10 +2212,7 @@ impl<'a> ClientRpcUserSettings<'a> { /// pub async fn reload(&self) -> Result<(), Error> { let wire_params = serde_json::json!({}); - let _value = self - .client - .call(rpc_methods::USER_SETTINGS_RELOAD, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::USER_SETTINGS_RELOAD, Some(wire_params)).await?; Ok(()) } @@ -2658,10 +2233,7 @@ impl<'a> ClientRpcUserSettings<'a> { /// pub async fn get(&self) -> Result { let wire_params = serde_json::json!({}); - let _value = self - .client - .call(rpc_methods::USER_SETTINGS_GET, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::USER_SETTINGS_GET, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -2684,17 +2256,12 @@ impl<'a> ClientRpcUserSettings<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn set( - &self, - params: UserSettingsSetRequest, - ) -> Result { + pub async fn set(&self, params: UserSettingsSetRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self - .client - .call(rpc_methods::USER_SETTINGS_SET, Some(wire_params)) - .await?; + let _value = self.client.call(rpc_methods::USER_SETTINGS_SET, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// Typed view over a [`Session`]'s RPC namespace. @@ -2706,268 +2273,192 @@ pub struct SessionRpc<'a> { impl<'a> SessionRpc<'a> { /// `session.agent.*` sub-namespace. pub fn agent(&self) -> SessionRpcAgent<'a> { - SessionRpcAgent { - session: self.session, - } + SessionRpcAgent { session: self.session } } /// `session.canvas.*` sub-namespace. pub fn canvas(&self) -> SessionRpcCanvas<'a> { - SessionRpcCanvas { - session: self.session, - } + SessionRpcCanvas { session: self.session } } /// `session.commands.*` sub-namespace. pub fn commands(&self) -> SessionRpcCommands<'a> { - SessionRpcCommands { - session: self.session, - } + SessionRpcCommands { session: self.session } } /// `session.completions.*` sub-namespace. pub fn completions(&self) -> SessionRpcCompletions<'a> { - SessionRpcCompletions { - session: self.session, - } + SessionRpcCompletions { session: self.session } } /// `session.contentExclusion.*` sub-namespace. pub fn content_exclusion(&self) -> SessionRpcContentExclusion<'a> { - SessionRpcContentExclusion { - session: self.session, - } + SessionRpcContentExclusion { session: self.session } } /// `session.debug.*` sub-namespace. pub fn debug(&self) -> SessionRpcDebug<'a> { - SessionRpcDebug { - session: self.session, - } + SessionRpcDebug { session: self.session } } /// `session.eventLog.*` sub-namespace. pub fn event_log(&self) -> SessionRpcEventLog<'a> { - SessionRpcEventLog { - session: self.session, - } + SessionRpcEventLog { session: self.session } } /// `session.extensions.*` sub-namespace. pub fn extensions(&self) -> SessionRpcExtensions<'a> { - SessionRpcExtensions { - session: self.session, - } + SessionRpcExtensions { session: self.session } } /// `session.factory.*` sub-namespace. pub fn factory(&self) -> SessionRpcFactory<'a> { - SessionRpcFactory { - session: self.session, - } + SessionRpcFactory { session: self.session } } /// `session.fleet.*` sub-namespace. pub fn fleet(&self) -> SessionRpcFleet<'a> { - SessionRpcFleet { - session: self.session, - } + SessionRpcFleet { session: self.session } } /// `session.gitHubAuth.*` sub-namespace. pub fn git_hub_auth(&self) -> SessionRpcGitHubAuth<'a> { - SessionRpcGitHubAuth { - session: self.session, - } + SessionRpcGitHubAuth { session: self.session } } /// `session.history.*` sub-namespace. pub fn history(&self) -> SessionRpcHistory<'a> { - SessionRpcHistory { - session: self.session, - } + SessionRpcHistory { session: self.session } } /// `session.instructions.*` sub-namespace. pub fn instructions(&self) -> SessionRpcInstructions<'a> { - SessionRpcInstructions { - session: self.session, - } + SessionRpcInstructions { session: self.session } } /// `session.limitPrediction.*` sub-namespace. pub fn limit_prediction(&self) -> SessionRpcLimitPrediction<'a> { - SessionRpcLimitPrediction { - session: self.session, - } + SessionRpcLimitPrediction { session: self.session } } /// `session.lsp.*` sub-namespace. pub fn lsp(&self) -> SessionRpcLsp<'a> { - SessionRpcLsp { - session: self.session, - } + SessionRpcLsp { session: self.session } } /// `session.mcp.*` sub-namespace. pub fn mcp(&self) -> SessionRpcMcp<'a> { - SessionRpcMcp { - session: self.session, - } + SessionRpcMcp { session: self.session } } /// `session.metadata.*` sub-namespace. pub fn metadata(&self) -> SessionRpcMetadata<'a> { - SessionRpcMetadata { - session: self.session, - } + SessionRpcMetadata { session: self.session } } /// `session.mode.*` sub-namespace. pub fn mode(&self) -> SessionRpcMode<'a> { - SessionRpcMode { - session: self.session, - } + SessionRpcMode { session: self.session } } /// `session.model.*` sub-namespace. pub fn model(&self) -> SessionRpcModel<'a> { - SessionRpcModel { - session: self.session, - } + SessionRpcModel { session: self.session } } /// `session.name.*` sub-namespace. pub fn name(&self) -> SessionRpcName<'a> { - SessionRpcName { - session: self.session, - } + SessionRpcName { session: self.session } } /// `session.options.*` sub-namespace. pub fn options(&self) -> SessionRpcOptions<'a> { - SessionRpcOptions { - session: self.session, - } + SessionRpcOptions { session: self.session } } /// `session.permissions.*` sub-namespace. pub fn permissions(&self) -> SessionRpcPermissions<'a> { - SessionRpcPermissions { - session: self.session, - } + SessionRpcPermissions { session: self.session } } /// `session.plan.*` sub-namespace. pub fn plan(&self) -> SessionRpcPlan<'a> { - SessionRpcPlan { - session: self.session, - } + SessionRpcPlan { session: self.session } } /// `session.plugins.*` sub-namespace. pub fn plugins(&self) -> SessionRpcPlugins<'a> { - SessionRpcPlugins { - session: self.session, - } + SessionRpcPlugins { session: self.session } } /// `session.provider.*` sub-namespace. pub fn provider(&self) -> SessionRpcProvider<'a> { - SessionRpcProvider { - session: self.session, - } + SessionRpcProvider { session: self.session } } /// `session.queue.*` sub-namespace. pub fn queue(&self) -> SessionRpcQueue<'a> { - SessionRpcQueue { - session: self.session, - } + SessionRpcQueue { session: self.session } } /// `session.remote.*` sub-namespace. pub fn remote(&self) -> SessionRpcRemote<'a> { - SessionRpcRemote { - session: self.session, - } + SessionRpcRemote { session: self.session } } /// `session.schedule.*` sub-namespace. pub fn schedule(&self) -> SessionRpcSchedule<'a> { - SessionRpcSchedule { - session: self.session, - } + SessionRpcSchedule { session: self.session } } /// `session.settings.*` sub-namespace. pub fn settings(&self) -> SessionRpcSettings<'a> { - SessionRpcSettings { - session: self.session, - } + SessionRpcSettings { session: self.session } } /// `session.shell.*` sub-namespace. pub fn shell(&self) -> SessionRpcShell<'a> { - SessionRpcShell { - session: self.session, - } + SessionRpcShell { session: self.session } } /// `session.skills.*` sub-namespace. pub fn skills(&self) -> SessionRpcSkills<'a> { - SessionRpcSkills { - session: self.session, - } + SessionRpcSkills { session: self.session } } /// `session.tasks.*` sub-namespace. pub fn tasks(&self) -> SessionRpcTasks<'a> { - SessionRpcTasks { - session: self.session, - } + SessionRpcTasks { session: self.session } } /// `session.telemetry.*` sub-namespace. pub fn telemetry(&self) -> SessionRpcTelemetry<'a> { - SessionRpcTelemetry { - session: self.session, - } + SessionRpcTelemetry { session: self.session } } /// `session.tools.*` sub-namespace. pub fn tools(&self) -> SessionRpcTools<'a> { - SessionRpcTools { - session: self.session, - } + SessionRpcTools { session: self.session } } /// `session.ui.*` sub-namespace. pub fn ui(&self) -> SessionRpcUi<'a> { - SessionRpcUi { - session: self.session, - } + SessionRpcUi { session: self.session } } /// `session.usage.*` sub-namespace. pub fn usage(&self) -> SessionRpcUsage<'a> { - SessionRpcUsage { - session: self.session, - } + SessionRpcUsage { session: self.session } } /// `session.visibility.*` sub-namespace. pub fn visibility(&self) -> SessionRpcVisibility<'a> { - SessionRpcVisibility { - session: self.session, - } + SessionRpcVisibility { session: self.session } } /// `session.workspaces.*` sub-namespace. pub fn workspaces(&self) -> SessionRpcWorkspaces<'a> { - SessionRpcWorkspaces { - session: self.session, - } + SessionRpcWorkspaces { session: self.session } } /// Suspends the session while preserving persisted state for later resume. @@ -2983,11 +2474,7 @@ impl<'a> SessionRpc<'a> { /// pub async fn suspend(&self) -> Result<(), Error> { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_SUSPEND, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_SUSPEND, Some(wire_params)).await?; Ok(()) } @@ -3013,11 +2500,7 @@ impl<'a> SessionRpc<'a> { pub async fn send(&self, params: SendRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_SEND, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_SEND, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -3040,17 +2523,10 @@ impl<'a> SessionRpc<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn send_messages( - &self, - params: SendMessagesRequest, - ) -> Result { + pub async fn send_messages(&self, params: SendMessagesRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_SENDMESSAGES, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_SENDMESSAGES, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -3069,20 +2545,10 @@ impl<'a> SessionRpc<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn send_system_notification( - &self, - params: SendSystemNotificationRequest, - ) -> Result<(), Error> { + pub(crate) async fn send_system_notification(&self, params: SendSystemNotificationRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_SENDSYSTEMNOTIFICATION, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_SENDSYSTEMNOTIFICATION, Some(wire_params)).await?; Ok(()) } @@ -3108,11 +2574,7 @@ impl<'a> SessionRpc<'a> { pub async fn abort(&self, params: AbortRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_ABORT, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_ABORT, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -3135,17 +2597,10 @@ impl<'a> SessionRpc<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn interrupt_main_turn( - &self, - params: InterruptMainTurnRequest, - ) -> Result { + pub async fn interrupt_main_turn(&self, params: InterruptMainTurnRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_INTERRUPTMAINTURN, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_INTERRUPTMAINTURN, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -3164,18 +2619,9 @@ impl<'a> SessionRpc<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn cancel_all_background_agents( - &self, - ) -> Result { + pub async fn cancel_all_background_agents(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_CANCELALLBACKGROUNDAGENTS, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_CANCELALLBACKGROUNDAGENTS, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -3197,11 +2643,7 @@ impl<'a> SessionRpc<'a> { pub async fn shutdown(&self, params: ShutdownRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_SHUTDOWN, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_SHUTDOWN, Some(wire_params)).await?; Ok(()) } @@ -3227,13 +2669,10 @@ impl<'a> SessionRpc<'a> { pub async fn log(&self, params: LogRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_LOG, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_LOG, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.agent.*` RPCs. @@ -3260,11 +2699,7 @@ impl<'a> SessionRpcAgent<'a> { /// pub async fn list(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_AGENT_LIST, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_AGENT_LIST, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -3290,11 +2725,7 @@ impl<'a> SessionRpcAgent<'a> { pub async fn list_with_params(&self, params: AgentListRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_AGENT_LIST, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_AGENT_LIST, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -3315,11 +2746,7 @@ impl<'a> SessionRpcAgent<'a> { /// pub async fn get_current(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_AGENT_GETCURRENT, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_AGENT_GETCURRENT, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -3345,11 +2772,7 @@ impl<'a> SessionRpcAgent<'a> { pub async fn select(&self, params: AgentSelectRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_AGENT_SELECT, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_AGENT_SELECT, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -3366,11 +2789,7 @@ impl<'a> SessionRpcAgent<'a> { /// pub async fn deselect(&self) -> Result<(), Error> { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_AGENT_DESELECT, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_AGENT_DESELECT, Some(wire_params)).await?; Ok(()) } @@ -3391,13 +2810,10 @@ impl<'a> SessionRpcAgent<'a> { /// pub async fn reload(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_AGENT_RELOAD, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_AGENT_RELOAD, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.canvas.*` RPCs. @@ -3409,9 +2825,7 @@ pub struct SessionRpcCanvas<'a> { impl<'a> SessionRpcCanvas<'a> { /// `session.canvas.action.*` sub-namespace. pub fn action(&self) -> SessionRpcCanvasAction<'a> { - SessionRpcCanvasAction { - session: self.session, - } + SessionRpcCanvasAction { session: self.session } } /// Lists canvases declared for the session. @@ -3431,11 +2845,7 @@ impl<'a> SessionRpcCanvas<'a> { /// pub async fn list(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_CANVAS_LIST, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_CANVAS_LIST, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -3456,11 +2866,7 @@ impl<'a> SessionRpcCanvas<'a> { /// pub async fn list_open(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_CANVAS_LISTOPEN, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_CANVAS_LISTOPEN, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -3486,11 +2892,7 @@ impl<'a> SessionRpcCanvas<'a> { pub async fn open(&self, params: CanvasOpenRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_CANVAS_OPEN, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_CANVAS_OPEN, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -3512,13 +2914,10 @@ impl<'a> SessionRpcCanvas<'a> { pub async fn close(&self, params: CanvasCloseRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_CANVAS_CLOSE, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_CANVAS_CLOSE, Some(wire_params)).await?; Ok(()) } + } /// `session.canvas.action.*` RPCs. @@ -3547,19 +2946,13 @@ impl<'a> SessionRpcCanvasAction<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn invoke( - &self, - params: CanvasActionInvokeRequest, - ) -> Result { + pub async fn invoke(&self, params: CanvasActionInvokeRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_CANVAS_ACTION_INVOKE, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_CANVAS_ACTION_INVOKE, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.commands.*` RPCs. @@ -3586,11 +2979,7 @@ impl<'a> SessionRpcCommands<'a> { /// pub async fn list(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_COMMANDS_LIST, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_COMMANDS_LIST, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -3613,17 +3002,10 @@ impl<'a> SessionRpcCommands<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn list_with_params( - &self, - params: CommandsListRequest, - ) -> Result { + pub async fn list_with_params(&self, params: CommandsListRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_COMMANDS_LIST, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_COMMANDS_LIST, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -3646,17 +3028,10 @@ impl<'a> SessionRpcCommands<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn invoke( - &self, - params: CommandsInvokeRequest, - ) -> Result { + pub async fn invoke(&self, params: CommandsInvokeRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_COMMANDS_INVOKE, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_COMMANDS_INVOKE, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -3679,20 +3054,10 @@ impl<'a> SessionRpcCommands<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn handle_pending_command( - &self, - params: CommandsHandlePendingCommandRequest, - ) -> Result { + pub async fn handle_pending_command(&self, params: CommandsHandlePendingCommandRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_COMMANDS_HANDLEPENDINGCOMMAND, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_COMMANDS_HANDLEPENDINGCOMMAND, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -3715,17 +3080,10 @@ impl<'a> SessionRpcCommands<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn execute( - &self, - params: ExecuteCommandParams, - ) -> Result { + pub async fn execute(&self, params: ExecuteCommandParams) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_COMMANDS_EXECUTE, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_COMMANDS_EXECUTE, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -3748,17 +3106,10 @@ impl<'a> SessionRpcCommands<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn enqueue( - &self, - params: EnqueueCommandParams, - ) -> Result { + pub async fn enqueue(&self, params: EnqueueCommandParams) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_COMMANDS_ENQUEUE, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_COMMANDS_ENQUEUE, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -3781,22 +3132,13 @@ impl<'a> SessionRpcCommands<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn respond_to_queued_command( - &self, - params: CommandsRespondToQueuedCommandRequest, - ) -> Result { + pub async fn respond_to_queued_command(&self, params: CommandsRespondToQueuedCommandRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_COMMANDS_RESPONDTOQUEUEDCOMMAND, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_COMMANDS_RESPONDTOQUEUEDCOMMAND, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.completions.*` RPCs. @@ -3821,18 +3163,9 @@ impl<'a> SessionRpcCompletions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn get_trigger_characters( - &self, - ) -> Result { + pub async fn get_trigger_characters(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_COMPLETIONS_GETTRIGGERCHARACTERS, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_COMPLETIONS_GETTRIGGERCHARACTERS, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -3855,19 +3188,13 @@ impl<'a> SessionRpcCompletions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn request( - &self, - params: CompletionsRequestRequest, - ) -> Result { + pub async fn request(&self, params: CompletionsRequestRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_COMPLETIONS_REQUEST, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_COMPLETIONS_REQUEST, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.contentExclusion.*` RPCs. @@ -3896,22 +3223,13 @@ impl<'a> SessionRpcContentExclusion<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn check_paths( - &self, - params: ContentExclusionCheckPathsRequest, - ) -> Result { + pub async fn check_paths(&self, params: ContentExclusionCheckPathsRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_CONTENTEXCLUSION_CHECKPATHS, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_CONTENTEXCLUSION_CHECKPATHS, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.debug.*` RPCs. @@ -3940,19 +3258,13 @@ impl<'a> SessionRpcDebug<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn collect_logs( - &self, - params: DebugCollectLogsRequest, - ) -> Result { + pub async fn collect_logs(&self, params: DebugCollectLogsRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_DEBUG_COLLECTLOGS, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_DEBUG_COLLECTLOGS, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.eventLog.*` RPCs. @@ -3984,11 +3296,7 @@ impl<'a> SessionRpcEventLog<'a> { pub async fn read(&self, params: EventLogReadRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_EVENTLOG_READ, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_EVENTLOG_READ, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -4009,11 +3317,7 @@ impl<'a> SessionRpcEventLog<'a> { /// pub async fn tail(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_EVENTLOG_TAIL, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_EVENTLOG_TAIL, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -4036,20 +3340,10 @@ impl<'a> SessionRpcEventLog<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn register_interest( - &self, - params: RegisterEventInterestParams, - ) -> Result { + pub async fn register_interest(&self, params: RegisterEventInterestParams) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_EVENTLOG_REGISTERINTEREST, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_EVENTLOG_REGISTERINTEREST, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -4072,22 +3366,13 @@ impl<'a> SessionRpcEventLog<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn release_interest( - &self, - params: ReleaseEventInterestParams, - ) -> Result { + pub async fn release_interest(&self, params: ReleaseEventInterestParams) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_EVENTLOG_RELEASEINTEREST, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_EVENTLOG_RELEASEINTEREST, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.extensions.*` RPCs. @@ -4114,11 +3399,7 @@ impl<'a> SessionRpcExtensions<'a> { /// pub async fn list(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_EXTENSIONS_LIST, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_EXTENSIONS_LIST, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -4140,11 +3421,7 @@ impl<'a> SessionRpcExtensions<'a> { pub async fn enable(&self, params: ExtensionsEnableRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_EXTENSIONS_ENABLE, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_EXTENSIONS_ENABLE, Some(wire_params)).await?; Ok(()) } @@ -4166,11 +3443,7 @@ impl<'a> SessionRpcExtensions<'a> { pub async fn disable(&self, params: ExtensionsDisableRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_EXTENSIONS_DISABLE, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_EXTENSIONS_DISABLE, Some(wire_params)).await?; Ok(()) } @@ -4187,11 +3460,7 @@ impl<'a> SessionRpcExtensions<'a> { /// pub async fn reload(&self) -> Result<(), Error> { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_EXTENSIONS_RELOAD, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_EXTENSIONS_RELOAD, Some(wire_params)).await?; Ok(()) } @@ -4210,22 +3479,13 @@ impl<'a> SessionRpcExtensions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn send_attachments_to_message( - &self, - params: SendAttachmentsToMessageParams, - ) -> Result<(), Error> { + pub async fn send_attachments_to_message(&self, params: SendAttachmentsToMessageParams) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_EXTENSIONS_SENDATTACHMENTSTOMESSAGE, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_EXTENSIONS_SENDATTACHMENTSTOMESSAGE, Some(wire_params)).await?; Ok(()) } + } /// `session.factory.*` RPCs. @@ -4237,9 +3497,7 @@ pub struct SessionRpcFactory<'a> { impl<'a> SessionRpcFactory<'a> { /// `session.factory.journal.*` sub-namespace. pub fn journal(&self) -> SessionRpcFactoryJournal<'a> { - SessionRpcFactoryJournal { - session: self.session, - } + SessionRpcFactoryJournal { session: self.session } } /// Runs a registered factory by name at the top level. @@ -4264,11 +3522,7 @@ impl<'a> SessionRpcFactory<'a> { pub async fn run(&self, params: FactoryRunRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_FACTORY_RUN, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_FACTORY_RUN, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -4294,11 +3548,7 @@ impl<'a> SessionRpcFactory<'a> { pub async fn resume(&self, params: FactoryResumeRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_FACTORY_RESUME, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_FACTORY_RESUME, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -4324,11 +3574,7 @@ impl<'a> SessionRpcFactory<'a> { pub async fn get_run(&self, params: FactoryGetRunRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_FACTORY_GETRUN, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_FACTORY_GETRUN, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -4349,11 +3595,7 @@ impl<'a> SessionRpcFactory<'a> { /// pub async fn list_runs(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_FACTORY_LISTRUNS, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_FACTORY_LISTRUNS, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -4376,17 +3618,10 @@ impl<'a> SessionRpcFactory<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn get_run_detail( - &self, - params: FactoryGetRunRequest, - ) -> Result { + pub async fn get_run_detail(&self, params: FactoryGetRunRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_FACTORY_GETRUNDETAIL, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_FACTORY_GETRUNDETAIL, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -4409,20 +3644,10 @@ impl<'a> SessionRpcFactory<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn get_run_progress( - &self, - params: FactoryGetRunProgressRequest, - ) -> Result { + pub async fn get_run_progress(&self, params: FactoryGetRunProgressRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_FACTORY_GETRUNPROGRESS, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_FACTORY_GETRUNPROGRESS, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -4448,11 +3673,7 @@ impl<'a> SessionRpcFactory<'a> { pub async fn cancel(&self, params: FactoryCancelRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_FACTORY_CANCEL, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_FACTORY_CANCEL, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -4478,11 +3699,7 @@ impl<'a> SessionRpcFactory<'a> { pub async fn log(&self, params: FactoryLogRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_FACTORY_LOG, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_FACTORY_LOG, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -4508,13 +3725,10 @@ impl<'a> SessionRpcFactory<'a> { pub async fn agent(&self, params: FactoryAgentRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_FACTORY_AGENT, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_FACTORY_AGENT, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.factory.journal.*` RPCs. @@ -4543,17 +3757,10 @@ impl<'a> SessionRpcFactoryJournal<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn get( - &self, - params: FactoryJournalGetRequest, - ) -> Result { + pub async fn get(&self, params: FactoryJournalGetRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_FACTORY_JOURNAL_GET, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_FACTORY_JOURNAL_GET, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -4579,13 +3786,10 @@ impl<'a> SessionRpcFactoryJournal<'a> { pub async fn put(&self, params: FactoryJournalPutRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_FACTORY_JOURNAL_PUT, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_FACTORY_JOURNAL_PUT, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.fleet.*` RPCs. @@ -4617,13 +3821,10 @@ impl<'a> SessionRpcFleet<'a> { pub async fn start(&self, params: FleetStartRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_FLEET_START, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_FLEET_START, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.gitHubAuth.*` RPCs. @@ -4650,11 +3851,7 @@ impl<'a> SessionRpcGitHubAuth<'a> { /// pub async fn get_status(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_GITHUBAUTH_GETSTATUS, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_GITHUBAUTH_GETSTATUS, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -4677,22 +3874,13 @@ impl<'a> SessionRpcGitHubAuth<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn set_credentials( - &self, - params: SessionSetCredentialsParams, - ) -> Result { + pub async fn set_credentials(&self, params: SessionSetCredentialsParams) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_GITHUBAUTH_SETCREDENTIALS, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_GITHUBAUTH_SETCREDENTIALS, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.history.*` RPCs. @@ -4719,11 +3907,7 @@ impl<'a> SessionRpcHistory<'a> { /// pub async fn compact(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_HISTORY_COMPACT, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_HISTORY_COMPACT, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -4746,17 +3930,10 @@ impl<'a> SessionRpcHistory<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn compact_with_params( - &self, - params: HistoryCompactRequest, - ) -> Result { + pub async fn compact_with_params(&self, params: HistoryCompactRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_HISTORY_COMPACT, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_HISTORY_COMPACT, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -4779,17 +3956,10 @@ impl<'a> SessionRpcHistory<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn truncate( - &self, - params: HistoryTruncateRequest, - ) -> Result { + pub async fn truncate(&self, params: HistoryTruncateRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_HISTORY_TRUNCATE, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_HISTORY_TRUNCATE, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -4810,14 +3980,7 @@ impl<'a> SessionRpcHistory<'a> { /// pub async fn list_rewind_points(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_HISTORY_LISTREWINDPOINTS, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_HISTORY_LISTREWINDPOINTS, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -4840,20 +4003,10 @@ impl<'a> SessionRpcHistory<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn preview_rewind( - &self, - params: HistoryPreviewRewindRequest, - ) -> Result { + pub async fn preview_rewind(&self, params: HistoryPreviewRewindRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_HISTORY_PREVIEWREWIND, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_HISTORY_PREVIEWREWIND, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -4879,11 +4032,7 @@ impl<'a> SessionRpcHistory<'a> { pub async fn rewind(&self, params: HistoryRewindRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_HISTORY_REWIND, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_HISTORY_REWIND, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -4902,18 +4051,9 @@ impl<'a> SessionRpcHistory<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn cancel_background_compaction( - &self, - ) -> Result { + pub async fn cancel_background_compaction(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_HISTORY_CANCELBACKGROUNDCOMPACTION, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_HISTORY_CANCELBACKGROUNDCOMPACTION, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -4932,18 +4072,9 @@ impl<'a> SessionRpcHistory<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn abort_manual_compaction( - &self, - ) -> Result { + pub async fn abort_manual_compaction(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_HISTORY_ABORTMANUALCOMPACTION, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_HISTORY_ABORTMANUALCOMPACTION, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -4964,16 +4095,10 @@ impl<'a> SessionRpcHistory<'a> { /// pub async fn summarize_for_handoff(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_HISTORY_SUMMARIZEFORHANDOFF, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_HISTORY_SUMMARIZEFORHANDOFF, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.instructions.*` RPCs. @@ -5000,16 +4125,10 @@ impl<'a> SessionRpcInstructions<'a> { /// pub async fn get_sources(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_INSTRUCTIONS_GETSOURCES, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_INSTRUCTIONS_GETSOURCES, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.limitPrediction.*` RPCs. @@ -5036,14 +4155,7 @@ impl<'a> SessionRpcLimitPrediction<'a> { /// pub async fn predict(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_LIMITPREDICTION_PREDICT, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_LIMITPREDICTION_PREDICT, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -5066,22 +4178,13 @@ impl<'a> SessionRpcLimitPrediction<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn predict_with_params( - &self, - params: SessionLimitPredictionRequest, - ) -> Result { + pub async fn predict_with_params(&self, params: SessionLimitPredictionRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_LIMITPREDICTION_PREDICT, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_LIMITPREDICTION_PREDICT, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.lsp.*` RPCs. @@ -5109,13 +4212,10 @@ impl<'a> SessionRpcLsp<'a> { pub async fn initialize(&self, params: LspInitializeRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_LSP_INITIALIZE, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_LSP_INITIALIZE, Some(wire_params)).await?; Ok(()) } + } /// `session.mcp.*` RPCs. @@ -5127,30 +4227,22 @@ pub struct SessionRpcMcp<'a> { impl<'a> SessionRpcMcp<'a> { /// `session.mcp.apps.*` sub-namespace. pub fn apps(&self) -> SessionRpcMcpApps<'a> { - SessionRpcMcpApps { - session: self.session, - } + SessionRpcMcpApps { session: self.session } } /// `session.mcp.headers.*` sub-namespace. pub fn headers(&self) -> SessionRpcMcpHeaders<'a> { - SessionRpcMcpHeaders { - session: self.session, - } + SessionRpcMcpHeaders { session: self.session } } /// `session.mcp.oauth.*` sub-namespace. pub fn oauth(&self) -> SessionRpcMcpOauth<'a> { - SessionRpcMcpOauth { - session: self.session, - } + SessionRpcMcpOauth { session: self.session } } /// `session.mcp.resources.*` sub-namespace. pub fn resources(&self) -> SessionRpcMcpResources<'a> { - SessionRpcMcpResources { - session: self.session, - } + SessionRpcMcpResources { session: self.session } } /// Lists MCP servers configured for the session, their connection status, and host-level state. The host-level state (disabled/filtered servers, failed/needs-auth/pending connections, mcp3p policy, full config) is empty/zero when no MCP host has been initialized for the session. @@ -5170,11 +4262,7 @@ impl<'a> SessionRpcMcp<'a> { /// pub async fn list(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_MCP_LIST, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_MCP_LIST, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -5197,17 +4285,10 @@ impl<'a> SessionRpcMcp<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn list_tools( - &self, - params: McpListToolsRequest, - ) -> Result { + pub async fn list_tools(&self, params: McpListToolsRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_MCP_LISTTOOLS, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_MCP_LISTTOOLS, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -5229,11 +4310,7 @@ impl<'a> SessionRpcMcp<'a> { pub async fn enable(&self, params: McpEnableRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_MCP_ENABLE, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_MCP_ENABLE, Some(wire_params)).await?; Ok(()) } @@ -5255,11 +4332,7 @@ impl<'a> SessionRpcMcp<'a> { pub async fn disable(&self, params: McpDisableRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_MCP_DISABLE, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_MCP_DISABLE, Some(wire_params)).await?; Ok(()) } @@ -5276,11 +4349,7 @@ impl<'a> SessionRpcMcp<'a> { /// pub async fn reload(&self) -> Result<(), Error> { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_MCP_RELOAD, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_MCP_RELOAD, Some(wire_params)).await?; Ok(()) } @@ -5303,17 +4372,10 @@ impl<'a> SessionRpcMcp<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn reload_with_config( - &self, - params: McpReloadWithConfigRequest, - ) -> Result { + pub(crate) async fn reload_with_config(&self, params: McpReloadWithConfigRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_MCP_RELOADWITHCONFIG, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_MCP_RELOADWITHCONFIG, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -5336,17 +4398,10 @@ impl<'a> SessionRpcMcp<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn execute_sampling( - &self, - params: McpExecuteSamplingParams, - ) -> Result { + pub async fn execute_sampling(&self, params: McpExecuteSamplingParams) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_MCP_EXECUTESAMPLING, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_MCP_EXECUTESAMPLING, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -5369,20 +4424,10 @@ impl<'a> SessionRpcMcp<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn cancel_sampling_execution( - &self, - params: McpCancelSamplingExecutionParams, - ) -> Result { + pub async fn cancel_sampling_execution(&self, params: McpCancelSamplingExecutionParams) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_MCP_CANCELSAMPLINGEXECUTION, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_MCP_CANCELSAMPLINGEXECUTION, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -5405,17 +4450,10 @@ impl<'a> SessionRpcMcp<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn set_env_value_mode( - &self, - params: McpSetEnvValueModeParams, - ) -> Result { + pub async fn set_env_value_mode(&self, params: McpSetEnvValueModeParams) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_MCP_SETENVVALUEMODE, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_MCP_SETENVVALUEMODE, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -5436,11 +4474,7 @@ impl<'a> SessionRpcMcp<'a> { /// pub async fn remove_git_hub(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_MCP_REMOVEGITHUB, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_MCP_REMOVEGITHUB, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -5463,17 +4497,10 @@ impl<'a> SessionRpcMcp<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn configure_git_hub( - &self, - params: McpConfigureGitHubRequest, - ) -> Result { + pub(crate) async fn configure_git_hub(&self, params: McpConfigureGitHubRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_MCP_CONFIGUREGITHUB, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_MCP_CONFIGUREGITHUB, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -5495,11 +4522,7 @@ impl<'a> SessionRpcMcp<'a> { pub async fn start_server(&self, params: McpStartServerRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_MCP_STARTSERVER, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_MCP_STARTSERVER, Some(wire_params)).await?; Ok(()) } @@ -5521,11 +4544,7 @@ impl<'a> SessionRpcMcp<'a> { pub async fn restart_server(&self, params: McpRestartServerRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_MCP_RESTARTSERVER, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_MCP_RESTARTSERVER, Some(wire_params)).await?; Ok(()) } @@ -5547,11 +4566,7 @@ impl<'a> SessionRpcMcp<'a> { pub async fn stop_server(&self, params: McpStopServerRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_MCP_STOPSERVER, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_MCP_STOPSERVER, Some(wire_params)).await?; Ok(()) } @@ -5570,20 +4585,10 @@ impl<'a> SessionRpcMcp<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn register_external_client( - &self, - params: McpRegisterExternalClientRequest, - ) -> Result<(), Error> { + pub(crate) async fn register_external_client(&self, params: McpRegisterExternalClientRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_MCP_REGISTEREXTERNALCLIENT, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_MCP_REGISTEREXTERNALCLIENT, Some(wire_params)).await?; Ok(()) } @@ -5602,20 +4607,10 @@ impl<'a> SessionRpcMcp<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn unregister_external_client( - &self, - params: McpUnregisterExternalClientRequest, - ) -> Result<(), Error> { + pub(crate) async fn unregister_external_client(&self, params: McpUnregisterExternalClientRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_MCP_UNREGISTEREXTERNALCLIENT, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_MCP_UNREGISTEREXTERNALCLIENT, Some(wire_params)).await?; Ok(()) } @@ -5638,19 +4633,13 @@ impl<'a> SessionRpcMcp<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn is_server_running( - &self, - params: McpIsServerRunningRequest, - ) -> Result { + pub async fn is_server_running(&self, params: McpIsServerRunningRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_MCP_ISSERVERRUNNING, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_MCP_ISSERVERRUNNING, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.mcp.apps.*` RPCs. @@ -5679,20 +4668,10 @@ impl<'a> SessionRpcMcpApps<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn read_resource( - &self, - params: McpAppsReadResourceRequest, - ) -> Result { + pub async fn read_resource(&self, params: McpAppsReadResourceRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_MCP_APPS_READRESOURCE, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_MCP_APPS_READRESOURCE, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -5715,17 +4694,10 @@ impl<'a> SessionRpcMcpApps<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn list_tools( - &self, - params: McpAppsListToolsRequest, - ) -> Result { + pub async fn list_tools(&self, params: McpAppsListToolsRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_MCP_APPS_LISTTOOLS, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_MCP_APPS_LISTTOOLS, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -5748,17 +4720,10 @@ impl<'a> SessionRpcMcpApps<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn call_tool( - &self, - params: McpAppsCallToolRequest, - ) -> Result { + pub async fn call_tool(&self, params: McpAppsCallToolRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_MCP_APPS_CALLTOOL, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_MCP_APPS_CALLTOOL, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -5777,20 +4742,10 @@ impl<'a> SessionRpcMcpApps<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn set_host_context( - &self, - params: McpAppsSetHostContextRequest, - ) -> Result<(), Error> { + pub async fn set_host_context(&self, params: McpAppsSetHostContextRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_MCP_APPS_SETHOSTCONTEXT, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_MCP_APPS_SETHOSTCONTEXT, Some(wire_params)).await?; Ok(()) } @@ -5811,14 +4766,7 @@ impl<'a> SessionRpcMcpApps<'a> { /// pub async fn get_host_context(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_MCP_APPS_GETHOSTCONTEXT, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_MCP_APPS_GETHOSTCONTEXT, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -5841,19 +4789,13 @@ impl<'a> SessionRpcMcpApps<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn diagnose( - &self, - params: McpAppsDiagnoseRequest, - ) -> Result { + pub async fn diagnose(&self, params: McpAppsDiagnoseRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_MCP_APPS_DIAGNOSE, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_MCP_APPS_DIAGNOSE, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.mcp.headers.*` RPCs. @@ -5882,22 +4824,13 @@ impl<'a> SessionRpcMcpHeaders<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn handle_pending_headers_refresh_request( - &self, - params: McpHeadersHandlePendingHeadersRefreshRequestRequest, - ) -> Result { + pub async fn handle_pending_headers_refresh_request(&self, params: McpHeadersHandlePendingHeadersRefreshRequestRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_MCP_HEADERS_HANDLEPENDINGHEADERSREFRESHREQUEST, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_MCP_HEADERS_HANDLEPENDINGHEADERSREFRESHREQUEST, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.mcp.oauth.*` RPCs. @@ -5926,20 +4859,10 @@ impl<'a> SessionRpcMcpOauth<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn handle_pending_request( - &self, - params: McpOauthHandlePendingRequest, - ) -> Result { + pub async fn handle_pending_request(&self, params: McpOauthHandlePendingRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_MCP_OAUTH_HANDLEPENDINGREQUEST, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_MCP_OAUTH_HANDLEPENDINGREQUEST, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -5965,11 +4888,7 @@ impl<'a> SessionRpcMcpOauth<'a> { pub async fn login(&self, params: McpOauthLoginRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_MCP_OAUTH_LOGIN, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_MCP_OAUTH_LOGIN, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -5992,19 +4911,13 @@ impl<'a> SessionRpcMcpOauth<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn respond( - &self, - params: McpOauthRespondRequest, - ) -> Result { + pub async fn respond(&self, params: McpOauthRespondRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_MCP_OAUTH_RESPOND, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_MCP_OAUTH_RESPOND, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.mcp.resources.*` RPCs. @@ -6033,17 +4946,10 @@ impl<'a> SessionRpcMcpResources<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn read( - &self, - params: McpResourcesReadRequest, - ) -> Result { + pub async fn read(&self, params: McpResourcesReadRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_MCP_RESOURCES_READ, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_MCP_RESOURCES_READ, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -6066,17 +4972,10 @@ impl<'a> SessionRpcMcpResources<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn list( - &self, - params: McpResourcesListRequest, - ) -> Result { + pub async fn list(&self, params: McpResourcesListRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_MCP_RESOURCES_LIST, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_MCP_RESOURCES_LIST, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -6099,22 +4998,13 @@ impl<'a> SessionRpcMcpResources<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn list_templates( - &self, - params: McpResourcesListTemplatesRequest, - ) -> Result { + pub async fn list_templates(&self, params: McpResourcesListTemplatesRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_MCP_RESOURCES_LISTTEMPLATES, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_MCP_RESOURCES_LISTTEMPLATES, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.metadata.*` RPCs. @@ -6141,11 +5031,7 @@ impl<'a> SessionRpcMetadata<'a> { /// pub async fn snapshot(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_METADATA_SNAPSHOT, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_METADATA_SNAPSHOT, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -6166,14 +5052,7 @@ impl<'a> SessionRpcMetadata<'a> { /// pub async fn is_processing(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_METADATA_ISPROCESSING, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_METADATA_ISPROCESSING, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -6194,11 +5073,7 @@ impl<'a> SessionRpcMetadata<'a> { /// pub async fn activity(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_METADATA_ACTIVITY, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_METADATA_ACTIVITY, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -6221,17 +5096,10 @@ impl<'a> SessionRpcMetadata<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn context_info( - &self, - params: MetadataContextInfoRequest, - ) -> Result { + pub async fn context_info(&self, params: MetadataContextInfoRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_METADATA_CONTEXTINFO, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_METADATA_CONTEXTINFO, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -6252,14 +5120,7 @@ impl<'a> SessionRpcMetadata<'a> { /// pub async fn get_context_attribution(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_METADATA_GETCONTEXTATTRIBUTION, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_METADATA_GETCONTEXTATTRIBUTION, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -6282,20 +5143,10 @@ impl<'a> SessionRpcMetadata<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn get_context_heaviest_messages( - &self, - params: MetadataContextHeaviestMessagesRequest, - ) -> Result { + pub async fn get_context_heaviest_messages(&self, params: MetadataContextHeaviestMessagesRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_METADATA_GETCONTEXTHEAVIESTMESSAGES, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_METADATA_GETCONTEXTHEAVIESTMESSAGES, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -6318,20 +5169,10 @@ impl<'a> SessionRpcMetadata<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn record_context_change( - &self, - params: MetadataRecordContextChangeRequest, - ) -> Result { + pub async fn record_context_change(&self, params: MetadataRecordContextChangeRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_METADATA_RECORDCONTEXTCHANGE, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_METADATA_RECORDCONTEXTCHANGE, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -6354,20 +5195,10 @@ impl<'a> SessionRpcMetadata<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn set_working_directory( - &self, - params: MetadataSetWorkingDirectoryRequest, - ) -> Result { + pub async fn set_working_directory(&self, params: MetadataSetWorkingDirectoryRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_METADATA_SETWORKINGDIRECTORY, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_METADATA_SETWORKINGDIRECTORY, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -6390,22 +5221,13 @@ impl<'a> SessionRpcMetadata<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn recompute_context_tokens( - &self, - params: MetadataRecomputeContextTokensRequest, - ) -> Result { + pub async fn recompute_context_tokens(&self, params: MetadataRecomputeContextTokensRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_METADATA_RECOMPUTECONTEXTTOKENS, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_METADATA_RECOMPUTECONTEXTTOKENS, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.mode.*` RPCs. @@ -6432,11 +5254,7 @@ impl<'a> SessionRpcMode<'a> { /// pub async fn get(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_MODE_GET, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_MODE_GET, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -6458,13 +5276,10 @@ impl<'a> SessionRpcMode<'a> { pub async fn set(&self, params: ModeSetRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_MODE_SET, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_MODE_SET, Some(wire_params)).await?; Ok(()) } + } /// `session.model.*` RPCs. @@ -6491,11 +5306,7 @@ impl<'a> SessionRpcModel<'a> { /// pub async fn get_current(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_MODEL_GETCURRENT, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_MODEL_GETCURRENT, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -6518,17 +5329,10 @@ impl<'a> SessionRpcModel<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn switch_to( - &self, - params: ModelSwitchToRequest, - ) -> Result { + pub async fn switch_to(&self, params: ModelSwitchToRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_MODEL_SWITCHTO, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_MODEL_SWITCHTO, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -6551,20 +5355,10 @@ impl<'a> SessionRpcModel<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn set_reasoning_effort( - &self, - params: ModelSetReasoningEffortRequest, - ) -> Result { + pub async fn set_reasoning_effort(&self, params: ModelSetReasoningEffortRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_MODEL_SETREASONINGEFFORT, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_MODEL_SETREASONINGEFFORT, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -6585,11 +5379,7 @@ impl<'a> SessionRpcModel<'a> { /// pub async fn list(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_MODEL_LIST, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_MODEL_LIST, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -6612,19 +5402,13 @@ impl<'a> SessionRpcModel<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn list_with_params( - &self, - params: ModelListRequest, - ) -> Result { + pub async fn list_with_params(&self, params: ModelListRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_MODEL_LIST, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_MODEL_LIST, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.name.*` RPCs. @@ -6651,11 +5435,7 @@ impl<'a> SessionRpcName<'a> { /// pub async fn get(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_NAME_GET, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_NAME_GET, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -6677,11 +5457,7 @@ impl<'a> SessionRpcName<'a> { pub async fn set(&self, params: NameSetRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_NAME_SET, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_NAME_SET, Some(wire_params)).await?; Ok(()) } @@ -6707,13 +5483,10 @@ impl<'a> SessionRpcName<'a> { pub async fn set_auto(&self, params: NameSetAutoRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_NAME_SETAUTO, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_NAME_SETAUTO, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.options.*` RPCs. @@ -6742,19 +5515,13 @@ impl<'a> SessionRpcOptions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn update( - &self, - params: SessionUpdateOptionsParams, - ) -> Result { + pub async fn update(&self, params: SessionUpdateOptionsParams) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_OPTIONS_UPDATE, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_OPTIONS_UPDATE, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.permissions.*` RPCs. @@ -6766,30 +5533,22 @@ pub struct SessionRpcPermissions<'a> { impl<'a> SessionRpcPermissions<'a> { /// `session.permissions.folderTrust.*` sub-namespace. pub fn folder_trust(&self) -> SessionRpcPermissionsFolderTrust<'a> { - SessionRpcPermissionsFolderTrust { - session: self.session, - } + SessionRpcPermissionsFolderTrust { session: self.session } } /// `session.permissions.locations.*` sub-namespace. pub fn locations(&self) -> SessionRpcPermissionsLocations<'a> { - SessionRpcPermissionsLocations { - session: self.session, - } + SessionRpcPermissionsLocations { session: self.session } } /// `session.permissions.paths.*` sub-namespace. pub fn paths(&self) -> SessionRpcPermissionsPaths<'a> { - SessionRpcPermissionsPaths { - session: self.session, - } + SessionRpcPermissionsPaths { session: self.session } } /// `session.permissions.urls.*` sub-namespace. pub fn urls(&self) -> SessionRpcPermissionsUrls<'a> { - SessionRpcPermissionsUrls { - session: self.session, - } + SessionRpcPermissionsUrls { session: self.session } } /// Replaces selected permission policy fields (rules, paths, URLs, exclusions, allow-all flags) on the session. @@ -6811,20 +5570,10 @@ impl<'a> SessionRpcPermissions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn configure( - &self, - params: PermissionsConfigureParams, - ) -> Result { + pub async fn configure(&self, params: PermissionsConfigureParams) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_PERMISSIONS_CONFIGURE, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_CONFIGURE, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -6847,20 +5596,10 @@ impl<'a> SessionRpcPermissions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn handle_pending_permission_request( - &self, - params: PermissionDecisionRequest, - ) -> Result { + pub async fn handle_pending_permission_request(&self, params: PermissionDecisionRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_PERMISSIONS_HANDLEPENDINGPERMISSIONREQUEST, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_HANDLEPENDINGPERMISSIONREQUEST, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -6881,14 +5620,7 @@ impl<'a> SessionRpcPermissions<'a> { /// pub async fn pending_requests(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_PERMISSIONS_PENDINGREQUESTS, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_PENDINGREQUESTS, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -6911,20 +5643,10 @@ impl<'a> SessionRpcPermissions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn set_approve_all( - &self, - params: PermissionsSetApproveAllRequest, - ) -> Result { + pub async fn set_approve_all(&self, params: PermissionsSetApproveAllRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_PERMISSIONS_SETAPPROVEALL, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_SETAPPROVEALL, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -6947,20 +5669,10 @@ impl<'a> SessionRpcPermissions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn set_allow_all( - &self, - params: PermissionsSetAllowAllRequest, - ) -> Result { + pub async fn set_allow_all(&self, params: PermissionsSetAllowAllRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_PERMISSIONS_SETALLOWALL, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_SETALLOWALL, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -6981,14 +5693,7 @@ impl<'a> SessionRpcPermissions<'a> { /// pub async fn get_allow_all(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_PERMISSIONS_GETALLOWALL, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_GETALLOWALL, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -7011,20 +5716,10 @@ impl<'a> SessionRpcPermissions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn modify_rules( - &self, - params: PermissionsModifyRulesParams, - ) -> Result { + pub async fn modify_rules(&self, params: PermissionsModifyRulesParams) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_PERMISSIONS_MODIFYRULES, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_MODIFYRULES, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -7047,20 +5742,10 @@ impl<'a> SessionRpcPermissions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn set_required( - &self, - params: PermissionsSetRequiredRequest, - ) -> Result { + pub async fn set_required(&self, params: PermissionsSetRequiredRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_PERMISSIONS_SETREQUIRED, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_SETREQUIRED, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -7083,20 +5768,10 @@ impl<'a> SessionRpcPermissions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn reset_session_approvals( - &self, - params: PermissionsResetSessionApprovalsRequest, - ) -> Result { + pub async fn reset_session_approvals(&self, params: PermissionsResetSessionApprovalsRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_PERMISSIONS_RESETSESSIONAPPROVALS, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_RESETSESSIONAPPROVALS, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -7119,22 +5794,13 @@ impl<'a> SessionRpcPermissions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn notify_prompt_shown( - &self, - params: PermissionPromptShownNotification, - ) -> Result { + pub async fn notify_prompt_shown(&self, params: PermissionPromptShownNotification) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_PERMISSIONS_NOTIFYPROMPTSHOWN, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_NOTIFYPROMPTSHOWN, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.permissions.folderTrust.*` RPCs. @@ -7163,20 +5829,10 @@ impl<'a> SessionRpcPermissionsFolderTrust<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn is_trusted( - &self, - params: FolderTrustCheckParams, - ) -> Result { + pub async fn is_trusted(&self, params: FolderTrustCheckParams) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_PERMISSIONS_FOLDERTRUST_ISTRUSTED, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_FOLDERTRUST_ISTRUSTED, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -7199,22 +5855,13 @@ impl<'a> SessionRpcPermissionsFolderTrust<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn add_trusted( - &self, - params: FolderTrustAddParams, - ) -> Result { + pub async fn add_trusted(&self, params: FolderTrustAddParams) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_PERMISSIONS_FOLDERTRUST_ADDTRUSTED, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_FOLDERTRUST_ADDTRUSTED, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.permissions.locations.*` RPCs. @@ -7243,20 +5890,10 @@ impl<'a> SessionRpcPermissionsLocations<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn resolve( - &self, - params: PermissionLocationResolveParams, - ) -> Result { + pub async fn resolve(&self, params: PermissionLocationResolveParams) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_PERMISSIONS_LOCATIONS_RESOLVE, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_LOCATIONS_RESOLVE, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -7279,20 +5916,10 @@ impl<'a> SessionRpcPermissionsLocations<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn apply( - &self, - params: PermissionLocationApplyParams, - ) -> Result { + pub async fn apply(&self, params: PermissionLocationApplyParams) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_PERMISSIONS_LOCATIONS_APPLY, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_LOCATIONS_APPLY, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -7315,22 +5942,13 @@ impl<'a> SessionRpcPermissionsLocations<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn add_tool_approval( - &self, - params: PermissionLocationAddToolApprovalParams, - ) -> Result { + pub async fn add_tool_approval(&self, params: PermissionLocationAddToolApprovalParams) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_PERMISSIONS_LOCATIONS_ADDTOOLAPPROVAL, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_LOCATIONS_ADDTOOLAPPROVAL, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.permissions.paths.*` RPCs. @@ -7357,14 +5975,7 @@ impl<'a> SessionRpcPermissionsPaths<'a> { /// pub async fn list(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_PERMISSIONS_PATHS_LIST, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_PATHS_LIST, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -7387,20 +5998,10 @@ impl<'a> SessionRpcPermissionsPaths<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn add( - &self, - params: PermissionPathsAddParams, - ) -> Result { + pub async fn add(&self, params: PermissionPathsAddParams) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_PERMISSIONS_PATHS_ADD, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_PATHS_ADD, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -7423,20 +6024,10 @@ impl<'a> SessionRpcPermissionsPaths<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn update_primary( - &self, - params: PermissionPathsUpdatePrimaryParams, - ) -> Result { + pub async fn update_primary(&self, params: PermissionPathsUpdatePrimaryParams) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_PERMISSIONS_PATHS_UPDATEPRIMARY, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_PATHS_UPDATEPRIMARY, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -7459,20 +6050,10 @@ impl<'a> SessionRpcPermissionsPaths<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn is_path_within_allowed_directories( - &self, - params: PermissionPathsAllowedCheckParams, - ) -> Result { + pub async fn is_path_within_allowed_directories(&self, params: PermissionPathsAllowedCheckParams) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_PERMISSIONS_PATHS_ISPATHWITHINALLOWEDDIRECTORIES, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_PATHS_ISPATHWITHINALLOWEDDIRECTORIES, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -7495,22 +6076,13 @@ impl<'a> SessionRpcPermissionsPaths<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn is_path_within_workspace( - &self, - params: PermissionPathsWorkspaceCheckParams, - ) -> Result { + pub async fn is_path_within_workspace(&self, params: PermissionPathsWorkspaceCheckParams) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_PERMISSIONS_PATHS_ISPATHWITHINWORKSPACE, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_PATHS_ISPATHWITHINWORKSPACE, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.permissions.urls.*` RPCs. @@ -7539,22 +6111,13 @@ impl<'a> SessionRpcPermissionsUrls<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn set_unrestricted_mode( - &self, - params: PermissionUrlsSetUnrestrictedModeParams, - ) -> Result { + pub async fn set_unrestricted_mode(&self, params: PermissionUrlsSetUnrestrictedModeParams) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_PERMISSIONS_URLS_SETUNRESTRICTEDMODE, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_URLS_SETUNRESTRICTEDMODE, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.plan.*` RPCs. @@ -7581,11 +6144,7 @@ impl<'a> SessionRpcPlan<'a> { /// pub async fn read(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_PLAN_READ, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_PLAN_READ, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -7607,11 +6166,7 @@ impl<'a> SessionRpcPlan<'a> { pub async fn update(&self, params: PlanUpdateRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_PLAN_UPDATE, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_PLAN_UPDATE, Some(wire_params)).await?; Ok(()) } @@ -7628,11 +6183,7 @@ impl<'a> SessionRpcPlan<'a> { /// pub async fn delete(&self) -> Result<(), Error> { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_PLAN_DELETE, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_PLAN_DELETE, Some(wire_params)).await?; Ok(()) } @@ -7653,11 +6204,7 @@ impl<'a> SessionRpcPlan<'a> { /// pub async fn read_sql_todos(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_PLAN_READSQLTODOS, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_PLAN_READSQLTODOS, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -7676,20 +6223,12 @@ impl<'a> SessionRpcPlan<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn read_sql_todos_with_dependencies( - &self, - ) -> Result { + pub async fn read_sql_todos_with_dependencies(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_PLAN_READSQLTODOSWITHDEPENDENCIES, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_PLAN_READSQLTODOSWITHDEPENDENCIES, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.plugins.*` RPCs. @@ -7716,11 +6255,7 @@ impl<'a> SessionRpcPlugins<'a> { /// pub async fn list(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_PLUGINS_LIST, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_PLUGINS_LIST, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -7737,11 +6272,7 @@ impl<'a> SessionRpcPlugins<'a> { /// pub async fn reload(&self) -> Result<(), Error> { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_PLUGINS_RELOAD, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_PLUGINS_RELOAD, Some(wire_params)).await?; Ok(()) } @@ -7763,13 +6294,10 @@ impl<'a> SessionRpcPlugins<'a> { pub async fn reload_with_params(&self, params: PluginsReloadRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_PLUGINS_RELOAD, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_PLUGINS_RELOAD, Some(wire_params)).await?; Ok(()) } + } /// `session.provider.*` RPCs. @@ -7796,11 +6324,7 @@ impl<'a> SessionRpcProvider<'a> { /// pub async fn get_endpoint(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_PROVIDER_GETENDPOINT, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_PROVIDER_GETENDPOINT, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -7823,17 +6347,10 @@ impl<'a> SessionRpcProvider<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn get_endpoint_with_params( - &self, - params: ProviderGetEndpointRequest, - ) -> Result { + pub async fn get_endpoint_with_params(&self, params: ProviderGetEndpointRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_PROVIDER_GETENDPOINT, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_PROVIDER_GETENDPOINT, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -7859,13 +6376,10 @@ impl<'a> SessionRpcProvider<'a> { pub async fn add(&self, params: ProviderAddRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_PROVIDER_ADD, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_PROVIDER_ADD, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.queue.*` RPCs. @@ -7892,11 +6406,7 @@ impl<'a> SessionRpcQueue<'a> { /// pub async fn pending_items(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_QUEUE_PENDINGITEMS, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_QUEUE_PENDINGITEMS, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -7917,11 +6427,7 @@ impl<'a> SessionRpcQueue<'a> { /// pub(crate) async fn snapshot(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_QUEUE_SNAPSHOT, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_QUEUE_SNAPSHOT, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -7944,17 +6450,10 @@ impl<'a> SessionRpcQueue<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn move_item( - &self, - params: QueueMoveItemRequest, - ) -> Result { + pub async fn move_item(&self, params: QueueMoveItemRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_QUEUE_MOVEITEM, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_QUEUE_MOVEITEM, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -7977,17 +6476,10 @@ impl<'a> SessionRpcQueue<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn insert_at( - &self, - params: QueueInsertAtRequest, - ) -> Result { + pub async fn insert_at(&self, params: QueueInsertAtRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_QUEUE_INSERTAT, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_QUEUE_INSERTAT, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -8010,17 +6502,10 @@ impl<'a> SessionRpcQueue<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn remove_at( - &self, - params: QueueRemoveAtRequest, - ) -> Result { + pub async fn remove_at(&self, params: QueueRemoveAtRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_QUEUE_REMOVEAT, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_QUEUE_REMOVEAT, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -8043,17 +6528,10 @@ impl<'a> SessionRpcQueue<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn update_text( - &self, - params: QueueUpdateTextRequest, - ) -> Result { + pub async fn update_text(&self, params: QueueUpdateTextRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_QUEUE_UPDATETEXT, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_QUEUE_UPDATETEXT, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -8076,17 +6554,10 @@ impl<'a> SessionRpcQueue<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn duplicate_at( - &self, - params: QueueDuplicateAtRequest, - ) -> Result { + pub async fn duplicate_at(&self, params: QueueDuplicateAtRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_QUEUE_DUPLICATEAT, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_QUEUE_DUPLICATEAT, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -8108,11 +6579,7 @@ impl<'a> SessionRpcQueue<'a> { pub async fn set_drain_paused(&self, params: QueueSetDrainPausedRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_QUEUE_SETDRAINPAUSED, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_QUEUE_SETDRAINPAUSED, Some(wire_params)).await?; Ok(()) } @@ -8138,11 +6605,7 @@ impl<'a> SessionRpcQueue<'a> { pub async fn send_now(&self, params: QueueSendNowRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_QUEUE_SENDNOW, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_QUEUE_SENDNOW, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -8163,11 +6626,7 @@ impl<'a> SessionRpcQueue<'a> { /// pub(crate) async fn has_pending(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_QUEUE_HASPENDING, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_QUEUE_HASPENDING, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -8190,20 +6649,10 @@ impl<'a> SessionRpcQueue<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn begin_deferred_idle_drain( - &self, - params: QueueBeginDeferredIdleDrainRequest, - ) -> Result { + pub(crate) async fn begin_deferred_idle_drain(&self, params: QueueBeginDeferredIdleDrainRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_QUEUE_BEGINDEFERREDIDLEDRAIN, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_QUEUE_BEGINDEFERREDIDLEDRAIN, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -8226,20 +6675,10 @@ impl<'a> SessionRpcQueue<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn finish_deferred_idle_drain( - &self, - params: QueueFinishDeferredIdleDrainRequest, - ) -> Result { + pub(crate) async fn finish_deferred_idle_drain(&self, params: QueueFinishDeferredIdleDrainRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_QUEUE_FINISHDEFERREDIDLEDRAIN, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_QUEUE_FINISHDEFERREDIDLEDRAIN, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -8258,20 +6697,10 @@ impl<'a> SessionRpcQueue<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn defer_session_idle( - &self, - params: QueueDeferSessionIdleRequest, - ) -> Result<(), Error> { + pub(crate) async fn defer_session_idle(&self, params: QueueDeferSessionIdleRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_QUEUE_DEFERSESSIONIDLE, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_QUEUE_DEFERSESSIONIDLE, Some(wire_params)).await?; Ok(()) } @@ -8292,14 +6721,7 @@ impl<'a> SessionRpcQueue<'a> { /// pub async fn remove_most_recent(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_QUEUE_REMOVEMOSTRECENT, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_QUEUE_REMOVEMOSTRECENT, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -8316,11 +6738,7 @@ impl<'a> SessionRpcQueue<'a> { /// pub async fn clear(&self) -> Result<(), Error> { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_QUEUE_CLEAR, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_QUEUE_CLEAR, Some(wire_params)).await?; Ok(()) } @@ -8343,20 +6761,10 @@ impl<'a> SessionRpcQueue<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn consume_system_notifications( - &self, - params: QueueConsumeSystemNotificationsRequest, - ) -> Result { + pub(crate) async fn consume_system_notifications(&self, params: QueueConsumeSystemNotificationsRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_QUEUE_CONSUMESYSTEMNOTIFICATIONS, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_QUEUE_CONSUMESYSTEMNOTIFICATIONS, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -8375,18 +6783,9 @@ impl<'a> SessionRpcQueue<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn enqueue_resume_pending( - &self, - ) -> Result { + pub(crate) async fn enqueue_resume_pending(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_QUEUE_ENQUEUERESUMEPENDING, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_QUEUE_ENQUEUERESUMEPENDING, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -8403,13 +6802,10 @@ impl<'a> SessionRpcQueue<'a> { /// pub(crate) async fn process(&self) -> Result<(), Error> { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_QUEUE_PROCESS, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_QUEUE_PROCESS, Some(wire_params)).await?; Ok(()) } + } /// `session.remote.*` RPCs. @@ -8441,11 +6837,7 @@ impl<'a> SessionRpcRemote<'a> { pub async fn enable(&self, params: RemoteEnableRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_REMOTE_ENABLE, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_REMOTE_ENABLE, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -8462,11 +6854,7 @@ impl<'a> SessionRpcRemote<'a> { /// pub async fn disable(&self) -> Result<(), Error> { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_REMOTE_DISABLE, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_REMOTE_DISABLE, Some(wire_params)).await?; Ok(()) } @@ -8489,22 +6877,13 @@ impl<'a> SessionRpcRemote<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn notify_steerable_changed( - &self, - params: RemoteNotifySteerableChangedRequest, - ) -> Result { + pub async fn notify_steerable_changed(&self, params: RemoteNotifySteerableChangedRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_REMOTE_NOTIFYSTEERABLECHANGED, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_REMOTE_NOTIFYSTEERABLECHANGED, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.schedule.*` RPCs. @@ -8531,11 +6910,7 @@ impl<'a> SessionRpcSchedule<'a> { /// pub async fn list(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_SCHEDULE_LIST, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_SCHEDULE_LIST, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -8552,11 +6927,7 @@ impl<'a> SessionRpcSchedule<'a> { /// pub(crate) async fn hydrate(&self) -> Result<(), Error> { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_SCHEDULE_HYDRATE, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_SCHEDULE_HYDRATE, Some(wire_params)).await?; Ok(()) } @@ -8577,14 +6948,7 @@ impl<'a> SessionRpcSchedule<'a> { /// pub(crate) async fn has_self_paced(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_SCHEDULE_HASSELFPACED, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_SCHEDULE_HASSELFPACED, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -8610,11 +6974,7 @@ impl<'a> SessionRpcSchedule<'a> { pub(crate) async fn add(&self, params: ScheduleAddRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_SCHEDULE_ADD, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_SCHEDULE_ADD, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -8637,17 +6997,10 @@ impl<'a> SessionRpcSchedule<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn add_cron( - &self, - params: ScheduleAddCronRequest, - ) -> Result { + pub(crate) async fn add_cron(&self, params: ScheduleAddCronRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_SCHEDULE_ADDCRON, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_SCHEDULE_ADDCRON, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -8670,17 +7023,10 @@ impl<'a> SessionRpcSchedule<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn add_at( - &self, - params: ScheduleAddAtRequest, - ) -> Result { + pub(crate) async fn add_at(&self, params: ScheduleAddAtRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_SCHEDULE_ADDAT, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_SCHEDULE_ADDAT, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -8703,20 +7049,10 @@ impl<'a> SessionRpcSchedule<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn add_self_paced( - &self, - params: ScheduleAddSelfPacedRequest, - ) -> Result { + pub(crate) async fn add_self_paced(&self, params: ScheduleAddSelfPacedRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_SCHEDULE_ADDSELFPACED, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_SCHEDULE_ADDSELFPACED, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -8739,20 +7075,10 @@ impl<'a> SessionRpcSchedule<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn rearm_self_paced( - &self, - params: ScheduleRearmSelfPacedRequest, - ) -> Result { + pub(crate) async fn rearm_self_paced(&self, params: ScheduleRearmSelfPacedRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_SCHEDULE_REARMSELFPACED, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_SCHEDULE_REARMSELFPACED, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -8778,13 +7104,10 @@ impl<'a> SessionRpcSchedule<'a> { pub async fn stop(&self, params: ScheduleStopRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_SCHEDULE_STOP, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_SCHEDULE_STOP, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.settings.*` RPCs. @@ -8811,11 +7134,7 @@ impl<'a> SessionRpcSettings<'a> { /// pub(crate) async fn snapshot(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_SETTINGS_SNAPSHOT, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_SETTINGS_SNAPSHOT, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -8838,22 +7157,13 @@ impl<'a> SessionRpcSettings<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn evaluate_predicate( - &self, - params: SessionSettingsEvaluatePredicateRequest, - ) -> Result { + pub(crate) async fn evaluate_predicate(&self, params: SessionSettingsEvaluatePredicateRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_SETTINGS_EVALUATEPREDICATE, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_SETTINGS_EVALUATEPREDICATE, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.shell.*` RPCs. @@ -8885,11 +7195,7 @@ impl<'a> SessionRpcShell<'a> { pub async fn exec(&self, params: ShellExecRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_SHELL_EXEC, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_SHELL_EXEC, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -8915,11 +7221,7 @@ impl<'a> SessionRpcShell<'a> { pub async fn kill(&self, params: ShellKillRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_SHELL_KILL, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_SHELL_KILL, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -8942,20 +7244,10 @@ impl<'a> SessionRpcShell<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn execute_user_requested( - &self, - params: ShellExecuteUserRequestedRequest, - ) -> Result { + pub async fn execute_user_requested(&self, params: ShellExecuteUserRequestedRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_SHELL_EXECUTEUSERREQUESTED, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_SHELL_EXECUTEUSERREQUESTED, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -8978,22 +7270,13 @@ impl<'a> SessionRpcShell<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn cancel_user_requested( - &self, - params: ShellCancelUserRequestedRequest, - ) -> Result { + pub async fn cancel_user_requested(&self, params: ShellCancelUserRequestedRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_SHELL_CANCELUSERREQUESTED, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_SHELL_CANCELUSERREQUESTED, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.skills.*` RPCs. @@ -9020,11 +7303,7 @@ impl<'a> SessionRpcSkills<'a> { /// pub async fn list(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_SKILLS_LIST, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_SKILLS_LIST, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -9045,11 +7324,7 @@ impl<'a> SessionRpcSkills<'a> { /// pub async fn get_invoked(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_SKILLS_GETINVOKED, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_SKILLS_GETINVOKED, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -9071,11 +7346,7 @@ impl<'a> SessionRpcSkills<'a> { pub async fn enable(&self, params: SkillsEnableRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_SKILLS_ENABLE, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_SKILLS_ENABLE, Some(wire_params)).await?; Ok(()) } @@ -9097,11 +7368,7 @@ impl<'a> SessionRpcSkills<'a> { pub async fn disable(&self, params: SkillsDisableRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_SKILLS_DISABLE, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_SKILLS_DISABLE, Some(wire_params)).await?; Ok(()) } @@ -9122,11 +7389,7 @@ impl<'a> SessionRpcSkills<'a> { /// pub async fn reload(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_SKILLS_RELOAD, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_SKILLS_RELOAD, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -9143,13 +7406,10 @@ impl<'a> SessionRpcSkills<'a> { /// pub async fn ensure_loaded(&self) -> Result<(), Error> { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_SKILLS_ENSURELOADED, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_SKILLS_ENSURELOADED, Some(wire_params)).await?; Ok(()) } + } /// `session.tasks.*` RPCs. @@ -9178,17 +7438,10 @@ impl<'a> SessionRpcTasks<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn start_agent( - &self, - params: TasksStartAgentRequest, - ) -> Result { + pub async fn start_agent(&self, params: TasksStartAgentRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_TASKS_STARTAGENT, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_TASKS_STARTAGENT, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -9209,11 +7462,7 @@ impl<'a> SessionRpcTasks<'a> { /// pub async fn list(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_TASKS_LIST, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_TASKS_LIST, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -9234,11 +7483,7 @@ impl<'a> SessionRpcTasks<'a> { /// pub async fn refresh(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_TASKS_REFRESH, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_TASKS_REFRESH, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -9259,11 +7504,7 @@ impl<'a> SessionRpcTasks<'a> { /// pub async fn wait_for_pending(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_TASKS_WAITFORPENDING, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_TASKS_WAITFORPENDING, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -9286,17 +7527,10 @@ impl<'a> SessionRpcTasks<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn get_progress( - &self, - params: TasksGetProgressRequest, - ) -> Result { + pub async fn get_progress(&self, params: TasksGetProgressRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_TASKS_GETPROGRESS, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_TASKS_GETPROGRESS, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -9317,14 +7551,7 @@ impl<'a> SessionRpcTasks<'a> { /// pub async fn get_current_promotable(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_TASKS_GETCURRENTPROMOTABLE, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_TASKS_GETCURRENTPROMOTABLE, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -9347,20 +7574,10 @@ impl<'a> SessionRpcTasks<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn promote_to_background( - &self, - params: TasksPromoteToBackgroundRequest, - ) -> Result { + pub async fn promote_to_background(&self, params: TasksPromoteToBackgroundRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_TASKS_PROMOTETOBACKGROUND, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_TASKS_PROMOTETOBACKGROUND, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -9379,18 +7596,9 @@ impl<'a> SessionRpcTasks<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn promote_current_to_background( - &self, - ) -> Result { + pub async fn promote_current_to_background(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_TASKS_PROMOTECURRENTTOBACKGROUND, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_TASKS_PROMOTECURRENTTOBACKGROUND, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -9416,11 +7624,7 @@ impl<'a> SessionRpcTasks<'a> { pub async fn cancel(&self, params: TasksCancelRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_TASKS_CANCEL, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_TASKS_CANCEL, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -9446,11 +7650,7 @@ impl<'a> SessionRpcTasks<'a> { pub async fn remove(&self, params: TasksRemoveRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_TASKS_REMOVE, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_TASKS_REMOVE, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -9473,19 +7673,13 @@ impl<'a> SessionRpcTasks<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn send_message( - &self, - params: TasksSendMessageRequest, - ) -> Result { + pub async fn send_message(&self, params: TasksSendMessageRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_TASKS_SENDMESSAGE, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_TASKS_SENDMESSAGE, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.telemetry.*` RPCs. @@ -9512,14 +7706,7 @@ impl<'a> SessionRpcTelemetry<'a> { /// pub async fn get_engagement_id(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_TELEMETRY_GETENGAGEMENTID, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_TELEMETRY_GETENGAGEMENTID, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -9538,22 +7725,13 @@ impl<'a> SessionRpcTelemetry<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn set_feature_overrides( - &self, - params: TelemetrySetFeatureOverridesRequest, - ) -> Result<(), Error> { + pub async fn set_feature_overrides(&self, params: TelemetrySetFeatureOverridesRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_TELEMETRY_SETFEATUREOVERRIDES, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_TELEMETRY_SETFEATUREOVERRIDES, Some(wire_params)).await?; Ok(()) } + } /// `session.tools.*` RPCs. @@ -9582,20 +7760,10 @@ impl<'a> SessionRpcTools<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn handle_pending_tool_call( - &self, - params: HandlePendingToolCallRequest, - ) -> Result { + pub async fn handle_pending_tool_call(&self, params: HandlePendingToolCallRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_TOOLS_HANDLEPENDINGTOOLCALL, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_TOOLS_HANDLEPENDINGTOOLCALL, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -9616,14 +7784,7 @@ impl<'a> SessionRpcTools<'a> { /// pub async fn initialize_and_validate(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_TOOLS_INITIALIZEANDVALIDATE, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_TOOLS_INITIALIZEANDVALIDATE, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -9644,14 +7805,7 @@ impl<'a> SessionRpcTools<'a> { /// pub async fn get_current_metadata(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_TOOLS_GETCURRENTMETADATA, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_TOOLS_GETCURRENTMETADATA, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -9674,22 +7828,13 @@ impl<'a> SessionRpcTools<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn update_subagent_settings( - &self, - params: UpdateSubagentSettingsRequest, - ) -> Result { + pub async fn update_subagent_settings(&self, params: UpdateSubagentSettingsRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_TOOLS_UPDATESUBAGENTSETTINGS, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_TOOLS_UPDATESUBAGENTSETTINGS, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.ui.*` RPCs. @@ -9718,17 +7863,10 @@ impl<'a> SessionRpcUi<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn ephemeral_query( - &self, - params: UIEphemeralQueryRequest, - ) -> Result { + pub async fn ephemeral_query(&self, params: UIEphemeralQueryRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_UI_EPHEMERALQUERY, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_UI_EPHEMERALQUERY, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -9751,17 +7889,10 @@ impl<'a> SessionRpcUi<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn elicitation( - &self, - params: UIElicitationRequest, - ) -> Result { + pub async fn elicitation(&self, params: UIElicitationRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_UI_ELICITATION, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_UI_ELICITATION, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -9784,20 +7915,10 @@ impl<'a> SessionRpcUi<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn handle_pending_elicitation( - &self, - params: UIHandlePendingElicitationRequest, - ) -> Result { + pub async fn handle_pending_elicitation(&self, params: UIHandlePendingElicitationRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_UI_HANDLEPENDINGELICITATION, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_UI_HANDLEPENDINGELICITATION, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -9820,20 +7941,10 @@ impl<'a> SessionRpcUi<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn handle_pending_user_input( - &self, - params: UIHandlePendingUserInputRequest, - ) -> Result { + pub async fn handle_pending_user_input(&self, params: UIHandlePendingUserInputRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_UI_HANDLEPENDINGUSERINPUT, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_UI_HANDLEPENDINGUSERINPUT, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -9856,20 +7967,10 @@ impl<'a> SessionRpcUi<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn handle_pending_sampling( - &self, - params: UIHandlePendingSamplingRequest, - ) -> Result { + pub async fn handle_pending_sampling(&self, params: UIHandlePendingSamplingRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_UI_HANDLEPENDINGSAMPLING, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_UI_HANDLEPENDINGSAMPLING, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -9892,20 +7993,10 @@ impl<'a> SessionRpcUi<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn handle_pending_auto_mode_switch( - &self, - params: UIHandlePendingAutoModeSwitchRequest, - ) -> Result { + pub async fn handle_pending_auto_mode_switch(&self, params: UIHandlePendingAutoModeSwitchRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_UI_HANDLEPENDINGAUTOMODESWITCH, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_UI_HANDLEPENDINGAUTOMODESWITCH, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -9928,20 +8019,10 @@ impl<'a> SessionRpcUi<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn handle_pending_session_limits_exhausted( - &self, - params: UIHandlePendingSessionLimitsExhaustedRequest, - ) -> Result { + pub async fn handle_pending_session_limits_exhausted(&self, params: UIHandlePendingSessionLimitsExhaustedRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_UI_HANDLEPENDINGSESSIONLIMITSEXHAUSTED, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_UI_HANDLEPENDINGSESSIONLIMITSEXHAUSTED, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -9964,20 +8045,10 @@ impl<'a> SessionRpcUi<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn handle_pending_exit_plan_mode( - &self, - params: UIHandlePendingExitPlanModeRequest, - ) -> Result { + pub async fn handle_pending_exit_plan_mode(&self, params: UIHandlePendingExitPlanModeRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_UI_HANDLEPENDINGEXITPLANMODE, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_UI_HANDLEPENDINGEXITPLANMODE, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -9996,18 +8067,9 @@ impl<'a> SessionRpcUi<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn register_direct_auto_mode_switch_handler( - &self, - ) -> Result { + pub async fn register_direct_auto_mode_switch_handler(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_UI_REGISTERDIRECTAUTOMODESWITCHHANDLER, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_UI_REGISTERDIRECTAUTOMODESWITCHHANDLER, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -10030,22 +8092,13 @@ impl<'a> SessionRpcUi<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn unregister_direct_auto_mode_switch_handler( - &self, - params: UIUnregisterDirectAutoModeSwitchHandlerRequest, - ) -> Result { + pub async fn unregister_direct_auto_mode_switch_handler(&self, params: UIUnregisterDirectAutoModeSwitchHandlerRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_UI_UNREGISTERDIRECTAUTOMODESWITCHHANDLER, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_UI_UNREGISTERDIRECTAUTOMODESWITCHHANDLER, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.usage.*` RPCs. @@ -10072,13 +8125,10 @@ impl<'a> SessionRpcUsage<'a> { /// pub async fn get_metrics(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_USAGE_GETMETRICS, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_USAGE_GETMETRICS, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.visibility.*` RPCs. @@ -10105,11 +8155,7 @@ impl<'a> SessionRpcVisibility<'a> { /// pub async fn get(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_VISIBILITY_GET, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_VISIBILITY_GET, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -10135,13 +8181,10 @@ impl<'a> SessionRpcVisibility<'a> { pub async fn set(&self, params: VisibilitySetRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_VISIBILITY_SET, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_VISIBILITY_SET, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } /// `session.workspaces.*` RPCs. @@ -10168,14 +8211,7 @@ impl<'a> SessionRpcWorkspaces<'a> { /// pub async fn get_workspace(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_WORKSPACES_GETWORKSPACE, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_WORKSPACES_GETWORKSPACE, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -10198,20 +8234,10 @@ impl<'a> SessionRpcWorkspaces<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn update_metadata( - &self, - params: WorkspacesUpdateMetadataRequest, - ) -> Result { + pub async fn update_metadata(&self, params: WorkspacesUpdateMetadataRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_WORKSPACES_UPDATEMETADATA, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_WORKSPACES_UPDATEMETADATA, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -10234,17 +8260,10 @@ impl<'a> SessionRpcWorkspaces<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn ensure( - &self, - params: WorkspacesEnsureRequest, - ) -> Result { + pub async fn ensure(&self, params: WorkspacesEnsureRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_WORKSPACES_ENSURE, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_WORKSPACES_ENSURE, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -10265,11 +8284,7 @@ impl<'a> SessionRpcWorkspaces<'a> { /// pub async fn list_files(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_WORKSPACES_LISTFILES, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_WORKSPACES_LISTFILES, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -10292,17 +8307,10 @@ impl<'a> SessionRpcWorkspaces<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn read_file( - &self, - params: WorkspacesReadFileRequest, - ) -> Result { + pub async fn read_file(&self, params: WorkspacesReadFileRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_WORKSPACES_READFILE, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_WORKSPACES_READFILE, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -10324,14 +8332,7 @@ impl<'a> SessionRpcWorkspaces<'a> { pub async fn create_file(&self, params: WorkspacesCreateFileRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_WORKSPACES_CREATEFILE, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_WORKSPACES_CREATEFILE, Some(wire_params)).await?; Ok(()) } @@ -10352,14 +8353,7 @@ impl<'a> SessionRpcWorkspaces<'a> { /// pub async fn list_checkpoints(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_WORKSPACES_LISTCHECKPOINTS, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_WORKSPACES_LISTCHECKPOINTS, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -10382,20 +8376,10 @@ impl<'a> SessionRpcWorkspaces<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn read_checkpoint( - &self, - params: WorkspacesReadCheckpointRequest, - ) -> Result { + pub async fn read_checkpoint(&self, params: WorkspacesReadCheckpointRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_WORKSPACES_READCHECKPOINT, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_WORKSPACES_READCHECKPOINT, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -10418,20 +8402,10 @@ impl<'a> SessionRpcWorkspaces<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn add_summary( - &self, - params: WorkspacesAddSummaryRequest, - ) -> Result { + pub async fn add_summary(&self, params: WorkspacesAddSummaryRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_WORKSPACES_ADDSUMMARY, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_WORKSPACES_ADDSUMMARY, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -10454,20 +8428,10 @@ impl<'a> SessionRpcWorkspaces<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn truncate_summaries( - &self, - params: WorkspacesTruncateSummariesRequest, - ) -> Result { + pub async fn truncate_summaries(&self, params: WorkspacesTruncateSummariesRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_WORKSPACES_TRUNCATESUMMARIES, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_WORKSPACES_TRUNCATESUMMARIES, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -10486,18 +8450,9 @@ impl<'a> SessionRpcWorkspaces<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn read_autopilot_objective( - &self, - ) -> Result { + pub async fn read_autopilot_objective(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_WORKSPACES_READAUTOPILOTOBJECTIVE, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_WORKSPACES_READAUTOPILOTOBJECTIVE, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -10520,20 +8475,10 @@ impl<'a> SessionRpcWorkspaces<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn write_autopilot_objective( - &self, - params: WorkspacesWriteAutopilotObjectiveRequest, - ) -> Result { + pub async fn write_autopilot_objective(&self, params: WorkspacesWriteAutopilotObjectiveRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_WORKSPACES_WRITEAUTOPILOTOBJECTIVE, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_WORKSPACES_WRITEAUTOPILOTOBJECTIVE, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -10552,18 +8497,9 @@ impl<'a> SessionRpcWorkspaces<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn delete_autopilot_objective( - &self, - ) -> Result { + pub async fn delete_autopilot_objective(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_WORKSPACES_DELETEAUTOPILOTOBJECTIVE, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_WORKSPACES_DELETEAUTOPILOTOBJECTIVE, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -10582,18 +8518,9 @@ impl<'a> SessionRpcWorkspaces<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn autopilot_objective_exists( - &self, - ) -> Result { + pub async fn autopilot_objective_exists(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_WORKSPACES_AUTOPILOTOBJECTIVEEXISTS, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_WORKSPACES_AUTOPILOTOBJECTIVEEXISTS, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -10616,20 +8543,10 @@ impl<'a> SessionRpcWorkspaces<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn save_large_paste( - &self, - params: WorkspacesSaveLargePasteRequest, - ) -> Result { + pub async fn save_large_paste(&self, params: WorkspacesSaveLargePasteRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call( - rpc_methods::SESSION_WORKSPACES_SAVELARGEPASTE, - Some(wire_params), - ) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_WORKSPACES_SAVELARGEPASTE, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } @@ -10655,11 +8572,8 @@ impl<'a> SessionRpcWorkspaces<'a> { pub async fn diff(&self, params: WorkspacesDiffRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self - .session - .client() - .call(rpc_methods::SESSION_WORKSPACES_DIFF, Some(wire_params)) - .await?; + let _value = self.session.client().call(rpc_methods::SESSION_WORKSPACES_DIFF, Some(wire_params)).await?; Ok(serde_json::from_value(_value)?) } + } diff --git a/rust/src/generated/session_events.rs b/rust/src/generated/session_events.rs index 232955ea39..893c178033 100644 --- a/rust/src/generated/session_events.rs +++ b/rust/src/generated/session_events.rs @@ -1033,7 +1033,8 @@ pub struct SessionPlanChangedData { /// Session event "session.todos_changed". Signal-only event: the agent's todos or todo_deps table was written to. No payload — clients should call session.plan.readSqlTodosWithDependencies() to fetch the current state. Events arrive in order; clients can debounce on arrival if needed. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionTodosChangedData {} +pub struct SessionTodosChangedData { +} /// Session event "session.workspace_file_changed". Workspace file change details including path and operation type #[derive(Debug, Clone, Default, Serialize, Deserialize)] @@ -1396,8 +1397,7 @@ pub(crate) struct CompactionCompleteCompactionTokensUsedCopilotUsage { /// Itemized token usage breakdown #[doc(hidden)] #[serde(skip_serializing_if = "Option::is_none")] - pub(crate) token_details: - Option>, + pub(crate) token_details: Option>, /// Total cost in nano-AI units for this request pub total_nano_aiu: f64, } @@ -1557,7 +1557,8 @@ pub struct UserMessageData { /// Session event "pending_messages.modified". Empty payload; the event signals that the pending message queue has changed #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct PendingMessagesModifiedData {} +pub struct PendingMessagesModifiedData { +} /// Session event "assistant.turn_start". Turn initialization metadata including identifier and interaction tracking #[derive(Debug, Clone, Default, Serialize, Deserialize)] @@ -2506,22 +2507,26 @@ pub struct ToolExecutionCompleteUIResourceMetaUICsp { /// Marker object for camera permission on an MCP Apps UI resource. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct ToolExecutionCompleteUIResourceMetaUIPermissionsCamera {} +pub struct ToolExecutionCompleteUIResourceMetaUIPermissionsCamera { +} /// Marker object for clipboard-write permission on an MCP Apps UI resource. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite {} +pub struct ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite { +} /// Marker object for geolocation permission on an MCP Apps UI resource. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation {} +pub struct ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation { +} /// Marker object for microphone permission on an MCP Apps UI resource. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone {} +pub struct ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone { +} /// Browser permission metadata for an MCP Apps UI resource, including camera, microphone, geolocation, and clipboard-write. #[derive(Debug, Clone, Default, Serialize, Deserialize)] @@ -2849,7 +2854,8 @@ pub struct SubagentSelectedData { /// Session event "subagent.deselected". Empty payload; the event signals that the custom agent was deselected, returning to the default agent #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SubagentDeselectedData {} +pub struct SubagentDeselectedData { +} /// Session event "hook.start". Hook invocation start details including type and input data #[derive(Debug, Clone, Default, Serialize, Deserialize)] @@ -3017,7 +3023,7 @@ pub struct PermissionRequestShell { pub intention: String, /// Permission kind discriminator pub kind: PermissionRequestShellKind, - /// When true, managed policy requires an explicit user decision and automatic approval must be bypassed. + /// Whether managed policy requires a human response and forbids host auto-approval #[serde(skip_serializing_if = "Option::is_none")] pub managed_approval_required: Option, /// File paths that may be read or written by the command @@ -3052,7 +3058,7 @@ pub struct PermissionRequestWrite { pub intention: String, /// Permission kind discriminator pub kind: PermissionRequestWriteKind, - /// When true, managed policy requires an explicit user decision and automatic approval must be bypassed. + /// Whether managed policy requires a human response and forbids host auto-approval #[serde(skip_serializing_if = "Option::is_none")] pub managed_approval_required: Option, /// Complete new file contents for newly created files @@ -3077,7 +3083,7 @@ pub struct PermissionRequestRead { pub intention: String, /// Permission kind discriminator pub kind: PermissionRequestReadKind, - /// When true, managed policy requires an explicit user decision and automatic approval must be bypassed. + /// Whether managed policy requires a human response and forbids host auto-approval #[serde(skip_serializing_if = "Option::is_none")] pub managed_approval_required: Option, /// Path of the file or directory being read @@ -3126,7 +3132,7 @@ pub struct PermissionRequestUrl { pub intention: String, /// Permission kind discriminator pub kind: PermissionRequestUrlKind, - /// When true, managed policy requires an explicit user decision and automatic approval must be bypassed. + /// Whether managed policy requires a human response and forbids host auto-approval #[serde(skip_serializing_if = "Option::is_none")] pub managed_approval_required: Option, /// Immediately preceding URL when this request is for a redirect target @@ -4400,7 +4406,8 @@ pub struct SessionToolsUpdatedData { /// Session event "session.background_tasks_changed". Empty payload for `session.background_tasks_changed`, indicating background task state changed. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionBackgroundTasksChangedData {} +pub struct SessionBackgroundTasksChangedData { +} /// Session event "factory.run_updated". Ephemeral invalidation signal for a changed factory run. /// @@ -5912,9 +5919,7 @@ pub enum PermissionResult { ApprovedForLocation(PermissionApprovedForLocation), Cancelled(PermissionCancelled), DeniedByRules(PermissionDeniedByRules), - DeniedNoApprovalRuleAndCouldNotRequestFromUser( - PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser, - ), + DeniedNoApprovalRuleAndCouldNotRequestFromUser(PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser), DeniedInteractivelyByUser(PermissionDeniedInteractivelyByUser), DeniedByContentExclusionPolicy(PermissionDeniedByContentExclusionPolicy), DeniedByPermissionRequestHook(PermissionDeniedByPermissionRequestHook), From eec1b5faf8ee96f8f72199dd9dae62d573aeb945 Mon Sep 17 00:00:00 2001 From: GitHub Copilot Date: Fri, 31 Jul 2026 15:06:27 +0000 Subject: [PATCH 32/41] Regenerate managed approval outputs Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- dotnet/src/Generated/SessionEvents.cs | 8 +- go/rpc/zrpc.go | 831 +++--- go/rpc/zrpc_encoding.go | 644 ++--- go/rpc/zsession_encoding.go | 225 +- go/rpc/zsession_events.go | 713 +++--- go/zsession_events.go | 1446 +++++------ rust/src/generated/api_types.rs | 335 ++- rust/src/generated/rpc.rs | 3336 ++++++++++++++++++++----- rust/src/generated/session_events.rs | 31 +- scripts/codegen/csharp.ts | 4 +- 10 files changed, 5032 insertions(+), 2541 deletions(-) diff --git a/dotnet/src/Generated/SessionEvents.cs b/dotnet/src/Generated/SessionEvents.cs index 5f89d3195a..6777cd2732 100644 --- a/dotnet/src/Generated/SessionEvents.cs +++ b/dotnet/src/Generated/SessionEvents.cs @@ -6959,7 +6959,7 @@ public sealed partial class PermissionRequestShell : PermissionRequest ///

Whether managed policy requires a human response and forbids host auto-approval. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("managedApprovalRequired")] - public bool? ManagedApprovalRequired { get; set; } + public new bool? ManagedApprovalRequired { get; set; } /// File paths that may be read or written by the command. [JsonPropertyName("possiblePaths")] @@ -7017,7 +7017,7 @@ public sealed partial class PermissionRequestWrite : PermissionRequest /// Whether managed policy requires a human response and forbids host auto-approval. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("managedApprovalRequired")] - public bool? ManagedApprovalRequired { get; set; } + public new bool? ManagedApprovalRequired { get; set; } /// Complete new file contents for newly created files. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] @@ -7055,7 +7055,7 @@ public sealed partial class PermissionRequestRead : PermissionRequest /// Whether managed policy requires a human response and forbids host auto-approval. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("managedApprovalRequired")] - public bool? ManagedApprovalRequired { get; set; } + public new bool? ManagedApprovalRequired { get; set; } /// Path of the file or directory being read. [JsonPropertyName("path")] @@ -7127,7 +7127,7 @@ public sealed partial class PermissionRequestUrl : PermissionRequest /// Whether managed policy requires a human response and forbids host auto-approval. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("managedApprovalRequired")] - public bool? ManagedApprovalRequired { get; set; } + public new bool? ManagedApprovalRequired { get; set; } /// Immediately preceding URL when this request is for a redirect target. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] diff --git a/go/rpc/zrpc.go b/go/rpc/zrpc.go index 25af6a9df6..341eb6f617 100644 --- a/go/rpc/zrpc.go +++ b/go/rpc/zrpc.go @@ -6,10 +6,10 @@ package rpc import ( "context" "encoding/json" - "time" "errors" "fmt" "github.com/github/copilot-sdk/go/internal/jsonrpc2" + "time" ) // Parameters for aborting the current turn @@ -322,6 +322,7 @@ func (RawAgentRegistrySpawnResultData) agentRegistrySpawnResult() {} func (r RawAgentRegistrySpawnResultData) Kind() AgentRegistrySpawnResultKind { return r.Discriminator } + // `child_process.spawn` itself failed before the child entered the registry. // Experimental: AgentRegistrySpawnError is part of an experimental API and may change or be // removed. @@ -336,6 +337,7 @@ func (AgentRegistrySpawnError) agentRegistrySpawnResult() {} func (AgentRegistrySpawnError) Kind() AgentRegistrySpawnResultKind { return AgentRegistrySpawnResultKindSpawnError } + // Spawn succeeded but the child did not publish a matching managed-server entry within the // timeout. // Experimental: AgentRegistrySpawnRegistryTimeout is part of an experimental API and may @@ -351,6 +353,7 @@ func (AgentRegistrySpawnRegistryTimeout) agentRegistrySpawnResult() {} func (AgentRegistrySpawnRegistryTimeout) Kind() AgentRegistrySpawnResultKind { return AgentRegistrySpawnResultKindRegistryTimeout } + // Managed-server child was spawned and registered successfully. // Experimental: AgentRegistrySpawnSpawned is part of an experimental API and may change or // be removed. @@ -374,6 +377,7 @@ func (AgentRegistrySpawnSpawned) agentRegistrySpawnResult() {} func (AgentRegistrySpawnSpawned) Kind() AgentRegistrySpawnResultKind { return AgentRegistrySpawnResultKindSpawned } + // Synchronous pre-validation rejected the spawn request. // Experimental: AgentRegistrySpawnValidationError is part of an experimental API and may // change or be removed. @@ -480,6 +484,7 @@ func (RawAttachmentData) attachment() {} func (r RawAttachmentData) Type() AttachmentType { return r.Discriminator } + // Blob attachment with inline base64-encoded data // Experimental: AttachmentBlob is part of an experimental API and may change or be removed. type AttachmentBlob struct { @@ -504,6 +509,7 @@ func (AttachmentBlob) attachment() {} func (AttachmentBlob) Type() AttachmentType { return AttachmentTypeBlob } + // Directory attachment // Experimental: AttachmentDirectory is part of an experimental API and may change or be // removed. @@ -522,6 +528,7 @@ func (AttachmentDirectory) attachment() {} func (AttachmentDirectory) Type() AttachmentType { return AttachmentTypeDirectory } + // Structured context contributed by an extension. Composer pills displayed in the host are // forwarded back through session.send.attachments, then rendered into the model prompt as // an XML block. @@ -548,6 +555,7 @@ func (AttachmentExtensionContext) attachment() {} func (AttachmentExtensionContext) Type() AttachmentType { return AttachmentTypeExtensionContext } + // File attachment // Experimental: AttachmentFile is part of an experimental API and may change or be removed. type AttachmentFile struct { @@ -579,6 +587,7 @@ func (AttachmentFile) attachment() {} func (AttachmentFile) Type() AttachmentType { return AttachmentTypeFile } + // Pointer to a GitHub Actions job. // Experimental: AttachmentGitHubActionsJob is part of an experimental API and may change or // be removed. @@ -602,6 +611,7 @@ func (AttachmentGitHubActionsJob) attachment() {} func (AttachmentGitHubActionsJob) Type() AttachmentType { return AttachmentTypeGitHubActionsJob } + // Pointer to a GitHub commit. // Experimental: AttachmentGitHubCommit is part of an experimental API and may change or be // removed. @@ -620,6 +630,7 @@ func (AttachmentGitHubCommit) attachment() {} func (AttachmentGitHubCommit) Type() AttachmentType { return AttachmentTypeGitHubCommit } + // Pointer to a file in a GitHub repository at a specific ref. // Experimental: AttachmentGitHubFile is part of an experimental API and may change or be // removed. @@ -638,6 +649,7 @@ func (AttachmentGitHubFile) attachment() {} func (AttachmentGitHubFile) Type() AttachmentType { return AttachmentTypeGitHubFile } + // Pointer to a single-file diff. At least one of `head` and `base` must be present. // Experimental: AttachmentGitHubFileDiff is part of an experimental API and may change or // be removed. @@ -654,6 +666,7 @@ func (AttachmentGitHubFileDiff) attachment() {} func (AttachmentGitHubFileDiff) Type() AttachmentType { return AttachmentTypeGitHubFileDiff } + // GitHub issue, pull request, or discussion reference // Experimental: AttachmentGitHubReference is part of an experimental API and may change or // be removed. @@ -674,6 +687,7 @@ func (AttachmentGitHubReference) attachment() {} func (AttachmentGitHubReference) Type() AttachmentType { return AttachmentTypeGitHubReference } + // Pointer to a GitHub release. // Experimental: AttachmentGitHubRelease is part of an experimental API and may change or be // removed. @@ -692,6 +706,7 @@ func (AttachmentGitHubRelease) attachment() {} func (AttachmentGitHubRelease) Type() AttachmentType { return AttachmentTypeGitHubRelease } + // Pointer to a GitHub repository. // Experimental: AttachmentGitHubRepository is part of an experimental API and may change or // be removed. @@ -711,6 +726,7 @@ func (AttachmentGitHubRepository) attachment() {} func (AttachmentGitHubRepository) Type() AttachmentType { return AttachmentTypeGitHubRepository } + // Pointer to a line range inside a file in a GitHub repository. // Experimental: AttachmentGitHubSnippet is part of an experimental API and may change or be // removed. @@ -731,6 +747,7 @@ func (AttachmentGitHubSnippet) attachment() {} func (AttachmentGitHubSnippet) Type() AttachmentType { return AttachmentTypeGitHubSnippet } + // Pointer to a comparison between two git revisions. // Experimental: AttachmentGitHubTreeComparison is part of an experimental API and may // change or be removed. @@ -747,6 +764,7 @@ func (AttachmentGitHubTreeComparison) attachment() {} func (AttachmentGitHubTreeComparison) Type() AttachmentType { return AttachmentTypeGitHubTreeComparison } + // Generic GitHub URL reference. // Experimental: AttachmentGitHubURL is part of an experimental API and may change or be // removed. @@ -759,6 +777,7 @@ func (AttachmentGitHubURL) attachment() {} func (AttachmentGitHubURL) Type() AttachmentType { return AttachmentTypeGitHubURL } + // Code selection attachment from an editor // Experimental: AttachmentSelection is part of an experimental API and may change or be // removed. @@ -856,6 +875,7 @@ func (RawAuthInfoData) authInfo() {} func (r RawAuthInfoData) Type() AuthInfoType { return r.Discriminator } + // Authentication-info variant for API-key authentication to a non-GitHub LLM provider, // carrying the secret `apiKey` and host. // Experimental: APIKeyAuthInfo is part of an experimental API and may change or be removed. @@ -874,6 +894,7 @@ func (APIKeyAuthInfo) authInfo() {} func (APIKeyAuthInfo) Type() AuthInfoType { return AuthInfoTypeAPIKey } + // Authentication-info variant for direct Copilot API token auth sourced from environment // variables, with public GitHub host. // Experimental: CopilotAPITokenAuthInfo is part of an experimental API and may change or be @@ -891,6 +912,7 @@ func (CopilotAPITokenAuthInfo) authInfo() {} func (CopilotAPITokenAuthInfo) Type() AuthInfoType { return AuthInfoTypeCopilotAPIToken } + // Authentication-info variant for a token sourced from an environment variable, with host, // optional login, token, and env var name. // Experimental: EnvAuthInfo is part of an experimental API and may change or be removed. @@ -914,6 +936,7 @@ func (EnvAuthInfo) authInfo() {} func (EnvAuthInfo) Type() AuthInfoType { return AuthInfoTypeEnv } + // Authentication-info variant for GitHub CLI credentials, carrying host, login, and the `gh // auth token` value. // Experimental: GhCLIAuthInfo is part of an experimental API and may change or be removed. @@ -934,6 +957,7 @@ func (GhCLIAuthInfo) authInfo() {} func (GhCLIAuthInfo) Type() AuthInfoType { return AuthInfoTypeGhCLI } + // Authentication-info variant for GitHub-internal HMAC auth, carrying the public GitHub // host and HMAC secret. // Experimental: HMACAuthInfo is part of an experimental API and may change or be removed. @@ -952,6 +976,7 @@ func (HMACAuthInfo) authInfo() {} func (HMACAuthInfo) Type() AuthInfoType { return AuthInfoTypeHMAC } + // Authentication-info variant for SDK-configured token authentication, carrying host and // the secret token value. // Experimental: TokenAuthInfo is part of an experimental API and may change or be removed. @@ -970,6 +995,7 @@ func (TokenAuthInfo) authInfo() {} func (TokenAuthInfo) Type() AuthInfoType { return AuthInfoTypeToken } + // Authentication-info variant for OAuth user auth, with host and login; the token remains // in the runtime secret store. // Experimental: UserAuthInfo is part of an experimental API and may change or be removed. @@ -1511,15 +1537,15 @@ type CopilotUserResponse struct { // Experimental: CopilotUserResponseEndpoints is part of an experimental API and may change // or be removed. type CopilotUserResponseEndpoints struct { - API *string `json:"api,omitempty"` + API *string `json:"api,omitempty"` OriginTracker *string `json:"origin-tracker,omitempty"` - Proxy *string `json:"proxy,omitempty"` - Telemetry *string `json:"telemetry,omitempty"` + Proxy *string `json:"proxy,omitempty"` + Telemetry *string `json:"telemetry,omitempty"` } type CopilotUserResponseOrganizationListItem struct { Login *string `json:"login,omitempty"` - Name *string `json:"name,omitempty"` + Name *string `json:"name,omitempty"` } // Quota snapshot map from the raw Copilot user-response passthrough, with chat, @@ -1704,6 +1730,7 @@ func (RawDebugCollectLogsDestinationData) debugCollectLogsDestination() {} func (r RawDebugCollectLogsDestinationData) Kind() DebugCollectLogsDestinationKind { return r.Discriminator } + type DebugCollectLogsDestinationArchive struct { // When true, create the archive atomically without overwriting an existing file by // appending ` (N)` before the extension as needed. Defaults to false. @@ -1716,6 +1743,7 @@ func (DebugCollectLogsDestinationArchive) debugCollectLogsDestination() {} func (DebugCollectLogsDestinationArchive) Kind() DebugCollectLogsDestinationKind { return DebugCollectLogsDestinationKindArchive } + type DebugCollectLogsDestinationDirectory struct { // Directory where redacted files should be staged. The directory is created if needed. OutputDirectory string `json:"outputDirectory"` @@ -1922,7 +1950,7 @@ type EventLogTailResult struct { // Either '*' to receive all event types, or a non-empty list of event types to receive // Experimental: EventLogTypes is part of an experimental API and may change or be removed. type EventLogTypes struct { - String *EventLogTypesString + String *EventLogTypesString StringArray []string } @@ -2082,6 +2110,7 @@ func (RawExternalToolTextResultForLlmContentData) externalToolTextResultForLlmCo func (r RawExternalToolTextResultForLlmContentData) Type() ExternalToolTextResultForLlmContentType { return r.Discriminator } + // Audio content block with base64-encoded data // Experimental: ExternalToolTextResultForLlmContentAudio is part of an experimental API and // may change or be removed. @@ -2096,6 +2125,7 @@ func (ExternalToolTextResultForLlmContentAudio) externalToolTextResultForLlmCont func (ExternalToolTextResultForLlmContentAudio) Type() ExternalToolTextResultForLlmContentType { return ExternalToolTextResultForLlmContentTypeAudio } + // Image content block with base64-encoded data // Experimental: ExternalToolTextResultForLlmContentImage is part of an experimental API and // may change or be removed. @@ -2110,6 +2140,7 @@ func (ExternalToolTextResultForLlmContentImage) externalToolTextResultForLlmCont func (ExternalToolTextResultForLlmContentImage) Type() ExternalToolTextResultForLlmContentType { return ExternalToolTextResultForLlmContentTypeImage } + // Embedded resource content block with inline text or binary data // Experimental: ExternalToolTextResultForLlmContentResource is part of an experimental API // and may change or be removed. @@ -2122,6 +2153,7 @@ func (ExternalToolTextResultForLlmContentResource) externalToolTextResultForLlmC func (ExternalToolTextResultForLlmContentResource) Type() ExternalToolTextResultForLlmContentType { return ExternalToolTextResultForLlmContentTypeResource } + // Resource link content block referencing an external resource // Experimental: ExternalToolTextResultForLlmContentResourceLink is part of an experimental // API and may change or be removed. @@ -2146,6 +2178,7 @@ func (ExternalToolTextResultForLlmContentResourceLink) externalToolTextResultFor func (ExternalToolTextResultForLlmContentResourceLink) Type() ExternalToolTextResultForLlmContentType { return ExternalToolTextResultForLlmContentTypeResourceLink } + // Shell command exit metadata with optional output preview // Experimental: ExternalToolTextResultForLlmContentShellExit is part of an experimental API // and may change or be removed. @@ -2167,6 +2200,7 @@ func (ExternalToolTextResultForLlmContentShellExit) externalToolTextResultForLlm func (ExternalToolTextResultForLlmContentShellExit) Type() ExternalToolTextResultForLlmContentType { return ExternalToolTextResultForLlmContentTypeShellExit } + // Terminal/shell output content block with optional exit code and working directory // Experimental: ExternalToolTextResultForLlmContentTerminal is part of an experimental API // and may change or be removed. @@ -2183,6 +2217,7 @@ func (ExternalToolTextResultForLlmContentTerminal) externalToolTextResultForLlmC func (ExternalToolTextResultForLlmContentTerminal) Type() ExternalToolTextResultForLlmContentType { return ExternalToolTextResultForLlmContentTypeTerminal } + // Plain text content block // Experimental: ExternalToolTextResultForLlmContentText is part of an experimental API and // may change or be removed. @@ -2207,7 +2242,9 @@ type RawExternalToolTextResultForLlmContentResourceDetailsData struct { Raw json.RawMessage } -func (RawExternalToolTextResultForLlmContentResourceDetailsData) externalToolTextResultForLlmContentResourceDetails() {} +func (RawExternalToolTextResultForLlmContentResourceDetailsData) externalToolTextResultForLlmContentResourceDetails() { +} + // Embedded binary resource contents identified by a URI, with an optional MIME type and a // base64-encoded blob. // Experimental: EmbeddedBlobResourceContents is part of an experimental API and may change @@ -2238,7 +2275,6 @@ type EmbeddedTextResourceContents struct { func (EmbeddedTextResourceContents) externalToolTextResultForLlmContentResourceDetails() {} - // Icon image for a resource // Experimental: ExternalToolTextResultForLlmContentResourceLinkIcon is part of an // experimental API and may change or be removed. @@ -2307,19 +2343,19 @@ type FactoryAgentResult struct { // Experimental: FactoryAgentSummary is part of an experimental API and may change or be // removed. type FactoryAgentSummary struct { - ActiveMs int64 `json:"activeMs"` - Activity *string `json:"activity,omitempty"` - AgentID string `json:"agentId"` - AgentType string `json:"agentType"` - CompletedAt *int64 `json:"completedAt,omitempty"` - Label string `json:"label"` - PhaseID *string `json:"phaseId"` + ActiveMs int64 `json:"activeMs"` + Activity *string `json:"activity,omitempty"` + AgentID string `json:"agentId"` + AgentType string `json:"agentType"` + CompletedAt *int64 `json:"completedAt,omitempty"` + Label string `json:"label"` + PhaseID *string `json:"phaseId"` RequestedModel *string `json:"requestedModel,omitempty"` - ResolvedModel *string `json:"resolvedModel,omitempty"` - RunID string `json:"runId"` - StartedAt *int64 `json:"startedAt,omitempty"` - Status string `json:"status"` - ToolCallID string `json:"toolCallId"` + ResolvedModel *string `json:"resolvedModel,omitempty"` + RunID string `json:"runId"` + StartedAt *int64 `json:"startedAt,omitempty"` + Status string `json:"status"` + ToolCallID string `json:"toolCallId"` } // Parameters for cancelling a factory run. @@ -2334,7 +2370,7 @@ type FactoryCancelRequest struct { // Experimental: FactoryCurrentPhase is part of an experimental API and may change or be // removed. type FactoryCurrentPhase struct { - ID string `json:"id"` + ID string `json:"id"` Ordinal *int64 `json:"ordinal"` } @@ -2342,10 +2378,10 @@ type FactoryCurrentPhase struct { // Experimental: FactoryDeclaredLimits is part of an experimental API and may change or be // removed. type FactoryDeclaredLimits struct { - MaxAiCredits *float64 `json:"maxAiCredits,omitempty"` - MaxConcurrentSubagents *int64 `json:"maxConcurrentSubagents,omitempty"` - MaxTotalSubagents *int64 `json:"maxTotalSubagents,omitempty"` - TimeoutSeconds *float64 `json:"timeoutSeconds,omitempty"` + MaxAiCredits *float64 `json:"maxAiCredits,omitempty"` + MaxConcurrentSubagents *int64 `json:"maxConcurrentSubagents,omitempty"` + MaxTotalSubagents *int64 `json:"maxTotalSubagents,omitempty"` + TimeoutSeconds *float64 `json:"timeoutSeconds,omitempty"` } // Parameters sent to the owning extension to execute a factory closure. @@ -2472,19 +2508,19 @@ type FactoryLogRequest struct { // Experimental: FactoryPhaseObservation is part of an experimental API and may change or be // removed. type FactoryPhaseObservation struct { - AccumulatedActiveMs int64 `json:"accumulatedActiveMs"` - CompletedAt *int64 `json:"completedAt,omitempty"` - CurrentActiveMs int64 `json:"currentActiveMs"` - Detail *string `json:"detail,omitempty"` - EntryCount int64 `json:"entryCount"` - ID string `json:"id"` - LastEnteredRunAttempt int64 `json:"lastEnteredRunAttempt"` - LiveAgentCount int64 `json:"liveAgentCount"` - Ordinal *int64 `json:"ordinal"` - StartedAt *int64 `json:"startedAt,omitempty"` - Status FactoryPhaseStatus `json:"status"` - Title string `json:"title"` - TotalAgentCount int64 `json:"totalAgentCount"` + AccumulatedActiveMs int64 `json:"accumulatedActiveMs"` + CompletedAt *int64 `json:"completedAt,omitempty"` + CurrentActiveMs int64 `json:"currentActiveMs"` + Detail *string `json:"detail,omitempty"` + EntryCount int64 `json:"entryCount"` + ID string `json:"id"` + LastEnteredRunAttempt int64 `json:"lastEnteredRunAttempt"` + LiveAgentCount int64 `json:"liveAgentCount"` + Ordinal *int64 `json:"ordinal"` + StartedAt *int64 `json:"startedAt,omitempty"` + Status FactoryPhaseStatus `json:"status"` + Title string `json:"title"` + TotalAgentCount int64 `json:"totalAgentCount"` } // One durable factory progress record. @@ -2509,11 +2545,11 @@ type FactoryProgressLine struct { // Experimental: FactoryProgressPage is part of an experimental API and may change or be // removed. type FactoryProgressPage struct { - HasMoreNewer bool `json:"hasMoreNewer"` - HasMoreOlder bool `json:"hasMoreOlder"` - NewestSeq *int64 `json:"newestSeq"` - OldestSeq *int64 `json:"oldestSeq"` - Records []FactoryProgressLine `json:"records"` + HasMoreNewer bool `json:"hasMoreNewer"` + HasMoreOlder bool `json:"hasMoreOlder"` + NewestSeq *int64 `json:"newestSeq"` + OldestSeq *int64 `json:"oldestSeq"` + Records []FactoryProgressLine `json:"records"` // Run revision reflected by this page. Revision int64 `json:"revision"` } @@ -2542,8 +2578,8 @@ type FactoryResumeResult struct { // Experimental: FactoryRunConsumed is part of an experimental API and may change or be // removed. type FactoryRunConsumed struct { - ActiveMs int64 `json:"activeMs"` - NanoAiu int64 `json:"nanoAiu"` + ActiveMs int64 `json:"activeMs"` + NanoAiu int64 `json:"nanoAiu"` Subagents int64 `json:"subagents"` } @@ -2551,28 +2587,28 @@ type FactoryRunConsumed struct { // Experimental: FactoryRunDetail is part of an experimental API and may change or be // removed. type FactoryRunDetail struct { - ActiveSegmentStartedAt *int64 `json:"activeSegmentStartedAt"` - Agents []FactoryAgentSummary `json:"agents"` - Approved *FactoryDeclaredLimits `json:"approved"` - CompletedAt *int64 `json:"completedAt"` - Consumed FactoryRunConsumed `json:"consumed"` - CreatedAt int64 `json:"createdAt"` - CurrentPhase *FactoryCurrentPhase `json:"currentPhase"` - DeclaredLimits FactoryDeclaredLimits `json:"declaredLimits"` - DeclaredPhaseCount int64 `json:"declaredPhaseCount"` - Description string `json:"description"` - FactoryName string `json:"factoryName"` - LiveAgentCount int64 `json:"liveAgentCount"` - ObservedAt int64 `json:"observedAt"` - Phases []FactoryPhaseObservation `json:"phases"` - Progress FactoryProgressPage `json:"progress"` - Revision int64 `json:"revision"` - RunID string `json:"runId"` - StartedAt *int64 `json:"startedAt"` - Status FactoryRunStatus `json:"status"` - Terminal *FactoryRunTerminal `json:"terminal"` - TotalSpawnedAgentCount int64 `json:"totalSpawnedAgentCount"` - UpdatedAt int64 `json:"updatedAt"` + ActiveSegmentStartedAt *int64 `json:"activeSegmentStartedAt"` + Agents []FactoryAgentSummary `json:"agents"` + Approved *FactoryDeclaredLimits `json:"approved"` + CompletedAt *int64 `json:"completedAt"` + Consumed FactoryRunConsumed `json:"consumed"` + CreatedAt int64 `json:"createdAt"` + CurrentPhase *FactoryCurrentPhase `json:"currentPhase"` + DeclaredLimits FactoryDeclaredLimits `json:"declaredLimits"` + DeclaredPhaseCount int64 `json:"declaredPhaseCount"` + Description string `json:"description"` + FactoryName string `json:"factoryName"` + LiveAgentCount int64 `json:"liveAgentCount"` + ObservedAt int64 `json:"observedAt"` + Phases []FactoryPhaseObservation `json:"phases"` + Progress FactoryProgressPage `json:"progress"` + Revision int64 `json:"revision"` + RunID string `json:"runId"` + StartedAt *int64 `json:"startedAt"` + Status FactoryRunStatus `json:"status"` + Terminal *FactoryRunTerminal `json:"terminal"` + TotalSpawnedAgentCount int64 `json:"totalSpawnedAgentCount"` + UpdatedAt int64 `json:"updatedAt"` } // Machine-readable factory run failure. @@ -2592,6 +2628,7 @@ func (RawFactoryRunFailureData) factoryRunFailure() {} func (r RawFactoryRunFailureData) Type() FactoryRunFailureType { return r.Discriminator } + type FactoryRunFailureFactoryDurableFailure struct { // Stable failure code. Code string `json:"code"` @@ -2605,6 +2642,7 @@ func (FactoryRunFailureFactoryDurableFailure) factoryRunFailure() {} func (FactoryRunFailureFactoryDurableFailure) Type() FactoryRunFailureType { return FactoryRunFailureTypeFactoryDurableFailure } + type FactoryRunFailureFactoryLimitReached struct { // Resource ceiling that stopped the run. Kind FactoryRunFailureKind `json:"kind"` @@ -2618,6 +2656,7 @@ func (FactoryRunFailureFactoryLimitReached) factoryRunFailure() {} func (FactoryRunFailureFactoryLimitReached) Type() FactoryRunFailureType { return FactoryRunFailureTypeFactoryLimitReached } + type FactoryRunFailureFactoryResumeDeclined struct { // Human-readable reason the resume did not proceed. Reason string `json:"reason"` @@ -2683,35 +2722,35 @@ type FactoryRunResult struct { // Experimental: FactoryRunSummary is part of an experimental API and may change or be // removed. type FactoryRunSummary struct { - ActiveSegmentStartedAt *int64 `json:"activeSegmentStartedAt"` - Approved *FactoryDeclaredLimits `json:"approved"` - CompletedAt *int64 `json:"completedAt"` - Consumed FactoryRunConsumed `json:"consumed"` - CreatedAt int64 `json:"createdAt"` - CurrentPhase *FactoryCurrentPhase `json:"currentPhase"` - DeclaredLimits FactoryDeclaredLimits `json:"declaredLimits"` - DeclaredPhaseCount int64 `json:"declaredPhaseCount"` - Description string `json:"description"` - FactoryName string `json:"factoryName"` - LiveAgentCount int64 `json:"liveAgentCount"` - ObservedAt int64 `json:"observedAt"` - Revision int64 `json:"revision"` - RunID string `json:"runId"` - StartedAt *int64 `json:"startedAt"` - Status FactoryRunStatus `json:"status"` - Terminal *FactoryRunTerminal `json:"terminal"` - TotalSpawnedAgentCount int64 `json:"totalSpawnedAgentCount"` - UpdatedAt int64 `json:"updatedAt"` + ActiveSegmentStartedAt *int64 `json:"activeSegmentStartedAt"` + Approved *FactoryDeclaredLimits `json:"approved"` + CompletedAt *int64 `json:"completedAt"` + Consumed FactoryRunConsumed `json:"consumed"` + CreatedAt int64 `json:"createdAt"` + CurrentPhase *FactoryCurrentPhase `json:"currentPhase"` + DeclaredLimits FactoryDeclaredLimits `json:"declaredLimits"` + DeclaredPhaseCount int64 `json:"declaredPhaseCount"` + Description string `json:"description"` + FactoryName string `json:"factoryName"` + LiveAgentCount int64 `json:"liveAgentCount"` + ObservedAt int64 `json:"observedAt"` + Revision int64 `json:"revision"` + RunID string `json:"runId"` + StartedAt *int64 `json:"startedAt"` + Status FactoryRunStatus `json:"status"` + Terminal *FactoryRunTerminal `json:"terminal"` + TotalSpawnedAgentCount int64 `json:"totalSpawnedAgentCount"` + UpdatedAt int64 `json:"updatedAt"` } // Prompt-safe terminal factory outcome. // Experimental: FactoryRunTerminal is part of an experimental API and may change or be // removed. type FactoryRunTerminal struct { - Error *string `json:"error,omitempty"` - Failure FactoryRunFailure `json:"failure,omitempty"` - Reason *string `json:"reason,omitempty"` - ResultPreview *string `json:"resultPreview,omitempty"` + Error *string `json:"error,omitempty"` + Failure FactoryRunFailure `json:"failure,omitempty"` + Reason *string `json:"reason,omitempty"` + ResultPreview *string `json:"resultPreview,omitempty"` } // Content filtering mode to apply to all tools, or a map of tool name to content filtering @@ -3120,9 +3159,9 @@ type HistoryTruncateResult struct { type HookInvokeRequest struct { // Internal: HookType is part of the SDK's internal API surface and is not intended for // external use. - HookType HookType `json:"hookType"` - Input any `json:"input"` - SessionID string `json:"sessionId"` + HookType HookType `json:"hookType"` + Input any `json:"input"` + SessionID string `json:"sessionId"` } // Optional output returned by an SDK callback hook. @@ -3177,9 +3216,9 @@ type InstalledPluginInfo struct { // removed. type InstalledPluginSource struct { InstalledPluginSourceGitHub *InstalledPluginSourceGitHub - InstalledPluginSourceLocal *InstalledPluginSourceLocal - InstalledPluginSourceURL *InstalledPluginSourceURL - String *string + InstalledPluginSourceLocal *InstalledPluginSourceLocal + InstalledPluginSourceURL *InstalledPluginSourceURL + String *string } // Source descriptor for a direct GitHub plugin install, with `owner/repo`, optional ref or @@ -3188,8 +3227,8 @@ type InstalledPluginSource struct { // or be removed. type InstalledPluginSourceGitHub struct { Path *string `json:"path,omitempty"` - Ref *string `json:"ref,omitempty"` - Repo string `json:"repo"` + Ref *string `json:"ref,omitempty"` + Repo string `json:"repo"` // Optional full 40-character hexadecimal commit SHA. Sha *string `json:"sha,omitempty"` // Constant value. Always "github". @@ -3211,12 +3250,12 @@ type InstalledPluginSourceLocal struct { // be removed. type InstalledPluginSourceURL struct { Path *string `json:"path,omitempty"` - Ref *string `json:"ref,omitempty"` + Ref *string `json:"ref,omitempty"` // Optional full 40-character hexadecimal commit SHA. Sha *string `json:"sha,omitempty"` // Constant value. Always "url". Source InstalledPluginSourceURLSource `json:"source"` - URL string `json:"url"` + URL string `json:"url"` } // Canonical file or directory where custom instructions can be discovered or created, with @@ -3385,8 +3424,8 @@ type LlmInferenceHTTPRequestStartRequest struct { // covers auxiliary calls that have no model call id). Otherwise, first-party CAPI requests // fall back to the runtime's agent task id — the same value the runtime emits as the // `X-Agent-Task-Id` header — while custom-provider requests fall back to the model call id. - AgentInvocationID *string `json:"agentInvocationId,omitempty"` - Headers map[string][]string `json:"headers"` + AgentInvocationID *string `json:"agentInvocationId,omitempty"` + Headers map[string][]string `json:"headers"` // Coarse classification of the interaction that produced this request. Open string for // forward-compatibility; known values include `conversation-agent`, // `conversation-subagent`, `conversation-sampling`, `conversation-background`, @@ -4044,24 +4083,29 @@ type RawMCPHeadersHandlePendingHeadersRefreshRequestData struct { Raw json.RawMessage } -func (RawMCPHeadersHandlePendingHeadersRefreshRequestData) mcpHeadersHandlePendingHeadersRefreshRequest() {} +func (RawMCPHeadersHandlePendingHeadersRefreshRequestData) mcpHeadersHandlePendingHeadersRefreshRequest() { +} func (r RawMCPHeadersHandlePendingHeadersRefreshRequestData) Kind() MCPHeadersHandlePendingHeadersRefreshRequestKind { return r.Discriminator } + type MCPHeadersHandlePendingHeadersRefreshRequestHeaders struct { // Headers to overlay onto the MCP request. Dynamic headers override static config headers // but do not replace SDK-managed request headers. Headers map[string]string `json:"headers"` } -func (MCPHeadersHandlePendingHeadersRefreshRequestHeaders) mcpHeadersHandlePendingHeadersRefreshRequest() {} +func (MCPHeadersHandlePendingHeadersRefreshRequestHeaders) mcpHeadersHandlePendingHeadersRefreshRequest() { +} func (MCPHeadersHandlePendingHeadersRefreshRequestHeaders) Kind() MCPHeadersHandlePendingHeadersRefreshRequestKind { return MCPHeadersHandlePendingHeadersRefreshRequestKindHeaders } + type MCPHeadersHandlePendingHeadersRefreshRequestNone struct { } -func (MCPHeadersHandlePendingHeadersRefreshRequestNone) mcpHeadersHandlePendingHeadersRefreshRequest() {} +func (MCPHeadersHandlePendingHeadersRefreshRequestNone) mcpHeadersHandlePendingHeadersRefreshRequest() { +} func (MCPHeadersHandlePendingHeadersRefreshRequestNone) Kind() MCPHeadersHandlePendingHeadersRefreshRequestKind { return MCPHeadersHandlePendingHeadersRefreshRequestKindNone } @@ -4222,6 +4266,7 @@ func (RawMCPOauthPendingRequestResponseData) mcpOauthPendingRequestResponse() {} func (r RawMCPOauthPendingRequestResponseData) Kind() MCPOauthPendingRequestResponseKind { return r.Discriminator } + type MCPOauthPendingRequestResponseCancelled struct { } @@ -4229,6 +4274,7 @@ func (MCPOauthPendingRequestResponseCancelled) mcpOauthPendingRequestResponse() func (MCPOauthPendingRequestResponseCancelled) Kind() MCPOauthPendingRequestResponseKind { return MCPOauthPendingRequestResponseKindCancelled } + type MCPOauthPendingRequestResponseToken struct { // Access token acquired by the SDK host AccessToken string `json:"accessToken"` @@ -4540,6 +4586,7 @@ type RawMCPServerConfigData struct { } func (RawMCPServerConfigData) mcpServerConfig() {} + // Remote MCP server configuration accessed over HTTP or SSE. // Experimental: MCPServerConfigHTTP is part of an experimental API and may change or be // removed. @@ -4616,7 +4663,6 @@ type MCPServerConfigStdio struct { func (MCPServerConfigStdio) mcpServerConfig() {} - // Recorded MCP server connection failure. // Experimental: MCPServerFailureInfo is part of an experimental API and may change or be // removed. @@ -5300,8 +5346,8 @@ type OpenCanvasInstance struct { // Experimental: OptionsUpdateAdditionalContentExclusionPolicy is part of an experimental // API and may change or be removed. type OptionsUpdateAdditionalContentExclusionPolicy struct { - LastUpdatedAt any `json:"last_updated_at"` - Rules []OptionsUpdateAdditionalContentExclusionPolicyRule `json:"rules"` + LastUpdatedAt any `json:"last_updated_at"` + Rules []OptionsUpdateAdditionalContentExclusionPolicyRule `json:"rules"` // Allowed values for the `OptionsUpdateAdditionalContentExclusionPolicyScope` enumeration. Scope OptionsUpdateAdditionalContentExclusionPolicyScope `json:"scope"` } @@ -5311,9 +5357,9 @@ type OptionsUpdateAdditionalContentExclusionPolicy struct { // Experimental: OptionsUpdateAdditionalContentExclusionPolicyRule is part of an // experimental API and may change or be removed. type OptionsUpdateAdditionalContentExclusionPolicyRule struct { - IfAnyMatch []string `json:"ifAnyMatch,omitzero"` + IfAnyMatch []string `json:"ifAnyMatch,omitzero"` IfNoneMatch []string `json:"ifNoneMatch,omitzero"` - Paths []string `json:"paths"` + Paths []string `json:"paths"` // Source descriptor for a `session.options.update` content-exclusion rule, with source name // and type. Source OptionsUpdateAdditionalContentExclusionPolicyRuleSource `json:"source"` @@ -5368,6 +5414,7 @@ func (RawPermissionDecisionData) permissionDecision() {} func (r RawPermissionDecisionData) Kind() PermissionDecisionKind { return r.Discriminator } + // Permission-decision variant indicating the request was approved. // Experimental: PermissionDecisionApproved is part of an experimental API and may change or // be removed. @@ -5378,6 +5425,7 @@ func (PermissionDecisionApproved) permissionDecision() {} func (PermissionDecisionApproved) Kind() PermissionDecisionKind { return PermissionDecisionKindApproved } + // Permission-decision variant indicating approval was persisted for a project location, // with approval details and location key. // Experimental: PermissionDecisionApprovedForLocation is part of an experimental API and @@ -5393,6 +5441,7 @@ func (PermissionDecisionApprovedForLocation) permissionDecision() {} func (PermissionDecisionApprovedForLocation) Kind() PermissionDecisionKind { return PermissionDecisionKindApprovedForLocation } + // Permission-decision variant indicating approval was remembered for the session, with // approval details. // Experimental: PermissionDecisionApprovedForSession is part of an experimental API and may @@ -5406,6 +5455,7 @@ func (PermissionDecisionApprovedForSession) permissionDecision() {} func (PermissionDecisionApprovedForSession) Kind() PermissionDecisionKind { return PermissionDecisionKindApprovedForSession } + // Permission-decision request variant to approve and persist a permission for a project // location, with approval details and location key. // Experimental: PermissionDecisionApproveForLocation is part of an experimental API and may @@ -5421,6 +5471,7 @@ func (PermissionDecisionApproveForLocation) permissionDecision() {} func (PermissionDecisionApproveForLocation) Kind() PermissionDecisionKind { return PermissionDecisionKindApproveForLocation } + // Permission-decision request variant to approve for the rest of the session, with optional // tool approval or URL domain. // Experimental: PermissionDecisionApproveForSession is part of an experimental API and may @@ -5436,6 +5487,7 @@ func (PermissionDecisionApproveForSession) permissionDecision() {} func (PermissionDecisionApproveForSession) Kind() PermissionDecisionKind { return PermissionDecisionKindApproveForSession } + // Permission-decision request variant to approve only the current permission request. // Experimental: PermissionDecisionApproveOnce is part of an experimental API and may change // or be removed. @@ -5448,6 +5500,7 @@ func (PermissionDecisionApproveOnce) permissionDecision() {} func (PermissionDecisionApproveOnce) Kind() PermissionDecisionKind { return PermissionDecisionKindApproveOnce } + // Permission-decision request variant to permanently approve a URL domain across sessions. // Experimental: PermissionDecisionApprovePermanently is part of an experimental API and may // change or be removed. @@ -5460,6 +5513,7 @@ func (PermissionDecisionApprovePermanently) permissionDecision() {} func (PermissionDecisionApprovePermanently) Kind() PermissionDecisionKind { return PermissionDecisionKindApprovePermanently } + // Permission-decision variant indicating the request was cancelled before use, with an // optional reason. // Experimental: PermissionDecisionCancelled is part of an experimental API and may change @@ -5473,6 +5527,7 @@ func (PermissionDecisionCancelled) permissionDecision() {} func (PermissionDecisionCancelled) Kind() PermissionDecisionKind { return PermissionDecisionKindCancelled } + // Permission-decision variant indicating denial by content-exclusion policy, with path and // message. // Experimental: PermissionDecisionDeniedByContentExclusionPolicy is part of an experimental @@ -5488,6 +5543,7 @@ func (PermissionDecisionDeniedByContentExclusionPolicy) permissionDecision() {} func (PermissionDecisionDeniedByContentExclusionPolicy) Kind() PermissionDecisionKind { return PermissionDecisionKindDeniedByContentExclusionPolicy } + // Permission-decision variant indicating denial by a permission request hook, with optional // message and interrupt flag. // Experimental: PermissionDecisionDeniedByPermissionRequestHook is part of an experimental @@ -5503,6 +5559,7 @@ func (PermissionDecisionDeniedByPermissionRequestHook) permissionDecision() {} func (PermissionDecisionDeniedByPermissionRequestHook) Kind() PermissionDecisionKind { return PermissionDecisionKindDeniedByPermissionRequestHook } + // Permission-decision variant indicating explicit denial by permission rules, with the // matching rules. // Experimental: PermissionDecisionDeniedByRules is part of an experimental API and may @@ -5516,6 +5573,7 @@ func (PermissionDecisionDeniedByRules) permissionDecision() {} func (PermissionDecisionDeniedByRules) Kind() PermissionDecisionKind { return PermissionDecisionKindDeniedByRules } + // Permission-decision variant indicating the user denied an interactive prompt, with // optional feedback and force-reject flag. // Experimental: PermissionDecisionDeniedInteractivelyByUser is part of an experimental API @@ -5531,6 +5589,7 @@ func (PermissionDecisionDeniedInteractivelyByUser) permissionDecision() {} func (PermissionDecisionDeniedInteractivelyByUser) Kind() PermissionDecisionKind { return PermissionDecisionKindDeniedInteractivelyByUser } + // Permission-decision variant indicating no approval rule matched and user confirmation was // unavailable. // Experimental: PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser is part of @@ -5542,6 +5601,7 @@ func (PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser) permissi func (PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser) Kind() PermissionDecisionKind { return PermissionDecisionKindDeniedNoApprovalRuleAndCouldNotRequestFromUser } + // Permission-decision request variant to reject a pending permission request, with optional // feedback. // Experimental: PermissionDecisionReject is part of an experimental API and may change or @@ -5555,6 +5615,7 @@ func (PermissionDecisionReject) permissionDecision() {} func (PermissionDecisionReject) Kind() PermissionDecisionKind { return PermissionDecisionKindReject } + // Permission-decision variant indicating no user was available to confirm the request. // Experimental: PermissionDecisionUserNotAvailable is part of an experimental API and may // change or be removed. @@ -5579,10 +5640,12 @@ type RawPermissionDecisionApproveForLocationApprovalData struct { Raw json.RawMessage } -func (RawPermissionDecisionApproveForLocationApprovalData) permissionDecisionApproveForLocationApproval() {} +func (RawPermissionDecisionApproveForLocationApprovalData) permissionDecisionApproveForLocationApproval() { +} func (r RawPermissionDecisionApproveForLocationApprovalData) Kind() PermissionDecisionApproveForLocationApprovalKind { return r.Discriminator } + // Location-scoped approval details for specific command identifiers. // Experimental: PermissionDecisionApproveForLocationApprovalCommands is part of an // experimental API and may change or be removed. @@ -5591,10 +5654,12 @@ type PermissionDecisionApproveForLocationApprovalCommands struct { CommandIdentifiers []string `json:"commandIdentifiers"` } -func (PermissionDecisionApproveForLocationApprovalCommands) permissionDecisionApproveForLocationApproval() {} +func (PermissionDecisionApproveForLocationApprovalCommands) permissionDecisionApproveForLocationApproval() { +} func (PermissionDecisionApproveForLocationApprovalCommands) Kind() PermissionDecisionApproveForLocationApprovalKind { return PermissionDecisionApproveForLocationApprovalKindCommands } + // Location-scoped approval details for a custom tool, keyed by tool name. // Experimental: PermissionDecisionApproveForLocationApprovalCustomTool is part of an // experimental API and may change or be removed. @@ -5603,10 +5668,12 @@ type PermissionDecisionApproveForLocationApprovalCustomTool struct { ToolName string `json:"toolName"` } -func (PermissionDecisionApproveForLocationApprovalCustomTool) permissionDecisionApproveForLocationApproval() {} +func (PermissionDecisionApproveForLocationApprovalCustomTool) permissionDecisionApproveForLocationApproval() { +} func (PermissionDecisionApproveForLocationApprovalCustomTool) Kind() PermissionDecisionApproveForLocationApprovalKind { return PermissionDecisionApproveForLocationApprovalKindCustomTool } + // Location-scoped approval details for extension-management operations, optionally narrowed // by operation. // Experimental: PermissionDecisionApproveForLocationApprovalExtensionManagement is part of @@ -5617,10 +5684,12 @@ type PermissionDecisionApproveForLocationApprovalExtensionManagement struct { Operation *string `json:"operation,omitempty"` } -func (PermissionDecisionApproveForLocationApprovalExtensionManagement) permissionDecisionApproveForLocationApproval() {} +func (PermissionDecisionApproveForLocationApprovalExtensionManagement) permissionDecisionApproveForLocationApproval() { +} func (PermissionDecisionApproveForLocationApprovalExtensionManagement) Kind() PermissionDecisionApproveForLocationApprovalKind { return PermissionDecisionApproveForLocationApprovalKindExtensionManagement } + // Location-scoped approval details for an extension's permission-gated capability access, // keyed by extension name. // Experimental: PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess is @@ -5630,10 +5699,12 @@ type PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess struc ExtensionName string `json:"extensionName"` } -func (PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess) permissionDecisionApproveForLocationApproval() {} +func (PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess) permissionDecisionApproveForLocationApproval() { +} func (PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess) Kind() PermissionDecisionApproveForLocationApprovalKind { return PermissionDecisionApproveForLocationApprovalKindExtensionPermissionAccess } + // Location-scoped approval details for an MCP server tool, or all tools on the server when // `toolName` is null. // Experimental: PermissionDecisionApproveForLocationApprovalMCP is part of an experimental @@ -5645,10 +5716,12 @@ type PermissionDecisionApproveForLocationApprovalMCP struct { ToolName *string `json:"toolName"` } -func (PermissionDecisionApproveForLocationApprovalMCP) permissionDecisionApproveForLocationApproval() {} +func (PermissionDecisionApproveForLocationApprovalMCP) permissionDecisionApproveForLocationApproval() { +} func (PermissionDecisionApproveForLocationApprovalMCP) Kind() PermissionDecisionApproveForLocationApprovalKind { return PermissionDecisionApproveForLocationApprovalKindMCP } + // Location-scoped approval details for MCP sampling requests from a server. // Experimental: PermissionDecisionApproveForLocationApprovalMCPSampling is part of an // experimental API and may change or be removed. @@ -5657,37 +5730,44 @@ type PermissionDecisionApproveForLocationApprovalMCPSampling struct { ServerName string `json:"serverName"` } -func (PermissionDecisionApproveForLocationApprovalMCPSampling) permissionDecisionApproveForLocationApproval() {} +func (PermissionDecisionApproveForLocationApprovalMCPSampling) permissionDecisionApproveForLocationApproval() { +} func (PermissionDecisionApproveForLocationApprovalMCPSampling) Kind() PermissionDecisionApproveForLocationApprovalKind { return PermissionDecisionApproveForLocationApprovalKindMCPSampling } + // Location-scoped approval details for writes to long-term memory. // Experimental: PermissionDecisionApproveForLocationApprovalMemory is part of an // experimental API and may change or be removed. type PermissionDecisionApproveForLocationApprovalMemory struct { } -func (PermissionDecisionApproveForLocationApprovalMemory) permissionDecisionApproveForLocationApproval() {} +func (PermissionDecisionApproveForLocationApprovalMemory) permissionDecisionApproveForLocationApproval() { +} func (PermissionDecisionApproveForLocationApprovalMemory) Kind() PermissionDecisionApproveForLocationApprovalKind { return PermissionDecisionApproveForLocationApprovalKindMemory } + // Location-scoped approval details for read-only filesystem operations. // Experimental: PermissionDecisionApproveForLocationApprovalRead is part of an experimental // API and may change or be removed. type PermissionDecisionApproveForLocationApprovalRead struct { } -func (PermissionDecisionApproveForLocationApprovalRead) permissionDecisionApproveForLocationApproval() {} +func (PermissionDecisionApproveForLocationApprovalRead) permissionDecisionApproveForLocationApproval() { +} func (PermissionDecisionApproveForLocationApprovalRead) Kind() PermissionDecisionApproveForLocationApprovalKind { return PermissionDecisionApproveForLocationApprovalKindRead } + // Location-scoped approval details for filesystem write operations. // Experimental: PermissionDecisionApproveForLocationApprovalWrite is part of an // experimental API and may change or be removed. type PermissionDecisionApproveForLocationApprovalWrite struct { } -func (PermissionDecisionApproveForLocationApprovalWrite) permissionDecisionApproveForLocationApproval() {} +func (PermissionDecisionApproveForLocationApprovalWrite) permissionDecisionApproveForLocationApproval() { +} func (PermissionDecisionApproveForLocationApprovalWrite) Kind() PermissionDecisionApproveForLocationApprovalKind { return PermissionDecisionApproveForLocationApprovalKindWrite } @@ -5705,10 +5785,12 @@ type RawPermissionDecisionApproveForSessionApprovalData struct { Raw json.RawMessage } -func (RawPermissionDecisionApproveForSessionApprovalData) permissionDecisionApproveForSessionApproval() {} +func (RawPermissionDecisionApproveForSessionApprovalData) permissionDecisionApproveForSessionApproval() { +} func (r RawPermissionDecisionApproveForSessionApprovalData) Kind() PermissionDecisionApproveForSessionApprovalKind { return r.Discriminator } + // Session-scoped approval details for specific command identifiers. // Experimental: PermissionDecisionApproveForSessionApprovalCommands is part of an // experimental API and may change or be removed. @@ -5717,10 +5799,12 @@ type PermissionDecisionApproveForSessionApprovalCommands struct { CommandIdentifiers []string `json:"commandIdentifiers"` } -func (PermissionDecisionApproveForSessionApprovalCommands) permissionDecisionApproveForSessionApproval() {} +func (PermissionDecisionApproveForSessionApprovalCommands) permissionDecisionApproveForSessionApproval() { +} func (PermissionDecisionApproveForSessionApprovalCommands) Kind() PermissionDecisionApproveForSessionApprovalKind { return PermissionDecisionApproveForSessionApprovalKindCommands } + // Session-scoped approval details for a custom tool, keyed by tool name. // Experimental: PermissionDecisionApproveForSessionApprovalCustomTool is part of an // experimental API and may change or be removed. @@ -5729,10 +5813,12 @@ type PermissionDecisionApproveForSessionApprovalCustomTool struct { ToolName string `json:"toolName"` } -func (PermissionDecisionApproveForSessionApprovalCustomTool) permissionDecisionApproveForSessionApproval() {} +func (PermissionDecisionApproveForSessionApprovalCustomTool) permissionDecisionApproveForSessionApproval() { +} func (PermissionDecisionApproveForSessionApprovalCustomTool) Kind() PermissionDecisionApproveForSessionApprovalKind { return PermissionDecisionApproveForSessionApprovalKindCustomTool } + // Session-scoped approval details for extension-management operations, optionally narrowed // by operation. // Experimental: PermissionDecisionApproveForSessionApprovalExtensionManagement is part of @@ -5743,10 +5829,12 @@ type PermissionDecisionApproveForSessionApprovalExtensionManagement struct { Operation *string `json:"operation,omitempty"` } -func (PermissionDecisionApproveForSessionApprovalExtensionManagement) permissionDecisionApproveForSessionApproval() {} +func (PermissionDecisionApproveForSessionApprovalExtensionManagement) permissionDecisionApproveForSessionApproval() { +} func (PermissionDecisionApproveForSessionApprovalExtensionManagement) Kind() PermissionDecisionApproveForSessionApprovalKind { return PermissionDecisionApproveForSessionApprovalKindExtensionManagement } + // Session-scoped approval details for an extension's permission-gated capability access, // keyed by extension name. // Experimental: PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess is @@ -5756,10 +5844,12 @@ type PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess struct ExtensionName string `json:"extensionName"` } -func (PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess) permissionDecisionApproveForSessionApproval() {} +func (PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess) permissionDecisionApproveForSessionApproval() { +} func (PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess) Kind() PermissionDecisionApproveForSessionApprovalKind { return PermissionDecisionApproveForSessionApprovalKindExtensionPermissionAccess } + // Session-scoped approval details for an MCP server tool, or all tools on the server when // `toolName` is null. // Experimental: PermissionDecisionApproveForSessionApprovalMCP is part of an experimental @@ -5775,6 +5865,7 @@ func (PermissionDecisionApproveForSessionApprovalMCP) permissionDecisionApproveF func (PermissionDecisionApproveForSessionApprovalMCP) Kind() PermissionDecisionApproveForSessionApprovalKind { return PermissionDecisionApproveForSessionApprovalKindMCP } + // Session-scoped approval details for MCP sampling requests from a server. // Experimental: PermissionDecisionApproveForSessionApprovalMCPSampling is part of an // experimental API and may change or be removed. @@ -5783,37 +5874,44 @@ type PermissionDecisionApproveForSessionApprovalMCPSampling struct { ServerName string `json:"serverName"` } -func (PermissionDecisionApproveForSessionApprovalMCPSampling) permissionDecisionApproveForSessionApproval() {} +func (PermissionDecisionApproveForSessionApprovalMCPSampling) permissionDecisionApproveForSessionApproval() { +} func (PermissionDecisionApproveForSessionApprovalMCPSampling) Kind() PermissionDecisionApproveForSessionApprovalKind { return PermissionDecisionApproveForSessionApprovalKindMCPSampling } + // Session-scoped approval details for writes to long-term memory. // Experimental: PermissionDecisionApproveForSessionApprovalMemory is part of an // experimental API and may change or be removed. type PermissionDecisionApproveForSessionApprovalMemory struct { } -func (PermissionDecisionApproveForSessionApprovalMemory) permissionDecisionApproveForSessionApproval() {} +func (PermissionDecisionApproveForSessionApprovalMemory) permissionDecisionApproveForSessionApproval() { +} func (PermissionDecisionApproveForSessionApprovalMemory) Kind() PermissionDecisionApproveForSessionApprovalKind { return PermissionDecisionApproveForSessionApprovalKindMemory } + // Session-scoped approval details for read-only filesystem operations. // Experimental: PermissionDecisionApproveForSessionApprovalRead is part of an experimental // API and may change or be removed. type PermissionDecisionApproveForSessionApprovalRead struct { } -func (PermissionDecisionApproveForSessionApprovalRead) permissionDecisionApproveForSessionApproval() {} +func (PermissionDecisionApproveForSessionApprovalRead) permissionDecisionApproveForSessionApproval() { +} func (PermissionDecisionApproveForSessionApprovalRead) Kind() PermissionDecisionApproveForSessionApprovalKind { return PermissionDecisionApproveForSessionApprovalKindRead } + // Session-scoped approval details for filesystem write operations. // Experimental: PermissionDecisionApproveForSessionApprovalWrite is part of an experimental // API and may change or be removed. type PermissionDecisionApproveForSessionApprovalWrite struct { } -func (PermissionDecisionApproveForSessionApprovalWrite) permissionDecisionApproveForSessionApproval() {} +func (PermissionDecisionApproveForSessionApprovalWrite) permissionDecisionApproveForSessionApproval() { +} func (PermissionDecisionApproveForSessionApprovalWrite) Kind() PermissionDecisionApproveForSessionApprovalKind { return PermissionDecisionApproveForSessionApprovalKindWrite } @@ -6009,8 +6107,8 @@ type PermissionRulesSet struct { // Experimental: PermissionsConfigureAdditionalContentExclusionPolicy is part of an // experimental API and may change or be removed. type PermissionsConfigureAdditionalContentExclusionPolicy struct { - LastUpdatedAt any `json:"last_updated_at"` - Rules []PermissionsConfigureAdditionalContentExclusionPolicyRule `json:"rules"` + LastUpdatedAt any `json:"last_updated_at"` + Rules []PermissionsConfigureAdditionalContentExclusionPolicyRule `json:"rules"` // Allowed values for the `PermissionsConfigureAdditionalContentExclusionPolicyScope` // enumeration. Scope PermissionsConfigureAdditionalContentExclusionPolicyScope `json:"scope"` @@ -6021,9 +6119,9 @@ type PermissionsConfigureAdditionalContentExclusionPolicy struct { // Experimental: PermissionsConfigureAdditionalContentExclusionPolicyRule is part of an // experimental API and may change or be removed. type PermissionsConfigureAdditionalContentExclusionPolicyRule struct { - IfAnyMatch []string `json:"ifAnyMatch,omitzero"` + IfAnyMatch []string `json:"ifAnyMatch,omitzero"` IfNoneMatch []string `json:"ifNoneMatch,omitzero"` - Paths []string `json:"paths"` + Paths []string `json:"paths"` // Source descriptor for a `session.permissions.configure` content-exclusion rule, with // source name and type. Source PermissionsConfigureAdditionalContentExclusionPolicyRuleSource `json:"source"` @@ -6100,10 +6198,12 @@ type RawPermissionsLocationsAddToolApprovalDetailsData struct { Raw json.RawMessage } -func (RawPermissionsLocationsAddToolApprovalDetailsData) permissionsLocationsAddToolApprovalDetails() {} +func (RawPermissionsLocationsAddToolApprovalDetailsData) permissionsLocationsAddToolApprovalDetails() { +} func (r RawPermissionsLocationsAddToolApprovalDetailsData) Kind() PermissionsLocationsAddToolApprovalDetailsKind { return r.Discriminator } + // Location-persisted tool approval details for specific command identifiers. // Experimental: PermissionsLocationsAddToolApprovalDetailsCommands is part of an // experimental API and may change or be removed. @@ -6112,10 +6212,12 @@ type PermissionsLocationsAddToolApprovalDetailsCommands struct { CommandIdentifiers []string `json:"commandIdentifiers"` } -func (PermissionsLocationsAddToolApprovalDetailsCommands) permissionsLocationsAddToolApprovalDetails() {} +func (PermissionsLocationsAddToolApprovalDetailsCommands) permissionsLocationsAddToolApprovalDetails() { +} func (PermissionsLocationsAddToolApprovalDetailsCommands) Kind() PermissionsLocationsAddToolApprovalDetailsKind { return PermissionsLocationsAddToolApprovalDetailsKindCommands } + // Location-persisted tool approval details for a custom tool, keyed by tool name. // Experimental: PermissionsLocationsAddToolApprovalDetailsCustomTool is part of an // experimental API and may change or be removed. @@ -6124,10 +6226,12 @@ type PermissionsLocationsAddToolApprovalDetailsCustomTool struct { ToolName string `json:"toolName"` } -func (PermissionsLocationsAddToolApprovalDetailsCustomTool) permissionsLocationsAddToolApprovalDetails() {} +func (PermissionsLocationsAddToolApprovalDetailsCustomTool) permissionsLocationsAddToolApprovalDetails() { +} func (PermissionsLocationsAddToolApprovalDetailsCustomTool) Kind() PermissionsLocationsAddToolApprovalDetailsKind { return PermissionsLocationsAddToolApprovalDetailsKindCustomTool } + // Location-persisted tool approval details for extension-management operations, optionally // narrowed by operation. // Experimental: PermissionsLocationsAddToolApprovalDetailsExtensionManagement is part of an @@ -6138,10 +6242,12 @@ type PermissionsLocationsAddToolApprovalDetailsExtensionManagement struct { Operation *string `json:"operation,omitempty"` } -func (PermissionsLocationsAddToolApprovalDetailsExtensionManagement) permissionsLocationsAddToolApprovalDetails() {} +func (PermissionsLocationsAddToolApprovalDetailsExtensionManagement) permissionsLocationsAddToolApprovalDetails() { +} func (PermissionsLocationsAddToolApprovalDetailsExtensionManagement) Kind() PermissionsLocationsAddToolApprovalDetailsKind { return PermissionsLocationsAddToolApprovalDetailsKindExtensionManagement } + // Location-persisted tool approval details for an extension's permission-gated capability // access, keyed by extension name. // Experimental: PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess is part @@ -6151,10 +6257,12 @@ type PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess struct ExtensionName string `json:"extensionName"` } -func (PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess) permissionsLocationsAddToolApprovalDetails() {} +func (PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess) permissionsLocationsAddToolApprovalDetails() { +} func (PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess) Kind() PermissionsLocationsAddToolApprovalDetailsKind { return PermissionsLocationsAddToolApprovalDetailsKindExtensionPermissionAccess } + // Location-persisted tool approval details for an MCP server tool, or all tools when // `toolName` is null. // Experimental: PermissionsLocationsAddToolApprovalDetailsMCP is part of an experimental @@ -6170,6 +6278,7 @@ func (PermissionsLocationsAddToolApprovalDetailsMCP) permissionsLocationsAddTool func (PermissionsLocationsAddToolApprovalDetailsMCP) Kind() PermissionsLocationsAddToolApprovalDetailsKind { return PermissionsLocationsAddToolApprovalDetailsKindMCP } + // Location-persisted tool approval details for MCP sampling requests from a server. // Experimental: PermissionsLocationsAddToolApprovalDetailsMCPSampling is part of an // experimental API and may change or be removed. @@ -6178,20 +6287,24 @@ type PermissionsLocationsAddToolApprovalDetailsMCPSampling struct { ServerName string `json:"serverName"` } -func (PermissionsLocationsAddToolApprovalDetailsMCPSampling) permissionsLocationsAddToolApprovalDetails() {} +func (PermissionsLocationsAddToolApprovalDetailsMCPSampling) permissionsLocationsAddToolApprovalDetails() { +} func (PermissionsLocationsAddToolApprovalDetailsMCPSampling) Kind() PermissionsLocationsAddToolApprovalDetailsKind { return PermissionsLocationsAddToolApprovalDetailsKindMCPSampling } + // Location-persisted tool approval details for writes to long-term memory. // Experimental: PermissionsLocationsAddToolApprovalDetailsMemory is part of an experimental // API and may change or be removed. type PermissionsLocationsAddToolApprovalDetailsMemory struct { } -func (PermissionsLocationsAddToolApprovalDetailsMemory) permissionsLocationsAddToolApprovalDetails() {} +func (PermissionsLocationsAddToolApprovalDetailsMemory) permissionsLocationsAddToolApprovalDetails() { +} func (PermissionsLocationsAddToolApprovalDetailsMemory) Kind() PermissionsLocationsAddToolApprovalDetailsKind { return PermissionsLocationsAddToolApprovalDetailsKindMemory } + // Location-persisted tool approval details for read-only filesystem operations. // Experimental: PermissionsLocationsAddToolApprovalDetailsRead is part of an experimental // API and may change or be removed. @@ -6202,6 +6315,7 @@ func (PermissionsLocationsAddToolApprovalDetailsRead) permissionsLocationsAddToo func (PermissionsLocationsAddToolApprovalDetailsRead) Kind() PermissionsLocationsAddToolApprovalDetailsKind { return PermissionsLocationsAddToolApprovalDetailsKindRead } + // Location-persisted tool approval details for filesystem write operations. // Experimental: PermissionsLocationsAddToolApprovalDetailsWrite is part of an experimental // API and may change or be removed. @@ -6865,6 +6979,7 @@ func (RawPushAttachmentData) pushAttachment() {} func (r RawPushAttachmentData) Type() PushAttachmentType { return r.Discriminator } + // Slim input shape for extension_context attachments; identity fields are runtime-derived. // Experimental: ExtensionContextPushInput is part of an experimental API and may change or // be removed. @@ -6879,6 +6994,7 @@ func (ExtensionContextPushInput) pushAttachment() {} func (ExtensionContextPushInput) Type() PushAttachmentType { return PushAttachmentTypeExtensionContext } + // Blob attachment with inline base64-encoded data // Experimental: PushAttachmentBlob is part of an experimental API and may change or be // removed. @@ -6895,6 +7011,7 @@ func (PushAttachmentBlob) pushAttachment() {} func (PushAttachmentBlob) Type() PushAttachmentType { return PushAttachmentTypeBlob } + // Directory attachment // Experimental: PushAttachmentDirectory is part of an experimental API and may change or be // removed. @@ -6909,6 +7026,7 @@ func (PushAttachmentDirectory) pushAttachment() {} func (PushAttachmentDirectory) Type() PushAttachmentType { return PushAttachmentTypeDirectory } + // File attachment // Experimental: PushAttachmentFile is part of an experimental API and may change or be // removed. @@ -6925,6 +7043,7 @@ func (PushAttachmentFile) pushAttachment() {} func (PushAttachmentFile) Type() PushAttachmentType { return PushAttachmentTypeFile } + // Pointer to a GitHub Actions job. // Experimental: PushAttachmentGitHubActionsJob is part of an experimental API and may // change or be removed. @@ -6948,6 +7067,7 @@ func (PushAttachmentGitHubActionsJob) pushAttachment() {} func (PushAttachmentGitHubActionsJob) Type() PushAttachmentType { return PushAttachmentTypeGitHubActionsJob } + // Pointer to a GitHub commit. // Experimental: PushAttachmentGitHubCommit is part of an experimental API and may change or // be removed. @@ -6966,6 +7086,7 @@ func (PushAttachmentGitHubCommit) pushAttachment() {} func (PushAttachmentGitHubCommit) Type() PushAttachmentType { return PushAttachmentTypeGitHubCommit } + // Pointer to a file in a GitHub repository at a specific ref. // Experimental: PushAttachmentGitHubFile is part of an experimental API and may change or // be removed. @@ -6984,6 +7105,7 @@ func (PushAttachmentGitHubFile) pushAttachment() {} func (PushAttachmentGitHubFile) Type() PushAttachmentType { return PushAttachmentTypeGitHubFile } + // Pointer to a single-file diff. At least one of `head` and `base` must be present. // Experimental: PushAttachmentGitHubFileDiff is part of an experimental API and may change // or be removed. @@ -7000,6 +7122,7 @@ func (PushAttachmentGitHubFileDiff) pushAttachment() {} func (PushAttachmentGitHubFileDiff) Type() PushAttachmentType { return PushAttachmentTypeGitHubFileDiff } + // GitHub issue, pull request, or discussion reference // Experimental: PushAttachmentGitHubReference is part of an experimental API and may change // or be removed. @@ -7020,6 +7143,7 @@ func (PushAttachmentGitHubReference) pushAttachment() {} func (PushAttachmentGitHubReference) Type() PushAttachmentType { return PushAttachmentTypeGitHubReference } + // Pointer to a GitHub release. // Experimental: PushAttachmentGitHubRelease is part of an experimental API and may change // or be removed. @@ -7038,6 +7162,7 @@ func (PushAttachmentGitHubRelease) pushAttachment() {} func (PushAttachmentGitHubRelease) Type() PushAttachmentType { return PushAttachmentTypeGitHubRelease } + // Pointer to a GitHub repository. // Experimental: PushAttachmentGitHubRepository is part of an experimental API and may // change or be removed. @@ -7057,6 +7182,7 @@ func (PushAttachmentGitHubRepository) pushAttachment() {} func (PushAttachmentGitHubRepository) Type() PushAttachmentType { return PushAttachmentTypeGitHubRepository } + // Pointer to a line range inside a file in a GitHub repository. // Experimental: PushAttachmentGitHubSnippet is part of an experimental API and may change // or be removed. @@ -7077,6 +7203,7 @@ func (PushAttachmentGitHubSnippet) pushAttachment() {} func (PushAttachmentGitHubSnippet) Type() PushAttachmentType { return PushAttachmentTypeGitHubSnippet } + // Pointer to a comparison between two git revisions. // Experimental: PushAttachmentGitHubTreeComparison is part of an experimental API and may // change or be removed. @@ -7093,6 +7220,7 @@ func (PushAttachmentGitHubTreeComparison) pushAttachment() {} func (PushAttachmentGitHubTreeComparison) Type() PushAttachmentType { return PushAttachmentTypeGitHubTreeComparison } + // Generic GitHub URL reference. // Experimental: PushAttachmentGitHubURL is part of an experimental API and may change or be // removed. @@ -7105,6 +7233,7 @@ func (PushAttachmentGitHubURL) pushAttachment() {} func (PushAttachmentGitHubURL) Type() PushAttachmentType { return PushAttachmentTypeGitHubURL } + // Code selection attachment from an editor // Experimental: PushAttachmentSelection is part of an experimental API and may change or be // removed. @@ -7244,6 +7373,7 @@ func (QueuedCommandHandled) queuedCommandResult() {} func (QueuedCommandHandled) Handled() bool { return true } + // Queued-command response indicating the host did not execute the command and the queue may // continue. // Experimental: QueuedCommandNotHandled is part of an experimental API and may change or be @@ -7487,8 +7617,8 @@ type QueueSnapshotResult struct { // removed. type QueueUpdateTextRequest struct { DisplayPrompt *string `json:"displayPrompt,omitempty"` - ID string `json:"id"` - Prompt string `json:"prompt"` + ID string `json:"id"` + Prompt string `json:"prompt"` } // Result of editing a queued message. @@ -7620,6 +7750,7 @@ func (RawRemoteControlStatusData) remoteControlStatus() {} func (r RawRemoteControlStatusData) State() RemoteControlStatusState { return r.Discriminator } + // Remote control is connected to a local session. // Experimental: RemoteControlStatusActive is part of an experimental API and may change or // be removed. @@ -7649,6 +7780,7 @@ func (RemoteControlStatusActive) remoteControlStatus() {} func (RemoteControlStatusActive) State() RemoteControlStatusState { return RemoteControlStatusStateActive } + // Remote control is in the middle of initial setup. // Experimental: RemoteControlStatusConnecting is part of an experimental API and may change // or be removed. @@ -7661,6 +7793,7 @@ func (RemoteControlStatusConnecting) remoteControlStatus() {} func (RemoteControlStatusConnecting) State() RemoteControlStatusState { return RemoteControlStatusStateConnecting } + // The last setup attempt failed. The singleton is otherwise off. // Experimental: RemoteControlStatusError is part of an experimental API and may change or // be removed. @@ -7675,6 +7808,7 @@ func (RemoteControlStatusError) remoteControlStatus() {} func (RemoteControlStatusError) State() RemoteControlStatusState { return RemoteControlStatusStateError } + // Remote control is not connected. // Experimental: RemoteControlStatusOff is part of an experimental API and may change or be // removed. @@ -8723,7 +8857,7 @@ type SessionFSSqliteQueryResult struct { // change or be removed. type SessionFSSqliteTransactionError struct { ErrorClass SessionFSSqliteTransactionErrorClass `json:"errorClass"` - Message string `json:"message"` + Message string `json:"message"` } // Statements to execute atomically. Providers apply busy handling for every call. @@ -8731,7 +8865,7 @@ type SessionFSSqliteTransactionError struct { // change or be removed. type SessionFSSqliteTransactionRequest struct { // Target session identifier - SessionID string `json:"sessionId"` + SessionID string `json:"sessionId"` Statements []SessionFSSqliteTransactionStatement `json:"statements"` } @@ -8739,8 +8873,8 @@ type SessionFSSqliteTransactionRequest struct { // Experimental: SessionFSSqliteTransactionResult is part of an experimental API and may // change or be removed. type SessionFSSqliteTransactionResult struct { - Error *SessionFSSqliteTransactionError `json:"error,omitempty"` - Results []SessionFSSqliteQueryResult `json:"results"` + Error *SessionFSSqliteTransactionError `json:"error,omitempty"` + Results []SessionFSSqliteQueryResult `json:"results"` } // One statement in an atomic SQLite transaction. @@ -8842,9 +8976,9 @@ type SessionInstalledPlugin struct { // or be removed. type SessionInstalledPluginSource struct { SessionInstalledPluginSourceGitHub *SessionInstalledPluginSourceGitHub - SessionInstalledPluginSourceLocal *SessionInstalledPluginSourceLocal - SessionInstalledPluginSourceURL *SessionInstalledPluginSourceURL - String *string + SessionInstalledPluginSourceLocal *SessionInstalledPluginSourceLocal + SessionInstalledPluginSourceURL *SessionInstalledPluginSourceURL + String *string } // Source descriptor for a direct GitHub plugin install, with `owner/repo`, optional ref or @@ -8853,8 +8987,8 @@ type SessionInstalledPluginSource struct { // change or be removed. type SessionInstalledPluginSourceGitHub struct { Path *string `json:"path,omitempty"` - Ref *string `json:"ref,omitempty"` - Repo string `json:"repo"` + Ref *string `json:"ref,omitempty"` + Repo string `json:"repo"` // Optional full 40-character hexadecimal commit SHA. Sha *string `json:"sha,omitempty"` // Constant value. Always "github". @@ -8876,12 +9010,12 @@ type SessionInstalledPluginSourceLocal struct { // change or be removed. type SessionInstalledPluginSourceURL struct { Path *string `json:"path,omitempty"` - Ref *string `json:"ref,omitempty"` + Ref *string `json:"ref,omitempty"` // Optional full 40-character hexadecimal commit SHA. Sha *string `json:"sha,omitempty"` // Constant value. Always "url". Source SessionInstalledPluginSourceURLSource `json:"source"` - URL string `json:"url"` + URL string `json:"url"` } // Baseline data provenance for a prediction. @@ -8952,6 +9086,7 @@ func (RawSessionLimitPredictionResultData) sessionLimitPredictionResult() {} func (r RawSessionLimitPredictionResultData) Kind() SessionLimitPredictionResultKind { return r.Discriminator } + type SessionLimitPredictionResultAvailable struct { // Predicted session limit details. Prediction SessionLimitPredictionDetails `json:"prediction"` @@ -8961,6 +9096,7 @@ func (SessionLimitPredictionResultAvailable) sessionLimitPredictionResult() {} func (SessionLimitPredictionResultAvailable) Kind() SessionLimitPredictionResultKind { return SessionLimitPredictionResultKindAvailable } + type SessionLimitPredictionResultUnavailable struct { // Reason no prediction is available. Reason SessionLimitPredictionUnavailableReason `json:"reason"` @@ -8976,7 +9112,7 @@ func (SessionLimitPredictionResultUnavailable) Kind() SessionLimitPredictionResu // change or be removed. type SessionLimitPredictionTierOption struct { // AI-credit cap for this tier. - Cap float64 `json:"cap"` + Cap float64 `json:"cap"` Tier SessionLimitPredictionTier `json:"tier"` } @@ -9008,6 +9144,7 @@ func (LocalSessionMetadataValue) sessionListEntry() {} func (LocalSessionMetadataValue) sessionListEntryIsRemote() bool { return false } + // Remote session metadata for the session to hand off (typically obtained from // `sessions.list` with `source: "remote"`). // Experimental: RemoteSessionMetadataValue is part of an experimental API and may change or @@ -9201,7 +9338,7 @@ type SessionModelListRequest struct { // Experimental: SessionModelPriceCategory is part of an experimental API and may change or // be removed. type SessionModelPriceCategory struct { - ID string `json:"id"` + ID string `json:"id"` PriceCategory ModelPickerPriceCategory `json:"priceCategory"` } @@ -9402,8 +9539,8 @@ type SessionOpenOptions struct { // Experimental: SessionOpenOptionsAdditionalContentExclusionPolicy is part of an // experimental API and may change or be removed. type SessionOpenOptionsAdditionalContentExclusionPolicy struct { - LastUpdatedAt any `json:"last_updated_at"` - Rules []SessionOpenOptionsAdditionalContentExclusionPolicyRule `json:"rules"` + LastUpdatedAt any `json:"last_updated_at"` + Rules []SessionOpenOptionsAdditionalContentExclusionPolicyRule `json:"rules"` // Allowed values for the `SessionOpenOptionsAdditionalContentExclusionPolicyScope` // enumeration. Scope SessionOpenOptionsAdditionalContentExclusionPolicyScope `json:"scope"` @@ -9414,9 +9551,9 @@ type SessionOpenOptionsAdditionalContentExclusionPolicy struct { // Experimental: SessionOpenOptionsAdditionalContentExclusionPolicyRule is part of an // experimental API and may change or be removed. type SessionOpenOptionsAdditionalContentExclusionPolicyRule struct { - IfAnyMatch []string `json:"ifAnyMatch,omitzero"` + IfAnyMatch []string `json:"ifAnyMatch,omitzero"` IfNoneMatch []string `json:"ifNoneMatch,omitzero"` - Paths []string `json:"paths"` + Paths []string `json:"paths"` // Source descriptor for a `sessions.open` content-exclusion rule, with source name and type. Source SessionOpenOptionsAdditionalContentExclusionPolicyRuleSource `json:"source"` } @@ -9446,6 +9583,7 @@ func (RawSessionOpenParamsData) sessionOpenParams() {} func (r RawSessionOpenParamsData) Kind() SessionOpenParamsKind { return r.Discriminator } + // Parameters for attaching to an already-active session by ID. // Experimental: SessionsOpenAttach is part of an experimental API and may change or be // removed. @@ -9458,6 +9596,7 @@ func (SessionsOpenAttach) sessionOpenParams() {} func (SessionsOpenAttach) Kind() SessionOpenParamsKind { return SessionOpenParamsKindAttach } + // Parameters for creating a new cloud session. // Experimental: SessionsOpenCloud is part of an experimental API and may change or be // removed. @@ -9483,6 +9622,7 @@ func (SessionsOpenCloud) sessionOpenParams() {} func (SessionsOpenCloud) Kind() SessionOpenParamsKind { return SessionOpenParamsKindCloud } + // Parameters for creating a new local session. // Experimental: SessionsOpenCreate is part of an experimental API and may change or be // removed. @@ -9497,6 +9637,7 @@ func (SessionsOpenCreate) sessionOpenParams() {} func (SessionsOpenCreate) Kind() SessionOpenParamsKind { return SessionOpenParamsKindCreate } + // Parameters for fetching a remote session and handing it off to a new local session. // Experimental: SessionsOpenHandoff is part of an experimental API and may change or be // removed. @@ -9533,6 +9674,7 @@ func (SessionsOpenHandoff) sessionOpenParams() {} func (SessionsOpenHandoff) Kind() SessionOpenParamsKind { return SessionOpenParamsKindHandoff } + // Parameters for connecting to a live remote session. // Experimental: SessionsOpenRemote is part of an experimental API and may change or be // removed. @@ -9549,6 +9691,7 @@ func (SessionsOpenRemote) sessionOpenParams() {} func (SessionsOpenRemote) Kind() SessionOpenParamsKind { return SessionOpenParamsKindRemote } + // Parameters for resuming a specific local session. // Experimental: SessionsOpenResume is part of an experimental API and may change or be // removed. @@ -9567,6 +9710,7 @@ func (SessionsOpenResume) sessionOpenParams() {} func (SessionsOpenResume) Kind() SessionOpenParamsKind { return SessionOpenParamsKindResume } + // Parameters for resuming the most relevant local session. // Experimental: SessionsOpenResumeLast is part of an experimental API and may change or be // removed. @@ -9811,7 +9955,7 @@ type SessionSetCredentialsResult struct { // API and may change or be removed. type SessionSettingsBuiltInToolAvailabilitySnapshot struct { CreatePullRequest *bool `json:"createPullRequest,omitempty"` - ReportProgress *bool `json:"reportProgress,omitempty"` + ReportProgress *bool `json:"reportProgress,omitempty"` } // Named Rust-owned settings predicate to evaluate for this session. @@ -9836,25 +9980,25 @@ type SessionSettingsEvaluatePredicateResult struct { // be removed. type SessionSettingsJobSnapshot struct { BuiltInToolAvailability *SessionSettingsBuiltInToolAvailabilitySnapshot `json:"builtInToolAvailability,omitempty"` - EventType *string `json:"eventType,omitempty"` - IsTriggerJob *bool `json:"isTriggerJob,omitempty"` + EventType *string `json:"eventType,omitempty"` + IsTriggerJob *bool `json:"isTriggerJob,omitempty"` } // Redacted model routing settings for a session. // Experimental: SessionSettingsModelSnapshot is part of an experimental API and may change // or be removed. type SessionSettingsModelSnapshot struct { - CallbackURL *string `json:"callbackUrl,omitempty"` + CallbackURL *string `json:"callbackUrl,omitempty"` DefaultReasoningEffort *string `json:"defaultReasoningEffort,omitempty"` - InstanceID *string `json:"instanceId,omitempty"` - Model *string `json:"model,omitempty"` + InstanceID *string `json:"instanceId,omitempty"` + Model *string `json:"model,omitempty"` } // Online-evaluation settings safe to expose across the SDK boundary. // Experimental: SessionSettingsOnlineEvaluationSnapshot is part of an experimental API and // may change or be removed. type SessionSettingsOnlineEvaluationSnapshot struct { - DisableOnlineEvaluation *bool `json:"disableOnlineEvaluation,omitempty"` + DisableOnlineEvaluation *bool `json:"disableOnlineEvaluation,omitempty"` EnableOnlineEvaluationOutputFile *bool `json:"enableOnlineEvaluationOutputFile,omitempty"` } @@ -9862,18 +10006,18 @@ type SessionSettingsOnlineEvaluationSnapshot struct { // Experimental: SessionSettingsRepoSnapshot is part of an experimental API and may change // or be removed. type SessionSettingsRepoSnapshot struct { - Branch *string `json:"branch,omitempty"` - Commit *string `json:"commit,omitempty"` - Host *string `json:"host,omitempty"` - HostProtocol *string `json:"hostProtocol,omitempty"` - ID *float64 `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - OwnerID *float64 `json:"ownerId,omitempty"` - OwnerName *string `json:"ownerName,omitempty"` - PrCommitCount *float64 `json:"prCommitCount,omitempty"` - ReadWrite *bool `json:"readWrite,omitempty"` - SecretScanningURL *string `json:"secretScanningUrl,omitempty"` - ServerURL *string `json:"serverUrl,omitempty"` + Branch *string `json:"branch,omitempty"` + Commit *string `json:"commit,omitempty"` + Host *string `json:"host,omitempty"` + HostProtocol *string `json:"hostProtocol,omitempty"` + ID *float64 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + OwnerID *float64 `json:"ownerId,omitempty"` + OwnerName *string `json:"ownerName,omitempty"` + PrCommitCount *float64 `json:"prCommitCount,omitempty"` + ReadWrite *bool `json:"readWrite,omitempty"` + SecretScanningURL *string `json:"secretScanningUrl,omitempty"` + ServerURL *string `json:"serverUrl,omitempty"` } // Redacted, serializable view of session runtime settings for SDK boundary consumers. @@ -9881,30 +10025,30 @@ type SessionSettingsRepoSnapshot struct { // Experimental: SessionSettingsSnapshot is part of an experimental API and may change or be // removed. type SessionSettingsSnapshot struct { - ClientName *string `json:"clientName,omitempty"` - Job SessionSettingsJobSnapshot `json:"job"` - Model SessionSettingsModelSnapshot `json:"model"` + ClientName *string `json:"clientName,omitempty"` + Job SessionSettingsJobSnapshot `json:"job"` + Model SessionSettingsModelSnapshot `json:"model"` OnlineEvaluation SessionSettingsOnlineEvaluationSnapshot `json:"onlineEvaluation"` - Repo SessionSettingsRepoSnapshot `json:"repo"` - StartTimeMs *float64 `json:"startTimeMs,omitempty"` - TimeoutMs *float64 `json:"timeoutMs,omitempty"` - Validation SessionSettingsValidationSnapshot `json:"validation"` - Version *string `json:"version,omitempty"` + Repo SessionSettingsRepoSnapshot `json:"repo"` + StartTimeMs *float64 `json:"startTimeMs,omitempty"` + TimeoutMs *float64 `json:"timeoutMs,omitempty"` + Validation SessionSettingsValidationSnapshot `json:"validation"` + Version *string `json:"version,omitempty"` } // Redacted validation and memory-tool settings for a session. // Experimental: SessionSettingsValidationSnapshot is part of an experimental API and may // change or be removed. type SessionSettingsValidationSnapshot struct { - AdvisoryEnabled *bool `json:"advisoryEnabled,omitempty"` - CodeqlEnabled *bool `json:"codeqlEnabled,omitempty"` - CodeReviewEnabled *bool `json:"codeReviewEnabled,omitempty"` - CodeReviewModel *string `json:"codeReviewModel,omitempty"` - DependabotTimeout *float64 `json:"dependabotTimeout,omitempty"` - MemoryStoreEnabled *bool `json:"memoryStoreEnabled,omitempty"` - MemoryVoteEnabled *bool `json:"memoryVoteEnabled,omitempty"` - SecretScanningEnabled *bool `json:"secretScanningEnabled,omitempty"` - Timeout *float64 `json:"timeout,omitempty"` + AdvisoryEnabled *bool `json:"advisoryEnabled,omitempty"` + CodeqlEnabled *bool `json:"codeqlEnabled,omitempty"` + CodeReviewEnabled *bool `json:"codeReviewEnabled,omitempty"` + CodeReviewModel *string `json:"codeReviewModel,omitempty"` + DependabotTimeout *float64 `json:"dependabotTimeout,omitempty"` + MemoryStoreEnabled *bool `json:"memoryStoreEnabled,omitempty"` + MemoryVoteEnabled *bool `json:"memoryVoteEnabled,omitempty"` + SecretScanningEnabled *bool `json:"secretScanningEnabled,omitempty"` + Timeout *float64 `json:"timeout,omitempty"` } // UUID prefix to resolve to a unique session ID. @@ -10790,6 +10934,7 @@ func (RawSlashCommandInvocationResultData) slashCommandInvocationResult() {} func (r RawSlashCommandInvocationResultData) Kind() SlashCommandInvocationResultKind { return r.Discriminator } + // Slash-command invocation result that submits an agent prompt, with display prompt, // optional mode, optional user-facing notice, and settings-change flag. // Experimental: SlashCommandAgentPromptResult is part of an experimental API and may change @@ -10812,6 +10957,7 @@ func (SlashCommandAgentPromptResult) slashCommandInvocationResult() {} func (SlashCommandAgentPromptResult) Kind() SlashCommandInvocationResultKind { return SlashCommandInvocationResultKindAgentPrompt } + // Slash-command invocation result indicating completion, with optional message and // settings-change flag. // Experimental: SlashCommandCompletedResult is part of an experimental API and may change @@ -10828,6 +10974,7 @@ func (SlashCommandCompletedResult) slashCommandInvocationResult() {} func (SlashCommandCompletedResult) Kind() SlashCommandInvocationResultKind { return SlashCommandInvocationResultKindCompleted } + // Slash-command invocation result asking the client to present subcommand options for a // parent command. // Experimental: SlashCommandSelectSubcommandResult is part of an experimental API and may @@ -10848,6 +10995,7 @@ func (SlashCommandSelectSubcommandResult) slashCommandInvocationResult() {} func (SlashCommandSelectSubcommandResult) Kind() SlashCommandInvocationResultKind { return SlashCommandInvocationResultKindSelectSubcommand } + // Slash-command invocation result containing text output plus Markdown/ANSI rendering flags. // Experimental: SlashCommandTextResult is part of an experimental API and may change or be // removed. @@ -10924,6 +11072,7 @@ func (RawTaskInfoData) taskInfo() {} func (r RawTaskInfoData) Type() TaskInfoType { return r.Discriminator } + // Tracked background agent task metadata, including IDs, status, timing, agent type, // prompt, model, result, and latest response. // Experimental: TaskAgentInfo is part of an experimental API and may change or be removed. @@ -10973,6 +11122,7 @@ func (TaskAgentInfo) taskInfo() {} func (TaskAgentInfo) Type() TaskInfoType { return TaskInfoTypeAgent } + // Tracked shell task metadata, including ID, command, status, timing, attachment/execution // mode, log path, and PID. // Experimental: TaskShellInfo is part of an experimental API and may change or be removed. @@ -11029,6 +11179,7 @@ func (RawTaskProgressData) taskProgress() {} func (r RawTaskProgressData) Type() TaskProgressType { return r.Discriminator } + // Progress snapshot for an agent task, with recent activity lines and optional latest // intent. // Experimental: TaskAgentProgress is part of an experimental API and may change or be @@ -11044,6 +11195,7 @@ func (TaskAgentProgress) taskProgress() {} func (TaskAgentProgress) Type() TaskProgressType { return TaskProgressTypeAgent } + // Progress snapshot for a shell task, with recent stdout/stderr output and optional process // ID. // Experimental: TaskShellProgress is part of an experimental API and may change or be @@ -11401,6 +11553,7 @@ func (RawUIElicitationSchemaPropertyData) uiElicitationSchemaProperty() {} func (r RawUIElicitationSchemaPropertyData) Type() UIElicitationSchemaPropertyType { return r.Discriminator } + // Multi-select string field where each option pairs a value with a display label. // Experimental: UIElicitationArrayAnyOfField is part of an experimental API and may change // or be removed. @@ -11423,6 +11576,7 @@ func (UIElicitationArrayAnyOfField) uiElicitationSchemaProperty() {} func (UIElicitationArrayAnyOfField) Type() UIElicitationSchemaPropertyType { return UIElicitationSchemaPropertyTypeArray } + // Multi-select string field whose allowed values are defined inline. // Experimental: UIElicitationArrayEnumField is part of an experimental API and may change // or be removed. @@ -11445,6 +11599,7 @@ func (UIElicitationArrayEnumField) uiElicitationSchemaProperty() {} func (UIElicitationArrayEnumField) Type() UIElicitationSchemaPropertyType { return UIElicitationSchemaPropertyTypeArray } + // Boolean field rendered as a yes/no toggle. // Experimental: UIElicitationSchemaPropertyBoolean is part of an experimental API and may // change or be removed. @@ -11461,6 +11616,7 @@ func (UIElicitationSchemaPropertyBoolean) uiElicitationSchemaProperty() {} func (UIElicitationSchemaPropertyBoolean) Type() UIElicitationSchemaPropertyType { return UIElicitationSchemaPropertyTypeBoolean } + // Numeric field accepting either a number or an integer. // Experimental: UIElicitationSchemaPropertyNumber is part of an experimental API and may // change or be removed. @@ -11474,7 +11630,7 @@ type UIElicitationSchemaPropertyNumber struct { // Minimum allowed value (inclusive). Minimum *float64 `json:"minimum,omitempty"` // Human-readable label for the field. - Title *string `json:"title,omitempty"` + Title *string `json:"title,omitempty"` Discriminator UIElicitationSchemaPropertyNumberType `json:"type,omitempty"` } @@ -11485,6 +11641,7 @@ func (r UIElicitationSchemaPropertyNumber) Type() UIElicitationSchemaPropertyTyp } return UIElicitationSchemaPropertyType(r.Discriminator) } + // Free-text string field with optional length and format constraints. // Experimental: UIElicitationSchemaPropertyString is part of an experimental API and may // change or be removed. @@ -11507,6 +11664,7 @@ func (UIElicitationSchemaPropertyString) uiElicitationSchemaProperty() {} func (UIElicitationSchemaPropertyString) Type() UIElicitationSchemaPropertyType { return UIElicitationSchemaPropertyTypeString } + // Single-select string field whose allowed values are defined inline. // Experimental: UIElicitationStringEnumField is part of an experimental API and may change // or be removed. @@ -11527,6 +11685,7 @@ func (UIElicitationStringEnumField) uiElicitationSchemaProperty() {} func (UIElicitationStringEnumField) Type() UIElicitationSchemaPropertyType { return UIElicitationSchemaPropertyTypeString } + // Single-select string field where each option pairs a value with a display label. // Experimental: UIElicitationStringOneOfField is part of an experimental API and may change // or be removed. @@ -11941,6 +12100,7 @@ func (RawUserToolSessionApprovalData) userToolSessionApproval() {} func (r RawUserToolSessionApprovalData) Kind() UserToolSessionApprovalKind { return r.Discriminator } + // Session-scoped tool-approval rule for specific shell command identifiers. // Experimental: UserToolSessionApprovalCommands is part of an experimental API and may // change or be removed. @@ -11953,6 +12113,7 @@ func (UserToolSessionApprovalCommands) userToolSessionApproval() {} func (UserToolSessionApprovalCommands) Kind() UserToolSessionApprovalKind { return UserToolSessionApprovalKindCommands } + // Session-scoped tool-approval rule for a custom tool, keyed by tool name. // Experimental: UserToolSessionApprovalCustomTool is part of an experimental API and may // change or be removed. @@ -11965,6 +12126,7 @@ func (UserToolSessionApprovalCustomTool) userToolSessionApproval() {} func (UserToolSessionApprovalCustomTool) Kind() UserToolSessionApprovalKind { return UserToolSessionApprovalKindCustomTool } + // Session-scoped tool-approval rule for extension-management operations, optionally // narrowed by operation. // Experimental: UserToolSessionApprovalExtensionManagement is part of an experimental API @@ -11978,6 +12140,7 @@ func (UserToolSessionApprovalExtensionManagement) userToolSessionApproval() {} func (UserToolSessionApprovalExtensionManagement) Kind() UserToolSessionApprovalKind { return UserToolSessionApprovalKindExtensionManagement } + // Session-scoped tool-approval rule for an extension's permission-gated capability access, // keyed by extension name. // Experimental: UserToolSessionApprovalExtensionPermissionAccess is part of an experimental @@ -11991,6 +12154,7 @@ func (UserToolSessionApprovalExtensionPermissionAccess) userToolSessionApproval( func (UserToolSessionApprovalExtensionPermissionAccess) Kind() UserToolSessionApprovalKind { return UserToolSessionApprovalKindExtensionPermissionAccess } + // Session-scoped tool-approval rule for an MCP server tool, or all tools on the server when // `toolName` is null. // Experimental: UserToolSessionApprovalMCP is part of an experimental API and may change or @@ -12006,6 +12170,7 @@ func (UserToolSessionApprovalMCP) userToolSessionApproval() {} func (UserToolSessionApprovalMCP) Kind() UserToolSessionApprovalKind { return UserToolSessionApprovalKindMCP } + // Session-scoped tool-approval rule for writes to long-term memory. // Experimental: UserToolSessionApprovalMemory is part of an experimental API and may change // or be removed. @@ -12016,6 +12181,7 @@ func (UserToolSessionApprovalMemory) userToolSessionApproval() {} func (UserToolSessionApprovalMemory) Kind() UserToolSessionApprovalKind { return UserToolSessionApprovalKindMemory } + // Session-scoped tool-approval rule for read-only filesystem operations. // Experimental: UserToolSessionApprovalRead is part of an experimental API and may change // or be removed. @@ -12026,6 +12192,7 @@ func (UserToolSessionApprovalRead) userToolSessionApproval() {} func (UserToolSessionApprovalRead) Kind() UserToolSessionApprovalKind { return UserToolSessionApprovalKindRead } + // Session-scoped tool-approval rule for filesystem write operations. // Experimental: UserToolSessionApprovalWrite is part of an experimental API and may change // or be removed. @@ -12134,7 +12301,7 @@ type WorkspacesAddSummaryRequest struct { // Experimental: WorkspacesAddSummaryResult is part of an experimental API and may change or // be removed. type WorkspacesAddSummaryResult struct { - Summary any `json:"summary,omitempty"` + Summary any `json:"summary,omitempty"` Workspace any `json:"workspace,omitempty"` } @@ -12208,24 +12375,24 @@ type WorkspacesGetWorkspaceResult struct { } type WorkspacesGetWorkspaceResultWorkspace struct { - Branch *string `json:"branch,omitempty"` - ChronicleSyncDismissed *bool `json:"chronicle_sync_dismissed,omitempty"` - ClientName *string `json:"client_name,omitempty"` - CreatedAt *time.Time `json:"created_at,omitempty"` - Cwd *string `json:"cwd,omitempty"` - GitRoot *string `json:"git_root,omitempty"` + Branch *string `json:"branch,omitempty"` + ChronicleSyncDismissed *bool `json:"chronicle_sync_dismissed,omitempty"` + ClientName *string `json:"client_name,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + Cwd *string `json:"cwd,omitempty"` + GitRoot *string `json:"git_root,omitempty"` // Allowed values for the `WorkspacesWorkspaceDetailsHostType` enumeration. - HostType *WorkspacesWorkspaceDetailsHostType `json:"host_type,omitempty"` - ID string `json:"id"` - McLastEventID *string `json:"mc_last_event_id,omitempty"` - McSessionID *string `json:"mc_session_id,omitempty"` - McTaskID *string `json:"mc_task_id,omitempty"` - Name *string `json:"name,omitempty"` - RemoteSteerable *bool `json:"remote_steerable,omitempty"` - Repository *string `json:"repository,omitempty"` - SummaryCount *int64 `json:"summary_count,omitempty"` - UpdatedAt *time.Time `json:"updated_at,omitempty"` - UserNamed *bool `json:"user_named,omitempty"` + HostType *WorkspacesWorkspaceDetailsHostType `json:"host_type,omitempty"` + ID string `json:"id"` + McLastEventID *string `json:"mc_last_event_id,omitempty"` + McSessionID *string `json:"mc_session_id,omitempty"` + McTaskID *string `json:"mc_task_id,omitempty"` + Name *string `json:"name,omitempty"` + RemoteSteerable *bool `json:"remote_steerable,omitempty"` + Repository *string `json:"repository,omitempty"` + SummaryCount *int64 `json:"summary_count,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` + UserNamed *bool `json:"user_named,omitempty"` } // Workspace checkpoints in chronological order; empty when the workspace is not enabled. @@ -12521,8 +12688,8 @@ type AgentRegistrySpawnResultKind string const ( AgentRegistrySpawnResultKindRegistryTimeout AgentRegistrySpawnResultKind = "registry-timeout" - AgentRegistrySpawnResultKindSpawned AgentRegistrySpawnResultKind = "spawned" - AgentRegistrySpawnResultKindSpawnError AgentRegistrySpawnResultKind = "spawn-error" + AgentRegistrySpawnResultKindSpawned AgentRegistrySpawnResultKind = "spawned" + AgentRegistrySpawnResultKindSpawnError AgentRegistrySpawnResultKind = "spawn-error" AgentRegistrySpawnResultKindValidationError AgentRegistrySpawnResultKind = "validation-error" ) @@ -12584,21 +12751,21 @@ const ( type AttachmentType string const ( - AttachmentTypeBlob AttachmentType = "blob" - AttachmentTypeDirectory AttachmentType = "directory" - AttachmentTypeExtensionContext AttachmentType = "extension_context" - AttachmentTypeFile AttachmentType = "file" - AttachmentTypeGitHubActionsJob AttachmentType = "github_actions_job" - AttachmentTypeGitHubCommit AttachmentType = "github_commit" - AttachmentTypeGitHubFile AttachmentType = "github_file" - AttachmentTypeGitHubFileDiff AttachmentType = "github_file_diff" - AttachmentTypeGitHubReference AttachmentType = "github_reference" - AttachmentTypeGitHubRelease AttachmentType = "github_release" - AttachmentTypeGitHubRepository AttachmentType = "github_repository" - AttachmentTypeGitHubSnippet AttachmentType = "github_snippet" + AttachmentTypeBlob AttachmentType = "blob" + AttachmentTypeDirectory AttachmentType = "directory" + AttachmentTypeExtensionContext AttachmentType = "extension_context" + AttachmentTypeFile AttachmentType = "file" + AttachmentTypeGitHubActionsJob AttachmentType = "github_actions_job" + AttachmentTypeGitHubCommit AttachmentType = "github_commit" + AttachmentTypeGitHubFile AttachmentType = "github_file" + AttachmentTypeGitHubFileDiff AttachmentType = "github_file_diff" + AttachmentTypeGitHubReference AttachmentType = "github_reference" + AttachmentTypeGitHubRelease AttachmentType = "github_release" + AttachmentTypeGitHubRepository AttachmentType = "github_repository" + AttachmentTypeGitHubSnippet AttachmentType = "github_snippet" AttachmentTypeGitHubTreeComparison AttachmentType = "github_tree_comparison" - AttachmentTypeGitHubURL AttachmentType = "github_url" - AttachmentTypeSelection AttachmentType = "selection" + AttachmentTypeGitHubURL AttachmentType = "github_url" + AttachmentTypeSelection AttachmentType = "selection" ) // Type discriminator for AuthInfo. @@ -12606,13 +12773,13 @@ const ( type AuthInfoType string const ( - AuthInfoTypeAPIKey AuthInfoType = "api-key" + AuthInfoTypeAPIKey AuthInfoType = "api-key" AuthInfoTypeCopilotAPIToken AuthInfoType = "copilot-api-token" - AuthInfoTypeEnv AuthInfoType = "env" - AuthInfoTypeGhCLI AuthInfoType = "gh-cli" - AuthInfoTypeHMAC AuthInfoType = "hmac" - AuthInfoTypeToken AuthInfoType = "token" - AuthInfoTypeUser AuthInfoType = "user" + AuthInfoTypeEnv AuthInfoType = "env" + AuthInfoTypeGhCLI AuthInfoType = "gh-cli" + AuthInfoTypeHMAC AuthInfoType = "hmac" + AuthInfoTypeToken AuthInfoType = "token" + AuthInfoTypeUser AuthInfoType = "user" ) // Neutral SDK discriminator for the connected remote session kind. @@ -12665,7 +12832,7 @@ const ( type DebugCollectLogsDestinationKind string const ( - DebugCollectLogsDestinationKindArchive DebugCollectLogsDestinationKind = "archive" + DebugCollectLogsDestinationKindArchive DebugCollectLogsDestinationKind = "archive" DebugCollectLogsDestinationKindDirectory DebugCollectLogsDestinationKind = "directory" ) @@ -12834,13 +13001,13 @@ const ( type ExternalToolTextResultForLlmContentType string const ( - ExternalToolTextResultForLlmContentTypeAudio ExternalToolTextResultForLlmContentType = "audio" - ExternalToolTextResultForLlmContentTypeImage ExternalToolTextResultForLlmContentType = "image" - ExternalToolTextResultForLlmContentTypeResource ExternalToolTextResultForLlmContentType = "resource" + ExternalToolTextResultForLlmContentTypeAudio ExternalToolTextResultForLlmContentType = "audio" + ExternalToolTextResultForLlmContentTypeImage ExternalToolTextResultForLlmContentType = "image" + ExternalToolTextResultForLlmContentTypeResource ExternalToolTextResultForLlmContentType = "resource" ExternalToolTextResultForLlmContentTypeResourceLink ExternalToolTextResultForLlmContentType = "resource_link" - ExternalToolTextResultForLlmContentTypeShellExit ExternalToolTextResultForLlmContentType = "shell_exit" - ExternalToolTextResultForLlmContentTypeTerminal ExternalToolTextResultForLlmContentType = "terminal" - ExternalToolTextResultForLlmContentTypeText ExternalToolTextResultForLlmContentType = "text" + ExternalToolTextResultForLlmContentTypeShellExit ExternalToolTextResultForLlmContentType = "shell_exit" + ExternalToolTextResultForLlmContentTypeTerminal ExternalToolTextResultForLlmContentType = "terminal" + ExternalToolTextResultForLlmContentTypeText ExternalToolTextResultForLlmContentType = "text" ) // Execution-critical factory storage operation. @@ -12920,7 +13087,7 @@ type FactoryRunFailureType string const ( FactoryRunFailureTypeFactoryDurableFailure FactoryRunFailureType = "factory_durable_failure" - FactoryRunFailureTypeFactoryLimitReached FactoryRunFailureType = "factory_limit_reached" + FactoryRunFailureTypeFactoryLimitReached FactoryRunFailureType = "factory_limit_reached" FactoryRunFailureTypeFactoryResumeDeclined FactoryRunFailureType = "factory_resume_declined" ) @@ -13314,7 +13481,7 @@ type MCPHeadersHandlePendingHeadersRefreshRequestKind string const ( MCPHeadersHandlePendingHeadersRefreshRequestKindHeaders MCPHeadersHandlePendingHeadersRefreshRequestKind = "headers" - MCPHeadersHandlePendingHeadersRefreshRequestKindNone MCPHeadersHandlePendingHeadersRefreshRequestKind = "none" + MCPHeadersHandlePendingHeadersRefreshRequestKindNone MCPHeadersHandlePendingHeadersRefreshRequestKind = "none" ) // OAuth grant type override for this login. @@ -13335,7 +13502,7 @@ type MCPOauthPendingRequestResponseKind string const ( MCPOauthPendingRequestResponseKindCancelled MCPOauthPendingRequestResponseKind = "cancelled" - MCPOauthPendingRequestResponseKindToken MCPOauthPendingRequestResponseKind = "token" + MCPOauthPendingRequestResponseKindToken MCPOauthPendingRequestResponseKind = "token" ) // Outcome of the sampling inference. 'success' produced a response; 'failure' encountered @@ -13611,51 +13778,51 @@ const ( type PermissionDecisionApproveForLocationApprovalKind string const ( - PermissionDecisionApproveForLocationApprovalKindCommands PermissionDecisionApproveForLocationApprovalKind = "commands" - PermissionDecisionApproveForLocationApprovalKindCustomTool PermissionDecisionApproveForLocationApprovalKind = "custom-tool" - PermissionDecisionApproveForLocationApprovalKindExtensionManagement PermissionDecisionApproveForLocationApprovalKind = "extension-management" + PermissionDecisionApproveForLocationApprovalKindCommands PermissionDecisionApproveForLocationApprovalKind = "commands" + PermissionDecisionApproveForLocationApprovalKindCustomTool PermissionDecisionApproveForLocationApprovalKind = "custom-tool" + PermissionDecisionApproveForLocationApprovalKindExtensionManagement PermissionDecisionApproveForLocationApprovalKind = "extension-management" PermissionDecisionApproveForLocationApprovalKindExtensionPermissionAccess PermissionDecisionApproveForLocationApprovalKind = "extension-permission-access" - PermissionDecisionApproveForLocationApprovalKindMCP PermissionDecisionApproveForLocationApprovalKind = "mcp" - PermissionDecisionApproveForLocationApprovalKindMCPSampling PermissionDecisionApproveForLocationApprovalKind = "mcp-sampling" - PermissionDecisionApproveForLocationApprovalKindMemory PermissionDecisionApproveForLocationApprovalKind = "memory" - PermissionDecisionApproveForLocationApprovalKindRead PermissionDecisionApproveForLocationApprovalKind = "read" - PermissionDecisionApproveForLocationApprovalKindWrite PermissionDecisionApproveForLocationApprovalKind = "write" + PermissionDecisionApproveForLocationApprovalKindMCP PermissionDecisionApproveForLocationApprovalKind = "mcp" + PermissionDecisionApproveForLocationApprovalKindMCPSampling PermissionDecisionApproveForLocationApprovalKind = "mcp-sampling" + PermissionDecisionApproveForLocationApprovalKindMemory PermissionDecisionApproveForLocationApprovalKind = "memory" + PermissionDecisionApproveForLocationApprovalKindRead PermissionDecisionApproveForLocationApprovalKind = "read" + PermissionDecisionApproveForLocationApprovalKindWrite PermissionDecisionApproveForLocationApprovalKind = "write" ) // Kind discriminator for PermissionDecisionApproveForSessionApproval. type PermissionDecisionApproveForSessionApprovalKind string const ( - PermissionDecisionApproveForSessionApprovalKindCommands PermissionDecisionApproveForSessionApprovalKind = "commands" - PermissionDecisionApproveForSessionApprovalKindCustomTool PermissionDecisionApproveForSessionApprovalKind = "custom-tool" - PermissionDecisionApproveForSessionApprovalKindExtensionManagement PermissionDecisionApproveForSessionApprovalKind = "extension-management" + PermissionDecisionApproveForSessionApprovalKindCommands PermissionDecisionApproveForSessionApprovalKind = "commands" + PermissionDecisionApproveForSessionApprovalKindCustomTool PermissionDecisionApproveForSessionApprovalKind = "custom-tool" + PermissionDecisionApproveForSessionApprovalKindExtensionManagement PermissionDecisionApproveForSessionApprovalKind = "extension-management" PermissionDecisionApproveForSessionApprovalKindExtensionPermissionAccess PermissionDecisionApproveForSessionApprovalKind = "extension-permission-access" - PermissionDecisionApproveForSessionApprovalKindMCP PermissionDecisionApproveForSessionApprovalKind = "mcp" - PermissionDecisionApproveForSessionApprovalKindMCPSampling PermissionDecisionApproveForSessionApprovalKind = "mcp-sampling" - PermissionDecisionApproveForSessionApprovalKindMemory PermissionDecisionApproveForSessionApprovalKind = "memory" - PermissionDecisionApproveForSessionApprovalKindRead PermissionDecisionApproveForSessionApprovalKind = "read" - PermissionDecisionApproveForSessionApprovalKindWrite PermissionDecisionApproveForSessionApprovalKind = "write" + PermissionDecisionApproveForSessionApprovalKindMCP PermissionDecisionApproveForSessionApprovalKind = "mcp" + PermissionDecisionApproveForSessionApprovalKindMCPSampling PermissionDecisionApproveForSessionApprovalKind = "mcp-sampling" + PermissionDecisionApproveForSessionApprovalKindMemory PermissionDecisionApproveForSessionApprovalKind = "memory" + PermissionDecisionApproveForSessionApprovalKindRead PermissionDecisionApproveForSessionApprovalKind = "read" + PermissionDecisionApproveForSessionApprovalKindWrite PermissionDecisionApproveForSessionApprovalKind = "write" ) // Kind discriminator for PermissionDecision. type PermissionDecisionKind string const ( - PermissionDecisionKindApproved PermissionDecisionKind = "approved" - PermissionDecisionKindApprovedForLocation PermissionDecisionKind = "approved-for-location" - PermissionDecisionKindApprovedForSession PermissionDecisionKind = "approved-for-session" - PermissionDecisionKindApproveForLocation PermissionDecisionKind = "approve-for-location" - PermissionDecisionKindApproveForSession PermissionDecisionKind = "approve-for-session" - PermissionDecisionKindApproveOnce PermissionDecisionKind = "approve-once" - PermissionDecisionKindApprovePermanently PermissionDecisionKind = "approve-permanently" - PermissionDecisionKindCancelled PermissionDecisionKind = "cancelled" - PermissionDecisionKindDeniedByContentExclusionPolicy PermissionDecisionKind = "denied-by-content-exclusion-policy" - PermissionDecisionKindDeniedByPermissionRequestHook PermissionDecisionKind = "denied-by-permission-request-hook" - PermissionDecisionKindDeniedByRules PermissionDecisionKind = "denied-by-rules" - PermissionDecisionKindDeniedInteractivelyByUser PermissionDecisionKind = "denied-interactively-by-user" + PermissionDecisionKindApproved PermissionDecisionKind = "approved" + PermissionDecisionKindApprovedForLocation PermissionDecisionKind = "approved-for-location" + PermissionDecisionKindApprovedForSession PermissionDecisionKind = "approved-for-session" + PermissionDecisionKindApproveForLocation PermissionDecisionKind = "approve-for-location" + PermissionDecisionKindApproveForSession PermissionDecisionKind = "approve-for-session" + PermissionDecisionKindApproveOnce PermissionDecisionKind = "approve-once" + PermissionDecisionKindApprovePermanently PermissionDecisionKind = "approve-permanently" + PermissionDecisionKindCancelled PermissionDecisionKind = "cancelled" + PermissionDecisionKindDeniedByContentExclusionPolicy PermissionDecisionKind = "denied-by-content-exclusion-policy" + PermissionDecisionKindDeniedByPermissionRequestHook PermissionDecisionKind = "denied-by-permission-request-hook" + PermissionDecisionKindDeniedByRules PermissionDecisionKind = "denied-by-rules" + PermissionDecisionKindDeniedInteractivelyByUser PermissionDecisionKind = "denied-interactively-by-user" PermissionDecisionKindDeniedNoApprovalRuleAndCouldNotRequestFromUser PermissionDecisionKind = "denied-no-approval-rule-and-could-not-request-from-user" - PermissionDecisionKindReject PermissionDecisionKind = "reject" - PermissionDecisionKindUserNotAvailable PermissionDecisionKind = "user-not-available" + PermissionDecisionKindReject PermissionDecisionKind = "reject" + PermissionDecisionKindUserNotAvailable PermissionDecisionKind = "user-not-available" ) // Whether the location is a git repo or directory @@ -13702,15 +13869,15 @@ const ( type PermissionsLocationsAddToolApprovalDetailsKind string const ( - PermissionsLocationsAddToolApprovalDetailsKindCommands PermissionsLocationsAddToolApprovalDetailsKind = "commands" - PermissionsLocationsAddToolApprovalDetailsKindCustomTool PermissionsLocationsAddToolApprovalDetailsKind = "custom-tool" - PermissionsLocationsAddToolApprovalDetailsKindExtensionManagement PermissionsLocationsAddToolApprovalDetailsKind = "extension-management" + PermissionsLocationsAddToolApprovalDetailsKindCommands PermissionsLocationsAddToolApprovalDetailsKind = "commands" + PermissionsLocationsAddToolApprovalDetailsKindCustomTool PermissionsLocationsAddToolApprovalDetailsKind = "custom-tool" + PermissionsLocationsAddToolApprovalDetailsKindExtensionManagement PermissionsLocationsAddToolApprovalDetailsKind = "extension-management" PermissionsLocationsAddToolApprovalDetailsKindExtensionPermissionAccess PermissionsLocationsAddToolApprovalDetailsKind = "extension-permission-access" - PermissionsLocationsAddToolApprovalDetailsKindMCP PermissionsLocationsAddToolApprovalDetailsKind = "mcp" - PermissionsLocationsAddToolApprovalDetailsKindMCPSampling PermissionsLocationsAddToolApprovalDetailsKind = "mcp-sampling" - PermissionsLocationsAddToolApprovalDetailsKindMemory PermissionsLocationsAddToolApprovalDetailsKind = "memory" - PermissionsLocationsAddToolApprovalDetailsKindRead PermissionsLocationsAddToolApprovalDetailsKind = "read" - PermissionsLocationsAddToolApprovalDetailsKindWrite PermissionsLocationsAddToolApprovalDetailsKind = "write" + PermissionsLocationsAddToolApprovalDetailsKindMCP PermissionsLocationsAddToolApprovalDetailsKind = "mcp" + PermissionsLocationsAddToolApprovalDetailsKindMCPSampling PermissionsLocationsAddToolApprovalDetailsKind = "mcp-sampling" + PermissionsLocationsAddToolApprovalDetailsKindMemory PermissionsLocationsAddToolApprovalDetailsKind = "memory" + PermissionsLocationsAddToolApprovalDetailsKindRead PermissionsLocationsAddToolApprovalDetailsKind = "read" + PermissionsLocationsAddToolApprovalDetailsKindWrite PermissionsLocationsAddToolApprovalDetailsKind = "write" ) // Whether the change applies to ephemeral session-scoped rules (cleared at session end) or @@ -13852,21 +14019,21 @@ const ( type PushAttachmentType string const ( - PushAttachmentTypeBlob PushAttachmentType = "blob" - PushAttachmentTypeDirectory PushAttachmentType = "directory" - PushAttachmentTypeExtensionContext PushAttachmentType = "extension_context" - PushAttachmentTypeFile PushAttachmentType = "file" - PushAttachmentTypeGitHubActionsJob PushAttachmentType = "github_actions_job" - PushAttachmentTypeGitHubCommit PushAttachmentType = "github_commit" - PushAttachmentTypeGitHubFile PushAttachmentType = "github_file" - PushAttachmentTypeGitHubFileDiff PushAttachmentType = "github_file_diff" - PushAttachmentTypeGitHubReference PushAttachmentType = "github_reference" - PushAttachmentTypeGitHubRelease PushAttachmentType = "github_release" - PushAttachmentTypeGitHubRepository PushAttachmentType = "github_repository" - PushAttachmentTypeGitHubSnippet PushAttachmentType = "github_snippet" + PushAttachmentTypeBlob PushAttachmentType = "blob" + PushAttachmentTypeDirectory PushAttachmentType = "directory" + PushAttachmentTypeExtensionContext PushAttachmentType = "extension_context" + PushAttachmentTypeFile PushAttachmentType = "file" + PushAttachmentTypeGitHubActionsJob PushAttachmentType = "github_actions_job" + PushAttachmentTypeGitHubCommit PushAttachmentType = "github_commit" + PushAttachmentTypeGitHubFile PushAttachmentType = "github_file" + PushAttachmentTypeGitHubFileDiff PushAttachmentType = "github_file_diff" + PushAttachmentTypeGitHubReference PushAttachmentType = "github_reference" + PushAttachmentTypeGitHubRelease PushAttachmentType = "github_release" + PushAttachmentTypeGitHubRepository PushAttachmentType = "github_repository" + PushAttachmentTypeGitHubSnippet PushAttachmentType = "github_snippet" PushAttachmentTypeGitHubTreeComparison PushAttachmentType = "github_tree_comparison" - PushAttachmentTypeGitHubURL PushAttachmentType = "github_url" - PushAttachmentTypeSelection PushAttachmentType = "selection" + PushAttachmentTypeGitHubURL PushAttachmentType = "github_url" + PushAttachmentTypeSelection PushAttachmentType = "selection" ) // Whether this item is a queued user message or a queued slash command / model change @@ -13899,10 +14066,10 @@ const ( type RemoteControlStatusState string const ( - RemoteControlStatusStateActive RemoteControlStatusState = "active" + RemoteControlStatusStateActive RemoteControlStatusState = "active" RemoteControlStatusStateConnecting RemoteControlStatusState = "connecting" - RemoteControlStatusStateError RemoteControlStatusState = "error" - RemoteControlStatusStateOff RemoteControlStatusState = "off" + RemoteControlStatusStateError RemoteControlStatusState = "error" + RemoteControlStatusStateOff RemoteControlStatusState = "off" ) // Whether the remote task originated from CCA or CLI `--remote`. @@ -14119,7 +14286,7 @@ const ( type SessionLimitPredictionResultKind string const ( - SessionLimitPredictionResultKindAvailable SessionLimitPredictionResultKind = "available" + SessionLimitPredictionResultKindAvailable SessionLimitPredictionResultKind = "available" SessionLimitPredictionResultKindUnavailable SessionLimitPredictionResultKind = "unavailable" ) @@ -14236,12 +14403,12 @@ const ( type SessionOpenParamsKind string const ( - SessionOpenParamsKindAttach SessionOpenParamsKind = "attach" - SessionOpenParamsKindCloud SessionOpenParamsKind = "cloud" - SessionOpenParamsKindCreate SessionOpenParamsKind = "create" - SessionOpenParamsKindHandoff SessionOpenParamsKind = "handoff" - SessionOpenParamsKindRemote SessionOpenParamsKind = "remote" - SessionOpenParamsKindResume SessionOpenParamsKind = "resume" + SessionOpenParamsKindAttach SessionOpenParamsKind = "attach" + SessionOpenParamsKindCloud SessionOpenParamsKind = "cloud" + SessionOpenParamsKindCreate SessionOpenParamsKind = "create" + SessionOpenParamsKindHandoff SessionOpenParamsKind = "handoff" + SessionOpenParamsKindRemote SessionOpenParamsKind = "remote" + SessionOpenParamsKindResume SessionOpenParamsKind = "resume" SessionOpenParamsKindResumeLast SessionOpenParamsKind = "resumeLast" ) @@ -14494,10 +14661,10 @@ const ( type SlashCommandInvocationResultKind string const ( - SlashCommandInvocationResultKindAgentPrompt SlashCommandInvocationResultKind = "agent-prompt" - SlashCommandInvocationResultKindCompleted SlashCommandInvocationResultKind = "completed" + SlashCommandInvocationResultKindAgentPrompt SlashCommandInvocationResultKind = "agent-prompt" + SlashCommandInvocationResultKindCompleted SlashCommandInvocationResultKind = "completed" SlashCommandInvocationResultKindSelectSubcommand SlashCommandInvocationResultKind = "select-subcommand" - SlashCommandInvocationResultKindText SlashCommandInvocationResultKind = "text" + SlashCommandInvocationResultKindText SlashCommandInvocationResultKind = "text" ) // Coarse command category for grouping and behavior: runtime built-in, skill-backed @@ -14655,11 +14822,11 @@ const ( type UIElicitationSchemaPropertyType string const ( - UIElicitationSchemaPropertyTypeArray UIElicitationSchemaPropertyType = "array" + UIElicitationSchemaPropertyTypeArray UIElicitationSchemaPropertyType = "array" UIElicitationSchemaPropertyTypeBoolean UIElicitationSchemaPropertyType = "boolean" UIElicitationSchemaPropertyTypeInteger UIElicitationSchemaPropertyType = "integer" - UIElicitationSchemaPropertyTypeNumber UIElicitationSchemaPropertyType = "number" - UIElicitationSchemaPropertyTypeString UIElicitationSchemaPropertyType = "string" + UIElicitationSchemaPropertyTypeNumber UIElicitationSchemaPropertyType = "number" + UIElicitationSchemaPropertyTypeString UIElicitationSchemaPropertyType = "string" ) // Schema type indicator (always 'object') @@ -14706,14 +14873,14 @@ const ( type UserToolSessionApprovalKind string const ( - UserToolSessionApprovalKindCommands UserToolSessionApprovalKind = "commands" - UserToolSessionApprovalKindCustomTool UserToolSessionApprovalKind = "custom-tool" - UserToolSessionApprovalKindExtensionManagement UserToolSessionApprovalKind = "extension-management" + UserToolSessionApprovalKindCommands UserToolSessionApprovalKind = "commands" + UserToolSessionApprovalKindCustomTool UserToolSessionApprovalKind = "custom-tool" + UserToolSessionApprovalKindExtensionManagement UserToolSessionApprovalKind = "extension-management" UserToolSessionApprovalKindExtensionPermissionAccess UserToolSessionApprovalKind = "extension-permission-access" - UserToolSessionApprovalKindMCP UserToolSessionApprovalKind = "mcp" - UserToolSessionApprovalKindMemory UserToolSessionApprovalKind = "memory" - UserToolSessionApprovalKindRead UserToolSessionApprovalKind = "read" - UserToolSessionApprovalKindWrite UserToolSessionApprovalKind = "write" + UserToolSessionApprovalKindMCP UserToolSessionApprovalKind = "mcp" + UserToolSessionApprovalKindMemory UserToolSessionApprovalKind = "memory" + UserToolSessionApprovalKindRead UserToolSessionApprovalKind = "read" + UserToolSessionApprovalKindWrite UserToolSessionApprovalKind = "write" ) // Output verbosity level for supported models @@ -16229,7 +16396,7 @@ func (s *ServerUserAPI) Settings() *ServerUserSettingsAPI { // ServerRPC provides typed server-scoped RPC methods. type ServerRPC struct { // Reuse a single struct instead of allocating one for each service on the heap. - common serverAPI + common serverAPI Account *ServerAccountAPI AgentRegistry *ServerAgentRegistryAPI @@ -16497,7 +16664,7 @@ func (a *InternalServerSessionsAPI) RegisterExtensionToolsOnSession(ctx context. // etc.). Not part of the public API. type InternalServerRPC struct { // Reuse a single struct instead of allocating one for each service on the heap. - common internalServerAPI + common internalServerAPI Sessions *InternalServerSessionsAPI } @@ -16539,7 +16706,7 @@ func NewInternalServerRPC(client *jsonrpc2.Client) *InternalServerRPC { } type sessionAPI struct { - client *jsonrpc2.Client + client *jsonrpc2.Client sessionID string } @@ -21773,7 +21940,7 @@ func (a *WorkspacesAPI) WriteAutopilotObjective(ctx context.Context, params *Wor // SessionRPC provides typed session-scoped RPC methods. type SessionRPC struct { // Reuse a single struct instead of allocating one for each service on the heap. - common sessionAPI + common sessionAPI Agent *AgentAPI Canvas *CanvasAPI @@ -22137,7 +22304,7 @@ func NewSessionRPC(client *jsonrpc2.Client, sessionID string) *SessionRPC { } type internalSessionAPI struct { - client *jsonrpc2.Client + client *jsonrpc2.Client sessionID string } @@ -22698,7 +22865,7 @@ func (a *InternalSettingsAPI) Snapshot(ctx context.Context) (*SessionSettingsSna // etc.). Not part of the public API. type InternalSessionRPC struct { // Reuse a single struct instead of allocating one for each service on the heap. - common internalSessionAPI + common internalSessionAPI MCP *InternalMCPAPI Queue *InternalQueueAPI @@ -22947,10 +23114,10 @@ type SessionFSHandler interface { // ClientSessionAPIHandlers provides all client session API handler groups for a session. type ClientSessionAPIHandlers struct { - Canvas CanvasHandler - Factory FactoryHandler + Canvas CanvasHandler + Factory FactoryHandler ProviderToken ProviderTokenHandler - SessionFS SessionFSHandler + SessionFS SessionFSHandler } func clientSessionHandlerError(err error) *jsonrpc2.Error { @@ -23397,8 +23564,8 @@ type LlmInferenceHandler interface { // key; a single set of handlers serves the entire connection. type ClientGlobalAPIHandlers struct { GitHubTelemetry GitHubTelemetryHandler - Hooks HooksHandler - LlmInference LlmInferenceHandler + Hooks HooksHandler + LlmInference LlmInferenceHandler } func clientGlobalHandlerError(err error) *jsonrpc2.Error { diff --git a/go/rpc/zrpc_encoding.go b/go/rpc/zrpc_encoding.go index 54c938da47..16cf00bab0 100644 --- a/go/rpc/zrpc_encoding.go +++ b/go/rpc/zrpc_encoding.go @@ -85,7 +85,7 @@ func (r APIKeyAuthInfo) MarshalJSON() ([]byte, error) { Type AuthInfoType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -96,7 +96,7 @@ func (r CopilotAPITokenAuthInfo) MarshalJSON() ([]byte, error) { Type AuthInfoType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -107,7 +107,7 @@ func (r EnvAuthInfo) MarshalJSON() ([]byte, error) { Type AuthInfoType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -118,7 +118,7 @@ func (r GhCLIAuthInfo) MarshalJSON() ([]byte, error) { Type AuthInfoType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -129,7 +129,7 @@ func (r HMACAuthInfo) MarshalJSON() ([]byte, error) { Type AuthInfoType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -140,7 +140,7 @@ func (r TokenAuthInfo) MarshalJSON() ([]byte, error) { Type AuthInfoType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -151,7 +151,7 @@ func (r UserAuthInfo) MarshalJSON() ([]byte, error) { Type AuthInfoType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -159,7 +159,7 @@ func (r UserAuthInfo) MarshalJSON() ([]byte, error) { func (r *AccountAllUsers) UnmarshalJSON(data []byte) error { type rawAccountAllUsers struct { AuthInfo json.RawMessage `json:"authInfo"` - Token *string `json:"token,omitempty"` + Token *string `json:"token,omitempty"` } var raw rawAccountAllUsers if err := json.Unmarshal(data, &raw); err != nil { @@ -178,8 +178,8 @@ func (r *AccountAllUsers) UnmarshalJSON(data []byte) error { func (r *AccountGetCurrentAuthResult) UnmarshalJSON(data []byte) error { type rawAccountGetCurrentAuthResult struct { - AuthErrors []string `json:"authErrors,omitzero"` - AuthInfo json.RawMessage `json:"authInfo,omitempty"` + AuthErrors []string `json:"authErrors,omitzero"` + AuthInfo json.RawMessage `json:"authInfo,omitempty"` } var raw rawAccountGetCurrentAuthResult if err := json.Unmarshal(data, &raw); err != nil { @@ -273,7 +273,7 @@ func (r AgentRegistrySpawnError) MarshalJSON() ([]byte, error) { Kind AgentRegistrySpawnResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -284,7 +284,7 @@ func (r AgentRegistrySpawnRegistryTimeout) MarshalJSON() ([]byte, error) { Kind AgentRegistrySpawnResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -295,7 +295,7 @@ func (r AgentRegistrySpawnSpawned) MarshalJSON() ([]byte, error) { Kind AgentRegistrySpawnResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -306,7 +306,7 @@ func (r AgentRegistrySpawnValidationError) MarshalJSON() ([]byte, error) { Kind AgentRegistrySpawnResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -436,7 +436,7 @@ func (r AttachmentBlob) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -447,7 +447,7 @@ func (r AttachmentDirectory) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -458,7 +458,7 @@ func (r AttachmentExtensionContext) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -469,7 +469,7 @@ func (r AttachmentFile) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -480,7 +480,7 @@ func (r AttachmentGitHubActionsJob) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -491,7 +491,7 @@ func (r AttachmentGitHubCommit) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -502,7 +502,7 @@ func (r AttachmentGitHubFile) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -513,7 +513,7 @@ func (r AttachmentGitHubFileDiff) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -524,7 +524,7 @@ func (r AttachmentGitHubReference) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -535,7 +535,7 @@ func (r AttachmentGitHubRelease) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -546,7 +546,7 @@ func (r AttachmentGitHubRepository) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -557,7 +557,7 @@ func (r AttachmentGitHubSnippet) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -568,7 +568,7 @@ func (r AttachmentGitHubTreeComparison) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -579,7 +579,7 @@ func (r AttachmentGitHubURL) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -590,7 +590,7 @@ func (r AttachmentSelection) MarshalJSON() ([]byte, error) { Type AttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -634,7 +634,7 @@ func (r QueuedCommandHandled) MarshalJSON() ([]byte, error) { alias }{ Handled: r.Handled(), - alias: alias(r), + alias: alias(r), }) } @@ -645,14 +645,14 @@ func (r QueuedCommandNotHandled) MarshalJSON() ([]byte, error) { alias }{ Handled: r.Handled(), - alias: alias(r), + alias: alias(r), }) } func (r *CommandsRespondToQueuedCommandRequest) UnmarshalJSON(data []byte) error { type rawCommandsRespondToQueuedCommandRequest struct { - RequestID string `json:"requestId"` - Result json.RawMessage `json:"result"` + RequestID string `json:"requestId"` + Result json.RawMessage `json:"result"` } var raw rawCommandsRespondToQueuedCommandRequest if err := json.Unmarshal(data, &raw); err != nil { @@ -716,7 +716,7 @@ func (r DebugCollectLogsDestinationArchive) MarshalJSON() ([]byte, error) { Kind DebugCollectLogsDestinationKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -727,16 +727,16 @@ func (r DebugCollectLogsDestinationDirectory) MarshalJSON() ([]byte, error) { Kind DebugCollectLogsDestinationKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } func (r *DebugCollectLogsRequest) UnmarshalJSON(data []byte) error { type rawDebugCollectLogsRequest struct { - AdditionalEntries []DebugCollectLogsEntry `json:"additionalEntries,omitzero"` - Destination json.RawMessage `json:"destination"` - Include *DebugCollectLogsInclude `json:"include,omitempty"` + AdditionalEntries []DebugCollectLogsEntry `json:"additionalEntries,omitzero"` + Destination json.RawMessage `json:"destination"` + Include *DebugCollectLogsInclude `json:"include,omitempty"` } var raw rawDebugCollectLogsRequest if err := json.Unmarshal(data, &raw); err != nil { @@ -863,7 +863,7 @@ func (r ExternalToolTextResultForLlmContentAudio) MarshalJSON() ([]byte, error) Type ExternalToolTextResultForLlmContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -874,7 +874,7 @@ func (r ExternalToolTextResultForLlmContentImage) MarshalJSON() ([]byte, error) Type ExternalToolTextResultForLlmContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -959,7 +959,7 @@ func (r ExternalToolTextResultForLlmContentResource) MarshalJSON() ([]byte, erro Type ExternalToolTextResultForLlmContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -970,7 +970,7 @@ func (r ExternalToolTextResultForLlmContentResourceLink) MarshalJSON() ([]byte, Type ExternalToolTextResultForLlmContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -981,7 +981,7 @@ func (r ExternalToolTextResultForLlmContentShellExit) MarshalJSON() ([]byte, err Type ExternalToolTextResultForLlmContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -992,7 +992,7 @@ func (r ExternalToolTextResultForLlmContentTerminal) MarshalJSON() ([]byte, erro Type ExternalToolTextResultForLlmContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -1003,7 +1003,7 @@ func (r ExternalToolTextResultForLlmContentText) MarshalJSON() ([]byte, error) { Type ExternalToolTextResultForLlmContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -1011,13 +1011,13 @@ func (r ExternalToolTextResultForLlmContentText) MarshalJSON() ([]byte, error) { func (r *ExternalToolTextResultForLlm) UnmarshalJSON(data []byte) error { type rawExternalToolTextResultForLlm struct { BinaryResultsForLlm []ExternalToolTextResultForLlmBinaryResultsForLlm `json:"binaryResultsForLlm,omitzero"` - Contents []json.RawMessage `json:"contents,omitzero"` - Error *string `json:"error,omitempty"` - ResultType *string `json:"resultType,omitempty"` - SessionLog *string `json:"sessionLog,omitempty"` - TextResultForLlm string `json:"textResultForLlm"` - ToolReferences []string `json:"toolReferences,omitzero"` - ToolTelemetry map[string]any `json:"toolTelemetry,omitzero"` + Contents []json.RawMessage `json:"contents,omitzero"` + Error *string `json:"error,omitempty"` + ResultType *string `json:"resultType,omitempty"` + SessionLog *string `json:"sessionLog,omitempty"` + TextResultForLlm string `json:"textResultForLlm"` + ToolReferences []string `json:"toolReferences,omitzero"` + ToolTelemetry map[string]any `json:"toolTelemetry,omitzero"` } var raw rawExternalToolTextResultForLlm if err := json.Unmarshal(data, &raw); err != nil { @@ -1115,7 +1115,7 @@ func (r FactoryRunFailureFactoryDurableFailure) MarshalJSON() ([]byte, error) { Type FactoryRunFailureType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -1126,7 +1126,7 @@ func (r FactoryRunFailureFactoryLimitReached) MarshalJSON() ([]byte, error) { Type FactoryRunFailureType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -1137,17 +1137,17 @@ func (r FactoryRunFailureFactoryResumeDeclined) MarshalJSON() ([]byte, error) { Type FactoryRunFailureType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } func (r *FactoryRunTerminal) UnmarshalJSON(data []byte) error { type rawFactoryRunTerminal struct { - Error *string `json:"error,omitempty"` - Failure json.RawMessage `json:"failure,omitempty"` - Reason *string `json:"reason,omitempty"` - ResultPreview *string `json:"resultPreview,omitempty"` + Error *string `json:"error,omitempty"` + Failure json.RawMessage `json:"failure,omitempty"` + Reason *string `json:"reason,omitempty"` + ResultPreview *string `json:"resultPreview,omitempty"` } var raw rawFactoryRunTerminal if err := json.Unmarshal(data, &raw); err != nil { @@ -1168,13 +1168,13 @@ func (r *FactoryRunTerminal) UnmarshalJSON(data []byte) error { func (r *FactoryRunResult) UnmarshalJSON(data []byte) error { type rawFactoryRunResult struct { - Error *string `json:"error,omitempty"` - Failure json.RawMessage `json:"failure,omitempty"` - Reason *string `json:"reason,omitempty"` - Result any `json:"result,omitempty"` - RunID string `json:"runId"` - Snapshot any `json:"snapshot,omitempty"` - Status FactoryRunStatus `json:"status"` + Error *string `json:"error,omitempty"` + Failure json.RawMessage `json:"failure,omitempty"` + Reason *string `json:"reason,omitempty"` + Result any `json:"result,omitempty"` + RunID string `json:"runId"` + Snapshot any `json:"snapshot,omitempty"` + Status FactoryRunStatus `json:"status"` } var raw rawFactoryRunResult if err := json.Unmarshal(data, &raw); err != nil { @@ -1217,9 +1217,9 @@ func unmarshalFilterMapping(data []byte) (FilterMapping, error) { func (r *HandlePendingToolCallRequest) UnmarshalJSON(data []byte) error { type rawHandlePendingToolCallRequest struct { - Error *string `json:"error,omitempty"` - RequestID string `json:"requestId"` - Result json.RawMessage `json:"result,omitempty"` + Error *string `json:"error,omitempty"` + RequestID string `json:"requestId"` + Result json.RawMessage `json:"result,omitempty"` } var raw rawHandlePendingToolCallRequest if err := json.Unmarshal(data, &raw); err != nil { @@ -1292,7 +1292,7 @@ func (r *InstalledPluginSource) UnmarshalJSON(data []byte) error { func matchesMCPServerConfigHTTP(data []byte) bool { var rawGroup0 struct { Command json.RawMessage `json:"command"` - URL json.RawMessage `json:"url"` + URL json.RawMessage `json:"url"` } if err := json.Unmarshal(data, &rawGroup0); err != nil { return false @@ -1306,7 +1306,7 @@ func matchesMCPServerConfigHTTP(data []byte) bool { func matchesMCPServerConfigStdio(data []byte) bool { var rawGroup0 struct { Command json.RawMessage `json:"command"` - URL json.RawMessage `json:"url"` + URL json.RawMessage `json:"url"` } if err := json.Unmarshal(data, &rawGroup0); err != nil { return false @@ -1366,20 +1366,20 @@ func unmarshalMCPServerAuthConfig(data []byte) (MCPServerAuthConfig, error) { func (r *MCPServerConfigHTTP) UnmarshalJSON(data []byte) error { type rawMCPServerConfigHTTP struct { - Auth json.RawMessage `json:"auth,omitempty"` - DeferTools *MCPServerConfigDeferTools `json:"deferTools,omitempty"` - DisableToolCache *bool `json:"disableToolCache,omitempty"` - FilterMapping json.RawMessage `json:"filterMapping,omitempty"` - Headers map[string]string `json:"headers,omitzero"` - IsDefaultServer *bool `json:"isDefaultServer,omitempty"` - OauthClientID *string `json:"oauthClientId,omitempty"` - OauthGrantType *MCPServerConfigHTTPOauthGrantType `json:"oauthGrantType,omitempty"` - OauthPublicClient *bool `json:"oauthPublicClient,omitempty"` - Oidc json.RawMessage `json:"oidc,omitempty"` - Timeout *int64 `json:"timeout,omitempty"` - Tools []string `json:"tools,omitzero"` - Type *MCPServerConfigHTTPType `json:"type,omitempty"` - URL string `json:"url"` + Auth json.RawMessage `json:"auth,omitempty"` + DeferTools *MCPServerConfigDeferTools `json:"deferTools,omitempty"` + DisableToolCache *bool `json:"disableToolCache,omitempty"` + FilterMapping json.RawMessage `json:"filterMapping,omitempty"` + Headers map[string]string `json:"headers,omitzero"` + IsDefaultServer *bool `json:"isDefaultServer,omitempty"` + OauthClientID *string `json:"oauthClientId,omitempty"` + OauthGrantType *MCPServerConfigHTTPOauthGrantType `json:"oauthGrantType,omitempty"` + OauthPublicClient *bool `json:"oauthPublicClient,omitempty"` + Oidc json.RawMessage `json:"oidc,omitempty"` + Timeout *int64 `json:"timeout,omitempty"` + Tools []string `json:"tools,omitzero"` + Type *MCPServerConfigHTTPType `json:"type,omitempty"` + URL string `json:"url"` } var raw rawMCPServerConfigHTTP if err := json.Unmarshal(data, &raw); err != nil { @@ -1422,18 +1422,18 @@ func (r *MCPServerConfigHTTP) UnmarshalJSON(data []byte) error { func (r *MCPServerConfigStdio) UnmarshalJSON(data []byte) error { type rawMCPServerConfigStdio struct { - Args []string `json:"args,omitzero"` - Auth json.RawMessage `json:"auth,omitempty"` - Command string `json:"command"` - Cwd *string `json:"cwd,omitempty"` - DeferTools *MCPServerConfigDeferTools `json:"deferTools,omitempty"` - DisableToolCache *bool `json:"disableToolCache,omitempty"` - Env map[string]string `json:"env,omitzero"` - FilterMapping json.RawMessage `json:"filterMapping,omitempty"` - IsDefaultServer *bool `json:"isDefaultServer,omitempty"` - Oidc json.RawMessage `json:"oidc,omitempty"` - Timeout *int64 `json:"timeout,omitempty"` - Tools []string `json:"tools,omitzero"` + Args []string `json:"args,omitzero"` + Auth json.RawMessage `json:"auth,omitempty"` + Command string `json:"command"` + Cwd *string `json:"cwd,omitempty"` + DeferTools *MCPServerConfigDeferTools `json:"deferTools,omitempty"` + DisableToolCache *bool `json:"disableToolCache,omitempty"` + Env map[string]string `json:"env,omitzero"` + FilterMapping json.RawMessage `json:"filterMapping,omitempty"` + IsDefaultServer *bool `json:"isDefaultServer,omitempty"` + Oidc json.RawMessage `json:"oidc,omitempty"` + Timeout *int64 `json:"timeout,omitempty"` + Tools []string `json:"tools,omitzero"` } var raw rawMCPServerConfigStdio if err := json.Unmarshal(data, &raw); err != nil { @@ -1475,7 +1475,7 @@ func (r *MCPServerConfigStdio) UnmarshalJSON(data []byte) error { func (r *MCPConfigAddRequest) UnmarshalJSON(data []byte) error { type rawMCPConfigAddRequest struct { Config json.RawMessage `json:"config"` - Name string `json:"name"` + Name string `json:"name"` } var raw rawMCPConfigAddRequest if err := json.Unmarshal(data, &raw); err != nil { @@ -1516,7 +1516,7 @@ func (r *MCPConfigList) UnmarshalJSON(data []byte) error { func (r *MCPConfigUpdateRequest) UnmarshalJSON(data []byte) error { type rawMCPConfigUpdateRequest struct { Config json.RawMessage `json:"config"` - Name string `json:"name"` + Name string `json:"name"` } var raw rawMCPConfigUpdateRequest if err := json.Unmarshal(data, &raw); err != nil { @@ -1580,7 +1580,7 @@ func (r MCPHeadersHandlePendingHeadersRefreshRequestHeaders) MarshalJSON() ([]by Kind MCPHeadersHandlePendingHeadersRefreshRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1591,15 +1591,15 @@ func (r MCPHeadersHandlePendingHeadersRefreshRequestNone) MarshalJSON() ([]byte, Kind MCPHeadersHandlePendingHeadersRefreshRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } func (r *MCPHeadersHandlePendingHeadersRefreshRequestRequest) UnmarshalJSON(data []byte) error { type rawMCPHeadersHandlePendingHeadersRefreshRequestRequest struct { - RequestID string `json:"requestId"` - Result json.RawMessage `json:"result"` + RequestID string `json:"requestId"` + Result json.RawMessage `json:"result"` } var raw rawMCPHeadersHandlePendingHeadersRefreshRequestRequest if err := json.Unmarshal(data, &raw); err != nil { @@ -1663,7 +1663,7 @@ func (r MCPOauthPendingRequestResponseCancelled) MarshalJSON() ([]byte, error) { Kind MCPOauthPendingRequestResponseKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1674,15 +1674,15 @@ func (r MCPOauthPendingRequestResponseToken) MarshalJSON() ([]byte, error) { Kind MCPOauthPendingRequestResponseKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } func (r *MCPOauthHandlePendingRequest) UnmarshalJSON(data []byte) error { type rawMCPOauthHandlePendingRequest struct { - RequestID string `json:"requestId"` - Result json.RawMessage `json:"result"` + RequestID string `json:"requestId"` + Result json.RawMessage `json:"result"` } var raw rawMCPOauthHandlePendingRequest if err := json.Unmarshal(data, &raw); err != nil { @@ -1701,8 +1701,8 @@ func (r *MCPOauthHandlePendingRequest) UnmarshalJSON(data []byte) error { func (r *MCPRestartServerRequest) UnmarshalJSON(data []byte) error { type rawMCPRestartServerRequest struct { - Config json.RawMessage `json:"config,omitempty"` - ServerName string `json:"serverName"` + Config json.RawMessage `json:"config,omitempty"` + ServerName string `json:"serverName"` } var raw rawMCPRestartServerRequest if err := json.Unmarshal(data, &raw); err != nil { @@ -1721,8 +1721,8 @@ func (r *MCPRestartServerRequest) UnmarshalJSON(data []byte) error { func (r *MCPStartServerRequest) UnmarshalJSON(data []byte) error { type rawMCPStartServerRequest struct { - Config json.RawMessage `json:"config,omitempty"` - ServerName string `json:"serverName"` + Config json.RawMessage `json:"config,omitempty"` + ServerName string `json:"serverName"` } var raw rawMCPStartServerRequest if err := json.Unmarshal(data, &raw); err != nil { @@ -1864,7 +1864,7 @@ func (r PermissionDecisionApproved) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1952,7 +1952,7 @@ func (r UserToolSessionApprovalCommands) MarshalJSON() ([]byte, error) { Kind UserToolSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1963,7 +1963,7 @@ func (r UserToolSessionApprovalCustomTool) MarshalJSON() ([]byte, error) { Kind UserToolSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1974,7 +1974,7 @@ func (r UserToolSessionApprovalExtensionManagement) MarshalJSON() ([]byte, error Kind UserToolSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1985,7 +1985,7 @@ func (r UserToolSessionApprovalExtensionPermissionAccess) MarshalJSON() ([]byte, Kind UserToolSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1996,7 +1996,7 @@ func (r UserToolSessionApprovalMCP) MarshalJSON() ([]byte, error) { Kind UserToolSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2007,7 +2007,7 @@ func (r UserToolSessionApprovalMemory) MarshalJSON() ([]byte, error) { Kind UserToolSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2018,7 +2018,7 @@ func (r UserToolSessionApprovalRead) MarshalJSON() ([]byte, error) { Kind UserToolSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2029,15 +2029,15 @@ func (r UserToolSessionApprovalWrite) MarshalJSON() ([]byte, error) { Kind UserToolSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } func (r *PermissionDecisionApprovedForLocation) UnmarshalJSON(data []byte) error { type rawPermissionDecisionApprovedForLocation struct { - Approval json.RawMessage `json:"approval"` - LocationKey string `json:"locationKey"` + Approval json.RawMessage `json:"approval"` + LocationKey string `json:"locationKey"` } var raw rawPermissionDecisionApprovedForLocation if err := json.Unmarshal(data, &raw); err != nil { @@ -2060,7 +2060,7 @@ func (r PermissionDecisionApprovedForLocation) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2089,7 +2089,7 @@ func (r PermissionDecisionApprovedForSession) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2183,7 +2183,7 @@ func (r PermissionDecisionApproveForLocationApprovalCommands) MarshalJSON() ([]b Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2194,7 +2194,7 @@ func (r PermissionDecisionApproveForLocationApprovalCustomTool) MarshalJSON() ([ Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2205,7 +2205,7 @@ func (r PermissionDecisionApproveForLocationApprovalExtensionManagement) Marshal Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2216,7 +2216,7 @@ func (r PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess) M Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2227,7 +2227,7 @@ func (r PermissionDecisionApproveForLocationApprovalMCP) MarshalJSON() ([]byte, Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2238,7 +2238,7 @@ func (r PermissionDecisionApproveForLocationApprovalMCPSampling) MarshalJSON() ( Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2249,7 +2249,7 @@ func (r PermissionDecisionApproveForLocationApprovalMemory) MarshalJSON() ([]byt Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2260,7 +2260,7 @@ func (r PermissionDecisionApproveForLocationApprovalRead) MarshalJSON() ([]byte, Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2271,15 +2271,15 @@ func (r PermissionDecisionApproveForLocationApprovalWrite) MarshalJSON() ([]byte Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } func (r *PermissionDecisionApproveForLocation) UnmarshalJSON(data []byte) error { type rawPermissionDecisionApproveForLocation struct { - Approval json.RawMessage `json:"approval"` - LocationKey string `json:"locationKey"` + Approval json.RawMessage `json:"approval"` + LocationKey string `json:"locationKey"` } var raw rawPermissionDecisionApproveForLocation if err := json.Unmarshal(data, &raw); err != nil { @@ -2302,7 +2302,7 @@ func (r PermissionDecisionApproveForLocation) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2396,7 +2396,7 @@ func (r PermissionDecisionApproveForSessionApprovalCommands) MarshalJSON() ([]by Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2407,7 +2407,7 @@ func (r PermissionDecisionApproveForSessionApprovalCustomTool) MarshalJSON() ([] Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2418,7 +2418,7 @@ func (r PermissionDecisionApproveForSessionApprovalExtensionManagement) MarshalJ Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2429,7 +2429,7 @@ func (r PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess) Ma Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2440,7 +2440,7 @@ func (r PermissionDecisionApproveForSessionApprovalMCP) MarshalJSON() ([]byte, e Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2451,7 +2451,7 @@ func (r PermissionDecisionApproveForSessionApprovalMCPSampling) MarshalJSON() ([ Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2462,7 +2462,7 @@ func (r PermissionDecisionApproveForSessionApprovalMemory) MarshalJSON() ([]byte Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2473,7 +2473,7 @@ func (r PermissionDecisionApproveForSessionApprovalRead) MarshalJSON() ([]byte, Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2484,7 +2484,7 @@ func (r PermissionDecisionApproveForSessionApprovalWrite) MarshalJSON() ([]byte, Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2492,7 +2492,7 @@ func (r PermissionDecisionApproveForSessionApprovalWrite) MarshalJSON() ([]byte, func (r *PermissionDecisionApproveForSession) UnmarshalJSON(data []byte) error { type rawPermissionDecisionApproveForSession struct { Approval json.RawMessage `json:"approval,omitempty"` - Domain *string `json:"domain,omitempty"` + Domain *string `json:"domain,omitempty"` } var raw rawPermissionDecisionApproveForSession if err := json.Unmarshal(data, &raw); err != nil { @@ -2515,7 +2515,7 @@ func (r PermissionDecisionApproveForSession) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2526,7 +2526,7 @@ func (r PermissionDecisionApproveOnce) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2537,7 +2537,7 @@ func (r PermissionDecisionApprovePermanently) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2548,7 +2548,7 @@ func (r PermissionDecisionCancelled) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2559,7 +2559,7 @@ func (r PermissionDecisionDeniedByContentExclusionPolicy) MarshalJSON() ([]byte, Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2570,7 +2570,7 @@ func (r PermissionDecisionDeniedByPermissionRequestHook) MarshalJSON() ([]byte, Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2581,7 +2581,7 @@ func (r PermissionDecisionDeniedByRules) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2592,7 +2592,7 @@ func (r PermissionDecisionDeniedInteractivelyByUser) MarshalJSON() ([]byte, erro Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2603,7 +2603,7 @@ func (r PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser) Marsha Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2614,7 +2614,7 @@ func (r PermissionDecisionReject) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2625,15 +2625,15 @@ func (r PermissionDecisionUserNotAvailable) MarshalJSON() ([]byte, error) { Kind PermissionDecisionKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } func (r *PermissionDecisionRequest) UnmarshalJSON(data []byte) error { type rawPermissionDecisionRequest struct { - RequestID string `json:"requestId"` - Result json.RawMessage `json:"result"` + RequestID string `json:"requestId"` + Result json.RawMessage `json:"result"` } var raw rawPermissionDecisionRequest if err := json.Unmarshal(data, &raw); err != nil { @@ -2739,7 +2739,7 @@ func (r PermissionsLocationsAddToolApprovalDetailsCommands) MarshalJSON() ([]byt Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2750,7 +2750,7 @@ func (r PermissionsLocationsAddToolApprovalDetailsCustomTool) MarshalJSON() ([]b Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2761,7 +2761,7 @@ func (r PermissionsLocationsAddToolApprovalDetailsExtensionManagement) MarshalJS Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2772,7 +2772,7 @@ func (r PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess) Mar Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2783,7 +2783,7 @@ func (r PermissionsLocationsAddToolApprovalDetailsMCP) MarshalJSON() ([]byte, er Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2794,7 +2794,7 @@ func (r PermissionsLocationsAddToolApprovalDetailsMCPSampling) MarshalJSON() ([] Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2805,7 +2805,7 @@ func (r PermissionsLocationsAddToolApprovalDetailsMemory) MarshalJSON() ([]byte, Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2816,7 +2816,7 @@ func (r PermissionsLocationsAddToolApprovalDetailsRead) MarshalJSON() ([]byte, e Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2827,15 +2827,15 @@ func (r PermissionsLocationsAddToolApprovalDetailsWrite) MarshalJSON() ([]byte, Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } func (r *PermissionLocationAddToolApprovalParams) UnmarshalJSON(data []byte) error { type rawPermissionLocationAddToolApprovalParams struct { - Approval json.RawMessage `json:"approval"` - LocationKey string `json:"locationKey"` + Approval json.RawMessage `json:"approval"` + LocationKey string `json:"locationKey"` } var raw rawPermissionLocationAddToolApprovalParams if err := json.Unmarshal(data, &raw); err != nil { @@ -2977,7 +2977,7 @@ func (r ExtensionContextPushInput) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -2988,7 +2988,7 @@ func (r PushAttachmentBlob) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -2999,7 +2999,7 @@ func (r PushAttachmentDirectory) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -3010,7 +3010,7 @@ func (r PushAttachmentFile) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -3021,7 +3021,7 @@ func (r PushAttachmentGitHubActionsJob) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -3032,7 +3032,7 @@ func (r PushAttachmentGitHubCommit) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -3043,7 +3043,7 @@ func (r PushAttachmentGitHubFile) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -3054,7 +3054,7 @@ func (r PushAttachmentGitHubFileDiff) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -3065,7 +3065,7 @@ func (r PushAttachmentGitHubReference) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -3076,7 +3076,7 @@ func (r PushAttachmentGitHubRelease) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -3087,7 +3087,7 @@ func (r PushAttachmentGitHubRepository) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -3098,7 +3098,7 @@ func (r PushAttachmentGitHubSnippet) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -3109,7 +3109,7 @@ func (r PushAttachmentGitHubTreeComparison) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -3120,7 +3120,7 @@ func (r PushAttachmentGitHubURL) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -3131,25 +3131,25 @@ func (r PushAttachmentSelection) MarshalJSON() ([]byte, error) { Type PushAttachmentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } func (r *QueueInsertMessage) UnmarshalJSON(data []byte) error { type rawQueueInsertMessage struct { - AgentMode *SendAgentMode `json:"agentMode,omitempty"` - Attachments []json.RawMessage `json:"attachments,omitzero"` - Billable *bool `json:"billable,omitempty"` - Delivery *string `json:"delivery,omitempty"` - DisplayPrompt *string `json:"displayPrompt,omitempty"` - Mode *SendMode `json:"mode,omitempty"` - Prepend *bool `json:"prepend,omitempty"` - Prompt string `json:"prompt"` + AgentMode *SendAgentMode `json:"agentMode,omitempty"` + Attachments []json.RawMessage `json:"attachments,omitzero"` + Billable *bool `json:"billable,omitempty"` + Delivery *string `json:"delivery,omitempty"` + DisplayPrompt *string `json:"displayPrompt,omitempty"` + Mode *SendMode `json:"mode,omitempty"` + Prepend *bool `json:"prepend,omitempty"` + Prompt string `json:"prompt"` RequestHeaders map[string]string `json:"requestHeaders,omitzero"` - RequiredTool *string `json:"requiredTool,omitempty"` - Source *string `json:"source,omitempty"` - Wait *bool `json:"wait,omitempty"` + RequiredTool *string `json:"requiredTool,omitempty"` + Source *string `json:"source,omitempty"` + Wait *bool `json:"wait,omitempty"` } var raw rawQueueInsertMessage if err := json.Unmarshal(data, &raw); err != nil { @@ -3296,8 +3296,8 @@ func (r *RemoteControlStatusResult) UnmarshalJSON(data []byte) error { func (r *RemoteControlStopResult) UnmarshalJSON(data []byte) error { type rawRemoteControlStopResult struct { - Status json.RawMessage `json:"status"` - Stopped bool `json:"stopped"` + Status json.RawMessage `json:"status"` + Stopped bool `json:"stopped"` } var raw rawRemoteControlStopResult if err := json.Unmarshal(data, &raw); err != nil { @@ -3316,8 +3316,8 @@ func (r *RemoteControlStopResult) UnmarshalJSON(data []byte) error { func (r *RemoteControlTransferResult) UnmarshalJSON(data []byte) error { type rawRemoteControlTransferResult struct { - Status json.RawMessage `json:"status"` - Transferred bool `json:"transferred"` + Status json.RawMessage `json:"status"` + Transferred bool `json:"transferred"` } var raw rawRemoteControlTransferResult if err := json.Unmarshal(data, &raw); err != nil { @@ -3337,7 +3337,7 @@ func (r *RemoteControlTransferResult) UnmarshalJSON(data []byte) error { func (r *SendAttachmentsToMessageParams) UnmarshalJSON(data []byte) error { type rawSendAttachmentsToMessageParams struct { Attachments []json.RawMessage `json:"attachments"` - InstanceID *string `json:"instanceId,omitempty"` + InstanceID *string `json:"instanceId,omitempty"` } var raw rawSendAttachmentsToMessageParams if err := json.Unmarshal(data, &raw); err != nil { @@ -3359,12 +3359,12 @@ func (r *SendAttachmentsToMessageParams) UnmarshalJSON(data []byte) error { func (r *SendMessageItem) UnmarshalJSON(data []byte) error { type rawSendMessageItem struct { - Attachments []json.RawMessage `json:"attachments,omitzero"` - Billable *bool `json:"billable,omitempty"` - DisplayPrompt *string `json:"displayPrompt,omitempty"` - Prompt string `json:"prompt"` - RequiredTool *string `json:"requiredTool,omitempty"` - Source *string `json:"source,omitempty"` + Attachments []json.RawMessage `json:"attachments,omitzero"` + Billable *bool `json:"billable,omitempty"` + DisplayPrompt *string `json:"displayPrompt,omitempty"` + Prompt string `json:"prompt"` + RequiredTool *string `json:"requiredTool,omitempty"` + Source *string `json:"source,omitempty"` } var raw rawSendMessageItem if err := json.Unmarshal(data, &raw); err != nil { @@ -3390,19 +3390,19 @@ func (r *SendMessageItem) UnmarshalJSON(data []byte) error { func (r *SendRequest) UnmarshalJSON(data []byte) error { type rawSendRequest struct { - AgentMode *SendAgentMode `json:"agentMode,omitempty"` - Attachments []json.RawMessage `json:"attachments,omitzero"` - Billable *bool `json:"billable,omitempty"` - DisplayPrompt *string `json:"displayPrompt,omitempty"` - Mode *SendMode `json:"mode,omitempty"` - Prepend *bool `json:"prepend,omitempty"` - Prompt string `json:"prompt"` + AgentMode *SendAgentMode `json:"agentMode,omitempty"` + Attachments []json.RawMessage `json:"attachments,omitzero"` + Billable *bool `json:"billable,omitempty"` + DisplayPrompt *string `json:"displayPrompt,omitempty"` + Mode *SendMode `json:"mode,omitempty"` + Prepend *bool `json:"prepend,omitempty"` + Prompt string `json:"prompt"` RequestHeaders map[string]string `json:"requestHeaders,omitzero"` - RequiredTool *string `json:"requiredTool,omitempty"` - Source *string `json:"source,omitempty"` - Traceparent *string `json:"traceparent,omitempty"` - Tracestate *string `json:"tracestate,omitempty"` - Wait *bool `json:"wait,omitempty"` + RequiredTool *string `json:"requiredTool,omitempty"` + Source *string `json:"source,omitempty"` + Traceparent *string `json:"traceparent,omitempty"` + Tracestate *string `json:"tracestate,omitempty"` + Wait *bool `json:"wait,omitempty"` } var raw rawSendRequest if err := json.Unmarshal(data, &raw); err != nil { @@ -3532,7 +3532,7 @@ func (r SessionLimitPredictionResultAvailable) MarshalJSON() ([]byte, error) { Kind SessionLimitPredictionResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -3543,7 +3543,7 @@ func (r SessionLimitPredictionResultUnavailable) MarshalJSON() ([]byte, error) { Kind SessionLimitPredictionResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -3587,7 +3587,7 @@ func (r LocalSessionMetadataValue) MarshalJSON() ([]byte, error) { alias }{ IsRemote: r.sessionListEntryIsRemote(), - alias: alias(r), + alias: alias(r), }) } @@ -3598,7 +3598,7 @@ func (r RemoteSessionMetadataValue) MarshalJSON() ([]byte, error) { alias }{ IsRemote: r.sessionListEntryIsRemote(), - alias: alias(r), + alias: alias(r), }) } @@ -3625,71 +3625,71 @@ func (r *SessionList) UnmarshalJSON(data []byte) error { func (r *SessionOpenOptions) UnmarshalJSON(data []byte) error { type rawSessionOpenOptions struct { - AdditionalContentExclusionPolicies []SessionOpenOptionsAdditionalContentExclusionPolicy `json:"additionalContentExclusionPolicies,omitzero"` - AdditionalDirectories []string `json:"additionalDirectories,omitzero"` - AgentContext *string `json:"agentContext,omitempty"` - AllowAllMCPServerInstructions *bool `json:"allowAllMcpServerInstructions,omitempty"` - AskUserDisabled *bool `json:"askUserDisabled,omitempty"` - AuthInfo json.RawMessage `json:"authInfo,omitempty"` - AvailableTools []string `json:"availableTools,omitzero"` - Capi *CapiSessionOptions `json:"capi,omitempty"` - ClientKind *string `json:"clientKind,omitempty"` - ClientName *string `json:"clientName,omitempty"` - CoauthorEnabled *bool `json:"coauthorEnabled,omitempty"` - ConfigDir *string `json:"configDir,omitempty"` - ContinueOnAutoMode *bool `json:"continueOnAutoMode,omitempty"` - CopilotURL *string `json:"copilotUrl,omitempty"` - CustomAgentsLocalOnly *bool `json:"customAgentsLocalOnly,omitempty"` - DetachedFromSpawningParentEngagementID *string `json:"detachedFromSpawningParentEngagementId,omitempty"` - DetachedFromSpawningParentSessionID *string `json:"detachedFromSpawningParentSessionId,omitempty"` - DisabledInstructionSources []string `json:"disabledInstructionSources,omitzero"` - DisabledSkills []string `json:"disabledSkills,omitzero"` - EnableCitations *bool `json:"enableCitations,omitempty"` - EnableFileChangeTracking *bool `json:"enableFileChangeTracking,omitempty"` - EnableManagedSettings *bool `json:"enableManagedSettings,omitempty"` - EnableOnDemandInstructionDiscovery *bool `json:"enableOnDemandInstructionDiscovery,omitempty"` - EnableScriptSafety *bool `json:"enableScriptSafety,omitempty"` - EnableStreaming *bool `json:"enableStreaming,omitempty"` - EnvValueMode *SessionOpenOptionsEnvValueMode `json:"envValueMode,omitempty"` - EventsLogDirectory *string `json:"eventsLogDirectory,omitempty"` - EventsLogIncludesSubagents *bool `json:"eventsLogIncludesSubagents,omitempty"` - ExcludedBuiltinAgents []string `json:"excludedBuiltinAgents,omitzero"` - ExcludedTools []string `json:"excludedTools,omitzero"` - ExpAssignments any `json:"expAssignments,omitempty"` - FeatureFlags map[string]bool `json:"featureFlags,omitzero"` - IncludedBuiltinAgents []string `json:"includedBuiltinAgents,omitzero"` - InstalledPlugins []InstalledPlugin `json:"installedPlugins,omitzero"` - IntegrationID *string `json:"integrationId,omitempty"` - IsExperimentalMode *bool `json:"isExperimentalMode,omitempty"` - LogInteractiveShells *bool `json:"logInteractiveShells,omitempty"` - LspClientName *string `json:"lspClientName,omitempty"` - MaxInlineBinaryBytes *int64 `json:"maxInlineBinaryBytes,omitempty"` - Memory *MemoryConfiguration `json:"memory,omitempty"` - Model *string `json:"model,omitempty"` - ModelCapabilitiesOverrides *ModelCapabilitiesOverride `json:"modelCapabilitiesOverrides,omitempty"` - Models []ProviderModelConfig `json:"models,omitzero"` - Name *string `json:"name,omitempty"` - Provider *ProviderConfig `json:"provider,omitempty"` - Providers []NamedProviderConfig `json:"providers,omitzero"` - ReasoningEffort *string `json:"reasoningEffort,omitempty"` - ReasoningSummary *SessionOpenOptionsReasoningSummary `json:"reasoningSummary,omitempty"` - RemoteDefaultedOn *bool `json:"remoteDefaultedOn,omitempty"` - RemoteExporting *bool `json:"remoteExporting,omitempty"` - RemoteSteerable *bool `json:"remoteSteerable,omitempty"` - RunningInInteractiveMode *bool `json:"runningInInteractiveMode,omitempty"` - SandboxConfig *SandboxConfig `json:"sandboxConfig,omitempty"` - SessionCapabilities []SessionCapability `json:"sessionCapabilities,omitzero"` - SessionID *string `json:"sessionId,omitempty"` - SessionLimits *SessionLimitsConfig `json:"sessionLimits,omitempty"` - Shell *ShellOptions `json:"shell,omitempty"` - ShellInitProfile *string `json:"shellInitProfile,omitempty"` - ShellProcessFlags []string `json:"shellProcessFlags,omitzero"` - SkillDirectories []string `json:"skillDirectories,omitzero"` - SkipCustomInstructions *bool `json:"skipCustomInstructions,omitempty"` - TrajectoryFile *string `json:"trajectoryFile,omitempty"` - Verbosity *Verbosity `json:"verbosity,omitempty"` - WorkingDirectory *string `json:"workingDirectory,omitempty"` - WorkingDirectoryContext *SessionContext `json:"workingDirectoryContext,omitempty"` + AdditionalContentExclusionPolicies []SessionOpenOptionsAdditionalContentExclusionPolicy `json:"additionalContentExclusionPolicies,omitzero"` + AdditionalDirectories []string `json:"additionalDirectories,omitzero"` + AgentContext *string `json:"agentContext,omitempty"` + AllowAllMCPServerInstructions *bool `json:"allowAllMcpServerInstructions,omitempty"` + AskUserDisabled *bool `json:"askUserDisabled,omitempty"` + AuthInfo json.RawMessage `json:"authInfo,omitempty"` + AvailableTools []string `json:"availableTools,omitzero"` + Capi *CapiSessionOptions `json:"capi,omitempty"` + ClientKind *string `json:"clientKind,omitempty"` + ClientName *string `json:"clientName,omitempty"` + CoauthorEnabled *bool `json:"coauthorEnabled,omitempty"` + ConfigDir *string `json:"configDir,omitempty"` + ContinueOnAutoMode *bool `json:"continueOnAutoMode,omitempty"` + CopilotURL *string `json:"copilotUrl,omitempty"` + CustomAgentsLocalOnly *bool `json:"customAgentsLocalOnly,omitempty"` + DetachedFromSpawningParentEngagementID *string `json:"detachedFromSpawningParentEngagementId,omitempty"` + DetachedFromSpawningParentSessionID *string `json:"detachedFromSpawningParentSessionId,omitempty"` + DisabledInstructionSources []string `json:"disabledInstructionSources,omitzero"` + DisabledSkills []string `json:"disabledSkills,omitzero"` + EnableCitations *bool `json:"enableCitations,omitempty"` + EnableFileChangeTracking *bool `json:"enableFileChangeTracking,omitempty"` + EnableManagedSettings *bool `json:"enableManagedSettings,omitempty"` + EnableOnDemandInstructionDiscovery *bool `json:"enableOnDemandInstructionDiscovery,omitempty"` + EnableScriptSafety *bool `json:"enableScriptSafety,omitempty"` + EnableStreaming *bool `json:"enableStreaming,omitempty"` + EnvValueMode *SessionOpenOptionsEnvValueMode `json:"envValueMode,omitempty"` + EventsLogDirectory *string `json:"eventsLogDirectory,omitempty"` + EventsLogIncludesSubagents *bool `json:"eventsLogIncludesSubagents,omitempty"` + ExcludedBuiltinAgents []string `json:"excludedBuiltinAgents,omitzero"` + ExcludedTools []string `json:"excludedTools,omitzero"` + ExpAssignments any `json:"expAssignments,omitempty"` + FeatureFlags map[string]bool `json:"featureFlags,omitzero"` + IncludedBuiltinAgents []string `json:"includedBuiltinAgents,omitzero"` + InstalledPlugins []InstalledPlugin `json:"installedPlugins,omitzero"` + IntegrationID *string `json:"integrationId,omitempty"` + IsExperimentalMode *bool `json:"isExperimentalMode,omitempty"` + LogInteractiveShells *bool `json:"logInteractiveShells,omitempty"` + LspClientName *string `json:"lspClientName,omitempty"` + MaxInlineBinaryBytes *int64 `json:"maxInlineBinaryBytes,omitempty"` + Memory *MemoryConfiguration `json:"memory,omitempty"` + Model *string `json:"model,omitempty"` + ModelCapabilitiesOverrides *ModelCapabilitiesOverride `json:"modelCapabilitiesOverrides,omitempty"` + Models []ProviderModelConfig `json:"models,omitzero"` + Name *string `json:"name,omitempty"` + Provider *ProviderConfig `json:"provider,omitempty"` + Providers []NamedProviderConfig `json:"providers,omitzero"` + ReasoningEffort *string `json:"reasoningEffort,omitempty"` + ReasoningSummary *SessionOpenOptionsReasoningSummary `json:"reasoningSummary,omitempty"` + RemoteDefaultedOn *bool `json:"remoteDefaultedOn,omitempty"` + RemoteExporting *bool `json:"remoteExporting,omitempty"` + RemoteSteerable *bool `json:"remoteSteerable,omitempty"` + RunningInInteractiveMode *bool `json:"runningInInteractiveMode,omitempty"` + SandboxConfig *SandboxConfig `json:"sandboxConfig,omitempty"` + SessionCapabilities []SessionCapability `json:"sessionCapabilities,omitzero"` + SessionID *string `json:"sessionId,omitempty"` + SessionLimits *SessionLimitsConfig `json:"sessionLimits,omitempty"` + Shell *ShellOptions `json:"shell,omitempty"` + ShellInitProfile *string `json:"shellInitProfile,omitempty"` + ShellProcessFlags []string `json:"shellProcessFlags,omitzero"` + SkillDirectories []string `json:"skillDirectories,omitzero"` + SkipCustomInstructions *bool `json:"skipCustomInstructions,omitempty"` + TrajectoryFile *string `json:"trajectoryFile,omitempty"` + Verbosity *Verbosity `json:"verbosity,omitempty"` + WorkingDirectory *string `json:"workingDirectory,omitempty"` + WorkingDirectoryContext *SessionContext `json:"workingDirectoryContext,omitempty"` } var raw rawSessionOpenOptions if err := json.Unmarshal(data, &raw); err != nil { @@ -3846,7 +3846,7 @@ func (r SessionsOpenAttach) MarshalJSON() ([]byte, error) { Kind SessionOpenParamsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -3857,7 +3857,7 @@ func (r SessionsOpenCloud) MarshalJSON() ([]byte, error) { Kind SessionOpenParamsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -3868,7 +3868,7 @@ func (r SessionsOpenCreate) MarshalJSON() ([]byte, error) { Kind SessionOpenParamsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -3879,7 +3879,7 @@ func (r SessionsOpenHandoff) MarshalJSON() ([]byte, error) { Kind SessionOpenParamsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -3890,7 +3890,7 @@ func (r SessionsOpenRemote) MarshalJSON() ([]byte, error) { Kind SessionOpenParamsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -3901,7 +3901,7 @@ func (r SessionsOpenResume) MarshalJSON() ([]byte, error) { Kind SessionOpenParamsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -3912,7 +3912,7 @@ func (r SessionsOpenResumeLast) MarshalJSON() ([]byte, error) { Kind SessionOpenParamsKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -3994,7 +3994,7 @@ func (r SlashCommandAgentPromptResult) MarshalJSON() ([]byte, error) { Kind SlashCommandInvocationResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -4005,7 +4005,7 @@ func (r SlashCommandCompletedResult) MarshalJSON() ([]byte, error) { Kind SlashCommandInvocationResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -4016,7 +4016,7 @@ func (r SlashCommandSelectSubcommandResult) MarshalJSON() ([]byte, error) { Kind SlashCommandInvocationResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -4027,7 +4027,7 @@ func (r SlashCommandTextResult) MarshalJSON() ([]byte, error) { Kind SlashCommandInvocationResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -4079,7 +4079,7 @@ func (r TaskAgentInfo) MarshalJSON() ([]byte, error) { Type TaskInfoType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -4090,7 +4090,7 @@ func (r TaskShellInfo) MarshalJSON() ([]byte, error) { Type TaskInfoType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -4163,7 +4163,7 @@ func (r TaskAgentProgress) MarshalJSON() ([]byte, error) { Type TaskProgressType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -4174,7 +4174,7 @@ func (r TaskShellProgress) MarshalJSON() ([]byte, error) { Type TaskProgressType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -4276,8 +4276,8 @@ func matchesUIElicitationArrayAnyOfField(data []byte) bool { } var rawGroup0Items struct { AnyOf json.RawMessage `json:"anyOf"` - Enum json.RawMessage `json:"enum"` - Type json.RawMessage `json:"type"` + Enum json.RawMessage `json:"enum"` + Type json.RawMessage `json:"type"` } if err := json.Unmarshal(rawGroup0.Items, &rawGroup0Items); err != nil { return false @@ -4303,8 +4303,8 @@ func matchesUIElicitationArrayEnumField(data []byte) bool { } var rawGroup0Items struct { AnyOf json.RawMessage `json:"anyOf"` - Enum json.RawMessage `json:"enum"` - Type json.RawMessage `json:"type"` + Enum json.RawMessage `json:"enum"` + Type json.RawMessage `json:"type"` } if err := json.Unmarshal(rawGroup0.Items, &rawGroup0Items); err != nil { return false @@ -4329,7 +4329,7 @@ func matchesUIElicitationArrayEnumField(data []byte) bool { func matchesUIElicitationSchemaPropertyString(data []byte) bool { var rawGroup0 struct { - Enum json.RawMessage `json:"enum"` + Enum json.RawMessage `json:"enum"` OneOf json.RawMessage `json:"oneOf"` } if err := json.Unmarshal(data, &rawGroup0); err != nil { @@ -4343,7 +4343,7 @@ func matchesUIElicitationSchemaPropertyString(data []byte) bool { func matchesUIElicitationStringEnumField(data []byte) bool { var rawGroup0 struct { - Enum json.RawMessage `json:"enum"` + Enum json.RawMessage `json:"enum"` OneOf json.RawMessage `json:"oneOf"` } if err := json.Unmarshal(data, &rawGroup0); err != nil { @@ -4357,7 +4357,7 @@ func matchesUIElicitationStringEnumField(data []byte) bool { func matchesUIElicitationStringOneOfField(data []byte) bool { var rawGroup0 struct { - Enum json.RawMessage `json:"enum"` + Enum json.RawMessage `json:"enum"` OneOf json.RawMessage `json:"oneOf"` } if err := json.Unmarshal(data, &rawGroup0); err != nil { @@ -4461,7 +4461,7 @@ func (r UIElicitationArrayAnyOfField) MarshalJSON() ([]byte, error) { Type UIElicitationSchemaPropertyType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -4472,7 +4472,7 @@ func (r UIElicitationArrayEnumField) MarshalJSON() ([]byte, error) { Type UIElicitationSchemaPropertyType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -4483,7 +4483,7 @@ func (r UIElicitationSchemaPropertyBoolean) MarshalJSON() ([]byte, error) { Type UIElicitationSchemaPropertyType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -4494,7 +4494,7 @@ func (r UIElicitationSchemaPropertyNumber) MarshalJSON() ([]byte, error) { Type UIElicitationSchemaPropertyType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -4505,7 +4505,7 @@ func (r UIElicitationSchemaPropertyString) MarshalJSON() ([]byte, error) { Type UIElicitationSchemaPropertyType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -4516,7 +4516,7 @@ func (r UIElicitationStringEnumField) MarshalJSON() ([]byte, error) { Type UIElicitationSchemaPropertyType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -4527,7 +4527,7 @@ func (r UIElicitationStringOneOfField) MarshalJSON() ([]byte, error) { Type UIElicitationSchemaPropertyType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -4535,8 +4535,8 @@ func (r UIElicitationStringOneOfField) MarshalJSON() ([]byte, error) { func (r *UIElicitationSchema) UnmarshalJSON(data []byte) error { type rawUIElicitationSchema struct { Properties map[string]json.RawMessage `json:"properties"` - Required []string `json:"required,omitzero"` - Type UIElicitationSchemaType `json:"type"` + Required []string `json:"required,omitzero"` + Type UIElicitationSchemaType `json:"type"` } var raw rawUIElicitationSchema if err := json.Unmarshal(data, &raw); err != nil { @@ -4559,8 +4559,8 @@ func (r *UIElicitationSchema) UnmarshalJSON(data []byte) error { func (r *UIElicitationResponse) UnmarshalJSON(data []byte) error { type rawUIElicitationResponse struct { - Action UIElicitationResponseAction `json:"action"` - Content map[string]json.RawMessage `json:"content,omitzero"` + Action UIElicitationResponseAction `json:"action"` + Content map[string]json.RawMessage `json:"content,omitzero"` } var raw rawUIElicitationResponse if err := json.Unmarshal(data, &raw); err != nil { @@ -4578,4 +4578,4 @@ func (r *UIElicitationResponse) UnmarshalJSON(data []byte) error { } } return nil -} \ No newline at end of file +} diff --git a/go/rpc/zsession_encoding.go b/go/rpc/zsession_encoding.go index 4edfdbe194..e472ffe679 100644 --- a/go/rpc/zsession_encoding.go +++ b/go/rpc/zsession_encoding.go @@ -16,13 +16,13 @@ func (r *SessionEvent) Marshal() ([]byte, error) { func (e *SessionEvent) UnmarshalJSON(data []byte) error { type rawEvent struct { - AgentID *string `json:"agentId,omitempty"` - Data json.RawMessage `json:"data"` - Ephemeral *bool `json:"ephemeral,omitempty"` - ID string `json:"id"` - ParentID *string `json:"parentId"` - Timestamp time.Time `json:"timestamp"` - Type SessionEventType `json:"type"` + AgentID *string `json:"agentId,omitempty"` + Data json.RawMessage `json:"data"` + Ephemeral *bool `json:"ephemeral,omitempty"` + ID string `json:"id"` + ParentID *string `json:"parentId"` + Timestamp time.Time `json:"timestamp"` + Type SessionEventType `json:"type"` } var raw rawEvent if err := json.Unmarshal(data, &raw); err != nil { @@ -727,20 +727,20 @@ func (e *SessionEvent) UnmarshalJSON(data []byte) error { func (e SessionEvent) MarshalJSON() ([]byte, error) { type rawEvent struct { - AgentID *string `json:"agentId,omitempty"` - Data any `json:"data"` - Ephemeral *bool `json:"ephemeral,omitempty"` - ID string `json:"id"` - ParentID *string `json:"parentId"` - Timestamp time.Time `json:"timestamp"` - Type SessionEventType `json:"type"` + AgentID *string `json:"agentId,omitempty"` + Data any `json:"data"` + Ephemeral *bool `json:"ephemeral,omitempty"` + ID string `json:"id"` + ParentID *string `json:"parentId"` + Timestamp time.Time `json:"timestamp"` + Type SessionEventType `json:"type"` } return json.Marshal(rawEvent{ - AgentID: e.AgentID, - Data: e.Data, + AgentID: e.AgentID, + Data: e.Data, Ephemeral: e.Ephemeral, - ID: e.ID, - ParentID: e.ParentID, + ID: e.ID, + ParentID: e.ParentID, Timestamp: e.Timestamp, Type: e.Type(), }) @@ -754,20 +754,19 @@ func (r RawSessionEventData) MarshalJSON() ([]byte, error) { return r.Raw, nil } - func (r *UserMessageData) UnmarshalJSON(data []byte) error { type rawUserMessageData struct { - AgentMode *UserMessageAgentMode `json:"agentMode,omitempty"` - Attachments []json.RawMessage `json:"attachments,omitzero"` - Content string `json:"content"` - Delivery *UserMessageDelivery `json:"delivery,omitempty"` - InteractionID *string `json:"interactionId,omitempty"` - IsAutopilotContinuation *bool `json:"isAutopilotContinuation,omitempty"` - NativeDocumentPathFallbackPaths []string `json:"nativeDocumentPathFallbackPaths,omitzero"` - ParentAgentTaskID *string `json:"parentAgentTaskId,omitempty"` - Source *string `json:"source,omitempty"` - SupportedNativeDocumentMIMETypes []string `json:"supportedNativeDocumentMimeTypes,omitzero"` - TransformedContent *string `json:"transformedContent,omitempty"` + AgentMode *UserMessageAgentMode `json:"agentMode,omitempty"` + Attachments []json.RawMessage `json:"attachments,omitzero"` + Content string `json:"content"` + Delivery *UserMessageDelivery `json:"delivery,omitempty"` + InteractionID *string `json:"interactionId,omitempty"` + IsAutopilotContinuation *bool `json:"isAutopilotContinuation,omitempty"` + NativeDocumentPathFallbackPaths []string `json:"nativeDocumentPathFallbackPaths,omitzero"` + ParentAgentTaskID *string `json:"parentAgentTaskId,omitempty"` + Source *string `json:"source,omitempty"` + SupportedNativeDocumentMIMETypes []string `json:"supportedNativeDocumentMimeTypes,omitzero"` + TransformedContent *string `json:"transformedContent,omitempty"` } var raw rawUserMessageData if err := json.Unmarshal(data, &raw); err != nil { @@ -849,7 +848,7 @@ func (r CitationLocationBlock) MarshalJSON() ([]byte, error) { Type CitationLocationType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -860,7 +859,7 @@ func (r CitationLocationChar) MarshalJSON() ([]byte, error) { Type CitationLocationType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -871,17 +870,17 @@ func (r CitationLocationPage) MarshalJSON() ([]byte, error) { Type CitationLocationType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } func (r *CitationReference) UnmarshalJSON(data []byte) error { type rawCitationReference struct { - CitedText *string `json:"citedText,omitempty"` - Location json.RawMessage `json:"location,omitempty"` - ProviderMetadata any `json:"providerMetadata,omitempty"` - SourceID string `json:"sourceId"` + CitedText *string `json:"citedText,omitempty"` + Location json.RawMessage `json:"location,omitempty"` + ProviderMetadata any `json:"providerMetadata,omitempty"` + SourceID string `json:"sourceId"` } var raw rawCitationReference if err := json.Unmarshal(data, &raw); err != nil { @@ -902,9 +901,9 @@ func (r *CitationReference) UnmarshalJSON(data []byte) error { func matchesBinaryAssetReference(data []byte) bool { var rawGroup0 struct { - AssetID json.RawMessage `json:"assetId"` - ByteLength json.RawMessage `json:"byteLength"` - Data json.RawMessage `json:"data"` + AssetID json.RawMessage `json:"assetId"` + ByteLength json.RawMessage `json:"byteLength"` + Data json.RawMessage `json:"data"` OmittedReason json.RawMessage `json:"omittedReason"` } if err := json.Unmarshal(data, &rawGroup0); err != nil { @@ -924,9 +923,9 @@ func matchesBinaryAssetReference(data []byte) bool { func matchesOmittedBinaryResult(data []byte) bool { var rawGroup0 struct { - AssetID json.RawMessage `json:"assetId"` - ByteLength json.RawMessage `json:"byteLength"` - Data json.RawMessage `json:"data"` + AssetID json.RawMessage `json:"assetId"` + ByteLength json.RawMessage `json:"byteLength"` + Data json.RawMessage `json:"data"` OmittedReason json.RawMessage `json:"omittedReason"` } if err := json.Unmarshal(data, &rawGroup0); err != nil { @@ -946,9 +945,9 @@ func matchesOmittedBinaryResult(data []byte) bool { func matchesPersistedBinaryImage(data []byte) bool { var rawGroup0 struct { - AssetID json.RawMessage `json:"assetId"` - ByteLength json.RawMessage `json:"byteLength"` - Data json.RawMessage `json:"data"` + AssetID json.RawMessage `json:"assetId"` + ByteLength json.RawMessage `json:"byteLength"` + Data json.RawMessage `json:"data"` OmittedReason json.RawMessage `json:"omittedReason"` } if err := json.Unmarshal(data, &rawGroup0); err != nil { @@ -1047,7 +1046,7 @@ func (r BinaryAssetReference) MarshalJSON() ([]byte, error) { Type PersistedBinaryResultType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -1058,7 +1057,7 @@ func (r OmittedBinaryResult) MarshalJSON() ([]byte, error) { Type PersistedBinaryResultType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -1069,7 +1068,7 @@ func (r PersistedBinaryImage) MarshalJSON() ([]byte, error) { Type PersistedBinaryResultType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -1151,7 +1150,7 @@ func (r ToolExecutionCompleteContentAudio) MarshalJSON() ([]byte, error) { Type ToolExecutionCompleteContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -1162,7 +1161,7 @@ func (r ToolExecutionCompleteContentImage) MarshalJSON() ([]byte, error) { Type ToolExecutionCompleteContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -1235,7 +1234,7 @@ func (r ToolExecutionCompleteContentResource) MarshalJSON() ([]byte, error) { Type ToolExecutionCompleteContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -1246,7 +1245,7 @@ func (r ToolExecutionCompleteContentResourceLink) MarshalJSON() ([]byte, error) Type ToolExecutionCompleteContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -1257,7 +1256,7 @@ func (r ToolExecutionCompleteContentShellExit) MarshalJSON() ([]byte, error) { Type ToolExecutionCompleteContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -1268,7 +1267,7 @@ func (r ToolExecutionCompleteContentTerminal) MarshalJSON() ([]byte, error) { Type ToolExecutionCompleteContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -1279,21 +1278,21 @@ func (r ToolExecutionCompleteContentText) MarshalJSON() ([]byte, error) { Type ToolExecutionCompleteContentType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } func (r *ToolExecutionCompleteResult) UnmarshalJSON(data []byte) error { type rawToolExecutionCompleteResult struct { - BinaryResultsForLlm []json.RawMessage `json:"binaryResultsForLlm,omitzero"` - CitableSources []CitableSource `json:"citableSources,omitzero"` - Content string `json:"content"` - Contents []json.RawMessage `json:"contents,omitzero"` - DetailedContent *string `json:"detailedContent,omitempty"` - MCPMeta any `json:"mcpMeta,omitempty"` - StructuredContent any `json:"structuredContent,omitempty"` - UIResource *ToolExecutionCompleteUIResource `json:"uiResource,omitempty"` + BinaryResultsForLlm []json.RawMessage `json:"binaryResultsForLlm,omitzero"` + CitableSources []CitableSource `json:"citableSources,omitzero"` + Content string `json:"content"` + Contents []json.RawMessage `json:"contents,omitzero"` + DetailedContent *string `json:"detailedContent,omitempty"` + MCPMeta any `json:"mcpMeta,omitempty"` + StructuredContent any `json:"structuredContent,omitempty"` + UIResource *ToolExecutionCompleteUIResource `json:"uiResource,omitempty"` } var raw rawToolExecutionCompleteResult if err := json.Unmarshal(data, &raw); err != nil { @@ -1405,7 +1404,7 @@ func (r SystemNotificationAgentCompleted) MarshalJSON() ([]byte, error) { Type SystemNotificationType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -1416,7 +1415,7 @@ func (r SystemNotificationAgentIdle) MarshalJSON() ([]byte, error) { Type SystemNotificationType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -1427,7 +1426,7 @@ func (r SystemNotificationInstructionDiscovered) MarshalJSON() ([]byte, error) { Type SystemNotificationType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -1438,7 +1437,7 @@ func (r SystemNotificationNewInboxMessage) MarshalJSON() ([]byte, error) { Type SystemNotificationType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -1449,7 +1448,7 @@ func (r SystemNotificationShellCompleted) MarshalJSON() ([]byte, error) { Type SystemNotificationType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -1460,7 +1459,7 @@ func (r SystemNotificationShellDetachedCompleted) MarshalJSON() ([]byte, error) Type SystemNotificationType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } @@ -1471,15 +1470,15 @@ func (r SystemNotificationUnclassified) MarshalJSON() ([]byte, error) { Type SystemNotificationType `json:"type"` alias }{ - Type: r.Type(), + Type: r.Type(), alias: alias(r), }) } func (r *SystemNotificationData) UnmarshalJSON(data []byte) error { type rawSystemNotificationData struct { - Content string `json:"content"` - Kind json.RawMessage `json:"kind"` + Content string `json:"content"` + Kind json.RawMessage `json:"kind"` } var raw rawSystemNotificationData if err := json.Unmarshal(data, &raw); err != nil { @@ -1591,7 +1590,7 @@ func (r PermissionRequestCustomTool) MarshalJSON() ([]byte, error) { Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1602,7 +1601,7 @@ func (r PermissionRequestExtensionManagement) MarshalJSON() ([]byte, error) { Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1613,7 +1612,7 @@ func (r PermissionRequestExtensionPermissionAccess) MarshalJSON() ([]byte, error Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1624,7 +1623,7 @@ func (r PermissionRequestHook) MarshalJSON() ([]byte, error) { Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1635,7 +1634,7 @@ func (r PermissionRequestMCP) MarshalJSON() ([]byte, error) { Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1646,7 +1645,7 @@ func (r PermissionRequestMemory) MarshalJSON() ([]byte, error) { Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1657,7 +1656,7 @@ func (r PermissionRequestRead) MarshalJSON() ([]byte, error) { Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1668,7 +1667,7 @@ func (r PermissionRequestShell) MarshalJSON() ([]byte, error) { Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1679,7 +1678,7 @@ func (r PermissionRequestURL) MarshalJSON() ([]byte, error) { Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1690,7 +1689,7 @@ func (r PermissionRequestWrite) MarshalJSON() ([]byte, error) { Kind PermissionRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1796,7 +1795,7 @@ func (r PermissionPromptRequestCommands) MarshalJSON() ([]byte, error) { Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1807,7 +1806,7 @@ func (r PermissionPromptRequestCustomTool) MarshalJSON() ([]byte, error) { Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1818,7 +1817,7 @@ func (r PermissionPromptRequestExtensionManagement) MarshalJSON() ([]byte, error Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1829,7 +1828,7 @@ func (r PermissionPromptRequestExtensionPermissionAccess) MarshalJSON() ([]byte, Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1840,7 +1839,7 @@ func (r PermissionPromptRequestHook) MarshalJSON() ([]byte, error) { Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1851,7 +1850,7 @@ func (r PermissionPromptRequestMCP) MarshalJSON() ([]byte, error) { Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1862,7 +1861,7 @@ func (r PermissionPromptRequestMemory) MarshalJSON() ([]byte, error) { Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1873,7 +1872,7 @@ func (r PermissionPromptRequestPath) MarshalJSON() ([]byte, error) { Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1884,7 +1883,7 @@ func (r PermissionPromptRequestRead) MarshalJSON() ([]byte, error) { Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1895,7 +1894,7 @@ func (r PermissionPromptRequestURL) MarshalJSON() ([]byte, error) { Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1906,7 +1905,7 @@ func (r PermissionPromptRequestWrite) MarshalJSON() ([]byte, error) { Kind PermissionPromptRequestKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -1914,10 +1913,10 @@ func (r PermissionPromptRequestWrite) MarshalJSON() ([]byte, error) { func (r *PermissionRequestedData) UnmarshalJSON(data []byte) error { type rawPermissionRequestedData struct { PermissionRequest json.RawMessage `json:"permissionRequest"` - PromptRequest json.RawMessage `json:"promptRequest,omitempty"` - RequestID string `json:"requestId"` - ResolvedByHook *bool `json:"resolvedByHook,omitempty"` - RiskAssessment any `json:"riskAssessment,omitempty"` + PromptRequest json.RawMessage `json:"promptRequest,omitempty"` + RequestID string `json:"requestId"` + ResolvedByHook *bool `json:"resolvedByHook,omitempty"` + RiskAssessment any `json:"riskAssessment,omitempty"` } var raw rawPermissionRequestedData if err := json.Unmarshal(data, &raw); err != nil { @@ -2032,15 +2031,15 @@ func (r PermissionApproved) MarshalJSON() ([]byte, error) { Kind PermissionResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } func (r *PermissionApprovedForLocation) UnmarshalJSON(data []byte) error { type rawPermissionApprovedForLocation struct { - Approval json.RawMessage `json:"approval"` - LocationKey string `json:"locationKey"` + Approval json.RawMessage `json:"approval"` + LocationKey string `json:"locationKey"` } var raw rawPermissionApprovedForLocation if err := json.Unmarshal(data, &raw); err != nil { @@ -2063,7 +2062,7 @@ func (r PermissionApprovedForLocation) MarshalJSON() ([]byte, error) { Kind PermissionResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2092,7 +2091,7 @@ func (r PermissionApprovedForSession) MarshalJSON() ([]byte, error) { Kind PermissionResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2103,7 +2102,7 @@ func (r PermissionCancelled) MarshalJSON() ([]byte, error) { Kind PermissionResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2114,7 +2113,7 @@ func (r PermissionDeniedByContentExclusionPolicy) MarshalJSON() ([]byte, error) Kind PermissionResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2125,7 +2124,7 @@ func (r PermissionDeniedByPermissionRequestHook) MarshalJSON() ([]byte, error) { Kind PermissionResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2136,7 +2135,7 @@ func (r PermissionDeniedByRules) MarshalJSON() ([]byte, error) { Kind PermissionResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2147,7 +2146,7 @@ func (r PermissionDeniedInteractivelyByUser) MarshalJSON() ([]byte, error) { Kind PermissionResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } @@ -2158,16 +2157,16 @@ func (r PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser) MarshalJSON() Kind PermissionResultKind `json:"kind"` alias }{ - Kind: r.Kind(), + Kind: r.Kind(), alias: alias(r), }) } func (r *PermissionCompletedData) UnmarshalJSON(data []byte) error { type rawPermissionCompletedData struct { - RequestID string `json:"requestId"` - Result json.RawMessage `json:"result"` - ToolCallID *string `json:"toolCallId,omitempty"` + RequestID string `json:"requestId"` + Result json.RawMessage `json:"result"` + ToolCallID *string `json:"toolCallId,omitempty"` } var raw rawPermissionCompletedData if err := json.Unmarshal(data, &raw); err != nil { @@ -2204,4 +2203,4 @@ func (r *SessionExtensionsAttachmentsPushedData) UnmarshalJSON(data []byte) erro } } return nil -} \ No newline at end of file +} diff --git a/go/rpc/zsession_events.go b/go/rpc/zsession_events.go index fd6420d3d0..b340b84b29 100644 --- a/go/rpc/zsession_events.go +++ b/go/rpc/zsession_events.go @@ -48,64 +48,65 @@ func (RawSessionEventData) sessionEventData() {} func (r RawSessionEventData) Type() SessionEventType { return r.EventType } + // SessionEventType identifies the kind of session event. type SessionEventType string const ( - SessionEventTypeAbort SessionEventType = "abort" - SessionEventTypeAssistantIdle SessionEventType = "assistant.idle" - SessionEventTypeAssistantIntent SessionEventType = "assistant.intent" - SessionEventTypeAssistantMessage SessionEventType = "assistant.message" - SessionEventTypeAssistantMessageDelta SessionEventType = "assistant.message_delta" - SessionEventTypeAssistantMessageStart SessionEventType = "assistant.message_start" - SessionEventTypeAssistantReasoning SessionEventType = "assistant.reasoning" - SessionEventTypeAssistantReasoningDelta SessionEventType = "assistant.reasoning_delta" + SessionEventTypeAbort SessionEventType = "abort" + SessionEventTypeAssistantIdle SessionEventType = "assistant.idle" + SessionEventTypeAssistantIntent SessionEventType = "assistant.intent" + SessionEventTypeAssistantMessage SessionEventType = "assistant.message" + SessionEventTypeAssistantMessageDelta SessionEventType = "assistant.message_delta" + SessionEventTypeAssistantMessageStart SessionEventType = "assistant.message_start" + SessionEventTypeAssistantReasoning SessionEventType = "assistant.reasoning" + SessionEventTypeAssistantReasoningDelta SessionEventType = "assistant.reasoning_delta" SessionEventTypeAssistantServerToolProgress SessionEventType = "assistant.server_tool_progress" - SessionEventTypeAssistantStreamingDelta SessionEventType = "assistant.streaming_delta" - SessionEventTypeAssistantToolCallDelta SessionEventType = "assistant.tool_call_delta" - SessionEventTypeAssistantTurnEnd SessionEventType = "assistant.turn_end" - SessionEventTypeAssistantTurnRetry SessionEventType = "assistant.turn_retry" - SessionEventTypeAssistantTurnStart SessionEventType = "assistant.turn_start" - SessionEventTypeAssistantUsage SessionEventType = "assistant.usage" - SessionEventTypeAutoModeSwitchCompleted SessionEventType = "auto_mode_switch.completed" - SessionEventTypeAutoModeSwitchRequested SessionEventType = "auto_mode_switch.requested" - SessionEventTypeCapabilitiesChanged SessionEventType = "capabilities.changed" - SessionEventTypeCommandCompleted SessionEventType = "command.completed" - SessionEventTypeCommandExecute SessionEventType = "command.execute" - SessionEventTypeCommandQueued SessionEventType = "command.queued" - SessionEventTypeCommandsChanged SessionEventType = "commands.changed" - SessionEventTypeElicitationCompleted SessionEventType = "elicitation.completed" - SessionEventTypeElicitationRequested SessionEventType = "elicitation.requested" - SessionEventTypeExitPlanModeCompleted SessionEventType = "exit_plan_mode.completed" - SessionEventTypeExitPlanModeRequested SessionEventType = "exit_plan_mode.requested" - SessionEventTypeExternalToolCompleted SessionEventType = "external_tool.completed" - SessionEventTypeExternalToolRequested SessionEventType = "external_tool.requested" + SessionEventTypeAssistantStreamingDelta SessionEventType = "assistant.streaming_delta" + SessionEventTypeAssistantToolCallDelta SessionEventType = "assistant.tool_call_delta" + SessionEventTypeAssistantTurnEnd SessionEventType = "assistant.turn_end" + SessionEventTypeAssistantTurnRetry SessionEventType = "assistant.turn_retry" + SessionEventTypeAssistantTurnStart SessionEventType = "assistant.turn_start" + SessionEventTypeAssistantUsage SessionEventType = "assistant.usage" + SessionEventTypeAutoModeSwitchCompleted SessionEventType = "auto_mode_switch.completed" + SessionEventTypeAutoModeSwitchRequested SessionEventType = "auto_mode_switch.requested" + SessionEventTypeCapabilitiesChanged SessionEventType = "capabilities.changed" + SessionEventTypeCommandCompleted SessionEventType = "command.completed" + SessionEventTypeCommandExecute SessionEventType = "command.execute" + SessionEventTypeCommandQueued SessionEventType = "command.queued" + SessionEventTypeCommandsChanged SessionEventType = "commands.changed" + SessionEventTypeElicitationCompleted SessionEventType = "elicitation.completed" + SessionEventTypeElicitationRequested SessionEventType = "elicitation.requested" + SessionEventTypeExitPlanModeCompleted SessionEventType = "exit_plan_mode.completed" + SessionEventTypeExitPlanModeRequested SessionEventType = "exit_plan_mode.requested" + SessionEventTypeExternalToolCompleted SessionEventType = "external_tool.completed" + SessionEventTypeExternalToolRequested SessionEventType = "external_tool.requested" // Experimental: SessionEventTypeFactoryRunUpdated identifies an experimental event that may // change or be removed. - SessionEventTypeFactoryRunUpdated SessionEventType = "factory.run_updated" - SessionEventTypeHookEnd SessionEventType = "hook.end" - SessionEventTypeHookProgress SessionEventType = "hook.progress" - SessionEventTypeHookStart SessionEventType = "hook.start" - SessionEventTypeMCPAppToolCallComplete SessionEventType = "mcp_app.tool_call_complete" + SessionEventTypeFactoryRunUpdated SessionEventType = "factory.run_updated" + SessionEventTypeHookEnd SessionEventType = "hook.end" + SessionEventTypeHookProgress SessionEventType = "hook.progress" + SessionEventTypeHookStart SessionEventType = "hook.start" + SessionEventTypeMCPAppToolCallComplete SessionEventType = "mcp_app.tool_call_complete" SessionEventTypeMCPHeadersRefreshCompleted SessionEventType = "mcp.headers_refresh_completed" - SessionEventTypeMCPHeadersRefreshRequired SessionEventType = "mcp.headers_refresh_required" - SessionEventTypeMCPOauthCompleted SessionEventType = "mcp.oauth_completed" - SessionEventTypeMCPOauthRequired SessionEventType = "mcp.oauth_required" - SessionEventTypeMCPPromptsListChanged SessionEventType = "mcp.prompts.list_changed" - SessionEventTypeMCPResourcesListChanged SessionEventType = "mcp.resources.list_changed" - SessionEventTypeMCPToolsListChanged SessionEventType = "mcp.tools.list_changed" - SessionEventTypeModelCallFailure SessionEventType = "model.call_failure" - SessionEventTypeModelCallStart SessionEventType = "model.call_start" - SessionEventTypePendingMessagesModified SessionEventType = "pending_messages.modified" - SessionEventTypePermissionCompleted SessionEventType = "permission.completed" - SessionEventTypePermissionRequested SessionEventType = "permission.requested" - SessionEventTypeSamplingCompleted SessionEventType = "sampling.completed" - SessionEventTypeSamplingRequested SessionEventType = "sampling.requested" + SessionEventTypeMCPHeadersRefreshRequired SessionEventType = "mcp.headers_refresh_required" + SessionEventTypeMCPOauthCompleted SessionEventType = "mcp.oauth_completed" + SessionEventTypeMCPOauthRequired SessionEventType = "mcp.oauth_required" + SessionEventTypeMCPPromptsListChanged SessionEventType = "mcp.prompts.list_changed" + SessionEventTypeMCPResourcesListChanged SessionEventType = "mcp.resources.list_changed" + SessionEventTypeMCPToolsListChanged SessionEventType = "mcp.tools.list_changed" + SessionEventTypeModelCallFailure SessionEventType = "model.call_failure" + SessionEventTypeModelCallStart SessionEventType = "model.call_start" + SessionEventTypePendingMessagesModified SessionEventType = "pending_messages.modified" + SessionEventTypePermissionCompleted SessionEventType = "permission.completed" + SessionEventTypePermissionRequested SessionEventType = "permission.requested" + SessionEventTypeSamplingCompleted SessionEventType = "sampling.completed" + SessionEventTypeSamplingRequested SessionEventType = "sampling.requested" // Experimental: SessionEventTypeSessionAutoModeResolved identifies an experimental event // that may change or be removed. - SessionEventTypeSessionAutoModeResolved SessionEventType = "session.auto_mode_resolved" + SessionEventTypeSessionAutoModeResolved SessionEventType = "session.auto_mode_resolved" SessionEventTypeSessionAutopilotObjectiveChanged SessionEventType = "session.autopilot_objective_changed" - SessionEventTypeSessionBackgroundTasksChanged SessionEventType = "session.background_tasks_changed" + SessionEventTypeSessionBackgroundTasksChanged SessionEventType = "session.background_tasks_changed" // Experimental: SessionEventTypeSessionBinaryAsset identifies an experimental event that // may change or be removed. SessionEventTypeSessionBinaryAsset SessionEventType = "session.binary_asset" @@ -126,68 +127,68 @@ const ( SessionEventTypeSessionCanvasRemoved SessionEventType = "session.canvas.removed" // Experimental: SessionEventTypeSessionCanvasUnavailable identifies an experimental event // that may change or be removed. - SessionEventTypeSessionCanvasUnavailable SessionEventType = "session.canvas.unavailable" - SessionEventTypeSessionCompactionComplete SessionEventType = "session.compaction_complete" - SessionEventTypeSessionCompactionStart SessionEventType = "session.compaction_start" - SessionEventTypeSessionContextChanged SessionEventType = "session.context_changed" - SessionEventTypeSessionCustomAgentsUpdated SessionEventType = "session.custom_agents_updated" - SessionEventTypeSessionCustomNotification SessionEventType = "session.custom_notification" - SessionEventTypeSessionError SessionEventType = "session.error" + SessionEventTypeSessionCanvasUnavailable SessionEventType = "session.canvas.unavailable" + SessionEventTypeSessionCompactionComplete SessionEventType = "session.compaction_complete" + SessionEventTypeSessionCompactionStart SessionEventType = "session.compaction_start" + SessionEventTypeSessionContextChanged SessionEventType = "session.context_changed" + SessionEventTypeSessionCustomAgentsUpdated SessionEventType = "session.custom_agents_updated" + SessionEventTypeSessionCustomNotification SessionEventType = "session.custom_notification" + SessionEventTypeSessionError SessionEventType = "session.error" SessionEventTypeSessionExtensionsAttachmentsPushed SessionEventType = "session.extensions.attachments_pushed" - SessionEventTypeSessionExtensionsLoaded SessionEventType = "session.extensions_loaded" - SessionEventTypeSessionHandoff SessionEventType = "session.handoff" - SessionEventTypeSessionIdle SessionEventType = "session.idle" - SessionEventTypeSessionInfo SessionEventType = "session.info" - SessionEventTypeSessionLimitsExhaustedCompleted SessionEventType = "session_limits_exhausted.completed" - SessionEventTypeSessionLimitsExhaustedRequested SessionEventType = "session_limits_exhausted.requested" + SessionEventTypeSessionExtensionsLoaded SessionEventType = "session.extensions_loaded" + SessionEventTypeSessionHandoff SessionEventType = "session.handoff" + SessionEventTypeSessionIdle SessionEventType = "session.idle" + SessionEventTypeSessionInfo SessionEventType = "session.info" + SessionEventTypeSessionLimitsExhaustedCompleted SessionEventType = "session_limits_exhausted.completed" + SessionEventTypeSessionLimitsExhaustedRequested SessionEventType = "session_limits_exhausted.requested" // Experimental: SessionEventTypeSessionManagedSettingsEnforced identifies an experimental // event that may change or be removed. SessionEventTypeSessionManagedSettingsEnforced SessionEventType = "session.managed_settings_enforced" // Experimental: SessionEventTypeSessionManagedSettingsResolved identifies an experimental // event that may change or be removed. SessionEventTypeSessionManagedSettingsResolved SessionEventType = "session.managed_settings_resolved" - SessionEventTypeSessionMCPServersLoaded SessionEventType = "session.mcp_servers_loaded" - SessionEventTypeSessionMCPServerStatusChanged SessionEventType = "session.mcp_server_status_changed" - SessionEventTypeSessionModeChanged SessionEventType = "session.mode_changed" - SessionEventTypeSessionModelChange SessionEventType = "session.model_change" - SessionEventTypeSessionPermissionsChanged SessionEventType = "session.permissions_changed" - SessionEventTypeSessionPlanChanged SessionEventType = "session.plan_changed" - SessionEventTypeSessionRemoteSteerableChanged SessionEventType = "session.remote_steerable_changed" - SessionEventTypeSessionResume SessionEventType = "session.resume" - SessionEventTypeSessionScheduleCancelled SessionEventType = "session.schedule_cancelled" - SessionEventTypeSessionScheduleCreated SessionEventType = "session.schedule_created" - SessionEventTypeSessionScheduleRearmed SessionEventType = "session.schedule_rearmed" - SessionEventTypeSessionSessionLimitsChanged SessionEventType = "session.session_limits_changed" - SessionEventTypeSessionShutdown SessionEventType = "session.shutdown" - SessionEventTypeSessionSkillsLoaded SessionEventType = "session.skills_loaded" - SessionEventTypeSessionSnapshotRewind SessionEventType = "session.snapshot_rewind" - SessionEventTypeSessionStart SessionEventType = "session.start" - SessionEventTypeSessionTaskComplete SessionEventType = "session.task_complete" - SessionEventTypeSessionTitleChanged SessionEventType = "session.title_changed" - SessionEventTypeSessionTodosChanged SessionEventType = "session.todos_changed" - SessionEventTypeSessionToolsUpdated SessionEventType = "session.tools_updated" - SessionEventTypeSessionTruncation SessionEventType = "session.truncation" - SessionEventTypeSessionUsageCheckpoint SessionEventType = "session.usage_checkpoint" - SessionEventTypeSessionUsageInfo SessionEventType = "session.usage_info" - SessionEventTypeSessionWarning SessionEventType = "session.warning" - SessionEventTypeSessionWorkspaceFileChanged SessionEventType = "session.workspace_file_changed" - SessionEventTypeSkillInvoked SessionEventType = "skill.invoked" - SessionEventTypeSubagentCompleted SessionEventType = "subagent.completed" - SessionEventTypeSubagentDeselected SessionEventType = "subagent.deselected" - SessionEventTypeSubagentFailed SessionEventType = "subagent.failed" - SessionEventTypeSubagentSelected SessionEventType = "subagent.selected" - SessionEventTypeSubagentStarted SessionEventType = "subagent.started" - SessionEventTypeSystemMessage SessionEventType = "system.message" - SessionEventTypeSystemNotification SessionEventType = "system.notification" - SessionEventTypeToolExecutionComplete SessionEventType = "tool.execution_complete" - SessionEventTypeToolExecutionPartialResult SessionEventType = "tool.execution_partial_result" - SessionEventTypeToolExecutionProgress SessionEventType = "tool.execution_progress" - SessionEventTypeToolExecutionStart SessionEventType = "tool.execution_start" - SessionEventTypeToolSearchActivated SessionEventType = "tool_search.activated" - SessionEventTypeToolUserRequested SessionEventType = "tool.user_requested" - SessionEventTypeUserInputCompleted SessionEventType = "user_input.completed" - SessionEventTypeUserInputRequested SessionEventType = "user_input.requested" - SessionEventTypeUserMessage SessionEventType = "user.message" + SessionEventTypeSessionMCPServersLoaded SessionEventType = "session.mcp_servers_loaded" + SessionEventTypeSessionMCPServerStatusChanged SessionEventType = "session.mcp_server_status_changed" + SessionEventTypeSessionModeChanged SessionEventType = "session.mode_changed" + SessionEventTypeSessionModelChange SessionEventType = "session.model_change" + SessionEventTypeSessionPermissionsChanged SessionEventType = "session.permissions_changed" + SessionEventTypeSessionPlanChanged SessionEventType = "session.plan_changed" + SessionEventTypeSessionRemoteSteerableChanged SessionEventType = "session.remote_steerable_changed" + SessionEventTypeSessionResume SessionEventType = "session.resume" + SessionEventTypeSessionScheduleCancelled SessionEventType = "session.schedule_cancelled" + SessionEventTypeSessionScheduleCreated SessionEventType = "session.schedule_created" + SessionEventTypeSessionScheduleRearmed SessionEventType = "session.schedule_rearmed" + SessionEventTypeSessionSessionLimitsChanged SessionEventType = "session.session_limits_changed" + SessionEventTypeSessionShutdown SessionEventType = "session.shutdown" + SessionEventTypeSessionSkillsLoaded SessionEventType = "session.skills_loaded" + SessionEventTypeSessionSnapshotRewind SessionEventType = "session.snapshot_rewind" + SessionEventTypeSessionStart SessionEventType = "session.start" + SessionEventTypeSessionTaskComplete SessionEventType = "session.task_complete" + SessionEventTypeSessionTitleChanged SessionEventType = "session.title_changed" + SessionEventTypeSessionTodosChanged SessionEventType = "session.todos_changed" + SessionEventTypeSessionToolsUpdated SessionEventType = "session.tools_updated" + SessionEventTypeSessionTruncation SessionEventType = "session.truncation" + SessionEventTypeSessionUsageCheckpoint SessionEventType = "session.usage_checkpoint" + SessionEventTypeSessionUsageInfo SessionEventType = "session.usage_info" + SessionEventTypeSessionWarning SessionEventType = "session.warning" + SessionEventTypeSessionWorkspaceFileChanged SessionEventType = "session.workspace_file_changed" + SessionEventTypeSkillInvoked SessionEventType = "skill.invoked" + SessionEventTypeSubagentCompleted SessionEventType = "subagent.completed" + SessionEventTypeSubagentDeselected SessionEventType = "subagent.deselected" + SessionEventTypeSubagentFailed SessionEventType = "subagent.failed" + SessionEventTypeSubagentSelected SessionEventType = "subagent.selected" + SessionEventTypeSubagentStarted SessionEventType = "subagent.started" + SessionEventTypeSystemMessage SessionEventType = "system.message" + SessionEventTypeSystemNotification SessionEventType = "system.notification" + SessionEventTypeToolExecutionComplete SessionEventType = "tool.execution_complete" + SessionEventTypeToolExecutionPartialResult SessionEventType = "tool.execution_partial_result" + SessionEventTypeToolExecutionProgress SessionEventType = "tool.execution_progress" + SessionEventTypeToolExecutionStart SessionEventType = "tool.execution_start" + SessionEventTypeToolSearchActivated SessionEventType = "tool_search.activated" + SessionEventTypeToolUserRequested SessionEventType = "tool.user_requested" + SessionEventTypeUserInputCompleted SessionEventType = "user_input.completed" + SessionEventTypeUserInputRequested SessionEventType = "user_input.requested" + SessionEventTypeUserMessage SessionEventType = "user.message" ) // Agent intent description for current activity or plan @@ -196,7 +197,7 @@ type AssistantIntentData struct { Intent string `json:"intent"` } -func (*AssistantIntentData) sessionEventData() {} +func (*AssistantIntentData) sessionEventData() {} func (*AssistantIntentData) Type() SessionEventType { return SessionEventTypeAssistantIntent } // Agent mode change details including previous and new modes @@ -207,7 +208,7 @@ type SessionModeChangedData struct { PreviousMode SessionMode `json:"previousMode"` } -func (*SessionModeChangedData) sessionEventData() {} +func (*SessionModeChangedData) sessionEventData() {} func (*SessionModeChangedData) Type() SessionEventType { return SessionEventTypeSessionModeChanged } // Assistant reasoning content for timeline display with complete thinking text @@ -216,10 +217,10 @@ type AssistantReasoningData struct { Content string `json:"content"` // Unique identifier for this reasoning block ReasoningID string `json:"reasoningId"` - Rte *bool `json:"rte,omitempty"` + Rte *bool `json:"rte,omitempty"` } -func (*AssistantReasoningData) sessionEventData() {} +func (*AssistantReasoningData) sessionEventData() {} func (*AssistantReasoningData) Type() SessionEventType { return SessionEventTypeAssistantReasoning } // Assistant response containing text content, optional tool requests, and interaction metadata @@ -256,7 +257,7 @@ type AssistantMessageData struct { ReasoningWireField *string `json:"reasoningWireField,omitempty"` // GitHub request tracing ID (x-github-request-id header) for correlating with server-side logs RequestID *string `json:"requestId,omitempty"` - Rte *bool `json:"rte,omitempty"` + Rte *bool `json:"rte,omitempty"` // Neutral provider-tagged server-side tool-use payload (tool search, advisor) for verbatim round-tripping ServerTools *AssistantMessageServerTools `json:"serverTools,omitempty"` // Copilot service request ID (x-copilot-service-request-id header) for CAPI log correlation @@ -267,7 +268,7 @@ type AssistantMessageData struct { TurnID *string `json:"turnId,omitempty"` } -func (*AssistantMessageData) sessionEventData() {} +func (*AssistantMessageData) sessionEventData() {} func (*AssistantMessageData) Type() SessionEventType { return SessionEventTypeAssistantMessage } // Auto Intent resolution: the concrete model the session settled on for the first prompt of an auto-mode session, and why. Lets SDK clients render the chosen model and the full reason it was picked. The core selection fields (chosenModel/reasoningBucket/categoryScores) are stable; the routing-analytics fields (predictedLabel/confidence/candidateModels) mirror the upstream intent service and may evolve, hence the event's experimental stability. @@ -306,7 +307,9 @@ type SessionAutoModeResolvedData struct { } func (*SessionAutoModeResolvedData) sessionEventData() {} -func (*SessionAutoModeResolvedData) Type() SessionEventType { return SessionEventTypeSessionAutoModeResolved } +func (*SessionAutoModeResolvedData) Type() SessionEventType { + return SessionEventTypeSessionAutoModeResolved +} // Auto mode switch completion notification type AutoModeSwitchCompletedData struct { @@ -317,7 +320,9 @@ type AutoModeSwitchCompletedData struct { } func (*AutoModeSwitchCompletedData) sessionEventData() {} -func (*AutoModeSwitchCompletedData) Type() SessionEventType { return SessionEventTypeAutoModeSwitchCompleted } +func (*AutoModeSwitchCompletedData) Type() SessionEventType { + return SessionEventTypeAutoModeSwitchCompleted +} // Auto mode switch request notification requiring user approval type AutoModeSwitchRequestedData struct { @@ -330,7 +335,9 @@ type AutoModeSwitchRequestedData struct { } func (*AutoModeSwitchRequestedData) sessionEventData() {} -func (*AutoModeSwitchRequestedData) Type() SessionEventType { return SessionEventTypeAutoModeSwitchRequested } +func (*AutoModeSwitchRequestedData) Type() SessionEventType { + return SessionEventTypeAutoModeSwitchRequested +} // Autopilot objective state file operation details indicating what changed type SessionAutopilotObjectiveChangedData struct { @@ -343,7 +350,9 @@ type SessionAutopilotObjectiveChangedData struct { } func (*SessionAutopilotObjectiveChangedData) sessionEventData() {} -func (*SessionAutopilotObjectiveChangedData) Type() SessionEventType { return SessionEventTypeSessionAutopilotObjectiveChanged } +func (*SessionAutopilotObjectiveChangedData) Type() SessionEventType { + return SessionEventTypeSessionAutopilotObjectiveChanged +} // Canonical bytes for a content-addressed binary asset shared by reference across events type SessionBinaryAssetData struct { @@ -363,7 +372,7 @@ type SessionBinaryAssetData struct { Discriminator BinaryAssetType `json:"type"` } -func (*SessionBinaryAssetData) sessionEventData() {} +func (*SessionBinaryAssetData) sessionEventData() {} func (*SessionBinaryAssetData) Type() SessionEventType { return SessionEventTypeSessionBinaryAsset } // Context window breakdown at the start of LLM-powered conversation compaction @@ -385,7 +394,9 @@ type SessionCompactionStartData struct { } func (*SessionCompactionStartData) sessionEventData() {} -func (*SessionCompactionStartData) Type() SessionEventType { return SessionEventTypeSessionCompactionStart } +func (*SessionCompactionStartData) Type() SessionEventType { + return SessionEventTypeSessionCompactionStart +} // Conversation compaction results including success status, metrics, and optional error details type SessionCompactionCompleteData struct { @@ -432,7 +443,9 @@ type SessionCompactionCompleteData struct { } func (*SessionCompactionCompleteData) sessionEventData() {} -func (*SessionCompactionCompleteData) Type() SessionEventType { return SessionEventTypeSessionCompactionComplete } +func (*SessionCompactionCompleteData) Type() SessionEventType { + return SessionEventTypeSessionCompactionComplete +} // Conversation truncation statistics including token counts and removed content metrics type SessionTruncationData struct { @@ -454,7 +467,7 @@ type SessionTruncationData struct { TokensRemovedDuringTruncation int64 `json:"tokensRemovedDuringTruncation"` } -func (*SessionTruncationData) sessionEventData() {} +func (*SessionTruncationData) sessionEventData() {} func (*SessionTruncationData) Type() SessionEventType { return SessionEventTypeSessionTruncation } // Current context window usage statistics including token and message counts @@ -475,7 +488,7 @@ type SessionUsageInfoData struct { ToolDefinitionsTokens *int64 `json:"toolDefinitionsTokens,omitempty"` } -func (*SessionUsageInfoData) sessionEventData() {} +func (*SessionUsageInfoData) sessionEventData() {} func (*SessionUsageInfoData) Type() SessionEventType { return SessionEventTypeSessionUsageInfo } // Custom agent selection details including name and available tools @@ -488,7 +501,7 @@ type SubagentSelectedData struct { Tools []string `json:"tools"` } -func (*SubagentSelectedData) sessionEventData() {} +func (*SubagentSelectedData) sessionEventData() {} func (*SubagentSelectedData) Type() SessionEventType { return SessionEventTypeSubagentSelected } // Durable record that a canvas instance is open, used to restore open canvases on cold session resume. Intentionally omits the transient url and availability. @@ -507,7 +520,9 @@ type SessionCanvasRecordedData struct { } func (*SessionCanvasRecordedData) sessionEventData() {} -func (*SessionCanvasRecordedData) Type() SessionEventType { return SessionEventTypeSessionCanvasRecorded } +func (*SessionCanvasRecordedData) Type() SessionEventType { + return SessionEventTypeSessionCanvasRecorded +} // Durable record that a canvas instance was closed, superseding a prior instance_recorded during resume replay. // Experimental: SessionCanvasRemovedData is part of an experimental API and may change or be removed. @@ -520,7 +535,7 @@ type SessionCanvasRemovedData struct { InstanceID string `json:"instanceId"` } -func (*SessionCanvasRemovedData) sessionEventData() {} +func (*SessionCanvasRemovedData) sessionEventData() {} func (*SessionCanvasRemovedData) Type() SessionEventType { return SessionEventTypeSessionCanvasRemoved } // Durable session usage checkpoint for reconstructing aggregate accounting on resume @@ -536,7 +551,9 @@ type SessionUsageCheckpointData struct { } func (*SessionUsageCheckpointData) sessionEventData() {} -func (*SessionUsageCheckpointData) Type() SessionEventType { return SessionEventTypeSessionUsageCheckpoint } +func (*SessionUsageCheckpointData) Type() SessionEventType { + return SessionEventTypeSessionUsageCheckpoint +} // Dynamic headers refresh request for a remote MCP server type MCPHeadersRefreshRequiredData struct { @@ -551,7 +568,9 @@ type MCPHeadersRefreshRequiredData struct { } func (*MCPHeadersRefreshRequiredData) sessionEventData() {} -func (*MCPHeadersRefreshRequiredData) Type() SessionEventType { return SessionEventTypeMCPHeadersRefreshRequired } +func (*MCPHeadersRefreshRequiredData) Type() SessionEventType { + return SessionEventTypeMCPHeadersRefreshRequired +} // Elicitation request completion with the user's response type ElicitationCompletedData struct { @@ -563,7 +582,7 @@ type ElicitationCompletedData struct { RequestID string `json:"requestId"` } -func (*ElicitationCompletedData) sessionEventData() {} +func (*ElicitationCompletedData) sessionEventData() {} func (*ElicitationCompletedData) Type() SessionEventType { return SessionEventTypeElicitationCompleted } // Elicitation request; may be form-based (structured input) or URL-based (browser redirect) @@ -584,7 +603,7 @@ type ElicitationRequestedData struct { URL *string `json:"url,omitempty"` } -func (*ElicitationRequestedData) sessionEventData() {} +func (*ElicitationRequestedData) sessionEventData() {} func (*ElicitationRequestedData) Type() SessionEventType { return SessionEventTypeElicitationRequested } // Empty payload for `session.background_tasks_changed`, indicating background task state changed. @@ -592,13 +611,15 @@ type SessionBackgroundTasksChangedData struct { } func (*SessionBackgroundTasksChangedData) sessionEventData() {} -func (*SessionBackgroundTasksChangedData) Type() SessionEventType { return SessionEventTypeSessionBackgroundTasksChanged } +func (*SessionBackgroundTasksChangedData) Type() SessionEventType { + return SessionEventTypeSessionBackgroundTasksChanged +} // Empty payload; the event signals that the custom agent was deselected, returning to the default agent type SubagentDeselectedData struct { } -func (*SubagentDeselectedData) sessionEventData() {} +func (*SubagentDeselectedData) sessionEventData() {} func (*SubagentDeselectedData) Type() SessionEventType { return SessionEventTypeSubagentDeselected } // Empty payload; the event signals that the pending message queue has changed @@ -606,7 +627,9 @@ type PendingMessagesModifiedData struct { } func (*PendingMessagesModifiedData) sessionEventData() {} -func (*PendingMessagesModifiedData) Type() SessionEventType { return SessionEventTypePendingMessagesModified } +func (*PendingMessagesModifiedData) Type() SessionEventType { + return SessionEventTypePendingMessagesModified +} // Enterprise managed-settings resolution: the effective managed settings the session applied and where they came from, so SDK clients can show users what is enterprise-managed and by which authority. Fires whenever managed policy is (re)applied — at session start, on resume, and on account switch. This is an ephemeral live snapshot (delivered to subscribers but not persisted to the session event log), because at session start it resolves before `session.start` is emitted; for a session-independent pull, use the SDK `getManagedSettings()` API, which returns the identical payload. Managed settings have a single authoritative source, so the highest-authority present layer (server > device) wins wholesale; `bypassPermissionsDisabled` is deny-wins across layers. Marked experimental while the managed-settings surface stabilizes. // Experimental: SessionManagedSettingsResolvedData is part of an experimental API and may change or be removed. @@ -630,17 +653,19 @@ type SessionManagedSettingsResolvedData struct { } func (*SessionManagedSettingsResolvedData) sessionEventData() {} -func (*SessionManagedSettingsResolvedData) Type() SessionEventType { return SessionEventTypeSessionManagedSettingsResolved } +func (*SessionManagedSettingsResolvedData) Type() SessionEventType { + return SessionEventTypeSessionManagedSettingsResolved +} // Ephemeral invalidation signal for a changed factory run. // Experimental: FactoryRunUpdatedData is part of an experimental API and may change or be removed. type FactoryRunUpdatedData struct { // Monotonic revision now available for the run. - Revision int64 `json:"revision"` - RunID string `json:"runId"` + Revision int64 `json:"revision"` + RunID string `json:"runId"` } -func (*FactoryRunUpdatedData) sessionEventData() {} +func (*FactoryRunUpdatedData) sessionEventData() {} func (*FactoryRunUpdatedData) Type() SessionEventType { return SessionEventTypeFactoryRunUpdated } // Ephemeral progress update from a running hook process @@ -651,7 +676,7 @@ type HookProgressData struct { Temporary *bool `json:"temporary,omitempty"` } -func (*HookProgressData) sessionEventData() {} +func (*HookProgressData) sessionEventData() {} func (*HookProgressData) Type() SessionEventType { return SessionEventTypeHookProgress } // Error details for timeline display including message and optional diagnostic information @@ -676,7 +701,7 @@ type SessionErrorData struct { URL *string `json:"url,omitempty"` } -func (*SessionErrorData) sessionEventData() {} +func (*SessionErrorData) sessionEventData() {} func (*SessionErrorData) Type() SessionEventType { return SessionEventTypeSessionError } // External tool completion notification signaling UI dismissal @@ -686,7 +711,9 @@ type ExternalToolCompletedData struct { } func (*ExternalToolCompletedData) sessionEventData() {} -func (*ExternalToolCompletedData) Type() SessionEventType { return SessionEventTypeExternalToolCompleted } +func (*ExternalToolCompletedData) Type() SessionEventType { + return SessionEventTypeExternalToolCompleted +} // External tool invocation request for client-side tool execution type ExternalToolRequestedData struct { @@ -709,7 +736,9 @@ type ExternalToolRequestedData struct { } func (*ExternalToolRequestedData) sessionEventData() {} -func (*ExternalToolRequestedData) Type() SessionEventType { return SessionEventTypeExternalToolRequested } +func (*ExternalToolRequestedData) Type() SessionEventType { + return SessionEventTypeExternalToolRequested +} // Failed LLM API call metadata for telemetry type ModelCallFailureData struct { @@ -750,7 +779,7 @@ type ModelCallFailureData struct { ReasoningEffort *string `json:"reasoningEffort,omitempty"` // Content-free structural summary of the failing request. Contains only counts and shape flags (no prompt content), so it is safe for unrestricted telemetry. Populated only for client-error (4xx) failures. RequestFingerprint *ModelCallFailureRequestFingerprint `json:"requestFingerprint,omitempty"` - Rte *bool `json:"rte,omitempty"` + Rte *bool `json:"rte,omitempty"` // Copilot service request ID (x-copilot-service-request-id header) for CAPI log correlation ServiceRequestID *string `json:"serviceRequestId,omitempty"` // Where the failed model call originated @@ -761,7 +790,7 @@ type ModelCallFailureData struct { Transport *ModelCallFailureTransport `json:"transport,omitempty"` } -func (*ModelCallFailureData) sessionEventData() {} +func (*ModelCallFailureData) sessionEventData() {} func (*ModelCallFailureData) Type() SessionEventType { return SessionEventTypeModelCallFailure } // Hook invocation completion details including output, success status, and error information @@ -778,7 +807,7 @@ type HookEndData struct { Success bool `json:"success"` } -func (*HookEndData) sessionEventData() {} +func (*HookEndData) sessionEventData() {} func (*HookEndData) Type() SessionEventType { return SessionEventTypeHookEnd } // Hook invocation start details including type and input data @@ -791,7 +820,7 @@ type HookStartData struct { Input any `json:"input,omitempty"` } -func (*HookStartData) sessionEventData() {} +func (*HookStartData) sessionEventData() {} func (*HookStartData) Type() SessionEventType { return SessionEventTypeHookStart } // Informational message for timeline display with categorization @@ -806,7 +835,7 @@ type SessionInfoData struct { URL *string `json:"url,omitempty"` } -func (*SessionInfoData) sessionEventData() {} +func (*SessionInfoData) sessionEventData() {} func (*SessionInfoData) Type() SessionEventType { return SessionEventTypeSessionInfo } // LLM API call usage metrics including tokens, costs, quotas, and billing information @@ -856,14 +885,14 @@ type AssistantUsageData struct { ReasoningEffort *string `json:"reasoningEffort,omitempty"` // Number of output tokens used for reasoning (e.g., chain-of-thought) ReasoningTokens *int64 `json:"reasoningTokens,omitempty"` - Rte *bool `json:"rte,omitempty"` + Rte *bool `json:"rte,omitempty"` // Copilot service request ID (x-copilot-service-request-id header) for CAPI log correlation ServiceRequestID *string `json:"serviceRequestId,omitempty"` // Time to first token in milliseconds. Only available for streaming requests TimeToFirstTokenMs *float64 `json:"timeToFirstTokenMs,omitempty"` } -func (*AssistantUsageData) sessionEventData() {} +func (*AssistantUsageData) sessionEventData() {} func (*AssistantUsageData) Type() SessionEventType { return SessionEventTypeAssistantUsage } // Live progress signal for a provider-hosted server tool (e.g. hosted web search) while it runs, before the finalized serverTools envelope lands on the terminal assistant.message @@ -877,7 +906,9 @@ type AssistantServerToolProgressData struct { } func (*AssistantServerToolProgressData) sessionEventData() {} -func (*AssistantServerToolProgressData) Type() SessionEventType { return SessionEventTypeAssistantServerToolProgress } +func (*AssistantServerToolProgressData) Type() SessionEventType { + return SessionEventTypeAssistantServerToolProgress +} // MCP App view called a tool on a connected MCP server (SEP-1865) type MCPAppToolCallCompleteData struct { @@ -900,7 +931,9 @@ type MCPAppToolCallCompleteData struct { } func (*MCPAppToolCallCompleteData) sessionEventData() {} -func (*MCPAppToolCallCompleteData) Type() SessionEventType { return SessionEventTypeMCPAppToolCallComplete } +func (*MCPAppToolCallCompleteData) Type() SessionEventType { + return SessionEventTypeMCPAppToolCallComplete +} // MCP OAuth request completion notification type MCPOauthCompletedData struct { @@ -910,7 +943,7 @@ type MCPOauthCompletedData struct { RequestID string `json:"requestId"` } -func (*MCPOauthCompletedData) sessionEventData() {} +func (*MCPOauthCompletedData) sessionEventData() {} func (*MCPOauthCompletedData) Type() SessionEventType { return SessionEventTypeMCPOauthCompleted } // MCP headers refresh request completion notification @@ -922,7 +955,9 @@ type MCPHeadersRefreshCompletedData struct { } func (*MCPHeadersRefreshCompletedData) sessionEventData() {} -func (*MCPHeadersRefreshCompletedData) Type() SessionEventType { return SessionEventTypeMCPHeadersRefreshCompleted } +func (*MCPHeadersRefreshCompletedData) Type() SessionEventType { + return SessionEventTypeMCPHeadersRefreshCompleted +} // Metadata for an additional model inference attempt within an existing assistant turn type AssistantTurnRetryData struct { @@ -934,7 +969,7 @@ type AssistantTurnRetryData struct { TurnID string `json:"turnId"` } -func (*AssistantTurnRetryData) sessionEventData() {} +func (*AssistantTurnRetryData) sessionEventData() {} func (*AssistantTurnRetryData) Type() SessionEventType { return SessionEventTypeAssistantTurnRetry } // Model API dispatch metadata for internal telemetry @@ -948,7 +983,7 @@ type ModelCallStartData struct { TurnID string `json:"turnId"` } -func (*ModelCallStartData) sessionEventData() {} +func (*ModelCallStartData) sessionEventData() {} func (*ModelCallStartData) Type() SessionEventType { return SessionEventTypeModelCallStart } // Model change details including previous and new model identifiers @@ -975,7 +1010,7 @@ type SessionModelChangeData struct { Verbosity *Verbosity `json:"verbosity,omitempty"` } -func (*SessionModelChangeData) sessionEventData() {} +func (*SessionModelChangeData) sessionEventData() {} func (*SessionModelChangeData) Type() SessionEventType { return SessionEventTypeSessionModelChange } // Notifies that the session's remote steering capability has changed @@ -985,7 +1020,9 @@ type SessionRemoteSteerableChangedData struct { } func (*SessionRemoteSteerableChangedData) sessionEventData() {} -func (*SessionRemoteSteerableChangedData) Type() SessionEventType { return SessionEventTypeSessionRemoteSteerableChanged } +func (*SessionRemoteSteerableChangedData) Type() SessionEventType { + return SessionEventTypeSessionRemoteSteerableChanged +} // OAuth authentication request for an MCP server type MCPOauthRequiredData struct { @@ -1007,7 +1044,7 @@ type MCPOauthRequiredData struct { WwwAuthenticateParams *MCPOauthWwwAuthenticateParams `json:"wwwAuthenticateParams,omitempty"` } -func (*MCPOauthRequiredData) sessionEventData() {} +func (*MCPOauthRequiredData) sessionEventData() {} func (*MCPOauthRequiredData) Type() SessionEventType { return SessionEventTypeMCPOauthRequired } // Opaque custom notification data. Consumers may branch on source and name, but payload semantics are source-defined. @@ -1025,7 +1062,9 @@ type SessionCustomNotificationData struct { } func (*SessionCustomNotificationData) sessionEventData() {} -func (*SessionCustomNotificationData) Type() SessionEventType { return SessionEventTypeSessionCustomNotification } +func (*SessionCustomNotificationData) Type() SessionEventType { + return SessionEventTypeSessionCustomNotification +} // Payload emitted whenever the main agent's processing loop goes idle, including while related background work (running agents or in-flight attached shell commands) is still pending and the session-level idle event is therefore deferred type AssistantIdleData struct { @@ -1033,7 +1072,7 @@ type AssistantIdleData struct { Aborted *bool `json:"aborted,omitempty"` } -func (*AssistantIdleData) sessionEventData() {} +func (*AssistantIdleData) sessionEventData() {} func (*AssistantIdleData) Type() SessionEventType { return SessionEventTypeAssistantIdle } // Payload identifying the MCP server associated with a list change. @@ -1043,7 +1082,9 @@ type MCPPromptsListChangedData struct { } func (*MCPPromptsListChangedData) sessionEventData() {} -func (*MCPPromptsListChangedData) Type() SessionEventType { return SessionEventTypeMCPPromptsListChanged } +func (*MCPPromptsListChangedData) Type() SessionEventType { + return SessionEventTypeMCPPromptsListChanged +} // Payload identifying the MCP server associated with a list change. type MCPResourcesListChangedData struct { @@ -1052,7 +1093,9 @@ type MCPResourcesListChangedData struct { } func (*MCPResourcesListChangedData) sessionEventData() {} -func (*MCPResourcesListChangedData) Type() SessionEventType { return SessionEventTypeMCPResourcesListChanged } +func (*MCPResourcesListChangedData) Type() SessionEventType { + return SessionEventTypeMCPResourcesListChanged +} // Payload identifying the MCP server associated with a list change. type MCPToolsListChangedData struct { @@ -1060,7 +1103,7 @@ type MCPToolsListChangedData struct { ServerName string `json:"serverName"` } -func (*MCPToolsListChangedData) sessionEventData() {} +func (*MCPToolsListChangedData) sessionEventData() {} func (*MCPToolsListChangedData) Type() SessionEventType { return SessionEventTypeMCPToolsListChanged } // Payload indicating the session is idle with no background agents or attached shell commands in flight @@ -1069,7 +1112,7 @@ type SessionIdleData struct { Aborted *bool `json:"aborted,omitempty"` } -func (*SessionIdleData) sessionEventData() {} +func (*SessionIdleData) sessionEventData() {} func (*SessionIdleData) Type() SessionEventType { return SessionEventTypeSessionIdle } // Payload of `session.canvas.closed` with the closed canvas instance ID, provider ID, and canvas ID. @@ -1083,7 +1126,7 @@ type SessionCanvasClosedData struct { InstanceID string `json:"instanceId"` } -func (*SessionCanvasClosedData) sessionEventData() {} +func (*SessionCanvasClosedData) sessionEventData() {} func (*SessionCanvasClosedData) Type() SessionEventType { return SessionEventTypeSessionCanvasClosed } // Payload of `session.canvas.opened` with canvas instance and provider IDs plus optional icon, title, status, URL, and input. @@ -1109,7 +1152,7 @@ type SessionCanvasOpenedData struct { URL *string `json:"url,omitempty"` } -func (*SessionCanvasOpenedData) sessionEventData() {} +func (*SessionCanvasOpenedData) sessionEventData() {} func (*SessionCanvasOpenedData) Type() SessionEventType { return SessionEventTypeSessionCanvasOpened } // Payload of `session.canvas.registry_changed` listing the canvas declarations currently available. @@ -1120,7 +1163,9 @@ type SessionCanvasRegistryChangedData struct { } func (*SessionCanvasRegistryChangedData) sessionEventData() {} -func (*SessionCanvasRegistryChangedData) Type() SessionEventType { return SessionEventTypeSessionCanvasRegistryChanged } +func (*SessionCanvasRegistryChangedData) Type() SessionEventType { + return SessionEventTypeSessionCanvasRegistryChanged +} // Payload of `session.custom_agents_updated` with loaded custom agents plus non-fatal warnings and fatal errors. type SessionCustomAgentsUpdatedData struct { @@ -1133,7 +1178,9 @@ type SessionCustomAgentsUpdatedData struct { } func (*SessionCustomAgentsUpdatedData) sessionEventData() {} -func (*SessionCustomAgentsUpdatedData) Type() SessionEventType { return SessionEventTypeSessionCustomAgentsUpdated } +func (*SessionCustomAgentsUpdatedData) Type() SessionEventType { + return SessionEventTypeSessionCustomAgentsUpdated +} // Payload of `session.extensions.attachments_pushed` with extension-contributed attachments for the next send. type SessionExtensionsAttachmentsPushedData struct { @@ -1142,7 +1189,9 @@ type SessionExtensionsAttachmentsPushedData struct { } func (*SessionExtensionsAttachmentsPushedData) sessionEventData() {} -func (*SessionExtensionsAttachmentsPushedData) Type() SessionEventType { return SessionEventTypeSessionExtensionsAttachmentsPushed } +func (*SessionExtensionsAttachmentsPushedData) Type() SessionEventType { + return SessionEventTypeSessionExtensionsAttachmentsPushed +} // Payload of `session.extensions_loaded` listing discovered extensions and their statuses. type SessionExtensionsLoadedData struct { @@ -1151,7 +1200,9 @@ type SessionExtensionsLoadedData struct { } func (*SessionExtensionsLoadedData) sessionEventData() {} -func (*SessionExtensionsLoadedData) Type() SessionEventType { return SessionEventTypeSessionExtensionsLoaded } +func (*SessionExtensionsLoadedData) Type() SessionEventType { + return SessionEventTypeSessionExtensionsLoaded +} // Payload of `session.mcp_server_status_changed` for one MCP server's status and optional failure error. type SessionMCPServerStatusChangedData struct { @@ -1164,7 +1215,9 @@ type SessionMCPServerStatusChangedData struct { } func (*SessionMCPServerStatusChangedData) sessionEventData() {} -func (*SessionMCPServerStatusChangedData) Type() SessionEventType { return SessionEventTypeSessionMCPServerStatusChanged } +func (*SessionMCPServerStatusChangedData) Type() SessionEventType { + return SessionEventTypeSessionMCPServerStatusChanged +} // Payload of `session.mcp_servers_loaded` listing MCP server status summaries. type SessionMCPServersLoadedData struct { @@ -1173,7 +1226,9 @@ type SessionMCPServersLoadedData struct { } func (*SessionMCPServersLoadedData) sessionEventData() {} -func (*SessionMCPServersLoadedData) Type() SessionEventType { return SessionEventTypeSessionMCPServersLoaded } +func (*SessionMCPServersLoadedData) Type() SessionEventType { + return SessionEventTypeSessionMCPServersLoaded +} // Payload of `session.skills_loaded` listing resolved skill metadata. type SessionSkillsLoadedData struct { @@ -1181,7 +1236,7 @@ type SessionSkillsLoadedData struct { Skills []SkillsLoadedSkill `json:"skills"` } -func (*SessionSkillsLoadedData) sessionEventData() {} +func (*SessionSkillsLoadedData) sessionEventData() {} func (*SessionSkillsLoadedData) Type() SessionEventType { return SessionEventTypeSessionSkillsLoaded } // Payload of `session.tools_updated` identifying the model whose resolved tools were updated. @@ -1190,7 +1245,7 @@ type SessionToolsUpdatedData struct { Model string `json:"model"` } -func (*SessionToolsUpdatedData) sessionEventData() {} +func (*SessionToolsUpdatedData) sessionEventData() {} func (*SessionToolsUpdatedData) Type() SessionEventType { return SessionEventTypeSessionToolsUpdated } // Payload of `user.message` with displayed and model-transformed content, attachments, source/delivery metadata, mode, and telemetry IDs. @@ -1219,7 +1274,7 @@ type UserMessageData struct { TransformedContent *string `json:"transformedContent,omitempty"` } -func (*UserMessageData) sessionEventData() {} +func (*UserMessageData) sessionEventData() {} func (*UserMessageData) Type() SessionEventType { return SessionEventTypeUserMessage } // Permission request completion notification signaling UI dismissal @@ -1232,7 +1287,7 @@ type PermissionCompletedData struct { ToolCallID *string `json:"toolCallId,omitempty"` } -func (*PermissionCompletedData) sessionEventData() {} +func (*PermissionCompletedData) sessionEventData() {} func (*PermissionCompletedData) Type() SessionEventType { return SessionEventTypePermissionCompleted } // Permission request notification requiring client approval with request details @@ -1249,7 +1304,7 @@ type PermissionRequestedData struct { RiskAssessment any `json:"riskAssessment,omitempty"` } -func (*PermissionRequestedData) sessionEventData() {} +func (*PermissionRequestedData) sessionEventData() {} func (*PermissionRequestedData) Type() SessionEventType { return SessionEventTypePermissionRequested } // Permissions change details carrying the aggregate allow-all transition. @@ -1267,7 +1322,9 @@ type SessionPermissionsChangedData struct { } func (*SessionPermissionsChangedData) sessionEventData() {} -func (*SessionPermissionsChangedData) Type() SessionEventType { return SessionEventTypeSessionPermissionsChanged } +func (*SessionPermissionsChangedData) Type() SessionEventType { + return SessionEventTypeSessionPermissionsChanged +} // Persisted generic client-side tool activations restored when a session resumes. type ToolSearchActivatedData struct { @@ -1277,7 +1334,7 @@ type ToolSearchActivatedData struct { ToolNames []string `json:"toolNames"` } -func (*ToolSearchActivatedData) sessionEventData() {} +func (*ToolSearchActivatedData) sessionEventData() {} func (*ToolSearchActivatedData) Type() SessionEventType { return SessionEventTypeToolSearchActivated } // Plan approval request with plan content and available user actions @@ -1295,7 +1352,9 @@ type ExitPlanModeRequestedData struct { } func (*ExitPlanModeRequestedData) sessionEventData() {} -func (*ExitPlanModeRequestedData) Type() SessionEventType { return SessionEventTypeExitPlanModeRequested } +func (*ExitPlanModeRequestedData) Type() SessionEventType { + return SessionEventTypeExitPlanModeRequested +} // Plan file operation details indicating what changed type SessionPlanChangedData struct { @@ -1303,7 +1362,7 @@ type SessionPlanChangedData struct { Operation PlanChangedOperation `json:"operation"` } -func (*SessionPlanChangedData) sessionEventData() {} +func (*SessionPlanChangedData) sessionEventData() {} func (*SessionPlanChangedData) Type() SessionEventType { return SessionEventTypeSessionPlanChanged } // Plan mode exit completion with the user's approval decision and optional feedback @@ -1321,7 +1380,9 @@ type ExitPlanModeCompletedData struct { } func (*ExitPlanModeCompletedData) sessionEventData() {} -func (*ExitPlanModeCompletedData) Type() SessionEventType { return SessionEventTypeExitPlanModeCompleted } +func (*ExitPlanModeCompletedData) Type() SessionEventType { + return SessionEventTypeExitPlanModeCompleted +} // Queued command completion notification signaling UI dismissal type CommandCompletedData struct { @@ -1329,7 +1390,7 @@ type CommandCompletedData struct { RequestID string `json:"requestId"` } -func (*CommandCompletedData) sessionEventData() {} +func (*CommandCompletedData) sessionEventData() {} func (*CommandCompletedData) Type() SessionEventType { return SessionEventTypeCommandCompleted } // Queued slash command dispatch request for client execution @@ -1340,7 +1401,7 @@ type CommandQueuedData struct { RequestID string `json:"requestId"` } -func (*CommandQueuedData) sessionEventData() {} +func (*CommandQueuedData) sessionEventData() {} func (*CommandQueuedData) Type() SessionEventType { return SessionEventTypeCommandQueued } // Registered command dispatch request routed to the owning client @@ -1355,7 +1416,7 @@ type CommandExecuteData struct { RequestID string `json:"requestId"` } -func (*CommandExecuteData) sessionEventData() {} +func (*CommandExecuteData) sessionEventData() {} func (*CommandExecuteData) Type() SessionEventType { return SessionEventTypeCommandExecute } // Runtime enforcement of enterprise managed settings: fires when the session blocks or caps a runtime action because enterprise policy governs it, so SDK clients can explain *why* an action was governed. Unlike `session.managed_settings_resolved` (which reports *what* is managed), this reports a concrete governed action — e.g. a user or host tried to turn on a bypass-permissions escalation while policy disables it. Emitted live (not persisted to the session event log) on user/host-initiated attempts only, never for silent policy application. Marked experimental while the managed-settings surface stabilizes. @@ -1374,7 +1435,9 @@ type SessionManagedSettingsEnforcedData struct { } func (*SessionManagedSettingsEnforcedData) sessionEventData() {} -func (*SessionManagedSettingsEnforcedData) Type() SessionEventType { return SessionEventTypeSessionManagedSettingsEnforced } +func (*SessionManagedSettingsEnforcedData) Type() SessionEventType { + return SessionEventTypeSessionManagedSettingsEnforced +} // SDK command registration change notification type CommandsChangedData struct { @@ -1382,7 +1445,7 @@ type CommandsChangedData struct { Commands []CommandsChangedCommand `json:"commands"` } -func (*CommandsChangedData) sessionEventData() {} +func (*CommandsChangedData) sessionEventData() {} func (*CommandsChangedData) Type() SessionEventType { return SessionEventTypeCommandsChanged } // Sampling request completion notification signaling UI dismissal @@ -1391,7 +1454,7 @@ type SamplingCompletedData struct { RequestID string `json:"requestId"` } -func (*SamplingCompletedData) sessionEventData() {} +func (*SamplingCompletedData) sessionEventData() {} func (*SamplingCompletedData) Type() SessionEventType { return SessionEventTypeSamplingCompleted } // Sampling request from an MCP server; contains the server name and a requestId for correlation @@ -1404,7 +1467,7 @@ type SamplingRequestedData struct { ServerName string `json:"serverName"` } -func (*SamplingRequestedData) sessionEventData() {} +func (*SamplingRequestedData) sessionEventData() {} func (*SamplingRequestedData) Type() SessionEventType { return SessionEventTypeSamplingRequested } // Scheduled prompt cancelled from the schedule manager dialog @@ -1414,7 +1477,9 @@ type SessionScheduleCancelledData struct { } func (*SessionScheduleCancelledData) sessionEventData() {} -func (*SessionScheduleCancelledData) Type() SessionEventType { return SessionEventTypeSessionScheduleCancelled } +func (*SessionScheduleCancelledData) Type() SessionEventType { + return SessionEventTypeSessionScheduleCancelled +} // Scheduled prompt registered via /every or /after type SessionScheduleCreatedData struct { @@ -1441,7 +1506,9 @@ type SessionScheduleCreatedData struct { } func (*SessionScheduleCreatedData) sessionEventData() {} -func (*SessionScheduleCreatedData) Type() SessionEventType { return SessionEventTypeSessionScheduleCreated } +func (*SessionScheduleCreatedData) Type() SessionEventType { + return SessionEventTypeSessionScheduleCreated +} // Self-paced schedule re-armed for its next run type SessionScheduleRearmedData struct { @@ -1452,7 +1519,9 @@ type SessionScheduleRearmedData struct { } func (*SessionScheduleRearmedData) sessionEventData() {} -func (*SessionScheduleRearmedData) Type() SessionEventType { return SessionEventTypeSessionScheduleRearmed } +func (*SessionScheduleRearmedData) Type() SessionEventType { + return SessionEventTypeSessionScheduleRearmed +} // Session capability change notification type CapabilitiesChangedData struct { @@ -1460,7 +1529,7 @@ type CapabilitiesChangedData struct { UI *CapabilitiesChangedUI `json:"ui,omitempty"` } -func (*CapabilitiesChangedData) sessionEventData() {} +func (*CapabilitiesChangedData) sessionEventData() {} func (*CapabilitiesChangedData) Type() SessionEventType { return SessionEventTypeCapabilitiesChanged } // Session handoff metadata including source, context, and repository information @@ -1481,7 +1550,7 @@ type SessionHandoffData struct { Summary *string `json:"summary,omitempty"` } -func (*SessionHandoffData) sessionEventData() {} +func (*SessionHandoffData) sessionEventData() {} func (*SessionHandoffData) Type() SessionEventType { return SessionEventTypeSessionHandoff } // Session initialization metadata including context and configuration @@ -1518,7 +1587,7 @@ type SessionStartData struct { Version int64 `json:"version"` } -func (*SessionStartData) sessionEventData() {} +func (*SessionStartData) sessionEventData() {} func (*SessionStartData) Type() SessionEventType { return SessionEventTypeSessionStart } // Session limit exhaustion notification requiring user action. @@ -1532,7 +1601,9 @@ type SessionLimitsExhaustedRequestedData struct { } func (*SessionLimitsExhaustedRequestedData) sessionEventData() {} -func (*SessionLimitsExhaustedRequestedData) Type() SessionEventType { return SessionEventTypeSessionLimitsExhaustedRequested } +func (*SessionLimitsExhaustedRequestedData) Type() SessionEventType { + return SessionEventTypeSessionLimitsExhaustedRequested +} // Session limit exhaustion prompt completion notification. type SessionLimitsExhaustedCompletedData struct { @@ -1543,7 +1614,9 @@ type SessionLimitsExhaustedCompletedData struct { } func (*SessionLimitsExhaustedCompletedData) sessionEventData() {} -func (*SessionLimitsExhaustedCompletedData) Type() SessionEventType { return SessionEventTypeSessionLimitsExhaustedCompleted } +func (*SessionLimitsExhaustedCompletedData) Type() SessionEventType { + return SessionEventTypeSessionLimitsExhaustedCompleted +} // Session limits update details. Null clears the limits. type SessionSessionLimitsChangedData struct { @@ -1552,7 +1625,9 @@ type SessionSessionLimitsChangedData struct { } func (*SessionSessionLimitsChangedData) sessionEventData() {} -func (*SessionSessionLimitsChangedData) Type() SessionEventType { return SessionEventTypeSessionSessionLimitsChanged } +func (*SessionSessionLimitsChangedData) Type() SessionEventType { + return SessionEventTypeSessionSessionLimitsChanged +} // Session resume metadata including current context and event count type SessionResumeData struct { @@ -1586,7 +1661,7 @@ type SessionResumeData struct { Verbosity *Verbosity `json:"verbosity,omitempty"` } -func (*SessionResumeData) sessionEventData() {} +func (*SessionResumeData) sessionEventData() {} func (*SessionResumeData) Type() SessionEventType { return SessionEventTypeSessionResume } // Session rewind details including target event and count of removed events @@ -1598,7 +1673,9 @@ type SessionSnapshotRewindData struct { } func (*SessionSnapshotRewindData) sessionEventData() {} -func (*SessionSnapshotRewindData) Type() SessionEventType { return SessionEventTypeSessionSnapshotRewind } +func (*SessionSnapshotRewindData) Type() SessionEventType { + return SessionEventTypeSessionSnapshotRewind +} // Session termination metrics including usage statistics, code changes, and shutdown reason type SessionShutdownData struct { @@ -1636,7 +1713,7 @@ type SessionShutdownData struct { TotalPremiumRequests *float64 `json:"totalPremiumRequests,omitempty"` } -func (*SessionShutdownData) sessionEventData() {} +func (*SessionShutdownData) sessionEventData() {} func (*SessionShutdownData) Type() SessionEventType { return SessionEventTypeSessionShutdown } // Session title change payload containing the new display title @@ -1645,14 +1722,14 @@ type SessionTitleChangedData struct { Title string `json:"title"` } -func (*SessionTitleChangedData) sessionEventData() {} +func (*SessionTitleChangedData) sessionEventData() {} func (*SessionTitleChangedData) Type() SessionEventType { return SessionEventTypeSessionTitleChanged } // Signal-only event: the agent's todos or todo_deps table was written to. No payload — clients should call session.plan.readSqlTodosWithDependencies() to fetch the current state. Events arrive in order; clients can debounce on arrival if needed. type SessionTodosChangedData struct { } -func (*SessionTodosChangedData) sessionEventData() {} +func (*SessionTodosChangedData) sessionEventData() {} func (*SessionTodosChangedData) Type() SessionEventType { return SessionEventTypeSessionTodosChanged } // Skill invocation details including content, allowed tools, and plugin metadata @@ -1679,7 +1756,7 @@ type SkillInvokedData struct { Trigger *SkillInvokedTrigger `json:"trigger,omitempty"` } -func (*SkillInvokedData) sessionEventData() {} +func (*SkillInvokedData) sessionEventData() {} func (*SkillInvokedData) Type() SessionEventType { return SessionEventTypeSkillInvoked } // Streaming assistant message delta for incremental response updates @@ -1694,7 +1771,9 @@ type AssistantMessageDeltaData struct { } func (*AssistantMessageDeltaData) sessionEventData() {} -func (*AssistantMessageDeltaData) Type() SessionEventType { return SessionEventTypeAssistantMessageDelta } +func (*AssistantMessageDeltaData) Type() SessionEventType { + return SessionEventTypeAssistantMessageDelta +} // Streaming assistant message start metadata type AssistantMessageStartData struct { @@ -1705,7 +1784,9 @@ type AssistantMessageStartData struct { } func (*AssistantMessageStartData) sessionEventData() {} -func (*AssistantMessageStartData) Type() SessionEventType { return SessionEventTypeAssistantMessageStart } +func (*AssistantMessageStartData) Type() SessionEventType { + return SessionEventTypeAssistantMessageStart +} // Streaming reasoning delta for incremental extended thinking updates type AssistantReasoningDeltaData struct { @@ -1716,7 +1797,9 @@ type AssistantReasoningDeltaData struct { } func (*AssistantReasoningDeltaData) sessionEventData() {} -func (*AssistantReasoningDeltaData) Type() SessionEventType { return SessionEventTypeAssistantReasoningDelta } +func (*AssistantReasoningDeltaData) Type() SessionEventType { + return SessionEventTypeAssistantReasoningDelta +} // Streaming response progress with cumulative byte count type AssistantStreamingDeltaData struct { @@ -1725,7 +1808,9 @@ type AssistantStreamingDeltaData struct { } func (*AssistantStreamingDeltaData) sessionEventData() {} -func (*AssistantStreamingDeltaData) Type() SessionEventType { return SessionEventTypeAssistantStreamingDelta } +func (*AssistantStreamingDeltaData) Type() SessionEventType { + return SessionEventTypeAssistantStreamingDelta +} // Streaming tool execution output for incremental result display type ToolExecutionPartialResultData struct { @@ -1736,7 +1821,9 @@ type ToolExecutionPartialResultData struct { } func (*ToolExecutionPartialResultData) sessionEventData() {} -func (*ToolExecutionPartialResultData) Type() SessionEventType { return SessionEventTypeToolExecutionPartialResult } +func (*ToolExecutionPartialResultData) Type() SessionEventType { + return SessionEventTypeToolExecutionPartialResult +} // Streaming tool-call input delta for incremental tool-call updates type AssistantToolCallDeltaData struct { @@ -1751,7 +1838,9 @@ type AssistantToolCallDeltaData struct { } func (*AssistantToolCallDeltaData) sessionEventData() {} -func (*AssistantToolCallDeltaData) Type() SessionEventType { return SessionEventTypeAssistantToolCallDelta } +func (*AssistantToolCallDeltaData) Type() SessionEventType { + return SessionEventTypeAssistantToolCallDelta +} // Sub-agent completion details for successful execution type SubagentCompletedData struct { @@ -1771,7 +1860,7 @@ type SubagentCompletedData struct { TotalToolCalls *int64 `json:"totalToolCalls,omitempty"` } -func (*SubagentCompletedData) sessionEventData() {} +func (*SubagentCompletedData) sessionEventData() {} func (*SubagentCompletedData) Type() SessionEventType { return SessionEventTypeSubagentCompleted } // Sub-agent failure details including error message and agent information @@ -1794,7 +1883,7 @@ type SubagentFailedData struct { TotalToolCalls *int64 `json:"totalToolCalls,omitempty"` } -func (*SubagentFailedData) sessionEventData() {} +func (*SubagentFailedData) sessionEventData() {} func (*SubagentFailedData) Type() SessionEventType { return SessionEventTypeSubagentFailed } // Sub-agent startup details including parent tool call and agent information @@ -1811,7 +1900,7 @@ type SubagentStartedData struct { ToolCallID string `json:"toolCallId"` } -func (*SubagentStartedData) sessionEventData() {} +func (*SubagentStartedData) sessionEventData() {} func (*SubagentStartedData) Type() SessionEventType { return SessionEventTypeSubagentStarted } // System-generated notification for runtime events like background task completion @@ -1822,7 +1911,7 @@ type SystemNotificationData struct { Kind SystemNotification `json:"kind"` } -func (*SystemNotificationData) sessionEventData() {} +func (*SystemNotificationData) sessionEventData() {} func (*SystemNotificationData) Type() SessionEventType { return SessionEventTypeSystemNotification } // System/developer instruction content with role and optional template metadata @@ -1839,7 +1928,7 @@ type SystemMessageData struct { Role SystemMessageRole `json:"role"` } -func (*SystemMessageData) sessionEventData() {} +func (*SystemMessageData) sessionEventData() {} func (*SystemMessageData) Type() SessionEventType { return SessionEventTypeSystemMessage } // Task completion notification with summary from the agent @@ -1856,7 +1945,7 @@ type SessionTaskCompleteData struct { Summary *string `json:"summary,omitempty"` } -func (*SessionTaskCompleteData) sessionEventData() {} +func (*SessionTaskCompleteData) sessionEventData() {} func (*SessionTaskCompleteData) Type() SessionEventType { return SessionEventTypeSessionTaskComplete } // Tool execution completion results including success status, detailed output, and error information @@ -1877,7 +1966,7 @@ type ToolExecutionCompleteData struct { ParentToolCallID *string `json:"parentToolCallId,omitempty"` // Tool execution result on success Result *ToolExecutionCompleteResult `json:"result,omitempty"` - Rte *bool `json:"rte,omitempty"` + Rte *bool `json:"rte,omitempty"` // Whether this tool execution ran inside a sandbox container Sandboxed *bool `json:"sandboxed,omitempty"` // Whether the tool execution completed successfully @@ -1893,7 +1982,9 @@ type ToolExecutionCompleteData struct { } func (*ToolExecutionCompleteData) sessionEventData() {} -func (*ToolExecutionCompleteData) Type() SessionEventType { return SessionEventTypeToolExecutionComplete } +func (*ToolExecutionCompleteData) Type() SessionEventType { + return SessionEventTypeToolExecutionComplete +} // Tool execution progress notification with status message type ToolExecutionProgressData struct { @@ -1904,7 +1995,9 @@ type ToolExecutionProgressData struct { } func (*ToolExecutionProgressData) sessionEventData() {} -func (*ToolExecutionProgressData) Type() SessionEventType { return SessionEventTypeToolExecutionProgress } +func (*ToolExecutionProgressData) Type() SessionEventType { + return SessionEventTypeToolExecutionProgress +} // Tool execution startup details including MCP server information when applicable type ToolExecutionStartData struct { @@ -1921,7 +2014,7 @@ type ToolExecutionStartData struct { // Tool call ID of the parent tool invocation when this event originates from a sub-agent // Deprecated: ParentToolCallID is deprecated. ParentToolCallID *string `json:"parentToolCallId,omitempty"` - Rte *bool `json:"rte,omitempty"` + Rte *bool `json:"rte,omitempty"` // Shell-tool path hints derived from the command at start time for shell tools (bash/powershell/local_shell). Produced by the same shell-aware extractor as PermissionRequestShell.possiblePaths, so it is present even when the command is auto-approved and no permission request fires. Absent for non-shell tools. ShellToolInfo *ToolExecutionStartShellToolInfo `json:"shellToolInfo,omitempty"` // Unique identifier for this tool call @@ -1934,7 +2027,7 @@ type ToolExecutionStartData struct { TurnID *string `json:"turnId,omitempty"` } -func (*ToolExecutionStartData) sessionEventData() {} +func (*ToolExecutionStartData) sessionEventData() {} func (*ToolExecutionStartData) Type() SessionEventType { return SessionEventTypeToolExecutionStart } // Transient signal that an open canvas instance's provider has dropped (for example the extension is reloading mid-session). The host should keep the panel mounted and surface a reconnecting affordance rather than tearing it down; a subsequent `session.canvas.opened` for the same instanceId clears the affordance once the provider reconnects with a fresh url. Ephemeral and never persisted, so it is never replayed on cold resume. @@ -1949,7 +2042,9 @@ type SessionCanvasUnavailableData struct { } func (*SessionCanvasUnavailableData) sessionEventData() {} -func (*SessionCanvasUnavailableData) Type() SessionEventType { return SessionEventTypeSessionCanvasUnavailable } +func (*SessionCanvasUnavailableData) Type() SessionEventType { + return SessionEventTypeSessionCanvasUnavailable +} // Turn abort information including the reason for termination type AbortData struct { @@ -1957,7 +2052,7 @@ type AbortData struct { Reason AbortReason `json:"reason"` } -func (*AbortData) sessionEventData() {} +func (*AbortData) sessionEventData() {} func (*AbortData) Type() SessionEventType { return SessionEventTypeAbort } // Turn completion metadata including the turn identifier @@ -1968,7 +2063,7 @@ type AssistantTurnEndData struct { TurnID string `json:"turnId"` } -func (*AssistantTurnEndData) sessionEventData() {} +func (*AssistantTurnEndData) sessionEventData() {} func (*AssistantTurnEndData) Type() SessionEventType { return SessionEventTypeAssistantTurnEnd } // Turn initialization metadata including identifier and interaction tracking @@ -1981,7 +2076,7 @@ type AssistantTurnStartData struct { TurnID string `json:"turnId"` } -func (*AssistantTurnStartData) sessionEventData() {} +func (*AssistantTurnStartData) sessionEventData() {} func (*AssistantTurnStartData) Type() SessionEventType { return SessionEventTypeAssistantTurnStart } // User input request completion with the user's response @@ -1994,7 +2089,7 @@ type UserInputCompletedData struct { WasFreeform *bool `json:"wasFreeform,omitempty"` } -func (*UserInputCompletedData) sessionEventData() {} +func (*UserInputCompletedData) sessionEventData() {} func (*UserInputCompletedData) Type() SessionEventType { return SessionEventTypeUserInputCompleted } // User input request notification with question and optional predefined choices @@ -2011,7 +2106,7 @@ type UserInputRequestedData struct { ToolCallID *string `json:"toolCallId,omitempty"` } -func (*UserInputRequestedData) sessionEventData() {} +func (*UserInputRequestedData) sessionEventData() {} func (*UserInputRequestedData) Type() SessionEventType { return SessionEventTypeUserInputRequested } // User-initiated tool invocation request with tool name and arguments @@ -2024,7 +2119,7 @@ type ToolUserRequestedData struct { ToolName string `json:"toolName"` } -func (*ToolUserRequestedData) sessionEventData() {} +func (*ToolUserRequestedData) sessionEventData() {} func (*ToolUserRequestedData) Type() SessionEventType { return SessionEventTypeToolUserRequested } // Warning message for timeline display with categorization @@ -2037,7 +2132,7 @@ type SessionWarningData struct { WarningType string `json:"warningType"` } -func (*SessionWarningData) sessionEventData() {} +func (*SessionWarningData) sessionEventData() {} func (*SessionWarningData) Type() SessionEventType { return SessionEventTypeSessionWarning } // Working directory and git context at session start @@ -2063,7 +2158,9 @@ type SessionContextChangedData struct { } func (*SessionContextChangedData) sessionEventData() {} -func (*SessionContextChangedData) Type() SessionEventType { return SessionEventTypeSessionContextChanged } +func (*SessionContextChangedData) Type() SessionEventType { + return SessionEventTypeSessionContextChanged +} // Workspace file change details including path and operation type type SessionWorkspaceFileChangedData struct { @@ -2074,16 +2171,18 @@ type SessionWorkspaceFileChangedData struct { } func (*SessionWorkspaceFileChangedData) sessionEventData() {} -func (*SessionWorkspaceFileChangedData) Type() SessionEventType { return SessionEventTypeSessionWorkspaceFileChanged } +func (*SessionWorkspaceFileChangedData) Type() SessionEventType { + return SessionEventTypeSessionWorkspaceFileChanged +} // Neutral provider-tagged server-side tool-use payload (tool search, advisor) for verbatim round-tripping // Experimental: AssistantMessageServerTools is part of an experimental API and may change or be removed. type AssistantMessageServerTools struct { - AdvisorModel *string `json:"advisorModel,omitempty"` + AdvisorModel *string `json:"advisorModel,omitempty"` FunctionCallNamespaces map[string]string `json:"functionCallNamespaces,omitzero"` - Items []any `json:"items,omitzero"` - Provider string `json:"provider"` - RawContentBlocks []any `json:"rawContentBlocks,omitzero"` + Items []any `json:"items,omitzero"` + Provider string `json:"provider"` + RawContentBlocks []any `json:"rawContentBlocks,omitzero"` } // A tool invocation request from the assistant @@ -2238,6 +2337,7 @@ func (RawCitationLocation) citationLocation() {} func (r RawCitationLocation) Type() CitationLocationType { return r.Discriminator } + // A content-block range within a structured source document. type CitationLocationBlock struct { // Index of the last content block of the cited range (zero-based, exclusive). @@ -2250,6 +2350,7 @@ func (CitationLocationBlock) citationLocation() {} func (CitationLocationBlock) Type() CitationLocationType { return CitationLocationTypeBlock } + // A character range within the source's text content. type CitationLocationChar struct { // End character offset within the source text (zero-based, exclusive). @@ -2262,6 +2363,7 @@ func (CitationLocationChar) citationLocation() {} func (CitationLocationChar) Type() CitationLocationType { return CitationLocationTypeChar } + // A page range within a paginated source document. type CitationLocationPage struct { // Last page number of the cited range (inclusive). @@ -2558,6 +2660,7 @@ func (RawPermissionPromptRequest) permissionPromptRequest() {} func (r RawPermissionPromptRequest) Kind() PermissionPromptRequestKind { return r.Discriminator } + // Shell command permission prompt type PermissionPromptRequestCommands struct { // Auto-approval judge information for this request; present only when auto mode is enabled. @@ -2583,6 +2686,7 @@ func (PermissionPromptRequestCommands) permissionPromptRequest() {} func (PermissionPromptRequestCommands) Kind() PermissionPromptRequestKind { return PermissionPromptRequestKindCommands } + // Custom tool invocation permission prompt type PermissionPromptRequestCustomTool struct { // Arguments to pass to the custom tool @@ -2602,6 +2706,7 @@ func (PermissionPromptRequestCustomTool) permissionPromptRequest() {} func (PermissionPromptRequestCustomTool) Kind() PermissionPromptRequestKind { return PermissionPromptRequestKindCustomTool } + // Extension management permission prompt type PermissionPromptRequestExtensionManagement struct { // Auto-approval judge information for this request; present only when auto mode is enabled. @@ -2619,6 +2724,7 @@ func (PermissionPromptRequestExtensionManagement) permissionPromptRequest() {} func (PermissionPromptRequestExtensionManagement) Kind() PermissionPromptRequestKind { return PermissionPromptRequestKindExtensionManagement } + // Extension permission access prompt type PermissionPromptRequestExtensionPermissionAccess struct { // Auto-approval judge information for this request; present only when auto mode is enabled. @@ -2636,6 +2742,7 @@ func (PermissionPromptRequestExtensionPermissionAccess) permissionPromptRequest( func (PermissionPromptRequestExtensionPermissionAccess) Kind() PermissionPromptRequestKind { return PermissionPromptRequestKindExtensionPermissionAccess } + // Hook confirmation permission prompt type PermissionPromptRequestHook struct { // Auto-approval judge information for this request; present only when auto mode is enabled. @@ -2655,6 +2762,7 @@ func (PermissionPromptRequestHook) permissionPromptRequest() {} func (PermissionPromptRequestHook) Kind() PermissionPromptRequestKind { return PermissionPromptRequestKindHook } + // MCP tool invocation permission prompt type PermissionPromptRequestMCP struct { // Arguments to pass to the MCP tool @@ -2676,6 +2784,7 @@ func (PermissionPromptRequestMCP) permissionPromptRequest() {} func (PermissionPromptRequestMCP) Kind() PermissionPromptRequestKind { return PermissionPromptRequestKindMCP } + // Memory operation permission prompt type PermissionPromptRequestMemory struct { // Whether this is a store or vote memory operation @@ -2701,6 +2810,7 @@ func (PermissionPromptRequestMemory) permissionPromptRequest() {} func (PermissionPromptRequestMemory) Kind() PermissionPromptRequestKind { return PermissionPromptRequestKindMemory } + // Path access permission prompt type PermissionPromptRequestPath struct { // Underlying permission kind that needs path approval @@ -2718,6 +2828,7 @@ func (PermissionPromptRequestPath) permissionPromptRequest() {} func (PermissionPromptRequestPath) Kind() PermissionPromptRequestKind { return PermissionPromptRequestKindPath } + // File read permission prompt type PermissionPromptRequestRead struct { // Auto-approval judge information for this request; present only when auto mode is enabled. @@ -2737,6 +2848,7 @@ func (PermissionPromptRequestRead) permissionPromptRequest() {} func (PermissionPromptRequestRead) Kind() PermissionPromptRequestKind { return PermissionPromptRequestKindRead } + // URL access permission prompt type PermissionPromptRequestURL struct { // Auto-approval judge information for this request; present only when auto mode is enabled. @@ -2762,6 +2874,7 @@ func (PermissionPromptRequestURL) permissionPromptRequest() {} func (PermissionPromptRequestURL) Kind() PermissionPromptRequestKind { return PermissionPromptRequestKindURL } + // File write permission prompt type PermissionPromptRequestWrite struct { // Auto-approval judge information for this request; present only when auto mode is enabled. @@ -2804,6 +2917,7 @@ func (RawPermissionRequest) permissionRequest() {} func (r RawPermissionRequest) Kind() PermissionRequestKind { return r.Discriminator } + // Custom tool invocation permission request type PermissionRequestCustomTool struct { // Arguments to pass to the custom tool @@ -2822,6 +2936,7 @@ func (PermissionRequestCustomTool) permissionRequest() {} func (PermissionRequestCustomTool) Kind() PermissionRequestKind { return PermissionRequestKindCustomTool } + // Extension management permission request type PermissionRequestExtensionManagement struct { // Name of the extension being managed @@ -2838,6 +2953,7 @@ func (PermissionRequestExtensionManagement) permissionRequest() {} func (PermissionRequestExtensionManagement) Kind() PermissionRequestKind { return PermissionRequestKindExtensionManagement } + // Extension permission access request type PermissionRequestExtensionPermissionAccess struct { // Capabilities the extension is requesting @@ -2854,6 +2970,7 @@ func (PermissionRequestExtensionPermissionAccess) permissionRequest() {} func (PermissionRequestExtensionPermissionAccess) Kind() PermissionRequestKind { return PermissionRequestKindExtensionPermissionAccess } + // Hook confirmation permission request type PermissionRequestHook struct { // Optional message from the hook explaining why confirmation is needed @@ -2872,6 +2989,7 @@ func (PermissionRequestHook) permissionRequest() {} func (PermissionRequestHook) Kind() PermissionRequestKind { return PermissionRequestKindHook } + // MCP tool invocation permission request type PermissionRequestMCP struct { // Arguments to pass to the MCP tool @@ -2894,6 +3012,7 @@ func (PermissionRequestMCP) permissionRequest() {} func (PermissionRequestMCP) Kind() PermissionRequestKind { return PermissionRequestKindMCP } + // Memory operation permission request type PermissionRequestMemory struct { // Whether this is a store or vote memory operation @@ -2918,6 +3037,7 @@ func (PermissionRequestMemory) permissionRequest() {} func (PermissionRequestMemory) Kind() PermissionRequestKind { return PermissionRequestKindMemory } + // File or directory read permission request type PermissionRequestRead struct { // Human-readable description of why the file is being read @@ -2938,6 +3058,7 @@ func (PermissionRequestRead) permissionRequest() {} func (PermissionRequestRead) Kind() PermissionRequestKind { return PermissionRequestKindRead } + // Shell command permission request type PermissionRequestShell struct { // Whether the UI can offer session-wide approval for this command pattern @@ -2972,6 +3093,7 @@ func (PermissionRequestShell) permissionRequest() {} func (PermissionRequestShell) Kind() PermissionRequestKind { return PermissionRequestKindShell } + // URL access permission request type PermissionRequestURL struct { // Human-readable description of why the URL is being accessed @@ -2994,6 +3116,7 @@ func (PermissionRequestURL) permissionRequest() {} func (PermissionRequestURL) Kind() PermissionRequestKind { return PermissionRequestKindURL } + // File write permission request type PermissionRequestWrite struct { // Whether the UI can offer session-wide approval for file write operations @@ -3058,6 +3181,7 @@ func (RawPermissionResult) permissionResult() {} func (r RawPermissionResult) Kind() PermissionResultKind { return r.Discriminator } + // Permission response variant indicating the request was approved without persisting an approval rule. type PermissionApproved struct { } @@ -3066,6 +3190,7 @@ func (PermissionApproved) permissionResult() {} func (PermissionApproved) Kind() PermissionResultKind { return PermissionResultKindApproved } + // Permission response variant that approves a request and persists the provided approval to a project location key. type PermissionApprovedForLocation struct { // The approval to persist for this location @@ -3078,6 +3203,7 @@ func (PermissionApprovedForLocation) permissionResult() {} func (PermissionApprovedForLocation) Kind() PermissionResultKind { return PermissionResultKindApprovedForLocation } + // Permission response variant that approves a request and remembers the provided approval for the rest of the session. type PermissionApprovedForSession struct { // The approval to add as a session-scoped rule @@ -3088,6 +3214,7 @@ func (PermissionApprovedForSession) permissionResult() {} func (PermissionApprovedForSession) Kind() PermissionResultKind { return PermissionResultKindApprovedForSession } + // Permission response variant indicating the request was cancelled before use, with an optional reason. type PermissionCancelled struct { // Optional explanation of why the request was cancelled @@ -3098,6 +3225,7 @@ func (PermissionCancelled) permissionResult() {} func (PermissionCancelled) Kind() PermissionResultKind { return PermissionResultKindCancelled } + // Permission response variant denying a path under content exclusion policy, with the path and message. type PermissionDeniedByContentExclusionPolicy struct { // Human-readable explanation of why the path was excluded @@ -3110,6 +3238,7 @@ func (PermissionDeniedByContentExclusionPolicy) permissionResult() {} func (PermissionDeniedByContentExclusionPolicy) Kind() PermissionResultKind { return PermissionResultKindDeniedByContentExclusionPolicy } + // Permission response variant denied by a permission-request hook, with optional message and interrupt flag. type PermissionDeniedByPermissionRequestHook struct { // Whether to interrupt the current agent turn @@ -3122,6 +3251,7 @@ func (PermissionDeniedByPermissionRequestHook) permissionResult() {} func (PermissionDeniedByPermissionRequestHook) Kind() PermissionResultKind { return PermissionResultKindDeniedByPermissionRequestHook } + // Permission response variant denied because matching approval rules explicitly blocked the request. type PermissionDeniedByRules struct { // Rules that denied the request @@ -3132,6 +3262,7 @@ func (PermissionDeniedByRules) permissionResult() {} func (PermissionDeniedByRules) Kind() PermissionResultKind { return PermissionResultKindDeniedByRules } + // Permission response variant denied in an interactive user prompt, with optional feedback and force-reject flag. type PermissionDeniedInteractivelyByUser struct { // Optional feedback from the user explaining the denial @@ -3144,6 +3275,7 @@ func (PermissionDeniedInteractivelyByUser) permissionResult() {} func (PermissionDeniedInteractivelyByUser) Kind() PermissionResultKind { return PermissionResultKindDeniedInteractivelyByUser } + // Permission response variant denied because no approval rule matched and user confirmation was unavailable. type PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser struct { } @@ -3169,6 +3301,7 @@ func (RawPersistedBinaryResult) persistedBinaryResult() {} func (r RawPersistedBinaryResult) Type() PersistedBinaryResultType { return r.Discriminator } + // A reference to binary data persisted once on a session.binary_asset event and shared by id type BinaryAssetReference struct { // Content-addressed id of the session.binary_asset event that holds this binary's bytes (e.g. "sha256:..."). @@ -3180,7 +3313,7 @@ type BinaryAssetReference struct { // Optional metadata from the producing tool. Metadata map[string]any `json:"metadata,omitzero"` // MIME type of the referenced binary data - MIMEType string `json:"mimeType"` + MIMEType string `json:"mimeType"` Discriminator BinaryAssetReferenceType `json:"type,omitempty"` } @@ -3191,6 +3324,7 @@ func (r BinaryAssetReference) Type() PersistedBinaryResultType { } return PersistedBinaryResultType(r.Discriminator) } + // A binary result whose data was omitted from persistence due to the inline size limit type OmittedBinaryResult struct { // Decoded byte length of the omitted binary data @@ -3203,7 +3337,7 @@ type OmittedBinaryResult struct { MIMEType string `json:"mimeType"` // Why the binary data is absent: it exceeded the inline size limit, or its asset was unavailable OmittedReason OmittedBinaryOmittedReason `json:"omittedReason"` - Discriminator OmittedBinaryType `json:"type,omitempty"` + Discriminator OmittedBinaryType `json:"type,omitempty"` } func (OmittedBinaryResult) persistedBinaryResult() {} @@ -3213,6 +3347,7 @@ func (r OmittedBinaryResult) Type() PersistedBinaryResultType { } return PersistedBinaryResultType(r.Discriminator) } + // Binary result returned by a tool for the model type PersistedBinaryImage struct { // Base64-encoded binary data @@ -3222,7 +3357,7 @@ type PersistedBinaryImage struct { // Optional metadata from the producing tool. Metadata map[string]any `json:"metadata,omitzero"` // MIME type of the binary data - MIMEType string `json:"mimeType"` + MIMEType string `json:"mimeType"` Discriminator PersistedBinaryImageType `json:"type,omitempty"` } @@ -3344,6 +3479,7 @@ func (RawSystemNotification) systemNotification() {} func (r RawSystemNotification) Type() SystemNotificationType { return r.Discriminator } + // System notification metadata for a background agent that completed or failed, including agent ID, type, status, description, and prompt. type SystemNotificationAgentCompleted struct { // Unique identifier of the background agent @@ -3362,6 +3498,7 @@ func (SystemNotificationAgentCompleted) systemNotification() {} func (SystemNotificationAgentCompleted) Type() SystemNotificationType { return SystemNotificationTypeAgentCompleted } + // System notification metadata for a background agent that became idle, including agent ID, type, and description. type SystemNotificationAgentIdle struct { // Unique identifier of the background agent @@ -3376,6 +3513,7 @@ func (SystemNotificationAgentIdle) systemNotification() {} func (SystemNotificationAgentIdle) Type() SystemNotificationType { return SystemNotificationTypeAgentIdle } + // System notification metadata for an instruction file discovered during tool access, including source, trigger file, and tool. type SystemNotificationInstructionDiscovered struct { // Human-readable label for the timeline (e.g., 'AGENTS.md from packages/billing/') @@ -3392,6 +3530,7 @@ func (SystemNotificationInstructionDiscovered) systemNotification() {} func (SystemNotificationInstructionDiscovered) Type() SystemNotificationType { return SystemNotificationTypeInstructionDiscovered } + // System notification metadata for a new inbox message, including entry ID, sender details, and summary. type SystemNotificationNewInboxMessage struct { // Unique identifier of the inbox entry @@ -3408,6 +3547,7 @@ func (SystemNotificationNewInboxMessage) systemNotification() {} func (SystemNotificationNewInboxMessage) Type() SystemNotificationType { return SystemNotificationTypeNewInboxMessage } + // System notification metadata for a shell session that completed, including shell ID, optional exit code, and description. type SystemNotificationShellCompleted struct { // Human-readable description of the command @@ -3422,6 +3562,7 @@ func (SystemNotificationShellCompleted) systemNotification() {} func (SystemNotificationShellCompleted) Type() SystemNotificationType { return SystemNotificationTypeShellCompleted } + // System notification metadata for a detached shell session that completed, including shell ID and description. type SystemNotificationShellDetachedCompleted struct { // Human-readable description of the command @@ -3434,6 +3575,7 @@ func (SystemNotificationShellDetachedCompleted) systemNotification() {} func (SystemNotificationShellDetachedCompleted) Type() SystemNotificationType { return SystemNotificationTypeShellDetachedCompleted } + // System notification metadata from an external host that does not match a runtime-owned notification kind. type SystemNotificationUnclassified struct { // Opaque metadata supplied by the external host, when present. @@ -3460,6 +3602,7 @@ func (RawToolExecutionCompleteContent) toolExecutionCompleteContent() {} func (r RawToolExecutionCompleteContent) Type() ToolExecutionCompleteContentType { return r.Discriminator } + // Audio content block with base64-encoded data type ToolExecutionCompleteContentAudio struct { // Base64-encoded audio data @@ -3472,6 +3615,7 @@ func (ToolExecutionCompleteContentAudio) toolExecutionCompleteContent() {} func (ToolExecutionCompleteContentAudio) Type() ToolExecutionCompleteContentType { return ToolExecutionCompleteContentTypeAudio } + // Image content block with base64-encoded data type ToolExecutionCompleteContentImage struct { // Base64-encoded image data @@ -3484,6 +3628,7 @@ func (ToolExecutionCompleteContentImage) toolExecutionCompleteContent() {} func (ToolExecutionCompleteContentImage) Type() ToolExecutionCompleteContentType { return ToolExecutionCompleteContentTypeImage } + // Embedded resource content block with inline text or binary data type ToolExecutionCompleteContentResource struct { // The embedded resource contents, either text or base64-encoded binary @@ -3494,6 +3639,7 @@ func (ToolExecutionCompleteContentResource) toolExecutionCompleteContent() {} func (ToolExecutionCompleteContentResource) Type() ToolExecutionCompleteContentType { return ToolExecutionCompleteContentTypeResource } + // Resource link content block referencing an external resource type ToolExecutionCompleteContentResourceLink struct { // Human-readable description of the resource @@ -3516,6 +3662,7 @@ func (ToolExecutionCompleteContentResourceLink) toolExecutionCompleteContent() { func (ToolExecutionCompleteContentResourceLink) Type() ToolExecutionCompleteContentType { return ToolExecutionCompleteContentTypeResourceLink } + // Shell command exit metadata with optional output preview type ToolExecutionCompleteContentShellExit struct { // Working directory where the shell command was executed @@ -3534,6 +3681,7 @@ func (ToolExecutionCompleteContentShellExit) toolExecutionCompleteContent() {} func (ToolExecutionCompleteContentShellExit) Type() ToolExecutionCompleteContentType { return ToolExecutionCompleteContentTypeShellExit } + // Deprecated for shell command exit metadata. Use ToolExecutionCompleteContentShellExit instead. type ToolExecutionCompleteContentTerminal struct { // Working directory where the command was executed @@ -3548,6 +3696,7 @@ func (ToolExecutionCompleteContentTerminal) toolExecutionCompleteContent() {} func (ToolExecutionCompleteContentTerminal) Type() ToolExecutionCompleteContentType { return ToolExecutionCompleteContentTypeTerminal } + // Plain text content block type ToolExecutionCompleteContentText struct { // The text content @@ -3655,18 +3804,18 @@ type ToolExecutionCompleteUIResourceMeta struct { // MCP Apps UI resource metadata for a completed tool result, including CSP, permissions, domain, and border preference. type ToolExecutionCompleteUIResourceMetaUI struct { // CSP domain allowlists for an MCP Apps UI resource, including connect, resource, frame, and base URI domains. - Csp *ToolExecutionCompleteUIResourceMetaUICsp `json:"csp,omitempty"` - Domain *string `json:"domain,omitempty"` + Csp *ToolExecutionCompleteUIResourceMetaUICsp `json:"csp,omitempty"` + Domain *string `json:"domain,omitempty"` // Browser permission metadata for an MCP Apps UI resource, including camera, microphone, geolocation, and clipboard-write. - Permissions *ToolExecutionCompleteUIResourceMetaUIPermissions `json:"permissions,omitempty"` - PrefersBorder *bool `json:"prefersBorder,omitempty"` + Permissions *ToolExecutionCompleteUIResourceMetaUIPermissions `json:"permissions,omitempty"` + PrefersBorder *bool `json:"prefersBorder,omitempty"` } // CSP domain allowlists for an MCP Apps UI resource, including connect, resource, frame, and base URI domains. type ToolExecutionCompleteUIResourceMetaUICsp struct { - BaseURIDomains []string `json:"baseUriDomains,omitzero"` - ConnectDomains []string `json:"connectDomains,omitzero"` - FrameDomains []string `json:"frameDomains,omitzero"` + BaseURIDomains []string `json:"baseUriDomains,omitzero"` + ConnectDomains []string `json:"connectDomains,omitzero"` + FrameDomains []string `json:"frameDomains,omitzero"` ResourceDomains []string `json:"resourceDomains,omitzero"` } @@ -3896,8 +4045,8 @@ type CitationLocationType string const ( CitationLocationTypeBlock CitationLocationType = "block" - CitationLocationTypeChar CitationLocationType = "char" - CitationLocationTypePage CitationLocationType = "page" + CitationLocationTypeChar CitationLocationType = "char" + CitationLocationTypePage CitationLocationType = "page" ) // The system that produced a citation. @@ -4184,17 +4333,17 @@ const ( type PermissionPromptRequestKind string const ( - PermissionPromptRequestKindCommands PermissionPromptRequestKind = "commands" - PermissionPromptRequestKindCustomTool PermissionPromptRequestKind = "custom-tool" - PermissionPromptRequestKindExtensionManagement PermissionPromptRequestKind = "extension-management" + PermissionPromptRequestKindCommands PermissionPromptRequestKind = "commands" + PermissionPromptRequestKindCustomTool PermissionPromptRequestKind = "custom-tool" + PermissionPromptRequestKindExtensionManagement PermissionPromptRequestKind = "extension-management" PermissionPromptRequestKindExtensionPermissionAccess PermissionPromptRequestKind = "extension-permission-access" - PermissionPromptRequestKindHook PermissionPromptRequestKind = "hook" - PermissionPromptRequestKindMCP PermissionPromptRequestKind = "mcp" - PermissionPromptRequestKindMemory PermissionPromptRequestKind = "memory" - PermissionPromptRequestKindPath PermissionPromptRequestKind = "path" - PermissionPromptRequestKindRead PermissionPromptRequestKind = "read" - PermissionPromptRequestKindURL PermissionPromptRequestKind = "url" - PermissionPromptRequestKindWrite PermissionPromptRequestKind = "write" + PermissionPromptRequestKindHook PermissionPromptRequestKind = "hook" + PermissionPromptRequestKindMCP PermissionPromptRequestKind = "mcp" + PermissionPromptRequestKindMemory PermissionPromptRequestKind = "memory" + PermissionPromptRequestKindPath PermissionPromptRequestKind = "path" + PermissionPromptRequestKindRead PermissionPromptRequestKind = "read" + PermissionPromptRequestKindURL PermissionPromptRequestKind = "url" + PermissionPromptRequestKindWrite PermissionPromptRequestKind = "write" ) // Underlying permission kind that needs path approval @@ -4213,16 +4362,16 @@ const ( type PermissionRequestKind string const ( - PermissionRequestKindCustomTool PermissionRequestKind = "custom-tool" - PermissionRequestKindExtensionManagement PermissionRequestKind = "extension-management" + PermissionRequestKindCustomTool PermissionRequestKind = "custom-tool" + PermissionRequestKindExtensionManagement PermissionRequestKind = "extension-management" PermissionRequestKindExtensionPermissionAccess PermissionRequestKind = "extension-permission-access" - PermissionRequestKindHook PermissionRequestKind = "hook" - PermissionRequestKindMCP PermissionRequestKind = "mcp" - PermissionRequestKindMemory PermissionRequestKind = "memory" - PermissionRequestKindRead PermissionRequestKind = "read" - PermissionRequestKindShell PermissionRequestKind = "shell" - PermissionRequestKindURL PermissionRequestKind = "url" - PermissionRequestKindWrite PermissionRequestKind = "write" + PermissionRequestKindHook PermissionRequestKind = "hook" + PermissionRequestKindMCP PermissionRequestKind = "mcp" + PermissionRequestKindMemory PermissionRequestKind = "memory" + PermissionRequestKindRead PermissionRequestKind = "read" + PermissionRequestKindShell PermissionRequestKind = "shell" + PermissionRequestKindURL PermissionRequestKind = "url" + PermissionRequestKindWrite PermissionRequestKind = "write" ) // Whether this is a store or vote memory operation @@ -4249,14 +4398,14 @@ const ( type PermissionResultKind string const ( - PermissionResultKindApproved PermissionResultKind = "approved" - PermissionResultKindApprovedForLocation PermissionResultKind = "approved-for-location" - PermissionResultKindApprovedForSession PermissionResultKind = "approved-for-session" - PermissionResultKindCancelled PermissionResultKind = "cancelled" - PermissionResultKindDeniedByContentExclusionPolicy PermissionResultKind = "denied-by-content-exclusion-policy" - PermissionResultKindDeniedByPermissionRequestHook PermissionResultKind = "denied-by-permission-request-hook" - PermissionResultKindDeniedByRules PermissionResultKind = "denied-by-rules" - PermissionResultKindDeniedInteractivelyByUser PermissionResultKind = "denied-interactively-by-user" + PermissionResultKindApproved PermissionResultKind = "approved" + PermissionResultKindApprovedForLocation PermissionResultKind = "approved-for-location" + PermissionResultKindApprovedForSession PermissionResultKind = "approved-for-session" + PermissionResultKindCancelled PermissionResultKind = "cancelled" + PermissionResultKindDeniedByContentExclusionPolicy PermissionResultKind = "denied-by-content-exclusion-policy" + PermissionResultKindDeniedByPermissionRequestHook PermissionResultKind = "denied-by-permission-request-hook" + PermissionResultKindDeniedByRules PermissionResultKind = "denied-by-rules" + PermissionResultKindDeniedInteractivelyByUser PermissionResultKind = "denied-interactively-by-user" PermissionResultKindDeniedNoApprovalRuleAndCouldNotRequestFromUser PermissionResultKind = "denied-no-approval-rule-and-could-not-request-from-user" ) @@ -4275,7 +4424,7 @@ const ( type PersistedBinaryResultType string const ( - PersistedBinaryResultTypeImage PersistedBinaryResultType = "image" + PersistedBinaryResultTypeImage PersistedBinaryResultType = "image" PersistedBinaryResultTypeResource PersistedBinaryResultType = "resource" ) @@ -4351,13 +4500,13 @@ const ( type SystemNotificationType string const ( - SystemNotificationTypeAgentCompleted SystemNotificationType = "agent_completed" - SystemNotificationTypeAgentIdle SystemNotificationType = "agent_idle" - SystemNotificationTypeInstructionDiscovered SystemNotificationType = "instruction_discovered" - SystemNotificationTypeNewInboxMessage SystemNotificationType = "new_inbox_message" - SystemNotificationTypeShellCompleted SystemNotificationType = "shell_completed" + SystemNotificationTypeAgentCompleted SystemNotificationType = "agent_completed" + SystemNotificationTypeAgentIdle SystemNotificationType = "agent_idle" + SystemNotificationTypeInstructionDiscovered SystemNotificationType = "instruction_discovered" + SystemNotificationTypeNewInboxMessage SystemNotificationType = "new_inbox_message" + SystemNotificationTypeShellCompleted SystemNotificationType = "shell_completed" SystemNotificationTypeShellDetachedCompleted SystemNotificationType = "shell_detached_completed" - SystemNotificationTypeUnclassified SystemNotificationType = "unclassified" + SystemNotificationTypeUnclassified SystemNotificationType = "unclassified" ) // Semantic result of evaluating a task completion request @@ -4386,13 +4535,13 @@ const ( type ToolExecutionCompleteContentType string const ( - ToolExecutionCompleteContentTypeAudio ToolExecutionCompleteContentType = "audio" - ToolExecutionCompleteContentTypeImage ToolExecutionCompleteContentType = "image" - ToolExecutionCompleteContentTypeResource ToolExecutionCompleteContentType = "resource" + ToolExecutionCompleteContentTypeAudio ToolExecutionCompleteContentType = "audio" + ToolExecutionCompleteContentTypeImage ToolExecutionCompleteContentType = "image" + ToolExecutionCompleteContentTypeResource ToolExecutionCompleteContentType = "resource" ToolExecutionCompleteContentTypeResourceLink ToolExecutionCompleteContentType = "resource_link" - ToolExecutionCompleteContentTypeShellExit ToolExecutionCompleteContentType = "shell_exit" - ToolExecutionCompleteContentTypeTerminal ToolExecutionCompleteContentType = "terminal" - ToolExecutionCompleteContentTypeText ToolExecutionCompleteContentType = "text" + ToolExecutionCompleteContentTypeShellExit ToolExecutionCompleteContentType = "shell_exit" + ToolExecutionCompleteContentTypeTerminal ToolExecutionCompleteContentType = "terminal" + ToolExecutionCompleteContentTypeText ToolExecutionCompleteContentType = "text" ) // Allowed values for the `ToolExecutionCompleteToolDescriptionMetaUIVisibility` enumeration. @@ -4464,5 +4613,5 @@ const ( // Type aliases for convenience. type ( PermissionRequestCommand = PermissionRequestShellCommand - PossibleURL = PermissionRequestShellPossibleURL -) \ No newline at end of file + PossibleURL = PermissionRequestShellPossibleURL +) diff --git a/go/zsession_events.go b/go/zsession_events.go index 01f22e768e..c98ddc7049 100644 --- a/go/zsession_events.go +++ b/go/zsession_events.go @@ -7,732 +7,732 @@ import "github.com/github/copilot-sdk/go/rpc" // Session-event types are generated in the rpc package and aliased here for source compatibility. type ( - AbortData = rpc.AbortData - AbortReason = rpc.AbortReason - AssistantIdleData = rpc.AssistantIdleData - AssistantIntentData = rpc.AssistantIntentData - AssistantMessageData = rpc.AssistantMessageData - AssistantMessageDeltaData = rpc.AssistantMessageDeltaData - AssistantMessageServerTools = rpc.AssistantMessageServerTools - AssistantMessageStartData = rpc.AssistantMessageStartData - AssistantMessageToolRequest = rpc.AssistantMessageToolRequest - AssistantMessageToolRequestType = rpc.AssistantMessageToolRequestType - AssistantReasoningData = rpc.AssistantReasoningData - AssistantReasoningDeltaData = rpc.AssistantReasoningDeltaData - AssistantServerToolProgressData = rpc.AssistantServerToolProgressData - AssistantStreamingDeltaData = rpc.AssistantStreamingDeltaData - AssistantToolCallDeltaData = rpc.AssistantToolCallDeltaData - AssistantTurnEndData = rpc.AssistantTurnEndData - AssistantTurnRetryData = rpc.AssistantTurnRetryData - AssistantTurnStartData = rpc.AssistantTurnStartData - AssistantUsageAPIEndpoint = rpc.AssistantUsageAPIEndpoint - AssistantUsageCopilotUsage = rpc.AssistantUsageCopilotUsage - AssistantUsageCopilotUsageTokenDetail = rpc.AssistantUsageCopilotUsageTokenDetail - AssistantUsageData = rpc.AssistantUsageData - Attachment = rpc.Attachment - AttachmentBlob = rpc.AttachmentBlob - AttachmentDirectory = rpc.AttachmentDirectory - AttachmentExtensionContext = rpc.AttachmentExtensionContext - AttachmentFile = rpc.AttachmentFile - AttachmentFileLineRange = rpc.AttachmentFileLineRange - AttachmentGitHubActionsJob = rpc.AttachmentGitHubActionsJob - AttachmentGitHubCommit = rpc.AttachmentGitHubCommit - AttachmentGitHubFile = rpc.AttachmentGitHubFile - AttachmentGitHubFileDiff = rpc.AttachmentGitHubFileDiff - AttachmentGitHubFileDiffSide = rpc.AttachmentGitHubFileDiffSide - AttachmentGitHubReference = rpc.AttachmentGitHubReference - AttachmentGitHubReferenceType = rpc.AttachmentGitHubReferenceType - AttachmentGitHubRelease = rpc.AttachmentGitHubRelease - AttachmentGitHubRepository = rpc.AttachmentGitHubRepository - AttachmentGitHubSnippet = rpc.AttachmentGitHubSnippet - AttachmentGitHubTreeComparison = rpc.AttachmentGitHubTreeComparison - AttachmentGitHubTreeComparisonSide = rpc.AttachmentGitHubTreeComparisonSide - AttachmentGitHubURL = rpc.AttachmentGitHubURL - AttachmentSelection = rpc.AttachmentSelection - AttachmentSelectionDetails = rpc.AttachmentSelectionDetails - AttachmentSelectionDetailsEnd = rpc.AttachmentSelectionDetailsEnd - AttachmentSelectionDetailsStart = rpc.AttachmentSelectionDetailsStart - AttachmentType = rpc.AttachmentType - AutoApprovalJudgeFailureReason = rpc.AutoApprovalJudgeFailureReason - AutoApprovalRecommendation = rpc.AutoApprovalRecommendation - AutoModeResolvedReasoningBucket = rpc.AutoModeResolvedReasoningBucket - AutoModeSwitchCompletedData = rpc.AutoModeSwitchCompletedData - AutoModeSwitchRequestedData = rpc.AutoModeSwitchRequestedData - AutoModeSwitchResponse = rpc.AutoModeSwitchResponse - AutopilotObjectiveChangedOperation = rpc.AutopilotObjectiveChangedOperation - AutopilotObjectiveChangedStatus = rpc.AutopilotObjectiveChangedStatus - BinaryAssetReference = rpc.BinaryAssetReference - BinaryAssetReferenceType = rpc.BinaryAssetReferenceType - BinaryAssetType = rpc.BinaryAssetType - CanvasRegistryChangedCanvas = rpc.CanvasRegistryChangedCanvas - CanvasRegistryChangedCanvasAction = rpc.CanvasRegistryChangedCanvasAction - CapabilitiesChangedData = rpc.CapabilitiesChangedData - CapabilitiesChangedUI = rpc.CapabilitiesChangedUI - CitableSource = rpc.CitableSource - CitationLocation = rpc.CitationLocation - CitationLocationBlock = rpc.CitationLocationBlock - CitationLocationChar = rpc.CitationLocationChar - CitationLocationPage = rpc.CitationLocationPage - CitationLocationType = rpc.CitationLocationType - CitationProvider = rpc.CitationProvider - CitationReference = rpc.CitationReference - Citations = rpc.Citations - CitationSource = rpc.CitationSource - CitationSpan = rpc.CitationSpan - CommandCompletedData = rpc.CommandCompletedData - CommandExecuteData = rpc.CommandExecuteData - CommandQueuedData = rpc.CommandQueuedData - CommandsChangedCommand = rpc.CommandsChangedCommand - CommandsChangedData = rpc.CommandsChangedData - CompactionCompleteCompactionTokensUsed = rpc.CompactionCompleteCompactionTokensUsed - CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail = rpc.CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail - CompactionTrigger = rpc.CompactionTrigger - ContextTier = rpc.ContextTier - CustomAgentsUpdatedAgent = rpc.CustomAgentsUpdatedAgent - ElicitationCompletedAction = rpc.ElicitationCompletedAction - ElicitationCompletedData = rpc.ElicitationCompletedData - ElicitationRequestedData = rpc.ElicitationRequestedData - ElicitationRequestedMode = rpc.ElicitationRequestedMode - ElicitationRequestedSchema = rpc.ElicitationRequestedSchema - ElicitationRequestedSchemaType = rpc.ElicitationRequestedSchemaType - EmbeddedBlobResourceContents = rpc.EmbeddedBlobResourceContents - EmbeddedTextResourceContents = rpc.EmbeddedTextResourceContents - ExitPlanModeAction = rpc.ExitPlanModeAction - ExitPlanModeCompletedData = rpc.ExitPlanModeCompletedData - ExitPlanModeRequestedData = rpc.ExitPlanModeRequestedData - ExtensionsLoadedExtension = rpc.ExtensionsLoadedExtension - ExtensionsLoadedExtensionSource = rpc.ExtensionsLoadedExtensionSource - ExtensionsLoadedExtensionStatus = rpc.ExtensionsLoadedExtensionStatus - ExternalToolCompletedData = rpc.ExternalToolCompletedData - ExternalToolRequestedData = rpc.ExternalToolRequestedData - FactoryRunUpdatedData = rpc.FactoryRunUpdatedData - GitHubRepoRef = rpc.GitHubRepoRef - HandoffRepository = rpc.HandoffRepository - HandoffSourceType = rpc.HandoffSourceType - HeaderEntry = rpc.HeaderEntry - HookEndData = rpc.HookEndData - HookEndError = rpc.HookEndError - HookProgressData = rpc.HookProgressData - HookStartData = rpc.HookStartData - ManagedSettingsEnforcedAction = rpc.ManagedSettingsEnforcedAction - ManagedSettingsEnforcedEscalation = rpc.ManagedSettingsEnforcedEscalation - ManagedSettingsResolvedSource = rpc.ManagedSettingsResolvedSource - MCPAppToolCallCompleteData = rpc.MCPAppToolCallCompleteData - MCPAppToolCallCompleteError = rpc.MCPAppToolCallCompleteError - MCPAppToolCallCompleteToolMeta = rpc.MCPAppToolCallCompleteToolMeta - MCPAppToolCallCompleteToolMetaUI = rpc.MCPAppToolCallCompleteToolMetaUI - MCPHeadersRefreshCompletedData = rpc.MCPHeadersRefreshCompletedData - MCPHeadersRefreshCompletedOutcome = rpc.MCPHeadersRefreshCompletedOutcome - MCPHeadersRefreshRequiredData = rpc.MCPHeadersRefreshRequiredData - MCPHeadersRefreshRequiredReason = rpc.MCPHeadersRefreshRequiredReason - MCPOauthCompletedData = rpc.MCPOauthCompletedData - MCPOauthCompletionOutcome = rpc.MCPOauthCompletionOutcome - MCPOauthHTTPResponse = rpc.MCPOauthHTTPResponse - MCPOauthRequestReason = rpc.MCPOauthRequestReason - MCPOauthRequiredData = rpc.MCPOauthRequiredData - MCPOauthRequiredStaticClientConfig = rpc.MCPOauthRequiredStaticClientConfig - MCPOauthRequiredStaticClientConfigGrantType = rpc.MCPOauthRequiredStaticClientConfigGrantType - MCPOauthWwwAuthenticateParams = rpc.MCPOauthWwwAuthenticateParams - MCPPromptsListChangedData = rpc.MCPPromptsListChangedData - MCPResourcesListChangedData = rpc.MCPResourcesListChangedData - MCPServersLoadedServer = rpc.MCPServersLoadedServer - MCPServerSource = rpc.MCPServerSource - MCPServerStatus = rpc.MCPServerStatus - MCPServerTransport = rpc.MCPServerTransport - MCPToolsListChangedData = rpc.MCPToolsListChangedData - ModelCallFailureBadRequestKind = rpc.ModelCallFailureBadRequestKind - ModelCallFailureData = rpc.ModelCallFailureData - ModelCallFailureKind = rpc.ModelCallFailureKind - ModelCallFailureRequestFingerprint = rpc.ModelCallFailureRequestFingerprint - ModelCallFailureSource = rpc.ModelCallFailureSource - ModelCallFailureTransport = rpc.ModelCallFailureTransport - ModelCallStartData = rpc.ModelCallStartData - OmittedBinaryOmittedReason = rpc.OmittedBinaryOmittedReason - OmittedBinaryResult = rpc.OmittedBinaryResult - OmittedBinaryType = rpc.OmittedBinaryType - PendingMessagesModifiedData = rpc.PendingMessagesModifiedData - PermissionAllowAllMode = rpc.PermissionAllowAllMode - PermissionApproved = rpc.PermissionApproved - PermissionApprovedForLocation = rpc.PermissionApprovedForLocation - PermissionApprovedForSession = rpc.PermissionApprovedForSession - PermissionAutoApproval = rpc.PermissionAutoApproval - PermissionCancelled = rpc.PermissionCancelled - PermissionCompletedData = rpc.PermissionCompletedData - PermissionDeniedByContentExclusionPolicy = rpc.PermissionDeniedByContentExclusionPolicy - PermissionDeniedByPermissionRequestHook = rpc.PermissionDeniedByPermissionRequestHook - PermissionDeniedByRules = rpc.PermissionDeniedByRules - PermissionDeniedInteractivelyByUser = rpc.PermissionDeniedInteractivelyByUser - PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser = rpc.PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser - PermissionPromptRequest = rpc.PermissionPromptRequest - PermissionPromptRequestCommands = rpc.PermissionPromptRequestCommands - PermissionPromptRequestCustomTool = rpc.PermissionPromptRequestCustomTool - PermissionPromptRequestExtensionManagement = rpc.PermissionPromptRequestExtensionManagement - PermissionPromptRequestExtensionPermissionAccess = rpc.PermissionPromptRequestExtensionPermissionAccess - PermissionPromptRequestHook = rpc.PermissionPromptRequestHook - PermissionPromptRequestKind = rpc.PermissionPromptRequestKind - PermissionPromptRequestMCP = rpc.PermissionPromptRequestMCP - PermissionPromptRequestMemory = rpc.PermissionPromptRequestMemory - PermissionPromptRequestPath = rpc.PermissionPromptRequestPath - PermissionPromptRequestPathAccessKind = rpc.PermissionPromptRequestPathAccessKind - PermissionPromptRequestRead = rpc.PermissionPromptRequestRead - PermissionPromptRequestURL = rpc.PermissionPromptRequestURL - PermissionPromptRequestWrite = rpc.PermissionPromptRequestWrite - PermissionRequest = rpc.PermissionRequest - PermissionRequestCommand = rpc.PermissionRequestCommand - PermissionRequestCustomTool = rpc.PermissionRequestCustomTool - PermissionRequestedData = rpc.PermissionRequestedData - PermissionRequestExtensionManagement = rpc.PermissionRequestExtensionManagement - PermissionRequestExtensionPermissionAccess = rpc.PermissionRequestExtensionPermissionAccess - PermissionRequestHook = rpc.PermissionRequestHook - PermissionRequestKind = rpc.PermissionRequestKind - PermissionRequestMCP = rpc.PermissionRequestMCP - PermissionRequestMemory = rpc.PermissionRequestMemory - PermissionRequestMemoryAction = rpc.PermissionRequestMemoryAction - PermissionRequestMemoryDirection = rpc.PermissionRequestMemoryDirection - PermissionRequestRead = rpc.PermissionRequestRead - PermissionRequestShell = rpc.PermissionRequestShell - PermissionRequestShellCommand = rpc.PermissionRequestShellCommand - PermissionRequestShellCommandSegment = rpc.PermissionRequestShellCommandSegment - PermissionRequestShellPossibleURL = rpc.PermissionRequestShellPossibleURL - PermissionRequestURL = rpc.PermissionRequestURL - PermissionRequestWrite = rpc.PermissionRequestWrite - PermissionResult = rpc.PermissionResult - PermissionResultKind = rpc.PermissionResultKind - PermissionRule = rpc.PermissionRule - PersistedBinaryImage = rpc.PersistedBinaryImage - PersistedBinaryImageType = rpc.PersistedBinaryImageType - PersistedBinaryResult = rpc.PersistedBinaryResult - PersistedBinaryResultType = rpc.PersistedBinaryResultType - PlanChangedOperation = rpc.PlanChangedOperation - PossibleURL = rpc.PossibleURL - RawCitationLocation = rpc.RawCitationLocation - RawPermissionPromptRequest = rpc.RawPermissionPromptRequest - RawPermissionRequest = rpc.RawPermissionRequest - RawPermissionResult = rpc.RawPermissionResult - RawPersistedBinaryResult = rpc.RawPersistedBinaryResult - RawSessionEventData = rpc.RawSessionEventData - RawSystemNotification = rpc.RawSystemNotification - RawToolExecutionCompleteContent = rpc.RawToolExecutionCompleteContent - ReasoningSummary = rpc.ReasoningSummary - SamplingCompletedData = rpc.SamplingCompletedData - SamplingRequestedData = rpc.SamplingRequestedData - ScheduleOrigin = rpc.ScheduleOrigin - SessionAutoModeResolvedData = rpc.SessionAutoModeResolvedData - SessionAutopilotObjectiveChangedData = rpc.SessionAutopilotObjectiveChangedData - SessionBackgroundTasksChangedData = rpc.SessionBackgroundTasksChangedData - SessionBinaryAssetData = rpc.SessionBinaryAssetData - SessionCanvasClosedData = rpc.SessionCanvasClosedData - SessionCanvasOpenedData = rpc.SessionCanvasOpenedData - SessionCanvasRecordedData = rpc.SessionCanvasRecordedData - SessionCanvasRegistryChangedData = rpc.SessionCanvasRegistryChangedData - SessionCanvasRemovedData = rpc.SessionCanvasRemovedData - SessionCanvasUnavailableData = rpc.SessionCanvasUnavailableData - SessionCompactionCompleteData = rpc.SessionCompactionCompleteData - SessionCompactionStartData = rpc.SessionCompactionStartData - SessionContextChangedData = rpc.SessionContextChangedData - SessionCustomAgentsUpdatedData = rpc.SessionCustomAgentsUpdatedData - SessionCustomNotificationData = rpc.SessionCustomNotificationData - SessionErrorData = rpc.SessionErrorData - SessionEvent = rpc.SessionEvent - SessionEventData = rpc.SessionEventData - SessionEventType = rpc.SessionEventType - SessionExtensionsAttachmentsPushedData = rpc.SessionExtensionsAttachmentsPushedData - SessionExtensionsLoadedData = rpc.SessionExtensionsLoadedData - SessionHandoffData = rpc.SessionHandoffData - SessionIdleData = rpc.SessionIdleData - SessionInfoData = rpc.SessionInfoData - SessionLimitsConfig = rpc.SessionLimitsConfig - SessionLimitsExhaustedCompletedData = rpc.SessionLimitsExhaustedCompletedData - SessionLimitsExhaustedRequestedData = rpc.SessionLimitsExhaustedRequestedData - SessionLimitsExhaustedResponse = rpc.SessionLimitsExhaustedResponse - SessionLimitsExhaustedResponseAction = rpc.SessionLimitsExhaustedResponseAction - SessionManagedSettingsEnforcedData = rpc.SessionManagedSettingsEnforcedData - SessionManagedSettingsResolvedData = rpc.SessionManagedSettingsResolvedData - SessionMCPServersLoadedData = rpc.SessionMCPServersLoadedData - SessionMCPServerStatusChangedData = rpc.SessionMCPServerStatusChangedData - SessionMode = rpc.SessionMode - SessionModeChangedData = rpc.SessionModeChangedData - SessionModelChangeData = rpc.SessionModelChangeData - SessionPermissionsChangedData = rpc.SessionPermissionsChangedData - SessionPlanChangedData = rpc.SessionPlanChangedData - SessionRemoteSteerableChangedData = rpc.SessionRemoteSteerableChangedData - SessionResumeData = rpc.SessionResumeData - SessionScheduleCancelledData = rpc.SessionScheduleCancelledData - SessionScheduleCreatedData = rpc.SessionScheduleCreatedData - SessionScheduleRearmedData = rpc.SessionScheduleRearmedData - SessionSessionLimitsChangedData = rpc.SessionSessionLimitsChangedData - SessionShutdownData = rpc.SessionShutdownData - SessionSkillsLoadedData = rpc.SessionSkillsLoadedData - SessionSnapshotRewindData = rpc.SessionSnapshotRewindData - SessionStartData = rpc.SessionStartData - SessionTaskCompleteData = rpc.SessionTaskCompleteData - SessionTitleChangedData = rpc.SessionTitleChangedData - SessionTodosChangedData = rpc.SessionTodosChangedData - SessionToolsUpdatedData = rpc.SessionToolsUpdatedData - SessionTruncationData = rpc.SessionTruncationData - SessionUsageCheckpointData = rpc.SessionUsageCheckpointData - SessionUsageInfoData = rpc.SessionUsageInfoData - SessionWarningData = rpc.SessionWarningData - SessionWorkspaceFileChangedData = rpc.SessionWorkspaceFileChangedData - ShutdownCodeChanges = rpc.ShutdownCodeChanges - ShutdownModelMetric = rpc.ShutdownModelMetric - ShutdownModelMetricRequests = rpc.ShutdownModelMetricRequests - ShutdownModelMetricTokenDetail = rpc.ShutdownModelMetricTokenDetail - ShutdownModelMetricUsage = rpc.ShutdownModelMetricUsage - ShutdownTokenDetail = rpc.ShutdownTokenDetail - ShutdownType = rpc.ShutdownType - SkillInvokedData = rpc.SkillInvokedData - SkillInvokedTrigger = rpc.SkillInvokedTrigger - SkillsLoadedSkill = rpc.SkillsLoadedSkill - SkillSource = rpc.SkillSource - SubagentCompletedData = rpc.SubagentCompletedData - SubagentDeselectedData = rpc.SubagentDeselectedData - SubagentFailedData = rpc.SubagentFailedData - SubagentSelectedData = rpc.SubagentSelectedData - SubagentStartedData = rpc.SubagentStartedData - SystemMessageData = rpc.SystemMessageData - SystemMessageMetadata = rpc.SystemMessageMetadata - SystemMessageRole = rpc.SystemMessageRole - SystemNotification = rpc.SystemNotification - SystemNotificationAgentCompleted = rpc.SystemNotificationAgentCompleted - SystemNotificationAgentCompletedStatus = rpc.SystemNotificationAgentCompletedStatus - SystemNotificationAgentIdle = rpc.SystemNotificationAgentIdle - SystemNotificationData = rpc.SystemNotificationData - SystemNotificationInstructionDiscovered = rpc.SystemNotificationInstructionDiscovered - SystemNotificationNewInboxMessage = rpc.SystemNotificationNewInboxMessage - SystemNotificationShellCompleted = rpc.SystemNotificationShellCompleted - SystemNotificationShellDetachedCompleted = rpc.SystemNotificationShellDetachedCompleted - SystemNotificationType = rpc.SystemNotificationType - SystemNotificationUnclassified = rpc.SystemNotificationUnclassified - TaskCompletionOutcome = rpc.TaskCompletionOutcome - ToolExecutionCompleteContent = rpc.ToolExecutionCompleteContent - ToolExecutionCompleteContentAudio = rpc.ToolExecutionCompleteContentAudio - ToolExecutionCompleteContentImage = rpc.ToolExecutionCompleteContentImage - ToolExecutionCompleteContentResource = rpc.ToolExecutionCompleteContentResource - ToolExecutionCompleteContentResourceDetails = rpc.ToolExecutionCompleteContentResourceDetails - ToolExecutionCompleteContentResourceLink = rpc.ToolExecutionCompleteContentResourceLink - ToolExecutionCompleteContentResourceLinkIcon = rpc.ToolExecutionCompleteContentResourceLinkIcon - ToolExecutionCompleteContentResourceLinkIconTheme = rpc.ToolExecutionCompleteContentResourceLinkIconTheme - ToolExecutionCompleteContentShellExit = rpc.ToolExecutionCompleteContentShellExit - ToolExecutionCompleteContentTerminal = rpc.ToolExecutionCompleteContentTerminal - ToolExecutionCompleteContentText = rpc.ToolExecutionCompleteContentText - ToolExecutionCompleteContentType = rpc.ToolExecutionCompleteContentType - ToolExecutionCompleteData = rpc.ToolExecutionCompleteData - ToolExecutionCompleteError = rpc.ToolExecutionCompleteError - ToolExecutionCompleteResult = rpc.ToolExecutionCompleteResult - ToolExecutionCompleteToolDescription = rpc.ToolExecutionCompleteToolDescription - ToolExecutionCompleteToolDescriptionMeta = rpc.ToolExecutionCompleteToolDescriptionMeta - ToolExecutionCompleteToolDescriptionMetaUI = rpc.ToolExecutionCompleteToolDescriptionMetaUI - ToolExecutionCompleteToolDescriptionMetaUIVisibility = rpc.ToolExecutionCompleteToolDescriptionMetaUIVisibility - ToolExecutionCompleteUIResource = rpc.ToolExecutionCompleteUIResource - ToolExecutionCompleteUIResourceMeta = rpc.ToolExecutionCompleteUIResourceMeta - ToolExecutionCompleteUIResourceMetaUI = rpc.ToolExecutionCompleteUIResourceMetaUI - ToolExecutionCompleteUIResourceMetaUICsp = rpc.ToolExecutionCompleteUIResourceMetaUICsp - ToolExecutionCompleteUIResourceMetaUIPermissions = rpc.ToolExecutionCompleteUIResourceMetaUIPermissions - ToolExecutionCompleteUIResourceMetaUIPermissionsCamera = rpc.ToolExecutionCompleteUIResourceMetaUIPermissionsCamera + AbortData = rpc.AbortData + AbortReason = rpc.AbortReason + AssistantIdleData = rpc.AssistantIdleData + AssistantIntentData = rpc.AssistantIntentData + AssistantMessageData = rpc.AssistantMessageData + AssistantMessageDeltaData = rpc.AssistantMessageDeltaData + AssistantMessageServerTools = rpc.AssistantMessageServerTools + AssistantMessageStartData = rpc.AssistantMessageStartData + AssistantMessageToolRequest = rpc.AssistantMessageToolRequest + AssistantMessageToolRequestType = rpc.AssistantMessageToolRequestType + AssistantReasoningData = rpc.AssistantReasoningData + AssistantReasoningDeltaData = rpc.AssistantReasoningDeltaData + AssistantServerToolProgressData = rpc.AssistantServerToolProgressData + AssistantStreamingDeltaData = rpc.AssistantStreamingDeltaData + AssistantToolCallDeltaData = rpc.AssistantToolCallDeltaData + AssistantTurnEndData = rpc.AssistantTurnEndData + AssistantTurnRetryData = rpc.AssistantTurnRetryData + AssistantTurnStartData = rpc.AssistantTurnStartData + AssistantUsageAPIEndpoint = rpc.AssistantUsageAPIEndpoint + AssistantUsageCopilotUsage = rpc.AssistantUsageCopilotUsage + AssistantUsageCopilotUsageTokenDetail = rpc.AssistantUsageCopilotUsageTokenDetail + AssistantUsageData = rpc.AssistantUsageData + Attachment = rpc.Attachment + AttachmentBlob = rpc.AttachmentBlob + AttachmentDirectory = rpc.AttachmentDirectory + AttachmentExtensionContext = rpc.AttachmentExtensionContext + AttachmentFile = rpc.AttachmentFile + AttachmentFileLineRange = rpc.AttachmentFileLineRange + AttachmentGitHubActionsJob = rpc.AttachmentGitHubActionsJob + AttachmentGitHubCommit = rpc.AttachmentGitHubCommit + AttachmentGitHubFile = rpc.AttachmentGitHubFile + AttachmentGitHubFileDiff = rpc.AttachmentGitHubFileDiff + AttachmentGitHubFileDiffSide = rpc.AttachmentGitHubFileDiffSide + AttachmentGitHubReference = rpc.AttachmentGitHubReference + AttachmentGitHubReferenceType = rpc.AttachmentGitHubReferenceType + AttachmentGitHubRelease = rpc.AttachmentGitHubRelease + AttachmentGitHubRepository = rpc.AttachmentGitHubRepository + AttachmentGitHubSnippet = rpc.AttachmentGitHubSnippet + AttachmentGitHubTreeComparison = rpc.AttachmentGitHubTreeComparison + AttachmentGitHubTreeComparisonSide = rpc.AttachmentGitHubTreeComparisonSide + AttachmentGitHubURL = rpc.AttachmentGitHubURL + AttachmentSelection = rpc.AttachmentSelection + AttachmentSelectionDetails = rpc.AttachmentSelectionDetails + AttachmentSelectionDetailsEnd = rpc.AttachmentSelectionDetailsEnd + AttachmentSelectionDetailsStart = rpc.AttachmentSelectionDetailsStart + AttachmentType = rpc.AttachmentType + AutoApprovalJudgeFailureReason = rpc.AutoApprovalJudgeFailureReason + AutoApprovalRecommendation = rpc.AutoApprovalRecommendation + AutoModeResolvedReasoningBucket = rpc.AutoModeResolvedReasoningBucket + AutoModeSwitchCompletedData = rpc.AutoModeSwitchCompletedData + AutoModeSwitchRequestedData = rpc.AutoModeSwitchRequestedData + AutoModeSwitchResponse = rpc.AutoModeSwitchResponse + AutopilotObjectiveChangedOperation = rpc.AutopilotObjectiveChangedOperation + AutopilotObjectiveChangedStatus = rpc.AutopilotObjectiveChangedStatus + BinaryAssetReference = rpc.BinaryAssetReference + BinaryAssetReferenceType = rpc.BinaryAssetReferenceType + BinaryAssetType = rpc.BinaryAssetType + CanvasRegistryChangedCanvas = rpc.CanvasRegistryChangedCanvas + CanvasRegistryChangedCanvasAction = rpc.CanvasRegistryChangedCanvasAction + CapabilitiesChangedData = rpc.CapabilitiesChangedData + CapabilitiesChangedUI = rpc.CapabilitiesChangedUI + CitableSource = rpc.CitableSource + CitationLocation = rpc.CitationLocation + CitationLocationBlock = rpc.CitationLocationBlock + CitationLocationChar = rpc.CitationLocationChar + CitationLocationPage = rpc.CitationLocationPage + CitationLocationType = rpc.CitationLocationType + CitationProvider = rpc.CitationProvider + CitationReference = rpc.CitationReference + Citations = rpc.Citations + CitationSource = rpc.CitationSource + CitationSpan = rpc.CitationSpan + CommandCompletedData = rpc.CommandCompletedData + CommandExecuteData = rpc.CommandExecuteData + CommandQueuedData = rpc.CommandQueuedData + CommandsChangedCommand = rpc.CommandsChangedCommand + CommandsChangedData = rpc.CommandsChangedData + CompactionCompleteCompactionTokensUsed = rpc.CompactionCompleteCompactionTokensUsed + CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail = rpc.CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail + CompactionTrigger = rpc.CompactionTrigger + ContextTier = rpc.ContextTier + CustomAgentsUpdatedAgent = rpc.CustomAgentsUpdatedAgent + ElicitationCompletedAction = rpc.ElicitationCompletedAction + ElicitationCompletedData = rpc.ElicitationCompletedData + ElicitationRequestedData = rpc.ElicitationRequestedData + ElicitationRequestedMode = rpc.ElicitationRequestedMode + ElicitationRequestedSchema = rpc.ElicitationRequestedSchema + ElicitationRequestedSchemaType = rpc.ElicitationRequestedSchemaType + EmbeddedBlobResourceContents = rpc.EmbeddedBlobResourceContents + EmbeddedTextResourceContents = rpc.EmbeddedTextResourceContents + ExitPlanModeAction = rpc.ExitPlanModeAction + ExitPlanModeCompletedData = rpc.ExitPlanModeCompletedData + ExitPlanModeRequestedData = rpc.ExitPlanModeRequestedData + ExtensionsLoadedExtension = rpc.ExtensionsLoadedExtension + ExtensionsLoadedExtensionSource = rpc.ExtensionsLoadedExtensionSource + ExtensionsLoadedExtensionStatus = rpc.ExtensionsLoadedExtensionStatus + ExternalToolCompletedData = rpc.ExternalToolCompletedData + ExternalToolRequestedData = rpc.ExternalToolRequestedData + FactoryRunUpdatedData = rpc.FactoryRunUpdatedData + GitHubRepoRef = rpc.GitHubRepoRef + HandoffRepository = rpc.HandoffRepository + HandoffSourceType = rpc.HandoffSourceType + HeaderEntry = rpc.HeaderEntry + HookEndData = rpc.HookEndData + HookEndError = rpc.HookEndError + HookProgressData = rpc.HookProgressData + HookStartData = rpc.HookStartData + ManagedSettingsEnforcedAction = rpc.ManagedSettingsEnforcedAction + ManagedSettingsEnforcedEscalation = rpc.ManagedSettingsEnforcedEscalation + ManagedSettingsResolvedSource = rpc.ManagedSettingsResolvedSource + MCPAppToolCallCompleteData = rpc.MCPAppToolCallCompleteData + MCPAppToolCallCompleteError = rpc.MCPAppToolCallCompleteError + MCPAppToolCallCompleteToolMeta = rpc.MCPAppToolCallCompleteToolMeta + MCPAppToolCallCompleteToolMetaUI = rpc.MCPAppToolCallCompleteToolMetaUI + MCPHeadersRefreshCompletedData = rpc.MCPHeadersRefreshCompletedData + MCPHeadersRefreshCompletedOutcome = rpc.MCPHeadersRefreshCompletedOutcome + MCPHeadersRefreshRequiredData = rpc.MCPHeadersRefreshRequiredData + MCPHeadersRefreshRequiredReason = rpc.MCPHeadersRefreshRequiredReason + MCPOauthCompletedData = rpc.MCPOauthCompletedData + MCPOauthCompletionOutcome = rpc.MCPOauthCompletionOutcome + MCPOauthHTTPResponse = rpc.MCPOauthHTTPResponse + MCPOauthRequestReason = rpc.MCPOauthRequestReason + MCPOauthRequiredData = rpc.MCPOauthRequiredData + MCPOauthRequiredStaticClientConfig = rpc.MCPOauthRequiredStaticClientConfig + MCPOauthRequiredStaticClientConfigGrantType = rpc.MCPOauthRequiredStaticClientConfigGrantType + MCPOauthWwwAuthenticateParams = rpc.MCPOauthWwwAuthenticateParams + MCPPromptsListChangedData = rpc.MCPPromptsListChangedData + MCPResourcesListChangedData = rpc.MCPResourcesListChangedData + MCPServersLoadedServer = rpc.MCPServersLoadedServer + MCPServerSource = rpc.MCPServerSource + MCPServerStatus = rpc.MCPServerStatus + MCPServerTransport = rpc.MCPServerTransport + MCPToolsListChangedData = rpc.MCPToolsListChangedData + ModelCallFailureBadRequestKind = rpc.ModelCallFailureBadRequestKind + ModelCallFailureData = rpc.ModelCallFailureData + ModelCallFailureKind = rpc.ModelCallFailureKind + ModelCallFailureRequestFingerprint = rpc.ModelCallFailureRequestFingerprint + ModelCallFailureSource = rpc.ModelCallFailureSource + ModelCallFailureTransport = rpc.ModelCallFailureTransport + ModelCallStartData = rpc.ModelCallStartData + OmittedBinaryOmittedReason = rpc.OmittedBinaryOmittedReason + OmittedBinaryResult = rpc.OmittedBinaryResult + OmittedBinaryType = rpc.OmittedBinaryType + PendingMessagesModifiedData = rpc.PendingMessagesModifiedData + PermissionAllowAllMode = rpc.PermissionAllowAllMode + PermissionApproved = rpc.PermissionApproved + PermissionApprovedForLocation = rpc.PermissionApprovedForLocation + PermissionApprovedForSession = rpc.PermissionApprovedForSession + PermissionAutoApproval = rpc.PermissionAutoApproval + PermissionCancelled = rpc.PermissionCancelled + PermissionCompletedData = rpc.PermissionCompletedData + PermissionDeniedByContentExclusionPolicy = rpc.PermissionDeniedByContentExclusionPolicy + PermissionDeniedByPermissionRequestHook = rpc.PermissionDeniedByPermissionRequestHook + PermissionDeniedByRules = rpc.PermissionDeniedByRules + PermissionDeniedInteractivelyByUser = rpc.PermissionDeniedInteractivelyByUser + PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser = rpc.PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser + PermissionPromptRequest = rpc.PermissionPromptRequest + PermissionPromptRequestCommands = rpc.PermissionPromptRequestCommands + PermissionPromptRequestCustomTool = rpc.PermissionPromptRequestCustomTool + PermissionPromptRequestExtensionManagement = rpc.PermissionPromptRequestExtensionManagement + PermissionPromptRequestExtensionPermissionAccess = rpc.PermissionPromptRequestExtensionPermissionAccess + PermissionPromptRequestHook = rpc.PermissionPromptRequestHook + PermissionPromptRequestKind = rpc.PermissionPromptRequestKind + PermissionPromptRequestMCP = rpc.PermissionPromptRequestMCP + PermissionPromptRequestMemory = rpc.PermissionPromptRequestMemory + PermissionPromptRequestPath = rpc.PermissionPromptRequestPath + PermissionPromptRequestPathAccessKind = rpc.PermissionPromptRequestPathAccessKind + PermissionPromptRequestRead = rpc.PermissionPromptRequestRead + PermissionPromptRequestURL = rpc.PermissionPromptRequestURL + PermissionPromptRequestWrite = rpc.PermissionPromptRequestWrite + PermissionRequest = rpc.PermissionRequest + PermissionRequestCommand = rpc.PermissionRequestCommand + PermissionRequestCustomTool = rpc.PermissionRequestCustomTool + PermissionRequestedData = rpc.PermissionRequestedData + PermissionRequestExtensionManagement = rpc.PermissionRequestExtensionManagement + PermissionRequestExtensionPermissionAccess = rpc.PermissionRequestExtensionPermissionAccess + PermissionRequestHook = rpc.PermissionRequestHook + PermissionRequestKind = rpc.PermissionRequestKind + PermissionRequestMCP = rpc.PermissionRequestMCP + PermissionRequestMemory = rpc.PermissionRequestMemory + PermissionRequestMemoryAction = rpc.PermissionRequestMemoryAction + PermissionRequestMemoryDirection = rpc.PermissionRequestMemoryDirection + PermissionRequestRead = rpc.PermissionRequestRead + PermissionRequestShell = rpc.PermissionRequestShell + PermissionRequestShellCommand = rpc.PermissionRequestShellCommand + PermissionRequestShellCommandSegment = rpc.PermissionRequestShellCommandSegment + PermissionRequestShellPossibleURL = rpc.PermissionRequestShellPossibleURL + PermissionRequestURL = rpc.PermissionRequestURL + PermissionRequestWrite = rpc.PermissionRequestWrite + PermissionResult = rpc.PermissionResult + PermissionResultKind = rpc.PermissionResultKind + PermissionRule = rpc.PermissionRule + PersistedBinaryImage = rpc.PersistedBinaryImage + PersistedBinaryImageType = rpc.PersistedBinaryImageType + PersistedBinaryResult = rpc.PersistedBinaryResult + PersistedBinaryResultType = rpc.PersistedBinaryResultType + PlanChangedOperation = rpc.PlanChangedOperation + PossibleURL = rpc.PossibleURL + RawCitationLocation = rpc.RawCitationLocation + RawPermissionPromptRequest = rpc.RawPermissionPromptRequest + RawPermissionRequest = rpc.RawPermissionRequest + RawPermissionResult = rpc.RawPermissionResult + RawPersistedBinaryResult = rpc.RawPersistedBinaryResult + RawSessionEventData = rpc.RawSessionEventData + RawSystemNotification = rpc.RawSystemNotification + RawToolExecutionCompleteContent = rpc.RawToolExecutionCompleteContent + ReasoningSummary = rpc.ReasoningSummary + SamplingCompletedData = rpc.SamplingCompletedData + SamplingRequestedData = rpc.SamplingRequestedData + ScheduleOrigin = rpc.ScheduleOrigin + SessionAutoModeResolvedData = rpc.SessionAutoModeResolvedData + SessionAutopilotObjectiveChangedData = rpc.SessionAutopilotObjectiveChangedData + SessionBackgroundTasksChangedData = rpc.SessionBackgroundTasksChangedData + SessionBinaryAssetData = rpc.SessionBinaryAssetData + SessionCanvasClosedData = rpc.SessionCanvasClosedData + SessionCanvasOpenedData = rpc.SessionCanvasOpenedData + SessionCanvasRecordedData = rpc.SessionCanvasRecordedData + SessionCanvasRegistryChangedData = rpc.SessionCanvasRegistryChangedData + SessionCanvasRemovedData = rpc.SessionCanvasRemovedData + SessionCanvasUnavailableData = rpc.SessionCanvasUnavailableData + SessionCompactionCompleteData = rpc.SessionCompactionCompleteData + SessionCompactionStartData = rpc.SessionCompactionStartData + SessionContextChangedData = rpc.SessionContextChangedData + SessionCustomAgentsUpdatedData = rpc.SessionCustomAgentsUpdatedData + SessionCustomNotificationData = rpc.SessionCustomNotificationData + SessionErrorData = rpc.SessionErrorData + SessionEvent = rpc.SessionEvent + SessionEventData = rpc.SessionEventData + SessionEventType = rpc.SessionEventType + SessionExtensionsAttachmentsPushedData = rpc.SessionExtensionsAttachmentsPushedData + SessionExtensionsLoadedData = rpc.SessionExtensionsLoadedData + SessionHandoffData = rpc.SessionHandoffData + SessionIdleData = rpc.SessionIdleData + SessionInfoData = rpc.SessionInfoData + SessionLimitsConfig = rpc.SessionLimitsConfig + SessionLimitsExhaustedCompletedData = rpc.SessionLimitsExhaustedCompletedData + SessionLimitsExhaustedRequestedData = rpc.SessionLimitsExhaustedRequestedData + SessionLimitsExhaustedResponse = rpc.SessionLimitsExhaustedResponse + SessionLimitsExhaustedResponseAction = rpc.SessionLimitsExhaustedResponseAction + SessionManagedSettingsEnforcedData = rpc.SessionManagedSettingsEnforcedData + SessionManagedSettingsResolvedData = rpc.SessionManagedSettingsResolvedData + SessionMCPServersLoadedData = rpc.SessionMCPServersLoadedData + SessionMCPServerStatusChangedData = rpc.SessionMCPServerStatusChangedData + SessionMode = rpc.SessionMode + SessionModeChangedData = rpc.SessionModeChangedData + SessionModelChangeData = rpc.SessionModelChangeData + SessionPermissionsChangedData = rpc.SessionPermissionsChangedData + SessionPlanChangedData = rpc.SessionPlanChangedData + SessionRemoteSteerableChangedData = rpc.SessionRemoteSteerableChangedData + SessionResumeData = rpc.SessionResumeData + SessionScheduleCancelledData = rpc.SessionScheduleCancelledData + SessionScheduleCreatedData = rpc.SessionScheduleCreatedData + SessionScheduleRearmedData = rpc.SessionScheduleRearmedData + SessionSessionLimitsChangedData = rpc.SessionSessionLimitsChangedData + SessionShutdownData = rpc.SessionShutdownData + SessionSkillsLoadedData = rpc.SessionSkillsLoadedData + SessionSnapshotRewindData = rpc.SessionSnapshotRewindData + SessionStartData = rpc.SessionStartData + SessionTaskCompleteData = rpc.SessionTaskCompleteData + SessionTitleChangedData = rpc.SessionTitleChangedData + SessionTodosChangedData = rpc.SessionTodosChangedData + SessionToolsUpdatedData = rpc.SessionToolsUpdatedData + SessionTruncationData = rpc.SessionTruncationData + SessionUsageCheckpointData = rpc.SessionUsageCheckpointData + SessionUsageInfoData = rpc.SessionUsageInfoData + SessionWarningData = rpc.SessionWarningData + SessionWorkspaceFileChangedData = rpc.SessionWorkspaceFileChangedData + ShutdownCodeChanges = rpc.ShutdownCodeChanges + ShutdownModelMetric = rpc.ShutdownModelMetric + ShutdownModelMetricRequests = rpc.ShutdownModelMetricRequests + ShutdownModelMetricTokenDetail = rpc.ShutdownModelMetricTokenDetail + ShutdownModelMetricUsage = rpc.ShutdownModelMetricUsage + ShutdownTokenDetail = rpc.ShutdownTokenDetail + ShutdownType = rpc.ShutdownType + SkillInvokedData = rpc.SkillInvokedData + SkillInvokedTrigger = rpc.SkillInvokedTrigger + SkillsLoadedSkill = rpc.SkillsLoadedSkill + SkillSource = rpc.SkillSource + SubagentCompletedData = rpc.SubagentCompletedData + SubagentDeselectedData = rpc.SubagentDeselectedData + SubagentFailedData = rpc.SubagentFailedData + SubagentSelectedData = rpc.SubagentSelectedData + SubagentStartedData = rpc.SubagentStartedData + SystemMessageData = rpc.SystemMessageData + SystemMessageMetadata = rpc.SystemMessageMetadata + SystemMessageRole = rpc.SystemMessageRole + SystemNotification = rpc.SystemNotification + SystemNotificationAgentCompleted = rpc.SystemNotificationAgentCompleted + SystemNotificationAgentCompletedStatus = rpc.SystemNotificationAgentCompletedStatus + SystemNotificationAgentIdle = rpc.SystemNotificationAgentIdle + SystemNotificationData = rpc.SystemNotificationData + SystemNotificationInstructionDiscovered = rpc.SystemNotificationInstructionDiscovered + SystemNotificationNewInboxMessage = rpc.SystemNotificationNewInboxMessage + SystemNotificationShellCompleted = rpc.SystemNotificationShellCompleted + SystemNotificationShellDetachedCompleted = rpc.SystemNotificationShellDetachedCompleted + SystemNotificationType = rpc.SystemNotificationType + SystemNotificationUnclassified = rpc.SystemNotificationUnclassified + TaskCompletionOutcome = rpc.TaskCompletionOutcome + ToolExecutionCompleteContent = rpc.ToolExecutionCompleteContent + ToolExecutionCompleteContentAudio = rpc.ToolExecutionCompleteContentAudio + ToolExecutionCompleteContentImage = rpc.ToolExecutionCompleteContentImage + ToolExecutionCompleteContentResource = rpc.ToolExecutionCompleteContentResource + ToolExecutionCompleteContentResourceDetails = rpc.ToolExecutionCompleteContentResourceDetails + ToolExecutionCompleteContentResourceLink = rpc.ToolExecutionCompleteContentResourceLink + ToolExecutionCompleteContentResourceLinkIcon = rpc.ToolExecutionCompleteContentResourceLinkIcon + ToolExecutionCompleteContentResourceLinkIconTheme = rpc.ToolExecutionCompleteContentResourceLinkIconTheme + ToolExecutionCompleteContentShellExit = rpc.ToolExecutionCompleteContentShellExit + ToolExecutionCompleteContentTerminal = rpc.ToolExecutionCompleteContentTerminal + ToolExecutionCompleteContentText = rpc.ToolExecutionCompleteContentText + ToolExecutionCompleteContentType = rpc.ToolExecutionCompleteContentType + ToolExecutionCompleteData = rpc.ToolExecutionCompleteData + ToolExecutionCompleteError = rpc.ToolExecutionCompleteError + ToolExecutionCompleteResult = rpc.ToolExecutionCompleteResult + ToolExecutionCompleteToolDescription = rpc.ToolExecutionCompleteToolDescription + ToolExecutionCompleteToolDescriptionMeta = rpc.ToolExecutionCompleteToolDescriptionMeta + ToolExecutionCompleteToolDescriptionMetaUI = rpc.ToolExecutionCompleteToolDescriptionMetaUI + ToolExecutionCompleteToolDescriptionMetaUIVisibility = rpc.ToolExecutionCompleteToolDescriptionMetaUIVisibility + ToolExecutionCompleteUIResource = rpc.ToolExecutionCompleteUIResource + ToolExecutionCompleteUIResourceMeta = rpc.ToolExecutionCompleteUIResourceMeta + ToolExecutionCompleteUIResourceMetaUI = rpc.ToolExecutionCompleteUIResourceMetaUI + ToolExecutionCompleteUIResourceMetaUICsp = rpc.ToolExecutionCompleteUIResourceMetaUICsp + ToolExecutionCompleteUIResourceMetaUIPermissions = rpc.ToolExecutionCompleteUIResourceMetaUIPermissions + ToolExecutionCompleteUIResourceMetaUIPermissionsCamera = rpc.ToolExecutionCompleteUIResourceMetaUIPermissionsCamera ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite = rpc.ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite - ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation = rpc.ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation - ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone = rpc.ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone - ToolExecutionPartialResultData = rpc.ToolExecutionPartialResultData - ToolExecutionProgressData = rpc.ToolExecutionProgressData - ToolExecutionStartData = rpc.ToolExecutionStartData - ToolExecutionStartShellToolInfo = rpc.ToolExecutionStartShellToolInfo - ToolExecutionStartToolDescription = rpc.ToolExecutionStartToolDescription - ToolExecutionStartToolDescriptionMeta = rpc.ToolExecutionStartToolDescriptionMeta - ToolExecutionStartToolDescriptionMetaUI = rpc.ToolExecutionStartToolDescriptionMetaUI - ToolExecutionStartToolDescriptionMetaUIVisibility = rpc.ToolExecutionStartToolDescriptionMetaUIVisibility - ToolSearchActivatedData = rpc.ToolSearchActivatedData - ToolUserRequestedData = rpc.ToolUserRequestedData - UserInputCompletedData = rpc.UserInputCompletedData - UserInputRequestedData = rpc.UserInputRequestedData - UserMessageAgentMode = rpc.UserMessageAgentMode - UserMessageData = rpc.UserMessageData - UserMessageDelivery = rpc.UserMessageDelivery - UserToolSessionApproval = rpc.UserToolSessionApproval - UserToolSessionApprovalCommands = rpc.UserToolSessionApprovalCommands - UserToolSessionApprovalCustomTool = rpc.UserToolSessionApprovalCustomTool - UserToolSessionApprovalExtensionManagement = rpc.UserToolSessionApprovalExtensionManagement - UserToolSessionApprovalExtensionPermissionAccess = rpc.UserToolSessionApprovalExtensionPermissionAccess - UserToolSessionApprovalKind = rpc.UserToolSessionApprovalKind - UserToolSessionApprovalMCP = rpc.UserToolSessionApprovalMCP - UserToolSessionApprovalMemory = rpc.UserToolSessionApprovalMemory - UserToolSessionApprovalRead = rpc.UserToolSessionApprovalRead - UserToolSessionApprovalWrite = rpc.UserToolSessionApprovalWrite - Verbosity = rpc.Verbosity - WorkingDirectoryContext = rpc.WorkingDirectoryContext - WorkingDirectoryContextHostType = rpc.WorkingDirectoryContextHostType - WorkspaceFileChangedOperation = rpc.WorkspaceFileChangedOperation + ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation = rpc.ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation + ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone = rpc.ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone + ToolExecutionPartialResultData = rpc.ToolExecutionPartialResultData + ToolExecutionProgressData = rpc.ToolExecutionProgressData + ToolExecutionStartData = rpc.ToolExecutionStartData + ToolExecutionStartShellToolInfo = rpc.ToolExecutionStartShellToolInfo + ToolExecutionStartToolDescription = rpc.ToolExecutionStartToolDescription + ToolExecutionStartToolDescriptionMeta = rpc.ToolExecutionStartToolDescriptionMeta + ToolExecutionStartToolDescriptionMetaUI = rpc.ToolExecutionStartToolDescriptionMetaUI + ToolExecutionStartToolDescriptionMetaUIVisibility = rpc.ToolExecutionStartToolDescriptionMetaUIVisibility + ToolSearchActivatedData = rpc.ToolSearchActivatedData + ToolUserRequestedData = rpc.ToolUserRequestedData + UserInputCompletedData = rpc.UserInputCompletedData + UserInputRequestedData = rpc.UserInputRequestedData + UserMessageAgentMode = rpc.UserMessageAgentMode + UserMessageData = rpc.UserMessageData + UserMessageDelivery = rpc.UserMessageDelivery + UserToolSessionApproval = rpc.UserToolSessionApproval + UserToolSessionApprovalCommands = rpc.UserToolSessionApprovalCommands + UserToolSessionApprovalCustomTool = rpc.UserToolSessionApprovalCustomTool + UserToolSessionApprovalExtensionManagement = rpc.UserToolSessionApprovalExtensionManagement + UserToolSessionApprovalExtensionPermissionAccess = rpc.UserToolSessionApprovalExtensionPermissionAccess + UserToolSessionApprovalKind = rpc.UserToolSessionApprovalKind + UserToolSessionApprovalMCP = rpc.UserToolSessionApprovalMCP + UserToolSessionApprovalMemory = rpc.UserToolSessionApprovalMemory + UserToolSessionApprovalRead = rpc.UserToolSessionApprovalRead + UserToolSessionApprovalWrite = rpc.UserToolSessionApprovalWrite + Verbosity = rpc.Verbosity + WorkingDirectoryContext = rpc.WorkingDirectoryContext + WorkingDirectoryContextHostType = rpc.WorkingDirectoryContextHostType + WorkspaceFileChangedOperation = rpc.WorkspaceFileChangedOperation ) // Session-event constants are generated in the rpc package and re-exported here for source compatibility. const ( - AbortReasonRemoteCommand = rpc.AbortReasonRemoteCommand - AbortReasonUserAbort = rpc.AbortReasonUserAbort - AbortReasonUserInitiated = rpc.AbortReasonUserInitiated - AssistantMessageToolRequestTypeCustom = rpc.AssistantMessageToolRequestTypeCustom - AssistantMessageToolRequestTypeFunction = rpc.AssistantMessageToolRequestTypeFunction - AssistantUsageAPIEndpointChatCompletions = rpc.AssistantUsageAPIEndpointChatCompletions - AssistantUsageAPIEndpointResponses = rpc.AssistantUsageAPIEndpointResponses - AssistantUsageAPIEndpointV1Messages = rpc.AssistantUsageAPIEndpointV1Messages - AssistantUsageAPIEndpointWsResponses = rpc.AssistantUsageAPIEndpointWsResponses - AttachmentGitHubReferenceTypeDiscussion = rpc.AttachmentGitHubReferenceTypeDiscussion - AttachmentGitHubReferenceTypeIssue = rpc.AttachmentGitHubReferenceTypeIssue - AttachmentGitHubReferenceTypePr = rpc.AttachmentGitHubReferenceTypePr - AttachmentTypeBlob = rpc.AttachmentTypeBlob - AttachmentTypeDirectory = rpc.AttachmentTypeDirectory - AttachmentTypeExtensionContext = rpc.AttachmentTypeExtensionContext - AttachmentTypeFile = rpc.AttachmentTypeFile - AttachmentTypeGitHubActionsJob = rpc.AttachmentTypeGitHubActionsJob - AttachmentTypeGitHubCommit = rpc.AttachmentTypeGitHubCommit - AttachmentTypeGitHubFile = rpc.AttachmentTypeGitHubFile - AttachmentTypeGitHubFileDiff = rpc.AttachmentTypeGitHubFileDiff - AttachmentTypeGitHubReference = rpc.AttachmentTypeGitHubReference - AttachmentTypeGitHubRelease = rpc.AttachmentTypeGitHubRelease - AttachmentTypeGitHubRepository = rpc.AttachmentTypeGitHubRepository - AttachmentTypeGitHubSnippet = rpc.AttachmentTypeGitHubSnippet - AttachmentTypeGitHubTreeComparison = rpc.AttachmentTypeGitHubTreeComparison - AttachmentTypeGitHubURL = rpc.AttachmentTypeGitHubURL - AttachmentTypeSelection = rpc.AttachmentTypeSelection - AutoApprovalJudgeFailureReasonAbort = rpc.AutoApprovalJudgeFailureReasonAbort - AutoApprovalJudgeFailureReasonEmptyResponse = rpc.AutoApprovalJudgeFailureReasonEmptyResponse - AutoApprovalJudgeFailureReasonModelError = rpc.AutoApprovalJudgeFailureReasonModelError - AutoApprovalJudgeFailureReasonParseError = rpc.AutoApprovalJudgeFailureReasonParseError - AutoApprovalJudgeFailureReasonTimeout = rpc.AutoApprovalJudgeFailureReasonTimeout - AutoApprovalRecommendationApprove = rpc.AutoApprovalRecommendationApprove - AutoApprovalRecommendationError = rpc.AutoApprovalRecommendationError - AutoApprovalRecommendationExcluded = rpc.AutoApprovalRecommendationExcluded - AutoApprovalRecommendationRequireApproval = rpc.AutoApprovalRecommendationRequireApproval - AutoModeResolvedReasoningBucketHigh = rpc.AutoModeResolvedReasoningBucketHigh - AutoModeResolvedReasoningBucketLow = rpc.AutoModeResolvedReasoningBucketLow - AutoModeResolvedReasoningBucketMedium = rpc.AutoModeResolvedReasoningBucketMedium - AutoModeSwitchResponseNo = rpc.AutoModeSwitchResponseNo - AutoModeSwitchResponseYes = rpc.AutoModeSwitchResponseYes - AutoModeSwitchResponseYesAlways = rpc.AutoModeSwitchResponseYesAlways - AutopilotObjectiveChangedOperationCreate = rpc.AutopilotObjectiveChangedOperationCreate - AutopilotObjectiveChangedOperationDelete = rpc.AutopilotObjectiveChangedOperationDelete - AutopilotObjectiveChangedOperationUpdate = rpc.AutopilotObjectiveChangedOperationUpdate - AutopilotObjectiveChangedStatusActive = rpc.AutopilotObjectiveChangedStatusActive - AutopilotObjectiveChangedStatusCapReached = rpc.AutopilotObjectiveChangedStatusCapReached - AutopilotObjectiveChangedStatusCompleted = rpc.AutopilotObjectiveChangedStatusCompleted - AutopilotObjectiveChangedStatusPaused = rpc.AutopilotObjectiveChangedStatusPaused - BinaryAssetReferenceTypeImage = rpc.BinaryAssetReferenceTypeImage - BinaryAssetReferenceTypeResource = rpc.BinaryAssetReferenceTypeResource - BinaryAssetTypeImage = rpc.BinaryAssetTypeImage - BinaryAssetTypeResource = rpc.BinaryAssetTypeResource - CitationLocationTypeBlock = rpc.CitationLocationTypeBlock - CitationLocationTypeChar = rpc.CitationLocationTypeChar - CitationLocationTypePage = rpc.CitationLocationTypePage - CitationProviderAnthropic = rpc.CitationProviderAnthropic - CitationProviderClient = rpc.CitationProviderClient - CitationProviderOpenai = rpc.CitationProviderOpenai - CompactionTriggerContextLimitRetry = rpc.CompactionTriggerContextLimitRetry - CompactionTriggerManual = rpc.CompactionTriggerManual - CompactionTriggerMemoryPressure = rpc.CompactionTriggerMemoryPressure - CompactionTriggerModelSwitch = rpc.CompactionTriggerModelSwitch - CompactionTriggerThreshold = rpc.CompactionTriggerThreshold - ContextTierDefault = rpc.ContextTierDefault - ContextTierLongContext = rpc.ContextTierLongContext - ElicitationCompletedActionAccept = rpc.ElicitationCompletedActionAccept - ElicitationCompletedActionCancel = rpc.ElicitationCompletedActionCancel - ElicitationCompletedActionDecline = rpc.ElicitationCompletedActionDecline - ElicitationRequestedModeForm = rpc.ElicitationRequestedModeForm - ElicitationRequestedModeURL = rpc.ElicitationRequestedModeURL - ElicitationRequestedSchemaTypeObject = rpc.ElicitationRequestedSchemaTypeObject - ExitPlanModeActionAutopilot = rpc.ExitPlanModeActionAutopilot - ExitPlanModeActionAutopilotFleet = rpc.ExitPlanModeActionAutopilotFleet - ExitPlanModeActionExitOnly = rpc.ExitPlanModeActionExitOnly - ExitPlanModeActionInteractive = rpc.ExitPlanModeActionInteractive - ExtensionsLoadedExtensionSourcePlugin = rpc.ExtensionsLoadedExtensionSourcePlugin - ExtensionsLoadedExtensionSourceProject = rpc.ExtensionsLoadedExtensionSourceProject - ExtensionsLoadedExtensionSourceSession = rpc.ExtensionsLoadedExtensionSourceSession - ExtensionsLoadedExtensionSourceUser = rpc.ExtensionsLoadedExtensionSourceUser - ExtensionsLoadedExtensionStatusDisabled = rpc.ExtensionsLoadedExtensionStatusDisabled - ExtensionsLoadedExtensionStatusFailed = rpc.ExtensionsLoadedExtensionStatusFailed - ExtensionsLoadedExtensionStatusRunning = rpc.ExtensionsLoadedExtensionStatusRunning - ExtensionsLoadedExtensionStatusStarting = rpc.ExtensionsLoadedExtensionStatusStarting - HandoffSourceTypeLocal = rpc.HandoffSourceTypeLocal - HandoffSourceTypeRemote = rpc.HandoffSourceTypeRemote - ManagedSettingsEnforcedActionBypassPermissionsBlocked = rpc.ManagedSettingsEnforcedActionBypassPermissionsBlocked - ManagedSettingsEnforcedEscalationAllowAll = rpc.ManagedSettingsEnforcedEscalationAllowAll - ManagedSettingsEnforcedEscalationApproveAll = rpc.ManagedSettingsEnforcedEscalationApproveAll - ManagedSettingsEnforcedEscalationAutoApproval = rpc.ManagedSettingsEnforcedEscalationAutoApproval - ManagedSettingsEnforcedEscalationUnrestrictedPaths = rpc.ManagedSettingsEnforcedEscalationUnrestrictedPaths - ManagedSettingsEnforcedEscalationUnrestrictedURLs = rpc.ManagedSettingsEnforcedEscalationUnrestrictedURLs - ManagedSettingsResolvedSourceDevice = rpc.ManagedSettingsResolvedSourceDevice - ManagedSettingsResolvedSourceNone = rpc.ManagedSettingsResolvedSourceNone - ManagedSettingsResolvedSourceServer = rpc.ManagedSettingsResolvedSourceServer - MCPHeadersRefreshCompletedOutcomeHeaders = rpc.MCPHeadersRefreshCompletedOutcomeHeaders - MCPHeadersRefreshCompletedOutcomeNone = rpc.MCPHeadersRefreshCompletedOutcomeNone - MCPHeadersRefreshCompletedOutcomeTimeout = rpc.MCPHeadersRefreshCompletedOutcomeTimeout - MCPHeadersRefreshRequiredReasonAuthFailed = rpc.MCPHeadersRefreshRequiredReasonAuthFailed - MCPHeadersRefreshRequiredReasonStartup = rpc.MCPHeadersRefreshRequiredReasonStartup - MCPHeadersRefreshRequiredReasonTtlExpired = rpc.MCPHeadersRefreshRequiredReasonTtlExpired - MCPOauthCompletionOutcomeCancelled = rpc.MCPOauthCompletionOutcomeCancelled - MCPOauthCompletionOutcomeToken = rpc.MCPOauthCompletionOutcomeToken - MCPOauthRequestReasonInitial = rpc.MCPOauthRequestReasonInitial - MCPOauthRequestReasonReauth = rpc.MCPOauthRequestReasonReauth - MCPOauthRequestReasonRefresh = rpc.MCPOauthRequestReasonRefresh - MCPOauthRequestReasonUpscope = rpc.MCPOauthRequestReasonUpscope - MCPOauthRequiredStaticClientConfigGrantTypeClientCredentials = rpc.MCPOauthRequiredStaticClientConfigGrantTypeClientCredentials - MCPServerSourceBuiltin = rpc.MCPServerSourceBuiltin - MCPServerSourcePlugin = rpc.MCPServerSourcePlugin - MCPServerSourceUser = rpc.MCPServerSourceUser - MCPServerSourceWorkspace = rpc.MCPServerSourceWorkspace - MCPServerStatusConnected = rpc.MCPServerStatusConnected - MCPServerStatusDisabled = rpc.MCPServerStatusDisabled - MCPServerStatusFailed = rpc.MCPServerStatusFailed - MCPServerStatusNeedsAuth = rpc.MCPServerStatusNeedsAuth - MCPServerStatusNotConfigured = rpc.MCPServerStatusNotConfigured - MCPServerStatusPending = rpc.MCPServerStatusPending - MCPServerTransportHTTP = rpc.MCPServerTransportHTTP - MCPServerTransportMemory = rpc.MCPServerTransportMemory - MCPServerTransportSSE = rpc.MCPServerTransportSSE - MCPServerTransportStdio = rpc.MCPServerTransportStdio - ModelCallFailureBadRequestKindBodyless = rpc.ModelCallFailureBadRequestKindBodyless - ModelCallFailureBadRequestKindStructuredError = rpc.ModelCallFailureBadRequestKindStructuredError - ModelCallFailureKindAPI = rpc.ModelCallFailureKindAPI - ModelCallFailureKindTransport = rpc.ModelCallFailureKindTransport - ModelCallFailureSourceMCPSampling = rpc.ModelCallFailureSourceMCPSampling - ModelCallFailureSourceSubagent = rpc.ModelCallFailureSourceSubagent - ModelCallFailureSourceTopLevel = rpc.ModelCallFailureSourceTopLevel - ModelCallFailureTransportHTTP = rpc.ModelCallFailureTransportHTTP - ModelCallFailureTransportWebsocket = rpc.ModelCallFailureTransportWebsocket - OmittedBinaryOmittedReasonAssetUnavailable = rpc.OmittedBinaryOmittedReasonAssetUnavailable - OmittedBinaryOmittedReasonTooLarge = rpc.OmittedBinaryOmittedReasonTooLarge - OmittedBinaryTypeImage = rpc.OmittedBinaryTypeImage - OmittedBinaryTypeResource = rpc.OmittedBinaryTypeResource - PermissionAllowAllModeAuto = rpc.PermissionAllowAllModeAuto - PermissionAllowAllModeOff = rpc.PermissionAllowAllModeOff - PermissionAllowAllModeOn = rpc.PermissionAllowAllModeOn - PermissionPromptRequestKindCommands = rpc.PermissionPromptRequestKindCommands - PermissionPromptRequestKindCustomTool = rpc.PermissionPromptRequestKindCustomTool - PermissionPromptRequestKindExtensionManagement = rpc.PermissionPromptRequestKindExtensionManagement - PermissionPromptRequestKindExtensionPermissionAccess = rpc.PermissionPromptRequestKindExtensionPermissionAccess - PermissionPromptRequestKindHook = rpc.PermissionPromptRequestKindHook - PermissionPromptRequestKindMCP = rpc.PermissionPromptRequestKindMCP - PermissionPromptRequestKindMemory = rpc.PermissionPromptRequestKindMemory - PermissionPromptRequestKindPath = rpc.PermissionPromptRequestKindPath - PermissionPromptRequestKindRead = rpc.PermissionPromptRequestKindRead - PermissionPromptRequestKindURL = rpc.PermissionPromptRequestKindURL - PermissionPromptRequestKindWrite = rpc.PermissionPromptRequestKindWrite - PermissionPromptRequestPathAccessKindRead = rpc.PermissionPromptRequestPathAccessKindRead - PermissionPromptRequestPathAccessKindShell = rpc.PermissionPromptRequestPathAccessKindShell - PermissionPromptRequestPathAccessKindWrite = rpc.PermissionPromptRequestPathAccessKindWrite - PermissionRequestKindCustomTool = rpc.PermissionRequestKindCustomTool - PermissionRequestKindExtensionManagement = rpc.PermissionRequestKindExtensionManagement - PermissionRequestKindExtensionPermissionAccess = rpc.PermissionRequestKindExtensionPermissionAccess - PermissionRequestKindHook = rpc.PermissionRequestKindHook - PermissionRequestKindMCP = rpc.PermissionRequestKindMCP - PermissionRequestKindMemory = rpc.PermissionRequestKindMemory - PermissionRequestKindRead = rpc.PermissionRequestKindRead - PermissionRequestKindShell = rpc.PermissionRequestKindShell - PermissionRequestKindURL = rpc.PermissionRequestKindURL - PermissionRequestKindWrite = rpc.PermissionRequestKindWrite - PermissionRequestMemoryActionStore = rpc.PermissionRequestMemoryActionStore - PermissionRequestMemoryActionVote = rpc.PermissionRequestMemoryActionVote - PermissionRequestMemoryDirectionDownvote = rpc.PermissionRequestMemoryDirectionDownvote - PermissionRequestMemoryDirectionUpvote = rpc.PermissionRequestMemoryDirectionUpvote - PermissionResultKindApproved = rpc.PermissionResultKindApproved - PermissionResultKindApprovedForLocation = rpc.PermissionResultKindApprovedForLocation - PermissionResultKindApprovedForSession = rpc.PermissionResultKindApprovedForSession - PermissionResultKindCancelled = rpc.PermissionResultKindCancelled - PermissionResultKindDeniedByContentExclusionPolicy = rpc.PermissionResultKindDeniedByContentExclusionPolicy - PermissionResultKindDeniedByPermissionRequestHook = rpc.PermissionResultKindDeniedByPermissionRequestHook - PermissionResultKindDeniedByRules = rpc.PermissionResultKindDeniedByRules - PermissionResultKindDeniedInteractivelyByUser = rpc.PermissionResultKindDeniedInteractivelyByUser + AbortReasonRemoteCommand = rpc.AbortReasonRemoteCommand + AbortReasonUserAbort = rpc.AbortReasonUserAbort + AbortReasonUserInitiated = rpc.AbortReasonUserInitiated + AssistantMessageToolRequestTypeCustom = rpc.AssistantMessageToolRequestTypeCustom + AssistantMessageToolRequestTypeFunction = rpc.AssistantMessageToolRequestTypeFunction + AssistantUsageAPIEndpointChatCompletions = rpc.AssistantUsageAPIEndpointChatCompletions + AssistantUsageAPIEndpointResponses = rpc.AssistantUsageAPIEndpointResponses + AssistantUsageAPIEndpointV1Messages = rpc.AssistantUsageAPIEndpointV1Messages + AssistantUsageAPIEndpointWsResponses = rpc.AssistantUsageAPIEndpointWsResponses + AttachmentGitHubReferenceTypeDiscussion = rpc.AttachmentGitHubReferenceTypeDiscussion + AttachmentGitHubReferenceTypeIssue = rpc.AttachmentGitHubReferenceTypeIssue + AttachmentGitHubReferenceTypePr = rpc.AttachmentGitHubReferenceTypePr + AttachmentTypeBlob = rpc.AttachmentTypeBlob + AttachmentTypeDirectory = rpc.AttachmentTypeDirectory + AttachmentTypeExtensionContext = rpc.AttachmentTypeExtensionContext + AttachmentTypeFile = rpc.AttachmentTypeFile + AttachmentTypeGitHubActionsJob = rpc.AttachmentTypeGitHubActionsJob + AttachmentTypeGitHubCommit = rpc.AttachmentTypeGitHubCommit + AttachmentTypeGitHubFile = rpc.AttachmentTypeGitHubFile + AttachmentTypeGitHubFileDiff = rpc.AttachmentTypeGitHubFileDiff + AttachmentTypeGitHubReference = rpc.AttachmentTypeGitHubReference + AttachmentTypeGitHubRelease = rpc.AttachmentTypeGitHubRelease + AttachmentTypeGitHubRepository = rpc.AttachmentTypeGitHubRepository + AttachmentTypeGitHubSnippet = rpc.AttachmentTypeGitHubSnippet + AttachmentTypeGitHubTreeComparison = rpc.AttachmentTypeGitHubTreeComparison + AttachmentTypeGitHubURL = rpc.AttachmentTypeGitHubURL + AttachmentTypeSelection = rpc.AttachmentTypeSelection + AutoApprovalJudgeFailureReasonAbort = rpc.AutoApprovalJudgeFailureReasonAbort + AutoApprovalJudgeFailureReasonEmptyResponse = rpc.AutoApprovalJudgeFailureReasonEmptyResponse + AutoApprovalJudgeFailureReasonModelError = rpc.AutoApprovalJudgeFailureReasonModelError + AutoApprovalJudgeFailureReasonParseError = rpc.AutoApprovalJudgeFailureReasonParseError + AutoApprovalJudgeFailureReasonTimeout = rpc.AutoApprovalJudgeFailureReasonTimeout + AutoApprovalRecommendationApprove = rpc.AutoApprovalRecommendationApprove + AutoApprovalRecommendationError = rpc.AutoApprovalRecommendationError + AutoApprovalRecommendationExcluded = rpc.AutoApprovalRecommendationExcluded + AutoApprovalRecommendationRequireApproval = rpc.AutoApprovalRecommendationRequireApproval + AutoModeResolvedReasoningBucketHigh = rpc.AutoModeResolvedReasoningBucketHigh + AutoModeResolvedReasoningBucketLow = rpc.AutoModeResolvedReasoningBucketLow + AutoModeResolvedReasoningBucketMedium = rpc.AutoModeResolvedReasoningBucketMedium + AutoModeSwitchResponseNo = rpc.AutoModeSwitchResponseNo + AutoModeSwitchResponseYes = rpc.AutoModeSwitchResponseYes + AutoModeSwitchResponseYesAlways = rpc.AutoModeSwitchResponseYesAlways + AutopilotObjectiveChangedOperationCreate = rpc.AutopilotObjectiveChangedOperationCreate + AutopilotObjectiveChangedOperationDelete = rpc.AutopilotObjectiveChangedOperationDelete + AutopilotObjectiveChangedOperationUpdate = rpc.AutopilotObjectiveChangedOperationUpdate + AutopilotObjectiveChangedStatusActive = rpc.AutopilotObjectiveChangedStatusActive + AutopilotObjectiveChangedStatusCapReached = rpc.AutopilotObjectiveChangedStatusCapReached + AutopilotObjectiveChangedStatusCompleted = rpc.AutopilotObjectiveChangedStatusCompleted + AutopilotObjectiveChangedStatusPaused = rpc.AutopilotObjectiveChangedStatusPaused + BinaryAssetReferenceTypeImage = rpc.BinaryAssetReferenceTypeImage + BinaryAssetReferenceTypeResource = rpc.BinaryAssetReferenceTypeResource + BinaryAssetTypeImage = rpc.BinaryAssetTypeImage + BinaryAssetTypeResource = rpc.BinaryAssetTypeResource + CitationLocationTypeBlock = rpc.CitationLocationTypeBlock + CitationLocationTypeChar = rpc.CitationLocationTypeChar + CitationLocationTypePage = rpc.CitationLocationTypePage + CitationProviderAnthropic = rpc.CitationProviderAnthropic + CitationProviderClient = rpc.CitationProviderClient + CitationProviderOpenai = rpc.CitationProviderOpenai + CompactionTriggerContextLimitRetry = rpc.CompactionTriggerContextLimitRetry + CompactionTriggerManual = rpc.CompactionTriggerManual + CompactionTriggerMemoryPressure = rpc.CompactionTriggerMemoryPressure + CompactionTriggerModelSwitch = rpc.CompactionTriggerModelSwitch + CompactionTriggerThreshold = rpc.CompactionTriggerThreshold + ContextTierDefault = rpc.ContextTierDefault + ContextTierLongContext = rpc.ContextTierLongContext + ElicitationCompletedActionAccept = rpc.ElicitationCompletedActionAccept + ElicitationCompletedActionCancel = rpc.ElicitationCompletedActionCancel + ElicitationCompletedActionDecline = rpc.ElicitationCompletedActionDecline + ElicitationRequestedModeForm = rpc.ElicitationRequestedModeForm + ElicitationRequestedModeURL = rpc.ElicitationRequestedModeURL + ElicitationRequestedSchemaTypeObject = rpc.ElicitationRequestedSchemaTypeObject + ExitPlanModeActionAutopilot = rpc.ExitPlanModeActionAutopilot + ExitPlanModeActionAutopilotFleet = rpc.ExitPlanModeActionAutopilotFleet + ExitPlanModeActionExitOnly = rpc.ExitPlanModeActionExitOnly + ExitPlanModeActionInteractive = rpc.ExitPlanModeActionInteractive + ExtensionsLoadedExtensionSourcePlugin = rpc.ExtensionsLoadedExtensionSourcePlugin + ExtensionsLoadedExtensionSourceProject = rpc.ExtensionsLoadedExtensionSourceProject + ExtensionsLoadedExtensionSourceSession = rpc.ExtensionsLoadedExtensionSourceSession + ExtensionsLoadedExtensionSourceUser = rpc.ExtensionsLoadedExtensionSourceUser + ExtensionsLoadedExtensionStatusDisabled = rpc.ExtensionsLoadedExtensionStatusDisabled + ExtensionsLoadedExtensionStatusFailed = rpc.ExtensionsLoadedExtensionStatusFailed + ExtensionsLoadedExtensionStatusRunning = rpc.ExtensionsLoadedExtensionStatusRunning + ExtensionsLoadedExtensionStatusStarting = rpc.ExtensionsLoadedExtensionStatusStarting + HandoffSourceTypeLocal = rpc.HandoffSourceTypeLocal + HandoffSourceTypeRemote = rpc.HandoffSourceTypeRemote + ManagedSettingsEnforcedActionBypassPermissionsBlocked = rpc.ManagedSettingsEnforcedActionBypassPermissionsBlocked + ManagedSettingsEnforcedEscalationAllowAll = rpc.ManagedSettingsEnforcedEscalationAllowAll + ManagedSettingsEnforcedEscalationApproveAll = rpc.ManagedSettingsEnforcedEscalationApproveAll + ManagedSettingsEnforcedEscalationAutoApproval = rpc.ManagedSettingsEnforcedEscalationAutoApproval + ManagedSettingsEnforcedEscalationUnrestrictedPaths = rpc.ManagedSettingsEnforcedEscalationUnrestrictedPaths + ManagedSettingsEnforcedEscalationUnrestrictedURLs = rpc.ManagedSettingsEnforcedEscalationUnrestrictedURLs + ManagedSettingsResolvedSourceDevice = rpc.ManagedSettingsResolvedSourceDevice + ManagedSettingsResolvedSourceNone = rpc.ManagedSettingsResolvedSourceNone + ManagedSettingsResolvedSourceServer = rpc.ManagedSettingsResolvedSourceServer + MCPHeadersRefreshCompletedOutcomeHeaders = rpc.MCPHeadersRefreshCompletedOutcomeHeaders + MCPHeadersRefreshCompletedOutcomeNone = rpc.MCPHeadersRefreshCompletedOutcomeNone + MCPHeadersRefreshCompletedOutcomeTimeout = rpc.MCPHeadersRefreshCompletedOutcomeTimeout + MCPHeadersRefreshRequiredReasonAuthFailed = rpc.MCPHeadersRefreshRequiredReasonAuthFailed + MCPHeadersRefreshRequiredReasonStartup = rpc.MCPHeadersRefreshRequiredReasonStartup + MCPHeadersRefreshRequiredReasonTtlExpired = rpc.MCPHeadersRefreshRequiredReasonTtlExpired + MCPOauthCompletionOutcomeCancelled = rpc.MCPOauthCompletionOutcomeCancelled + MCPOauthCompletionOutcomeToken = rpc.MCPOauthCompletionOutcomeToken + MCPOauthRequestReasonInitial = rpc.MCPOauthRequestReasonInitial + MCPOauthRequestReasonReauth = rpc.MCPOauthRequestReasonReauth + MCPOauthRequestReasonRefresh = rpc.MCPOauthRequestReasonRefresh + MCPOauthRequestReasonUpscope = rpc.MCPOauthRequestReasonUpscope + MCPOauthRequiredStaticClientConfigGrantTypeClientCredentials = rpc.MCPOauthRequiredStaticClientConfigGrantTypeClientCredentials + MCPServerSourceBuiltin = rpc.MCPServerSourceBuiltin + MCPServerSourcePlugin = rpc.MCPServerSourcePlugin + MCPServerSourceUser = rpc.MCPServerSourceUser + MCPServerSourceWorkspace = rpc.MCPServerSourceWorkspace + MCPServerStatusConnected = rpc.MCPServerStatusConnected + MCPServerStatusDisabled = rpc.MCPServerStatusDisabled + MCPServerStatusFailed = rpc.MCPServerStatusFailed + MCPServerStatusNeedsAuth = rpc.MCPServerStatusNeedsAuth + MCPServerStatusNotConfigured = rpc.MCPServerStatusNotConfigured + MCPServerStatusPending = rpc.MCPServerStatusPending + MCPServerTransportHTTP = rpc.MCPServerTransportHTTP + MCPServerTransportMemory = rpc.MCPServerTransportMemory + MCPServerTransportSSE = rpc.MCPServerTransportSSE + MCPServerTransportStdio = rpc.MCPServerTransportStdio + ModelCallFailureBadRequestKindBodyless = rpc.ModelCallFailureBadRequestKindBodyless + ModelCallFailureBadRequestKindStructuredError = rpc.ModelCallFailureBadRequestKindStructuredError + ModelCallFailureKindAPI = rpc.ModelCallFailureKindAPI + ModelCallFailureKindTransport = rpc.ModelCallFailureKindTransport + ModelCallFailureSourceMCPSampling = rpc.ModelCallFailureSourceMCPSampling + ModelCallFailureSourceSubagent = rpc.ModelCallFailureSourceSubagent + ModelCallFailureSourceTopLevel = rpc.ModelCallFailureSourceTopLevel + ModelCallFailureTransportHTTP = rpc.ModelCallFailureTransportHTTP + ModelCallFailureTransportWebsocket = rpc.ModelCallFailureTransportWebsocket + OmittedBinaryOmittedReasonAssetUnavailable = rpc.OmittedBinaryOmittedReasonAssetUnavailable + OmittedBinaryOmittedReasonTooLarge = rpc.OmittedBinaryOmittedReasonTooLarge + OmittedBinaryTypeImage = rpc.OmittedBinaryTypeImage + OmittedBinaryTypeResource = rpc.OmittedBinaryTypeResource + PermissionAllowAllModeAuto = rpc.PermissionAllowAllModeAuto + PermissionAllowAllModeOff = rpc.PermissionAllowAllModeOff + PermissionAllowAllModeOn = rpc.PermissionAllowAllModeOn + PermissionPromptRequestKindCommands = rpc.PermissionPromptRequestKindCommands + PermissionPromptRequestKindCustomTool = rpc.PermissionPromptRequestKindCustomTool + PermissionPromptRequestKindExtensionManagement = rpc.PermissionPromptRequestKindExtensionManagement + PermissionPromptRequestKindExtensionPermissionAccess = rpc.PermissionPromptRequestKindExtensionPermissionAccess + PermissionPromptRequestKindHook = rpc.PermissionPromptRequestKindHook + PermissionPromptRequestKindMCP = rpc.PermissionPromptRequestKindMCP + PermissionPromptRequestKindMemory = rpc.PermissionPromptRequestKindMemory + PermissionPromptRequestKindPath = rpc.PermissionPromptRequestKindPath + PermissionPromptRequestKindRead = rpc.PermissionPromptRequestKindRead + PermissionPromptRequestKindURL = rpc.PermissionPromptRequestKindURL + PermissionPromptRequestKindWrite = rpc.PermissionPromptRequestKindWrite + PermissionPromptRequestPathAccessKindRead = rpc.PermissionPromptRequestPathAccessKindRead + PermissionPromptRequestPathAccessKindShell = rpc.PermissionPromptRequestPathAccessKindShell + PermissionPromptRequestPathAccessKindWrite = rpc.PermissionPromptRequestPathAccessKindWrite + PermissionRequestKindCustomTool = rpc.PermissionRequestKindCustomTool + PermissionRequestKindExtensionManagement = rpc.PermissionRequestKindExtensionManagement + PermissionRequestKindExtensionPermissionAccess = rpc.PermissionRequestKindExtensionPermissionAccess + PermissionRequestKindHook = rpc.PermissionRequestKindHook + PermissionRequestKindMCP = rpc.PermissionRequestKindMCP + PermissionRequestKindMemory = rpc.PermissionRequestKindMemory + PermissionRequestKindRead = rpc.PermissionRequestKindRead + PermissionRequestKindShell = rpc.PermissionRequestKindShell + PermissionRequestKindURL = rpc.PermissionRequestKindURL + PermissionRequestKindWrite = rpc.PermissionRequestKindWrite + PermissionRequestMemoryActionStore = rpc.PermissionRequestMemoryActionStore + PermissionRequestMemoryActionVote = rpc.PermissionRequestMemoryActionVote + PermissionRequestMemoryDirectionDownvote = rpc.PermissionRequestMemoryDirectionDownvote + PermissionRequestMemoryDirectionUpvote = rpc.PermissionRequestMemoryDirectionUpvote + PermissionResultKindApproved = rpc.PermissionResultKindApproved + PermissionResultKindApprovedForLocation = rpc.PermissionResultKindApprovedForLocation + PermissionResultKindApprovedForSession = rpc.PermissionResultKindApprovedForSession + PermissionResultKindCancelled = rpc.PermissionResultKindCancelled + PermissionResultKindDeniedByContentExclusionPolicy = rpc.PermissionResultKindDeniedByContentExclusionPolicy + PermissionResultKindDeniedByPermissionRequestHook = rpc.PermissionResultKindDeniedByPermissionRequestHook + PermissionResultKindDeniedByRules = rpc.PermissionResultKindDeniedByRules + PermissionResultKindDeniedInteractivelyByUser = rpc.PermissionResultKindDeniedInteractivelyByUser PermissionResultKindDeniedNoApprovalRuleAndCouldNotRequestFromUser = rpc.PermissionResultKindDeniedNoApprovalRuleAndCouldNotRequestFromUser - PersistedBinaryImageTypeImage = rpc.PersistedBinaryImageTypeImage - PersistedBinaryImageTypeResource = rpc.PersistedBinaryImageTypeResource - PersistedBinaryResultTypeImage = rpc.PersistedBinaryResultTypeImage - PersistedBinaryResultTypeResource = rpc.PersistedBinaryResultTypeResource - PlanChangedOperationCreate = rpc.PlanChangedOperationCreate - PlanChangedOperationDelete = rpc.PlanChangedOperationDelete - PlanChangedOperationUpdate = rpc.PlanChangedOperationUpdate - ReasoningSummaryConcise = rpc.ReasoningSummaryConcise - ReasoningSummaryDetailed = rpc.ReasoningSummaryDetailed - ReasoningSummaryNone = rpc.ReasoningSummaryNone - ScheduleOriginModel = rpc.ScheduleOriginModel - ScheduleOriginUser = rpc.ScheduleOriginUser - SessionEventTypeAbort = rpc.SessionEventTypeAbort - SessionEventTypeAssistantIdle = rpc.SessionEventTypeAssistantIdle - SessionEventTypeAssistantIntent = rpc.SessionEventTypeAssistantIntent - SessionEventTypeAssistantMessage = rpc.SessionEventTypeAssistantMessage - SessionEventTypeAssistantMessageDelta = rpc.SessionEventTypeAssistantMessageDelta - SessionEventTypeAssistantMessageStart = rpc.SessionEventTypeAssistantMessageStart - SessionEventTypeAssistantReasoning = rpc.SessionEventTypeAssistantReasoning - SessionEventTypeAssistantReasoningDelta = rpc.SessionEventTypeAssistantReasoningDelta - SessionEventTypeAssistantServerToolProgress = rpc.SessionEventTypeAssistantServerToolProgress - SessionEventTypeAssistantStreamingDelta = rpc.SessionEventTypeAssistantStreamingDelta - SessionEventTypeAssistantToolCallDelta = rpc.SessionEventTypeAssistantToolCallDelta - SessionEventTypeAssistantTurnEnd = rpc.SessionEventTypeAssistantTurnEnd - SessionEventTypeAssistantTurnRetry = rpc.SessionEventTypeAssistantTurnRetry - SessionEventTypeAssistantTurnStart = rpc.SessionEventTypeAssistantTurnStart - SessionEventTypeAssistantUsage = rpc.SessionEventTypeAssistantUsage - SessionEventTypeAutoModeSwitchCompleted = rpc.SessionEventTypeAutoModeSwitchCompleted - SessionEventTypeAutoModeSwitchRequested = rpc.SessionEventTypeAutoModeSwitchRequested - SessionEventTypeCapabilitiesChanged = rpc.SessionEventTypeCapabilitiesChanged - SessionEventTypeCommandCompleted = rpc.SessionEventTypeCommandCompleted - SessionEventTypeCommandExecute = rpc.SessionEventTypeCommandExecute - SessionEventTypeCommandQueued = rpc.SessionEventTypeCommandQueued - SessionEventTypeCommandsChanged = rpc.SessionEventTypeCommandsChanged - SessionEventTypeElicitationCompleted = rpc.SessionEventTypeElicitationCompleted - SessionEventTypeElicitationRequested = rpc.SessionEventTypeElicitationRequested - SessionEventTypeExitPlanModeCompleted = rpc.SessionEventTypeExitPlanModeCompleted - SessionEventTypeExitPlanModeRequested = rpc.SessionEventTypeExitPlanModeRequested - SessionEventTypeExternalToolCompleted = rpc.SessionEventTypeExternalToolCompleted - SessionEventTypeExternalToolRequested = rpc.SessionEventTypeExternalToolRequested - SessionEventTypeFactoryRunUpdated = rpc.SessionEventTypeFactoryRunUpdated - SessionEventTypeHookEnd = rpc.SessionEventTypeHookEnd - SessionEventTypeHookProgress = rpc.SessionEventTypeHookProgress - SessionEventTypeHookStart = rpc.SessionEventTypeHookStart - SessionEventTypeMCPAppToolCallComplete = rpc.SessionEventTypeMCPAppToolCallComplete - SessionEventTypeMCPHeadersRefreshCompleted = rpc.SessionEventTypeMCPHeadersRefreshCompleted - SessionEventTypeMCPHeadersRefreshRequired = rpc.SessionEventTypeMCPHeadersRefreshRequired - SessionEventTypeMCPOauthCompleted = rpc.SessionEventTypeMCPOauthCompleted - SessionEventTypeMCPOauthRequired = rpc.SessionEventTypeMCPOauthRequired - SessionEventTypeMCPPromptsListChanged = rpc.SessionEventTypeMCPPromptsListChanged - SessionEventTypeMCPResourcesListChanged = rpc.SessionEventTypeMCPResourcesListChanged - SessionEventTypeMCPToolsListChanged = rpc.SessionEventTypeMCPToolsListChanged - SessionEventTypeModelCallFailure = rpc.SessionEventTypeModelCallFailure - SessionEventTypeModelCallStart = rpc.SessionEventTypeModelCallStart - SessionEventTypePendingMessagesModified = rpc.SessionEventTypePendingMessagesModified - SessionEventTypePermissionCompleted = rpc.SessionEventTypePermissionCompleted - SessionEventTypePermissionRequested = rpc.SessionEventTypePermissionRequested - SessionEventTypeSamplingCompleted = rpc.SessionEventTypeSamplingCompleted - SessionEventTypeSamplingRequested = rpc.SessionEventTypeSamplingRequested - SessionEventTypeSessionAutoModeResolved = rpc.SessionEventTypeSessionAutoModeResolved - SessionEventTypeSessionAutopilotObjectiveChanged = rpc.SessionEventTypeSessionAutopilotObjectiveChanged - SessionEventTypeSessionBackgroundTasksChanged = rpc.SessionEventTypeSessionBackgroundTasksChanged - SessionEventTypeSessionBinaryAsset = rpc.SessionEventTypeSessionBinaryAsset - SessionEventTypeSessionCanvasClosed = rpc.SessionEventTypeSessionCanvasClosed - SessionEventTypeSessionCanvasOpened = rpc.SessionEventTypeSessionCanvasOpened - SessionEventTypeSessionCanvasRecorded = rpc.SessionEventTypeSessionCanvasRecorded - SessionEventTypeSessionCanvasRegistryChanged = rpc.SessionEventTypeSessionCanvasRegistryChanged - SessionEventTypeSessionCanvasRemoved = rpc.SessionEventTypeSessionCanvasRemoved - SessionEventTypeSessionCanvasUnavailable = rpc.SessionEventTypeSessionCanvasUnavailable - SessionEventTypeSessionCompactionComplete = rpc.SessionEventTypeSessionCompactionComplete - SessionEventTypeSessionCompactionStart = rpc.SessionEventTypeSessionCompactionStart - SessionEventTypeSessionContextChanged = rpc.SessionEventTypeSessionContextChanged - SessionEventTypeSessionCustomAgentsUpdated = rpc.SessionEventTypeSessionCustomAgentsUpdated - SessionEventTypeSessionCustomNotification = rpc.SessionEventTypeSessionCustomNotification - SessionEventTypeSessionError = rpc.SessionEventTypeSessionError - SessionEventTypeSessionExtensionsAttachmentsPushed = rpc.SessionEventTypeSessionExtensionsAttachmentsPushed - SessionEventTypeSessionExtensionsLoaded = rpc.SessionEventTypeSessionExtensionsLoaded - SessionEventTypeSessionHandoff = rpc.SessionEventTypeSessionHandoff - SessionEventTypeSessionIdle = rpc.SessionEventTypeSessionIdle - SessionEventTypeSessionInfo = rpc.SessionEventTypeSessionInfo - SessionEventTypeSessionLimitsExhaustedCompleted = rpc.SessionEventTypeSessionLimitsExhaustedCompleted - SessionEventTypeSessionLimitsExhaustedRequested = rpc.SessionEventTypeSessionLimitsExhaustedRequested - SessionEventTypeSessionManagedSettingsEnforced = rpc.SessionEventTypeSessionManagedSettingsEnforced - SessionEventTypeSessionManagedSettingsResolved = rpc.SessionEventTypeSessionManagedSettingsResolved - SessionEventTypeSessionMCPServersLoaded = rpc.SessionEventTypeSessionMCPServersLoaded - SessionEventTypeSessionMCPServerStatusChanged = rpc.SessionEventTypeSessionMCPServerStatusChanged - SessionEventTypeSessionModeChanged = rpc.SessionEventTypeSessionModeChanged - SessionEventTypeSessionModelChange = rpc.SessionEventTypeSessionModelChange - SessionEventTypeSessionPermissionsChanged = rpc.SessionEventTypeSessionPermissionsChanged - SessionEventTypeSessionPlanChanged = rpc.SessionEventTypeSessionPlanChanged - SessionEventTypeSessionRemoteSteerableChanged = rpc.SessionEventTypeSessionRemoteSteerableChanged - SessionEventTypeSessionResume = rpc.SessionEventTypeSessionResume - SessionEventTypeSessionScheduleCancelled = rpc.SessionEventTypeSessionScheduleCancelled - SessionEventTypeSessionScheduleCreated = rpc.SessionEventTypeSessionScheduleCreated - SessionEventTypeSessionScheduleRearmed = rpc.SessionEventTypeSessionScheduleRearmed - SessionEventTypeSessionSessionLimitsChanged = rpc.SessionEventTypeSessionSessionLimitsChanged - SessionEventTypeSessionShutdown = rpc.SessionEventTypeSessionShutdown - SessionEventTypeSessionSkillsLoaded = rpc.SessionEventTypeSessionSkillsLoaded - SessionEventTypeSessionSnapshotRewind = rpc.SessionEventTypeSessionSnapshotRewind - SessionEventTypeSessionStart = rpc.SessionEventTypeSessionStart - SessionEventTypeSessionTaskComplete = rpc.SessionEventTypeSessionTaskComplete - SessionEventTypeSessionTitleChanged = rpc.SessionEventTypeSessionTitleChanged - SessionEventTypeSessionTodosChanged = rpc.SessionEventTypeSessionTodosChanged - SessionEventTypeSessionToolsUpdated = rpc.SessionEventTypeSessionToolsUpdated - SessionEventTypeSessionTruncation = rpc.SessionEventTypeSessionTruncation - SessionEventTypeSessionUsageCheckpoint = rpc.SessionEventTypeSessionUsageCheckpoint - SessionEventTypeSessionUsageInfo = rpc.SessionEventTypeSessionUsageInfo - SessionEventTypeSessionWarning = rpc.SessionEventTypeSessionWarning - SessionEventTypeSessionWorkspaceFileChanged = rpc.SessionEventTypeSessionWorkspaceFileChanged - SessionEventTypeSkillInvoked = rpc.SessionEventTypeSkillInvoked - SessionEventTypeSubagentCompleted = rpc.SessionEventTypeSubagentCompleted - SessionEventTypeSubagentDeselected = rpc.SessionEventTypeSubagentDeselected - SessionEventTypeSubagentFailed = rpc.SessionEventTypeSubagentFailed - SessionEventTypeSubagentSelected = rpc.SessionEventTypeSubagentSelected - SessionEventTypeSubagentStarted = rpc.SessionEventTypeSubagentStarted - SessionEventTypeSystemMessage = rpc.SessionEventTypeSystemMessage - SessionEventTypeSystemNotification = rpc.SessionEventTypeSystemNotification - SessionEventTypeToolExecutionComplete = rpc.SessionEventTypeToolExecutionComplete - SessionEventTypeToolExecutionPartialResult = rpc.SessionEventTypeToolExecutionPartialResult - SessionEventTypeToolExecutionProgress = rpc.SessionEventTypeToolExecutionProgress - SessionEventTypeToolExecutionStart = rpc.SessionEventTypeToolExecutionStart - SessionEventTypeToolSearchActivated = rpc.SessionEventTypeToolSearchActivated - SessionEventTypeToolUserRequested = rpc.SessionEventTypeToolUserRequested - SessionEventTypeUserInputCompleted = rpc.SessionEventTypeUserInputCompleted - SessionEventTypeUserInputRequested = rpc.SessionEventTypeUserInputRequested - SessionEventTypeUserMessage = rpc.SessionEventTypeUserMessage - SessionLimitsExhaustedResponseActionAdd = rpc.SessionLimitsExhaustedResponseActionAdd - SessionLimitsExhaustedResponseActionCancel = rpc.SessionLimitsExhaustedResponseActionCancel - SessionLimitsExhaustedResponseActionSet = rpc.SessionLimitsExhaustedResponseActionSet - SessionLimitsExhaustedResponseActionUnset = rpc.SessionLimitsExhaustedResponseActionUnset - SessionModeAutopilot = rpc.SessionModeAutopilot - SessionModeInteractive = rpc.SessionModeInteractive - SessionModePlan = rpc.SessionModePlan - ShutdownTypeError = rpc.ShutdownTypeError - ShutdownTypeRoutine = rpc.ShutdownTypeRoutine - SkillInvokedTriggerAgentInvoked = rpc.SkillInvokedTriggerAgentInvoked - SkillInvokedTriggerContextLoad = rpc.SkillInvokedTriggerContextLoad - SkillInvokedTriggerUserInvoked = rpc.SkillInvokedTriggerUserInvoked - SkillSourceBuiltin = rpc.SkillSourceBuiltin - SkillSourceCustom = rpc.SkillSourceCustom - SkillSourceInherited = rpc.SkillSourceInherited - SkillSourcePersonalAgents = rpc.SkillSourcePersonalAgents - SkillSourcePersonalCopilot = rpc.SkillSourcePersonalCopilot - SkillSourcePlugin = rpc.SkillSourcePlugin - SkillSourceProject = rpc.SkillSourceProject - SystemMessageRoleDeveloper = rpc.SystemMessageRoleDeveloper - SystemMessageRoleSystem = rpc.SystemMessageRoleSystem - SystemNotificationAgentCompletedStatusCompleted = rpc.SystemNotificationAgentCompletedStatusCompleted - SystemNotificationAgentCompletedStatusFailed = rpc.SystemNotificationAgentCompletedStatusFailed - SystemNotificationTypeAgentCompleted = rpc.SystemNotificationTypeAgentCompleted - SystemNotificationTypeAgentIdle = rpc.SystemNotificationTypeAgentIdle - SystemNotificationTypeInstructionDiscovered = rpc.SystemNotificationTypeInstructionDiscovered - SystemNotificationTypeNewInboxMessage = rpc.SystemNotificationTypeNewInboxMessage - SystemNotificationTypeShellCompleted = rpc.SystemNotificationTypeShellCompleted - SystemNotificationTypeShellDetachedCompleted = rpc.SystemNotificationTypeShellDetachedCompleted - SystemNotificationTypeUnclassified = rpc.SystemNotificationTypeUnclassified - TaskCompletionOutcomeBlocked = rpc.TaskCompletionOutcomeBlocked - TaskCompletionOutcomeCompleted = rpc.TaskCompletionOutcomeCompleted - TaskCompletionOutcomeContinue = rpc.TaskCompletionOutcomeContinue - ToolExecutionCompleteContentResourceLinkIconThemeDark = rpc.ToolExecutionCompleteContentResourceLinkIconThemeDark - ToolExecutionCompleteContentResourceLinkIconThemeLight = rpc.ToolExecutionCompleteContentResourceLinkIconThemeLight - ToolExecutionCompleteContentTypeAudio = rpc.ToolExecutionCompleteContentTypeAudio - ToolExecutionCompleteContentTypeImage = rpc.ToolExecutionCompleteContentTypeImage - ToolExecutionCompleteContentTypeResource = rpc.ToolExecutionCompleteContentTypeResource - ToolExecutionCompleteContentTypeResourceLink = rpc.ToolExecutionCompleteContentTypeResourceLink - ToolExecutionCompleteContentTypeShellExit = rpc.ToolExecutionCompleteContentTypeShellExit - ToolExecutionCompleteContentTypeTerminal = rpc.ToolExecutionCompleteContentTypeTerminal - ToolExecutionCompleteContentTypeText = rpc.ToolExecutionCompleteContentTypeText - ToolExecutionCompleteToolDescriptionMetaUIVisibilityApp = rpc.ToolExecutionCompleteToolDescriptionMetaUIVisibilityApp - ToolExecutionCompleteToolDescriptionMetaUIVisibilityModel = rpc.ToolExecutionCompleteToolDescriptionMetaUIVisibilityModel - ToolExecutionStartToolDescriptionMetaUIVisibilityApp = rpc.ToolExecutionStartToolDescriptionMetaUIVisibilityApp - ToolExecutionStartToolDescriptionMetaUIVisibilityModel = rpc.ToolExecutionStartToolDescriptionMetaUIVisibilityModel - UserMessageAgentModeAutopilot = rpc.UserMessageAgentModeAutopilot - UserMessageAgentModeInteractive = rpc.UserMessageAgentModeInteractive - UserMessageAgentModePlan = rpc.UserMessageAgentModePlan - UserMessageAgentModeShell = rpc.UserMessageAgentModeShell - UserMessageDeliveryIdle = rpc.UserMessageDeliveryIdle - UserMessageDeliveryQueued = rpc.UserMessageDeliveryQueued - UserMessageDeliverySteering = rpc.UserMessageDeliverySteering - UserToolSessionApprovalKindCommands = rpc.UserToolSessionApprovalKindCommands - UserToolSessionApprovalKindCustomTool = rpc.UserToolSessionApprovalKindCustomTool - UserToolSessionApprovalKindExtensionManagement = rpc.UserToolSessionApprovalKindExtensionManagement - UserToolSessionApprovalKindExtensionPermissionAccess = rpc.UserToolSessionApprovalKindExtensionPermissionAccess - UserToolSessionApprovalKindMCP = rpc.UserToolSessionApprovalKindMCP - UserToolSessionApprovalKindMemory = rpc.UserToolSessionApprovalKindMemory - UserToolSessionApprovalKindRead = rpc.UserToolSessionApprovalKindRead - UserToolSessionApprovalKindWrite = rpc.UserToolSessionApprovalKindWrite - VerbosityHigh = rpc.VerbosityHigh - VerbosityLow = rpc.VerbosityLow - VerbosityMedium = rpc.VerbosityMedium - WorkingDirectoryContextHostTypeADO = rpc.WorkingDirectoryContextHostTypeADO - WorkingDirectoryContextHostTypeGitHub = rpc.WorkingDirectoryContextHostTypeGitHub - WorkspaceFileChangedOperationCreate = rpc.WorkspaceFileChangedOperationCreate - WorkspaceFileChangedOperationUpdate = rpc.WorkspaceFileChangedOperationUpdate -) \ No newline at end of file + PersistedBinaryImageTypeImage = rpc.PersistedBinaryImageTypeImage + PersistedBinaryImageTypeResource = rpc.PersistedBinaryImageTypeResource + PersistedBinaryResultTypeImage = rpc.PersistedBinaryResultTypeImage + PersistedBinaryResultTypeResource = rpc.PersistedBinaryResultTypeResource + PlanChangedOperationCreate = rpc.PlanChangedOperationCreate + PlanChangedOperationDelete = rpc.PlanChangedOperationDelete + PlanChangedOperationUpdate = rpc.PlanChangedOperationUpdate + ReasoningSummaryConcise = rpc.ReasoningSummaryConcise + ReasoningSummaryDetailed = rpc.ReasoningSummaryDetailed + ReasoningSummaryNone = rpc.ReasoningSummaryNone + ScheduleOriginModel = rpc.ScheduleOriginModel + ScheduleOriginUser = rpc.ScheduleOriginUser + SessionEventTypeAbort = rpc.SessionEventTypeAbort + SessionEventTypeAssistantIdle = rpc.SessionEventTypeAssistantIdle + SessionEventTypeAssistantIntent = rpc.SessionEventTypeAssistantIntent + SessionEventTypeAssistantMessage = rpc.SessionEventTypeAssistantMessage + SessionEventTypeAssistantMessageDelta = rpc.SessionEventTypeAssistantMessageDelta + SessionEventTypeAssistantMessageStart = rpc.SessionEventTypeAssistantMessageStart + SessionEventTypeAssistantReasoning = rpc.SessionEventTypeAssistantReasoning + SessionEventTypeAssistantReasoningDelta = rpc.SessionEventTypeAssistantReasoningDelta + SessionEventTypeAssistantServerToolProgress = rpc.SessionEventTypeAssistantServerToolProgress + SessionEventTypeAssistantStreamingDelta = rpc.SessionEventTypeAssistantStreamingDelta + SessionEventTypeAssistantToolCallDelta = rpc.SessionEventTypeAssistantToolCallDelta + SessionEventTypeAssistantTurnEnd = rpc.SessionEventTypeAssistantTurnEnd + SessionEventTypeAssistantTurnRetry = rpc.SessionEventTypeAssistantTurnRetry + SessionEventTypeAssistantTurnStart = rpc.SessionEventTypeAssistantTurnStart + SessionEventTypeAssistantUsage = rpc.SessionEventTypeAssistantUsage + SessionEventTypeAutoModeSwitchCompleted = rpc.SessionEventTypeAutoModeSwitchCompleted + SessionEventTypeAutoModeSwitchRequested = rpc.SessionEventTypeAutoModeSwitchRequested + SessionEventTypeCapabilitiesChanged = rpc.SessionEventTypeCapabilitiesChanged + SessionEventTypeCommandCompleted = rpc.SessionEventTypeCommandCompleted + SessionEventTypeCommandExecute = rpc.SessionEventTypeCommandExecute + SessionEventTypeCommandQueued = rpc.SessionEventTypeCommandQueued + SessionEventTypeCommandsChanged = rpc.SessionEventTypeCommandsChanged + SessionEventTypeElicitationCompleted = rpc.SessionEventTypeElicitationCompleted + SessionEventTypeElicitationRequested = rpc.SessionEventTypeElicitationRequested + SessionEventTypeExitPlanModeCompleted = rpc.SessionEventTypeExitPlanModeCompleted + SessionEventTypeExitPlanModeRequested = rpc.SessionEventTypeExitPlanModeRequested + SessionEventTypeExternalToolCompleted = rpc.SessionEventTypeExternalToolCompleted + SessionEventTypeExternalToolRequested = rpc.SessionEventTypeExternalToolRequested + SessionEventTypeFactoryRunUpdated = rpc.SessionEventTypeFactoryRunUpdated + SessionEventTypeHookEnd = rpc.SessionEventTypeHookEnd + SessionEventTypeHookProgress = rpc.SessionEventTypeHookProgress + SessionEventTypeHookStart = rpc.SessionEventTypeHookStart + SessionEventTypeMCPAppToolCallComplete = rpc.SessionEventTypeMCPAppToolCallComplete + SessionEventTypeMCPHeadersRefreshCompleted = rpc.SessionEventTypeMCPHeadersRefreshCompleted + SessionEventTypeMCPHeadersRefreshRequired = rpc.SessionEventTypeMCPHeadersRefreshRequired + SessionEventTypeMCPOauthCompleted = rpc.SessionEventTypeMCPOauthCompleted + SessionEventTypeMCPOauthRequired = rpc.SessionEventTypeMCPOauthRequired + SessionEventTypeMCPPromptsListChanged = rpc.SessionEventTypeMCPPromptsListChanged + SessionEventTypeMCPResourcesListChanged = rpc.SessionEventTypeMCPResourcesListChanged + SessionEventTypeMCPToolsListChanged = rpc.SessionEventTypeMCPToolsListChanged + SessionEventTypeModelCallFailure = rpc.SessionEventTypeModelCallFailure + SessionEventTypeModelCallStart = rpc.SessionEventTypeModelCallStart + SessionEventTypePendingMessagesModified = rpc.SessionEventTypePendingMessagesModified + SessionEventTypePermissionCompleted = rpc.SessionEventTypePermissionCompleted + SessionEventTypePermissionRequested = rpc.SessionEventTypePermissionRequested + SessionEventTypeSamplingCompleted = rpc.SessionEventTypeSamplingCompleted + SessionEventTypeSamplingRequested = rpc.SessionEventTypeSamplingRequested + SessionEventTypeSessionAutoModeResolved = rpc.SessionEventTypeSessionAutoModeResolved + SessionEventTypeSessionAutopilotObjectiveChanged = rpc.SessionEventTypeSessionAutopilotObjectiveChanged + SessionEventTypeSessionBackgroundTasksChanged = rpc.SessionEventTypeSessionBackgroundTasksChanged + SessionEventTypeSessionBinaryAsset = rpc.SessionEventTypeSessionBinaryAsset + SessionEventTypeSessionCanvasClosed = rpc.SessionEventTypeSessionCanvasClosed + SessionEventTypeSessionCanvasOpened = rpc.SessionEventTypeSessionCanvasOpened + SessionEventTypeSessionCanvasRecorded = rpc.SessionEventTypeSessionCanvasRecorded + SessionEventTypeSessionCanvasRegistryChanged = rpc.SessionEventTypeSessionCanvasRegistryChanged + SessionEventTypeSessionCanvasRemoved = rpc.SessionEventTypeSessionCanvasRemoved + SessionEventTypeSessionCanvasUnavailable = rpc.SessionEventTypeSessionCanvasUnavailable + SessionEventTypeSessionCompactionComplete = rpc.SessionEventTypeSessionCompactionComplete + SessionEventTypeSessionCompactionStart = rpc.SessionEventTypeSessionCompactionStart + SessionEventTypeSessionContextChanged = rpc.SessionEventTypeSessionContextChanged + SessionEventTypeSessionCustomAgentsUpdated = rpc.SessionEventTypeSessionCustomAgentsUpdated + SessionEventTypeSessionCustomNotification = rpc.SessionEventTypeSessionCustomNotification + SessionEventTypeSessionError = rpc.SessionEventTypeSessionError + SessionEventTypeSessionExtensionsAttachmentsPushed = rpc.SessionEventTypeSessionExtensionsAttachmentsPushed + SessionEventTypeSessionExtensionsLoaded = rpc.SessionEventTypeSessionExtensionsLoaded + SessionEventTypeSessionHandoff = rpc.SessionEventTypeSessionHandoff + SessionEventTypeSessionIdle = rpc.SessionEventTypeSessionIdle + SessionEventTypeSessionInfo = rpc.SessionEventTypeSessionInfo + SessionEventTypeSessionLimitsExhaustedCompleted = rpc.SessionEventTypeSessionLimitsExhaustedCompleted + SessionEventTypeSessionLimitsExhaustedRequested = rpc.SessionEventTypeSessionLimitsExhaustedRequested + SessionEventTypeSessionManagedSettingsEnforced = rpc.SessionEventTypeSessionManagedSettingsEnforced + SessionEventTypeSessionManagedSettingsResolved = rpc.SessionEventTypeSessionManagedSettingsResolved + SessionEventTypeSessionMCPServersLoaded = rpc.SessionEventTypeSessionMCPServersLoaded + SessionEventTypeSessionMCPServerStatusChanged = rpc.SessionEventTypeSessionMCPServerStatusChanged + SessionEventTypeSessionModeChanged = rpc.SessionEventTypeSessionModeChanged + SessionEventTypeSessionModelChange = rpc.SessionEventTypeSessionModelChange + SessionEventTypeSessionPermissionsChanged = rpc.SessionEventTypeSessionPermissionsChanged + SessionEventTypeSessionPlanChanged = rpc.SessionEventTypeSessionPlanChanged + SessionEventTypeSessionRemoteSteerableChanged = rpc.SessionEventTypeSessionRemoteSteerableChanged + SessionEventTypeSessionResume = rpc.SessionEventTypeSessionResume + SessionEventTypeSessionScheduleCancelled = rpc.SessionEventTypeSessionScheduleCancelled + SessionEventTypeSessionScheduleCreated = rpc.SessionEventTypeSessionScheduleCreated + SessionEventTypeSessionScheduleRearmed = rpc.SessionEventTypeSessionScheduleRearmed + SessionEventTypeSessionSessionLimitsChanged = rpc.SessionEventTypeSessionSessionLimitsChanged + SessionEventTypeSessionShutdown = rpc.SessionEventTypeSessionShutdown + SessionEventTypeSessionSkillsLoaded = rpc.SessionEventTypeSessionSkillsLoaded + SessionEventTypeSessionSnapshotRewind = rpc.SessionEventTypeSessionSnapshotRewind + SessionEventTypeSessionStart = rpc.SessionEventTypeSessionStart + SessionEventTypeSessionTaskComplete = rpc.SessionEventTypeSessionTaskComplete + SessionEventTypeSessionTitleChanged = rpc.SessionEventTypeSessionTitleChanged + SessionEventTypeSessionTodosChanged = rpc.SessionEventTypeSessionTodosChanged + SessionEventTypeSessionToolsUpdated = rpc.SessionEventTypeSessionToolsUpdated + SessionEventTypeSessionTruncation = rpc.SessionEventTypeSessionTruncation + SessionEventTypeSessionUsageCheckpoint = rpc.SessionEventTypeSessionUsageCheckpoint + SessionEventTypeSessionUsageInfo = rpc.SessionEventTypeSessionUsageInfo + SessionEventTypeSessionWarning = rpc.SessionEventTypeSessionWarning + SessionEventTypeSessionWorkspaceFileChanged = rpc.SessionEventTypeSessionWorkspaceFileChanged + SessionEventTypeSkillInvoked = rpc.SessionEventTypeSkillInvoked + SessionEventTypeSubagentCompleted = rpc.SessionEventTypeSubagentCompleted + SessionEventTypeSubagentDeselected = rpc.SessionEventTypeSubagentDeselected + SessionEventTypeSubagentFailed = rpc.SessionEventTypeSubagentFailed + SessionEventTypeSubagentSelected = rpc.SessionEventTypeSubagentSelected + SessionEventTypeSubagentStarted = rpc.SessionEventTypeSubagentStarted + SessionEventTypeSystemMessage = rpc.SessionEventTypeSystemMessage + SessionEventTypeSystemNotification = rpc.SessionEventTypeSystemNotification + SessionEventTypeToolExecutionComplete = rpc.SessionEventTypeToolExecutionComplete + SessionEventTypeToolExecutionPartialResult = rpc.SessionEventTypeToolExecutionPartialResult + SessionEventTypeToolExecutionProgress = rpc.SessionEventTypeToolExecutionProgress + SessionEventTypeToolExecutionStart = rpc.SessionEventTypeToolExecutionStart + SessionEventTypeToolSearchActivated = rpc.SessionEventTypeToolSearchActivated + SessionEventTypeToolUserRequested = rpc.SessionEventTypeToolUserRequested + SessionEventTypeUserInputCompleted = rpc.SessionEventTypeUserInputCompleted + SessionEventTypeUserInputRequested = rpc.SessionEventTypeUserInputRequested + SessionEventTypeUserMessage = rpc.SessionEventTypeUserMessage + SessionLimitsExhaustedResponseActionAdd = rpc.SessionLimitsExhaustedResponseActionAdd + SessionLimitsExhaustedResponseActionCancel = rpc.SessionLimitsExhaustedResponseActionCancel + SessionLimitsExhaustedResponseActionSet = rpc.SessionLimitsExhaustedResponseActionSet + SessionLimitsExhaustedResponseActionUnset = rpc.SessionLimitsExhaustedResponseActionUnset + SessionModeAutopilot = rpc.SessionModeAutopilot + SessionModeInteractive = rpc.SessionModeInteractive + SessionModePlan = rpc.SessionModePlan + ShutdownTypeError = rpc.ShutdownTypeError + ShutdownTypeRoutine = rpc.ShutdownTypeRoutine + SkillInvokedTriggerAgentInvoked = rpc.SkillInvokedTriggerAgentInvoked + SkillInvokedTriggerContextLoad = rpc.SkillInvokedTriggerContextLoad + SkillInvokedTriggerUserInvoked = rpc.SkillInvokedTriggerUserInvoked + SkillSourceBuiltin = rpc.SkillSourceBuiltin + SkillSourceCustom = rpc.SkillSourceCustom + SkillSourceInherited = rpc.SkillSourceInherited + SkillSourcePersonalAgents = rpc.SkillSourcePersonalAgents + SkillSourcePersonalCopilot = rpc.SkillSourcePersonalCopilot + SkillSourcePlugin = rpc.SkillSourcePlugin + SkillSourceProject = rpc.SkillSourceProject + SystemMessageRoleDeveloper = rpc.SystemMessageRoleDeveloper + SystemMessageRoleSystem = rpc.SystemMessageRoleSystem + SystemNotificationAgentCompletedStatusCompleted = rpc.SystemNotificationAgentCompletedStatusCompleted + SystemNotificationAgentCompletedStatusFailed = rpc.SystemNotificationAgentCompletedStatusFailed + SystemNotificationTypeAgentCompleted = rpc.SystemNotificationTypeAgentCompleted + SystemNotificationTypeAgentIdle = rpc.SystemNotificationTypeAgentIdle + SystemNotificationTypeInstructionDiscovered = rpc.SystemNotificationTypeInstructionDiscovered + SystemNotificationTypeNewInboxMessage = rpc.SystemNotificationTypeNewInboxMessage + SystemNotificationTypeShellCompleted = rpc.SystemNotificationTypeShellCompleted + SystemNotificationTypeShellDetachedCompleted = rpc.SystemNotificationTypeShellDetachedCompleted + SystemNotificationTypeUnclassified = rpc.SystemNotificationTypeUnclassified + TaskCompletionOutcomeBlocked = rpc.TaskCompletionOutcomeBlocked + TaskCompletionOutcomeCompleted = rpc.TaskCompletionOutcomeCompleted + TaskCompletionOutcomeContinue = rpc.TaskCompletionOutcomeContinue + ToolExecutionCompleteContentResourceLinkIconThemeDark = rpc.ToolExecutionCompleteContentResourceLinkIconThemeDark + ToolExecutionCompleteContentResourceLinkIconThemeLight = rpc.ToolExecutionCompleteContentResourceLinkIconThemeLight + ToolExecutionCompleteContentTypeAudio = rpc.ToolExecutionCompleteContentTypeAudio + ToolExecutionCompleteContentTypeImage = rpc.ToolExecutionCompleteContentTypeImage + ToolExecutionCompleteContentTypeResource = rpc.ToolExecutionCompleteContentTypeResource + ToolExecutionCompleteContentTypeResourceLink = rpc.ToolExecutionCompleteContentTypeResourceLink + ToolExecutionCompleteContentTypeShellExit = rpc.ToolExecutionCompleteContentTypeShellExit + ToolExecutionCompleteContentTypeTerminal = rpc.ToolExecutionCompleteContentTypeTerminal + ToolExecutionCompleteContentTypeText = rpc.ToolExecutionCompleteContentTypeText + ToolExecutionCompleteToolDescriptionMetaUIVisibilityApp = rpc.ToolExecutionCompleteToolDescriptionMetaUIVisibilityApp + ToolExecutionCompleteToolDescriptionMetaUIVisibilityModel = rpc.ToolExecutionCompleteToolDescriptionMetaUIVisibilityModel + ToolExecutionStartToolDescriptionMetaUIVisibilityApp = rpc.ToolExecutionStartToolDescriptionMetaUIVisibilityApp + ToolExecutionStartToolDescriptionMetaUIVisibilityModel = rpc.ToolExecutionStartToolDescriptionMetaUIVisibilityModel + UserMessageAgentModeAutopilot = rpc.UserMessageAgentModeAutopilot + UserMessageAgentModeInteractive = rpc.UserMessageAgentModeInteractive + UserMessageAgentModePlan = rpc.UserMessageAgentModePlan + UserMessageAgentModeShell = rpc.UserMessageAgentModeShell + UserMessageDeliveryIdle = rpc.UserMessageDeliveryIdle + UserMessageDeliveryQueued = rpc.UserMessageDeliveryQueued + UserMessageDeliverySteering = rpc.UserMessageDeliverySteering + UserToolSessionApprovalKindCommands = rpc.UserToolSessionApprovalKindCommands + UserToolSessionApprovalKindCustomTool = rpc.UserToolSessionApprovalKindCustomTool + UserToolSessionApprovalKindExtensionManagement = rpc.UserToolSessionApprovalKindExtensionManagement + UserToolSessionApprovalKindExtensionPermissionAccess = rpc.UserToolSessionApprovalKindExtensionPermissionAccess + UserToolSessionApprovalKindMCP = rpc.UserToolSessionApprovalKindMCP + UserToolSessionApprovalKindMemory = rpc.UserToolSessionApprovalKindMemory + UserToolSessionApprovalKindRead = rpc.UserToolSessionApprovalKindRead + UserToolSessionApprovalKindWrite = rpc.UserToolSessionApprovalKindWrite + VerbosityHigh = rpc.VerbosityHigh + VerbosityLow = rpc.VerbosityLow + VerbosityMedium = rpc.VerbosityMedium + WorkingDirectoryContextHostTypeADO = rpc.WorkingDirectoryContextHostTypeADO + WorkingDirectoryContextHostTypeGitHub = rpc.WorkingDirectoryContextHostTypeGitHub + WorkspaceFileChangedOperationCreate = rpc.WorkspaceFileChangedOperationCreate + WorkspaceFileChangedOperationUpdate = rpc.WorkspaceFileChangedOperationUpdate +) diff --git a/rust/src/generated/api_types.rs b/rust/src/generated/api_types.rs index 339882d411..909b3b8f58 100644 --- a/rust/src/generated/api_types.rs +++ b/rust/src/generated/api_types.rs @@ -9,8 +9,12 @@ use std::collections::HashMap; use serde::{Deserialize, Serialize}; +use super::session_events::{ + AbortReason, ContextTier, McpServerSource, McpServerStatus, PermissionPromptRequest, + PermissionRule, ReasoningSummary, SessionLimitsConfig, SessionMode, ShutdownType, SkillSource, + UserToolSessionApproval, Verbosity, +}; use crate::types::{RequestId, SessionEvent, SessionId}; -use super::session_events::{AbortReason, ContextTier, McpServerSource, McpServerStatus, PermissionPromptRequest, PermissionRule, ReasoningSummary, SessionLimitsConfig, SessionMode, ShutdownType, SkillSource, UserToolSessionApproval, Verbosity}; /// JSON-RPC method name constants. pub mod rpc_methods { @@ -167,7 +171,8 @@ pub mod rpc_methods { /// `sessions.getRemoteControlStatus` pub const SESSIONS_GETREMOTECONTROLSTATUS: &str = "sessions.getRemoteControlStatus"; /// `sessions.registerExtensionToolsOnSession` - pub const SESSIONS_REGISTEREXTENSIONTOOLSONSESSION: &str = "sessions.registerExtensionToolsOnSession"; + pub const SESSIONS_REGISTEREXTENSIONTOOLSONSESSION: &str = + "sessions.registerExtensionToolsOnSession"; /// `sessions.configureSessionExtensions` pub const SESSIONS_CONFIGURESESSIONEXTENSIONS: &str = "sessions.configureSessionExtensions"; /// `agentRegistry.spawn` @@ -253,7 +258,8 @@ pub mod rpc_methods { /// `session.plan.readSqlTodos` pub const SESSION_PLAN_READSQLTODOS: &str = "session.plan.readSqlTodos"; /// `session.plan.readSqlTodosWithDependencies` - pub const SESSION_PLAN_READSQLTODOSWITHDEPENDENCIES: &str = "session.plan.readSqlTodosWithDependencies"; + pub const SESSION_PLAN_READSQLTODOSWITHDEPENDENCIES: &str = + "session.plan.readSqlTodosWithDependencies"; /// `session.workspaces.getWorkspace` pub const SESSION_WORKSPACES_GETWORKSPACE: &str = "session.workspaces.getWorkspace"; /// `session.workspaces.updateMetadata` @@ -275,19 +281,24 @@ pub mod rpc_methods { /// `session.workspaces.truncateSummaries` pub const SESSION_WORKSPACES_TRUNCATESUMMARIES: &str = "session.workspaces.truncateSummaries"; /// `session.workspaces.readAutopilotObjective` - pub const SESSION_WORKSPACES_READAUTOPILOTOBJECTIVE: &str = "session.workspaces.readAutopilotObjective"; + pub const SESSION_WORKSPACES_READAUTOPILOTOBJECTIVE: &str = + "session.workspaces.readAutopilotObjective"; /// `session.workspaces.writeAutopilotObjective` - pub const SESSION_WORKSPACES_WRITEAUTOPILOTOBJECTIVE: &str = "session.workspaces.writeAutopilotObjective"; + pub const SESSION_WORKSPACES_WRITEAUTOPILOTOBJECTIVE: &str = + "session.workspaces.writeAutopilotObjective"; /// `session.workspaces.deleteAutopilotObjective` - pub const SESSION_WORKSPACES_DELETEAUTOPILOTOBJECTIVE: &str = "session.workspaces.deleteAutopilotObjective"; + pub const SESSION_WORKSPACES_DELETEAUTOPILOTOBJECTIVE: &str = + "session.workspaces.deleteAutopilotObjective"; /// `session.workspaces.autopilotObjectiveExists` - pub const SESSION_WORKSPACES_AUTOPILOTOBJECTIVEEXISTS: &str = "session.workspaces.autopilotObjectiveExists"; + pub const SESSION_WORKSPACES_AUTOPILOTOBJECTIVEEXISTS: &str = + "session.workspaces.autopilotObjectiveExists"; /// `session.workspaces.saveLargePaste` pub const SESSION_WORKSPACES_SAVELARGEPASTE: &str = "session.workspaces.saveLargePaste"; /// `session.workspaces.diff` pub const SESSION_WORKSPACES_DIFF: &str = "session.workspaces.diff"; /// `session.completions.getTriggerCharacters` - pub const SESSION_COMPLETIONS_GETTRIGGERCHARACTERS: &str = "session.completions.getTriggerCharacters"; + pub const SESSION_COMPLETIONS_GETTRIGGERCHARACTERS: &str = + "session.completions.getTriggerCharacters"; /// `session.completions.request` pub const SESSION_COMPLETIONS_REQUEST: &str = "session.completions.request"; /// `session.instructions.getSources` @@ -319,7 +330,8 @@ pub mod rpc_methods { /// `session.tasks.promoteToBackground` pub const SESSION_TASKS_PROMOTETOBACKGROUND: &str = "session.tasks.promoteToBackground"; /// `session.tasks.promoteCurrentToBackground` - pub const SESSION_TASKS_PROMOTECURRENTTOBACKGROUND: &str = "session.tasks.promoteCurrentToBackground"; + pub const SESSION_TASKS_PROMOTECURRENTTOBACKGROUND: &str = + "session.tasks.promoteCurrentToBackground"; /// `session.tasks.cancel` pub const SESSION_TASKS_CANCEL: &str = "session.tasks.cancel"; /// `session.tasks.remove` @@ -373,13 +385,15 @@ pub mod rpc_methods { /// `session.mcp.isServerRunning` pub const SESSION_MCP_ISSERVERRUNNING: &str = "session.mcp.isServerRunning"; /// `session.mcp.oauth.handlePendingRequest` - pub const SESSION_MCP_OAUTH_HANDLEPENDINGREQUEST: &str = "session.mcp.oauth.handlePendingRequest"; + pub const SESSION_MCP_OAUTH_HANDLEPENDINGREQUEST: &str = + "session.mcp.oauth.handlePendingRequest"; /// `session.mcp.oauth.login` pub const SESSION_MCP_OAUTH_LOGIN: &str = "session.mcp.oauth.login"; /// `session.mcp.oauth.respond` pub const SESSION_MCP_OAUTH_RESPOND: &str = "session.mcp.oauth.respond"; /// `session.mcp.headers.handlePendingHeadersRefreshRequest` - pub const SESSION_MCP_HEADERS_HANDLEPENDINGHEADERSREFRESHREQUEST: &str = "session.mcp.headers.handlePendingHeadersRefreshRequest"; + pub const SESSION_MCP_HEADERS_HANDLEPENDINGHEADERSREFRESHREQUEST: &str = + "session.mcp.headers.handlePendingHeadersRefreshRequest"; /// `session.mcp.apps.readResource` pub const SESSION_MCP_APPS_READRESOURCE: &str = "session.mcp.apps.readResource"; /// `session.mcp.apps.listTools` @@ -419,7 +433,8 @@ pub mod rpc_methods { /// `session.extensions.reload` pub const SESSION_EXTENSIONS_RELOAD: &str = "session.extensions.reload"; /// `session.extensions.sendAttachmentsToMessage` - pub const SESSION_EXTENSIONS_SENDATTACHMENTSTOMESSAGE: &str = "session.extensions.sendAttachmentsToMessage"; + pub const SESSION_EXTENSIONS_SENDATTACHMENTSTOMESSAGE: &str = + "session.extensions.sendAttachmentsToMessage"; /// `session.tools.handlePendingToolCall` pub const SESSION_TOOLS_HANDLEPENDINGTOOLCALL: &str = "session.tools.handlePendingToolCall"; /// `session.tools.initializeAndValidate` @@ -439,7 +454,8 @@ pub mod rpc_methods { /// `session.commands.enqueue` pub const SESSION_COMMANDS_ENQUEUE: &str = "session.commands.enqueue"; /// `session.commands.respondToQueuedCommand` - pub const SESSION_COMMANDS_RESPONDTOQUEUEDCOMMAND: &str = "session.commands.respondToQueuedCommand"; + pub const SESSION_COMMANDS_RESPONDTOQUEUEDCOMMAND: &str = + "session.commands.respondToQueuedCommand"; /// `session.telemetry.getEngagementId` pub const SESSION_TELEMETRY_GETENGAGEMENTID: &str = "session.telemetry.getEngagementId"; /// `session.telemetry.setFeatureOverrides` @@ -455,19 +471,24 @@ pub mod rpc_methods { /// `session.ui.handlePendingSampling` pub const SESSION_UI_HANDLEPENDINGSAMPLING: &str = "session.ui.handlePendingSampling"; /// `session.ui.handlePendingAutoModeSwitch` - pub const SESSION_UI_HANDLEPENDINGAUTOMODESWITCH: &str = "session.ui.handlePendingAutoModeSwitch"; + pub const SESSION_UI_HANDLEPENDINGAUTOMODESWITCH: &str = + "session.ui.handlePendingAutoModeSwitch"; /// `session.ui.handlePendingSessionLimitsExhausted` - pub const SESSION_UI_HANDLEPENDINGSESSIONLIMITSEXHAUSTED: &str = "session.ui.handlePendingSessionLimitsExhausted"; + pub const SESSION_UI_HANDLEPENDINGSESSIONLIMITSEXHAUSTED: &str = + "session.ui.handlePendingSessionLimitsExhausted"; /// `session.ui.handlePendingExitPlanMode` pub const SESSION_UI_HANDLEPENDINGEXITPLANMODE: &str = "session.ui.handlePendingExitPlanMode"; /// `session.ui.registerDirectAutoModeSwitchHandler` - pub const SESSION_UI_REGISTERDIRECTAUTOMODESWITCHHANDLER: &str = "session.ui.registerDirectAutoModeSwitchHandler"; + pub const SESSION_UI_REGISTERDIRECTAUTOMODESWITCHHANDLER: &str = + "session.ui.registerDirectAutoModeSwitchHandler"; /// `session.ui.unregisterDirectAutoModeSwitchHandler` - pub const SESSION_UI_UNREGISTERDIRECTAUTOMODESWITCHHANDLER: &str = "session.ui.unregisterDirectAutoModeSwitchHandler"; + pub const SESSION_UI_UNREGISTERDIRECTAUTOMODESWITCHHANDLER: &str = + "session.ui.unregisterDirectAutoModeSwitchHandler"; /// `session.permissions.configure` pub const SESSION_PERMISSIONS_CONFIGURE: &str = "session.permissions.configure"; /// `session.permissions.handlePendingPermissionRequest` - pub const SESSION_PERMISSIONS_HANDLEPENDINGPERMISSIONREQUEST: &str = "session.permissions.handlePendingPermissionRequest"; + pub const SESSION_PERMISSIONS_HANDLEPENDINGPERMISSIONREQUEST: &str = + "session.permissions.handlePendingPermissionRequest"; /// `session.permissions.pendingRequests` pub const SESSION_PERMISSIONS_PENDINGREQUESTS: &str = "session.permissions.pendingRequests"; /// `session.permissions.setApproveAll` @@ -481,7 +502,8 @@ pub mod rpc_methods { /// `session.permissions.setRequired` pub const SESSION_PERMISSIONS_SETREQUIRED: &str = "session.permissions.setRequired"; /// `session.permissions.resetSessionApprovals` - pub const SESSION_PERMISSIONS_RESETSESSIONAPPROVALS: &str = "session.permissions.resetSessionApprovals"; + pub const SESSION_PERMISSIONS_RESETSESSIONAPPROVALS: &str = + "session.permissions.resetSessionApprovals"; /// `session.permissions.notifyPromptShown` pub const SESSION_PERMISSIONS_NOTIFYPROMPTSHOWN: &str = "session.permissions.notifyPromptShown"; /// `session.permissions.paths.list` @@ -489,23 +511,30 @@ pub mod rpc_methods { /// `session.permissions.paths.add` pub const SESSION_PERMISSIONS_PATHS_ADD: &str = "session.permissions.paths.add"; /// `session.permissions.paths.updatePrimary` - pub const SESSION_PERMISSIONS_PATHS_UPDATEPRIMARY: &str = "session.permissions.paths.updatePrimary"; + pub const SESSION_PERMISSIONS_PATHS_UPDATEPRIMARY: &str = + "session.permissions.paths.updatePrimary"; /// `session.permissions.paths.isPathWithinAllowedDirectories` - pub const SESSION_PERMISSIONS_PATHS_ISPATHWITHINALLOWEDDIRECTORIES: &str = "session.permissions.paths.isPathWithinAllowedDirectories"; + pub const SESSION_PERMISSIONS_PATHS_ISPATHWITHINALLOWEDDIRECTORIES: &str = + "session.permissions.paths.isPathWithinAllowedDirectories"; /// `session.permissions.paths.isPathWithinWorkspace` - pub const SESSION_PERMISSIONS_PATHS_ISPATHWITHINWORKSPACE: &str = "session.permissions.paths.isPathWithinWorkspace"; + pub const SESSION_PERMISSIONS_PATHS_ISPATHWITHINWORKSPACE: &str = + "session.permissions.paths.isPathWithinWorkspace"; /// `session.permissions.locations.resolve` pub const SESSION_PERMISSIONS_LOCATIONS_RESOLVE: &str = "session.permissions.locations.resolve"; /// `session.permissions.locations.apply` pub const SESSION_PERMISSIONS_LOCATIONS_APPLY: &str = "session.permissions.locations.apply"; /// `session.permissions.locations.addToolApproval` - pub const SESSION_PERMISSIONS_LOCATIONS_ADDTOOLAPPROVAL: &str = "session.permissions.locations.addToolApproval"; + pub const SESSION_PERMISSIONS_LOCATIONS_ADDTOOLAPPROVAL: &str = + "session.permissions.locations.addToolApproval"; /// `session.permissions.folderTrust.isTrusted` - pub const SESSION_PERMISSIONS_FOLDERTRUST_ISTRUSTED: &str = "session.permissions.folderTrust.isTrusted"; + pub const SESSION_PERMISSIONS_FOLDERTRUST_ISTRUSTED: &str = + "session.permissions.folderTrust.isTrusted"; /// `session.permissions.folderTrust.addTrusted` - pub const SESSION_PERMISSIONS_FOLDERTRUST_ADDTRUSTED: &str = "session.permissions.folderTrust.addTrusted"; + pub const SESSION_PERMISSIONS_FOLDERTRUST_ADDTRUSTED: &str = + "session.permissions.folderTrust.addTrusted"; /// `session.permissions.urls.setUnrestrictedMode` - pub const SESSION_PERMISSIONS_URLS_SETUNRESTRICTEDMODE: &str = "session.permissions.urls.setUnrestrictedMode"; + pub const SESSION_PERMISSIONS_URLS_SETUNRESTRICTEDMODE: &str = + "session.permissions.urls.setUnrestrictedMode"; /// `session.log` pub const SESSION_LOG: &str = "session.log"; /// `session.metadata.snapshot` @@ -517,15 +546,18 @@ pub mod rpc_methods { /// `session.metadata.contextInfo` pub const SESSION_METADATA_CONTEXTINFO: &str = "session.metadata.contextInfo"; /// `session.metadata.getContextAttribution` - pub const SESSION_METADATA_GETCONTEXTATTRIBUTION: &str = "session.metadata.getContextAttribution"; + pub const SESSION_METADATA_GETCONTEXTATTRIBUTION: &str = + "session.metadata.getContextAttribution"; /// `session.metadata.getContextHeaviestMessages` - pub const SESSION_METADATA_GETCONTEXTHEAVIESTMESSAGES: &str = "session.metadata.getContextHeaviestMessages"; + pub const SESSION_METADATA_GETCONTEXTHEAVIESTMESSAGES: &str = + "session.metadata.getContextHeaviestMessages"; /// `session.metadata.recordContextChange` pub const SESSION_METADATA_RECORDCONTEXTCHANGE: &str = "session.metadata.recordContextChange"; /// `session.metadata.setWorkingDirectory` pub const SESSION_METADATA_SETWORKINGDIRECTORY: &str = "session.metadata.setWorkingDirectory"; /// `session.metadata.recomputeContextTokens` - pub const SESSION_METADATA_RECOMPUTECONTEXTTOKENS: &str = "session.metadata.recomputeContextTokens"; + pub const SESSION_METADATA_RECOMPUTECONTEXTTOKENS: &str = + "session.metadata.recomputeContextTokens"; /// `session.settings.snapshot` pub const SESSION_SETTINGS_SNAPSHOT: &str = "session.settings.snapshot"; /// `session.settings.evaluatePredicate` @@ -551,7 +583,8 @@ pub mod rpc_methods { /// `session.history.rewind` pub const SESSION_HISTORY_REWIND: &str = "session.history.rewind"; /// `session.history.cancelBackgroundCompaction` - pub const SESSION_HISTORY_CANCELBACKGROUNDCOMPACTION: &str = "session.history.cancelBackgroundCompaction"; + pub const SESSION_HISTORY_CANCELBACKGROUNDCOMPACTION: &str = + "session.history.cancelBackgroundCompaction"; /// `session.history.abortManualCompaction` pub const SESSION_HISTORY_ABORTMANUALCOMPACTION: &str = "session.history.abortManualCompaction"; /// `session.history.summarizeForHandoff` @@ -587,7 +620,8 @@ pub mod rpc_methods { /// `session.queue.clear` pub const SESSION_QUEUE_CLEAR: &str = "session.queue.clear"; /// `session.queue.consumeSystemNotifications` - pub const SESSION_QUEUE_CONSUMESYSTEMNOTIFICATIONS: &str = "session.queue.consumeSystemNotifications"; + pub const SESSION_QUEUE_CONSUMESYSTEMNOTIFICATIONS: &str = + "session.queue.consumeSystemNotifications"; /// `session.queue.enqueueResumePending` pub const SESSION_QUEUE_ENQUEUERESUMEPENDING: &str = "session.queue.enqueueResumePending"; /// `session.queue.process` @@ -1392,7 +1426,10 @@ pub struct CopilotUserResponseQuotaSnapshotsChat { #[serde(rename = "timestamp_utc", skip_serializing_if = "Option::is_none")] pub timestamp_utc: Option, /// Whether this category uses usage-based (token/AI-credit) billing rather than a fixed premium-request count. - #[serde(rename = "token_based_billing", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "token_based_billing", + skip_serializing_if = "Option::is_none" + )] pub token_based_billing: Option, /// Whether the entitlement for this category is unlimited. #[serde(skip_serializing_if = "Option::is_none")] @@ -1441,7 +1478,10 @@ pub struct CopilotUserResponseQuotaSnapshotsCompletions { #[serde(rename = "timestamp_utc", skip_serializing_if = "Option::is_none")] pub timestamp_utc: Option, /// Whether this category uses usage-based (token/AI-credit) billing rather than a fixed premium-request count. - #[serde(rename = "token_based_billing", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "token_based_billing", + skip_serializing_if = "Option::is_none" + )] pub token_based_billing: Option, /// Whether the entitlement for this category is unlimited. #[serde(skip_serializing_if = "Option::is_none")] @@ -1490,7 +1530,10 @@ pub struct CopilotUserResponseQuotaSnapshotsPremiumInteractions { #[serde(rename = "timestamp_utc", skip_serializing_if = "Option::is_none")] pub timestamp_utc: Option, /// Whether this category uses usage-based (token/AI-credit) billing rather than a fixed premium-request count. - #[serde(rename = "token_based_billing", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "token_based_billing", + skip_serializing_if = "Option::is_none" + )] pub token_based_billing: Option, /// Whether the entitlement for this category is unlimited. #[serde(skip_serializing_if = "Option::is_none")] @@ -1515,7 +1558,10 @@ pub struct CopilotUserResponseQuotaSnapshots { #[serde(skip_serializing_if = "Option::is_none")] pub completions: Option, /// Premium-interactions quota snapshot from the raw Copilot user-response passthrough, with entitlement, overage, remaining quota, reset, and billing fields. - #[serde(rename = "premium_interactions", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "premium_interactions", + skip_serializing_if = "Option::is_none" + )] pub premium_interactions: Option, } @@ -1534,13 +1580,19 @@ pub struct CopilotUserResponse { #[serde(rename = "access_type_sku", skip_serializing_if = "Option::is_none")] pub access_type_sku: Option, /// Opaque analytics tracking identifier for the user, forwarded from the Copilot API. - #[serde(rename = "analytics_tracking_id", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "analytics_tracking_id", + skip_serializing_if = "Option::is_none" + )] pub analytics_tracking_id: Option, /// Date the Copilot seat was assigned to the user, if applicable. #[serde(rename = "assigned_date", skip_serializing_if = "Option::is_none")] pub assigned_date: Option, /// Whether the user is eligible to sign up for the free/limited Copilot tier. - #[serde(rename = "can_signup_for_limited", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "can_signup_for_limited", + skip_serializing_if = "Option::is_none" + )] pub can_signup_for_limited: Option, /// Whether the user is able to upgrade their Copilot plan. #[serde(rename = "can_upgrade_plan", skip_serializing_if = "Option::is_none")] @@ -1549,19 +1601,31 @@ pub struct CopilotUserResponse { #[serde(rename = "chat_enabled", skip_serializing_if = "Option::is_none")] pub chat_enabled: Option, /// Whether CLI remote control is enabled for the user. - #[serde(rename = "cli_remote_control_enabled", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "cli_remote_control_enabled", + skip_serializing_if = "Option::is_none" + )] pub cli_remote_control_enabled: Option, /// Whether cloud session storage is enabled for the user. - #[serde(rename = "cloud_session_storage_enabled", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "cloud_session_storage_enabled", + skip_serializing_if = "Option::is_none" + )] pub cloud_session_storage_enabled: Option, /// Whether the Codex agent is enabled for the user. - #[serde(rename = "codex_agent_enabled", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "codex_agent_enabled", + skip_serializing_if = "Option::is_none" + )] pub codex_agent_enabled: Option, /// Copilot plan name for the user (e.g. `individual`, `business`, `enterprise`). #[serde(rename = "copilot_plan", skip_serializing_if = "Option::is_none")] pub copilot_plan: Option, /// Whether `.copilotignore` content-exclusion support is enabled for the user. - #[serde(rename = "copilotignore_enabled", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "copilotignore_enabled", + skip_serializing_if = "Option::is_none" + )] pub copilotignore_enabled: Option, /// Endpoint URLs from the raw Copilot `/copilot_internal/v2/token` user-response passthrough. #[serde(skip_serializing_if = "Option::is_none")] @@ -1573,10 +1637,16 @@ pub struct CopilotUserResponse { #[serde(rename = "is_staff", skip_serializing_if = "Option::is_none")] pub is_staff: Option, /// Per-category quota allotments for free/limited-tier users, keyed by quota category. - #[serde(rename = "limited_user_quotas", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "limited_user_quotas", + skip_serializing_if = "Option::is_none" + )] pub limited_user_quotas: Option>, /// Date the free/limited-tier user's quotas next reset, as a raw string from the Copilot API. - #[serde(rename = "limited_user_reset_date", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "limited_user_reset_date", + skip_serializing_if = "Option::is_none" + )] pub limited_user_reset_date: Option, /// GitHub login of the authenticated user. #[serde(skip_serializing_if = "Option::is_none")] @@ -1588,25 +1658,37 @@ pub struct CopilotUserResponse { #[serde(rename = "organization_list", skip_serializing_if = "Option::is_none")] pub organization_list: Option, /// Logins of the organizations the user belongs to. - #[serde(rename = "organization_login_list", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "organization_login_list", + skip_serializing_if = "Option::is_none" + )] pub organization_login_list: Option>, /// Date the user's usage quota next resets, as a raw string from the Copilot API; see `quota_reset_date_utc` for the UTC-normalized value. #[serde(rename = "quota_reset_date", skip_serializing_if = "Option::is_none")] pub quota_reset_date: Option, /// UTC-normalized form of `quota_reset_date` (the date the user's usage quota next resets). - #[serde(rename = "quota_reset_date_utc", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "quota_reset_date_utc", + skip_serializing_if = "Option::is_none" + )] pub quota_reset_date_utc: Option, /// Quota snapshot map from the raw Copilot user-response passthrough, with chat, completions, premium-interactions, and other entries. #[serde(rename = "quota_snapshots", skip_serializing_if = "Option::is_none")] pub quota_snapshots: Option, /// Whether the user's telemetry is subject to restricted-data handling. - #[serde(rename = "restricted_telemetry", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "restricted_telemetry", + skip_serializing_if = "Option::is_none" + )] pub restricted_telemetry: Option, /// Raw passthrough of the Copilot API `te` flag for the user (an opaque server-side eligibility signal surfaced in telemetry); not otherwise interpreted by the runtime. #[serde(skip_serializing_if = "Option::is_none")] pub te: Option, /// Whether the account is on usage-based (token/AI-credit) billing rather than a fixed premium-request quota. - #[serde(rename = "token_based_billing", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "token_based_billing", + skip_serializing_if = "Option::is_none" + )] pub token_based_billing: Option, } @@ -3812,8 +3894,7 @@ pub struct FactoryAbortRequest { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct FactoryAckResult { -} +pub struct FactoryAckResult {} /// Options for one factory-scoped subagent call. /// @@ -4105,8 +4186,7 @@ pub struct FactoryJournalPutRequest { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct FactoryListRunsRequest { -} +pub struct FactoryListRunsRequest {} /// Durable factory resource consumption. /// @@ -4627,13 +4707,19 @@ pub struct GitHubTelemetryEvent { #[serde(skip_serializing_if = "Option::is_none")] pub client: Option, /// Copilot tracking ID for user-level attribution. - #[serde(rename = "copilot_tracking_id", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "copilot_tracking_id", + skip_serializing_if = "Option::is_none" + )] pub copilot_tracking_id: Option, /// Timestamp when the event was created (ISO 8601 format). #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] pub created_at: Option, /// Experiment assignment context. - #[serde(rename = "exp_assignment_context", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "exp_assignment_context", + skip_serializing_if = "Option::is_none" + )] pub exp_assignment_context: Option, /// Feature flags enabled for this session, as a map from flag to value. #[serde(skip_serializing_if = "Option::is_none")] @@ -5378,8 +5464,7 @@ pub struct LlmInferenceHttpRequestChunkRequest { /// Acknowledgement. The SDK is free to ignore the ack and treat chunk delivery as fire-and-forget. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct LlmInferenceHttpRequestChunkResult { -} +pub struct LlmInferenceHttpRequestChunkResult {} /// The head of an outbound model-layer HTTP request. #[derive(Debug, Clone, Default, Serialize, Deserialize)] @@ -5415,8 +5500,7 @@ pub struct LlmInferenceHttpRequestStartRequest { /// Acknowledgement. Returning successfully simply means the SDK accepted the start frame; it does not imply the request will succeed. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct LlmInferenceHttpRequestStartResult { -} +pub struct LlmInferenceHttpRequestStartResult {} /// Set to terminate the response with a transport-level failure. Implies end-of-stream; any further chunks for this requestId are ignored. /// @@ -6324,8 +6408,7 @@ pub struct McpEnableRequest { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct McpExecuteSamplingRequest { -} +pub struct McpExecuteSamplingRequest {} /// Identifiers and raw MCP CreateMessageRequest params used to run a sampling inference. /// @@ -7602,8 +7685,7 @@ pub struct MetadataRecordContextChangeRequest { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct MetadataRecordContextChangeResult { -} +pub struct MetadataRecordContextChangeResult {} /// Absolute path to set as the session's new working directory. For local sessions the path must be absolute and exist on disk: it is validated before any session state changes, and a failing validation rejects the call with nothing mutated, persisted, or emitted. Remote sessions record the path as-is. /// @@ -7844,7 +7926,10 @@ pub struct ModelCapabilitiesLimitsVision { #[serde(rename_all = "camelCase")] pub struct ModelCapabilitiesLimits { /// Maximum total context window size in tokens - #[serde(rename = "max_context_window_tokens", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "max_context_window_tokens", + skip_serializing_if = "Option::is_none" + )] pub max_context_window_tokens: Option, /// Maximum number of output/completion tokens #[serde(rename = "max_output_tokens", skip_serializing_if = "Option::is_none")] @@ -7965,13 +8050,19 @@ pub struct Model { #[serde(rename_all = "camelCase")] pub struct ModelCapabilitiesOverrideLimitsVision { /// Maximum image size in bytes - #[serde(rename = "max_prompt_image_size", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "max_prompt_image_size", + skip_serializing_if = "Option::is_none" + )] pub max_prompt_image_size: Option, /// Maximum number of images per prompt #[serde(rename = "max_prompt_images", skip_serializing_if = "Option::is_none")] pub max_prompt_images: Option, /// MIME types the model accepts - #[serde(rename = "supported_media_types", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "supported_media_types", + skip_serializing_if = "Option::is_none" + )] pub supported_media_types: Option>, } @@ -7987,7 +8078,10 @@ pub struct ModelCapabilitiesOverrideLimitsVision { #[serde(rename_all = "camelCase")] pub struct ModelCapabilitiesOverrideLimits { /// Maximum total context window size in tokens - #[serde(rename = "max_context_window_tokens", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "max_context_window_tokens", + skip_serializing_if = "Option::is_none" + )] pub max_context_window_tokens: Option, /// Maximum number of output/completion tokens #[serde(rename = "max_output_tokens", skip_serializing_if = "Option::is_none")] @@ -9477,7 +9571,8 @@ pub struct PermissionUrlsConfig { pub struct PermissionsConfigureParams { /// If specified, replaces the host-supplied GitHub Content Exclusion policies on the session (combined with natively-discovered policies when evaluating tool/file access). Omit to leave the current policies unchanged. #[serde(skip_serializing_if = "Option::is_none")] - pub additional_content_exclusion_policies: Option>, + pub additional_content_exclusion_policies: + Option>, /// If specified, sets whether path/URL read permission requests are auto-approved. Omit to leave the current value unchanged. #[serde(skip_serializing_if = "Option::is_none")] pub approve_all_read_permission_requests: Option, @@ -9535,8 +9630,7 @@ pub struct PermissionsFolderTrustAddTrustedResult { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct PermissionsGetAllowAllRequest { -} +pub struct PermissionsGetAllowAllRequest {} /// Indicates whether the operation succeeded. /// @@ -9632,8 +9726,7 @@ pub struct PermissionsPathsAddResult { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct PermissionsPathsListRequest { -} +pub struct PermissionsPathsListRequest {} /// Indicates whether the operation succeeded. /// @@ -9660,8 +9753,7 @@ pub struct PermissionsPathsUpdatePrimaryResult { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct PermissionsPendingRequestsRequest { -} +pub struct PermissionsPendingRequestsRequest {} /// Clears session-scoped tool permission approvals, and optionally the location-scoped ones. /// @@ -11754,8 +11846,7 @@ pub struct RemoteNotifySteerableChangedRequest { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct RemoteNotifySteerableChangedResult { -} +pub struct RemoteNotifySteerableChangedResult {} /// Remote session connection result. /// @@ -13708,7 +13799,8 @@ pub struct SessionOpenOptions { /// /// #[serde(skip_serializing_if = "Option::is_none")] - pub additional_content_exclusion_policies: Option>, + pub additional_content_exclusion_policies: + Option>, /// Additional directories the agent may access beyond the working directory. Each entry is granted to the session's file-access allow-list and surfaced to the model (system prompt context and `@`-mention completion). Absolute paths are recommended; a relative path is resolved against the session's working directory. Nonexistent or unresolvable entries are skipped with a warning. This is applied on both session creation and resume, and is not persisted: a resumed session that omits this option does not retain previously supplied directories (re-supply them, exactly as the CLI re-passes `--add-dir`). #[serde(skip_serializing_if = "Option::is_none")] pub additional_directories: Option>, @@ -14244,8 +14336,7 @@ pub struct SessionsCloseRequest { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionsCloseResult { -} +pub struct SessionsCloseResult {} /// Session ID to delete from disk. /// @@ -14908,8 +14999,7 @@ pub struct SessionsReleaseLockRequest { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionsReleaseLockResult { -} +pub struct SessionsReleaseLockResult {} /// Active session ID and an optional flag for deferring repo-level hooks until folder trust. /// @@ -14939,8 +15029,7 @@ pub struct SessionsReloadPluginHooksRequest { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionsReloadPluginHooksResult { -} +pub struct SessionsReloadPluginHooksResult {} /// Session ID whose pending events should be flushed to disk. /// @@ -14967,8 +15056,7 @@ pub struct SessionsSaveRequest { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionsSaveResult { -} +pub struct SessionsSaveResult {} /// Manager-wide additional plugins to register; replaces any previously-configured set. /// @@ -14995,8 +15083,7 @@ pub struct SessionsSetAdditionalPluginsRequest { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionsSetAdditionalPluginsResult { -} +pub struct SessionsSetAdditionalPluginsResult {} /// Patch for the singleton's steering state. /// @@ -15103,7 +15190,8 @@ pub struct SessionUpdateOptionsParams { /// /// #[serde(skip_serializing_if = "Option::is_none")] - pub additional_content_exclusion_policies: Option>, + pub additional_content_exclusion_policies: + Option>, /// Runtime context discriminator (e.g., `cli`, `actions`). #[serde(skip_serializing_if = "Option::is_none")] pub agent_context: Option, @@ -16114,8 +16202,7 @@ pub struct TasksPromoteToBackgroundResult { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct TasksRefreshResult { -} +pub struct TasksRefreshResult {} /// Identifier of the completed or cancelled task to remove from tracking. /// @@ -16235,8 +16322,7 @@ pub struct TasksStartAgentResult { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct TasksWaitForPendingResult { -} +pub struct TasksWaitForPendingResult {} /// Feature override key/value pairs to attach to subsequent telemetry events from this session. /// @@ -16341,8 +16427,7 @@ pub struct ToolsGetCurrentMetadataResult { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct ToolsInitializeAndValidateResult { -} +pub struct ToolsInitializeAndValidateResult {} /// Optional model identifier whose tool overrides should be applied to the listing. /// @@ -16370,8 +16455,7 @@ pub struct ToolsListRequest { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct ToolsUpdateSubagentSettingsResult { -} +pub struct ToolsUpdateSubagentSettingsResult {} /// Selectable option for a UI elicitation multi-select array item, with submitted value and display label. /// @@ -16856,8 +16940,7 @@ pub struct UIHandlePendingResult { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct UIHandlePendingSamplingResponse { -} +pub struct UIHandlePendingSamplingResponse {} /// Request ID of a pending `sampling.requested` event and an optional sampling result payload (omit to reject). /// @@ -17542,7 +17625,10 @@ pub struct WorkspacesEnsureRequest { pub struct WorkspacesGetWorkspaceResultWorkspace { #[serde(skip_serializing_if = "Option::is_none")] pub branch: Option, - #[serde(rename = "chronicle_sync_dismissed", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "chronicle_sync_dismissed", + skip_serializing_if = "Option::is_none" + )] pub chronicle_sync_dismissed: Option, #[serde(rename = "client_name", skip_serializing_if = "Option::is_none")] pub client_name: Option, @@ -18911,8 +18997,7 @@ pub struct SessionFactoryCancelResult { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionFactoryLogResult { -} +pub struct SessionFactoryLogResult {} /// Result of one factory-scoped subagent call. /// @@ -18958,8 +19043,7 @@ pub struct SessionFactoryJournalGetResult { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionFactoryJournalPutResult { -} +pub struct SessionFactoryJournalPutResult {} /// Identifies the target session. /// @@ -19244,7 +19328,10 @@ pub struct SessionWorkspacesGetWorkspaceParams { pub struct SessionWorkspacesGetWorkspaceResultWorkspace { #[serde(skip_serializing_if = "Option::is_none")] pub branch: Option, - #[serde(rename = "chronicle_sync_dismissed", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "chronicle_sync_dismissed", + skip_serializing_if = "Option::is_none" + )] pub chronicle_sync_dismissed: Option, #[serde(rename = "client_name", skip_serializing_if = "Option::is_none")] pub client_name: Option, @@ -19301,7 +19388,10 @@ pub struct SessionWorkspacesGetWorkspaceResult { pub struct SessionWorkspacesUpdateMetadataResultWorkspace { #[serde(skip_serializing_if = "Option::is_none")] pub branch: Option, - #[serde(rename = "chronicle_sync_dismissed", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "chronicle_sync_dismissed", + skip_serializing_if = "Option::is_none" + )] pub chronicle_sync_dismissed: Option, #[serde(rename = "client_name", skip_serializing_if = "Option::is_none")] pub client_name: Option, @@ -19358,7 +19448,10 @@ pub struct SessionWorkspacesUpdateMetadataResult { pub struct SessionWorkspacesEnsureResultWorkspace { #[serde(skip_serializing_if = "Option::is_none")] pub branch: Option, - #[serde(rename = "chronicle_sync_dismissed", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "chronicle_sync_dismissed", + skip_serializing_if = "Option::is_none" + )] pub chronicle_sync_dismissed: Option, #[serde(rename = "client_name", skip_serializing_if = "Option::is_none")] pub client_name: Option, @@ -19522,7 +19615,10 @@ pub struct SessionWorkspacesAddSummaryResult { pub struct SessionWorkspacesTruncateSummariesResultWorkspace { #[serde(skip_serializing_if = "Option::is_none")] pub branch: Option, - #[serde(rename = "chronicle_sync_dismissed", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "chronicle_sync_dismissed", + skip_serializing_if = "Option::is_none" + )] pub chronicle_sync_dismissed: Option, #[serde(rename = "client_name", skip_serializing_if = "Option::is_none")] pub client_name: Option, @@ -19997,8 +20093,7 @@ pub struct SessionTasksRefreshParams { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionTasksRefreshResult { -} +pub struct SessionTasksRefreshResult {} /// Identifies the target session. /// @@ -20025,8 +20120,7 @@ pub struct SessionTasksWaitForPendingParams { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionTasksWaitForPendingResult { -} +pub struct SessionTasksWaitForPendingResult {} /// Progress information for the task, or null when no task with that ID is tracked. /// @@ -20835,8 +20929,7 @@ pub struct SessionToolsInitializeAndValidateParams { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionToolsInitializeAndValidateResult { -} +pub struct SessionToolsInitializeAndValidateResult {} /// Identifies the target session. /// @@ -20878,8 +20971,7 @@ pub struct SessionToolsGetCurrentMetadataResult { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionToolsUpdateSubagentSettingsResult { -} +pub struct SessionToolsUpdateSubagentSettingsResult {} /// Slash commands available in the session, after applying any include/exclude filters. /// @@ -21805,8 +21897,7 @@ pub struct SessionMetadataGetContextHeaviestMessagesResult { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionMetadataRecordContextChangeResult { -} +pub struct SessionMetadataRecordContextChangeResult {} /// Update the session's working directory. Used by the host when the user explicitly changes cwd (e.g., the `/cd` slash command). The host is responsible for any related side-effects (file index, etc.); it does NOT change the process working directory (a session's cwd is per-session, not process-global). For local sessions the runtime validates the target first (an absolute path that exists on disk) and re-bases the permission primary directory; a rejected validation fails the call before anything is mutated, persisted, or emitted. Location-scoped permission rules are then re-keyed to the new directory (best-effort). Remote sessions only record the path. /// @@ -22692,8 +22783,7 @@ pub struct SessionRemoteDisableParams { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionRemoteNotifySteerableChangedResult { -} +pub struct SessionRemoteNotifySteerableChangedResult {} /// Identifies the target session. /// @@ -22963,8 +23053,7 @@ pub struct ProviderTokenGetTokenResult { /// #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct FactoryAbortResult { -} +pub struct FactoryAbortResult {} /// Identifies the target session. /// @@ -25642,7 +25731,9 @@ pub enum PermissionDecisionApproveForLocationApproval { Memory(PermissionDecisionApproveForLocationApprovalMemory), CustomTool(PermissionDecisionApproveForLocationApprovalCustomTool), ExtensionManagement(PermissionDecisionApproveForLocationApprovalExtensionManagement), - ExtensionPermissionAccess(PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess), + ExtensionPermissionAccess( + PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess, + ), } /// Approve and persist for this project location @@ -25771,7 +25862,9 @@ pub enum PermissionDecision { ApprovedForLocation(PermissionDecisionApprovedForLocation), Cancelled(PermissionDecisionCancelled), DeniedByRules(PermissionDecisionDeniedByRules), - DeniedNoApprovalRuleAndCouldNotRequestFromUser(PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser), + DeniedNoApprovalRuleAndCouldNotRequestFromUser( + PermissionDecisionDeniedNoApprovalRuleAndCouldNotRequestFromUser, + ), DeniedInteractivelyByUser(PermissionDecisionDeniedInteractivelyByUser), DeniedByContentExclusionPolicy(PermissionDecisionDeniedByContentExclusionPolicy), DeniedByPermissionRequestHook(PermissionDecisionDeniedByPermissionRequestHook), diff --git a/rust/src/generated/rpc.rs b/rust/src/generated/rpc.rs index 15204f8f7e..e9bbef1d1a 100644 --- a/rust/src/generated/rpc.rs +++ b/rust/src/generated/rpc.rs @@ -11,7 +11,7 @@ #![allow(dead_code)] use super::api_types::{rpc_methods, *}; -use super::session_events::{SessionMode}; +use super::session_events::SessionMode; use crate::session::Session; use crate::{Client, Error}; @@ -24,82 +24,114 @@ pub struct ClientRpc<'a> { impl<'a> ClientRpc<'a> { /// `account.*` sub-namespace. pub fn account(&self) -> ClientRpcAccount<'a> { - ClientRpcAccount { client: self.client } + ClientRpcAccount { + client: self.client, + } } /// `agentRegistry.*` sub-namespace. pub fn agent_registry(&self) -> ClientRpcAgentRegistry<'a> { - ClientRpcAgentRegistry { client: self.client } + ClientRpcAgentRegistry { + client: self.client, + } } /// `agents.*` sub-namespace. pub fn agents(&self) -> ClientRpcAgents<'a> { - ClientRpcAgents { client: self.client } + ClientRpcAgents { + client: self.client, + } } /// `commands.*` sub-namespace. pub fn commands(&self) -> ClientRpcCommands<'a> { - ClientRpcCommands { client: self.client } + ClientRpcCommands { + client: self.client, + } } /// `instructions.*` sub-namespace. pub fn instructions(&self) -> ClientRpcInstructions<'a> { - ClientRpcInstructions { client: self.client } + ClientRpcInstructions { + client: self.client, + } } /// `llmInference.*` sub-namespace. pub fn llm_inference(&self) -> ClientRpcLlmInference<'a> { - ClientRpcLlmInference { client: self.client } + ClientRpcLlmInference { + client: self.client, + } } /// `mcp.*` sub-namespace. pub fn mcp(&self) -> ClientRpcMcp<'a> { - ClientRpcMcp { client: self.client } + ClientRpcMcp { + client: self.client, + } } /// `models.*` sub-namespace. pub fn models(&self) -> ClientRpcModels<'a> { - ClientRpcModels { client: self.client } + ClientRpcModels { + client: self.client, + } } /// `plugins.*` sub-namespace. pub fn plugins(&self) -> ClientRpcPlugins<'a> { - ClientRpcPlugins { client: self.client } + ClientRpcPlugins { + client: self.client, + } } /// `runtime.*` sub-namespace. pub fn runtime(&self) -> ClientRpcRuntime<'a> { - ClientRpcRuntime { client: self.client } + ClientRpcRuntime { + client: self.client, + } } /// `secrets.*` sub-namespace. pub fn secrets(&self) -> ClientRpcSecrets<'a> { - ClientRpcSecrets { client: self.client } + ClientRpcSecrets { + client: self.client, + } } /// `sessionFs.*` sub-namespace. pub fn session_fs(&self) -> ClientRpcSessionFs<'a> { - ClientRpcSessionFs { client: self.client } + ClientRpcSessionFs { + client: self.client, + } } /// `sessions.*` sub-namespace. pub fn sessions(&self) -> ClientRpcSessions<'a> { - ClientRpcSessions { client: self.client } + ClientRpcSessions { + client: self.client, + } } /// `skills.*` sub-namespace. pub fn skills(&self) -> ClientRpcSkills<'a> { - ClientRpcSkills { client: self.client } + ClientRpcSkills { + client: self.client, + } } /// `tools.*` sub-namespace. pub fn tools(&self) -> ClientRpcTools<'a> { - ClientRpcTools { client: self.client } + ClientRpcTools { + client: self.client, + } } /// `user.*` sub-namespace. pub fn user(&self) -> ClientRpcUser<'a> { - ClientRpcUser { client: self.client } + ClientRpcUser { + client: self.client, + } } /// Checks server responsiveness and returns protocol information. @@ -123,7 +155,10 @@ impl<'a> ClientRpc<'a> { /// pub async fn ping(&self, params: PingRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::PING, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::PING, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -148,10 +183,12 @@ impl<'a> ClientRpc<'a> { /// pub(crate) async fn connect(&self, params: ConnectRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::CONNECT, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::CONNECT, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `account.*` RPCs. @@ -178,7 +215,10 @@ impl<'a> ClientRpcAccount<'a> { /// pub async fn get_quota(&self) -> Result { let wire_params = serde_json::json!({}); - let _value = self.client.call(rpc_methods::ACCOUNT_GETQUOTA, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::ACCOUNT_GETQUOTA, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -201,9 +241,15 @@ impl<'a> ClientRpcAccount<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn get_quota_with_params(&self, params: AccountGetQuotaRequest) -> Result { + pub async fn get_quota_with_params( + &self, + params: AccountGetQuotaRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::ACCOUNT_GETQUOTA, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::ACCOUNT_GETQUOTA, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -224,7 +270,10 @@ impl<'a> ClientRpcAccount<'a> { /// pub async fn get_current_auth(&self) -> Result { let wire_params = serde_json::json!({}); - let _value = self.client.call(rpc_methods::ACCOUNT_GETCURRENTAUTH, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::ACCOUNT_GETCURRENTAUTH, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -245,7 +294,10 @@ impl<'a> ClientRpcAccount<'a> { /// pub async fn get_all_users(&self) -> Result { let wire_params = serde_json::json!({}); - let _value = self.client.call(rpc_methods::ACCOUNT_GETALLUSERS, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::ACCOUNT_GETALLUSERS, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -270,7 +322,10 @@ impl<'a> ClientRpcAccount<'a> { /// pub async fn login(&self, params: AccountLoginRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::ACCOUNT_LOGIN, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::ACCOUNT_LOGIN, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -295,10 +350,12 @@ impl<'a> ClientRpcAccount<'a> { /// pub async fn logout(&self, params: AccountLogoutRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::ACCOUNT_LOGOUT, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::ACCOUNT_LOGOUT, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `agentRegistry.*` RPCs. @@ -327,12 +384,17 @@ impl<'a> ClientRpcAgentRegistry<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn spawn(&self, params: AgentRegistrySpawnRequest) -> Result { + pub async fn spawn( + &self, + params: AgentRegistrySpawnRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::AGENTREGISTRY_SPAWN, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::AGENTREGISTRY_SPAWN, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `agents.*` RPCs. @@ -363,7 +425,10 @@ impl<'a> ClientRpcAgents<'a> { /// pub async fn discover(&self, params: AgentsDiscoverRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::AGENTS_DISCOVER, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::AGENTS_DISCOVER, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -386,12 +451,17 @@ impl<'a> ClientRpcAgents<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn get_discovery_paths(&self, params: AgentsGetDiscoveryPathsRequest) -> Result { + pub async fn get_discovery_paths( + &self, + params: AgentsGetDiscoveryPathsRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::AGENTS_GETDISCOVERYPATHS, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::AGENTS_GETDISCOVERYPATHS, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `commands.*` RPCs. @@ -418,10 +488,12 @@ impl<'a> ClientRpcCommands<'a> { /// pub async fn list(&self) -> Result { let wire_params = serde_json::json!({}); - let _value = self.client.call(rpc_methods::COMMANDS_LIST, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::COMMANDS_LIST, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `instructions.*` RPCs. @@ -450,9 +522,15 @@ impl<'a> ClientRpcInstructions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn discover(&self, params: InstructionsDiscoverRequest) -> Result { + pub async fn discover( + &self, + params: InstructionsDiscoverRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::INSTRUCTIONS_DISCOVER, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::INSTRUCTIONS_DISCOVER, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -475,12 +553,20 @@ impl<'a> ClientRpcInstructions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn get_discovery_paths(&self, params: InstructionsGetDiscoveryPathsRequest) -> Result { + pub async fn get_discovery_paths( + &self, + params: InstructionsGetDiscoveryPathsRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::INSTRUCTIONS_GETDISCOVERYPATHS, Some(wire_params)).await?; + let _value = self + .client + .call( + rpc_methods::INSTRUCTIONS_GETDISCOVERYPATHS, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `llmInference.*` RPCs. @@ -507,7 +593,10 @@ impl<'a> ClientRpcLlmInference<'a> { /// pub async fn set_provider(&self) -> Result { let wire_params = serde_json::json!({}); - let _value = self.client.call(rpc_methods::LLMINFERENCE_SETPROVIDER, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::LLMINFERENCE_SETPROVIDER, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -530,9 +619,18 @@ impl<'a> ClientRpcLlmInference<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn http_response_start(&self, params: LlmInferenceHttpResponseStartRequest) -> Result { + pub async fn http_response_start( + &self, + params: LlmInferenceHttpResponseStartRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::LLMINFERENCE_HTTPRESPONSESTART, Some(wire_params)).await?; + let _value = self + .client + .call( + rpc_methods::LLMINFERENCE_HTTPRESPONSESTART, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -555,12 +653,20 @@ impl<'a> ClientRpcLlmInference<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn http_response_chunk(&self, params: LlmInferenceHttpResponseChunkRequest) -> Result { + pub async fn http_response_chunk( + &self, + params: LlmInferenceHttpResponseChunkRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::LLMINFERENCE_HTTPRESPONSECHUNK, Some(wire_params)).await?; + let _value = self + .client + .call( + rpc_methods::LLMINFERENCE_HTTPRESPONSECHUNK, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `mcp.*` RPCs. @@ -572,7 +678,9 @@ pub struct ClientRpcMcp<'a> { impl<'a> ClientRpcMcp<'a> { /// `mcp.config.*` sub-namespace. pub fn config(&self) -> ClientRpcMcpConfig<'a> { - ClientRpcMcpConfig { client: self.client } + ClientRpcMcpConfig { + client: self.client, + } } /// Discovers MCP servers from user, workspace, plugin, and builtin sources. @@ -596,10 +704,12 @@ impl<'a> ClientRpcMcp<'a> { /// pub async fn discover(&self, params: McpDiscoverRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::MCP_DISCOVER, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::MCP_DISCOVER, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `mcp.config.*` RPCs. @@ -626,7 +736,10 @@ impl<'a> ClientRpcMcpConfig<'a> { /// pub async fn list(&self) -> Result { let wire_params = serde_json::json!({}); - let _value = self.client.call(rpc_methods::MCP_CONFIG_LIST, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::MCP_CONFIG_LIST, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -647,7 +760,10 @@ impl<'a> ClientRpcMcpConfig<'a> { /// pub async fn add(&self, params: McpConfigAddRequest) -> Result<(), Error> { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::MCP_CONFIG_ADD, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::MCP_CONFIG_ADD, Some(wire_params)) + .await?; Ok(()) } @@ -668,7 +784,10 @@ impl<'a> ClientRpcMcpConfig<'a> { /// pub async fn update(&self, params: McpConfigUpdateRequest) -> Result<(), Error> { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::MCP_CONFIG_UPDATE, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::MCP_CONFIG_UPDATE, Some(wire_params)) + .await?; Ok(()) } @@ -689,7 +808,10 @@ impl<'a> ClientRpcMcpConfig<'a> { /// pub async fn remove(&self, params: McpConfigRemoveRequest) -> Result<(), Error> { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::MCP_CONFIG_REMOVE, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::MCP_CONFIG_REMOVE, Some(wire_params)) + .await?; Ok(()) } @@ -710,7 +832,10 @@ impl<'a> ClientRpcMcpConfig<'a> { /// pub async fn enable(&self, params: McpConfigEnableRequest) -> Result<(), Error> { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::MCP_CONFIG_ENABLE, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::MCP_CONFIG_ENABLE, Some(wire_params)) + .await?; Ok(()) } @@ -731,7 +856,10 @@ impl<'a> ClientRpcMcpConfig<'a> { /// pub async fn disable(&self, params: McpConfigDisableRequest) -> Result<(), Error> { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::MCP_CONFIG_DISABLE, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::MCP_CONFIG_DISABLE, Some(wire_params)) + .await?; Ok(()) } @@ -748,10 +876,12 @@ impl<'a> ClientRpcMcpConfig<'a> { /// pub async fn reload(&self) -> Result<(), Error> { let wire_params = serde_json::json!({}); - let _value = self.client.call(rpc_methods::MCP_CONFIG_RELOAD, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::MCP_CONFIG_RELOAD, Some(wire_params)) + .await?; Ok(()) } - } /// `models.*` RPCs. @@ -778,7 +908,10 @@ impl<'a> ClientRpcModels<'a> { /// pub async fn list(&self) -> Result { let wire_params = serde_json::json!({}); - let _value = self.client.call(rpc_methods::MODELS_LIST, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::MODELS_LIST, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -803,7 +936,10 @@ impl<'a> ClientRpcModels<'a> { /// pub async fn list_with_params(&self, params: ModelsListRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::MODELS_LIST, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::MODELS_LIST, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -824,10 +960,12 @@ impl<'a> ClientRpcModels<'a> { /// pub async fn get_built_in_catalog(&self) -> Result { let wire_params = serde_json::json!({}); - let _value = self.client.call(rpc_methods::MODELS_GETBUILTINCATALOG, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::MODELS_GETBUILTINCATALOG, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `plugins.*` RPCs. @@ -839,7 +977,9 @@ pub struct ClientRpcPlugins<'a> { impl<'a> ClientRpcPlugins<'a> { /// `plugins.marketplaces.*` sub-namespace. pub fn marketplaces(&self) -> ClientRpcPluginsMarketplaces<'a> { - ClientRpcPluginsMarketplaces { client: self.client } + ClientRpcPluginsMarketplaces { + client: self.client, + } } /// Lists plugins installed in user/global state. @@ -859,7 +999,10 @@ impl<'a> ClientRpcPlugins<'a> { /// pub async fn list(&self) -> Result { let wire_params = serde_json::json!({}); - let _value = self.client.call(rpc_methods::PLUGINS_LIST, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::PLUGINS_LIST, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -882,9 +1025,15 @@ impl<'a> ClientRpcPlugins<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn install(&self, params: PluginsInstallRequest) -> Result { + pub async fn install( + &self, + params: PluginsInstallRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::PLUGINS_INSTALL, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::PLUGINS_INSTALL, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -905,7 +1054,10 @@ impl<'a> ClientRpcPlugins<'a> { /// pub async fn uninstall(&self, params: PluginsUninstallRequest) -> Result<(), Error> { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::PLUGINS_UNINSTALL, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::PLUGINS_UNINSTALL, Some(wire_params)) + .await?; Ok(()) } @@ -930,7 +1082,10 @@ impl<'a> ClientRpcPlugins<'a> { /// pub async fn update(&self, params: PluginsUpdateRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::PLUGINS_UPDATE, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::PLUGINS_UPDATE, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -951,7 +1106,10 @@ impl<'a> ClientRpcPlugins<'a> { /// pub async fn update_all(&self) -> Result { let wire_params = serde_json::json!({}); - let _value = self.client.call(rpc_methods::PLUGINS_UPDATEALL, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::PLUGINS_UPDATEALL, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -972,7 +1130,10 @@ impl<'a> ClientRpcPlugins<'a> { /// pub async fn enable(&self, params: PluginsEnableRequest) -> Result<(), Error> { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::PLUGINS_ENABLE, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::PLUGINS_ENABLE, Some(wire_params)) + .await?; Ok(()) } @@ -993,10 +1154,12 @@ impl<'a> ClientRpcPlugins<'a> { /// pub async fn disable(&self, params: PluginsDisableRequest) -> Result<(), Error> { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::PLUGINS_DISABLE, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::PLUGINS_DISABLE, Some(wire_params)) + .await?; Ok(()) } - } /// `plugins.marketplaces.*` RPCs. @@ -1023,7 +1186,10 @@ impl<'a> ClientRpcPluginsMarketplaces<'a> { /// pub async fn list(&self) -> Result { let wire_params = serde_json::json!({}); - let _value = self.client.call(rpc_methods::PLUGINS_MARKETPLACES_LIST, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::PLUGINS_MARKETPLACES_LIST, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -1046,9 +1212,15 @@ impl<'a> ClientRpcPluginsMarketplaces<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn add(&self, params: PluginsMarketplacesAddRequest) -> Result { + pub async fn add( + &self, + params: PluginsMarketplacesAddRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::PLUGINS_MARKETPLACES_ADD, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::PLUGINS_MARKETPLACES_ADD, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -1071,9 +1243,15 @@ impl<'a> ClientRpcPluginsMarketplaces<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn remove(&self, params: PluginsMarketplacesRemoveRequest) -> Result { + pub async fn remove( + &self, + params: PluginsMarketplacesRemoveRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::PLUGINS_MARKETPLACES_REMOVE, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::PLUGINS_MARKETPLACES_REMOVE, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -1096,9 +1274,15 @@ impl<'a> ClientRpcPluginsMarketplaces<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn browse(&self, params: PluginsMarketplacesBrowseRequest) -> Result { + pub async fn browse( + &self, + params: PluginsMarketplacesBrowseRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::PLUGINS_MARKETPLACES_BROWSE, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::PLUGINS_MARKETPLACES_BROWSE, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -1119,7 +1303,10 @@ impl<'a> ClientRpcPluginsMarketplaces<'a> { /// pub async fn refresh(&self) -> Result { let wire_params = serde_json::json!({}); - let _value = self.client.call(rpc_methods::PLUGINS_MARKETPLACES_REFRESH, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::PLUGINS_MARKETPLACES_REFRESH, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -1142,12 +1329,17 @@ impl<'a> ClientRpcPluginsMarketplaces<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn refresh_with_params(&self, params: PluginsMarketplacesRefreshRequest) -> Result { + pub async fn refresh_with_params( + &self, + params: PluginsMarketplacesRefreshRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::PLUGINS_MARKETPLACES_REFRESH, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::PLUGINS_MARKETPLACES_REFRESH, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `runtime.*` RPCs. @@ -1170,10 +1362,12 @@ impl<'a> ClientRpcRuntime<'a> { /// pub async fn shutdown(&self) -> Result<(), Error> { let wire_params = serde_json::json!({}); - let _value = self.client.call(rpc_methods::RUNTIME_SHUTDOWN, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::RUNTIME_SHUTDOWN, Some(wire_params)) + .await?; Ok(()) } - } /// `secrets.*` RPCs. @@ -1202,12 +1396,17 @@ impl<'a> ClientRpcSecrets<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn add_filter_values(&self, params: SecretsAddFilterValuesRequest) -> Result { + pub async fn add_filter_values( + &self, + params: SecretsAddFilterValuesRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::SECRETS_ADDFILTERVALUES, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::SECRETS_ADDFILTERVALUES, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `sessionFs.*` RPCs. @@ -1236,12 +1435,17 @@ impl<'a> ClientRpcSessionFs<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn set_provider(&self, params: SessionFsSetProviderRequest) -> Result { + pub async fn set_provider( + &self, + params: SessionFsSetProviderRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::SESSIONFS_SETPROVIDER, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::SESSIONFS_SETPROVIDER, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `sessions.*` RPCs. @@ -1268,7 +1472,10 @@ impl<'a> ClientRpcSessions<'a> { /// pub async fn open(&self) -> Result { let wire_params = serde_json::json!({}); - let _value = self.client.call(rpc_methods::SESSIONS_OPEN, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::SESSIONS_OPEN, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -1293,7 +1500,10 @@ impl<'a> ClientRpcSessions<'a> { /// pub async fn fork(&self, params: SessionsForkRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::SESSIONS_FORK, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::SESSIONS_FORK, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -1316,9 +1526,15 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn connect(&self, params: ConnectRemoteSessionParams) -> Result { + pub async fn connect( + &self, + params: ConnectRemoteSessionParams, + ) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::SESSIONS_CONNECT, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::SESSIONS_CONNECT, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -1339,7 +1555,10 @@ impl<'a> ClientRpcSessions<'a> { /// pub async fn list(&self) -> Result { let wire_params = serde_json::json!({}); - let _value = self.client.call(rpc_methods::SESSIONS_LIST, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::SESSIONS_LIST, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -1362,9 +1581,15 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn list_with_params(&self, params: SessionsListRequest) -> Result { + pub async fn list_with_params( + &self, + params: SessionsListRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::SESSIONS_LIST, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::SESSIONS_LIST, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -1387,9 +1612,15 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn get_metadata(&self, params: SessionsGetMetadataRequest) -> Result { + pub(crate) async fn get_metadata( + &self, + params: SessionsGetMetadataRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::SESSIONS_GETMETADATA, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::SESSIONS_GETMETADATA, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -1412,9 +1643,18 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn list_non_empty_session_ids(&self, params: SessionsListNonEmptySessionIdsRequest) -> Result { + pub(crate) async fn list_non_empty_session_ids( + &self, + params: SessionsListNonEmptySessionIdsRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::SESSIONS_LISTNONEMPTYSESSIONIDS, Some(wire_params)).await?; + let _value = self + .client + .call( + rpc_methods::SESSIONS_LISTNONEMPTYSESSIONIDS, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -1437,9 +1677,15 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn find_by_task_id(&self, params: SessionsFindByTaskIDRequest) -> Result { + pub async fn find_by_task_id( + &self, + params: SessionsFindByTaskIDRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::SESSIONS_FINDBYTASKID, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::SESSIONS_FINDBYTASKID, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -1462,9 +1708,15 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn find_by_prefix(&self, params: SessionsFindByPrefixRequest) -> Result { + pub async fn find_by_prefix( + &self, + params: SessionsFindByPrefixRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::SESSIONS_FINDBYPREFIX, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::SESSIONS_FINDBYPREFIX, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -1487,9 +1739,15 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn get_last_for_context(&self, params: SessionsGetLastForContextRequest) -> Result { + pub async fn get_last_for_context( + &self, + params: SessionsGetLastForContextRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::SESSIONS_GETLASTFORCONTEXT, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::SESSIONS_GETLASTFORCONTEXT, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -1512,9 +1770,15 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn get_event_file_path(&self, params: SessionsGetEventFilePathRequest) -> Result { + pub(crate) async fn get_event_file_path( + &self, + params: SessionsGetEventFilePathRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::SESSIONS_GETEVENTFILEPATH, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::SESSIONS_GETEVENTFILEPATH, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -1535,7 +1799,10 @@ impl<'a> ClientRpcSessions<'a> { /// pub async fn get_sizes(&self) -> Result { let wire_params = serde_json::json!({}); - let _value = self.client.call(rpc_methods::SESSIONS_GETSIZES, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::SESSIONS_GETSIZES, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -1558,9 +1825,15 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn check_in_use(&self, params: SessionsCheckInUseRequest) -> Result { + pub async fn check_in_use( + &self, + params: SessionsCheckInUseRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::SESSIONS_CHECKINUSE, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::SESSIONS_CHECKINUSE, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -1583,9 +1856,18 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn get_persisted_remote_steerable(&self, params: SessionsGetPersistedRemoteSteerableRequest) -> Result { + pub(crate) async fn get_persisted_remote_steerable( + &self, + params: SessionsGetPersistedRemoteSteerableRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::SESSIONS_GETPERSISTEDREMOTESTEERABLE, Some(wire_params)).await?; + let _value = self + .client + .call( + rpc_methods::SESSIONS_GETPERSISTEDREMOTESTEERABLE, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -1610,7 +1892,10 @@ impl<'a> ClientRpcSessions<'a> { /// pub async fn close(&self, params: SessionsCloseRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::SESSIONS_CLOSE, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::SESSIONS_CLOSE, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -1633,9 +1918,15 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn bulk_delete(&self, params: SessionsBulkDeleteRequest) -> Result { + pub async fn bulk_delete( + &self, + params: SessionsBulkDeleteRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::SESSIONS_BULKDELETE, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::SESSIONS_BULKDELETE, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -1656,7 +1947,10 @@ impl<'a> ClientRpcSessions<'a> { /// pub(crate) async fn delete(&self, params: SessionsDeleteRequest) -> Result<(), Error> { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::SESSIONS_DELETE, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::SESSIONS_DELETE, Some(wire_params)) + .await?; Ok(()) } @@ -1679,9 +1973,15 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn prune_old(&self, params: SessionsPruneOldRequest) -> Result { + pub async fn prune_old( + &self, + params: SessionsPruneOldRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::SESSIONS_PRUNEOLD, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::SESSIONS_PRUNEOLD, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -1706,7 +2006,10 @@ impl<'a> ClientRpcSessions<'a> { /// pub async fn save(&self, params: SessionsSaveRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::SESSIONS_SAVE, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::SESSIONS_SAVE, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -1729,9 +2032,15 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn release_lock(&self, params: SessionsReleaseLockRequest) -> Result { + pub async fn release_lock( + &self, + params: SessionsReleaseLockRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::SESSIONS_RELEASELOCK, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::SESSIONS_RELEASELOCK, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -1754,9 +2063,15 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn enrich_metadata(&self, params: SessionsEnrichMetadataRequest) -> Result { + pub async fn enrich_metadata( + &self, + params: SessionsEnrichMetadataRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::SESSIONS_ENRICHMETADATA, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::SESSIONS_ENRICHMETADATA, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -1779,9 +2094,15 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn reload_plugin_hooks(&self, params: SessionsReloadPluginHooksRequest) -> Result { + pub async fn reload_plugin_hooks( + &self, + params: SessionsReloadPluginHooksRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::SESSIONS_RELOADPLUGINHOOKS, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::SESSIONS_RELOADPLUGINHOOKS, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -1804,9 +2125,18 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn load_deferred_repo_hooks(&self, params: SessionsLoadDeferredRepoHooksRequest) -> Result { + pub async fn load_deferred_repo_hooks( + &self, + params: SessionsLoadDeferredRepoHooksRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::SESSIONS_LOADDEFERREDREPOHOOKS, Some(wire_params)).await?; + let _value = self + .client + .call( + rpc_methods::SESSIONS_LOADDEFERREDREPOHOOKS, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -1829,9 +2159,18 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn set_additional_plugins(&self, params: SessionsSetAdditionalPluginsRequest) -> Result { + pub async fn set_additional_plugins( + &self, + params: SessionsSetAdditionalPluginsRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::SESSIONS_SETADDITIONALPLUGINS, Some(wire_params)).await?; + let _value = self + .client + .call( + rpc_methods::SESSIONS_SETADDITIONALPLUGINS, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -1854,9 +2193,15 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn get_board_entry_count(&self, params: SessionsGetBoardEntryCountRequest) -> Result { + pub(crate) async fn get_board_entry_count( + &self, + params: SessionsGetBoardEntryCountRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::SESSIONS_GETBOARDENTRYCOUNT, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::SESSIONS_GETBOARDENTRYCOUNT, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -1879,9 +2224,15 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn start_remote_control(&self, params: SessionsStartRemoteControlRequest) -> Result { + pub async fn start_remote_control( + &self, + params: SessionsStartRemoteControlRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::SESSIONS_STARTREMOTECONTROL, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::SESSIONS_STARTREMOTECONTROL, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -1904,9 +2255,18 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn transfer_remote_control(&self, params: SessionsTransferRemoteControlRequest) -> Result { + pub async fn transfer_remote_control( + &self, + params: SessionsTransferRemoteControlRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::SESSIONS_TRANSFERREMOTECONTROL, Some(wire_params)).await?; + let _value = self + .client + .call( + rpc_methods::SESSIONS_TRANSFERREMOTECONTROL, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -1929,9 +2289,18 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn set_remote_control_steering(&self, params: SessionsSetRemoteControlSteeringRequest) -> Result { + pub async fn set_remote_control_steering( + &self, + params: SessionsSetRemoteControlSteeringRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::SESSIONS_SETREMOTECONTROLSTEERING, Some(wire_params)).await?; + let _value = self + .client + .call( + rpc_methods::SESSIONS_SETREMOTECONTROLSTEERING, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -1952,7 +2321,10 @@ impl<'a> ClientRpcSessions<'a> { /// pub async fn stop_remote_control(&self) -> Result { let wire_params = serde_json::json!({}); - let _value = self.client.call(rpc_methods::SESSIONS_STOPREMOTECONTROL, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::SESSIONS_STOPREMOTECONTROL, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -1975,9 +2347,15 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn stop_remote_control_with_params(&self, params: SessionsStopRemoteControlRequest) -> Result { + pub async fn stop_remote_control_with_params( + &self, + params: SessionsStopRemoteControlRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::SESSIONS_STOPREMOTECONTROL, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::SESSIONS_STOPREMOTECONTROL, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -1998,7 +2376,13 @@ impl<'a> ClientRpcSessions<'a> { /// pub async fn get_remote_control_status(&self) -> Result { let wire_params = serde_json::json!({}); - let _value = self.client.call(rpc_methods::SESSIONS_GETREMOTECONTROLSTATUS, Some(wire_params)).await?; + let _value = self + .client + .call( + rpc_methods::SESSIONS_GETREMOTECONTROLSTATUS, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -2021,9 +2405,18 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn register_extension_tools_on_session(&self, params: RegisterExtensionToolsParams) -> Result { + pub(crate) async fn register_extension_tools_on_session( + &self, + params: RegisterExtensionToolsParams, + ) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::SESSIONS_REGISTEREXTENSIONTOOLSONSESSION, Some(wire_params)).await?; + let _value = self + .client + .call( + rpc_methods::SESSIONS_REGISTEREXTENSIONTOOLSONSESSION, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -2042,12 +2435,20 @@ impl<'a> ClientRpcSessions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn configure_session_extensions(&self, params: ConfigureSessionExtensionsParams) -> Result<(), Error> { + pub(crate) async fn configure_session_extensions( + &self, + params: ConfigureSessionExtensionsParams, + ) -> Result<(), Error> { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::SESSIONS_CONFIGURESESSIONEXTENSIONS, Some(wire_params)).await?; + let _value = self + .client + .call( + rpc_methods::SESSIONS_CONFIGURESESSIONEXTENSIONS, + Some(wire_params), + ) + .await?; Ok(()) } - } /// `skills.*` RPCs. @@ -2059,7 +2460,9 @@ pub struct ClientRpcSkills<'a> { impl<'a> ClientRpcSkills<'a> { /// `skills.config.*` sub-namespace. pub fn config(&self) -> ClientRpcSkillsConfig<'a> { - ClientRpcSkillsConfig { client: self.client } + ClientRpcSkillsConfig { + client: self.client, + } } /// Discovers skills across global and project sources. @@ -2083,7 +2486,10 @@ impl<'a> ClientRpcSkills<'a> { /// pub async fn discover(&self, params: SkillsDiscoverRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::SKILLS_DISCOVER, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::SKILLS_DISCOVER, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -2106,12 +2512,17 @@ impl<'a> ClientRpcSkills<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn get_discovery_paths(&self, params: SkillsGetDiscoveryPathsRequest) -> Result { + pub async fn get_discovery_paths( + &self, + params: SkillsGetDiscoveryPathsRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::SKILLS_GETDISCOVERYPATHS, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::SKILLS_GETDISCOVERYPATHS, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `skills.config.*` RPCs. @@ -2136,12 +2547,20 @@ impl<'a> ClientRpcSkillsConfig<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn set_disabled_skills(&self, params: SkillsConfigSetDisabledSkillsRequest) -> Result<(), Error> { + pub async fn set_disabled_skills( + &self, + params: SkillsConfigSetDisabledSkillsRequest, + ) -> Result<(), Error> { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::SKILLS_CONFIG_SETDISABLEDSKILLS, Some(wire_params)).await?; + let _value = self + .client + .call( + rpc_methods::SKILLS_CONFIG_SETDISABLEDSKILLS, + Some(wire_params), + ) + .await?; Ok(()) } - } /// `tools.*` RPCs. @@ -2172,10 +2591,12 @@ impl<'a> ClientRpcTools<'a> { /// pub async fn list(&self, params: ToolsListRequest) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::TOOLS_LIST, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::TOOLS_LIST, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `user.*` RPCs. @@ -2187,9 +2608,10 @@ pub struct ClientRpcUser<'a> { impl<'a> ClientRpcUser<'a> { /// `user.settings.*` sub-namespace. pub fn settings(&self) -> ClientRpcUserSettings<'a> { - ClientRpcUserSettings { client: self.client } + ClientRpcUserSettings { + client: self.client, + } } - } /// `user.settings.*` RPCs. @@ -2212,7 +2634,10 @@ impl<'a> ClientRpcUserSettings<'a> { /// pub async fn reload(&self) -> Result<(), Error> { let wire_params = serde_json::json!({}); - let _value = self.client.call(rpc_methods::USER_SETTINGS_RELOAD, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::USER_SETTINGS_RELOAD, Some(wire_params)) + .await?; Ok(()) } @@ -2233,7 +2658,10 @@ impl<'a> ClientRpcUserSettings<'a> { /// pub async fn get(&self) -> Result { let wire_params = serde_json::json!({}); - let _value = self.client.call(rpc_methods::USER_SETTINGS_GET, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::USER_SETTINGS_GET, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -2256,12 +2684,17 @@ impl<'a> ClientRpcUserSettings<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn set(&self, params: UserSettingsSetRequest) -> Result { + pub async fn set( + &self, + params: UserSettingsSetRequest, + ) -> Result { let wire_params = serde_json::to_value(params)?; - let _value = self.client.call(rpc_methods::USER_SETTINGS_SET, Some(wire_params)).await?; + let _value = self + .client + .call(rpc_methods::USER_SETTINGS_SET, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } - } /// Typed view over a [`Session`]'s RPC namespace. @@ -2273,192 +2706,268 @@ pub struct SessionRpc<'a> { impl<'a> SessionRpc<'a> { /// `session.agent.*` sub-namespace. pub fn agent(&self) -> SessionRpcAgent<'a> { - SessionRpcAgent { session: self.session } + SessionRpcAgent { + session: self.session, + } } /// `session.canvas.*` sub-namespace. pub fn canvas(&self) -> SessionRpcCanvas<'a> { - SessionRpcCanvas { session: self.session } + SessionRpcCanvas { + session: self.session, + } } /// `session.commands.*` sub-namespace. pub fn commands(&self) -> SessionRpcCommands<'a> { - SessionRpcCommands { session: self.session } + SessionRpcCommands { + session: self.session, + } } /// `session.completions.*` sub-namespace. pub fn completions(&self) -> SessionRpcCompletions<'a> { - SessionRpcCompletions { session: self.session } + SessionRpcCompletions { + session: self.session, + } } /// `session.contentExclusion.*` sub-namespace. pub fn content_exclusion(&self) -> SessionRpcContentExclusion<'a> { - SessionRpcContentExclusion { session: self.session } + SessionRpcContentExclusion { + session: self.session, + } } /// `session.debug.*` sub-namespace. pub fn debug(&self) -> SessionRpcDebug<'a> { - SessionRpcDebug { session: self.session } + SessionRpcDebug { + session: self.session, + } } /// `session.eventLog.*` sub-namespace. pub fn event_log(&self) -> SessionRpcEventLog<'a> { - SessionRpcEventLog { session: self.session } + SessionRpcEventLog { + session: self.session, + } } /// `session.extensions.*` sub-namespace. pub fn extensions(&self) -> SessionRpcExtensions<'a> { - SessionRpcExtensions { session: self.session } + SessionRpcExtensions { + session: self.session, + } } /// `session.factory.*` sub-namespace. pub fn factory(&self) -> SessionRpcFactory<'a> { - SessionRpcFactory { session: self.session } + SessionRpcFactory { + session: self.session, + } } /// `session.fleet.*` sub-namespace. pub fn fleet(&self) -> SessionRpcFleet<'a> { - SessionRpcFleet { session: self.session } + SessionRpcFleet { + session: self.session, + } } /// `session.gitHubAuth.*` sub-namespace. pub fn git_hub_auth(&self) -> SessionRpcGitHubAuth<'a> { - SessionRpcGitHubAuth { session: self.session } + SessionRpcGitHubAuth { + session: self.session, + } } /// `session.history.*` sub-namespace. pub fn history(&self) -> SessionRpcHistory<'a> { - SessionRpcHistory { session: self.session } + SessionRpcHistory { + session: self.session, + } } /// `session.instructions.*` sub-namespace. pub fn instructions(&self) -> SessionRpcInstructions<'a> { - SessionRpcInstructions { session: self.session } + SessionRpcInstructions { + session: self.session, + } } /// `session.limitPrediction.*` sub-namespace. pub fn limit_prediction(&self) -> SessionRpcLimitPrediction<'a> { - SessionRpcLimitPrediction { session: self.session } + SessionRpcLimitPrediction { + session: self.session, + } } /// `session.lsp.*` sub-namespace. pub fn lsp(&self) -> SessionRpcLsp<'a> { - SessionRpcLsp { session: self.session } + SessionRpcLsp { + session: self.session, + } } /// `session.mcp.*` sub-namespace. pub fn mcp(&self) -> SessionRpcMcp<'a> { - SessionRpcMcp { session: self.session } + SessionRpcMcp { + session: self.session, + } } /// `session.metadata.*` sub-namespace. pub fn metadata(&self) -> SessionRpcMetadata<'a> { - SessionRpcMetadata { session: self.session } + SessionRpcMetadata { + session: self.session, + } } /// `session.mode.*` sub-namespace. pub fn mode(&self) -> SessionRpcMode<'a> { - SessionRpcMode { session: self.session } + SessionRpcMode { + session: self.session, + } } /// `session.model.*` sub-namespace. pub fn model(&self) -> SessionRpcModel<'a> { - SessionRpcModel { session: self.session } + SessionRpcModel { + session: self.session, + } } /// `session.name.*` sub-namespace. pub fn name(&self) -> SessionRpcName<'a> { - SessionRpcName { session: self.session } + SessionRpcName { + session: self.session, + } } /// `session.options.*` sub-namespace. pub fn options(&self) -> SessionRpcOptions<'a> { - SessionRpcOptions { session: self.session } + SessionRpcOptions { + session: self.session, + } } /// `session.permissions.*` sub-namespace. pub fn permissions(&self) -> SessionRpcPermissions<'a> { - SessionRpcPermissions { session: self.session } + SessionRpcPermissions { + session: self.session, + } } /// `session.plan.*` sub-namespace. pub fn plan(&self) -> SessionRpcPlan<'a> { - SessionRpcPlan { session: self.session } + SessionRpcPlan { + session: self.session, + } } /// `session.plugins.*` sub-namespace. pub fn plugins(&self) -> SessionRpcPlugins<'a> { - SessionRpcPlugins { session: self.session } + SessionRpcPlugins { + session: self.session, + } } /// `session.provider.*` sub-namespace. pub fn provider(&self) -> SessionRpcProvider<'a> { - SessionRpcProvider { session: self.session } + SessionRpcProvider { + session: self.session, + } } /// `session.queue.*` sub-namespace. pub fn queue(&self) -> SessionRpcQueue<'a> { - SessionRpcQueue { session: self.session } + SessionRpcQueue { + session: self.session, + } } /// `session.remote.*` sub-namespace. pub fn remote(&self) -> SessionRpcRemote<'a> { - SessionRpcRemote { session: self.session } + SessionRpcRemote { + session: self.session, + } } /// `session.schedule.*` sub-namespace. pub fn schedule(&self) -> SessionRpcSchedule<'a> { - SessionRpcSchedule { session: self.session } + SessionRpcSchedule { + session: self.session, + } } /// `session.settings.*` sub-namespace. pub fn settings(&self) -> SessionRpcSettings<'a> { - SessionRpcSettings { session: self.session } + SessionRpcSettings { + session: self.session, + } } /// `session.shell.*` sub-namespace. pub fn shell(&self) -> SessionRpcShell<'a> { - SessionRpcShell { session: self.session } + SessionRpcShell { + session: self.session, + } } /// `session.skills.*` sub-namespace. pub fn skills(&self) -> SessionRpcSkills<'a> { - SessionRpcSkills { session: self.session } + SessionRpcSkills { + session: self.session, + } } /// `session.tasks.*` sub-namespace. pub fn tasks(&self) -> SessionRpcTasks<'a> { - SessionRpcTasks { session: self.session } + SessionRpcTasks { + session: self.session, + } } /// `session.telemetry.*` sub-namespace. pub fn telemetry(&self) -> SessionRpcTelemetry<'a> { - SessionRpcTelemetry { session: self.session } + SessionRpcTelemetry { + session: self.session, + } } /// `session.tools.*` sub-namespace. pub fn tools(&self) -> SessionRpcTools<'a> { - SessionRpcTools { session: self.session } + SessionRpcTools { + session: self.session, + } } /// `session.ui.*` sub-namespace. pub fn ui(&self) -> SessionRpcUi<'a> { - SessionRpcUi { session: self.session } + SessionRpcUi { + session: self.session, + } } /// `session.usage.*` sub-namespace. pub fn usage(&self) -> SessionRpcUsage<'a> { - SessionRpcUsage { session: self.session } + SessionRpcUsage { + session: self.session, + } } /// `session.visibility.*` sub-namespace. pub fn visibility(&self) -> SessionRpcVisibility<'a> { - SessionRpcVisibility { session: self.session } + SessionRpcVisibility { + session: self.session, + } } /// `session.workspaces.*` sub-namespace. pub fn workspaces(&self) -> SessionRpcWorkspaces<'a> { - SessionRpcWorkspaces { session: self.session } + SessionRpcWorkspaces { + session: self.session, + } } /// Suspends the session while preserving persisted state for later resume. @@ -2474,7 +2983,11 @@ impl<'a> SessionRpc<'a> { /// pub async fn suspend(&self) -> Result<(), Error> { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_SUSPEND, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_SUSPEND, Some(wire_params)) + .await?; Ok(()) } @@ -2500,7 +3013,11 @@ impl<'a> SessionRpc<'a> { pub async fn send(&self, params: SendRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_SEND, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_SEND, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -2523,10 +3040,17 @@ impl<'a> SessionRpc<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn send_messages(&self, params: SendMessagesRequest) -> Result { + pub async fn send_messages( + &self, + params: SendMessagesRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_SENDMESSAGES, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_SENDMESSAGES, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -2545,10 +3069,20 @@ impl<'a> SessionRpc<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn send_system_notification(&self, params: SendSystemNotificationRequest) -> Result<(), Error> { + pub(crate) async fn send_system_notification( + &self, + params: SendSystemNotificationRequest, + ) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_SENDSYSTEMNOTIFICATION, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_SENDSYSTEMNOTIFICATION, + Some(wire_params), + ) + .await?; Ok(()) } @@ -2574,7 +3108,11 @@ impl<'a> SessionRpc<'a> { pub async fn abort(&self, params: AbortRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_ABORT, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_ABORT, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -2597,10 +3135,17 @@ impl<'a> SessionRpc<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn interrupt_main_turn(&self, params: InterruptMainTurnRequest) -> Result { + pub async fn interrupt_main_turn( + &self, + params: InterruptMainTurnRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_INTERRUPTMAINTURN, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_INTERRUPTMAINTURN, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -2619,9 +3164,18 @@ impl<'a> SessionRpc<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn cancel_all_background_agents(&self) -> Result { + pub async fn cancel_all_background_agents( + &self, + ) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_CANCELALLBACKGROUNDAGENTS, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_CANCELALLBACKGROUNDAGENTS, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -2643,7 +3197,11 @@ impl<'a> SessionRpc<'a> { pub async fn shutdown(&self, params: ShutdownRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_SHUTDOWN, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_SHUTDOWN, Some(wire_params)) + .await?; Ok(()) } @@ -2669,10 +3227,13 @@ impl<'a> SessionRpc<'a> { pub async fn log(&self, params: LogRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_LOG, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_LOG, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.agent.*` RPCs. @@ -2699,7 +3260,11 @@ impl<'a> SessionRpcAgent<'a> { /// pub async fn list(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_AGENT_LIST, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_AGENT_LIST, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -2725,7 +3290,11 @@ impl<'a> SessionRpcAgent<'a> { pub async fn list_with_params(&self, params: AgentListRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_AGENT_LIST, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_AGENT_LIST, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -2746,7 +3315,11 @@ impl<'a> SessionRpcAgent<'a> { /// pub async fn get_current(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_AGENT_GETCURRENT, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_AGENT_GETCURRENT, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -2772,7 +3345,11 @@ impl<'a> SessionRpcAgent<'a> { pub async fn select(&self, params: AgentSelectRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_AGENT_SELECT, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_AGENT_SELECT, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -2789,7 +3366,11 @@ impl<'a> SessionRpcAgent<'a> { /// pub async fn deselect(&self) -> Result<(), Error> { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_AGENT_DESELECT, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_AGENT_DESELECT, Some(wire_params)) + .await?; Ok(()) } @@ -2810,10 +3391,13 @@ impl<'a> SessionRpcAgent<'a> { /// pub async fn reload(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_AGENT_RELOAD, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_AGENT_RELOAD, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.canvas.*` RPCs. @@ -2825,7 +3409,9 @@ pub struct SessionRpcCanvas<'a> { impl<'a> SessionRpcCanvas<'a> { /// `session.canvas.action.*` sub-namespace. pub fn action(&self) -> SessionRpcCanvasAction<'a> { - SessionRpcCanvasAction { session: self.session } + SessionRpcCanvasAction { + session: self.session, + } } /// Lists canvases declared for the session. @@ -2845,7 +3431,11 @@ impl<'a> SessionRpcCanvas<'a> { /// pub async fn list(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_CANVAS_LIST, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_CANVAS_LIST, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -2866,7 +3456,11 @@ impl<'a> SessionRpcCanvas<'a> { /// pub async fn list_open(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_CANVAS_LISTOPEN, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_CANVAS_LISTOPEN, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -2892,7 +3486,11 @@ impl<'a> SessionRpcCanvas<'a> { pub async fn open(&self, params: CanvasOpenRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_CANVAS_OPEN, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_CANVAS_OPEN, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -2914,10 +3512,13 @@ impl<'a> SessionRpcCanvas<'a> { pub async fn close(&self, params: CanvasCloseRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_CANVAS_CLOSE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_CANVAS_CLOSE, Some(wire_params)) + .await?; Ok(()) } - } /// `session.canvas.action.*` RPCs. @@ -2946,13 +3547,19 @@ impl<'a> SessionRpcCanvasAction<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn invoke(&self, params: CanvasActionInvokeRequest) -> Result { + pub async fn invoke( + &self, + params: CanvasActionInvokeRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_CANVAS_ACTION_INVOKE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_CANVAS_ACTION_INVOKE, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.commands.*` RPCs. @@ -2979,7 +3586,11 @@ impl<'a> SessionRpcCommands<'a> { /// pub async fn list(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_COMMANDS_LIST, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_COMMANDS_LIST, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -3002,10 +3613,17 @@ impl<'a> SessionRpcCommands<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn list_with_params(&self, params: CommandsListRequest) -> Result { + pub async fn list_with_params( + &self, + params: CommandsListRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_COMMANDS_LIST, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_COMMANDS_LIST, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -3028,10 +3646,17 @@ impl<'a> SessionRpcCommands<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn invoke(&self, params: CommandsInvokeRequest) -> Result { + pub async fn invoke( + &self, + params: CommandsInvokeRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_COMMANDS_INVOKE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_COMMANDS_INVOKE, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -3054,10 +3679,20 @@ impl<'a> SessionRpcCommands<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn handle_pending_command(&self, params: CommandsHandlePendingCommandRequest) -> Result { + pub async fn handle_pending_command( + &self, + params: CommandsHandlePendingCommandRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_COMMANDS_HANDLEPENDINGCOMMAND, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_COMMANDS_HANDLEPENDINGCOMMAND, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -3080,10 +3715,17 @@ impl<'a> SessionRpcCommands<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn execute(&self, params: ExecuteCommandParams) -> Result { + pub async fn execute( + &self, + params: ExecuteCommandParams, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_COMMANDS_EXECUTE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_COMMANDS_EXECUTE, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -3106,10 +3748,17 @@ impl<'a> SessionRpcCommands<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn enqueue(&self, params: EnqueueCommandParams) -> Result { + pub async fn enqueue( + &self, + params: EnqueueCommandParams, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_COMMANDS_ENQUEUE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_COMMANDS_ENQUEUE, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -3132,13 +3781,22 @@ impl<'a> SessionRpcCommands<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn respond_to_queued_command(&self, params: CommandsRespondToQueuedCommandRequest) -> Result { + pub async fn respond_to_queued_command( + &self, + params: CommandsRespondToQueuedCommandRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_COMMANDS_RESPONDTOQUEUEDCOMMAND, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_COMMANDS_RESPONDTOQUEUEDCOMMAND, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.completions.*` RPCs. @@ -3163,9 +3821,18 @@ impl<'a> SessionRpcCompletions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn get_trigger_characters(&self) -> Result { + pub async fn get_trigger_characters( + &self, + ) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_COMPLETIONS_GETTRIGGERCHARACTERS, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_COMPLETIONS_GETTRIGGERCHARACTERS, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -3188,13 +3855,19 @@ impl<'a> SessionRpcCompletions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn request(&self, params: CompletionsRequestRequest) -> Result { + pub async fn request( + &self, + params: CompletionsRequestRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_COMPLETIONS_REQUEST, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_COMPLETIONS_REQUEST, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.contentExclusion.*` RPCs. @@ -3223,13 +3896,22 @@ impl<'a> SessionRpcContentExclusion<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn check_paths(&self, params: ContentExclusionCheckPathsRequest) -> Result { + pub async fn check_paths( + &self, + params: ContentExclusionCheckPathsRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_CONTENTEXCLUSION_CHECKPATHS, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_CONTENTEXCLUSION_CHECKPATHS, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.debug.*` RPCs. @@ -3258,13 +3940,19 @@ impl<'a> SessionRpcDebug<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn collect_logs(&self, params: DebugCollectLogsRequest) -> Result { + pub async fn collect_logs( + &self, + params: DebugCollectLogsRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_DEBUG_COLLECTLOGS, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_DEBUG_COLLECTLOGS, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.eventLog.*` RPCs. @@ -3296,7 +3984,11 @@ impl<'a> SessionRpcEventLog<'a> { pub async fn read(&self, params: EventLogReadRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_EVENTLOG_READ, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_EVENTLOG_READ, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -3317,7 +4009,11 @@ impl<'a> SessionRpcEventLog<'a> { /// pub async fn tail(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_EVENTLOG_TAIL, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_EVENTLOG_TAIL, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -3340,10 +4036,20 @@ impl<'a> SessionRpcEventLog<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn register_interest(&self, params: RegisterEventInterestParams) -> Result { + pub async fn register_interest( + &self, + params: RegisterEventInterestParams, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_EVENTLOG_REGISTERINTEREST, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_EVENTLOG_REGISTERINTEREST, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -3366,13 +4072,22 @@ impl<'a> SessionRpcEventLog<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn release_interest(&self, params: ReleaseEventInterestParams) -> Result { + pub async fn release_interest( + &self, + params: ReleaseEventInterestParams, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_EVENTLOG_RELEASEINTEREST, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_EVENTLOG_RELEASEINTEREST, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.extensions.*` RPCs. @@ -3399,7 +4114,11 @@ impl<'a> SessionRpcExtensions<'a> { /// pub async fn list(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_EXTENSIONS_LIST, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_EXTENSIONS_LIST, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -3421,7 +4140,11 @@ impl<'a> SessionRpcExtensions<'a> { pub async fn enable(&self, params: ExtensionsEnableRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_EXTENSIONS_ENABLE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_EXTENSIONS_ENABLE, Some(wire_params)) + .await?; Ok(()) } @@ -3443,7 +4166,11 @@ impl<'a> SessionRpcExtensions<'a> { pub async fn disable(&self, params: ExtensionsDisableRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_EXTENSIONS_DISABLE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_EXTENSIONS_DISABLE, Some(wire_params)) + .await?; Ok(()) } @@ -3460,7 +4187,11 @@ impl<'a> SessionRpcExtensions<'a> { /// pub async fn reload(&self) -> Result<(), Error> { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_EXTENSIONS_RELOAD, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_EXTENSIONS_RELOAD, Some(wire_params)) + .await?; Ok(()) } @@ -3479,13 +4210,22 @@ impl<'a> SessionRpcExtensions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn send_attachments_to_message(&self, params: SendAttachmentsToMessageParams) -> Result<(), Error> { + pub async fn send_attachments_to_message( + &self, + params: SendAttachmentsToMessageParams, + ) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_EXTENSIONS_SENDATTACHMENTSTOMESSAGE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_EXTENSIONS_SENDATTACHMENTSTOMESSAGE, + Some(wire_params), + ) + .await?; Ok(()) } - } /// `session.factory.*` RPCs. @@ -3497,7 +4237,9 @@ pub struct SessionRpcFactory<'a> { impl<'a> SessionRpcFactory<'a> { /// `session.factory.journal.*` sub-namespace. pub fn journal(&self) -> SessionRpcFactoryJournal<'a> { - SessionRpcFactoryJournal { session: self.session } + SessionRpcFactoryJournal { + session: self.session, + } } /// Runs a registered factory by name at the top level. @@ -3522,7 +4264,11 @@ impl<'a> SessionRpcFactory<'a> { pub async fn run(&self, params: FactoryRunRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_FACTORY_RUN, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_FACTORY_RUN, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -3548,7 +4294,11 @@ impl<'a> SessionRpcFactory<'a> { pub async fn resume(&self, params: FactoryResumeRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_FACTORY_RESUME, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_FACTORY_RESUME, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -3574,7 +4324,11 @@ impl<'a> SessionRpcFactory<'a> { pub async fn get_run(&self, params: FactoryGetRunRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_FACTORY_GETRUN, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_FACTORY_GETRUN, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -3595,7 +4349,11 @@ impl<'a> SessionRpcFactory<'a> { /// pub async fn list_runs(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_FACTORY_LISTRUNS, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_FACTORY_LISTRUNS, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -3618,10 +4376,17 @@ impl<'a> SessionRpcFactory<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn get_run_detail(&self, params: FactoryGetRunRequest) -> Result { + pub async fn get_run_detail( + &self, + params: FactoryGetRunRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_FACTORY_GETRUNDETAIL, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_FACTORY_GETRUNDETAIL, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -3644,10 +4409,20 @@ impl<'a> SessionRpcFactory<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn get_run_progress(&self, params: FactoryGetRunProgressRequest) -> Result { + pub async fn get_run_progress( + &self, + params: FactoryGetRunProgressRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_FACTORY_GETRUNPROGRESS, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_FACTORY_GETRUNPROGRESS, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -3673,7 +4448,11 @@ impl<'a> SessionRpcFactory<'a> { pub async fn cancel(&self, params: FactoryCancelRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_FACTORY_CANCEL, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_FACTORY_CANCEL, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -3699,7 +4478,11 @@ impl<'a> SessionRpcFactory<'a> { pub async fn log(&self, params: FactoryLogRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_FACTORY_LOG, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_FACTORY_LOG, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -3725,10 +4508,13 @@ impl<'a> SessionRpcFactory<'a> { pub async fn agent(&self, params: FactoryAgentRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_FACTORY_AGENT, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_FACTORY_AGENT, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.factory.journal.*` RPCs. @@ -3757,10 +4543,17 @@ impl<'a> SessionRpcFactoryJournal<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn get(&self, params: FactoryJournalGetRequest) -> Result { + pub async fn get( + &self, + params: FactoryJournalGetRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_FACTORY_JOURNAL_GET, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_FACTORY_JOURNAL_GET, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -3786,10 +4579,13 @@ impl<'a> SessionRpcFactoryJournal<'a> { pub async fn put(&self, params: FactoryJournalPutRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_FACTORY_JOURNAL_PUT, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_FACTORY_JOURNAL_PUT, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.fleet.*` RPCs. @@ -3821,10 +4617,13 @@ impl<'a> SessionRpcFleet<'a> { pub async fn start(&self, params: FleetStartRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_FLEET_START, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_FLEET_START, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.gitHubAuth.*` RPCs. @@ -3851,7 +4650,11 @@ impl<'a> SessionRpcGitHubAuth<'a> { /// pub async fn get_status(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_GITHUBAUTH_GETSTATUS, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_GITHUBAUTH_GETSTATUS, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -3874,13 +4677,22 @@ impl<'a> SessionRpcGitHubAuth<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn set_credentials(&self, params: SessionSetCredentialsParams) -> Result { + pub async fn set_credentials( + &self, + params: SessionSetCredentialsParams, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_GITHUBAUTH_SETCREDENTIALS, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_GITHUBAUTH_SETCREDENTIALS, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.history.*` RPCs. @@ -3907,7 +4719,11 @@ impl<'a> SessionRpcHistory<'a> { /// pub async fn compact(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_HISTORY_COMPACT, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_HISTORY_COMPACT, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -3930,10 +4746,17 @@ impl<'a> SessionRpcHistory<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn compact_with_params(&self, params: HistoryCompactRequest) -> Result { + pub async fn compact_with_params( + &self, + params: HistoryCompactRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_HISTORY_COMPACT, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_HISTORY_COMPACT, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -3956,10 +4779,17 @@ impl<'a> SessionRpcHistory<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn truncate(&self, params: HistoryTruncateRequest) -> Result { + pub async fn truncate( + &self, + params: HistoryTruncateRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_HISTORY_TRUNCATE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_HISTORY_TRUNCATE, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -3980,7 +4810,14 @@ impl<'a> SessionRpcHistory<'a> { /// pub async fn list_rewind_points(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_HISTORY_LISTREWINDPOINTS, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_HISTORY_LISTREWINDPOINTS, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -4003,10 +4840,20 @@ impl<'a> SessionRpcHistory<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn preview_rewind(&self, params: HistoryPreviewRewindRequest) -> Result { + pub async fn preview_rewind( + &self, + params: HistoryPreviewRewindRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_HISTORY_PREVIEWREWIND, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_HISTORY_PREVIEWREWIND, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -4032,7 +4879,11 @@ impl<'a> SessionRpcHistory<'a> { pub async fn rewind(&self, params: HistoryRewindRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_HISTORY_REWIND, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_HISTORY_REWIND, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -4051,9 +4902,18 @@ impl<'a> SessionRpcHistory<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn cancel_background_compaction(&self) -> Result { + pub async fn cancel_background_compaction( + &self, + ) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_HISTORY_CANCELBACKGROUNDCOMPACTION, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_HISTORY_CANCELBACKGROUNDCOMPACTION, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -4072,9 +4932,18 @@ impl<'a> SessionRpcHistory<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn abort_manual_compaction(&self) -> Result { + pub async fn abort_manual_compaction( + &self, + ) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_HISTORY_ABORTMANUALCOMPACTION, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_HISTORY_ABORTMANUALCOMPACTION, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -4095,10 +4964,16 @@ impl<'a> SessionRpcHistory<'a> { /// pub async fn summarize_for_handoff(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_HISTORY_SUMMARIZEFORHANDOFF, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_HISTORY_SUMMARIZEFORHANDOFF, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.instructions.*` RPCs. @@ -4125,10 +5000,16 @@ impl<'a> SessionRpcInstructions<'a> { /// pub async fn get_sources(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_INSTRUCTIONS_GETSOURCES, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_INSTRUCTIONS_GETSOURCES, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.limitPrediction.*` RPCs. @@ -4155,7 +5036,14 @@ impl<'a> SessionRpcLimitPrediction<'a> { /// pub async fn predict(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_LIMITPREDICTION_PREDICT, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_LIMITPREDICTION_PREDICT, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -4178,13 +5066,22 @@ impl<'a> SessionRpcLimitPrediction<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn predict_with_params(&self, params: SessionLimitPredictionRequest) -> Result { + pub async fn predict_with_params( + &self, + params: SessionLimitPredictionRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_LIMITPREDICTION_PREDICT, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_LIMITPREDICTION_PREDICT, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.lsp.*` RPCs. @@ -4212,10 +5109,13 @@ impl<'a> SessionRpcLsp<'a> { pub async fn initialize(&self, params: LspInitializeRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_LSP_INITIALIZE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_LSP_INITIALIZE, Some(wire_params)) + .await?; Ok(()) } - } /// `session.mcp.*` RPCs. @@ -4227,22 +5127,30 @@ pub struct SessionRpcMcp<'a> { impl<'a> SessionRpcMcp<'a> { /// `session.mcp.apps.*` sub-namespace. pub fn apps(&self) -> SessionRpcMcpApps<'a> { - SessionRpcMcpApps { session: self.session } + SessionRpcMcpApps { + session: self.session, + } } /// `session.mcp.headers.*` sub-namespace. pub fn headers(&self) -> SessionRpcMcpHeaders<'a> { - SessionRpcMcpHeaders { session: self.session } + SessionRpcMcpHeaders { + session: self.session, + } } /// `session.mcp.oauth.*` sub-namespace. pub fn oauth(&self) -> SessionRpcMcpOauth<'a> { - SessionRpcMcpOauth { session: self.session } + SessionRpcMcpOauth { + session: self.session, + } } /// `session.mcp.resources.*` sub-namespace. pub fn resources(&self) -> SessionRpcMcpResources<'a> { - SessionRpcMcpResources { session: self.session } + SessionRpcMcpResources { + session: self.session, + } } /// Lists MCP servers configured for the session, their connection status, and host-level state. The host-level state (disabled/filtered servers, failed/needs-auth/pending connections, mcp3p policy, full config) is empty/zero when no MCP host has been initialized for the session. @@ -4262,7 +5170,11 @@ impl<'a> SessionRpcMcp<'a> { /// pub async fn list(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_MCP_LIST, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_MCP_LIST, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -4285,10 +5197,17 @@ impl<'a> SessionRpcMcp<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn list_tools(&self, params: McpListToolsRequest) -> Result { + pub async fn list_tools( + &self, + params: McpListToolsRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_MCP_LISTTOOLS, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_MCP_LISTTOOLS, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -4310,7 +5229,11 @@ impl<'a> SessionRpcMcp<'a> { pub async fn enable(&self, params: McpEnableRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_MCP_ENABLE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_MCP_ENABLE, Some(wire_params)) + .await?; Ok(()) } @@ -4332,7 +5255,11 @@ impl<'a> SessionRpcMcp<'a> { pub async fn disable(&self, params: McpDisableRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_MCP_DISABLE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_MCP_DISABLE, Some(wire_params)) + .await?; Ok(()) } @@ -4349,7 +5276,11 @@ impl<'a> SessionRpcMcp<'a> { /// pub async fn reload(&self) -> Result<(), Error> { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_MCP_RELOAD, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_MCP_RELOAD, Some(wire_params)) + .await?; Ok(()) } @@ -4372,10 +5303,17 @@ impl<'a> SessionRpcMcp<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn reload_with_config(&self, params: McpReloadWithConfigRequest) -> Result { + pub(crate) async fn reload_with_config( + &self, + params: McpReloadWithConfigRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_MCP_RELOADWITHCONFIG, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_MCP_RELOADWITHCONFIG, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -4398,10 +5336,17 @@ impl<'a> SessionRpcMcp<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn execute_sampling(&self, params: McpExecuteSamplingParams) -> Result { + pub async fn execute_sampling( + &self, + params: McpExecuteSamplingParams, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_MCP_EXECUTESAMPLING, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_MCP_EXECUTESAMPLING, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -4424,10 +5369,20 @@ impl<'a> SessionRpcMcp<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn cancel_sampling_execution(&self, params: McpCancelSamplingExecutionParams) -> Result { + pub async fn cancel_sampling_execution( + &self, + params: McpCancelSamplingExecutionParams, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_MCP_CANCELSAMPLINGEXECUTION, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_MCP_CANCELSAMPLINGEXECUTION, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -4450,10 +5405,17 @@ impl<'a> SessionRpcMcp<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn set_env_value_mode(&self, params: McpSetEnvValueModeParams) -> Result { + pub async fn set_env_value_mode( + &self, + params: McpSetEnvValueModeParams, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_MCP_SETENVVALUEMODE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_MCP_SETENVVALUEMODE, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -4474,7 +5436,11 @@ impl<'a> SessionRpcMcp<'a> { /// pub async fn remove_git_hub(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_MCP_REMOVEGITHUB, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_MCP_REMOVEGITHUB, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -4497,10 +5463,17 @@ impl<'a> SessionRpcMcp<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn configure_git_hub(&self, params: McpConfigureGitHubRequest) -> Result { + pub(crate) async fn configure_git_hub( + &self, + params: McpConfigureGitHubRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_MCP_CONFIGUREGITHUB, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_MCP_CONFIGUREGITHUB, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -4522,7 +5495,11 @@ impl<'a> SessionRpcMcp<'a> { pub async fn start_server(&self, params: McpStartServerRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_MCP_STARTSERVER, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_MCP_STARTSERVER, Some(wire_params)) + .await?; Ok(()) } @@ -4544,7 +5521,11 @@ impl<'a> SessionRpcMcp<'a> { pub async fn restart_server(&self, params: McpRestartServerRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_MCP_RESTARTSERVER, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_MCP_RESTARTSERVER, Some(wire_params)) + .await?; Ok(()) } @@ -4566,7 +5547,11 @@ impl<'a> SessionRpcMcp<'a> { pub async fn stop_server(&self, params: McpStopServerRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_MCP_STOPSERVER, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_MCP_STOPSERVER, Some(wire_params)) + .await?; Ok(()) } @@ -4585,10 +5570,20 @@ impl<'a> SessionRpcMcp<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn register_external_client(&self, params: McpRegisterExternalClientRequest) -> Result<(), Error> { + pub(crate) async fn register_external_client( + &self, + params: McpRegisterExternalClientRequest, + ) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_MCP_REGISTEREXTERNALCLIENT, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_MCP_REGISTEREXTERNALCLIENT, + Some(wire_params), + ) + .await?; Ok(()) } @@ -4607,10 +5602,20 @@ impl<'a> SessionRpcMcp<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn unregister_external_client(&self, params: McpUnregisterExternalClientRequest) -> Result<(), Error> { + pub(crate) async fn unregister_external_client( + &self, + params: McpUnregisterExternalClientRequest, + ) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_MCP_UNREGISTEREXTERNALCLIENT, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_MCP_UNREGISTEREXTERNALCLIENT, + Some(wire_params), + ) + .await?; Ok(()) } @@ -4633,13 +5638,19 @@ impl<'a> SessionRpcMcp<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn is_server_running(&self, params: McpIsServerRunningRequest) -> Result { + pub async fn is_server_running( + &self, + params: McpIsServerRunningRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_MCP_ISSERVERRUNNING, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_MCP_ISSERVERRUNNING, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.mcp.apps.*` RPCs. @@ -4668,10 +5679,20 @@ impl<'a> SessionRpcMcpApps<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn read_resource(&self, params: McpAppsReadResourceRequest) -> Result { + pub async fn read_resource( + &self, + params: McpAppsReadResourceRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_MCP_APPS_READRESOURCE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_MCP_APPS_READRESOURCE, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -4694,10 +5715,17 @@ impl<'a> SessionRpcMcpApps<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn list_tools(&self, params: McpAppsListToolsRequest) -> Result { + pub async fn list_tools( + &self, + params: McpAppsListToolsRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_MCP_APPS_LISTTOOLS, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_MCP_APPS_LISTTOOLS, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -4720,10 +5748,17 @@ impl<'a> SessionRpcMcpApps<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn call_tool(&self, params: McpAppsCallToolRequest) -> Result { + pub async fn call_tool( + &self, + params: McpAppsCallToolRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_MCP_APPS_CALLTOOL, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_MCP_APPS_CALLTOOL, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -4742,10 +5777,20 @@ impl<'a> SessionRpcMcpApps<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn set_host_context(&self, params: McpAppsSetHostContextRequest) -> Result<(), Error> { + pub async fn set_host_context( + &self, + params: McpAppsSetHostContextRequest, + ) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_MCP_APPS_SETHOSTCONTEXT, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_MCP_APPS_SETHOSTCONTEXT, + Some(wire_params), + ) + .await?; Ok(()) } @@ -4766,7 +5811,14 @@ impl<'a> SessionRpcMcpApps<'a> { /// pub async fn get_host_context(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_MCP_APPS_GETHOSTCONTEXT, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_MCP_APPS_GETHOSTCONTEXT, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -4789,13 +5841,19 @@ impl<'a> SessionRpcMcpApps<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn diagnose(&self, params: McpAppsDiagnoseRequest) -> Result { + pub async fn diagnose( + &self, + params: McpAppsDiagnoseRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_MCP_APPS_DIAGNOSE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_MCP_APPS_DIAGNOSE, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.mcp.headers.*` RPCs. @@ -4824,13 +5882,22 @@ impl<'a> SessionRpcMcpHeaders<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn handle_pending_headers_refresh_request(&self, params: McpHeadersHandlePendingHeadersRefreshRequestRequest) -> Result { + pub async fn handle_pending_headers_refresh_request( + &self, + params: McpHeadersHandlePendingHeadersRefreshRequestRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_MCP_HEADERS_HANDLEPENDINGHEADERSREFRESHREQUEST, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_MCP_HEADERS_HANDLEPENDINGHEADERSREFRESHREQUEST, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.mcp.oauth.*` RPCs. @@ -4859,10 +5926,20 @@ impl<'a> SessionRpcMcpOauth<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn handle_pending_request(&self, params: McpOauthHandlePendingRequest) -> Result { + pub async fn handle_pending_request( + &self, + params: McpOauthHandlePendingRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_MCP_OAUTH_HANDLEPENDINGREQUEST, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_MCP_OAUTH_HANDLEPENDINGREQUEST, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -4888,7 +5965,11 @@ impl<'a> SessionRpcMcpOauth<'a> { pub async fn login(&self, params: McpOauthLoginRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_MCP_OAUTH_LOGIN, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_MCP_OAUTH_LOGIN, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -4911,13 +5992,19 @@ impl<'a> SessionRpcMcpOauth<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn respond(&self, params: McpOauthRespondRequest) -> Result { + pub async fn respond( + &self, + params: McpOauthRespondRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_MCP_OAUTH_RESPOND, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_MCP_OAUTH_RESPOND, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.mcp.resources.*` RPCs. @@ -4946,10 +6033,17 @@ impl<'a> SessionRpcMcpResources<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn read(&self, params: McpResourcesReadRequest) -> Result { + pub async fn read( + &self, + params: McpResourcesReadRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_MCP_RESOURCES_READ, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_MCP_RESOURCES_READ, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -4972,10 +6066,17 @@ impl<'a> SessionRpcMcpResources<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn list(&self, params: McpResourcesListRequest) -> Result { + pub async fn list( + &self, + params: McpResourcesListRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_MCP_RESOURCES_LIST, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_MCP_RESOURCES_LIST, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -4998,13 +6099,22 @@ impl<'a> SessionRpcMcpResources<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn list_templates(&self, params: McpResourcesListTemplatesRequest) -> Result { + pub async fn list_templates( + &self, + params: McpResourcesListTemplatesRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_MCP_RESOURCES_LISTTEMPLATES, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_MCP_RESOURCES_LISTTEMPLATES, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.metadata.*` RPCs. @@ -5031,7 +6141,11 @@ impl<'a> SessionRpcMetadata<'a> { /// pub async fn snapshot(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_METADATA_SNAPSHOT, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_METADATA_SNAPSHOT, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -5052,7 +6166,14 @@ impl<'a> SessionRpcMetadata<'a> { /// pub async fn is_processing(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_METADATA_ISPROCESSING, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_METADATA_ISPROCESSING, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -5073,7 +6194,11 @@ impl<'a> SessionRpcMetadata<'a> { /// pub async fn activity(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_METADATA_ACTIVITY, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_METADATA_ACTIVITY, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -5096,10 +6221,17 @@ impl<'a> SessionRpcMetadata<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn context_info(&self, params: MetadataContextInfoRequest) -> Result { + pub async fn context_info( + &self, + params: MetadataContextInfoRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_METADATA_CONTEXTINFO, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_METADATA_CONTEXTINFO, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -5120,7 +6252,14 @@ impl<'a> SessionRpcMetadata<'a> { /// pub async fn get_context_attribution(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_METADATA_GETCONTEXTATTRIBUTION, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_METADATA_GETCONTEXTATTRIBUTION, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -5143,10 +6282,20 @@ impl<'a> SessionRpcMetadata<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn get_context_heaviest_messages(&self, params: MetadataContextHeaviestMessagesRequest) -> Result { + pub async fn get_context_heaviest_messages( + &self, + params: MetadataContextHeaviestMessagesRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_METADATA_GETCONTEXTHEAVIESTMESSAGES, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_METADATA_GETCONTEXTHEAVIESTMESSAGES, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -5169,10 +6318,20 @@ impl<'a> SessionRpcMetadata<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn record_context_change(&self, params: MetadataRecordContextChangeRequest) -> Result { + pub async fn record_context_change( + &self, + params: MetadataRecordContextChangeRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_METADATA_RECORDCONTEXTCHANGE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_METADATA_RECORDCONTEXTCHANGE, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -5195,10 +6354,20 @@ impl<'a> SessionRpcMetadata<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn set_working_directory(&self, params: MetadataSetWorkingDirectoryRequest) -> Result { + pub async fn set_working_directory( + &self, + params: MetadataSetWorkingDirectoryRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_METADATA_SETWORKINGDIRECTORY, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_METADATA_SETWORKINGDIRECTORY, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -5221,13 +6390,22 @@ impl<'a> SessionRpcMetadata<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn recompute_context_tokens(&self, params: MetadataRecomputeContextTokensRequest) -> Result { + pub async fn recompute_context_tokens( + &self, + params: MetadataRecomputeContextTokensRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_METADATA_RECOMPUTECONTEXTTOKENS, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_METADATA_RECOMPUTECONTEXTTOKENS, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.mode.*` RPCs. @@ -5254,7 +6432,11 @@ impl<'a> SessionRpcMode<'a> { /// pub async fn get(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_MODE_GET, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_MODE_GET, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -5276,10 +6458,13 @@ impl<'a> SessionRpcMode<'a> { pub async fn set(&self, params: ModeSetRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_MODE_SET, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_MODE_SET, Some(wire_params)) + .await?; Ok(()) } - } /// `session.model.*` RPCs. @@ -5306,7 +6491,11 @@ impl<'a> SessionRpcModel<'a> { /// pub async fn get_current(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_MODEL_GETCURRENT, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_MODEL_GETCURRENT, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -5329,10 +6518,17 @@ impl<'a> SessionRpcModel<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn switch_to(&self, params: ModelSwitchToRequest) -> Result { + pub async fn switch_to( + &self, + params: ModelSwitchToRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_MODEL_SWITCHTO, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_MODEL_SWITCHTO, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -5355,10 +6551,20 @@ impl<'a> SessionRpcModel<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn set_reasoning_effort(&self, params: ModelSetReasoningEffortRequest) -> Result { + pub async fn set_reasoning_effort( + &self, + params: ModelSetReasoningEffortRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_MODEL_SETREASONINGEFFORT, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_MODEL_SETREASONINGEFFORT, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -5379,7 +6585,11 @@ impl<'a> SessionRpcModel<'a> { /// pub async fn list(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_MODEL_LIST, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_MODEL_LIST, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -5402,13 +6612,19 @@ impl<'a> SessionRpcModel<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn list_with_params(&self, params: ModelListRequest) -> Result { + pub async fn list_with_params( + &self, + params: ModelListRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_MODEL_LIST, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_MODEL_LIST, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.name.*` RPCs. @@ -5435,7 +6651,11 @@ impl<'a> SessionRpcName<'a> { /// pub async fn get(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_NAME_GET, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_NAME_GET, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -5457,7 +6677,11 @@ impl<'a> SessionRpcName<'a> { pub async fn set(&self, params: NameSetRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_NAME_SET, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_NAME_SET, Some(wire_params)) + .await?; Ok(()) } @@ -5483,10 +6707,13 @@ impl<'a> SessionRpcName<'a> { pub async fn set_auto(&self, params: NameSetAutoRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_NAME_SETAUTO, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_NAME_SETAUTO, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.options.*` RPCs. @@ -5515,13 +6742,19 @@ impl<'a> SessionRpcOptions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn update(&self, params: SessionUpdateOptionsParams) -> Result { + pub async fn update( + &self, + params: SessionUpdateOptionsParams, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_OPTIONS_UPDATE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_OPTIONS_UPDATE, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.permissions.*` RPCs. @@ -5533,22 +6766,30 @@ pub struct SessionRpcPermissions<'a> { impl<'a> SessionRpcPermissions<'a> { /// `session.permissions.folderTrust.*` sub-namespace. pub fn folder_trust(&self) -> SessionRpcPermissionsFolderTrust<'a> { - SessionRpcPermissionsFolderTrust { session: self.session } + SessionRpcPermissionsFolderTrust { + session: self.session, + } } /// `session.permissions.locations.*` sub-namespace. pub fn locations(&self) -> SessionRpcPermissionsLocations<'a> { - SessionRpcPermissionsLocations { session: self.session } + SessionRpcPermissionsLocations { + session: self.session, + } } /// `session.permissions.paths.*` sub-namespace. pub fn paths(&self) -> SessionRpcPermissionsPaths<'a> { - SessionRpcPermissionsPaths { session: self.session } + SessionRpcPermissionsPaths { + session: self.session, + } } /// `session.permissions.urls.*` sub-namespace. pub fn urls(&self) -> SessionRpcPermissionsUrls<'a> { - SessionRpcPermissionsUrls { session: self.session } + SessionRpcPermissionsUrls { + session: self.session, + } } /// Replaces selected permission policy fields (rules, paths, URLs, exclusions, allow-all flags) on the session. @@ -5570,10 +6811,20 @@ impl<'a> SessionRpcPermissions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn configure(&self, params: PermissionsConfigureParams) -> Result { + pub async fn configure( + &self, + params: PermissionsConfigureParams, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_CONFIGURE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_PERMISSIONS_CONFIGURE, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -5596,10 +6847,20 @@ impl<'a> SessionRpcPermissions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn handle_pending_permission_request(&self, params: PermissionDecisionRequest) -> Result { + pub async fn handle_pending_permission_request( + &self, + params: PermissionDecisionRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_HANDLEPENDINGPERMISSIONREQUEST, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_PERMISSIONS_HANDLEPENDINGPERMISSIONREQUEST, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -5620,7 +6881,14 @@ impl<'a> SessionRpcPermissions<'a> { /// pub async fn pending_requests(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_PENDINGREQUESTS, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_PERMISSIONS_PENDINGREQUESTS, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -5643,10 +6911,20 @@ impl<'a> SessionRpcPermissions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn set_approve_all(&self, params: PermissionsSetApproveAllRequest) -> Result { + pub async fn set_approve_all( + &self, + params: PermissionsSetApproveAllRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_SETAPPROVEALL, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_PERMISSIONS_SETAPPROVEALL, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -5669,10 +6947,20 @@ impl<'a> SessionRpcPermissions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn set_allow_all(&self, params: PermissionsSetAllowAllRequest) -> Result { + pub async fn set_allow_all( + &self, + params: PermissionsSetAllowAllRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_SETALLOWALL, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_PERMISSIONS_SETALLOWALL, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -5693,7 +6981,14 @@ impl<'a> SessionRpcPermissions<'a> { /// pub async fn get_allow_all(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_GETALLOWALL, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_PERMISSIONS_GETALLOWALL, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -5716,10 +7011,20 @@ impl<'a> SessionRpcPermissions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn modify_rules(&self, params: PermissionsModifyRulesParams) -> Result { + pub async fn modify_rules( + &self, + params: PermissionsModifyRulesParams, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_MODIFYRULES, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_PERMISSIONS_MODIFYRULES, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -5742,10 +7047,20 @@ impl<'a> SessionRpcPermissions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn set_required(&self, params: PermissionsSetRequiredRequest) -> Result { + pub async fn set_required( + &self, + params: PermissionsSetRequiredRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_SETREQUIRED, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_PERMISSIONS_SETREQUIRED, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -5768,10 +7083,20 @@ impl<'a> SessionRpcPermissions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn reset_session_approvals(&self, params: PermissionsResetSessionApprovalsRequest) -> Result { + pub async fn reset_session_approvals( + &self, + params: PermissionsResetSessionApprovalsRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_RESETSESSIONAPPROVALS, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_PERMISSIONS_RESETSESSIONAPPROVALS, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -5794,13 +7119,22 @@ impl<'a> SessionRpcPermissions<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn notify_prompt_shown(&self, params: PermissionPromptShownNotification) -> Result { + pub async fn notify_prompt_shown( + &self, + params: PermissionPromptShownNotification, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_NOTIFYPROMPTSHOWN, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_PERMISSIONS_NOTIFYPROMPTSHOWN, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.permissions.folderTrust.*` RPCs. @@ -5829,10 +7163,20 @@ impl<'a> SessionRpcPermissionsFolderTrust<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn is_trusted(&self, params: FolderTrustCheckParams) -> Result { + pub async fn is_trusted( + &self, + params: FolderTrustCheckParams, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_FOLDERTRUST_ISTRUSTED, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_PERMISSIONS_FOLDERTRUST_ISTRUSTED, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -5855,13 +7199,22 @@ impl<'a> SessionRpcPermissionsFolderTrust<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn add_trusted(&self, params: FolderTrustAddParams) -> Result { + pub async fn add_trusted( + &self, + params: FolderTrustAddParams, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_FOLDERTRUST_ADDTRUSTED, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_PERMISSIONS_FOLDERTRUST_ADDTRUSTED, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.permissions.locations.*` RPCs. @@ -5890,10 +7243,20 @@ impl<'a> SessionRpcPermissionsLocations<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn resolve(&self, params: PermissionLocationResolveParams) -> Result { + pub async fn resolve( + &self, + params: PermissionLocationResolveParams, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_LOCATIONS_RESOLVE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_PERMISSIONS_LOCATIONS_RESOLVE, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -5916,10 +7279,20 @@ impl<'a> SessionRpcPermissionsLocations<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn apply(&self, params: PermissionLocationApplyParams) -> Result { + pub async fn apply( + &self, + params: PermissionLocationApplyParams, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_LOCATIONS_APPLY, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_PERMISSIONS_LOCATIONS_APPLY, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -5942,13 +7315,22 @@ impl<'a> SessionRpcPermissionsLocations<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn add_tool_approval(&self, params: PermissionLocationAddToolApprovalParams) -> Result { + pub async fn add_tool_approval( + &self, + params: PermissionLocationAddToolApprovalParams, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_LOCATIONS_ADDTOOLAPPROVAL, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_PERMISSIONS_LOCATIONS_ADDTOOLAPPROVAL, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.permissions.paths.*` RPCs. @@ -5975,7 +7357,14 @@ impl<'a> SessionRpcPermissionsPaths<'a> { /// pub async fn list(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_PATHS_LIST, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_PERMISSIONS_PATHS_LIST, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -5998,10 +7387,20 @@ impl<'a> SessionRpcPermissionsPaths<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn add(&self, params: PermissionPathsAddParams) -> Result { + pub async fn add( + &self, + params: PermissionPathsAddParams, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_PATHS_ADD, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_PERMISSIONS_PATHS_ADD, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -6024,10 +7423,20 @@ impl<'a> SessionRpcPermissionsPaths<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn update_primary(&self, params: PermissionPathsUpdatePrimaryParams) -> Result { + pub async fn update_primary( + &self, + params: PermissionPathsUpdatePrimaryParams, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_PATHS_UPDATEPRIMARY, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_PERMISSIONS_PATHS_UPDATEPRIMARY, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -6050,10 +7459,20 @@ impl<'a> SessionRpcPermissionsPaths<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn is_path_within_allowed_directories(&self, params: PermissionPathsAllowedCheckParams) -> Result { + pub async fn is_path_within_allowed_directories( + &self, + params: PermissionPathsAllowedCheckParams, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_PATHS_ISPATHWITHINALLOWEDDIRECTORIES, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_PERMISSIONS_PATHS_ISPATHWITHINALLOWEDDIRECTORIES, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -6076,13 +7495,22 @@ impl<'a> SessionRpcPermissionsPaths<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn is_path_within_workspace(&self, params: PermissionPathsWorkspaceCheckParams) -> Result { + pub async fn is_path_within_workspace( + &self, + params: PermissionPathsWorkspaceCheckParams, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_PATHS_ISPATHWITHINWORKSPACE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_PERMISSIONS_PATHS_ISPATHWITHINWORKSPACE, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.permissions.urls.*` RPCs. @@ -6111,13 +7539,22 @@ impl<'a> SessionRpcPermissionsUrls<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn set_unrestricted_mode(&self, params: PermissionUrlsSetUnrestrictedModeParams) -> Result { + pub async fn set_unrestricted_mode( + &self, + params: PermissionUrlsSetUnrestrictedModeParams, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_PERMISSIONS_URLS_SETUNRESTRICTEDMODE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_PERMISSIONS_URLS_SETUNRESTRICTEDMODE, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.plan.*` RPCs. @@ -6144,7 +7581,11 @@ impl<'a> SessionRpcPlan<'a> { /// pub async fn read(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_PLAN_READ, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_PLAN_READ, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -6166,7 +7607,11 @@ impl<'a> SessionRpcPlan<'a> { pub async fn update(&self, params: PlanUpdateRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_PLAN_UPDATE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_PLAN_UPDATE, Some(wire_params)) + .await?; Ok(()) } @@ -6183,7 +7628,11 @@ impl<'a> SessionRpcPlan<'a> { /// pub async fn delete(&self) -> Result<(), Error> { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_PLAN_DELETE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_PLAN_DELETE, Some(wire_params)) + .await?; Ok(()) } @@ -6204,7 +7653,11 @@ impl<'a> SessionRpcPlan<'a> { /// pub async fn read_sql_todos(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_PLAN_READSQLTODOS, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_PLAN_READSQLTODOS, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -6223,12 +7676,20 @@ impl<'a> SessionRpcPlan<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn read_sql_todos_with_dependencies(&self) -> Result { + pub async fn read_sql_todos_with_dependencies( + &self, + ) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_PLAN_READSQLTODOSWITHDEPENDENCIES, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_PLAN_READSQLTODOSWITHDEPENDENCIES, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.plugins.*` RPCs. @@ -6255,7 +7716,11 @@ impl<'a> SessionRpcPlugins<'a> { /// pub async fn list(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_PLUGINS_LIST, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_PLUGINS_LIST, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -6272,7 +7737,11 @@ impl<'a> SessionRpcPlugins<'a> { /// pub async fn reload(&self) -> Result<(), Error> { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_PLUGINS_RELOAD, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_PLUGINS_RELOAD, Some(wire_params)) + .await?; Ok(()) } @@ -6294,10 +7763,13 @@ impl<'a> SessionRpcPlugins<'a> { pub async fn reload_with_params(&self, params: PluginsReloadRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_PLUGINS_RELOAD, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_PLUGINS_RELOAD, Some(wire_params)) + .await?; Ok(()) } - } /// `session.provider.*` RPCs. @@ -6324,7 +7796,11 @@ impl<'a> SessionRpcProvider<'a> { /// pub async fn get_endpoint(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_PROVIDER_GETENDPOINT, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_PROVIDER_GETENDPOINT, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -6347,10 +7823,17 @@ impl<'a> SessionRpcProvider<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn get_endpoint_with_params(&self, params: ProviderGetEndpointRequest) -> Result { + pub async fn get_endpoint_with_params( + &self, + params: ProviderGetEndpointRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_PROVIDER_GETENDPOINT, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_PROVIDER_GETENDPOINT, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -6376,10 +7859,13 @@ impl<'a> SessionRpcProvider<'a> { pub async fn add(&self, params: ProviderAddRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_PROVIDER_ADD, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_PROVIDER_ADD, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.queue.*` RPCs. @@ -6406,7 +7892,11 @@ impl<'a> SessionRpcQueue<'a> { /// pub async fn pending_items(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_QUEUE_PENDINGITEMS, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_QUEUE_PENDINGITEMS, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -6427,7 +7917,11 @@ impl<'a> SessionRpcQueue<'a> { /// pub(crate) async fn snapshot(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_QUEUE_SNAPSHOT, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_QUEUE_SNAPSHOT, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -6450,10 +7944,17 @@ impl<'a> SessionRpcQueue<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn move_item(&self, params: QueueMoveItemRequest) -> Result { + pub async fn move_item( + &self, + params: QueueMoveItemRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_QUEUE_MOVEITEM, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_QUEUE_MOVEITEM, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -6476,10 +7977,17 @@ impl<'a> SessionRpcQueue<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn insert_at(&self, params: QueueInsertAtRequest) -> Result { + pub async fn insert_at( + &self, + params: QueueInsertAtRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_QUEUE_INSERTAT, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_QUEUE_INSERTAT, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -6502,10 +8010,17 @@ impl<'a> SessionRpcQueue<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn remove_at(&self, params: QueueRemoveAtRequest) -> Result { + pub async fn remove_at( + &self, + params: QueueRemoveAtRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_QUEUE_REMOVEAT, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_QUEUE_REMOVEAT, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -6528,10 +8043,17 @@ impl<'a> SessionRpcQueue<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn update_text(&self, params: QueueUpdateTextRequest) -> Result { + pub async fn update_text( + &self, + params: QueueUpdateTextRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_QUEUE_UPDATETEXT, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_QUEUE_UPDATETEXT, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -6554,10 +8076,17 @@ impl<'a> SessionRpcQueue<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn duplicate_at(&self, params: QueueDuplicateAtRequest) -> Result { + pub async fn duplicate_at( + &self, + params: QueueDuplicateAtRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_QUEUE_DUPLICATEAT, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_QUEUE_DUPLICATEAT, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -6579,7 +8108,11 @@ impl<'a> SessionRpcQueue<'a> { pub async fn set_drain_paused(&self, params: QueueSetDrainPausedRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_QUEUE_SETDRAINPAUSED, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_QUEUE_SETDRAINPAUSED, Some(wire_params)) + .await?; Ok(()) } @@ -6605,7 +8138,11 @@ impl<'a> SessionRpcQueue<'a> { pub async fn send_now(&self, params: QueueSendNowRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_QUEUE_SENDNOW, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_QUEUE_SENDNOW, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -6626,7 +8163,11 @@ impl<'a> SessionRpcQueue<'a> { /// pub(crate) async fn has_pending(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_QUEUE_HASPENDING, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_QUEUE_HASPENDING, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -6649,10 +8190,20 @@ impl<'a> SessionRpcQueue<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn begin_deferred_idle_drain(&self, params: QueueBeginDeferredIdleDrainRequest) -> Result { + pub(crate) async fn begin_deferred_idle_drain( + &self, + params: QueueBeginDeferredIdleDrainRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_QUEUE_BEGINDEFERREDIDLEDRAIN, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_QUEUE_BEGINDEFERREDIDLEDRAIN, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -6675,10 +8226,20 @@ impl<'a> SessionRpcQueue<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn finish_deferred_idle_drain(&self, params: QueueFinishDeferredIdleDrainRequest) -> Result { + pub(crate) async fn finish_deferred_idle_drain( + &self, + params: QueueFinishDeferredIdleDrainRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_QUEUE_FINISHDEFERREDIDLEDRAIN, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_QUEUE_FINISHDEFERREDIDLEDRAIN, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -6697,10 +8258,20 @@ impl<'a> SessionRpcQueue<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn defer_session_idle(&self, params: QueueDeferSessionIdleRequest) -> Result<(), Error> { + pub(crate) async fn defer_session_idle( + &self, + params: QueueDeferSessionIdleRequest, + ) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_QUEUE_DEFERSESSIONIDLE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_QUEUE_DEFERSESSIONIDLE, + Some(wire_params), + ) + .await?; Ok(()) } @@ -6721,7 +8292,14 @@ impl<'a> SessionRpcQueue<'a> { /// pub async fn remove_most_recent(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_QUEUE_REMOVEMOSTRECENT, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_QUEUE_REMOVEMOSTRECENT, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -6738,7 +8316,11 @@ impl<'a> SessionRpcQueue<'a> { /// pub async fn clear(&self) -> Result<(), Error> { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_QUEUE_CLEAR, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_QUEUE_CLEAR, Some(wire_params)) + .await?; Ok(()) } @@ -6761,10 +8343,20 @@ impl<'a> SessionRpcQueue<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn consume_system_notifications(&self, params: QueueConsumeSystemNotificationsRequest) -> Result { + pub(crate) async fn consume_system_notifications( + &self, + params: QueueConsumeSystemNotificationsRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_QUEUE_CONSUMESYSTEMNOTIFICATIONS, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_QUEUE_CONSUMESYSTEMNOTIFICATIONS, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -6783,9 +8375,18 @@ impl<'a> SessionRpcQueue<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn enqueue_resume_pending(&self) -> Result { + pub(crate) async fn enqueue_resume_pending( + &self, + ) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_QUEUE_ENQUEUERESUMEPENDING, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_QUEUE_ENQUEUERESUMEPENDING, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -6802,10 +8403,13 @@ impl<'a> SessionRpcQueue<'a> { /// pub(crate) async fn process(&self) -> Result<(), Error> { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_QUEUE_PROCESS, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_QUEUE_PROCESS, Some(wire_params)) + .await?; Ok(()) } - } /// `session.remote.*` RPCs. @@ -6837,7 +8441,11 @@ impl<'a> SessionRpcRemote<'a> { pub async fn enable(&self, params: RemoteEnableRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_REMOTE_ENABLE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_REMOTE_ENABLE, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -6854,7 +8462,11 @@ impl<'a> SessionRpcRemote<'a> { /// pub async fn disable(&self) -> Result<(), Error> { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_REMOTE_DISABLE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_REMOTE_DISABLE, Some(wire_params)) + .await?; Ok(()) } @@ -6877,13 +8489,22 @@ impl<'a> SessionRpcRemote<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn notify_steerable_changed(&self, params: RemoteNotifySteerableChangedRequest) -> Result { + pub async fn notify_steerable_changed( + &self, + params: RemoteNotifySteerableChangedRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_REMOTE_NOTIFYSTEERABLECHANGED, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_REMOTE_NOTIFYSTEERABLECHANGED, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.schedule.*` RPCs. @@ -6910,7 +8531,11 @@ impl<'a> SessionRpcSchedule<'a> { /// pub async fn list(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_SCHEDULE_LIST, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_SCHEDULE_LIST, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -6927,7 +8552,11 @@ impl<'a> SessionRpcSchedule<'a> { /// pub(crate) async fn hydrate(&self) -> Result<(), Error> { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_SCHEDULE_HYDRATE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_SCHEDULE_HYDRATE, Some(wire_params)) + .await?; Ok(()) } @@ -6948,7 +8577,14 @@ impl<'a> SessionRpcSchedule<'a> { /// pub(crate) async fn has_self_paced(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_SCHEDULE_HASSELFPACED, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_SCHEDULE_HASSELFPACED, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -6974,7 +8610,11 @@ impl<'a> SessionRpcSchedule<'a> { pub(crate) async fn add(&self, params: ScheduleAddRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_SCHEDULE_ADD, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_SCHEDULE_ADD, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -6997,10 +8637,17 @@ impl<'a> SessionRpcSchedule<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn add_cron(&self, params: ScheduleAddCronRequest) -> Result { + pub(crate) async fn add_cron( + &self, + params: ScheduleAddCronRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_SCHEDULE_ADDCRON, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_SCHEDULE_ADDCRON, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -7023,10 +8670,17 @@ impl<'a> SessionRpcSchedule<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn add_at(&self, params: ScheduleAddAtRequest) -> Result { + pub(crate) async fn add_at( + &self, + params: ScheduleAddAtRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_SCHEDULE_ADDAT, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_SCHEDULE_ADDAT, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -7049,10 +8703,20 @@ impl<'a> SessionRpcSchedule<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn add_self_paced(&self, params: ScheduleAddSelfPacedRequest) -> Result { + pub(crate) async fn add_self_paced( + &self, + params: ScheduleAddSelfPacedRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_SCHEDULE_ADDSELFPACED, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_SCHEDULE_ADDSELFPACED, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -7075,10 +8739,20 @@ impl<'a> SessionRpcSchedule<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn rearm_self_paced(&self, params: ScheduleRearmSelfPacedRequest) -> Result { + pub(crate) async fn rearm_self_paced( + &self, + params: ScheduleRearmSelfPacedRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_SCHEDULE_REARMSELFPACED, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_SCHEDULE_REARMSELFPACED, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -7104,10 +8778,13 @@ impl<'a> SessionRpcSchedule<'a> { pub async fn stop(&self, params: ScheduleStopRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_SCHEDULE_STOP, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_SCHEDULE_STOP, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.settings.*` RPCs. @@ -7134,7 +8811,11 @@ impl<'a> SessionRpcSettings<'a> { /// pub(crate) async fn snapshot(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_SETTINGS_SNAPSHOT, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_SETTINGS_SNAPSHOT, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -7157,13 +8838,22 @@ impl<'a> SessionRpcSettings<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub(crate) async fn evaluate_predicate(&self, params: SessionSettingsEvaluatePredicateRequest) -> Result { + pub(crate) async fn evaluate_predicate( + &self, + params: SessionSettingsEvaluatePredicateRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_SETTINGS_EVALUATEPREDICATE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_SETTINGS_EVALUATEPREDICATE, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.shell.*` RPCs. @@ -7195,7 +8885,11 @@ impl<'a> SessionRpcShell<'a> { pub async fn exec(&self, params: ShellExecRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_SHELL_EXEC, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_SHELL_EXEC, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -7221,7 +8915,11 @@ impl<'a> SessionRpcShell<'a> { pub async fn kill(&self, params: ShellKillRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_SHELL_KILL, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_SHELL_KILL, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -7244,10 +8942,20 @@ impl<'a> SessionRpcShell<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn execute_user_requested(&self, params: ShellExecuteUserRequestedRequest) -> Result { + pub async fn execute_user_requested( + &self, + params: ShellExecuteUserRequestedRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_SHELL_EXECUTEUSERREQUESTED, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_SHELL_EXECUTEUSERREQUESTED, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -7270,13 +8978,22 @@ impl<'a> SessionRpcShell<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn cancel_user_requested(&self, params: ShellCancelUserRequestedRequest) -> Result { + pub async fn cancel_user_requested( + &self, + params: ShellCancelUserRequestedRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_SHELL_CANCELUSERREQUESTED, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_SHELL_CANCELUSERREQUESTED, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.skills.*` RPCs. @@ -7303,7 +9020,11 @@ impl<'a> SessionRpcSkills<'a> { /// pub async fn list(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_SKILLS_LIST, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_SKILLS_LIST, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -7324,7 +9045,11 @@ impl<'a> SessionRpcSkills<'a> { /// pub async fn get_invoked(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_SKILLS_GETINVOKED, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_SKILLS_GETINVOKED, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -7346,7 +9071,11 @@ impl<'a> SessionRpcSkills<'a> { pub async fn enable(&self, params: SkillsEnableRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_SKILLS_ENABLE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_SKILLS_ENABLE, Some(wire_params)) + .await?; Ok(()) } @@ -7368,7 +9097,11 @@ impl<'a> SessionRpcSkills<'a> { pub async fn disable(&self, params: SkillsDisableRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_SKILLS_DISABLE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_SKILLS_DISABLE, Some(wire_params)) + .await?; Ok(()) } @@ -7389,7 +9122,11 @@ impl<'a> SessionRpcSkills<'a> { /// pub async fn reload(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_SKILLS_RELOAD, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_SKILLS_RELOAD, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -7406,10 +9143,13 @@ impl<'a> SessionRpcSkills<'a> { /// pub async fn ensure_loaded(&self) -> Result<(), Error> { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_SKILLS_ENSURELOADED, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_SKILLS_ENSURELOADED, Some(wire_params)) + .await?; Ok(()) } - } /// `session.tasks.*` RPCs. @@ -7438,10 +9178,17 @@ impl<'a> SessionRpcTasks<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn start_agent(&self, params: TasksStartAgentRequest) -> Result { + pub async fn start_agent( + &self, + params: TasksStartAgentRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_TASKS_STARTAGENT, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_TASKS_STARTAGENT, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -7462,7 +9209,11 @@ impl<'a> SessionRpcTasks<'a> { /// pub async fn list(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_TASKS_LIST, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_TASKS_LIST, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -7483,7 +9234,11 @@ impl<'a> SessionRpcTasks<'a> { /// pub async fn refresh(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_TASKS_REFRESH, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_TASKS_REFRESH, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -7504,7 +9259,11 @@ impl<'a> SessionRpcTasks<'a> { /// pub async fn wait_for_pending(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_TASKS_WAITFORPENDING, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_TASKS_WAITFORPENDING, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -7527,10 +9286,17 @@ impl<'a> SessionRpcTasks<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn get_progress(&self, params: TasksGetProgressRequest) -> Result { + pub async fn get_progress( + &self, + params: TasksGetProgressRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_TASKS_GETPROGRESS, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_TASKS_GETPROGRESS, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -7551,7 +9317,14 @@ impl<'a> SessionRpcTasks<'a> { /// pub async fn get_current_promotable(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_TASKS_GETCURRENTPROMOTABLE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_TASKS_GETCURRENTPROMOTABLE, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -7574,10 +9347,20 @@ impl<'a> SessionRpcTasks<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn promote_to_background(&self, params: TasksPromoteToBackgroundRequest) -> Result { + pub async fn promote_to_background( + &self, + params: TasksPromoteToBackgroundRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_TASKS_PROMOTETOBACKGROUND, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_TASKS_PROMOTETOBACKGROUND, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -7596,9 +9379,18 @@ impl<'a> SessionRpcTasks<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn promote_current_to_background(&self) -> Result { + pub async fn promote_current_to_background( + &self, + ) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_TASKS_PROMOTECURRENTTOBACKGROUND, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_TASKS_PROMOTECURRENTTOBACKGROUND, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -7624,7 +9416,11 @@ impl<'a> SessionRpcTasks<'a> { pub async fn cancel(&self, params: TasksCancelRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_TASKS_CANCEL, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_TASKS_CANCEL, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -7650,7 +9446,11 @@ impl<'a> SessionRpcTasks<'a> { pub async fn remove(&self, params: TasksRemoveRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_TASKS_REMOVE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_TASKS_REMOVE, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -7673,13 +9473,19 @@ impl<'a> SessionRpcTasks<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn send_message(&self, params: TasksSendMessageRequest) -> Result { + pub async fn send_message( + &self, + params: TasksSendMessageRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_TASKS_SENDMESSAGE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_TASKS_SENDMESSAGE, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.telemetry.*` RPCs. @@ -7706,7 +9512,14 @@ impl<'a> SessionRpcTelemetry<'a> { /// pub async fn get_engagement_id(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_TELEMETRY_GETENGAGEMENTID, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_TELEMETRY_GETENGAGEMENTID, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -7725,13 +9538,22 @@ impl<'a> SessionRpcTelemetry<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn set_feature_overrides(&self, params: TelemetrySetFeatureOverridesRequest) -> Result<(), Error> { + pub async fn set_feature_overrides( + &self, + params: TelemetrySetFeatureOverridesRequest, + ) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_TELEMETRY_SETFEATUREOVERRIDES, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_TELEMETRY_SETFEATUREOVERRIDES, + Some(wire_params), + ) + .await?; Ok(()) } - } /// `session.tools.*` RPCs. @@ -7760,10 +9582,20 @@ impl<'a> SessionRpcTools<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn handle_pending_tool_call(&self, params: HandlePendingToolCallRequest) -> Result { + pub async fn handle_pending_tool_call( + &self, + params: HandlePendingToolCallRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_TOOLS_HANDLEPENDINGTOOLCALL, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_TOOLS_HANDLEPENDINGTOOLCALL, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -7784,7 +9616,14 @@ impl<'a> SessionRpcTools<'a> { /// pub async fn initialize_and_validate(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_TOOLS_INITIALIZEANDVALIDATE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_TOOLS_INITIALIZEANDVALIDATE, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -7805,7 +9644,14 @@ impl<'a> SessionRpcTools<'a> { /// pub async fn get_current_metadata(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_TOOLS_GETCURRENTMETADATA, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_TOOLS_GETCURRENTMETADATA, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -7828,13 +9674,22 @@ impl<'a> SessionRpcTools<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn update_subagent_settings(&self, params: UpdateSubagentSettingsRequest) -> Result { + pub async fn update_subagent_settings( + &self, + params: UpdateSubagentSettingsRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_TOOLS_UPDATESUBAGENTSETTINGS, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_TOOLS_UPDATESUBAGENTSETTINGS, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.ui.*` RPCs. @@ -7863,10 +9718,17 @@ impl<'a> SessionRpcUi<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn ephemeral_query(&self, params: UIEphemeralQueryRequest) -> Result { + pub async fn ephemeral_query( + &self, + params: UIEphemeralQueryRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_UI_EPHEMERALQUERY, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_UI_EPHEMERALQUERY, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -7889,10 +9751,17 @@ impl<'a> SessionRpcUi<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn elicitation(&self, params: UIElicitationRequest) -> Result { + pub async fn elicitation( + &self, + params: UIElicitationRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_UI_ELICITATION, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_UI_ELICITATION, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -7915,10 +9784,20 @@ impl<'a> SessionRpcUi<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn handle_pending_elicitation(&self, params: UIHandlePendingElicitationRequest) -> Result { + pub async fn handle_pending_elicitation( + &self, + params: UIHandlePendingElicitationRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_UI_HANDLEPENDINGELICITATION, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_UI_HANDLEPENDINGELICITATION, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -7941,10 +9820,20 @@ impl<'a> SessionRpcUi<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn handle_pending_user_input(&self, params: UIHandlePendingUserInputRequest) -> Result { + pub async fn handle_pending_user_input( + &self, + params: UIHandlePendingUserInputRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_UI_HANDLEPENDINGUSERINPUT, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_UI_HANDLEPENDINGUSERINPUT, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -7967,10 +9856,20 @@ impl<'a> SessionRpcUi<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn handle_pending_sampling(&self, params: UIHandlePendingSamplingRequest) -> Result { + pub async fn handle_pending_sampling( + &self, + params: UIHandlePendingSamplingRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_UI_HANDLEPENDINGSAMPLING, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_UI_HANDLEPENDINGSAMPLING, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -7993,10 +9892,20 @@ impl<'a> SessionRpcUi<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn handle_pending_auto_mode_switch(&self, params: UIHandlePendingAutoModeSwitchRequest) -> Result { + pub async fn handle_pending_auto_mode_switch( + &self, + params: UIHandlePendingAutoModeSwitchRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_UI_HANDLEPENDINGAUTOMODESWITCH, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_UI_HANDLEPENDINGAUTOMODESWITCH, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -8019,10 +9928,20 @@ impl<'a> SessionRpcUi<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn handle_pending_session_limits_exhausted(&self, params: UIHandlePendingSessionLimitsExhaustedRequest) -> Result { + pub async fn handle_pending_session_limits_exhausted( + &self, + params: UIHandlePendingSessionLimitsExhaustedRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_UI_HANDLEPENDINGSESSIONLIMITSEXHAUSTED, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_UI_HANDLEPENDINGSESSIONLIMITSEXHAUSTED, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -8045,10 +9964,20 @@ impl<'a> SessionRpcUi<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn handle_pending_exit_plan_mode(&self, params: UIHandlePendingExitPlanModeRequest) -> Result { + pub async fn handle_pending_exit_plan_mode( + &self, + params: UIHandlePendingExitPlanModeRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_UI_HANDLEPENDINGEXITPLANMODE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_UI_HANDLEPENDINGEXITPLANMODE, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -8067,9 +9996,18 @@ impl<'a> SessionRpcUi<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn register_direct_auto_mode_switch_handler(&self) -> Result { + pub async fn register_direct_auto_mode_switch_handler( + &self, + ) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_UI_REGISTERDIRECTAUTOMODESWITCHHANDLER, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_UI_REGISTERDIRECTAUTOMODESWITCHHANDLER, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -8092,13 +10030,22 @@ impl<'a> SessionRpcUi<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn unregister_direct_auto_mode_switch_handler(&self, params: UIUnregisterDirectAutoModeSwitchHandlerRequest) -> Result { + pub async fn unregister_direct_auto_mode_switch_handler( + &self, + params: UIUnregisterDirectAutoModeSwitchHandlerRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_UI_UNREGISTERDIRECTAUTOMODESWITCHHANDLER, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_UI_UNREGISTERDIRECTAUTOMODESWITCHHANDLER, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.usage.*` RPCs. @@ -8125,10 +10072,13 @@ impl<'a> SessionRpcUsage<'a> { /// pub async fn get_metrics(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_USAGE_GETMETRICS, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_USAGE_GETMETRICS, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.visibility.*` RPCs. @@ -8155,7 +10105,11 @@ impl<'a> SessionRpcVisibility<'a> { /// pub async fn get(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_VISIBILITY_GET, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_VISIBILITY_GET, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -8181,10 +10135,13 @@ impl<'a> SessionRpcVisibility<'a> { pub async fn set(&self, params: VisibilitySetRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_VISIBILITY_SET, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_VISIBILITY_SET, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } - } /// `session.workspaces.*` RPCs. @@ -8211,7 +10168,14 @@ impl<'a> SessionRpcWorkspaces<'a> { /// pub async fn get_workspace(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_WORKSPACES_GETWORKSPACE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_WORKSPACES_GETWORKSPACE, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -8234,10 +10198,20 @@ impl<'a> SessionRpcWorkspaces<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn update_metadata(&self, params: WorkspacesUpdateMetadataRequest) -> Result { + pub async fn update_metadata( + &self, + params: WorkspacesUpdateMetadataRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_WORKSPACES_UPDATEMETADATA, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_WORKSPACES_UPDATEMETADATA, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -8260,10 +10234,17 @@ impl<'a> SessionRpcWorkspaces<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn ensure(&self, params: WorkspacesEnsureRequest) -> Result { + pub async fn ensure( + &self, + params: WorkspacesEnsureRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_WORKSPACES_ENSURE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_WORKSPACES_ENSURE, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -8284,7 +10265,11 @@ impl<'a> SessionRpcWorkspaces<'a> { /// pub async fn list_files(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_WORKSPACES_LISTFILES, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_WORKSPACES_LISTFILES, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -8307,10 +10292,17 @@ impl<'a> SessionRpcWorkspaces<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn read_file(&self, params: WorkspacesReadFileRequest) -> Result { + pub async fn read_file( + &self, + params: WorkspacesReadFileRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_WORKSPACES_READFILE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_WORKSPACES_READFILE, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } @@ -8332,7 +10324,14 @@ impl<'a> SessionRpcWorkspaces<'a> { pub async fn create_file(&self, params: WorkspacesCreateFileRequest) -> Result<(), Error> { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_WORKSPACES_CREATEFILE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_WORKSPACES_CREATEFILE, + Some(wire_params), + ) + .await?; Ok(()) } @@ -8353,7 +10352,14 @@ impl<'a> SessionRpcWorkspaces<'a> { /// pub async fn list_checkpoints(&self) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_WORKSPACES_LISTCHECKPOINTS, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_WORKSPACES_LISTCHECKPOINTS, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -8376,10 +10382,20 @@ impl<'a> SessionRpcWorkspaces<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn read_checkpoint(&self, params: WorkspacesReadCheckpointRequest) -> Result { + pub async fn read_checkpoint( + &self, + params: WorkspacesReadCheckpointRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_WORKSPACES_READCHECKPOINT, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_WORKSPACES_READCHECKPOINT, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -8402,10 +10418,20 @@ impl<'a> SessionRpcWorkspaces<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn add_summary(&self, params: WorkspacesAddSummaryRequest) -> Result { + pub async fn add_summary( + &self, + params: WorkspacesAddSummaryRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_WORKSPACES_ADDSUMMARY, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_WORKSPACES_ADDSUMMARY, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -8428,10 +10454,20 @@ impl<'a> SessionRpcWorkspaces<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn truncate_summaries(&self, params: WorkspacesTruncateSummariesRequest) -> Result { + pub async fn truncate_summaries( + &self, + params: WorkspacesTruncateSummariesRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_WORKSPACES_TRUNCATESUMMARIES, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_WORKSPACES_TRUNCATESUMMARIES, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -8450,9 +10486,18 @@ impl<'a> SessionRpcWorkspaces<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn read_autopilot_objective(&self) -> Result { + pub async fn read_autopilot_objective( + &self, + ) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_WORKSPACES_READAUTOPILOTOBJECTIVE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_WORKSPACES_READAUTOPILOTOBJECTIVE, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -8475,10 +10520,20 @@ impl<'a> SessionRpcWorkspaces<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn write_autopilot_objective(&self, params: WorkspacesWriteAutopilotObjectiveRequest) -> Result { + pub async fn write_autopilot_objective( + &self, + params: WorkspacesWriteAutopilotObjectiveRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_WORKSPACES_WRITEAUTOPILOTOBJECTIVE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_WORKSPACES_WRITEAUTOPILOTOBJECTIVE, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -8497,9 +10552,18 @@ impl<'a> SessionRpcWorkspaces<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn delete_autopilot_objective(&self) -> Result { + pub async fn delete_autopilot_objective( + &self, + ) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_WORKSPACES_DELETEAUTOPILOTOBJECTIVE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_WORKSPACES_DELETEAUTOPILOTOBJECTIVE, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -8518,9 +10582,18 @@ impl<'a> SessionRpcWorkspaces<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn autopilot_objective_exists(&self) -> Result { + pub async fn autopilot_objective_exists( + &self, + ) -> Result { let wire_params = serde_json::json!({ "sessionId": self.session.id() }); - let _value = self.session.client().call(rpc_methods::SESSION_WORKSPACES_AUTOPILOTOBJECTIVEEXISTS, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_WORKSPACES_AUTOPILOTOBJECTIVEEXISTS, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -8543,10 +10616,20 @@ impl<'a> SessionRpcWorkspaces<'a> { /// SDK and CLI versions if your code depends on it. /// /// - pub async fn save_large_paste(&self, params: WorkspacesSaveLargePasteRequest) -> Result { + pub async fn save_large_paste( + &self, + params: WorkspacesSaveLargePasteRequest, + ) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_WORKSPACES_SAVELARGEPASTE, Some(wire_params)).await?; + let _value = self + .session + .client() + .call( + rpc_methods::SESSION_WORKSPACES_SAVELARGEPASTE, + Some(wire_params), + ) + .await?; Ok(serde_json::from_value(_value)?) } @@ -8572,8 +10655,11 @@ impl<'a> SessionRpcWorkspaces<'a> { pub async fn diff(&self, params: WorkspacesDiffRequest) -> Result { let mut wire_params = serde_json::to_value(params)?; wire_params["sessionId"] = serde_json::Value::String(self.session.id().to_string()); - let _value = self.session.client().call(rpc_methods::SESSION_WORKSPACES_DIFF, Some(wire_params)).await?; + let _value = self + .session + .client() + .call(rpc_methods::SESSION_WORKSPACES_DIFF, Some(wire_params)) + .await?; Ok(serde_json::from_value(_value)?) } - } diff --git a/rust/src/generated/session_events.rs b/rust/src/generated/session_events.rs index 893c178033..2aef5765ca 100644 --- a/rust/src/generated/session_events.rs +++ b/rust/src/generated/session_events.rs @@ -1033,8 +1033,7 @@ pub struct SessionPlanChangedData { /// Session event "session.todos_changed". Signal-only event: the agent's todos or todo_deps table was written to. No payload — clients should call session.plan.readSqlTodosWithDependencies() to fetch the current state. Events arrive in order; clients can debounce on arrival if needed. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionTodosChangedData { -} +pub struct SessionTodosChangedData {} /// Session event "session.workspace_file_changed". Workspace file change details including path and operation type #[derive(Debug, Clone, Default, Serialize, Deserialize)] @@ -1397,7 +1396,8 @@ pub(crate) struct CompactionCompleteCompactionTokensUsedCopilotUsage { /// Itemized token usage breakdown #[doc(hidden)] #[serde(skip_serializing_if = "Option::is_none")] - pub(crate) token_details: Option>, + pub(crate) token_details: + Option>, /// Total cost in nano-AI units for this request pub total_nano_aiu: f64, } @@ -1557,8 +1557,7 @@ pub struct UserMessageData { /// Session event "pending_messages.modified". Empty payload; the event signals that the pending message queue has changed #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct PendingMessagesModifiedData { -} +pub struct PendingMessagesModifiedData {} /// Session event "assistant.turn_start". Turn initialization metadata including identifier and interaction tracking #[derive(Debug, Clone, Default, Serialize, Deserialize)] @@ -2507,26 +2506,22 @@ pub struct ToolExecutionCompleteUIResourceMetaUICsp { /// Marker object for camera permission on an MCP Apps UI resource. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct ToolExecutionCompleteUIResourceMetaUIPermissionsCamera { -} +pub struct ToolExecutionCompleteUIResourceMetaUIPermissionsCamera {} /// Marker object for clipboard-write permission on an MCP Apps UI resource. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite { -} +pub struct ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite {} /// Marker object for geolocation permission on an MCP Apps UI resource. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation { -} +pub struct ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation {} /// Marker object for microphone permission on an MCP Apps UI resource. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone { -} +pub struct ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone {} /// Browser permission metadata for an MCP Apps UI resource, including camera, microphone, geolocation, and clipboard-write. #[derive(Debug, Clone, Default, Serialize, Deserialize)] @@ -2854,8 +2849,7 @@ pub struct SubagentSelectedData { /// Session event "subagent.deselected". Empty payload; the event signals that the custom agent was deselected, returning to the default agent #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SubagentDeselectedData { -} +pub struct SubagentDeselectedData {} /// Session event "hook.start". Hook invocation start details including type and input data #[derive(Debug, Clone, Default, Serialize, Deserialize)] @@ -4406,8 +4400,7 @@ pub struct SessionToolsUpdatedData { /// Session event "session.background_tasks_changed". Empty payload for `session.background_tasks_changed`, indicating background task state changed. #[derive(Debug, Clone, Default, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] -pub struct SessionBackgroundTasksChangedData { -} +pub struct SessionBackgroundTasksChangedData {} /// Session event "factory.run_updated". Ephemeral invalidation signal for a changed factory run. /// @@ -5919,7 +5912,9 @@ pub enum PermissionResult { ApprovedForLocation(PermissionApprovedForLocation), Cancelled(PermissionCancelled), DeniedByRules(PermissionDeniedByRules), - DeniedNoApprovalRuleAndCouldNotRequestFromUser(PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser), + DeniedNoApprovalRuleAndCouldNotRequestFromUser( + PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser, + ), DeniedInteractivelyByUser(PermissionDeniedInteractivelyByUser), DeniedByContentExclusionPolicy(PermissionDeniedByContentExclusionPolicy), DeniedByPermissionRequestHook(PermissionDeniedByPermissionRequestHook), diff --git a/scripts/codegen/csharp.ts b/scripts/codegen/csharp.ts index 808562630f..7070ce8448 100644 --- a/scripts/codegen/csharp.ts +++ b/scripts/codegen/csharp.ts @@ -896,6 +896,8 @@ function generateDerivedClass( const prop = propSchema as JSONSchema7; const csharpName = toCSharpPropertyName(propName, prop); const csharpType = propertyResolver(prop, className, csharpName, isReq, knownTypes, nestedClasses, enumOutput); + const hidingModifier = + propName === "managedApprovalRequired" && className.startsWith("PermissionRequest") ? "new " : ""; lines.push(...xmlDocPropertyComment(prop.description, propName, " ")); lines.push(...emitDataAnnotations(prop, " ", csharpType)); @@ -906,7 +908,7 @@ function generateDerivedClass( const propVisibility = pushCSharpInternalAttribute(lines, prop); lines.push(` [JsonPropertyName("${propName}")]`); const reqMod = isReq && !csharpType.endsWith("?") ? "required " : ""; - lines.push(` ${propVisibility} ${reqMod}${csharpType} ${csharpName} { get; set; }`, ""); + lines.push(` ${propVisibility} ${hidingModifier}${reqMod}${csharpType} ${csharpName} { get; set; }`, ""); } } From 7439562606ee795a4b139144b6af791934de9935 Mon Sep 17 00:00:00 2001 From: GitHub Copilot Date: Fri, 31 Jul 2026 15:17:26 +0000 Subject: [PATCH 33/41] Align managed approval helpers Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- go/README.md | 5 ++--- go/permissions.go | 7 +------ go/permissions_test.go | 15 +------------- go/session.go | 3 +-- go/types.go | 3 +-- nodejs/src/types.ts | 8 +++----- nodejs/test/client.test.ts | 12 ++++-------- nodejs/test/session-event-types.test.ts | 26 +++++++++++++++++++++++++ python/copilot/session.py | 8 +++----- python/test_managed_permissions.py | 25 +++++++++++++++++++----- 10 files changed, 62 insertions(+), 50 deletions(-) diff --git a/go/README.md b/go/README.md index bfd1eabe5e..c3c0425f8c 100644 --- a/go/README.md +++ b/go/README.md @@ -55,7 +55,6 @@ func main() { } defer client.Stop() - // ApproveAll is only valid when managed settings are disabled. session, err := client.CreateSession(context.Background(), &copilot.SessionConfig{ Model: "gpt-5", OnPermissionRequest: copilot.PermissionHandler.ApproveAll, @@ -222,7 +221,7 @@ Event types: `SessionLifecycleCreated`, `SessionLifecycleDeleted`, `SessionLifec - `Streaming` (*bool): Enable streaming delta events (nil = runtime default) - `InfiniteSessions` (\*InfiniteSessionConfig): Automatic context compaction configuration - `EnableSessionStore` (\*bool): Enables the cross-session store for search and retrieval across sessions. When unset in `ModeCopilotCli`, the runtime default applies (enabled). In `ModeEmpty`, defaults to disabled. -- `OnPermissionRequest` (PermissionHandlerFunc): Optional handler called before each tool execution to approve or deny it. When nil, permission requests are emitted as events and left pending for manual resolution. `copilot.PermissionHandler.ApproveAll` approves requests when managed settings are disabled and returns an error when `EnableManagedSettings` is true. Custom handlers can inspect `RequiresManagedApproval()` for human-facing confirmation logic. See [Permission Handling](#permission-handling) section. +- `OnPermissionRequest` (PermissionHandlerFunc): Optional handler called before each tool execution to approve or deny it. When nil, permission requests are emitted as events and left pending for manual resolution. `copilot.PermissionHandler.ApproveAll` approves ordinary requests and leaves managed requests pending. Custom handlers can inspect `RequiresManagedApproval()` for human-facing confirmation logic. See [Permission Handling](#permission-handling) section. - `OnUserInputRequest` (UserInputHandler): Handler for user input requests from the agent (enables ask_user tool). See [User Input Requests](#user-input-requests) section. - `Hooks` (\*SessionHooks): Hook handlers for session lifecycle events. See [Session Hooks](#session-hooks) section. - `Commands` ([]CommandDefinition): Slash-commands registered for this session. See [Commands](#commands) section. @@ -690,7 +689,7 @@ session, err := client.CreateSession(context.Background(), &copilot.SessionConfi }) ``` -When `EnableManagedSettings` is true for the session, `ApproveAll` returns an error on the first permission request. Use a custom handler for managed sessions; request-level `RequiresManagedApproval()` remains available for human-facing confirmation logic. +`ApproveAll` leaves requests with `RequiresManagedApproval()` pending and approves ordinary requests automatically. ### Custom Permission Handler diff --git a/go/permissions.go b/go/permissions.go index 24b9cc7f13..fde1a6951a 100644 --- a/go/permissions.go +++ b/go/permissions.go @@ -1,20 +1,15 @@ package copilot import ( - "errors" - "github.com/github/copilot-sdk/go/rpc" ) // PermissionHandler provides pre-built OnPermissionRequest implementations. var PermissionHandler = struct { - // ApproveAll approves permission requests when managed settings are disabled. + // ApproveAll approves permission requests unless managed approval is required. ApproveAll PermissionHandlerFunc }{ ApproveAll: func(request PermissionRequest, invocation PermissionInvocation) (rpc.PermissionDecision, error) { - if invocation.ManagedSettingsEnabled { - return nil, errors.New("approveAll cannot be used when managed settings are enabled") - } if request.RequiresManagedApproval() { return &rpc.PermissionDecisionNoResult{}, nil } diff --git a/go/permissions_test.go b/go/permissions_test.go index ed4c3a040b..83b2439f41 100644 --- a/go/permissions_test.go +++ b/go/permissions_test.go @@ -28,19 +28,6 @@ func TestPermissionEventExposesManagedApprovalRequired(t *testing.T) { } } -func TestApproveAllReturnsErrorWhenManagedSettingsEnabled(t *testing.T) { - decision, err := copilot.PermissionHandler.ApproveAll( - &copilot.PermissionRequestRead{}, - copilot.PermissionInvocation{SessionID: "session-1", ManagedSettingsEnabled: true}, - ) - if err == nil { - t.Fatal("expected an error") - } - if decision != nil { - t.Fatalf("expected no decision, got %T", decision) - } -} - func TestApproveAllApprovesOrdinaryRequest(t *testing.T) { decision, err := copilot.PermissionHandler.ApproveAll( &copilot.PermissionRequestRead{}, @@ -54,7 +41,7 @@ func TestApproveAllApprovesOrdinaryRequest(t *testing.T) { } } -func TestApproveAllLeavesManagedRequestPendingWhenSessionFlagIsAbsent(t *testing.T) { +func TestApproveAllLeavesManagedRequestPending(t *testing.T) { decision, err := copilot.PermissionHandler.ApproveAll( &copilot.PermissionRequestRead{ManagedApprovalRequired: ptrTo(true)}, copilot.PermissionInvocation{SessionID: "session-1"}, diff --git a/go/session.go b/go/session.go index 74e68cc7f3..9698a0fbfe 100644 --- a/go/session.go +++ b/go/session.go @@ -1600,8 +1600,7 @@ func (s *Session) executePermissionAndRespond(requestID string, permissionReques }() invocation := PermissionInvocation{ - SessionID: s.SessionID, - ManagedSettingsEnabled: s.managedSettings, + SessionID: s.SessionID, } decision, err := handler(permissionRequest, invocation) diff --git a/go/types.go b/go/types.go index d64aa77860..d1fc34ecd2 100644 --- a/go/types.go +++ b/go/types.go @@ -375,8 +375,7 @@ type PermissionHandlerFunc func(request PermissionRequest, invocation Permission // PermissionInvocation provides context about a permission request type PermissionInvocation struct { - SessionID string - ManagedSettingsEnabled bool + SessionID string } // MCPAuthWwwAuthenticateParams contains parsed parameters from an MCP server's WWW-Authenticate response. diff --git a/nodejs/src/types.ts b/nodejs/src/types.ts index 1a7134959c..b8af84c80f 100644 --- a/nodejs/src/types.ts +++ b/nodejs/src/types.ts @@ -1138,16 +1138,14 @@ export type PermissionRequestResult = PermissionDecisionRequest["result"] | { ki export type PermissionHandler = ( request: PermissionRequest, - invocation: { sessionId: string; managedSettingsEnabled: boolean } + invocation: { sessionId: string; managedSettingsEnabled?: boolean } ) => Promise | PermissionRequestResult; /** - * Approves permission requests for sessions without managed settings. + * Approves permission requests unless managed approval is required. */ export const approveAll: PermissionHandler = (request, invocation) => { - if (invocation.managedSettingsEnabled) { - throw new Error("approveAll cannot be used when managed settings are enabled"); - } + void invocation; if ("managedApprovalRequired" in request && request.managedApprovalRequired === true) { return { kind: "no-result" }; } diff --git a/nodejs/test/client.test.ts b/nodejs/test/client.test.ts index a88b48c948..fa8b38ce2d 100644 --- a/nodejs/test/client.test.ts +++ b/nodejs/test/client.test.ts @@ -31,17 +31,13 @@ describe("approveAll", () => { expect(approveAll(request, invocation)).toEqual({ kind: "approve-once" }); }); - it("rejects use when managed settings are enabled", () => { - expect(() => + it("leaves managed requests pending even when managed settings are enabled", () => { + expect( approveAll( - { ...request, managedApprovalRequired: false }, + { ...request, managedApprovalRequired: true }, { ...invocation, managedSettingsEnabled: true } ) - ).toThrow("approveAll cannot be used when managed settings are enabled"); - }); - - it("does not approve managed requests when the session flag is absent", () => { - expect(approveAll({ ...request, managedApprovalRequired: true }, invocation)).toEqual({ + ).toEqual({ kind: "no-result", }); }); diff --git a/nodejs/test/session-event-types.test.ts b/nodejs/test/session-event-types.test.ts index 694536580a..f2325b7e4e 100644 --- a/nodejs/test/session-event-types.test.ts +++ b/nodejs/test/session-event-types.test.ts @@ -15,6 +15,7 @@ */ import { describe, expect, it } from "vitest"; +import { approveAll } from "../src/index.js"; import type { // The aggregate union; must still resolve via the package root. SessionEvent, @@ -162,6 +163,31 @@ describe("Session event type exports (#1156)", () => { expect(permissionEvent.data.permissionRequest.managedApprovalRequired).toBe(true); }); + it("approves ordinary requests and leaves managed requests pending", () => { + expect( + approveAll( + { + kind: "url", + url: "https://api.example.com/data", + intention: "Fetch ordinary data", + }, + { sessionId: "session-1", managedSettingsEnabled: true } + ) + ).toEqual({ kind: "approve-once" }); + + expect( + approveAll( + { + kind: "url", + url: "https://api.example.com/data", + intention: "Fetch managed data", + managedApprovalRequired: true, + }, + { sessionId: "session-1", managedSettingsEnabled: true } + ) + ).toEqual({ kind: "no-result" }); + }); + it("wraps ToolExecutionStartData inside the exported ToolExecutionStartEvent", () => { const event: ToolExecutionStartEvent = { id: "evt-1", diff --git a/python/copilot/session.py b/python/copilot/session.py index 3cb41553ff..3a4498a404 100644 --- a/python/copilot/session.py +++ b/python/copilot/session.py @@ -362,9 +362,9 @@ class PermissionNoResult: PermissionRequestResult = PermissionDecision | PermissionNoResult -class PermissionInvocation(TypedDict): - session_id: str - managed_settings_enabled: bool +class PermissionInvocation(TypedDict, total=False): + session_id: Required[str] + managed_settings_enabled: NotRequired[bool] _PermissionHandlerFn = Callable[ @@ -378,8 +378,6 @@ class PermissionHandler: def approve_all( request: PermissionRequest, invocation: PermissionInvocation ) -> PermissionRequestResult: - if invocation.get("managed_settings_enabled", False): - raise RuntimeError("approve_all cannot be used when managed settings are enabled") if getattr(request, "managed_approval_required", False) is True: return PermissionNoResult() return PermissionDecisionApproveOnce() diff --git a/python/test_managed_permissions.py b/python/test_managed_permissions.py index 16861a5112..b9aafe223f 100644 --- a/python/test_managed_permissions.py +++ b/python/test_managed_permissions.py @@ -1,7 +1,5 @@ from typing import Any -import pytest - from copilot.rpc import PermissionDecisionApproveOnce, PermissionDecisionUserNotAvailable from copilot.session import CopilotSession, PermissionHandler, PermissionNoResult from copilot.session_events import PermissionRequestedData, PermissionRequestRead @@ -24,18 +22,35 @@ def test_permission_event_exposes_managed_approval_required() -> None: assert data.to_dict()["permissionRequest"]["managedApprovalRequired"] is True -def test_approve_all_errors_when_managed_settings_enabled() -> None: +def test_approve_all_approves_ordinary_request_even_with_managed_settings_enabled() -> None: + request = PermissionRequestRead( + intention="Read ordinary content", + path="/workspace/file.txt", + ) + + assert isinstance( + PermissionHandler.approve_all( + request, + {"session_id": "session-1", "managed_settings_enabled": True}, + ), + PermissionDecisionApproveOnce, + ) + + +def test_approve_all_leaves_managed_request_pending() -> None: request = PermissionRequestRead( intention="Read managed content", path="/workspace/file.txt", managed_approval_required=True, ) - with pytest.raises(RuntimeError, match="managed settings are enabled"): + assert isinstance( PermissionHandler.approve_all( request, {"session_id": "session-1", "managed_settings_enabled": True}, - ) + ), + PermissionNoResult, + ) def test_approve_all_approves_ordinary_request() -> None: From afcd1e6cb604fef4353b6bf0bccec08f1c5cf4ba Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Fri, 31 Jul 2026 08:27:43 -0700 Subject: [PATCH 34/41] Fix managed approval hierarchy and diagnostics Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- dotnet/src/Generated/SessionEvents.cs | 25 ++-------- dotnet/src/PermissionHandlers.cs | 31 +++++++------ dotnet/src/PermissionRequest.cs | 18 -------- dotnet/src/Session.cs | 2 +- dotnet/test/Unit/PermissionHandlerTests.cs | 17 +++++++ java/README.md | 2 +- nodejs/src/session.ts | 2 +- python/copilot/session.py | 6 +-- scripts/codegen/csharp.ts | 54 ++++++++++++++++++++-- 9 files changed, 95 insertions(+), 62 deletions(-) delete mode 100644 dotnet/src/PermissionRequest.cs diff --git a/dotnet/src/Generated/SessionEvents.cs b/dotnet/src/Generated/SessionEvents.cs index 6777cd2732..dee41aa679 100644 --- a/dotnet/src/Generated/SessionEvents.cs +++ b/dotnet/src/Generated/SessionEvents.cs @@ -6956,11 +6956,6 @@ public sealed partial class PermissionRequestShell : PermissionRequest [JsonPropertyName("intention")] public required string Intention { get; set; } - /// Whether managed policy requires a human response and forbids host auto-approval. - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - [JsonPropertyName("managedApprovalRequired")] - public new bool? ManagedApprovalRequired { get; set; } - /// File paths that may be read or written by the command. [JsonPropertyName("possiblePaths")] public required string[] PossiblePaths { get; set; } @@ -7014,11 +7009,6 @@ public sealed partial class PermissionRequestWrite : PermissionRequest [JsonPropertyName("intention")] public required string Intention { get; set; } - /// Whether managed policy requires a human response and forbids host auto-approval. - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - [JsonPropertyName("managedApprovalRequired")] - public new bool? ManagedApprovalRequired { get; set; } - /// Complete new file contents for newly created files. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("newFileContents")] @@ -7052,11 +7042,6 @@ public sealed partial class PermissionRequestRead : PermissionRequest [JsonPropertyName("intention")] public required string Intention { get; set; } - /// Whether managed policy requires a human response and forbids host auto-approval. - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - [JsonPropertyName("managedApprovalRequired")] - public new bool? ManagedApprovalRequired { get; set; } - /// Path of the file or directory being read. [JsonPropertyName("path")] public required string Path { get; set; } @@ -7124,11 +7109,6 @@ public sealed partial class PermissionRequestUrl : PermissionRequest [JsonPropertyName("intention")] public required string Intention { get; set; } - /// Whether managed policy requires a human response and forbids host auto-approval. - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - [JsonPropertyName("managedApprovalRequired")] - public new bool? ManagedApprovalRequired { get; set; } - /// Immediately preceding URL when this request is for a redirect target. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("redirectedFrom")] @@ -7317,6 +7297,11 @@ public partial class PermissionRequest /// The type discriminator. [JsonPropertyName("kind")] public virtual string Kind { get; set; } = string.Empty; + + /// Whether managed policy requires a human response and forbids host auto-approval. + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("managedApprovalRequired")] + public bool? ManagedApprovalRequired { get; set; } } diff --git a/dotnet/src/PermissionHandlers.cs b/dotnet/src/PermissionHandlers.cs index f5e1dc0f8c..d990ca6534 100644 --- a/dotnet/src/PermissionHandlers.cs +++ b/dotnet/src/PermissionHandlers.cs @@ -20,18 +20,23 @@ public static class PermissionHandler ? Task.FromResult(PermissionDecision.NoResult()) : Task.FromResult(PermissionDecision.ApproveOnce()); - private static bool RequiresManagedApproval(PermissionRequest request) => request switch + private static bool RequiresManagedApproval(PermissionRequest request) { - PermissionRequestShell shell => shell.ManagedApprovalRequired is true, - PermissionRequestWrite write => write.ManagedApprovalRequired is true, - PermissionRequestRead read => read.ManagedApprovalRequired is true, - PermissionRequestUrl url => url.ManagedApprovalRequired is true, - PermissionRequestMcp - or PermissionRequestMemory - or PermissionRequestCustomTool - or PermissionRequestHook - or PermissionRequestExtensionManagement - or PermissionRequestExtensionPermissionAccess => false, - _ => true, - }; + if (request.ManagedApprovalRequired is true) + { + return true; + } + + return request.GetType() == typeof(PermissionRequest) + && request.Kind is not ("shell" + or "write" + or "read" + or "mcp" + or "url" + or "memory" + or "custom-tool" + or "hook" + or "extension-management" + or "extension-permission-access"); + } } diff --git a/dotnet/src/PermissionRequest.cs b/dotnet/src/PermissionRequest.cs deleted file mode 100644 index 3752bb3c6b..0000000000 --- a/dotnet/src/PermissionRequest.cs +++ /dev/null @@ -1,18 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - *--------------------------------------------------------------------------------------------*/ - -using System.Text.Json.Serialization; - -namespace GitHub.Copilot; - -public partial class PermissionRequest -{ - /// - /// Gets or sets whether managed policy requires an explicit human decision. - /// Automatic approval must be bypassed when this value is . - /// - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - [JsonPropertyName("managedApprovalRequired")] - public bool? ManagedApprovalRequired { get; set; } -} diff --git a/dotnet/src/Session.cs b/dotnet/src/Session.cs index 8a46f9c3eb..d2f6cedbfb 100644 --- a/dotnet/src/Session.cs +++ b/dotnet/src/Session.cs @@ -963,7 +963,7 @@ private async Task ExecutePermissionAndRespondAsync(string requestId, Permission } catch (Exception ex) { - _logger.LogError(ex, "Permission handler failed. SessionId={SessionId}, RequestId={RequestId}", SessionId, requestId); + _logger.LogError(ex, "Permission handler or response delivery failed. SessionId={SessionId}, RequestId={RequestId}", SessionId, requestId); try { await Rpc.Permissions.HandlePendingPermissionRequestAsync(requestId, PermissionDecision.UserNotAvailable()); diff --git a/dotnet/test/Unit/PermissionHandlerTests.cs b/dotnet/test/Unit/PermissionHandlerTests.cs index dc4ffbbcae..0ecfcd0a22 100644 --- a/dotnet/test/Unit/PermissionHandlerTests.cs +++ b/dotnet/test/Unit/PermissionHandlerTests.cs @@ -38,6 +38,8 @@ public void PermissionEventExposesManagedApprovalRequired() Assert.NotNull(data); var request = Assert.IsType(data.PermissionRequest); Assert.True(request.ManagedApprovalRequired); + PermissionRequest genericRequest = request; + Assert.True(genericRequest.ManagedApprovalRequired); } [Fact] @@ -81,6 +83,21 @@ public async Task ApproveAllLeavesManagedRequestPendingWhenSessionFlagIsAbsent() Assert.IsType(decision); } + [Fact] + public async Task ApproveAllLeavesManagedKnownVariantPendingThroughBaseType() + { + PermissionRequest request = new PermissionRequestRead + { + Intention = "Read managed content", + ManagedApprovalRequired = true, + Path = "/workspace/file.txt", + }; + + var decision = await PermissionHandler.ApproveAll(request, new PermissionInvocation()); + + Assert.IsType(decision); + } + [Fact] public async Task ApproveAllLeavesUnknownRequestPending() { diff --git a/java/README.md b/java/README.md index a1fce0ff4a..90a170d734 100644 --- a/java/README.md +++ b/java/README.md @@ -67,7 +67,7 @@ Snapshot builds of the next development version are published to Maven Central S Replace `${copilot.sdk.version}` with the latest release from Maven Central. ```groovy -implementation 'com.github:copilot-sdk-java:1.0.10-preview.0-SNAPSHOT' +implementation 'com.github:copilot-sdk-java:1.0.10-preview.1-SNAPSHOT' ``` ## Quick Start diff --git a/nodejs/src/session.ts b/nodejs/src/session.ts index 2a4513d47b..0d1d90fbbb 100644 --- a/nodejs/src/session.ts +++ b/nodejs/src/session.ts @@ -1123,7 +1123,7 @@ export class CopilotSession { if (this.disconnected) { return; } - console.error("Permission handler failed", { + console.error("Permission handler or response delivery failed", { sessionId: this.sessionId, requestId, error, diff --git a/python/copilot/session.py b/python/copilot/session.py index 3a4498a404..e6b70a97ee 100644 --- a/python/copilot/session.py +++ b/python/copilot/session.py @@ -2155,7 +2155,7 @@ async def _execute_permission_and_respond( ) except Exception: logger.exception( - "Permission handler failed", + "Permission handler or response delivery failed", extra={"session_id": self.session_id, "request_id": request_id}, ) try: @@ -2574,8 +2574,8 @@ async def _handle_permission_request( return result except Exception: # pylint: disable=broad-except # Handler failed, deny permission. - logger.debug( - "Error handling permission request", + logger.error( + "Permission handler failed", extra={"session_id": self.session_id}, exc_info=True, ) diff --git a/scripts/codegen/csharp.ts b/scripts/codegen/csharp.ts index 7070ce8448..d288ff083e 100644 --- a/scripts/codegen/csharp.ts +++ b/scripts/codegen/csharp.ts @@ -66,6 +66,10 @@ const TYPE_RENAMES: Record = { PermissionRequestedDataPermissionRequest: "PermissionRequest", }; +const POLYMORPHIC_BASE_PROPERTIES: Record = { + PermissionRequest: ["managedApprovalRequired"], +}; + /** Apply rename to a generated class name, checking both exact match and prefix replacement for derived types. */ function applyTypeRename(className: string): string { if (TYPE_RENAMES[className]) return TYPE_RENAMES[className]; @@ -827,6 +831,7 @@ function generatePolymorphicClasses( const lines: string[] = []; const discriminatorInfo = findDiscriminator(variants)!; const renamedBase = applyTypeRename(baseClassName); + const baseProperties = new Set(POLYMORPHIC_BASE_PROPERTIES[renamedBase] ?? []); lines.push(...xmlDocCommentWithFallback(description, `Polymorphic base type discriminated by ${escapeXml(discriminatorProperty)}.`, "")); if (experimental) pushExperimentalAttribute(lines); @@ -845,13 +850,52 @@ function generatePolymorphicClasses( lines.push(` /// The type discriminator.`); lines.push(` [JsonPropertyName("${discriminatorProperty}")]`); lines.push(` public virtual string ${toPascalCase(discriminatorProperty)} { get; set; } = string.Empty;`); + for (const propName of baseProperties) { + const propSchema = variants + .map((variant) => variant.properties?.[propName]) + .find((property): property is JSONSchema7 => typeof property === "object"); + if (!propSchema) continue; + + const csharpName = toCSharpPropertyName(propName, propSchema); + const csharpType = resolver( + propSchema, + renamedBase, + csharpName, + false, + knownTypes, + nestedClasses, + enumOutput + ); + lines.push(""); + lines.push(...xmlDocPropertyComment(propSchema.description, propName, " ")); + lines.push(...emitDataAnnotations(propSchema, " ", csharpType)); + if (isSchemaDeprecated(propSchema)) pushObsoleteAttributes(lines, " "); + if (isSchemaExperimental(propSchema)) pushExperimentalAttribute(lines, " "); + lines.push(` [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]`); + const propVisibility = pushCSharpInternalAttribute(lines, propSchema); + lines.push(` [JsonPropertyName("${propName}")]`); + lines.push(` ${propVisibility} ${csharpType} ${csharpName} { get; set; }`); + } lines.push(`}`); lines.push(""); for (const { value, schema } of discriminatorInfo.mapping.values()) { const constValue = String(value); const derivedClassName = applyTypeRename(`${baseClassName}${toPascalCase(constValue)}`); - const derivedCode = generateDerivedClass(derivedClassName, renamedBase, discriminatorProperty, constValue, schema, knownTypes, nestedClasses, enumOutput, resolver, experimental, options); + const derivedCode = generateDerivedClass( + derivedClassName, + renamedBase, + discriminatorProperty, + constValue, + schema, + knownTypes, + nestedClasses, + enumOutput, + resolver, + experimental, + options, + baseProperties + ); nestedClasses.set(derivedClassName, derivedCode); } @@ -872,7 +916,8 @@ function generateDerivedClass( enumOutput: string[], propertyResolver: PropertyTypeResolver, experimental = false, - options: DiscriminatedUnionGenerationOptions = {} + options: DiscriminatedUnionGenerationOptions = {}, + baseProperties: ReadonlySet = new Set() ): string { const lines: string[] = []; const required = new Set(schema.required || []); @@ -891,13 +936,12 @@ function generateDerivedClass( for (const [propName, propSchema] of Object.entries(schema.properties).sort(([a], [b]) => a.localeCompare(b))) { if (typeof propSchema !== "object") continue; if (propName === discriminatorProperty) continue; + if (baseProperties.has(propName)) continue; const isReq = required.has(propName); const prop = propSchema as JSONSchema7; const csharpName = toCSharpPropertyName(propName, prop); const csharpType = propertyResolver(prop, className, csharpName, isReq, knownTypes, nestedClasses, enumOutput); - const hidingModifier = - propName === "managedApprovalRequired" && className.startsWith("PermissionRequest") ? "new " : ""; lines.push(...xmlDocPropertyComment(prop.description, propName, " ")); lines.push(...emitDataAnnotations(prop, " ", csharpType)); @@ -908,7 +952,7 @@ function generateDerivedClass( const propVisibility = pushCSharpInternalAttribute(lines, prop); lines.push(` [JsonPropertyName("${propName}")]`); const reqMod = isReq && !csharpType.endsWith("?") ? "required " : ""; - lines.push(` ${propVisibility} ${hidingModifier}${reqMod}${csharpType} ${csharpName} { get; set; }`, ""); + lines.push(` ${propVisibility} ${reqMod}${csharpType} ${csharpName} { get; set; }`, ""); } } From bc2fbb96dffd228186f6611581d3f961aab14b05 Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Fri, 31 Jul 2026 08:42:58 -0700 Subject: [PATCH 35/41] Restore managed settings approval guard Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- go/README.md | 6 +++--- go/permissions.go | 7 ++++++- go/permissions_test.go | 16 ++++++++++++++++ go/session.go | 3 ++- go/types.go | 3 ++- nodejs/src/types.ts | 6 ++++-- nodejs/test/client.test.ts | 15 ++++++++------- nodejs/test/session-event-types.test.ts | 22 ++++++++++++++++++---- python/copilot/session.py | 2 ++ python/test_managed_permissions.py | 25 +++++++++++-------------- 10 files changed, 72 insertions(+), 33 deletions(-) diff --git a/go/README.md b/go/README.md index c3c0425f8c..bc360253f9 100644 --- a/go/README.md +++ b/go/README.md @@ -221,7 +221,7 @@ Event types: `SessionLifecycleCreated`, `SessionLifecycleDeleted`, `SessionLifec - `Streaming` (*bool): Enable streaming delta events (nil = runtime default) - `InfiniteSessions` (\*InfiniteSessionConfig): Automatic context compaction configuration - `EnableSessionStore` (\*bool): Enables the cross-session store for search and retrieval across sessions. When unset in `ModeCopilotCli`, the runtime default applies (enabled). In `ModeEmpty`, defaults to disabled. -- `OnPermissionRequest` (PermissionHandlerFunc): Optional handler called before each tool execution to approve or deny it. When nil, permission requests are emitted as events and left pending for manual resolution. `copilot.PermissionHandler.ApproveAll` approves ordinary requests and leaves managed requests pending. Custom handlers can inspect `RequiresManagedApproval()` for human-facing confirmation logic. See [Permission Handling](#permission-handling) section. +- `OnPermissionRequest` (PermissionHandlerFunc): Optional handler called before each tool execution to approve or deny it. When nil, permission requests are emitted as events and left pending for manual resolution. `copilot.PermissionHandler.ApproveAll` approves requests when managed settings are disabled and returns an error when `EnableManagedSettings` is true. Custom handlers can inspect `RequiresManagedApproval()` for human-facing confirmation logic. See [Permission Handling](#permission-handling) section. - `OnUserInputRequest` (UserInputHandler): Handler for user input requests from the agent (enables ask_user tool). See [User Input Requests](#user-input-requests) section. - `Hooks` (\*SessionHooks): Hook handlers for session lifecycle events. See [Session Hooks](#session-hooks) section. - `Commands` ([]CommandDefinition): Slash-commands registered for this session. See [Commands](#commands) section. @@ -680,7 +680,7 @@ An `OnPermissionRequest` handler is optional when you create or resume a session ### Approve All (simplest) -Use the built-in `PermissionHandler.ApproveAll` helper to approve ordinary permission requests automatically: +Use the built-in `PermissionHandler.ApproveAll` helper when managed settings are disabled: ```go session, err := client.CreateSession(context.Background(), &copilot.SessionConfig{ @@ -689,7 +689,7 @@ session, err := client.CreateSession(context.Background(), &copilot.SessionConfi }) ``` -`ApproveAll` leaves requests with `RequiresManagedApproval()` pending and approves ordinary requests automatically. +When `EnableManagedSettings` is true for the session, `ApproveAll` returns an error. Use a custom handler for managed sessions; request-level `RequiresManagedApproval()` remains available for human-facing confirmation logic. ### Custom Permission Handler diff --git a/go/permissions.go b/go/permissions.go index fde1a6951a..24b9cc7f13 100644 --- a/go/permissions.go +++ b/go/permissions.go @@ -1,15 +1,20 @@ package copilot import ( + "errors" + "github.com/github/copilot-sdk/go/rpc" ) // PermissionHandler provides pre-built OnPermissionRequest implementations. var PermissionHandler = struct { - // ApproveAll approves permission requests unless managed approval is required. + // ApproveAll approves permission requests when managed settings are disabled. ApproveAll PermissionHandlerFunc }{ ApproveAll: func(request PermissionRequest, invocation PermissionInvocation) (rpc.PermissionDecision, error) { + if invocation.ManagedSettingsEnabled { + return nil, errors.New("approveAll cannot be used when managed settings are enabled") + } if request.RequiresManagedApproval() { return &rpc.PermissionDecisionNoResult{}, nil } diff --git a/go/permissions_test.go b/go/permissions_test.go index 83b2439f41..517450dbfa 100644 --- a/go/permissions_test.go +++ b/go/permissions_test.go @@ -41,6 +41,22 @@ func TestApproveAllApprovesOrdinaryRequest(t *testing.T) { } } +func TestApproveAllRejectsManagedSettingsSession(t *testing.T) { + decision, err := copilot.PermissionHandler.ApproveAll( + &copilot.PermissionRequestRead{}, + copilot.PermissionInvocation{ + SessionID: "session-1", + ManagedSettingsEnabled: true, + }, + ) + if err == nil { + t.Fatal("expected managed settings error") + } + if decision != nil { + t.Fatalf("expected no decision, got %T", decision) + } +} + func TestApproveAllLeavesManagedRequestPending(t *testing.T) { decision, err := copilot.PermissionHandler.ApproveAll( &copilot.PermissionRequestRead{ManagedApprovalRequired: ptrTo(true)}, diff --git a/go/session.go b/go/session.go index 9698a0fbfe..74e68cc7f3 100644 --- a/go/session.go +++ b/go/session.go @@ -1600,7 +1600,8 @@ func (s *Session) executePermissionAndRespond(requestID string, permissionReques }() invocation := PermissionInvocation{ - SessionID: s.SessionID, + SessionID: s.SessionID, + ManagedSettingsEnabled: s.managedSettings, } decision, err := handler(permissionRequest, invocation) diff --git a/go/types.go b/go/types.go index d1fc34ecd2..d64aa77860 100644 --- a/go/types.go +++ b/go/types.go @@ -375,7 +375,8 @@ type PermissionHandlerFunc func(request PermissionRequest, invocation Permission // PermissionInvocation provides context about a permission request type PermissionInvocation struct { - SessionID string + SessionID string + ManagedSettingsEnabled bool } // MCPAuthWwwAuthenticateParams contains parsed parameters from an MCP server's WWW-Authenticate response. diff --git a/nodejs/src/types.ts b/nodejs/src/types.ts index b8af84c80f..2166632756 100644 --- a/nodejs/src/types.ts +++ b/nodejs/src/types.ts @@ -1142,10 +1142,12 @@ export type PermissionHandler = ( ) => Promise | PermissionRequestResult; /** - * Approves permission requests unless managed approval is required. + * Approves permission requests when managed settings are disabled. */ export const approveAll: PermissionHandler = (request, invocation) => { - void invocation; + if (invocation.managedSettingsEnabled) { + throw new Error("approveAll cannot be used when managed settings are enabled"); + } if ("managedApprovalRequired" in request && request.managedApprovalRequired === true) { return { kind: "no-result" }; } diff --git a/nodejs/test/client.test.ts b/nodejs/test/client.test.ts index fa8b38ce2d..314a2e8c3f 100644 --- a/nodejs/test/client.test.ts +++ b/nodejs/test/client.test.ts @@ -31,13 +31,14 @@ describe("approveAll", () => { expect(approveAll(request, invocation)).toEqual({ kind: "approve-once" }); }); - it("leaves managed requests pending even when managed settings are enabled", () => { - expect( - approveAll( - { ...request, managedApprovalRequired: true }, - { ...invocation, managedSettingsEnabled: true } - ) - ).toEqual({ + it("rejects managed settings sessions", () => { + expect(() => approveAll(request, { ...invocation, managedSettingsEnabled: true })).toThrow( + "approveAll cannot be used when managed settings are enabled" + ); + }); + + it("leaves managed requests pending when managed settings are disabled", () => { + expect(approveAll({ ...request, managedApprovalRequired: true }, invocation)).toEqual({ kind: "no-result", }); }); diff --git a/nodejs/test/session-event-types.test.ts b/nodejs/test/session-event-types.test.ts index f2325b7e4e..fef7acdb2b 100644 --- a/nodejs/test/session-event-types.test.ts +++ b/nodejs/test/session-event-types.test.ts @@ -163,8 +163,8 @@ describe("Session event type exports (#1156)", () => { expect(permissionEvent.data.permissionRequest.managedApprovalRequired).toBe(true); }); - it("approves ordinary requests and leaves managed requests pending", () => { - expect( + it("rejects approveAll in managed settings sessions", () => { + expect(() => approveAll( { kind: "url", @@ -173,9 +173,9 @@ describe("Session event type exports (#1156)", () => { }, { sessionId: "session-1", managedSettingsEnabled: true } ) - ).toEqual({ kind: "approve-once" }); + ).toThrow("approveAll cannot be used when managed settings are enabled"); - expect( + expect(() => approveAll( { kind: "url", @@ -185,6 +185,20 @@ describe("Session event type exports (#1156)", () => { }, { sessionId: "session-1", managedSettingsEnabled: true } ) + ).toThrow("approveAll cannot be used when managed settings are enabled"); + }); + + it("leaves managed requests pending when managed settings are disabled", () => { + expect( + approveAll( + { + kind: "url", + url: "https://api.example.com/data", + intention: "Fetch managed data", + managedApprovalRequired: true, + }, + { sessionId: "session-1", managedSettingsEnabled: false } + ) ).toEqual({ kind: "no-result" }); }); diff --git a/python/copilot/session.py b/python/copilot/session.py index e6b70a97ee..da9f0a97b7 100644 --- a/python/copilot/session.py +++ b/python/copilot/session.py @@ -378,6 +378,8 @@ class PermissionHandler: def approve_all( request: PermissionRequest, invocation: PermissionInvocation ) -> PermissionRequestResult: + if invocation.get("managed_settings_enabled", False): + raise RuntimeError("approve_all cannot be used when managed settings are enabled") if getattr(request, "managed_approval_required", False) is True: return PermissionNoResult() return PermissionDecisionApproveOnce() diff --git a/python/test_managed_permissions.py b/python/test_managed_permissions.py index b9aafe223f..913724e769 100644 --- a/python/test_managed_permissions.py +++ b/python/test_managed_permissions.py @@ -1,4 +1,4 @@ -from typing import Any +import pytest from copilot.rpc import PermissionDecisionApproveOnce, PermissionDecisionUserNotAvailable from copilot.session import CopilotSession, PermissionHandler, PermissionNoResult @@ -22,35 +22,31 @@ def test_permission_event_exposes_managed_approval_required() -> None: assert data.to_dict()["permissionRequest"]["managedApprovalRequired"] is True -def test_approve_all_approves_ordinary_request_even_with_managed_settings_enabled() -> None: +def test_approve_all_rejects_managed_settings_session() -> None: request = PermissionRequestRead( intention="Read ordinary content", path="/workspace/file.txt", ) - assert isinstance( + with pytest.raises(RuntimeError, match="managed settings are enabled"): PermissionHandler.approve_all( request, {"session_id": "session-1", "managed_settings_enabled": True}, - ), - PermissionDecisionApproveOnce, - ) + ) -def test_approve_all_leaves_managed_request_pending() -> None: +def test_approve_all_rejects_managed_request_in_managed_settings_session() -> None: request = PermissionRequestRead( intention="Read managed content", path="/workspace/file.txt", managed_approval_required=True, ) - assert isinstance( + with pytest.raises(RuntimeError, match="managed settings are enabled"): PermissionHandler.approve_all( request, {"session_id": "session-1", "managed_settings_enabled": True}, - ), - PermissionNoResult, - ) + ) def test_approve_all_approves_ordinary_request() -> None: @@ -75,9 +71,10 @@ def test_approve_all_leaves_managed_request_pending_when_session_flag_is_absent( managed_approval_required=True, ) - legacy_invocation: Any = {"session_id": "session-1"} - - assert isinstance(PermissionHandler.approve_all(request, legacy_invocation), PermissionNoResult) + assert isinstance( + PermissionHandler.approve_all(request, {"session_id": "session-1"}), + PermissionNoResult, + ) async def test_legacy_permission_callback_rejects_no_result() -> None: From bdefea7c32d344c69b0ab48dd5587b87935c405e Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Fri, 31 Jul 2026 08:53:40 -0700 Subject: [PATCH 36/41] Fail closed on malformed managed metadata Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- rust/src/session.rs | 42 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/rust/src/session.rs b/rust/src/session.rs index d31b4e0550..3eaef38326 100644 --- a/rust/src/session.rs +++ b/rust/src/session.rs @@ -1531,9 +1531,11 @@ fn permission_request_data( .get("permissionRequest") .cloned() .unwrap_or_else(|| event_data.clone()); - let managed_approval_required = request_data - .get("managedApprovalRequired") - .and_then(Value::as_bool); + let managed_approval_required = match request_data.get("managedApprovalRequired") { + None => None, + Some(Value::Bool(value)) => Some(*value), + Some(_) => Some(true), + }; match serde_json::from_value::(request_data) { Ok(mut data) => { data.extra = event_data.clone(); @@ -2606,4 +2608,38 @@ mod tests { assert_eq!(data.managed_approval_required, Some(true)); assert_eq!(data.extra["requestId"], "permission-1"); } + + #[test] + fn permission_request_data_fails_closed_for_malformed_managed_flag() { + let data = permission_request_data( + &json!({ + "requestId": "permission-1", + "permissionRequest": { + "kind": "read", + "managedApprovalRequired": "yes", + "path": "/workspace/file.txt" + } + }), + false, + ); + + assert_eq!(data.managed_approval_required, Some(true)); + } + + #[test] + fn permission_request_data_preserves_valid_false_managed_flag() { + let data = permission_request_data( + &json!({ + "requestId": "permission-1", + "permissionRequest": { + "kind": "read", + "managedApprovalRequired": false, + "path": "/workspace/file.txt" + } + }), + false, + ); + + assert_eq!(data.managed_approval_required, Some(false)); + } } From bd67de2d8564e4307432d34041f4074b08b669e6 Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Fri, 31 Jul 2026 09:03:51 -0700 Subject: [PATCH 37/41] Preserve managed approval accessor compatibility Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- dotnet/README.md | 5 +-- dotnet/src/Generated/SessionEvents.cs | 38 +++++++++++++++++++++- dotnet/test/Unit/PermissionHandlerTests.cs | 17 ++++++++++ scripts/codegen/csharp.ts | 15 +++++++-- 4 files changed, 68 insertions(+), 7 deletions(-) diff --git a/dotnet/README.md b/dotnet/README.md index 6f2de39af0..1971c2107b 100644 --- a/dotnet/README.md +++ b/dotnet/README.md @@ -806,10 +806,7 @@ var session = await client.CreateSessionAsync(new SessionConfig Model = "gpt-5", OnPermissionRequest = async (request, invocation) => { - if (request is PermissionRequestShell { ManagedApprovalRequired: true } - or PermissionRequestWrite { ManagedApprovalRequired: true } - or PermissionRequestRead { ManagedApprovalRequired: true } - or PermissionRequestUrl { ManagedApprovalRequired: true }) + if (request.ManagedApprovalRequired is true) { return PermissionDecision.NoResult(); } diff --git a/dotnet/src/Generated/SessionEvents.cs b/dotnet/src/Generated/SessionEvents.cs index dee41aa679..b661932470 100644 --- a/dotnet/src/Generated/SessionEvents.cs +++ b/dotnet/src/Generated/SessionEvents.cs @@ -6956,6 +6956,15 @@ public sealed partial class PermissionRequestShell : PermissionRequest [JsonPropertyName("intention")] public required string Intention { get; set; } + /// + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("managedApprovalRequired")] + public override bool? ManagedApprovalRequired + { + get => base.ManagedApprovalRequired; + set => base.ManagedApprovalRequired = value; + } + /// File paths that may be read or written by the command. [JsonPropertyName("possiblePaths")] public required string[] PossiblePaths { get; set; } @@ -7009,6 +7018,15 @@ public sealed partial class PermissionRequestWrite : PermissionRequest [JsonPropertyName("intention")] public required string Intention { get; set; } + /// + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("managedApprovalRequired")] + public override bool? ManagedApprovalRequired + { + get => base.ManagedApprovalRequired; + set => base.ManagedApprovalRequired = value; + } + /// Complete new file contents for newly created files. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("newFileContents")] @@ -7042,6 +7060,15 @@ public sealed partial class PermissionRequestRead : PermissionRequest [JsonPropertyName("intention")] public required string Intention { get; set; } + /// + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("managedApprovalRequired")] + public override bool? ManagedApprovalRequired + { + get => base.ManagedApprovalRequired; + set => base.ManagedApprovalRequired = value; + } + /// Path of the file or directory being read. [JsonPropertyName("path")] public required string Path { get; set; } @@ -7109,6 +7136,15 @@ public sealed partial class PermissionRequestUrl : PermissionRequest [JsonPropertyName("intention")] public required string Intention { get; set; } + /// + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + [JsonPropertyName("managedApprovalRequired")] + public override bool? ManagedApprovalRequired + { + get => base.ManagedApprovalRequired; + set => base.ManagedApprovalRequired = value; + } + /// Immediately preceding URL when this request is for a redirect target. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("redirectedFrom")] @@ -7301,7 +7337,7 @@ public partial class PermissionRequest /// Whether managed policy requires a human response and forbids host auto-approval. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] [JsonPropertyName("managedApprovalRequired")] - public bool? ManagedApprovalRequired { get; set; } + public virtual bool? ManagedApprovalRequired { get; set; } } diff --git a/dotnet/test/Unit/PermissionHandlerTests.cs b/dotnet/test/Unit/PermissionHandlerTests.cs index 0ecfcd0a22..675ea12828 100644 --- a/dotnet/test/Unit/PermissionHandlerTests.cs +++ b/dotnet/test/Unit/PermissionHandlerTests.cs @@ -98,6 +98,23 @@ public async Task ApproveAllLeavesManagedKnownVariantPendingThroughBaseType() Assert.IsType(decision); } + [Fact] + public void DerivedManagedApprovalAccessorForwardsToBaseStorage() + { + var request = new PermissionRequestRead + { + Intention = "Read managed content", + ManagedApprovalRequired = true, + Path = "/workspace/file.txt", + }; + + PermissionRequest genericRequest = request; + Assert.True(genericRequest.ManagedApprovalRequired); + + genericRequest.ManagedApprovalRequired = false; + Assert.False(request.ManagedApprovalRequired); + } + [Fact] public async Task ApproveAllLeavesUnknownRequestPending() { diff --git a/scripts/codegen/csharp.ts b/scripts/codegen/csharp.ts index d288ff083e..97fcebea67 100644 --- a/scripts/codegen/csharp.ts +++ b/scripts/codegen/csharp.ts @@ -874,7 +874,7 @@ function generatePolymorphicClasses( lines.push(` [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]`); const propVisibility = pushCSharpInternalAttribute(lines, propSchema); lines.push(` [JsonPropertyName("${propName}")]`); - lines.push(` ${propVisibility} ${csharpType} ${csharpName} { get; set; }`); + lines.push(` ${propVisibility} virtual ${csharpType} ${csharpName} { get; set; }`); } lines.push(`}`); lines.push(""); @@ -936,13 +936,24 @@ function generateDerivedClass( for (const [propName, propSchema] of Object.entries(schema.properties).sort(([a], [b]) => a.localeCompare(b))) { if (typeof propSchema !== "object") continue; if (propName === discriminatorProperty) continue; - if (baseProperties.has(propName)) continue; const isReq = required.has(propName); const prop = propSchema as JSONSchema7; const csharpName = toCSharpPropertyName(propName, prop); const csharpType = propertyResolver(prop, className, csharpName, isReq, knownTypes, nestedClasses, enumOutput); + if (baseProperties.has(propName)) { + lines.push(` /// `); + if (!isReq) lines.push(` [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]`); + lines.push(` [JsonPropertyName("${propName}")]`); + lines.push(` public override ${csharpType} ${csharpName}`); + lines.push(` {`); + lines.push(` get => base.${csharpName};`); + lines.push(` set => base.${csharpName} = value;`); + lines.push(` }`, ""); + continue; + } + lines.push(...xmlDocPropertyComment(prop.description, propName, " ")); lines.push(...emitDataAnnotations(prop, " ", csharpType)); if (isSchemaDeprecated(prop)) pushObsoleteAttributes(lines, " "); From 83be79b1e469738a834643670597d562d302678a Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Fri, 31 Jul 2026 09:06:26 -0700 Subject: [PATCH 38/41] Preserve Python permission constructor order Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- python/copilot/generated/session_events.py | 140 ++++++++++----------- python/test_managed_permissions.py | 18 ++- scripts/codegen/python.ts | 10 +- 3 files changed, 96 insertions(+), 72 deletions(-) diff --git a/python/copilot/generated/session_events.py b/python/copilot/generated/session_events.py index 0b024dda02..c582b68b54 100644 --- a/python/copilot/generated/session_events.py +++ b/python/copilot/generated/session_events.py @@ -4495,9 +4495,9 @@ class PermissionPromptRequestCommands: kind: ClassVar[str] = "commands" # Experimental: this field is part of an experimental API and may change or be removed. auto_approval: PermissionAutoApproval | None = None - managed_approval_required: bool | None = None tool_call_id: str | None = None warning: str | None = None + managed_approval_required: bool | None = None @staticmethod def from_dict(obj: Any) -> "PermissionPromptRequestCommands": @@ -4507,18 +4507,18 @@ def from_dict(obj: Any) -> "PermissionPromptRequestCommands": full_command_text = from_str(obj.get("fullCommandText")) intention = from_str(obj.get("intention")) auto_approval = from_union([from_none, PermissionAutoApproval.from_dict], obj.get("autoApproval")) - managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) warning = from_union([from_none, from_str], obj.get("warning")) + managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) return PermissionPromptRequestCommands( can_offer_session_approval=can_offer_session_approval, command_identifiers=command_identifiers, full_command_text=full_command_text, intention=intention, auto_approval=auto_approval, - managed_approval_required=managed_approval_required, tool_call_id=tool_call_id, warning=warning, + managed_approval_required=managed_approval_required, ) def to_dict(self) -> dict: @@ -4530,12 +4530,12 @@ def to_dict(self) -> dict: result["kind"] = self.kind if self.auto_approval is not None: result["autoApproval"] = from_union([from_none, lambda x: to_class(PermissionAutoApproval, x)], self.auto_approval) - if self.managed_approval_required is not None: - result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) if self.tool_call_id is not None: result["toolCallId"] = from_union([from_none, from_str], self.tool_call_id) if self.warning is not None: result["warning"] = from_union([from_none, from_str], self.warning) + if self.managed_approval_required is not None: + result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) return result @@ -4841,8 +4841,8 @@ class PermissionPromptRequestRead: path: str # Experimental: this field is part of an experimental API and may change or be removed. auto_approval: PermissionAutoApproval | None = None - managed_approval_required: bool | None = None tool_call_id: str | None = None + managed_approval_required: bool | None = None @staticmethod def from_dict(obj: Any) -> "PermissionPromptRequestRead": @@ -4850,14 +4850,14 @@ def from_dict(obj: Any) -> "PermissionPromptRequestRead": intention = from_str(obj.get("intention")) path = from_str(obj.get("path")) auto_approval = from_union([from_none, PermissionAutoApproval.from_dict], obj.get("autoApproval")) - managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) + managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) return PermissionPromptRequestRead( intention=intention, path=path, auto_approval=auto_approval, - managed_approval_required=managed_approval_required, tool_call_id=tool_call_id, + managed_approval_required=managed_approval_required, ) def to_dict(self) -> dict: @@ -4867,10 +4867,10 @@ def to_dict(self) -> dict: result["path"] = from_str(self.path) if self.auto_approval is not None: result["autoApproval"] = from_union([from_none, lambda x: to_class(PermissionAutoApproval, x)], self.auto_approval) - if self.managed_approval_required is not None: - result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) if self.tool_call_id is not None: result["toolCallId"] = from_union([from_none, from_str], self.tool_call_id) + if self.managed_approval_required is not None: + result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) return result @@ -4882,11 +4882,11 @@ class PermissionPromptRequestUrl: url: str # Experimental: this field is part of an experimental API and may change or be removed. auto_approval: PermissionAutoApproval | None = None - managed_approval_required: bool | None = None redirected_from: str | None = None request_sandbox_bypass: bool | None = None request_sandbox_bypass_reason: str | None = None tool_call_id: str | None = None + managed_approval_required: bool | None = None @staticmethod def from_dict(obj: Any) -> "PermissionPromptRequestUrl": @@ -4894,20 +4894,20 @@ def from_dict(obj: Any) -> "PermissionPromptRequestUrl": intention = from_str(obj.get("intention")) url = from_str(obj.get("url")) auto_approval = from_union([from_none, PermissionAutoApproval.from_dict], obj.get("autoApproval")) - managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) redirected_from = from_union([from_none, from_str], obj.get("redirectedFrom")) request_sandbox_bypass = from_union([from_none, from_bool], obj.get("requestSandboxBypass")) request_sandbox_bypass_reason = from_union([from_none, from_str], obj.get("requestSandboxBypassReason")) tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) + managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) return PermissionPromptRequestUrl( intention=intention, url=url, auto_approval=auto_approval, - managed_approval_required=managed_approval_required, redirected_from=redirected_from, request_sandbox_bypass=request_sandbox_bypass, request_sandbox_bypass_reason=request_sandbox_bypass_reason, tool_call_id=tool_call_id, + managed_approval_required=managed_approval_required, ) def to_dict(self) -> dict: @@ -4917,8 +4917,6 @@ def to_dict(self) -> dict: result["url"] = from_str(self.url) if self.auto_approval is not None: result["autoApproval"] = from_union([from_none, lambda x: to_class(PermissionAutoApproval, x)], self.auto_approval) - if self.managed_approval_required is not None: - result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) if self.redirected_from is not None: result["redirectedFrom"] = from_union([from_none, from_str], self.redirected_from) if self.request_sandbox_bypass is not None: @@ -4927,6 +4925,8 @@ def to_dict(self) -> dict: result["requestSandboxBypassReason"] = from_union([from_none, from_str], self.request_sandbox_bypass_reason) if self.tool_call_id is not None: result["toolCallId"] = from_union([from_none, from_str], self.tool_call_id) + if self.managed_approval_required is not None: + result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) return result @@ -4940,9 +4940,9 @@ class PermissionPromptRequestWrite: kind: ClassVar[str] = "write" # Experimental: this field is part of an experimental API and may change or be removed. auto_approval: PermissionAutoApproval | None = None - managed_approval_required: bool | None = None new_file_contents: str | None = None tool_call_id: str | None = None + managed_approval_required: bool | None = None @staticmethod def from_dict(obj: Any) -> "PermissionPromptRequestWrite": @@ -4952,18 +4952,18 @@ def from_dict(obj: Any) -> "PermissionPromptRequestWrite": file_name = from_str(obj.get("fileName")) intention = from_str(obj.get("intention")) auto_approval = from_union([from_none, PermissionAutoApproval.from_dict], obj.get("autoApproval")) - managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) new_file_contents = from_union([from_none, from_str], obj.get("newFileContents")) tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) + managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) return PermissionPromptRequestWrite( can_offer_session_approval=can_offer_session_approval, diff=diff, file_name=file_name, intention=intention, auto_approval=auto_approval, - managed_approval_required=managed_approval_required, new_file_contents=new_file_contents, tool_call_id=tool_call_id, + managed_approval_required=managed_approval_required, ) def to_dict(self) -> dict: @@ -4975,12 +4975,12 @@ def to_dict(self) -> dict: result["kind"] = self.kind if self.auto_approval is not None: result["autoApproval"] = from_union([from_none, lambda x: to_class(PermissionAutoApproval, x)], self.auto_approval) - if self.managed_approval_required is not None: - result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) if self.new_file_contents is not None: result["newFileContents"] = from_union([from_none, from_str], self.new_file_contents) if self.tool_call_id is not None: result["toolCallId"] = from_union([from_none, from_str], self.tool_call_id) + if self.managed_approval_required is not None: + result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) return result @@ -4991,8 +4991,8 @@ class PermissionRequestCustomTool: tool_description: str tool_name: str args: Any = None - managed_approval_required: bool | None = None tool_call_id: str | None = None + managed_approval_required: bool | None = None @staticmethod def from_dict(obj: Any) -> "PermissionRequestCustomTool": @@ -5000,14 +5000,14 @@ def from_dict(obj: Any) -> "PermissionRequestCustomTool": tool_description = from_str(obj.get("toolDescription")) tool_name = from_str(obj.get("toolName")) args = obj.get("args") - managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) + managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) return PermissionRequestCustomTool( tool_description=tool_description, tool_name=tool_name, args=args, - managed_approval_required=managed_approval_required, tool_call_id=tool_call_id, + managed_approval_required=managed_approval_required, ) def to_dict(self) -> dict: @@ -5017,10 +5017,10 @@ def to_dict(self) -> dict: result["toolName"] = from_str(self.tool_name) if self.args is not None: result["args"] = self.args - if self.managed_approval_required is not None: - result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) if self.tool_call_id is not None: result["toolCallId"] = from_union([from_none, from_str], self.tool_call_id) + if self.managed_approval_required is not None: + result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) return result @@ -5030,21 +5030,21 @@ class PermissionRequestExtensionManagement: kind: ClassVar[str] = "extension-management" operation: str extension_name: str | None = None - managed_approval_required: bool | None = None tool_call_id: str | None = None + managed_approval_required: bool | None = None @staticmethod def from_dict(obj: Any) -> "PermissionRequestExtensionManagement": assert isinstance(obj, dict) operation = from_str(obj.get("operation")) extension_name = from_union([from_none, from_str], obj.get("extensionName")) - managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) + managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) return PermissionRequestExtensionManagement( operation=operation, extension_name=extension_name, - managed_approval_required=managed_approval_required, tool_call_id=tool_call_id, + managed_approval_required=managed_approval_required, ) def to_dict(self) -> dict: @@ -5053,10 +5053,10 @@ def to_dict(self) -> dict: result["operation"] = from_str(self.operation) if self.extension_name is not None: result["extensionName"] = from_union([from_none, from_str], self.extension_name) - if self.managed_approval_required is not None: - result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) if self.tool_call_id is not None: result["toolCallId"] = from_union([from_none, from_str], self.tool_call_id) + if self.managed_approval_required is not None: + result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) return result @@ -5066,21 +5066,21 @@ class PermissionRequestExtensionPermissionAccess: capabilities: list[str] extension_name: str kind: ClassVar[str] = "extension-permission-access" - managed_approval_required: bool | None = None tool_call_id: str | None = None + managed_approval_required: bool | None = None @staticmethod def from_dict(obj: Any) -> "PermissionRequestExtensionPermissionAccess": assert isinstance(obj, dict) capabilities = from_list(from_str, obj.get("capabilities")) extension_name = from_str(obj.get("extensionName")) - managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) + managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) return PermissionRequestExtensionPermissionAccess( capabilities=capabilities, extension_name=extension_name, - managed_approval_required=managed_approval_required, tool_call_id=tool_call_id, + managed_approval_required=managed_approval_required, ) def to_dict(self) -> dict: @@ -5088,10 +5088,10 @@ def to_dict(self) -> dict: result["capabilities"] = from_list(from_str, self.capabilities) result["extensionName"] = from_str(self.extension_name) result["kind"] = self.kind - if self.managed_approval_required is not None: - result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) if self.tool_call_id is not None: result["toolCallId"] = from_union([from_none, from_str], self.tool_call_id) + if self.managed_approval_required is not None: + result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) return result @@ -5101,24 +5101,24 @@ class PermissionRequestHook: kind: ClassVar[str] = "hook" tool_name: str hook_message: str | None = None - managed_approval_required: bool | None = None tool_args: Any = None tool_call_id: str | None = None + managed_approval_required: bool | None = None @staticmethod def from_dict(obj: Any) -> "PermissionRequestHook": assert isinstance(obj, dict) tool_name = from_str(obj.get("toolName")) hook_message = from_union([from_none, from_str], obj.get("hookMessage")) - managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) tool_args = obj.get("toolArgs") tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) + managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) return PermissionRequestHook( tool_name=tool_name, hook_message=hook_message, - managed_approval_required=managed_approval_required, tool_args=tool_args, tool_call_id=tool_call_id, + managed_approval_required=managed_approval_required, ) def to_dict(self) -> dict: @@ -5127,12 +5127,12 @@ def to_dict(self) -> dict: result["toolName"] = from_str(self.tool_name) if self.hook_message is not None: result["hookMessage"] = from_union([from_none, from_str], self.hook_message) - if self.managed_approval_required is not None: - result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) if self.tool_args is not None: result["toolArgs"] = self.tool_args if self.tool_call_id is not None: result["toolCallId"] = from_union([from_none, from_str], self.tool_call_id) + if self.managed_approval_required is not None: + result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) return result @@ -5145,8 +5145,8 @@ class PermissionRequestMcp: tool_name: str tool_title: str args: Any = None - managed_approval_required: bool | None = None tool_call_id: str | None = None + managed_approval_required: bool | None = None @staticmethod def from_dict(obj: Any) -> "PermissionRequestMcp": @@ -5156,16 +5156,16 @@ def from_dict(obj: Any) -> "PermissionRequestMcp": tool_name = from_str(obj.get("toolName")) tool_title = from_str(obj.get("toolTitle")) args = obj.get("args") - managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) + managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) return PermissionRequestMcp( read_only=read_only, server_name=server_name, tool_name=tool_name, tool_title=tool_title, args=args, - managed_approval_required=managed_approval_required, tool_call_id=tool_call_id, + managed_approval_required=managed_approval_required, ) def to_dict(self) -> dict: @@ -5177,10 +5177,10 @@ def to_dict(self) -> dict: result["toolTitle"] = from_str(self.tool_title) if self.args is not None: result["args"] = self.args - if self.managed_approval_required is not None: - result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) if self.tool_call_id is not None: result["toolCallId"] = from_union([from_none, from_str], self.tool_call_id) + if self.managed_approval_required is not None: + result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) return result @@ -5192,10 +5192,10 @@ class PermissionRequestMemory: action: PermissionRequestMemoryAction | None = None citations: str | None = None direction: PermissionRequestMemoryDirection | None = None - managed_approval_required: bool | None = None reason: str | None = None subject: str | None = None tool_call_id: str | None = None + managed_approval_required: bool | None = None @staticmethod def from_dict(obj: Any) -> "PermissionRequestMemory": @@ -5204,19 +5204,19 @@ def from_dict(obj: Any) -> "PermissionRequestMemory": action = from_union([from_none, lambda x: parse_enum(PermissionRequestMemoryAction, x)], obj.get("action")) citations = from_union([from_none, from_str], obj.get("citations")) direction = from_union([from_none, lambda x: parse_enum(PermissionRequestMemoryDirection, x)], obj.get("direction")) - managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) reason = from_union([from_none, from_str], obj.get("reason")) subject = from_union([from_none, from_str], obj.get("subject")) tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) + managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) return PermissionRequestMemory( fact=fact, action=action, citations=citations, direction=direction, - managed_approval_required=managed_approval_required, reason=reason, subject=subject, tool_call_id=tool_call_id, + managed_approval_required=managed_approval_required, ) def to_dict(self) -> dict: @@ -5229,14 +5229,14 @@ def to_dict(self) -> dict: result["citations"] = from_union([from_none, from_str], self.citations) if self.direction is not None: result["direction"] = from_union([from_none, lambda x: to_enum(PermissionRequestMemoryDirection, x)], self.direction) - if self.managed_approval_required is not None: - result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) if self.reason is not None: result["reason"] = from_union([from_none, from_str], self.reason) if self.subject is not None: result["subject"] = from_union([from_none, from_str], self.subject) if self.tool_call_id is not None: result["toolCallId"] = from_union([from_none, from_str], self.tool_call_id) + if self.managed_approval_required is not None: + result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) return result @@ -5246,27 +5246,27 @@ class PermissionRequestRead: intention: str kind: ClassVar[str] = "read" path: str - managed_approval_required: bool | None = None request_sandbox_bypass: bool | None = None request_sandbox_bypass_reason: str | None = None tool_call_id: str | None = None + managed_approval_required: bool | None = None @staticmethod def from_dict(obj: Any) -> "PermissionRequestRead": assert isinstance(obj, dict) intention = from_str(obj.get("intention")) path = from_str(obj.get("path")) - managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) request_sandbox_bypass = from_union([from_none, from_bool], obj.get("requestSandboxBypass")) request_sandbox_bypass_reason = from_union([from_none, from_str], obj.get("requestSandboxBypassReason")) tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) + managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) return PermissionRequestRead( intention=intention, path=path, - managed_approval_required=managed_approval_required, request_sandbox_bypass=request_sandbox_bypass, request_sandbox_bypass_reason=request_sandbox_bypass_reason, tool_call_id=tool_call_id, + managed_approval_required=managed_approval_required, ) def to_dict(self) -> dict: @@ -5274,14 +5274,14 @@ def to_dict(self) -> dict: result["intention"] = from_str(self.intention) result["kind"] = self.kind result["path"] = from_str(self.path) - if self.managed_approval_required is not None: - result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) if self.request_sandbox_bypass is not None: result["requestSandboxBypass"] = from_union([from_none, from_bool], self.request_sandbox_bypass) if self.request_sandbox_bypass_reason is not None: result["requestSandboxBypassReason"] = from_union([from_none, from_str], self.request_sandbox_bypass_reason) if self.tool_call_id is not None: result["toolCallId"] = from_union([from_none, from_str], self.tool_call_id) + if self.managed_approval_required is not None: + result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) return result @@ -5297,11 +5297,11 @@ class PermissionRequestShell: possible_paths: list[str] possible_urls: list[PermissionRequestShellPossibleUrl] command_segments: list[PermissionRequestShellCommandSegment] | None = None - managed_approval_required: bool | None = None request_sandbox_bypass: bool | None = None request_sandbox_bypass_reason: str | None = None tool_call_id: str | None = None warning: str | None = None + managed_approval_required: bool | None = None @staticmethod def from_dict(obj: Any) -> "PermissionRequestShell": @@ -5314,11 +5314,11 @@ def from_dict(obj: Any) -> "PermissionRequestShell": possible_paths = from_list(from_str, obj.get("possiblePaths")) possible_urls = from_list(PermissionRequestShellPossibleUrl.from_dict, obj.get("possibleUrls")) command_segments = from_union([from_none, lambda x: from_list(PermissionRequestShellCommandSegment.from_dict, x)], obj.get("commandSegments")) - managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) request_sandbox_bypass = from_union([from_none, from_bool], obj.get("requestSandboxBypass")) request_sandbox_bypass_reason = from_union([from_none, from_str], obj.get("requestSandboxBypassReason")) tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) warning = from_union([from_none, from_str], obj.get("warning")) + managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) return PermissionRequestShell( can_offer_session_approval=can_offer_session_approval, commands=commands, @@ -5328,11 +5328,11 @@ def from_dict(obj: Any) -> "PermissionRequestShell": possible_paths=possible_paths, possible_urls=possible_urls, command_segments=command_segments, - managed_approval_required=managed_approval_required, request_sandbox_bypass=request_sandbox_bypass, request_sandbox_bypass_reason=request_sandbox_bypass_reason, tool_call_id=tool_call_id, warning=warning, + managed_approval_required=managed_approval_required, ) def to_dict(self) -> dict: @@ -5347,8 +5347,6 @@ def to_dict(self) -> dict: result["possibleUrls"] = from_list(lambda x: to_class(PermissionRequestShellPossibleUrl, x), self.possible_urls) if self.command_segments is not None: result["commandSegments"] = from_union([from_none, lambda x: from_list(lambda x: to_class(PermissionRequestShellCommandSegment, x), x)], self.command_segments) - if self.managed_approval_required is not None: - result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) if self.request_sandbox_bypass is not None: result["requestSandboxBypass"] = from_union([from_none, from_bool], self.request_sandbox_bypass) if self.request_sandbox_bypass_reason is not None: @@ -5357,6 +5355,8 @@ def to_dict(self) -> dict: result["toolCallId"] = from_union([from_none, from_str], self.tool_call_id) if self.warning is not None: result["warning"] = from_union([from_none, from_str], self.warning) + if self.managed_approval_required is not None: + result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) return result @@ -5431,30 +5431,30 @@ class PermissionRequestUrl: intention: str kind: ClassVar[str] = "url" url: str - managed_approval_required: bool | None = None redirected_from: str | None = None request_sandbox_bypass: bool | None = None request_sandbox_bypass_reason: str | None = None tool_call_id: str | None = None + managed_approval_required: bool | None = None @staticmethod def from_dict(obj: Any) -> "PermissionRequestUrl": assert isinstance(obj, dict) intention = from_str(obj.get("intention")) url = from_str(obj.get("url")) - managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) redirected_from = from_union([from_none, from_str], obj.get("redirectedFrom")) request_sandbox_bypass = from_union([from_none, from_bool], obj.get("requestSandboxBypass")) request_sandbox_bypass_reason = from_union([from_none, from_str], obj.get("requestSandboxBypassReason")) tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) + managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) return PermissionRequestUrl( intention=intention, url=url, - managed_approval_required=managed_approval_required, redirected_from=redirected_from, request_sandbox_bypass=request_sandbox_bypass, request_sandbox_bypass_reason=request_sandbox_bypass_reason, tool_call_id=tool_call_id, + managed_approval_required=managed_approval_required, ) def to_dict(self) -> dict: @@ -5462,8 +5462,6 @@ def to_dict(self) -> dict: result["intention"] = from_str(self.intention) result["kind"] = self.kind result["url"] = from_str(self.url) - if self.managed_approval_required is not None: - result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) if self.redirected_from is not None: result["redirectedFrom"] = from_union([from_none, from_str], self.redirected_from) if self.request_sandbox_bypass is not None: @@ -5472,6 +5470,8 @@ def to_dict(self) -> dict: result["requestSandboxBypassReason"] = from_union([from_none, from_str], self.request_sandbox_bypass_reason) if self.tool_call_id is not None: result["toolCallId"] = from_union([from_none, from_str], self.tool_call_id) + if self.managed_approval_required is not None: + result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) return result @@ -5483,11 +5483,11 @@ class PermissionRequestWrite: file_name: str intention: str kind: ClassVar[str] = "write" - managed_approval_required: bool | None = None new_file_contents: str | None = None request_sandbox_bypass: bool | None = None request_sandbox_bypass_reason: str | None = None tool_call_id: str | None = None + managed_approval_required: bool | None = None @staticmethod def from_dict(obj: Any) -> "PermissionRequestWrite": @@ -5496,21 +5496,21 @@ def from_dict(obj: Any) -> "PermissionRequestWrite": diff = from_str(obj.get("diff")) file_name = from_str(obj.get("fileName")) intention = from_str(obj.get("intention")) - managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) new_file_contents = from_union([from_none, from_str], obj.get("newFileContents")) request_sandbox_bypass = from_union([from_none, from_bool], obj.get("requestSandboxBypass")) request_sandbox_bypass_reason = from_union([from_none, from_str], obj.get("requestSandboxBypassReason")) tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) + managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) return PermissionRequestWrite( can_offer_session_approval=can_offer_session_approval, diff=diff, file_name=file_name, intention=intention, - managed_approval_required=managed_approval_required, new_file_contents=new_file_contents, request_sandbox_bypass=request_sandbox_bypass, request_sandbox_bypass_reason=request_sandbox_bypass_reason, tool_call_id=tool_call_id, + managed_approval_required=managed_approval_required, ) def to_dict(self) -> dict: @@ -5520,8 +5520,6 @@ def to_dict(self) -> dict: result["fileName"] = from_str(self.file_name) result["intention"] = from_str(self.intention) result["kind"] = self.kind - if self.managed_approval_required is not None: - result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) if self.new_file_contents is not None: result["newFileContents"] = from_union([from_none, from_str], self.new_file_contents) if self.request_sandbox_bypass is not None: @@ -5530,6 +5528,8 @@ def to_dict(self) -> dict: result["requestSandboxBypassReason"] = from_union([from_none, from_str], self.request_sandbox_bypass_reason) if self.tool_call_id is not None: result["toolCallId"] = from_union([from_none, from_str], self.tool_call_id) + if self.managed_approval_required is not None: + result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) return result diff --git a/python/test_managed_permissions.py b/python/test_managed_permissions.py index 913724e769..37077ec1c9 100644 --- a/python/test_managed_permissions.py +++ b/python/test_managed_permissions.py @@ -2,7 +2,11 @@ from copilot.rpc import PermissionDecisionApproveOnce, PermissionDecisionUserNotAvailable from copilot.session import CopilotSession, PermissionHandler, PermissionNoResult -from copilot.session_events import PermissionRequestedData, PermissionRequestRead +from copilot.session_events import ( + PermissionRequestCustomTool, + PermissionRequestedData, + PermissionRequestRead, +) def test_permission_event_exposes_managed_approval_required() -> None: @@ -22,6 +26,18 @@ def test_permission_event_exposes_managed_approval_required() -> None: assert data.to_dict()["permissionRequest"]["managedApprovalRequired"] is True +def test_managed_metadata_preserves_existing_positional_constructor_order() -> None: + request = PermissionRequestCustomTool( + "Run a custom tool", + "custom_tool", + {"value": 1}, + "tool-call-1", + ) + + assert request.tool_call_id == "tool-call-1" + assert request.managed_approval_required is None + + def test_approve_all_rejects_managed_settings_session() -> None: request = PermissionRequestRead( intention="Read ordinary content", diff --git a/scripts/codegen/python.ts b/scripts/codegen/python.ts index 0752ef2736..96228e4abb 100644 --- a/scripts/codegen/python.ts +++ b/scripts/codegen/python.ts @@ -2253,9 +2253,17 @@ function emitPyClass( const fieldEntries = Object.entries(schema.properties || {}).filter( ([, value]) => typeof value === "object" ) as Array<[string, JSONSchema7]>; + const optionalFieldEntries = fieldEntries + .filter(([name]) => !required.has(name)) + .sort(([left], [right]) => { + const leftAppendOnly = left === "managedApprovalRequired"; + const rightAppendOnly = right === "managedApprovalRequired"; + if (leftAppendOnly !== rightAppendOnly) return leftAppendOnly ? 1 : -1; + return left.localeCompare(right); + }); const orderedFieldEntries = [ ...fieldEntries.filter(([name]) => required.has(name)).sort(([a], [b]) => a.localeCompare(b)), - ...fieldEntries.filter(([name]) => !required.has(name)).sort(([a], [b]) => a.localeCompare(b)), + ...optionalFieldEntries, ]; const fieldInfos = orderedFieldEntries.map(([propName, propSchema]) => { From 3da6c283098df1a5c062be53af21b62caf97cc74 Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Fri, 31 Jul 2026 09:16:43 -0700 Subject: [PATCH 39/41] Preserve managed metadata compatibility Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- nodejs/src/types.ts | 7 +- nodejs/test/client.test.ts | 9 +++ python/copilot/generated/session_events.py | 80 +++++++++++----------- python/test_managed_permissions.py | 14 ++++ scripts/codegen/python.ts | 8 ++- scripts/codegen/utils.ts | 1 + 6 files changed, 74 insertions(+), 45 deletions(-) diff --git a/nodejs/src/types.ts b/nodejs/src/types.ts index 2166632756..ea70ae30f7 100644 --- a/nodejs/src/types.ts +++ b/nodejs/src/types.ts @@ -1148,8 +1148,11 @@ export const approveAll: PermissionHandler = (request, invocation) => { if (invocation.managedSettingsEnabled) { throw new Error("approveAll cannot be used when managed settings are enabled"); } - if ("managedApprovalRequired" in request && request.managedApprovalRequired === true) { - return { kind: "no-result" }; + if ("managedApprovalRequired" in request) { + const managedApprovalRequired = request.managedApprovalRequired; + if (managedApprovalRequired !== undefined && managedApprovalRequired !== false) { + return { kind: "no-result" }; + } } return { kind: "approve-once" }; }; diff --git a/nodejs/test/client.test.ts b/nodejs/test/client.test.ts index 314a2e8c3f..4d20411370 100644 --- a/nodejs/test/client.test.ts +++ b/nodejs/test/client.test.ts @@ -42,6 +42,15 @@ describe("approveAll", () => { kind: "no-result", }); }); + + it("fails closed when managed approval metadata is malformed", () => { + const malformedRequest = { + ...request, + managedApprovalRequired: "yes", + } as unknown as Parameters[0]; + + expect(approveAll(malformedRequest, invocation)).toEqual({ kind: "no-result" }); + }); }); describe("CopilotClient", () => { diff --git a/python/copilot/generated/session_events.py b/python/copilot/generated/session_events.py index c582b68b54..c137c47986 100644 --- a/python/copilot/generated/session_events.py +++ b/python/copilot/generated/session_events.py @@ -4495,9 +4495,9 @@ class PermissionPromptRequestCommands: kind: ClassVar[str] = "commands" # Experimental: this field is part of an experimental API and may change or be removed. auto_approval: PermissionAutoApproval | None = None + managed_approval_required: bool | None = None tool_call_id: str | None = None warning: str | None = None - managed_approval_required: bool | None = None @staticmethod def from_dict(obj: Any) -> "PermissionPromptRequestCommands": @@ -4507,18 +4507,18 @@ def from_dict(obj: Any) -> "PermissionPromptRequestCommands": full_command_text = from_str(obj.get("fullCommandText")) intention = from_str(obj.get("intention")) auto_approval = from_union([from_none, PermissionAutoApproval.from_dict], obj.get("autoApproval")) + managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) warning = from_union([from_none, from_str], obj.get("warning")) - managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) return PermissionPromptRequestCommands( can_offer_session_approval=can_offer_session_approval, command_identifiers=command_identifiers, full_command_text=full_command_text, intention=intention, auto_approval=auto_approval, + managed_approval_required=managed_approval_required, tool_call_id=tool_call_id, warning=warning, - managed_approval_required=managed_approval_required, ) def to_dict(self) -> dict: @@ -4530,12 +4530,12 @@ def to_dict(self) -> dict: result["kind"] = self.kind if self.auto_approval is not None: result["autoApproval"] = from_union([from_none, lambda x: to_class(PermissionAutoApproval, x)], self.auto_approval) + if self.managed_approval_required is not None: + result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) if self.tool_call_id is not None: result["toolCallId"] = from_union([from_none, from_str], self.tool_call_id) if self.warning is not None: result["warning"] = from_union([from_none, from_str], self.warning) - if self.managed_approval_required is not None: - result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) return result @@ -4841,8 +4841,8 @@ class PermissionPromptRequestRead: path: str # Experimental: this field is part of an experimental API and may change or be removed. auto_approval: PermissionAutoApproval | None = None - tool_call_id: str | None = None managed_approval_required: bool | None = None + tool_call_id: str | None = None @staticmethod def from_dict(obj: Any) -> "PermissionPromptRequestRead": @@ -4850,14 +4850,14 @@ def from_dict(obj: Any) -> "PermissionPromptRequestRead": intention = from_str(obj.get("intention")) path = from_str(obj.get("path")) auto_approval = from_union([from_none, PermissionAutoApproval.from_dict], obj.get("autoApproval")) - tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) + tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) return PermissionPromptRequestRead( intention=intention, path=path, auto_approval=auto_approval, - tool_call_id=tool_call_id, managed_approval_required=managed_approval_required, + tool_call_id=tool_call_id, ) def to_dict(self) -> dict: @@ -4867,10 +4867,10 @@ def to_dict(self) -> dict: result["path"] = from_str(self.path) if self.auto_approval is not None: result["autoApproval"] = from_union([from_none, lambda x: to_class(PermissionAutoApproval, x)], self.auto_approval) - if self.tool_call_id is not None: - result["toolCallId"] = from_union([from_none, from_str], self.tool_call_id) if self.managed_approval_required is not None: result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) + if self.tool_call_id is not None: + result["toolCallId"] = from_union([from_none, from_str], self.tool_call_id) return result @@ -4882,11 +4882,11 @@ class PermissionPromptRequestUrl: url: str # Experimental: this field is part of an experimental API and may change or be removed. auto_approval: PermissionAutoApproval | None = None + managed_approval_required: bool | None = None redirected_from: str | None = None request_sandbox_bypass: bool | None = None request_sandbox_bypass_reason: str | None = None tool_call_id: str | None = None - managed_approval_required: bool | None = None @staticmethod def from_dict(obj: Any) -> "PermissionPromptRequestUrl": @@ -4894,20 +4894,20 @@ def from_dict(obj: Any) -> "PermissionPromptRequestUrl": intention = from_str(obj.get("intention")) url = from_str(obj.get("url")) auto_approval = from_union([from_none, PermissionAutoApproval.from_dict], obj.get("autoApproval")) + managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) redirected_from = from_union([from_none, from_str], obj.get("redirectedFrom")) request_sandbox_bypass = from_union([from_none, from_bool], obj.get("requestSandboxBypass")) request_sandbox_bypass_reason = from_union([from_none, from_str], obj.get("requestSandboxBypassReason")) tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) - managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) return PermissionPromptRequestUrl( intention=intention, url=url, auto_approval=auto_approval, + managed_approval_required=managed_approval_required, redirected_from=redirected_from, request_sandbox_bypass=request_sandbox_bypass, request_sandbox_bypass_reason=request_sandbox_bypass_reason, tool_call_id=tool_call_id, - managed_approval_required=managed_approval_required, ) def to_dict(self) -> dict: @@ -4917,6 +4917,8 @@ def to_dict(self) -> dict: result["url"] = from_str(self.url) if self.auto_approval is not None: result["autoApproval"] = from_union([from_none, lambda x: to_class(PermissionAutoApproval, x)], self.auto_approval) + if self.managed_approval_required is not None: + result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) if self.redirected_from is not None: result["redirectedFrom"] = from_union([from_none, from_str], self.redirected_from) if self.request_sandbox_bypass is not None: @@ -4925,8 +4927,6 @@ def to_dict(self) -> dict: result["requestSandboxBypassReason"] = from_union([from_none, from_str], self.request_sandbox_bypass_reason) if self.tool_call_id is not None: result["toolCallId"] = from_union([from_none, from_str], self.tool_call_id) - if self.managed_approval_required is not None: - result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) return result @@ -4940,9 +4940,9 @@ class PermissionPromptRequestWrite: kind: ClassVar[str] = "write" # Experimental: this field is part of an experimental API and may change or be removed. auto_approval: PermissionAutoApproval | None = None + managed_approval_required: bool | None = None new_file_contents: str | None = None tool_call_id: str | None = None - managed_approval_required: bool | None = None @staticmethod def from_dict(obj: Any) -> "PermissionPromptRequestWrite": @@ -4952,18 +4952,18 @@ def from_dict(obj: Any) -> "PermissionPromptRequestWrite": file_name = from_str(obj.get("fileName")) intention = from_str(obj.get("intention")) auto_approval = from_union([from_none, PermissionAutoApproval.from_dict], obj.get("autoApproval")) + managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) new_file_contents = from_union([from_none, from_str], obj.get("newFileContents")) tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) - managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) return PermissionPromptRequestWrite( can_offer_session_approval=can_offer_session_approval, diff=diff, file_name=file_name, intention=intention, auto_approval=auto_approval, + managed_approval_required=managed_approval_required, new_file_contents=new_file_contents, tool_call_id=tool_call_id, - managed_approval_required=managed_approval_required, ) def to_dict(self) -> dict: @@ -4975,12 +4975,12 @@ def to_dict(self) -> dict: result["kind"] = self.kind if self.auto_approval is not None: result["autoApproval"] = from_union([from_none, lambda x: to_class(PermissionAutoApproval, x)], self.auto_approval) + if self.managed_approval_required is not None: + result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) if self.new_file_contents is not None: result["newFileContents"] = from_union([from_none, from_str], self.new_file_contents) if self.tool_call_id is not None: result["toolCallId"] = from_union([from_none, from_str], self.tool_call_id) - if self.managed_approval_required is not None: - result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) return result @@ -5246,27 +5246,27 @@ class PermissionRequestRead: intention: str kind: ClassVar[str] = "read" path: str + managed_approval_required: bool | None = None request_sandbox_bypass: bool | None = None request_sandbox_bypass_reason: str | None = None tool_call_id: str | None = None - managed_approval_required: bool | None = None @staticmethod def from_dict(obj: Any) -> "PermissionRequestRead": assert isinstance(obj, dict) intention = from_str(obj.get("intention")) path = from_str(obj.get("path")) + managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) request_sandbox_bypass = from_union([from_none, from_bool], obj.get("requestSandboxBypass")) request_sandbox_bypass_reason = from_union([from_none, from_str], obj.get("requestSandboxBypassReason")) tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) - managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) return PermissionRequestRead( intention=intention, path=path, + managed_approval_required=managed_approval_required, request_sandbox_bypass=request_sandbox_bypass, request_sandbox_bypass_reason=request_sandbox_bypass_reason, tool_call_id=tool_call_id, - managed_approval_required=managed_approval_required, ) def to_dict(self) -> dict: @@ -5274,14 +5274,14 @@ def to_dict(self) -> dict: result["intention"] = from_str(self.intention) result["kind"] = self.kind result["path"] = from_str(self.path) + if self.managed_approval_required is not None: + result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) if self.request_sandbox_bypass is not None: result["requestSandboxBypass"] = from_union([from_none, from_bool], self.request_sandbox_bypass) if self.request_sandbox_bypass_reason is not None: result["requestSandboxBypassReason"] = from_union([from_none, from_str], self.request_sandbox_bypass_reason) if self.tool_call_id is not None: result["toolCallId"] = from_union([from_none, from_str], self.tool_call_id) - if self.managed_approval_required is not None: - result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) return result @@ -5297,11 +5297,11 @@ class PermissionRequestShell: possible_paths: list[str] possible_urls: list[PermissionRequestShellPossibleUrl] command_segments: list[PermissionRequestShellCommandSegment] | None = None + managed_approval_required: bool | None = None request_sandbox_bypass: bool | None = None request_sandbox_bypass_reason: str | None = None tool_call_id: str | None = None warning: str | None = None - managed_approval_required: bool | None = None @staticmethod def from_dict(obj: Any) -> "PermissionRequestShell": @@ -5314,11 +5314,11 @@ def from_dict(obj: Any) -> "PermissionRequestShell": possible_paths = from_list(from_str, obj.get("possiblePaths")) possible_urls = from_list(PermissionRequestShellPossibleUrl.from_dict, obj.get("possibleUrls")) command_segments = from_union([from_none, lambda x: from_list(PermissionRequestShellCommandSegment.from_dict, x)], obj.get("commandSegments")) + managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) request_sandbox_bypass = from_union([from_none, from_bool], obj.get("requestSandboxBypass")) request_sandbox_bypass_reason = from_union([from_none, from_str], obj.get("requestSandboxBypassReason")) tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) warning = from_union([from_none, from_str], obj.get("warning")) - managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) return PermissionRequestShell( can_offer_session_approval=can_offer_session_approval, commands=commands, @@ -5328,11 +5328,11 @@ def from_dict(obj: Any) -> "PermissionRequestShell": possible_paths=possible_paths, possible_urls=possible_urls, command_segments=command_segments, + managed_approval_required=managed_approval_required, request_sandbox_bypass=request_sandbox_bypass, request_sandbox_bypass_reason=request_sandbox_bypass_reason, tool_call_id=tool_call_id, warning=warning, - managed_approval_required=managed_approval_required, ) def to_dict(self) -> dict: @@ -5347,6 +5347,8 @@ def to_dict(self) -> dict: result["possibleUrls"] = from_list(lambda x: to_class(PermissionRequestShellPossibleUrl, x), self.possible_urls) if self.command_segments is not None: result["commandSegments"] = from_union([from_none, lambda x: from_list(lambda x: to_class(PermissionRequestShellCommandSegment, x), x)], self.command_segments) + if self.managed_approval_required is not None: + result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) if self.request_sandbox_bypass is not None: result["requestSandboxBypass"] = from_union([from_none, from_bool], self.request_sandbox_bypass) if self.request_sandbox_bypass_reason is not None: @@ -5355,8 +5357,6 @@ def to_dict(self) -> dict: result["toolCallId"] = from_union([from_none, from_str], self.tool_call_id) if self.warning is not None: result["warning"] = from_union([from_none, from_str], self.warning) - if self.managed_approval_required is not None: - result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) return result @@ -5431,30 +5431,30 @@ class PermissionRequestUrl: intention: str kind: ClassVar[str] = "url" url: str + managed_approval_required: bool | None = None redirected_from: str | None = None request_sandbox_bypass: bool | None = None request_sandbox_bypass_reason: str | None = None tool_call_id: str | None = None - managed_approval_required: bool | None = None @staticmethod def from_dict(obj: Any) -> "PermissionRequestUrl": assert isinstance(obj, dict) intention = from_str(obj.get("intention")) url = from_str(obj.get("url")) + managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) redirected_from = from_union([from_none, from_str], obj.get("redirectedFrom")) request_sandbox_bypass = from_union([from_none, from_bool], obj.get("requestSandboxBypass")) request_sandbox_bypass_reason = from_union([from_none, from_str], obj.get("requestSandboxBypassReason")) tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) - managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) return PermissionRequestUrl( intention=intention, url=url, + managed_approval_required=managed_approval_required, redirected_from=redirected_from, request_sandbox_bypass=request_sandbox_bypass, request_sandbox_bypass_reason=request_sandbox_bypass_reason, tool_call_id=tool_call_id, - managed_approval_required=managed_approval_required, ) def to_dict(self) -> dict: @@ -5462,6 +5462,8 @@ def to_dict(self) -> dict: result["intention"] = from_str(self.intention) result["kind"] = self.kind result["url"] = from_str(self.url) + if self.managed_approval_required is not None: + result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) if self.redirected_from is not None: result["redirectedFrom"] = from_union([from_none, from_str], self.redirected_from) if self.request_sandbox_bypass is not None: @@ -5470,8 +5472,6 @@ def to_dict(self) -> dict: result["requestSandboxBypassReason"] = from_union([from_none, from_str], self.request_sandbox_bypass_reason) if self.tool_call_id is not None: result["toolCallId"] = from_union([from_none, from_str], self.tool_call_id) - if self.managed_approval_required is not None: - result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) return result @@ -5483,11 +5483,11 @@ class PermissionRequestWrite: file_name: str intention: str kind: ClassVar[str] = "write" + managed_approval_required: bool | None = None new_file_contents: str | None = None request_sandbox_bypass: bool | None = None request_sandbox_bypass_reason: str | None = None tool_call_id: str | None = None - managed_approval_required: bool | None = None @staticmethod def from_dict(obj: Any) -> "PermissionRequestWrite": @@ -5496,21 +5496,21 @@ def from_dict(obj: Any) -> "PermissionRequestWrite": diff = from_str(obj.get("diff")) file_name = from_str(obj.get("fileName")) intention = from_str(obj.get("intention")) + managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) new_file_contents = from_union([from_none, from_str], obj.get("newFileContents")) request_sandbox_bypass = from_union([from_none, from_bool], obj.get("requestSandboxBypass")) request_sandbox_bypass_reason = from_union([from_none, from_str], obj.get("requestSandboxBypassReason")) tool_call_id = from_union([from_none, from_str], obj.get("toolCallId")) - managed_approval_required = from_union([from_none, from_bool], obj.get("managedApprovalRequired")) return PermissionRequestWrite( can_offer_session_approval=can_offer_session_approval, diff=diff, file_name=file_name, intention=intention, + managed_approval_required=managed_approval_required, new_file_contents=new_file_contents, request_sandbox_bypass=request_sandbox_bypass, request_sandbox_bypass_reason=request_sandbox_bypass_reason, tool_call_id=tool_call_id, - managed_approval_required=managed_approval_required, ) def to_dict(self) -> dict: @@ -5520,6 +5520,8 @@ def to_dict(self) -> dict: result["fileName"] = from_str(self.file_name) result["intention"] = from_str(self.intention) result["kind"] = self.kind + if self.managed_approval_required is not None: + result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) if self.new_file_contents is not None: result["newFileContents"] = from_union([from_none, from_str], self.new_file_contents) if self.request_sandbox_bypass is not None: @@ -5528,8 +5530,6 @@ def to_dict(self) -> dict: result["requestSandboxBypassReason"] = from_union([from_none, from_str], self.request_sandbox_bypass_reason) if self.tool_call_id is not None: result["toolCallId"] = from_union([from_none, from_str], self.tool_call_id) - if self.managed_approval_required is not None: - result["managedApprovalRequired"] = from_union([from_none, from_bool], self.managed_approval_required) return result diff --git a/python/test_managed_permissions.py b/python/test_managed_permissions.py index 37077ec1c9..ca07556da1 100644 --- a/python/test_managed_permissions.py +++ b/python/test_managed_permissions.py @@ -37,6 +37,20 @@ def test_managed_metadata_preserves_existing_positional_constructor_order() -> N assert request.tool_call_id == "tool-call-1" assert request.managed_approval_required is None + read_request = PermissionRequestRead( + "Read content", + "/workspace/file.txt", + True, + False, + "Use the sandbox", + "tool-call-2", + ) + + assert read_request.managed_approval_required is True + assert read_request.request_sandbox_bypass is False + assert read_request.request_sandbox_bypass_reason == "Use the sandbox" + assert read_request.tool_call_id == "tool-call-2" + def test_approve_all_rejects_managed_settings_session() -> None: request = PermissionRequestRead( diff --git a/scripts/codegen/python.ts b/scripts/codegen/python.ts index 96228e4abb..d5d6040a30 100644 --- a/scripts/codegen/python.ts +++ b/scripts/codegen/python.ts @@ -2255,9 +2255,11 @@ function emitPyClass( ) as Array<[string, JSONSchema7]>; const optionalFieldEntries = fieldEntries .filter(([name]) => !required.has(name)) - .sort(([left], [right]) => { - const leftAppendOnly = left === "managedApprovalRequired"; - const rightAppendOnly = right === "managedApprovalRequired"; + .sort(([left, leftSchema], [right, rightSchema]) => { + const leftAppendOnly = + (leftSchema as Record)["x-copilot-sdk-append-last"] === true; + const rightAppendOnly = + (rightSchema as Record)["x-copilot-sdk-append-last"] === true; if (leftAppendOnly !== rightAppendOnly) return leftAppendOnly ? 1 : -1; return left.localeCompare(right); }); diff --git a/scripts/codegen/utils.ts b/scripts/codegen/utils.ts index 2138457dcd..ba4c9442bc 100644 --- a/scripts/codegen/utils.ts +++ b/scripts/codegen/utils.ts @@ -476,6 +476,7 @@ export function addManagedApprovalRequiredToPermissionRequests)["x-copilot-sdk-append-last"] = true; for (const definitions of [cloned.definitions, cloned.$defs]) { if (!definitions) continue; From f6625242bb2074371ab79263d5ec562dec93c964 Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Fri, 31 Jul 2026 09:24:39 -0700 Subject: [PATCH 40/41] Fail closed on malformed Java managed metadata Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../github/copilot/rpc/PermissionRequest.java | 23 +++++++++++++++ .../copilot/PermissionRequestResultTest.java | 28 +++++++++++++++++++ 2 files changed, 51 insertions(+) diff --git a/java/src/main/java/com/github/copilot/rpc/PermissionRequest.java b/java/src/main/java/com/github/copilot/rpc/PermissionRequest.java index 936c570899..a3297bfb2c 100644 --- a/java/src/main/java/com/github/copilot/rpc/PermissionRequest.java +++ b/java/src/main/java/com/github/copilot/rpc/PermissionRequest.java @@ -4,12 +4,18 @@ package com.github.copilot.rpc; +import java.io.IOException; import java.util.Map; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; /** * Represents a permission request from the AI assistant. @@ -34,10 +40,27 @@ public class PermissionRequest { private String toolCallId; @JsonProperty("managedApprovalRequired") + @JsonDeserialize(using = ManagedApprovalRequiredDeserializer.class) private Boolean managedApprovalRequired; private Map extensionData; + private static final class ManagedApprovalRequiredDeserializer extends JsonDeserializer { + + @Override + public Boolean deserialize(JsonParser parser, DeserializationContext context) throws IOException { + JsonToken token = parser.currentToken(); + if (token == JsonToken.VALUE_TRUE) { + return true; + } + if (token == JsonToken.VALUE_FALSE) { + return false; + } + parser.skipChildren(); + return true; + } + } + /** * Converts the value exposed by a {@code permission.requested} event into a * typed permission request. diff --git a/java/src/test/java/com/github/copilot/PermissionRequestResultTest.java b/java/src/test/java/com/github/copilot/PermissionRequestResultTest.java index d1cb6137ce..c1ca9191b0 100644 --- a/java/src/test/java/com/github/copilot/PermissionRequestResultTest.java +++ b/java/src/test/java/com/github/copilot/PermissionRequestResultTest.java @@ -88,6 +88,34 @@ void testPermissionRequestExposesManagedApprovalRequired() throws Exception { assertTrue(request.getManagedApprovalRequired()); } + @Test + void testMalformedManagedApprovalRequiredFailsClosed() throws Exception { + var request = MAPPER.readValue(""" + { + "kind": "read", + "managedApprovalRequired": 0 + } + """, PermissionRequest.class); + + assertTrue(request.getManagedApprovalRequired()); + var result = PermissionHandler.APPROVE_ALL.handle(request, new PermissionInvocation()).join(); + assertEquals("no-result", result.getKind()); + } + + @Test + void testManagedApprovalRequiredPreservesFalse() throws Exception { + var request = MAPPER.readValue(""" + { + "kind": "read", + "managedApprovalRequired": false + } + """, PermissionRequest.class); + + assertFalse(request.getManagedApprovalRequired()); + var result = PermissionHandler.APPROVE_ALL.handle(request, new PermissionInvocation()).join(); + assertEquals("approve-once", result.getKind()); + } + @Test void testPermissionEventValueConvertsToTypedRequest() { var event = MAPPER From 6d0de6339b27245dfcf910058042136f11b06f76 Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Fri, 31 Jul 2026 11:52:51 -0700 Subject: [PATCH 41/41] Retrigger CI Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>