You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(unstable): Add a category to session config options (#366)
This is to allow clients to better distinguish between different types
of options, for example to have a keyboard shortcut or special placement
for the first of a given category.
Co-authored-by: neel <neel@chot.ai>
Copy file name to clipboardExpand all lines: docs/rfds/session-config-options.mdx
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,8 @@ Since this space is moving fast, we ideally would find a more flexible option wi
28
28
29
29
Instead, we can allow Agents to provide configuration options in the `session/new` response that not only provide a list of options, but also a `key` of some kind that is a unique identifier for that selector.
30
30
31
+
Additionally, we can optionally allow an Agent to mark each option with a semantic category so that Clients can reliably distinguish broadly common option types (e.g. model selector vs session mode selector vs thought/reasoning level), without needing to infer meaning from the option `id` or `name`. This is intended for UX only (e.g. keyboard shortcuts, icons, preferred placement), and MUST NOT be required for correctness.
32
+
31
33
When the Client receives or sends an update to this selector, it would require both the selector key and the key for the new value.
32
34
33
35
To start, we could continue offering single-value selectors (dropdowns), but allow for the Agent to decide what those are for.
@@ -61,6 +63,7 @@ Something like an `InitializeResponse` that looks like:
61
63
"id": "mode", // this is the unique `key` for communication about which option is being used
62
64
"name": "Session Mode", // Human-readable label for the option
63
65
"description": "Optional description for the Client to display to the user."
66
+
"category": "mode",
64
67
"type": "select",
65
68
"currentValue": "ask",
66
69
"options": [
@@ -79,6 +82,7 @@ Something like an `InitializeResponse` that looks like:
79
82
{
80
83
"id": "models",
81
84
"name": "Model",
85
+
"category": "model",
82
86
"type": "select",
83
87
"currentValue": "ask",
84
88
"options": [
@@ -99,6 +103,21 @@ Something like an `InitializeResponse` that looks like:
99
103
}
100
104
```
101
105
106
+
### Option category (optional)
107
+
108
+
Each top-level config option MAY include an optional `category` field. This is intended to help Clients distinguish broadly common selectors and provide a consistent UX (for example, attaching keyboard shortcuts to the first option of a given category).
109
+
110
+
In addition to `category`, Clients SHOULD use the ordering of the `configOptions` array as provided by the Agent as the primary way to establish priority and resolve ties. For example, if multiple options share the same `category`, a Client can prefer the first matching option in the list when assigning keyboard shortcuts or deciding which options to surface most prominently.
111
+
112
+
`category` is semantic metadata and MUST NOT be required for correctness. Clients MUST handle missing or unknown categories gracefully (treat as `other`).
When we introduce this, we could also allow for grouped options, in case there are logical sub-headers and groupings for the options in an individual selector.
Copy file name to clipboardExpand all lines: schema/schema.unstable.json
+36Lines changed: 36 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2508,6 +2508,17 @@
2508
2508
"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)",
2509
2509
"type": ["object", "null"]
2510
2510
},
2511
+
"category": {
2512
+
"anyOf": [
2513
+
{
2514
+
"$ref": "#/$defs/SessionConfigOptionCategory"
2515
+
},
2516
+
{
2517
+
"type": "null"
2518
+
}
2519
+
],
2520
+
"description": "Optional semantic category for this option (UX only)."
2521
+
},
2511
2522
"description": {
2512
2523
"description": "Optional description for the Client to display to the user.",
2513
2524
"type": ["string", "null"]
@@ -2528,6 +2539,31 @@
2528
2539
"required": ["id", "name"],
2529
2540
"type": "object"
2530
2541
},
2542
+
"SessionConfigOptionCategory": {
2543
+
"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 (treat as `Other`).",
"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.",
0 commit comments