Skip to main content

Module commands

Module commands 

Source
Expand description

The commands module: the command graph, projected.

Three capabilities, all read-only, all answered by crate::command_graph — the same graph the terminal renders, the same graph the workflow bridge is written from, and the same graph a shell’s completion is answered from. Declaring them here is what puts the command graph on MCP, on HTTP, in the OpenAPI document, in Swagger UI, in the Cockpit and in the generated reference, without any of those carrying a route, a schema or a sentence of its own.

§Why three, and not one

Because a client that wants to know what it may call should not have to read every argument of every command to find out. commands.list answers with one line per command; commands.get answers with one command in full; commands.graph answers with the whole document and its diagnostics. Summary first, detail on demand — the shape an agent’s context needs, and the shape a command palette needs, are the same shape.

Structs§

CommandFilter
Which commands to answer with. Every filter is the graph’s own vocabulary; none is a search over rendered text.
CommandGraphReport
The whole graph, with what its build found.
CommandIndex
The commands this repository offers, filtered.
CommandRequest
One command, by its canonical identity.
CommandSummary
One command, as an index shows it: enough to choose, never enough to have to skim.

Constants§

COMMANDS_URI
The URI under which the index of commands is read as an MCP resource.

Functions§

module
The commands module: every command this repository offers, projected once.