Service Model

July 30, 2026 ยท View on GitHub

Labby registers a small product catalog over one shared dispatch contract. The generated service catalog is authoritative.

Current Services

ServiceExposureSurfacesOwnership
gatewayfeature-gatedCLI, MCP, API, webUpstreams, protected routes, virtual servers, OAuth, Code Mode host
fsfeature-gatedMCP, API, webOptional configured filesystem browser
doctoralways onCLI, MCP, APISupported configuration and runtime diagnostics
server_logsalways onCLI, MCP, APILocal Labby server-log search and inspection
setupalways onCLI, MCP, API, webBootstrap, provisioning, plugin hooks, host service
snippetsalways onCLI, MCP, APICode Mode snippet storage and execution metadata
lab_adminruntime-conditionalCLI, MCPExplicitly enabled administrative actions

Registration Rules

A first-class service has one canonical action catalog and one shared dispatcher. CLI, MCP, HTTP, and web code are adapters over that dispatcher, not separate implementations.

  • Action metadata lives in ActionSpec/ParamSpec.
  • Destructive classification is shared across surfaces.
  • Service metadata drives generated catalogs and help.
  • Feature-gated services must compile in their documented slices.
  • Runtime-conditional services remain absent unless explicitly enabled.

Reusable gateway, auth, Code Mode, web, and runtime behavior belongs in the extracted labby-* crates. Product dispatch and configuration adapters belong in crates/labby. Pure setup/doctor contracts may live in labby-apis.

Adding A Service

Add only the surfaces the capability actually supports:

  1. define shared metadata and typed request/result contracts;
  2. implement one dispatcher;
  3. register it in the product service registry;
  4. add thin CLI/MCP/API/web adapters as needed;
  5. regenerate catalogs and add architecture tests;
  6. document config, errors, observability, and destructive behavior.

Do not add an empty Cargo feature as a placeholder for a future product.

Retired Services

ACP, ACP Registry, the in-product MCP Registry browser/client, Marketplace, Fleet/device runtime, Deploy-product, and Stash are not current services or SDK modules. Historical implementation contracts are archived under ../references/retired-labby.