getTriggerCharacters() {
+ return caller.invoke("session.completions.getTriggerCharacters", java.util.Map.of("sessionId", this.sessionId), SessionCompletionsGetTriggerCharactersResult.class);
+ }
+
+ /**
+ * Request host-driven completions for the current composer input.
+ *
+ * Note: the {@code sessionId} field in the params record is overridden
+ * by the session-scoped wrapper; any value provided is ignored.
+ *
+ * @apiNote This method is experimental and may change in a future version.
+ * @since 1.0.0
+ */
+ @CopilotExperimental
+ public CompletableFuture request(SessionCompletionsRequestParams params) {
+ com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params);
+ _p.put("sessionId", this.sessionId);
+ return caller.invoke("session.completions.request", _p, SessionCompletionsRequestResult.class);
+ }
+
+}
diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionCompletionsGetTriggerCharactersParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionCompletionsGetTriggerCharactersParams.java
new file mode 100644
index 0000000000..6a40aa402e
--- /dev/null
+++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionCompletionsGetTriggerCharactersParams.java
@@ -0,0 +1,30 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.github.copilot.CopilotExperimental;
+import javax.annotation.processing.Generated;
+
+/**
+ * Identifies the target session.
+ *
+ * @apiNote This method is experimental and may change in a future version.
+ * @since 1.0.0
+ */
+@CopilotExperimental
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public record SessionCompletionsGetTriggerCharactersParams(
+ /** Target session identifier */
+ @JsonProperty("sessionId") String sessionId
+) {
+}
diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionCompletionsGetTriggerCharactersResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionCompletionsGetTriggerCharactersResult.java
new file mode 100644
index 0000000000..03c28665e6
--- /dev/null
+++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionCompletionsGetTriggerCharactersResult.java
@@ -0,0 +1,31 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.github.copilot.CopilotExperimental;
+import java.util.List;
+import javax.annotation.processing.Generated;
+
+/**
+ * Characters that, when typed in the composer, should trigger a `completions.request`. Empty when the session has no host-driven completions (e.g. local sessions, or a relay host that does not advertise `completionTriggerCharacters`).
+ *
+ * @apiNote This method is experimental and may change in a future version.
+ * @since 1.0.0
+ */
+@CopilotExperimental
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public record SessionCompletionsGetTriggerCharactersResult(
+ /** Trigger characters advertised by the host (e.g. `["@", "#"]`). Empty disables host-driven completions for the session. */
+ @JsonProperty("triggerCharacters") List triggerCharacters
+) {
+}
diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionCompletionsRequestParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionCompletionsRequestParams.java
new file mode 100644
index 0000000000..02ccd7b12e
--- /dev/null
+++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionCompletionsRequestParams.java
@@ -0,0 +1,34 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.github.copilot.CopilotExperimental;
+import javax.annotation.processing.Generated;
+
+/**
+ * Request host-driven completions for the current composer input.
+ *
+ * @apiNote This method is experimental and may change in a future version.
+ * @since 1.0.0
+ */
+@CopilotExperimental
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public record SessionCompletionsRequestParams(
+ /** Target session identifier */
+ @JsonProperty("sessionId") String sessionId,
+ /** The full composed composer input. */
+ @JsonProperty("text") String text,
+ /** Cursor offset within `text`, in UTF-16 code units. */
+ @JsonProperty("offset") Long offset
+) {
+}
diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionCompletionsRequestResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionCompletionsRequestResult.java
new file mode 100644
index 0000000000..ff450a8c9e
--- /dev/null
+++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionCompletionsRequestResult.java
@@ -0,0 +1,31 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.github.copilot.CopilotExperimental;
+import java.util.List;
+import javax.annotation.processing.Generated;
+
+/**
+ * Host-driven completion items for the current composer input. Empty when the host returns no items or does not support completions.
+ *
+ * @apiNote This method is experimental and may change in a future version.
+ * @since 1.0.0
+ */
+@CopilotExperimental
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public record SessionCompletionsRequestResult(
+ /** Completion items in host-ranked order. */
+ @JsonProperty("items") List items
+) {
+}
diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionEventLogRegisterInterestParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionEventLogRegisterInterestParams.java
index af0bca43ea..d6f522ed12 100644
--- a/java/src/generated/java/com/github/copilot/generated/rpc/SessionEventLogRegisterInterestParams.java
+++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionEventLogRegisterInterestParams.java
@@ -26,7 +26,7 @@
public record SessionEventLogRegisterInterestParams(
/** Target session identifier */
@JsonProperty("sessionId") String sessionId,
- /** The event type the consumer wants the runtime to treat as 'observed' for behavior-switching gating. Some runtime code paths inspect whether any consumer is interested in a specific event type and choose a different implementation accordingly (e.g. `mcp.oauth_required`: when interest is registered the runtime delegates the full interactive OAuth flow to the consumer; when no interest is registered the runtime installs a browserless fallback that silently reuses cached tokens). SDK clients that long-poll events do NOT automatically appear as listeners to these gating checks — they must explicitly call `registerInterest` for each event type they want the runtime to count as having a consumer. Multiple registrations for the same event type from the same or different consumers are tracked independently and must each be released. See: `mcp.oauth_required`, `sampling.requested`, `auto_mode_switch.requested`, `user_input.requested`, `elicitation.requested`, `command.queued`, `exit_plan_mode.requested`. */
+ /** The event type the consumer wants the runtime to treat as 'observed' for behavior-switching gating. Some runtime code paths inspect whether any consumer is interested in a specific event type and choose a different implementation accordingly (e.g. `mcp.oauth_required`: when interest is registered the runtime delegates the full interactive OAuth flow to the consumer; when no interest is registered the runtime installs a browserless fallback that silently reuses cached tokens). SDK clients that long-poll events do NOT automatically appear as listeners to these gating checks — they must explicitly call `registerInterest` for each event type they want the runtime to count as having a consumer. Multiple registrations for the same event type from the same or different consumers are tracked independently and must each be released. See: `mcp.oauth_required`, `sampling.requested`, `auto_mode_switch.requested`, `session_limits_exhausted.requested`, `user_input.requested`, `elicitation.requested`, `command.queued`, `exit_plan_mode.requested`. */
@JsonProperty("eventType") String eventType
) {
}
diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/ResponseLimitsConfig.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionLimitsConfig.java
similarity index 84%
rename from java/src/generated/java/com/github/copilot/generated/rpc/ResponseLimitsConfig.java
rename to java/src/generated/java/com/github/copilot/generated/rpc/SessionLimitsConfig.java
index ddb6a68a38..10b625f8a8 100644
--- a/java/src/generated/java/com/github/copilot/generated/rpc/ResponseLimitsConfig.java
+++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionLimitsConfig.java
@@ -13,15 +13,15 @@
import javax.annotation.processing.Generated;
/**
- * Optional response limits.
+ * Optional session limits.
*
* @since 1.0.0
*/
@javax.annotation.processing.Generated("copilot-sdk-codegen")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public record ResponseLimitsConfig(
- /** Maximum AI Credits allowed while responding to one top-level user message. */
+public record SessionLimitsConfig(
+ /** Maximum AI Credits allowed across the session's current accounting window. */
@JsonProperty("maxAiCredits") Double maxAiCredits
) {
}
diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionMetadataSnapshotResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMetadataSnapshotResult.java
index 774bcad981..6c29e07b6e 100644
--- a/java/src/generated/java/com/github/copilot/generated/rpc/SessionMetadataSnapshotResult.java
+++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionMetadataSnapshotResult.java
@@ -51,8 +51,8 @@ public record SessionMetadataSnapshotResult(
@JsonProperty("currentMode") MetadataSnapshotCurrentMode currentMode,
/** Currently selected model identifier, if any */
@JsonProperty("selectedModel") String selectedModel,
- /** Current response limits for the session, or null when no limits are active */
- @JsonProperty("responseLimits") ResponseLimitsConfig responseLimits,
+ /** Current session limits, or null when no limits are active */
+ @JsonProperty("sessionLimits") SessionLimitsConfig sessionLimits,
/** Public-facing workspace metadata for this session, or null if the session has no associated workspace. Excludes runtime-internal fields (GitHub IDs, summary count, internal flags). */
@JsonProperty("workspace") SessionMetadataSnapshotResultWorkspace workspace
) {
diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionOptionsUpdateParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionOptionsUpdateParams.java
index 930b6ec636..9cede57d35 100644
--- a/java/src/generated/java/com/github/copilot/generated/rpc/SessionOptionsUpdateParams.java
+++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionOptionsUpdateParams.java
@@ -56,6 +56,8 @@ public record SessionOptionsUpdateParams(
@JsonProperty("availableTools") List availableTools,
/** Denylist of tool names for this session. */
@JsonProperty("excludedTools") List excludedTools,
+ /** Built-in subagent names to exclude from this session. Excluded built-ins are hidden from agent discovery and cannot be dispatched unless a custom agent with the same name is available. */
+ @JsonProperty("excludedBuiltinAgents") List excludedBuiltinAgents,
/** Controls how availableTools (allowlist) and excludedTools (denylist) combine when both are set. */
@JsonProperty("toolFilterPrecedence") OptionsUpdateToolFilterPrecedence toolFilterPrecedence,
/** Whether shell-script safety heuristics are enabled. */
@@ -130,7 +132,7 @@ public record SessionOptionsUpdateParams(
@JsonProperty("enableSkills") Boolean enableSkills,
/** Context tier for models with tiered pricing. The session uses this to derive effective `modelCapabilitiesOverrides` so compaction, truncation, token display, and request limits honor the selected tier. */
@JsonProperty("contextTier") OptionsUpdateContextTier contextTier,
- /** Optional response limits. Pass null to clear the response limits. */
- @JsonProperty("responseLimits") ResponseLimitsConfig responseLimits
+ /** Optional session limits. Pass null to clear the session limits. */
+ @JsonProperty("sessionLimits") SessionLimitsConfig sessionLimits
) {
}
diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionRpc.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionRpc.java
index bcac24e699..3881140bb1 100644
--- a/java/src/generated/java/com/github/copilot/generated/rpc/SessionRpc.java
+++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionRpc.java
@@ -43,6 +43,8 @@ public final class SessionRpc {
public final SessionPlanApi plan;
/** API methods for the {@code workspaces} namespace. */
public final SessionWorkspacesApi workspaces;
+ /** API methods for the {@code completions} namespace. */
+ public final SessionCompletionsApi completions;
/** API methods for the {@code instructions} namespace. */
public final SessionInstructionsApi instructions;
/** API methods for the {@code fleet} namespace. */
@@ -110,6 +112,7 @@ public SessionRpc(RpcCaller caller, String sessionId) {
this.name = new SessionNameApi(caller, sessionId);
this.plan = new SessionPlanApi(caller, sessionId);
this.workspaces = new SessionWorkspacesApi(caller, sessionId);
+ this.completions = new SessionCompletionsApi(caller, sessionId);
this.instructions = new SessionInstructionsApi(caller, sessionId);
this.fleet = new SessionFleetApi(caller, sessionId);
this.agent = new SessionAgentApi(caller, sessionId);
diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionUiApi.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionUiApi.java
index 63d90266ef..b3e16d7c27 100644
--- a/java/src/generated/java/com/github/copilot/generated/rpc/SessionUiApi.java
+++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionUiApi.java
@@ -126,6 +126,22 @@ public CompletableFuture handlePendi
return caller.invoke("session.ui.handlePendingAutoModeSwitch", _p, SessionUiHandlePendingAutoModeSwitchResult.class);
}
+ /**
+ * Request ID of a pending `session_limits_exhausted.requested` event and the user's selected limit action.
+ *
+ * Note: the {@code sessionId} field in the params record is overridden
+ * by the session-scoped wrapper; any value provided is ignored.
+ *
+ * @apiNote This method is experimental and may change in a future version.
+ * @since 1.0.0
+ */
+ @CopilotExperimental
+ public CompletableFuture handlePendingSessionLimitsExhausted(SessionUiHandlePendingSessionLimitsExhaustedParams params) {
+ com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params);
+ _p.put("sessionId", this.sessionId);
+ return caller.invoke("session.ui.handlePendingSessionLimitsExhausted", _p, SessionUiHandlePendingSessionLimitsExhaustedResult.class);
+ }
+
/**
* Request ID of a pending `exit_plan_mode.requested` event and the user's response.
*
diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionUiHandlePendingSessionLimitsExhaustedParams.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionUiHandlePendingSessionLimitsExhaustedParams.java
new file mode 100644
index 0000000000..93ff195373
--- /dev/null
+++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionUiHandlePendingSessionLimitsExhaustedParams.java
@@ -0,0 +1,34 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.github.copilot.CopilotExperimental;
+import javax.annotation.processing.Generated;
+
+/**
+ * Request ID of a pending `session_limits_exhausted.requested` event and the user's selected limit action.
+ *
+ * @apiNote This method is experimental and may change in a future version.
+ * @since 1.0.0
+ */
+@CopilotExperimental
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public record SessionUiHandlePendingSessionLimitsExhaustedParams(
+ /** Target session identifier */
+ @JsonProperty("sessionId") String sessionId,
+ /** The unique request ID from the session_limits_exhausted.requested event */
+ @JsonProperty("requestId") String requestId,
+ /** The selected session-limit action. */
+ @JsonProperty("response") UISessionLimitsExhaustedResponse response
+) {
+}
diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/SessionUiHandlePendingSessionLimitsExhaustedResult.java b/java/src/generated/java/com/github/copilot/generated/rpc/SessionUiHandlePendingSessionLimitsExhaustedResult.java
new file mode 100644
index 0000000000..79eeeebbf1
--- /dev/null
+++ b/java/src/generated/java/com/github/copilot/generated/rpc/SessionUiHandlePendingSessionLimitsExhaustedResult.java
@@ -0,0 +1,30 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.github.copilot.CopilotExperimental;
+import javax.annotation.processing.Generated;
+
+/**
+ * Indicates whether the pending UI request was resolved by this call.
+ *
+ * @apiNote This method is experimental and may change in a future version.
+ * @since 1.0.0
+ */
+@CopilotExperimental
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public record SessionUiHandlePendingSessionLimitsExhaustedResult(
+ /** True if the request was still pending and was resolved by this call. False if the request ID was unknown, already resolved by another client (e.g. GitHub), expired, or otherwise no longer pending. */
+ @JsonProperty("success") Boolean success
+) {
+}
diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/UISessionLimitsExhaustedResponse.java b/java/src/generated/java/com/github/copilot/generated/rpc/UISessionLimitsExhaustedResponse.java
new file mode 100644
index 0000000000..53991d9d7f
--- /dev/null
+++ b/java/src/generated/java/com/github/copilot/generated/rpc/UISessionLimitsExhaustedResponse.java
@@ -0,0 +1,31 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import javax.annotation.processing.Generated;
+
+/**
+ * The user's selected action for an exhausted session limit.
+ *
+ * @since 1.0.0
+ */
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public record UISessionLimitsExhaustedResponse(
+ /** Action selected by the user. */
+ @JsonProperty("action") UISessionLimitsExhaustedResponseAction action,
+ /** AI Credits to add to the current max when action is 'add'. */
+ @JsonProperty("additionalAiCredits") Double additionalAiCredits,
+ /** New absolute max AI Credits when action is 'set'. */
+ @JsonProperty("maxAiCredits") Double maxAiCredits
+) {
+}
diff --git a/java/src/generated/java/com/github/copilot/generated/rpc/UISessionLimitsExhaustedResponseAction.java b/java/src/generated/java/com/github/copilot/generated/rpc/UISessionLimitsExhaustedResponseAction.java
new file mode 100644
index 0000000000..6f4e48e6f3
--- /dev/null
+++ b/java/src/generated/java/com/github/copilot/generated/rpc/UISessionLimitsExhaustedResponseAction.java
@@ -0,0 +1,39 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.generated.rpc;
+
+import javax.annotation.processing.Generated;
+
+/**
+ * User action selected for an exhausted session limit.
+ *
+ * @since 1.0.0
+ */
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public enum UISessionLimitsExhaustedResponseAction {
+ /** The {@code add} variant. */
+ ADD("add"),
+ /** The {@code set} variant. */
+ SET("set"),
+ /** The {@code unset} variant. */
+ UNSET("unset"),
+ /** The {@code cancel} variant. */
+ CANCEL("cancel");
+
+ private final String value;
+ UISessionLimitsExhaustedResponseAction(String value) { this.value = value; }
+ @com.fasterxml.jackson.annotation.JsonValue
+ public String getValue() { return value; }
+ @com.fasterxml.jackson.annotation.JsonCreator
+ public static UISessionLimitsExhaustedResponseAction fromValue(String value) {
+ for (UISessionLimitsExhaustedResponseAction v : values()) {
+ if (v.value.equals(value)) return v;
+ }
+ throw new IllegalArgumentException("Unknown UISessionLimitsExhaustedResponseAction value: " + value);
+ }
+}
diff --git a/nodejs/package-lock.json b/nodejs/package-lock.json
index 3d8adc8534..d902fbc1d2 100644
--- a/nodejs/package-lock.json
+++ b/nodejs/package-lock.json
@@ -9,7 +9,7 @@
"version": "0.0.0-dev",
"license": "MIT",
"dependencies": {
- "@github/copilot": "^1.0.66-2",
+ "@github/copilot": "^1.0.66",
"vscode-jsonrpc": "^8.2.1",
"zod": "^4.3.6"
},
@@ -699,9 +699,9 @@
}
},
"node_modules/@github/copilot": {
- "version": "1.0.66-2",
- "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.66-2.tgz",
- "integrity": "sha512-nAhhtfjpryklyombieuu18NK2g+BmEk4/8qvXVj8k+w/63tiVpLxFh865Vf6NQiVh/S7hbjMghTbrptsspYg2w==",
+ "version": "1.0.66",
+ "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.66.tgz",
+ "integrity": "sha512-m3+3FLSgum90xN4+eiwnLvdrDvM+oZzur5DfhOH88duNDKBcLQvKQY9fG/I1l1t8a1iBwjpgtRpsBwykE8k3Zw==",
"license": "SEE LICENSE IN LICENSE.md",
"dependencies": {
"detect-libc": "^2.1.2"
@@ -710,20 +710,20 @@
"copilot": "npm-loader.js"
},
"optionalDependencies": {
- "@github/copilot-darwin-arm64": "1.0.66-2",
- "@github/copilot-darwin-x64": "1.0.66-2",
- "@github/copilot-linux-arm64": "1.0.66-2",
- "@github/copilot-linux-x64": "1.0.66-2",
- "@github/copilot-linuxmusl-arm64": "1.0.66-2",
- "@github/copilot-linuxmusl-x64": "1.0.66-2",
- "@github/copilot-win32-arm64": "1.0.66-2",
- "@github/copilot-win32-x64": "1.0.66-2"
+ "@github/copilot-darwin-arm64": "1.0.66",
+ "@github/copilot-darwin-x64": "1.0.66",
+ "@github/copilot-linux-arm64": "1.0.66",
+ "@github/copilot-linux-x64": "1.0.66",
+ "@github/copilot-linuxmusl-arm64": "1.0.66",
+ "@github/copilot-linuxmusl-x64": "1.0.66",
+ "@github/copilot-win32-arm64": "1.0.66",
+ "@github/copilot-win32-x64": "1.0.66"
}
},
"node_modules/@github/copilot-darwin-arm64": {
- "version": "1.0.66-2",
- "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.66-2.tgz",
- "integrity": "sha512-gjLRtAQOdFQUOTm7nYi+zufkGxMlQlTzUyncQ3W4u1+WdGQbx5fWqMg/yd+j1yMN9PEETyF/ZHZqAaFWkEpQww==",
+ "version": "1.0.66",
+ "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.66.tgz",
+ "integrity": "sha512-cJPXE2rWSjR+B8GRBUUd0k9PM4euWRUe3xgHoJqi9o/jJjtRYn6DZMrmFt9xgjoYWf0WZOyrlDgedqO1V+zDAg==",
"cpu": [
"arm64"
],
@@ -737,9 +737,9 @@
}
},
"node_modules/@github/copilot-darwin-x64": {
- "version": "1.0.66-2",
- "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.66-2.tgz",
- "integrity": "sha512-wWWBsVwJtRTXqCK8lVpzwbJd3Tm1F23avf942K+PmsGYiZZYNcS5pt4umQRRj0sHKgO/muuA4eg/tMfGNi5fgA==",
+ "version": "1.0.66",
+ "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.66.tgz",
+ "integrity": "sha512-44mpx2ZcRFHDx4B9xlrL5OQyTgaD/Hn+bAkeStXgcG8UkkfYSsRtLhnaxqUEQrtIEiVQrw++XWvUO0AscRrX+w==",
"cpu": [
"x64"
],
@@ -753,9 +753,9 @@
}
},
"node_modules/@github/copilot-linux-arm64": {
- "version": "1.0.66-2",
- "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.66-2.tgz",
- "integrity": "sha512-j0hjx77JNFR3ZS8z3flY2j5SfGZMfKigYVFpDlTJM8FhfkMCUJ5IUhsZwSTimhHlxrsXuI31S6g0WsZLmBUe6A==",
+ "version": "1.0.66",
+ "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.66.tgz",
+ "integrity": "sha512-uXtTs/rYjk6kacNs/T0s/lxn0JBvAgu78pBoZeWpU5APhICkPy9kC+lNAzLYoZujVVDOHT05IoeifHppFpQ8+w==",
"cpu": [
"arm64"
],
@@ -769,9 +769,9 @@
}
},
"node_modules/@github/copilot-linux-x64": {
- "version": "1.0.66-2",
- "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.66-2.tgz",
- "integrity": "sha512-vWaNbh4WdwkiI40Thcfbwi8tZFKo06r+Dm9Zfb8uY4wAz3X5PaGeSq+8XrNoV3uaRWltI0ncSIrq5tSOyDtRPg==",
+ "version": "1.0.66",
+ "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.66.tgz",
+ "integrity": "sha512-tXn3OuJCx/YEDNgYg8mdOGSFiIjmLJtTEyZ/VoEA86ffUIPxrunc0wnapEFk2zOW1unwdJeBuVIkzlB3RS1/eA==",
"cpu": [
"x64"
],
@@ -785,9 +785,9 @@
}
},
"node_modules/@github/copilot-linuxmusl-arm64": {
- "version": "1.0.66-2",
- "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.66-2.tgz",
- "integrity": "sha512-LbWy5NlWasBeV/i+Xol+8dW7kbAQr6MF46apbseRNHYkhwyF/417WtLfirP8O2hPuqyU72q/HAQziFXkz14pIQ==",
+ "version": "1.0.66",
+ "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.66.tgz",
+ "integrity": "sha512-sHRag7W5CG0kbbX3j9v9cUmIafk/0N8MGGr2knvPeIHtxwZQYYjx397gT1nN6xagLWt5mvchkYybfQFCyCBaxg==",
"cpu": [
"arm64"
],
@@ -801,9 +801,9 @@
}
},
"node_modules/@github/copilot-linuxmusl-x64": {
- "version": "1.0.66-2",
- "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.66-2.tgz",
- "integrity": "sha512-djOu52fGIU7eUhQdUS0K5xB2eFdi8LTTbxvphHWlrN1AD1BdZ+VX9Pk2avt6yCfW+Hh0loh2pNsCbTfNyxvULA==",
+ "version": "1.0.66",
+ "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.66.tgz",
+ "integrity": "sha512-bdIgHOaVZlvsF/4awzMxsby6T+4k7aWe9HZr+sr+qU8tuG19jwi/1LXGB6tKdlFeFgY78yX0lR+ywByVJc5loA==",
"cpu": [
"x64"
],
@@ -817,9 +817,9 @@
}
},
"node_modules/@github/copilot-win32-arm64": {
- "version": "1.0.66-2",
- "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.66-2.tgz",
- "integrity": "sha512-YQu01atiwoz8XfrHKqvI1xNjnc2IIIxgJDkQ6PxwrWPZ4IO320izwlXbW2ZaOz9yDgjWNis6EJ4Ryz8K+mM6kg==",
+ "version": "1.0.66",
+ "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.66.tgz",
+ "integrity": "sha512-T7FGONCVWIPjjAxp22cu4WKqNogq56FknHGAvj7Ryn5ZoanFAR3vXXlXDsYnDKLBcshjRYGxocl2UnmRTMxgvg==",
"cpu": [
"arm64"
],
@@ -833,9 +833,9 @@
}
},
"node_modules/@github/copilot-win32-x64": {
- "version": "1.0.66-2",
- "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.66-2.tgz",
- "integrity": "sha512-4/kTs+lKc67f7KEAQ+Gt3sEBFDSEGoUxJujddV/+fS8EAg9uF2g6e3NzS1I4+htyRM4Oq/Z6xfWjGUgQsi9rfw==",
+ "version": "1.0.66",
+ "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.66.tgz",
+ "integrity": "sha512-eroxRUSJZOJCk0luLyX6A1qqGIWs8p4w0EjZFhCzvdFvJ0abIovGyt3R/gN9DeyJM8Qs7ROPGvqevUlXh6DhCg==",
"cpu": [
"x64"
],
diff --git a/nodejs/package.json b/nodejs/package.json
index 6777caae15..928acf24e6 100644
--- a/nodejs/package.json
+++ b/nodejs/package.json
@@ -56,7 +56,7 @@
"author": "GitHub",
"license": "MIT",
"dependencies": {
- "@github/copilot": "^1.0.66-2",
+ "@github/copilot": "^1.0.66",
"vscode-jsonrpc": "^8.2.1",
"zod": "^4.3.6"
},
diff --git a/nodejs/samples/package-lock.json b/nodejs/samples/package-lock.json
index aeb70b1c5d..527e3bb8e8 100644
--- a/nodejs/samples/package-lock.json
+++ b/nodejs/samples/package-lock.json
@@ -18,7 +18,7 @@
"version": "0.0.0-dev",
"license": "MIT",
"dependencies": {
- "@github/copilot": "^1.0.66-2",
+ "@github/copilot": "^1.0.66",
"vscode-jsonrpc": "^8.2.1",
"zod": "^4.3.6"
},
diff --git a/nodejs/src/generated/rpc.ts b/nodejs/src/generated/rpc.ts
index 65df346401..f3188d41d7 100644
--- a/nodejs/src/generated/rpc.ts
+++ b/nodejs/src/generated/rpc.ts
@@ -5,7 +5,7 @@
import type { MessageConnection } from "vscode-jsonrpc/node.js";
-import type { AbortReason, Attachment, ContextTier, EmbeddedBlobResourceContents, EmbeddedTextResourceContents, McpServerSource, McpServerStatus, PermissionPromptRequest, PermissionRule, ReasoningSummary, ResponseLimitsConfig, SessionEvent, SessionMode, ShutdownType, SkillSource, UserToolSessionApproval } from "./session-events.js";
+import type { AbortReason, Attachment, ContextTier, EmbeddedBlobResourceContents, EmbeddedTextResourceContents, McpServerSource, McpServerStatus, PermissionPromptRequest, PermissionRule, ReasoningSummary, SessionEvent, SessionLimitsConfig, SessionMode, ShutdownType, SkillSource, UserToolSessionApproval } from "./session-events.js";
/**
* Initial authentication info for the session.
@@ -22,6 +22,20 @@ export type AuthInfo =
| UserAuthInfo
| GhCliAuthInfo
| ApiKeyAuthInfo;
+/**
+ * Resolved Anthropic adaptive-thinking capability for a model.
+ *
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
+ * via the `definition` "AdaptiveThinkingSupport".
+ */
+/** @experimental */
+export type AdaptiveThinkingSupport =
+ /** The model does not accept thinking.type='adaptive' */
+ | "unsupported"
+ /** The model accepts adaptive thinking but also accepts thinking.type='enabled' */
+ | "optional"
+ /** The model only accepts adaptive thinking and rejects thinking.type='enabled' with HTTP 400 (e.g. opus-4.7/4.8) */
+ | "required";
/**
* Which tier this directory belongs to
*
@@ -1839,6 +1853,22 @@ export type UIExitPlanModeAction =
| "autopilot"
/** Exit plan mode and continue in autopilot mode with parallel subagent execution. */
| "autopilot_fleet";
+/**
+ * User action selected for an exhausted session limit.
+ *
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
+ * via the `definition` "UISessionLimitsExhaustedResponseAction".
+ */
+/** @experimental */
+export type UISessionLimitsExhaustedResponseAction =
+ /** Increase the current max by an exact AI Credits amount. */
+ | "add"
+ /** Set a new absolute max AI Credits value. */
+ | "set"
+ /** Remove the current session limit. */
+ | "unset"
+ /** Leave the limit unchanged and cancel the blocked model request. */
+ | "cancel";
/**
* Type of change represented by this file diff.
*
@@ -3406,6 +3436,78 @@ export interface CommandsRespondToQueuedCommandResult {
*/
success: boolean;
}
+/**
+ * Characters that, when typed in the composer, should trigger a `completions.request`. Empty when the session has no host-driven completions (e.g. local sessions, or a relay host that does not advertise `completionTriggerCharacters`).
+ *
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
+ * via the `definition` "CompletionsGetTriggerCharactersResult".
+ */
+/** @experimental */
+export interface CompletionsGetTriggerCharactersResult {
+ /**
+ * Trigger characters advertised by the host (e.g. `["@", "#"]`). Empty disables host-driven completions for the session.
+ */
+ triggerCharacters: string[];
+}
+/**
+ * Request host-driven completions for the current composer input.
+ *
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
+ * via the `definition` "CompletionsRequestRequest".
+ */
+/** @experimental */
+export interface CompletionsRequestRequest {
+ /**
+ * The full composed composer input.
+ */
+ text: string;
+ /**
+ * Cursor offset within `text`, in UTF-16 code units.
+ */
+ offset: number;
+}
+/**
+ * Host-driven completion items for the current composer input. Empty when the host returns no items or does not support completions.
+ *
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
+ * via the `definition` "CompletionsRequestResult".
+ */
+/** @experimental */
+export interface CompletionsRequestResult {
+ /**
+ * Completion items in host-ranked order.
+ */
+ items: SessionCompletionItem[];
+}
+/**
+ * A single host-driven completion. Accepting an item replaces `[rangeStart, rangeEnd)` (UTF-16 code units) in the composer with `insertText`; when the range is absent, the active token around the cursor is replaced.
+ *
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
+ * via the `definition` "SessionCompletionItem".
+ */
+/** @experimental */
+export interface SessionCompletionItem {
+ /**
+ * Text spliced into the composer when the item is accepted.
+ */
+ insertText: string;
+ /**
+ * Start of the replacement range in `text`, in UTF-16 code units.
+ */
+ rangeStart?: number;
+ /**
+ * End (exclusive) of the replacement range in `text`, in UTF-16 code units.
+ */
+ rangeEnd?: number;
+ /**
+ * Primary display label for the picker row. Falls back to `insertText` when absent.
+ */
+ label?: string;
+ /**
+ * Render-kind hint for the picker row (e.g. `"document"`, `"directory"`), derived from the host's display kind.
+ */
+ kind?: string;
+}
/**
* Params to attach or detach an in-process ExtensionController delegate.
*
@@ -6453,6 +6555,7 @@ export interface ModelCapabilitiesSupports {
* Whether this model supports reasoning effort configuration
*/
reasoningEffort?: boolean;
+ adaptive_thinking?: AdaptiveThinkingSupport;
}
/**
* Token limits for prompts, outputs, and context window
@@ -6639,6 +6742,7 @@ export interface ModelCapabilitiesOverrideSupports {
* Whether this model supports reasoning effort configuration
*/
reasoningEffort?: boolean;
+ adaptive_thinking?: AdaptiveThinkingSupport;
}
/**
* Token limits for prompts, outputs, and context window
@@ -9425,7 +9529,7 @@ export interface QueueRemoveMostRecentResult {
/** @experimental */
export interface RegisterEventInterestParams {
/**
- * The event type the consumer wants the runtime to treat as 'observed' for behavior-switching gating. Some runtime code paths inspect whether any consumer is interested in a specific event type and choose a different implementation accordingly (e.g. `mcp.oauth_required`: when interest is registered the runtime delegates the full interactive OAuth flow to the consumer; when no interest is registered the runtime installs a browserless fallback that silently reuses cached tokens). SDK clients that long-poll events do NOT automatically appear as listeners to these gating checks — they must explicitly call `registerInterest` for each event type they want the runtime to count as having a consumer. Multiple registrations for the same event type from the same or different consumers are tracked independently and must each be released. See: `mcp.oauth_required`, `sampling.requested`, `auto_mode_switch.requested`, `user_input.requested`, `elicitation.requested`, `command.queued`, `exit_plan_mode.requested`.
+ * The event type the consumer wants the runtime to treat as 'observed' for behavior-switching gating. Some runtime code paths inspect whether any consumer is interested in a specific event type and choose a different implementation accordingly (e.g. `mcp.oauth_required`: when interest is registered the runtime delegates the full interactive OAuth flow to the consumer; when no interest is registered the runtime installs a browserless fallback that silently reuses cached tokens). SDK clients that long-poll events do NOT automatically appear as listeners to these gating checks — they must explicitly call `registerInterest` for each event type they want the runtime to count as having a consumer. Multiple registrations for the same event type from the same or different consumers are tracked independently and must each be released. See: `mcp.oauth_required`, `sampling.requested`, `auto_mode_switch.requested`, `session_limits_exhausted.requested`, `user_input.requested`, `elicitation.requested`, `command.queued`, `exit_plan_mode.requested`.
*/
eventType: string;
}
@@ -10934,9 +11038,9 @@ export interface SessionMetadataSnapshot {
*/
selectedModel?: string;
/**
- * Current response limits for the session, or null when no limits are active
+ * Current session limits, or null when no limits are active
*/
- responseLimits: ResponseLimitsConfig | null;
+ sessionLimits: SessionLimitsConfig | null;
/**
* Public-facing workspace metadata for this session, or null if the session has no associated workspace. Excludes runtime-internal fields (GitHub IDs, summary count, internal flags).
*/
@@ -11068,6 +11172,10 @@ export interface SessionOpenOptions {
* Denylist of tool names.
*/
excludedTools?: string[];
+ /**
+ * Built-in subagent names to exclude from this session. Excluded built-ins are hidden from agent discovery and cannot be dispatched unless a custom agent with the same name is available.
+ */
+ excludedBuiltinAgents?: string[];
/**
* Whether shell-script safety heuristics are enabled.
*/
@@ -11157,7 +11265,7 @@ export interface SessionOpenOptions {
*/
maxInlineBinaryBytes?: number;
modelCapabilitiesOverrides?: ModelCapabilitiesOverride;
- responseLimits?: ResponseLimitsConfig;
+ sessionLimits?: SessionLimitsConfig;
/**
* Runtime context discriminator for agent filtering.
*/
@@ -12039,6 +12147,10 @@ export interface SessionUpdateOptionsParams {
* Denylist of tool names for this session.
*/
excludedTools?: string[];
+ /**
+ * Built-in subagent names to exclude from this session. Excluded built-ins are hidden from agent discovery and cannot be dispatched unless a custom agent with the same name is available.
+ */
+ excludedBuiltinAgents?: string[];
toolFilterPrecedence?: OptionsUpdateToolFilterPrecedence;
/**
* Whether shell-script safety heuristics are enabled.
@@ -12178,9 +12290,9 @@ export interface SessionUpdateOptionsParams {
enableSkills?: boolean;
contextTier?: OptionsUpdateContextTier;
/**
- * Optional response limits. Pass null to clear the response limits.
+ * Optional session limits. Pass null to clear the session limits.
*/
- responseLimits?: ResponseLimitsConfig | null;
+ sessionLimits?: SessionLimitsConfig | null;
}
/**
* Indicates whether the session options patch was applied successfully.
@@ -13683,6 +13795,38 @@ export interface UIHandlePendingSamplingRequest {
export interface UIHandlePendingSamplingResponse {
[k: string]: unknown | undefined;
}
+/**
+ * Request ID of a pending `session_limits_exhausted.requested` event and the user's selected limit action.
+ *
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
+ * via the `definition` "UIHandlePendingSessionLimitsExhaustedRequest".
+ */
+/** @experimental */
+export interface UIHandlePendingSessionLimitsExhaustedRequest {
+ /**
+ * The unique request ID from the session_limits_exhausted.requested event
+ */
+ requestId: string;
+ response: UISessionLimitsExhaustedResponse;
+}
+/**
+ * The user's selected action for an exhausted session limit.
+ *
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
+ * via the `definition` "UISessionLimitsExhaustedResponse".
+ */
+/** @experimental */
+export interface UISessionLimitsExhaustedResponse {
+ action: UISessionLimitsExhaustedResponseAction;
+ /**
+ * AI Credits to add to the current max when action is 'add'.
+ */
+ additionalAiCredits?: number;
+ /**
+ * New absolute max AI Credits when action is 'set'.
+ */
+ maxAiCredits?: number;
+}
/**
* Request ID of a pending `user_input.requested` event and the user's response.
*
@@ -15350,6 +15494,25 @@ export function createSessionRpc(connection: MessageConnection, sessionId: strin
connection.sendRequest("session.workspaces.diff", { sessionId, ...params }),
},
/** @experimental */
+ completions: {
+ /**
+ * Gets the characters that should trigger host-driven completions for the session. Empty disables host-driven completions (e.g. local sessions, or a relay host that does not advertise them).
+ *
+ * @returns Characters that, when typed in the composer, should trigger a `completions.request`. Empty when the session has no host-driven completions (e.g. local sessions, or a relay host that does not advertise `completionTriggerCharacters`).
+ */
+ getTriggerCharacters: async (): Promise =>
+ connection.sendRequest("session.completions.getTriggerCharacters", { sessionId }),
+ /**
+ * Requests host-driven completion items for the current composer input. Returns an empty list when the host has no items or does not support completions.
+ *
+ * @param params Request host-driven completions for the current composer input.
+ *
+ * @returns Host-driven completion items for the current composer input. Empty when the host returns no items or does not support completions.
+ */
+ request: async (params: CompletionsRequestRequest): Promise =>
+ connection.sendRequest("session.completions.request", { sessionId, ...params }),
+ },
+ /** @experimental */
instructions: {
/**
* Gets instruction sources loaded for the session.
@@ -15979,6 +16142,15 @@ export function createSessionRpc(connection: MessageConnection, sessionId: strin
*/
handlePendingAutoModeSwitch: async (params: UIHandlePendingAutoModeSwitchRequest): Promise =>
connection.sendRequest("session.ui.handlePendingAutoModeSwitch", { sessionId, ...params }),
+ /**
+ * Resolves a pending `session_limits_exhausted.requested` event with the user's selected limit action.
+ *
+ * @param params Request ID of a pending `session_limits_exhausted.requested` event and the user's selected limit action.
+ *
+ * @returns Indicates whether the pending UI request was resolved by this call.
+ */
+ handlePendingSessionLimitsExhausted: async (params: UIHandlePendingSessionLimitsExhaustedRequest): Promise =>
+ connection.sendRequest("session.ui.handlePendingSessionLimitsExhausted", { sessionId, ...params }),
/**
* Resolves a pending `exit_plan_mode.requested` event with the user's response.
*
diff --git a/nodejs/src/generated/session-events.ts b/nodejs/src/generated/session-events.ts
index 68462f20b1..5d7eac82da 100644
--- a/nodejs/src/generated/session-events.ts
+++ b/nodejs/src/generated/session-events.ts
@@ -21,7 +21,7 @@ export type SessionEvent =
| WarningEvent
| ModelChangeEvent
| ModeChangedEvent
- | ResponseLimitsChangedEvent
+ | SessionLimitsChangedEvent
| PermissionsChangedEvent
| PlanChangedEvent
| TodosChangedEvent
@@ -30,6 +30,7 @@ export type SessionEvent =
| TruncationEvent
| SnapshotRewindEvent
| ShutdownEvent
+ | UsageCheckpointEvent
| ContextChangedEvent
| UsageInfoEvent
| CompactionStartEvent
@@ -87,6 +88,8 @@ export type SessionEvent =
| CommandCompletedEvent
| AutoModeSwitchRequestedEvent
| AutoModeSwitchCompletedEvent
+ | SessionLimitsExhaustedRequestedEvent
+ | SessionLimitsExhaustedCompletedEvent
| CommandsChangedEvent
| CapabilitiesChangedEvent
| ExitPlanModeRequestedEvent
@@ -581,6 +584,18 @@ export type AutoModeSwitchResponse =
| "yes_always"
/** Do not switch models. */
| "no";
+/**
+ * User action selected for an exhausted session limit.
+ */
+export type SessionLimitsExhaustedResponseAction =
+ /** Increase the current max by an exact AI Credits amount. */
+ | "add"
+ /** Set a new absolute max AI Credits value. */
+ | "set"
+ /** Remove the current session limit. */
+ | "unset"
+ /** Leave the limit unchanged and cancel the blocked model request. */
+ | "cancel";
/**
* Exit plan mode action
*/
@@ -740,7 +755,6 @@ export interface StartData {
* Whether this session supports remote steering via GitHub
*/
remoteSteerable?: boolean;
- responseLimits?: ResponseLimitsConfig;
/**
* Model selected at session creation time, if any
*/
@@ -749,6 +763,7 @@ export interface StartData {
* Unique identifier for the session
*/
sessionId: string;
+ sessionLimits?: SessionLimitsConfig;
/**
* ISO 8601 timestamp when the session was created
*/
@@ -793,11 +808,11 @@ export interface WorkingDirectoryContext {
repositoryHost?: string;
}
/**
- * Optional response limits.
+ * Optional session limits.
*/
-export interface ResponseLimitsConfig {
+export interface SessionLimitsConfig {
/**
- * Maximum AI Credits allowed while responding to one top-level user message.
+ * Maximum AI Credits allowed across the session's current accounting window.
*/
maxAiCredits?: number;
}
@@ -865,10 +880,6 @@ export interface ResumeData {
* Whether this session supports remote steering via GitHub
*/
remoteSteerable?: boolean;
- /**
- * Response limits currently configured at resume time; null when no limits are active
- */
- responseLimits?: ResponseLimitsConfig | null;
/**
* ISO 8601 timestamp when the session was resumed
*/
@@ -877,6 +888,10 @@ export interface ResumeData {
* Model currently selected at resume time
*/
selectedModel?: string;
+ /**
+ * Session limits currently configured at resume time; null when no limits are active
+ */
+ sessionLimits?: SessionLimitsConfig | null;
/**
* True when this resume attached to a session that the runtime already had running in-memory (for example, an extension joining a session another client was actively driving). False (or omitted) for cold resumes — the runtime had to reconstitute the session from its persisted event log.
*/
@@ -1461,14 +1476,14 @@ export interface ModeChangedData {
previousMode: SessionMode;
}
/**
- * Session event "session.response_limits_changed". Response limits update details. Null clears the limits.
+ * Session event "session.session_limits_changed". Session limits update details. Null clears the limits.
*/
-export interface ResponseLimitsChangedEvent {
+export interface SessionLimitsChangedEvent {
/**
* Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
*/
agentId?: string;
- data: ResponseLimitsChangedData;
+ data: SessionLimitsChangedData;
/**
* When true, the event is transient and not persisted to the session event log on disk
*/
@@ -1486,18 +1501,18 @@ export interface ResponseLimitsChangedEvent {
*/
timestamp: string;
/**
- * Type discriminator. Always "session.response_limits_changed".
+ * Type discriminator. Always "session.session_limits_changed".
*/
- type: "session.response_limits_changed";
+ type: "session.session_limits_changed";
}
/**
- * Response limits update details. Null clears the limits.
+ * Session limits update details. Null clears the limits.
*/
-export interface ResponseLimitsChangedData {
+export interface SessionLimitsChangedData {
/**
- * Current response limits for the session, or null when no limits are active
+ * Current session limits, or null when no limits are active
*/
- responseLimits: ResponseLimitsConfig | null;
+ sessionLimits: SessionLimitsConfig | null;
}
/**
* Session event "session.permissions_changed". Permissions change details carrying the aggregate allow-all boolean transition.
@@ -2029,6 +2044,51 @@ export interface ShutdownTokenDetail {
*/
tokenCount: number;
}
+/**
+ * Session event "session.usage_checkpoint". Durable session usage checkpoint for reconstructing aggregate accounting on resume
+ */
+export interface UsageCheckpointEvent {
+ /**
+ * Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
+ */
+ agentId?: string;
+ data: UsageCheckpointData;
+ /**
+ * When true, the event is transient and not persisted to the session event log on disk
+ */
+ ephemeral?: boolean;
+ /**
+ * Unique event identifier (UUID v4), generated when the event is emitted
+ */
+ id: string;
+ /**
+ * ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event.
+ */
+ parentId: string | null;
+ /**
+ * ISO 8601 timestamp when the event was created
+ */
+ timestamp: string;
+ /**
+ * Type discriminator. Always "session.usage_checkpoint".
+ */
+ type: "session.usage_checkpoint";
+}
+/**
+ * Durable session usage checkpoint for reconstructing aggregate accounting on resume
+ */
+export interface UsageCheckpointData {
+ /**
+ * Session-wide accumulated nano-AI units cost at checkpoint time
+ */
+ totalNanoAiu: number;
+ /**
+ * Total number of premium API requests used at checkpoint time
+ *
+ * @internal
+ */
+ totalPremiumRequests?: number;
+}
/**
* Session event "session.context_changed". Updated working directory and git context after the change
*/
@@ -3227,6 +3287,10 @@ export interface AssistantMessageData {
* Readable reasoning text from the model's extended thinking
*/
reasoningText?: string;
+ /**
+ * OpenAI-compatible wire field the provider used for reasoning (e.g. reasoning_content/reasoning). Populated only when non-canonical, so the dialect round-trips across turns.
+ */
+ reasoningWireField?: string;
/**
* GitHub request tracing ID (x-github-request-id header) for correlating with server-side logs
*/
@@ -5729,6 +5793,14 @@ export interface PermissionRequestRead {
* Path of the file or directory being read
*/
path: string;
+ /**
+ * True when the model has requested to run this search outside the sandbox (it set requestSandboxBypass: true and the host opted in via sandbox.allowBypass). This is a request, not a grant: the search runs unsandboxed only if the user approves this permission request. Hosts should highlight the elevated risk in the approval UI.
+ */
+ requestSandboxBypass?: boolean;
+ /**
+ * Model-provided justification for the sandbox-bypass request. Only meaningful when requestSandboxBypass is true.
+ */
+ requestSandboxBypassReason?: string;
/**
* Tool call ID that triggered this permission request
*/
@@ -7400,6 +7472,107 @@ export interface AutoModeSwitchCompletedData {
requestId: string;
response: AutoModeSwitchResponse;
}
+/**
+ * Session event "session_limits_exhausted.requested". Session limit exhaustion notification requiring user action.
+ */
+export interface SessionLimitsExhaustedRequestedEvent {
+ /**
+ * Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
+ */
+ agentId?: string;
+ data: SessionLimitsExhaustedRequestedData;
+ /**
+ * Always true for events that are transient and not persisted to the session event log on disk.
+ */
+ ephemeral: true;
+ /**
+ * Unique event identifier (UUID v4), generated when the event is emitted
+ */
+ id: string;
+ /**
+ * ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event.
+ */
+ parentId: string | null;
+ /**
+ * ISO 8601 timestamp when the event was created
+ */
+ timestamp: string;
+ /**
+ * Type discriminator. Always "session_limits_exhausted.requested".
+ */
+ type: "session_limits_exhausted.requested";
+}
+/**
+ * Session limit exhaustion notification requiring user action.
+ */
+export interface SessionLimitsExhaustedRequestedData {
+ /**
+ * Configured max AI Credits for the current accounting window.
+ */
+ maxAiCredits: number;
+ /**
+ * Unique identifier for this request; used to respond via session.ui.handlePendingSessionLimitsExhausted().
+ */
+ requestId: string;
+ /**
+ * AI Credits already consumed in the current accounting window.
+ */
+ usedAiCredits: number;
+}
+/**
+ * Session event "session_limits_exhausted.completed". Session limit exhaustion prompt completion notification.
+ */
+export interface SessionLimitsExhaustedCompletedEvent {
+ /**
+ * Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
+ */
+ agentId?: string;
+ data: SessionLimitsExhaustedCompletedData;
+ /**
+ * Always true for events that are transient and not persisted to the session event log on disk.
+ */
+ ephemeral: true;
+ /**
+ * Unique event identifier (UUID v4), generated when the event is emitted
+ */
+ id: string;
+ /**
+ * ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event.
+ */
+ parentId: string | null;
+ /**
+ * ISO 8601 timestamp when the event was created
+ */
+ timestamp: string;
+ /**
+ * Type discriminator. Always "session_limits_exhausted.completed".
+ */
+ type: "session_limits_exhausted.completed";
+}
+/**
+ * Session limit exhaustion prompt completion notification.
+ */
+export interface SessionLimitsExhaustedCompletedData {
+ /**
+ * Request ID of the resolved request; clients should dismiss any UI for this request.
+ */
+ requestId: string;
+ response: SessionLimitsExhaustedResponse;
+}
+/**
+ * The user's selected action for an exhausted session limit.
+ */
+export interface SessionLimitsExhaustedResponse {
+ action: SessionLimitsExhaustedResponseAction;
+ /**
+ * AI Credits to add to the current max when action is 'add'.
+ */
+ additionalAiCredits?: number;
+ /**
+ * New absolute max AI Credits when action is 'set'.
+ */
+ maxAiCredits?: number;
+}
/**
* Session event "commands.changed". SDK command registration change notification
*/
diff --git a/python/copilot/generated/rpc.py b/python/copilot/generated/rpc.py
index 1d3a7b2467..ba9c4c3102 100644
--- a/python/copilot/generated/rpc.py
+++ b/python/copilot/generated/rpc.py
@@ -6,7 +6,7 @@
from typing import ClassVar, TYPE_CHECKING
-from .session_events import AbortReason, Attachment, ContextTier, EmbeddedBlobResourceContents, EmbeddedTextResourceContents, McpServerSource, McpServerStatus, PermissionPromptRequest, PermissionRule, ReasoningSummary, ResponseLimitsConfig, SessionEvent, SessionMode, ShutdownType, SkillSource, UserToolSessionApproval
+from .session_events import AbortReason, Attachment, ContextTier, EmbeddedBlobResourceContents, EmbeddedTextResourceContents, McpServerSource, McpServerStatus, PermissionPromptRequest, PermissionRule, ReasoningSummary, SessionEvent, SessionLimitsConfig, SessionMode, ShutdownType, SkillSource, UserToolSessionApproval
if TYPE_CHECKING:
from .._jsonrpc import JsonRpcClient
@@ -380,6 +380,17 @@ def to_dict(self) -> dict:
result["hasMoreUsers"] = from_bool(self.has_more_users)
return result
+# Experimental: this type is part of an experimental API and may change or be removed.
+class AdaptiveThinkingSupport(Enum):
+ """Resolved Anthropic adaptive-thinking capability for a model.
+
+ Resolved Anthropic adaptive-thinking capability — unsupported / optional / required.
+ 'required' models reject thinking.type='enabled' with HTTP 400 (e.g. opus-4.7/4.8).
+ """
+ OPTIONAL = "optional"
+ REQUIRED = "required"
+ UNSUPPORTED = "unsupported"
+
# Experimental: this type is part of an experimental API and may change or be removed.
class AgentDiscoveryPathScope(Enum):
"""Which tier this directory belongs to"""
@@ -1047,6 +1058,99 @@ def to_dict(self) -> dict:
result["success"] = from_bool(self.success)
return result
+# Experimental: this type is part of an experimental API and may change or be removed.
+@dataclass
+class CompletionsGetTriggerCharactersResult:
+ """Characters that, when typed in the composer, should trigger a `completions.request`.
+ Empty when the session has no host-driven completions (e.g. local sessions, or a relay
+ host that does not advertise `completionTriggerCharacters`).
+ """
+ trigger_characters: list[str]
+ """Trigger characters advertised by the host (e.g. `["@", "#"]`). Empty disables host-driven
+ completions for the session.
+ """
+
+ @staticmethod
+ def from_dict(obj: Any) -> 'CompletionsGetTriggerCharactersResult':
+ assert isinstance(obj, dict)
+ trigger_characters = from_list(from_str, obj.get("triggerCharacters"))
+ return CompletionsGetTriggerCharactersResult(trigger_characters)
+
+ def to_dict(self) -> dict:
+ result: dict = {}
+ result["triggerCharacters"] = from_list(from_str, self.trigger_characters)
+ return result
+
+# Experimental: this type is part of an experimental API and may change or be removed.
+@dataclass
+class CompletionsRequestRequest:
+ """Request host-driven completions for the current composer input."""
+
+ offset: int
+ """Cursor offset within `text`, in UTF-16 code units."""
+
+ text: str
+ """The full composed composer input."""
+
+ @staticmethod
+ def from_dict(obj: Any) -> 'CompletionsRequestRequest':
+ assert isinstance(obj, dict)
+ offset = from_int(obj.get("offset"))
+ text = from_str(obj.get("text"))
+ return CompletionsRequestRequest(offset, text)
+
+ def to_dict(self) -> dict:
+ result: dict = {}
+ result["offset"] = from_int(self.offset)
+ result["text"] = from_str(self.text)
+ return result
+
+# Experimental: this type is part of an experimental API and may change or be removed.
+@dataclass
+class SessionCompletionItem:
+ """A single host-driven completion. Accepting an item replaces `[rangeStart, rangeEnd)`
+ (UTF-16 code units) in the composer with `insertText`; when the range is absent, the
+ active token around the cursor is replaced.
+ """
+ insert_text: str
+ """Text spliced into the composer when the item is accepted."""
+
+ kind: str | None = None
+ """Render-kind hint for the picker row (e.g. `"document"`, `"directory"`), derived from the
+ host's display kind.
+ """
+ label: str | None = None
+ """Primary display label for the picker row. Falls back to `insertText` when absent."""
+
+ range_end: int | None = None
+ """End (exclusive) of the replacement range in `text`, in UTF-16 code units."""
+
+ range_start: int | None = None
+ """Start of the replacement range in `text`, in UTF-16 code units."""
+
+ @staticmethod
+ def from_dict(obj: Any) -> 'SessionCompletionItem':
+ assert isinstance(obj, dict)
+ insert_text = from_str(obj.get("insertText"))
+ kind = from_union([from_str, from_none], obj.get("kind"))
+ label = from_union([from_str, from_none], obj.get("label"))
+ range_end = from_union([from_int, from_none], obj.get("rangeEnd"))
+ range_start = from_union([from_int, from_none], obj.get("rangeStart"))
+ return SessionCompletionItem(insert_text, kind, label, range_end, range_start)
+
+ def to_dict(self) -> dict:
+ result: dict = {}
+ result["insertText"] = from_str(self.insert_text)
+ if self.kind is not None:
+ result["kind"] = from_union([from_str, from_none], self.kind)
+ if self.label is not None:
+ result["label"] = from_union([from_str, from_none], self.label)
+ if self.range_end is not None:
+ result["rangeEnd"] = from_union([from_int, from_none], self.range_end)
+ if self.range_start is not None:
+ result["rangeStart"] = from_union([from_int, from_none], self.range_start)
+ return result
+
# Experimental: this type is part of an experimental API and may change or be removed.
# Internal: this type is an internal SDK API and is not part of the public surface.
@dataclass
@@ -3669,32 +3773,6 @@ def to_dict(self) -> dict:
result["supported_media_types"] = from_list(from_str, self.supported_media_types)
return result
-# Experimental: this type is part of an experimental API and may change or be removed.
-@dataclass
-class ModelCapabilitiesSupports:
- """Feature flags indicating what the model supports"""
-
- reasoning_effort: bool | None = None
- """Whether this model supports reasoning effort configuration"""
-
- vision: bool | None = None
- """Whether this model supports vision/image input"""
-
- @staticmethod
- def from_dict(obj: Any) -> 'ModelCapabilitiesSupports':
- assert isinstance(obj, dict)
- reasoning_effort = from_union([from_bool, from_none], obj.get("reasoningEffort"))
- vision = from_union([from_bool, from_none], obj.get("vision"))
- return ModelCapabilitiesSupports(reasoning_effort, vision)
-
- def to_dict(self) -> dict:
- result: dict = {}
- if self.reasoning_effort is not None:
- result["reasoningEffort"] = from_union([from_bool, from_none], self.reasoning_effort)
- if self.vision is not None:
- result["vision"] = from_union([from_bool, from_none], self.vision)
- return result
-
# Experimental: this type is part of an experimental API and may change or be removed.
class ModelPickerPriceCategory(Enum):
"""Relative cost tier for token-based billing users"""
@@ -3744,32 +3822,6 @@ def to_dict(self) -> dict:
result["supported_media_types"] = from_union([lambda x: from_list(from_str, x), from_none], self.supported_media_types)
return result
-# Experimental: this type is part of an experimental API and may change or be removed.
-@dataclass
-class ModelCapabilitiesOverrideSupports:
- """Feature flags indicating what the model supports"""
-
- reasoning_effort: bool | None = None
- """Whether this model supports reasoning effort configuration"""
-
- vision: bool | None = None
- """Whether this model supports vision/image input"""
-
- @staticmethod
- def from_dict(obj: Any) -> 'ModelCapabilitiesOverrideSupports':
- assert isinstance(obj, dict)
- reasoning_effort = from_union([from_bool, from_none], obj.get("reasoningEffort"))
- vision = from_union([from_bool, from_none], obj.get("vision"))
- return ModelCapabilitiesOverrideSupports(reasoning_effort, vision)
-
- def to_dict(self) -> dict:
- result: dict = {}
- if self.reasoning_effort is not None:
- result["reasoningEffort"] = from_union([from_bool, from_none], self.reasoning_effort)
- if self.vision is not None:
- result["vision"] = from_union([from_bool, from_none], self.vision)
- return result
-
# Experimental: this type is part of an experimental API and may change or be removed.
@dataclass
class ModelListRequest:
@@ -5547,8 +5599,8 @@ class RegisterEventInterestParams:
count as having a consumer. Multiple registrations for the same event type from the same
or different consumers are tracked independently and must each be released. See:
`mcp.oauth_required`, `sampling.requested`, `auto_mode_switch.requested`,
- `user_input.requested`, `elicitation.requested`, `command.queued`,
- `exit_plan_mode.requested`.
+ `session_limits_exhausted.requested`, `user_input.requested`, `elicitation.requested`,
+ `command.queued`, `exit_plan_mode.requested`.
"""
@staticmethod
@@ -8923,6 +8975,17 @@ def to_dict(self) -> dict:
result["response"] = from_union([lambda x: from_dict(lambda x: x, x), from_none], self.response)
return result
+# Experimental: this type is part of an experimental API and may change or be removed.
+class UISessionLimitsExhaustedResponseAction(Enum):
+ """Action selected by the user.
+
+ User action selected for an exhausted session limit.
+ """
+ ADD = "add"
+ CANCEL = "cancel"
+ SET = "set"
+ UNSET = "unset"
+
# Experimental: this type is part of an experimental API and may change or be removed.
@dataclass
class UIUserInputResponse:
@@ -9509,6 +9572,72 @@ def to_dict(self) -> dict:
result["quotaSnapshots"] = from_dict(lambda x: to_class(AccountQuotaSnapshot, x), self.quota_snapshots)
return result
+# Experimental: this type is part of an experimental API and may change or be removed.
+@dataclass
+class ModelCapabilitiesSupports:
+ """Feature flags indicating what the model supports"""
+
+ adaptive_thinking: AdaptiveThinkingSupport | None = None
+ """Resolved Anthropic adaptive-thinking capability — unsupported / optional / required.
+ 'required' models reject thinking.type='enabled' with HTTP 400 (e.g. opus-4.7/4.8).
+ """
+ reasoning_effort: bool | None = None
+ """Whether this model supports reasoning effort configuration"""
+
+ vision: bool | None = None
+ """Whether this model supports vision/image input"""
+
+ @staticmethod
+ def from_dict(obj: Any) -> 'ModelCapabilitiesSupports':
+ assert isinstance(obj, dict)
+ adaptive_thinking = from_union([AdaptiveThinkingSupport, from_none], obj.get("adaptive_thinking"))
+ reasoning_effort = from_union([from_bool, from_none], obj.get("reasoningEffort"))
+ vision = from_union([from_bool, from_none], obj.get("vision"))
+ return ModelCapabilitiesSupports(adaptive_thinking, reasoning_effort, vision)
+
+ def to_dict(self) -> dict:
+ result: dict = {}
+ if self.adaptive_thinking is not None:
+ result["adaptive_thinking"] = from_union([lambda x: to_enum(AdaptiveThinkingSupport, x), from_none], self.adaptive_thinking)
+ if self.reasoning_effort is not None:
+ result["reasoningEffort"] = from_union([from_bool, from_none], self.reasoning_effort)
+ if self.vision is not None:
+ result["vision"] = from_union([from_bool, from_none], self.vision)
+ return result
+
+# Experimental: this type is part of an experimental API and may change or be removed.
+@dataclass
+class ModelCapabilitiesOverrideSupports:
+ """Feature flags indicating what the model supports"""
+
+ adaptive_thinking: AdaptiveThinkingSupport | None = None
+ """Resolved Anthropic adaptive-thinking capability — unsupported / optional / required.
+ 'required' models reject thinking.type='enabled' with HTTP 400 (e.g. opus-4.7/4.8).
+ """
+ reasoning_effort: bool | None = None
+ """Whether this model supports reasoning effort configuration"""
+
+ vision: bool | None = None
+ """Whether this model supports vision/image input"""
+
+ @staticmethod
+ def from_dict(obj: Any) -> 'ModelCapabilitiesOverrideSupports':
+ assert isinstance(obj, dict)
+ adaptive_thinking = from_union([AdaptiveThinkingSupport, from_none], obj.get("adaptive_thinking"))
+ reasoning_effort = from_union([from_bool, from_none], obj.get("reasoningEffort"))
+ vision = from_union([from_bool, from_none], obj.get("vision"))
+ return ModelCapabilitiesOverrideSupports(adaptive_thinking, reasoning_effort, vision)
+
+ def to_dict(self) -> dict:
+ result: dict = {}
+ if self.adaptive_thinking is not None:
+ result["adaptive_thinking"] = from_union([lambda x: to_enum(AdaptiveThinkingSupport, x), from_none], self.adaptive_thinking)
+ if self.reasoning_effort is not None:
+ result["reasoningEffort"] = from_union([from_bool, from_none], self.reasoning_effort)
+ if self.vision is not None:
+ result["vision"] = from_union([from_bool, from_none], self.vision)
+ return result
+
# Experimental: this type is part of an experimental API and may change or be removed.
@dataclass
class AgentDiscoveryPath:
@@ -9882,6 +10011,26 @@ def to_dict(self) -> dict:
result["canvases"] = from_union([from_bool, from_none], self.canvases)
return result
+# Experimental: this type is part of an experimental API and may change or be removed.
+@dataclass
+class CompletionsRequestResult:
+ """Host-driven completion items for the current composer input. Empty when the host returns
+ no items or does not support completions.
+ """
+ items: list[SessionCompletionItem]
+ """Completion items in host-ranked order."""
+
+ @staticmethod
+ def from_dict(obj: Any) -> 'CompletionsRequestResult':
+ assert isinstance(obj, dict)
+ items = from_list(SessionCompletionItem.from_dict, obj.get("items"))
+ return CompletionsRequestResult(items)
+
+ def to_dict(self) -> dict:
+ result: dict = {}
+ result["items"] = from_list(lambda x: to_class(SessionCompletionItem, x), self.items)
+ return result
+
# Experimental: this type is part of an experimental API and may change or be removed.
@dataclass
class CopilotUserResponseQuotaSnapshots:
@@ -16296,6 +16445,39 @@ def to_dict(self) -> dict:
result["selectedAction"] = from_union([lambda x: to_enum(UIExitPlanModeAction, x), from_none], self.selected_action)
return result
+# Experimental: this type is part of an experimental API and may change or be removed.
+@dataclass
+class UISessionLimitsExhaustedResponse:
+ """The selected session-limit action.
+
+ The user's selected action for an exhausted session limit.
+ """
+ action: UISessionLimitsExhaustedResponseAction
+ """Action selected by the user."""
+
+ additional_ai_credits: float | None = None
+ """AI Credits to add to the current max when action is 'add'."""
+
+ max_ai_credits: float | None = None
+ """New absolute max AI Credits when action is 'set'."""
+
+ @staticmethod
+ def from_dict(obj: Any) -> 'UISessionLimitsExhaustedResponse':
+ assert isinstance(obj, dict)
+ action = UISessionLimitsExhaustedResponseAction(obj.get("action"))
+ additional_ai_credits = from_union([from_float, from_none], obj.get("additionalAiCredits"))
+ max_ai_credits = from_union([from_float, from_none], obj.get("maxAiCredits"))
+ return UISessionLimitsExhaustedResponse(action, additional_ai_credits, max_ai_credits)
+
+ def to_dict(self) -> dict:
+ result: dict = {}
+ result["action"] = to_enum(UISessionLimitsExhaustedResponseAction, self.action)
+ if self.additional_ai_credits is not None:
+ result["additionalAiCredits"] = from_union([to_float, from_none], self.additional_ai_credits)
+ if self.max_ai_credits is not None:
+ result["maxAiCredits"] = from_union([to_float, from_none], self.max_ai_credits)
+ return result
+
# Experimental: this type is part of an experimental API and may change or be removed.
@dataclass
class UIHandlePendingUserInputRequest:
@@ -18826,6 +19008,31 @@ def to_dict(self) -> dict:
result["response"] = to_class(UIExitPlanModeResponse, self.response)
return result
+# Experimental: this type is part of an experimental API and may change or be removed.
+@dataclass
+class UIHandlePendingSessionLimitsExhaustedRequest:
+ """Request ID of a pending `session_limits_exhausted.requested` event and the user's
+ selected limit action.
+ """
+ request_id: str
+ """The unique request ID from the session_limits_exhausted.requested event"""
+
+ response: UISessionLimitsExhaustedResponse
+ """The selected session-limit action."""
+
+ @staticmethod
+ def from_dict(obj: Any) -> 'UIHandlePendingSessionLimitsExhaustedRequest':
+ assert isinstance(obj, dict)
+ request_id = from_str(obj.get("requestId"))
+ response = UISessionLimitsExhaustedResponse.from_dict(obj.get("response"))
+ return UIHandlePendingSessionLimitsExhaustedRequest(request_id, response)
+
+ def to_dict(self) -> dict:
+ result: dict = {}
+ result["requestId"] = from_str(self.request_id)
+ result["response"] = to_class(UISessionLimitsExhaustedResponse, self.response)
+ return result
+
# Experimental: this type is part of an experimental API and may change or be removed.
@dataclass
class UsageGetMetricsResult:
@@ -19787,12 +19994,12 @@ class SessionMetadataSnapshot:
"""Remote-session-specific metadata. Populated only when `isRemote` is true. Fields are
immutable for the lifetime of the session.
"""
- response_limits: ResponseLimitsConfig | None = None
- """Current response limits for the session, or null when no limits are active"""
-
selected_model: str | None = None
"""Currently selected model identifier, if any"""
+ session_limits: SessionLimitsConfig | None = None
+ """Current session limits, or null when no limits are active"""
+
summary: str | None = None
"""Short human-readable summary of the session, if known. Omitted when no summary has been
generated.
@@ -19820,12 +20027,12 @@ def from_dict(obj: Any) -> 'SessionMetadataSnapshot':
client_name = from_union([from_str, from_none], obj.get("clientName"))
initial_name = from_union([from_str, from_none], obj.get("initialName"))
remote_metadata = from_union([MetadataSnapshotRemoteMetadata.from_dict, from_none], obj.get("remoteMetadata"))
- response_limits = from_union([ResponseLimitsConfig.from_dict, from_none], obj.get("responseLimits"))
selected_model = from_union([from_str, from_none], obj.get("selectedModel"))
+ session_limits = from_union([SessionLimitsConfig.from_dict, from_none], obj.get("sessionLimits"))
summary = from_union([from_str, from_none], obj.get("summary"))
workspace = from_union([WorkspaceSummary.from_dict, from_none], obj.get("workspace"))
workspace_path = from_union([from_none, from_str], obj.get("workspacePath"))
- return SessionMetadataSnapshot(already_in_use, current_mode, is_remote, modified_time, session_id, start_time, working_directory, client_name, initial_name, remote_metadata, response_limits, selected_model, summary, workspace, workspace_path)
+ return SessionMetadataSnapshot(already_in_use, current_mode, is_remote, modified_time, session_id, start_time, working_directory, client_name, initial_name, remote_metadata, selected_model, session_limits, summary, workspace, workspace_path)
def to_dict(self) -> dict:
result: dict = {}
@@ -19842,9 +20049,9 @@ def to_dict(self) -> dict:
result["initialName"] = from_union([from_str, from_none], self.initial_name)
if self.remote_metadata is not None:
result["remoteMetadata"] = from_union([lambda x: to_class(MetadataSnapshotRemoteMetadata, x), from_none], self.remote_metadata)
- result["responseLimits"] = from_union([lambda x: to_class(ResponseLimitsConfig, x), from_none], self.response_limits)
if self.selected_model is not None:
result["selectedModel"] = from_union([from_str, from_none], self.selected_model)
+ result["sessionLimits"] = from_union([lambda x: to_class(SessionLimitsConfig, x), from_none], self.session_limits)
if self.summary is not None:
result["summary"] = from_union([from_str, from_none], self.summary)
if self.workspace is not None:
@@ -20203,6 +20410,11 @@ class SessionOpenOptions:
events_log_directory: str | None = None
"""Override directory for session event logs."""
+ excluded_builtin_agents: list[str] | None = None
+ """Built-in subagent names to exclude from this session. Excluded built-ins are hidden from
+ agent discovery and cannot be dispatched unless a custom agent with the same name is
+ available.
+ """
excluded_tools: list[str] | None = None
"""Denylist of tool names."""
@@ -20273,9 +20485,6 @@ class SessionOpenOptions:
remote_steerable: bool | None = None
"""Whether this session supports remote steering."""
- response_limits: ResponseLimitsConfig | None = None
- """Initial response limits for the session."""
-
running_in_interactive_mode: bool | None = None
"""Whether the host is an interactive UI."""
@@ -20288,6 +20497,9 @@ class SessionOpenOptions:
session_id: str | None = None
"""Optional stable session identifier to use for a new session."""
+ session_limits: SessionLimitsConfig | None = None
+ """Initial session limits."""
+
shell_init_profile: str | None = None
"""Shell init profile."""
@@ -20336,6 +20548,7 @@ def from_dict(obj: Any) -> 'SessionOpenOptions':
enable_streaming = from_union([from_bool, from_none], obj.get("enableStreaming"))
env_value_mode = from_union([MCPSetEnvValueModeDetails, from_none], obj.get("envValueMode"))
events_log_directory = from_union([from_str, from_none], obj.get("eventsLogDirectory"))
+ excluded_builtin_agents = from_union([lambda x: from_list(from_str, x), from_none], obj.get("excludedBuiltinAgents"))
excluded_tools = from_union([lambda x: from_list(from_str, x), from_none], obj.get("excludedTools"))
exp_assignments = obj.get("expAssignments")
feature_flags = from_union([lambda x: from_dict(from_bool, x), from_none], obj.get("featureFlags"))
@@ -20357,11 +20570,11 @@ def from_dict(obj: Any) -> 'SessionOpenOptions':
remote_defaulted_on = from_union([from_bool, from_none], obj.get("remoteDefaultedOn"))
remote_exporting = from_union([from_bool, from_none], obj.get("remoteExporting"))
remote_steerable = from_union([from_bool, from_none], obj.get("remoteSteerable"))
- response_limits = from_union([ResponseLimitsConfig.from_dict, from_none], obj.get("responseLimits"))
running_in_interactive_mode = from_union([from_bool, from_none], obj.get("runningInInteractiveMode"))
sandbox_config = from_union([SandboxConfig.from_dict, from_none], obj.get("sandboxConfig"))
session_capabilities = from_union([lambda x: from_list(SessionCapability, x), from_none], obj.get("sessionCapabilities"))
session_id = from_union([from_str, from_none], obj.get("sessionId"))
+ session_limits = from_union([SessionLimitsConfig.from_dict, from_none], obj.get("sessionLimits"))
shell_init_profile = from_union([from_str, from_none], obj.get("shellInitProfile"))
shell_process_flags = from_union([lambda x: from_list(from_str, x), from_none], obj.get("shellProcessFlags"))
skill_directories = from_union([lambda x: from_list(from_str, x), from_none], obj.get("skillDirectories"))
@@ -20369,7 +20582,7 @@ def from_dict(obj: Any) -> 'SessionOpenOptions':
trajectory_file = from_union([from_str, from_none], obj.get("trajectoryFile"))
working_directory = from_union([from_str, from_none], obj.get("workingDirectory"))
working_directory_context = from_union([SessionContext.from_dict, from_none], obj.get("workingDirectoryContext"))
- return SessionOpenOptions(additional_content_exclusion_policies, agent_context, allow_all_mcp_server_instructions, ask_user_disabled, auth_info, available_tools, capi, client_kind, client_name, coauthor_enabled, config_dir, continue_on_auto_mode, copilot_url, custom_agents_local_only, detached_from_spawning_parent_engagement_id, detached_from_spawning_parent_session_id, disabled_instruction_sources, disabled_skills, enable_citations, enable_on_demand_instruction_discovery, enable_script_safety, enable_streaming, env_value_mode, events_log_directory, excluded_tools, exp_assignments, feature_flags, installed_plugins, integration_id, is_experimental_mode, log_interactive_shells, lsp_client_name, max_inline_binary_bytes, memory, model, model_capabilities_overrides, models, name, provider, providers, reasoning_effort, reasoning_summary, remote_defaulted_on, remote_exporting, remote_steerable, response_limits, running_in_interactive_mode, sandbox_config, session_capabilities, session_id, shell_init_profile, shell_process_flags, skill_directories, skip_custom_instructions, trajectory_file, working_directory, working_directory_context)
+ return SessionOpenOptions(additional_content_exclusion_policies, agent_context, allow_all_mcp_server_instructions, ask_user_disabled, auth_info, available_tools, capi, client_kind, client_name, coauthor_enabled, config_dir, continue_on_auto_mode, copilot_url, custom_agents_local_only, detached_from_spawning_parent_engagement_id, detached_from_spawning_parent_session_id, disabled_instruction_sources, disabled_skills, enable_citations, enable_on_demand_instruction_discovery, enable_script_safety, enable_streaming, env_value_mode, events_log_directory, excluded_builtin_agents, excluded_tools, exp_assignments, feature_flags, installed_plugins, integration_id, is_experimental_mode, log_interactive_shells, lsp_client_name, max_inline_binary_bytes, memory, model, model_capabilities_overrides, models, name, provider, providers, reasoning_effort, reasoning_summary, remote_defaulted_on, remote_exporting, remote_steerable, running_in_interactive_mode, sandbox_config, session_capabilities, session_id, session_limits, shell_init_profile, shell_process_flags, skill_directories, skip_custom_instructions, trajectory_file, working_directory, working_directory_context)
def to_dict(self) -> dict:
result: dict = {}
@@ -20421,6 +20634,8 @@ def to_dict(self) -> dict:
result["envValueMode"] = from_union([lambda x: to_enum(MCPSetEnvValueModeDetails, x), from_none], self.env_value_mode)
if self.events_log_directory is not None:
result["eventsLogDirectory"] = from_union([from_str, from_none], self.events_log_directory)
+ if self.excluded_builtin_agents is not None:
+ result["excludedBuiltinAgents"] = from_union([lambda x: from_list(from_str, x), from_none], self.excluded_builtin_agents)
if self.excluded_tools is not None:
result["excludedTools"] = from_union([lambda x: from_list(from_str, x), from_none], self.excluded_tools)
if self.exp_assignments is not None:
@@ -20463,8 +20678,6 @@ def to_dict(self) -> dict:
result["remoteExporting"] = from_union([from_bool, from_none], self.remote_exporting)
if self.remote_steerable is not None:
result["remoteSteerable"] = from_union([from_bool, from_none], self.remote_steerable)
- if self.response_limits is not None:
- result["responseLimits"] = from_union([lambda x: to_class(ResponseLimitsConfig, x), from_none], self.response_limits)
if self.running_in_interactive_mode is not None:
result["runningInInteractiveMode"] = from_union([from_bool, from_none], self.running_in_interactive_mode)
if self.sandbox_config is not None:
@@ -20473,6 +20686,8 @@ def to_dict(self) -> dict:
result["sessionCapabilities"] = from_union([lambda x: from_list(lambda x: to_enum(SessionCapability, x), x), from_none], self.session_capabilities)
if self.session_id is not None:
result["sessionId"] = from_union([from_str, from_none], self.session_id)
+ if self.session_limits is not None:
+ result["sessionLimits"] = from_union([lambda x: to_class(SessionLimitsConfig, x), from_none], self.session_limits)
if self.shell_init_profile is not None:
result["shellInitProfile"] = from_union([from_str, from_none], self.shell_init_profile)
if self.shell_process_flags is not None:
@@ -20576,6 +20791,11 @@ class SessionUpdateOptionsParams:
"""Override directory for the session-events log. When unset, the runtime's default events
log directory is used.
"""
+ excluded_builtin_agents: list[str] | None = None
+ """Built-in subagent names to exclude from this session. Excluded built-ins are hidden from
+ agent discovery and cannot be dispatched unless a custom agent with the same name is
+ available.
+ """
excluded_tools: list[str] | None = None
"""Denylist of tool names for this session."""
@@ -20627,9 +20847,6 @@ class SessionUpdateOptionsParams:
reasoning_summary: ReasoningSummary | None = None
"""Reasoning summary mode for supported model clients."""
- response_limits: ResponseLimitsConfig | None = None
- """Optional response limits. Pass null to clear the response limits."""
-
running_in_interactive_mode: bool | None = None
"""Whether the session is running in an interactive UI."""
@@ -20641,6 +20858,9 @@ class SessionUpdateOptionsParams:
capabilities mid-session (e.g., remove `memory` for reproducible scripted runs). Omit the
field to leave the existing capability set unchanged.
"""
+ session_limits: SessionLimitsConfig | None = None
+ """Optional session limits. Pass null to clear the session limits."""
+
shell_init_profile: str | None = None
"""Shell init profile (`None` or `NonInteractive`)."""
@@ -20698,6 +20918,7 @@ def from_dict(obj: Any) -> 'SessionUpdateOptionsParams':
enable_streaming = from_union([from_bool, from_none], obj.get("enableStreaming"))
env_value_mode = from_union([MCPSetEnvValueModeDetails, from_none], obj.get("envValueMode"))
events_log_directory = from_union([from_str, from_none], obj.get("eventsLogDirectory"))
+ excluded_builtin_agents = from_union([lambda x: from_list(from_str, x), from_none], obj.get("excludedBuiltinAgents"))
excluded_tools = from_union([lambda x: from_list(from_str, x), from_none], obj.get("excludedTools"))
feature_flags = from_union([lambda x: from_dict(from_bool, x), from_none], obj.get("featureFlags"))
installed_plugins = from_union([lambda x: from_list(SessionInstalledPlugin.from_dict, x), from_none], obj.get("installedPlugins"))
@@ -20713,10 +20934,10 @@ def from_dict(obj: Any) -> 'SessionUpdateOptionsParams':
provider = from_union([ProviderConfig.from_dict, from_none], obj.get("provider"))
reasoning_effort = from_union([from_str, from_none], obj.get("reasoningEffort"))
reasoning_summary = from_union([ReasoningSummary, from_none], obj.get("reasoningSummary"))
- response_limits = from_union([ResponseLimitsConfig.from_dict, from_none], obj.get("responseLimits"))
running_in_interactive_mode = from_union([from_bool, from_none], obj.get("runningInInteractiveMode"))
sandbox_config = from_union([SandboxConfig.from_dict, from_none], obj.get("sandboxConfig"))
session_capabilities = from_union([lambda x: from_list(SessionCapability, x), from_none], obj.get("sessionCapabilities"))
+ session_limits = from_union([SessionLimitsConfig.from_dict, from_none], obj.get("sessionLimits"))
shell_init_profile = from_union([from_str, from_none], obj.get("shellInitProfile"))
shell_process_flags = from_union([lambda x: from_list(from_str, x), from_none], obj.get("shellProcessFlags"))
skill_directories = from_union([lambda x: from_list(from_str, x), from_none], obj.get("skillDirectories"))
@@ -20726,7 +20947,7 @@ def from_dict(obj: Any) -> 'SessionUpdateOptionsParams':
tool_filter_precedence = from_union([OptionsUpdateToolFilterPrecedence, from_none], obj.get("toolFilterPrecedence"))
trajectory_file = from_union([from_str, from_none], obj.get("trajectoryFile"))
working_directory = from_union([from_str, from_none], obj.get("workingDirectory"))
- return SessionUpdateOptionsParams(additional_content_exclusion_policies, agent_context, allow_all_mcp_server_instructions, ask_user_disabled, available_tools, capi, client_name, coauthor_enabled, context_tier, continue_on_auto_mode, copilot_url, custom_agents_local_only, disabled_instruction_sources, disabled_skills, enable_file_hooks, enable_host_git_operations, enable_on_demand_instruction_discovery, enable_reasoning_summaries, enable_script_safety, enable_session_store, enable_skills, enable_streaming, env_value_mode, events_log_directory, excluded_tools, feature_flags, installed_plugins, integration_id, is_experimental_mode, log_interactive_shells, lsp_client_name, manage_schedule_enabled, max_inline_binary_bytes, model, model_capabilities_overrides, organization_custom_instructions, provider, reasoning_effort, reasoning_summary, response_limits, running_in_interactive_mode, sandbox_config, session_capabilities, shell_init_profile, shell_process_flags, skill_directories, skip_custom_instructions, skip_embedding_retrieval, suppress_custom_agent_prompt, tool_filter_precedence, trajectory_file, working_directory)
+ return SessionUpdateOptionsParams(additional_content_exclusion_policies, agent_context, allow_all_mcp_server_instructions, ask_user_disabled, available_tools, capi, client_name, coauthor_enabled, context_tier, continue_on_auto_mode, copilot_url, custom_agents_local_only, disabled_instruction_sources, disabled_skills, enable_file_hooks, enable_host_git_operations, enable_on_demand_instruction_discovery, enable_reasoning_summaries, enable_script_safety, enable_session_store, enable_skills, enable_streaming, env_value_mode, events_log_directory, excluded_builtin_agents, excluded_tools, feature_flags, installed_plugins, integration_id, is_experimental_mode, log_interactive_shells, lsp_client_name, manage_schedule_enabled, max_inline_binary_bytes, model, model_capabilities_overrides, organization_custom_instructions, provider, reasoning_effort, reasoning_summary, running_in_interactive_mode, sandbox_config, session_capabilities, session_limits, shell_init_profile, shell_process_flags, skill_directories, skip_custom_instructions, skip_embedding_retrieval, suppress_custom_agent_prompt, tool_filter_precedence, trajectory_file, working_directory)
def to_dict(self) -> dict:
result: dict = {}
@@ -20778,6 +20999,8 @@ def to_dict(self) -> dict:
result["envValueMode"] = from_union([lambda x: to_enum(MCPSetEnvValueModeDetails, x), from_none], self.env_value_mode)
if self.events_log_directory is not None:
result["eventsLogDirectory"] = from_union([from_str, from_none], self.events_log_directory)
+ if self.excluded_builtin_agents is not None:
+ result["excludedBuiltinAgents"] = from_union([lambda x: from_list(from_str, x), from_none], self.excluded_builtin_agents)
if self.excluded_tools is not None:
result["excludedTools"] = from_union([lambda x: from_list(from_str, x), from_none], self.excluded_tools)
if self.feature_flags is not None:
@@ -20808,14 +21031,14 @@ def to_dict(self) -> dict:
result["reasoningEffort"] = from_union([from_str, from_none], self.reasoning_effort)
if self.reasoning_summary is not None:
result["reasoningSummary"] = from_union([lambda x: to_enum(ReasoningSummary, x), from_none], self.reasoning_summary)
- if self.response_limits is not None:
- result["responseLimits"] = from_union([lambda x: to_class(ResponseLimitsConfig, x), from_none], self.response_limits)
if self.running_in_interactive_mode is not None:
result["runningInInteractiveMode"] = from_union([from_bool, from_none], self.running_in_interactive_mode)
if self.sandbox_config is not None:
result["sandboxConfig"] = from_union([lambda x: to_class(SandboxConfig, x), from_none], self.sandbox_config)
if self.session_capabilities is not None:
result["sessionCapabilities"] = from_union([lambda x: from_list(lambda x: to_enum(SessionCapability, x), x), from_none], self.session_capabilities)
+ if self.session_limits is not None:
+ result["sessionLimits"] = from_union([lambda x: to_class(SessionLimitsConfig, x), from_none], self.session_limits)
if self.shell_init_profile is not None:
result["shellInitProfile"] = from_union([from_str, from_none], self.shell_init_profile)
if self.shell_process_flags is not None:
@@ -21965,6 +22188,7 @@ class RPC:
account_logout_request: AccountLogoutRequest
account_logout_result: AccountLogoutResult
account_quota_snapshot: AccountQuotaSnapshot
+ adaptive_thinking_support: AdaptiveThinkingSupport
agent_discovery_path: AgentDiscoveryPath
agent_discovery_path_list: AgentDiscoveryPathList
agent_discovery_path_scope: AgentDiscoveryPathScope
@@ -22022,6 +22246,9 @@ class RPC:
commands_list_request: CommandsListRequest
commands_respond_to_queued_command_request: CommandsRespondToQueuedCommandRequest
commands_respond_to_queued_command_result: CommandsRespondToQueuedCommandResult
+ completions_get_trigger_characters_result: CompletionsGetTriggerCharactersResult
+ completions_request_request: CompletionsRequestRequest
+ completions_request_result: CompletionsRequestResult
configure_session_extensions_params: _ConfigureSessionExtensionsParams
connected_remote_session_metadata: ConnectedRemoteSessionMetadata
connected_remote_session_metadata_kind: ConnectedRemoteSessionMetadataKind
@@ -22487,6 +22714,7 @@ class RPC:
session_auth_status: SessionAuthStatus
session_bulk_delete_result: SessionBulkDeleteResult
session_capability: SessionCapability
+ session_completion_item: SessionCompletionItem
session_context: SessionContext
session_context_host_type: HostType
session_enrich_metadata_result: SessionEnrichMetadataResult
@@ -22701,8 +22929,11 @@ class RPC:
ui_handle_pending_result: UIHandlePendingResult
ui_handle_pending_sampling_request: UIHandlePendingSamplingRequest
ui_handle_pending_sampling_response: dict[str, Any]
+ ui_handle_pending_session_limits_exhausted_request: UIHandlePendingSessionLimitsExhaustedRequest
ui_handle_pending_user_input_request: UIHandlePendingUserInputRequest
ui_register_direct_auto_mode_switch_handler_result: UIRegisterDirectAutoModeSwitchHandlerResult
+ ui_session_limits_exhausted_response: UISessionLimitsExhaustedResponse
+ ui_session_limits_exhausted_response_action: UISessionLimitsExhaustedResponseAction
ui_unregister_direct_auto_mode_switch_handler_request: UIUnregisterDirectAutoModeSwitchHandlerRequest
ui_unregister_direct_auto_mode_switch_handler_result: UIUnregisterDirectAutoModeSwitchHandlerResult
ui_user_input_response: UIUserInputResponse
@@ -22761,6 +22992,7 @@ def from_dict(obj: Any) -> 'RPC':
account_logout_request = AccountLogoutRequest.from_dict(obj.get("AccountLogoutRequest"))
account_logout_result = AccountLogoutResult.from_dict(obj.get("AccountLogoutResult"))
account_quota_snapshot = AccountQuotaSnapshot.from_dict(obj.get("AccountQuotaSnapshot"))
+ adaptive_thinking_support = AdaptiveThinkingSupport(obj.get("AdaptiveThinkingSupport"))
agent_discovery_path = AgentDiscoveryPath.from_dict(obj.get("AgentDiscoveryPath"))
agent_discovery_path_list = AgentDiscoveryPathList.from_dict(obj.get("AgentDiscoveryPathList"))
agent_discovery_path_scope = AgentDiscoveryPathScope(obj.get("AgentDiscoveryPathScope"))
@@ -22818,6 +23050,9 @@ def from_dict(obj: Any) -> 'RPC':
commands_list_request = CommandsListRequest.from_dict(obj.get("CommandsListRequest"))
commands_respond_to_queued_command_request = CommandsRespondToQueuedCommandRequest.from_dict(obj.get("CommandsRespondToQueuedCommandRequest"))
commands_respond_to_queued_command_result = CommandsRespondToQueuedCommandResult.from_dict(obj.get("CommandsRespondToQueuedCommandResult"))
+ completions_get_trigger_characters_result = CompletionsGetTriggerCharactersResult.from_dict(obj.get("CompletionsGetTriggerCharactersResult"))
+ completions_request_request = CompletionsRequestRequest.from_dict(obj.get("CompletionsRequestRequest"))
+ completions_request_result = CompletionsRequestResult.from_dict(obj.get("CompletionsRequestResult"))
configure_session_extensions_params = _ConfigureSessionExtensionsParams.from_dict(obj.get("ConfigureSessionExtensionsParams"))
connected_remote_session_metadata = ConnectedRemoteSessionMetadata.from_dict(obj.get("ConnectedRemoteSessionMetadata"))
connected_remote_session_metadata_kind = ConnectedRemoteSessionMetadataKind(obj.get("ConnectedRemoteSessionMetadataKind"))
@@ -23283,6 +23518,7 @@ def from_dict(obj: Any) -> 'RPC':
session_auth_status = SessionAuthStatus.from_dict(obj.get("SessionAuthStatus"))
session_bulk_delete_result = SessionBulkDeleteResult.from_dict(obj.get("SessionBulkDeleteResult"))
session_capability = SessionCapability(obj.get("SessionCapability"))
+ session_completion_item = SessionCompletionItem.from_dict(obj.get("SessionCompletionItem"))
session_context = SessionContext.from_dict(obj.get("SessionContext"))
session_context_host_type = HostType(obj.get("SessionContextHostType"))
session_enrich_metadata_result = SessionEnrichMetadataResult.from_dict(obj.get("SessionEnrichMetadataResult"))
@@ -23497,8 +23733,11 @@ def from_dict(obj: Any) -> 'RPC':
ui_handle_pending_result = UIHandlePendingResult.from_dict(obj.get("UIHandlePendingResult"))
ui_handle_pending_sampling_request = UIHandlePendingSamplingRequest.from_dict(obj.get("UIHandlePendingSamplingRequest"))
ui_handle_pending_sampling_response = from_dict(lambda x: x, obj.get("UIHandlePendingSamplingResponse"))
+ ui_handle_pending_session_limits_exhausted_request = UIHandlePendingSessionLimitsExhaustedRequest.from_dict(obj.get("UIHandlePendingSessionLimitsExhaustedRequest"))
ui_handle_pending_user_input_request = UIHandlePendingUserInputRequest.from_dict(obj.get("UIHandlePendingUserInputRequest"))
ui_register_direct_auto_mode_switch_handler_result = UIRegisterDirectAutoModeSwitchHandlerResult.from_dict(obj.get("UIRegisterDirectAutoModeSwitchHandlerResult"))
+ ui_session_limits_exhausted_response = UISessionLimitsExhaustedResponse.from_dict(obj.get("UISessionLimitsExhaustedResponse"))
+ ui_session_limits_exhausted_response_action = UISessionLimitsExhaustedResponseAction(obj.get("UISessionLimitsExhaustedResponseAction"))
ui_unregister_direct_auto_mode_switch_handler_request = UIUnregisterDirectAutoModeSwitchHandlerRequest.from_dict(obj.get("UIUnregisterDirectAutoModeSwitchHandlerRequest"))
ui_unregister_direct_auto_mode_switch_handler_result = UIUnregisterDirectAutoModeSwitchHandlerResult.from_dict(obj.get("UIUnregisterDirectAutoModeSwitchHandlerResult"))
ui_user_input_response = UIUserInputResponse.from_dict(obj.get("UIUserInputResponse"))
@@ -23541,7 +23780,7 @@ def from_dict(obj: Any) -> 'RPC':
subagent_settings = from_union([SubagentSettings.from_dict, from_none], obj.get("SubagentSettings"))
task_progress = from_union([TaskProgress.from_dict, from_none], obj.get("TaskProgress"))
workspace_summary = from_union([WorkspaceSummary.from_dict, from_none], obj.get("WorkspaceSummary"))
- return RPC(abort_request, abort_result, account_all_users, account_get_all_users_result, account_get_current_auth_result, account_get_quota_request, account_get_quota_result, account_login_request, account_login_result, account_logout_request, account_logout_result, account_quota_snapshot, agent_discovery_path, agent_discovery_path_list, agent_discovery_path_scope, agent_get_current_result, agent_info, agent_info_source, agent_list, agent_registry_live_target_entry, agent_registry_live_target_entry_attention_kind, agent_registry_live_target_entry_kind, agent_registry_live_target_entry_last_terminal_event, agent_registry_live_target_entry_status, agent_registry_log_capture, agent_registry_log_capture_open_error_reason, agent_registry_spawn_error, agent_registry_spawn_permission_mode, agent_registry_spawn_registry_timeout, agent_registry_spawn_request, agent_registry_spawn_result, agent_registry_spawn_spawned, agent_registry_spawn_validation_error, agent_registry_spawn_validation_error_field, agent_registry_spawn_validation_error_reason, agent_reload_result, agents_discover_request, agent_select_request, agent_select_result, agents_get_discovery_paths_request, allow_all_permission_set_result, allow_all_permission_state, api_key_auth_info, auth_info, auth_info_type, cancel_user_requested_shell_command_result, canvas_action, canvas_action_invoke_request, canvas_action_invoke_result, canvas_close_request, canvas_host_context, canvas_host_context_capabilities, canvas_json_schema, canvas_list, canvas_list_open_result, canvas_open_request, canvas_provider_close_request, canvas_provider_invoke_action_request, canvas_provider_open_request, canvas_provider_open_result, canvas_session_context, capi_session_options, command_list, commands_handle_pending_command_request, commands_handle_pending_command_result, commands_invoke_request, commands_list_request, commands_respond_to_queued_command_request, commands_respond_to_queued_command_result, configure_session_extensions_params, connected_remote_session_metadata, connected_remote_session_metadata_kind, connected_remote_session_metadata_repository, connect_remote_session_params, connect_request, connect_result, content_filter_mode, copilot_api_token_auth_info, copilot_user_response, copilot_user_response_endpoints, copilot_user_response_quota_snapshots, copilot_user_response_quota_snapshots_chat, copilot_user_response_quota_snapshots_completions, copilot_user_response_quota_snapshots_premium_interactions, current_model, current_tool_metadata, discovered_canvas, discovered_mcp_server, discovered_mcp_server_type, enqueue_command_params, enqueue_command_result, env_auth_info, event_log_read_request, event_log_release_interest_result, event_log_tail_result, event_log_types, events_agent_scope, events_cursor_status, events_read_result, execute_command_params, execute_command_result, extension, extension_context_push_input, extension_list, extensions_disable_request, extensions_enable_request, extension_source, extension_status, external_tool_result, external_tool_text_result_for_llm, external_tool_text_result_for_llm_binary_results_for_llm, external_tool_text_result_for_llm_binary_results_for_llm_type, external_tool_text_result_for_llm_content, external_tool_text_result_for_llm_content_audio, external_tool_text_result_for_llm_content_image, external_tool_text_result_for_llm_content_resource, external_tool_text_result_for_llm_content_resource_details, external_tool_text_result_for_llm_content_resource_link, external_tool_text_result_for_llm_content_resource_link_icon, external_tool_text_result_for_llm_content_resource_link_icon_theme, external_tool_text_result_for_llm_content_shell_exit, external_tool_text_result_for_llm_content_terminal, external_tool_text_result_for_llm_content_text, filter_mapping, fleet_start_request, fleet_start_result, folder_trust_add_params, folder_trust_check_params, folder_trust_check_result, gh_cli_auth_info, handle_pending_tool_call_request, handle_pending_tool_call_result, history_abort_manual_compaction_result, history_cancel_background_compaction_result, history_compact_context_window, history_compact_request, history_compact_result, history_summarize_for_handoff_result, history_truncate_request, history_truncate_result, hmac_auth_info, installed_plugin, installed_plugin_info, installed_plugin_source, installed_plugin_source_git_hub, installed_plugin_source_local, installed_plugin_source_url, instruction_discovery_path, instruction_discovery_path_kind, instruction_discovery_path_list, instruction_discovery_path_location, instructions_discover_request, instructions_get_discovery_paths_request, instructions_get_sources_result, instruction_source, instruction_source_location, instruction_source_type, llm_inference_headers, llm_inference_http_request_chunk_request, llm_inference_http_request_chunk_result, llm_inference_http_request_start_request, llm_inference_http_request_start_result, llm_inference_http_request_start_transport, llm_inference_http_response_chunk_error, llm_inference_http_response_chunk_request, llm_inference_http_response_chunk_result, llm_inference_http_response_start_request, llm_inference_http_response_start_result, llm_inference_set_provider_result, local_session_metadata_value, log_request, log_result, lsp_initialize_request, marketplace_add_result, marketplace_browse_result, marketplace_info, marketplace_list_result, marketplace_plugin_info, marketplace_refresh_entry, marketplace_refresh_result, marketplace_remove_result, mcp_allowed_server, mcp_apps_call_tool_request, mcp_apps_diagnose_capability, mcp_apps_diagnose_request, mcp_apps_diagnose_result, mcp_apps_diagnose_server, mcp_apps_host_context, mcp_apps_host_context_details, mcp_apps_host_context_details_available_display_mode, mcp_apps_host_context_details_display_mode, mcp_apps_host_context_details_platform, mcp_apps_host_context_details_theme, mcp_apps_list_tools_request, mcp_apps_list_tools_result, mcp_apps_read_resource_request, mcp_apps_read_resource_result, mcp_apps_resource_content, mcp_apps_set_host_context_details, mcp_apps_set_host_context_details_available_display_mode, mcp_apps_set_host_context_details_display_mode, mcp_apps_set_host_context_details_platform, mcp_apps_set_host_context_details_theme, mcp_apps_set_host_context_request, mcp_cancel_sampling_execution_params, mcp_cancel_sampling_execution_result, mcp_config_add_request, mcp_config_disable_request, mcp_config_enable_request, mcp_config_list, mcp_config_remove_request, mcp_config_update_request, mcp_configure_git_hub_request, mcp_configure_git_hub_result, mcp_disable_request, mcp_discover_request, mcp_discover_result, mcp_enable_request, mcp_execute_sampling_params, mcp_execute_sampling_request, mcp_execute_sampling_result, mcp_filtered_server, mcp_headers_handle_pending_headers_refresh_request, mcp_headers_handle_pending_headers_refresh_request_request, mcp_headers_handle_pending_headers_refresh_request_result, mcp_host_state, mcp_is_server_running_request, mcp_is_server_running_result, mcp_list_tools_request, mcp_list_tools_result, mcp_oauth_handle_pending_request, mcp_oauth_handle_pending_result, mcp_oauth_login_grant_type, mcp_oauth_login_request, mcp_oauth_login_result, mcp_oauth_pending_request_response, mcp_oauth_respond_request, mcp_oauth_respond_result, mcp_register_external_client_request, mcp_reload_with_config_request, mcp_remove_git_hub_result, mcp_restart_server_request, mcp_sampling_execution_action, mcp_sampling_execution_result, mcp_server, mcp_server_auth_config, mcp_server_auth_config_redirect_port, mcp_server_config, mcp_server_config_defer_tools, mcp_server_config_http, mcp_server_config_http_oauth_grant_type, mcp_server_config_http_type, mcp_server_config_stdio, mcp_server_failure_info, mcp_server_list, mcp_server_needs_auth_info, mcp_set_env_value_mode_details, mcp_set_env_value_mode_params, mcp_set_env_value_mode_result, mcp_start_server_request, mcp_start_servers_result, mcp_stop_server_request, mcp_tools, mcp_unregister_external_client_request, memory_configuration, metadata_context_info_request, metadata_context_info_result, metadata_is_processing_result, metadata_recompute_context_tokens_request, metadata_recompute_context_tokens_result, metadata_record_context_change_request, metadata_record_context_change_result, metadata_set_working_directory_request, metadata_set_working_directory_result, metadata_snapshot_current_mode, metadata_snapshot_remote_metadata, metadata_snapshot_remote_metadata_repository, metadata_snapshot_remote_metadata_task_type, model, model_billing, model_billing_token_prices, model_billing_token_prices_long_context, model_capabilities, model_capabilities_limits, model_capabilities_limits_vision, model_capabilities_override, model_capabilities_override_limits, model_capabilities_override_limits_vision, model_capabilities_override_supports, model_capabilities_supports, model_list, model_list_request, model_picker_category, model_picker_price_category, model_policy, model_policy_state, model_set_reasoning_effort_request, model_set_reasoning_effort_result, models_list_request, model_switch_to_request, model_switch_to_result, mode_set_request, named_provider_config, name_get_result, name_set_auto_request, name_set_auto_result, name_set_request, open_canvas_instance, options_update_additional_content_exclusion_policy, options_update_additional_content_exclusion_policy_rule, options_update_additional_content_exclusion_policy_rule_source, options_update_additional_content_exclusion_policy_scope, options_update_context_tier, options_update_env_value_mode, options_update_reasoning_summary, options_update_tool_filter_precedence, pending_permission_request, pending_permission_request_list, permission_decision, permission_decision_approved, permission_decision_approved_for_location, permission_decision_approved_for_session, permission_decision_approve_for_location, permission_decision_approve_for_location_approval, permission_decision_approve_for_location_approval_commands, permission_decision_approve_for_location_approval_custom_tool, permission_decision_approve_for_location_approval_extension_management, permission_decision_approve_for_location_approval_extension_permission_access, permission_decision_approve_for_location_approval_mcp, permission_decision_approve_for_location_approval_mcp_sampling, permission_decision_approve_for_location_approval_memory, permission_decision_approve_for_location_approval_read, permission_decision_approve_for_location_approval_write, permission_decision_approve_for_session, permission_decision_approve_for_session_approval, permission_decision_approve_for_session_approval_commands, permission_decision_approve_for_session_approval_custom_tool, permission_decision_approve_for_session_approval_extension_management, permission_decision_approve_for_session_approval_extension_permission_access, permission_decision_approve_for_session_approval_mcp, permission_decision_approve_for_session_approval_mcp_sampling, permission_decision_approve_for_session_approval_memory, permission_decision_approve_for_session_approval_read, permission_decision_approve_for_session_approval_write, permission_decision_approve_once, permission_decision_approve_permanently, permission_decision_cancelled, permission_decision_denied_by_content_exclusion_policy, permission_decision_denied_by_permission_request_hook, permission_decision_denied_by_rules, permission_decision_denied_interactively_by_user, permission_decision_denied_no_approval_rule_and_could_not_request_from_user, permission_decision_reject, permission_decision_request, permission_decision_user_not_available, permission_location_add_tool_approval_params, permission_location_apply_params, permission_location_apply_result, permission_location_resolve_params, permission_location_resolve_result, permission_location_type, permission_paths_add_params, permission_paths_allowed_check_params, permission_paths_allowed_check_result, permission_paths_config, permission_paths_list, permission_paths_update_primary_params, permission_paths_workspace_check_params, permission_paths_workspace_check_result, permission_prompt_shown_notification, permission_request_result, permission_rules_set, permissions_configure_additional_content_exclusion_policy, permissions_configure_additional_content_exclusion_policy_rule, permissions_configure_additional_content_exclusion_policy_rule_source, permissions_configure_additional_content_exclusion_policy_scope, permissions_configure_params, permissions_configure_result, permissions_folder_trust_add_trusted_result, permissions_get_allow_all_request, permissions_locations_add_tool_approval_details, permissions_locations_add_tool_approval_details_commands, permissions_locations_add_tool_approval_details_custom_tool, permissions_locations_add_tool_approval_details_extension_management, permissions_locations_add_tool_approval_details_extension_permission_access, permissions_locations_add_tool_approval_details_mcp, permissions_locations_add_tool_approval_details_mcp_sampling, permissions_locations_add_tool_approval_details_memory, permissions_locations_add_tool_approval_details_read, permissions_locations_add_tool_approval_details_write, permissions_locations_add_tool_approval_result, permissions_modify_rules_params, permissions_modify_rules_result, permissions_modify_rules_scope, permissions_notify_prompt_shown_result, permissions_paths_add_result, permissions_paths_list_request, permissions_paths_update_primary_result, permissions_pending_requests_request, permissions_reset_session_approvals_request, permissions_reset_session_approvals_result, permissions_set_allow_all_request, permissions_set_allow_all_source, permissions_set_approve_all_request, permissions_set_approve_all_result, permissions_set_approve_all_source, permissions_set_required_request, permissions_set_required_result, permissions_urls_set_unrestricted_mode_result, permission_urls_config, permission_urls_set_unrestricted_mode_params, ping_request, ping_result, plan_read_result, plan_read_sql_todos_result, plan_read_sql_todos_with_dependencies_result, plan_sql_todo_dependency, plan_sql_todos_row, plan_update_request, plugin, plugin_install_result, plugin_list, plugin_list_result, plugins_disable_request, plugins_enable_request, plugins_install_request, plugins_marketplaces_add_request, plugins_marketplaces_browse_request, plugins_marketplaces_refresh_request, plugins_marketplaces_remove_request, plugins_reload_request, plugins_uninstall_request, plugins_update_request, plugin_update_all_entry, plugin_update_all_result, plugin_update_result, poll_spawned_sessions_result, provider_add_request, provider_add_result, provider_config, provider_config_azure, provider_config_transport, provider_config_type, provider_config_wire_api, provider_endpoint, provider_endpoint_transport, provider_endpoint_type, provider_endpoint_wire_api, provider_get_endpoint_request, provider_model_config, provider_session_token, provider_token_acquire_request, provider_token_acquire_result, push_attachment, push_attachment_blob, push_attachment_directory, push_attachment_file, push_attachment_file_line_range, push_attachment_git_hub_actions_job, push_attachment_git_hub_commit, push_attachment_git_hub_file, push_attachment_git_hub_file_diff, push_attachment_git_hub_file_diff_side, push_attachment_git_hub_reference, push_attachment_git_hub_reference_type, push_attachment_git_hub_release, push_attachment_git_hub_repository, push_attachment_git_hub_snippet, push_attachment_git_hub_tree_comparison, push_attachment_git_hub_tree_comparison_side, push_attachment_git_hub_url, push_attachment_selection, push_attachment_selection_details, push_attachment_selection_details_end, push_attachment_selection_details_start, push_git_hub_repo_ref, queued_command_handled, queued_command_not_handled, queued_command_result, queue_pending_items, queue_pending_items_kind, queue_pending_items_result, queue_remove_most_recent_result, register_event_interest_params, register_event_interest_result, register_extension_tools_params, register_extension_tools_result, release_event_interest_params, remote_control_config, remote_control_config_existing_mc_session, remote_control_status, remote_control_status_active, remote_control_status_connecting, remote_control_status_error, remote_control_status_off, remote_control_status_result, remote_control_stop_result, remote_control_transfer_result, remote_enable_request, remote_enable_result, remote_notify_steerable_changed_request, remote_notify_steerable_changed_result, remote_session_connection_result, remote_session_metadata_repository, remote_session_metadata_task_type, remote_session_metadata_value, remote_session_mode, remote_session_repository, sandbox_config, sandbox_config_user_policy, sandbox_config_user_policy_experimental, sandbox_config_user_policy_experimental_seatbelt, sandbox_config_user_policy_filesystem, sandbox_config_user_policy_network, sandbox_config_user_policy_seatbelt, schedule_entry, schedule_list, schedule_stop_request, schedule_stop_result, secrets_add_filter_values_request, secrets_add_filter_values_result, send_agent_mode, send_attachments_to_message_params, send_mode, send_request, send_result, server_agent_list, server_instruction_source_list, server_skill, server_skill_list, session_activity, session_auth_status, session_bulk_delete_result, session_capability, session_context, session_context_host_type, session_enrich_metadata_result, session_fs_append_file_request, session_fs_error, session_fs_error_code, session_fs_exists_request, session_fs_exists_result, session_fs_mkdir_request, session_fs_readdir_request, session_fs_readdir_result, session_fs_readdir_with_types_entry, session_fs_readdir_with_types_entry_type, session_fs_readdir_with_types_request, session_fs_readdir_with_types_result, session_fs_read_file_request, session_fs_read_file_result, session_fs_rename_request, session_fs_rm_request, session_fs_set_provider_capabilities, session_fs_set_provider_conventions, session_fs_set_provider_request, session_fs_set_provider_result, session_fs_sqlite_exists_request, session_fs_sqlite_exists_result, session_fs_sqlite_query_request, session_fs_sqlite_query_result, session_fs_sqlite_query_type, session_fs_stat_request, session_fs_stat_result, session_fs_write_file_request, session_installed_plugin, session_installed_plugin_source, session_installed_plugin_source_git_hub, session_installed_plugin_source_local, session_installed_plugin_source_url, session_list, session_list_entry, session_list_filter, session_load_deferred_repo_hooks_result, session_log_level, session_mcp_apps_call_tool_result, session_metadata_snapshot, session_mode, session_model_list, session_open_options, session_open_options_additional_content_exclusion_policy, session_open_options_additional_content_exclusion_policy_rule, session_open_options_additional_content_exclusion_policy_rule_source, session_open_options_additional_content_exclusion_policy_scope, session_open_options_env_value_mode, session_open_options_reasoning_summary, session_open_params, session_open_result, session_prune_result, sessions_bulk_delete_request, sessions_check_in_use_request, sessions_check_in_use_result, sessions_close_request, sessions_close_result, sessions_enrich_metadata_request, session_set_credentials_params, session_set_credentials_result, sessions_find_by_prefix_request, sessions_find_by_prefix_result, sessions_find_by_task_id_request, sessions_find_by_task_id_result, sessions_fork_request, sessions_fork_result, sessions_get_board_entry_count_request, sessions_get_board_entry_count_result, sessions_get_event_file_path_request, sessions_get_event_file_path_result, sessions_get_last_for_context_request, sessions_get_last_for_context_result, sessions_get_persisted_remote_steerable_request, sessions_get_persisted_remote_steerable_result, session_sizes, sessions_list_request, sessions_load_deferred_repo_hooks_request, sessions_open_attach, sessions_open_cloud, sessions_open_create, sessions_open_handoff, sessions_open_handoff_task_type, sessions_open_progress, sessions_open_progress_status, sessions_open_progress_step, sessions_open_remote, sessions_open_resume, sessions_open_resume_last, sessions_open_status, session_source, sessions_poll_spawned_sessions_event, sessions_poll_spawned_sessions_request, sessions_prune_old_request, sessions_register_extension_tools_on_session_options, sessions_release_lock_request, sessions_release_lock_result, sessions_reload_plugin_hooks_request, sessions_reload_plugin_hooks_result, sessions_save_request, sessions_save_result, sessions_set_additional_plugins_request, sessions_set_additional_plugins_result, sessions_set_remote_control_steering_request, sessions_start_remote_control_request, sessions_stop_remote_control_request, sessions_transfer_remote_control_request, session_telemetry_engagement, session_update_options_params, session_update_options_result, session_visibility_status, session_working_directory_context, session_working_directory_context_host_type, shell_cancel_user_requested_request, shell_exec_request, shell_exec_result, shell_execute_user_requested_request, shell_kill_request, shell_kill_result, shell_kill_signal, shutdown_request, skill, skill_discovery_path, skill_discovery_path_list, skill_discovery_scope, skill_list, skills_config_set_disabled_skills_request, skills_disable_request, skills_discover_request, skills_enable_request, skills_get_discovery_paths_request, skills_get_invoked_result, skills_invoked_skill, skills_load_diagnostics, slash_command_agent_prompt_result, slash_command_completed_result, slash_command_info, slash_command_input, slash_command_input_completion, slash_command_invocation_result, slash_command_kind, slash_command_select_subcommand_option, slash_command_select_subcommand_result, slash_command_text_result, subagent_settings_entry, subagent_settings_entry_context_tier, task_agent_info, task_agent_progress, task_execution_mode, task_info, task_list, task_progress_line, tasks_cancel_request, tasks_cancel_result, tasks_get_current_promotable_result, tasks_get_progress_request, tasks_get_progress_result, task_shell_info, task_shell_info_attachment_mode, task_shell_progress, tasks_promote_current_to_background_result, tasks_promote_to_background_request, tasks_promote_to_background_result, tasks_refresh_result, tasks_remove_request, tasks_remove_result, tasks_send_message_request, tasks_send_message_result, tasks_start_agent_request, tasks_start_agent_result, task_status, tasks_wait_for_pending_result, telemetry_set_feature_overrides_request, token_auth_info, tool, tool_list, tools_get_current_metadata_result, tools_initialize_and_validate_result, tools_list_request, tools_update_subagent_settings_result, ui_auto_mode_switch_response, ui_elicitation_array_any_of_field, ui_elicitation_array_any_of_field_items, ui_elicitation_array_any_of_field_items_any_of, ui_elicitation_array_enum_field, ui_elicitation_array_enum_field_items, ui_elicitation_field_value, ui_elicitation_request, ui_elicitation_response, ui_elicitation_response_action, ui_elicitation_response_content, ui_elicitation_result, ui_elicitation_schema, ui_elicitation_schema_property, ui_elicitation_schema_property_boolean, ui_elicitation_schema_property_number, ui_elicitation_schema_property_number_type, ui_elicitation_schema_property_string, ui_elicitation_schema_property_string_format, ui_elicitation_string_enum_field, ui_elicitation_string_one_of_field, ui_elicitation_string_one_of_field_one_of, ui_ephemeral_query_request, ui_ephemeral_query_result, ui_exit_plan_mode_action, ui_exit_plan_mode_response, ui_handle_pending_auto_mode_switch_request, ui_handle_pending_elicitation_request, ui_handle_pending_exit_plan_mode_request, ui_handle_pending_result, ui_handle_pending_sampling_request, ui_handle_pending_sampling_response, ui_handle_pending_user_input_request, ui_register_direct_auto_mode_switch_handler_result, ui_unregister_direct_auto_mode_switch_handler_request, ui_unregister_direct_auto_mode_switch_handler_result, ui_user_input_response, update_subagent_settings_request, usage_get_metrics_result, usage_metrics_code_changes, usage_metrics_model_metric, usage_metrics_model_metric_requests, usage_metrics_model_metric_token_detail, usage_metrics_model_metric_usage, usage_metrics_token_detail, user_auth_info, user_requested_shell_command_result, user_setting_metadata, user_settings_get_result, user_settings_set_request, user_settings_set_result, visibility_get_result, visibility_set_request, visibility_set_result, workspace_diff_file_change, workspace_diff_file_change_type, workspace_diff_mode, workspace_diff_result, workspaces_checkpoints, workspaces_create_file_request, workspaces_diff_request, workspaces_get_workspace_result, workspaces_list_checkpoints_result, workspaces_list_files_result, workspaces_read_checkpoint_request, workspaces_read_checkpoint_result, workspaces_read_file_request, workspaces_read_file_result, workspaces_save_large_paste_request, workspaces_save_large_paste_result, workspace_summary_host_type, workspaces_workspace_details_host_type, session_context_info, subagent_settings, task_progress, workspace_summary)
+ return RPC(abort_request, abort_result, account_all_users, account_get_all_users_result, account_get_current_auth_result, account_get_quota_request, account_get_quota_result, account_login_request, account_login_result, account_logout_request, account_logout_result, account_quota_snapshot, adaptive_thinking_support, agent_discovery_path, agent_discovery_path_list, agent_discovery_path_scope, agent_get_current_result, agent_info, agent_info_source, agent_list, agent_registry_live_target_entry, agent_registry_live_target_entry_attention_kind, agent_registry_live_target_entry_kind, agent_registry_live_target_entry_last_terminal_event, agent_registry_live_target_entry_status, agent_registry_log_capture, agent_registry_log_capture_open_error_reason, agent_registry_spawn_error, agent_registry_spawn_permission_mode, agent_registry_spawn_registry_timeout, agent_registry_spawn_request, agent_registry_spawn_result, agent_registry_spawn_spawned, agent_registry_spawn_validation_error, agent_registry_spawn_validation_error_field, agent_registry_spawn_validation_error_reason, agent_reload_result, agents_discover_request, agent_select_request, agent_select_result, agents_get_discovery_paths_request, allow_all_permission_set_result, allow_all_permission_state, api_key_auth_info, auth_info, auth_info_type, cancel_user_requested_shell_command_result, canvas_action, canvas_action_invoke_request, canvas_action_invoke_result, canvas_close_request, canvas_host_context, canvas_host_context_capabilities, canvas_json_schema, canvas_list, canvas_list_open_result, canvas_open_request, canvas_provider_close_request, canvas_provider_invoke_action_request, canvas_provider_open_request, canvas_provider_open_result, canvas_session_context, capi_session_options, command_list, commands_handle_pending_command_request, commands_handle_pending_command_result, commands_invoke_request, commands_list_request, commands_respond_to_queued_command_request, commands_respond_to_queued_command_result, completions_get_trigger_characters_result, completions_request_request, completions_request_result, configure_session_extensions_params, connected_remote_session_metadata, connected_remote_session_metadata_kind, connected_remote_session_metadata_repository, connect_remote_session_params, connect_request, connect_result, content_filter_mode, copilot_api_token_auth_info, copilot_user_response, copilot_user_response_endpoints, copilot_user_response_quota_snapshots, copilot_user_response_quota_snapshots_chat, copilot_user_response_quota_snapshots_completions, copilot_user_response_quota_snapshots_premium_interactions, current_model, current_tool_metadata, discovered_canvas, discovered_mcp_server, discovered_mcp_server_type, enqueue_command_params, enqueue_command_result, env_auth_info, event_log_read_request, event_log_release_interest_result, event_log_tail_result, event_log_types, events_agent_scope, events_cursor_status, events_read_result, execute_command_params, execute_command_result, extension, extension_context_push_input, extension_list, extensions_disable_request, extensions_enable_request, extension_source, extension_status, external_tool_result, external_tool_text_result_for_llm, external_tool_text_result_for_llm_binary_results_for_llm, external_tool_text_result_for_llm_binary_results_for_llm_type, external_tool_text_result_for_llm_content, external_tool_text_result_for_llm_content_audio, external_tool_text_result_for_llm_content_image, external_tool_text_result_for_llm_content_resource, external_tool_text_result_for_llm_content_resource_details, external_tool_text_result_for_llm_content_resource_link, external_tool_text_result_for_llm_content_resource_link_icon, external_tool_text_result_for_llm_content_resource_link_icon_theme, external_tool_text_result_for_llm_content_shell_exit, external_tool_text_result_for_llm_content_terminal, external_tool_text_result_for_llm_content_text, filter_mapping, fleet_start_request, fleet_start_result, folder_trust_add_params, folder_trust_check_params, folder_trust_check_result, gh_cli_auth_info, handle_pending_tool_call_request, handle_pending_tool_call_result, history_abort_manual_compaction_result, history_cancel_background_compaction_result, history_compact_context_window, history_compact_request, history_compact_result, history_summarize_for_handoff_result, history_truncate_request, history_truncate_result, hmac_auth_info, installed_plugin, installed_plugin_info, installed_plugin_source, installed_plugin_source_git_hub, installed_plugin_source_local, installed_plugin_source_url, instruction_discovery_path, instruction_discovery_path_kind, instruction_discovery_path_list, instruction_discovery_path_location, instructions_discover_request, instructions_get_discovery_paths_request, instructions_get_sources_result, instruction_source, instruction_source_location, instruction_source_type, llm_inference_headers, llm_inference_http_request_chunk_request, llm_inference_http_request_chunk_result, llm_inference_http_request_start_request, llm_inference_http_request_start_result, llm_inference_http_request_start_transport, llm_inference_http_response_chunk_error, llm_inference_http_response_chunk_request, llm_inference_http_response_chunk_result, llm_inference_http_response_start_request, llm_inference_http_response_start_result, llm_inference_set_provider_result, local_session_metadata_value, log_request, log_result, lsp_initialize_request, marketplace_add_result, marketplace_browse_result, marketplace_info, marketplace_list_result, marketplace_plugin_info, marketplace_refresh_entry, marketplace_refresh_result, marketplace_remove_result, mcp_allowed_server, mcp_apps_call_tool_request, mcp_apps_diagnose_capability, mcp_apps_diagnose_request, mcp_apps_diagnose_result, mcp_apps_diagnose_server, mcp_apps_host_context, mcp_apps_host_context_details, mcp_apps_host_context_details_available_display_mode, mcp_apps_host_context_details_display_mode, mcp_apps_host_context_details_platform, mcp_apps_host_context_details_theme, mcp_apps_list_tools_request, mcp_apps_list_tools_result, mcp_apps_read_resource_request, mcp_apps_read_resource_result, mcp_apps_resource_content, mcp_apps_set_host_context_details, mcp_apps_set_host_context_details_available_display_mode, mcp_apps_set_host_context_details_display_mode, mcp_apps_set_host_context_details_platform, mcp_apps_set_host_context_details_theme, mcp_apps_set_host_context_request, mcp_cancel_sampling_execution_params, mcp_cancel_sampling_execution_result, mcp_config_add_request, mcp_config_disable_request, mcp_config_enable_request, mcp_config_list, mcp_config_remove_request, mcp_config_update_request, mcp_configure_git_hub_request, mcp_configure_git_hub_result, mcp_disable_request, mcp_discover_request, mcp_discover_result, mcp_enable_request, mcp_execute_sampling_params, mcp_execute_sampling_request, mcp_execute_sampling_result, mcp_filtered_server, mcp_headers_handle_pending_headers_refresh_request, mcp_headers_handle_pending_headers_refresh_request_request, mcp_headers_handle_pending_headers_refresh_request_result, mcp_host_state, mcp_is_server_running_request, mcp_is_server_running_result, mcp_list_tools_request, mcp_list_tools_result, mcp_oauth_handle_pending_request, mcp_oauth_handle_pending_result, mcp_oauth_login_grant_type, mcp_oauth_login_request, mcp_oauth_login_result, mcp_oauth_pending_request_response, mcp_oauth_respond_request, mcp_oauth_respond_result, mcp_register_external_client_request, mcp_reload_with_config_request, mcp_remove_git_hub_result, mcp_restart_server_request, mcp_sampling_execution_action, mcp_sampling_execution_result, mcp_server, mcp_server_auth_config, mcp_server_auth_config_redirect_port, mcp_server_config, mcp_server_config_defer_tools, mcp_server_config_http, mcp_server_config_http_oauth_grant_type, mcp_server_config_http_type, mcp_server_config_stdio, mcp_server_failure_info, mcp_server_list, mcp_server_needs_auth_info, mcp_set_env_value_mode_details, mcp_set_env_value_mode_params, mcp_set_env_value_mode_result, mcp_start_server_request, mcp_start_servers_result, mcp_stop_server_request, mcp_tools, mcp_unregister_external_client_request, memory_configuration, metadata_context_info_request, metadata_context_info_result, metadata_is_processing_result, metadata_recompute_context_tokens_request, metadata_recompute_context_tokens_result, metadata_record_context_change_request, metadata_record_context_change_result, metadata_set_working_directory_request, metadata_set_working_directory_result, metadata_snapshot_current_mode, metadata_snapshot_remote_metadata, metadata_snapshot_remote_metadata_repository, metadata_snapshot_remote_metadata_task_type, model, model_billing, model_billing_token_prices, model_billing_token_prices_long_context, model_capabilities, model_capabilities_limits, model_capabilities_limits_vision, model_capabilities_override, model_capabilities_override_limits, model_capabilities_override_limits_vision, model_capabilities_override_supports, model_capabilities_supports, model_list, model_list_request, model_picker_category, model_picker_price_category, model_policy, model_policy_state, model_set_reasoning_effort_request, model_set_reasoning_effort_result, models_list_request, model_switch_to_request, model_switch_to_result, mode_set_request, named_provider_config, name_get_result, name_set_auto_request, name_set_auto_result, name_set_request, open_canvas_instance, options_update_additional_content_exclusion_policy, options_update_additional_content_exclusion_policy_rule, options_update_additional_content_exclusion_policy_rule_source, options_update_additional_content_exclusion_policy_scope, options_update_context_tier, options_update_env_value_mode, options_update_reasoning_summary, options_update_tool_filter_precedence, pending_permission_request, pending_permission_request_list, permission_decision, permission_decision_approved, permission_decision_approved_for_location, permission_decision_approved_for_session, permission_decision_approve_for_location, permission_decision_approve_for_location_approval, permission_decision_approve_for_location_approval_commands, permission_decision_approve_for_location_approval_custom_tool, permission_decision_approve_for_location_approval_extension_management, permission_decision_approve_for_location_approval_extension_permission_access, permission_decision_approve_for_location_approval_mcp, permission_decision_approve_for_location_approval_mcp_sampling, permission_decision_approve_for_location_approval_memory, permission_decision_approve_for_location_approval_read, permission_decision_approve_for_location_approval_write, permission_decision_approve_for_session, permission_decision_approve_for_session_approval, permission_decision_approve_for_session_approval_commands, permission_decision_approve_for_session_approval_custom_tool, permission_decision_approve_for_session_approval_extension_management, permission_decision_approve_for_session_approval_extension_permission_access, permission_decision_approve_for_session_approval_mcp, permission_decision_approve_for_session_approval_mcp_sampling, permission_decision_approve_for_session_approval_memory, permission_decision_approve_for_session_approval_read, permission_decision_approve_for_session_approval_write, permission_decision_approve_once, permission_decision_approve_permanently, permission_decision_cancelled, permission_decision_denied_by_content_exclusion_policy, permission_decision_denied_by_permission_request_hook, permission_decision_denied_by_rules, permission_decision_denied_interactively_by_user, permission_decision_denied_no_approval_rule_and_could_not_request_from_user, permission_decision_reject, permission_decision_request, permission_decision_user_not_available, permission_location_add_tool_approval_params, permission_location_apply_params, permission_location_apply_result, permission_location_resolve_params, permission_location_resolve_result, permission_location_type, permission_paths_add_params, permission_paths_allowed_check_params, permission_paths_allowed_check_result, permission_paths_config, permission_paths_list, permission_paths_update_primary_params, permission_paths_workspace_check_params, permission_paths_workspace_check_result, permission_prompt_shown_notification, permission_request_result, permission_rules_set, permissions_configure_additional_content_exclusion_policy, permissions_configure_additional_content_exclusion_policy_rule, permissions_configure_additional_content_exclusion_policy_rule_source, permissions_configure_additional_content_exclusion_policy_scope, permissions_configure_params, permissions_configure_result, permissions_folder_trust_add_trusted_result, permissions_get_allow_all_request, permissions_locations_add_tool_approval_details, permissions_locations_add_tool_approval_details_commands, permissions_locations_add_tool_approval_details_custom_tool, permissions_locations_add_tool_approval_details_extension_management, permissions_locations_add_tool_approval_details_extension_permission_access, permissions_locations_add_tool_approval_details_mcp, permissions_locations_add_tool_approval_details_mcp_sampling, permissions_locations_add_tool_approval_details_memory, permissions_locations_add_tool_approval_details_read, permissions_locations_add_tool_approval_details_write, permissions_locations_add_tool_approval_result, permissions_modify_rules_params, permissions_modify_rules_result, permissions_modify_rules_scope, permissions_notify_prompt_shown_result, permissions_paths_add_result, permissions_paths_list_request, permissions_paths_update_primary_result, permissions_pending_requests_request, permissions_reset_session_approvals_request, permissions_reset_session_approvals_result, permissions_set_allow_all_request, permissions_set_allow_all_source, permissions_set_approve_all_request, permissions_set_approve_all_result, permissions_set_approve_all_source, permissions_set_required_request, permissions_set_required_result, permissions_urls_set_unrestricted_mode_result, permission_urls_config, permission_urls_set_unrestricted_mode_params, ping_request, ping_result, plan_read_result, plan_read_sql_todos_result, plan_read_sql_todos_with_dependencies_result, plan_sql_todo_dependency, plan_sql_todos_row, plan_update_request, plugin, plugin_install_result, plugin_list, plugin_list_result, plugins_disable_request, plugins_enable_request, plugins_install_request, plugins_marketplaces_add_request, plugins_marketplaces_browse_request, plugins_marketplaces_refresh_request, plugins_marketplaces_remove_request, plugins_reload_request, plugins_uninstall_request, plugins_update_request, plugin_update_all_entry, plugin_update_all_result, plugin_update_result, poll_spawned_sessions_result, provider_add_request, provider_add_result, provider_config, provider_config_azure, provider_config_transport, provider_config_type, provider_config_wire_api, provider_endpoint, provider_endpoint_transport, provider_endpoint_type, provider_endpoint_wire_api, provider_get_endpoint_request, provider_model_config, provider_session_token, provider_token_acquire_request, provider_token_acquire_result, push_attachment, push_attachment_blob, push_attachment_directory, push_attachment_file, push_attachment_file_line_range, push_attachment_git_hub_actions_job, push_attachment_git_hub_commit, push_attachment_git_hub_file, push_attachment_git_hub_file_diff, push_attachment_git_hub_file_diff_side, push_attachment_git_hub_reference, push_attachment_git_hub_reference_type, push_attachment_git_hub_release, push_attachment_git_hub_repository, push_attachment_git_hub_snippet, push_attachment_git_hub_tree_comparison, push_attachment_git_hub_tree_comparison_side, push_attachment_git_hub_url, push_attachment_selection, push_attachment_selection_details, push_attachment_selection_details_end, push_attachment_selection_details_start, push_git_hub_repo_ref, queued_command_handled, queued_command_not_handled, queued_command_result, queue_pending_items, queue_pending_items_kind, queue_pending_items_result, queue_remove_most_recent_result, register_event_interest_params, register_event_interest_result, register_extension_tools_params, register_extension_tools_result, release_event_interest_params, remote_control_config, remote_control_config_existing_mc_session, remote_control_status, remote_control_status_active, remote_control_status_connecting, remote_control_status_error, remote_control_status_off, remote_control_status_result, remote_control_stop_result, remote_control_transfer_result, remote_enable_request, remote_enable_result, remote_notify_steerable_changed_request, remote_notify_steerable_changed_result, remote_session_connection_result, remote_session_metadata_repository, remote_session_metadata_task_type, remote_session_metadata_value, remote_session_mode, remote_session_repository, sandbox_config, sandbox_config_user_policy, sandbox_config_user_policy_experimental, sandbox_config_user_policy_experimental_seatbelt, sandbox_config_user_policy_filesystem, sandbox_config_user_policy_network, sandbox_config_user_policy_seatbelt, schedule_entry, schedule_list, schedule_stop_request, schedule_stop_result, secrets_add_filter_values_request, secrets_add_filter_values_result, send_agent_mode, send_attachments_to_message_params, send_mode, send_request, send_result, server_agent_list, server_instruction_source_list, server_skill, server_skill_list, session_activity, session_auth_status, session_bulk_delete_result, session_capability, session_completion_item, session_context, session_context_host_type, session_enrich_metadata_result, session_fs_append_file_request, session_fs_error, session_fs_error_code, session_fs_exists_request, session_fs_exists_result, session_fs_mkdir_request, session_fs_readdir_request, session_fs_readdir_result, session_fs_readdir_with_types_entry, session_fs_readdir_with_types_entry_type, session_fs_readdir_with_types_request, session_fs_readdir_with_types_result, session_fs_read_file_request, session_fs_read_file_result, session_fs_rename_request, session_fs_rm_request, session_fs_set_provider_capabilities, session_fs_set_provider_conventions, session_fs_set_provider_request, session_fs_set_provider_result, session_fs_sqlite_exists_request, session_fs_sqlite_exists_result, session_fs_sqlite_query_request, session_fs_sqlite_query_result, session_fs_sqlite_query_type, session_fs_stat_request, session_fs_stat_result, session_fs_write_file_request, session_installed_plugin, session_installed_plugin_source, session_installed_plugin_source_git_hub, session_installed_plugin_source_local, session_installed_plugin_source_url, session_list, session_list_entry, session_list_filter, session_load_deferred_repo_hooks_result, session_log_level, session_mcp_apps_call_tool_result, session_metadata_snapshot, session_mode, session_model_list, session_open_options, session_open_options_additional_content_exclusion_policy, session_open_options_additional_content_exclusion_policy_rule, session_open_options_additional_content_exclusion_policy_rule_source, session_open_options_additional_content_exclusion_policy_scope, session_open_options_env_value_mode, session_open_options_reasoning_summary, session_open_params, session_open_result, session_prune_result, sessions_bulk_delete_request, sessions_check_in_use_request, sessions_check_in_use_result, sessions_close_request, sessions_close_result, sessions_enrich_metadata_request, session_set_credentials_params, session_set_credentials_result, sessions_find_by_prefix_request, sessions_find_by_prefix_result, sessions_find_by_task_id_request, sessions_find_by_task_id_result, sessions_fork_request, sessions_fork_result, sessions_get_board_entry_count_request, sessions_get_board_entry_count_result, sessions_get_event_file_path_request, sessions_get_event_file_path_result, sessions_get_last_for_context_request, sessions_get_last_for_context_result, sessions_get_persisted_remote_steerable_request, sessions_get_persisted_remote_steerable_result, session_sizes, sessions_list_request, sessions_load_deferred_repo_hooks_request, sessions_open_attach, sessions_open_cloud, sessions_open_create, sessions_open_handoff, sessions_open_handoff_task_type, sessions_open_progress, sessions_open_progress_status, sessions_open_progress_step, sessions_open_remote, sessions_open_resume, sessions_open_resume_last, sessions_open_status, session_source, sessions_poll_spawned_sessions_event, sessions_poll_spawned_sessions_request, sessions_prune_old_request, sessions_register_extension_tools_on_session_options, sessions_release_lock_request, sessions_release_lock_result, sessions_reload_plugin_hooks_request, sessions_reload_plugin_hooks_result, sessions_save_request, sessions_save_result, sessions_set_additional_plugins_request, sessions_set_additional_plugins_result, sessions_set_remote_control_steering_request, sessions_start_remote_control_request, sessions_stop_remote_control_request, sessions_transfer_remote_control_request, session_telemetry_engagement, session_update_options_params, session_update_options_result, session_visibility_status, session_working_directory_context, session_working_directory_context_host_type, shell_cancel_user_requested_request, shell_exec_request, shell_exec_result, shell_execute_user_requested_request, shell_kill_request, shell_kill_result, shell_kill_signal, shutdown_request, skill, skill_discovery_path, skill_discovery_path_list, skill_discovery_scope, skill_list, skills_config_set_disabled_skills_request, skills_disable_request, skills_discover_request, skills_enable_request, skills_get_discovery_paths_request, skills_get_invoked_result, skills_invoked_skill, skills_load_diagnostics, slash_command_agent_prompt_result, slash_command_completed_result, slash_command_info, slash_command_input, slash_command_input_completion, slash_command_invocation_result, slash_command_kind, slash_command_select_subcommand_option, slash_command_select_subcommand_result, slash_command_text_result, subagent_settings_entry, subagent_settings_entry_context_tier, task_agent_info, task_agent_progress, task_execution_mode, task_info, task_list, task_progress_line, tasks_cancel_request, tasks_cancel_result, tasks_get_current_promotable_result, tasks_get_progress_request, tasks_get_progress_result, task_shell_info, task_shell_info_attachment_mode, task_shell_progress, tasks_promote_current_to_background_result, tasks_promote_to_background_request, tasks_promote_to_background_result, tasks_refresh_result, tasks_remove_request, tasks_remove_result, tasks_send_message_request, tasks_send_message_result, tasks_start_agent_request, tasks_start_agent_result, task_status, tasks_wait_for_pending_result, telemetry_set_feature_overrides_request, token_auth_info, tool, tool_list, tools_get_current_metadata_result, tools_initialize_and_validate_result, tools_list_request, tools_update_subagent_settings_result, ui_auto_mode_switch_response, ui_elicitation_array_any_of_field, ui_elicitation_array_any_of_field_items, ui_elicitation_array_any_of_field_items_any_of, ui_elicitation_array_enum_field, ui_elicitation_array_enum_field_items, ui_elicitation_field_value, ui_elicitation_request, ui_elicitation_response, ui_elicitation_response_action, ui_elicitation_response_content, ui_elicitation_result, ui_elicitation_schema, ui_elicitation_schema_property, ui_elicitation_schema_property_boolean, ui_elicitation_schema_property_number, ui_elicitation_schema_property_number_type, ui_elicitation_schema_property_string, ui_elicitation_schema_property_string_format, ui_elicitation_string_enum_field, ui_elicitation_string_one_of_field, ui_elicitation_string_one_of_field_one_of, ui_ephemeral_query_request, ui_ephemeral_query_result, ui_exit_plan_mode_action, ui_exit_plan_mode_response, ui_handle_pending_auto_mode_switch_request, ui_handle_pending_elicitation_request, ui_handle_pending_exit_plan_mode_request, ui_handle_pending_result, ui_handle_pending_sampling_request, ui_handle_pending_sampling_response, ui_handle_pending_session_limits_exhausted_request, ui_handle_pending_user_input_request, ui_register_direct_auto_mode_switch_handler_result, ui_session_limits_exhausted_response, ui_session_limits_exhausted_response_action, ui_unregister_direct_auto_mode_switch_handler_request, ui_unregister_direct_auto_mode_switch_handler_result, ui_user_input_response, update_subagent_settings_request, usage_get_metrics_result, usage_metrics_code_changes, usage_metrics_model_metric, usage_metrics_model_metric_requests, usage_metrics_model_metric_token_detail, usage_metrics_model_metric_usage, usage_metrics_token_detail, user_auth_info, user_requested_shell_command_result, user_setting_metadata, user_settings_get_result, user_settings_set_request, user_settings_set_result, visibility_get_result, visibility_set_request, visibility_set_result, workspace_diff_file_change, workspace_diff_file_change_type, workspace_diff_mode, workspace_diff_result, workspaces_checkpoints, workspaces_create_file_request, workspaces_diff_request, workspaces_get_workspace_result, workspaces_list_checkpoints_result, workspaces_list_files_result, workspaces_read_checkpoint_request, workspaces_read_checkpoint_result, workspaces_read_file_request, workspaces_read_file_result, workspaces_save_large_paste_request, workspaces_save_large_paste_result, workspace_summary_host_type, workspaces_workspace_details_host_type, session_context_info, subagent_settings, task_progress, workspace_summary)
def to_dict(self) -> dict:
result: dict = {}
@@ -23557,6 +23796,7 @@ def to_dict(self) -> dict:
result["AccountLogoutRequest"] = to_class(AccountLogoutRequest, self.account_logout_request)
result["AccountLogoutResult"] = to_class(AccountLogoutResult, self.account_logout_result)
result["AccountQuotaSnapshot"] = to_class(AccountQuotaSnapshot, self.account_quota_snapshot)
+ result["AdaptiveThinkingSupport"] = to_enum(AdaptiveThinkingSupport, self.adaptive_thinking_support)
result["AgentDiscoveryPath"] = to_class(AgentDiscoveryPath, self.agent_discovery_path)
result["AgentDiscoveryPathList"] = to_class(AgentDiscoveryPathList, self.agent_discovery_path_list)
result["AgentDiscoveryPathScope"] = to_enum(AgentDiscoveryPathScope, self.agent_discovery_path_scope)
@@ -23614,6 +23854,9 @@ def to_dict(self) -> dict:
result["CommandsListRequest"] = to_class(CommandsListRequest, self.commands_list_request)
result["CommandsRespondToQueuedCommandRequest"] = to_class(CommandsRespondToQueuedCommandRequest, self.commands_respond_to_queued_command_request)
result["CommandsRespondToQueuedCommandResult"] = to_class(CommandsRespondToQueuedCommandResult, self.commands_respond_to_queued_command_result)
+ result["CompletionsGetTriggerCharactersResult"] = to_class(CompletionsGetTriggerCharactersResult, self.completions_get_trigger_characters_result)
+ result["CompletionsRequestRequest"] = to_class(CompletionsRequestRequest, self.completions_request_request)
+ result["CompletionsRequestResult"] = to_class(CompletionsRequestResult, self.completions_request_result)
result["ConfigureSessionExtensionsParams"] = to_class(_ConfigureSessionExtensionsParams, self.configure_session_extensions_params)
result["ConnectedRemoteSessionMetadata"] = to_class(ConnectedRemoteSessionMetadata, self.connected_remote_session_metadata)
result["ConnectedRemoteSessionMetadataKind"] = to_enum(ConnectedRemoteSessionMetadataKind, self.connected_remote_session_metadata_kind)
@@ -24079,6 +24322,7 @@ def to_dict(self) -> dict:
result["SessionAuthStatus"] = to_class(SessionAuthStatus, self.session_auth_status)
result["SessionBulkDeleteResult"] = to_class(SessionBulkDeleteResult, self.session_bulk_delete_result)
result["SessionCapability"] = to_enum(SessionCapability, self.session_capability)
+ result["SessionCompletionItem"] = to_class(SessionCompletionItem, self.session_completion_item)
result["SessionContext"] = to_class(SessionContext, self.session_context)
result["SessionContextHostType"] = to_enum(HostType, self.session_context_host_type)
result["SessionEnrichMetadataResult"] = to_class(SessionEnrichMetadataResult, self.session_enrich_metadata_result)
@@ -24293,8 +24537,11 @@ def to_dict(self) -> dict:
result["UIHandlePendingResult"] = to_class(UIHandlePendingResult, self.ui_handle_pending_result)
result["UIHandlePendingSamplingRequest"] = to_class(UIHandlePendingSamplingRequest, self.ui_handle_pending_sampling_request)
result["UIHandlePendingSamplingResponse"] = from_dict(lambda x: x, self.ui_handle_pending_sampling_response)
+ result["UIHandlePendingSessionLimitsExhaustedRequest"] = to_class(UIHandlePendingSessionLimitsExhaustedRequest, self.ui_handle_pending_session_limits_exhausted_request)
result["UIHandlePendingUserInputRequest"] = to_class(UIHandlePendingUserInputRequest, self.ui_handle_pending_user_input_request)
result["UIRegisterDirectAutoModeSwitchHandlerResult"] = to_class(UIRegisterDirectAutoModeSwitchHandlerResult, self.ui_register_direct_auto_mode_switch_handler_result)
+ result["UISessionLimitsExhaustedResponse"] = to_class(UISessionLimitsExhaustedResponse, self.ui_session_limits_exhausted_response)
+ result["UISessionLimitsExhaustedResponseAction"] = to_enum(UISessionLimitsExhaustedResponseAction, self.ui_session_limits_exhausted_response_action)
result["UIUnregisterDirectAutoModeSwitchHandlerRequest"] = to_class(UIUnregisterDirectAutoModeSwitchHandlerRequest, self.ui_unregister_direct_auto_mode_switch_handler_request)
result["UIUnregisterDirectAutoModeSwitchHandlerResult"] = to_class(UIUnregisterDirectAutoModeSwitchHandlerResult, self.ui_unregister_direct_auto_mode_switch_handler_result)
result["UIUserInputResponse"] = to_class(UIUserInputResponse, self.ui_user_input_response)
@@ -25363,6 +25610,23 @@ async def diff(self, params: WorkspacesDiffRequest, *, timeout: float | None = N
return WorkspaceDiffResult.from_dict(await self._client.request("session.workspaces.diff", params_dict, **_timeout_kwargs(timeout)))
+# Experimental: this API group is experimental and may change or be removed.
+class CompletionsApi:
+ def __init__(self, client: "JsonRpcClient", session_id: str):
+ self._client = client
+ self._session_id = session_id
+
+ async def get_trigger_characters(self, *, timeout: float | None = None) -> CompletionsGetTriggerCharactersResult:
+ "Gets the characters that should trigger host-driven completions for the session. Empty disables host-driven completions (e.g. local sessions, or a relay host that does not advertise them).\n\nReturns:\n Characters that, when typed in the composer, should trigger a `completions.request`. Empty when the session has no host-driven completions (e.g. local sessions, or a relay host that does not advertise `completionTriggerCharacters`)."
+ return CompletionsGetTriggerCharactersResult.from_dict(await self._client.request("session.completions.getTriggerCharacters", {"sessionId": self._session_id}, **_timeout_kwargs(timeout)))
+
+ async def request(self, params: CompletionsRequestRequest, *, timeout: float | None = None) -> CompletionsRequestResult:
+ "Requests host-driven completion items for the current composer input. Returns an empty list when the host has no items or does not support completions.\n\nArgs:\n params: Request host-driven completions for the current composer input.\n\nReturns:\n Host-driven completion items for the current composer input. Empty when the host returns no items or does not support completions."
+ params_dict: dict[str, Any] = {k: v for k, v in params.to_dict().items() if v is not None}
+ params_dict["sessionId"] = self._session_id
+ return CompletionsRequestResult.from_dict(await self._client.request("session.completions.request", params_dict, **_timeout_kwargs(timeout)))
+
+
# Experimental: this API group is experimental and may change or be removed.
class InstructionsApi:
def __init__(self, client: "JsonRpcClient", session_id: str):
@@ -25881,6 +26145,12 @@ async def handle_pending_auto_mode_switch(self, params: UIHandlePendingAutoModeS
params_dict["sessionId"] = self._session_id
return UIHandlePendingResult.from_dict(await self._client.request("session.ui.handlePendingAutoModeSwitch", params_dict, **_timeout_kwargs(timeout)))
+ async def handle_pending_session_limits_exhausted(self, params: UIHandlePendingSessionLimitsExhaustedRequest, *, timeout: float | None = None) -> UIHandlePendingResult:
+ "Resolves a pending `session_limits_exhausted.requested` event with the user's selected limit action.\n\nArgs:\n params: Request ID of a pending `session_limits_exhausted.requested` event and the user's selected limit action.\n\nReturns:\n Indicates whether the pending UI request was resolved by this call."
+ params_dict: dict[str, Any] = {k: v for k, v in params.to_dict().items() if v is not None}
+ params_dict["sessionId"] = self._session_id
+ return UIHandlePendingResult.from_dict(await self._client.request("session.ui.handlePendingSessionLimitsExhausted", params_dict, **_timeout_kwargs(timeout)))
+
async def handle_pending_exit_plan_mode(self, params: UIHandlePendingExitPlanModeRequest, *, timeout: float | None = None) -> UIHandlePendingResult:
"Resolves a pending `exit_plan_mode.requested` event with the user's response.\n\nArgs:\n params: Request ID of a pending `exit_plan_mode.requested` event and the user's response.\n\nReturns:\n Indicates whether the pending UI request was resolved by this call."
params_dict: dict[str, Any] = {k: v for k, v in params.to_dict().items() if v is not None}
@@ -26288,6 +26558,7 @@ def __init__(self, client: "JsonRpcClient", session_id: str):
self.name = NameApi(client, session_id)
self.plan = PlanApi(client, session_id)
self.workspaces = WorkspacesApi(client, session_id)
+ self.completions = CompletionsApi(client, session_id)
self.instructions = InstructionsApi(client, session_id)
self.fleet = FleetApi(client, session_id)
self.agent = AgentApi(client, session_id)
@@ -26642,6 +26913,7 @@ async def handle_llm_inference_http_request_chunk(params: dict) -> dict | None:
"AccountLogoutRequest",
"AccountLogoutResult",
"AccountQuotaSnapshot",
+ "AdaptiveThinkingSupport",
"AdditionalContentExclusionPolicyScope",
"AgentApi",
"AgentDiscoveryPath",
@@ -26712,6 +26984,10 @@ async def handle_llm_inference_http_request_chunk(params: dict) -> dict | None:
"CommandsListRequest",
"CommandsRespondToQueuedCommandRequest",
"CommandsRespondToQueuedCommandResult",
+ "CompletionsApi",
+ "CompletionsGetTriggerCharactersResult",
+ "CompletionsRequestRequest",
+ "CompletionsRequestResult",
"ConnectRemoteSessionParams",
"ConnectedRemoteSessionMetadata",
"ConnectedRemoteSessionMetadataKind",
@@ -27295,6 +27571,7 @@ async def handle_llm_inference_http_request_chunk(params: dict) -> dict | None:
"SessionAuthStatus",
"SessionBulkDeleteResult",
"SessionCapability",
+ "SessionCompletionItem",
"SessionContext",
"SessionContextHostType",
"SessionContextInfo",
@@ -27543,8 +27820,11 @@ async def handle_llm_inference_http_request_chunk(params: dict) -> dict | None:
"UIHandlePendingExitPlanModeRequest",
"UIHandlePendingResult",
"UIHandlePendingSamplingRequest",
+ "UIHandlePendingSessionLimitsExhaustedRequest",
"UIHandlePendingUserInputRequest",
"UIRegisterDirectAutoModeSwitchHandlerResult",
+ "UISessionLimitsExhaustedResponse",
+ "UISessionLimitsExhaustedResponseAction",
"UIUnregisterDirectAutoModeSwitchHandlerRequest",
"UIUnregisterDirectAutoModeSwitchHandlerResult",
"UIUserInputResponse",
diff --git a/python/copilot/generated/session_events.py b/python/copilot/generated/session_events.py
index 7ad5e9af95..8dca9a5118 100644
--- a/python/copilot/generated/session_events.py
+++ b/python/copilot/generated/session_events.py
@@ -136,7 +136,7 @@ class SessionEventType(Enum):
SESSION_WARNING = "session.warning"
SESSION_MODEL_CHANGE = "session.model_change"
SESSION_MODE_CHANGED = "session.mode_changed"
- SESSION_RESPONSE_LIMITS_CHANGED = "session.response_limits_changed"
+ SESSION_SESSION_LIMITS_CHANGED = "session.session_limits_changed"
SESSION_PERMISSIONS_CHANGED = "session.permissions_changed"
SESSION_PLAN_CHANGED = "session.plan_changed"
SESSION_TODOS_CHANGED = "session.todos_changed"
@@ -145,6 +145,7 @@ class SessionEventType(Enum):
SESSION_TRUNCATION = "session.truncation"
SESSION_SNAPSHOT_REWIND = "session.snapshot_rewind"
SESSION_SHUTDOWN = "session.shutdown"
+ SESSION_USAGE_CHECKPOINT = "session.usage_checkpoint"
SESSION_CONTEXT_CHANGED = "session.context_changed"
SESSION_USAGE_INFO = "session.usage_info"
SESSION_COMPACTION_START = "session.compaction_start"
@@ -203,6 +204,8 @@ class SessionEventType(Enum):
COMMAND_COMPLETED = "command.completed"
AUTO_MODE_SWITCH_REQUESTED = "auto_mode_switch.requested"
AUTO_MODE_SWITCH_COMPLETED = "auto_mode_switch.completed"
+ SESSION_LIMITS_EXHAUSTED_REQUESTED = "session_limits_exhausted.requested"
+ SESSION_LIMITS_EXHAUSTED_COMPLETED = "session_limits_exhausted.completed"
COMMANDS_CHANGED = "commands.changed"
CAPABILITIES_CHANGED = "capabilities.changed"
EXIT_PLAN_MODE_REQUESTED = "exit_plan_mode.requested"
@@ -1049,6 +1052,7 @@ class AssistantMessageData:
phase: str | None = None
reasoning_opaque: str | None = None
reasoning_text: str | None = None
+ reasoning_wire_field: str | None = None
request_id: str | None = None
server_tools: AssistantMessageServerTools | None = None
service_request_id: str | None = None
@@ -1070,6 +1074,7 @@ def from_dict(obj: Any) -> "AssistantMessageData":
phase = from_union([from_none, from_str], obj.get("phase"))
reasoning_opaque = from_union([from_none, from_str], obj.get("reasoningOpaque"))
reasoning_text = from_union([from_none, from_str], obj.get("reasoningText"))
+ reasoning_wire_field = from_union([from_none, from_str], obj.get("reasoningWireField"))
request_id = from_union([from_none, from_str], obj.get("requestId"))
server_tools = from_union([from_none, AssistantMessageServerTools.from_dict], obj.get("serverTools"))
service_request_id = from_union([from_none, from_str], obj.get("serviceRequestId"))
@@ -1088,6 +1093,7 @@ def from_dict(obj: Any) -> "AssistantMessageData":
phase=phase,
reasoning_opaque=reasoning_opaque,
reasoning_text=reasoning_text,
+ reasoning_wire_field=reasoning_wire_field,
request_id=request_id,
server_tools=server_tools,
service_request_id=service_request_id,
@@ -1119,6 +1125,8 @@ def to_dict(self) -> dict:
result["reasoningOpaque"] = from_union([from_none, from_str], self.reasoning_opaque)
if self.reasoning_text is not None:
result["reasoningText"] = from_union([from_none, from_str], self.reasoning_text)
+ if self.reasoning_wire_field is not None:
+ result["reasoningWireField"] = from_union([from_none, from_str], self.reasoning_wire_field)
if self.request_id is not None:
result["requestId"] = from_union([from_none, from_str], self.request_id)
if self.server_tools is not None:
@@ -4513,6 +4521,8 @@ class PermissionRequestRead:
intention: str
kind: ClassVar[str] = "read"
path: str
+ request_sandbox_bypass: bool | None = None
+ request_sandbox_bypass_reason: str | None = None
tool_call_id: str | None = None
@staticmethod
@@ -4520,10 +4530,14 @@ def from_dict(obj: Any) -> "PermissionRequestRead":
assert isinstance(obj, dict)
intention = from_str(obj.get("intention"))
path = from_str(obj.get("path"))
+ 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"))
return PermissionRequestRead(
intention=intention,
path=path,
+ request_sandbox_bypass=request_sandbox_bypass,
+ request_sandbox_bypass_reason=request_sandbox_bypass_reason,
tool_call_id=tool_call_id,
)
@@ -4532,6 +4546,10 @@ def to_dict(self) -> dict:
result["intention"] = from_str(self.intention)
result["kind"] = self.kind
result["path"] = from_str(self.path)
+ 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)
return result
@@ -4810,26 +4828,6 @@ def to_dict(self) -> dict:
return result
-@dataclass
-class ResponseLimitsConfig:
- "Optional response limits."
- max_ai_credits: float | None = None
-
- @staticmethod
- def from_dict(obj: Any) -> "ResponseLimitsConfig":
- assert isinstance(obj, dict)
- max_ai_credits = from_union([from_none, from_float], obj.get("maxAiCredits"))
- return ResponseLimitsConfig(
- max_ai_credits=max_ai_credits,
- )
-
- def to_dict(self) -> dict:
- result: dict = {}
- if self.max_ai_credits is not None:
- result["maxAiCredits"] = from_union([from_none, to_float], self.max_ai_credits)
- return result
-
-
@dataclass
class SamplingCompletedData:
"Sampling request completion notification signaling UI dismissal"
@@ -5411,6 +5409,105 @@ def to_dict(self) -> dict:
return result
+@dataclass
+class SessionLimitsConfig:
+ "Optional session limits."
+ max_ai_credits: float | None = None
+
+ @staticmethod
+ def from_dict(obj: Any) -> "SessionLimitsConfig":
+ assert isinstance(obj, dict)
+ max_ai_credits = from_union([from_none, from_float], obj.get("maxAiCredits"))
+ return SessionLimitsConfig(
+ max_ai_credits=max_ai_credits,
+ )
+
+ def to_dict(self) -> dict:
+ result: dict = {}
+ if self.max_ai_credits is not None:
+ result["maxAiCredits"] = from_union([from_none, to_float], self.max_ai_credits)
+ return result
+
+
+@dataclass
+class SessionLimitsExhaustedCompletedData:
+ "Session limit exhaustion prompt completion notification."
+ request_id: str
+ response: SessionLimitsExhaustedResponse
+
+ @staticmethod
+ def from_dict(obj: Any) -> "SessionLimitsExhaustedCompletedData":
+ assert isinstance(obj, dict)
+ request_id = from_str(obj.get("requestId"))
+ response = SessionLimitsExhaustedResponse.from_dict(obj.get("response"))
+ return SessionLimitsExhaustedCompletedData(
+ request_id=request_id,
+ response=response,
+ )
+
+ def to_dict(self) -> dict:
+ result: dict = {}
+ result["requestId"] = from_str(self.request_id)
+ result["response"] = to_class(SessionLimitsExhaustedResponse, self.response)
+ return result
+
+
+@dataclass
+class SessionLimitsExhaustedRequestedData:
+ "Session limit exhaustion notification requiring user action."
+ max_ai_credits: float
+ request_id: str
+ used_ai_credits: float
+
+ @staticmethod
+ def from_dict(obj: Any) -> "SessionLimitsExhaustedRequestedData":
+ assert isinstance(obj, dict)
+ max_ai_credits = from_float(obj.get("maxAiCredits"))
+ request_id = from_str(obj.get("requestId"))
+ used_ai_credits = from_float(obj.get("usedAiCredits"))
+ return SessionLimitsExhaustedRequestedData(
+ max_ai_credits=max_ai_credits,
+ request_id=request_id,
+ used_ai_credits=used_ai_credits,
+ )
+
+ def to_dict(self) -> dict:
+ result: dict = {}
+ result["maxAiCredits"] = to_float(self.max_ai_credits)
+ result["requestId"] = from_str(self.request_id)
+ result["usedAiCredits"] = to_float(self.used_ai_credits)
+ return result
+
+
+@dataclass
+class SessionLimitsExhaustedResponse:
+ "The user's selected action for an exhausted session limit."
+ action: SessionLimitsExhaustedResponseAction
+ additional_ai_credits: float | None = None
+ max_ai_credits: float | None = None
+
+ @staticmethod
+ def from_dict(obj: Any) -> "SessionLimitsExhaustedResponse":
+ assert isinstance(obj, dict)
+ action = parse_enum(SessionLimitsExhaustedResponseAction, obj.get("action"))
+ additional_ai_credits = from_union([from_none, from_float], obj.get("additionalAiCredits"))
+ max_ai_credits = from_union([from_none, from_float], obj.get("maxAiCredits"))
+ return SessionLimitsExhaustedResponse(
+ action=action,
+ additional_ai_credits=additional_ai_credits,
+ max_ai_credits=max_ai_credits,
+ )
+
+ def to_dict(self) -> dict:
+ result: dict = {}
+ result["action"] = to_enum(SessionLimitsExhaustedResponseAction, self.action)
+ if self.additional_ai_credits is not None:
+ result["additionalAiCredits"] = from_union([from_none, to_float], self.additional_ai_credits)
+ if self.max_ai_credits is not None:
+ result["maxAiCredits"] = from_union([from_none, to_float], self.max_ai_credits)
+ return result
+
+
@dataclass
class SessionMcpServerStatusChangedData:
"Schema for the `McpServerStatusChangedData` type."
@@ -5596,25 +5693,6 @@ def to_dict(self) -> dict:
return result
-@dataclass
-class SessionResponseLimitsChangedData:
- "Response limits update details. Null clears the limits."
- response_limits: ResponseLimitsConfig | None
-
- @staticmethod
- def from_dict(obj: Any) -> "SessionResponseLimitsChangedData":
- assert isinstance(obj, dict)
- response_limits = from_union([from_none, ResponseLimitsConfig.from_dict], obj.get("responseLimits"))
- return SessionResponseLimitsChangedData(
- response_limits=response_limits,
- )
-
- def to_dict(self) -> dict:
- result: dict = {}
- result["responseLimits"] = from_union([from_none, lambda x: to_class(ResponseLimitsConfig, x)], self.response_limits)
- return result
-
-
@dataclass
class SessionResumeData:
"Session resume metadata including current context and event count"
@@ -5628,8 +5706,8 @@ class SessionResumeData:
reasoning_effort: str | None = None
reasoning_summary: ReasoningSummary | None = None
remote_steerable: bool | None = None
- response_limits: ResponseLimitsConfig | None = None
selected_model: str | None = None
+ session_limits: SessionLimitsConfig | None = None
session_was_active: bool | None = None
@staticmethod
@@ -5645,8 +5723,8 @@ def from_dict(obj: Any) -> "SessionResumeData":
reasoning_effort = from_union([from_none, from_str], obj.get("reasoningEffort"))
reasoning_summary = from_union([from_none, lambda x: parse_enum(ReasoningSummary, x)], obj.get("reasoningSummary"))
remote_steerable = from_union([from_none, from_bool], obj.get("remoteSteerable"))
- response_limits = from_union([from_none, ResponseLimitsConfig.from_dict], obj.get("responseLimits"))
selected_model = from_union([from_none, from_str], obj.get("selectedModel"))
+ session_limits = from_union([from_none, SessionLimitsConfig.from_dict], obj.get("sessionLimits"))
session_was_active = from_union([from_none, from_bool], obj.get("sessionWasActive"))
return SessionResumeData(
event_count=event_count,
@@ -5659,8 +5737,8 @@ def from_dict(obj: Any) -> "SessionResumeData":
reasoning_effort=reasoning_effort,
reasoning_summary=reasoning_summary,
remote_steerable=remote_steerable,
- response_limits=response_limits,
selected_model=selected_model,
+ session_limits=session_limits,
session_was_active=session_was_active,
)
@@ -5684,10 +5762,10 @@ def to_dict(self) -> dict:
result["reasoningSummary"] = from_union([from_none, lambda x: to_enum(ReasoningSummary, x)], self.reasoning_summary)
if self.remote_steerable is not None:
result["remoteSteerable"] = from_union([from_none, from_bool], self.remote_steerable)
- if self.response_limits is not None:
- result["responseLimits"] = from_union([from_none, lambda x: to_class(ResponseLimitsConfig, x)], self.response_limits)
if self.selected_model is not None:
result["selectedModel"] = from_union([from_none, from_str], self.selected_model)
+ if self.session_limits is not None:
+ result["sessionLimits"] = from_union([from_none, lambda x: to_class(SessionLimitsConfig, x)], self.session_limits)
if self.session_was_active is not None:
result["sessionWasActive"] = from_union([from_none, from_bool], self.session_was_active)
return result
@@ -5793,6 +5871,25 @@ def to_dict(self) -> dict:
return result
+@dataclass
+class SessionSessionLimitsChangedData:
+ "Session limits update details. Null clears the limits."
+ session_limits: SessionLimitsConfig | None
+
+ @staticmethod
+ def from_dict(obj: Any) -> "SessionSessionLimitsChangedData":
+ assert isinstance(obj, dict)
+ session_limits = from_union([from_none, SessionLimitsConfig.from_dict], obj.get("sessionLimits"))
+ return SessionSessionLimitsChangedData(
+ session_limits=session_limits,
+ )
+
+ def to_dict(self) -> dict:
+ result: dict = {}
+ result["sessionLimits"] = from_union([from_none, lambda x: to_class(SessionLimitsConfig, x)], self.session_limits)
+ return result
+
+
@dataclass
class SessionShutdownData:
"Session termination metrics including usage statistics, code changes, and shutdown reason"
@@ -5937,8 +6034,8 @@ class SessionStartData:
reasoning_effort: str | None = None
reasoning_summary: ReasoningSummary | None = None
remote_steerable: bool | None = None
- response_limits: ResponseLimitsConfig | None = None
selected_model: str | None = None
+ session_limits: SessionLimitsConfig | None = None
@staticmethod
def from_dict(obj: Any) -> "SessionStartData":
@@ -5955,8 +6052,8 @@ def from_dict(obj: Any) -> "SessionStartData":
reasoning_effort = from_union([from_none, from_str], obj.get("reasoningEffort"))
reasoning_summary = from_union([from_none, lambda x: parse_enum(ReasoningSummary, x)], obj.get("reasoningSummary"))
remote_steerable = from_union([from_none, from_bool], obj.get("remoteSteerable"))
- response_limits = from_union([from_none, ResponseLimitsConfig.from_dict], obj.get("responseLimits"))
selected_model = from_union([from_none, from_str], obj.get("selectedModel"))
+ session_limits = from_union([from_none, SessionLimitsConfig.from_dict], obj.get("sessionLimits"))
return SessionStartData(
copilot_version=copilot_version,
producer=producer,
@@ -5970,8 +6067,8 @@ def from_dict(obj: Any) -> "SessionStartData":
reasoning_effort=reasoning_effort,
reasoning_summary=reasoning_summary,
remote_steerable=remote_steerable,
- response_limits=response_limits,
selected_model=selected_model,
+ session_limits=session_limits,
)
def to_dict(self) -> dict:
@@ -5995,10 +6092,10 @@ def to_dict(self) -> dict:
result["reasoningSummary"] = from_union([from_none, lambda x: to_enum(ReasoningSummary, x)], self.reasoning_summary)
if self.remote_steerable is not None:
result["remoteSteerable"] = from_union([from_none, from_bool], self.remote_steerable)
- if self.response_limits is not None:
- result["responseLimits"] = from_union([from_none, lambda x: to_class(ResponseLimitsConfig, x)], self.response_limits)
if self.selected_model is not None:
result["selectedModel"] = from_union([from_none, from_str], self.selected_model)
+ if self.session_limits is not None:
+ result["sessionLimits"] = from_union([from_none, lambda x: to_class(SessionLimitsConfig, x)], self.session_limits)
return result
@@ -6124,6 +6221,31 @@ def to_dict(self) -> dict:
return result
+@dataclass
+class SessionUsageCheckpointData:
+ "Durable session usage checkpoint for reconstructing aggregate accounting on resume"
+ total_nano_aiu: float
+ # Internal: this field is an internal SDK API and is not part of the public surface.
+ _total_premium_requests: float | None = None
+
+ @staticmethod
+ def from_dict(obj: Any) -> "SessionUsageCheckpointData":
+ assert isinstance(obj, dict)
+ total_nano_aiu = from_float(obj.get("totalNanoAiu"))
+ _total_premium_requests = from_union([from_none, from_float], obj.get("totalPremiumRequests"))
+ return SessionUsageCheckpointData(
+ total_nano_aiu=total_nano_aiu,
+ _total_premium_requests=_total_premium_requests,
+ )
+
+ def to_dict(self) -> dict:
+ result: dict = {}
+ result["totalNanoAiu"] = to_float(self.total_nano_aiu)
+ if self._total_premium_requests is not None:
+ result["totalPremiumRequests"] = from_union([from_none, to_float], self._total_premium_requests)
+ return result
+
+
@dataclass
class SessionUsageInfoData:
"Current context window usage statistics including token and message counts"
@@ -8676,6 +8798,18 @@ class ReasoningSummary(Enum):
DETAILED = "detailed"
+class SessionLimitsExhaustedResponseAction(Enum):
+ "User action selected for an exhausted session limit."
+ # Increase the current max by an exact AI Credits amount.
+ ADD = "add"
+ # Set a new absolute max AI Credits value.
+ SET = "set"
+ # Remove the current session limit.
+ UNSET = "unset"
+ # Leave the limit unchanged and cancel the blocked model request.
+ CANCEL = "cancel"
+
+
class SessionMode(Enum):
"The session mode the agent is operating in"
# The agent is responding interactively to the user.
@@ -8800,7 +8934,7 @@ class WorkspaceFileChangedOperation(Enum):
UPDATE = "update"
-SessionEventData = SessionStartData | SessionResumeData | SessionRemoteSteerableChangedData | SessionErrorData | SessionIdleData | SessionTitleChangedData | SessionScheduleCreatedData | SessionScheduleCancelledData | SessionScheduleRearmedData | SessionAutopilotObjectiveChangedData | SessionInfoData | SessionWarningData | SessionModelChangeData | SessionModeChangedData | SessionResponseLimitsChangedData | SessionPermissionsChangedData | SessionPlanChangedData | SessionTodosChangedData | SessionWorkspaceFileChangedData | SessionHandoffData | SessionTruncationData | SessionSnapshotRewindData | SessionShutdownData | SessionContextChangedData | SessionUsageInfoData | SessionCompactionStartData | SessionCompactionCompleteData | SessionTaskCompleteData | UserMessageData | PendingMessagesModifiedData | AssistantTurnStartData | AssistantIntentData | AssistantReasoningData | AssistantReasoningDeltaData | AssistantStreamingDeltaData | AssistantMessageData | AssistantMessageStartData | AssistantMessageDeltaData | AssistantTurnEndData | AssistantIdleData | AssistantUsageData | ModelCallFailureData | AbortData | ToolUserRequestedData | ToolExecutionStartData | ToolExecutionPartialResultData | ToolExecutionProgressData | ToolExecutionCompleteData | SkillInvokedData | SubagentStartedData | SubagentCompletedData | SubagentFailedData | SubagentSelectedData | SubagentDeselectedData | HookStartData | HookEndData | HookProgressData | SessionBinaryAssetData | SystemMessageData | SystemNotificationData | PermissionRequestedData | PermissionCompletedData | UserInputRequestedData | UserInputCompletedData | ElicitationRequestedData | ElicitationCompletedData | SamplingRequestedData | SamplingCompletedData | McpOauthRequiredData | McpOauthCompletedData | McpHeadersRefreshRequiredData | McpHeadersRefreshCompletedData | SessionCustomNotificationData | ExternalToolRequestedData | ExternalToolCompletedData | CommandQueuedData | CommandExecuteData | CommandCompletedData | AutoModeSwitchRequestedData | AutoModeSwitchCompletedData | CommandsChangedData | CapabilitiesChangedData | ExitPlanModeRequestedData | ExitPlanModeCompletedData | SessionToolsUpdatedData | SessionBackgroundTasksChangedData | SessionSkillsLoadedData | SessionCustomAgentsUpdatedData | SessionMcpServersLoadedData | SessionMcpServerStatusChangedData | SessionExtensionsLoadedData | SessionCanvasOpenedData | SessionCanvasRegistryChangedData | SessionCanvasClosedData | SessionCanvasUnavailableData | SessionCanvasRecordedData | SessionCanvasRemovedData | SessionExtensionsAttachmentsPushedData | McpAppToolCallCompleteData | RawSessionEventData | Data
+SessionEventData = SessionStartData | SessionResumeData | SessionRemoteSteerableChangedData | SessionErrorData | SessionIdleData | SessionTitleChangedData | SessionScheduleCreatedData | SessionScheduleCancelledData | SessionScheduleRearmedData | SessionAutopilotObjectiveChangedData | SessionInfoData | SessionWarningData | SessionModelChangeData | SessionModeChangedData | SessionSessionLimitsChangedData | SessionPermissionsChangedData | SessionPlanChangedData | SessionTodosChangedData | SessionWorkspaceFileChangedData | SessionHandoffData | SessionTruncationData | SessionSnapshotRewindData | SessionShutdownData | SessionUsageCheckpointData | SessionContextChangedData | SessionUsageInfoData | SessionCompactionStartData | SessionCompactionCompleteData | SessionTaskCompleteData | UserMessageData | PendingMessagesModifiedData | AssistantTurnStartData | AssistantIntentData | AssistantReasoningData | AssistantReasoningDeltaData | AssistantStreamingDeltaData | AssistantMessageData | AssistantMessageStartData | AssistantMessageDeltaData | AssistantTurnEndData | AssistantIdleData | AssistantUsageData | ModelCallFailureData | AbortData | ToolUserRequestedData | ToolExecutionStartData | ToolExecutionPartialResultData | ToolExecutionProgressData | ToolExecutionCompleteData | SkillInvokedData | SubagentStartedData | SubagentCompletedData | SubagentFailedData | SubagentSelectedData | SubagentDeselectedData | HookStartData | HookEndData | HookProgressData | SessionBinaryAssetData | SystemMessageData | SystemNotificationData | PermissionRequestedData | PermissionCompletedData | UserInputRequestedData | UserInputCompletedData | ElicitationRequestedData | ElicitationCompletedData | SamplingRequestedData | SamplingCompletedData | McpOauthRequiredData | McpOauthCompletedData | McpHeadersRefreshRequiredData | McpHeadersRefreshCompletedData | SessionCustomNotificationData | ExternalToolRequestedData | ExternalToolCompletedData | CommandQueuedData | CommandExecuteData | CommandCompletedData | AutoModeSwitchRequestedData | AutoModeSwitchCompletedData | SessionLimitsExhaustedRequestedData | SessionLimitsExhaustedCompletedData | CommandsChangedData | CapabilitiesChangedData | ExitPlanModeRequestedData | ExitPlanModeCompletedData | SessionToolsUpdatedData | SessionBackgroundTasksChangedData | SessionSkillsLoadedData | SessionCustomAgentsUpdatedData | SessionMcpServersLoadedData | SessionMcpServerStatusChangedData | SessionExtensionsLoadedData | SessionCanvasOpenedData | SessionCanvasRegistryChangedData | SessionCanvasClosedData | SessionCanvasUnavailableData | SessionCanvasRecordedData | SessionCanvasRemovedData | SessionExtensionsAttachmentsPushedData | McpAppToolCallCompleteData | RawSessionEventData | Data
@dataclass
@@ -8840,7 +8974,7 @@ def from_dict(obj: Any) -> "SessionEvent":
case SessionEventType.SESSION_WARNING: data = SessionWarningData.from_dict(data_obj)
case SessionEventType.SESSION_MODEL_CHANGE: data = SessionModelChangeData.from_dict(data_obj)
case SessionEventType.SESSION_MODE_CHANGED: data = SessionModeChangedData.from_dict(data_obj)
- case SessionEventType.SESSION_RESPONSE_LIMITS_CHANGED: data = SessionResponseLimitsChangedData.from_dict(data_obj)
+ case SessionEventType.SESSION_SESSION_LIMITS_CHANGED: data = SessionSessionLimitsChangedData.from_dict(data_obj)
case SessionEventType.SESSION_PERMISSIONS_CHANGED: data = SessionPermissionsChangedData.from_dict(data_obj)
case SessionEventType.SESSION_PLAN_CHANGED: data = SessionPlanChangedData.from_dict(data_obj)
case SessionEventType.SESSION_TODOS_CHANGED: data = SessionTodosChangedData.from_dict(data_obj)
@@ -8849,6 +8983,7 @@ def from_dict(obj: Any) -> "SessionEvent":
case SessionEventType.SESSION_TRUNCATION: data = SessionTruncationData.from_dict(data_obj)
case SessionEventType.SESSION_SNAPSHOT_REWIND: data = SessionSnapshotRewindData.from_dict(data_obj)
case SessionEventType.SESSION_SHUTDOWN: data = SessionShutdownData.from_dict(data_obj)
+ case SessionEventType.SESSION_USAGE_CHECKPOINT: data = SessionUsageCheckpointData.from_dict(data_obj)
case SessionEventType.SESSION_CONTEXT_CHANGED: data = SessionContextChangedData.from_dict(data_obj)
case SessionEventType.SESSION_USAGE_INFO: data = SessionUsageInfoData.from_dict(data_obj)
case SessionEventType.SESSION_COMPACTION_START: data = SessionCompactionStartData.from_dict(data_obj)
@@ -8906,6 +9041,8 @@ def from_dict(obj: Any) -> "SessionEvent":
case SessionEventType.COMMAND_COMPLETED: data = CommandCompletedData.from_dict(data_obj)
case SessionEventType.AUTO_MODE_SWITCH_REQUESTED: data = AutoModeSwitchRequestedData.from_dict(data_obj)
case SessionEventType.AUTO_MODE_SWITCH_COMPLETED: data = AutoModeSwitchCompletedData.from_dict(data_obj)
+ case SessionEventType.SESSION_LIMITS_EXHAUSTED_REQUESTED: data = SessionLimitsExhaustedRequestedData.from_dict(data_obj)
+ case SessionEventType.SESSION_LIMITS_EXHAUSTED_COMPLETED: data = SessionLimitsExhaustedCompletedData.from_dict(data_obj)
case SessionEventType.COMMANDS_CHANGED: data = CommandsChangedData.from_dict(data_obj)
case SessionEventType.CAPABILITIES_CHANGED: data = CapabilitiesChangedData.from_dict(data_obj)
case SessionEventType.EXIT_PLAN_MODE_REQUESTED: data = ExitPlanModeRequestedData.from_dict(data_obj)
@@ -9128,7 +9265,6 @@ def session_event_to_dict(x: SessionEvent) -> Any:
"PlanChangedOperation",
"RawSessionEventData",
"ReasoningSummary",
- "ResponseLimitsConfig",
"SamplingCompletedData",
"SamplingRequestedData",
"SessionAutopilotObjectiveChangedData",
@@ -9154,6 +9290,11 @@ def session_event_to_dict(x: SessionEvent) -> Any:
"SessionHandoffData",
"SessionIdleData",
"SessionInfoData",
+ "SessionLimitsConfig",
+ "SessionLimitsExhaustedCompletedData",
+ "SessionLimitsExhaustedRequestedData",
+ "SessionLimitsExhaustedResponse",
+ "SessionLimitsExhaustedResponseAction",
"SessionMcpServerStatusChangedData",
"SessionMcpServersLoadedData",
"SessionMode",
@@ -9162,11 +9303,11 @@ def session_event_to_dict(x: SessionEvent) -> Any:
"SessionPermissionsChangedData",
"SessionPlanChangedData",
"SessionRemoteSteerableChangedData",
- "SessionResponseLimitsChangedData",
"SessionResumeData",
"SessionScheduleCancelledData",
"SessionScheduleCreatedData",
"SessionScheduleRearmedData",
+ "SessionSessionLimitsChangedData",
"SessionShutdownData",
"SessionSkillsLoadedData",
"SessionSnapshotRewindData",
@@ -9176,6 +9317,7 @@ def session_event_to_dict(x: SessionEvent) -> Any:
"SessionTodosChangedData",
"SessionToolsUpdatedData",
"SessionTruncationData",
+ "SessionUsageCheckpointData",
"SessionUsageInfoData",
"SessionWarningData",
"SessionWorkspaceFileChangedData",
diff --git a/rust/src/generated/api_types.rs b/rust/src/generated/api_types.rs
index 1e6caa15ea..18a877d3aa 100644
--- a/rust/src/generated/api_types.rs
+++ b/rust/src/generated/api_types.rs
@@ -11,7 +11,7 @@ use serde::{Deserialize, Serialize};
use super::session_events::{
AbortReason, ContextTier, McpServerSource, McpServerStatus, PermissionPromptRequest,
- PermissionRule, ReasoningSummary, ResponseLimitsConfig, SessionMode, ShutdownType, SkillSource,
+ PermissionRule, ReasoningSummary, SessionLimitsConfig, SessionMode, ShutdownType, SkillSource,
UserToolSessionApproval,
};
use crate::types::{RequestId, SessionEvent, SessionId};
@@ -236,6 +236,11 @@ pub mod rpc_methods {
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";
+ /// `session.completions.request`
+ pub const SESSION_COMPLETIONS_REQUEST: &str = "session.completions.request";
/// `session.instructions.getSources`
pub const SESSION_INSTRUCTIONS_GETSOURCES: &str = "session.instructions.getSources";
/// `session.fleet.start`
@@ -402,6 +407,9 @@ pub mod rpc_methods {
/// `session.ui.handlePendingAutoModeSwitch`
pub const SESSION_UI_HANDLEPENDINGAUTOMODESWITCH: &str =
"session.ui.handlePendingAutoModeSwitch";
+ /// `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`
@@ -2536,6 +2544,80 @@ pub struct CommandsRespondToQueuedCommandResult {
pub success: bool,
}
+/// Characters that, when typed in the composer, should trigger a `completions.request`. Empty when the session has no host-driven completions (e.g. local sessions, or a relay host that does not advertise `completionTriggerCharacters`).
+///
+///
+///
+/// **Experimental.** This type is part of an experimental wire-protocol surface
+/// and may change or be removed in future SDK or CLI releases.
+///
+///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct CompletionsGetTriggerCharactersResult {
+ /// Trigger characters advertised by the host (e.g. `["@", "#"]`). Empty disables host-driven completions for the session.
+ pub trigger_characters: Vec,
+}
+
+/// Request host-driven completions for the current composer input.
+///
+///
+///
+/// **Experimental.** This type is part of an experimental wire-protocol surface
+/// and may change or be removed in future SDK or CLI releases.
+///
+///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct CompletionsRequestRequest {
+ /// Cursor offset within `text`, in UTF-16 code units.
+ pub offset: i64,
+ /// The full composed composer input.
+ pub text: String,
+}
+
+/// A single host-driven completion. Accepting an item replaces `[rangeStart, rangeEnd)` (UTF-16 code units) in the composer with `insertText`; when the range is absent, the active token around the cursor is replaced.
+///
+///
+///
+/// **Experimental.** This type is part of an experimental wire-protocol surface
+/// and may change or be removed in future SDK or CLI releases.
+///
+///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct SessionCompletionItem {
+ /// Text spliced into the composer when the item is accepted.
+ pub insert_text: String,
+ /// Render-kind hint for the picker row (e.g. `"document"`, `"directory"`), derived from the host's display kind.
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub kind: Option,
+ /// Primary display label for the picker row. Falls back to `insertText` when absent.
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub label: Option,
+ /// End (exclusive) of the replacement range in `text`, in UTF-16 code units.
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub range_end: Option,
+ /// Start of the replacement range in `text`, in UTF-16 code units.
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub range_start: Option,
+}
+
+/// Host-driven completion items for the current composer input. Empty when the host returns no items or does not support completions.
+///
+///
+///
+/// **Experimental.** This type is part of an experimental wire-protocol surface
+/// and may change or be removed in future SDK or CLI releases.
+///
+///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct CompletionsRequestResult {
+ /// Completion items in host-ranked order.
+ pub items: Vec,
+}
+
/// Params to attach or detach an in-process ExtensionController delegate.
///
///
@@ -5902,6 +5984,9 @@ pub struct ModelCapabilitiesLimits {
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ModelCapabilitiesSupports {
+ /// Resolved Anthropic adaptive-thinking capability — unsupported / optional / required. 'required' models reject thinking.type='enabled' with HTTP 400 (e.g. opus-4.7/4.8).
+ #[serde(rename = "adaptive_thinking", skip_serializing_if = "Option::is_none")]
+ pub adaptive_thinking: Option
,
/// Whether this model supports reasoning effort configuration
#[serde(skip_serializing_if = "Option::is_none")]
pub reasoning_effort: Option,
@@ -6051,6 +6136,9 @@ pub struct ModelCapabilitiesOverrideLimits {
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ModelCapabilitiesOverrideSupports {
+ /// Resolved Anthropic adaptive-thinking capability — unsupported / optional / required. 'required' models reject thinking.type='enabled' with HTTP 400 (e.g. opus-4.7/4.8).
+ #[serde(rename = "adaptive_thinking", skip_serializing_if = "Option::is_none")]
+ pub adaptive_thinking: Option,
/// Whether this model supports reasoning effort configuration
#[serde(skip_serializing_if = "Option::is_none")]
pub reasoning_effort: Option,
@@ -9075,7 +9163,7 @@ pub struct QueueRemoveMostRecentResult {
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct RegisterEventInterestParams {
- /// The event type the consumer wants the runtime to treat as 'observed' for behavior-switching gating. Some runtime code paths inspect whether any consumer is interested in a specific event type and choose a different implementation accordingly (e.g. `mcp.oauth_required`: when interest is registered the runtime delegates the full interactive OAuth flow to the consumer; when no interest is registered the runtime installs a browserless fallback that silently reuses cached tokens). SDK clients that long-poll events do NOT automatically appear as listeners to these gating checks — they must explicitly call `registerInterest` for each event type they want the runtime to count as having a consumer. Multiple registrations for the same event type from the same or different consumers are tracked independently and must each be released. See: `mcp.oauth_required`, `sampling.requested`, `auto_mode_switch.requested`, `user_input.requested`, `elicitation.requested`, `command.queued`, `exit_plan_mode.requested`.
+ /// The event type the consumer wants the runtime to treat as 'observed' for behavior-switching gating. Some runtime code paths inspect whether any consumer is interested in a specific event type and choose a different implementation accordingly (e.g. `mcp.oauth_required`: when interest is registered the runtime delegates the full interactive OAuth flow to the consumer; when no interest is registered the runtime installs a browserless fallback that silently reuses cached tokens). SDK clients that long-poll events do NOT automatically appear as listeners to these gating checks — they must explicitly call `registerInterest` for each event type they want the runtime to count as having a consumer. Multiple registrations for the same event type from the same or different consumers are tracked independently and must each be released. See: `mcp.oauth_required`, `sampling.requested`, `auto_mode_switch.requested`, `session_limits_exhausted.requested`, `user_input.requested`, `elicitation.requested`, `command.queued`, `exit_plan_mode.requested`.
pub event_type: String,
}
@@ -10677,13 +10765,13 @@ pub struct SessionMetadataSnapshot {
/// Remote-session-specific metadata. Populated only when `isRemote` is true. Fields are immutable for the lifetime of the session.
#[serde(skip_serializing_if = "Option::is_none")]
pub remote_metadata: Option,
- /// Current response limits for the session, or null when no limits are active
- pub response_limits: Option,
/// Currently selected model identifier, if any
#[serde(skip_serializing_if = "Option::is_none")]
pub selected_model: Option,
/// The unique identifier of the session
pub session_id: SessionId,
+ /// Current session limits, or null when no limits are active
+ pub session_limits: Option,
/// ISO 8601 timestamp of when the session started
pub start_time: String,
/// Short human-readable summary of the session, if known. Omitted when no summary has been generated.
@@ -10866,6 +10954,9 @@ pub struct SessionOpenOptions {
/// Override directory for session event logs.
#[serde(skip_serializing_if = "Option::is_none")]
pub events_log_directory: Option,
+ /// Built-in subagent names to exclude from this session. Excluded built-ins are hidden from agent discovery and cannot be dispatched unless a custom agent with the same name is available.
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub excluded_builtin_agents: Option>,
/// Denylist of tool names.
#[serde(skip_serializing_if = "Option::is_none")]
pub excluded_tools: Option>,
@@ -10944,9 +11035,6 @@ pub struct SessionOpenOptions {
/// Whether this session supports remote steering.
#[serde(skip_serializing_if = "Option::is_none")]
pub remote_steerable: Option,
- /// Initial response limits for the session.
- #[serde(skip_serializing_if = "Option::is_none")]
- pub response_limits: Option,
/// Whether the host is an interactive UI.
#[serde(skip_serializing_if = "Option::is_none")]
pub running_in_interactive_mode: Option,
@@ -10959,6 +11047,9 @@ pub struct SessionOpenOptions {
/// Optional stable session identifier to use for a new session.
#[serde(skip_serializing_if = "Option::is_none")]
pub session_id: Option,
+ /// Initial session limits.
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub session_limits: Option,
/// Shell init profile.
#[serde(skip_serializing_if = "Option::is_none")]
pub shell_init_profile: Option,
@@ -11959,6 +12050,9 @@ pub struct SessionUpdateOptionsParams {
/// Override directory for the session-events log. When unset, the runtime's default events log directory is used.
#[serde(skip_serializing_if = "Option::is_none")]
pub events_log_directory: Option,
+ /// Built-in subagent names to exclude from this session. Excluded built-ins are hidden from agent discovery and cannot be dispatched unless a custom agent with the same name is available.
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub excluded_builtin_agents: Option>,
/// Denylist of tool names for this session.
#[serde(skip_serializing_if = "Option::is_none")]
pub excluded_tools: Option>,
@@ -12004,9 +12098,6 @@ pub struct SessionUpdateOptionsParams {
/// Reasoning summary mode for supported model clients.
#[serde(skip_serializing_if = "Option::is_none")]
pub reasoning_summary: Option,
- /// Optional response limits. Pass null to clear the response limits.
- #[serde(skip_serializing_if = "Option::is_none")]
- pub response_limits: Option,
/// Whether the session is running in an interactive UI.
#[serde(skip_serializing_if = "Option::is_none")]
pub running_in_interactive_mode: Option,
@@ -12016,6 +12107,9 @@ pub struct SessionUpdateOptionsParams {
/// Replaces the session's capability set with the given list. Use to enable or disable capabilities mid-session (e.g., remove `memory` for reproducible scripted runs). Omit the field to leave the existing capability set unchanged.
#[serde(skip_serializing_if = "Option::is_none")]
pub session_capabilities: Option>,
+ /// Optional session limits. Pass null to clear the session limits.
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub session_limits: Option,
/// Shell init profile (`None` or `NonInteractive`).
#[serde(skip_serializing_if = "Option::is_none")]
pub shell_init_profile: Option,
@@ -13632,6 +13726,44 @@ pub struct UIHandlePendingSamplingRequest {
pub response: Option,
}
+/// The user's selected action for an exhausted session limit.
+///
+///
+///
+/// **Experimental.** This type is part of an experimental wire-protocol surface
+/// and may change or be removed in future SDK or CLI releases.
+///
+///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct UISessionLimitsExhaustedResponse {
+ /// Action selected by the user.
+ pub action: UISessionLimitsExhaustedResponseAction,
+ /// AI Credits to add to the current max when action is 'add'.
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub additional_ai_credits: Option,
+ /// New absolute max AI Credits when action is 'set'.
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub max_ai_credits: Option,
+}
+
+/// Request ID of a pending `session_limits_exhausted.requested` event and the user's selected limit action.
+///
+///
+///
+/// **Experimental.** This type is part of an experimental wire-protocol surface
+/// and may change or be removed in future SDK or CLI releases.
+///
+///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct UIHandlePendingSessionLimitsExhaustedRequest {
+ /// The unique request ID from the session_limits_exhausted.requested event
+ pub request_id: RequestId,
+ /// The selected session-limit action.
+ pub response: UISessionLimitsExhaustedResponse,
+}
+
/// Schema for the `UIUserInputResponse` type.
///
///
@@ -15660,6 +15792,51 @@ pub struct SessionWorkspacesDiffResult {
pub requested_mode: WorkspaceDiffMode,
}
+/// Identifies the target session.
+///
+///
+///
+/// **Experimental.** This type is part of an experimental wire-protocol surface
+/// and may change or be removed in future SDK or CLI releases.
+///
+///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct SessionCompletionsGetTriggerCharactersParams {
+ /// Target session identifier
+ pub session_id: SessionId,
+}
+
+/// Characters that, when typed in the composer, should trigger a `completions.request`. Empty when the session has no host-driven completions (e.g. local sessions, or a relay host that does not advertise `completionTriggerCharacters`).
+///
+///
+///
+/// **Experimental.** This type is part of an experimental wire-protocol surface
+/// and may change or be removed in future SDK or CLI releases.
+///
+///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct SessionCompletionsGetTriggerCharactersResult {
+ /// Trigger characters advertised by the host (e.g. `["@", "#"]`). Empty disables host-driven completions for the session.
+ pub trigger_characters: Vec
,
+}
+
+/// Host-driven completion items for the current composer input. Empty when the host returns no items or does not support completions.
+///
+///
+///
+/// **Experimental.** This type is part of an experimental wire-protocol surface
+/// and may change or be removed in future SDK or CLI releases.
+///
+///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct SessionCompletionsRequestResult {
+ /// Completion items in host-ranked order.
+ pub items: Vec,
+}
+
/// Identifies the target session.
///
///
@@ -16918,6 +17095,21 @@ pub struct SessionUiHandlePendingAutoModeSwitchResult {
pub success: bool,
}
+/// Indicates whether the pending UI request was resolved by this call.
+///
+///
+///
+/// **Experimental.** This type is part of an experimental wire-protocol surface
+/// and may change or be removed in future SDK or CLI releases.
+///
+///
+#[derive(Debug, Clone, Default, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct SessionUiHandlePendingSessionLimitsExhaustedResult {
+ /// True if the request was still pending and was resolved by this call. False if the request ID was unknown, already resolved by another client (e.g. GitHub), expired, or otherwise no longer pending.
+ pub success: bool,
+}
+
/// Indicates whether the pending UI request was resolved by this call.
///
///
@@ -17402,13 +17594,13 @@ pub struct SessionMetadataSnapshotResult {
/// Remote-session-specific metadata. Populated only when `isRemote` is true. Fields are immutable for the lifetime of the session.
#[serde(skip_serializing_if = "Option::is_none")]
pub remote_metadata: Option
,
- /// Current response limits for the session, or null when no limits are active
- pub response_limits: Option,
/// Currently selected model identifier, if any
#[serde(skip_serializing_if = "Option::is_none")]
pub selected_model: Option,
/// The unique identifier of the session
pub session_id: SessionId,
+ /// Current session limits, or null when no limits are active
+ pub session_limits: Option,
/// ISO 8601 timestamp of when the session started
pub start_time: String,
/// Short human-readable summary of the session, if known. Omitted when no summary has been generated.
@@ -18232,6 +18424,31 @@ pub type AccountGetAllUsersResult = Vec;
///
pub type SessionMcpAppsCallToolResult = HashMap
;
+/// Resolved Anthropic adaptive-thinking capability for a model.
+///
+///
+///
+/// **Experimental.** This type is part of an experimental wire-protocol surface
+/// and may change or be removed in future SDK or CLI releases.
+///
+///
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
+pub enum AdaptiveThinkingSupport {
+ /// The model does not accept thinking.type='adaptive'
+ #[serde(rename = "unsupported")]
+ Unsupported,
+ /// The model accepts adaptive thinking but also accepts thinking.type='enabled'
+ #[serde(rename = "optional")]
+ Optional,
+ /// The model only accepts adaptive thinking and rejects thinking.type='enabled' with HTTP 400 (e.g. opus-4.7/4.8)
+ #[serde(rename = "required")]
+ Required,
+ /// Unknown variant for forward compatibility.
+ #[default]
+ #[serde(other)]
+ Unknown,
+}
+
/// Which tier this directory belongs to
///
///
@@ -21869,6 +22086,34 @@ pub enum UIExitPlanModeAction {
Unknown,
}
+/// User action selected for an exhausted session limit.
+///
+///
+///
+/// **Experimental.** This type is part of an experimental wire-protocol surface
+/// and may change or be removed in future SDK or CLI releases.
+///
+///
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
+pub enum UISessionLimitsExhaustedResponseAction {
+ /// Increase the current max by an exact AI Credits amount.
+ #[serde(rename = "add")]
+ Add,
+ /// Set a new absolute max AI Credits value.
+ #[serde(rename = "set")]
+ Set,
+ /// Remove the current session limit.
+ #[serde(rename = "unset")]
+ Unset,
+ /// Leave the limit unchanged and cancel the blocked model request.
+ #[serde(rename = "cancel")]
+ Cancel,
+ /// Unknown variant for forward compatibility.
+ #[default]
+ #[serde(other)]
+ Unknown,
+}
+
/// OAuth user authentication. The token itself is held in the runtime's secret token store (keyed by host+login) and is NOT carried in this struct.
#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
pub enum UserAuthInfoType {
diff --git a/rust/src/generated/rpc.rs b/rust/src/generated/rpc.rs
index cb0df3490d..eb071cb1fb 100644
--- a/rust/src/generated/rpc.rs
+++ b/rust/src/generated/rpc.rs
@@ -2628,6 +2628,13 @@ impl<'a> SessionRpc<'a> {
}
}
+ /// `session.completions.*` sub-namespace.
+ pub fn completions(&self) -> SessionRpcCompletions<'a> {
+ SessionRpcCompletions {
+ session: self.session,
+ }
+ }
+
/// `session.eventLog.*` sub-namespace.
pub fn event_log(&self) -> SessionRpcEventLog<'a> {
SessionRpcEventLog {
@@ -3502,6 +3509,77 @@ impl<'a> SessionRpcCommands<'a> {
}
}
+/// `session.completions.*` RPCs.
+#[derive(Clone, Copy)]
+pub struct SessionRpcCompletions<'a> {
+ pub(crate) session: &'a Session,
+}
+
+impl<'a> SessionRpcCompletions<'a> {
+ /// Gets the characters that should trigger host-driven completions for the session. Empty disables host-driven completions (e.g. local sessions, or a relay host that does not advertise them).
+ ///
+ /// Wire method: `session.completions.getTriggerCharacters`.
+ ///
+ /// # Returns
+ ///
+ /// Characters that, when typed in the composer, should trigger a `completions.request`. Empty when the session has no host-driven completions (e.g. local sessions, or a relay host that does not advertise `completionTriggerCharacters`).
+ ///
+ ///
+ ///
+ /// **Experimental.** This API is part of an experimental wire-protocol surface
+ /// and may change or be removed in future SDK or CLI releases. Pin both the
+ /// SDK and CLI versions if your code depends on it.
+ ///
+ ///
+ pub async fn 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?;
+ Ok(serde_json::from_value(_value)?)
+ }
+
+ /// Requests host-driven completion items for the current composer input. Returns an empty list when the host has no items or does not support completions.
+ ///
+ /// Wire method: `session.completions.request`.
+ ///
+ /// # Parameters
+ ///
+ /// * `params` - Request host-driven completions for the current composer input.
+ ///
+ /// # Returns
+ ///
+ /// Host-driven completion items for the current composer input. Empty when the host returns no items or does not support completions.
+ ///
+ ///
+ ///
+ /// **Experimental.** This API is part of an experimental wire-protocol surface
+ /// and may change or be removed in future SDK or CLI releases. Pin both the
+ /// SDK and CLI versions if your code depends on it.
+ ///
+ ///
+ pub async fn 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?;
+ Ok(serde_json::from_value(_value)?)
+ }
+}
+
/// `session.eventLog.*` RPCs.
#[derive(Clone, Copy)]
pub struct SessionRpcEventLog<'a> {
@@ -7998,6 +8076,42 @@ impl<'a> SessionRpcUi<'a> {
Ok(serde_json::from_value(_value)?)
}
+ /// Resolves a pending `session_limits_exhausted.requested` event with the user's selected limit action.
+ ///
+ /// Wire method: `session.ui.handlePendingSessionLimitsExhausted`.
+ ///
+ /// # Parameters
+ ///
+ /// * `params` - Request ID of a pending `session_limits_exhausted.requested` event and the user's selected limit action.
+ ///
+ /// # Returns
+ ///
+ /// Indicates whether the pending UI request was resolved by this call.
+ ///
+ ///
+ ///
+ /// **Experimental.** This API is part of an experimental wire-protocol surface
+ /// and may change or be removed in future SDK or CLI releases. Pin both the
+ /// SDK and CLI versions if your code depends on it.
+ ///
+ ///
+ pub async fn 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?;
+ Ok(serde_json::from_value(_value)?)
+ }
+
/// Resolves a pending `exit_plan_mode.requested` event with the user's response.
///
/// Wire method: `session.ui.handlePendingExitPlanMode`.
diff --git a/rust/src/generated/session_events.rs b/rust/src/generated/session_events.rs
index c5f005f3dd..af5fac2a8b 100644
--- a/rust/src/generated/session_events.rs
+++ b/rust/src/generated/session_events.rs
@@ -39,8 +39,8 @@ pub enum SessionEventType {
SessionModelChange,
#[serde(rename = "session.mode_changed")]
SessionModeChanged,
- #[serde(rename = "session.response_limits_changed")]
- SessionResponseLimitsChanged,
+ #[serde(rename = "session.session_limits_changed")]
+ SessionSessionLimitsChanged,
#[serde(rename = "session.permissions_changed")]
SessionPermissionsChanged,
#[serde(rename = "session.plan_changed")]
@@ -57,6 +57,8 @@ pub enum SessionEventType {
SessionSnapshotRewind,
#[serde(rename = "session.shutdown")]
SessionShutdown,
+ #[serde(rename = "session.usage_checkpoint")]
+ SessionUsageCheckpoint,
#[serde(rename = "session.context_changed")]
SessionContextChanged,
#[serde(rename = "session.usage_info")]
@@ -178,6 +180,10 @@ pub enum SessionEventType {
AutoModeSwitchRequested,
#[serde(rename = "auto_mode_switch.completed")]
AutoModeSwitchCompleted,
+ #[serde(rename = "session_limits_exhausted.requested")]
+ SessionLimitsExhaustedRequested,
+ #[serde(rename = "session_limits_exhausted.completed")]
+ SessionLimitsExhaustedCompleted,
#[serde(rename = "commands.changed")]
CommandsChanged,
#[serde(rename = "capabilities.changed")]
@@ -298,8 +304,8 @@ pub enum SessionEventData {
SessionModelChange(SessionModelChangeData),
#[serde(rename = "session.mode_changed")]
SessionModeChanged(SessionModeChangedData),
- #[serde(rename = "session.response_limits_changed")]
- SessionResponseLimitsChanged(SessionResponseLimitsChangedData),
+ #[serde(rename = "session.session_limits_changed")]
+ SessionSessionLimitsChanged(SessionSessionLimitsChangedData),
#[serde(rename = "session.permissions_changed")]
SessionPermissionsChanged(SessionPermissionsChangedData),
#[serde(rename = "session.plan_changed")]
@@ -316,6 +322,8 @@ pub enum SessionEventData {
SessionSnapshotRewind(SessionSnapshotRewindData),
#[serde(rename = "session.shutdown")]
SessionShutdown(SessionShutdownData),
+ #[serde(rename = "session.usage_checkpoint")]
+ SessionUsageCheckpoint(SessionUsageCheckpointData),
#[serde(rename = "session.context_changed")]
SessionContextChanged(SessionContextChangedData),
#[serde(rename = "session.usage_info")]
@@ -430,6 +438,10 @@ pub enum SessionEventData {
AutoModeSwitchRequested(AutoModeSwitchRequestedData),
#[serde(rename = "auto_mode_switch.completed")]
AutoModeSwitchCompleted(AutoModeSwitchCompletedData),
+ #[serde(rename = "session_limits_exhausted.requested")]
+ SessionLimitsExhaustedRequested(SessionLimitsExhaustedRequestedData),
+ #[serde(rename = "session_limits_exhausted.completed")]
+ SessionLimitsExhaustedCompleted(SessionLimitsExhaustedCompletedData),
#[serde(rename = "commands.changed")]
CommandsChanged(CommandsChangedData),
#[serde(rename = "capabilities.changed")]
@@ -568,11 +580,11 @@ pub struct WorkingDirectoryContext {
pub repository_host: Option,
}
-/// Optional response limits.
+/// Optional session limits.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
-pub struct ResponseLimitsConfig {
- /// Maximum AI Credits allowed while responding to one top-level user message.
+pub struct SessionLimitsConfig {
+ /// Maximum AI Credits allowed across the session's current accounting window.
#[serde(skip_serializing_if = "Option::is_none")]
pub max_ai_credits: Option,
}
@@ -606,14 +618,14 @@ pub struct SessionStartData {
/// Whether this session supports remote steering via GitHub
#[serde(skip_serializing_if = "Option::is_none")]
pub remote_steerable: Option,
- /// Response limits configured at session creation time, if any
- #[serde(skip_serializing_if = "Option::is_none")]
- pub response_limits: Option,
/// Model selected at session creation time, if any
#[serde(skip_serializing_if = "Option::is_none")]
pub selected_model: Option,
/// Unique identifier for the session
pub session_id: SessionId,
+ /// Session limits configured at session creation time, if any
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub session_limits: Option,
/// ISO 8601 timestamp when the session was created
pub start_time: String,
/// Schema version number for the session event format
@@ -650,14 +662,14 @@ pub struct SessionResumeData {
/// Whether this session supports remote steering via GitHub
#[serde(skip_serializing_if = "Option::is_none")]
pub remote_steerable: Option,
- /// Response limits currently configured at resume time; null when no limits are active
- #[serde(skip_serializing_if = "Option::is_none")]
- pub response_limits: Option,
/// ISO 8601 timestamp when the session was resumed
pub resume_time: String,
/// Model currently selected at resume time
#[serde(skip_serializing_if = "Option::is_none")]
pub selected_model: Option,
+ /// Session limits currently configured at resume time; null when no limits are active
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub session_limits: Option,
/// True when this resume attached to a session that the runtime already had running in-memory (for example, an extension joining a session another client was actively driving). False (or omitted) for cold resumes — the runtime had to reconstitute the session from its persisted event log.
#[serde(skip_serializing_if = "Option::is_none")]
pub session_was_active: Option,
@@ -850,12 +862,12 @@ pub struct SessionModeChangedData {
pub previous_mode: SessionMode,
}
-/// Session event "session.response_limits_changed". Response limits update details. Null clears the limits.
+/// Session event "session.session_limits_changed". Session limits update details. Null clears the limits.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
-pub struct SessionResponseLimitsChangedData {
- /// Current response limits for the session, or null when no limits are active
- pub response_limits: Option,
+pub struct SessionSessionLimitsChangedData {
+ /// Current session limits, or null when no limits are active
+ pub session_limits: Option,
}
/// Session event "session.permissions_changed". Permissions change details carrying the aggregate allow-all boolean transition.
@@ -1109,6 +1121,18 @@ pub struct SessionShutdownData {
pub(crate) total_premium_requests: Option,
}
+/// Session event "session.usage_checkpoint". Durable session usage checkpoint for reconstructing aggregate accounting on resume
+#[derive(Debug, Clone, Default, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct SessionUsageCheckpointData {
+ /// Session-wide accumulated nano-AI units cost at checkpoint time
+ pub total_nano_aiu: f64,
+ /// Total number of premium API requests used at checkpoint time
+ #[doc(hidden)]
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub(crate) total_premium_requests: Option,
+}
+
/// Session event "session.context_changed". Updated working directory and git context after the change
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
@@ -1576,6 +1600,9 @@ pub struct AssistantMessageData {
/// Readable reasoning text from the model's extended thinking
#[serde(skip_serializing_if = "Option::is_none")]
pub reasoning_text: Option,
+ /// OpenAI-compatible wire field the provider used for reasoning (e.g. reasoning_content/reasoning). Populated only when non-canonical, so the dialect round-trips across turns.
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub reasoning_wire_field: Option,
/// GitHub request tracing ID (x-github-request-id header) for correlating with server-side logs
#[serde(skip_serializing_if = "Option::is_none")]
pub request_id: Option,
@@ -2694,6 +2721,12 @@ pub struct PermissionRequestRead {
pub kind: PermissionRequestReadKind,
/// Path of the file or directory being read
pub path: String,
+ /// True when the model has requested to run this search outside the sandbox (it set requestSandboxBypass: true and the host opted in via sandbox.allowBypass). This is a request, not a grant: the search runs unsandboxed only if the user approves this permission request. Hosts should highlight the elevated risk in the approval UI.
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub request_sandbox_bypass: Option,
+ /// Model-provided justification for the sandbox-bypass request. Only meaningful when requestSandboxBypass is true.
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub request_sandbox_bypass_reason: Option,
/// Tool call ID that triggered this permission request
#[serde(skip_serializing_if = "Option::is_none")]
pub tool_call_id: Option,
@@ -3554,6 +3587,42 @@ pub struct AutoModeSwitchCompletedData {
pub response: AutoModeSwitchResponse,
}
+/// Session event "session_limits_exhausted.requested". Session limit exhaustion notification requiring user action.
+#[derive(Debug, Clone, Default, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct SessionLimitsExhaustedRequestedData {
+ /// Configured max AI Credits for the current accounting window.
+ pub max_ai_credits: f64,
+ /// Unique identifier for this request; used to respond via session.ui.handlePendingSessionLimitsExhausted().
+ pub request_id: RequestId,
+ /// AI Credits already consumed in the current accounting window.
+ pub used_ai_credits: f64,
+}
+
+/// The user's selected action for an exhausted session limit.
+#[derive(Debug, Clone, Default, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct SessionLimitsExhaustedResponse {
+ /// Action selected by the user.
+ pub action: SessionLimitsExhaustedResponseAction,
+ /// AI Credits to add to the current max when action is 'add'.
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub additional_ai_credits: Option,
+ /// New absolute max AI Credits when action is 'set'.
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub max_ai_credits: Option,
+}
+
+/// Session event "session_limits_exhausted.completed". Session limit exhaustion prompt completion notification.
+#[derive(Debug, Clone, Default, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct SessionLimitsExhaustedCompletedData {
+ /// Request ID of the resolved request; clients should dismiss any UI for this request.
+ pub request_id: RequestId,
+ /// The user's selected session-limit action.
+ pub response: SessionLimitsExhaustedResponse,
+}
+
/// Schema for the `CommandsChangedCommand` type.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
@@ -5068,6 +5137,27 @@ pub enum AutoModeSwitchResponse {
Unknown,
}
+/// User action selected for an exhausted session limit.
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
+pub enum SessionLimitsExhaustedResponseAction {
+ /// Increase the current max by an exact AI Credits amount.
+ #[serde(rename = "add")]
+ Add,
+ /// Set a new absolute max AI Credits value.
+ #[serde(rename = "set")]
+ Set,
+ /// Remove the current session limit.
+ #[serde(rename = "unset")]
+ Unset,
+ /// Leave the limit unchanged and cancel the blocked model request.
+ #[serde(rename = "cancel")]
+ Cancel,
+ /// Unknown variant for forward compatibility.
+ #[default]
+ #[serde(other)]
+ Unknown,
+}
+
/// Exit plan mode action
#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
pub enum ExitPlanModeAction {
diff --git a/test/harness/package-lock.json b/test/harness/package-lock.json
index 56ef29cc9d..770bae27a6 100644
--- a/test/harness/package-lock.json
+++ b/test/harness/package-lock.json
@@ -9,7 +9,7 @@
"version": "1.0.0",
"license": "ISC",
"devDependencies": {
- "@github/copilot": "^1.0.66-2",
+ "@github/copilot": "^1.0.66",
"@modelcontextprotocol/sdk": "^1.26.0",
"@types/node": "^25.3.3",
"@types/node-forge": "^1.3.14",
@@ -501,9 +501,9 @@
}
},
"node_modules/@github/copilot": {
- "version": "1.0.66-2",
- "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.66-2.tgz",
- "integrity": "sha512-nAhhtfjpryklyombieuu18NK2g+BmEk4/8qvXVj8k+w/63tiVpLxFh865Vf6NQiVh/S7hbjMghTbrptsspYg2w==",
+ "version": "1.0.66",
+ "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.66.tgz",
+ "integrity": "sha512-m3+3FLSgum90xN4+eiwnLvdrDvM+oZzur5DfhOH88duNDKBcLQvKQY9fG/I1l1t8a1iBwjpgtRpsBwykE8k3Zw==",
"dev": true,
"license": "SEE LICENSE IN LICENSE.md",
"dependencies": {
@@ -513,20 +513,20 @@
"copilot": "npm-loader.js"
},
"optionalDependencies": {
- "@github/copilot-darwin-arm64": "1.0.66-2",
- "@github/copilot-darwin-x64": "1.0.66-2",
- "@github/copilot-linux-arm64": "1.0.66-2",
- "@github/copilot-linux-x64": "1.0.66-2",
- "@github/copilot-linuxmusl-arm64": "1.0.66-2",
- "@github/copilot-linuxmusl-x64": "1.0.66-2",
- "@github/copilot-win32-arm64": "1.0.66-2",
- "@github/copilot-win32-x64": "1.0.66-2"
+ "@github/copilot-darwin-arm64": "1.0.66",
+ "@github/copilot-darwin-x64": "1.0.66",
+ "@github/copilot-linux-arm64": "1.0.66",
+ "@github/copilot-linux-x64": "1.0.66",
+ "@github/copilot-linuxmusl-arm64": "1.0.66",
+ "@github/copilot-linuxmusl-x64": "1.0.66",
+ "@github/copilot-win32-arm64": "1.0.66",
+ "@github/copilot-win32-x64": "1.0.66"
}
},
"node_modules/@github/copilot-darwin-arm64": {
- "version": "1.0.66-2",
- "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.66-2.tgz",
- "integrity": "sha512-gjLRtAQOdFQUOTm7nYi+zufkGxMlQlTzUyncQ3W4u1+WdGQbx5fWqMg/yd+j1yMN9PEETyF/ZHZqAaFWkEpQww==",
+ "version": "1.0.66",
+ "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.66.tgz",
+ "integrity": "sha512-cJPXE2rWSjR+B8GRBUUd0k9PM4euWRUe3xgHoJqi9o/jJjtRYn6DZMrmFt9xgjoYWf0WZOyrlDgedqO1V+zDAg==",
"cpu": [
"arm64"
],
@@ -541,9 +541,9 @@
}
},
"node_modules/@github/copilot-darwin-x64": {
- "version": "1.0.66-2",
- "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.66-2.tgz",
- "integrity": "sha512-wWWBsVwJtRTXqCK8lVpzwbJd3Tm1F23avf942K+PmsGYiZZYNcS5pt4umQRRj0sHKgO/muuA4eg/tMfGNi5fgA==",
+ "version": "1.0.66",
+ "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.66.tgz",
+ "integrity": "sha512-44mpx2ZcRFHDx4B9xlrL5OQyTgaD/Hn+bAkeStXgcG8UkkfYSsRtLhnaxqUEQrtIEiVQrw++XWvUO0AscRrX+w==",
"cpu": [
"x64"
],
@@ -558,9 +558,9 @@
}
},
"node_modules/@github/copilot-linux-arm64": {
- "version": "1.0.66-2",
- "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.66-2.tgz",
- "integrity": "sha512-j0hjx77JNFR3ZS8z3flY2j5SfGZMfKigYVFpDlTJM8FhfkMCUJ5IUhsZwSTimhHlxrsXuI31S6g0WsZLmBUe6A==",
+ "version": "1.0.66",
+ "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.66.tgz",
+ "integrity": "sha512-uXtTs/rYjk6kacNs/T0s/lxn0JBvAgu78pBoZeWpU5APhICkPy9kC+lNAzLYoZujVVDOHT05IoeifHppFpQ8+w==",
"cpu": [
"arm64"
],
@@ -575,9 +575,9 @@
}
},
"node_modules/@github/copilot-linux-x64": {
- "version": "1.0.66-2",
- "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.66-2.tgz",
- "integrity": "sha512-vWaNbh4WdwkiI40Thcfbwi8tZFKo06r+Dm9Zfb8uY4wAz3X5PaGeSq+8XrNoV3uaRWltI0ncSIrq5tSOyDtRPg==",
+ "version": "1.0.66",
+ "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.66.tgz",
+ "integrity": "sha512-tXn3OuJCx/YEDNgYg8mdOGSFiIjmLJtTEyZ/VoEA86ffUIPxrunc0wnapEFk2zOW1unwdJeBuVIkzlB3RS1/eA==",
"cpu": [
"x64"
],
@@ -592,9 +592,9 @@
}
},
"node_modules/@github/copilot-linuxmusl-arm64": {
- "version": "1.0.66-2",
- "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.66-2.tgz",
- "integrity": "sha512-LbWy5NlWasBeV/i+Xol+8dW7kbAQr6MF46apbseRNHYkhwyF/417WtLfirP8O2hPuqyU72q/HAQziFXkz14pIQ==",
+ "version": "1.0.66",
+ "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-arm64/-/copilot-linuxmusl-arm64-1.0.66.tgz",
+ "integrity": "sha512-sHRag7W5CG0kbbX3j9v9cUmIafk/0N8MGGr2knvPeIHtxwZQYYjx397gT1nN6xagLWt5mvchkYybfQFCyCBaxg==",
"cpu": [
"arm64"
],
@@ -609,9 +609,9 @@
}
},
"node_modules/@github/copilot-linuxmusl-x64": {
- "version": "1.0.66-2",
- "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.66-2.tgz",
- "integrity": "sha512-djOu52fGIU7eUhQdUS0K5xB2eFdi8LTTbxvphHWlrN1AD1BdZ+VX9Pk2avt6yCfW+Hh0loh2pNsCbTfNyxvULA==",
+ "version": "1.0.66",
+ "resolved": "https://registry.npmjs.org/@github/copilot-linuxmusl-x64/-/copilot-linuxmusl-x64-1.0.66.tgz",
+ "integrity": "sha512-bdIgHOaVZlvsF/4awzMxsby6T+4k7aWe9HZr+sr+qU8tuG19jwi/1LXGB6tKdlFeFgY78yX0lR+ywByVJc5loA==",
"cpu": [
"x64"
],
@@ -626,9 +626,9 @@
}
},
"node_modules/@github/copilot-win32-arm64": {
- "version": "1.0.66-2",
- "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.66-2.tgz",
- "integrity": "sha512-YQu01atiwoz8XfrHKqvI1xNjnc2IIIxgJDkQ6PxwrWPZ4IO320izwlXbW2ZaOz9yDgjWNis6EJ4Ryz8K+mM6kg==",
+ "version": "1.0.66",
+ "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.66.tgz",
+ "integrity": "sha512-T7FGONCVWIPjjAxp22cu4WKqNogq56FknHGAvj7Ryn5ZoanFAR3vXXlXDsYnDKLBcshjRYGxocl2UnmRTMxgvg==",
"cpu": [
"arm64"
],
@@ -643,9 +643,9 @@
}
},
"node_modules/@github/copilot-win32-x64": {
- "version": "1.0.66-2",
- "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.66-2.tgz",
- "integrity": "sha512-4/kTs+lKc67f7KEAQ+Gt3sEBFDSEGoUxJujddV/+fS8EAg9uF2g6e3NzS1I4+htyRM4Oq/Z6xfWjGUgQsi9rfw==",
+ "version": "1.0.66",
+ "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.66.tgz",
+ "integrity": "sha512-eroxRUSJZOJCk0luLyX6A1qqGIWs8p4w0EjZFhCzvdFvJ0abIovGyt3R/gN9DeyJM8Qs7ROPGvqevUlXh6DhCg==",
"cpu": [
"x64"
],
diff --git a/test/harness/package.json b/test/harness/package.json
index 98193f99d5..3c59cb2357 100644
--- a/test/harness/package.json
+++ b/test/harness/package.json
@@ -14,7 +14,7 @@
"node": "^20.19.0 || >=22.12.0"
},
"devDependencies": {
- "@github/copilot": "^1.0.66-2",
+ "@github/copilot": "^1.0.66",
"@modelcontextprotocol/sdk": "^1.26.0",
"@types/node": "^25.3.3",
"@types/node-forge": "^1.3.14",
From 481d101e387900172674ae9254f8b89fb3bce7e4 Mon Sep 17 00:00:00 2001
From: Stephen Toub
Date: Tue, 30 Jun 2026 15:26:36 -0400
Subject: [PATCH 2/3] Adapt Java handwritten code to generated schema
Update handwritten Java constructor calls for generated 1.0.66 RPC type shape changes.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
---
java/src/main/java/com/github/copilot/CopilotClient.java | 3 ++-
java/src/main/java/com/github/copilot/CopilotSession.java | 2 +-
.../copilot/generated/rpc/GeneratedRpcRecordsCoverageTest.java | 2 +-
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/java/src/main/java/com/github/copilot/CopilotClient.java b/java/src/main/java/com/github/copilot/CopilotClient.java
index 9384bc708c..52c0cfa486 100644
--- a/java/src/main/java/com/github/copilot/CopilotClient.java
+++ b/java/src/main/java/com/github/copilot/CopilotClient.java
@@ -903,6 +903,7 @@ CompletableFuture updateSessionOptionsForMode(CopilotSession session, Bool
null, // workingDirectory
null, // availableTools
null, // excludedTools
+ null, // excludedBuiltinAgents
null, // toolFilterPrecedence
null, // enableScriptSafety
null, // shellInitProfile
@@ -940,7 +941,7 @@ CompletableFuture updateSessionOptionsForMode(CopilotSession session, Bool
null, // enableSessionStore
null, // enableSkills
null, // contextTier
- null // responseBudget
+ null // sessionLimits
);
return session.getRpc().options.update(params).thenCompose(result -> {
diff --git a/java/src/main/java/com/github/copilot/CopilotSession.java b/java/src/main/java/com/github/copilot/CopilotSession.java
index 194ce12773..5a597dcd9a 100644
--- a/java/src/main/java/com/github/copilot/CopilotSession.java
+++ b/java/src/main/java/com/github/copilot/CopilotSession.java
@@ -1995,7 +1995,7 @@ public CompletableFuture setModel(String model, String reasoningEffort, St
if (modelCapabilities.getSupports() != null) {
var s = modelCapabilities.getSupports();
supports = new ModelCapabilitiesOverrideSupports(s.getVision().orElse(null),
- s.getReasoningEffort().orElse(null));
+ s.getReasoningEffort().orElse(null), null);
}
ModelCapabilitiesOverrideLimits limits = null;
if (modelCapabilities.getLimits() != null) {
diff --git a/java/src/test/java/com/github/copilot/generated/rpc/GeneratedRpcRecordsCoverageTest.java b/java/src/test/java/com/github/copilot/generated/rpc/GeneratedRpcRecordsCoverageTest.java
index 7df3562e32..bc9d623745 100644
--- a/java/src/test/java/com/github/copilot/generated/rpc/GeneratedRpcRecordsCoverageTest.java
+++ b/java/src/test/java/com/github/copilot/generated/rpc/GeneratedRpcRecordsCoverageTest.java
@@ -834,7 +834,7 @@ void toolsListResult_nested() {
void sessionModelSwitchToParams_nested_records() {
var limitsVision = new ModelCapabilitiesOverrideLimitsVision(List.of("image/png", "image/jpeg"), 10L, 5000000L);
var limits = new ModelCapabilitiesOverrideLimits(100000L, 8192L, 128000L, limitsVision);
- var supports = new ModelCapabilitiesOverrideSupports(true, true);
+ var supports = new ModelCapabilitiesOverrideSupports(true, true, null);
var capabilities = new ModelCapabilitiesOverride(supports, limits);
var params = new SessionModelSwitchToParams("sess-m", "gpt-5", null, null, capabilities, null);
From 2a05dcd8c1723e89a190c02eaa23a1d94ae24f77 Mon Sep 17 00:00:00 2001
From: Stephen Toub
Date: Tue, 30 Jun 2026 15:46:30 -0400
Subject: [PATCH 3/3] Update Java tests for generated type arity
Adapt test constructor calls to generated 1.0.66 schema additions.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
---
.../test/java/com/github/copilot/SessionEventHandlingTest.java | 2 +-
.../copilot/generated/rpc/GeneratedRpcRecordsCoverageTest.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/java/src/test/java/com/github/copilot/SessionEventHandlingTest.java b/java/src/test/java/com/github/copilot/SessionEventHandlingTest.java
index 6e80b7593c..2e54abf9d1 100644
--- a/java/src/test/java/com/github/copilot/SessionEventHandlingTest.java
+++ b/java/src/test/java/com/github/copilot/SessionEventHandlingTest.java
@@ -865,7 +865,7 @@ private SessionStartEvent createSessionStartEvent(String sessionId) {
private AssistantMessageEvent createAssistantMessageEvent(String content) {
var event = new AssistantMessageEvent();
var data = new AssistantMessageEvent.AssistantMessageEventData(null, null, content, null, null, null, null,
- null, null, null, null, null, null, null, null, null, null);
+ null, null, null, null, null, null, null, null, null, null, null);
event.setData(data);
return event;
}
diff --git a/java/src/test/java/com/github/copilot/generated/rpc/GeneratedRpcRecordsCoverageTest.java b/java/src/test/java/com/github/copilot/generated/rpc/GeneratedRpcRecordsCoverageTest.java
index bc9d623745..3fc22412e3 100644
--- a/java/src/test/java/com/github/copilot/generated/rpc/GeneratedRpcRecordsCoverageTest.java
+++ b/java/src/test/java/com/github/copilot/generated/rpc/GeneratedRpcRecordsCoverageTest.java
@@ -799,7 +799,7 @@ void mcpDiscoverResult_nested() {
@Test
void modelsListResult_nested() {
- var supports = new ModelCapabilitiesSupports(true, false);
+ var supports = new ModelCapabilitiesSupports(true, false, null);
var limits = new ModelCapabilitiesLimits(100000L, 8192L, 128000L, null);
var capabilities = new ModelCapabilities(supports, limits);
var policy = new ModelPolicy(ModelPolicyState.ENABLED, null);