Purpose of this page: explain the transport contract that both the server and the CLI consume, and the rules that keep it honest.
Layer 3

http/contract/ (transport contract)

The transport contract, with no koa in sight. Every operation id, method, path, lifecycle status and zod schema lives here exactly once.

Components

Operation registry

Registry data, not branches. Each declared operation appears once and carries:

· a typed path segment tuple — resource, subresource, action, system, parameter
· a lifecycle: routed, stubbed, or absent (post-mvp)
· zod schemas for request and response
· an OpenAPI emitter that generates the published documents

Inbound edges

FromMeaning
DaemonClientrenders requests from the registry
middleware chainmatches routes via the registry

Rules

  1. A routed entry binds to exactly one command or query. A stubbed entry binds to the shared 501 handler and names no command.
  2. A path is a typed segment tuple, never a string. Every resource segment is singular.
  3. OpenAPI documents are generated, never committed. The registry equals the proposal contract; a test in npm run verify enforces it.
  4. This layer imports no koa. That is what lets the CLI consume it as a client of a remote daemon.