Skip to main content

Gateway API capability surface

The gateway API is the shared contract for Command Center, Mobile Companion, CLI tools, node agents, and LLM-driven clients.

The public surface should be understood through capabilities, not by reading every internal method name.

High-value capabilities

CapabilityExample methodsSafety shape
Protocol discoveryprotocol.capabilitiesRead-only metadata for clients and docs.
Fleet statefleet.status, node.health.allRead-only observation of machines, slots, and health.
Dispatch and backlogbacklog.create, backlog.enqueue, dispatch.preview, dispatch.queue.listBounded-write/lifecycle actions with operator policy.
Worker observationtmux.worker.list, terminal.worker.snapshot, stream.snapshotRead-only state for terminals and workers.
Worker steeringterminal.worker.input, terminal.sendBounded-write actions that should be visible and auditable.
Slot lifecycleslot.prepare, slot.release, slot.recycleLifecycle operations that change runtime state.
Run lifecyclerun.create, run.pause, run.resume, run.cancelLifecycle operations over supervised work.
Recipe controlrecipe.command, recipe.projectHookCommand, recipe.projectHookRunProject validation and evidence production.
Decisionsdecision.list, decision.resolveRead/resolve explicit human gates.
Files and gitfs.read, git.status, git.diff, git.discardRead-only by default; destructive operations are high-impact.

Safety tiers

TierMeaning
read-onlyObserves state or metadata.
bounded-writeSends a nudge, edits queue/config state, or writes scoped data.
lifecycleStarts, prepares, releases, pauses, resumes, or otherwise changes supervised run state.
high-impactDeletes, discards, applies, submits, or resolves actions that need stronger human confirmation.

Client pattern

  1. Connect to the gateway WebSocket.
  2. Authenticate with auth.connect when auth is enabled.
  3. Call protocol.capabilities to discover available methods, categories, safety tiers, and examples.
  4. Use read-only methods to observe state.
  5. Require explicit operator confirmation before bounded-write, lifecycle, or high-impact actions.

Generated reference

A full method table is generated from @farmslot/protocol during the docs build for advanced implementer review. It is intentionally not the public entry point until every method has first-class descriptions, examples, and public-safe grouping.

Use the curated capability surface above for onboarding and external clients.

Advanced: raw generated method table

If you are implementing protocol support itself, see the unlisted Gateway API generated reference. Expect rough generated summaries while TSDoc coverage continues to mature.