Skip to content

docs(protocol): mark availableCommands as required in slash commands page - #2804

Open
aphrody-dev wants to merge 1 commit into
agentclientprotocol:mainfrom
aphrody-labs:main
Open

aphrody-dev wants to merge 1 commit into
agentclientprotocol:mainfrom
aphrody-labs:main

Conversation

@aphrody-dev

Copy link
Copy Markdown

Problem

In v1, AvailableCommandsUpdate.available_commands has no #[serde(default)] (agent-client-protocol-schema/src/v1/client.rs), so schema/v1/schema.json lists availableCommands in required, and the generated reference (docs/protocol/v1/schema.mdx) marks it required. The hand-written page docs/protocol/v1/slash-commands.mdx (and its draft/ copy) documents the same field without required, which tells implementers they can omit it in an available_commands_update notification. 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 required flag of every <ParamField>/<ResponseField> in the hand-written v1 pages with the required arrays of the schema objects that declare the same property.

Before (bun pf.ts schema/v1/schema.json docs/protocol/v1, plus the same for docs/protocol/v1/draft against schema.unstable.json):

slash-commands.mdx:45 availableCommands docs required=false but schema: AvailableCommandsUpdate!
session-config-options.mdx:123 options docs required=false but schema: RequestPermissionRequest!,SessionConfigSelectGroup!,SessionConfigSelect!

After: only the options entry remains. That one is expected: the page already says it is required when type is "select" and omitted for "boolean".

All JSON-RPC examples in docs/protocol/v1/*.mdx already validate against schema/v1/schema.json (86 checked), so no example changes are needed.

Fix

Add required to the availableCommands ResponseField in docs/protocol/v1/slash-commands.mdx and docs/protocol/v1/draft/slash-commands.mdx. This makes the page match the existing stable schema. It does not add or change any requirement.

…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.
@aphrody-dev
aphrody-dev requested a review from a team as a code owner November 13, 2026 01:13
@mintlify

mintlify Bot commented Nov 13, 2026

Copy link
Copy Markdown

Preview approval required

This pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit 5e1ab60.

Approve preview

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant