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.
27 lines • 1.9 kB
TypeScript
/**
* # blotter/protocol-view — the pure engine → PROTOCOL Blotter projection (kestrel-b0li).
*
* The ONE source of truth for turning a rich engine {@link EngineBlotter} into the generic public
* PROTOCOL {@link Blotter} the {@link grade} Judge scores — un-dropping the risk-honest `totals` +
* `fill_claim` (kestrel-h314 D2) so both metric families are outsider-recomputable from a published
* Blotter. Extracted here from `sdk/local.ts` (which re-exports it) into a LIGHT module — it depends
* only on the blotter types + the dependency-free protocol types, never on `lang`/`session`/`catalog`
* — so the node-only `certify` verb can grade a re-projection (`published numbers == grade(reproject(tape))`,
* OSS-ADR-0051) without dragging the engine drive into the npx-light import graph.
*
* Honest + deterministic: no wall clock (the settle instant is the settle-mark's `as_of_ts` or the
* latest plan-lifecycle ts), no RNG, no invented arithmetic — only the accounting the engine record
* already carries, reduced to its public verdict.
*/
import type { Blotter as EngineBlotter } from "./index.ts";
import type { Blotter } from "../protocol/index.ts";
import type { SessionId } from "../protocol/session.ts";
/**
* Project the rich engine {@link EngineBlotter} into the PROTOCOL {@link Blotter} (the generic public
* view). Honest + deterministic. Carries the deterministic identity + the fully-determined settlement;
* the generic order/fill/position arrays are empty (the engine record lacks the generic legs a faithful
* public Instrument/Order needs; never fabricated). Additionally carries the un-dropped `totals` +
* `fill_claim`, so the risk-honest metric family is outsider-recomputable by the {@link grade} Judge.
*/
export declare function toProtocolBlotter(sessionId: SessionId, b: EngineBlotter): Blotter;
//# sourceMappingURL=protocol-view.d.ts.map