RFD: Add flag config option type for boolean toggles#541
Open
fscarponi wants to merge 1 commit intoagentclientprotocol:mainfrom
Open
RFD: Add flag config option type for boolean toggles#541fscarponi wants to merge 1 commit intoagentclientprotocol:mainfrom
fscarponi wants to merge 1 commit intoagentclientprotocol:mainfrom
Conversation
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.
This RFD proposes adding a new
flagtype to session configuration options, enabling agents to expose simple boolean ON/OFF toggles as first-class config options alongside the existingselecttype.Motivation
Currently, the only way to expose a boolean toggle (e.g., "Brave Mode", "Read Only", "Produce Report") is to use a
selectwith two artificial options like "on"/"off". This forces clients to implement custom, non-agnostic logic to detect which selects are actually boolean flags — defeating the purpose of a standardized protocol.A dedicated
flagtype allows clients to natively render toggle switches or checkboxes without guessing.Proposed changes
SessionConfigFlagstruct withcurrent_value: boolFlagvariant inSessionConfigKind(discriminated by"type": "flag")SessionConfigOptionValueuntagged enum (String|Bool) forSetSessionConfigOptionRequest.valueWorking implementation
A reference implementation is available on the branch
fabrizio.scarponi/flag-config-option, including updated docs, schema regeneration, and passing tests/clippy.Happy to open a follow-up implementation PR once this RFD is reviewed and championed