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.

47 lines (44 loc) 1.79 kB
/** * # blotter — the deterministic Blotter projector (kestrel-a57.1, ADR-0011) * * The **Blotter** is the canonical typed record of one Session, projected deterministically from its * {@link ../bus Bus} (CONTEXT: Blotter). The Bus is the truth; the Blotter is its projection — * regenerable, byte-stable, never a second writer (ADR-0010). This module exports exactly three * operations over one type, and NEVER the judge: * * • {@link project} — `project(bus) → Blotter`, a PURE fold of the bus (no engine-state scrape). * • {@link serialize} — `serialize(blotter) → canonical bytes` (deterministic machine-JSON). * • {@link certify} — `certify(bus) → verdict` by re-projection (the determinism leg — the projector * proving its own core invariant). * * Grade replays buses and reads Blotters; review tooling / viewers (a57.13) import THIS module and never * the judge. Rendering is never the projector's job. The aggregated `fill_claim[]` rollup (a57.4), the * paper/live certification legs (a57.3), BusStore persistence (a57.12), and the JOURNAL-backed authoring * flow (a57.2) are all out of this slice. */ export { project } from "./project.ts"; export { serialize } from "./serialize.ts"; export { certify, type CertifyResult, type CertifyVerdict } from "./certify.ts"; export { latencyClaimGate, type LatencyClaimVerdict } from "./claims.ts"; export type { Blotter, BlotterSession, ExperimentalEnvelope, TokenAccounting, BlotterFidelity, FidelitySelfLimitation, FidelityLimit, BusReceipt, Certification, CertLeg, Verdict, HeadlineFlag, JournalEntry, BlotterLifecycleStep, ReasoningRef, PlanRecord, OrderRecord, OrderFinalState, Totals, FillClaim, } from "./types.ts";