From 4c4b8d87486a7b63e43097bb318dd87d33178bd1 Mon Sep 17 00:00:00 2001 From: Ben Brandt Date: Wed, 24 Jun 2026 17:16:05 +0200 Subject: [PATCH] feat(schema): Update to v1.16.0 of the schema --- schema/schema.json | 71 ++++++++++++++++++++++++++++++- scripts/generate.js | 2 +- src/schema/index.ts | 3 ++ src/schema/types.gen.ts | 94 +++++++++++++++++++++++++++++++++++++++++ src/schema/zod.gen.ts | 53 +++++++++++++++++++++++ 5 files changed, 221 insertions(+), 2 deletions(-) diff --git a/schema/schema.json b/schema/schema.json index d4cc569..fdc3a65 100644 --- a/schema/schema.json +++ b/schema/schema.json @@ -3697,7 +3697,7 @@ "const": "model" }, { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nModel-related configuration parameter.", + "description": "Model-related configuration parameter.", "type": "string", "const": "model_config" }, @@ -5856,6 +5856,18 @@ "type": "boolean", "default": false }, + "session": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nSession-related capabilities supported by the client.", + "anyOf": [ + { + "$ref": "#/$defs/ClientSessionCapabilities" + }, + { + "type": "null" + } + ], + "x-deserialize-default-on-error": true + }, "plan": { "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nWhether the client supports `plan_update` and `plan_removed` session updates.\n\nOptional. Omitted means the client does not advertise support.\nSupplying `{}` means the client can receive both update types.", "anyOf": [ @@ -5940,6 +5952,63 @@ } } }, + "ClientSessionCapabilities": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nSession-related capabilities supported by the client.", + "type": "object", + "properties": { + "configOptions": { + "description": "Config option capabilities supported by the client.\n\nOmitted or `null` means the client does not advertise support for any\nconfig option extensions.", + "anyOf": [ + { + "$ref": "#/$defs/SessionConfigOptionsCapabilities" + }, + { + "type": "null" + } + ], + "x-deserialize-default-on-error": true + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": ["object", "null"], + "additionalProperties": true + } + } + }, + "SessionConfigOptionsCapabilities": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nSession configuration option capabilities supported by the client.", + "type": "object", + "properties": { + "boolean": { + "description": "Whether the client supports boolean session configuration options.\n\nOmitted or `null` means the client does not advertise support.\nSupplying `{}` means agents may include `type: \"boolean\"` entries in\n`configOptions`, and the client may send `session/set_config_option`\nrequests with `type: \"boolean\"` and a boolean `value`.", + "anyOf": [ + { + "$ref": "#/$defs/BooleanConfigOptionCapabilities" + }, + { + "type": "null" + } + ], + "x-deserialize-default-on-error": true + }, + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": ["object", "null"], + "additionalProperties": true + } + } + }, + "BooleanConfigOptionCapabilities": { + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nCapabilities for boolean session configuration options.\n\nSupplying `{}` means the client supports boolean session configuration options.", + "type": "object", + "properties": { + "_meta": { + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": ["object", "null"], + "additionalProperties": true + } + } + }, "PlanCapabilities": { "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nCapabilities for receiving `plan_update` and `plan_removed` session updates.", "type": "object", diff --git a/scripts/generate.js b/scripts/generate.js index 800675f..e4fde66 100644 --- a/scripts/generate.js +++ b/scripts/generate.js @@ -10,7 +10,7 @@ import * as fs from "fs/promises"; import { dirname } from "path"; import * as prettier from "prettier"; -const CURRENT_SCHEMA_RELEASE = "schema-v1.14.0"; +const CURRENT_SCHEMA_RELEASE = "schema-v1.16.0"; await main(); diff --git a/src/schema/index.ts b/src/schema/index.ts index 7c3d4fb..f3cb5fd 100644 --- a/src/schema/index.ts +++ b/src/schema/index.ts @@ -22,6 +22,7 @@ export type { AvailableCommandInput, AvailableCommandsUpdate, BlobResourceContents, + BooleanConfigOptionCapabilities, BooleanPropertySchema, CancelNotification, CancelRequestNotification, @@ -30,6 +31,7 @@ export type { ClientNotification, ClientRequest, ClientResponse, + ClientSessionCapabilities, CloseNesRequest, CloseNesResponse, CloseSessionRequest, @@ -203,6 +205,7 @@ export type { SessionConfigId, SessionConfigOption, SessionConfigOptionCategory, + SessionConfigOptionsCapabilities, SessionConfigSelect, SessionConfigSelectGroup, SessionConfigSelectOption, diff --git a/src/schema/types.gen.ts b/src/schema/types.gen.ts index a4fd740..6420b61 100644 --- a/src/schema/types.gen.ts +++ b/src/schema/types.gen.ts @@ -4403,6 +4403,16 @@ export type ClientCapabilities = { * Whether the Client support all `terminal*` methods. */ terminal?: boolean; + /** + * **UNSTABLE** + * + * This capability is not part of the spec yet, and may be removed or changed at any point. + * + * Session-related capabilities supported by the client. + * + * @experimental + */ + session?: ClientSessionCapabilities | null; /** * **UNSTABLE** * @@ -4497,6 +4507,90 @@ export type FileSystemCapabilities = { } | null; }; +/** + * **UNSTABLE** + * + * This capability is not part of the spec yet, and may be removed or changed at any point. + * + * Session-related capabilities supported by the client. + * + * @experimental + */ +export type ClientSessionCapabilities = { + /** + * Config option capabilities supported by the client. + * + * Omitted or `null` means the client does not advertise support for any + * config option extensions. + */ + configOptions?: SessionConfigOptionsCapabilities | null; + /** + * The _meta property is reserved by ACP to allow clients and agents to attach additional + * metadata to their interactions. Implementations MUST NOT make assumptions about values at + * these keys. + * + * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + */ + _meta?: { + [key: string]: unknown; + } | null; +}; + +/** + * **UNSTABLE** + * + * This capability is not part of the spec yet, and may be removed or changed at any point. + * + * Session configuration option capabilities supported by the client. + * + * @experimental + */ +export type SessionConfigOptionsCapabilities = { + /** + * Whether the client supports boolean session configuration options. + * + * Omitted or `null` means the client does not advertise support. + * Supplying `{}` means agents may include `type: "boolean"` entries in + * `configOptions`, and the client may send `session/set_config_option` + * requests with `type: "boolean"` and a boolean `value`. + */ + boolean?: BooleanConfigOptionCapabilities | null; + /** + * The _meta property is reserved by ACP to allow clients and agents to attach additional + * metadata to their interactions. Implementations MUST NOT make assumptions about values at + * these keys. + * + * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + */ + _meta?: { + [key: string]: unknown; + } | null; +}; + +/** + * **UNSTABLE** + * + * This capability is not part of the spec yet, and may be removed or changed at any point. + * + * Capabilities for boolean session configuration options. + * + * Supplying `{}` means the client supports boolean session configuration options. + * + * @experimental + */ +export type BooleanConfigOptionCapabilities = { + /** + * The _meta property is reserved by ACP to allow clients and agents to attach additional + * metadata to their interactions. Implementations MUST NOT make assumptions about values at + * these keys. + * + * See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + */ + _meta?: { + [key: string]: unknown; + } | null; +}; + /** * **UNSTABLE** * diff --git a/src/schema/zod.gen.ts b/src/schema/zod.gen.ts index 7e37cd8..c78f176 100644 --- a/src/schema/zod.gen.ts +++ b/src/schema/zod.gen.ts @@ -2446,6 +2446,55 @@ export const zFileSystemCapabilities = z.object({ _meta: z.record(z.string(), z.unknown()).nullish(), }); +/** + * **UNSTABLE** + * + * This capability is not part of the spec yet, and may be removed or changed at any point. + * + * Capabilities for boolean session configuration options. + * + * Supplying `{}` means the client supports boolean session configuration options. + * + * @experimental + */ +export const zBooleanConfigOptionCapabilities = z.object({ + _meta: z.record(z.string(), z.unknown()).nullish(), +}); + +/** + * **UNSTABLE** + * + * This capability is not part of the spec yet, and may be removed or changed at any point. + * + * Session configuration option capabilities supported by the client. + * + * @experimental + */ +export const zSessionConfigOptionsCapabilities = z.object({ + boolean: defaultOnError( + zBooleanConfigOptionCapabilities.nullish(), + () => undefined, + ), + _meta: z.record(z.string(), z.unknown()).nullish(), +}); + +/** + * **UNSTABLE** + * + * This capability is not part of the spec yet, and may be removed or changed at any point. + * + * Session-related capabilities supported by the client. + * + * @experimental + */ +export const zClientSessionCapabilities = z.object({ + configOptions: defaultOnError( + zSessionConfigOptionsCapabilities.nullish(), + () => undefined, + ), + _meta: z.record(z.string(), z.unknown()).nullish(), +}); + /** * **UNSTABLE** * @@ -2565,6 +2614,10 @@ export const zClientCapabilities = z.object({ .optional() .default({ readTextFile: false, writeTextFile: false }), terminal: z.boolean().optional().default(false), + session: defaultOnError( + zClientSessionCapabilities.nullish(), + () => undefined, + ), plan: defaultOnError(zPlanCapabilities.nullish(), () => undefined), auth: zAuthCapabilities.optional().default({ terminal: false }), elicitation: defaultOnError(