From 3e233292ab716b2c190b9dc9b8367f09c21bffab Mon Sep 17 00:00:00 2001 From: connorburgess Date: Sat, 5 Dec 2026 15:10:40 +0700 Subject: [PATCH] fix(schema-generator): keep braces unescaped in inline code The reference generator escapes braces in descriptions because MDX reads them as an expression. It also escaped them inside inline code, where a backslash is literal, so the published reference shows `\{\}` wherever a description says that supplying `{}` advertises a capability. The v1 reference page has 29 such lines. Track inline code while escaping and leave braces alone inside it. Prose braces, pipes and angle brackets are escaped as before. Regenerated the four reference pages. Besides the removed backslashes, Prettier now reformats a few fields it previously left alone, since it can parse them. Their text is unchanged. Published JSON Schemas are unchanged. --- docs/protocol/v1/draft/schema.mdx | 132 +++++++++++++++------------- docs/protocol/v1/schema.mdx | 82 ++++++++++-------- docs/protocol/v2/draft/schema.mdx | 138 +++++++++++++++--------------- docs/protocol/v2/schema.mdx | 66 +++++++------- schema-generator/src/main.rs | 40 +++++++-- 5 files changed, 254 insertions(+), 204 deletions(-) diff --git a/docs/protocol/v1/draft/schema.mdx b/docs/protocol/v1/draft/schema.mdx index 29424a822..37c5c0fe0 100644 --- a/docs/protocol/v1/draft/schema.mdx +++ b/docs/protocol/v1/draft/schema.mdx @@ -3056,7 +3056,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v1/d Whether the agent supports the logout method. Optional. Omitted or `null` both mean the agent does not advertise support. -Supplying `\{\}` means the agent supports the logout method. +Supplying `{}` means the agent supports the logout method. AuthStatusCapabilities | null} > @@ -3067,7 +3067,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Whether the agent supports the `auth/status` method. Optional. Omitted or `null` both mean the agent does not advertise support. -Supplying `\{\}` means the agent supports the `auth/status` method. +Supplying `{}` means the agent supports the `auth/status` method. @@ -3124,7 +3124,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Provider configuration capabilities supported by the agent. Optional. Omitted or `null` both mean the agent does not advertise support. -Supplying `\{\}` means the agent supports provider configuration methods. +Supplying `{}` means the agent supports provider configuration methods. SessionCapabilities} > @@ -3471,7 +3471,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Auth status capabilities supported by the agent. -Supplying `\{\}` means the agent supports the `auth/status` method. +Supplying `{}` means the agent supports the `auth/status` method. **Type:** Object @@ -3584,7 +3584,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v1/d Capabilities for boolean session configuration options. -Supplying `\{\}` means the client supports boolean session configuration options. +Supplying `{}` means the client supports boolean session configuration options. **Type:** Object @@ -3684,7 +3684,7 @@ Determines which file operations the agent can request. Whether the Client supports `plan_update` and `plan_removed` session updates. Optional. Omitted or `null` both mean the Client does not advertise support. -Supplying `\{\}` means the Client can receive both update types. +Supplying `{}` means the Client can receive both update types. ClientSessionCapabilities | null} > @@ -3699,7 +3699,7 @@ session-related extensions. Optional and nullable. Omitted or `null` both mean the client does not advertise support. -Supplying `\{\}` means the client understands child associations, work-state +Supplying `{}` means the client understands child associations, work-state snapshots, session-directed messages, and restricted-session semantics. See protocol docs: [Subagents](https://agentclientprotocol.com/protocol/v1/draft/subagents) @@ -3730,7 +3730,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v1/d CompactionCapabilities | null} > Support for ID-addressed context compaction updates. Omitted or `null` -means unsupported. `\{\}` advertises the complete compaction contract. +means unsupported. `{}` advertises the complete compaction contract. SessionConfigOptionsCapabilities | null} > Config option capabilities supported by the client. @@ -3747,14 +3747,14 @@ This capability is not part of the spec yet, and may be removed or changed at an Support for `cursor_update` session updates. Optional. Omitted or `null` both mean the client does not advertise support. -Supplying `\{\}` means the client handles `cursor_update`. +Supplying `{}` means the client handles `cursor_update`. NoticeCapabilities | null} > Support for live user-facing `notice` session updates. Optional. Omitted or `null` both mean the client does not advertise support. -Supplying `\{\}` means the client can present notices to the user. +Supplying `{}` means the client can present notices to the user. PromptSuggestionsCapabilities | null} > @@ -3765,7 +3765,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Support for `prompt_suggestions_update` session updates. Optional. Omitted or `null` both mean the client does not advertise support. -Supplying `\{\}` means the client can offer prompt suggestions made of +Supplying `{}` means the client can offer prompt suggestions made of `text` and `resource_link` content blocks. @@ -4437,7 +4437,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v1/d CursorForkCapabilities | null} > Permits the Client to fork the session at this cursor with `session/fork`. -Omitted and `null` are equivalent and mean unsupported. An object (including `\{\}`) +Omitted and `null` are equivalent and mean unsupported. An object (including `{}`) means supported. @@ -4477,7 +4477,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Capability to fork the session at a cursor with `session/fork`. -Supplying `\{\}` advertises support. An omitted or `null` `fork` does not. +Supplying `{}` advertises support. An omitted or `null` `fork` does not. **Type:** Object @@ -4670,14 +4670,14 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v1/d Whether the client supports form-based elicitation. Optional. Omitted and `null` are equivalent and mean form support is not advertised. -Supplying `\{\}` explicitly advertises form support. +Supplying `{}` explicitly advertises form support. ElicitationUrlCapabilities | null} > Whether the client supports URL-based elicitation. Optional. Omitted or `null` both mean the client does not advertise support. -Supplying `\{\}` means the client supports URL-based elicitation. +Supplying `{}` means the client supports URL-based elicitation. @@ -4711,7 +4711,7 @@ Allowed wire representations for `ElicitationContentValue`. Form-based elicitation capabilities. -Supplying `\{\}` means the client supports form-based elicitation. +Supplying `{}` means the client supports form-based elicitation. **Type:** Object @@ -5210,7 +5210,7 @@ session without a specific tool call. URL-based elicitation capabilities. -Supplying `\{\}` means the client supports URL-based elicitation. +Supplying `{}` means the client supports URL-based elicitation. **Type:** Object @@ -5950,7 +5950,7 @@ Protocol names that do not begin with `_` are reserved for the ACP spec. Logout capabilities supported by the agent. -Supplying `\{\}` means the agent supports the logout method. +Supplying `{}` means the agent supports the logout method. **Type:** Object @@ -7001,7 +7001,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Capabilities for audio content in prompt suggestions. -Supplying `\{\}` means the client can offer suggestions that include audio. +Supplying `{}` means the client can offer suggestions that include audio. **Type:** Object @@ -7024,7 +7024,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Client support for `prompt_suggestions_update` session updates. -Supplying `\{\}` means the client can offer prompt suggestions made of `text` +Supplying `{}` means the client can offer prompt suggestions made of `text` and `resource_link` content blocks. The client opts in to other content block types with the fields below. They have the same names as the agent's prompt capabilities. @@ -7045,14 +7045,14 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v1/d Whether prompt suggestions may include `audio` content blocks. Optional. Omitted or `null` both mean the client does not advertise support. -Supplying `\{\}` means the client can offer suggestions that include audio. +Supplying `{}` means the client can offer suggestions that include audio. PromptSuggestionsEmbeddedContextCapabilities | null} > Whether prompt suggestions may include `resource` content blocks. Optional. Omitted or `null` both mean the client does not advertise support. -Supplying `\{\}` means the client can offer suggestions that include +Supplying `{}` means the client can offer suggestions that include embedded resources. @@ -7060,7 +7060,7 @@ embedded resources. Whether prompt suggestions may include `image` content blocks. Optional. Omitted or `null` both mean the client does not advertise support. -Supplying `\{\}` means the client can offer suggestions that include images. +Supplying `{}` means the client can offer suggestions that include images. @@ -7072,7 +7072,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Capabilities for embedded resources in prompt suggestions. -Supplying `\{\}` means the client can offer suggestions that include +Supplying `{}` means the client can offer suggestions that include `resource` content blocks. **Type:** Object @@ -7096,7 +7096,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Capabilities for image content in prompt suggestions. -Supplying `\{\}` means the client can offer suggestions that include images. +Supplying `{}` means the client can offer suggestions that include images. **Type:** Object @@ -7244,7 +7244,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Provider configuration capabilities supported by the agent. -Supplying `\{\}` means the agent supports provider configuration methods. +Supplying `{}` means the agent supports provider configuration methods. **Type:** Object @@ -7436,7 +7436,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v1/d Capabilities for additional session directories support. -Supplying `\{\}` means the agent supports the `additionalDirectories` field on +Supplying `{}` means the agent supports the `additionalDirectories` field on supported session lifecycle requests. Agents that also support `session/list` may return `SessionInfo.additionalDirectories` to report the complete ordered additional-root list associated with a listed session. @@ -7462,7 +7462,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Capabilities for `session/archive` and `session/unarchive`. -Supplying `\{\}` means the agent supports both methods, the `archived` filter on +Supplying `{}` means the agent supports both methods, the `archived` filter on `session/list`, and `SessionInfo.archived`. **Type:** Object @@ -7516,7 +7516,7 @@ future ACP variants. Capability to cancel work in a subagent session without ending that session. -Supplying `\{\}` advertises support. An omitted or `null` `cancel` does not. +Supplying `{}` advertises support. An omitted or `null` `cancel` does not. **Type:** Object @@ -7559,7 +7559,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v1/d Whether the agent supports `additionalDirectories` on supported session lifecycle requests. Optional. Omitted or `null` both mean the agent does not advertise support. -Supplying `\{\}` means the agent supports `additionalDirectories` on +Supplying `{}` means the agent supports `additionalDirectories` on supported session lifecycle requests. Agents that also support `session/list` may return @@ -7575,7 +7575,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Whether the agent supports `session/archive` and `session/unarchive`. Optional. Omitted or `null` both mean the agent does not advertise support. -Supplying `\{\}` means the agent supports both methods, the `archived` filter on +Supplying `{}` means the agent supports both methods, the `archived` filter on `session/list`, and `SessionInfo.archived`. Agents that advertise it MUST also advertise `sessionCapabilities.list`. @@ -7583,14 +7583,14 @@ Supplying `\{\}` means the agent supports both methods, the `archived` filter on Whether the agent supports `session/close`. Optional. Omitted or `null` both mean the agent does not advertise support. -Supplying `\{\}` means the agent supports closing sessions. +Supplying `{}` means the agent supports closing sessions. SessionDeleteCapabilities | null} > Whether the agent supports `session/delete`. Optional. Omitted or `null` both mean the agent does not advertise support. -Supplying `\{\}` means the agent supports deleting sessions from `session/list`. +Supplying `{}` means the agent supports deleting sessions from `session/list`. SessionForkCapabilities | null} > @@ -7601,14 +7601,14 @@ This capability is not part of the spec yet, and may be removed or changed at an Whether the agent supports `session/fork`. Optional. Omitted or `null` both mean the agent does not advertise support. -Supplying `\{\}` means the agent supports forking sessions. +Supplying `{}` means the agent supports forking sessions. SessionListCapabilities | null} > Whether the agent supports `session/list`. Optional. Omitted or `null` both mean the agent does not advertise support. -Supplying `\{\}` means the agent supports listing sessions. +Supplying `{}` means the agent supports listing sessions. SessionOptionsCapabilities | null} > @@ -7619,7 +7619,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Whether the agent supports `session/options`. Optional. Omitted or `null` both mean the agent does not advertise support. -Supplying `\{\}` means the agent supports `session/options` and accepts initial +Supplying `{}` means the agent supports `session/options` and accepts initial config option values on session setup requests. @@ -7627,7 +7627,7 @@ config option values on session setup requests. Whether the agent supports `session/resume`. Optional. Omitted or `null` both mean the agent does not advertise support. -Supplying `\{\}` means the agent supports resuming sessions. +Supplying `{}` means the agent supports resuming sessions. SessionStatusCapabilities | null} > @@ -7638,14 +7638,14 @@ This capability is not part of the spec yet, and may be removed or changed at an Whether the agent supports `session/status`. Optional. Omitted or `null` both mean the agent does not advertise support. -Supplying `\{\}` means the agent supports checking session status. +Supplying `{}` means the agent supports checking session status. SessionSystemPromptCapabilities | null} > Whether the agent supports `systemPrompt` on session lifecycle requests. Optional. Omitted or `null` both mean the agent does not advertise support. -Supplying `\{\}` means the agent supports `systemPrompt` in `append` mode. +Supplying `{}` means the agent supports `systemPrompt` in `append` mode. SessionTitleCapabilities | null} > @@ -7659,7 +7659,7 @@ Agents report titles through `session/list` and `session_info_update` without th capability. It only advertises that Clients can set titles. Optional. Omitted or `null` both mean the agent does not advertise support. -Supplying `\{\}` means the agent supports setting session titles. +Supplying `{}` means the agent supports setting session titles. @@ -7667,7 +7667,7 @@ Supplying `\{\}` means the agent supports setting session titles. Capabilities for the `session/close` method. -Supplying `\{\}` means the agent supports closing sessions. +Supplying `{}` means the agent supports closing sessions. **Type:** Object @@ -7836,7 +7836,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v1/d Whether the client supports boolean session configuration options. Optional. Omitted or `null` both mean the client does not advertise support. -Supplying `\{\}` means agents may include `type: "boolean"` entries in +Supplying `{}` means agents may include `type: "boolean"` entries in `configOptions`, and the client may send `session/set_config_option` requests with `type: "boolean"` and a boolean `value`. @@ -7953,7 +7953,7 @@ See the [Session Cursors RFD](https://agentclientprotocol.com/rfds/session-curso Capabilities for the `session/delete` method. -Supplying `\{\}` means the agent supports deleting sessions from `session/list`. +Supplying `{}` means the agent supports deleting sessions from `session/list`. **Type:** Object @@ -7976,7 +7976,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Capabilities for the `session/fork` method. -Supplying `\{\}` means the agent supports forking sessions. +Supplying `{}` means the agent supports forking sessions. **Type:** Object @@ -8080,7 +8080,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v1/d Capabilities for the `session/list` method. -Supplying `\{\}` means the agent supports listing sessions. +Supplying `{}` means the agent supports listing sessions. **Type:** Object @@ -8234,7 +8234,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Capabilities for the `session/options` method. -Supplying `\{\}` means the agent supports `session/options` and accepts initial config +Supplying `{}` means the agent supports `session/options` and accepts initial config option values on session setup requests. **Type:** Object @@ -8280,7 +8280,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v1/d Capabilities for the `session/resume` method. -Supplying `\{\}` means the agent supports resuming sessions. +Supplying `{}` means the agent supports resuming sessions. **Type:** Object @@ -8340,7 +8340,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Capabilities for the `session/status` method. -Supplying `\{\}` means the agent supports checking session status. +Supplying `{}` means the agent supports checking session status. **Type:** Object @@ -8359,7 +8359,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v1/d Capabilities for client-provided system prompts. -Supplying `\{\}` means the agent supports `systemPrompt` on session lifecycle +Supplying `{}` means the agent supports `systemPrompt` on session lifecycle requests in `append` mode. **Type:** Object @@ -8404,7 +8404,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v1/d Whether the agent supports `override` mode. Optional. Omitted or `null` both mean the agent does not advertise support. -Supplying `\{\}` means the agent supports replacing its built-in default +Supplying `{}` means the agent supports replacing its built-in default instructions with the client-provided system prompt. @@ -8413,7 +8413,7 @@ instructions with the client-provided system prompt. Capabilities for the `override` system prompt mode. -Supplying `\{\}` means the agent supports replacing its built-in default +Supplying `{}` means the agent supports replacing its built-in default instructions with the client-provided system prompt. **Type:** Object @@ -8437,7 +8437,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Capabilities for Client-set session titles. -Supplying `\{\}` means the agent supports `session/set_title`. Agents report titles +Supplying `{}` means the agent supports `session/set_title`. Agents report titles through `session/list` and `session_info_update` without this capability. **Type:** Object @@ -9605,7 +9605,7 @@ Optional. Omitted and `null` are equivalent and mean no title is provided. Capability marker for exposing reusable child sessions as restricted ACP sessions. -Supplying `\{\}` advertises support for child association and state updates, +Supplying `{}` advertises support for child association and state updates, session-directed messages, and restricted-session semantics. The client must advertise this capability before the agent sends subagent updates or session-directed messages. @@ -9631,15 +9631,25 @@ on ordinary sessions does not grant support on a child. **Properties:** - - The _meta property is reserved by ACP to allow clients and agents to attach additional -metadata to their interactions. Implementations MUST NOT make assumptions about values at -these keys. + + The _meta property is reserved by ACP to allow clients and agents to attach + additional metadata to their interactions. Implementations MUST NOT make + assumptions about values at these keys. -SessionCancelCapabilities | null} > - Permits the client to cancel this child's current work without ending -the session. Omitted or `null` means unsupported. An object (including -`\{\}`) means supported. + + + SessionCancelCapabilities + + | null + + } +> + Permits the client to cancel this child's current work without ending the + session. Omitted or `null` means unsupported. An object (including `{}`) means + supported. ## SubagentUpdate diff --git a/docs/protocol/v1/schema.mdx b/docs/protocol/v1/schema.mdx index 65166b886..95857404c 100644 --- a/docs/protocol/v1/schema.mdx +++ b/docs/protocol/v1/schema.mdx @@ -1838,7 +1838,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v1/e Whether the agent supports the logout method. Optional. Omitted or `null` both mean the agent does not advertise support. -Supplying `\{\}` means the agent supports the logout method. +Supplying `{}` means the agent supports the logout method. @@ -2222,7 +2222,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v1/e Capabilities for boolean session configuration options. -Supplying `\{\}` means the client supports boolean session configuration options. +Supplying `{}` means the client supports boolean session configuration options. **Type:** Object @@ -2322,7 +2322,7 @@ Determines which file operations the agent can request. Whether the Client supports `plan_update` and `plan_removed` session updates. Optional. Omitted or `null` both mean the Client does not advertise support. -Supplying `\{\}` means the Client can receive both update types. +Supplying `{}` means the Client can receive both update types. ClientSessionCapabilities | null} > @@ -2337,7 +2337,7 @@ session-related extensions. Optional and nullable. Omitted or `null` both mean the client does not advertise support. -Supplying `\{\}` means the client understands child associations, work-state +Supplying `{}` means the client understands child associations, work-state snapshots, session-directed messages, and restricted-session semantics. See protocol docs: [Subagents](https://agentclientprotocol.com/protocol/v1/subagents) @@ -2368,7 +2368,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v1/e CompactionCapabilities | null} > Support for ID-addressed context compaction updates. Omitted or `null` -means unsupported. `\{\}` advertises the complete compaction contract. +means unsupported. `{}` advertises the complete compaction contract. SessionConfigOptionsCapabilities | null} > Config option capabilities supported by the client. @@ -2381,7 +2381,7 @@ config option extensions. Support for live user-facing `notice` session updates. Optional. Omitted or `null` both mean the client does not advertise support. -Supplying `\{\}` means the client can present notices to the user. +Supplying `{}` means the client can present notices to the user. @@ -2866,14 +2866,14 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v1/e Whether the client supports form-based elicitation. Optional. Omitted and `null` are equivalent and mean form support is not advertised. -Supplying `\{\}` explicitly advertises form support. +Supplying `{}` explicitly advertises form support. ElicitationUrlCapabilities | null} > Whether the client supports URL-based elicitation. Optional. Omitted or `null` both mean the client does not advertise support. -Supplying `\{\}` means the client supports URL-based elicitation. +Supplying `{}` means the client supports URL-based elicitation. @@ -2907,7 +2907,7 @@ Allowed wire representations for `ElicitationContentValue`. Form-based elicitation capabilities. -Supplying `\{\}` means the client supports form-based elicitation. +Supplying `{}` means the client supports form-based elicitation. **Type:** Object @@ -3406,7 +3406,7 @@ session without a specific tool call. URL-based elicitation capabilities. -Supplying `\{\}` means the client supports URL-based elicitation. +Supplying `{}` means the client supports URL-based elicitation. **Type:** Object @@ -4033,7 +4033,7 @@ Optional. Omitted and `null` are equivalent and mean no title is provided. Logout capabilities supported by the agent. -Supplying `\{\}` means the agent supports the logout method. +Supplying `{}` means the agent supports the logout method. **Type:** Object @@ -5102,7 +5102,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v1/e Capabilities for additional session directories support. -Supplying `\{\}` means the agent supports the `additionalDirectories` field on +Supplying `{}` means the agent supports the `additionalDirectories` field on supported session lifecycle requests. Agents that also support `session/list` may return `SessionInfo.additionalDirectories` to report the complete ordered additional-root list associated with a listed session. @@ -5124,7 +5124,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v1/e Capability to cancel work in a subagent session without ending that session. -Supplying `\{\}` advertises support. An omitted or `null` `cancel` does not. +Supplying `{}` advertises support. An omitted or `null` `cancel` does not. **Type:** Object @@ -5167,7 +5167,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v1/e Whether the agent supports `additionalDirectories` on supported session lifecycle requests. Optional. Omitted or `null` both mean the agent does not advertise support. -Supplying `\{\}` means the agent supports `additionalDirectories` on +Supplying `{}` means the agent supports `additionalDirectories` on supported session lifecycle requests. Agents that also support `session/list` may return @@ -5179,35 +5179,35 @@ additional-root list associated with a listed session. Whether the agent supports `session/close`. Optional. Omitted or `null` both mean the agent does not advertise support. -Supplying `\{\}` means the agent supports closing sessions. +Supplying `{}` means the agent supports closing sessions. SessionDeleteCapabilities | null} > Whether the agent supports `session/delete`. Optional. Omitted or `null` both mean the agent does not advertise support. -Supplying `\{\}` means the agent supports deleting sessions from `session/list`. +Supplying `{}` means the agent supports deleting sessions from `session/list`. SessionListCapabilities | null} > Whether the agent supports `session/list`. Optional. Omitted or `null` both mean the agent does not advertise support. -Supplying `\{\}` means the agent supports listing sessions. +Supplying `{}` means the agent supports listing sessions. SessionResumeCapabilities | null} > Whether the agent supports `session/resume`. Optional. Omitted or `null` both mean the agent does not advertise support. -Supplying `\{\}` means the agent supports resuming sessions. +Supplying `{}` means the agent supports resuming sessions. SessionSystemPromptCapabilities | null} > Whether the agent supports `systemPrompt` on session lifecycle requests. Optional. Omitted or `null` both mean the agent does not advertise support. -Supplying `\{\}` means the agent supports `systemPrompt` in `append` mode. +Supplying `{}` means the agent supports `systemPrompt` in `append` mode. @@ -5215,7 +5215,7 @@ Supplying `\{\}` means the agent supports `systemPrompt` in `append` mode. Capabilities for the `session/close` method. -Supplying `\{\}` means the agent supports closing sessions. +Supplying `{}` means the agent supports closing sessions. **Type:** Object @@ -5384,7 +5384,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v1/e Whether the client supports boolean session configuration options. Optional. Omitted or `null` both mean the client does not advertise support. -Supplying `\{\}` means agents may include `type: "boolean"` entries in +Supplying `{}` means agents may include `type: "boolean"` entries in `configOptions`, and the client may send `session/set_config_option` requests with `type: "boolean"` and a boolean `value`. @@ -5489,7 +5489,7 @@ Unique identifier for a session configuration option value. Capabilities for the `session/delete` method. -Supplying `\{\}` means the agent supports deleting sessions from `session/list`. +Supplying `{}` means the agent supports deleting sessions from `session/list`. **Type:** Object @@ -5582,7 +5582,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v1/e Capabilities for the `session/list` method. -Supplying `\{\}` means the agent supports listing sessions. +Supplying `{}` means the agent supports listing sessions. **Type:** Object @@ -5758,7 +5758,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v1/e Capabilities for the `session/resume` method. -Supplying `\{\}` means the agent supports resuming sessions. +Supplying `{}` means the agent supports resuming sessions. **Type:** Object @@ -5777,7 +5777,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v1/e Capabilities for client-provided system prompts. -Supplying `\{\}` means the agent supports `systemPrompt` on session lifecycle +Supplying `{}` means the agent supports `systemPrompt` on session lifecycle requests in `append` mode. **Type:** Object @@ -5822,7 +5822,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v1/e Whether the agent supports `override` mode. Optional. Omitted or `null` both mean the agent does not advertise support. -Supplying `\{\}` means the agent supports replacing its built-in default +Supplying `{}` means the agent supports replacing its built-in default instructions with the client-provided system prompt. @@ -5831,7 +5831,7 @@ instructions with the client-provided system prompt. Capabilities for the `override` system prompt mode. -Supplying `\{\}` means the agent supports replacing its built-in default +Supplying `{}` means the agent supports replacing its built-in default instructions with the client-provided system prompt. **Type:** Object @@ -6919,7 +6919,7 @@ Optional. Omitted and `null` are equivalent and mean no title is provided. Capability marker for exposing reusable child sessions as restricted ACP sessions. -Supplying `\{\}` advertises support for child association and state updates, +Supplying `{}` advertises support for child association and state updates, session-directed messages, and restricted-session semantics. The client must advertise this capability before the agent sends subagent updates or session-directed messages. @@ -6945,15 +6945,25 @@ on ordinary sessions does not grant support on a child. **Properties:** - - The _meta property is reserved by ACP to allow clients and agents to attach additional -metadata to their interactions. Implementations MUST NOT make assumptions about values at -these keys. + + The _meta property is reserved by ACP to allow clients and agents to attach + additional metadata to their interactions. Implementations MUST NOT make + assumptions about values at these keys. -SessionCancelCapabilities | null} > - Permits the client to cancel this child's current work without ending -the session. Omitted or `null` means unsupported. An object (including -`\{\}`) means supported. + + + SessionCancelCapabilities + + | null + + } +> + Permits the client to cancel this child's current work without ending the + session. Omitted or `null` means unsupported. An object (including `{}`) means + supported. ## SubagentUpdate diff --git a/docs/protocol/v2/draft/schema.mdx b/docs/protocol/v2/draft/schema.mdx index 0702fba4a..443491300 100644 --- a/docs/protocol/v2/draft/schema.mdx +++ b/docs/protocol/v2/draft/schema.mdx @@ -1416,7 +1416,7 @@ NOT restore servers from earlier requests. Optional. Omitted and `null` are equivalent, and the Agent MUST NOT replay previous conversation history. Replay cursors are inclusive: replay includes the position identified by the cursor. Supplying -`\{ "type": "start" \}` means the Agent MUST replay all retained +`{ "type": "start" }` means the Agent MUST replay all retained conversation history before responding. Agents MUST reject unsupported cursor types or malformed cursor values @@ -2852,7 +2852,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Whether the Agent supports the `auth/status` method. Optional. Omitted and `null` are equivalent and mean the Agent does not advertise support. -Supplying `\{\}` means the Agent supports the `auth/status` method. +Supplying `{}` means the Agent supports the `auth/status` method. @@ -2894,14 +2894,14 @@ This capability is not part of the spec yet, and may be removed or changed at an Provider configuration capabilities supported by the Agent. Optional. Omitted and `null` are equivalent and mean the Agent does not advertise support. -Supplying `\{\}` means the Agent supports provider configuration methods. +Supplying `{}` means the Agent supports provider configuration methods. SessionCapabilities | null} > Session capabilities supported by the Agent. Optional. Omitted and `null` are equivalent and mean the Agent does not support the -`session/*` methods. Supplying `\{\}` means the Agent supports the +`session/*` methods. Supplying `{}` means the Agent supports the baseline session methods: `session/new`, `session/list`, `session/resume`, `session/close`, `session/prompt`, `session/cancel`, and `session/update`. @@ -3364,7 +3364,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Auth status capabilities supported by the Agent. -Supplying `\{\}` means the Agent supports the `auth/status` method. +Supplying `{}` means the Agent supports the `auth/status` method. **Type:** Object @@ -3861,7 +3861,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/d Whether the Client supports `terminal` authentication methods. Optional. Omitted and `null` are equivalent and mean the Client does not advertise support. -Supplying `\{\}` means the Client can reproduce the configured Agent +Supplying `{}` means the Client can reproduce the configured Agent invocation in an interactive terminal, and the Agent MAY include `terminal` entries in its authentication methods. @@ -3913,7 +3913,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Session-related capabilities supported by the Client. Optional. Omitted and `null` are equivalent and mean the Client does not advertise any -session-related capabilities. This object only groups capabilities. Supplying `\{\}` +session-related capabilities. This object only groups capabilities. Supplying `{}` advertises nothing. @@ -3927,7 +3927,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Session-related capabilities supported by the Client. This object only groups capabilities. Unlike the Agent's `session` -capability, it is not a support marker, and supplying `\{\}` advertises +capability, it is not a support marker, and supplying `{}` advertises nothing. **Type:** Object @@ -3946,14 +3946,14 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/d Command types the Client understands in addition to `command`. Optional. Omitted and `null` are equivalent and mean the Client does not advertise support -for any of them. This object only groups capabilities. Supplying `\{\}` advertises nothing. +for any of them. This object only groups capabilities. Supplying `{}` advertises nothing. PromptSuggestionsCapabilities | null} > Support for `prompt_suggestions_update` session updates. Optional. Omitted and `null` are equivalent and mean the Client does not advertise support. -Supplying `\{\}` means the Client can offer prompt suggestions made of +Supplying `{}` means the Client can offer prompt suggestions made of `text` and `resource_link` content blocks. @@ -4031,7 +4031,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Command types the Client understands in addition to `command`. Agents MUST NOT send a command type listed here unless the Client -advertised it. This object only groups capabilities. Supplying `\{\}` +advertised it. This object only groups capabilities. Supplying `{}` advertises nothing. **Type:** Object @@ -4050,7 +4050,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/d Support for `skill` command entries. Optional. Omitted and `null` are equivalent and mean the Client does not advertise support. -Supplying `\{\}` means the Agent MAY send `skill` entries in `availableCommands`. The +Supplying `{}` means the Agent MAY send `skill` entries in `availableCommands`. The Client invokes them with `skill` content blocks. @@ -4063,7 +4063,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Client support for `skill` command entries. -Supplying `\{\}` means the Agent MAY send `skill` entries in +Supplying `{}` means the Agent MAY send `skill` entries in `availableCommands`. The Client invokes them with `skill` content blocks. **Type:** Object @@ -4823,7 +4823,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/d CursorForkCapabilities | null} > Permits the Client to fork the session at this cursor with `session/fork`. -Omitted and `null` are equivalent and mean unsupported. An object (including `\{\}`) +Omitted and `null` are equivalent and mean unsupported. An object (including `{}`) means supported. @@ -4863,7 +4863,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Capability to fork the session at a cursor with `session/fork`. -Supplying `\{\}` advertises support. An omitted or `null` `fork` does not. +Supplying `{}` advertises support. An omitted or `null` `fork` does not. **Type:** Object @@ -5358,14 +5358,14 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/d Whether the Client supports form-based elicitation. Optional. Omitted and `null` are equivalent and mean form support is not advertised. -Supplying `\{\}` explicitly advertises form support. +Supplying `{}` explicitly advertises form support. ElicitationUrlCapabilities | null} > Whether the Client supports URL-based elicitation. Optional. Omitted and `null` are equivalent and mean the Client does not advertise support. -Supplying `\{\}` means the Client supports URL-based elicitation. +Supplying `{}` means the Client supports URL-based elicitation. @@ -5407,7 +5407,7 @@ other value. Form-based elicitation capabilities. -Supplying `\{\}` means the Client supports form-based elicitation. +Supplying `{}` means the Client supports form-based elicitation. **Type:** Object @@ -5882,7 +5882,7 @@ session without a specific tool call. URL-based elicitation capabilities. -Supplying `\{\}` means the Client supports URL-based elicitation. +Supplying `{}` means the Client supports URL-based elicitation. **Type:** Object @@ -6834,7 +6834,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Capabilities for ACP MCP server transports. -Supplying `\{\}` means the Agent supports ACP MCP server transports. +Supplying `{}` means the Agent supports ACP MCP server transports. **Type:** Object @@ -6873,21 +6873,21 @@ This capability is not part of the spec yet, and may be removed or changed at an Agent supports `acp` MCP servers. Optional. Omitted and `null` are equivalent and mean the Agent does not advertise support. -Supplying `\{\}` means the Agent supports ACP MCP server transports. +Supplying `{}` means the Agent supports ACP MCP server transports. McpHttpCapabilities | null} > Agent supports `http` MCP servers. Optional. Omitted and `null` are equivalent and mean the Agent does not advertise support. -Supplying `\{\}` means the Agent supports HTTP MCP server transports. +Supplying `{}` means the Agent supports HTTP MCP server transports. McpStdioCapabilities | null} > Agent supports `stdio` MCP servers. Optional. Omitted and `null` are equivalent and mean the Agent does not advertise support. -Supplying `\{\}` means the Agent supports stdio MCP server transports. +Supplying `{}` means the Agent supports stdio MCP server transports. @@ -6918,7 +6918,7 @@ Explicit `null` is preserved separately from an omitted key. Capabilities for HTTP MCP server transports. -Supplying `\{\}` means the Agent supports HTTP MCP server transports. +Supplying `{}` means the Agent supports HTTP MCP server transports. **Type:** Object @@ -7222,7 +7222,7 @@ Agents reject a request with a duplicate `name` with `-32602`. Capabilities for stdio MCP server transports. -Supplying `\{\}` means the Agent supports stdio MCP server transports. +Supplying `{}` means the Agent supports stdio MCP server transports. **Type:** Object @@ -7857,7 +7857,7 @@ future ACP variants. Capabilities for audio content in prompt requests. -Supplying `\{\}` means the Agent supports audio content in prompts. +Supplying `{}` means the Agent supports audio content in prompts. **Type:** Object @@ -7903,7 +7903,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/d Agent supports `audio` content blocks. Optional. Omitted and `null` are equivalent and mean the Agent does not advertise support. -Supplying `\{\}` means the Agent supports audio content in prompts. +Supplying `{}` means the Agent supports audio content in prompts. PromptEmbeddedContextCapabilities | null} > @@ -7913,14 +7913,14 @@ When enabled, the Client is allowed to include `resource` content blocks in prompt requests for pieces of context that are referenced in the message. Optional. Omitted and `null` are equivalent and mean the Agent does not advertise support. -Supplying `\{\}` means the Agent supports embedded context in prompts. +Supplying `{}` means the Agent supports embedded context in prompts. PromptImageCapabilities | null} > Agent supports `image` content blocks. Optional. Omitted and `null` are equivalent and mean the Agent does not advertise support. -Supplying `\{\}` means the Agent supports image content in prompts. +Supplying `{}` means the Agent supports image content in prompts. PromptSkillCapabilities | null} > @@ -7931,7 +7931,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Agent supports `skill` content blocks. Optional. Omitted and `null` are equivalent and mean the Agent does not advertise support. -Supplying `\{\}` means a prompt may contain one `skill` content block, as its first block. +Supplying `{}` means a prompt may contain one `skill` content block, as its first block. An Agent that sends `skill` entries in `availableCommands` MUST advertise this capability. @@ -7940,7 +7940,7 @@ An Agent that sends `skill` entries in `availableCommands` MUST advertise this c Capabilities for embedded context in prompt requests. -Supplying `\{\}` means the Agent supports embedded context in prompts. +Supplying `{}` means the Agent supports embedded context in prompts. **Type:** Object @@ -7959,7 +7959,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/d Capabilities for image content in prompt requests. -Supplying `\{\}` means the Agent supports image content in prompts. +Supplying `{}` means the Agent supports image content in prompts. **Type:** Object @@ -7982,7 +7982,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Capabilities for `skill` content blocks in prompt requests. -Supplying `\{\}` means a prompt may contain one `skill` content block, as +Supplying `{}` means a prompt may contain one `skill` content block, as its first block. The Agent opts in to more with the `inline` field. **Type:** Object @@ -8001,7 +8001,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/d Agent supports `skill` content blocks at any position in a prompt. Optional. Omitted and `null` are equivalent and mean the Agent does not advertise support. -Supplying `\{\}` means a prompt may contain any number of `skill` content blocks, at any +Supplying `{}` means a prompt may contain any number of `skill` content blocks, at any position. @@ -8014,7 +8014,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Capabilities for `skill` content blocks at any position in a prompt. -Supplying `\{\}` means a prompt may contain any number of `skill` content +Supplying `{}` means a prompt may contain any number of `skill` content blocks, at any position. **Type:** Object @@ -8073,7 +8073,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Capabilities for audio content in prompt suggestions. -Supplying `\{\}` means the Client can offer suggestions that include audio. +Supplying `{}` means the Client can offer suggestions that include audio. **Type:** Object @@ -8096,7 +8096,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Client support for `prompt_suggestions_update` session updates. -Supplying `\{\}` means the Client can offer prompt suggestions made of `text` +Supplying `{}` means the Client can offer prompt suggestions made of `text` and `resource_link` content blocks. The Client opts in to other content block types with the fields below. They have the same names as the Agent's `session.prompt` capability. @@ -8117,14 +8117,14 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/d Whether prompt suggestions may include `audio` content blocks. Optional. Omitted and `null` are equivalent and mean the Client does not advertise support. -Supplying `\{\}` means the Client can offer suggestions that include audio. +Supplying `{}` means the Client can offer suggestions that include audio. PromptSuggestionsEmbeddedContextCapabilities | null} > Whether prompt suggestions may include `resource` content blocks. Optional. Omitted and `null` are equivalent and mean the Client does not advertise support. -Supplying `\{\}` means the Client can offer suggestions that include +Supplying `{}` means the Client can offer suggestions that include embedded resources. @@ -8132,7 +8132,7 @@ embedded resources. Whether prompt suggestions may include `image` content blocks. Optional. Omitted and `null` are equivalent and mean the Client does not advertise support. -Supplying `\{\}` means the Client can offer suggestions that include images. +Supplying `{}` means the Client can offer suggestions that include images. @@ -8144,7 +8144,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Capabilities for embedded resources in prompt suggestions. -Supplying `\{\}` means the Client can offer suggestions that include +Supplying `{}` means the Client can offer suggestions that include `resource` content blocks. **Type:** Object @@ -8168,7 +8168,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Capabilities for image content in prompt suggestions. -Supplying `\{\}` means the Client can offer suggestions that include images. +Supplying `{}` means the Client can offer suggestions that include images. **Type:** Object @@ -8319,7 +8319,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Provider configuration capabilities supported by the Agent. -Supplying `\{\}` means the Agent supports provider configuration methods. +Supplying `{}` means the Agent supports provider configuration methods. **Type:** Object @@ -8811,7 +8811,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/d Capabilities for additional session directories support. -Supplying `\{\}` means the Agent supports the `additionalDirectories` field on +Supplying `{}` means the Agent supports the `additionalDirectories` field on supported session lifecycle requests. Agents MAY return `SessionInfo.additionalDirectories` in `session/list` to report the complete ordered additional-root list associated with a listed session. @@ -8837,7 +8837,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Capabilities for `session/archive` and `session/unarchive`. -Supplying `\{\}` means the Agent supports both methods, the `archived` filter on +Supplying `{}` means the Agent supports both methods, the `archived` filter on `session/list`, and `SessionInfo.archived`. **Type:** Object @@ -8891,7 +8891,7 @@ future ACP variants. Capability to cancel work in a subagent session without ending that session. -Supplying `\{\}` advertises support. An omitted or `null` `cancel` does not. +Supplying `{}` advertises support. An omitted or `null` `cancel` does not. **Type:** Object @@ -8910,7 +8910,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/d Session capabilities supported by the Agent. -Supplying `\{\}` means the Agent supports the baseline session methods: +Supplying `{}` means the Agent supports the baseline session methods: `session/new`, `session/list`, `session/resume`, `session/close`, `session/prompt`, `session/cancel`, and `session/update`. @@ -8936,7 +8936,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/d Whether the Agent supports `additionalDirectories` on supported session lifecycle requests. Optional. Omitted and `null` are equivalent and mean the Agent does not advertise support. -Supplying `\{\}` means the Agent supports `additionalDirectories` on +Supplying `{}` means the Agent supports `additionalDirectories` on supported session lifecycle requests. Agents MAY return `SessionInfo.additionalDirectories` to report the @@ -8951,7 +8951,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Whether the Agent supports `session/archive` and `session/unarchive`. Optional. Omitted and `null` are equivalent and mean the Agent does not advertise support. -Supplying `\{\}` means the Agent supports both methods, the `archived` filter on +Supplying `{}` means the Agent supports both methods, the `archived` filter on `session/list`, and `SessionInfo.archived`. @@ -8959,7 +8959,7 @@ Supplying `\{\}` means the Agent supports both methods, the `archived` filter on Whether the Agent supports `session/delete`. Optional. Omitted and `null` are equivalent and mean the Agent does not advertise support. -Supplying `\{\}` means the Agent supports deleting sessions from `session/list`. +Supplying `{}` means the Agent supports deleting sessions from `session/list`. SessionForkCapabilities | null} > @@ -8970,7 +8970,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Whether the Agent supports `session/fork`. Optional. Omitted and `null` are equivalent and mean the Agent does not advertise support. -Supplying `\{\}` means the Agent supports forking sessions. +Supplying `{}` means the Agent supports forking sessions. McpCapabilities | null} > @@ -8988,7 +8988,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Whether the Agent supports `session/options`. Optional. Omitted or `null` both mean the Agent does not advertise support. -Supplying `\{\}` means the Agent supports `session/options` and accepts initial +Supplying `{}` means the Agent supports `session/options` and accepts initial config option values on session setup requests. @@ -9008,14 +9008,14 @@ This capability is not part of the spec yet, and may be removed or changed at an Whether the Agent supports `session/status`. Optional. Omitted and `null` are equivalent and mean the Agent does not advertise support. -Supplying `\{\}` means the Agent supports checking session status. +Supplying `{}` means the Agent supports checking session status. SessionSystemPromptCapabilities | null} > Whether the Agent supports `systemPrompt` on session lifecycle requests. Optional. Omitted and `null` are equivalent and mean the Agent does not advertise support. -Supplying `\{\}` means the Agent supports `systemPrompt` in `append` mode. +Supplying `{}` means the Agent supports `systemPrompt` in `append` mode. SessionTitleCapabilities | null} > @@ -9029,7 +9029,7 @@ Agents report titles through `session/list` and `session_info_update` without th capability. It only advertises that Clients can set titles. Optional. Omitted and `null` are equivalent and mean the Agent does not advertise support. -Supplying `\{\}` means the Agent supports setting session titles. +Supplying `{}` means the Agent supports setting session titles. @@ -9309,7 +9309,7 @@ Unique identifier for a session configuration option value. Capabilities for the `session/delete` method. -Supplying `\{\}` means the Agent supports deleting sessions from `session/list`. +Supplying `{}` means the Agent supports deleting sessions from `session/list`. **Type:** Object @@ -9332,7 +9332,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Capabilities for the `session/fork` method. -Supplying `\{\}` means the Agent supports forking sessions. +Supplying `{}` means the Agent supports forking sessions. **Type:** Object @@ -9569,7 +9569,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Capabilities for the `session/options` method. -Supplying `\{\}` means the Agent supports `session/options` and accepts initial config +Supplying `{}` means the Agent supports `session/options` and accepts initial config option values on session setup requests. **Type:** Object @@ -9656,7 +9656,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Capabilities for the `session/status` method. -Supplying `\{\}` means the Agent supports checking session status. +Supplying `{}` means the Agent supports checking session status. **Type:** Object @@ -9675,7 +9675,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/d Capabilities for Client-provided system prompts. -Supplying `\{\}` means the Agent supports `systemPrompt` on session lifecycle +Supplying `{}` means the Agent supports `systemPrompt` on session lifecycle requests in `append` mode. **Type:** Object @@ -9720,7 +9720,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/d Whether the Agent supports `override` mode. Optional. Omitted and `null` are equivalent and mean the Agent does not advertise support. -Supplying `\{\}` means the Agent supports replacing its built-in default +Supplying `{}` means the Agent supports replacing its built-in default instructions with the Client-provided system prompt. @@ -9729,7 +9729,7 @@ instructions with the Client-provided system prompt. Capabilities for the `override` system prompt mode. -Supplying `\{\}` means the Agent supports replacing its built-in default +Supplying `{}` means the Agent supports replacing its built-in default instructions with the Client-provided system prompt. **Type:** Object @@ -9753,7 +9753,7 @@ This capability is not part of the spec yet, and may be removed or changed at an Capabilities for Client-set session titles. -Supplying `\{\}` means the Agent supports `session/set_title`. Agents report titles +Supplying `{}` means the Agent supports `session/set_title`. Agents report titles through `session/list` and `session_info_update` without this capability. **Type:** Object @@ -11618,7 +11618,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/d SessionCancelCapabilities | null} > Permits the Client to cancel this child's current work without ending the session. Omitted and `null` are equivalent and mean unsupported. An object (including -`\{\}`) means supported. +`{}`) means supported. ## SubagentUpdate @@ -11833,7 +11833,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/d Capabilities for terminal authentication methods. -Supplying `\{\}` means the Client can reproduce the configured Agent +Supplying `{}` means the Client can reproduce the configured Agent invocation in an interactive terminal and supports terminal authentication methods. @@ -11854,7 +11854,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/d Capability to cancel a terminal with `terminal/cancel`. -Supplying `\{\}` advertises support. An omitted or `null` `cancel` does not. +Supplying `{}` advertises support. An omitted or `null` `cancel` does not. **Type:** Object @@ -11890,7 +11890,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/d TerminalCancelCapabilities | null} > Permits the Client to cancel this terminal with `terminal/cancel`. -Omitted and `null` are equivalent and mean unsupported. An object (including `\{\}`) +Omitted and `null` are equivalent and mean unsupported. An object (including `{}`) means supported. Agents SHOULD stop advertising it once the terminal reports `exitStatus`. @@ -12176,7 +12176,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/d Capability to cancel a tool call with `tool_call/cancel`. -Supplying `\{\}` advertises support. An omitted or `null` `cancel` does not. +Supplying `{}` advertises support. An omitted or `null` `cancel` does not. **Type:** Object @@ -12212,7 +12212,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/d ToolCallCancelCapabilities | null} > Permits the Client to cancel this tool call with `tool_call/cancel`. -Omitted and `null` are equivalent and mean unsupported. An object (including `\{\}`) +Omitted and `null` are equivalent and mean unsupported. An object (including `{}`) means supported. Agents SHOULD stop advertising it once the tool call reaches a final status. diff --git a/docs/protocol/v2/schema.mdx b/docs/protocol/v2/schema.mdx index 0ce545187..569cbdc3e 100644 --- a/docs/protocol/v2/schema.mdx +++ b/docs/protocol/v2/schema.mdx @@ -756,7 +756,7 @@ NOT restore servers from earlier requests. Optional. Omitted and `null` are equivalent, and the Agent MUST NOT replay previous conversation history. Replay cursors are inclusive: replay includes the position identified by the cursor. Supplying -`\{ "type": "start" \}` means the Agent MUST replay all retained +`{ "type": "start" }` means the Agent MUST replay all retained conversation history before responding. Agents MUST reject unsupported cursor types or malformed cursor values @@ -1659,7 +1659,7 @@ non-empty `authMethods` list in the `initialize` response. Session capabilities supported by the Agent. Optional. Omitted and `null` are equivalent and mean the Agent does not support the -`session/*` methods. Supplying `\{\}` means the Agent supports the +`session/*` methods. Supplying `{}` means the Agent supports the baseline session methods: `session/new`, `session/list`, `session/resume`, `session/close`, `session/prompt`, `session/cancel`, and `session/update`. @@ -2450,7 +2450,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/e Whether the Client supports `terminal` authentication methods. Optional. Omitted and `null` are equivalent and mean the Client does not advertise support. -Supplying `\{\}` means the Client can reproduce the configured Agent +Supplying `{}` means the Client can reproduce the configured Agent invocation in an interactive terminal, and the Agent MAY include `terminal` entries in its authentication methods. @@ -3378,14 +3378,14 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/e Whether the Client supports form-based elicitation. Optional. Omitted and `null` are equivalent and mean form support is not advertised. -Supplying `\{\}` explicitly advertises form support. +Supplying `{}` explicitly advertises form support. ElicitationUrlCapabilities | null} > Whether the Client supports URL-based elicitation. Optional. Omitted and `null` are equivalent and mean the Client does not advertise support. -Supplying `\{\}` means the Client supports URL-based elicitation. +Supplying `{}` means the Client supports URL-based elicitation. @@ -3427,7 +3427,7 @@ other value. Form-based elicitation capabilities. -Supplying `\{\}` means the Client supports form-based elicitation. +Supplying `{}` means the Client supports form-based elicitation. **Type:** Object @@ -3902,7 +3902,7 @@ session without a specific tool call. URL-based elicitation capabilities. -Supplying `\{\}` means the Client supports URL-based elicitation. +Supplying `{}` means the Client supports URL-based elicitation. **Type:** Object @@ -4719,14 +4719,14 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/e Agent supports `http` MCP servers. Optional. Omitted and `null` are equivalent and mean the Agent does not advertise support. -Supplying `\{\}` means the Agent supports HTTP MCP server transports. +Supplying `{}` means the Agent supports HTTP MCP server transports. McpStdioCapabilities | null} > Agent supports `stdio` MCP servers. Optional. Omitted and `null` are equivalent and mean the Agent does not advertise support. -Supplying `\{\}` means the Agent supports stdio MCP server transports. +Supplying `{}` means the Agent supports stdio MCP server transports. @@ -4734,7 +4734,7 @@ Supplying `\{\}` means the Agent supports stdio MCP server transports. Capabilities for HTTP MCP server transports. -Supplying `\{\}` means the Agent supports HTTP MCP server transports. +Supplying `{}` means the Agent supports HTTP MCP server transports. **Type:** Object @@ -4938,7 +4938,7 @@ Agents reject a request with a duplicate `name` with `-32602`. Capabilities for stdio MCP server transports. -Supplying `\{\}` means the Agent supports stdio MCP server transports. +Supplying `{}` means the Agent supports stdio MCP server transports. **Type:** Object @@ -5573,7 +5573,7 @@ future ACP variants. Capabilities for audio content in prompt requests. -Supplying `\{\}` means the Agent supports audio content in prompts. +Supplying `{}` means the Agent supports audio content in prompts. **Type:** Object @@ -5619,7 +5619,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/e Agent supports `audio` content blocks. Optional. Omitted and `null` are equivalent and mean the Agent does not advertise support. -Supplying `\{\}` means the Agent supports audio content in prompts. +Supplying `{}` means the Agent supports audio content in prompts. PromptEmbeddedContextCapabilities | null} > @@ -5629,14 +5629,14 @@ When enabled, the Client is allowed to include `resource` content blocks in prompt requests for pieces of context that are referenced in the message. Optional. Omitted and `null` are equivalent and mean the Agent does not advertise support. -Supplying `\{\}` means the Agent supports embedded context in prompts. +Supplying `{}` means the Agent supports embedded context in prompts. PromptImageCapabilities | null} > Agent supports `image` content blocks. Optional. Omitted and `null` are equivalent and mean the Agent does not advertise support. -Supplying `\{\}` means the Agent supports image content in prompts. +Supplying `{}` means the Agent supports image content in prompts. @@ -5644,7 +5644,7 @@ Supplying `\{\}` means the Agent supports image content in prompts. Capabilities for embedded context in prompt requests. -Supplying `\{\}` means the Agent supports embedded context in prompts. +Supplying `{}` means the Agent supports embedded context in prompts. **Type:** Object @@ -5663,7 +5663,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/e Capabilities for image content in prompt requests. -Supplying `\{\}` means the Agent supports image content in prompts. +Supplying `{}` means the Agent supports image content in prompts. **Type:** Object @@ -6169,7 +6169,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/e Capabilities for additional session directories support. -Supplying `\{\}` means the Agent supports the `additionalDirectories` field on +Supplying `{}` means the Agent supports the `additionalDirectories` field on supported session lifecycle requests. Agents MAY return `SessionInfo.additionalDirectories` in `session/list` to report the complete ordered additional-root list associated with a listed session. @@ -6191,7 +6191,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/e Capability to cancel work in a subagent session without ending that session. -Supplying `\{\}` advertises support. An omitted or `null` `cancel` does not. +Supplying `{}` advertises support. An omitted or `null` `cancel` does not. **Type:** Object @@ -6210,7 +6210,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/e Session capabilities supported by the Agent. -Supplying `\{\}` means the Agent supports the baseline session methods: +Supplying `{}` means the Agent supports the baseline session methods: `session/new`, `session/list`, `session/resume`, `session/close`, `session/prompt`, `session/cancel`, and `session/update`. @@ -6236,7 +6236,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/e Whether the Agent supports `additionalDirectories` on supported session lifecycle requests. Optional. Omitted and `null` are equivalent and mean the Agent does not advertise support. -Supplying `\{\}` means the Agent supports `additionalDirectories` on +Supplying `{}` means the Agent supports `additionalDirectories` on supported session lifecycle requests. Agents MAY return `SessionInfo.additionalDirectories` to report the @@ -6247,7 +6247,7 @@ complete ordered additional-root list associated with a listed session. Whether the Agent supports `session/delete`. Optional. Omitted and `null` are equivalent and mean the Agent does not advertise support. -Supplying `\{\}` means the Agent supports deleting sessions from `session/list`. +Supplying `{}` means the Agent supports deleting sessions from `session/list`. McpCapabilities | null} > @@ -6269,7 +6269,7 @@ required by `session/prompt`. Whether the Agent supports `systemPrompt` on session lifecycle requests. Optional. Omitted and `null` are equivalent and mean the Agent does not advertise support. -Supplying `\{\}` means the Agent supports `systemPrompt` in `append` mode. +Supplying `{}` means the Agent supports `systemPrompt` in `append` mode. @@ -6549,7 +6549,7 @@ Unique identifier for a session configuration option value. Capabilities for the `session/delete` method. -Supplying `\{\}` means the Agent supports deleting sessions from `session/list`. +Supplying `{}` means the Agent supports deleting sessions from `session/list`. **Type:** Object @@ -6797,7 +6797,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/e Capabilities for Client-provided system prompts. -Supplying `\{\}` means the Agent supports `systemPrompt` on session lifecycle +Supplying `{}` means the Agent supports `systemPrompt` on session lifecycle requests in `append` mode. **Type:** Object @@ -6842,7 +6842,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/e Whether the Agent supports `override` mode. Optional. Omitted and `null` are equivalent and mean the Agent does not advertise support. -Supplying `\{\}` means the Agent supports replacing its built-in default +Supplying `{}` means the Agent supports replacing its built-in default instructions with the Client-provided system prompt. @@ -6851,7 +6851,7 @@ instructions with the Client-provided system prompt. Capabilities for the `override` system prompt mode. -Supplying `\{\}` means the Agent supports replacing its built-in default +Supplying `{}` means the Agent supports replacing its built-in default instructions with the Client-provided system prompt. **Type:** Object @@ -8518,7 +8518,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/e SessionCancelCapabilities | null} > Permits the Client to cancel this child's current work without ending the session. Omitted and `null` are equivalent and mean unsupported. An object (including -`\{\}`) means supported. +`{}`) means supported. ## SubagentUpdate @@ -8733,7 +8733,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/e Capabilities for terminal authentication methods. -Supplying `\{\}` means the Client can reproduce the configured Agent +Supplying `{}` means the Client can reproduce the configured Agent invocation in an interactive terminal and supports terminal authentication methods. @@ -8754,7 +8754,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/e Capability to cancel a terminal with `terminal/cancel`. -Supplying `\{\}` advertises support. An omitted or `null` `cancel` does not. +Supplying `{}` advertises support. An omitted or `null` `cancel` does not. **Type:** Object @@ -8790,7 +8790,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/e TerminalCancelCapabilities | null} > Permits the Client to cancel this terminal with `terminal/cancel`. -Omitted and `null` are equivalent and mean unsupported. An object (including `\{\}`) +Omitted and `null` are equivalent and mean unsupported. An object (including `{}`) means supported. Agents SHOULD stop advertising it once the terminal reports `exitStatus`. @@ -9076,7 +9076,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/e Capability to cancel a tool call with `tool_call/cancel`. -Supplying `\{\}` advertises support. An omitted or `null` `cancel` does not. +Supplying `{}` advertises support. An omitted or `null` `cancel` does not. **Type:** Object @@ -9112,7 +9112,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/e ToolCallCancelCapabilities | null} > Permits the Client to cancel this tool call with `tool_call/cancel`. -Omitted and `null` are equivalent and mean unsupported. An object (including `\{\}`) +Omitted and `null` are equivalent and mean unsupported. An object (including `{}`) means supported. Agents SHOULD stop advertising it once the tool call reaches a final status. diff --git a/schema-generator/src/main.rs b/schema-generator/src/main.rs index 6856f0f51..565d9e6db 100644 --- a/schema-generator/src/main.rs +++ b/schema-generator/src/main.rs @@ -3103,11 +3103,27 @@ or Client **MAY** ignore a `$/` notification it cannot act on." } fn escape_mdx(text: &str) -> String { - text.replace('|', "\\|") - .replace('<', "<") - .replace('>', ">") - .replace('{', "\\{") - .replace('}', "\\}") + let mut escaped = String::with_capacity(text.len()); + // Braces start an MDX expression in prose and need escaping there. + // Inline code is literal, so an escape inside it would be shown. + let mut in_code = false; + for character in text.chars() { + match character { + '`' => { + in_code = !in_code; + escaped.push(character); + } + '|' => escaped.push_str("\\|"), + '<' => escaped.push_str("<"), + '>' => escaped.push_str(">"), + '{' | '}' if !in_code => { + escaped.push('\\'); + escaped.push(character); + } + _ => escaped.push(character), + } + } + escaped } fn escape_description(text: &str) -> String { @@ -3448,6 +3464,20 @@ or Client **MAY** ignore a `$/` notification it cannot act on." ); } + #[test] + fn escape_mdx_keeps_braces_in_inline_code() { + // MDX reads braces in prose as an expression, so they are escaped. + assert_eq!( + MarkdownGenerator::escape_mdx("Send {} or | none"), + "Send \\{\\} or <T> \\| none" + ); + // Inline code is literal: a backslash there is shown to the reader. + assert_eq!( + MarkdownGenerator::escape_mdx("Supplying `{}` means {yes}. Use `{ \"a\": {} }`."), + "Supplying `{}` means \\{yes\\}. Use `{ \"a\": {} }`." + ); + } + #[test] fn unconstrained_json_schema_renders_any_value() { assert_eq!(MarkdownGenerator::get_type_string(&json!({})), "\"any\"");