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.

27 lines (24 loc) 811 B
import { CliError, EXIT } from "./bin-t9ggwnv5.js"; // src/cli/commands/_heavy.ts function runtimeUnavailable(needsChdb) { return new CliError({ code: "RUNTIME_UNAVAILABLE", exit: EXIT.RUNTIME_UNAVAILABLE, message: "this command requires the Bun runtime" + (needsChdb ? " and the native chdb dependency" : ""), hint: "no usable Bun runtime found — reinstall with optional dependencies enabled (the package bundles `bun`), set KESTREL_BUN=/path/to/bun, or install Bun (https://bun.sh)" }); } async function loadHeavy(imp) { if (process.versions.bun === undefined) throw runtimeUnavailable(false); try { return await imp(); } catch (e) { const s = String(e instanceof Error ? e.message : e); throw runtimeUnavailable(/chdb/i.test(s)); } } export { loadHeavy };