From 2b8cbaadc196bc6d253ecc033757ac1f0d087e4a Mon Sep 17 00:00:00 2001 From: Ben Brandt Date: Wed, 1 Jul 2026 10:32:45 +0200 Subject: [PATCH 1/2] feat: Update schema to 1.17.0 Adds resilient schema deserialization hints --- release-please-config.json | 2 +- schema/schema.json | 617 +++++++++++--- scripts/generate.js | 15 +- src/schema/types.gen.ts | 12 +- src/schema/zod.gen.ts | 1599 ++++++++++++++++++++++++++---------- 5 files changed, 1674 insertions(+), 571 deletions(-) diff --git a/release-please-config.json b/release-please-config.json index c2986a9..c186128 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -2,7 +2,7 @@ "packages": { ".": { "changelog-path": "CHANGELOG.md", - "release-type": "node", + "release-type": "node" } }, "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json" diff --git a/schema/schema.json b/schema/schema.json index fdc3a65..3f46791 100644 --- a/schema/schema.json +++ b/schema/schema.json @@ -99,7 +99,7 @@ "anyOf": [ { "title": "CancelRequestNotification", - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or\nchanged at any point.\n\nCancels an ongoing request.\n\nThis is a notification sent by the side that sent a request to cancel that request.\n\nUpon receiving this notification, the receiver:\n\n1. MUST cancel the corresponding request activity and all nested activities\n2. MAY send any pending notifications.\n3. MUST send one of these responses for the original request:\n - Valid response with appropriate data (partial results or cancellation marker)\n - Error response with code `-32800` (Cancelled)\n\nSee protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/cancellation)", + "description": "Cancels an ongoing request.\n\nThis is a notification sent by the side that sent a request to cancel that request.\n\nUpon receiving this notification, the receiver:\n\n1. MAY cancel the corresponding request activity and all nested activities\n2. MAY send any pending notifications.\n3. MUST send one of these responses for the original request:\n - Valid response with appropriate data (partial results or cancellation marker)\n - Error response with code `-32800` (Cancelled)\n\nSee protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/cancellation)", "allOf": [ { "$ref": "#/$defs/CancelRequestNotification" @@ -313,6 +313,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -344,17 +345,20 @@ "description": "Line number to start reading from (1-based).", "type": ["integer", "null"], "format": "uint32", - "minimum": 0 + "minimum": 0, + "x-deserialize-default-on-error": true }, "limit": { "description": "Maximum number of lines to read.", "type": ["integer", "null"], "format": "uint32", - "minimum": 0 + "minimum": 0, + "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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -387,11 +391,14 @@ "type": "array", "items": { "$ref": "#/$defs/PermissionOption" - } + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": 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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -437,7 +444,8 @@ }, "title": { "description": "Update the human-readable title.", - "type": ["string", "null"] + "type": ["string", "null"], + "x-deserialize-default-on-error": true }, "content": { "description": "Replace the content collection.", @@ -458,14 +466,17 @@ "x-deserialize-skip-invalid-items": true }, "rawInput": { - "description": "Update the raw input." + "description": "Update the raw input.", + "x-deserialize-default-on-error": true }, "rawOutput": { - "description": "Update the raw output." + "description": "Update the raw output.", + "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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -714,16 +725,19 @@ }, "lastModified": { "description": "Timestamp indicating when the underlying resource was last modified.", - "type": ["string", "null"] + "type": ["string", "null"], + "x-deserialize-default-on-error": true }, "priority": { "description": "Relative importance of this content when clients choose what to surface.", "type": ["number", "null"], - "format": "double" + "format": "double", + "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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -766,6 +780,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -797,11 +812,13 @@ }, "uri": { "description": "URI associated with this resource or media payload.", - "type": ["string", "null"] + "type": ["string", "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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -834,6 +851,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -857,11 +875,13 @@ }, "description": { "description": "Optional human-readable details shown with this protocol object.", - "type": ["string", "null"] + "type": ["string", "null"], + "x-deserialize-default-on-error": true }, "mimeType": { "description": "MIME type describing the encoded media payload.", - "type": ["string", "null"] + "type": ["string", "null"], + "x-deserialize-default-on-error": true }, "name": { "description": "Human-readable name shown for this protocol object.", @@ -870,11 +890,13 @@ "size": { "description": "Optional size of the linked resource in bytes, if known.", "type": ["integer", "null"], - "format": "int64" + "format": "int64", + "x-deserialize-default-on-error": true }, "title": { "description": "Optional display title for end-user UI.", - "type": ["string", "null"] + "type": ["string", "null"], + "x-deserialize-default-on-error": true }, "uri": { "description": "URI associated with this resource or media payload.", @@ -883,6 +905,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -917,7 +940,8 @@ "properties": { "mimeType": { "description": "MIME type describing the encoded media payload.", - "type": ["string", "null"] + "type": ["string", "null"], + "x-deserialize-default-on-error": true }, "text": { "description": "Text payload carried by this content block.", @@ -930,6 +954,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -945,7 +970,8 @@ }, "mimeType": { "description": "MIME type describing the encoded media payload.", - "type": ["string", "null"] + "type": ["string", "null"], + "x-deserialize-default-on-error": true }, "uri": { "description": "URI associated with this resource or media payload.", @@ -954,6 +980,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -986,6 +1013,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -1006,6 +1034,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -1021,7 +1050,8 @@ }, "oldText": { "description": "The original content (None for new files).", - "type": ["string", "null"] + "type": ["string", "null"], + "x-deserialize-default-on-error": true }, "newText": { "description": "The new content after modification.", @@ -1030,6 +1060,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -1054,6 +1085,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -1071,11 +1103,13 @@ "description": "Optional line number within the file.", "type": ["integer", "null"], "format": "uint32", - "minimum": 0 + "minimum": 0, + "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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -1108,6 +1142,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -1163,28 +1198,35 @@ "type": "array", "items": { "type": "string" - } + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "env": { "description": "Environment variables for the command.", "type": "array", "items": { "$ref": "#/$defs/EnvVariable" - } + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "cwd": { "description": "Working directory for the command (absolute path).", - "type": ["string", "null"] + "type": ["string", "null"], + "x-deserialize-default-on-error": true }, "outputByteLimit": { "description": "Maximum number of output bytes to retain.\n\nWhen the limit is exceeded, the Client truncates from the beginning of the output\nto stay within the limit.\n\nThe Client MUST ensure truncation happens at a character boundary to maintain valid\nstring output, even if this means the retained output is slightly less than the\nspecified limit.", "type": ["integer", "null"], "format": "uint64", - "minimum": 0 + "minimum": 0, + "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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -1207,6 +1249,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -1235,6 +1278,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -1265,6 +1309,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -1295,6 +1340,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -1325,6 +1371,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -1343,6 +1390,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -1408,7 +1456,8 @@ { "type": "null" } - ] + ], + "x-deserialize-default-on-error": true } }, "required": ["sessionId"] @@ -1434,6 +1483,7 @@ "properties": { "type": { "description": "Type discriminator. Always `\"object\"`.", + "x-deserialize-default-on-error": true, "default": "object", "allOf": [ { @@ -1443,11 +1493,13 @@ }, "title": { "description": "Optional title for the schema.", - "type": ["string", "null"] + "type": ["string", "null"], + "x-deserialize-default-on-error": true }, "properties": { "description": "Property definitions (must be primitive types).", "type": "object", + "x-deserialize-default-on-error": true, "default": {}, "additionalProperties": { "$ref": "#/$defs/ElicitationPropertySchema" @@ -1458,15 +1510,19 @@ "type": ["array", "null"], "items": { "type": "string" - } + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "description": { "description": "Optional description of what this schema represents.", - "type": ["string", "null"] + "type": ["string", "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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -1609,6 +1665,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -1620,27 +1677,32 @@ "properties": { "title": { "description": "Optional title for the property.", - "type": ["string", "null"] + "type": ["string", "null"], + "x-deserialize-default-on-error": true }, "description": { "description": "Human-readable description.", - "type": ["string", "null"] + "type": ["string", "null"], + "x-deserialize-default-on-error": true }, "minLength": { "description": "Minimum string length.", "type": ["integer", "null"], "format": "uint32", - "minimum": 0 + "minimum": 0, + "x-deserialize-default-on-error": true }, "maxLength": { "description": "Maximum string length.", "type": ["integer", "null"], "format": "uint32", - "minimum": 0 + "minimum": 0, + "x-deserialize-default-on-error": true }, "pattern": { "description": "Pattern the string must match.", - "type": ["string", "null"] + "type": ["string", "null"], + "x-deserialize-default-on-error": true }, "format": { "description": "String format.", @@ -1651,29 +1713,36 @@ { "type": "null" } - ] + ], + "x-deserialize-default-on-error": true }, "default": { "description": "Default value.", - "type": ["string", "null"] + "type": ["string", "null"], + "x-deserialize-default-on-error": true }, "enum": { "description": "Enum values for untitled single-select enums.", "type": ["array", "null"], "items": { "type": "string" - } + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "oneOf": { "description": "Titled enum options for titled single-select enums.", "type": ["array", "null"], "items": { "$ref": "#/$defs/EnumOption" - } + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": 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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -1684,30 +1753,36 @@ "properties": { "title": { "description": "Optional title for the property.", - "type": ["string", "null"] + "type": ["string", "null"], + "x-deserialize-default-on-error": true }, "description": { "description": "Human-readable description.", - "type": ["string", "null"] + "type": ["string", "null"], + "x-deserialize-default-on-error": true }, "minimum": { "description": "Minimum value (inclusive).", "type": ["number", "null"], - "format": "double" + "format": "double", + "x-deserialize-default-on-error": true }, "maximum": { "description": "Maximum value (inclusive).", "type": ["number", "null"], - "format": "double" + "format": "double", + "x-deserialize-default-on-error": true }, "default": { "description": "Default value.", "type": ["number", "null"], - "format": "double" + "format": "double", + "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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -1718,30 +1793,36 @@ "properties": { "title": { "description": "Optional title for the property.", - "type": ["string", "null"] + "type": ["string", "null"], + "x-deserialize-default-on-error": true }, "description": { "description": "Human-readable description.", - "type": ["string", "null"] + "type": ["string", "null"], + "x-deserialize-default-on-error": true }, "minimum": { "description": "Minimum value (inclusive).", "type": ["integer", "null"], - "format": "int64" + "format": "int64", + "x-deserialize-default-on-error": true }, "maximum": { "description": "Maximum value (inclusive).", "type": ["integer", "null"], - "format": "int64" + "format": "int64", + "x-deserialize-default-on-error": true }, "default": { "description": "Default value.", "type": ["integer", "null"], - "format": "int64" + "format": "int64", + "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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -1752,19 +1833,23 @@ "properties": { "title": { "description": "Optional title for the property.", - "type": ["string", "null"] + "type": ["string", "null"], + "x-deserialize-default-on-error": true }, "description": { "description": "Human-readable description.", - "type": ["string", "null"] + "type": ["string", "null"], + "x-deserialize-default-on-error": true }, "default": { "description": "Default value.", - "type": ["boolean", "null"] + "type": ["boolean", "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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -1809,11 +1894,14 @@ "type": "array", "items": { "type": "string" - } + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": 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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -1838,11 +1926,14 @@ "type": "array", "items": { "$ref": "#/$defs/EnumOption" - } + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": 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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -1854,23 +1945,27 @@ "properties": { "title": { "description": "Optional title for the property.", - "type": ["string", "null"] + "type": ["string", "null"], + "x-deserialize-default-on-error": true }, "description": { "description": "Human-readable description.", - "type": ["string", "null"] + "type": ["string", "null"], + "x-deserialize-default-on-error": true }, "minItems": { "description": "Minimum number of items to select.", "type": ["integer", "null"], "format": "uint64", - "minimum": 0 + "minimum": 0, + "x-deserialize-default-on-error": true }, "maxItems": { "description": "Maximum number of items to select.", "type": ["integer", "null"], "format": "uint64", - "minimum": 0 + "minimum": 0, + "x-deserialize-default-on-error": true }, "items": { "description": "The items definition describing allowed values.", @@ -1885,11 +1980,14 @@ "type": ["array", "null"], "items": { "type": "string" - } + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": 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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -1989,6 +2087,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -2019,11 +2118,13 @@ "params": { "description": "Optional inner MCP params.\n\nIf omitted or set to `null`, the inner MCP message has no params.", "type": ["object", "null"], + "x-deserialize-default-on-error": true, "additionalProperties": 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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -2050,6 +2151,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -2314,6 +2416,7 @@ }, "agentCapabilities": { "description": "Capabilities supported by the agent.", + "x-deserialize-default-on-error": true, "default": { "loadSession": false, "promptCapabilities": { @@ -2360,6 +2463,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -2381,10 +2485,12 @@ "loadSession": { "description": "Whether the agent supports `session/load`.", "type": "boolean", - "default": false + "default": false, + "x-deserialize-default-on-error": true }, "promptCapabilities": { "description": "Prompt capabilities supported by the agent.", + "x-deserialize-default-on-error": true, "default": { "image": false, "audio": false, @@ -2398,6 +2504,7 @@ }, "mcpCapabilities": { "description": "MCP capabilities supported by the agent.", + "x-deserialize-default-on-error": true, "default": { "http": false, "sse": false, @@ -2411,6 +2518,7 @@ }, "sessionCapabilities": { "description": "Session lifecycle and prompt capabilities advertised by the agent.", + "x-deserialize-default-on-error": true, "default": {}, "allOf": [ { @@ -2420,6 +2528,7 @@ }, "auth": { "description": "Authentication-related capabilities supported by the agent.", + "x-deserialize-default-on-error": true, "default": {}, "allOf": [ { @@ -2466,6 +2575,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -2477,21 +2587,25 @@ "image": { "description": "Agent supports [`ContentBlock::Image`].", "type": "boolean", - "default": false + "default": false, + "x-deserialize-default-on-error": true }, "audio": { "description": "Agent supports [`ContentBlock::Audio`].", "type": "boolean", - "default": false + "default": false, + "x-deserialize-default-on-error": true }, "embeddedContext": { "description": "Agent supports embedded context in `session/prompt` requests.\n\nWhen enabled, the Client is allowed to include [`ContentBlock::Resource`]\nin prompt requests for pieces of context that are referenced in the message.", "type": "boolean", - "default": false + "default": false, + "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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -2503,21 +2617,25 @@ "http": { "description": "Agent supports [`McpServer::Http`].", "type": "boolean", - "default": false + "default": false, + "x-deserialize-default-on-error": true }, "sse": { "description": "Agent supports [`McpServer::Sse`].", "type": "boolean", - "default": false + "default": false, + "x-deserialize-default-on-error": true }, "acp": { "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nAgent supports [`McpServer::Acp`].", "type": "boolean", - "default": false + "default": false, + "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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -2601,6 +2719,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -2612,6 +2731,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -2623,6 +2743,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -2634,6 +2755,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -2645,6 +2767,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -2656,6 +2779,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -2667,6 +2791,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -2690,6 +2815,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -2701,6 +2827,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -2712,6 +2839,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -2747,6 +2875,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -2770,6 +2899,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -2841,6 +2971,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -2852,6 +2983,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -2871,6 +3003,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -2898,6 +3031,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -2909,6 +3043,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -2920,6 +3055,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -3003,6 +3139,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -3015,11 +3152,13 @@ "description": "Maximum number of recent files the agent can use.", "type": ["integer", "null"], "format": "uint32", - "minimum": 0 + "minimum": 0, + "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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -3031,6 +3170,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -3043,11 +3183,13 @@ "description": "Maximum number of edit history entries the agent can use.", "type": ["integer", "null"], "format": "uint32", - "minimum": 0 + "minimum": 0, + "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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -3060,11 +3202,13 @@ "description": "Maximum number of user actions the agent can use.", "type": ["integer", "null"], "format": "uint32", - "minimum": 0 + "minimum": 0, + "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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -3076,6 +3220,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -3087,6 +3232,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -3171,21 +3317,25 @@ }, "label": { "description": "Human-readable label for this variable, displayed in client UI.", - "type": ["string", "null"] + "type": ["string", "null"], + "x-deserialize-default-on-error": true }, "secret": { "description": "Whether this value is a secret (e.g. API key, token).\nClients should use a password-style input for secret vars.\n\nDefaults to `true`.", "type": "boolean", + "x-deserialize-default-on-error": true, "default": true }, "optional": { "description": "Whether this variable is optional.\n\nDefaults to `false`.", "type": "boolean", + "x-deserialize-default-on-error": true, "default": false }, "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -3209,22 +3359,27 @@ }, "description": { "description": "Optional description providing more details about this authentication method.", - "type": ["string", "null"] + "type": ["string", "null"], + "x-deserialize-default-on-error": true }, "vars": { "description": "The environment variables the client should set.", "type": "array", "items": { "$ref": "#/$defs/AuthEnvVar" - } + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "link": { "description": "Optional link to a page where the user can obtain their credentials.", - "type": ["string", "null"] + "type": ["string", "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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -3248,18 +3403,22 @@ }, "description": { "description": "Optional description providing more details about this authentication method.", - "type": ["string", "null"] + "type": ["string", "null"], + "x-deserialize-default-on-error": true }, "args": { "description": "Additional arguments to pass when running the agent binary for terminal auth.", "type": "array", "items": { "type": "string" - } + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "env": { "description": "Additional environment variables to set when running the agent binary for terminal auth.", "type": "object", + "x-deserialize-default-on-error": true, "additionalProperties": { "type": "string" } @@ -3267,6 +3426,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -3290,18 +3450,20 @@ }, "description": { "description": "Optional description providing more details about this authentication method.", - "type": ["string", "null"] + "type": ["string", "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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, "required": ["id", "name"] }, "Implementation": { - "description": "Metadata about the implementation of the client or agent.\nDescribes the name and version of an MCP implementation, with an optional\ntitle for UI representation.", + "description": "Metadata about the implementation of the client or agent.\nDescribes the name and version of an ACP implementation, with an optional\ntitle for UI representation.", "type": "object", "properties": { "name": { @@ -3310,7 +3472,8 @@ }, "title": { "description": "Intended for UI and end-user contexts — optimized to be human-readable\nand easily understood.\n\nIf not provided, the name should be used for display.", - "type": ["string", "null"] + "type": ["string", "null"], + "x-deserialize-default-on-error": true }, "version": { "description": "Version of the implementation. Can be displayed to the user or used\nfor debugging or metrics purposes. (e.g. \"1.0.0\").", @@ -3319,6 +3482,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -3331,6 +3495,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -3353,6 +3518,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -3390,11 +3556,13 @@ { "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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -3454,6 +3622,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -3466,6 +3635,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -3479,6 +3649,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -3492,6 +3663,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -3534,6 +3706,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -3565,6 +3738,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -3592,11 +3766,13 @@ }, "description": { "description": "Optional human-readable details shown with this protocol object.", - "type": ["string", "null"] + "type": ["string", "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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -3620,7 +3796,8 @@ }, "description": { "description": "Optional description for the Client to display to the user.", - "type": ["string", "null"] + "type": ["string", "null"], + "x-deserialize-default-on-error": true }, "category": { "description": "Optional semantic category for this option (UX only).", @@ -3637,6 +3814,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -3756,11 +3934,13 @@ }, "description": { "description": "Optional description for this option value.", - "type": ["string", "null"] + "type": ["string", "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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -3787,11 +3967,14 @@ "type": "array", "items": { "$ref": "#/$defs/SessionConfigSelectOption" - } + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": 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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -3863,6 +4046,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -3884,11 +4068,13 @@ }, "nextCursor": { "description": "Opaque cursor token. If present, pass this in the next request's cursor parameter\nto fetch the next page. If absent, there are no more results.", - "type": ["string", "null"] + "type": ["string", "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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -3917,7 +4103,9 @@ "type": "array", "items": { "type": "string" - } + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "title": { "description": "Human-readable title for the session", @@ -3932,6 +4120,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -3944,6 +4133,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -3986,6 +4176,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -4021,6 +4212,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -4034,6 +4226,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -4047,6 +4240,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -4069,6 +4263,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -4103,6 +4298,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -4166,23 +4362,27 @@ "description": "Total thought/reasoning tokens", "type": ["integer", "null"], "format": "uint64", - "minimum": 0 + "minimum": 0, + "x-deserialize-default-on-error": true }, "cachedReadTokens": { "description": "Total cache read tokens.", "type": ["integer", "null"], "format": "uint64", - "minimum": 0 + "minimum": 0, + "x-deserialize-default-on-error": true }, "cachedWriteTokens": { "description": "Total cache write tokens.", "type": ["integer", "null"], "format": "uint64", - "minimum": 0 + "minimum": 0, + "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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -4203,6 +4403,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -4226,6 +4427,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -4324,6 +4526,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -4352,6 +4555,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -4376,6 +4580,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -4398,7 +4603,9 @@ "type": "array", "items": { "$ref": "#/$defs/NesTextEdit" - } + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "cursorPosition": { "description": "Optional suggested cursor position after applying edits.", @@ -4415,6 +4622,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -4443,6 +4651,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -4475,6 +4684,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -4502,11 +4712,13 @@ }, "isRegex": { "description": "Whether `search` is a regular expression. Defaults to `false`.", - "type": ["boolean", "null"] + "type": ["boolean", "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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -4519,6 +4731,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -4550,7 +4763,8 @@ "type": "string" }, "data": { - "description": "Optional primitive or structured value that contains additional information about the error.\nThis may include debugging information or context-specific details." + "description": "Optional primitive or structured value that contains additional information about the error.\nThis may include debugging information or context-specific details.", + "x-deserialize-default-on-error": true } }, "required": ["code", "message"] @@ -4595,7 +4809,7 @@ }, { "title": "Request cancelled", - "description": "**Request cancelled**: **UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nExecution of the method was aborted either due to a cancellation request from the caller or\nbecause of resource constraints or shutdown.", + "description": "**Request cancelled**: Execution of the method was aborted either due to a cancellation request from the caller or\nbecause of resource constraints or shutdown.", "type": "integer", "format": "int32", "const": -32800 @@ -4713,6 +4927,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -4961,11 +5176,13 @@ { "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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -4989,6 +5206,7 @@ }, "kind": { "description": "The category of tool being invoked.\nHelps clients choose appropriate icons and UI treatment.", + "x-deserialize-default-on-error": true, "allOf": [ { "$ref": "#/$defs/ToolKind" @@ -4997,6 +5215,7 @@ }, "status": { "description": "Current execution status of the tool call.", + "x-deserialize-default-on-error": true, "allOf": [ { "$ref": "#/$defs/ToolCallStatus" @@ -5022,14 +5241,17 @@ "x-deserialize-skip-invalid-items": true }, "rawInput": { - "description": "Raw input parameters sent to the tool." + "description": "Raw input parameters sent to the tool.", + "x-deserialize-default-on-error": true }, "rawOutput": { - "description": "Raw output returned by the tool." + "description": "Raw output returned by the tool.", + "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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -5062,6 +5284,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -5123,6 +5346,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -5212,6 +5436,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -5236,6 +5461,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -5260,6 +5486,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -5280,6 +5507,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -5300,6 +5528,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -5332,6 +5561,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -5362,6 +5592,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -5383,6 +5614,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -5403,6 +5635,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -5424,6 +5657,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -5435,15 +5669,18 @@ "properties": { "title": { "description": "Human-readable title for the session. Set to null to clear.", - "type": ["string", "null"] + "type": ["string", "null"], + "x-deserialize-default-on-error": true }, "updatedAt": { "description": "ISO 8601 timestamp of last activity. Set to null to clear.", - "type": ["string", "null"] + "type": ["string", "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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -5464,6 +5701,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -5500,6 +5738,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -5520,6 +5759,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -5546,11 +5786,13 @@ "params": { "description": "Optional inner MCP params.\n\nIf omitted or set to `null`, the inner MCP message has no params.", "type": ["object", "null"], + "x-deserialize-default-on-error": true, "additionalProperties": 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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -5797,6 +6039,7 @@ }, "clientCapabilities": { "description": "Capabilities supported by the client.", + "x-deserialize-default-on-error": true, "default": { "fs": { "readTextFile": false, @@ -5828,6 +6071,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -5841,6 +6085,7 @@ "properties": { "fs": { "description": "File system capabilities supported by the client.\nDetermines which file operations the agent can request.", + "x-deserialize-default-on-error": true, "default": { "readTextFile": false, "writeTextFile": false @@ -5854,7 +6099,8 @@ "terminal": { "description": "Whether the Client support all `terminal/*` methods.", "type": "boolean", - "default": false + "default": false, + "x-deserialize-default-on-error": true }, "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.", @@ -5882,6 +6128,7 @@ }, "auth": { "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nAuthentication capabilities supported by the client.\nDetermines which authentication method types the agent may include\nin its `InitializeResponse`.", + "x-deserialize-default-on-error": true, "default": { "terminal": false }, @@ -5927,6 +6174,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -5938,16 +6186,19 @@ "readTextFile": { "description": "Whether the Client supports `fs/read_text_file` requests.", "type": "boolean", - "default": false + "default": false, + "x-deserialize-default-on-error": true }, "writeTextFile": { "description": "Whether the Client supports `fs/write_text_file` requests.", "type": "boolean", - "default": false + "default": false, + "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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -5971,6 +6222,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -5994,6 +6246,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -6005,6 +6258,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -6016,6 +6270,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -6027,11 +6282,13 @@ "terminal": { "description": "Whether the client supports `terminal` authentication methods.\n\nWhen `true`, the agent may include `terminal` entries in its authentication methods.", "type": "boolean", - "default": false + "default": false, + "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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -6067,6 +6324,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -6078,6 +6336,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -6089,6 +6348,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -6136,6 +6396,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -6147,6 +6408,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -6158,6 +6420,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -6169,6 +6432,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -6188,6 +6452,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -6202,6 +6467,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -6231,6 +6497,7 @@ "headers": { "description": "Full headers map for this provider.\nMay include authorization, routing, or other integration-specific headers.", "type": "object", + "x-deserialize-default-on-error": true, "additionalProperties": { "type": "string" } @@ -6238,6 +6505,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -6256,6 +6524,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -6270,6 +6539,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -6289,18 +6559,23 @@ "type": "array", "items": { "type": "string" - } + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "mcpServers": { "description": "List of MCP (Model Context Protocol) servers the agent should connect to.", "type": "array", "items": { "$ref": "#/$defs/McpServer" - } + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": 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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -6385,6 +6660,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -6407,11 +6683,14 @@ "type": "array", "items": { "$ref": "#/$defs/HttpHeader" - } + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": 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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -6434,11 +6713,14 @@ "type": "array", "items": { "$ref": "#/$defs/HttpHeader" - } + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": 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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -6463,6 +6745,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -6485,18 +6768,23 @@ "type": "array", "items": { "type": "string" - } + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "env": { "description": "Environment variables to set when launching the MCP server.", "type": "array", "items": { "$ref": "#/$defs/EnvVariable" - } + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": 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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -6511,7 +6799,9 @@ "type": "array", "items": { "$ref": "#/$defs/McpServer" - } + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "cwd": { "description": "The working directory for this session.", @@ -6522,7 +6812,9 @@ "type": "array", "items": { "type": "string" - } + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "sessionId": { "description": "The ID of the session to load.", @@ -6535,6 +6827,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -6548,15 +6841,18 @@ "properties": { "cwd": { "description": "Filter sessions by working directory. Must be an absolute path.", - "type": ["string", "null"] + "type": ["string", "null"], + "x-deserialize-default-on-error": true }, "cursor": { "description": "Opaque cursor token from a previous response's nextCursor field for cursor-based pagination", - "type": ["string", "null"] + "type": ["string", "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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -6578,6 +6874,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -6606,18 +6903,23 @@ "type": "array", "items": { "type": "string" - } + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "mcpServers": { "description": "List of MCP servers to connect to for this session.", "type": "array", "items": { "$ref": "#/$defs/McpServer" - } + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": 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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -6646,18 +6948,23 @@ "type": "array", "items": { "type": "string" - } + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": true }, "mcpServers": { "description": "List of MCP servers to connect to for this session.", "type": "array", "items": { "$ref": "#/$defs/McpServer" - } + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": 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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -6680,6 +6987,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -6710,6 +7018,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -6740,6 +7049,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -6797,11 +7107,14 @@ "type": "array", "items": { "$ref": "#/$defs/ContentBlock" - } + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": 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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -6815,7 +7128,8 @@ "properties": { "workspaceUri": { "description": "The root URI of the workspace.", - "type": ["string", "null"] + "type": ["string", "null"], + "x-deserialize-default-on-error": true }, "workspaceFolders": { "description": "The workspace folders.", @@ -6841,6 +7155,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -6862,6 +7177,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -6886,6 +7202,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -6955,6 +7272,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -7043,6 +7361,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -7066,6 +7385,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -7084,11 +7404,14 @@ "type": "array", "items": { "$ref": "#/$defs/NesExcerpt" - } + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": 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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -7117,6 +7440,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -7137,6 +7461,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -7171,6 +7496,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -7210,6 +7536,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -7246,6 +7573,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -7291,6 +7619,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -7417,20 +7746,20 @@ ] }, { - "title": "ExtMethodResponse", - "description": "Successful result returned by an extension method outside the core ACP method set.", + "title": "MessageMcpResponse", + "description": "Successful result returned by an MCP-over-ACP `mcp/message` request.", "allOf": [ { - "$ref": "#/$defs/ExtResponse" + "$ref": "#/$defs/MessageMcpResponse" } ] }, { - "title": "MessageMcpResponse", - "description": "Successful result returned by an MCP-over-ACP `mcp/message` request.", + "title": "ExtMethodResponse", + "description": "Successful result returned by an extension method outside the core ACP method set.", "allOf": [ { - "$ref": "#/$defs/MessageMcpResponse" + "$ref": "#/$defs/ExtResponse" } ] } @@ -7473,6 +7802,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -7490,6 +7820,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -7512,6 +7843,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -7569,6 +7901,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -7589,6 +7922,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -7617,11 +7951,13 @@ { "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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -7637,15 +7973,18 @@ "description": "The process exit code (may be null if terminated by signal).", "type": ["integer", "null"], "format": "uint32", - "minimum": 0 + "minimum": 0, + "x-deserialize-default-on-error": true }, "signal": { "description": "The signal that terminated the process (may be null if exited normally).", - "type": ["string", "null"] + "type": ["string", "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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } } @@ -7657,6 +7996,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -7671,15 +8011,18 @@ "description": "The process exit code (may be null if terminated by signal).", "type": ["integer", "null"], "format": "uint32", - "minimum": 0 + "minimum": 0, + "x-deserialize-default-on-error": true }, "signal": { "description": "The signal that terminated the process (may be null if exited normally).", - "type": ["string", "null"] + "type": ["string", "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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -7693,6 +8036,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -7706,6 +8050,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -7797,6 +8142,7 @@ "content": { "description": "The user-provided content, if any, as an object matching the requested schema.", "type": ["object", "null"], + "x-deserialize-default-on-error": true, "additionalProperties": { "$ref": "#/$defs/ElicitationContentValue" } @@ -7818,6 +8164,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -7832,6 +8179,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -7968,6 +8316,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -8007,6 +8356,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -8040,11 +8390,14 @@ "type": "array", "items": { "$ref": "#/$defs/TextDocumentContentChangeEvent" - } + }, + "x-deserialize-default-on-error": true, + "x-deserialize-skip-invalid-items": 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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -8065,7 +8418,8 @@ { "type": "null" } - ] + ], + "x-deserialize-default-on-error": true }, "text": { "description": "The new text for the range, or the full document content if `range` is `None`.", @@ -8074,6 +8428,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -8098,6 +8453,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -8124,6 +8480,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -8171,6 +8528,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -8197,6 +8555,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -8235,6 +8594,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, @@ -8268,7 +8628,7 @@ ] }, "CancelRequestNotification": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nNotification to cancel an ongoing request.\n\nSee protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/cancellation)", + "description": "Notification to cancel an ongoing request.\n\nSee protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/cancellation)", "type": "object", "properties": { "requestId": { @@ -8282,6 +8642,7 @@ "_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"], + "x-deserialize-default-on-error": true, "additionalProperties": true } }, diff --git a/scripts/generate.js b/scripts/generate.js index e4fde66..4ce3782 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.16.0"; +const CURRENT_SCHEMA_RELEASE = "schema-v1.17.0"; await main(); @@ -383,7 +383,10 @@ function fallbackFunctionExpression(ctx, schema, isRequired) { function fallbackValueExpression(ctx, schema, isRequired) { if (Object.hasOwn(schema, "default")) { - return ctx.$.fromValue(schema.default); + const value = ctx.$.fromValue(schema.default); + return isPrimitiveLiteral(schema.default) + ? ctx.$(value).as("const") + : value; } if (isArraySchema(schema) && (isRequired || !isNullableSchema(schema))) { @@ -393,6 +396,14 @@ function fallbackValueExpression(ctx, schema, isRequired) { return ctx.$.id("undefined"); } +function isPrimitiveLiteral(value) { + return ( + typeof value === "string" || + typeof value === "number" || + typeof value === "boolean" + ); +} + function isArraySchema(schema) { return schema.type === "array"; } diff --git a/src/schema/types.gen.ts b/src/schema/types.gen.ts index 6420b61..80f593d 100644 --- a/src/schema/types.gen.ts +++ b/src/schema/types.gen.ts @@ -2465,7 +2465,7 @@ export type AuthMethodAgent = { /** * Metadata about the implementation of the client or agent. - * Describes the name and version of an MCP implementation, with an optional + * Describes the name and version of an ACP implementation, with an optional * title for UI representation. */ export type Implementation = { @@ -5860,8 +5860,8 @@ export type ClientResponse = | CreateElicitationResponse | ConnectMcpResponse | DisconnectMcpResponse - | ExtResponse - | MessageMcpResponse; + | MessageMcpResponse + | ExtResponse; } | { /** @@ -6481,15 +6481,9 @@ export type RejectNesNotification = { export type NesRejectReason = "rejected" | "ignored" | "replaced" | "cancelled"; /** - * **UNSTABLE** - * - * This capability is not part of the spec yet, and may be removed or changed at any point. - * * Notification to cancel an ongoing request. * * See protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/cancellation) - * - * @experimental */ export type CancelRequestNotification = { /** diff --git a/src/schema/zod.gen.ts b/src/schema/zod.gen.ts index c78f176..3927793 100644 --- a/src/schema/zod.gen.ts +++ b/src/schema/zod.gen.ts @@ -39,7 +39,10 @@ export const zWriteTextFileRequest = z.object({ sessionId: zSessionId, path: z.string(), content: z.string(), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -50,21 +53,30 @@ export const zWriteTextFileRequest = z.object({ export const zReadTextFileRequest = z.object({ sessionId: zSessionId, path: z.string(), - line: z - .int() - .gte(0) - .max(4294967295, { - error: "Invalid value: Expected uint32 to be <= 4294967295", - }) - .nullish(), - limit: z - .int() - .gte(0) - .max(4294967295, { - error: "Invalid value: Expected uint32 to be <= 4294967295", - }) - .nullish(), - _meta: z.record(z.string(), z.unknown()).nullish(), + line: defaultOnError( + z + .int() + .gte(0) + .max(4294967295, { + error: "Invalid value: Expected uint32 to be <= 4294967295", + }) + .nullish(), + () => undefined, + ), + limit: defaultOnError( + z + .int() + .gte(0) + .max(4294967295, { + error: "Invalid value: Expected uint32 to be <= 4294967295", + }) + .nullish(), + () => undefined, + ), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -117,9 +129,12 @@ export const zRole = z.union([z.literal("assistant"), z.literal("user")]); */ export const zAnnotations = z.object({ audience: defaultOnError(vecSkipError(zRole).nullish(), () => undefined), - lastModified: z.string().nullish(), - priority: z.number().nullish(), - _meta: z.record(z.string(), z.unknown()).nullish(), + lastModified: defaultOnError(z.string().nullish(), () => undefined), + priority: defaultOnError(z.number().nullish(), () => undefined), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -128,7 +143,10 @@ export const zAnnotations = z.object({ export const zTextContent = z.object({ annotations: defaultOnError(zAnnotations.nullish(), () => undefined), text: z.string(), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -138,8 +156,11 @@ export const zImageContent = z.object({ annotations: defaultOnError(zAnnotations.nullish(), () => undefined), data: z.string(), mimeType: z.string(), - uri: z.string().nullish(), - _meta: z.record(z.string(), z.unknown()).nullish(), + uri: defaultOnError(z.string().nullish(), () => undefined), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -149,7 +170,10 @@ export const zAudioContent = z.object({ annotations: defaultOnError(zAnnotations.nullish(), () => undefined), data: z.string(), mimeType: z.string(), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -157,23 +181,29 @@ export const zAudioContent = z.object({ */ export const zResourceLink = z.object({ annotations: defaultOnError(zAnnotations.nullish(), () => undefined), - description: z.string().nullish(), - mimeType: z.string().nullish(), + description: defaultOnError(z.string().nullish(), () => undefined), + mimeType: defaultOnError(z.string().nullish(), () => undefined), name: z.string(), - size: z.number().nullish(), - title: z.string().nullish(), + size: defaultOnError(z.number().nullish(), () => undefined), + title: defaultOnError(z.string().nullish(), () => undefined), uri: z.string(), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** * Text-based resource contents. */ export const zTextResourceContents = z.object({ - mimeType: z.string().nullish(), + mimeType: defaultOnError(z.string().nullish(), () => undefined), text: z.string(), uri: z.string(), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -181,9 +211,12 @@ export const zTextResourceContents = z.object({ */ export const zBlobResourceContents = z.object({ blob: z.string(), - mimeType: z.string().nullish(), + mimeType: defaultOnError(z.string().nullish(), () => undefined), uri: z.string(), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -200,7 +233,10 @@ export const zEmbeddedResourceResource = z.union([ export const zEmbeddedResource = z.object({ annotations: defaultOnError(zAnnotations.nullish(), () => undefined), resource: zEmbeddedResourceResource, - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -252,7 +288,10 @@ export const zContentBlock = z.union([ */ export const zContent = z.object({ content: zContentBlock, - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -264,9 +303,12 @@ export const zContent = z.object({ */ export const zDiff = z.object({ path: z.string(), - oldText: z.string().nullish(), + oldText: defaultOnError(z.string().nullish(), () => undefined), newText: z.string(), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -283,7 +325,10 @@ export const zTerminalId = z.string(); */ export const zTerminal = z.object({ terminalId: zTerminalId, - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -322,14 +367,20 @@ export const zToolCallContent = z.union([ */ export const zToolCallLocation = z.object({ path: z.string(), - line: z - .int() - .gte(0) - .max(4294967295, { - error: "Invalid value: Expected uint32 to be <= 4294967295", - }) - .nullish(), - _meta: z.record(z.string(), z.unknown()).nullish(), + line: defaultOnError( + z + .int() + .gte(0) + .max(4294967295, { + error: "Invalid value: Expected uint32 to be <= 4294967295", + }) + .nullish(), + () => undefined, + ), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -344,7 +395,7 @@ export const zToolCallUpdate = z.object({ toolCallId: zToolCallId, kind: defaultOnError(zToolKind.nullish(), () => undefined), status: defaultOnError(zToolCallStatus.nullish(), () => undefined), - title: z.string().nullish(), + title: defaultOnError(z.string().nullish(), () => undefined), content: defaultOnError( vecSkipError(zToolCallContent).nullish(), () => undefined, @@ -353,9 +404,12 @@ export const zToolCallUpdate = z.object({ vecSkipError(zToolCallLocation).nullish(), () => undefined, ), - rawInput: z.unknown().optional(), - rawOutput: z.unknown().optional(), - _meta: z.record(z.string(), z.unknown()).nullish(), + rawInput: defaultOnError(z.unknown().optional(), () => undefined), + rawOutput: defaultOnError(z.unknown().optional(), () => undefined), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -382,7 +436,10 @@ export const zPermissionOption = z.object({ optionId: zPermissionOptionId, name: z.string(), kind: zPermissionOptionKind, - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -395,8 +452,11 @@ export const zPermissionOption = z.object({ export const zRequestPermissionRequest = z.object({ sessionId: zSessionId, toolCall: zToolCallUpdate, - options: z.array(zPermissionOption), - _meta: z.record(z.string(), z.unknown()).nullish(), + options: requiredDefaultOnError(vecSkipError(zPermissionOption), () => []), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -405,7 +465,10 @@ export const zRequestPermissionRequest = z.object({ export const zEnvVariable = z.object({ name: z.string(), value: z.string(), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -414,11 +477,14 @@ export const zEnvVariable = z.object({ export const zCreateTerminalRequest = z.object({ sessionId: zSessionId, command: z.string(), - args: z.array(z.string()).optional(), - env: z.array(zEnvVariable).optional(), - cwd: z.string().nullish(), - outputByteLimit: z.number().nullish(), - _meta: z.record(z.string(), z.unknown()).nullish(), + args: defaultOnError(vecSkipError(z.string()).optional(), () => []), + env: defaultOnError(vecSkipError(zEnvVariable).optional(), () => []), + cwd: defaultOnError(z.string().nullish(), () => undefined), + outputByteLimit: defaultOnError(z.number().nullish(), () => undefined), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -427,7 +493,10 @@ export const zCreateTerminalRequest = z.object({ export const zTerminalOutputRequest = z.object({ sessionId: zSessionId, terminalId: zTerminalId, - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -436,7 +505,10 @@ export const zTerminalOutputRequest = z.object({ export const zReleaseTerminalRequest = z.object({ sessionId: zSessionId, terminalId: zTerminalId, - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -445,7 +517,10 @@ export const zReleaseTerminalRequest = z.object({ export const zWaitForTerminalExitRequest = z.object({ sessionId: zSessionId, terminalId: zTerminalId, - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -454,7 +529,10 @@ export const zWaitForTerminalExitRequest = z.object({ export const zKillTerminalRequest = z.object({ sessionId: zSessionId, terminalId: zTerminalId, - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -472,7 +550,7 @@ export const zKillTerminalRequest = z.object({ */ export const zElicitationSessionScope = z.object({ sessionId: zSessionId, - toolCallId: zToolCallId.nullish(), + toolCallId: defaultOnError(zToolCallId.nullish(), () => undefined), }); /** @@ -510,7 +588,10 @@ export const zStringFormat = z.union([ export const zEnumOption = z.object({ const: z.string(), title: z.string(), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -520,62 +601,80 @@ export const zEnumOption = z.object({ * with `"type": "string"`. */ export const zStringPropertySchema = z.object({ - title: z.string().nullish(), - description: z.string().nullish(), - minLength: z - .int() - .gte(0) - .max(4294967295, { - error: "Invalid value: Expected uint32 to be <= 4294967295", - }) - .nullish(), - maxLength: z - .int() - .gte(0) - .max(4294967295, { - error: "Invalid value: Expected uint32 to be <= 4294967295", - }) - .nullish(), - pattern: z.string().nullish(), - format: zStringFormat.nullish(), - default: z.string().nullish(), - enum: z.array(z.string()).nullish(), - oneOf: z.array(zEnumOption).nullish(), - _meta: z.record(z.string(), z.unknown()).nullish(), + title: defaultOnError(z.string().nullish(), () => undefined), + description: defaultOnError(z.string().nullish(), () => undefined), + minLength: defaultOnError( + z + .int() + .gte(0) + .max(4294967295, { + error: "Invalid value: Expected uint32 to be <= 4294967295", + }) + .nullish(), + () => undefined, + ), + maxLength: defaultOnError( + z + .int() + .gte(0) + .max(4294967295, { + error: "Invalid value: Expected uint32 to be <= 4294967295", + }) + .nullish(), + () => undefined, + ), + pattern: defaultOnError(z.string().nullish(), () => undefined), + format: defaultOnError(zStringFormat.nullish(), () => undefined), + default: defaultOnError(z.string().nullish(), () => undefined), + enum: defaultOnError(vecSkipError(z.string()).nullish(), () => undefined), + oneOf: defaultOnError(vecSkipError(zEnumOption).nullish(), () => undefined), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** * Schema for number (floating-point) properties in an elicitation form. */ export const zNumberPropertySchema = z.object({ - title: z.string().nullish(), - description: z.string().nullish(), - minimum: z.number().nullish(), - maximum: z.number().nullish(), - default: z.number().nullish(), - _meta: z.record(z.string(), z.unknown()).nullish(), + title: defaultOnError(z.string().nullish(), () => undefined), + description: defaultOnError(z.string().nullish(), () => undefined), + minimum: defaultOnError(z.number().nullish(), () => undefined), + maximum: defaultOnError(z.number().nullish(), () => undefined), + default: defaultOnError(z.number().nullish(), () => undefined), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** * Schema for integer properties in an elicitation form. */ export const zIntegerPropertySchema = z.object({ - title: z.string().nullish(), - description: z.string().nullish(), - minimum: z.number().nullish(), - maximum: z.number().nullish(), - default: z.number().nullish(), - _meta: z.record(z.string(), z.unknown()).nullish(), + title: defaultOnError(z.string().nullish(), () => undefined), + description: defaultOnError(z.string().nullish(), () => undefined), + minimum: defaultOnError(z.number().nullish(), () => undefined), + maximum: defaultOnError(z.number().nullish(), () => undefined), + default: defaultOnError(z.number().nullish(), () => undefined), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** * Schema for boolean properties in an elicitation form. */ export const zBooleanPropertySchema = z.object({ - title: z.string().nullish(), - description: z.string().nullish(), - default: z.boolean().nullish(), - _meta: z.record(z.string(), z.unknown()).nullish(), + title: defaultOnError(z.string().nullish(), () => undefined), + description: defaultOnError(z.string().nullish(), () => undefined), + default: defaultOnError(z.boolean().nullish(), () => undefined), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -588,16 +687,22 @@ export const zElicitationStringType = z.literal("string"); */ export const zUntitledMultiSelectItems = z.object({ type: zElicitationStringType, - enum: z.array(z.string()), - _meta: z.record(z.string(), z.unknown()).nullish(), + enum: requiredDefaultOnError(vecSkipError(z.string()), () => []), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** * Items definition for titled multi-select enum properties. */ export const zTitledMultiSelectItems = z.object({ - anyOf: z.array(zEnumOption), - _meta: z.record(z.string(), z.unknown()).nullish(), + anyOf: requiredDefaultOnError(vecSkipError(zEnumOption), () => []), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -612,13 +717,16 @@ export const zMultiSelectItems = z.union([ * Schema for multi-select (array) properties in an elicitation form. */ export const zMultiSelectPropertySchema = z.object({ - title: z.string().nullish(), - description: z.string().nullish(), - minItems: z.number().nullish(), - maxItems: z.number().nullish(), + title: defaultOnError(z.string().nullish(), () => undefined), + description: defaultOnError(z.string().nullish(), () => undefined), + minItems: defaultOnError(z.number().nullish(), () => undefined), + maxItems: defaultOnError(z.number().nullish(), () => undefined), items: zMultiSelectItems, - default: z.array(z.string()).nullish(), - _meta: z.record(z.string(), z.unknown()).nullish(), + default: defaultOnError(vecSkipError(z.string()).nullish(), () => undefined), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -663,15 +771,21 @@ export const zElicitationPropertySchema = z.union([ * as required by the elicitation specification. */ export const zElicitationSchema = z.object({ - type: zElicitationSchemaType.optional().default("object"), - title: z.string().nullish(), - properties: z - .record(z.string(), zElicitationPropertySchema) - .optional() - .default({}), - required: z.array(z.string()).nullish(), - description: z.string().nullish(), - _meta: z.record(z.string(), z.unknown()).nullish(), + type: defaultOnError( + zElicitationSchemaType.optional().default("object"), + () => "object" as const, + ), + title: defaultOnError(z.string().nullish(), () => undefined), + properties: defaultOnError( + z.record(z.string(), zElicitationPropertySchema).optional().default({}), + () => ({}), + ), + required: defaultOnError(vecSkipError(z.string()).nullish(), () => undefined), + description: defaultOnError(z.string().nullish(), () => undefined), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -746,7 +860,10 @@ export const zCreateElicitationRequest = z.intersection( ]), z.object({ message: z.string(), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }), ); @@ -776,7 +893,10 @@ export const zMcpServerAcpId = z.string(); */ export const zConnectMcpRequest = z.object({ acpId: zMcpServerAcpId, - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -802,8 +922,14 @@ export const zMcpConnectionId = z.string(); export const zMessageMcpRequest = z.object({ connectionId: zMcpConnectionId, method: z.string(), - params: z.record(z.string(), z.unknown()).nullish(), - _meta: z.record(z.string(), z.unknown()).nullish(), + params: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -817,7 +943,10 @@ export const zMessageMcpRequest = z.object({ */ export const zDisconnectMcpRequest = z.object({ connectionId: zMcpConnectionId, - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -877,20 +1006,44 @@ export const zProtocolVersion = z.int().gte(0).lte(65535); * See protocol docs: [Prompt Capabilities](https://agentclientprotocol.com/protocol/initialization#prompt-capabilities) */ export const zPromptCapabilities = z.object({ - image: z.boolean().optional().default(false), - audio: z.boolean().optional().default(false), - embeddedContext: z.boolean().optional().default(false), - _meta: z.record(z.string(), z.unknown()).nullish(), + image: defaultOnError( + z.boolean().optional().default(false), + () => false as const, + ), + audio: defaultOnError( + z.boolean().optional().default(false), + () => false as const, + ), + embeddedContext: defaultOnError( + z.boolean().optional().default(false), + () => false as const, + ), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** * MCP capabilities supported by the agent */ export const zMcpCapabilities = z.object({ - http: z.boolean().optional().default(false), - sse: z.boolean().optional().default(false), - acp: z.boolean().optional().default(false), - _meta: z.record(z.string(), z.unknown()).nullish(), + http: defaultOnError( + z.boolean().optional().default(false), + () => false as const, + ), + sse: defaultOnError( + z.boolean().optional().default(false), + () => false as const, + ), + acp: defaultOnError( + z.boolean().optional().default(false), + () => false as const, + ), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -899,7 +1052,10 @@ export const zMcpCapabilities = z.object({ * By supplying `{}` it means that the agent supports listing of sessions. */ export const zSessionListCapabilities = z.object({ - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -908,7 +1064,10 @@ export const zSessionListCapabilities = z.object({ * Supplying `{}` means the agent supports deleting sessions from `session/list`. */ export const zSessionDeleteCapabilities = z.object({ - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -920,7 +1079,10 @@ export const zSessionDeleteCapabilities = z.object({ * complete ordered additional-root list associated with a listed session. */ export const zSessionAdditionalDirectoriesCapabilities = z.object({ - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -935,7 +1097,10 @@ export const zSessionAdditionalDirectoriesCapabilities = z.object({ * @experimental */ export const zSessionForkCapabilities = z.object({ - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -944,7 +1109,10 @@ export const zSessionForkCapabilities = z.object({ * By supplying `{}` it means that the agent supports resuming of sessions. */ export const zSessionResumeCapabilities = z.object({ - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -953,7 +1121,10 @@ export const zSessionResumeCapabilities = z.object({ * By supplying `{}` it means that the agent supports closing of sessions. */ export const zSessionCloseCapabilities = z.object({ - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -977,7 +1148,10 @@ export const zSessionCapabilities = z.object({ fork: defaultOnError(zSessionForkCapabilities.nullish(), () => undefined), resume: defaultOnError(zSessionResumeCapabilities.nullish(), () => undefined), close: defaultOnError(zSessionCloseCapabilities.nullish(), () => undefined), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -986,7 +1160,10 @@ export const zSessionCapabilities = z.object({ * By supplying `{}` it means that the agent supports the logout method. */ export const zLogoutCapabilities = z.object({ - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -994,7 +1171,10 @@ export const zLogoutCapabilities = z.object({ */ export const zAgentAuthCapabilities = z.object({ logout: defaultOnError(zLogoutCapabilities.nullish(), () => undefined), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1009,14 +1189,20 @@ export const zAgentAuthCapabilities = z.object({ * @experimental */ export const zProvidersCapabilities = z.object({ - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** * Marker for `document/didOpen` capability support. */ export const zNesDocumentDidOpenCapabilities = z.object({ - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1032,28 +1218,40 @@ export const zTextDocumentSyncKind = z.union([ */ export const zNesDocumentDidChangeCapabilities = z.object({ syncKind: zTextDocumentSyncKind, - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** * Marker for `document/didClose` capability support. */ export const zNesDocumentDidCloseCapabilities = z.object({ - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** * Marker for `document/didSave` capability support. */ export const zNesDocumentDidSaveCapabilities = z.object({ - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** * Marker for `document/didFocus` capability support. */ export const zNesDocumentDidFocusCapabilities = z.object({ - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1080,7 +1278,10 @@ export const zNesDocumentEventCapabilities = z.object({ zNesDocumentDidFocusCapabilities.nullish(), () => undefined, ), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1091,70 +1292,100 @@ export const zNesEventCapabilities = z.object({ zNesDocumentEventCapabilities.nullish(), () => undefined, ), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** * Capabilities for recent files context. */ export const zNesRecentFilesCapabilities = z.object({ - maxCount: z - .int() - .gte(0) - .max(4294967295, { - error: "Invalid value: Expected uint32 to be <= 4294967295", - }) - .nullish(), - _meta: z.record(z.string(), z.unknown()).nullish(), + maxCount: defaultOnError( + z + .int() + .gte(0) + .max(4294967295, { + error: "Invalid value: Expected uint32 to be <= 4294967295", + }) + .nullish(), + () => undefined, + ), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** * Capabilities for related snippets context. */ export const zNesRelatedSnippetsCapabilities = z.object({ - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** * Capabilities for edit history context. */ export const zNesEditHistoryCapabilities = z.object({ - maxCount: z - .int() - .gte(0) - .max(4294967295, { - error: "Invalid value: Expected uint32 to be <= 4294967295", - }) - .nullish(), - _meta: z.record(z.string(), z.unknown()).nullish(), + maxCount: defaultOnError( + z + .int() + .gte(0) + .max(4294967295, { + error: "Invalid value: Expected uint32 to be <= 4294967295", + }) + .nullish(), + () => undefined, + ), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** * Capabilities for user actions context. */ export const zNesUserActionsCapabilities = z.object({ - maxCount: z - .int() - .gte(0) - .max(4294967295, { - error: "Invalid value: Expected uint32 to be <= 4294967295", - }) - .nullish(), - _meta: z.record(z.string(), z.unknown()).nullish(), + maxCount: defaultOnError( + z + .int() + .gte(0) + .max(4294967295, { + error: "Invalid value: Expected uint32 to be <= 4294967295", + }) + .nullish(), + () => undefined, + ), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** * Capabilities for open files context. */ export const zNesOpenFilesCapabilities = z.object({ - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** * Capabilities for diagnostics context. */ export const zNesDiagnosticsCapabilities = z.object({ - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1185,7 +1416,10 @@ export const zNesContextCapabilities = z.object({ zNesDiagnosticsCapabilities.nullish(), () => undefined, ), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1194,7 +1428,10 @@ export const zNesContextCapabilities = z.object({ export const zNesCapabilities = z.object({ events: defaultOnError(zNesEventCapabilities.nullish(), () => undefined), context: defaultOnError(zNesContextCapabilities.nullish(), () => undefined), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1217,26 +1454,52 @@ export const zPositionEncodingKind = z.union([ * See protocol docs: [Agent Capabilities](https://agentclientprotocol.com/protocol/initialization#agent-capabilities) */ export const zAgentCapabilities = z.object({ - loadSession: z.boolean().optional().default(false), - promptCapabilities: zPromptCapabilities.optional().default({ - image: false, - audio: false, - embeddedContext: false, - }), - mcpCapabilities: zMcpCapabilities.optional().default({ - http: false, - sse: false, - acp: false, - }), - sessionCapabilities: zSessionCapabilities.optional().default({}), - auth: zAgentAuthCapabilities.optional().default({}), + loadSession: defaultOnError( + z.boolean().optional().default(false), + () => false as const, + ), + promptCapabilities: defaultOnError( + zPromptCapabilities.optional().default({ + image: false, + audio: false, + embeddedContext: false, + }), + () => ({ + image: false, + audio: false, + embeddedContext: false, + }), + ), + mcpCapabilities: defaultOnError( + zMcpCapabilities.optional().default({ + http: false, + sse: false, + acp: false, + }), + () => ({ + http: false, + sse: false, + acp: false, + }), + ), + sessionCapabilities: defaultOnError( + zSessionCapabilities.optional().default({}), + () => ({}), + ), + auth: defaultOnError( + zAgentAuthCapabilities.optional().default({}), + () => ({}), + ), providers: defaultOnError(zProvidersCapabilities.nullish(), () => undefined), nes: defaultOnError(zNesCapabilities.nullish(), () => undefined), positionEncoding: defaultOnError( zPositionEncodingKind.nullish(), () => undefined, ), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1255,10 +1518,19 @@ export const zAuthMethodId = z.string(); */ export const zAuthEnvVar = z.object({ name: z.string(), - label: z.string().nullish(), - secret: z.boolean().optional().default(true), - optional: z.boolean().optional().default(false), - _meta: z.record(z.string(), z.unknown()).nullish(), + label: defaultOnError(z.string().nullish(), () => undefined), + secret: defaultOnError( + z.boolean().optional().default(true), + () => true as const, + ), + optional: defaultOnError( + z.boolean().optional().default(false), + () => false as const, + ), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1275,10 +1547,13 @@ export const zAuthEnvVar = z.object({ export const zAuthMethodEnvVar = z.object({ id: zAuthMethodId, name: z.string(), - description: z.string().nullish(), - vars: z.array(zAuthEnvVar), - link: z.string().nullish(), - _meta: z.record(z.string(), z.unknown()).nullish(), + description: defaultOnError(z.string().nullish(), () => undefined), + vars: requiredDefaultOnError(vecSkipError(zAuthEnvVar), () => []), + link: defaultOnError(z.string().nullish(), () => undefined), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1295,10 +1570,16 @@ export const zAuthMethodEnvVar = z.object({ export const zAuthMethodTerminal = z.object({ id: zAuthMethodId, name: z.string(), - description: z.string().nullish(), - args: z.array(z.string()).optional(), - env: z.record(z.string(), z.string()).optional(), - _meta: z.record(z.string(), z.unknown()).nullish(), + description: defaultOnError(z.string().nullish(), () => undefined), + args: defaultOnError(vecSkipError(z.string()).optional(), () => []), + env: defaultOnError( + z.record(z.string(), z.string()).optional(), + () => undefined, + ), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1309,8 +1590,11 @@ export const zAuthMethodTerminal = z.object({ export const zAuthMethodAgent = z.object({ id: zAuthMethodId, name: z.string(), - description: z.string().nullish(), - _meta: z.record(z.string(), z.unknown()).nullish(), + description: defaultOnError(z.string().nullish(), () => undefined), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1335,14 +1619,17 @@ export const zAuthMethod = z.union([ /** * Metadata about the implementation of the client or agent. - * Describes the name and version of an MCP implementation, with an optional + * Describes the name and version of an ACP implementation, with an optional * title for UI representation. */ export const zImplementation = z.object({ name: z.string(), - title: z.string().nullish(), + title: defaultOnError(z.string().nullish(), () => undefined), version: z.string(), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1354,34 +1641,57 @@ export const zImplementation = z.object({ */ export const zInitializeResponse = z.object({ protocolVersion: zProtocolVersion, - agentCapabilities: zAgentCapabilities.optional().default({ - loadSession: false, - promptCapabilities: { - image: false, - audio: false, - embeddedContext: false, - }, - mcpCapabilities: { - http: false, - sse: false, - acp: false, - }, - sessionCapabilities: {}, - auth: {}, - }), + agentCapabilities: defaultOnError( + zAgentCapabilities.optional().default({ + loadSession: false, + promptCapabilities: { + image: false, + audio: false, + embeddedContext: false, + }, + mcpCapabilities: { + http: false, + sse: false, + acp: false, + }, + sessionCapabilities: {}, + auth: {}, + }), + () => ({ + loadSession: false, + promptCapabilities: { + image: false, + audio: false, + embeddedContext: false, + }, + mcpCapabilities: { + http: false, + sse: false, + acp: false, + }, + sessionCapabilities: {}, + auth: {}, + }), + ), authMethods: defaultOnError( vecSkipError(zAuthMethod).optional().default([]), () => [], ), agentInfo: defaultOnError(zImplementation.nullish(), () => undefined), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** * Response to the `authenticate` method. */ export const zAuthenticateResponse = z.object({ - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1419,7 +1729,10 @@ export const zLlmProtocol = z.union([ export const zProviderCurrentConfig = z.object({ apiType: zLlmProtocol, baseUrl: z.string(), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1435,8 +1748,11 @@ export const zProviderInfo = z.object({ id: z.string(), supported: requiredDefaultOnError(vecSkipError(zLlmProtocol), () => []), required: z.boolean(), - current: zProviderCurrentConfig.nullish(), - _meta: z.record(z.string(), z.unknown()).nullish(), + current: defaultOnError(zProviderCurrentConfig.nullish(), () => undefined), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1450,7 +1766,10 @@ export const zProviderInfo = z.object({ */ export const zListProvidersResponse = z.object({ providers: requiredDefaultOnError(vecSkipError(zProviderInfo), () => []), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1463,7 +1782,10 @@ export const zListProvidersResponse = z.object({ * @experimental */ export const zSetProviderResponse = z.object({ - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1476,14 +1798,20 @@ export const zSetProviderResponse = z.object({ * @experimental */ export const zDisableProviderResponse = z.object({ - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** * Response to the `logout` method. */ export const zLogoutResponse = z.object({ - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1499,8 +1827,11 @@ export const zSessionModeId = z.string(); export const zSessionMode = z.object({ id: zSessionModeId, name: z.string(), - description: z.string().nullish(), - _meta: z.record(z.string(), z.unknown()).nullish(), + description: defaultOnError(z.string().nullish(), () => undefined), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1509,7 +1840,10 @@ export const zSessionMode = z.object({ export const zSessionModeState = z.object({ currentModeId: zSessionModeId, availableModes: requiredDefaultOnError(vecSkipError(zSessionMode), () => []), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1547,8 +1881,11 @@ export const zSessionConfigValueId = z.string(); export const zSessionConfigSelectOption = z.object({ value: zSessionConfigValueId, name: z.string(), - description: z.string().nullish(), - _meta: z.record(z.string(), z.unknown()).nullish(), + description: defaultOnError(z.string().nullish(), () => undefined), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1562,8 +1899,14 @@ export const zSessionConfigGroupId = z.string(); export const zSessionConfigSelectGroup = z.object({ group: zSessionConfigGroupId, name: z.string(), - options: z.array(zSessionConfigSelectOption), - _meta: z.record(z.string(), z.unknown()).nullish(), + options: requiredDefaultOnError( + vecSkipError(zSessionConfigSelectOption), + () => [], + ), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1614,12 +1957,15 @@ export const zSessionConfigOption = z.intersection( z.object({ id: zSessionConfigId, name: z.string(), - description: z.string().nullish(), + description: defaultOnError(z.string().nullish(), () => undefined), category: defaultOnError( zSessionConfigOptionCategory.nullish(), () => undefined, ), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }), ); @@ -1635,7 +1981,10 @@ export const zNewSessionResponse = z.object({ vecSkipError(zSessionConfigOption).nullish(), () => undefined, ), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1647,7 +1996,10 @@ export const zLoadSessionResponse = z.object({ vecSkipError(zSessionConfigOption).nullish(), () => undefined, ), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1656,10 +2008,16 @@ export const zLoadSessionResponse = z.object({ export const zSessionInfo = z.object({ sessionId: zSessionId, cwd: z.string(), - additionalDirectories: z.array(z.string()).optional(), + additionalDirectories: defaultOnError( + vecSkipError(z.string()).optional(), + () => [], + ), title: defaultOnError(z.string().nullish(), () => undefined), updatedAt: defaultOnError(z.string().nullish(), () => undefined), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1667,15 +2025,21 @@ export const zSessionInfo = z.object({ */ export const zListSessionsResponse = z.object({ sessions: requiredDefaultOnError(vecSkipError(zSessionInfo), () => []), - nextCursor: z.string().nullish(), - _meta: z.record(z.string(), z.unknown()).nullish(), + nextCursor: defaultOnError(z.string().nullish(), () => undefined), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** * Response from deleting a session. */ export const zDeleteSessionResponse = z.object({ - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1694,7 +2058,10 @@ export const zForkSessionResponse = z.object({ vecSkipError(zSessionConfigOption).nullish(), () => undefined, ), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1706,21 +2073,30 @@ export const zResumeSessionResponse = z.object({ vecSkipError(zSessionConfigOption).nullish(), () => undefined, ), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** * Response from closing a session. */ export const zCloseSessionResponse = z.object({ - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** * Response to `session/set_mode` method. */ export const zSetSessionModeResponse = z.object({ - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1731,7 +2107,10 @@ export const zSetSessionConfigOptionResponse = z.object({ vecSkipError(zSessionConfigOption), () => [], ), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1760,10 +2139,13 @@ export const zUsage = z.object({ totalTokens: z.number(), inputTokens: z.number(), outputTokens: z.number(), - thoughtTokens: z.number().nullish(), - cachedReadTokens: z.number().nullish(), - cachedWriteTokens: z.number().nullish(), - _meta: z.record(z.string(), z.unknown()).nullish(), + thoughtTokens: defaultOnError(z.number().nullish(), () => undefined), + cachedReadTokens: defaultOnError(z.number().nullish(), () => undefined), + cachedWriteTokens: defaultOnError(z.number().nullish(), () => undefined), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1774,7 +2156,10 @@ export const zUsage = z.object({ export const zPromptResponse = z.object({ stopReason: zStopReason, usage: defaultOnError(zUsage.nullish(), () => undefined), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1782,7 +2167,10 @@ export const zPromptResponse = z.object({ */ export const zStartNesResponse = z.object({ sessionId: zSessionId, - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1797,7 +2185,10 @@ export const zPosition = z.object({ character: z.int().gte(0).max(4294967295, { error: "Invalid value: Expected uint32 to be <= 4294967295", }), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1806,7 +2197,10 @@ export const zPosition = z.object({ export const zRange = z.object({ start: zPosition, end: zPosition, - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1815,7 +2209,10 @@ export const zRange = z.object({ export const zNesTextEdit = z.object({ range: zRange, newText: z.string(), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1824,9 +2221,12 @@ export const zNesTextEdit = z.object({ export const zNesEditSuggestion = z.object({ id: z.string(), uri: z.string(), - edits: z.array(zNesTextEdit), + edits: requiredDefaultOnError(vecSkipError(zNesTextEdit), () => []), cursorPosition: defaultOnError(zPosition.nullish(), () => undefined), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1836,7 +2236,10 @@ export const zNesJumpSuggestion = z.object({ id: z.string(), uri: z.string(), position: zPosition, - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1847,7 +2250,10 @@ export const zNesRenameSuggestion = z.object({ uri: z.string(), position: zPosition, newName: z.string(), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1858,8 +2264,11 @@ export const zNesSearchAndReplaceSuggestion = z.object({ uri: z.string(), search: z.string(), replace: z.string(), - isRegex: z.boolean().nullish(), - _meta: z.record(z.string(), z.unknown()).nullish(), + isRegex: defaultOnError(z.boolean().nullish(), () => undefined), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1893,14 +2302,20 @@ export const zNesSuggestion = z.union([ */ export const zSuggestNesResponse = z.object({ suggestions: requiredDefaultOnError(vecSkipError(zNesSuggestion), () => []), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** * Response from closing an NES session. */ export const zCloseNesResponse = z.object({ - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -1962,7 +2377,7 @@ export const zErrorCode = z.union([ export const zError = z.object({ code: zErrorCode, message: z.string(), - data: z.unknown().optional(), + data: defaultOnError(z.unknown().optional(), () => undefined), }); /** @@ -2011,8 +2426,11 @@ export const zMessageId = z.string(); */ export const zContentChunk = z.object({ content: zContentBlock, - messageId: zMessageId.nullish(), - _meta: z.record(z.string(), z.unknown()).nullish(), + messageId: defaultOnError(zMessageId.nullish(), () => undefined), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2026,16 +2444,19 @@ export const zContentChunk = z.object({ export const zToolCall = z.object({ toolCallId: zToolCallId, title: z.string(), - kind: zToolKind.optional(), - status: zToolCallStatus.optional(), + kind: defaultOnError(zToolKind.optional(), () => undefined), + status: defaultOnError(zToolCallStatus.optional(), () => undefined), content: defaultOnError(vecSkipError(zToolCallContent).optional(), () => []), locations: defaultOnError( vecSkipError(zToolCallLocation).optional(), () => [], ), - rawInput: z.unknown().optional(), - rawOutput: z.unknown().optional(), - _meta: z.record(z.string(), z.unknown()).nullish(), + rawInput: defaultOnError(z.unknown().optional(), () => undefined), + rawOutput: defaultOnError(z.unknown().optional(), () => undefined), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2074,7 +2495,10 @@ export const zPlanEntry = z.object({ content: z.string(), priority: zPlanEntryPriority, status: zPlanEntryStatus, - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2088,7 +2512,10 @@ export const zPlanEntry = z.object({ */ export const zPlan = z.object({ entries: requiredDefaultOnError(vecSkipError(zPlanEntry), () => []), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2114,7 +2541,10 @@ export const zPlanId = z.string(); export const zPlanItems = z.object({ id: zPlanId, entries: requiredDefaultOnError(vecSkipError(zPlanEntry), () => []), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2129,7 +2559,10 @@ export const zPlanItems = z.object({ export const zPlanFile = z.object({ id: zPlanId, uri: z.string(), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2144,7 +2577,10 @@ export const zPlanFile = z.object({ export const zPlanMarkdown = z.object({ id: zPlanId, content: z.string(), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2185,7 +2621,10 @@ export const zPlanUpdateContent = z.union([ */ export const zPlanUpdate = z.object({ plan: zPlanUpdateContent, - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2199,7 +2638,10 @@ export const zPlanUpdate = z.object({ */ export const zPlanRemoved = z.object({ id: zPlanId, - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2207,7 +2649,10 @@ export const zPlanRemoved = z.object({ */ export const zUnstructuredCommandInput = z.object({ hint: z.string(), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2224,7 +2669,10 @@ export const zAvailableCommand = z.object({ name: z.string(), description: z.string(), input: defaultOnError(zAvailableCommandInput.nullish(), () => undefined), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2235,7 +2683,10 @@ export const zAvailableCommandsUpdate = z.object({ vecSkipError(zAvailableCommand), () => [], ), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2245,7 +2696,10 @@ export const zAvailableCommandsUpdate = z.object({ */ export const zCurrentModeUpdate = z.object({ currentModeId: zSessionModeId, - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2256,7 +2710,10 @@ export const zConfigOptionUpdate = z.object({ vecSkipError(zSessionConfigOption), () => [], ), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2266,9 +2723,12 @@ export const zConfigOptionUpdate = z.object({ * This allows clients to display dynamic session names and track session state changes. */ export const zSessionInfoUpdate = z.object({ - title: z.string().nullish(), - updatedAt: z.string().nullish(), - _meta: z.record(z.string(), z.unknown()).nullish(), + title: defaultOnError(z.string().nullish(), () => undefined), + updatedAt: defaultOnError(z.string().nullish(), () => undefined), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2277,7 +2737,10 @@ export const zSessionInfoUpdate = z.object({ export const zCost = z.object({ amount: z.number(), currency: z.string(), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2287,7 +2750,10 @@ export const zUsageUpdate = z.object({ used: z.number(), size: z.number(), cost: defaultOnError(zCost.nullish(), () => undefined), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2375,7 +2841,10 @@ export const zSessionUpdate = z.union([ export const zSessionNotification = z.object({ sessionId: zSessionId, update: zSessionUpdate, - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2389,7 +2858,10 @@ export const zSessionNotification = z.object({ */ export const zCompleteElicitationNotification = z.object({ elicitationId: zElicitationId, - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2407,8 +2879,14 @@ export const zCompleteElicitationNotification = z.object({ export const zMessageMcpNotification = z.object({ connectionId: zMcpConnectionId, method: z.string(), - params: z.record(z.string(), z.unknown()).nullish(), - _meta: z.record(z.string(), z.unknown()).nullish(), + params: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2441,9 +2919,18 @@ export const zAgentNotification = z.object({ * See protocol docs: [FileSystem](https://agentclientprotocol.com/protocol/initialization#filesystem) */ export const zFileSystemCapabilities = z.object({ - readTextFile: z.boolean().optional().default(false), - writeTextFile: z.boolean().optional().default(false), - _meta: z.record(z.string(), z.unknown()).nullish(), + readTextFile: defaultOnError( + z.boolean().optional().default(false), + () => false as const, + ), + writeTextFile: defaultOnError( + z.boolean().optional().default(false), + () => false as const, + ), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2458,7 +2945,10 @@ export const zFileSystemCapabilities = z.object({ * @experimental */ export const zBooleanConfigOptionCapabilities = z.object({ - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2475,7 +2965,10 @@ export const zSessionConfigOptionsCapabilities = z.object({ zBooleanConfigOptionCapabilities.nullish(), () => undefined, ), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2492,7 +2985,10 @@ export const zClientSessionCapabilities = z.object({ zSessionConfigOptionsCapabilities.nullish(), () => undefined, ), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2505,7 +3001,10 @@ export const zClientSessionCapabilities = z.object({ * @experimental */ export const zPlanCapabilities = z.object({ - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2522,8 +3021,14 @@ export const zPlanCapabilities = z.object({ * @experimental */ export const zAuthCapabilities = z.object({ - terminal: z.boolean().optional().default(false), - _meta: z.record(z.string(), z.unknown()).nullish(), + terminal: defaultOnError( + z.boolean().optional().default(false), + () => false as const, + ), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2536,7 +3041,10 @@ export const zAuthCapabilities = z.object({ * @experimental */ export const zElicitationFormCapabilities = z.object({ - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2549,7 +3057,10 @@ export const zElicitationFormCapabilities = z.object({ * @experimental */ export const zElicitationUrlCapabilities = z.object({ - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2564,28 +3075,40 @@ export const zElicitationUrlCapabilities = z.object({ export const zElicitationCapabilities = z.object({ form: defaultOnError(zElicitationFormCapabilities.nullish(), () => undefined), url: defaultOnError(zElicitationUrlCapabilities.nullish(), () => undefined), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** * Marker for jump suggestion support. */ export const zNesJumpCapabilities = z.object({ - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** * Marker for rename suggestion support. */ export const zNesRenameCapabilities = z.object({ - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** * Marker for search and replace suggestion support. */ export const zNesSearchAndReplaceCapabilities = z.object({ - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2598,7 +3121,10 @@ export const zClientNesCapabilities = z.object({ zNesSearchAndReplaceCapabilities.nullish(), () => undefined, ), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2610,16 +3136,25 @@ export const zClientNesCapabilities = z.object({ * See protocol docs: [Client Capabilities](https://agentclientprotocol.com/protocol/initialization#client-capabilities) */ export const zClientCapabilities = z.object({ - fs: zFileSystemCapabilities - .optional() - .default({ readTextFile: false, writeTextFile: false }), - terminal: z.boolean().optional().default(false), + fs: defaultOnError( + zFileSystemCapabilities + .optional() + .default({ readTextFile: false, writeTextFile: false }), + () => ({ readTextFile: false, writeTextFile: false }), + ), + terminal: defaultOnError( + z.boolean().optional().default(false), + () => false as const, + ), session: defaultOnError( zClientSessionCapabilities.nullish(), () => undefined, ), plan: defaultOnError(zPlanCapabilities.nullish(), () => undefined), - auth: zAuthCapabilities.optional().default({ terminal: false }), + auth: defaultOnError( + zAuthCapabilities.optional().default({ terminal: false }), + () => ({ terminal: false }), + ), elicitation: defaultOnError( zElicitationCapabilities.nullish(), () => undefined, @@ -2629,7 +3164,10 @@ export const zClientCapabilities = z.object({ vecSkipError(zPositionEncodingKind).optional(), () => [], ), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2641,13 +3179,23 @@ export const zClientCapabilities = z.object({ */ export const zInitializeRequest = z.object({ protocolVersion: zProtocolVersion, - clientCapabilities: zClientCapabilities.optional().default({ - fs: { readTextFile: false, writeTextFile: false }, - terminal: false, - auth: { terminal: false }, - }), + clientCapabilities: defaultOnError( + zClientCapabilities.optional().default({ + fs: { readTextFile: false, writeTextFile: false }, + terminal: false, + auth: { terminal: false }, + }), + () => ({ + fs: { readTextFile: false, writeTextFile: false }, + terminal: false, + auth: { terminal: false }, + }), + ), clientInfo: defaultOnError(zImplementation.nullish(), () => undefined), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2657,7 +3205,10 @@ export const zInitializeRequest = z.object({ */ export const zAuthenticateRequest = z.object({ methodId: zAuthMethodId, - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2670,7 +3221,10 @@ export const zAuthenticateRequest = z.object({ * @experimental */ export const zListProvidersRequest = z.object({ - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2688,8 +3242,14 @@ export const zSetProviderRequest = z.object({ id: z.string(), apiType: zLlmProtocol, baseUrl: z.string(), - headers: z.record(z.string(), z.string()).optional(), - _meta: z.record(z.string(), z.unknown()).nullish(), + headers: defaultOnError( + z.record(z.string(), z.string()).optional(), + () => undefined, + ), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2703,7 +3263,10 @@ export const zSetProviderRequest = z.object({ */ export const zDisableProviderRequest = z.object({ id: z.string(), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2712,7 +3275,10 @@ export const zDisableProviderRequest = z.object({ * Terminates the current authenticated session. */ export const zLogoutRequest = z.object({ - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2721,7 +3287,10 @@ export const zLogoutRequest = z.object({ export const zHttpHeader = z.object({ name: z.string(), value: z.string(), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2730,8 +3299,11 @@ export const zHttpHeader = z.object({ export const zMcpServerHttp = z.object({ name: z.string(), url: z.string(), - headers: z.array(zHttpHeader), - _meta: z.record(z.string(), z.unknown()).nullish(), + headers: requiredDefaultOnError(vecSkipError(zHttpHeader), () => []), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2740,8 +3312,11 @@ export const zMcpServerHttp = z.object({ export const zMcpServerSse = z.object({ name: z.string(), url: z.string(), - headers: z.array(zHttpHeader), - _meta: z.record(z.string(), z.unknown()).nullish(), + headers: requiredDefaultOnError(vecSkipError(zHttpHeader), () => []), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2759,7 +3334,10 @@ export const zMcpServerSse = z.object({ export const zMcpServerAcp = z.object({ name: z.string(), id: zMcpServerAcpId, - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2768,9 +3346,12 @@ export const zMcpServerAcp = z.object({ export const zMcpServerStdio = z.object({ name: z.string(), command: z.string(), - args: z.array(z.string()), - env: z.array(zEnvVariable), - _meta: z.record(z.string(), z.unknown()).nullish(), + args: requiredDefaultOnError(vecSkipError(z.string()), () => []), + env: requiredDefaultOnError(vecSkipError(zEnvVariable), () => []), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2807,9 +3388,15 @@ export const zMcpServer = z.union([ */ export const zNewSessionRequest = z.object({ cwd: z.string(), - additionalDirectories: z.array(z.string()).optional(), - mcpServers: z.array(zMcpServer), - _meta: z.record(z.string(), z.unknown()).nullish(), + additionalDirectories: defaultOnError( + vecSkipError(z.string()).optional(), + () => [], + ), + mcpServers: requiredDefaultOnError(vecSkipError(zMcpServer), () => []), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2820,11 +3407,17 @@ export const zNewSessionRequest = z.object({ * See protocol docs: [Loading Sessions](https://agentclientprotocol.com/protocol/session-setup#loading-sessions) */ export const zLoadSessionRequest = z.object({ - mcpServers: z.array(zMcpServer), + mcpServers: requiredDefaultOnError(vecSkipError(zMcpServer), () => []), cwd: z.string(), - additionalDirectories: z.array(z.string()).optional(), + additionalDirectories: defaultOnError( + vecSkipError(z.string()).optional(), + () => [], + ), sessionId: zSessionId, - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2833,9 +3426,12 @@ export const zLoadSessionRequest = z.object({ * Only available if the Agent supports the `sessionCapabilities.list` capability. */ export const zListSessionsRequest = z.object({ - cwd: z.string().nullish(), - cursor: z.string().nullish(), - _meta: z.record(z.string(), z.unknown()).nullish(), + cwd: defaultOnError(z.string().nullish(), () => undefined), + cursor: defaultOnError(z.string().nullish(), () => undefined), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2845,7 +3441,10 @@ export const zListSessionsRequest = z.object({ */ export const zDeleteSessionRequest = z.object({ sessionId: zSessionId, - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2865,9 +3464,15 @@ export const zDeleteSessionRequest = z.object({ export const zForkSessionRequest = z.object({ sessionId: zSessionId, cwd: z.string(), - additionalDirectories: z.array(z.string()).optional(), - mcpServers: z.array(zMcpServer).optional(), - _meta: z.record(z.string(), z.unknown()).nullish(), + additionalDirectories: defaultOnError( + vecSkipError(z.string()).optional(), + () => [], + ), + mcpServers: defaultOnError(vecSkipError(zMcpServer).optional(), () => []), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2881,9 +3486,15 @@ export const zForkSessionRequest = z.object({ export const zResumeSessionRequest = z.object({ sessionId: zSessionId, cwd: z.string(), - additionalDirectories: z.array(z.string()).optional(), - mcpServers: z.array(zMcpServer).optional(), - _meta: z.record(z.string(), z.unknown()).nullish(), + additionalDirectories: defaultOnError( + vecSkipError(z.string()).optional(), + () => [], + ), + mcpServers: defaultOnError(vecSkipError(zMcpServer).optional(), () => []), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2897,7 +3508,10 @@ export const zResumeSessionRequest = z.object({ */ export const zCloseSessionRequest = z.object({ sessionId: zSessionId, - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2906,7 +3520,10 @@ export const zCloseSessionRequest = z.object({ export const zSetSessionModeRequest = z.object({ sessionId: zSessionId, modeId: zSessionModeId, - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2925,7 +3542,10 @@ export const zSetSessionConfigOptionRequest = z.intersection( z.object({ sessionId: zSessionId, configId: zSessionConfigId, - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }), ); @@ -2938,8 +3558,11 @@ export const zSetSessionConfigOptionRequest = z.intersection( */ export const zPromptRequest = z.object({ sessionId: zSessionId, - prompt: z.array(zContentBlock), - _meta: z.record(z.string(), z.unknown()).nullish(), + prompt: requiredDefaultOnError(vecSkipError(zContentBlock), () => []), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2948,7 +3571,10 @@ export const zPromptRequest = z.object({ export const zWorkspaceFolder = z.object({ uri: z.string(), name: z.string(), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2958,20 +3584,26 @@ export const zNesRepository = z.object({ name: z.string(), owner: z.string(), remoteUrl: z.string(), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** * Request to start an NES session. */ export const zStartNesRequest = z.object({ - workspaceUri: z.string().nullish(), + workspaceUri: defaultOnError(z.string().nullish(), () => undefined), workspaceFolders: defaultOnError( vecSkipError(zWorkspaceFolder).nullish(), () => undefined, ), repository: defaultOnError(zNesRepository.nullish(), () => undefined), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -2990,7 +3622,10 @@ export const zNesRecentFile = z.object({ uri: z.string(), languageId: z.string(), text: z.string(), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -3004,7 +3639,10 @@ export const zNesExcerpt = z.object({ error: "Invalid value: Expected uint32 to be <= 4294967295", }), text: z.string(), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -3012,8 +3650,11 @@ export const zNesExcerpt = z.object({ */ export const zNesRelatedSnippet = z.object({ uri: z.string(), - excerpts: z.array(zNesExcerpt), - _meta: z.record(z.string(), z.unknown()).nullish(), + excerpts: requiredDefaultOnError(vecSkipError(zNesExcerpt), () => []), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -3022,7 +3663,10 @@ export const zNesRelatedSnippet = z.object({ export const zNesEditHistoryEntry = z.object({ uri: z.string(), diff: z.string(), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -3033,7 +3677,10 @@ export const zNesUserAction = z.object({ uri: z.string(), position: zPosition, timestampMs: z.number(), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -3044,7 +3691,10 @@ export const zNesOpenFile = z.object({ languageId: z.string(), visibleRange: defaultOnError(zRange.nullish(), () => undefined), lastFocusedMs: defaultOnError(z.number().nullish(), () => undefined), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -3065,7 +3715,10 @@ export const zNesDiagnostic = z.object({ range: zRange, severity: zNesDiagnosticSeverity, message: z.string(), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -3096,7 +3749,10 @@ export const zNesSuggestContext = z.object({ vecSkipError(zNesDiagnostic).nullish(), () => undefined, ), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -3110,7 +3766,10 @@ export const zSuggestNesRequest = z.object({ selection: defaultOnError(zRange.nullish(), () => undefined), triggerKind: zNesTriggerKind, context: defaultOnError(zNesSuggestContext.nullish(), () => undefined), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -3121,7 +3780,10 @@ export const zSuggestNesRequest = z.object({ */ export const zCloseNesRequest = z.object({ sessionId: zSessionId, - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -3161,7 +3823,10 @@ export const zClientRequest = z.object({ * Response to `fs/write_text_file` */ export const zWriteTextFileResponse = z.object({ - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -3169,7 +3834,10 @@ export const zWriteTextFileResponse = z.object({ */ export const zReadTextFileResponse = z.object({ content: z.string(), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -3177,7 +3845,10 @@ export const zReadTextFileResponse = z.object({ */ export const zSelectedPermissionOutcome = z.object({ optionId: zPermissionOptionId, - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -3199,7 +3870,10 @@ export const zRequestPermissionOutcome = z.union([ */ export const zRequestPermissionResponse = z.object({ outcome: zRequestPermissionOutcome, - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -3207,22 +3881,31 @@ export const zRequestPermissionResponse = z.object({ */ export const zCreateTerminalResponse = z.object({ terminalId: zTerminalId, - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** * Exit status of a terminal command. */ export const zTerminalExitStatus = z.object({ - exitCode: z - .int() - .gte(0) - .max(4294967295, { - error: "Invalid value: Expected uint32 to be <= 4294967295", - }) - .nullish(), - signal: z.string().nullish(), - _meta: z.record(z.string(), z.unknown()).nullish(), + exitCode: defaultOnError( + z + .int() + .gte(0) + .max(4294967295, { + error: "Invalid value: Expected uint32 to be <= 4294967295", + }) + .nullish(), + () => undefined, + ), + signal: defaultOnError(z.string().nullish(), () => undefined), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -3231,37 +3914,52 @@ export const zTerminalExitStatus = z.object({ export const zTerminalOutputResponse = z.object({ output: z.string(), truncated: z.boolean(), - exitStatus: zTerminalExitStatus.nullish(), - _meta: z.record(z.string(), z.unknown()).nullish(), + exitStatus: defaultOnError(zTerminalExitStatus.nullish(), () => undefined), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** * Response to terminal/release method */ export const zReleaseTerminalResponse = z.object({ - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** * Response containing the exit status of a terminal command. */ export const zWaitForTerminalExitResponse = z.object({ - exitCode: z - .int() - .gte(0) - .max(4294967295, { - error: "Invalid value: Expected uint32 to be <= 4294967295", - }) - .nullish(), - signal: z.string().nullish(), - _meta: z.record(z.string(), z.unknown()).nullish(), + exitCode: defaultOnError( + z + .int() + .gte(0) + .max(4294967295, { + error: "Invalid value: Expected uint32 to be <= 4294967295", + }) + .nullish(), + () => undefined, + ), + signal: defaultOnError(z.string().nullish(), () => undefined), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** * Response to `terminal/kill` method */ export const zKillTerminalResponse = z.object({ - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -3285,7 +3983,10 @@ export const zElicitationContentValue = z.union([ * @experimental */ export const zElicitationAcceptAction = z.object({ - content: z.record(z.string(), zElicitationContentValue).nullish(), + content: defaultOnError( + z.record(z.string(), zElicitationContentValue).nullish(), + () => undefined, + ), }); /** @@ -3312,7 +4013,10 @@ export const zCreateElicitationResponse = z.intersection( }), ]), z.object({ - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }), ); @@ -3327,7 +4031,10 @@ export const zCreateElicitationResponse = z.intersection( */ export const zConnectMcpResponse = z.object({ connectionId: zMcpConnectionId, - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -3340,7 +4047,10 @@ export const zConnectMcpResponse = z.object({ * @experimental */ export const zDisconnectMcpResponse = z.object({ - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -3361,8 +4071,8 @@ export const zClientResponse = z.union([ zCreateElicitationResponse, zConnectMcpResponse, zDisconnectMcpResponse, - zExtResponse, zMessageMcpResponse, + zExtResponse, ]), }), z.object({ @@ -3378,7 +4088,10 @@ export const zClientResponse = z.union([ */ export const zCancelNotification = z.object({ sessionId: zSessionId, - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -3390,7 +4103,10 @@ export const zDidOpenDocumentNotification = z.object({ languageId: z.string(), version: z.number(), text: z.string(), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -3400,9 +4116,12 @@ export const zDidOpenDocumentNotification = z.object({ * When `range` is `Some`, `text` replaces the given range. */ export const zTextDocumentContentChangeEvent = z.object({ - range: zRange.nullish(), + range: defaultOnError(zRange.nullish(), () => undefined), text: z.string(), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -3412,8 +4131,14 @@ export const zDidChangeDocumentNotification = z.object({ sessionId: zSessionId, uri: z.string(), version: z.number(), - contentChanges: z.array(zTextDocumentContentChangeEvent), - _meta: z.record(z.string(), z.unknown()).nullish(), + contentChanges: requiredDefaultOnError( + vecSkipError(zTextDocumentContentChangeEvent), + () => [], + ), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -3422,7 +4147,10 @@ export const zDidChangeDocumentNotification = z.object({ export const zDidCloseDocumentNotification = z.object({ sessionId: zSessionId, uri: z.string(), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -3431,7 +4159,10 @@ export const zDidCloseDocumentNotification = z.object({ export const zDidSaveDocumentNotification = z.object({ sessionId: zSessionId, uri: z.string(), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -3443,7 +4174,10 @@ export const zDidFocusDocumentNotification = z.object({ version: z.number(), position: zPosition, visibleRange: zRange, - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -3452,7 +4186,10 @@ export const zDidFocusDocumentNotification = z.object({ export const zAcceptNesNotification = z.object({ sessionId: zSessionId, id: z.string(), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -3472,7 +4209,10 @@ export const zRejectNesNotification = z.object({ sessionId: zSessionId, id: z.string(), reason: defaultOnError(zNesRejectReason.nullish(), () => undefined), - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); /** @@ -3497,17 +4237,14 @@ export const zClientNotification = z.object({ }); /** - * **UNSTABLE** - * - * This capability is not part of the spec yet, and may be removed or changed at any point. - * * Notification to cancel an ongoing request. * * See protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/cancellation) - * - * @experimental */ export const zCancelRequestNotification = z.object({ requestId: zRequestId, - _meta: z.record(z.string(), z.unknown()).nullish(), + _meta: defaultOnError( + z.record(z.string(), z.unknown()).nullish(), + () => undefined, + ), }); From 1c2bb3c858f1ce7b5de765b83446790fee400ee5 Mon Sep 17 00:00:00 2001 From: Ben Brandt Date: Wed, 1 Jul 2026 10:33:25 +0200 Subject: [PATCH 2/2] Fix prettier changes --- package-lock.json | 363 +++++++++++++++++++------------------- package.json | 12 +- src/acp.ts | 34 ++-- src/http-stream.ts | 3 +- src/schema-deserialize.ts | 5 +- src/schema/types.gen.ts | 50 ++---- src/server.ts | 3 +- src/ws-stream.ts | 3 +- 8 files changed, 222 insertions(+), 251 deletions(-) diff --git a/package-lock.json b/package-lock.json index fae6793..5577a2e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,16 +11,16 @@ "devDependencies": { "@eslint/js": "^10.0.1", "@hey-api/openapi-ts": "^0.99.0", - "@types/node": "^26.0.0", + "@types/node": "^26.0.1", "@types/ws": "^8.5.13", - "@typescript-eslint/eslint-plugin": "^8.57.1", - "@typescript-eslint/parser": "^8.57.1", + "@typescript-eslint/eslint-plugin": "^8.62.1", + "@typescript-eslint/parser": "^8.62.1", "concurrently": "^10.0.0", - "eslint": "^10.0.3", + "eslint": "^10.6.0", "eslint-config-prettier": "^10.1.8", - "globals": "^17.4.0", + "globals": "^17.7.0", "http-server": "^14.1.1", - "prettier": "^3.8.1", + "prettier": "^3.9.4", "tsx": "^4.21.0", "typedoc": "^0.28.16", "typedoc-github-theme": "^0.4.0", @@ -34,21 +34,21 @@ } }, "node_modules/@emnapi/core": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.10.0.tgz", - "integrity": "sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.11.1.tgz", + "integrity": "sha512-RSvbQmHzdKzNsLYa/wHrbc3KN4sYLKAdPZxqiM2HATqv/SBk2/ENSHpvXGaLOMcsAyz0poEGqkmmKYG3OWiJEQ==", "dev": true, "license": "MIT", "optional": true, "dependencies": { - "@emnapi/wasi-threads": "1.2.1", + "@emnapi/wasi-threads": "1.2.2", "tslib": "^2.4.0" } }, "node_modules/@emnapi/runtime": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.10.0.tgz", - "integrity": "sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.1.tgz", + "integrity": "sha512-vgj7R3y3Wgx24IQaGPA/R6YFXLHVMOZ0uVEyIQPaWs+rd1AzfEMXlAC22FYwO1XkKR6NPsq7mUandH8oIRdZFw==", "dev": true, "license": "MIT", "optional": true, @@ -57,9 +57,9 @@ } }, "node_modules/@emnapi/wasi-threads": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz", - "integrity": "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.2.tgz", + "integrity": "sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==", "dev": true, "license": "MIT", "optional": true, @@ -840,14 +840,14 @@ } }, "node_modules/@napi-rs/wasm-runtime": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.5.tgz", - "integrity": "sha512-AWPoBRJ9tsnVhor4sjO7rkni+7p+2IAEFj6cx06UgP10jkQHqay/36uRV/bFkgrh18D9vb4cr8Q0Pthskgzy+Q==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.6.tgz", + "integrity": "sha512-ZLv/JdUfkvOy9eCnnBaGfiO+XimbjebAeO+MRQqD/B+FR1tnRN0tpKSJHRbE8sFfS6aqsXZ67TQjfwfsxULVbg==", "dev": true, "license": "MIT", "optional": true, "dependencies": { - "@tybys/wasm-util": "^0.10.2" + "@tybys/wasm-util": "^0.10.3" }, "funding": { "type": "github", @@ -859,9 +859,9 @@ } }, "node_modules/@oxc-project/types": { - "version": "0.133.0", - "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.133.0.tgz", - "integrity": "sha512-KzkdCd6Uxqnf6l3HOw1xfatAlUURA0g14cvBYFyJ5SaNOQbOUvBr9PKArcPcrNIeRsBdgcUzOGrhKveVpvOIGA==", + "version": "0.137.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.137.0.tgz", + "integrity": "sha512-WT+Gb24i8hmvo85AIv2oEYouEXkRlKAlT9WaCa3TfLgNCN+GhrJOGZuIlMouAh38Qe4QOx26eUOVsq70qXrywA==", "dev": true, "license": "MIT", "funding": { @@ -869,9 +869,9 @@ } }, "node_modules/@rolldown/binding-android-arm64": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.0.3.tgz", - "integrity": "sha512-454rs7jHngixp/NMxd5srYD57OnzSlZ/eFTETjORQHLwJG1lRtmNOJcBerZlfu4GjKqeq8aCCIQrMdHyhI51Hw==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.1.3.tgz", + "integrity": "sha512-DT6Z3PhvioeHMvxo+xHc3KtqggrI7CCTXCmC2h/5zUlp5jVitv7XEy+9q5/7v8IolhlioawpMo8Kg0EEBy7J0g==", "cpu": [ "arm64" ], @@ -886,9 +886,9 @@ } }, "node_modules/@rolldown/binding-darwin-arm64": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.0.3.tgz", - "integrity": "sha512-PcAhP+ynjURNyy8SKGl5DQP94aGuB/7JrXJb/t7P+hanXvQVMWzUvRRhBAcg/lNRadBhoUPqSoP4xw5tR/KBEA==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.1.3.tgz", + "integrity": "sha512-0NwgwsjM7LrsuVnXMK3koTpagBNOhloc/BNjKqZjv4V5zI5r13qx69uVhRx+o5Z0yy4Hzq+lpy7TAgUG/ocvrw==", "cpu": [ "arm64" ], @@ -903,9 +903,9 @@ } }, "node_modules/@rolldown/binding-darwin-x64": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.0.3.tgz", - "integrity": "sha512-9YpfeUvSE2RS7wysJ81uOZkXJz7f7Q55H2Gvp3VEw/EsahqDtrphrZ0EwDLK5vvKOzaCrBsjF8JmnMLcUt78Gg==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.1.3.tgz", + "integrity": "sha512-YtiBp4disu6V560loT6PjMdiRaWmVvDNrUunAalbiFx2ggeJwxdAsgZMcoGP17uyAsTwAj5V1niksxlHnVQ1Sw==", "cpu": [ "x64" ], @@ -920,9 +920,9 @@ } }, "node_modules/@rolldown/binding-freebsd-x64": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.0.3.tgz", - "integrity": "sha512-yB1IlAsSNHncV6SCTL27/MVGR5htvQsoGxIv5KMGXALp+Ll1wYsn+x98M9MW7qa+NdSbvrrY7ANI4wLJ0n1e6g==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.1.3.tgz", + "integrity": "sha512-yD3EkEdXk2LypPxnf/kSZHirarsI8gcPzc62SukhR9VJTyvV+F9Q/GxWNuCojc7sXyuVC4DxRGhdDK4X8VSsbw==", "cpu": [ "x64" ], @@ -937,9 +937,9 @@ } }, "node_modules/@rolldown/binding-linux-arm-gnueabihf": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.0.3.tgz", - "integrity": "sha512-Yi30IVAAfLUCy2MseFjbB1jAMDl1VMCAas5StnYp8da9+CKvMd2H2cbEjWcw5NPaPqzvYkVIaF1nNUG+b7u/sw==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.1.3.tgz", + "integrity": "sha512-c+8vieQbsD7HNAHKIA34w0GJ9FedFFuJGD+7E6vz7Q3uqAIugL5p45fhlsj4UaAsHpcmlqugBWMhA0/j7o0sIg==", "cpu": [ "arm" ], @@ -954,9 +954,9 @@ } }, "node_modules/@rolldown/binding-linux-arm64-gnu": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.3.tgz", - "integrity": "sha512-jsO7R8To+AdlYgUmN5sHSCZbfhtMBkO0WUx8iORQnPcMMdgr7qM2DQmMwgabs3GhNztdmoKkMKQFHD6DTMCIQw==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.1.3.tgz", + "integrity": "sha512-50jD0uUwLvur7Zz9LHz17kaAdTPjn5wN93hEgjvmYFRZwiR7ZJYovTd5ipyWJDAnXKvZ+wgc+/Ika6dwSF5OcA==", "cpu": [ "arm64" ], @@ -974,9 +974,9 @@ } }, "node_modules/@rolldown/binding-linux-arm64-musl": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.3.tgz", - "integrity": "sha512-VWkUHwWriDciit80wleYwKILoR/KMvxh/IdwS/paX+ZgpuRpCrKLUdadJbc0NpBEiyhpYawsJ73j9aCvOH+f7Q==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.1.3.tgz", + "integrity": "sha512-BO9+oPL8K9poZJBfYPsXNtYjPE5uM3qeehT3aFcW4LITOl+iSqhp0abzjR2nWBUNjIZeKXjAEWBZ64WjNoHd6w==", "cpu": [ "arm64" ], @@ -994,9 +994,9 @@ } }, "node_modules/@rolldown/binding-linux-ppc64-gnu": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.0.3.tgz", - "integrity": "sha512-5f1laC0SlIR0yDbFCd8acUhvJIag6N3zC5P7oUPN6wX0aOma+uKJ0wBDH5aq7I1PVI2ttTlhJwzwRIBnLiSGEg==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.1.3.tgz", + "integrity": "sha512-f3VpLB1vQ0Eo6ecr/6cekLnvYMFF4YBFoVGkfkvPLq1bAkbAwHYQPZKoAmG6OJyTcxxoC+AvezGx/S1obNC0Mw==", "cpu": [ "ppc64" ], @@ -1014,9 +1014,9 @@ } }, "node_modules/@rolldown/binding-linux-s390x-gnu": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.0.3.tgz", - "integrity": "sha512-Iq4ko0r4XsgbrF/LunNgHtAGLRRVE2kXonAXQ/MV0mC6jQpMOhW1SvtZja2EhC/kd05++bP78dsqBeIQyYJ6Yg==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.1.3.tgz", + "integrity": "sha512-AmurZ26Pqx/RI9N1gzEOCklkKXl927yjfXWUUS0O7Puh8ARM/Ob8qfrD3qnWksScdw6cSrW5PSHE9DyLu7+PtA==", "cpu": [ "s390x" ], @@ -1034,9 +1034,9 @@ } }, "node_modules/@rolldown/binding-linux-x64-gnu": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.3.tgz", - "integrity": "sha512-B8m6tD5+/N5FeNQFbKlLA/2yVq9ycQP1SeedyEYYKWBNR3ZQbkvIUcNnDNM03lO1l5F2roiiFJGgvoLLyZXtSg==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.1.3.tgz", + "integrity": "sha512-JJpqs8bRGITDOdbkNKnlojzBabbOHrqjSvDr0IVsZObE1lBcPjxItUEY9eWIDbxaJ3cGrXPWGfGkIxFijg/URg==", "cpu": [ "x64" ], @@ -1054,9 +1054,9 @@ } }, "node_modules/@rolldown/binding-linux-x64-musl": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.3.tgz", - "integrity": "sha512-pSdpdUJHkuCxun9LE7jvgUB9qsRgaiyNNCX7m/AvHTcq67AiT/Yhoxvw5zPfhrM8k/BfP8ce/hMOpthKDpEUow==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.1.3.tgz", + "integrity": "sha512-rSJcdjPxzA/by/6/rYs+v+bXU7UjvnbUWz8MJb6kh6+knqB1dCrtHg0uu7C/4haqJvqdkYHQ5IGn+tCH9GLW/g==", "cpu": [ "x64" ], @@ -1074,9 +1074,9 @@ } }, "node_modules/@rolldown/binding-openharmony-arm64": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.0.3.tgz", - "integrity": "sha512-OXXS3RKJgX2uLwM+gYyuH5omcH8fL1LJs96pZGgtetVCahON57+d4SJHzTgZiOjxgGkSnpXpOsWuPDGAKAigEg==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.1.3.tgz", + "integrity": "sha512-hQ3/PYkDJICgevvyNcVrihVeqq7k1Pp3VZ9lY+dauAYUJKO+auqApvANhvR1An9BhmqYKvW2Mu1F9u4DXSMLxQ==", "cpu": [ "arm64" ], @@ -1091,9 +1091,9 @@ } }, "node_modules/@rolldown/binding-wasm32-wasi": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.0.3.tgz", - "integrity": "sha512-JTtb8BWFynicNSoPrehsCzBtOKjZ6jhMiPFEmOiuXg1Fl8dn2KHQob+GuPSGR0dryQa1PQJbzjF3dqO/whhjLg==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.1.3.tgz", + "integrity": "sha512-Elcv/BtML9lXrV6JuKITc/grN2kYV9gjsQpW8Jfw4ioK0TOkjBjye0nnyqQNy9STNaI20lXNaQBRrD5gSgR0Yg==", "cpu": [ "wasm32" ], @@ -1101,18 +1101,18 @@ "license": "MIT", "optional": true, "dependencies": { - "@emnapi/core": "1.10.0", - "@emnapi/runtime": "1.10.0", - "@napi-rs/wasm-runtime": "^1.1.4" + "@emnapi/core": "1.11.1", + "@emnapi/runtime": "1.11.1", + "@napi-rs/wasm-runtime": "^1.1.6" }, "engines": { "node": "^20.19.0 || >=22.12.0" } }, "node_modules/@rolldown/binding-win32-arm64-msvc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.3.tgz", - "integrity": "sha512-gEdFFEN70A/jxb2svrWsN3aDL7OUtmvlOy+6fa2jxG8K0wQ1ZbdeLGnidov6Yu5/733dI5ySfzFlQ/cb0bSz1g==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.1.3.tgz", + "integrity": "sha512-2DrEfhluH9yhiaFApmsjsjwrSYbNcY1oFTzYSP1a535jDbV98zCFanA/96TBUd0iDFcxGmw9QRExwGCXz3U+/g==", "cpu": [ "arm64" ], @@ -1127,9 +1127,9 @@ } }, "node_modules/@rolldown/binding-win32-x64-msvc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.3.tgz", - "integrity": "sha512-eXB7CHuaQdqmJcc3koCNtNPmT/bj2gc999kUFgBxG8Ac0NdgXc4rkCHhqrgrhN3zddvvvrgzj1e90SuSfmyIXA==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.1.3.tgz", + "integrity": "sha512-OL4OMk7UPXOeVGGd3qo5zJyPIljf4AFgk5QAkPPS+OoLuOOozhuaQGC18MxVTnw/06q93gShAJzlwnSCY9YtqA==", "cpu": [ "x64" ], @@ -1207,9 +1207,9 @@ "license": "MIT" }, "node_modules/@tybys/wasm-util": { - "version": "0.10.2", - "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.2.tgz", - "integrity": "sha512-RoBvJ2X0wuKlWFIjrwffGw1IqZHKQqzIchKaadZZfnNpsAYp2mM0h36JtPCjNDAHGgYez/15uMBpfGwchhiMgg==", + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.3.tgz", + "integrity": "sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==", "dev": true, "license": "MIT", "optional": true, @@ -1267,9 +1267,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "26.0.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-26.0.0.tgz", - "integrity": "sha512-vf2YFi1iY9lHGwNJMs01biZFbKJkrZR1T6/MlzjhJLPdntOHLhTrDSnSVcdtvjihi4VQNlrFRIxLsDBlQpAipA==", + "version": "26.0.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-26.0.1.tgz", + "integrity": "sha512-fc3KiUoBt6kie0N9bIW3E47vZsuaMf0PM2AaUpLCLT0s/LvX1nxAim6Fc049cNxODPpGm6qRAuUOB86SkRuPQw==", "dev": true, "license": "MIT", "dependencies": { @@ -1294,17 +1294,17 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.61.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.61.1.tgz", - "integrity": "sha512-ZPlVl3PB3et/59Ne0fv/sci6ZXz4T4Hp4nTJ56i/Y0gR89ARb+KphojTq6j+56E5PIezmOIOOWyY+aWQFd+IkQ==", + "version": "8.62.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.62.1.tgz", + "integrity": "sha512-4EQM77WgVNxj7OkL/5b/D/xZsw00G577+UriYTC7JF5opcF3T2AuoeY7ueLaZgSVjSgCS6yOAJB5bRGLPSJUzA==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.12.2", - "@typescript-eslint/scope-manager": "8.61.1", - "@typescript-eslint/type-utils": "8.61.1", - "@typescript-eslint/utils": "8.61.1", - "@typescript-eslint/visitor-keys": "8.61.1", + "@typescript-eslint/scope-manager": "8.62.1", + "@typescript-eslint/type-utils": "8.62.1", + "@typescript-eslint/utils": "8.62.1", + "@typescript-eslint/visitor-keys": "8.62.1", "ignore": "^7.0.5", "natural-compare": "^1.4.0", "ts-api-utils": "^2.5.0" @@ -1317,22 +1317,22 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.61.1", + "@typescript-eslint/parser": "^8.62.1", "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "node_modules/@typescript-eslint/parser": { - "version": "8.61.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.61.1.tgz", - "integrity": "sha512-PJ5vePq5/ognBbrIcoC5+SHO5dfpeLPzP9FpLkzWrguoYQEeeSjlJpVwOpo1JRSTEi7dRcwNy4h4dzV70PqHcg==", + "version": "8.62.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.62.1.tgz", + "integrity": "sha512-sPhE4iHuJDSvoAiec+Ro8JyXw8f0ql13HFR82P99nCm9GwTEKG0KYLvDe6REk8BCXuit6vJAv/Yxg5ABaNS2rA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.61.1", - "@typescript-eslint/types": "8.61.1", - "@typescript-eslint/typescript-estree": "8.61.1", - "@typescript-eslint/visitor-keys": "8.61.1", + "@typescript-eslint/scope-manager": "8.62.1", + "@typescript-eslint/types": "8.62.1", + "@typescript-eslint/typescript-estree": "8.62.1", + "@typescript-eslint/visitor-keys": "8.62.1", "debug": "^4.4.3" }, "engines": { @@ -1348,14 +1348,14 @@ } }, "node_modules/@typescript-eslint/project-service": { - "version": "8.61.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.61.1.tgz", - "integrity": "sha512-PrC4JYGmR241lYnfhmKGTXkFqv8+ymbTFgSAY0fVXpY82/QkMw5TZPl+vGzuDDU2QYJk9fIDOBTntF+yDv9LEA==", + "version": "8.62.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.62.1.tgz", + "integrity": "sha512-yQ3RgY5RkSBpsNS1Bx/JQEcA24FOSdfGktoyprAr5u18390UQdtVcfnEv4nIrIshNnavlVyZBKxQwT1fIAE6cg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.61.1", - "@typescript-eslint/types": "^8.61.1", + "@typescript-eslint/tsconfig-utils": "^8.62.1", + "@typescript-eslint/types": "^8.62.1", "debug": "^4.4.3" }, "engines": { @@ -1370,14 +1370,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.61.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.61.1.tgz", - "integrity": "sha512-L2bdIeoQS8FlKAvONAr20w6OcLXeB+qiDKbAooS9A0Ben+iSIkBef0FxqwKWYqt5sa0i4KJtxVyVmhMylKzF5w==", + "version": "8.62.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.62.1.tgz", + "integrity": "sha512-r4d249KbQ1SFdpeStvob8Ih6aPPIzfqllPVOtvhve6ZcpuVcYo5/7zUWckKpHE7StASX4kTKZTLf0WQm/wPkcg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.61.1", - "@typescript-eslint/visitor-keys": "8.61.1" + "@typescript-eslint/types": "8.62.1", + "@typescript-eslint/visitor-keys": "8.62.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1388,9 +1388,9 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.61.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.61.1.tgz", - "integrity": "sha512-UN/H4di+OO7EWx2ovME+8t31YO+KVnK0RRKEHR3kOt21/Ay8BOq3M1OMvWs5vNiqcFCYGYoxK3MXPZzmMUE+yg==", + "version": "8.62.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.62.1.tgz", + "integrity": "sha512-xadytJqX9vJVQ2fdQjkcIVigwaOJNWkpjdLt6cEQ+xPnrI1fkp+/jZE/I97k9KUjqtpd25i0HeyZf3T6dutv2g==", "dev": true, "license": "MIT", "engines": { @@ -1405,15 +1405,15 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.61.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.61.1.tgz", - "integrity": "sha512-GYRicKmVK0C4fsKgaACaknOUAq9Oa2kwsjnpFhFcS/5p4Ht5IP9OVLbgIgcK4SRk92nVHFluurg1lumD9dBcLw==", + "version": "8.62.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.62.1.tgz", + "integrity": "sha512-aXM5xlqXiTxPibXB93cLAURfT3rlizf7uMXISCXy66Isr/9hISJx3yDsKl0L7lKa51b8JpFuNKby0/O0pEm9jg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.61.1", - "@typescript-eslint/typescript-estree": "8.61.1", - "@typescript-eslint/utils": "8.61.1", + "@typescript-eslint/types": "8.62.1", + "@typescript-eslint/typescript-estree": "8.62.1", + "@typescript-eslint/utils": "8.62.1", "debug": "^4.4.3", "ts-api-utils": "^2.5.0" }, @@ -1430,9 +1430,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.61.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.61.1.tgz", - "integrity": "sha512-G+CRlPqLv7Bz1IZVs03x5K59F1veqL0EJUROAdGhKsEq8qOiRiZbI+HUojPq5l0fEGOKModD9br6lObhB8zkoA==", + "version": "8.62.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.62.1.tgz", + "integrity": "sha512-ooCzJFaf+Hg+uG6fA3NRFGuFjlfNlDhBthbv4ZPU/0elCAFUfnyXUvf/WOpHz/jYwSmvU2GkR2LtyUfy1AxZ1Q==", "dev": true, "license": "MIT", "engines": { @@ -1444,16 +1444,16 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.61.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.61.1.tgz", - "integrity": "sha512-u+oQD3BqYWPc8YV9Zab4vaJElJuwOLPRc10Jm1o/qS+6Qwen14HCWwx0Seo4LnSn2wxea2Ik8DxPt2/FHmuhrg==", + "version": "8.62.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.62.1.tgz", + "integrity": "sha512-xMcW9oP9u7fAMXYs9A65CVmtLQe2r//oXINHfi8HV+oiqhih17sbLdhXr4540YWlgpDKQdY854OL5ZrdCiQsAA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/project-service": "8.61.1", - "@typescript-eslint/tsconfig-utils": "8.61.1", - "@typescript-eslint/types": "8.61.1", - "@typescript-eslint/visitor-keys": "8.61.1", + "@typescript-eslint/project-service": "8.62.1", + "@typescript-eslint/tsconfig-utils": "8.62.1", + "@typescript-eslint/types": "8.62.1", + "@typescript-eslint/visitor-keys": "8.62.1", "debug": "^4.4.3", "minimatch": "^10.2.2", "semver": "^7.7.3", @@ -1472,16 +1472,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.61.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.61.1.tgz", - "integrity": "sha512-1+P/3Dj6jvtybE1q0HQ6yBt/gq+oKJyLdEv4HdnqasaEXRSYCAsD59mXEVQnM/ULNdQxbX77tdG4jPRjIS6knA==", + "version": "8.62.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.62.1.tgz", + "integrity": "sha512-sHtbPfuKNZCG+ih8SyjjucqRntSVmp8XgL5u6o9mAhiSn8ds5o/M/XdM0abweme2Tln3szOstOrZ9OXitvPh0g==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.9.1", - "@typescript-eslint/scope-manager": "8.61.1", - "@typescript-eslint/types": "8.61.1", - "@typescript-eslint/typescript-estree": "8.61.1" + "@typescript-eslint/scope-manager": "8.62.1", + "@typescript-eslint/types": "8.62.1", + "@typescript-eslint/typescript-estree": "8.62.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1496,13 +1496,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.61.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.61.1.tgz", - "integrity": "sha512-6fJ9MHWtK14C1DSkiMlHUSOmrVebL7150xZJBlJiL62jjhIA4JmOq6flwBgDxIdBKKdoiZRel+dfPD5MLfny3w==", + "version": "8.62.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.62.1.tgz", + "integrity": "sha512-4g3BLxfdTMy8iZG0MaBkadnlRrCJ74cQiFbyEVMrkwIoqdyaXXQM22cotDvrl4x28wgIZ9rEJRoM+mmhSJpJ1g==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.61.1", + "@typescript-eslint/types": "8.62.1", "eslint-visitor-keys": "^5.0.0" }, "engines": { @@ -1763,9 +1763,9 @@ } }, "node_modules/brace-expansion": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.6.tgz", - "integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==", + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.7.tgz", + "integrity": "sha512-7oFy703dxfY3/NLxC1fh2SUCQ0H9rmAY+5EpDVfXjUTTs+HEwR2nYaqLv+GWcTsumwxPfiz6CzCNkwXwBUwqCA==", "dev": true, "license": "MIT", "dependencies": { @@ -2170,9 +2170,9 @@ } }, "node_modules/es-module-lexer": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.1.0.tgz", - "integrity": "sha512-n27zTYMjYu1aj4MjCWzSP7G9r75utsaoc8m61weK+W8JMBGGQybd43GstCXZ3WNmSFtGT9wi59qQTW6mhTR5LQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.2.0.tgz", + "integrity": "sha512-3lGxdTXCLfe1MYfTz1y2ksAAUM4NAOP6rPEjxGJVKO7TZ5+tvHCaQWGpC4Y3IXvW3ece0Cz1cIP4FWBxOnGCTQ==", "dev": true, "license": "MIT" }, @@ -2255,9 +2255,9 @@ } }, "node_modules/eslint": { - "version": "10.5.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.5.0.tgz", - "integrity": "sha512-1y+7C+vi12bUK1IpZeaV3gsH9fHLBmPvYmPx42pvT/E9yG0IC8g3PUZZgp0+JLJl7ZDK0flc2gc+Aw9dpCvIsQ==", + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.6.0.tgz", + "integrity": "sha512-6lVbcqSodALYo+4ELD0heG6lFiFxnLMuLkiMi2qV8LMp54N8tE8FT1GMH+ev4Ti00nFjNze2+Su6DsV5OQW3Dg==", "dev": true, "license": "MIT", "workspaces": [ @@ -2479,9 +2479,9 @@ "license": "MIT" }, "node_modules/expect-type": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.3.0.tgz", - "integrity": "sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.4.0.tgz", + "integrity": "sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==", "dev": true, "license": "Apache-2.0", "engines": { @@ -2730,9 +2730,9 @@ } }, "node_modules/globals": { - "version": "17.6.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-17.6.0.tgz", - "integrity": "sha512-sepffkT8stwnIYbsMBpoCHJuJM5l98FUF2AnE07hfvE0m/qp3R586hw4jF4uadbhvg1ooIdzuu7CsfD2jzCaNA==", + "version": "17.7.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-17.7.0.tgz", + "integrity": "sha512-Czmyns5dUsq4seFBR/Kdydhmo8y9kC79hiSkPn0YcGtNnYWnrgt0vjrSjx9tspoDGWm2CMarffRuLjM4xUz8xg==", "dev": true, "license": "MIT", "engines": { @@ -3747,9 +3747,9 @@ } }, "node_modules/postcss": { - "version": "8.5.15", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.15.tgz", - "integrity": "sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A==", + "version": "8.5.16", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.16.tgz", + "integrity": "sha512-vuwillviilfKZsg0VGj5R/YwwcHx4SLsIOI/7K6mQkWx+l5cUHTjj5g0AasTBcyXsbfTgrwsUNmVUb5xVwyPwg==", "dev": true, "funding": [ { @@ -3799,9 +3799,9 @@ } }, "node_modules/prettier": { - "version": "3.8.4", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.8.4.tgz", - "integrity": "sha512-N2MylSdi48+5N/6S5j+maeHbUSIzzZ5uOcX5Hm4QpV8Dkb1HFjfAKTKX6yNPJQD9AhcT3ifHNB66tWTTJDi11Q==", + "version": "3.9.4", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.4.tgz", + "integrity": "sha512-yWG/o/4oJfo036EKAfK6ACAoDOfHeRHx4tuxkfBZiauURiaSmYwlpOr5LQqKtIkRD2z1PLteme2WoxEnj4tHTg==", "dev": true, "license": "MIT", "bin": { @@ -3835,13 +3835,14 @@ } }, "node_modules/qs": { - "version": "6.15.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.2.tgz", - "integrity": "sha512-Rzq0KEyX/w/tEybncDgdkZrJgVUsUMk3xjh3t5bv3S1HTAtg+uOYt72+ZfwiQwKdysThkTBdL/rTi6HDmX9Ddw==", + "version": "6.15.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.3.tgz", + "integrity": "sha512-O9gl3zCl5h5blw1KGUzQKhA5oUXSl8rwUIM5o0S3nCXMliSvy5Dzx7/DJcI+SwgICv+IneSZwhBh1oSyEHA71A==", "dev": true, "license": "BSD-3-Clause", "dependencies": { - "side-channel": "^1.1.0" + "es-define-property": "^1.0.1", + "side-channel": "^1.1.1" }, "engines": { "node": ">=0.6" @@ -3893,13 +3894,13 @@ } }, "node_modules/rolldown": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.3.tgz", - "integrity": "sha512-i00lAJ2ks1BYr7rjNjKC7BcqAS7nVfiT3QX1SI5aY+AFHblCmaUf9OE9dbdzDvW6dJxbi2ZCZiy9v3CcwOiX3g==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.1.3.tgz", + "integrity": "sha512-1F1eEtUBtFvcGm1HQ9TiUIUHPQG7mSAODrhIzjxoUEFuo8OcbrGLiVLkevNgj84TE4lnHvnumwFjhJO5Eu135g==", "dev": true, "license": "MIT", "dependencies": { - "@oxc-project/types": "=0.133.0", + "@oxc-project/types": "=0.137.0", "@rolldown/pluginutils": "^1.0.0" }, "bin": { @@ -3909,21 +3910,21 @@ "node": "^20.19.0 || >=22.12.0" }, "optionalDependencies": { - "@rolldown/binding-android-arm64": "1.0.3", - "@rolldown/binding-darwin-arm64": "1.0.3", - "@rolldown/binding-darwin-x64": "1.0.3", - "@rolldown/binding-freebsd-x64": "1.0.3", - "@rolldown/binding-linux-arm-gnueabihf": "1.0.3", - "@rolldown/binding-linux-arm64-gnu": "1.0.3", - "@rolldown/binding-linux-arm64-musl": "1.0.3", - "@rolldown/binding-linux-ppc64-gnu": "1.0.3", - "@rolldown/binding-linux-s390x-gnu": "1.0.3", - "@rolldown/binding-linux-x64-gnu": "1.0.3", - "@rolldown/binding-linux-x64-musl": "1.0.3", - "@rolldown/binding-openharmony-arm64": "1.0.3", - "@rolldown/binding-wasm32-wasi": "1.0.3", - "@rolldown/binding-win32-arm64-msvc": "1.0.3", - "@rolldown/binding-win32-x64-msvc": "1.0.3" + "@rolldown/binding-android-arm64": "1.1.3", + "@rolldown/binding-darwin-arm64": "1.1.3", + "@rolldown/binding-darwin-x64": "1.1.3", + "@rolldown/binding-freebsd-x64": "1.1.3", + "@rolldown/binding-linux-arm-gnueabihf": "1.1.3", + "@rolldown/binding-linux-arm64-gnu": "1.1.3", + "@rolldown/binding-linux-arm64-musl": "1.1.3", + "@rolldown/binding-linux-ppc64-gnu": "1.1.3", + "@rolldown/binding-linux-s390x-gnu": "1.1.3", + "@rolldown/binding-linux-x64-gnu": "1.1.3", + "@rolldown/binding-linux-x64-musl": "1.1.3", + "@rolldown/binding-openharmony-arm64": "1.1.3", + "@rolldown/binding-wasm32-wasi": "1.1.3", + "@rolldown/binding-win32-arm64-msvc": "1.1.3", + "@rolldown/binding-win32-x64-msvc": "1.1.3" } }, "node_modules/run-applescript": { @@ -4374,16 +4375,16 @@ "license": "MIT" }, "node_modules/vite": { - "version": "8.0.16", - "resolved": "https://registry.npmjs.org/vite/-/vite-8.0.16.tgz", - "integrity": "sha512-h9bXPmJichP5fLmVQo3PyaGSDE2n3aPuomeAlVRm0JLmt4rY6zmPKd59HYI4LNW8oTK7tlTsuC7l/m7awx9Jcw==", + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.1.2.tgz", + "integrity": "sha512-6YYPbRXTxx6bRXmOn7XdnQAy5DQNHhDgtjhDHI13oe4pY93kkcdGJWxpGwOm++/Wh0QpQhDrpIoVMrmrsI5AGQ==", "dev": true, "license": "MIT", "dependencies": { "lightningcss": "^1.32.0", "picomatch": "^4.0.4", - "postcss": "^8.5.15", - "rolldown": "1.0.3", + "postcss": "^8.5.16", + "rolldown": "~1.1.3", "tinyglobby": "^0.2.17" }, "bin": { @@ -4400,7 +4401,7 @@ }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", - "@vitejs/devtools": "^0.1.18", + "@vitejs/devtools": "^0.3.0", "esbuild": "^0.27.0 || ^0.28.0", "jiti": ">=1.21.0", "less": "^4.0.0", diff --git a/package.json b/package.json index e7f478c..92f25c7 100644 --- a/package.json +++ b/package.json @@ -77,16 +77,16 @@ "devDependencies": { "@eslint/js": "^10.0.1", "@hey-api/openapi-ts": "^0.99.0", - "@types/node": "^26.0.0", + "@types/node": "^26.0.1", "@types/ws": "^8.5.13", - "@typescript-eslint/eslint-plugin": "^8.57.1", - "@typescript-eslint/parser": "^8.57.1", + "@typescript-eslint/eslint-plugin": "^8.62.1", + "@typescript-eslint/parser": "^8.62.1", "concurrently": "^10.0.0", - "eslint": "^10.0.3", + "eslint": "^10.6.0", "eslint-config-prettier": "^10.1.8", - "globals": "^17.4.0", + "globals": "^17.7.0", "http-server": "^14.1.1", - "prettier": "^3.8.1", + "prettier": "^3.9.4", "tsx": "^4.21.0", "typedoc": "^0.28.16", "typedoc-github-theme": "^0.4.0", diff --git a/src/acp.ts b/src/acp.ts index f69685d..3b36444 100644 --- a/src/acp.ts +++ b/src/acp.ts @@ -267,8 +267,7 @@ export class AgentContext extends AcpContext { options?: SendRequestOptions, ): Promise { const spec = clientRequestSpecsByMethod[method] as - | AcpRequestSpec - | undefined; + AcpRequestSpec | undefined; return this.sendRequest(method, params, spec?.mapResponse, options); } @@ -392,8 +391,7 @@ export class ClientContext extends AcpContext { options?: SendRequestOptions, ): Promise { const spec = agentRequestSpecsByMethod[method] as - | AcpRequestSpec - | undefined; + AcpRequestSpec | undefined; return this.sendRequest(method, params, spec?.mapResponse, options); } @@ -1567,7 +1565,9 @@ export type AgentRequestResponsesByMethod = { * Agent notification params keyed by ACP protocol method name. */ export type AgentNotificationParamsByMethod = { - [Method in AgentNotificationMethod]: AgentNotificationHandlersByMethod[Method] extends ( + [ + Method in AgentNotificationMethod + ]: AgentNotificationHandlersByMethod[Method] extends ( context: infer Context, ) => MaybePromise ? Context extends { params: infer Params } @@ -1580,7 +1580,9 @@ export type AgentNotificationParamsByMethod = { * Client request params keyed by ACP protocol method name. */ export type ClientRequestParamsByMethod = { - [Method in ClientRequestMethod]: ClientRequestHandlersByMethod[Method] extends ( + [ + Method in ClientRequestMethod + ]: ClientRequestHandlersByMethod[Method] extends ( context: infer Context, ) => MaybePromise ? Context extends { params: infer Params } @@ -1593,7 +1595,9 @@ export type ClientRequestParamsByMethod = { * Client request responses keyed by ACP protocol method name. */ export type ClientRequestResponsesByMethod = { - [Method in ClientRequestMethod]: ClientRequestHandlersByMethod[Method] extends ( + [ + Method in ClientRequestMethod + ]: ClientRequestHandlersByMethod[Method] extends ( context: infer _Context, ) => MaybePromise ? Exclude @@ -1604,7 +1608,9 @@ export type ClientRequestResponsesByMethod = { * Client notification params keyed by ACP protocol method name. */ export type ClientNotificationParamsByMethod = { - [Method in ClientNotificationMethod]: ClientNotificationHandlersByMethod[Method] extends ( + [ + Method in ClientNotificationMethod + ]: ClientNotificationHandlersByMethod[Method] extends ( context: infer Context, ) => MaybePromise ? Context extends { params: infer Params } @@ -1882,8 +1888,7 @@ export class AgentApp { onRequest( method: string, handlerOrParams: - | AgentRequestHandlersByMethod[AgentRequestMethod] - | ParamsParser, + AgentRequestHandlersByMethod[AgentRequestMethod] | ParamsParser, handler?: AgentRequestHandler, ): this { if (handler) { @@ -2132,8 +2137,7 @@ export class ClientApp { onRequest( method: string, handlerOrParams: - | ClientRequestHandlersByMethod[ClientRequestMethod] - | ParamsParser, + ClientRequestHandlersByMethod[ClientRequestMethod] | ParamsParser, handler?: ClientRequestHandler, ): this { if (handler) { @@ -2799,8 +2803,7 @@ export class AgentSideConnection { options?: SendRequestOptions, ): Promise { const spec = clientRequestSpecsByMethod[method] as - | AcpRequestSpec - | undefined; + AcpRequestSpec | undefined; return this.connection.sendRequest( method, params, @@ -3570,8 +3573,7 @@ export class ClientSideConnection implements Agent { options?: SendRequestOptions, ): Promise { const spec = agentRequestSpecsByMethod[method] as - | AcpRequestSpec - | undefined; + AcpRequestSpec | undefined; return this.connection.sendRequest( method, params, diff --git a/src/http-stream.ts b/src/http-stream.ts index 3ec0484..3a89da7 100644 --- a/src/http-stream.ts +++ b/src/http-stream.ts @@ -76,8 +76,7 @@ class HttpStreamTransport { private readonly pendingSessionRequests = new Map(); private readableController: - | ReadableStreamDefaultController - | undefined; + ReadableStreamDefaultController | undefined; private connectionId: string | undefined; private isClosed = false; private writeChain: Promise = Promise.resolve(); diff --git a/src/schema-deserialize.ts b/src/schema-deserialize.ts index 0e0eb6e..c75f9ef 100644 --- a/src/schema-deserialize.ts +++ b/src/schema-deserialize.ts @@ -31,8 +31,7 @@ export function vecSkipError( ) { return z .array(itemSchema.catch(skippedItem as never)) - .transform( - (items): Array> => - items.filter((item) => item !== skippedItem), + .transform((items): Array> => + items.filter((item) => item !== skippedItem), ); } diff --git a/src/schema/types.gen.ts b/src/schema/types.gen.ts index 80f593d..1c71d60 100644 --- a/src/schema/types.gen.ts +++ b/src/schema/types.gen.ts @@ -460,8 +460,7 @@ export type ResourceLink = { * Resource content that can be embedded in a message. */ export type EmbeddedResourceResource = - | TextResourceContents - | BlobResourceContents; + TextResourceContents | BlobResourceContents; /** * Text-based resource contents. @@ -692,10 +691,7 @@ export type PermissionOptionId = string; * Helps clients choose appropriate icons and UI treatment. */ export type PermissionOptionKind = - | "allow_once" - | "allow_always" - | "reject_once" - | "reject_always"; + "allow_once" | "allow_always" | "reject_once" | "reject_always"; /** * Request to create a new terminal and execute a command. @@ -1200,8 +1196,7 @@ export type BooleanPropertySchema = { * Items for a multi-select (array) property schema. */ export type MultiSelectItems = - | UntitledMultiSelectItems - | TitledMultiSelectItems; + UntitledMultiSelectItems | TitledMultiSelectItems; /** * Items definition for untitled multi-select enum properties. @@ -1302,8 +1297,7 @@ export type MultiSelectPropertySchema = { * @experimental */ export type ElicitationFormMode = ( - | ElicitationSessionScope - | ElicitationRequestScope + ElicitationSessionScope | ElicitationRequestScope ) & { /** * A JSON Schema describing the form fields to present to the user. @@ -1332,8 +1326,7 @@ export type ElicitationId = string; * @experimental */ export type ElicitationUrlMode = ( - | ElicitationSessionScope - | ElicitationRequestScope + ElicitationSessionScope | ElicitationRequestScope ) & { /** * The unique identifier for this elicitation. @@ -2595,12 +2588,7 @@ export type ProviderInfo = { * @experimental */ export type LlmProtocol = - | "anthropic" - | "openai" - | "azure" - | "vertex" - | "bedrock" - | string; + "anthropic" | "openai" | "azure" | "vertex" | "bedrock" | string; /** * **UNSTABLE** @@ -2841,11 +2829,7 @@ export type SessionConfigId = string; * Category names that do not begin with `_` are reserved for the ACP spec. */ export type SessionConfigOptionCategory = - | "mode" - | "model" - | "model_config" - | "thought_level" - | string; + "mode" | "model" | "model_config" | "thought_level" | string; /** * Unique identifier for a session configuration option value. @@ -2856,8 +2840,7 @@ export type SessionConfigValueId = string; * Possible values for a session configuration option. */ export type SessionConfigSelectOptions = - | Array - | Array; + Array | Array; /** * A possible value for a session configuration option. @@ -3209,11 +3192,7 @@ export type PromptResponse = { * See protocol docs: [Stop Reasons](https://agentclientprotocol.com/protocol/prompt-turn#stop-reasons) */ export type StopReason = - | "end_turn" - | "max_tokens" - | "max_turn_requests" - | "refusal" - | "cancelled"; + "end_turn" | "max_tokens" | "max_turn_requests" | "refusal" | "cancelled"; /** * **UNSTABLE** @@ -5808,10 +5787,7 @@ export type NesDiagnostic = { * Severity of a diagnostic. */ export type NesDiagnosticSeverity = - | "error" - | "warning" - | "information" - | "hint"; + "error" | "warning" | "information" | "hint"; /** * Request to close an NES session. @@ -6125,11 +6101,7 @@ export type CreateElicitationResponse = ( * Allowed wire representations for [`ElicitationContentValue`]. */ export type ElicitationContentValue = - | string - | number - | number - | boolean - | Array; + string | number | number | boolean | Array; /** * **UNSTABLE** diff --git a/src/server.ts b/src/server.ts index ff11fee..95443aa 100644 --- a/src/server.ts +++ b/src/server.ts @@ -296,8 +296,7 @@ export class AcpServer { } let connection: - | ReturnType - | undefined; + ReturnType | undefined; try { connection = this.registry.createConnection( diff --git a/src/ws-stream.ts b/src/ws-stream.ts index d082c53..220c844 100644 --- a/src/ws-stream.ts +++ b/src/ws-stream.ts @@ -72,8 +72,7 @@ class WebSocketStreamTransport { private readonly cookieStore: AcpCookieStore; private readonly ownsCookieStore: boolean; private readableController: - | ReadableStreamDefaultController - | undefined; + ReadableStreamDefaultController | undefined; private isClosed = false; private openPromise: Promise | undefined; private resolveOpen: (() => void) | undefined;