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.
70 lines (67 loc) • 2.46 kB
text/typescript
/**
* # frame — the typed Frame of Fields
*
* Charter: a View materialized at one moment is a typed **Frame** — a bundle of
* **Fields**, where every rendered number is a `Field { series_id, value, attribution,
* source_watermark }`: attributed (OBS / CALC / DETECTOR / MODEL / POLICY / UNKNOWN)
* and watermarked (instrument, engine sequence, model version). Every Frame carries a
* **kernel** bound to the *session*, not the View — an acting session (a book attached)
* always shows positions, resting orders, budget, and wake reason, non-configurable; a
* spectator Frame carries provenance only. A full Frame is a **keyframe** (the OPEN
* screen); a **delta frame** carries only what changed since the author's last Frame
* (the WAKE screen). The Frame is the one canonical truth that renders many ways.
*
* ## v1 (this milestone): the minimal date-blind renderer
* The two render entry points — `renderBriefing` (OPEN keyframe) and `renderWakeDelta` (WAKE
* delta) — live in {@link ./render.ts} and render the typed inputs in {@link ./types.ts} to a
* token-efficient ASCII string: the incumbent rotated-candlestick tape (rendering-variants.md
* candidate 2), the acting kernel, and the macro pane absent-with-reason. Date-blind by
* construction (EVALUATION.md): relative time and the HH:MM ET clock only. It invents no value
* (ADR-0008): every number is an input field, an unknown renders `—`.
*
* This barrel re-exports the **input contracts** (the typed objects the stepped day runner
* populates) as its public surface; it carries no runtime binding of its own (the render
* functions are imported from `./render.ts`), so the Phase-1 charter-barrel invariant — a
* `frame` barrel with no runtime exports — still holds while the renderer ships underneath it.
*/
export type {
Attribution,
BriefingInput,
Budget,
BudgetEnvelope,
ChainRow,
Claim,
ClaimType,
EngineAction,
EngineActionKind,
Field,
FillRecord,
FramePhase,
FrameRight,
InstrumentSpec,
Kernel,
LevelSet,
MarketPane,
Mandate,
Brief,
OwnerAct,
PlanStateEntry,
Position,
PriorSessionTape,
PriorVantage,
RestingOrder,
SizingHeadroom,
TapeRow,
VehicleHealth,
WakeDeltaInput,
WakeRef,
WakeSeverity,
} from "./types.ts";
export type {
OptionsAnalytics,
OptionsExpiry,
OptionAnalyticsLeg,
OptionsAnalyticsConfig,
ReducedSurface,
OpenInterestRow,
} from "./options-analytics.ts";