UNPKG

kestrel.markets

Version:

A typed, token-efficient language + runtime for agentic trading: agents author bounded plans, the runtime fires them at the tick. CLI + typed library + MCP server.

21 lines (17 loc) 1.24 kB
# Pod class vs instance: sim/paper fan out, live is a singleton A Pod definition is a **class** (a versioned Kestrel module); a run of it is an **instance** = (definition version × mode × run id). Modes are **sim** (recorded data, simulated fills), **paper** (live data, simulated fills), and **live** (the real broker gate). Sim and paper instances are unbounded — thousands of parallel simulations across many definition versions is the normal shape of Grade — but **the live instance is a singleton per pod lineage, enforced by the platform**. This is a safety invariant before it is a scaling choice: two live instances of one pod are doubled orders on one account. The singleton model supersedes per-book mode flags: **promotion is a document revision**, not a flag flip. A new book runs as paper instances until it earns a record; the PM then authors it into the live pod's next version (human-gated). The org is data; promotion is an edit with an audit trail. Deployment note (candidate pattern, not a lock-in): the semantics match Cloudflare Durable Objects exactly — one strongly-consistent object per identity, unbounded ephemeral parallel instances beside it — and DOs are a serious candidate for the hosted runtime.