Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions agent-client-protocol-schema/src/v2/agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -995,6 +995,7 @@ impl AuthMethod {
}

/// Optional human-readable description of this authentication method.
/// May contain Markdown.
#[must_use]
pub fn description(&self) -> Option<&str> {
match self {
Expand Down Expand Up @@ -1127,6 +1128,7 @@ pub struct AuthMethodAgent {
/// Human-readable name of the authentication method.
pub name: String,
/// Optional human-readable description of this authentication method.
/// May contain Markdown.
///
/// Omitted and `null` are equivalent and mean no description is provided.
#[serde_as(deserialize_as = "DefaultOnError")]
Expand Down Expand Up @@ -1158,6 +1160,7 @@ impl AuthMethodAgent {
}

/// Optional human-readable description of this authentication method.
/// May contain Markdown.
#[must_use]
pub fn description(mut self, description: impl IntoOption<String>) -> Self {
self.description = description.into_option();
Expand Down Expand Up @@ -1195,6 +1198,7 @@ pub struct AuthMethodTerminal {
/// Human-readable name of the authentication method.
pub name: String,
/// Optional human-readable description of this authentication method.
/// May contain Markdown.
///
/// Omitted and `null` are equivalent and mean no description is provided.
#[serde_as(deserialize_as = "DefaultOnError")]
Expand Down Expand Up @@ -1256,6 +1260,7 @@ impl AuthMethodTerminal {
}

/// Optional human-readable description of this authentication method.
/// May contain Markdown.
#[must_use]
pub fn description(mut self, description: impl IntoOption<String>) -> Self {
self.description = description.into_option();
Expand Down Expand Up @@ -3791,6 +3796,7 @@ pub struct SessionConfigSelectOption {
/// Human-readable label for this option value.
pub name: String,
/// Optional description for this option value.
/// May contain Markdown.
///
/// Omitted and `null` are equivalent and mean no description is provided.
#[serde_as(deserialize_as = "DefaultOnError")]
Expand Down Expand Up @@ -4110,6 +4116,7 @@ pub struct SessionConfigOption {
/// Human-readable label for the option.
pub name: String,
/// Optional description for the Client to display to the user.
/// May contain Markdown.
///
/// Omitted and `null` are equivalent and mean no description is provided.
#[serde_as(deserialize_as = "DefaultOnError")]
Expand Down
6 changes: 6 additions & 0 deletions agent-client-protocol-schema/src/v2/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1595,6 +1595,7 @@ pub struct SubagentUpdate {
#[serde(default, skip_serializing_if = "MaybeUndefined::is_undefined")]
pub title: MaybeUndefined<String>,
/// The parent's human-readable description of the child's role or purpose.
/// May contain Markdown.
///
/// Optional and nullable. Omitted means unchanged. `null` clears it. This is
/// current display metadata, not the history of instructions sent to the child.
Expand Down Expand Up @@ -3454,6 +3455,7 @@ impl AvailableCommand {
}

/// Human-readable description of what the command does.
/// May contain Markdown.
#[must_use]
pub fn description(&self) -> &str {
match self {
Expand Down Expand Up @@ -3500,6 +3502,7 @@ pub struct OtherAvailableCommand {
/// Command name. MUST NOT contain whitespace and MUST be unique within the command list.
pub name: String,
/// Human-readable description of what the command does.
/// May contain Markdown.
pub description: String,
/// The remaining fields of the unknown command payload, preserved verbatim, including
/// `_meta`.
Expand Down Expand Up @@ -3594,6 +3597,7 @@ pub struct Command {
/// MUST NOT contain whitespace and MUST be unique within the command list.
pub name: String,
/// Human-readable description of what the command does.
/// May contain Markdown.
pub description: String,
/// Input for the command if required
///
Expand Down Expand Up @@ -3675,6 +3679,7 @@ pub struct Skill {
/// frontmatter.
pub name: String,
/// Human-readable description of what the skill does, shown to users.
/// May contain Markdown.
pub description: String,
/// The absolute path of the file that defines the skill, normally its
/// `SKILL.md`, on the machine the Agent runs on.
Expand Down Expand Up @@ -3892,6 +3897,7 @@ pub struct RequestPermissionRequest {
/// subject's displayed title.
pub title: String,
/// Optional human-readable explanation of why permission is needed.
/// May contain Markdown.
///
/// This text is specific to the permission prompt and does not update any
/// subject's displayed content. Omitted and `null` are equivalent and mean no separate
Expand Down
2 changes: 2 additions & 0 deletions docs/protocol/v2/authentication.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ authentication through `auth/login`. Every authentication method **MUST** includ
}
```

The optional `description` may contain Markdown.

The `terminal` type tells the Client to run the configured Agent program
interactively:

Expand Down
4 changes: 3 additions & 1 deletion docs/protocol/v2/content.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ When displaying Agent output, Clients **SHOULD** show text content. For image, a

Text may be plain text or Markdown. Clients **SHOULD** render it as [CommonMark](https://spec.commonmark.org/), and **MAY** support [GitHub Flavored Markdown](https://github.github.com/gfm/) extensions such as tables. Adjacent text blocks form one continuous text, and Clients **SHOULD** join them without a separator before rendering. This applies wherever a text block appears, including user messages, thoughts, and tool-call content. See [Rendering Agent Content](/protocol/v2/security#rendering-agent-content) for raw HTML.

Other strings shown to users, such as a tool call `title`, a session `title`, and the `name` and `description` of a command or config option, are plain text unless the field's description says otherwise. Clients **SHOULD NOT** render them as Markdown.
Other strings shown to users, such as a tool call `title`, a session `title`, and the `name` of a command or config option, are plain text unless the field's description says otherwise. Clients **SHOULD NOT** render them as Markdown.

These `description` fields may contain Markdown, like a text block: the description of an [authentication method](/protocol/v2/authentication#authentication-method-types), a [command](/protocol/v2/slash-commands), a [config option](/protocol/v2/session-config-options) and each of its values, a [permission request](/protocol/v2/tool-calls#requesting-permission), and a [subagent](/protocol/v2/subagents). A [plan entry](/protocol/v2/agent-plan#plan-entries)'s `content` may too.

```json
{
Expand Down
2 changes: 2 additions & 0 deletions docs/protocol/v2/draft/authentication.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ authentication through `auth/login`. Every authentication method **MUST** includ
}
```

The optional `description` may contain Markdown.

The `terminal` type tells the Client to run the configured Agent program
interactively:

Expand Down
4 changes: 3 additions & 1 deletion docs/protocol/v2/draft/content.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ When displaying Agent output, Clients **SHOULD** show text content. For image, a

Text may be plain text or Markdown. Clients **SHOULD** render it as [CommonMark](https://spec.commonmark.org/), and **MAY** support [GitHub Flavored Markdown](https://github.github.com/gfm/) extensions such as tables. Adjacent text blocks form one continuous text, and Clients **SHOULD** join them without a separator before rendering. This applies wherever a text block appears, including user messages, thoughts, and tool-call content. See [Rendering Agent Content](/protocol/v2/draft/security#rendering-agent-content) for raw HTML.

Other strings shown to users, such as a tool call `title`, a session `title`, and the `name` and `description` of a command or config option, are plain text unless the field's description says otherwise. Clients **SHOULD NOT** render them as Markdown.
Other strings shown to users, such as a tool call `title`, a session `title`, and the `name` of a command or config option, are plain text unless the field's description says otherwise. Clients **SHOULD NOT** render them as Markdown.

These `description` fields may contain Markdown, like a text block: the description of an [authentication method](/protocol/v2/draft/authentication#authentication-method-types), a [command or skill](/protocol/v2/draft/slash-commands), a [config option](/protocol/v2/draft/session-config-options) and each of its values, a [permission request](/protocol/v2/draft/tool-calls#requesting-permission), and a [subagent](/protocol/v2/draft/subagents). A [plan entry](/protocol/v2/draft/agent-plan#plan-entries)'s `content` may too.

```json
{
Expand Down
14 changes: 14 additions & 0 deletions docs/protocol/v2/draft/schema.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2489,6 +2489,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/d
</ResponseField>
<ResponseField name="description" type={"string | null"} >
Optional human-readable explanation of why permission is needed.
May contain Markdown.

This text is specific to the permission prompt and does not update any
subject's displayed content. Omitted and `null` are equivalent and mean no separate
Expand Down Expand Up @@ -3119,6 +3120,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/d
</ResponseField>
<ResponseField name="description" type={"string | null"} >
Optional human-readable description of this authentication method.
May contain Markdown.

Omitted and `null` are equivalent and mean no description is provided.

Expand Down Expand Up @@ -3158,6 +3160,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/d
</ResponseField>
<ResponseField name="description" type={"string | null"} >
Optional human-readable description of this authentication method.
May contain Markdown.

Omitted and `null` are equivalent and mean no description is provided.

Expand Down Expand Up @@ -3226,6 +3229,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/d
</ResponseField>
<ResponseField name="description" type={"string | null"} >
Optional human-readable description of this authentication method.
May contain Markdown.

Omitted and `null` are equivalent and mean no description is provided.

Expand Down Expand Up @@ -3270,6 +3274,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/d
</ResponseField>
<ResponseField name="description" type={"string | null"} >
Optional human-readable description of this authentication method.
May contain Markdown.

Omitted and `null` are equivalent and mean no description is provided.

Expand Down Expand Up @@ -3368,6 +3373,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/d
</ResponseField>
<ResponseField name="description" type={"string"} required>
Human-readable description of what the command does.
May contain Markdown.
</ResponseField>
<ResponseField name="input" type={<><span><a href="#availablecommandinput">AvailableCommandInput</a></span><span> | null</span></>} >
Input for the command if required
Expand Down Expand Up @@ -3410,6 +3416,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/d
</ResponseField>
<ResponseField name="description" type={"string"} required>
Human-readable description of what the skill does, shown to users.
May contain Markdown.
</ResponseField>
<ResponseField name="name" type={"string"} required>
Skill name. The Client uses it to refer to the skill in a `skill` content block.
Expand Down Expand Up @@ -3450,6 +3457,7 @@ slash command.

<ResponseField name="description" type={"string"} required>
Human-readable description of what the command does.
May contain Markdown.
</ResponseField>
<ResponseField name="name" type={"string"} required>
Command name. MUST NOT contain whitespace and MUST be unique within the command list.
Expand Down Expand Up @@ -3940,6 +3948,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/d
</ResponseField>
<ResponseField name="description" type={"string"} required>
Human-readable description of what the command does.
May contain Markdown.
</ResponseField>
<ResponseField name="input" type={<><span><a href="#availablecommandinput">AvailableCommandInput</a></span><span> | null</span></>} >
Input for the command if required
Expand Down Expand Up @@ -9043,6 +9052,7 @@ Omitted and `null` are equivalent and mean no category is provided.
</ResponseField>
<ResponseField name="description" type={"string | null"} >
Optional description for the Client to display to the user.
May contain Markdown.

Omitted and `null` are equivalent and mean no description is provided.

Expand Down Expand Up @@ -9236,6 +9246,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/d
</ResponseField>
<ResponseField name="description" type={"string | null"} >
Optional description for this option value.
May contain Markdown.

Omitted and `null` are equivalent and mean no description is provided.

Expand Down Expand Up @@ -10854,6 +10865,7 @@ effective working directory.
</ResponseField>
<ResponseField name="description" type={"string | null"} >
The parent's human-readable description of the child's role or purpose.
May contain Markdown.

Optional and nullable. Omitted means unchanged. `null` clears it. This is
current display metadata, not the history of instructions sent to the child.
Expand Down Expand Up @@ -11027,6 +11039,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/d
</ResponseField>
<ResponseField name="description" type={"string"} required>
Human-readable description of what the skill does, shown to users.
May contain Markdown.
</ResponseField>
<ResponseField name="name" type={"string"} required>
Skill name. The Client uses it to refer to the skill in a `skill` content block.
Expand Down Expand Up @@ -11659,6 +11672,7 @@ effective working directory.
</ResponseField>
<ResponseField name="description" type={"string | null"} >
The parent's human-readable description of the child's role or purpose.
May contain Markdown.

Optional and nullable. Omitted means unchanged. `null` clears it. This is
current display metadata, not the history of instructions sent to the child.
Expand Down
5 changes: 3 additions & 2 deletions docs/protocol/v2/draft/session-config-options.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ An Agent whose session has configuration options **MUST** include them, with the
</ResponseField>

<ResponseField name="description" type="string">
Optional description providing more details about what this option controls
Optional description providing more details about what this option controls.
It may contain Markdown.
</ResponseField>

<ResponseField name="category" type="SessionConfigOptionCategory">
Expand Down Expand Up @@ -143,7 +144,7 @@ An Agent whose session has configuration options **MUST** include them, with the
</ResponseField>

<ResponseField name="description" type="string">
Optional description of what this value does
Optional description of what this value does. It may contain Markdown.
</ResponseField>

### Grouped select options
Expand Down
9 changes: 5 additions & 4 deletions docs/protocol/v2/draft/slash-commands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Each command carries a required `type` discriminator. The stable type is `comman
</ResponseField>

<ResponseField name="description" type="string" required>
Human-readable description of what the command does
Human-readable description of what the command does. It may contain Markdown.
</ResponseField>

<ResponseField name="input" type="AvailableCommandInput">
Expand Down Expand Up @@ -191,9 +191,10 @@ Skills are delivered like other commands, in `availableCommands` in setup respon
</ResponseField>

<ResponseField name="description" type="string" required>
Human-readable description of what the skill does, shown to users. A skill's
frontmatter description is written for the model and can be long. An Agent
that has a shorter description meant for users **SHOULD** send that one.
Human-readable description of what the skill does, shown to users. It may
contain Markdown. A skill's frontmatter description is written for the model
and can be long. An Agent that has a shorter description meant for users
**SHOULD** send that one.
</ResponseField>

<ResponseField name="path" type="string">
Expand Down
5 changes: 3 additions & 2 deletions docs/protocol/v2/draft/subagents.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ The rule also applies to short-lived work.
</ParamField>

<ParamField path="description" type="string">
The parent's description of the child's role or purpose. It is current display
text, not a record of the instructions sent to the child.
The parent's description of the child's role or purpose. It may contain
Markdown. It is current display text, not a record of the instructions sent to
the child.
</ParamField>

<ParamField path="capabilities" type="SubagentSessionCapabilities">
Expand Down
7 changes: 4 additions & 3 deletions docs/protocol/v2/draft/tool-calls.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,10 @@ The Agent **MAY** request permission from the user before proceeding with an ope
</ParamField>

<ParamField path="description" type="string">
Optional explanation shown with the permission prompt. This text is separate
from any `toolCall` update and does not replace tool-call content. Omitted or
`null` means no separate permission description was provided.
Optional explanation shown with the permission prompt. It may contain
Markdown. This text is separate from any `toolCall` update and does not
replace tool-call content. Omitted or `null` means no separate permission
description was provided.
</ParamField>

<ParamField path="subject" type="RequestPermissionSubject">
Expand Down
2 changes: 1 addition & 1 deletion docs/protocol/v2/migration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,7 @@ Agents **MUST** reject a prompt that contains a content type that is neither bas

If you maintain a validator or generated models, v2 also tightens schema-level details that v1 left loose: base64 payloads (image/audio and terminal `data`, resource `blob`) are marked with `contentEncoding: "base64"`, URI fields are marked `format: "uri"`, `SessionInfo.updatedAt` and `SessionInfoUpdate.updatedAt` are marked `format: "date-time"`, `annotations.priority` is bounded to the inclusive range 0 to 1, multi-select elicitation `items` need at least one option, `session/prompt` `prompt` and `systemPrompt` `content` each need at least one content block, permission `options`, config `select` options, each config option group's `options`, and single-select elicitation `enum` and `oneOf` each need at least one entry, a tool call location's `line` starts at 1, `resource_link` `size` is unsigned, form-mode `requestedSchema` requires `type: "object"` and `properties`, and setup-response `configOptions` is no longer nullable: omit it rather than sending `null`. Two details are looser: a value in an accepted elicitation's `content` can be any JSON value, for custom or future property types, and `TerminalExitStatus.exitCode` is signed, so it can be negative.

v2 also says which text is Markdown. Text content blocks may contain Markdown, as in v1. A plan entry `content` may contain Markdown too. Other strings shown to users, such as a tool call `title`, are plain text, and Clients do not render them as Markdown. v1 did not state a format for either.
v2 also says which text is Markdown. Text content blocks may contain Markdown, as in v1. A plan entry `content` may contain Markdown too, and so may the `description` of an authentication method, a command, a config option and each of its values, a permission request, and a subagent. Other strings shown to users, such as a tool call `title`, are plain text, and Clients do not render them as Markdown. v1 did not state a format for either.

## Slash commands

Expand Down
Loading