Skip to main content

Module surface

Module surface 

Source
Expand description

The operation set, read from the Cap’n Proto schema itself.

Every verb reaches a caller through three surfaces: the command line, the control socket, and the MCP tool list. Each was declared in its own file in its own idiom, so a verb could exist on one and not the others. That happened repeatedly and nothing caught it: vote shipped on the command line alone, append had no socket method for as long as the socket existed, and a test asserting issue/fold was an unknown method became wrong the day fold got one.

The set now lives in schema/vissue.capnp and this module reads it. Not a copy of it and not a parser for it: capnp compile encodes the constant into the generated vissue_capnp.rs, so the bytes this reads are the schema, and a surface is checked against them.

No toolchain at build time. capnp the compiler is absent from the machines that build this, so the generated file is committed and regenerating it is a maintainer step; what ships is the encoded constant, which the pure-Rust capnp runtime reads anywhere.

Structs§

Field
One field of one verb, named per surface.
Operation
One verb, named on each surface that carries it.
SchemaRow
One operation as the schema text states it.

Functions§

cli_verbs
Every subcommand the schema knows, including the local-only ones.
global_flags
Flags clap puts on every subcommand, which a per-verb row does not repeat.
mutating_cli_verbs
Every mutating verb’s subcommand.
mutating_mcp_tools
Every mutating verb’s MCP tool, skipping the ones deliberately absent.
mutating_socket_methods
Every mutating verb’s socket method, skipping any the schema leaves empty.
operations
The operation set as the schema states it.
parse_schema_text
The schema as its text states it, for comparison with the encoded constant.
socket_methods
Verbs the schema records as reaching the socket, mutating or not.