Unit 7 of 22 · Intermediate

HTTP is canonical; the rest are projections

The short version

kestrel.markets is one API with four equal surfaces. The whole public surface is seven operations — discover, browse, check, run, score, prove, continue. HTTP plus Server-Sent Events is the canonical face; the TypeScript SDK, the CLI, and MCP are thin, generated projections of exactly those endpoints, returning the same operation IDs, events, receipts, and artifacts, with no face-only shortcuts and no impoverished wrappers. Because they are projections of one contract rather than four implementations, a session started on one face is inspected and resumed on any other: begin in the CLI, hand the operation to an agent over MCP, finish in your own app through the SDK. This unit explains why "equal projections" is a design invariant, not a convenience — why it guarantees the receipt you get is identical whichever door you came through — and which seven operations every face is a rendering of.

One API, four equal surfaces

kestrel.markets is a single API wearing four faces. HTTP + SSE is canonical. The TypeScript SDK, the CLI, and MCP are thin projections over the same operations — not separate implementations, and none privileged over the others.

HTTP + SSE
  ├── TypeScript SDK
  ├── CLI
  └── MCP

All four return the same operation IDs, events, receipts, diagnostics, and artifacts. There are no face-only shortcuts and no impoverished MCP subset. That is the invariant: whichever door you walk through, you are calling the same seven operations and getting back the same objects.

The whole surface is seven operations

The entire public API is seven verbs — discover, browse, check, run, score, prove, continue:

GET  /.well-known/kestrel-markets   discover
GET  /catalog                       browse
POST /validate                      check
POST /simulate                      run
POST /grade                         score
GET  /proof/{id}                    prove
GET  /offers/{id}                   continue

Everything else the platform shows you is a rendering of these, a meter over them, or a receipt from them. Long-running work streams its progress and receipts over Server-Sent Events; the other three faces are generated projections of exactly these endpoints — nothing added, nothing hidden.

Why "equal projections" is an invariant, not a convenience

If the SDK, CLI, and MCP were four hand-written clients, they would drift: one would grow a shortcut, another would lag an endpoint, a third would return a slightly different shape. The moment that happens, "the receipt is the same everywhere" stops being true, and the whole trust story cracks.

Making them projections of one contract forecloses that. The types are generated from the same contract; the operation IDs, events, and receipts are the same objects; so a session started on one face is inspected and resumed on any other. Begin a run in the CLI, hand its operation to an agent over MCP, resume it in your own app through the SDK — same operation, same receipt. Equal faces are what make that portability real rather than a slogan.

A worked example

An agent discovers the platform over MCP and runs a free sim on a generic index scenario. It hands the resulting operation to its human, who opens the same run's proof URL in a browser — the canonical HTTP face, no SDK, no CLI — and sees the identical certified receipt. Later the human wires the SDK into an app and resumes that exact operation by its ID. Three faces, one operation, one receipt: the projection guarantee in action.

See it in kestrel

Every face lands on the same certified receipt. Mint one from the CLI face over a generic index scenario — free, anonymous, no card:

npx kestrel.markets sim fomc-rate-decision-whipsaw

The proof URL it prints is the canonical HTTP face of the very same run. For the full contract — the seven operations and how each face projects them — read the four faces. Keep the capability one command away: drop the kestrel.markets MCP server into your client and the next session opens on whichever face you reach for, no account in between.

Recompute it

Every claim in this unit recomputes from a certified proof — no account, no card.

/proof/art_f576347572a410a52647cf90
Keep readingWire kestrel into your agent (MCP)