Skip to content

acpAvailableCommandsV1

acpAvailableCommandsV1(): AcpAvailableCommand[]

Defined in: packages/agent/src/modules/acp/acpCommands.ts:140

The availableCommands payload for a v1 available_commands_update.

Returned as the array rather than the whole update because the two dialects wrap it in their own SessionUpdate union, and each app is the thing that holds its dialect’s types.

v1’s input carries no discriminator. Its AvailableCommandInput is the single variant UnstructuredCommandInput — { hint } and nothing else — so a type field here would be an unrecognised key rather than the variant tag it is in v2. The two spellings are the whole reason this is two functions and not one; everything else about the two payloads is the same.

This is the forgiving direction — v1’s schema strips the extra key, so a v2-shaped payload would reach the client intact today. It is written to v1’s own grammar anyway, because a key the schema does not define is carried by nothing but the schema’s current leniency, and _meta is where the protocol says extras belong.

AcpAvailableCommand[]