Repository navigation
Conversation
Clients that show agents, for example in an agent picker, have no typed place to read an agent's icon from RootState.agents, and AgentInfo has no _meta either. Add AgentInfo.icons, reusing the Icon shape that customizations and model sources already carry, so the standard root/agentsChanged carries icons and their updates. Add an optional AgentInfo._meta, as on SessionModelInfo and ModelSource, for implementation-defined agent metadata. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
root/agentsChanged already replaces agents whole, so the icons field needs no update rule of its own; drop the sentence that implied one and restore the actions guide row. Give AgentInfo._meta the same credential guard as ModelSource._meta, list it in the state model sketch, shorten the changelog entry, and add a Rust migration note for AgentInfo struct literals. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vladertel
requested review from
Connor Peet (connor4312) and
roblourens
as code owners
November 26, 2026 23:40
Make the Rust migration note verb-first like earlier Rust entries, say why AgentInfo._meta helps, link both fragments to the PR, link the Icon reference from the root channel spec, and annotate the icons line in the state model sketch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vladertel
marked this pull request as draft
November 26, 2026 23:47
|
vladertel please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
This branch has not been deployed
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.
Motivation
Clients that list a host's agents, for example in an agent picker, have no typed way to get an agent's icon from
RootState.agents:AgentInfohas neithericonsnor_meta. A host that ships agent icons to a mobile client today has to put aprovider-keyed icon map inRootState._metaunder anx-key, and define a customx-root action to update it, because no AHP root action updatesRootState._meta. Without that action, a client sees a new agent immediately viaroot/agentsChangedbut sees its icon only after it resubscribes.Per the doctrine, a feature interoperable clients need should graduate from an escape hatch into typed state. With
AgentInfo.icons, icons are part of the agent list itself, so the standardroot/agentsChanged, which already replacesagentswhole, keeps them current like any other agent field.Change
AgentInfo.icons?: Icon[], reusing theIconshape already used by customizations andModelSource.icons(src,contentType,sizes,theme).AgentInfo._meta?: Record<string, unknown>for implementation-defined agent metadata, with the same "MUST NOT contain a credential" guard asModelSource._meta.AgentInfoliterals set the new fields toNone.119-agent-info-icons(an agent with light/dark icons and_meta, and one with neither).AgentInfostruct literals now needicons: Noneandmeta: None.Why
_metais in the same PRNo AHP root action updates
RootState._meta, so per-agent data a host keeps there goes stale until the client resubscribes, unless the host defines its ownx-root action.AgentInfo._metais the only per-agent extension point that the standardroot/agentsChangedkeeps current, so the next per-agent extension of this kind needs no custom root action. It matchesSessionModelInfo._metaandModelSource._meta. Happy to split it into its own PR if you prefer.Tradeoff
Icons travel inside
agents, so adata:icon URI is re-sent on everyroot/agentsChangedand in every root snapshot; hosts should prefer fetchable URIs for large icons, as withModelSource.iconsand customization icons.Compatibility
Additive and optional. Older clients ignore the new keys, and older hosts simply don't send them. No reducer change, no new action, and no
PROTOCOL_VERSIONbump. The fields are appended at the end ofAgentInfo, so positional constructors and struct literals in the generated Kotlin and Go APIs keep working. Direct Rust struct literals need the two new fields (noted in the changelog).Verification
npm run generate(no diff on a clean regeneration),npm test(701 pass, reducers at 100% branch coverage),npm run verify:change-fragmentsnpm ci && npm test && npm run buildcargo test --workspacego test ./..../gradlew buildswift build && swift testdotnet testonAgentHostProtocol.Tests🤖 Generated with Claude Code