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.

19 lines (18 loc) 997 B
/** * # ast — the typed object model IS the language (ADR-0004) * * Kestrel's canonical representation is this discriminated-union family, not the text. * `parse(text) -> objects` (phase 3) and `print(objects) -> text` (this phase, in * `print.ts`) are inverse projections with a byte-stable round-trip. Every node carries a * literal `kind` tag; there are no classes (data is plain readonly objects) and no `any`. * * One language, four statement kinds (ADR-0001): {@link ViewStatement}, * {@link WakeStatement}, {@link PlanStatement}, {@link GradeStatement} — plus the org * nodes {@link PodStatement} / {@link BookStatement} (ADR-0002). All four surfaces share * one lexical core: the {@link Trigger} algebra, {@link SeriesRef} operands, and * {@link PriceExpr} price expressions. * * The AST is ALWAYS fully qualified — `USING` defaults are resolved at parse time, and * the printer elides whatever matches the ambient `USING` (ADR-0004; ARCHITECTURE §2). */ export {};