Repository navigation
docs(unstable-v2): scope the config option rules for child sessions and setup responses - #2951
Merged
Merged
Conversation
…nd setup responses Three statements said an Agent that advertises config options for a session MUST support `session/set_config_option` for it. The Subagents page has Agents report a child's options and forbids the request for a child, because a child's capabilities decide which requests a Client can send and none permits this one. Scope the three statements to sessions the Client created or resumed, and say on the config options page that a child's options are read-only. The config options page also said the Agent MAY return its options during session setup. The session setup page requires it, because a setup response replaces the Client's list. Use MUST there too.
The draft slash commands page names the unstable `session/fork` response next to `session/new` and `session/resume`. The draft config options page now does the same.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two rules on the config options page disagreed with other pages.
session/set_config_optionand child sessionsThree places said an Agent that advertises config options for a session MUST support
session/set_config_optionfor it. The Subagents page has Agents report a child's options withconfig_option_update, and forbids the request for a child: a child'scapabilitiesare an allowlist of what the Client can send, and none permitssession/set_config_option. So the three statements were false for child sessions as written.capabilitiesdecide which requests the Client can send, that none defined today permitssession/set_config_option, and that a child's options are therefore read-only.SetSessionConfigOptionRequestdescription in the v2 schema: the same scope and the child rule, with the schema and schema reference pages regenerated.The wording follows the capability allowlist on the Subagents page, so it stays right if a later capability permits the request for a child.
Options in setup responses
The config options page said that during session setup "the Agent MAY return a list of configuration options". The session setup page says an Agent whose session has options MUST include them in the setup response, because that response replaces the list the Client holds. The config options page now says the same, in the form the slash commands page already uses for
availableCommands.For implementers
No change for an implementation that follows the Subagents and session setup pages.
Checks
cargo fmt, Prettier and the spell check pass.