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.
35 lines (33 loc) • 1.66 kB
text/typescript
/**
* # cli/heavy — the single lazy barrel over the bun/chdb-bound runtime (Kestrel CLI v1 §4)
*
* All HEAVY dependencies (`session/sim`, `session/day`, `registry` — each pulling
* `bun:sqlite`/`Bun.CryptoHasher`, and transitively the chdb-bound lake behind its own lazy edge)
* are re-exported from THIS one module. HEAVY command handlers dynamic-import ONLY this barrel
* (`await import("../heavy.ts")`), so the bundler emits a **single** heavy chunk — no cross-chunk
* symbol duplication — that node loads only when a heavy verb runs. Under bun-less node the
* `import("./heavy.ts")` faults on `bun:sqlite`; {@link ./commands/_heavy.ts loadHeavy} maps that to
* a clean exit-4 error.
*
* This file must NEVER be imported statically from the light graph (`index.ts` top level). It is the
* one deliberately-heavy edge.
*/
export { runSimSession, type FillModelName, type EpisodeReport } from "../session/sim.ts";
export { runDaySession, parseWakeTimes, type TimeOfDay } from "../session/day.ts";
// The PAPER session driver (kestrel-7o2.12). Its static graph carries NO socket — every
// `@stoqey/ib`-bound module sits behind a lazy `import()` inside the driver's venue composition — so
// re-exporting it here does not put the IB client on the heavy chunk's load-time graph.
export { runPaperSession, PaperSessionRefused, type RunPaperOptions, type PaperSessionResult } from "../session/paper.ts";
export {
getRun,
leaderboard,
lineage,
listRuns,
openLedger as openRegistry,
record,
type LeaderboardRow,
type LineageInstance,
type PlanInstanceRow,
type RunRow,
type RunWithPlans,
} from "../ledger/index.ts";