Expand description
The command registry and the wire envelope (spec §4, Appendix A).
A command is a CommandSpec: name, group, doc, the JSON Schemas of its
argument and result types (derived with schemars), the frame phase it
runs in, MCP-style annotations, and a handler. Each cmd_* module owns a
pub static COMMANDS: &[CommandSpec]; registry gathers them. A host
generates its tool list from describe; nothing lists commands by hand.
Structs§
- Annotations
- Command
Spec - Ctx
- What an app-phase handler sees.
- Empty
- A command that returns nothing beyond the envelope.
- Envelope
- NoArgs
- A command that takes nothing.
- Notice
- Reply
Enums§
- Handler
- Notice
Kind - Outcome
- What a handler returns.
- Phase
- Where in the frame a command runs (§4.4).
Functions§
- describe
- The registry as JSON — what a host turns into
tools/listand what the generated docs render:[{name, group, doc, phase, annotations, argsSchema, resultSchema}]. - lookup
- parse_
args - registry
- Every registered command, in module order. Each
cmd_*module contributes itsCOMMANDSstatic;tests/automation_registry.rswalks the source tree forstatic COMMANDSdeclarations and fails if one is missing here, so this function cannot silently become a hand-kept subset. - schema_
of - The JSON Schema of a type, as a
serde_json::Value.