From bc6ab1c98e5084608916e1d67184233dbd35c110 Mon Sep 17 00:00:00 2001 From: Ben Brandt Date: Tue, 27 Oct 2026 22:37:10 +0100 Subject: [PATCH] docs(schema): mark DefaultOnNull lists with an x-deserialize hint --- agent-client-protocol-schema/src/v1/agent.rs | 14 ++++++ agent-client-protocol-schema/src/v1/client.rs | 2 + agent-client-protocol-schema/src/v2/agent.rs | 11 +++++ schema/v1/schema.json | 40 ++++++++++------ schema/v1/schema.unstable.json | 46 +++++++++++++------ schema/v2/schema.json | 27 +++++++---- schema/v2/schema.unstable.json | 33 ++++++++----- 7 files changed, 125 insertions(+), 48 deletions(-) diff --git a/agent-client-protocol-schema/src/v1/agent.rs b/agent-client-protocol-schema/src/v1/agent.rs index 31a4b24e0..2f9fc422d 100644 --- a/agent-client-protocol-schema/src/v1/agent.rs +++ b/agent-client-protocol-schema/src/v1/agent.rs @@ -719,11 +719,13 @@ pub struct AuthMethodTerminal { pub description: Option, /// Additional arguments to append to the configured agent invocation for terminal auth. #[serde_as(deserialize_as = "DefaultOnNull")] + #[cfg_attr(feature = "schemars", schemars(extend("x-deserialize-default-on-null" = true)))] #[serde(default, skip_serializing_if = "Vec::is_empty")] pub args: Vec, /// Additional environment variables to set on the configured agent invocation for terminal auth. /// These values override same-named variables in the base launch configuration. #[serde_as(deserialize_as = "DefaultOnNull")] + #[cfg_attr(feature = "schemars", schemars(extend("x-deserialize-default-on-null" = true)))] #[serde(default, skip_serializing_if = "HashMap::is_empty")] pub env: HashMap, /// The _meta property is reserved by ACP to allow clients and agents to attach additional @@ -807,10 +809,12 @@ pub struct NewSessionRequest { /// remains the base for relative paths. When omitted or empty, no /// additional roots are activated for the new session. #[serde_as(deserialize_as = "DefaultOnNull")] + #[cfg_attr(feature = "schemars", schemars(extend("x-deserialize-default-on-null" = true)))] #[serde(default, skip_serializing_if = "Vec::is_empty")] pub additional_directories: Vec, /// List of MCP (Model Context Protocol) servers the agent should connect to. #[serde_as(deserialize_as = "DefaultOnNull")] + #[cfg_attr(feature = "schemars", schemars(extend("x-deserialize-default-on-null" = true)))] pub mcp_servers: Vec, /// **UNSTABLE** /// @@ -987,6 +991,7 @@ impl NewSessionResponse { pub struct LoadSessionRequest { /// List of MCP servers to connect to for this session. #[serde_as(deserialize_as = "DefaultOnNull")] + #[cfg_attr(feature = "schemars", schemars(extend("x-deserialize-default-on-null" = true)))] pub mcp_servers: Vec, /// The working directory for this session. Must be an absolute path. pub cwd: PathBuf, @@ -997,6 +1002,7 @@ pub struct LoadSessionRequest { /// session. It may differ from any previously used or reported list as long as /// the request `cwd` matches the session's `cwd`. #[serde_as(deserialize_as = "DefaultOnNull")] + #[cfg_attr(feature = "schemars", schemars(extend("x-deserialize-default-on-null" = true)))] #[serde(default, skip_serializing_if = "Vec::is_empty")] pub additional_directories: Vec, /// The ID of the session to load. @@ -1184,10 +1190,12 @@ pub struct ForkSessionRequest { /// this is the complete resulting additional-root list for the forked /// session. #[serde_as(deserialize_as = "DefaultOnNull")] + #[cfg_attr(feature = "schemars", schemars(extend("x-deserialize-default-on-null" = true)))] #[serde(default, skip_serializing_if = "Vec::is_empty")] pub additional_directories: Vec, /// List of MCP servers to connect to for this session. #[serde_as(deserialize_as = "DefaultOnNull")] + #[cfg_attr(feature = "schemars", schemars(extend("x-deserialize-default-on-null" = true)))] #[serde(default, skip_serializing_if = "Vec::is_empty")] pub mcp_servers: Vec, /// **UNSTABLE** @@ -1381,10 +1389,12 @@ pub struct ResumeSessionRequest { /// session. It may differ from any previously used or reported list as long as /// the request `cwd` matches the session's `cwd`. #[serde_as(deserialize_as = "DefaultOnNull")] + #[cfg_attr(feature = "schemars", schemars(extend("x-deserialize-default-on-null" = true)))] #[serde(default, skip_serializing_if = "Vec::is_empty")] pub additional_directories: Vec, /// List of MCP servers to connect to for this session. #[serde_as(deserialize_as = "DefaultOnNull")] + #[cfg_attr(feature = "schemars", schemars(extend("x-deserialize-default-on-null" = true)))] #[serde(default, skip_serializing_if = "Vec::is_empty")] pub mcp_servers: Vec, /// **UNSTABLE** @@ -2790,6 +2800,7 @@ pub struct McpServerHttp { pub url: String, /// HTTP headers to set when making requests to the MCP server. #[serde_as(deserialize_as = "DefaultOnNull")] + #[cfg_attr(feature = "schemars", schemars(extend("x-deserialize-default-on-null" = true)))] pub headers: Vec, /// The _meta property is reserved by ACP to allow clients and agents to attach additional /// metadata to their interactions. Implementations MUST NOT make assumptions about values at @@ -2848,6 +2859,7 @@ pub struct McpServerSse { pub url: String, /// HTTP headers to set when making requests to the MCP server. #[serde_as(deserialize_as = "DefaultOnNull")] + #[cfg_attr(feature = "schemars", schemars(extend("x-deserialize-default-on-null" = true)))] pub headers: Vec, /// The _meta property is reserved by ACP to allow clients and agents to attach additional /// metadata to their interactions. Implementations MUST NOT make assumptions about values at @@ -2990,9 +3002,11 @@ pub struct McpServerStdio { pub command: PathBuf, /// Command-line arguments to pass to the MCP server. #[serde_as(deserialize_as = "DefaultOnNull")] + #[cfg_attr(feature = "schemars", schemars(extend("x-deserialize-default-on-null" = true)))] pub args: Vec, /// Environment variables to set when launching the MCP server. #[serde_as(deserialize_as = "DefaultOnNull")] + #[cfg_attr(feature = "schemars", schemars(extend("x-deserialize-default-on-null" = true)))] pub env: Vec, /// The _meta property is reserved by ACP to allow clients and agents to attach additional /// metadata to their interactions. Implementations MUST NOT make assumptions about values at diff --git a/agent-client-protocol-schema/src/v1/client.rs b/agent-client-protocol-schema/src/v1/client.rs index 364d38903..0c8d3c363 100644 --- a/agent-client-protocol-schema/src/v1/client.rs +++ b/agent-client-protocol-schema/src/v1/client.rs @@ -2702,10 +2702,12 @@ pub struct CreateTerminalRequest { pub command: String, /// Array of command arguments. #[serde_as(deserialize_as = "DefaultOnNull")] + #[cfg_attr(feature = "schemars", schemars(extend("x-deserialize-default-on-null" = true)))] #[serde(default, skip_serializing_if = "Vec::is_empty")] pub args: Vec, /// Environment variables for the command. #[serde_as(deserialize_as = "DefaultOnNull")] + #[cfg_attr(feature = "schemars", schemars(extend("x-deserialize-default-on-null" = true)))] #[serde(default, skip_serializing_if = "Vec::is_empty")] pub env: Vec, /// Working directory for the command. Must be an absolute path. diff --git a/agent-client-protocol-schema/src/v2/agent.rs b/agent-client-protocol-schema/src/v2/agent.rs index 281b13590..2d9690329 100644 --- a/agent-client-protocol-schema/src/v2/agent.rs +++ b/agent-client-protocol-schema/src/v2/agent.rs @@ -751,12 +751,14 @@ pub struct AuthMethodTerminal { pub description: Option, /// Additional arguments to append to the configured agent invocation for terminal auth. #[serde_as(deserialize_as = "DefaultOnNull")] + #[cfg_attr(feature = "schemars", schemars(extend("x-deserialize-default-on-null" = true)))] #[serde(default, skip_serializing_if = "Vec::is_empty")] pub args: Vec, /// Additional environment variables to set on the configured agent invocation for terminal auth. /// Names MUST be unique. These values override same-named variables in the /// base launch configuration. #[serde_as(deserialize_as = "DefaultOnNull")] + #[cfg_attr(feature = "schemars", schemars(extend("x-deserialize-default-on-null" = true)))] #[serde(default, skip_serializing_if = "Vec::is_empty")] pub env: Vec, /// The _meta property is reserved by ACP to allow clients and agents to attach additional @@ -841,10 +843,12 @@ pub struct NewSessionRequest { /// remains the base for relative paths. When omitted or empty, no /// additional roots are activated for the new session. #[serde_as(deserialize_as = "DefaultOnNull")] + #[cfg_attr(feature = "schemars", schemars(extend("x-deserialize-default-on-null" = true)))] #[serde(default, skip_serializing_if = "Vec::is_empty")] pub additional_directories: Vec, /// List of MCP (Model Context Protocol) servers the agent should connect to. #[serde_as(deserialize_as = "DefaultOnNull")] + #[cfg_attr(feature = "schemars", schemars(extend("x-deserialize-default-on-null" = true)))] #[serde(default, skip_serializing_if = "Vec::is_empty")] pub mcp_servers: Vec, /// **UNSTABLE** @@ -1041,10 +1045,12 @@ pub struct ForkSessionRequest { /// this is the complete resulting additional-root list for the forked /// session. #[serde_as(deserialize_as = "DefaultOnNull")] + #[cfg_attr(feature = "schemars", schemars(extend("x-deserialize-default-on-null" = true)))] #[serde(default, skip_serializing_if = "Vec::is_empty")] pub additional_directories: Vec, /// List of MCP servers to connect to for this session. #[serde_as(deserialize_as = "DefaultOnNull")] + #[cfg_attr(feature = "schemars", schemars(extend("x-deserialize-default-on-null" = true)))] #[serde(default, skip_serializing_if = "Vec::is_empty")] pub mcp_servers: Vec, /// **UNSTABLE** @@ -1237,10 +1243,12 @@ pub struct ResumeSessionRequest { /// session. It may differ from any previously used or reported list as long as /// the request `cwd` matches the session's `cwd`. #[serde_as(deserialize_as = "DefaultOnNull")] + #[cfg_attr(feature = "schemars", schemars(extend("x-deserialize-default-on-null" = true)))] #[serde(default, skip_serializing_if = "Vec::is_empty")] pub additional_directories: Vec, /// List of MCP servers to connect to for this session. #[serde_as(deserialize_as = "DefaultOnNull")] + #[cfg_attr(feature = "schemars", schemars(extend("x-deserialize-default-on-null" = true)))] #[serde(default, skip_serializing_if = "Vec::is_empty")] pub mcp_servers: Vec, /// Inclusive cursor describing where conversation replay should begin. @@ -2953,6 +2961,7 @@ pub struct McpServerHttp { pub url: String, /// HTTP headers to set when making requests to the MCP server. #[serde_as(deserialize_as = "DefaultOnNull")] + #[cfg_attr(feature = "schemars", schemars(extend("x-deserialize-default-on-null" = true)))] #[serde(default, skip_serializing_if = "Vec::is_empty")] pub headers: Vec, /// The _meta property is reserved by ACP to allow clients and agents to attach additional @@ -3096,10 +3105,12 @@ pub struct McpServerStdio { pub command: AbsolutePath, /// Command-line arguments to pass to the MCP server. #[serde_as(deserialize_as = "DefaultOnNull")] + #[cfg_attr(feature = "schemars", schemars(extend("x-deserialize-default-on-null" = true)))] #[serde(default, skip_serializing_if = "Vec::is_empty")] pub args: Vec, /// Environment variables to set when launching the MCP server. #[serde_as(deserialize_as = "DefaultOnNull")] + #[cfg_attr(feature = "schemars", schemars(extend("x-deserialize-default-on-null" = true)))] #[serde(default, skip_serializing_if = "Vec::is_empty")] pub env: Vec, /// The _meta property is reserved by ACP to allow clients and agents to attach additional diff --git a/schema/v1/schema.json b/schema/v1/schema.json index ad3c84cd6..2938072d1 100644 --- a/schema/v1/schema.json +++ b/schema/v1/schema.json @@ -1172,14 +1172,16 @@ "type": "array", "items": { "type": "string" - } + }, + "x-deserialize-default-on-null": true }, "env": { "description": "Environment variables for the command.", "type": "array", "items": { "$ref": "#/$defs/EnvVariable" - } + }, + "x-deserialize-default-on-null": true }, "cwd": { "description": "Working directory for the command. Must be an absolute path.", @@ -2751,11 +2753,13 @@ "type": "array", "items": { "type": "string" - } + }, + "x-deserialize-default-on-null": true }, "env": { "description": "Additional environment variables to set on the configured agent invocation for terminal auth.\nThese values override same-named variables in the base launch configuration.", "type": "object", + "x-deserialize-default-on-null": true, "additionalProperties": { "type": "string" } @@ -4990,14 +4994,16 @@ "type": "array", "items": { "type": "string" - } + }, + "x-deserialize-default-on-null": 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-null": 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/v1/extensibility)", @@ -5094,7 +5100,8 @@ "type": "array", "items": { "$ref": "#/$defs/HttpHeader" - } + }, + "x-deserialize-default-on-null": 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/v1/extensibility)", @@ -5122,7 +5129,8 @@ "type": "array", "items": { "$ref": "#/$defs/HttpHeader" - } + }, + "x-deserialize-default-on-null": 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/v1/extensibility)", @@ -5150,14 +5158,16 @@ "type": "array", "items": { "type": "string" - } + }, + "x-deserialize-default-on-null": true }, "env": { "description": "Environment variables to set when launching the MCP server.", "type": "array", "items": { "$ref": "#/$defs/EnvVariable" - } + }, + "x-deserialize-default-on-null": 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/v1/extensibility)", @@ -5177,7 +5187,8 @@ "type": "array", "items": { "$ref": "#/$defs/McpServer" - } + }, + "x-deserialize-default-on-null": true }, "cwd": { "description": "The working directory for this session. Must be an absolute path.", @@ -5188,7 +5199,8 @@ "type": "array", "items": { "type": "string" - } + }, + "x-deserialize-default-on-null": true }, "sessionId": { "description": "The ID of the session to load.", @@ -5275,14 +5287,16 @@ "type": "array", "items": { "type": "string" - } + }, + "x-deserialize-default-on-null": true }, "mcpServers": { "description": "List of MCP servers to connect to for this session.", "type": "array", "items": { "$ref": "#/$defs/McpServer" - } + }, + "x-deserialize-default-on-null": 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/v1/extensibility)", diff --git a/schema/v1/schema.unstable.json b/schema/v1/schema.unstable.json index 5628d0feb..8fc78097f 100644 --- a/schema/v1/schema.unstable.json +++ b/schema/v1/schema.unstable.json @@ -1181,14 +1181,16 @@ "type": "array", "items": { "type": "string" - } + }, + "x-deserialize-default-on-null": true }, "env": { "description": "Environment variables for the command.", "type": "array", "items": { "$ref": "#/$defs/EnvVariable" - } + }, + "x-deserialize-default-on-null": true }, "cwd": { "description": "Working directory for the command. Must be an absolute path.", @@ -2972,11 +2974,13 @@ "type": "array", "items": { "type": "string" - } + }, + "x-deserialize-default-on-null": true }, "env": { "description": "Additional environment variables to set on the configured agent invocation for terminal auth.\nThese values override same-named variables in the base launch configuration.", "type": "object", + "x-deserialize-default-on-null": true, "additionalProperties": { "type": "string" } @@ -6470,14 +6474,16 @@ "type": "array", "items": { "type": "string" - } + }, + "x-deserialize-default-on-null": 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-null": true }, "systemPrompt": { "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nSystem-level instructions for the new session.\n\nOptional. Omitted and `null` are equivalent and mean the Agent uses its\nown default instructions. Clients MUST only send this when the Agent\nadvertises `sessionCapabilities.systemPrompt`.", @@ -6601,7 +6607,8 @@ "type": "array", "items": { "$ref": "#/$defs/HttpHeader" - } + }, + "x-deserialize-default-on-null": 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/v1/draft/extensibility)", @@ -6629,7 +6636,8 @@ "type": "array", "items": { "$ref": "#/$defs/HttpHeader" - } + }, + "x-deserialize-default-on-null": 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/v1/draft/extensibility)", @@ -6682,14 +6690,16 @@ "type": "array", "items": { "type": "string" - } + }, + "x-deserialize-default-on-null": true }, "env": { "description": "Environment variables to set when launching the MCP server.", "type": "array", "items": { "$ref": "#/$defs/EnvVariable" - } + }, + "x-deserialize-default-on-null": 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/v1/draft/extensibility)", @@ -6757,7 +6767,8 @@ "type": "array", "items": { "$ref": "#/$defs/McpServer" - } + }, + "x-deserialize-default-on-null": true }, "cwd": { "description": "The working directory for this session. Must be an absolute path.", @@ -6768,7 +6779,8 @@ "type": "array", "items": { "type": "string" - } + }, + "x-deserialize-default-on-null": true }, "sessionId": { "description": "The ID of the session to load.", @@ -6866,14 +6878,16 @@ "type": "array", "items": { "type": "string" - } + }, + "x-deserialize-default-on-null": true }, "mcpServers": { "description": "List of MCP servers to connect to for this session.", "type": "array", "items": { "$ref": "#/$defs/McpServer" - } + }, + "x-deserialize-default-on-null": true }, "systemPrompt": { "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nSystem-level instructions for the forked session.\n\nOptional. Omitted and `null` are equivalent; the Agent may then keep a\nsystem prompt it stored with the source session or use its default\ninstructions. Clients MUST only send this when the Agent advertises\n`sessionCapabilities.systemPrompt`, and SHOULD send the same value they used\nfor the source session.", @@ -6918,14 +6932,16 @@ "type": "array", "items": { "type": "string" - } + }, + "x-deserialize-default-on-null": true }, "mcpServers": { "description": "List of MCP servers to connect to for this session.", "type": "array", "items": { "$ref": "#/$defs/McpServer" - } + }, + "x-deserialize-default-on-null": true }, "systemPrompt": { "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nSystem-level instructions for the resumed session.\n\nOptional. Omitted and `null` are equivalent; the Agent may then keep a\nsystem prompt it stored with the session or use its default instructions.\nClients MUST only send this when the Agent advertises\n`sessionCapabilities.systemPrompt`, and SHOULD send the same value they used\nwhen the session was created.", diff --git a/schema/v2/schema.json b/schema/v2/schema.json index e5a7412ef..8be5e4b5f 100644 --- a/schema/v2/schema.json +++ b/schema/v2/schema.json @@ -3570,14 +3570,16 @@ "type": "array", "items": { "type": "string" - } + }, + "x-deserialize-default-on-null": true }, "env": { "description": "Additional environment variables to set on the configured agent invocation for terminal auth.\nNames MUST be unique. These values override same-named variables in the\nbase launch configuration.", "type": "array", "items": { "$ref": "#/$defs/EnvVariable" - } + }, + "x-deserialize-default-on-null": true }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Omitted and `null` are equivalent and mean no metadata.\nImplementations MUST NOT make assumptions about values at these keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/extensibility)", @@ -6522,14 +6524,16 @@ "type": "array", "items": { "$ref": "#/$defs/AbsolutePath" - } + }, + "x-deserialize-default-on-null": 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-null": true }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Omitted and `null` are equivalent and mean no metadata.\nImplementations MUST NOT make assumptions about values at these keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/extensibility)", @@ -6655,7 +6659,8 @@ "type": "array", "items": { "$ref": "#/$defs/HttpHeader" - } + }, + "x-deserialize-default-on-null": true }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Omitted and `null` are equivalent and mean no metadata.\nImplementations MUST NOT make assumptions about values at these keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/extensibility)", @@ -6687,14 +6692,16 @@ "type": "array", "items": { "type": "string" - } + }, + "x-deserialize-default-on-null": true }, "env": { "description": "Environment variables to set when launching the MCP server.", "type": "array", "items": { "$ref": "#/$defs/EnvVariable" - } + }, + "x-deserialize-default-on-null": true }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Omitted and `null` are equivalent and mean no metadata.\nImplementations MUST NOT make assumptions about values at these keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/extensibility)", @@ -6789,14 +6796,16 @@ "type": "array", "items": { "$ref": "#/$defs/AbsolutePath" - } + }, + "x-deserialize-default-on-null": true }, "mcpServers": { "description": "List of MCP servers to connect to for this session.", "type": "array", "items": { "$ref": "#/$defs/McpServer" - } + }, + "x-deserialize-default-on-null": true }, "replayFrom": { "description": "Inclusive cursor describing where conversation replay should begin.\n\nOptional. Omitted or `null` both mean the Agent should resume without\nreplaying previous conversation history. Replay cursors are inclusive:\nreplay includes the position identified by the cursor. Supplying\n`{ \"type\": \"start\" }` means the Agent should replay all retained\nconversation history before responding.\n\nAgents MUST reject unsupported cursor types or malformed cursor values\nwith `-32602` (Invalid params), rather than substituting another cursor\nor resuming without replay.", diff --git a/schema/v2/schema.unstable.json b/schema/v2/schema.unstable.json index c2a9e691b..74ce816cd 100644 --- a/schema/v2/schema.unstable.json +++ b/schema/v2/schema.unstable.json @@ -3852,14 +3852,16 @@ "type": "array", "items": { "type": "string" - } + }, + "x-deserialize-default-on-null": true }, "env": { "description": "Additional environment variables to set on the configured agent invocation for terminal auth.\nNames MUST be unique. These values override same-named variables in the\nbase launch configuration.", "type": "array", "items": { "$ref": "#/$defs/EnvVariable" - } + }, + "x-deserialize-default-on-null": true }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Omitted and `null` are equivalent and mean no metadata.\nImplementations MUST NOT make assumptions about values at these keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)", @@ -7649,14 +7651,16 @@ "type": "array", "items": { "$ref": "#/$defs/AbsolutePath" - } + }, + "x-deserialize-default-on-null": 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-null": true }, "systemPrompt": { "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nSystem-level instructions for the new session.\n\nOptional. Omitted and `null` are equivalent and mean the Agent uses its\nown default instructions. Clients MUST only send this when the Agent\nadvertises `session.systemPrompt`.", @@ -7819,7 +7823,8 @@ "type": "array", "items": { "$ref": "#/$defs/HttpHeader" - } + }, + "x-deserialize-default-on-null": true }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Omitted and `null` are equivalent and mean no metadata.\nImplementations MUST NOT make assumptions about values at these keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)", @@ -7876,14 +7881,16 @@ "type": "array", "items": { "type": "string" - } + }, + "x-deserialize-default-on-null": true }, "env": { "description": "Environment variables to set when launching the MCP server.", "type": "array", "items": { "$ref": "#/$defs/EnvVariable" - } + }, + "x-deserialize-default-on-null": true }, "_meta": { "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Omitted and `null` are equivalent and mean no metadata.\nImplementations MUST NOT make assumptions about values at these keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)", @@ -8026,14 +8033,16 @@ "type": "array", "items": { "$ref": "#/$defs/AbsolutePath" - } + }, + "x-deserialize-default-on-null": true }, "mcpServers": { "description": "List of MCP servers to connect to for this session.", "type": "array", "items": { "$ref": "#/$defs/McpServer" - } + }, + "x-deserialize-default-on-null": true }, "systemPrompt": { "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nSystem-level instructions for the forked session.\n\nOptional. Omitted and `null` are equivalent; the Agent may then keep a\nsystem prompt it stored with the source session or use its default\ninstructions. Clients MUST only send this when the Agent advertises\n`session.systemPrompt`, and SHOULD send the same value they used for the\nsource session.", @@ -8082,14 +8091,16 @@ "type": "array", "items": { "$ref": "#/$defs/AbsolutePath" - } + }, + "x-deserialize-default-on-null": true }, "mcpServers": { "description": "List of MCP servers to connect to for this session.", "type": "array", "items": { "$ref": "#/$defs/McpServer" - } + }, + "x-deserialize-default-on-null": true }, "replayFrom": { "description": "Inclusive cursor describing where conversation replay should begin.\n\nOptional. Omitted or `null` both mean the Agent should resume without\nreplaying previous conversation history. Replay cursors are inclusive:\nreplay includes the position identified by the cursor. Supplying\n`{ \"type\": \"start\" }` means the Agent should replay all retained\nconversation history before responding.\n\nAgents MUST reject unsupported cursor types or malformed cursor values\nwith `-32602` (Invalid params), rather than substituting another cursor\nor resuming without replay.",