leash-runnerCLI —node packages/runner/dist/cli.jsboots the Hono server.
Health + pause
GET /health—{ ok, paused, source }.GET /pause— same plusenv_kill.
createHttpServer(store, { resolvePause: createPauseResolver({ fetchOnchainPaused }) }).
Receipt feeds
GET /a/:mint/receipts.jsonl— append-only NDJSON feed for one agent (in-memoryMapin v0.1, swap for SQLite later).POST /a/:mint/receipts— append aReceiptV1. The runner validates againstReceiptV1Schemaand rejects payloads wherereceipt.agent !== :mint.
Forward to the Leash API
WhenLEASH_API_URL and LEASH_API_KEY are set, the runner mirrors
every accepted receipt to the API in the background:
POST /a/:mint/receipts still
returns 200 immediately even if the API is unreachable, and
errors are logged with console.warn. The same receipt lands in
api.leash.market, explorer.leash.market, and your local
receipts.jsonl file with no extra wiring.
Payment-link endpoints
The runner storesEndpointV1 descriptors that back the playground’s
shareable /x/<id> x402 paywalls (see the
Create a payment link guide).
GET /endpoints— list every endpoint. Filter with?owner_agent=<mint>.GET /endpoints/:id— fetch one endpoint by id.POST /endpoints— create or update. Body is anEndpointV1withoutv/created_at/updated_at. The runner generates anidif you don’t supply one.DELETE /endpoints/:id— remove. Returns204on success.
EndpointV1 accepts two optional post-payment hooks that the
/x/<id> route honours automatically — webhook_url (fire-and-forget
POST of { payment, response }), and wrap_receipt (embed the
receipt envelope in JSON responses). See
Create a payment link
for the full payload reference.
Persistence is an append-only JSONL file at
./.leash/endpoints.jsonl (override with LEASH_RUNNER_DATA); set to an
empty string to disable. Lines are either an EndpointV1 (upsert) or
{"$delete": "<id>"} (remove).
Typed runner client
The same package exports a typed client so SDK consumers don’t reach for rawfetch (and don’t misspell paths). It validates against
EndpointV1Schema / ReceiptV1Schema on the way out.

