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.

40 lines 2.36 kB
/** * # react/HonestChart — human candlesticks over the Frame `json` Rendering (ADR-0052 §3) * * A standard human candlestick chart whose ONLY input is the typed Frame `json` Rendering * ({@link ../frame/render-json.ts FrameJson}) — there is NO generic-OHLC entry point, by doctrine: a * chart that cannot prove it invented nothing defeats the honest-chart claim. Three honesty rules, * all enforced here on the reading side: * * - **UNKNOWN renders as a GAP.** A tape bucket with any UNKNOWN of {open,high,low,close} draws NO * candle — a dashed time-axis tick marks that the bucket exists but its price is unknown. Never an * interpolated candle, never a zero, never a neighbour carried forward. * - **MODEL Fields are BADGED with their receipt.** The kernel's predictor/regime claims are `MODEL` * Fields; each renders a badge whose `<title>` exposes the receipt (source + model version + * confidence) on inspection. Provenance is never hidden. * - **Fail-closed on a degraded MODEL Field.** A claim whose `MODEL` Field arrives WITHOUT its * receipt is REFUSED ({@link assertModelReceipt}) — the chart throws rather than draw an * unattributable model value. * * Rendered as pure SVG (no chart library, no runtime dep beyond the optional `react` peer). PURE + * deterministic: the same {@link FrameJson} yields byte-identical markup (no wall clock, no RNG) — * `React hosts Renderings; it never produces them`. */ import { type ReactElement } from "react"; import type { FrameJson } from "../frame/render-json.ts"; export interface HonestChartProps { /** The typed Frame `json` Rendering — the ONLY data source (no generic-OHLC props, ADR-0052 §3). */ readonly frame: FrameJson; /** Presentation only (not data): the SVG canvas size. Defaults 640×320. */ readonly width?: number; readonly height?: number; /** Presentation only: a class on the root `<svg>` for host styling. */ readonly className?: string; } /** * Render the honest candlestick chart for a Frame `json` Rendering. UNKNOWN buckets become gaps, * MODEL claims are badged with their receipt, a degraded MODEL Field is refused (fail-closed). Pure * SVG, deterministic markup. */ export declare function HonestChart(props: HonestChartProps): ReactElement; //# sourceMappingURL=honest-chart.d.ts.map