Repository navigation
docs(protocol): mark availableCommands as required in slash commands page - #2804
Open
aphrody-dev wants to merge 1 commit into
Open
aphrody-dev wants to merge 1 commit into
aphrody-dev wants to merge 1 commit into
Conversation
…page AvailableCommandsUpdate.availableCommands is required in schema/v1/schema.json and in the generated schema reference, but the hand-written slash commands page (stable and draft) listed it as optional.
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
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.
Problem
In v1,
AvailableCommandsUpdate.available_commandshas no#[serde(default)](agent-client-protocol-schema/src/v1/client.rs), soschema/v1/schema.jsonlistsavailableCommandsinrequired, and the generated reference (docs/protocol/v1/schema.mdx) marks itrequired. The hand-written pagedocs/protocol/v1/slash-commands.mdx(and itsdraft/copy) documents the same field withoutrequired, which tells implementers they can omit it in anavailable_commands_updatenotification. A notification that omits it does not validate against the schema, and the Rust crate rejects it with a missing field error.Proof
A small script compares the
requiredflag of every<ParamField>/<ResponseField>in the hand-written v1 pages with therequiredarrays of the schema objects that declare the same property.Before (
bun pf.ts schema/v1/schema.json docs/protocol/v1, plus the same fordocs/protocol/v1/draftagainstschema.unstable.json):After: only the
optionsentry remains. That one is expected: the page already says it is required whentypeis"select"and omitted for"boolean".All JSON-RPC examples in
docs/protocol/v1/*.mdxalready validate againstschema/v1/schema.json(86 checked), so no example changes are needed.Fix
Add
requiredto theavailableCommandsResponseFieldindocs/protocol/v1/slash-commands.mdxanddocs/protocol/v1/draft/slash-commands.mdx. This makes the page match the existing stable schema. It does not add or change any requirement.