zidane 6.3.1 → 6.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{acp-Cs86McDR.js → acp-CNnevGOW.js} +4 -4
- package/dist/{acp-Cs86McDR.js.map → acp-CNnevGOW.js.map} +1 -1
- package/dist/acp-cli.js +6 -6
- package/dist/acp.d.ts +1 -1
- package/dist/acp.js +1 -1
- package/dist/{agent-AZ_crMfB.js → agent-C5cHuI0r.js} +6 -5
- package/dist/{agent-AZ_crMfB.js.map → agent-C5cHuI0r.js.map} +1 -1
- package/dist/agent.d.ts +2 -2
- package/dist/agent.js +2 -2
- package/dist/{anthropic-CWwySM3p.js → anthropic-DdDVf39o.js} +3 -3
- package/dist/{anthropic-CWwySM3p.js.map → anthropic-DdDVf39o.js.map} +1 -1
- package/dist/{auth-BPSnotuN.js → auth-C2vaeVqG.js} +4 -4
- package/dist/{auth-BPSnotuN.js.map → auth-C2vaeVqG.js.map} +1 -1
- package/dist/{cache-telemetry-DzyfqSds.js → cache-telemetry-ehVdWsg2.js} +23 -4
- package/dist/cache-telemetry-ehVdWsg2.js.map +1 -0
- package/dist/chat/pure.d.ts +3 -3
- package/dist/chat.d.ts +4 -4
- package/dist/chat.js +3 -3
- package/dist/{context-transport-64EeXTAQ.js → context-transport-CkiORGgx.js} +3 -3
- package/dist/{context-transport-64EeXTAQ.js.map → context-transport-CkiORGgx.js.map} +1 -1
- package/dist/contexts/daytona.d.ts +1 -1
- package/dist/contexts/e2b.d.ts +1 -1
- package/dist/eval.d.ts +1 -1
- package/dist/eval.js +1 -1
- package/dist/extensions.d.ts +1 -1
- package/dist/extensions.js +1 -1
- package/dist/headless.d.ts +1 -1
- package/dist/headless.js +3 -3
- package/dist/{index-D-PvuMCb.d.ts → index-BT4Q1nLD.d.ts} +99 -8
- package/dist/index-BT4Q1nLD.d.ts.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +9 -9
- package/dist/{login-fgr9zD6z.js → login-b2sxfknZ.js} +2 -2
- package/dist/{login-fgr9zD6z.js.map → login-b2sxfknZ.js.map} +1 -1
- package/dist/{mcp-DolMi7WV.js → mcp-DvvV6xub.js} +3 -3
- package/dist/{mcp-DolMi7WV.js.map → mcp-DvvV6xub.js.map} +1 -1
- package/dist/mcp.d.ts +1 -1
- package/dist/mcp.js +1 -1
- package/dist/{messages-CLkUdPeG.js → messages-TVh_iU9W.js} +2 -2
- package/dist/{messages-CLkUdPeG.js.map → messages-TVh_iU9W.js.map} +1 -1
- package/dist/{openai-compat-DHlBIjj9.js → openai-compat-Ba4nw7ip.js} +4 -3
- package/dist/openai-compat-Ba4nw7ip.js.map +1 -0
- package/dist/output/stream-json.d.ts +1 -1
- package/dist/output/terminal.d.ts +1 -1
- package/dist/presets.d.ts +1 -1
- package/dist/presets.js +1 -1
- package/dist/providers/anthropic.d.ts +1 -1
- package/dist/providers/anthropic.js +1 -1
- package/dist/providers/arcee.d.ts +1 -1
- package/dist/providers/arcee.js +1 -1
- package/dist/providers/baseten.d.ts +1 -1
- package/dist/providers/baseten.js +1 -1
- package/dist/providers/cerebras.d.ts +1 -1
- package/dist/providers/cerebras.js +1 -1
- package/dist/providers/local.d.ts +1 -1
- package/dist/providers/local.js +1 -1
- package/dist/providers/openai-compat.d.ts +1 -1
- package/dist/providers/openai-compat.js +1 -1
- package/dist/providers/openai.d.ts +1 -1
- package/dist/providers/openai.js +2 -2
- package/dist/providers/openrouter.d.ts +1 -1
- package/dist/providers/openrouter.js +1 -1
- package/dist/providers/xai.d.ts +1 -1
- package/dist/providers/xai.js +1 -1
- package/dist/{providers-Nu5ysnXN.js → providers-g1ilD4qo.js} +3 -3
- package/dist/{providers-Nu5ysnXN.js.map → providers-g1ilD4qo.js.map} +1 -1
- package/dist/providers.d.ts +1 -1
- package/dist/providers.js +4 -4
- package/dist/restate.d.ts +1 -1
- package/dist/session/sqlite.d.ts +1 -1
- package/dist/{session-vmy9jTVM.js → session-CFwkU19n.js} +2 -2
- package/dist/{session-vmy9jTVM.js.map → session-CFwkU19n.js.map} +1 -1
- package/dist/session.d.ts +1 -1
- package/dist/session.js +2 -2
- package/dist/skills.d.ts +1 -1
- package/dist/{stdio-D0v-W5w7.js → stdio-DUu_loK-.js} +2 -2
- package/dist/{stdio-D0v-W5w7.js.map → stdio-DUu_loK-.js.map} +1 -1
- package/dist/{stdio-loader-BPUedHxT.js → stdio-loader-LlzejufT.js} +2 -2
- package/dist/{stdio-loader-BPUedHxT.js.map → stdio-loader-LlzejufT.js.map} +1 -1
- package/dist/{tool-formatters-BPKA2if5.d.ts → tool-formatters-CHz3OpkJ.d.ts} +2 -2
- package/dist/{tool-formatters-BPKA2if5.d.ts.map → tool-formatters-CHz3OpkJ.d.ts.map} +1 -1
- package/dist/tools/fetch-url.d.ts +1 -1
- package/dist/tools/web-search.d.ts +1 -1
- package/dist/tools.d.ts +1 -1
- package/dist/tools.js +1 -1
- package/dist/{transcript-anchors-DzuIcJpm.d.ts → transcript-anchors-BnG23uzH.d.ts} +2 -2
- package/dist/{transcript-anchors-DzuIcJpm.d.ts.map → transcript-anchors-BnG23uzH.d.ts.map} +1 -1
- package/dist/{transcript-anchors-6-uB2Xvl.js → transcript-anchors-D2RZPaGf.js} +4 -4
- package/dist/{transcript-anchors-6-uB2Xvl.js.map → transcript-anchors-D2RZPaGf.js.map} +1 -1
- package/dist/tui.d.ts +3 -3
- package/dist/tui.js +8 -8
- package/dist/{turn-operations-Dzr3QhDD.d.ts → turn-operations-BjkxnZL_.d.ts} +3 -3
- package/dist/{turn-operations-Dzr3QhDD.d.ts.map → turn-operations-BjkxnZL_.d.ts.map} +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/{xai-Cn0LsHRt.js → xai-5LbsIfXn.js} +2 -2
- package/dist/{xai-Cn0LsHRt.js.map → xai-5LbsIfXn.js.map} +1 -1
- package/docs/ARCHITECTURE.md +11 -2
- package/package.json +1 -1
- package/dist/cache-telemetry-DzyfqSds.js.map +0 -1
- package/dist/index-D-PvuMCb.d.ts.map +0 -1
- package/dist/openai-compat-DHlBIjj9.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cache-telemetry-ehVdWsg2.js","names":[],"sources":["../src/cache-telemetry.ts"],"sourcesContent":["/**\n * Per-dimension cache-break detection.\n *\n * The agent surfaces `cacheRead` / `cacheCreation` in {@link TurnUsage}, but\n * doesn't answer the load-bearing diagnostic question: *which* dimension\n * busted the cache? When `cacheCreation > 0` on turn N+1 with no obvious\n * reason, you want to know whether the system prompt, the tool list, the\n * thinking config, or the model id changed — without re-reading the loop\n * source.\n *\n * This module hashes each cache-affecting dimension at `turn:before`, then\n * on `turn:after` checks whether the latest turn read its share of the\n * cached prefix. If not, it diffs the previous turn's dimension hashes\n * against the current ones and logs the responsible dimension(s).\n *\n * Wire contract:\n *\n * - Install via {@link installCacheBreakLogger} on the agent's hook bus.\n * Returns an uninstall fn. Idempotent — calling install twice on the\n * same bus leaves two listeners; callers manage lifecycle.\n * - Output sink defaults to `console.error`; pass `log` to redirect into a\n * {@link Logger}, span attribute writer, or test buffer.\n * - Heuristic only: a missing cache read on turn 1 is expected (nothing\n * cached yet); the logger only reports from turn 2 onward.\n * - Pure helper {@link diffCacheDimensions} is exported for tests so the\n * diff logic can be exercised without standing up the loop.\n *\n * The dimensions tracked are the inputs the provider treats as part of the\n * cache key — `system`, `tools`, `model`, thinking config, and the message\n * PREFIX. Tools are hashed after `provider.formatTools`, so MCP catalogues\n * showing up mid-run also register as a break. Messages are hashed\n * per-message and compared positionally (`messageHashes` / the\n * `messagePrefix` dimension): appending — what every healthy turn does — is\n * deliberately silent, while an in-place rewrite of an earlier message\n * (compaction, stale-read elision, media age-out, host-side history trims)\n * reports the exact index that diverged.\n */\n\nimport type { Hookable } from 'hookable'\nimport type { AgentHooks } from './agent'\nimport type { StreamOptions } from './providers'\n\n// ---------------------------------------------------------------------------\n// Public types\n// ---------------------------------------------------------------------------\n\n/**\n * Snapshot of per-request dimensions that contribute to the provider-side\n * prompt cache key. Hashed at `turn:before` and stashed for diffing on the\n * next request.\n *\n * Hashes are FNV-1a 32-bit (cheap, no allocations on the hot path,\n * collision rate good enough for diff detection — we're not signing\n * anything). For verbose output the helper also captures byte lengths so\n * `system: 1024 → 1031` reads like a real diff line.\n */\nexport interface CacheDimensionSnapshot {\n /** Hash of `options.system` (with boundary marker preserved). */\n systemHash: number\n /** Byte length of `options.system`. */\n systemBytes: number\n /** Hash of the JSON-serialized `options.tools` array. */\n toolsHash: number\n /** Number of tools in the array. */\n toolsCount: number\n /** Model id. */\n model: string\n /** Thinking level — `'off'` when absent. */\n thinking: string\n /** Exact thinking budget — `0` when absent. */\n thinkingBudget: number\n /** Whole-task thinking budget (Anthropic adaptive-only) — `0` when absent. */\n taskBudget: number\n /** Whether the level-derived effort hint is emitted — `true` when absent. */\n effortHint: boolean\n /**\n * Per-message content hashes, in order. Compared POSITIONALLY against the\n * previous turn so that appending messages — what every healthy turn does —\n * is not mistaken for a rewrite. A single cumulative hash cannot make that\n * distinction: it changes on plain growth too, and would name this dimension\n * on literally every break, drowning the real culprit.\n *\n * Tracked because the expensive real-world breaks live here, not in the\n * request scaffold: compaction, stale-read elision, media age-out and history\n * trimming all rewrite the transcript mid-conversation, and none of them touch\n * `system`, `tools`, or the model id. A run can lose its entire transcript to\n * a cache miss with every other dimension reading perfectly stable.\n */\n messageHashes: readonly number[]\n /** Number of messages in the request. */\n messageCount: number\n}\n\n/** Result of {@link diffCacheDimensions}. */\nexport interface CacheDimensionDiff {\n /** Dimension names whose hashes differ between the two snapshots. */\n changed: readonly CacheDimensionName[]\n /** Per-dimension details — only filled for changed dimensions. */\n details: Readonly<Partial<Record<CacheDimensionName, string>>>\n /**\n * Message index where the prefixes diverged, when `changed` includes\n * `'messagePrefix'`. Chunk-aligned values (multiples of the compaction\n * chunk) point at tail compaction / media age-out; non-aligned values point\n * at stale-read stubbing or host-side history surgery.\n */\n messagePrefixDivergedAt?: number\n}\n\n/** Cache-affecting dimension names. */\nexport type CacheDimensionName\n = | 'system'\n | 'tools'\n | 'model'\n | 'thinking'\n | 'thinkingBudget'\n | 'taskBudget'\n | 'effortHint'\n /**\n * Per-message hashes compared positionally over the shared range — see\n * {@link CacheDimensionSnapshot.messageHashes}. Appends are silent (every\n * healthy turn grows the list); any in-place rewrite of a shared position,\n * including the previous turn's last message, is reported with its index.\n */\n | 'messagePrefix'\n\n/**\n * Structured payload of the `'cache:break'` agent hook, emitted by\n * {@link installCacheBreakLogger} whenever a turn reads back materially less\n * prefix than the previous turn established (see `expectedReadAtLeast` /\n * `expectedReadRatio` on {@link CacheBreakLoggerOptions}).\n *\n * `changed` names the request dimensions that differ from the previous turn —\n * the culprit when the host rewrote something. An EMPTY `changed` is itself a\n * signal: the request was byte-stable AT THIS WIRE and the provider still\n * failed to serve the prefix. Three suspects, in the order to check them:\n *\n * 1. TTL expiry — a long pause since the previous turn (compare wall-clock\n * gaps; the default window is ~5 minutes).\n * 2. Provider-side eviction — no pause, no pattern; typically isolated.\n * 3. Downstream transformation churn — on architectures where a gateway CASTS\n * this request into another provider's format (Anthropic → OpenAI\n * Responses, Converse, …), these dimensions only cover the PRE-cast bytes.\n * A transform that isn't prefix-monotonic (unstable id mapping, per-request\n * injections, config-derived fields like reasoning effort) breaks the\n * vendor's cache while reading as byte-stable here. Recurring\n * empty-`changed` breaks on a cast route point at the transform, not at\n * this agent — instrument the gateway's OUTPUT with the same positional\n * hashing (`hashMessages`) to name the churn.\n */\nexport interface CacheBreakInfo {\n /**\n * 1-based turn index as counted by the detector — monotonic across the\n * INSTALLER'S lifetime, i.e. every `agent.run()` on this hook bus. It does\n * NOT reset per run the way `turn:after`'s `ctx.turn` does, so don't\n * correlate the two on any prompt after the first; use `turnId` for that.\n */\n turn: number\n turnId: string\n /** Model id of the request that broke — pair with a provider key to price the break. */\n model: string\n cacheRead: number\n cacheCreation: number\n /** The floor that tripped: `max(expectedReadAtLeast, ratio-derived floor)`. */\n expectedAtLeast: number\n /**\n * Approximate tokens re-billed by this break: the prefix the previous turn\n * had cached minus what this turn actually read back. That portion was\n * re-written at the cache-write rate (~1.25x input) instead of read at the\n * cache-read rate (~0.1x), so the extra spend is roughly\n * `1.15 x rebilledTokens` input-token equivalents. Approximate because the\n * healthy-turn counterfactual (the genuine new-transcript delta) is folded\n * into `cacheCreation` and cannot be separated out.\n */\n rebilledTokens: number\n /** Request dimensions that changed since the previous turn; empty ⇒ suspect TTL/eviction. */\n changed: CacheDimensionName[]\n /** Human-readable per-dimension diffs, keyed by the entries of `changed`. */\n details: Partial<Record<CacheDimensionName, string>>\n}\n\n/**\n * Structured payload of the `'cache:drift'` agent hook, emitted by\n * {@link installCacheBreakLogger} at `turn:before` whenever the outgoing\n * request DIVERGES from the previous completed turn's — any tracked dimension,\n * including an in-place rewrite of the message prefix.\n *\n * Drift is the PREDICTIVE counterpart of `'cache:break'`: it fires from the\n * request bytes alone, before (and regardless of whether) the provider\n * confirms a miss. That makes it the signal that works everywhere the\n * confirmed-cost path cannot see — providers that report no cache usage, and\n * format-casting gateways where this wire is the last observable point before\n * the cast. A turn that drifts here and then reports a healthy `cacheRead`\n * means the provider absorbed the change (e.g. only the tail moved); a turn\n * that drifts AND breaks gives the break its attribution for free.\n *\n * Intentional rewrites drift too, by design — that is the attribution story\n * for planned invalidations: tail compaction and media age-out cut on\n * chunk-aligned indices (`divergedAt` a multiple of the compaction chunk),\n * stale-read stubbing rewrites a read's own position, host history surgery\n * lands anywhere. `details.messagePrefix` carries the same hint in prose.\n */\nexport interface CacheDriftInfo {\n /** 1-based turn index, installer-lifetime monotonic — see {@link CacheBreakInfo.turn}. */\n turn: number\n turnId: string\n /** Model id of the OUTGOING request (post-fallback, pre-provider). */\n model: string\n /** Dimensions that differ from the previous completed turn's request. */\n changed: CacheDimensionName[]\n /** Human-readable per-dimension diffs, keyed by the entries of `changed`. */\n details: Partial<Record<CacheDimensionName, string>>\n /** Message index of an in-place prefix rewrite — see {@link CacheDimensionDiff.messagePrefixDivergedAt}. */\n divergedAt?: number\n previousMessageCount: number\n messageCount: number\n}\n\n// ---------------------------------------------------------------------------\n// Configuration\n// ---------------------------------------------------------------------------\n\nexport interface CacheBreakLoggerOptions {\n /**\n * Sink for log lines. Defaults to `console.error`. Use a {@link Logger} or\n * a test buffer here when you want the output to land somewhere other than\n * stderr.\n *\n * NOT every line is a dimension diff: unless {@link onEmitError} is\n * provided, `'cache:break'` handler errors are also routed here (prefixed\n * `cache-break: 'cache:break' handler threw:`). A host that counts `log`\n * invocations as \"dimension changes\" — the journal-mode wiring — should\n * either pass `onEmitError` or count via the `'cache:break'` hook instead.\n */\n log?: (line: string) => void\n /**\n * Sink for errors thrown by `'cache:break'` hook consumers. The emission is\n * try/caught so a UI bug in a handler can't unwind into the loop and abort\n * the run; this is where that error surfaces. Defaults to the {@link log}\n * channel (never a louder one — hosts route `log` away from stderr for good\n * reasons). Pass a dedicated sink when `log` invocations are being counted\n * as metrics.\n */\n onEmitError?: (error: unknown) => void\n /**\n * When `true`, emit a log line on EVERY turn (not just cache breaks) with\n * the per-dimension hashes. Useful for offline correlation; off by default\n * to keep the logger zero-noise on happy paths.\n */\n verbose?: boolean\n /**\n * Absolute floor for \"this turn missed cache\". The logger reports when\n * `cacheRead` falls below the threshold AND the dimensions differ from the\n * previous turn.\n *\n * Defaults to `1`, which on its own only catches TOTAL cache loss. That is not\n * the common failure: when the system prompt or the message prefix is\n * rewritten, `tools` + the static system block still match, so `cacheRead`\n * stays comfortably non-zero — pinned to a CONSTANT equal to that scaffold —\n * while the entire conversation re-bills at the cache-write rate. An\n * absolute-only threshold reports such a run as perfectly healthy.\n *\n * {@link CacheBreakLoggerOptions.expectedReadRatio} is the fix and is on by\n * default; this field remains as the absolute floor beneath it.\n */\n expectedReadAtLeast?: number\n /**\n * Detect PARTIAL-prefix breaks by comparing this turn's `cacheRead` against\n * the prefix the previous turn established (`cacheRead + cacheCreation`).\n * The conversation only grows, so a healthy turn reads back at least what the\n * one before it wrote; reading materially less means something at or before\n * the last message changed.\n *\n * Defaults to `0.8` — the slack absorbs tokenizer jitter and any uncached\n * dynamic system block, which is re-billed by design. Set `0` to disable and\n * restore the pre-6.3 absolute-only behavior.\n */\n expectedReadRatio?: number\n}\n\n// ---------------------------------------------------------------------------\n// Hashing\n// ---------------------------------------------------------------------------\n\nconst FNV_OFFSET = 0x811C9DC5\nconst FNV_PRIME = 0x01000193\n\n/**\n * Smallest previous-prefix size the ratio test will judge. Below this the run\n * has barely started (or the provider reports no cache at all) and the ratio is\n * noise — the absolute floor still applies.\n */\nconst MIN_JUDGED_PREFIX_TOKENS = 1024\n\n/**\n * FNV-1a-style 32-bit hash over UTF-16 code units. Pure, allocation-free,\n * ~10 ns per KB. Cryptographic strength is irrelevant here — we only need\n * change detection, and this has effectively zero collision risk for the\n * small number of dimensions tracked.\n *\n * Feeds the FULL char code into the mix (same as read-state's\n * `hashContent`) — masking to the low byte would collapse code points that\n * share a low byte, so a non-ASCII system-prompt change could hash\n * identically and silently hide a cache-dimension drift.\n *\n * Exported for tests; callers shouldn't typically import directly.\n */\nexport function fnv1a32(s: string): number {\n let h = FNV_OFFSET\n for (let i = 0; i < s.length; i++) {\n h ^= s.charCodeAt(i)\n // Multiply by FNV_PRIME mod 2^32, using `Math.imul` to keep within\n // 32-bit signed range (avoid >>> 0 ping-pong on every iteration).\n h = Math.imul(h, FNV_PRIME)\n }\n // Map signed → unsigned 32-bit so the printed hex is stable.\n return h >>> 0\n}\n\n/**\n * Build a {@link CacheDimensionSnapshot} from a `turn:before` payload.\n *\n * Pure — exported so hosts can compute snapshots outside the logger (e.g.\n * stamping them onto custom telemetry spans). The hash is deterministic on\n * byte-identical inputs.\n */\nexport function snapshotCacheDimensions(options: StreamOptions): CacheDimensionSnapshot {\n const toolsJson = JSON.stringify(options.tools ?? [])\n const messages = options.messages ?? []\n return {\n systemHash: fnv1a32(options.system),\n systemBytes: options.system.length,\n toolsHash: fnv1a32(toolsJson),\n toolsCount: Array.isArray(options.tools) ? options.tools.length : 0,\n model: options.model,\n thinking: options.thinking ?? 'off',\n thinkingBudget: options.thinkingBudget ?? 0,\n taskBudget: options.taskBudget ?? 0,\n effortHint: options.effortHint !== false,\n messageHashes: hashMessages(messages),\n messageCount: messages.length,\n }\n}\n\n/**\n * Hash each message independently, preserving order.\n *\n * Per-message rather than cumulative so the diff can tell an APPEND (healthy)\n * from a REWRITE (a cache break) by comparing positionally — see\n * {@link CacheDimensionSnapshot.messageHashes}.\n *\n * Folds field-by-field into a rolling FNV rather than `JSON.stringify`-ing the\n * whole list at once: on a long run the transcript is hundreds of KB, and\n * building one giant string every turn just to throw it away is the kind of\n * overhead that gets telemetry ripped back out.\n *\n * Exported so hosts can stamp the same hashes onto their own spans.\n */\nexport function hashMessages(messages: readonly { role: string, content: unknown }[]): number[] {\n const out: number[] = []\n for (const message of messages) {\n if (!message) {\n out.push(0)\n continue\n }\n let h = mixString(FNV_OFFSET, message.role ?? '')\n // `JSON.stringify` yields `undefined` (the value, not a string) for\n // undefined input — public export, so don't let a malformed message throw\n // inside a diagnostics helper.\n h = mixString(h, JSON.stringify(message.content) ?? '')\n out.push(h >>> 0)\n }\n return out\n}\n\n/**\n * Index of the first message whose content differs, or -1 when one list is a\n * pure prefix of the other (i.e. messages were only appended).\n */\nfunction firstDivergentIndex(prev: readonly number[], curr: readonly number[]): number {\n const shared = Math.min(prev.length, curr.length)\n for (let i = 0; i < shared; i++) {\n if (prev[i] !== curr[i])\n return i\n }\n return -1\n}\n\n/** Mix a string into a running FNV-1a state. */\nfunction mixString(seed: number, s: string): number {\n let h = seed\n for (let i = 0; i < s.length; i++) {\n h ^= s.charCodeAt(i)\n h = Math.imul(h, FNV_PRIME)\n }\n return h\n}\n\n// ---------------------------------------------------------------------------\n// Diffing\n// ---------------------------------------------------------------------------\n\n/**\n * Compare two snapshots and return the list of dimensions whose bytes\n * differ. The `details` map carries a short human-readable description per\n * changed dimension (e.g. `system: 1024 → 1031 bytes`).\n *\n * Pure / no I/O. Use this in tests to assert the diff logic; the logger\n * itself just formats and emits the result.\n */\nexport function diffCacheDimensions(\n prev: CacheDimensionSnapshot,\n curr: CacheDimensionSnapshot,\n): CacheDimensionDiff {\n const changed: CacheDimensionName[] = []\n const details: Partial<Record<CacheDimensionName, string>> = {}\n\n if (prev.systemHash !== curr.systemHash) {\n changed.push('system')\n details.system = `${prev.systemBytes} → ${curr.systemBytes} bytes (hash ${hex(prev.systemHash)} → ${hex(curr.systemHash)})`\n }\n if (prev.toolsHash !== curr.toolsHash) {\n changed.push('tools')\n details.tools = `${prev.toolsCount} → ${curr.toolsCount} tools (hash ${hex(prev.toolsHash)} → ${hex(curr.toolsHash)})`\n }\n if (prev.model !== curr.model) {\n changed.push('model')\n details.model = `${prev.model} → ${curr.model}`\n }\n if (prev.thinking !== curr.thinking) {\n changed.push('thinking')\n details.thinking = `${prev.thinking} → ${curr.thinking}`\n }\n if (prev.thinkingBudget !== curr.thinkingBudget) {\n changed.push('thinkingBudget')\n details.thinkingBudget = `${prev.thinkingBudget} → ${curr.thinkingBudget}`\n }\n if (prev.taskBudget !== curr.taskBudget) {\n changed.push('taskBudget')\n details.taskBudget = `${prev.taskBudget} → ${curr.taskBudget}`\n }\n if (prev.effortHint !== curr.effortHint) {\n changed.push('effortHint')\n details.effortHint = `${prev.effortHint} → ${curr.effortHint}`\n }\n // Reported last, mirroring the provider's tools → system → messages ordering:\n // a change here invalidates the least, a change in `tools` the most.\n //\n // Only a POSITIONAL divergence counts. Appending messages is what every\n // healthy turn does and must never be reported, or this dimension would name\n // itself on every single break and bury the real culprit.\n const divergentAt = firstDivergentIndex(prev.messageHashes, curr.messageHashes)\n if (divergentAt >= 0) {\n changed.push('messagePrefix')\n details.messagePrefix = `message[${divergentAt}] of ${prev.messageCount} → ${curr.messageCount} was rewritten in place`\n + ` — suspect compaction, stale-read elision, media age-out, or host-side history trimming`\n }\n\n // Single tail return so a dimension added below the messagePrefix check can\n // never be silently skipped on the turns where the prefix diverged — the\n // turns where full attribution matters most.\n return { changed, details, ...(divergentAt >= 0 ? { messagePrefixDivergedAt: divergentAt } : {}) }\n}\n\nfunction hex(n: number): string {\n return `0x${n.toString(16).padStart(8, '0')}`\n}\n\n// ---------------------------------------------------------------------------\n// Hook installer\n// ---------------------------------------------------------------------------\n\n/**\n * Install the cache-break logger on an agent's hook bus.\n *\n * Subscribes to `turn:before` (snapshot) + `turn:after` (compare with prior\n * snapshot, log breaks). Returns an `uninstall` fn that detaches both\n * listeners. Idempotent w.r.t. agent lifecycle — installs/uninstalls cleanly\n * across runs.\n *\n * Recommended setup:\n *\n * ```ts\n * const uninstall = installCacheBreakLogger(agent.hooks, {\n * log: line => logger.debug(line),\n * verbose: !!process.env.ZIDANE_DEBUG?.includes('cache'),\n * })\n * // ...\n * uninstall()\n * ```\n *\n * Performance: hashing runs on each `turn:before` and is bounded by the\n * input size (system + tools serialization). Disabled callers pay nothing\n * (don't install).\n */\nexport function installCacheBreakLogger(\n hooks: Hookable<AgentHooks>,\n options: CacheBreakLoggerOptions = {},\n): () => void {\n const log = options.log ?? ((line: string) => console.error(line))\n // Defaults into `log` (not console.error): hosts route `log` away from\n // stderr for good reasons — the TUI's alternate screen, e.g. — and a\n // consumer bug should not get a louder channel than the feature itself.\n const onEmitError = options.onEmitError\n ?? ((error: unknown) => log(`cache-break: 'cache:break' handler threw: ${String(error)}`))\n const verbose = options.verbose === true\n const expectedReadAtLeast = options.expectedReadAtLeast ?? 1\n const expectedReadRatio = options.expectedReadRatio ?? 0.8\n\n // Per-bus latest snapshot. Keyed implicitly by the bus instance —\n // installing on a fresh bus starts from empty. Across runs on the same\n // bus, the snapshot persists, which is what we want: the first turn of\n // run N+1 should hit cache if it shares a prefix with the last turn of\n // run N. The detector reports correctly across that boundary.\n let prev: CacheDimensionSnapshot | undefined\n /**\n * Size of the prefix the previous turn left cached (`cacheRead +\n * cacheCreation`). Turn N+1 should read back at least this much.\n */\n let previousPrefixTokens = 0\n let turnIndex = 0\n let pending: { snapshot: CacheDimensionSnapshot, turnIndex: number, turnId: string } | undefined\n\n function onTurnBefore(ctx: { turn: number, turnId: string, options: StreamOptions }): void {\n const curr = snapshotCacheDimensions(ctx.options)\n turnIndex += 1\n\n if (verbose) {\n log(formatVerboseLine({\n turn: turnIndex,\n turnId: ctx.turnId,\n snapshot: curr,\n }))\n }\n\n // Stash for the matching `turn:after`. The confirmed-cost path can't run\n // here — the cache-read result lands on `turn:after.usage`.\n pending = { snapshot: curr, turnIndex, turnId: ctx.turnId }\n\n // Predictive path: the request bytes alone tell us the prefix moved,\n // before any provider accounting. `prev` is the last COMPLETED turn's\n // snapshot (assigned at its `turn:after`), so a turn that errors before\n // completion doesn't become the comparison baseline. Fires for\n // intentional rewrites too — that is the attribution channel for\n // compaction cuts and stale-read stubs, not noise (see CacheDriftInfo).\n //\n // FIRE-AND-FORGET, deliberately not awaited: `turn:before` is dispatched\n // through the loop's PROPAGATING hook timeout (`boundedHook`), so awaiting\n // arbitrary drift consumers here would let a slow subscriber time out the\n // whole dispatch and abort the run — the exact coupling `onEmitError`\n // exists to rule out. (`'cache:break'` on `turn:after` rides the\n // timeout-swallowing dispatch, so awaiting is safe THERE.) Synchronous\n // subscribers still complete before the request goes out — hookable\n // invokes handlers inline — while async subscribers detach; the payload is\n // a fresh object per emission, so detached consumers can't observe later\n // mutation. Errors from either path route to `onEmitError`.\n if (prev && turnIndex > 1) {\n const diff = diffCacheDimensions(prev, curr)\n if (diff.changed.length > 0) {\n try {\n void Promise.resolve(hooks.callHook('cache:drift', {\n turn: turnIndex,\n turnId: ctx.turnId,\n model: curr.model,\n changed: [...diff.changed],\n details: { ...diff.details },\n ...(diff.messagePrefixDivergedAt !== undefined ? { divergedAt: diff.messagePrefixDivergedAt } : {}),\n previousMessageCount: prev.messageCount,\n messageCount: curr.messageCount,\n })).catch(onEmitError)\n }\n catch (error) {\n // a synchronously-throwing dispatch path must not unwind into the loop\n onEmitError(error)\n }\n }\n }\n }\n\n async function onTurnAfter(ctx: { turn: number, turnId: string, usage: { cacheRead?: number, cacheCreation?: number } }): Promise<void> {\n if (!pending || pending.turnId !== ctx.turnId)\n return\n const { snapshot: curr, turnIndex: tIdx } = pending\n pending = undefined\n\n // Skip break detection on providers that don't report `cacheRead` —\n // treating undefined as 0 would log a false break every turn on Codex,\n // Cerebras, or any host without a cache_read field. We can only diagnose\n // breaks when the provider tells us how much cache was actually used.\n if (prev && tIdx > 1 && typeof ctx.usage.cacheRead === 'number') {\n const cacheRead = ctx.usage.cacheRead\n // Below the absolute floor, OR materially short of the prefix the previous\n // turn already had cached. The second test is the one that catches a\n // partial break, where `cacheRead` is large but covers only the scaffold.\n const ratioFloor = expectedReadRatio > 0 && previousPrefixTokens >= MIN_JUDGED_PREFIX_TOKENS\n ? previousPrefixTokens * expectedReadRatio\n : 0\n if (cacheRead < expectedReadAtLeast || cacheRead < ratioFloor) {\n const diff = diffCacheDimensions(prev, curr)\n // The text line stays gated on an attributable dimension change (its\n // historical behavior); the typed hook fires on EVERY break — an\n // empty `changed` is the TTL-expiry / provider-eviction signature and\n // hosts (TUI chip, dashboards) want to see it.\n if (diff.changed.length > 0) {\n log(formatBreakLine({\n turn: tIdx,\n turnId: ctx.turnId,\n cacheRead,\n cacheCreation: ctx.usage.cacheCreation ?? 0,\n diff,\n }))\n }\n // Emission is side-effect-safe: this runs inside the loop's\n // `turn:after` dispatch, so a throwing consumer handler (a UI bug,\n // say) would otherwise unwind into the loop and abort the run — a\n // bad trade for an observational diagnostics module. Errors are\n // surfaced through the `log` channel instead of propagated.\n try {\n await hooks.callHook('cache:break', {\n turn: tIdx,\n turnId: ctx.turnId,\n model: curr.model,\n cacheRead,\n cacheCreation: ctx.usage.cacheCreation ?? 0,\n // Journal mode pins `expectedReadAtLeast` to Infinity (\"report\n // every dimension change\"), and Infinity JSON-serializes as\n // `null` — a metrics pipeline consuming this payload would see a\n // null floor on every break. When the absolute floor is\n // non-finite, report the tightest FINITE floor that actually\n // tripped: the ratio floor when this turn read less than it,\n // otherwise the previous turn's cached prefix (the \"should have\n // read everything\" claim the pin amounts to).\n expectedAtLeast: Number.isFinite(expectedReadAtLeast)\n ? Math.max(expectedReadAtLeast, Math.round(ratioFloor))\n : cacheRead < ratioFloor\n ? Math.round(ratioFloor)\n : Math.round(previousPrefixTokens),\n rebilledTokens: Math.max(0, Math.round(previousPrefixTokens - cacheRead)),\n changed: [...diff.changed],\n details: { ...diff.details },\n })\n }\n catch (error) {\n onEmitError(error)\n }\n }\n }\n\n previousPrefixTokens = (ctx.usage.cacheRead ?? 0) + (ctx.usage.cacheCreation ?? 0)\n prev = curr\n }\n\n // Hookable's `.hook()` returns its own unregister fn — keep both so\n // `uninstall()` is symmetric with the install path and survives a\n // future hookable rename of `removeHook`.\n const unregisterBefore = hooks.hook('turn:before', onTurnBefore)\n const unregisterAfter = hooks.hook('turn:after', onTurnAfter)\n\n return () => {\n unregisterBefore()\n unregisterAfter()\n }\n}\n\n// ---------------------------------------------------------------------------\n// Formatting\n// ---------------------------------------------------------------------------\n\nfunction formatBreakLine(input: {\n turn: number\n turnId: string\n cacheRead: number\n cacheCreation: number\n diff: CacheDimensionDiff\n}): string {\n const names = input.diff.changed.join(', ')\n const details = input.diff.changed\n .map(d => ` ${d}: ${input.diff.details[d]}`)\n .join('\\n')\n return [\n `[zidane:cache-break] turn=${input.turn} turnId=${input.turnId} cacheRead=${input.cacheRead} cacheCreation=${input.cacheCreation}`,\n ` changed: ${names}`,\n details,\n ].join('\\n')\n}\n\nfunction formatVerboseLine(input: {\n turn: number\n turnId: string\n snapshot: CacheDimensionSnapshot\n}): string {\n const s = input.snapshot\n return `[zidane:cache] turn=${input.turn} turnId=${input.turnId} system=${hex(s.systemHash)}(${s.systemBytes}b) tools=${hex(s.toolsHash)}(${s.toolsCount}) model=${s.model} thinking=${s.thinking}/${s.thinkingBudget}${s.taskBudget ? `/task=${s.taskBudget}` : ''}`\n}\n"],"mappings":";AA2RA,MAAM,aAAa;AACnB,MAAM,YAAY;;;;;;AAOlB,MAAM,2BAA2B;;;;;;;;;;;;;;AAejC,SAAgB,QAAQ,GAAmB;CACzC,IAAI,IAAI;CACR,KAAK,IAAI,IAAI,GAAG,IAAI,EAAE,QAAQ,KAAK;EACjC,KAAK,EAAE,WAAW,CAAC;EAGnB,IAAI,KAAK,KAAK,GAAG,SAAS;CAC5B;CAEA,OAAO,MAAM;AACf;;;;;;;;AASA,SAAgB,wBAAwB,SAAgD;CACtF,MAAM,YAAY,KAAK,UAAU,QAAQ,SAAS,CAAC,CAAC;CACpD,MAAM,WAAW,QAAQ,YAAY,CAAC;CACtC,OAAO;EACL,YAAY,QAAQ,QAAQ,MAAM;EAClC,aAAa,QAAQ,OAAO;EAC5B,WAAW,QAAQ,SAAS;EAC5B,YAAY,MAAM,QAAQ,QAAQ,KAAK,IAAI,QAAQ,MAAM,SAAS;EAClE,OAAO,QAAQ;EACf,UAAU,QAAQ,YAAY;EAC9B,gBAAgB,QAAQ,kBAAkB;EAC1C,YAAY,QAAQ,cAAc;EAClC,YAAY,QAAQ,eAAe;EACnC,eAAe,aAAa,QAAQ;EACpC,cAAc,SAAS;CACzB;AACF;;;;;;;;;;;;;;;AAgBA,SAAgB,aAAa,UAAmE;CAC9F,MAAM,MAAgB,CAAC;CACvB,KAAK,MAAM,WAAW,UAAU;EAC9B,IAAI,CAAC,SAAS;GACZ,IAAI,KAAK,CAAC;GACV;EACF;EACA,IAAI,IAAI,UAAU,YAAY,QAAQ,QAAQ,EAAE;EAIhD,IAAI,UAAU,GAAG,KAAK,UAAU,QAAQ,OAAO,KAAK,EAAE;EACtD,IAAI,KAAK,MAAM,CAAC;CAClB;CACA,OAAO;AACT;;;;;AAMA,SAAS,oBAAoB,MAAyB,MAAiC;CACrF,MAAM,SAAS,KAAK,IAAI,KAAK,QAAQ,KAAK,MAAM;CAChD,KAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,KAC1B,IAAI,KAAK,OAAO,KAAK,IACnB,OAAO;CAEX,OAAO;AACT;;AAGA,SAAS,UAAU,MAAc,GAAmB;CAClD,IAAI,IAAI;CACR,KAAK,IAAI,IAAI,GAAG,IAAI,EAAE,QAAQ,KAAK;EACjC,KAAK,EAAE,WAAW,CAAC;EACnB,IAAI,KAAK,KAAK,GAAG,SAAS;CAC5B;CACA,OAAO;AACT;;;;;;;;;AAcA,SAAgB,oBACd,MACA,MACoB;CACpB,MAAM,UAAgC,CAAC;CACvC,MAAM,UAAuD,CAAC;CAE9D,IAAI,KAAK,eAAe,KAAK,YAAY;EACvC,QAAQ,KAAK,QAAQ;EACrB,QAAQ,SAAS,GAAG,KAAK,YAAY,KAAK,KAAK,YAAY,eAAe,IAAI,KAAK,UAAU,EAAE,KAAK,IAAI,KAAK,UAAU,EAAE;CAC3H;CACA,IAAI,KAAK,cAAc,KAAK,WAAW;EACrC,QAAQ,KAAK,OAAO;EACpB,QAAQ,QAAQ,GAAG,KAAK,WAAW,KAAK,KAAK,WAAW,eAAe,IAAI,KAAK,SAAS,EAAE,KAAK,IAAI,KAAK,SAAS,EAAE;CACtH;CACA,IAAI,KAAK,UAAU,KAAK,OAAO;EAC7B,QAAQ,KAAK,OAAO;EACpB,QAAQ,QAAQ,GAAG,KAAK,MAAM,KAAK,KAAK;CAC1C;CACA,IAAI,KAAK,aAAa,KAAK,UAAU;EACnC,QAAQ,KAAK,UAAU;EACvB,QAAQ,WAAW,GAAG,KAAK,SAAS,KAAK,KAAK;CAChD;CACA,IAAI,KAAK,mBAAmB,KAAK,gBAAgB;EAC/C,QAAQ,KAAK,gBAAgB;EAC7B,QAAQ,iBAAiB,GAAG,KAAK,eAAe,KAAK,KAAK;CAC5D;CACA,IAAI,KAAK,eAAe,KAAK,YAAY;EACvC,QAAQ,KAAK,YAAY;EACzB,QAAQ,aAAa,GAAG,KAAK,WAAW,KAAK,KAAK;CACpD;CACA,IAAI,KAAK,eAAe,KAAK,YAAY;EACvC,QAAQ,KAAK,YAAY;EACzB,QAAQ,aAAa,GAAG,KAAK,WAAW,KAAK,KAAK;CACpD;CAOA,MAAM,cAAc,oBAAoB,KAAK,eAAe,KAAK,aAAa;CAC9E,IAAI,eAAe,GAAG;EACpB,QAAQ,KAAK,eAAe;EAC5B,QAAQ,gBAAgB,WAAW,YAAY,OAAO,KAAK,aAAa,KAAK,KAAK,aAAa;CAEjG;CAKA,OAAO;EAAE;EAAS;EAAS,GAAI,eAAe,IAAI,EAAE,yBAAyB,YAAY,IAAI,CAAC;CAAG;AACnG;AAEA,SAAS,IAAI,GAAmB;CAC9B,OAAO,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC,SAAS,GAAG,GAAG;AAC5C;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,SAAgB,wBACd,OACA,UAAmC,CAAC,GACxB;CACZ,MAAM,MAAM,QAAQ,SAAS,SAAiB,QAAQ,MAAM,IAAI;CAIhE,MAAM,cAAc,QAAQ,iBACrB,UAAmB,IAAI,6CAA6C,OAAO,KAAK,GAAG;CAC1F,MAAM,UAAU,QAAQ,YAAY;CACpC,MAAM,sBAAsB,QAAQ,uBAAuB;CAC3D,MAAM,oBAAoB,QAAQ,qBAAqB;CAOvD,IAAI;;;;;CAKJ,IAAI,uBAAuB;CAC3B,IAAI,YAAY;CAChB,IAAI;CAEJ,SAAS,aAAa,KAAqE;EACzF,MAAM,OAAO,wBAAwB,IAAI,OAAO;EAChD,aAAa;EAEb,IAAI,SACF,IAAI,kBAAkB;GACpB,MAAM;GACN,QAAQ,IAAI;GACZ,UAAU;EACZ,CAAC,CAAC;EAKJ,UAAU;GAAE,UAAU;GAAM;GAAW,QAAQ,IAAI;EAAO;EAmB1D,IAAI,QAAQ,YAAY,GAAG;GACzB,MAAM,OAAO,oBAAoB,MAAM,IAAI;GAC3C,IAAI,KAAK,QAAQ,SAAS,GACxB,IAAI;IACF,QAAa,QAAQ,MAAM,SAAS,eAAe;KACjD,MAAM;KACN,QAAQ,IAAI;KACZ,OAAO,KAAK;KACZ,SAAS,CAAC,GAAG,KAAK,OAAO;KACzB,SAAS,EAAE,GAAG,KAAK,QAAQ;KAC3B,GAAI,KAAK,4BAA4B,KAAA,IAAY,EAAE,YAAY,KAAK,wBAAwB,IAAI,CAAC;KACjG,sBAAsB,KAAK;KAC3B,cAAc,KAAK;IACrB,CAAC,CAAC,CAAC,CAAC,MAAM,WAAW;GACvB,SACO,OAAO;IAEZ,YAAY,KAAK;GACnB;EAEJ;CACF;CAEA,eAAe,YAAY,KAA6G;EACtI,IAAI,CAAC,WAAW,QAAQ,WAAW,IAAI,QACrC;EACF,MAAM,EAAE,UAAU,MAAM,WAAW,SAAS;EAC5C,UAAU,KAAA;EAMV,IAAI,QAAQ,OAAO,KAAK,OAAO,IAAI,MAAM,cAAc,UAAU;GAC/D,MAAM,YAAY,IAAI,MAAM;GAI5B,MAAM,aAAa,oBAAoB,KAAK,wBAAwB,2BAChE,uBAAuB,oBACvB;GACJ,IAAI,YAAY,uBAAuB,YAAY,YAAY;IAC7D,MAAM,OAAO,oBAAoB,MAAM,IAAI;IAK3C,IAAI,KAAK,QAAQ,SAAS,GACxB,IAAI,gBAAgB;KAClB,MAAM;KACN,QAAQ,IAAI;KACZ;KACA,eAAe,IAAI,MAAM,iBAAiB;KAC1C;IACF,CAAC,CAAC;IAOJ,IAAI;KACF,MAAM,MAAM,SAAS,eAAe;MAClC,MAAM;MACN,QAAQ,IAAI;MACZ,OAAO,KAAK;MACZ;MACA,eAAe,IAAI,MAAM,iBAAiB;MAS1C,iBAAiB,OAAO,SAAS,mBAAmB,IAChD,KAAK,IAAI,qBAAqB,KAAK,MAAM,UAAU,CAAC,IACpD,YAAY,aACV,KAAK,MAAM,UAAU,IACrB,KAAK,MAAM,oBAAoB;MACrC,gBAAgB,KAAK,IAAI,GAAG,KAAK,MAAM,uBAAuB,SAAS,CAAC;MACxE,SAAS,CAAC,GAAG,KAAK,OAAO;MACzB,SAAS,EAAE,GAAG,KAAK,QAAQ;KAC7B,CAAC;IACH,SACO,OAAO;KACZ,YAAY,KAAK;IACnB;GACF;EACF;EAEA,wBAAwB,IAAI,MAAM,aAAa,MAAM,IAAI,MAAM,iBAAiB;EAChF,OAAO;CACT;CAKA,MAAM,mBAAmB,MAAM,KAAK,eAAe,YAAY;CAC/D,MAAM,kBAAkB,MAAM,KAAK,cAAc,WAAW;CAE5D,aAAa;EACX,iBAAiB;EACjB,gBAAgB;CAClB;AACF;AAMA,SAAS,gBAAgB,OAMd;CACT,MAAM,QAAQ,MAAM,KAAK,QAAQ,KAAK,IAAI;CAC1C,MAAM,UAAU,MAAM,KAAK,QACxB,KAAI,MAAK,KAAK,EAAE,IAAI,MAAM,KAAK,QAAQ,IAAI,CAAC,CAC5C,KAAK,IAAI;CACZ,OAAO;EACL,6BAA6B,MAAM,KAAK,UAAU,MAAM,OAAO,aAAa,MAAM,UAAU,iBAAiB,MAAM;EACnH,cAAc;EACd;CACF,CAAC,CAAC,KAAK,IAAI;AACb;AAEA,SAAS,kBAAkB,OAIhB;CACT,MAAM,IAAI,MAAM;CAChB,OAAO,uBAAuB,MAAM,KAAK,UAAU,MAAM,OAAO,UAAU,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,YAAY,WAAW,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,WAAW,UAAU,EAAE,MAAM,YAAY,EAAE,SAAS,GAAG,EAAE,iBAAiB,EAAE,aAAa,SAAS,EAAE,eAAe;AACnQ"}
|
package/dist/chat/pure.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $c as findActiveTrigger, Ad as ContextCategoryId, Dd as ContextBreakdownContributor, Ed as ContextBreakdownContributionContext, Fd as ContextMcpGroup, Gc as ActiveTrigger, Id as ContextSnapshot, Jc as CompletionProvider, Kc as CompletionContext, Ld as ContextUsageSplit, Md as ContextExtensionRow, Nd as ContextExtensionSection, Od as ContextBreakdownOptions, Pd as ContextItem, Qc as collectReferences, Rd as buildContextBreakdown, Td as ContextBreakdown, Yc as CompletionReference, Zc as applyInsert, al as CommandArgSuggestion, el as mergeReferences, jd as ContextExactCounts, kd as ContextCategory, qc as CompletionItem, rl as Command, tl as mergeSuggestions } from "../index-
|
|
2
|
-
import { $ as uniqueFilesFromReferences, A as buildUnifiedDiff, C as EditSummary, D as PreviewResult, E as InlineSegment, F as previewEditPayload, I as splitLines, J as SKILLS_TRIGGER, L as summarizeEditPayload, M as computeLineDiff, N as extractEditPayload, O as applyEditPayload, P as filetypeFromPath, Q as createFilesCompletionProvider, R as tokenize, S as EditHunkSummary, T as InlineDiff, X as uniqueSkillNamesFromReferences, Y as createSkillsCompletionProvider, Z as FILES_TRIGGER, _ as formatTaskSummary, a as MAX_TRANSCRIPT_EVENTS, at as CHATS_TRIGGER, b as DiffLine, c as finalizeStreamingMarkdown, ct as ChatReferenceScope, d as ageString, dt as uniqueChatIdsFromReferences, f as compactPath, ft as blendHsl, g as formatTaskStatus, h as formatDuration, i as turnAsText, it as createCommandsCompletionProvider, j as computeInlineDiff, k as buildContextualDiff, l as finalizeStreamingMarkdownForOwner, lt as chatReferenceTokensFromText, m as fmtTokens, n as deleteTurnSafely, o as TRANSCRIPT_TRIM_TO_EVENTS, ot as ChatReferenceData, p as fmtCost, pt as buildLinearRamp, q as summarizeOutcomes, r as truncateTurnsAt, rt as COMMANDS_TRIGGER, s as capTranscriptEvents, st as ChatReferenceEntry, t as countNeighbors, u as turnContextSize, ut as createChatsCompletionProvider, v as previewLine, w as HunkResolution, x as DiffOp, y as shortId } from "../turn-operations-
|
|
3
|
-
import { $ as selectableTurnIds, A as highlightSegments, C as SearchTurnResult, D as buildSessionSearchIndex, E as SessionSearchIndex, F as searchSessionIndex, I as searchSessionIndexAsync, J as EDIT_TOOL_NAMES, L as searchSessionTurns, M as searchSessionHistory, N as searchSessionHistoryIndex, O as buildSessionSearchIndexAsync, P as searchSessionHistoryIndexAsync, Q as isVisible, R as searchTurns, S as SearchSessionResult, T as SessionSearchExcerpt, X as isTurnHighlighted, Y as isEditErrorResult, Z as isUserBashEvent, _ as splitMarkdownCodeBlocks, a as formatToolCall, b as IndexedSearchTurn, c as splitPromptSegments, d as filterModelCatalog, f as indexOfEntry, g as normalizeMarkdownCodeFences, h as chunkMarkdownForRender, i as displayNameFor, j as searchHighlightRanges, k as filterSessionSearchCatalog, l as CatalogEntry, m as MarkdownSegment, n as ToolDisplayMeta, o as PromptSegment, p as MARKDOWN_RENDER_CHUNK_TARGET_BYTES, q as BASH_CALL_ID_PREFIX, r as ToolFormatLine, s as PromptSegmentRef, t as TOOL_DISPLAY, tt as turnSelectionOwnership, u as buildModelCatalog, v as HighlightRange, w as SessionHistoryMatch, x as SearchExcerpt, y as HighlightSegment, z as searchableTurnText } from "../tool-formatters-
|
|
1
|
+
import { $c as findActiveTrigger, Ad as ContextCategoryId, Dd as ContextBreakdownContributor, Ed as ContextBreakdownContributionContext, Fd as ContextMcpGroup, Gc as ActiveTrigger, Id as ContextSnapshot, Jc as CompletionProvider, Kc as CompletionContext, Ld as ContextUsageSplit, Md as ContextExtensionRow, Nd as ContextExtensionSection, Od as ContextBreakdownOptions, Pd as ContextItem, Qc as collectReferences, Rd as buildContextBreakdown, Td as ContextBreakdown, Yc as CompletionReference, Zc as applyInsert, al as CommandArgSuggestion, el as mergeReferences, jd as ContextExactCounts, kd as ContextCategory, qc as CompletionItem, rl as Command, tl as mergeSuggestions } from "../index-BT4Q1nLD.js";
|
|
2
|
+
import { $ as uniqueFilesFromReferences, A as buildUnifiedDiff, C as EditSummary, D as PreviewResult, E as InlineSegment, F as previewEditPayload, I as splitLines, J as SKILLS_TRIGGER, L as summarizeEditPayload, M as computeLineDiff, N as extractEditPayload, O as applyEditPayload, P as filetypeFromPath, Q as createFilesCompletionProvider, R as tokenize, S as EditHunkSummary, T as InlineDiff, X as uniqueSkillNamesFromReferences, Y as createSkillsCompletionProvider, Z as FILES_TRIGGER, _ as formatTaskSummary, a as MAX_TRANSCRIPT_EVENTS, at as CHATS_TRIGGER, b as DiffLine, c as finalizeStreamingMarkdown, ct as ChatReferenceScope, d as ageString, dt as uniqueChatIdsFromReferences, f as compactPath, ft as blendHsl, g as formatTaskStatus, h as formatDuration, i as turnAsText, it as createCommandsCompletionProvider, j as computeInlineDiff, k as buildContextualDiff, l as finalizeStreamingMarkdownForOwner, lt as chatReferenceTokensFromText, m as fmtTokens, n as deleteTurnSafely, o as TRANSCRIPT_TRIM_TO_EVENTS, ot as ChatReferenceData, p as fmtCost, pt as buildLinearRamp, q as summarizeOutcomes, r as truncateTurnsAt, rt as COMMANDS_TRIGGER, s as capTranscriptEvents, st as ChatReferenceEntry, t as countNeighbors, u as turnContextSize, ut as createChatsCompletionProvider, v as previewLine, w as HunkResolution, x as DiffOp, y as shortId } from "../turn-operations-BjkxnZL_.js";
|
|
3
|
+
import { $ as selectableTurnIds, A as highlightSegments, C as SearchTurnResult, D as buildSessionSearchIndex, E as SessionSearchIndex, F as searchSessionIndex, I as searchSessionIndexAsync, J as EDIT_TOOL_NAMES, L as searchSessionTurns, M as searchSessionHistory, N as searchSessionHistoryIndex, O as buildSessionSearchIndexAsync, P as searchSessionHistoryIndexAsync, Q as isVisible, R as searchTurns, S as SearchSessionResult, T as SessionSearchExcerpt, X as isTurnHighlighted, Y as isEditErrorResult, Z as isUserBashEvent, _ as splitMarkdownCodeBlocks, a as formatToolCall, b as IndexedSearchTurn, c as splitPromptSegments, d as filterModelCatalog, f as indexOfEntry, g as normalizeMarkdownCodeFences, h as chunkMarkdownForRender, i as displayNameFor, j as searchHighlightRanges, k as filterSessionSearchCatalog, l as CatalogEntry, m as MarkdownSegment, n as ToolDisplayMeta, o as PromptSegment, p as MARKDOWN_RENDER_CHUNK_TARGET_BYTES, q as BASH_CALL_ID_PREFIX, r as ToolFormatLine, s as PromptSegmentRef, t as TOOL_DISPLAY, tt as turnSelectionOwnership, u as buildModelCatalog, v as HighlightRange, w as SessionHistoryMatch, x as SearchExcerpt, y as HighlightSegment, z as searchableTurnText } from "../tool-formatters-CHz3OpkJ.js";
|
|
4
4
|
export { type ActiveTrigger, BASH_CALL_ID_PREFIX, CHATS_TRIGGER, COMMANDS_TRIGGER, type CatalogEntry, type ChatReferenceData, type ChatReferenceEntry, type ChatReferenceScope, type Command, type CommandArgSuggestion, type CompletionContext, type CompletionItem, type CompletionProvider, type CompletionReference, type ContextBreakdown, type ContextBreakdownContributionContext, type ContextBreakdownContributor, type ContextBreakdownOptions, type ContextCategory, type ContextCategoryId, type ContextExactCounts, type ContextExtensionRow, type ContextExtensionSection, type ContextItem, type ContextMcpGroup, type ContextSnapshot, type ContextUsageSplit, type DiffLine, type DiffOp, EDIT_TOOL_NAMES, type EditHunkSummary, type EditSummary, FILES_TRIGGER, type HighlightRange, type HighlightSegment, type HunkResolution, type IndexedSearchTurn, type InlineDiff, type InlineSegment, MARKDOWN_RENDER_CHUNK_TARGET_BYTES, MAX_TRANSCRIPT_EVENTS, type MarkdownSegment, type PreviewResult, type PromptSegment, type PromptSegmentRef, SKILLS_TRIGGER, type SearchExcerpt, type SearchSessionResult, type SearchTurnResult, type SessionHistoryMatch, type SessionSearchExcerpt, type SessionSearchIndex, TOOL_DISPLAY, TRANSCRIPT_TRIM_TO_EVENTS, type ToolDisplayMeta, type ToolFormatLine, ageString, applyEditPayload, applyInsert, blendHsl, buildContextBreakdown, buildContextualDiff, buildLinearRamp, buildModelCatalog, buildSessionSearchIndex, buildSessionSearchIndexAsync, buildUnifiedDiff, capTranscriptEvents, chatReferenceTokensFromText, chunkMarkdownForRender, collectReferences, compactPath, computeInlineDiff, computeLineDiff, countNeighbors, createChatsCompletionProvider, createCommandsCompletionProvider, createFilesCompletionProvider, createSkillsCompletionProvider, deleteTurnSafely, displayNameFor, extractEditPayload, filetypeFromPath, filterModelCatalog, filterSessionSearchCatalog, finalizeStreamingMarkdown, finalizeStreamingMarkdownForOwner, findActiveTrigger, fmtCost, fmtTokens, formatDuration, formatTaskStatus, formatTaskSummary, formatToolCall, highlightSegments, indexOfEntry, isEditErrorResult, isTurnHighlighted, isUserBashEvent, isVisible, mergeReferences, mergeSuggestions, normalizeMarkdownCodeFences, previewEditPayload, previewLine, searchHighlightRanges, searchSessionHistory, searchSessionHistoryIndex, searchSessionHistoryIndexAsync, searchSessionIndex, searchSessionIndexAsync, searchSessionTurns, searchTurns, searchableTurnText, selectableTurnIds, shortId, splitLines, splitMarkdownCodeBlocks, splitPromptSegments, summarizeEditPayload, summarizeOutcomes, tokenize, truncateTurnsAt, turnAsText, turnContextSize, turnSelectionOwnership, uniqueChatIdsFromReferences, uniqueFilesFromReferences, uniqueSkillNamesFromReferences };
|
package/dist/chat.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $c as findActiveTrigger, $i as mergeContributions, $u as detectAuth, Ac as Theme, Ad as ContextCategoryId, Al as PRESENT_PLAN_TOOL, Ao as ExtensionProviderMiddleware, Au as EditHunk, B as McpCredentialStore, Bc as patchInlineGhost, Bi as AgentHooks, Bl as QuestionRequest,
|
|
2
|
-
import { $ as KEYBINDING_KEY_COL_WIDTH, A as resolveStorageDirs, B as loadState, C as ResolvedPaths, D as StorageDirs, E as ResolveStorageDirsOptions, F as createStateStore, G as titleFromTurns, H as saveState, I as deriveSessionTitle, J as updateToolEventOutcomes, K as toolCallPreview, L as eventsFromTurns, M as StateStoreApi, N as TuiState, O as StorageMode, P as compactSummaryEvent, Q as KEYBINDING_DEF_BY_ACTION, R as lastContextSizeFromTurns, S as ResolvedConfig, T as resolveStoragePaths, U as stripSpawnTokensLine, V as marginTopFor, W as sumRunCosts, X as DEFAULT_KEYBINDINGS, Y as usageByModel, Z as KEYBINDING_DEFS, _ as discoverProjectMcps, _t as EMPTY_HINTS, a as SessionExportTarget, at as ResolvedExtensionKeybinding, b as ChatOptions, bt as hintsLength, c as writeSessionExport, ct as groupBindings, d as useEnabledToggleSet, dt as mergeKeybindings, et as KeyAction, f as DiscoveredMcp, ft as parseBindingSpec, g as defaultMcpsConfigPaths, gt as stripJsonComments, h as buildMcpServers, ht as resolveExtensionKeybindings, i as SessionExportFormat, it as ParsedBinding, j as ModelUsageSummary, k as StorageSlot, l as EnabledAllowlistKey, lt as keybindingsPath, m as DiscoveryResult, mt as readKeybindingsRaw, n as computeTurnAnchors, nt as KeyBindingSection, o as renderSession, ot as ensureKeybindingsFile, p as DiscoveryError, pt as readKeybindings, q as toolResultText, r as SessionExportAnchor, rt as KeyBindings, s as resolveSessionExportTarget, st as formatBindingForDisplay, t as TranscriptItem, tt as KeyBindingDef, u as EnabledToggleSet, ut as matchesBinding, v as parseMcpsFile, vt as Hint, w as resolveConfig, x as ProviderRegistry, xt as truncateTrailing, y as AutoUpdateConfig, yt as clipHintsToWidth, z as listSessionMeta } from "./transcript-anchors-
|
|
3
|
-
import { $ as uniqueFilesFromReferences, A as buildUnifiedDiff, B as buildEditOutcomesAnnotation, C as EditSummary, D as PreviewResult, E as InlineSegment, F as previewEditPayload, G as rewriteMultiEditHeader, H as mergeApprovalAndBodyOutcomes, I as splitLines, J as SKILLS_TRIGGER, K as stripEditOutcomesAnnotation, L as summarizeEditPayload, M as computeLineDiff, N as extractEditPayload, O as applyEditPayload, P as filetypeFromPath, Q as createFilesCompletionProvider, R as tokenize, S as EditHunkSummary, T as InlineDiff, U as parseEditOutcomesFromResult, V as maskToOutcomeKinds, W as resolveApprovalForPayload, X as uniqueSkillNamesFromReferences, Y as createSkillsCompletionProvider, Z as FILES_TRIGGER, _ as formatTaskSummary, a as MAX_TRANSCRIPT_EVENTS, at as CHATS_TRIGGER, b as DiffLine, c as finalizeStreamingMarkdown, ct as ChatReferenceScope, d as ageString, dt as uniqueChatIdsFromReferences, et as FileEntry, f as compactPath, ft as blendHsl, g as formatTaskStatus, h as formatDuration, i as turnAsText, it as createCommandsCompletionProvider, j as computeInlineDiff, k as buildContextualDiff, l as finalizeStreamingMarkdownForOwner, lt as chatReferenceTokensFromText, m as fmtTokens, n as deleteTurnSafely, nt as listProjectFiles, o as TRANSCRIPT_TRIM_TO_EVENTS, ot as ChatReferenceData, p as fmtCost, pt as buildLinearRamp, q as summarizeOutcomes, r as truncateTurnsAt, rt as COMMANDS_TRIGGER, s as capTranscriptEvents, st as ChatReferenceEntry, t as countNeighbors, tt as ListProjectFilesOptions, u as turnContextSize, ut as createChatsCompletionProvider, v as previewLine, w as HunkResolution, x as DiffOp, y as shortId, z as ResolvedApproval } from "./turn-operations-
|
|
4
|
-
import { $ as selectableTurnIds, A as highlightSegments, B as ApprovalDecision, C as SearchTurnResult, D as buildSessionSearchIndex, E as SessionSearchIndex, F as searchSessionIndex, G as useSafeModeActions, H as RequestApproval, I as searchSessionIndexAsync, K as useSafeModeQueue, L as searchSessionTurns, M as searchSessionHistory, N as searchSessionHistoryIndex, O as buildSessionSearchIndexAsync, P as searchSessionHistoryIndexAsync, Q as isVisible, R as searchTurns, S as SearchSessionResult, T as SessionSearchExcerpt, U as SafeModeActions, V as ApprovalRequest, W as SafeModeProvider, X as isTurnHighlighted, Y as isEditErrorResult, _ as splitMarkdownCodeBlocks, a as formatToolCall, b as IndexedSearchTurn, c as splitPromptSegments, d as filterModelCatalog, et as selectionAfterTurnRemoval, f as indexOfEntry, g as normalizeMarkdownCodeFences, h as chunkMarkdownForRender, i as displayNameFor, j as searchHighlightRanges, k as filterSessionSearchCatalog, l as CatalogEntry, m as MarkdownSegment, n as ToolDisplayMeta, o as PromptSegment, p as MARKDOWN_RENDER_CHUNK_TARGET_BYTES, r as ToolFormatLine, s as PromptSegmentRef, t as TOOL_DISPLAY, tt as turnSelectionOwnership, u as buildModelCatalog, v as HighlightRange, w as SessionHistoryMatch, x as SearchExcerpt, y as HighlightSegment, z as searchableTurnText } from "./tool-formatters-
|
|
1
|
+
import { $c as findActiveTrigger, $i as mergeContributions, $u as detectAuth, Ac as Theme, Ad as ContextCategoryId, Al as PRESENT_PLAN_TOOL, Ao as ExtensionProviderMiddleware, Au as EditHunk, B as McpCredentialStore, Bc as patchInlineGhost, Bi as AgentHooks, Bl as QuestionRequest, Bu as ToolCallDisplay, Ca as discoverExtensions, Cd as effectiveContextWindow, Cl as AnswerValue, Co as ExtensionMcpConfigTransform, Cu as DEFAULT_BUDGET_EXCLUDE_TOOLS, Da as scanExtensionDirectories, Dc as DEFAULT_THEME, Dd as ContextBreakdownContributor, Dl as InteractionResponse, Do as ExtensionPaths, Du as resolveAgentId, Ec as ChipColorMap, Ed as ContextBreakdownContributionContext, El as InteractionRequest, Eo as ExtensionOrderedContribution, Eu as accentColor, Fc as resolveTheme, Fd as ContextMcpGroup, Fl as PlanResponse, Fo as ExtensionSkillPolicy, Fu as Picked, Gc as ActiveTrigger, Gl as buildResumedToolResultsTurn, Go as ExtensionToolResultMetadataRegistration, Gu as filterChainFallbacks, Hc as tokenEndingAtCursor, Hl as QuestionType, Hu as buildRunModel, Ic as InlineAutocompleteContext, Id as ContextSnapshot, Il as PlanStep, Im as ToolDef, Io as ExtensionSource, Iu as Screen, Jc as CompletionProvider, Ji as buildExtensionPreset, Jl as makeRequestInteraction, Jm as SkillConfig, Ju as sanitizeModelChain, Kc as CompletionContext, Ki as BuildExtensionRegistryOptions, Kl as createInteractionTools, Ku as providerKeySetChanged, Lc as InlineAutocompleteProvider, Ld as ContextUsageSplit, Ll as Question, Lo as ExtensionStorageScope, Lu as SessionMeta, Mc as ThemeSelect, Md as ContextExtensionRow, Mi as generateStructuredData, Ml as PlanDecision, Mo as ExtensionRunTransform, Mu as EditOutcomeKind, Na as defineExtension, Nc as ThemeSurfaces, Nd as ContextExtensionSection, Nl as PlanPayload, No as ExtensionRuntimeEnv, Nu as EditPayload, Oc as SyntaxStyles, Od as ContextBreakdownOptions, Ol as InteractionsActions, Oo as ExtensionPermission, Op as AutoCompact, Ou as singleAgentRegistry, Pc as resolveChipColor, Pd as ContextItem, Pl as PlanRequest, Po as ExtensionSessionStateSurface, Pu as Owner, Qc as collectReferences, Qi as filterExtensionRegistry, Ql as useInteractionsQueue, Qm as SkillsConfig, Qo as TuiContributions, Qu as ProviderKey, Rc as InlineGhost, Rd as buildContextBreakdown, Rl as QuestionChoice, Ro as ExtensionStorageSurface, Ru as Settings, Sa as defaultExtensionScanPaths, Sd as OUTPUT_RESERVE_TOKENS, Sl as ASK_USER_TOOL, So as ExtensionManifest, Su as DEFAULT_AGENT_ID, Tc as ChipColor, Td as ContextBreakdown, Tl as CreateInteractionToolsOptions, Tu as PLAN_AGENT, Uc as CompletionState, Ul as SelectQuestion, Up as McpToolSchema, Uu as chainPositionOf, Vc as resolveInlineSuggestion, Vl as QuestionResponse, Vp as McpServerConfig, Vu as ModelChainEntry, Wc as useCompletion, Wl as TextQuestion, Wu as chainsEqual, Xi as composeExtensionPreset, Xl as serializeInteractionResponse, Xo as GuiContributions, Xu as AuthMethod, Yc as CompletionReference, Yi as buildExtensionRegistry, Yl as pendingInteractionsFromTurns, Yu as toggleChainEntry, Zc as applyInsert, Zd as Provider, Zi as disposeExtensionRegistry, Zl as useInteractionsActions, Zo as LoadedExtension, Zu as ProviderAuth, _d as piIdOf, _o as ExtensionFooterHint, _u as AgentAccent, ad as anthropicDescriptor, ah as SessionStore, bd as AutoCompactDecision, bl as executeCommand, bo as ExtensionKeybinding, bu as BUILD_AGENT, cd as enabledModelOptions, co as ExtensionApiVersion, dd as localDescriptor, dl as CommandOutputBlock, dm as SessionTurn, do as ExtensionContext, ea as partitionExtensionCatalog, ed as BUILTIN_PROVIDERS, el as mergeReferences, fd as modelOptionsFor, gd as openrouterDescriptor, gl as CommandStepFn, go as ExtensionDefinition, hd as openaiDescriptor, hl as CommandStepContext, id as ProviderDescriptor, il as CommandAgentResult, jc as ThemeColors, jd as ContextExactCounts, ji as GenerateStructuredDataOptions, jl as PendingInteractionEntry, jo as ExtensionRegistry, ju as EditOutcome, kc as SyntaxTokenStyle, kd as ContextCategory, kl as InteractionsProvider, ku as EditDiffDisplay, lc as SourcedScanPath, ld as getContextWindow, lo as ExtensionBehaviorTransform, md as modelsForDescriptor, ml as CommandStep, nd as ModelInfo, od as cerebrasDescriptor, pd as modelSupportsReasoning, po as ExtensionContributions, qc as CompletionItem, ql as isInteractionTool, qu as restoreChainFallbacks, rd as ModelOption, rl as Command, sd as credKeyOf, sl as CommandExecution, so as EMPTY_EXTENSION_REGISTRY, t as Preset, td as CustomField, th as Session, tl as mergeSuggestions, ud as getModelInfo, ul as CommandInvocation, uo as ExtensionCapability, vd as restoreModelOptions, vo as ExtensionGuiPanel, vu as AgentProfile, wa as inlineLoadedExtension, wc as BUILTIN_THEMES, wd as shouldAutoCompact, wl as ConfirmQuestion, wo as ExtensionModal, wu as DEFAULT_PERSIST_EXCLUDE_TOOLS, xd as AutoCompactInput, xl as parseCommandInvocation, xo as ExtensionKeybindingDispatchContext, xu as BUILTIN_AGENTS, yd as AUTO_COMPACT_MIN_GROWTH_FRACTION, yl as commandSteps, yu as AgentRegistry, z as McpCredentialEntry, zc as createPathAutocompleteProvider, zi as AgentHookMap, zl as QuestionPayload, zo as ExtensionToolCatalogTransform, zu as StreamEvent } from "./index-BT4Q1nLD.js";
|
|
2
|
+
import { $ as KEYBINDING_KEY_COL_WIDTH, A as resolveStorageDirs, B as loadState, C as ResolvedPaths, D as StorageDirs, E as ResolveStorageDirsOptions, F as createStateStore, G as titleFromTurns, H as saveState, I as deriveSessionTitle, J as updateToolEventOutcomes, K as toolCallPreview, L as eventsFromTurns, M as StateStoreApi, N as TuiState, O as StorageMode, P as compactSummaryEvent, Q as KEYBINDING_DEF_BY_ACTION, R as lastContextSizeFromTurns, S as ResolvedConfig, T as resolveStoragePaths, U as stripSpawnTokensLine, V as marginTopFor, W as sumRunCosts, X as DEFAULT_KEYBINDINGS, Y as usageByModel, Z as KEYBINDING_DEFS, _ as discoverProjectMcps, _t as EMPTY_HINTS, a as SessionExportTarget, at as ResolvedExtensionKeybinding, b as ChatOptions, bt as hintsLength, c as writeSessionExport, ct as groupBindings, d as useEnabledToggleSet, dt as mergeKeybindings, et as KeyAction, f as DiscoveredMcp, ft as parseBindingSpec, g as defaultMcpsConfigPaths, gt as stripJsonComments, h as buildMcpServers, ht as resolveExtensionKeybindings, i as SessionExportFormat, it as ParsedBinding, j as ModelUsageSummary, k as StorageSlot, l as EnabledAllowlistKey, lt as keybindingsPath, m as DiscoveryResult, mt as readKeybindingsRaw, n as computeTurnAnchors, nt as KeyBindingSection, o as renderSession, ot as ensureKeybindingsFile, p as DiscoveryError, pt as readKeybindings, q as toolResultText, r as SessionExportAnchor, rt as KeyBindings, s as resolveSessionExportTarget, st as formatBindingForDisplay, t as TranscriptItem, tt as KeyBindingDef, u as EnabledToggleSet, ut as matchesBinding, v as parseMcpsFile, vt as Hint, w as resolveConfig, x as ProviderRegistry, xt as truncateTrailing, y as AutoUpdateConfig, yt as clipHintsToWidth, z as listSessionMeta } from "./transcript-anchors-BnG23uzH.js";
|
|
3
|
+
import { $ as uniqueFilesFromReferences, A as buildUnifiedDiff, B as buildEditOutcomesAnnotation, C as EditSummary, D as PreviewResult, E as InlineSegment, F as previewEditPayload, G as rewriteMultiEditHeader, H as mergeApprovalAndBodyOutcomes, I as splitLines, J as SKILLS_TRIGGER, K as stripEditOutcomesAnnotation, L as summarizeEditPayload, M as computeLineDiff, N as extractEditPayload, O as applyEditPayload, P as filetypeFromPath, Q as createFilesCompletionProvider, R as tokenize, S as EditHunkSummary, T as InlineDiff, U as parseEditOutcomesFromResult, V as maskToOutcomeKinds, W as resolveApprovalForPayload, X as uniqueSkillNamesFromReferences, Y as createSkillsCompletionProvider, Z as FILES_TRIGGER, _ as formatTaskSummary, a as MAX_TRANSCRIPT_EVENTS, at as CHATS_TRIGGER, b as DiffLine, c as finalizeStreamingMarkdown, ct as ChatReferenceScope, d as ageString, dt as uniqueChatIdsFromReferences, et as FileEntry, f as compactPath, ft as blendHsl, g as formatTaskStatus, h as formatDuration, i as turnAsText, it as createCommandsCompletionProvider, j as computeInlineDiff, k as buildContextualDiff, l as finalizeStreamingMarkdownForOwner, lt as chatReferenceTokensFromText, m as fmtTokens, n as deleteTurnSafely, nt as listProjectFiles, o as TRANSCRIPT_TRIM_TO_EVENTS, ot as ChatReferenceData, p as fmtCost, pt as buildLinearRamp, q as summarizeOutcomes, r as truncateTurnsAt, rt as COMMANDS_TRIGGER, s as capTranscriptEvents, st as ChatReferenceEntry, t as countNeighbors, tt as ListProjectFilesOptions, u as turnContextSize, ut as createChatsCompletionProvider, v as previewLine, w as HunkResolution, x as DiffOp, y as shortId, z as ResolvedApproval } from "./turn-operations-BjkxnZL_.js";
|
|
4
|
+
import { $ as selectableTurnIds, A as highlightSegments, B as ApprovalDecision, C as SearchTurnResult, D as buildSessionSearchIndex, E as SessionSearchIndex, F as searchSessionIndex, G as useSafeModeActions, H as RequestApproval, I as searchSessionIndexAsync, K as useSafeModeQueue, L as searchSessionTurns, M as searchSessionHistory, N as searchSessionHistoryIndex, O as buildSessionSearchIndexAsync, P as searchSessionHistoryIndexAsync, Q as isVisible, R as searchTurns, S as SearchSessionResult, T as SessionSearchExcerpt, U as SafeModeActions, V as ApprovalRequest, W as SafeModeProvider, X as isTurnHighlighted, Y as isEditErrorResult, _ as splitMarkdownCodeBlocks, a as formatToolCall, b as IndexedSearchTurn, c as splitPromptSegments, d as filterModelCatalog, et as selectionAfterTurnRemoval, f as indexOfEntry, g as normalizeMarkdownCodeFences, h as chunkMarkdownForRender, i as displayNameFor, j as searchHighlightRanges, k as filterSessionSearchCatalog, l as CatalogEntry, m as MarkdownSegment, n as ToolDisplayMeta, o as PromptSegment, p as MARKDOWN_RENDER_CHUNK_TARGET_BYTES, r as ToolFormatLine, s as PromptSegmentRef, t as TOOL_DISPLAY, tt as turnSelectionOwnership, u as buildModelCatalog, v as HighlightRange, w as SessionHistoryMatch, x as SearchExcerpt, y as HighlightSegment, z as searchableTurnText } from "./tool-formatters-CHz3OpkJ.js";
|
|
5
5
|
import { Hookable } from "hookable";
|
|
6
6
|
import { spawn } from "node:child_process";
|
|
7
7
|
import { Dispatch, ReactNode, SetStateAction } from "react";
|
package/dist/chat.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { $ as InteractionsProvider, $n as INTERACTION_GUIDANCE_NO_PROMPTS, $t as countClaudeSessionFiles, A as runOAuthLogin, An as PLAN_AGENT, At as GRUVBOX_DARK, B as useMcpToolToggleSet, Bn as getArchivedTodosForRun, Bt as ConfigProvider, C as projectsFilePath, Cn as discoverAgentsMd, Cr as toolCallPreview, D as formatPathForCwd, Dn as DEFAULT_AGENT_ID, Dt as resolveChipColor, E as writeProjects, En as BUILTIN_AGENTS, Er as usageByModel, Et as DEFAULT_THEME, F as refreshMcpToolsCatalog, Fn as TODOS_METADATA_KEY, Ft as CATPPUCCIN_MOCHA, G as mcpCredentialsPath, Gn as selectActiveTodos, Gt as chainPositionOf, H as indexOfServerRow, Hn as isTodoTool, Ht as resolveConfig, I as saveMcpToolsCache, In as TODOWRITE_TOOL, It as createDiscoverySlot, J as useMcpAuthDispatch, Jn as ACTIONS_WITH_CARE_DOCTRINE, Jt as providerKeySetChanged, K as patchMcpCredential, Kn as setTodosForRun, Kt as chainsEqual, L as subscribeMcpToolsCache, Ln as TODO_STATUS_GLYPHS, Lt as DiscoveryProvider, M as clearMcpToolsCache, Mn as resolveAgentId, Mt as CATPPUCCIN_FRAPPE, N as loadMcpToolsCache, Nn as singleAgentRegistry, Nt as CATPPUCCIN_LATTE, O as fetchOAuthRedirect, On as DEFAULT_BUDGET_EXCLUDE_TOOLS, Ot as resolveTheme, P as mcpToolsCachePath, Pn as TODOREAD_TOOL, Pt as CATPPUCCIN_MACCHIATO, Q as ASK_USER_TOOL, Qn as INTERACTION_GUIDANCE, Qt as useCompletion, R as buildToolToggle, Rn as TODO_WRITE_COUNTS_METADATA_KEY, Rt as useDiscovery, S as matchesSafelistEntry, Sn as chatAutoCompactBehavior, Sr as titleFromTurns, St as SettingsProvider, T as suggestSafelistEntries, Tn as BUILD_AGENT, Tr as updateToolEventOutcomes, Tt as BUILTIN_THEMES, U as parentServerName, Un as pickActiveRunId, Ut as resolveStoragePaths, V as buildVisibleMcpRows, Vn as getTodosForRun, Vt as useConfig, W as createFileMcpCredentialStore, Wn as pruneTodosByRun, Wt as buildRunModel, X as getMcpAuthStatus, Xn as DOING_TASKS_DOCTRINE, Xt as sanitizeModelChain, Y as useMcpAuthState, Yn as COMMUNICATION_DOCTRINE, Yt as restoreChainFallbacks, Z as reduceMcpAuth, Zn as IDENTITY_PREFIX, Zt as toggleChainEntry, _ as useSafeModeQueue, _n as detectPackageManager, _r as marginTopFor, _t as DEFAULT_SETTINGS, a as useSurfaces, an as buildMcpServers, ar as buildPlanSystem, at as pendingInteractionsFromTurns, b as getSafelist, bn as performSelfUpdate, br as stripSpawnTokensLine, bt as SETTINGS_INPUTS, c as useStreamBuffer, cn as parseMcpsFile, cr as createChatTurnsReadTool, ct as useInteractionsQueue, d as discoverProjectSkills, dn as bootTick, dr as createStateStore, dt as hintsLength, en as hasClaudeCodeSetup, er as PLAN_MODE_DOCTRINE, et as PRESENT_PLAN_TOOL, f as renderSession, fn as buildUpdateHint, fr as deriveSessionTitle, ft as truncateTrailing, g as useSafeModeActions, gn as detectLibc, gr as loadState, gt as useEnabledToggleSet, h as SafeModeProvider, hn as compareSemver, hr as listSessionMeta, ht as listProjectFiles, i as useSelectStyle, in as upsertMcpServer, ir as buildBuildSystem, it as makeRequestInteraction, j as supportsOAuth, jn as accentColor, jt as GRUVBOX_LIGHT, k as oauthUsesManualCodePaste, kn as DEFAULT_PERSIST_EXCLUDE_TOOLS, kt as VAPORWAVE_THEME, l as buildSkillsConfig, ln as tryOpenBrowser, lt as EMPTY_HINTS, m as writeSessionExport, mn as checkForUpdate, mr as lastContextSizeFromTurns, mt as shortChord, n as ThemeProvider, nn as mcpsWritePath, nr as SUBAGENT_GUIDANCE, nt as createInteractionTools, o as useSyntaxStyles, on as defaultMcpsConfigPaths, or as envSection, ot as serializeInteractionResponse, p as resolveSessionExportTarget, pn as useUpdateCheck, pr as eventsFromTurns, pt as buildHints, q as McpAuthProvider, qn as useActiveTodos, qt as filterChainFallbacks, r as useColors, rn as removeMcpServer, rr as TOKEN_DISCIPLINE_DOCTRINE, rt as isInteractionTool, s as useTheme, sn as discoverProjectMcps, sr as chatReferenceTokensForPrompt, st as useInteractionsActions, t as computeTurnAnchors, tn as importFromClaudeCode, tr as PLAN_MODE_DOCTRINE_NO_PROMPTS, tt as buildResumedToolResultsTurn, u as defaultSkillScanPaths, un as bootProfileEnabled, ur as compactSummaryEvent, ut as clipHintsToWidth, v as IMPLICITLY_SAFE_TOOLS, vn as parseSemver, vr as saveState, vt as SETTINGS_CATEGORIES, w as readProjects, wn as renderAgentsMdBlock, wr as toolResultText, wt as useSettings, x as isOnSafelist, xn as resolvePlatformPackage, xr as sumRunCosts, xt as SETTINGS_TOGGLES, y as addToSafelist, yn as performInPlaceSelfUpdate, yt as SETTINGS_CHOICES, z as useMcpToolToggleMap, zn as createTodoTools, zt as useDiscoveryOptional } from "./transcript-anchors-
|
|
2
|
-
import { $ as buildExtensionPreset, Bt as KEYBINDING_DEF_BY_ACTION, Gt as keybindingsPath, Ht as ensureKeybindingsFile, Jt as parseBindingSpec, Kt as matchesBinding, Lt as resolveStorageDirs, Qt as stripJsonComments, Rt as DEFAULT_KEYBINDINGS, Ut as formatBindingForDisplay, V as EMPTY_EXTENSION_REGISTRY, Vt as KEYBINDING_KEY_COL_WIDTH, Wt as groupBindings, Xt as readKeybindingsRaw, Yt as readKeybindings, Zt as resolveExtensionKeybindings, _n as OUTPUT_RESERVE_TOKENS, at as partitionExtensionCatalog, et as buildExtensionRegistry, gn as AUTO_COMPACT_MIN_GROWTH_FRACTION, it as mergeContributions, nn as discoverExtensions, nt as disposeExtensionRegistry, on as scanExtensionDirectories, qt as mergeKeybindings, rn as inlineLoadedExtension, rt as filterExtensionRegistry, sn as defineExtension, tn as defaultExtensionScanPaths, tt as composeExtensionPreset, vn as effectiveContextWindow, yn as shouldAutoCompact, zt as KEYBINDING_DEFS } from "./agent-
|
|
1
|
+
import { $ as InteractionsProvider, $n as INTERACTION_GUIDANCE_NO_PROMPTS, $t as countClaudeSessionFiles, A as runOAuthLogin, An as PLAN_AGENT, At as GRUVBOX_DARK, B as useMcpToolToggleSet, Bn as getArchivedTodosForRun, Bt as ConfigProvider, C as projectsFilePath, Cn as discoverAgentsMd, Cr as toolCallPreview, D as formatPathForCwd, Dn as DEFAULT_AGENT_ID, Dt as resolveChipColor, E as writeProjects, En as BUILTIN_AGENTS, Er as usageByModel, Et as DEFAULT_THEME, F as refreshMcpToolsCatalog, Fn as TODOS_METADATA_KEY, Ft as CATPPUCCIN_MOCHA, G as mcpCredentialsPath, Gn as selectActiveTodos, Gt as chainPositionOf, H as indexOfServerRow, Hn as isTodoTool, Ht as resolveConfig, I as saveMcpToolsCache, In as TODOWRITE_TOOL, It as createDiscoverySlot, J as useMcpAuthDispatch, Jn as ACTIONS_WITH_CARE_DOCTRINE, Jt as providerKeySetChanged, K as patchMcpCredential, Kn as setTodosForRun, Kt as chainsEqual, L as subscribeMcpToolsCache, Ln as TODO_STATUS_GLYPHS, Lt as DiscoveryProvider, M as clearMcpToolsCache, Mn as resolveAgentId, Mt as CATPPUCCIN_FRAPPE, N as loadMcpToolsCache, Nn as singleAgentRegistry, Nt as CATPPUCCIN_LATTE, O as fetchOAuthRedirect, On as DEFAULT_BUDGET_EXCLUDE_TOOLS, Ot as resolveTheme, P as mcpToolsCachePath, Pn as TODOREAD_TOOL, Pt as CATPPUCCIN_MACCHIATO, Q as ASK_USER_TOOL, Qn as INTERACTION_GUIDANCE, Qt as useCompletion, R as buildToolToggle, Rn as TODO_WRITE_COUNTS_METADATA_KEY, Rt as useDiscovery, S as matchesSafelistEntry, Sn as chatAutoCompactBehavior, Sr as titleFromTurns, St as SettingsProvider, T as suggestSafelistEntries, Tn as BUILD_AGENT, Tr as updateToolEventOutcomes, Tt as BUILTIN_THEMES, U as parentServerName, Un as pickActiveRunId, Ut as resolveStoragePaths, V as buildVisibleMcpRows, Vn as getTodosForRun, Vt as useConfig, W as createFileMcpCredentialStore, Wn as pruneTodosByRun, Wt as buildRunModel, X as getMcpAuthStatus, Xn as DOING_TASKS_DOCTRINE, Xt as sanitizeModelChain, Y as useMcpAuthState, Yn as COMMUNICATION_DOCTRINE, Yt as restoreChainFallbacks, Z as reduceMcpAuth, Zn as IDENTITY_PREFIX, Zt as toggleChainEntry, _ as useSafeModeQueue, _n as detectPackageManager, _r as marginTopFor, _t as DEFAULT_SETTINGS, a as useSurfaces, an as buildMcpServers, ar as buildPlanSystem, at as pendingInteractionsFromTurns, b as getSafelist, bn as performSelfUpdate, br as stripSpawnTokensLine, bt as SETTINGS_INPUTS, c as useStreamBuffer, cn as parseMcpsFile, cr as createChatTurnsReadTool, ct as useInteractionsQueue, d as discoverProjectSkills, dn as bootTick, dr as createStateStore, dt as hintsLength, en as hasClaudeCodeSetup, er as PLAN_MODE_DOCTRINE, et as PRESENT_PLAN_TOOL, f as renderSession, fn as buildUpdateHint, fr as deriveSessionTitle, ft as truncateTrailing, g as useSafeModeActions, gn as detectLibc, gr as loadState, gt as useEnabledToggleSet, h as SafeModeProvider, hn as compareSemver, hr as listSessionMeta, ht as listProjectFiles, i as useSelectStyle, in as upsertMcpServer, ir as buildBuildSystem, it as makeRequestInteraction, j as supportsOAuth, jn as accentColor, jt as GRUVBOX_LIGHT, k as oauthUsesManualCodePaste, kn as DEFAULT_PERSIST_EXCLUDE_TOOLS, kt as VAPORWAVE_THEME, l as buildSkillsConfig, ln as tryOpenBrowser, lt as EMPTY_HINTS, m as writeSessionExport, mn as checkForUpdate, mr as lastContextSizeFromTurns, mt as shortChord, n as ThemeProvider, nn as mcpsWritePath, nr as SUBAGENT_GUIDANCE, nt as createInteractionTools, o as useSyntaxStyles, on as defaultMcpsConfigPaths, or as envSection, ot as serializeInteractionResponse, p as resolveSessionExportTarget, pn as useUpdateCheck, pr as eventsFromTurns, pt as buildHints, q as McpAuthProvider, qn as useActiveTodos, qt as filterChainFallbacks, r as useColors, rn as removeMcpServer, rr as TOKEN_DISCIPLINE_DOCTRINE, rt as isInteractionTool, s as useTheme, sn as discoverProjectMcps, sr as chatReferenceTokensForPrompt, st as useInteractionsActions, t as computeTurnAnchors, tn as importFromClaudeCode, tr as PLAN_MODE_DOCTRINE_NO_PROMPTS, tt as buildResumedToolResultsTurn, u as defaultSkillScanPaths, un as bootProfileEnabled, ur as compactSummaryEvent, ut as clipHintsToWidth, v as IMPLICITLY_SAFE_TOOLS, vn as parseSemver, vr as saveState, vt as SETTINGS_CATEGORIES, w as readProjects, wn as renderAgentsMdBlock, wr as toolResultText, wt as useSettings, x as isOnSafelist, xn as resolvePlatformPackage, xr as sumRunCosts, xt as SETTINGS_TOGGLES, y as addToSafelist, yn as performInPlaceSelfUpdate, yt as SETTINGS_CHOICES, z as useMcpToolToggleMap, zn as createTodoTools, zt as useDiscoveryOptional } from "./transcript-anchors-D2RZPaGf.js";
|
|
2
|
+
import { $ as buildExtensionPreset, Bt as KEYBINDING_DEF_BY_ACTION, Gt as keybindingsPath, Ht as ensureKeybindingsFile, Jt as parseBindingSpec, Kt as matchesBinding, Lt as resolveStorageDirs, Qt as stripJsonComments, Rt as DEFAULT_KEYBINDINGS, Ut as formatBindingForDisplay, V as EMPTY_EXTENSION_REGISTRY, Vt as KEYBINDING_KEY_COL_WIDTH, Wt as groupBindings, Xt as readKeybindingsRaw, Yt as readKeybindings, Zt as resolveExtensionKeybindings, _n as OUTPUT_RESERVE_TOKENS, at as partitionExtensionCatalog, et as buildExtensionRegistry, gn as AUTO_COMPACT_MIN_GROWTH_FRACTION, it as mergeContributions, nn as discoverExtensions, nt as disposeExtensionRegistry, on as scanExtensionDirectories, qt as mergeKeybindings, rn as inlineLoadedExtension, rt as filterExtensionRegistry, sn as defineExtension, tn as defaultExtensionScanPaths, tt as composeExtensionPreset, vn as effectiveContextWindow, yn as shouldAutoCompact, zt as KEYBINDING_DEFS } from "./agent-C5cHuI0r.js";
|
|
3
3
|
import { t as buildContextBreakdown } from "./context-breakdown-Dzo25N45.js";
|
|
4
4
|
import { a as formatDuration, c as previewLine, i as fmtTokens, l as shortId, n as compactPath, o as formatTaskStatus, r as fmtCost, s as formatTaskSummary, t as ageString } from "./format-BF745pLL.js";
|
|
5
5
|
import { M as findGitRoot, j as projectUserPaths } from "./resolve-BPTA1RpX.js";
|
|
6
6
|
import { appendDynamicSection } from "./prompt.js";
|
|
7
7
|
import { a as generateStructuredData, c as shouldAutoGenerateTitle, g as parseCommandInvocation, h as executeCommand, i as tokenEndingAtCursor, m as commandSteps, n as patchInlineGhost, o as cleanTitle, r as resolveInlineSuggestion, s as generateSessionTitle, t as createPathAutocompleteProvider } from "./inline-autocomplete-CbcdZpfC.js";
|
|
8
8
|
import { a as mergeReferences, n as collectReferences, o as mergeSuggestions, r as findActiveTrigger, t as applyInsert } from "./completion-core-BRo86R_L.js";
|
|
9
|
-
import { C as restoreModelOptions, S as piIdOf, _ as modelOptionsFor, a as readProviderCredential, b as openaiDescriptor, c as writeCredentials, d as cerebrasDescriptor, f as credKeyOf, g as localDescriptor, h as getModelInfo, i as readCredentials, l as BUILTIN_PROVIDERS, m as getContextWindow, n as applyApiKeyEnv, o as removeProviderCredential, p as enabledModelOptions, r as credentialsPath, s as setProviderCredential, t as detectAuth, u as anthropicDescriptor, v as modelSupportsReasoning, x as openrouterDescriptor, y as modelsForDescriptor } from "./auth-
|
|
9
|
+
import { C as restoreModelOptions, S as piIdOf, _ as modelOptionsFor, a as readProviderCredential, b as openaiDescriptor, c as writeCredentials, d as cerebrasDescriptor, f as credKeyOf, g as localDescriptor, h as getModelInfo, i as readCredentials, l as BUILTIN_PROVIDERS, m as getContextWindow, n as applyApiKeyEnv, o as removeProviderCredential, p as enabledModelOptions, r as credentialsPath, s as setProviderCredential, t as detectAuth, u as anthropicDescriptor, v as modelSupportsReasoning, x as openrouterDescriptor, y as modelsForDescriptor } from "./auth-C2vaeVqG.js";
|
|
10
10
|
import { $ as computeInlineDiff, A as FILES_TRIGGER, B as isTurnHighlighted, C as chunkMarkdownForRender, D as SKILLS_TRIGGER, F as blendHsl, G as selectableTurnIds, H as isVisible, I as buildLinearRamp, J as turnSelectionOwnership, K as selectionAfterTurnRemoval, M as uniqueFilesFromReferences, N as COMMANDS_TRIGGER, O as createSkillsCompletionProvider, P as createCommandsCompletionProvider, S as MARKDOWN_RENDER_CHUNK_TARGET_BYTES, T as splitMarkdownCodeBlocks, X as buildContextualDiff, Y as applyEditPayload, Z as buildUnifiedDiff, _ as turnContextSize, _t as createChatsCompletionProvider, a as TOOL_DISPLAY, at as summarizeEditPayload, b as filterModelCatalog, c as MAX_TRANSCRIPT_EVENTS, ct as maskToOutcomeKinds, d as finalizeStreamingMarkdown, dt as resolveApprovalForPayload, et as computeLineDiff, f as finalizeStreamingMarkdownForOwner, ft as rewriteMultiEditHeader, gt as chatReferenceTokensFromText, ht as CHATS_TRIGGER, i as turnAsText, it as splitLines, j as createFilesCompletionProvider, k as uniqueSkillNamesFromReferences, l as TRANSCRIPT_TRIM_TO_EVENTS, lt as mergeApprovalAndBodyOutcomes, mt as summarizeOutcomes, n as deleteTurnSafely, nt as filetypeFromPath, o as displayNameFor, ot as tokenize, pt as stripEditOutcomesAnnotation, r as truncateTurnsAt, rt as previewEditPayload, s as formatToolCall, st as buildEditOutcomesAnnotation, t as countNeighbors, tt as extractEditPayload, u as capTranscriptEvents, ut as parseEditOutcomesFromResult, v as splitPromptSegments, vt as uniqueChatIdsFromReferences, w as normalizeMarkdownCodeFences, x as indexOfEntry, y as buildModelCatalog, z as isEditErrorResult } from "./turn-operations-CtEpeB_s.js";
|
|
11
11
|
import { a as searchHighlightRanges, c as searchSessionHistoryIndexAsync, d as searchSessionTurns, f as searchTurns, i as highlightSegments, l as searchSessionIndex, n as buildSessionSearchIndexAsync, o as searchSessionHistory, p as searchableTurnText, r as filterSessionSearchCatalog, s as searchSessionHistoryIndex, t as buildSessionSearchIndex, u as searchSessionIndexAsync } from "./history-search-C4bk1Wz_.js";
|
|
12
12
|
//#region src/chat/auto-update-cli.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as createStderrLineEmitter } from "./mcp-
|
|
1
|
+
import { r as createStderrLineEmitter } from "./mcp-DvvV6xub.js";
|
|
2
2
|
import { Buffer } from "node:buffer";
|
|
3
3
|
//#region src/mcp/context-transport.ts
|
|
4
4
|
/**
|
|
@@ -10,7 +10,7 @@ import { Buffer } from "node:buffer";
|
|
|
10
10
|
async function createContextStdioTransport(options) {
|
|
11
11
|
const { name, context, handle, command, cwd, env, hooks } = options;
|
|
12
12
|
if (!context.execStream) throw new Error(`MCP server "${name}" is configured with \`scope: 'context'\`, but the '${context.type}' execution context does not support live streams (\`execStream\`). Use \`scope: 'host'\` for this server, or switch to a context that advertises \`capabilities.stream\`.`);
|
|
13
|
-
const { ReadBuffer, serializeMessage } = await import("./stdio-
|
|
13
|
+
const { ReadBuffer, serializeMessage } = await import("./stdio-DUu_loK-.js").then((n) => n.r);
|
|
14
14
|
const readBuffer = new ReadBuffer();
|
|
15
15
|
let stream = null;
|
|
16
16
|
let closed = false;
|
|
@@ -81,4 +81,4 @@ async function createContextStdioTransport(options) {
|
|
|
81
81
|
//#endregion
|
|
82
82
|
export { createContextStdioTransport };
|
|
83
83
|
|
|
84
|
-
//# sourceMappingURL=context-transport-
|
|
84
|
+
//# sourceMappingURL=context-transport-CkiORGgx.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-transport-64EeXTAQ.js","names":[],"sources":["../src/mcp/context-transport.ts"],"sourcesContent":["/**\n * An MCP `Transport` that speaks stdio JSON-RPC to a server running INSIDE\n * an `ExecutionContext`, rather than as a child of the host process.\n *\n * Why this exists\n * ---------------\n * An MCP server is an ordinary program. When it calls `fs.readFileSync` or\n * `fs.writeFile`, those hit whatever filesystem it was spawned on. The\n * default `StdioClientTransport` spawns on the HOST, so with a sandboxed\n * execution context (Daytona / E2B / Docker) the agent's own tools and its\n * MCP servers end up looking at two different filesystems: a path the model\n * discovered via `list_files` does not exist for the MCP server, and an MCP\n * write lands somewhere `read_file` cannot see.\n *\n * Routing the server through `ExecutionContext.execStream` puts both on the\n * same filesystem. Note what this does NOT buy: isolation. Remote-transport\n * MCP servers are unreachable by this mechanism by construction, so\n * \"everything the agent touches runs in the execution context\" can never be\n * a true invariant. This is about coherence, not containment.\n *\n * Framing\n * -------\n * Delegated to the SDK's own `ReadBuffer` / `serializeMessage`, the exact\n * pair `StdioClientTransport` uses. That matters beyond code reuse:\n * `ReadBuffer` concatenates raw bytes and only decodes at newline\n * boundaries, so a multibyte codepoint split across two chunks survives.\n * Decoding each chunk independently would corrupt it irrecoverably — which\n * is precisely why `StreamHandle` carries bytes rather than strings.\n */\n\nimport type { Hookable } from 'hookable'\nimport type { AgentHooks } from '../agent'\nimport type { ExecutionContext, ExecutionHandle } from '../contexts/types'\nimport { Buffer } from 'node:buffer'\nimport { createStderrLineEmitter } from './index'\n\n/**\n * Structural subset of the MCP SDK's `Transport` that we implement. Declared\n * locally rather than imported as a type so this module keeps the optional\n * peer-dependency contract (see the note atop `./index.ts`) — the SDK is only\n * ever touched through a runtime `await import(...)`.\n */\nexport interface ContextStdioTransportLike {\n /**\n * Brand marking this transport's process as living OUTSIDE the host.\n * `stdioPidOf` keys off it to refuse handing any pid from here to\n * `killStdioChild`, which signals host pids: a sandbox pid like `77`\n * names a real, unrelated host process. Termination for this transport\n * goes through `StreamHandle.kill()`, which signals inside the context.\n */\n readonly __contextScoped: true\n start: () => Promise<void>\n send: (message: unknown) => Promise<void>\n close: () => Promise<void>\n onclose?: () => void\n onerror?: (error: Error) => void\n onmessage?: (message: unknown) => void\n}\n\nexport interface ContextStdioTransportOptions {\n /** Server name, used for `mcp:warn` attribution. */\n name: string\n context: ExecutionContext\n handle: ExecutionHandle\n /** Full command line, run through the context's shell. */\n command: string\n cwd?: string\n env?: Record<string, string>\n hooks?: Hookable<AgentHooks>\n}\n\n/**\n * Build the transport. Throws if the context can't stream — deliberately\n * loudly, because the alternative (quietly spawning on the host) would\n * reintroduce the split-filesystem bug this transport exists to fix, and\n * would do it invisibly.\n */\nexport async function createContextStdioTransport(\n options: ContextStdioTransportOptions,\n): Promise<ContextStdioTransportLike> {\n const { name, context, handle, command, cwd, env, hooks } = options\n\n if (!context.execStream) {\n throw new Error(\n `MCP server \"${name}\" is configured with \\`scope: 'context'\\`, but the `\n + `'${context.type}' execution context does not support live streams `\n + `(\\`execStream\\`). Use \\`scope: 'host'\\` for this server, or switch to a `\n + `context that advertises \\`capabilities.stream\\`.`,\n )\n }\n\n const { ReadBuffer, serializeMessage } = await import('@modelcontextprotocol/sdk/shared/stdio.js')\n\n const readBuffer = new ReadBuffer()\n let stream: Awaited<ReturnType<NonNullable<ExecutionContext['execStream']>>> | null = null\n let closed = false\n\n const transport: ContextStdioTransportLike = {\n __contextScoped: true,\n\n async start() {\n if (stream)\n throw new Error(`MCP context transport for \"${name}\" already started`)\n\n // cwd is defaulted HERE, not left to the context: process and docker\n // fall back to `handle.cwd` on their own, but the sandbox providers\n // forward `cwd` only when set, so their SDK default would win (E2B's\n // `/home/user`, Daytona's PTY login dir). A `scope: 'context'` server\n // without an explicit `cwd` — e.g. server-filesystem rooted at '.' —\n // would then serve the workspace on two contexts and the home\n // directory on the others: the exact silent path divergence this\n // transport exists to close. Redundant-but-harmless on contexts that\n // already default to `handle.cwd`.\n stream = await context.execStream!(handle, command, {\n cwd: cwd ?? handle.cwd,\n ...(env !== undefined ? { env } : {}),\n })\n\n const active = stream\n\n // stdout → framed JSON-RPC. Runs detached from `start()`; awaiting it\n // would never resolve, since the server lives as long as the session.\n void (async () => {\n try {\n for await (const chunk of active.stdout) {\n readBuffer.append(Buffer.from(chunk))\n for (;;) {\n // A malformed frame must not kill the pump: report it and keep\n // reading. Servers that interleave stray output with protocol\n // frames (a PTY-backed context that lost the `stty raw` race,\n // a server logging to stdout) would otherwise wedge the\n // connection permanently on the first bad line.\n let message: unknown\n try {\n message = readBuffer.readMessage()\n }\n catch (err) {\n transport.onerror?.(err instanceof Error ? err : new Error(String(err)))\n continue\n }\n if (message === null)\n break\n transport.onmessage?.(message)\n }\n }\n }\n catch (err) {\n if (!closed)\n transport.onerror?.(err instanceof Error ? err : new Error(String(err)))\n }\n })()\n\n // stderr → `mcp:warn`, when the context provides it separately. A\n // PTY-backed context cannot split it from the terminal stream, so it\n // redirects to a file and may surface it here out-of-band (Daytona\n // polls) or not at all — absence is expected, not an error.\n if (active.stderr) {\n const emitter = createStderrLineEmitter(name, hooks)\n // Streaming decoder for the same reason `ReadBuffer` exists on the\n // stdout side: a per-chunk decode corrupts any multibyte codepoint\n // split across a chunk boundary. Diagnostic-only here, but free to\n // get right.\n const decoder = new TextDecoder('utf-8')\n void (async () => {\n try {\n for await (const chunk of active.stderr!)\n emitter.push(decoder.decode(chunk, { stream: true }))\n }\n catch {\n // Diagnostic channel — a failure here must not surface as a\n // protocol error.\n }\n finally {\n emitter.push(decoder.decode())\n emitter.flush()\n }\n })()\n }\n\n // The child dying is the connection ending. Surface it once.\n void active.exited.then(() => {\n if (closed)\n return\n closed = true\n transport.onclose?.()\n })\n },\n\n async send(message: unknown) {\n if (!stream)\n throw new Error(`MCP context transport for \"${name}\" not started`)\n await stream.write(new TextEncoder().encode(serializeMessage(message as never)))\n },\n\n async close() {\n if (closed) {\n // Still ensure the child is gone: `closed` may have been set by the\n // exit watcher, but an explicit close after a half-dead stream\n // should not leave a process running in the sandbox.\n await stream?.kill()\n return\n }\n closed = true\n readBuffer.clear()\n await stream?.kill()\n transport.onclose?.()\n },\n }\n\n return transport\n}\n"],"mappings":";;;;;;;;;AA6EA,eAAsB,4BACpB,SACoC;CACpC,MAAM,EAAE,MAAM,SAAS,QAAQ,SAAS,KAAK,KAAK,UAAU;CAE5D,IAAI,CAAC,QAAQ,YACX,MAAM,IAAI,MACR,eAAe,KAAK,sDACd,QAAQ,KAAK,2KAGrB;CAGF,MAAM,EAAE,YAAY,qBAAqB,MAAM,OAAO,sBAA4C,CAAA,MAAA,MAAA,EAAA,CAAA;CAElG,MAAM,aAAa,IAAI,WAAW;CAClC,IAAI,SAAkF;CACtF,IAAI,SAAS;CAEb,MAAM,YAAuC;EAC3C,iBAAiB;EAEjB,MAAM,QAAQ;GACZ,IAAI,QACF,MAAM,IAAI,MAAM,8BAA8B,KAAK,kBAAkB;GAWvE,SAAS,MAAM,QAAQ,WAAY,QAAQ,SAAS;IAClD,KAAK,OAAO,OAAO;IACnB,GAAI,QAAQ,KAAA,IAAY,EAAE,IAAI,IAAI,CAAC;GACrC,CAAC;GAED,MAAM,SAAS;GAIf,CAAM,YAAY;IAChB,IAAI;KACF,WAAW,MAAM,SAAS,OAAO,QAAQ;MACvC,WAAW,OAAO,OAAO,KAAK,KAAK,CAAC;MACpC,SAAS;OAMP,IAAI;OACJ,IAAI;QACF,UAAU,WAAW,YAAY;OACnC,SACO,KAAK;QACV,UAAU,UAAU,eAAe,QAAQ,MAAM,IAAI,MAAM,OAAO,GAAG,CAAC,CAAC;QACvE;OACF;OACA,IAAI,YAAY,MACd;OACF,UAAU,YAAY,OAAO;MAC/B;KACF;IACF,SACO,KAAK;KACV,IAAI,CAAC,QACH,UAAU,UAAU,eAAe,QAAQ,MAAM,IAAI,MAAM,OAAO,GAAG,CAAC,CAAC;IAC3E;GACF,EAAA,CAAG;GAMH,IAAI,OAAO,QAAQ;IACjB,MAAM,UAAU,wBAAwB,MAAM,KAAK;IAKnD,MAAM,UAAU,IAAI,YAAY,OAAO;IACvC,CAAM,YAAY;KAChB,IAAI;MACF,WAAW,MAAM,SAAS,OAAO,QAC/B,QAAQ,KAAK,QAAQ,OAAO,OAAO,EAAE,QAAQ,KAAK,CAAC,CAAC;KACxD,QACM,CAGN,UACQ;MACN,QAAQ,KAAK,QAAQ,OAAO,CAAC;MAC7B,QAAQ,MAAM;KAChB;IACF,EAAA,CAAG;GACL;GAGA,OAAY,OAAO,WAAW;IAC5B,IAAI,QACF;IACF,SAAS;IACT,UAAU,UAAU;GACtB,CAAC;EACH;EAEA,MAAM,KAAK,SAAkB;GAC3B,IAAI,CAAC,QACH,MAAM,IAAI,MAAM,8BAA8B,KAAK,cAAc;GACnE,MAAM,OAAO,MAAM,IAAI,YAAY,CAAC,CAAC,OAAO,iBAAiB,OAAgB,CAAC,CAAC;EACjF;EAEA,MAAM,QAAQ;GACZ,IAAI,QAAQ;IAIV,MAAM,QAAQ,KAAK;IACnB;GACF;GACA,SAAS;GACT,WAAW,MAAM;GACjB,MAAM,QAAQ,KAAK;GACnB,UAAU,UAAU;EACtB;CACF;CAEA,OAAO;AACT"}
|
|
1
|
+
{"version":3,"file":"context-transport-CkiORGgx.js","names":[],"sources":["../src/mcp/context-transport.ts"],"sourcesContent":["/**\n * An MCP `Transport` that speaks stdio JSON-RPC to a server running INSIDE\n * an `ExecutionContext`, rather than as a child of the host process.\n *\n * Why this exists\n * ---------------\n * An MCP server is an ordinary program. When it calls `fs.readFileSync` or\n * `fs.writeFile`, those hit whatever filesystem it was spawned on. The\n * default `StdioClientTransport` spawns on the HOST, so with a sandboxed\n * execution context (Daytona / E2B / Docker) the agent's own tools and its\n * MCP servers end up looking at two different filesystems: a path the model\n * discovered via `list_files` does not exist for the MCP server, and an MCP\n * write lands somewhere `read_file` cannot see.\n *\n * Routing the server through `ExecutionContext.execStream` puts both on the\n * same filesystem. Note what this does NOT buy: isolation. Remote-transport\n * MCP servers are unreachable by this mechanism by construction, so\n * \"everything the agent touches runs in the execution context\" can never be\n * a true invariant. This is about coherence, not containment.\n *\n * Framing\n * -------\n * Delegated to the SDK's own `ReadBuffer` / `serializeMessage`, the exact\n * pair `StdioClientTransport` uses. That matters beyond code reuse:\n * `ReadBuffer` concatenates raw bytes and only decodes at newline\n * boundaries, so a multibyte codepoint split across two chunks survives.\n * Decoding each chunk independently would corrupt it irrecoverably — which\n * is precisely why `StreamHandle` carries bytes rather than strings.\n */\n\nimport type { Hookable } from 'hookable'\nimport type { AgentHooks } from '../agent'\nimport type { ExecutionContext, ExecutionHandle } from '../contexts/types'\nimport { Buffer } from 'node:buffer'\nimport { createStderrLineEmitter } from './index'\n\n/**\n * Structural subset of the MCP SDK's `Transport` that we implement. Declared\n * locally rather than imported as a type so this module keeps the optional\n * peer-dependency contract (see the note atop `./index.ts`) — the SDK is only\n * ever touched through a runtime `await import(...)`.\n */\nexport interface ContextStdioTransportLike {\n /**\n * Brand marking this transport's process as living OUTSIDE the host.\n * `stdioPidOf` keys off it to refuse handing any pid from here to\n * `killStdioChild`, which signals host pids: a sandbox pid like `77`\n * names a real, unrelated host process. Termination for this transport\n * goes through `StreamHandle.kill()`, which signals inside the context.\n */\n readonly __contextScoped: true\n start: () => Promise<void>\n send: (message: unknown) => Promise<void>\n close: () => Promise<void>\n onclose?: () => void\n onerror?: (error: Error) => void\n onmessage?: (message: unknown) => void\n}\n\nexport interface ContextStdioTransportOptions {\n /** Server name, used for `mcp:warn` attribution. */\n name: string\n context: ExecutionContext\n handle: ExecutionHandle\n /** Full command line, run through the context's shell. */\n command: string\n cwd?: string\n env?: Record<string, string>\n hooks?: Hookable<AgentHooks>\n}\n\n/**\n * Build the transport. Throws if the context can't stream — deliberately\n * loudly, because the alternative (quietly spawning on the host) would\n * reintroduce the split-filesystem bug this transport exists to fix, and\n * would do it invisibly.\n */\nexport async function createContextStdioTransport(\n options: ContextStdioTransportOptions,\n): Promise<ContextStdioTransportLike> {\n const { name, context, handle, command, cwd, env, hooks } = options\n\n if (!context.execStream) {\n throw new Error(\n `MCP server \"${name}\" is configured with \\`scope: 'context'\\`, but the `\n + `'${context.type}' execution context does not support live streams `\n + `(\\`execStream\\`). Use \\`scope: 'host'\\` for this server, or switch to a `\n + `context that advertises \\`capabilities.stream\\`.`,\n )\n }\n\n const { ReadBuffer, serializeMessage } = await import('@modelcontextprotocol/sdk/shared/stdio.js')\n\n const readBuffer = new ReadBuffer()\n let stream: Awaited<ReturnType<NonNullable<ExecutionContext['execStream']>>> | null = null\n let closed = false\n\n const transport: ContextStdioTransportLike = {\n __contextScoped: true,\n\n async start() {\n if (stream)\n throw new Error(`MCP context transport for \"${name}\" already started`)\n\n // cwd is defaulted HERE, not left to the context: process and docker\n // fall back to `handle.cwd` on their own, but the sandbox providers\n // forward `cwd` only when set, so their SDK default would win (E2B's\n // `/home/user`, Daytona's PTY login dir). A `scope: 'context'` server\n // without an explicit `cwd` — e.g. server-filesystem rooted at '.' —\n // would then serve the workspace on two contexts and the home\n // directory on the others: the exact silent path divergence this\n // transport exists to close. Redundant-but-harmless on contexts that\n // already default to `handle.cwd`.\n stream = await context.execStream!(handle, command, {\n cwd: cwd ?? handle.cwd,\n ...(env !== undefined ? { env } : {}),\n })\n\n const active = stream\n\n // stdout → framed JSON-RPC. Runs detached from `start()`; awaiting it\n // would never resolve, since the server lives as long as the session.\n void (async () => {\n try {\n for await (const chunk of active.stdout) {\n readBuffer.append(Buffer.from(chunk))\n for (;;) {\n // A malformed frame must not kill the pump: report it and keep\n // reading. Servers that interleave stray output with protocol\n // frames (a PTY-backed context that lost the `stty raw` race,\n // a server logging to stdout) would otherwise wedge the\n // connection permanently on the first bad line.\n let message: unknown\n try {\n message = readBuffer.readMessage()\n }\n catch (err) {\n transport.onerror?.(err instanceof Error ? err : new Error(String(err)))\n continue\n }\n if (message === null)\n break\n transport.onmessage?.(message)\n }\n }\n }\n catch (err) {\n if (!closed)\n transport.onerror?.(err instanceof Error ? err : new Error(String(err)))\n }\n })()\n\n // stderr → `mcp:warn`, when the context provides it separately. A\n // PTY-backed context cannot split it from the terminal stream, so it\n // redirects to a file and may surface it here out-of-band (Daytona\n // polls) or not at all — absence is expected, not an error.\n if (active.stderr) {\n const emitter = createStderrLineEmitter(name, hooks)\n // Streaming decoder for the same reason `ReadBuffer` exists on the\n // stdout side: a per-chunk decode corrupts any multibyte codepoint\n // split across a chunk boundary. Diagnostic-only here, but free to\n // get right.\n const decoder = new TextDecoder('utf-8')\n void (async () => {\n try {\n for await (const chunk of active.stderr!)\n emitter.push(decoder.decode(chunk, { stream: true }))\n }\n catch {\n // Diagnostic channel — a failure here must not surface as a\n // protocol error.\n }\n finally {\n emitter.push(decoder.decode())\n emitter.flush()\n }\n })()\n }\n\n // The child dying is the connection ending. Surface it once.\n void active.exited.then(() => {\n if (closed)\n return\n closed = true\n transport.onclose?.()\n })\n },\n\n async send(message: unknown) {\n if (!stream)\n throw new Error(`MCP context transport for \"${name}\" not started`)\n await stream.write(new TextEncoder().encode(serializeMessage(message as never)))\n },\n\n async close() {\n if (closed) {\n // Still ensure the child is gone: `closed` may have been set by the\n // exit watcher, but an explicit close after a half-dead stream\n // should not leave a process running in the sandbox.\n await stream?.kill()\n return\n }\n closed = true\n readBuffer.clear()\n await stream?.kill()\n transport.onclose?.()\n },\n }\n\n return transport\n}\n"],"mappings":";;;;;;;;;AA6EA,eAAsB,4BACpB,SACoC;CACpC,MAAM,EAAE,MAAM,SAAS,QAAQ,SAAS,KAAK,KAAK,UAAU;CAE5D,IAAI,CAAC,QAAQ,YACX,MAAM,IAAI,MACR,eAAe,KAAK,sDACd,QAAQ,KAAK,2KAGrB;CAGF,MAAM,EAAE,YAAY,qBAAqB,MAAM,OAAO,sBAA4C,CAAA,MAAA,MAAA,EAAA,CAAA;CAElG,MAAM,aAAa,IAAI,WAAW;CAClC,IAAI,SAAkF;CACtF,IAAI,SAAS;CAEb,MAAM,YAAuC;EAC3C,iBAAiB;EAEjB,MAAM,QAAQ;GACZ,IAAI,QACF,MAAM,IAAI,MAAM,8BAA8B,KAAK,kBAAkB;GAWvE,SAAS,MAAM,QAAQ,WAAY,QAAQ,SAAS;IAClD,KAAK,OAAO,OAAO;IACnB,GAAI,QAAQ,KAAA,IAAY,EAAE,IAAI,IAAI,CAAC;GACrC,CAAC;GAED,MAAM,SAAS;GAIf,CAAM,YAAY;IAChB,IAAI;KACF,WAAW,MAAM,SAAS,OAAO,QAAQ;MACvC,WAAW,OAAO,OAAO,KAAK,KAAK,CAAC;MACpC,SAAS;OAMP,IAAI;OACJ,IAAI;QACF,UAAU,WAAW,YAAY;OACnC,SACO,KAAK;QACV,UAAU,UAAU,eAAe,QAAQ,MAAM,IAAI,MAAM,OAAO,GAAG,CAAC,CAAC;QACvE;OACF;OACA,IAAI,YAAY,MACd;OACF,UAAU,YAAY,OAAO;MAC/B;KACF;IACF,SACO,KAAK;KACV,IAAI,CAAC,QACH,UAAU,UAAU,eAAe,QAAQ,MAAM,IAAI,MAAM,OAAO,GAAG,CAAC,CAAC;IAC3E;GACF,EAAA,CAAG;GAMH,IAAI,OAAO,QAAQ;IACjB,MAAM,UAAU,wBAAwB,MAAM,KAAK;IAKnD,MAAM,UAAU,IAAI,YAAY,OAAO;IACvC,CAAM,YAAY;KAChB,IAAI;MACF,WAAW,MAAM,SAAS,OAAO,QAC/B,QAAQ,KAAK,QAAQ,OAAO,OAAO,EAAE,QAAQ,KAAK,CAAC,CAAC;KACxD,QACM,CAGN,UACQ;MACN,QAAQ,KAAK,QAAQ,OAAO,CAAC;MAC7B,QAAQ,MAAM;KAChB;IACF,EAAA,CAAG;GACL;GAGA,OAAY,OAAO,WAAW;IAC5B,IAAI,QACF;IACF,SAAS;IACT,UAAU,UAAU;GACtB,CAAC;EACH;EAEA,MAAM,KAAK,SAAkB;GAC3B,IAAI,CAAC,QACH,MAAM,IAAI,MAAM,8BAA8B,KAAK,cAAc;GACnE,MAAM,OAAO,MAAM,IAAI,YAAY,CAAC,CAAC,OAAO,iBAAiB,OAAgB,CAAC,CAAC;EACjF;EAEA,MAAM,QAAQ;GACZ,IAAI,QAAQ;IAIV,MAAM,QAAQ,KAAK;IACnB;GACF;GACA,SAAS;GACT,WAAW,MAAM;GACjB,MAAM,QAAQ,KAAK;GACnB,UAAU,UAAU;EACtB;CACF;CAEA,OAAO;AACT"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { s as ExecResult } from "../types-DdZMQxfT.js";
|
|
2
2
|
import { t as SandboxProvider } from "../sandbox-DqwpKX18.js";
|
|
3
|
-
import { lu as Logger } from "../index-
|
|
3
|
+
import { lu as Logger } from "../index-BT4Q1nLD.js";
|
|
4
4
|
import { Buffer } from "node:buffer";
|
|
5
5
|
|
|
6
6
|
//#region src/contexts/daytona.d.ts
|
package/dist/contexts/e2b.d.ts
CHANGED
package/dist/eval.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $t as EvalWorkspaceFile, An as finalizeEvalMetrics, At as EvalAgentMcpServers, Bn as statusCompleted, Bt as EvalMetric, Cn as defineMetrics, Dn as fileContentQuality, Dt as CreateEvalAgentOptions, En as fileContains, Fn as llmJudge, Ft as EvalArtifacts, Gt as EvalRunSummary, Ht as EvalRunMetricAggregate, In as normalizeMetric, It as EvalCaseOptions, Jt as EvalScore, Kt as EvalRunSummaryCase, Ln as registerEvalTests, Lt as EvalCaseResult, Mn as formatEvalRunSummary, Mt as EvalAgentRunResult, Nn as formatTrajectoryLine, Nt as EvalAgentRunStats, On as fileExists, Ot as EFFICIENCY_METRICS, Pn as functionalityMetric, Pt as EvalAgentStats, Qt as EvalVariantSummary, Rn as relativeArtifactPath, Rt as EvalDefinition, Sn as defineEval, Tn as emitEfficiencyMetrics, Ut as EvalRunReporter, Vt as EvalMetricError, Wt as EvalRunReporterOptions, Xt as EvalScorerContext, Yt as EvalScorer, Zt as EvalTestRunner, _n as clearRegisteredEvals, an as MetricSpec, bn as createEvalRunReporter, cn as RegisterEvalTestsOptions, dn as TrajectoryStep, en as EvalWorkspaceOptions, fn as TrajectoryStepKind, gn as buildTrajectory, hn as buildRegisteredEvals, in as MetricEmitter, jn as formatEvalCaseSummary, jt as EvalAgentRunOptions, kn as fileExistsOneOf, kt as EvalAgent, ln as ReusableExecutionContext, mn as buildEvalRunSummary, nn as LlmJudgeOptions, on as MetricSpecMap, pn as artifactPath, qt as EvalRunUsage, rn as MetricDirection, sn as MetricStats, tn as EvalWorkspaceSnapshot, un as Trajectory, vn as computeEvalTagScores, wn as efficiencyMetricValues, xn as createReusableExecutionContext, yn as createEvalAgent, zn as runEvalCase, zt as EvalDefinitionContext } from "./index-
|
|
1
|
+
import { $t as EvalWorkspaceFile, An as finalizeEvalMetrics, At as EvalAgentMcpServers, Bn as statusCompleted, Bt as EvalMetric, Cn as defineMetrics, Dn as fileContentQuality, Dt as CreateEvalAgentOptions, En as fileContains, Fn as llmJudge, Ft as EvalArtifacts, Gt as EvalRunSummary, Ht as EvalRunMetricAggregate, In as normalizeMetric, It as EvalCaseOptions, Jt as EvalScore, Kt as EvalRunSummaryCase, Ln as registerEvalTests, Lt as EvalCaseResult, Mn as formatEvalRunSummary, Mt as EvalAgentRunResult, Nn as formatTrajectoryLine, Nt as EvalAgentRunStats, On as fileExists, Ot as EFFICIENCY_METRICS, Pn as functionalityMetric, Pt as EvalAgentStats, Qt as EvalVariantSummary, Rn as relativeArtifactPath, Rt as EvalDefinition, Sn as defineEval, Tn as emitEfficiencyMetrics, Ut as EvalRunReporter, Vt as EvalMetricError, Wt as EvalRunReporterOptions, Xt as EvalScorerContext, Yt as EvalScorer, Zt as EvalTestRunner, _n as clearRegisteredEvals, an as MetricSpec, bn as createEvalRunReporter, cn as RegisterEvalTestsOptions, dn as TrajectoryStep, en as EvalWorkspaceOptions, fn as TrajectoryStepKind, gn as buildTrajectory, hn as buildRegisteredEvals, in as MetricEmitter, jn as formatEvalCaseSummary, jt as EvalAgentRunOptions, kn as fileExistsOneOf, kt as EvalAgent, ln as ReusableExecutionContext, mn as buildEvalRunSummary, nn as LlmJudgeOptions, on as MetricSpecMap, pn as artifactPath, qt as EvalRunUsage, rn as MetricDirection, sn as MetricStats, tn as EvalWorkspaceSnapshot, un as Trajectory, vn as computeEvalTagScores, wn as efficiencyMetricValues, xn as createReusableExecutionContext, yn as createEvalAgent, zn as runEvalCase, zt as EvalDefinitionContext } from "./index-BT4Q1nLD.js";
|
|
2
2
|
export { CreateEvalAgentOptions, EFFICIENCY_METRICS, EvalAgent, EvalAgentMcpServers, EvalAgentRunOptions, EvalAgentRunResult, EvalAgentRunStats, EvalAgentStats, EvalArtifacts, EvalCaseOptions, EvalCaseResult, EvalDefinition, EvalDefinitionContext, EvalMetric, EvalMetricError, EvalRunMetricAggregate, EvalRunReporter, EvalRunReporterOptions, EvalRunSummary, EvalRunSummaryCase, EvalRunUsage, EvalScore, EvalScorer, EvalScorerContext, EvalTestRunner, EvalVariantSummary, EvalWorkspaceFile, EvalWorkspaceOptions, EvalWorkspaceSnapshot, LlmJudgeOptions, MetricDirection, MetricEmitter, MetricSpec, MetricSpecMap, MetricStats, RegisterEvalTestsOptions, ReusableExecutionContext, Trajectory, TrajectoryStep, TrajectoryStepKind, artifactPath, buildEvalRunSummary, buildRegisteredEvals, buildTrajectory, clearRegisteredEvals, computeEvalTagScores, createEvalAgent, createEvalRunReporter, createReusableExecutionContext, defineEval, defineMetrics, efficiencyMetricValues, emitEfficiencyMetrics, fileContains, fileContentQuality, fileExists, fileExistsOneOf, finalizeEvalMetrics, formatEvalCaseSummary, formatEvalRunSummary, formatTrajectoryLine, functionalityMetric, llmJudge, normalizeMetric, registerEvalTests, relativeArtifactPath, runEvalCase, statusCompleted };
|
package/dist/eval.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as createProcessContext } from "./contexts-DbMuUPjS.js";
|
|
2
2
|
import { t as alwaysQuote } from "./shell-quote-BmnhZmdM.js";
|
|
3
|
-
import { d as createMemoryStore, t as createSession } from "./session-
|
|
3
|
+
import { d as createMemoryStore, t as createSession } from "./session-CFwkU19n.js";
|
|
4
4
|
import { headlessEventToJsonl, runHeadless } from "./headless.js";
|
|
5
5
|
import { join, relative, resolve } from "node:path";
|
|
6
6
|
import { mkdir, mkdtemp, rm, writeFile } from "node:fs/promises";
|
package/dist/extensions.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $a as clampExtensionConfigNumber, $i as mergeContributions, $o as ExtensionBannerOptions, Aa as ExtensionPromptBridge, Ao as ExtensionProviderMiddleware, Ba as ExtensionConfigEnumItem, Bo as ExtensionToolPolicy, Ca as discoverExtensions, Co as ExtensionMcpConfigTransform, Da as scanExtensionDirectories, Do as ExtensionPaths, Ea as parseExtensionScanPathEnv, Eo as ExtensionOrderedContribution, Fa as ExtensionConfigActionResult, Fo as ExtensionSkillPolicy, Ga as ExtensionConfigScope, Go as ExtensionToolResultMetadataRegistration, Ha as ExtensionConfigItemBase, Ho as ExtensionToolRenderer, Ia as ExtensionConfigActionStatus, Io as ExtensionSource, Ja as ExtensionConfigValue, Ji as buildExtensionPreset, Jo as ExtensionToolVerdict, Ka as ExtensionConfigStringItem, Ki as BuildExtensionRegistryOptions, Ko as ExtensionToolResultPatch, La as ExtensionConfigBooleanItem, Lo as ExtensionStorageScope, Ma as createExtensionPromptBridge, Mo as ExtensionRunTransform, Na as defineExtension, No as ExtensionRuntimeEnv, Oa as DiscoverAndBuildExtensionRegistryOptions, Oo as ExtensionPermission, Pa as ExtensionConfigActionItem, Po as ExtensionSessionStateSurface, Qa as WireExtensionConfigSchema, Qi as filterExtensionRegistry, Qo as TuiContributions, Ra as ExtensionConfigCategory, Ro as ExtensionStorageSurface, Sa as defaultExtensionScanPaths, So as ExtensionManifest, Ta as isExtensionDefinition, To as ExtensionModalNode, Ua as ExtensionConfigModelItem, Uo as ExtensionToolRendererEntry, Va as ExtensionConfigItem, Vo as ExtensionToolRenderProps, Wa as ExtensionConfigNumberItem, Wo as ExtensionToolRendererRegistration, Xa as StoredExtensionConfigItem, Xi as composeExtensionPreset, Xo as GuiContributions, Ya as ExtensionConfigValueItem, Yi as buildExtensionRegistry, Yo as ExtensionTuiSurface, Za as WireExtensionConfigItem, Zi as disposeExtensionRegistry, Zo as LoadedExtension, _a as removeInstalledExtension, _o as ExtensionFooterHint, _s as createExtensionHostRuntimeBridge, aa as ExtensionInstallIo, ao as sanitizeExtensionConfigActionPatch, as as ExtensionNotifyOptions, ba as ENTRY_CANDIDATES, bo as ExtensionKeybinding, ca as ExtensionInstallScope, co as ExtensionApiVersion, cs as createExtensionHud, da as InstalledExtensionTargetOptions, do as ExtensionContext, ds as ExtensionModelEntry, ea as partitionExtensionCatalog, eo as coerceExtensionConfigInput, es as ExtensionHud, fa as fetchExtensionSource, fo as ExtensionContextTransform, fs as ExtensionRuntimeSurface, ga as readExtensionInstallProvenance, go as ExtensionDefinition, gs as ExtensionWorkspaceSurface, ha as parseExtensionInstallSource, ho as ExtensionCustomRendererEntry, hs as ExtensionWorkspacePair, ia as ExtensionInstallErrorCode, io as resolveExtensionConfigValue, is as ExtensionNotification, ja as ExtensionPromptDelivery, jo as ExtensionRegistry, ka as discoverAndBuildExtensionRegistry, ko as ExtensionPromptTransform, la as ExtensionInstallSource, lo as ExtensionBehaviorTransform, ls as ExtensionHostRuntimeBridge, ma as listExtensionCandidates, mo as ExtensionCustomRenderer, ms as ExtensionSessionsSurface, na as ExtensionInstallCandidate, no as isValidExtensionConfigValue, ns as ExtensionHudStatus, oa as ExtensionInstallProvenance, oo as toWireConfigSchema, os as ExtensionNotifyTone, pa as installExtensionFromSpec, po as ExtensionContributions, ps as ExtensionSessionSummary, qa as ExtensionConfigSurface, qi as ExtensionCatalogPartition, qo as ExtensionToolResultTransform, ra as ExtensionInstallError, ro as resolveExtensionConfig, rs as ExtensionHudWriter, sa as ExtensionInstallResult, so as EMPTY_EXTENSION_REGISTRY, ss as ExtensionStatusOptions, ta as ExtensionFetchResult, to as isValidExtensionConfigItem, ts as ExtensionHudState, ua as InstallExtensionFromSpecOptions, uo as ExtensionCapability, us as ExtensionHostRuntimeImpl, va as updateInstalledExtension, vo as ExtensionGuiPanel, vs as createWorkspaceSurface, wa as inlineLoadedExtension, wo as ExtensionModal, xa as ExtensionScanEntry, xo as ExtensionKeybindingDispatchContext, ya as registerExtensionHostModules, yo as ExtensionGuiSurface, za as ExtensionConfigChangeBehavior, zo as ExtensionToolCatalogTransform } from "./index-
|
|
1
|
+
import { $a as clampExtensionConfigNumber, $i as mergeContributions, $o as ExtensionBannerOptions, Aa as ExtensionPromptBridge, Ao as ExtensionProviderMiddleware, Ba as ExtensionConfigEnumItem, Bo as ExtensionToolPolicy, Ca as discoverExtensions, Co as ExtensionMcpConfigTransform, Da as scanExtensionDirectories, Do as ExtensionPaths, Ea as parseExtensionScanPathEnv, Eo as ExtensionOrderedContribution, Fa as ExtensionConfigActionResult, Fo as ExtensionSkillPolicy, Ga as ExtensionConfigScope, Go as ExtensionToolResultMetadataRegistration, Ha as ExtensionConfigItemBase, Ho as ExtensionToolRenderer, Ia as ExtensionConfigActionStatus, Io as ExtensionSource, Ja as ExtensionConfigValue, Ji as buildExtensionPreset, Jo as ExtensionToolVerdict, Ka as ExtensionConfigStringItem, Ki as BuildExtensionRegistryOptions, Ko as ExtensionToolResultPatch, La as ExtensionConfigBooleanItem, Lo as ExtensionStorageScope, Ma as createExtensionPromptBridge, Mo as ExtensionRunTransform, Na as defineExtension, No as ExtensionRuntimeEnv, Oa as DiscoverAndBuildExtensionRegistryOptions, Oo as ExtensionPermission, Pa as ExtensionConfigActionItem, Po as ExtensionSessionStateSurface, Qa as WireExtensionConfigSchema, Qi as filterExtensionRegistry, Qo as TuiContributions, Ra as ExtensionConfigCategory, Ro as ExtensionStorageSurface, Sa as defaultExtensionScanPaths, So as ExtensionManifest, Ta as isExtensionDefinition, To as ExtensionModalNode, Ua as ExtensionConfigModelItem, Uo as ExtensionToolRendererEntry, Va as ExtensionConfigItem, Vo as ExtensionToolRenderProps, Wa as ExtensionConfigNumberItem, Wo as ExtensionToolRendererRegistration, Xa as StoredExtensionConfigItem, Xi as composeExtensionPreset, Xo as GuiContributions, Ya as ExtensionConfigValueItem, Yi as buildExtensionRegistry, Yo as ExtensionTuiSurface, Za as WireExtensionConfigItem, Zi as disposeExtensionRegistry, Zo as LoadedExtension, _a as removeInstalledExtension, _o as ExtensionFooterHint, _s as createExtensionHostRuntimeBridge, aa as ExtensionInstallIo, ao as sanitizeExtensionConfigActionPatch, as as ExtensionNotifyOptions, ba as ENTRY_CANDIDATES, bo as ExtensionKeybinding, ca as ExtensionInstallScope, co as ExtensionApiVersion, cs as createExtensionHud, da as InstalledExtensionTargetOptions, do as ExtensionContext, ds as ExtensionModelEntry, ea as partitionExtensionCatalog, eo as coerceExtensionConfigInput, es as ExtensionHud, fa as fetchExtensionSource, fo as ExtensionContextTransform, fs as ExtensionRuntimeSurface, ga as readExtensionInstallProvenance, go as ExtensionDefinition, gs as ExtensionWorkspaceSurface, ha as parseExtensionInstallSource, ho as ExtensionCustomRendererEntry, hs as ExtensionWorkspacePair, ia as ExtensionInstallErrorCode, io as resolveExtensionConfigValue, is as ExtensionNotification, ja as ExtensionPromptDelivery, jo as ExtensionRegistry, ka as discoverAndBuildExtensionRegistry, ko as ExtensionPromptTransform, la as ExtensionInstallSource, lo as ExtensionBehaviorTransform, ls as ExtensionHostRuntimeBridge, ma as listExtensionCandidates, mo as ExtensionCustomRenderer, ms as ExtensionSessionsSurface, na as ExtensionInstallCandidate, no as isValidExtensionConfigValue, ns as ExtensionHudStatus, oa as ExtensionInstallProvenance, oo as toWireConfigSchema, os as ExtensionNotifyTone, pa as installExtensionFromSpec, po as ExtensionContributions, ps as ExtensionSessionSummary, qa as ExtensionConfigSurface, qi as ExtensionCatalogPartition, qo as ExtensionToolResultTransform, ra as ExtensionInstallError, ro as resolveExtensionConfig, rs as ExtensionHudWriter, sa as ExtensionInstallResult, so as EMPTY_EXTENSION_REGISTRY, ss as ExtensionStatusOptions, ta as ExtensionFetchResult, to as isValidExtensionConfigItem, ts as ExtensionHudState, ua as InstallExtensionFromSpecOptions, uo as ExtensionCapability, us as ExtensionHostRuntimeImpl, va as updateInstalledExtension, vo as ExtensionGuiPanel, vs as createWorkspaceSurface, wa as inlineLoadedExtension, wo as ExtensionModal, xa as ExtensionScanEntry, xo as ExtensionKeybindingDispatchContext, ya as registerExtensionHostModules, yo as ExtensionGuiSurface, za as ExtensionConfigChangeBehavior, zo as ExtensionToolCatalogTransform } from "./index-BT4Q1nLD.js";
|
|
2
2
|
export { type BuildExtensionRegistryOptions, type DiscoverAndBuildExtensionRegistryOptions, EMPTY_EXTENSION_REGISTRY, ENTRY_CANDIDATES, type ExtensionApiVersion, type ExtensionBannerOptions, type ExtensionBehaviorTransform, type ExtensionCapability, type ExtensionCatalogPartition, type ExtensionConfigActionItem, type ExtensionConfigActionResult, type ExtensionConfigActionStatus, type ExtensionConfigBooleanItem, type ExtensionConfigCategory, type ExtensionConfigChangeBehavior, type ExtensionConfigEnumItem, type ExtensionConfigItem, type ExtensionConfigItemBase, type ExtensionConfigModelItem, type ExtensionConfigNumberItem, type ExtensionConfigScope, type ExtensionConfigStringItem, type ExtensionConfigSurface, type ExtensionConfigValue, type ExtensionConfigValueItem, type ExtensionContext, type ExtensionContextTransform, type ExtensionContributions, type ExtensionCustomRenderer, type ExtensionCustomRendererEntry, type ExtensionDefinition, type ExtensionFetchResult, type ExtensionFooterHint, type ExtensionGuiPanel, type ExtensionGuiSurface, type ExtensionHostRuntimeBridge, type ExtensionHostRuntimeImpl, type ExtensionHud, type ExtensionHudState, type ExtensionHudStatus, type ExtensionHudWriter, type ExtensionInstallCandidate, ExtensionInstallError, type ExtensionInstallErrorCode, type ExtensionInstallIo, type ExtensionInstallProvenance, type ExtensionInstallResult, type ExtensionInstallScope, type ExtensionInstallSource, type ExtensionKeybinding, type ExtensionKeybindingDispatchContext, type ExtensionManifest, type ExtensionMcpConfigTransform, type ExtensionModal, type ExtensionModalNode, type ExtensionModelEntry, type ExtensionNotification, type ExtensionNotifyOptions, type ExtensionNotifyTone, type ExtensionOrderedContribution, type ExtensionPaths, type ExtensionPermission, type ExtensionPromptBridge, type ExtensionPromptDelivery, type ExtensionPromptTransform, type ExtensionProviderMiddleware, type ExtensionRegistry, type ExtensionRunTransform, type ExtensionRuntimeEnv, type ExtensionRuntimeSurface, type ExtensionScanEntry, type ExtensionSessionStateSurface, type ExtensionSessionSummary, type ExtensionSessionsSurface, type ExtensionSkillPolicy, type ExtensionSource, type ExtensionStatusOptions, type ExtensionStorageScope, type ExtensionStorageSurface, type ExtensionToolCatalogTransform, type ExtensionToolPolicy, type ExtensionToolRenderProps, type ExtensionToolRenderer, type ExtensionToolRendererEntry, type ExtensionToolRendererRegistration, type ExtensionToolResultMetadataRegistration, type ExtensionToolResultPatch, type ExtensionToolResultTransform, type ExtensionToolVerdict, type ExtensionTuiSurface, type ExtensionWorkspacePair, type ExtensionWorkspaceSurface, type GuiContributions, type InstallExtensionFromSpecOptions, type InstalledExtensionTargetOptions, type LoadedExtension, type StoredExtensionConfigItem, type TuiContributions, type WireExtensionConfigItem, type WireExtensionConfigSchema, buildExtensionPreset, buildExtensionRegistry, clampExtensionConfigNumber, coerceExtensionConfigInput, composeExtensionPreset, createExtensionHostRuntimeBridge, createExtensionHud, createExtensionPromptBridge, createWorkspaceSurface, defaultExtensionScanPaths, defineExtension, discoverAndBuildExtensionRegistry, discoverExtensions, disposeExtensionRegistry, fetchExtensionSource, filterExtensionRegistry, inlineLoadedExtension, installExtensionFromSpec, isExtensionDefinition, isValidExtensionConfigItem, isValidExtensionConfigValue, listExtensionCandidates, mergeContributions, parseExtensionInstallSource, parseExtensionScanPathEnv, partitionExtensionCatalog, readExtensionInstallProvenance, registerExtensionHostModules, removeInstalledExtension, resolveExtensionConfig, resolveExtensionConfigValue, sanitizeExtensionConfigActionPatch, scanExtensionDirectories, toWireConfigSchema, updateInstalledExtension };
|
package/dist/extensions.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as buildExtensionPreset, $t as registerExtensionHostModules, G as installExtensionFromSpec, H as createExtensionPromptBridge, J as readExtensionInstallProvenance, K as listExtensionCandidates, Q as discoverAndBuildExtensionRegistry, U as ExtensionInstallError, V as EMPTY_EXTENSION_REGISTRY, W as fetchExtensionSource, X as updateInstalledExtension, Y as removeInstalledExtension, Z as createExtensionHud, an as parseExtensionScanPathEnv, at as partitionExtensionCatalog, cn as clampExtensionConfigNumber, dn as isValidExtensionConfigValue, en as ENTRY_CANDIDATES, et as buildExtensionRegistry, fn as resolveExtensionConfig, hn as toWireConfigSchema, in as isExtensionDefinition, it as mergeContributions, ln as coerceExtensionConfigInput, mn as sanitizeExtensionConfigActionPatch, nn as discoverExtensions, nt as disposeExtensionRegistry, on as scanExtensionDirectories, ot as createExtensionHostRuntimeBridge, pn as resolveExtensionConfigValue, q as parseExtensionInstallSource, rn as inlineLoadedExtension, rt as filterExtensionRegistry, sn as defineExtension, st as createWorkspaceSurface, tn as defaultExtensionScanPaths, tt as composeExtensionPreset, un as isValidExtensionConfigItem } from "./agent-
|
|
1
|
+
import { $ as buildExtensionPreset, $t as registerExtensionHostModules, G as installExtensionFromSpec, H as createExtensionPromptBridge, J as readExtensionInstallProvenance, K as listExtensionCandidates, Q as discoverAndBuildExtensionRegistry, U as ExtensionInstallError, V as EMPTY_EXTENSION_REGISTRY, W as fetchExtensionSource, X as updateInstalledExtension, Y as removeInstalledExtension, Z as createExtensionHud, an as parseExtensionScanPathEnv, at as partitionExtensionCatalog, cn as clampExtensionConfigNumber, dn as isValidExtensionConfigValue, en as ENTRY_CANDIDATES, et as buildExtensionRegistry, fn as resolveExtensionConfig, hn as toWireConfigSchema, in as isExtensionDefinition, it as mergeContributions, ln as coerceExtensionConfigInput, mn as sanitizeExtensionConfigActionPatch, nn as discoverExtensions, nt as disposeExtensionRegistry, on as scanExtensionDirectories, ot as createExtensionHostRuntimeBridge, pn as resolveExtensionConfigValue, q as parseExtensionInstallSource, rn as inlineLoadedExtension, rt as filterExtensionRegistry, sn as defineExtension, st as createWorkspaceSurface, tn as defaultExtensionScanPaths, tt as composeExtensionPreset, un as isValidExtensionConfigItem } from "./agent-C5cHuI0r.js";
|
|
2
2
|
export { EMPTY_EXTENSION_REGISTRY, ENTRY_CANDIDATES, ExtensionInstallError, buildExtensionPreset, buildExtensionRegistry, clampExtensionConfigNumber, coerceExtensionConfigInput, composeExtensionPreset, createExtensionHostRuntimeBridge, createExtensionHud, createExtensionPromptBridge, createWorkspaceSurface, defaultExtensionScanPaths, defineExtension, discoverAndBuildExtensionRegistry, discoverExtensions, disposeExtensionRegistry, fetchExtensionSource, filterExtensionRegistry, inlineLoadedExtension, installExtensionFromSpec, isExtensionDefinition, isValidExtensionConfigItem, isValidExtensionConfigValue, listExtensionCandidates, mergeContributions, parseExtensionInstallSource, parseExtensionScanPathEnv, partitionExtensionCatalog, readExtensionInstallProvenance, registerExtensionHostModules, removeInstalledExtension, resolveExtensionConfig, resolveExtensionConfigValue, sanitizeExtensionConfigActionPatch, scanExtensionDirectories, toWireConfigSchema, updateInstalledExtension };
|
package/dist/headless.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $n as exitCodeForHeadlessResult, Gn as HeadlessOptions, Hn as FormattedHeadlessTurnEvent, Jn as HeadlessStatus, Kn as HeadlessOutputFormat, Qn as ProviderTranscriptFormat, Un as HeadlessErrorInfo, Vn as FormattedHeadlessResult, Wn as HeadlessEvent, Xn as OpenAIChatContentPart, Yn as HeadlessUsage, Zn as OpenAIChatMessage, ar as providerTranscriptFormatForProvider, cr as transcriptToProviderMessages, er as formatHeadlessResult, ir as installHeadlessEventAdapter, nr as formattedHeadlessTurnEventToJsonl, or as runHeadless, qn as HeadlessResult, rr as headlessEventToJsonl, sr as transcriptToOpenAIMessages, tr as formatHeadlessTurnEvent } from "./index-
|
|
1
|
+
import { $n as exitCodeForHeadlessResult, Gn as HeadlessOptions, Hn as FormattedHeadlessTurnEvent, Jn as HeadlessStatus, Kn as HeadlessOutputFormat, Qn as ProviderTranscriptFormat, Un as HeadlessErrorInfo, Vn as FormattedHeadlessResult, Wn as HeadlessEvent, Xn as OpenAIChatContentPart, Yn as HeadlessUsage, Zn as OpenAIChatMessage, ar as providerTranscriptFormatForProvider, cr as transcriptToProviderMessages, er as formatHeadlessResult, ir as installHeadlessEventAdapter, nr as formattedHeadlessTurnEventToJsonl, or as runHeadless, qn as HeadlessResult, rr as headlessEventToJsonl, sr as transcriptToOpenAIMessages, tr as formatHeadlessTurnEvent } from "./index-BT4Q1nLD.js";
|
|
2
2
|
export { FormattedHeadlessResult, FormattedHeadlessTurnEvent, HeadlessErrorInfo, HeadlessEvent, HeadlessOptions, HeadlessOutputFormat, HeadlessResult, HeadlessStatus, HeadlessUsage, OpenAIChatContentPart, OpenAIChatMessage, ProviderTranscriptFormat, exitCodeForHeadlessResult, formatHeadlessResult, formatHeadlessTurnEvent, formattedHeadlessTurnEventToJsonl, headlessEventToJsonl, installHeadlessEventAdapter, providerTranscriptFormatForProvider, runHeadless, transcriptToOpenAIMessages, transcriptToProviderMessages };
|
package/dist/headless.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as isWireTurn, i as documentBlockMarker, l as toolResultToText, n as assertResolvedMediaBlock } from "./types-BIarq1qE.js";
|
|
2
|
-
import { dt as basic_default, t as createAgent } from "./agent-
|
|
2
|
+
import { dt as basic_default, t as createAgent } from "./agent-C5cHuI0r.js";
|
|
3
3
|
import { r as createProcessContext } from "./contexts-DbMuUPjS.js";
|
|
4
4
|
import { t as audioFormatFromMediaType } from "./media-sniff-Bn76JxAu.js";
|
|
5
|
-
import { c as ensureToolResultPairing, g as toAnthropic } from "./messages-
|
|
6
|
-
import { d as createMemoryStore, t as createSession } from "./session-
|
|
5
|
+
import { c as ensureToolResultPairing, g as toAnthropic } from "./messages-TVh_iU9W.js";
|
|
6
|
+
import { d as createMemoryStore, t as createSession } from "./session-CFwkU19n.js";
|
|
7
7
|
import { t as createRunSummaryCollector } from "./run-summary-BU_NgwUT.js";
|
|
8
8
|
//#region src/headless.ts
|
|
9
9
|
function exitCodeForHeadlessResult(result) {
|