Skip to content
Open
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
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ unstable = [
"unstable_session_model",
"unstable_session_resume",
"unstable_session_usage",
"unstable_boolean_config",
]
unstable_cancel_request = []
unstable_session_fork = []
Expand All @@ -30,6 +31,7 @@ unstable_session_list = []
unstable_session_model = []
unstable_session_resume = []
unstable_session_usage = []
unstable_boolean_config = []

[[bin]]
name = "generate"
Expand Down
55 changes: 53 additions & 2 deletions docs/protocol/draft/schema.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -720,8 +720,9 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/exte
<ResponseField name="sessionId" type={<a href="#sessionid">SessionId</a>} required>
The ID of the session to set the configuration option for.
</ResponseField>
<ResponseField name="value" type={<a href="#sessionconfigvalueid">SessionConfigValueId</a>} required>
The ID of the configuration option value to set.
<ResponseField name="value" type={<a href="#sessionconfigoptionvalue">SessionConfigOptionValue</a>} required>
The value to set. For `select` options, this is a `SessionConfigValueId` string.
For `boolean` options, this is a boolean.
</ResponseField>

#### <span class="font-mono">SetSessionConfigOptionResponse</span>
Expand Down Expand Up @@ -2969,6 +2970,22 @@ Whether the agent supports `session/resume`.

</ResponseField>

## <span class="font-mono">SessionConfigBoolean</span>

**UNSTABLE**

This capability is not part of the spec yet, and may be removed or changed at any point.

A boolean on/off toggle session configuration option payload.

**Type:** Object

**Properties:**

<ResponseField name="currentValue" type={"boolean"} required>
The current value of the boolean option.
</ResponseField>

## <span class="font-mono">SessionConfigGroupId</span>

Unique identifier for a session configuration option value group.
Expand Down Expand Up @@ -3011,6 +3028,23 @@ Single-value selector (dropdown).
</Expandable>
</ResponseField>

<ResponseField name="boolean" type="object">
**UNSTABLE**

This capability is not part of the spec yet, and may be removed or changed at any point.

Boolean on/off toggle.

<Expandable title="Properties">

<ResponseField name="currentValue" type={"boolean"} required>
The current value of the boolean option.
</ResponseField>
<ResponseField name="type" type={"string"} required></ResponseField>

</Expandable>
</ResponseField>

## <span class="font-mono">SessionConfigOptionCategory</span>

Semantic category for a session configuration option.
Expand Down Expand Up @@ -3041,6 +3075,23 @@ Category names that do not begin with `_` are reserved for the ACP spec.
Unknown / uncategorized selector.
</ResponseField>

## <span class="font-mono">SessionConfigOptionValue</span>

The value to set for a session configuration option.

For `select` options, the value is a `SessionConfigValueId` string.
For `boolean` options, the value is a boolean.

**Type:** Union

<ResponseField name="String">
A string value (used by `select` options).
</ResponseField>

<ResponseField name="Bool" type="boolean">
A boolean value (used by `boolean` options).
</ResponseField>

## <span class="font-mono">SessionConfigSelect</span>

A single-value selector (dropdown) session configuration option payload.
Expand Down
22 changes: 20 additions & 2 deletions docs/protocol/schema.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -448,8 +448,9 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/exte
<ResponseField name="sessionId" type={<a href="#sessionid">SessionId</a>} required>
The ID of the session to set the configuration option for.
</ResponseField>
<ResponseField name="value" type={<a href="#sessionconfigvalueid">SessionConfigValueId</a>} required>
The ID of the configuration option value to set.
<ResponseField name="value" type={<a href="#sessionconfigoptionvalue">SessionConfigOptionValue</a>} required>
The value to set. For `select` options, this is a `SessionConfigValueId` string.
For `boolean` options, this is a boolean.
</ResponseField>

#### <span class="font-mono">SetSessionConfigOptionResponse</span>
Expand Down Expand Up @@ -2559,6 +2560,23 @@ Category names that do not begin with `_` are reserved for the ACP spec.
Unknown / uncategorized selector.
</ResponseField>

## <span class="font-mono">SessionConfigOptionValue</span>

The value to set for a session configuration option.

For `select` options, the value is a `SessionConfigValueId` string.
For `boolean` options, the value is a boolean.

**Type:** Union

<ResponseField name="String">
A string value (used by `select` options).
</ResponseField>

<ResponseField name="Bool" type="boolean">
A boolean value (used by `boolean` options).
</ResponseField>

## <span class="font-mono">SessionConfigSelect</span>

A single-value selector (dropdown) session configuration option payload.
Expand Down
30 changes: 26 additions & 4 deletions docs/protocol/session-config-options.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ During [Session Setup](./session-setup) the Agent **MAY** return a list of confi
"description": "The most powerful model"
}
]
},
{
"id": "brave_mode",
"name": "Brave Mode",
"description": "Skip confirmation prompts and act autonomously",
"type": "boolean",
"currentValue": false
}
]
}
Expand Down Expand Up @@ -93,9 +100,13 @@ During [Session Setup](./session-setup) the Agent **MAY** return a list of confi
</ResponseField>

<ResponseField name="type" type="ConfigOptionType" required>
The type of input control. Currently only `select` is supported.
The type of input control. Supported types are `select` and `boolean`.
</ResponseField>

### Select Options

When `type` is `select`, the following fields are used:

<ResponseField name="currentValue" type="string" required>
The currently selected value for this option
</ResponseField>
Expand All @@ -104,6 +115,16 @@ During [Session Setup](./session-setup) the Agent **MAY** return a list of confi
The available values for this option
</ResponseField>

### Boolean Options

When `type` is `boolean`, the following fields are used:

<ResponseField name="currentValue" type="boolean" required>
The current boolean state of the option (`true` for on, `false` for off)
</ResponseField>

Boolean options are intended for simple on/off toggles such as "Brave Mode", "Produce Report", or "Read Only". Clients **SHOULD** render them as toggle switches or checkboxes.

### ConfigOptionValue

<ResponseField name="value" type="string" required>
Expand Down Expand Up @@ -186,9 +207,10 @@ Clients can change a config option value by calling the `session/set_config_opti
The `id` of the configuration option to change
</ParamField>

<ParamField path="value" type="string" required>
The new value to set. Must be one of the values listed in the option's
`options` array.
<ParamField path="value" type="string | boolean" required>
The new value to set. For `select` options, this must be one of the values
listed in the option's `options` array. For `boolean` options, this must be a
boolean (`true` or `false`).
</ParamField>

The Agent **MUST** respond with the complete list of all configuration options and their current values:
Expand Down
23 changes: 21 additions & 2 deletions schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2333,6 +2333,25 @@
],
"description": "Semantic category for a session configuration option.\n\nThis is intended to help Clients distinguish broadly common selectors (e.g. model selector vs\nsession mode selector vs thought/reasoning level) for UX purposes (keyboard shortcuts, icons,\nplacement). It MUST NOT be required for correctness. Clients MUST handle missing or unknown\ncategories gracefully.\n\nCategory names beginning with `_` are free for custom use, like other ACP extension methods.\nCategory names that do not begin with `_` are reserved for the ACP spec."
},
"SessionConfigOptionValue": {
"anyOf": [
{
"allOf": [
{
"$ref": "#/$defs/SessionConfigValueId"
}
],
"description": "A string value (used by `select` options).",
"title": "String"
},
{
"description": "A boolean value (used by `boolean` options).",
"title": "Bool",
"type": "boolean"
}
],
"description": "The value to set for a session configuration option.\n\nFor `select` options, the value is a `SessionConfigValueId` string.\nFor `boolean` options, the value is a boolean."
},
"SessionConfigSelect": {
"description": "A single-value selector (dropdown) session configuration option payload.",
"properties": {
Expand Down Expand Up @@ -2705,10 +2724,10 @@
"value": {
"allOf": [
{
"$ref": "#/$defs/SessionConfigValueId"
"$ref": "#/$defs/SessionConfigOptionValue"
}
],
"description": "The ID of the configuration option value to set."
"description": "The value to set. For `select` options, this is a `SessionConfigValueId` string.\nFor `boolean` options, this is a boolean."
}
},
"required": ["sessionId", "configId", "value"],
Expand Down
50 changes: 48 additions & 2 deletions schema/schema.unstable.json
Original file line number Diff line number Diff line change
Expand Up @@ -2656,6 +2656,17 @@
},
"type": "object"
},
"SessionConfigBoolean": {
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nA boolean on/off toggle session configuration option payload.",
"properties": {
"currentValue": {
"description": "The current value of the boolean option.",
"type": "boolean"
}
},
"required": ["currentValue"],
"type": "object"
},
"SessionConfigGroupId": {
"description": "Unique identifier for a session configuration option value group.",
"type": "string"
Expand Down Expand Up @@ -2685,6 +2696,22 @@
},
"required": ["type"],
"type": "object"
},
{
"allOf": [
{
"$ref": "#/$defs/SessionConfigBoolean"
}
],
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nBoolean on/off toggle.",
"properties": {
"type": {
"const": "boolean",
"type": "string"
}
},
"required": ["type"],
"type": "object"
}
],
"properties": {
Expand Down Expand Up @@ -2749,6 +2776,25 @@
],
"description": "Semantic category for a session configuration option.\n\nThis is intended to help Clients distinguish broadly common selectors (e.g. model selector vs\nsession mode selector vs thought/reasoning level) for UX purposes (keyboard shortcuts, icons,\nplacement). It MUST NOT be required for correctness. Clients MUST handle missing or unknown\ncategories gracefully.\n\nCategory names beginning with `_` are free for custom use, like other ACP extension methods.\nCategory names that do not begin with `_` are reserved for the ACP spec."
},
"SessionConfigOptionValue": {
"anyOf": [
{
"allOf": [
{
"$ref": "#/$defs/SessionConfigValueId"
}
],
"description": "A string value (used by `select` options).",
"title": "String"
},
{
"description": "A boolean value (used by `boolean` options).",
"title": "Bool",
"type": "boolean"
}
],
"description": "The value to set for a session configuration option.\n\nFor `select` options, the value is a `SessionConfigValueId` string.\nFor `boolean` options, the value is a boolean."
},
"SessionConfigSelect": {
"description": "A single-value selector (dropdown) session configuration option payload.",
"properties": {
Expand Down Expand Up @@ -3264,10 +3310,10 @@
"value": {
"allOf": [
{
"$ref": "#/$defs/SessionConfigValueId"
"$ref": "#/$defs/SessionConfigOptionValue"
}
],
"description": "The ID of the configuration option value to set."
"description": "The value to set. For `select` options, this is a `SessionConfigValueId` string.\nFor `boolean` options, this is a boolean."
}
},
"required": ["sessionId", "configId", "value"],
Expand Down
Loading