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.

201 lines (189 loc) 4.46 kB
/** * # session/harness — the BYOK live-agent harness (kestrel-rul, ADR-0013) * * The harness ENTRY POINT. Importing THIS barrel pulls the provider packages (via * `./ai-sdk-client.ts`) — that is intentional: this is the provider-bearing subpath a live-run * script imports. The deterministic core (`../simulate.ts`, `../agent.ts`) and the node-light root * (`src/index.ts`) import `liveAgent` from `../index.ts`/`./live-agent.ts` instead, never this * barrel, so they stay provider-free (ADR-0013 (c) Consequences). */ export { liveAgent, LIVE_AGENT_ADAPTER, LIVE_AGENT_ADAPTER_VERSION, DEFAULT_CACHE_POLICY, type LiveAgentOptions, type TurnCapture, type TurnOutcome, } from "./live-agent.ts"; export { aiSdkLlmClient, rejectsTemperature, droppedTemperature, cacheBreakpoint, thinkingProviderOptions, THINKING_BUDGET, REASONING_EFFORT, resolveDecoding, GATEWAY_BASE_URL, LOCAL_BASE_URL_DEFAULT, GATEWAY_MIN_OUTPUT_TOKENS, GATEWAY_REASONING_HEADROOM_TOKENS, FIREWORKS_BASE_URL, AZURE_API_VERSION_DEFAULT, type AiSdkClientOptions, type HarnessProvider, type ThinkingLevel, type AiSdkMessage, type AiSdkSystemMessage, type GenerateArgs, type GenerateFn, type GenerateResult, } from "./ai-sdk-client.ts"; export { codexCliClient, codexReasoningEffort, resolveCodexBin, codexBinCandidates, codexExecArgs, renderCodexPrompt, parseCodexUsage, CodexNotFoundError, CODEX_BUNDLED_PATH, CODEX_CALL_TIMEOUT_MS, type CodexCliClientOptions, type CodexReasoningEffort, type CodexExecFn, type CodexExecResult, type CodexCompletion, type CodexUsageEvent, } from "./codex-cli-client.ts"; export { VERTEX_MAAS_LOCATION, VERTEX_MAAS_PROVIDER_NAME, VERTEX_MAAS_PROJECT_ENV_VARS, VERTEX_MAAS_LOCATION_ENV_VARS, ADC_TOKEN_TTL_MS, vertexMaasProjectFromEnv, requireVertexMaasProject, resolveVertexMaasLocation, vertexMaasBaseUrl, gcloudAdcTokenSource, VertexMaasRegionError, AdcAuthError, type AdcExecFn, type AdcExecResult, type AdcTokenSource, } from "./vertex-maas.ts"; export { harnessLlmClient, isFreeProvider, providerCredentialStatus, type HarnessClientOptions, type CredentialStatus, } from "./harness-client.ts"; export { watcherGbnf, watcherJsonSchema, defaultDecodingFor, decodingParams, decodingMiddleware, applyDecoding, resetDecodingCache, FIREWORKS_PROVIDER_NAME, type DecodingConstraint, type DecodingParams, } from "./decoding.ts"; export { ROSTER, CASH_LANES, laneProvider, laneCanServeMultiTurn, resolveLane, isCashLane, cashRoute, rosterEntry, resolveBedrockModelId, bedrockInvokableLabels, ModelResolutionError, type RosterEntry, type Tier, type Lane, type Cost, type RunSize, type LaneReason, type LaneResolution, } from "./roster.ts"; export { BASELINE_SYSTEM_PROMPT, BASELINE_PROMPT_PROFILE, AUTHORING_SYSTEM_PROMPT, AUTHORING_PROMPT_PROFILE, AUTHORING_EXAMPLE_DOCUMENTS, AUTHORING_EXAMPLE_DOCUMENT_LIST, VIEWSHOP_SYSTEM_PROMPT, VIEWSHOP_PROMPT_PROFILE, MANAGE_SYSTEM_PROMPT, MANAGE_PROMPT_PROFILE, DEFAULT_PROMPT_PROFILE, systemPromptForProfile, CREDENTIAL_ENV_VARS, parseTurn, parseAuthoringReply, scrubSecrets, renderBriefingPrompt, renderRepairPrompt, renderWakePrompt, type TurnParse, } from "./prompt.ts"; export { cascadeAgent, cascadeConfigOf, classifyEscalation, attributeCascade, ESCALATION_SENTINEL, type CascadeOptions, type CascadeStep, type EscalationReason, type AttributionInput, type Attribution, } from "./cascade.ts"; export { planFixtureSha, capturePlanFixture, planFixtureFromRun, fixturePlanDoc, recordedStrategistOf, serializePlanFixture, writePlanFixture, readPlanFixture, fanWatchers, monotonicNow, ClockHonestDefectError, type PlanFixture, type PlanFixtureContent, type PlanFixtureFromRunOptions, type WatcherSpec, type FanFrame, type WatcherColumn, type ColumnSummary, type FanResult, type ClockHonestFan, } from "./plan-fixture.ts"; export { fileHandshakeAgent, FILE_HANDSHAKE_ADAPTER, FILE_HANDSHAKE_ADAPTER_VERSION, STAND_DOWN_SENTINEL, DEFAULT_TIMEOUT_MS, ordLabelOf, serializeFrameEnvelope, renderFrameText, timeoutTurn, parseHandshakeTurn, stampHarnessIdentity, type FileHandshakeOptions, type FrameEnvelope, type HandshakeCapture, type HandshakeOutcome, } from "./file-handshake.ts";