From aa253193bd023cafcce76c7fecc66ae0fc05a7c5 Mon Sep 17 00:00:00 2001 From: Ben Brandt Date: Tue, 27 Jan 2026 10:36:21 +0100 Subject: [PATCH 1/3] feat: Stabilize Session Config Options --- Cargo.toml | 2 - docs/docs.json | 10 +- docs/protocol/draft/schema.mdx | 84 +---- docs/protocol/schema.mdx | 266 ++++++++++++++ .../{draft => }/session-config-options.mdx | 0 docs/protocol/session-modes.mdx | 6 + schema/meta.json | 1 + schema/schema.json | 325 ++++++++++++++++++ schema/schema.unstable.json | 36 +- src/agent.rs | 126 ------- src/client.rs | 17 +- src/rpc.rs | 1 - 12 files changed, 630 insertions(+), 244 deletions(-) rename docs/protocol/{draft => }/session-config-options.mdx (100%) diff --git a/Cargo.toml b/Cargo.toml index 0bc08b32..2e3cae3f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,6 @@ include = ["/src/**/*.rs", "/README.md", "/LICENSE", "/Cargo.toml"] [features] unstable = [ "unstable_cancel_request", - "unstable_session_config_options", "unstable_session_fork", "unstable_session_info_update", "unstable_session_list", @@ -25,7 +24,6 @@ unstable = [ "unstable_session_usage", ] unstable_cancel_request = [] -unstable_session_config_options = [] unstable_session_fork = [] unstable_session_info_update = [] unstable_session_list = [] diff --git a/docs/docs.json b/docs/docs.json index 14c283fb..1dde9e0c 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -122,8 +122,14 @@ "rfds/logout-method" ] }, - { "group": "Preview", "pages": ["rfds/session-config-options"] }, - { "group": "Completed", "pages": ["rfds/introduce-rfd-process"] } + { "group": "Preview", "pages": [] }, + { + "group": "Completed", + "pages": [ + "rfds/introduce-rfd-process", + "rfds/session-config-options" + ] + } ] }, { diff --git a/docs/protocol/draft/schema.mdx b/docs/protocol/draft/schema.mdx index 440a6d99..d1d6fc58 100644 --- a/docs/protocol/draft/schema.mdx +++ b/docs/protocol/draft/schema.mdx @@ -267,12 +267,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/exte SessionConfigOption[] | null} > - **UNSTABLE** - -This capability is not part of the spec yet, and may be removed or changed at any point. - -Initial session configuration options if supported by the Agent. - + Initial session configuration options if supported by the Agent. SessionModelState | null} > **UNSTABLE** @@ -424,12 +419,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/exte SessionConfigOption[] | null} > - **UNSTABLE** - -This capability is not part of the spec yet, and may be removed or changed at any point. - -Initial session configuration options if supported by the Agent. - + Initial session configuration options if supported by the Agent. SessionModelState | null} > **UNSTABLE** @@ -507,12 +497,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/exte SessionConfigOption[] | null} > - **UNSTABLE** - -This capability is not part of the spec yet, and may be removed or changed at any point. - -Initial session configuration options if supported by the Agent. - + Initial session configuration options if supported by the Agent. SessionModelState | null} > **UNSTABLE** @@ -691,12 +676,7 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/exte SessionConfigOption[] | null} > - **UNSTABLE** - -This capability is not part of the spec yet, and may be removed or changed at any point. - -Initial session configuration options if supported by the Agent. - + Initial session configuration options if supported by the Agent. SessionModelState | null} > **UNSTABLE** @@ -716,18 +696,10 @@ See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/sess ### session/set_config_option -**UNSTABLE** - -This capability is not part of the spec yet, and may be removed or changed at any point. - Sets the current value for a session configuration option. #### SetSessionConfigOptionRequest -**UNSTABLE** - -This capability is not part of the spec yet, and may be removed or changed at any point. - Request parameters for setting a session configuration option. **Type:** Object @@ -754,10 +726,6 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/exte #### SetSessionConfigOptionResponse -**UNSTABLE** - -This capability is not part of the spec yet, and may be removed or changed at any point. - Response to `session/set_config_option` method. **Type:** Object @@ -1737,10 +1705,6 @@ Determines which file operations the agent can request. ## ConfigOptionUpdate -**UNSTABLE** - -This capability is not part of the spec yet, and may be removed or changed at any point. - Session configuration options have been updated. **Type:** Object @@ -3007,30 +2971,18 @@ Whether the agent supports `session/resume`. ## SessionConfigGroupId -**UNSTABLE** - -This capability is not part of the spec yet, and may be removed or changed at any point. - Unique identifier for a session configuration option value group. **Type:** `string` ## SessionConfigId -**UNSTABLE** - -This capability is not part of the spec yet, and may be removed or changed at any point. - Unique identifier for a session configuration option. **Type:** `string` ## SessionConfigOption -**UNSTABLE** - -This capability is not part of the spec yet, and may be removed or changed at any point. - A session configuration option selector and its current state. **Type:** Union @@ -3061,10 +3013,6 @@ Single-value selector (dropdown). ## SessionConfigOptionCategory -**UNSTABLE** - -This capability is not part of the spec yet, and may be removed or changed at any point. - Semantic category for a session configuration option. This is intended to help Clients distinguish broadly common selectors (e.g. model selector vs @@ -3095,10 +3043,6 @@ Category names that do not begin with `_` are reserved for the ACP spec. ## SessionConfigSelect -**UNSTABLE** - -This capability is not part of the spec yet, and may be removed or changed at any point. - A single-value selector (dropdown) session configuration option payload. **Type:** Object @@ -3122,10 +3066,6 @@ A single-value selector (dropdown) session configuration option payload. ## SessionConfigSelectGroup -**UNSTABLE** - -This capability is not part of the spec yet, and may be removed or changed at any point. - A group of possible values for a session configuration option. **Type:** Object @@ -3152,10 +3092,6 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/exte ## SessionConfigSelectOption -**UNSTABLE** - -This capability is not part of the spec yet, and may be removed or changed at any point. - A possible value for a session configuration option. **Type:** Object @@ -3182,10 +3118,6 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/exte ## SessionConfigSelectOptions -**UNSTABLE** - -This capability is not part of the spec yet, and may be removed or changed at any point. - Possible values for a session configuration option. **Type:** Union @@ -3200,10 +3132,6 @@ Possible values for a session configuration option. ## SessionConfigValueId -**UNSTABLE** - -This capability is not part of the spec yet, and may be removed or changed at any point. - Unique identifier for a session configuration option value. **Type:** `string` @@ -3664,10 +3592,6 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/exte -**UNSTABLE** - -This capability is not part of the spec yet, and may be removed or changed at any point. - Session configuration options have been updated. diff --git a/docs/protocol/schema.mdx b/docs/protocol/schema.mdx index 4ce95265..2f7230ce 100644 --- a/docs/protocol/schema.mdx +++ b/docs/protocol/schema.mdx @@ -256,6 +256,9 @@ these keys. See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + +SessionConfigOption[] | null} > + Initial session configuration options if supported by the Agent. SessionModeState | null} > Initial mode state if supported by the Agent @@ -323,6 +326,9 @@ these keys. See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + +SessionConfigOption[] | null} > + Initial session configuration options if supported by the Agent. SessionModeState | null} > Initial mode state if supported by the Agent @@ -415,6 +421,57 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/exte Indicates why the agent stopped processing the turn. + +### session/set_config_option + +Sets the current value for a session configuration option. + +#### SetSessionConfigOptionRequest + +Request parameters for setting a session configuration option. + +**Type:** Object + +**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. + +See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + + +SessionConfigId} required> + The ID of the configuration option to set. + +SessionId} required> + The ID of the session to set the configuration option for. + +SessionConfigValueId} required> + The ID of the configuration option value to set. + + +#### SetSessionConfigOptionResponse + +Response to `session/set_config_option` method. + +**Type:** Object + +**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. + +See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + + +SessionConfigOption[]} required> + The full set of configuration options and their current values. + + ### session/set_mode @@ -1257,6 +1314,26 @@ Determines which file operations the agent can request. +## ConfigOptionUpdate + +Session configuration options have been updated. + +**Type:** Object + +**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. + +See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + + +SessionConfigOption[]} required> + The full set of configuration options and their current values. + + ## Content Standard content block (text, images, resources). @@ -2410,6 +2487,173 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/exte +## SessionConfigGroupId + +Unique identifier for a session configuration option value group. + +**Type:** `string` + +## SessionConfigId + +Unique identifier for a session configuration option. + +**Type:** `string` + +## SessionConfigOption + +A session configuration option selector and its current state. + +**Type:** Union + + +Single-value selector (dropdown). + + + +SessionConfigValueId} + required +> + The currently selected value. + +SessionConfigSelectOptions} + required +> + The set of selectable options. + + + + + + +## SessionConfigOptionCategory + +Semantic category for a session configuration option. + +This is intended to help Clients distinguish broadly common selectors (e.g. model selector vs +session mode selector vs thought/reasoning level) for UX purposes (keyboard shortcuts, icons, +placement). It MUST NOT be required for correctness. Clients MUST handle missing or unknown +categories gracefully. + +Category names beginning with `_` are free for custom use, like other ACP extension methods. +Category names that do not begin with `_` are reserved for the ACP spec. + +**Type:** Union + + + Session mode selector. + + + + Model selector. + + + + Thought/reasoning level selector. + + + + Unknown / uncategorized selector. + + +## SessionConfigSelect + +A single-value selector (dropdown) session configuration option payload. + +**Type:** Object + +**Properties:** + +SessionConfigValueId} + required +> + The currently selected value. + +SessionConfigSelectOptions} + required +> + The set of selectable options. + + +## SessionConfigSelectGroup + +A group of possible values for a session configuration option. + +**Type:** Object + +**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. + +See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + + +SessionConfigGroupId} required> + Unique identifier for this group. + + + Human-readable label for this group. + +SessionConfigSelectOption[]} required> + The set of option values in this group. + + +## SessionConfigSelectOption + +A possible value for a session configuration option. + +**Type:** Object + +**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. + +See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + + + + Optional description for this option value. + + + Human-readable label for this option value. + +SessionConfigValueId} required> + Unique identifier for this option value. + + +## SessionConfigSelectOptions + +Possible values for a session configuration option. + +**Type:** Union + + + A flat list of options with no grouping. + + + + A list of options grouped under headers. + + +## SessionConfigValueId + +Unique identifier for a session configuration option value. + +**Type:** `string` + ## SessionId A unique identifier for a conversation session between a client and agent. @@ -2712,6 +2956,28 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/exte + +Session configuration options have been updated. + + + + + 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. + +See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility) + + +SessionConfigOption[]} required> + The full set of configuration options and their current values. + + + + + + + ## StopReason Reasons why an agent stops processing a prompt turn. diff --git a/docs/protocol/draft/session-config-options.mdx b/docs/protocol/session-config-options.mdx similarity index 100% rename from docs/protocol/draft/session-config-options.mdx rename to docs/protocol/session-config-options.mdx diff --git a/docs/protocol/session-modes.mdx b/docs/protocol/session-modes.mdx index ddfb42bf..82dc1849 100644 --- a/docs/protocol/session-modes.mdx +++ b/docs/protocol/session-modes.mdx @@ -3,6 +3,12 @@ title: "Session Modes" description: "Switch between different agent operating modes" --- + + Session Modes have been replaced by [Session Config + Options](./session-config-options). Dedicated session mode methods will be + removed in a future version of the protocol. + + Agents can provide a set of modes they can operate in. Modes often affect the system prompts used, the availability of tools, and whether they request permission before running. ## Initial state diff --git a/schema/meta.json b/schema/meta.json index ec0ba7db..186ea1bd 100644 --- a/schema/meta.json +++ b/schema/meta.json @@ -6,6 +6,7 @@ "session_load": "session/load", "session_new": "session/new", "session_prompt": "session/prompt", + "session_set_config_option": "session/set_config_option", "session_set_mode": "session/set_mode" }, "clientMethods": { diff --git a/schema/schema.json b/schema/schema.json index eba17945..ae008f8c 100644 --- a/schema/schema.json +++ b/schema/schema.json @@ -244,6 +244,14 @@ ], "title": "SetSessionModeResponse" }, + { + "allOf": [ + { + "$ref": "#/$defs/SetSessionConfigOptionResponse" + } + ], + "title": "SetSessionConfigOptionResponse" + }, { "allOf": [ { @@ -623,6 +631,15 @@ "description": "Sets the current mode for a session.\n\nAllows switching between different agent modes (e.g., \"ask\", \"architect\", \"code\")\nthat affect system prompts, tool availability, and permission behaviors.\n\nThe mode must be one of the modes advertised in `availableModes` during session\ncreation or loading. Agents may also change modes autonomously and notify the\nclient via `current_mode_update` notifications.\n\nThis method can be called at any time during a session, whether the Agent is\nidle or actively generating a response.\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)", "title": "SetSessionModeRequest" }, + { + "allOf": [ + { + "$ref": "#/$defs/SetSessionConfigOptionRequest" + } + ], + "description": "Sets the current value for a session configuration option.", + "title": "SetSessionConfigOptionRequest" + }, { "allOf": [ { @@ -759,6 +776,25 @@ ], "x-docs-ignore": true }, + "ConfigOptionUpdate": { + "description": "Session configuration options have been updated.", + "properties": { + "_meta": { + "additionalProperties": true, + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": ["object", "null"] + }, + "configOptions": { + "description": "The full set of configuration options and their current values.", + "items": { + "$ref": "#/$defs/SessionConfigOption" + }, + "type": "array" + } + }, + "required": ["configOptions"], + "type": "object" + }, "Content": { "description": "Standard content block (text, images, resources).", "properties": { @@ -1442,6 +1478,13 @@ "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": ["object", "null"] }, + "configOptions": { + "description": "Initial session configuration options if supported by the Agent.", + "items": { + "$ref": "#/$defs/SessionConfigOption" + }, + "type": ["array", "null"] + }, "modes": { "anyOf": [ { @@ -1646,6 +1689,13 @@ "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", "type": ["object", "null"] }, + "configOptions": { + "description": "Initial session configuration options if supported by the Agent.", + "items": { + "$ref": "#/$defs/SessionConfigOption" + }, + "type": ["array", "null"] + }, "modes": { "anyOf": [ { @@ -2190,6 +2240,206 @@ }, "type": "object" }, + "SessionConfigGroupId": { + "description": "Unique identifier for a session configuration option value group.", + "type": "string" + }, + "SessionConfigId": { + "description": "Unique identifier for a session configuration option.", + "type": "string" + }, + "SessionConfigOption": { + "description": "A session configuration option selector and its current state.", + "discriminator": { + "propertyName": "type" + }, + "oneOf": [ + { + "allOf": [ + { + "$ref": "#/$defs/SessionConfigSelect" + } + ], + "description": "Single-value selector (dropdown).", + "properties": { + "type": { + "const": "select", + "type": "string" + } + }, + "required": ["type"], + "type": "object" + } + ], + "properties": { + "_meta": { + "additionalProperties": true, + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": ["object", "null"] + }, + "category": { + "anyOf": [ + { + "$ref": "#/$defs/SessionConfigOptionCategory" + }, + { + "type": "null" + } + ], + "description": "Optional semantic category for this option (UX only)." + }, + "description": { + "description": "Optional description for the Client to display to the user.", + "type": ["string", "null"] + }, + "id": { + "allOf": [ + { + "$ref": "#/$defs/SessionConfigId" + } + ], + "description": "Unique identifier for the configuration option." + }, + "name": { + "description": "Human-readable label for the option.", + "type": "string" + } + }, + "required": ["id", "name"], + "type": "object" + }, + "SessionConfigOptionCategory": { + "anyOf": [ + { + "const": "mode", + "description": "Session mode selector.", + "type": "string" + }, + { + "const": "model", + "description": "Model selector.", + "type": "string" + }, + { + "const": "thought_level", + "description": "Thought/reasoning level selector.", + "type": "string" + }, + { + "description": "Unknown / uncategorized selector.", + "title": "other", + "type": "string" + } + ], + "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." + }, + "SessionConfigSelect": { + "description": "A single-value selector (dropdown) session configuration option payload.", + "properties": { + "currentValue": { + "allOf": [ + { + "$ref": "#/$defs/SessionConfigValueId" + } + ], + "description": "The currently selected value." + }, + "options": { + "allOf": [ + { + "$ref": "#/$defs/SessionConfigSelectOptions" + } + ], + "description": "The set of selectable options." + } + }, + "required": ["currentValue", "options"], + "type": "object" + }, + "SessionConfigSelectGroup": { + "description": "A group of possible values for a session configuration option.", + "properties": { + "_meta": { + "additionalProperties": true, + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": ["object", "null"] + }, + "group": { + "allOf": [ + { + "$ref": "#/$defs/SessionConfigGroupId" + } + ], + "description": "Unique identifier for this group." + }, + "name": { + "description": "Human-readable label for this group.", + "type": "string" + }, + "options": { + "description": "The set of option values in this group.", + "items": { + "$ref": "#/$defs/SessionConfigSelectOption" + }, + "type": "array" + } + }, + "required": ["group", "name", "options"], + "type": "object" + }, + "SessionConfigSelectOption": { + "description": "A possible value for a session configuration option.", + "properties": { + "_meta": { + "additionalProperties": true, + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": ["object", "null"] + }, + "description": { + "description": "Optional description for this option value.", + "type": ["string", "null"] + }, + "name": { + "description": "Human-readable label for this option value.", + "type": "string" + }, + "value": { + "allOf": [ + { + "$ref": "#/$defs/SessionConfigValueId" + } + ], + "description": "Unique identifier for this option value." + } + }, + "required": ["value", "name"], + "type": "object" + }, + "SessionConfigSelectOptions": { + "anyOf": [ + { + "description": "A flat list of options with no grouping.", + "items": { + "$ref": "#/$defs/SessionConfigSelectOption" + }, + "title": "Ungrouped", + "type": "array" + }, + { + "description": "A list of options grouped under headers.", + "items": { + "$ref": "#/$defs/SessionConfigSelectGroup" + }, + "title": "Grouped", + "type": "array" + } + ], + "description": "Possible values for a session configuration option." + }, + "SessionConfigValueId": { + "description": "Unique identifier for a session configuration option value.", + "type": "string" + }, "SessionId": { "description": "A unique identifier for a conversation session between a client and agent.\n\nSessions maintain their own context, conversation history, and state,\nallowing multiple independent interactions with the same agent.\n\nSee protocol docs: [Session ID](https://agentclientprotocol.com/protocol/session-setup#session-id)", "type": "string" @@ -2409,9 +2659,84 @@ }, "required": ["sessionUpdate"], "type": "object" + }, + { + "allOf": [ + { + "$ref": "#/$defs/ConfigOptionUpdate" + } + ], + "description": "Session configuration options have been updated.", + "properties": { + "sessionUpdate": { + "const": "config_option_update", + "type": "string" + } + }, + "required": ["sessionUpdate"], + "type": "object" } ] }, + "SetSessionConfigOptionRequest": { + "description": "Request parameters for setting a session configuration option.", + "properties": { + "_meta": { + "additionalProperties": true, + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": ["object", "null"] + }, + "configId": { + "allOf": [ + { + "$ref": "#/$defs/SessionConfigId" + } + ], + "description": "The ID of the configuration option to set." + }, + "sessionId": { + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ], + "description": "The ID of the session to set the configuration option for." + }, + "value": { + "allOf": [ + { + "$ref": "#/$defs/SessionConfigValueId" + } + ], + "description": "The ID of the configuration option value to set." + } + }, + "required": ["sessionId", "configId", "value"], + "type": "object", + "x-method": "session/set_config_option", + "x-side": "agent" + }, + "SetSessionConfigOptionResponse": { + "description": "Response to `session/set_config_option` method.", + "properties": { + "_meta": { + "additionalProperties": true, + "description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", + "type": ["object", "null"] + }, + "configOptions": { + "description": "The full set of configuration options and their current values.", + "items": { + "$ref": "#/$defs/SessionConfigOption" + }, + "type": "array" + } + }, + "required": ["configOptions"], + "type": "object", + "x-method": "session/set_config_option", + "x-side": "agent" + }, "SetSessionModeRequest": { "description": "Request parameters for setting a session mode.", "properties": { diff --git a/schema/schema.unstable.json b/schema/schema.unstable.json index f1fe59d8..f6bed4ae 100644 --- a/schema/schema.unstable.json +++ b/schema/schema.unstable.json @@ -718,7 +718,7 @@ "$ref": "#/$defs/SetSessionConfigOptionRequest" } ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nSets the current value for a session configuration option.", + "description": "Sets the current value for a session configuration option.", "title": "SetSessionConfigOptionRequest" }, { @@ -867,7 +867,7 @@ "x-docs-ignore": true }, "ConfigOptionUpdate": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nSession configuration options have been updated.", + "description": "Session configuration options have been updated.", "properties": { "_meta": { "additionalProperties": true, @@ -1368,7 +1368,7 @@ "type": ["object", "null"] }, "configOptions": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nInitial session configuration options if supported by the Agent.", + "description": "Initial session configuration options if supported by the Agent.", "items": { "$ref": "#/$defs/SessionConfigOption" }, @@ -1722,7 +1722,7 @@ "type": ["object", "null"] }, "configOptions": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nInitial session configuration options if supported by the Agent.", + "description": "Initial session configuration options if supported by the Agent.", "items": { "$ref": "#/$defs/SessionConfigOption" }, @@ -1976,7 +1976,7 @@ "type": ["object", "null"] }, "configOptions": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nInitial session configuration options if supported by the Agent.", + "description": "Initial session configuration options if supported by the Agent.", "items": { "$ref": "#/$defs/SessionConfigOption" }, @@ -2554,7 +2554,7 @@ "type": ["object", "null"] }, "configOptions": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nInitial session configuration options if supported by the Agent.", + "description": "Initial session configuration options if supported by the Agent.", "items": { "$ref": "#/$defs/SessionConfigOption" }, @@ -2657,15 +2657,15 @@ "type": "object" }, "SessionConfigGroupId": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nUnique identifier for a session configuration option value group.", + "description": "Unique identifier for a session configuration option value group.", "type": "string" }, "SessionConfigId": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nUnique identifier for a session configuration option.", + "description": "Unique identifier for a session configuration option.", "type": "string" }, "SessionConfigOption": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nA session configuration option selector and its current state.", + "description": "A session configuration option selector and its current state.", "discriminator": { "propertyName": "type" }, @@ -2747,10 +2747,10 @@ "type": "string" } ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nSemantic 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." + "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." }, "SessionConfigSelect": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nA single-value selector (dropdown) session configuration option payload.", + "description": "A single-value selector (dropdown) session configuration option payload.", "properties": { "currentValue": { "allOf": [ @@ -2773,7 +2773,7 @@ "type": "object" }, "SessionConfigSelectGroup": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nA group of possible values for a session configuration option.", + "description": "A group of possible values for a session configuration option.", "properties": { "_meta": { "additionalProperties": true, @@ -2804,7 +2804,7 @@ "type": "object" }, "SessionConfigSelectOption": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nA possible value for a session configuration option.", + "description": "A possible value for a session configuration option.", "properties": { "_meta": { "additionalProperties": true, @@ -2850,10 +2850,10 @@ "type": "array" } ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nPossible values for a session configuration option." + "description": "Possible values for a session configuration option." }, "SessionConfigValueId": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nUnique identifier for a session configuration option value.", + "description": "Unique identifier for a session configuration option value.", "type": "string" }, "SessionForkCapabilities": { @@ -3193,7 +3193,7 @@ "$ref": "#/$defs/ConfigOptionUpdate" } ], - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nSession configuration options have been updated.", + "description": "Session configuration options have been updated.", "properties": { "sessionUpdate": { "const": "config_option_update", @@ -3238,7 +3238,7 @@ ] }, "SetSessionConfigOptionRequest": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest parameters for setting a session configuration option.", + "description": "Request parameters for setting a session configuration option.", "properties": { "_meta": { "additionalProperties": true, @@ -3276,7 +3276,7 @@ "x-side": "agent" }, "SetSessionConfigOptionResponse": { - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse to `session/set_config_option` method.", + "description": "Response to `session/set_config_option` method.", "properties": { "_meta": { "additionalProperties": true, diff --git a/src/agent.rs b/src/agent.rs index f3477d1e..1c5d671b 100644 --- a/src/agent.rs +++ b/src/agent.rs @@ -424,12 +424,7 @@ pub struct NewSessionResponse { #[cfg(feature = "unstable_session_model")] #[serde(skip_serializing_if = "Option::is_none")] pub models: Option, - /// **UNSTABLE** - /// - /// This capability is not part of the spec yet, and may be removed or changed at any point. - /// /// Initial session configuration options if supported by the Agent. - #[cfg(feature = "unstable_session_config_options")] #[serde(skip_serializing_if = "Option::is_none")] pub config_options: Option>, /// The _meta property is reserved by ACP to allow clients and agents to attach additional @@ -449,7 +444,6 @@ impl NewSessionResponse { modes: None, #[cfg(feature = "unstable_session_model")] models: None, - #[cfg(feature = "unstable_session_config_options")] config_options: None, meta: None, } @@ -476,12 +470,7 @@ impl NewSessionResponse { self } - /// **UNSTABLE** - /// - /// This capability is not part of the spec yet, and may be removed or changed at any point. - /// /// Initial session configuration options if supported by the Agent. - #[cfg(feature = "unstable_session_config_options")] #[must_use] pub fn config_options( mut self, @@ -578,12 +567,7 @@ pub struct LoadSessionResponse { #[cfg(feature = "unstable_session_model")] #[serde(default, skip_serializing_if = "Option::is_none")] pub models: Option, - /// **UNSTABLE** - /// - /// This capability is not part of the spec yet, and may be removed or changed at any point. - /// /// Initial session configuration options if supported by the Agent. - #[cfg(feature = "unstable_session_config_options")] #[serde(default, skip_serializing_if = "Option::is_none")] pub config_options: Option>, /// The _meta property is reserved by ACP to allow clients and agents to attach additional @@ -622,12 +606,7 @@ impl LoadSessionResponse { self } - /// **UNSTABLE** - /// - /// This capability is not part of the spec yet, and may be removed or changed at any point. - /// /// Initial session configuration options if supported by the Agent. - #[cfg(feature = "unstable_session_config_options")] #[must_use] pub fn config_options( mut self, @@ -739,12 +718,7 @@ pub struct ForkSessionResponse { #[cfg(feature = "unstable_session_model")] #[serde(skip_serializing_if = "Option::is_none")] pub models: Option, - /// **UNSTABLE** - /// - /// This capability is not part of the spec yet, and may be removed or changed at any point. - /// /// Initial session configuration options if supported by the Agent. - #[cfg(feature = "unstable_session_config_options")] #[serde(skip_serializing_if = "Option::is_none")] pub config_options: Option>, /// The _meta property is reserved by ACP to allow clients and agents to attach additional @@ -765,7 +739,6 @@ impl ForkSessionResponse { modes: None, #[cfg(feature = "unstable_session_model")] models: None, - #[cfg(feature = "unstable_session_config_options")] config_options: None, meta: None, } @@ -792,12 +765,7 @@ impl ForkSessionResponse { self } - /// **UNSTABLE** - /// - /// This capability is not part of the spec yet, and may be removed or changed at any point. - /// /// Initial session configuration options if supported by the Agent. - #[cfg(feature = "unstable_session_config_options")] #[must_use] pub fn config_options( mut self, @@ -907,12 +875,7 @@ pub struct ResumeSessionResponse { #[cfg(feature = "unstable_session_model")] #[serde(default, skip_serializing_if = "Option::is_none")] pub models: Option, - /// **UNSTABLE** - /// - /// This capability is not part of the spec yet, and may be removed or changed at any point. - /// /// Initial session configuration options if supported by the Agent. - #[cfg(feature = "unstable_session_config_options")] #[serde(default, skip_serializing_if = "Option::is_none")] pub config_options: Option>, /// The _meta property is reserved by ACP to allow clients and agents to attach additional @@ -952,12 +915,7 @@ impl ResumeSessionResponse { self } - /// **UNSTABLE** - /// - /// This capability is not part of the spec yet, and may be removed or changed at any point. - /// /// Initial session configuration options if supported by the Agent. - #[cfg(feature = "unstable_session_config_options")] #[must_use] pub fn config_options( mut self, @@ -1331,69 +1289,46 @@ impl SetSessionModeResponse { // Session config options -/// **UNSTABLE** -/// -/// This capability is not part of the spec yet, and may be removed or changed at any point. -/// /// Unique identifier for a session configuration option. -#[cfg(feature = "unstable_session_config_options")] #[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq, Hash, From, Display)] #[serde(transparent)] #[from(Arc, String, &'static str)] #[non_exhaustive] pub struct SessionConfigId(pub Arc); -#[cfg(feature = "unstable_session_config_options")] impl SessionConfigId { pub fn new(id: impl Into>) -> Self { Self(id.into()) } } -/// **UNSTABLE** -/// -/// This capability is not part of the spec yet, and may be removed or changed at any point. -/// /// Unique identifier for a session configuration option value. -#[cfg(feature = "unstable_session_config_options")] #[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq, Hash, From, Display)] #[serde(transparent)] #[from(Arc, String, &'static str)] #[non_exhaustive] pub struct SessionConfigValueId(pub Arc); -#[cfg(feature = "unstable_session_config_options")] impl SessionConfigValueId { pub fn new(id: impl Into>) -> Self { Self(id.into()) } } -/// **UNSTABLE** -/// -/// This capability is not part of the spec yet, and may be removed or changed at any point. -/// /// Unique identifier for a session configuration option value group. -#[cfg(feature = "unstable_session_config_options")] #[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq, Hash, From, Display)] #[serde(transparent)] #[from(Arc, String, &'static str)] #[non_exhaustive] pub struct SessionConfigGroupId(pub Arc); -#[cfg(feature = "unstable_session_config_options")] impl SessionConfigGroupId { pub fn new(id: impl Into>) -> Self { Self(id.into()) } } -/// **UNSTABLE** -/// -/// This capability is not part of the spec yet, and may be removed or changed at any point. -/// /// A possible value for a session configuration option. -#[cfg(feature = "unstable_session_config_options")] #[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq)] #[serde(rename_all = "camelCase")] #[non_exhaustive] @@ -1414,7 +1349,6 @@ pub struct SessionConfigSelectOption { pub meta: Option, } -#[cfg(feature = "unstable_session_config_options")] impl SessionConfigSelectOption { #[must_use] pub fn new(value: impl Into, name: impl Into) -> Self { @@ -1444,12 +1378,7 @@ impl SessionConfigSelectOption { } } -/// **UNSTABLE** -/// -/// This capability is not part of the spec yet, and may be removed or changed at any point. -/// /// A group of possible values for a session configuration option. -#[cfg(feature = "unstable_session_config_options")] #[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq)] #[serde(rename_all = "camelCase")] #[non_exhaustive] @@ -1469,7 +1398,6 @@ pub struct SessionConfigSelectGroup { pub meta: Option, } -#[cfg(feature = "unstable_session_config_options")] impl SessionConfigSelectGroup { #[must_use] pub fn new( @@ -1497,12 +1425,7 @@ impl SessionConfigSelectGroup { } } -/// **UNSTABLE** -/// -/// This capability is not part of the spec yet, and may be removed or changed at any point. -/// /// Possible values for a session configuration option. -#[cfg(feature = "unstable_session_config_options")] #[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq)] #[serde(untagged)] #[non_exhaustive] @@ -1513,26 +1436,19 @@ pub enum SessionConfigSelectOptions { Grouped(Vec), } -#[cfg(feature = "unstable_session_config_options")] impl From> for SessionConfigSelectOptions { fn from(options: Vec) -> Self { SessionConfigSelectOptions::Ungrouped(options) } } -#[cfg(feature = "unstable_session_config_options")] impl From> for SessionConfigSelectOptions { fn from(groups: Vec) -> Self { SessionConfigSelectOptions::Grouped(groups) } } -/// **UNSTABLE** -/// -/// This capability is not part of the spec yet, and may be removed or changed at any point. -/// /// A single-value selector (dropdown) session configuration option payload. -#[cfg(feature = "unstable_session_config_options")] #[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq)] #[serde(rename_all = "camelCase")] #[non_exhaustive] @@ -1543,7 +1459,6 @@ pub struct SessionConfigSelect { pub options: SessionConfigSelectOptions, } -#[cfg(feature = "unstable_session_config_options")] impl SessionConfigSelect { #[must_use] pub fn new( @@ -1557,10 +1472,6 @@ impl SessionConfigSelect { } } -/// **UNSTABLE** -/// -/// This capability is not part of the spec yet, and may be removed or changed at any point. -/// /// Semantic category for a session configuration option. /// /// This is intended to help Clients distinguish broadly common selectors (e.g. model selector vs @@ -1570,7 +1481,6 @@ impl SessionConfigSelect { /// /// Category names beginning with `_` are free for custom use, like other ACP extension methods. /// Category names that do not begin with `_` are reserved for the ACP spec. -#[cfg(feature = "unstable_session_config_options")] #[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq)] #[serde(rename_all = "snake_case")] #[non_exhaustive] @@ -1586,12 +1496,7 @@ pub enum SessionConfigOptionCategory { Other(String), } -/// **UNSTABLE** -/// -/// This capability is not part of the spec yet, and may be removed or changed at any point. -/// /// Type-specific session configuration option payload. -#[cfg(feature = "unstable_session_config_options")] #[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq)] #[serde(tag = "type", rename_all = "snake_case")] #[schemars(extend("discriminator" = {"propertyName": "type"}))] @@ -1601,12 +1506,7 @@ pub enum SessionConfigKind { Select(SessionConfigSelect), } -/// **UNSTABLE** -/// -/// This capability is not part of the spec yet, and may be removed or changed at any point. -/// /// A session configuration option selector and its current state. -#[cfg(feature = "unstable_session_config_options")] #[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq)] #[serde(rename_all = "camelCase")] #[non_exhaustive] @@ -1633,7 +1533,6 @@ pub struct SessionConfigOption { pub meta: Option, } -#[cfg(feature = "unstable_session_config_options")] impl SessionConfigOption { #[must_use] pub fn new( @@ -1689,12 +1588,7 @@ impl SessionConfigOption { } } -/// **UNSTABLE** -/// -/// This capability is not part of the spec yet, and may be removed or changed at any point. -/// /// Request parameters for setting a session configuration option. -#[cfg(feature = "unstable_session_config_options")] #[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq)] #[schemars(extend("x-side" = "agent", "x-method" = SESSION_SET_CONFIG_OPTION_METHOD_NAME))] #[serde(rename_all = "camelCase")] @@ -1715,7 +1609,6 @@ pub struct SetSessionConfigOptionRequest { pub meta: Option, } -#[cfg(feature = "unstable_session_config_options")] impl SetSessionConfigOptionRequest { #[must_use] pub fn new( @@ -1743,12 +1636,7 @@ impl SetSessionConfigOptionRequest { } } -/// **UNSTABLE** -/// -/// This capability is not part of the spec yet, and may be removed or changed at any point. -/// /// Response to `session/set_config_option` method. -#[cfg(feature = "unstable_session_config_options")] #[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq)] #[schemars(extend("x-side" = "agent", "x-method" = SESSION_SET_CONFIG_OPTION_METHOD_NAME))] #[serde(rename_all = "camelCase")] @@ -1765,7 +1653,6 @@ pub struct SetSessionConfigOptionResponse { pub meta: Option, } -#[cfg(feature = "unstable_session_config_options")] impl SetSessionConfigOptionResponse { #[must_use] pub fn new(config_options: Vec) -> Self { @@ -2898,7 +2785,6 @@ pub struct AgentMethodNames { /// Method for setting the mode for a session. pub session_set_mode: &'static str, /// Method for setting a configuration option for a session. - #[cfg(feature = "unstable_session_config_options")] pub session_set_config_option: &'static str, /// Method for sending a prompt to the agent. pub session_prompt: &'static str, @@ -2925,7 +2811,6 @@ pub const AGENT_METHOD_NAMES: AgentMethodNames = AgentMethodNames { session_new: SESSION_NEW_METHOD_NAME, session_load: SESSION_LOAD_METHOD_NAME, session_set_mode: SESSION_SET_MODE_METHOD_NAME, - #[cfg(feature = "unstable_session_config_options")] session_set_config_option: SESSION_SET_CONFIG_OPTION_METHOD_NAME, session_prompt: SESSION_PROMPT_METHOD_NAME, session_cancel: SESSION_CANCEL_METHOD_NAME, @@ -2950,7 +2835,6 @@ pub(crate) const SESSION_LOAD_METHOD_NAME: &str = "session/load"; /// Method name for setting the mode for a session. pub(crate) const SESSION_SET_MODE_METHOD_NAME: &str = "session/set_mode"; /// Method name for setting a configuration option for a session. -#[cfg(feature = "unstable_session_config_options")] pub(crate) const SESSION_SET_CONFIG_OPTION_METHOD_NAME: &str = "session/set_config_option"; /// Method name for sending a prompt. pub(crate) const SESSION_PROMPT_METHOD_NAME: &str = "session/prompt"; @@ -3075,11 +2959,6 @@ pub enum ClientRequest { /// /// See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes) SetSessionModeRequest(SetSessionModeRequest), - #[cfg(feature = "unstable_session_config_options")] - /// **UNSTABLE** - /// - /// This capability is not part of the spec yet, and may be removed or changed at any point. - /// /// Sets the current value for a session configuration option. SetSessionConfigOptionRequest(SetSessionConfigOptionRequest), /// Processes a user prompt within a session. @@ -3126,7 +3005,6 @@ impl ClientRequest { #[cfg(feature = "unstable_session_resume")] Self::ResumeSessionRequest(_) => AGENT_METHOD_NAMES.session_resume, Self::SetSessionModeRequest(_) => AGENT_METHOD_NAMES.session_set_mode, - #[cfg(feature = "unstable_session_config_options")] Self::SetSessionConfigOptionRequest(_) => AGENT_METHOD_NAMES.session_set_config_option, Self::PromptRequest(_) => AGENT_METHOD_NAMES.session_prompt, #[cfg(feature = "unstable_session_model")] @@ -3158,7 +3036,6 @@ pub enum AgentResponse { #[cfg(feature = "unstable_session_resume")] ResumeSessionResponse(#[serde(default)] ResumeSessionResponse), SetSessionModeResponse(#[serde(default)] SetSessionModeResponse), - #[cfg(feature = "unstable_session_config_options")] SetSessionConfigOptionResponse(SetSessionConfigOptionResponse), PromptResponse(PromptResponse), #[cfg(feature = "unstable_session_model")] @@ -3389,7 +3266,6 @@ mod test_serialization { } #[test] - #[cfg(feature = "unstable_session_config_options")] fn test_session_config_option_category_known_variants() { // Test serialization of known variants assert_eq!( @@ -3421,7 +3297,6 @@ mod test_serialization { } #[test] - #[cfg(feature = "unstable_session_config_options")] fn test_session_config_option_category_unknown_variants() { // Test that unknown strings are captured in Other variant let unknown: SessionConfigOptionCategory = @@ -3437,7 +3312,6 @@ mod test_serialization { } #[test] - #[cfg(feature = "unstable_session_config_options")] fn test_session_config_option_category_custom_categories() { // Category names beginning with `_` are free for custom use let custom: SessionConfigOptionCategory = diff --git a/src/client.rs b/src/client.rs index 2a6119b3..dada5581 100644 --- a/src/client.rs +++ b/src/client.rs @@ -9,11 +9,9 @@ use derive_more::{Display, From}; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; -#[cfg(feature = "unstable_session_config_options")] -use crate::SessionConfigOption; use crate::{ - ContentBlock, ExtNotification, ExtRequest, ExtResponse, IntoOption, Meta, Plan, SessionId, - SessionModeId, ToolCall, ToolCallUpdate, + ContentBlock, ExtNotification, ExtRequest, ExtResponse, IntoOption, Meta, Plan, + SessionConfigOption, SessionId, SessionModeId, ToolCall, ToolCallUpdate, }; #[cfg(feature = "unstable_session_info_update")] use crate::{IntoMaybeUndefined, MaybeUndefined}; @@ -94,11 +92,6 @@ pub enum SessionUpdate { /// /// See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes) CurrentModeUpdate(CurrentModeUpdate), - #[cfg(feature = "unstable_session_config_options")] - /// **UNSTABLE** - /// - /// This capability is not part of the spec yet, and may be removed or changed at any point. - /// /// Session configuration options have been updated. ConfigOptionUpdate(ConfigOptionUpdate), #[cfg(feature = "unstable_session_info_update")] @@ -152,12 +145,7 @@ impl CurrentModeUpdate { } } -/// **UNSTABLE** -/// -/// This capability is not part of the spec yet, and may be removed or changed at any point. -/// /// Session configuration options have been updated. -#[cfg(feature = "unstable_session_config_options")] #[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq)] #[serde(rename_all = "camelCase")] #[non_exhaustive] @@ -173,7 +161,6 @@ pub struct ConfigOptionUpdate { pub meta: Option, } -#[cfg(feature = "unstable_session_config_options")] impl ConfigOptionUpdate { #[must_use] pub fn new(config_options: Vec) -> Self { diff --git a/src/rpc.rs b/src/rpc.rs index 1eed9eae..a4f56c5c 100644 --- a/src/rpc.rs +++ b/src/rpc.rs @@ -294,7 +294,6 @@ impl Side for AgentSide { m if m == AGENT_METHOD_NAMES.session_set_mode => serde_json::from_str(params.get()) .map(ClientRequest::SetSessionModeRequest) .map_err(Into::into), - #[cfg(feature = "unstable_session_config_options")] m if m == AGENT_METHOD_NAMES.session_set_config_option => { serde_json::from_str(params.get()) .map(ClientRequest::SetSessionConfigOptionRequest) From 241a963737fba3ea596ed9be4784a66213d62676 Mon Sep 17 00:00:00 2001 From: Ben Brandt Date: Wed, 4 Feb 2026 12:48:57 +0100 Subject: [PATCH 2/3] Finialize docs --- docs/docs.json | 2 +- docs/protocol/session-config-options.mdx | 13 +++++++------ docs/protocol/session-modes.mdx | 6 +++--- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 1dde9e0c..820e9323 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -72,6 +72,7 @@ "protocol/terminals", "protocol/agent-plan", "protocol/session-modes", + "protocol/session-config-options", "protocol/slash-commands", "protocol/extensibility", "protocol/transports", @@ -81,7 +82,6 @@ "hidden": true, "pages": [ "protocol/draft/cancellation", - "protocol/draft/session-config-options", "protocol/draft/schema" ] } diff --git a/docs/protocol/session-config-options.mdx b/docs/protocol/session-config-options.mdx index 376b3e08..2569b4d5 100644 --- a/docs/protocol/session-config-options.mdx +++ b/docs/protocol/session-config-options.mdx @@ -8,12 +8,13 @@ Agents can provide an arbitrary list of configuration options for a session, all Session Config Options are the preferred way to expose session-level configuration. If an Agent provides `configOptions`, Clients **SHOULD** use - them instead of the deprecated [`modes`](../session-modes) field. + them instead of the [`modes`](./session-modes) field. Modes will be removed in + a future version of the protocol. ## Initial State -During [Session Setup](../session-setup) the Agent **MAY** return a list of configuration options and their current values: +During [Session Setup](./session-setup) the Agent **MAY** return a list of configuration options and their current values: ```json { @@ -88,7 +89,7 @@ During [Session Setup](../session-setup) the Agent **MAY** return a list of conf Optional [semantic category](#option-categories) to help Clients provide - consistent UX + consistent UX. @@ -265,7 +266,7 @@ This notification also contains the complete configuration state. Common reasons ## Relationship to Session Modes -Session Config Options supersede the older [Session Modes](../session-modes) API. However, during the transition period, Agents that provide mode-like configuration **SHOULD** send both: +Session Config Options supersede the older [Session Modes](./session-modes) API. However, during the transition period, Agents that provide mode-like configuration **SHOULD** send both: - `configOptions` with a `category: "mode"` option for Clients that support config options - `modes` for Clients that only support the older API @@ -276,6 +277,6 @@ If an Agent provides both `configOptions` and `modes` in the session response: - Clients that don't support config options **SHOULD** fall back to `modes` - Agents **SHOULD** keep both in sync to ensure consistent behavior regardless of which field the Client uses - - Learn about the deprecated Session Modes API + + Learn about the Session Modes API diff --git a/docs/protocol/session-modes.mdx b/docs/protocol/session-modes.mdx index 82dc1849..03bdaa17 100644 --- a/docs/protocol/session-modes.mdx +++ b/docs/protocol/session-modes.mdx @@ -4,9 +4,9 @@ description: "Switch between different agent operating modes" --- - Session Modes have been replaced by [Session Config - Options](./session-config-options). Dedicated session mode methods will be - removed in a future version of the protocol. + You can now use [Session Config Options](./session-config-options). Dedicated + session mode methods will be removed in a future version of the protocol. + Until then, you can offer both to clients for backwards compatibility. Agents can provide a set of modes they can operate in. Modes often affect the system prompts used, the availability of tools, and whether they request permission before running. From a698a2e512ae9b44dc33932cb8b9a8b0f7b00b31 Mon Sep 17 00:00:00 2001 From: Ben Brandt Date: Wed, 4 Feb 2026 12:50:49 +0100 Subject: [PATCH 3/3] update --- docs/updates.mdx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/updates.mdx b/docs/updates.mdx index 3163e2d0..4bff154f 100644 --- a/docs/updates.mdx +++ b/docs/updates.mdx @@ -4,6 +4,13 @@ description: Updates and announcements about the Agent Client Protocol rss: true --- + +## Session Config Options RFD moves to Completed + +The RFD for adding more generic Session Config Options to the protocol has been stabilized and is now a part of the protocol. Please review the [documentation](./protocol/session-config-options) for more information. + + + ## Logout method moves to Draft stage