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.
32 lines • 2.35 kB
TypeScript
/**
* # engine — the rule engine, canonical market state, and ExecutionFair
*
* Charter: the tick loop. It evaluates armed Wake/Plan triggers each tick over
* detectors and series computed causally from the stream it already owns (never a
* second market-data connection); on a confirmed trigger it fires the pre-authorized
* action through the **Gate** and wakes L2 in parallel (**fire-then-inform**).
* Deterministic and replayable: the same input sequence yields the same event sequence.
* It hosts the **canonical market state** — one causal coordinate per underlying (spot,
* HOD/LOD, opening range, velocity, structural levels) sourced from the deepest
* instrument, health-gated, degrading explicitly rather than reconciling two estimates —
* and **ExecutionFair**, the `@fair` anchor: the honest price a market maker will fill
* you at (underlying-anchored intrinsic + a vol read backed out of the *liquid* quotes,
* floored at intrinsic), receipt-gated for trust. The observed mid is a health signal,
* never a value. Belief is the author's; fair is the engine's.
*
* (Phase 1: charter only. The rule engine / canonical state / ExecutionFair wiring lands in a
* later milestone. Price resolution — the pure layer between a parsed price line and a concrete
* order intent — ships first, in {@link ./pricing.ts}, RUNTIME §4.)
*/
export { resolvePrice, isUnresolvable, type PriceLine, type PriceCtx, type PriceResolution, type PriorResolution, type RepriceTokenBucket, } from "./pricing.ts";
export { PlanEngine, deriveOrderGuard, ArmError, armRefusalError, ARM_BOUND_NOTHING_MARKER, type PlanEngineOptions, type OrderIntent, type OrderGuardEvidence, type OrderRole, type Gate, type BusSink, type InstrumentSpec, } from "./plans.ts";
export { BookLedger, EngineOrgFacts, type LedgerFill, type MultiplierOf } from "./orgfacts.ts";
export { validateArm, type ArmContext, type ArmValidation, type ArmDiagnostic, type ArmDiagnosticTier, } from "./validate.ts";
export * as lang from "../lang/index.ts";
export * as frame from "../frame/index.ts";
export * as session from "../session/index.ts";
export * as fill from "../fill/index.ts";
export * as blotter from "../blotter/index.ts";
export * as grade from "../grade/index.ts";
export * as canonical from "../canonical/index.ts";
//# sourceMappingURL=index.d.ts.map