The transport-neutral orchestration layer that exposes Alembic over REST, SSE, and MCP.
@alembic/harness contains HarnessCore, a transport-neutral orchestrator, plus handlers for CLI, HTTP+SSE, and MCP. The same core drives the funnel (alembic distill), single-phase runs, and the POST /runs endpoint.
The HTTP server supports creating runs, polling status, and streaming events. The MCP surface is read-only: an untrusted client can inspect but not trigger autonomous execution.
Think of it like… a theatre stage manager: the script and actors stay the same whether the audience watches from the balcony (HTTP), the lobby monitor (SSE), or a backstage headset (MCP).
runFunnel orchestrates T0–T3 distillation over a corpus. distillAndMarket composes the funnel with the marketing factory. createHarnessServer binds handlers to a Node http server and maintains a run registry. Events are validated with Zod and streamed as SSE frames.
# start the HTTP+SSE harness server alembic serve --data-dir ~/.alembic # start the read-only web cockpit alembic cockpit --data-dir ~/.alembic
alembic serve starts createHarnessServer and blocks until SIGINT. alembic cockpit starts createCockpitServer from @alembic/web. Both bind to ephemeral ports by default and print the URL. The harness server's POST /runs accepts a phase, goal path, and plan path, then kicks off a Forge-scope run in the background.
Start alembic cockpit, open the URL, and list runs. Then start alembic serve and curl /api/runs.