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.

28 lines (27 loc) 1.67 kB
/** * kestrel.markets — root export surface. * * Two surfaces, one package, on EXPLICIT subpath boundaries (kestrel-djm.3): * * - the zero-dependency wire **protocol**, spread FLAT (`SCOPES`, `PROTOCOL_VERSION`, * the generic `Instrument`/`Position`/`Order`/`Blotter` shapes, …) — the open, * versioned contract the managed backend implements (ADR-0010); and * - the local-execution **engine** aggregate, under ONE namespace key — parse/print * (`engine.lang`), Frame materialization (`engine.frame`), Session (`engine.session`), * fill (`engine.fill`), Blotter (`engine.blotter`), and Grade (`engine.grade`). * * `engine` is NAMESPACED (not flat-spread) on purpose: the engine tree defines its OWN * `Position`/`Instrument` (`src/frame/types.ts`, `src/lang/ast.ts`) that differ from the * protocol's generic ones, so a flat `export *` of both would be an ambiguous re-export * collision on those names. Under `engine.*` each capability keeps its own names and the * protocol's flat vocabulary is never clobbered. * * LIGHT/HEAVY: this root `.` entry is the HEAVY, Bun-hosted local surface — it pulls the * engine aggregate (which uses `Bun.*` / `node:fs`, though NOT `bun:sqlite`/`chdb`). Remote * and protocol-only consumers import `kestrel.markets/protocol` or `kestrel.markets/client`, * whose import graphs carry NO lake / native dependency (pinned by * `tests/package.boundary.test.ts`). The local engine surface is also published standalone as * `kestrel.markets/engine` (→ `src/engine/index.ts`, the capability aggregate). */ export * from "./protocol/index.js"; export * as engine from "./engine/index.js";