zidane 7.1.3 → 7.1.4
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-B5UfEhMd.js → acp-DbYGzaVK.js} +2 -2
- package/dist/{acp-B5UfEhMd.js.map → acp-DbYGzaVK.js.map} +1 -1
- package/dist/acp-cli.js +3 -3
- package/dist/acp.d.ts +1 -1
- package/dist/acp.js +1 -1
- package/dist/{agent-_xxElOgH.js → agent-BlGt76qk.js} +4 -53
- package/dist/agent-BlGt76qk.js.map +1 -0
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +1 -1
- package/dist/{approvals-u2T19Dc-.js → approvals-CnFq-_Gu.js} +4 -4
- package/dist/{approvals-u2T19Dc-.js.map → approvals-CnFq-_Gu.js.map} +1 -1
- package/dist/{auth-HRKkOErn.js → auth-CNetxyJH.js} +242 -79
- package/dist/{auth-HRKkOErn.js.map → auth-CNetxyJH.js.map} +1 -1
- package/dist/chat/pure.d.ts +4 -4
- package/dist/chat/pure.js +3 -3
- package/dist/chat.d.ts +6 -6
- package/dist/chat.js +6 -6
- package/dist/contexts/daytona.d.ts +1 -1
- package/dist/contexts/e2b.d.ts +1 -1
- package/dist/{context-segments-BrEsRhA0.js → cred-keys-BbbBr4q3.js} +104 -2
- package/dist/cred-keys-BbbBr4q3.js.map +1 -0
- package/dist/daemon-cli.js +1 -1
- package/dist/eval.d.ts +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 +1 -1
- package/dist/{index-DZhrTn-v.d.ts → index-BIJKozYj.d.ts} +22 -9
- package/dist/index-BIJKozYj.d.ts.map +1 -0
- package/dist/{index-D3TTaaQ5.d.ts → index-DtF2yPaI.d.ts} +6 -193
- package/dist/index-DtF2yPaI.d.ts.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{ipc-ChQeueur.js → ipc-DZffY7UT.js} +2 -2
- package/dist/{ipc-ChQeueur.js.map → ipc-DZffY7UT.js.map} +1 -1
- package/dist/ipc.d.ts +5 -5
- package/dist/ipc.js +3 -3
- package/dist/mcp.d.ts +1 -1
- package/dist/output/stream-json.d.ts +1 -1
- package/dist/output/terminal.d.ts +1 -1
- package/dist/plugins.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/arcee.d.ts +1 -1
- package/dist/providers/baseten.d.ts +1 -1
- package/dist/providers/cerebras.d.ts +1 -1
- package/dist/providers/local.d.ts +1 -1
- package/dist/providers/openai-compat.d.ts +1 -1
- package/dist/providers/openai.d.ts +1 -1
- package/dist/providers/openrouter.d.ts +1 -1
- package/dist/providers/xai.d.ts +1 -1
- package/dist/providers.d.ts +1 -1
- package/dist/restate.d.ts +1 -1
- package/dist/restate.js +1 -1
- package/dist/{server-CTUpOdh3.js → server-Cdrcncg-.js} +6 -6
- package/dist/{server-CTUpOdh3.js.map → server-Cdrcncg-.js.map} +1 -1
- package/dist/session/sqlite.d.ts +1 -1
- package/dist/session.d.ts +1 -1
- package/dist/skills.d.ts +1 -1
- package/dist/{tool-formatters-C5s88MUd.d.ts → tool-formatters-Baj_BroN.d.ts} +83 -3
- package/dist/tool-formatters-Baj_BroN.d.ts.map +1 -0
- 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-DxofXw_y.d.ts → transcript-anchors-DfnBVZX0.d.ts} +201 -3
- package/dist/transcript-anchors-DfnBVZX0.d.ts.map +1 -0
- package/dist/tui.d.ts +20 -6
- package/dist/tui.d.ts.map +1 -1
- package/dist/tui.js +350 -38
- package/dist/tui.js.map +1 -1
- package/dist/{turn-operations-6JDu2ewy.js → turn-operations-BHeYIvSY.js} +2 -2
- package/dist/{turn-operations-6JDu2ewy.js.map → turn-operations-BHeYIvSY.js.map} +1 -1
- package/dist/{turn-operations-BaQnxzhr.d.ts → turn-operations-Cl3RNQ2O.d.ts} +3 -3
- package/dist/{turn-operations-BaQnxzhr.d.ts.map → turn-operations-Cl3RNQ2O.d.ts.map} +1 -1
- package/dist/types.d.ts +1 -1
- package/docs/CHAT.md +10 -0
- package/docs/TUI.md +1 -1
- package/package.json +1 -1
- package/dist/agent-_xxElOgH.js.map +0 -1
- package/dist/context-segments-BrEsRhA0.js.map +0 -1
- package/dist/index-D3TTaaQ5.d.ts.map +0 -1
- package/dist/index-DZhrTn-v.d.ts.map +0 -1
- package/dist/tool-formatters-C5s88MUd.d.ts.map +0 -1
- package/dist/transcript-anchors-DxofXw_y.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cred-keys-BbbBr4q3.js","names":[],"sources":["../src/tools/edit-utils.ts","../src/chat/context-breakdown.ts","../src/chat/context-segments.ts","../src/chat/cred-keys.ts"],"sourcesContent":["/**\n * Internal helpers shared between the `edit` and `multi_edit` tools.\n *\n * Not part of the public API — intentionally not re-exported from `tools/index.ts`\n * or the package barrel.\n */\n\n/**\n * Count exact (non-overlapping) occurrences of `needle` in `haystack`.\n * Returns 0 for an empty needle — both edit tools reject empty `old_string`\n * up front, so this branch is defensive rather than semantic.\n */\nexport function countExactMatches(haystack: string, needle: string): number {\n if (needle.length === 0)\n return 0\n let count = 0\n let idx = 0\n while (true) {\n const next = haystack.indexOf(needle, idx)\n if (next === -1)\n break\n count++\n idx = next + needle.length\n }\n return count\n}\n\n// ---------------------------------------------------------------------------\n// Curly-quote normalization + SDK-sanitization fallbacks\n// ---------------------------------------------------------------------------\n//\n// Models can't reliably emit Unicode curly quotes, and the Anthropic API\n// silently sanitizes a handful of XML-like tags before they hit the model\n// (`<name>` → `<n>`, etc.). When `old_string` doesn't match exactly, we retry\n// against the same content with both transforms applied so an \"old_string not\n// found\" failure that's only typographical resolves on the second pass.\n//\n// Mirrors the Claude Code Edit tool's recovery strategy. Verbatim port of the\n// quote constants and the desanitization table; the resolve loop below is\n// reorganized to share state between exact / quote-normalized / desanitized.\n\nexport const LEFT_SINGLE_CURLY_QUOTE = '\\u2018'\nexport const RIGHT_SINGLE_CURLY_QUOTE = '\\u2019'\nexport const LEFT_DOUBLE_CURLY_QUOTE = '\\u201C'\nexport const RIGHT_DOUBLE_CURLY_QUOTE = '\\u201D'\n\n/** Map curly quotes (any of the four) to their straight ASCII equivalents. */\nexport function normalizeQuotes(str: string): string {\n return str\n .replaceAll(LEFT_SINGLE_CURLY_QUOTE, '\\'')\n .replaceAll(RIGHT_SINGLE_CURLY_QUOTE, '\\'')\n .replaceAll(LEFT_DOUBLE_CURLY_QUOTE, '\"')\n .replaceAll(RIGHT_DOUBLE_CURLY_QUOTE, '\"')\n}\n\n/**\n * Substitutions Anthropic's API applies to assistant output before the model\n * sees it. The model emits the sanitized form; the file on disk contains the\n * unsanitized form. We undo the substitutions on `old_string` so the search\n * lands on the actual file contents.\n *\n * Verbatim from `claude-code/tools/FileEditTool/utils.ts`.\n */\nconst DESANITIZATIONS: ReadonlyArray<readonly [string, string]> = [\n ['<fnr>', '<function_results>'],\n ['<n>', '<name>'],\n ['</n>', '</name>'],\n ['<o>', '<output>'],\n ['</o>', '</output>'],\n ['<e>', '<error>'],\n ['</e>', '</error>'],\n ['<s>', '<system>'],\n ['</s>', '</system>'],\n ['<r>', '<result>'],\n ['</r>', '</result>'],\n ['< META_START >', '<META_START>'],\n ['< META_END >', '<META_END>'],\n ['< EOT >', '<EOT>'],\n ['< META >', '<META>'],\n ['< SOS >', '<SOS>'],\n ['\\n\\nH:', '\\n\\nHuman:'],\n ['\\n\\nA:', '\\n\\nAssistant:'],\n]\n\n/**\n * Apply the SDK desanitization table to a string. Exported so the edit tools\n * can apply it to `new_string` whenever `old_string` matched via a\n * desanitize-class fallback — keeps the file's unsanitized form on disk\n * instead of writing the model's abbreviated form back.\n */\nexport function desanitize(s: string): string {\n let out = s\n for (const [from, to] of DESANITIZATIONS)\n out = out.replaceAll(from, to)\n return out\n}\n\n/**\n * Strip line-number prefixes from each line of a needle, used as a recovery\n * fallback when the model pastes a `read_file` chunk verbatim into\n * `old_string` — the on-disk file doesn't carry the metadata prefix.\n *\n * Accepts three separator characters so a model that learned on a different\n * agent stack still works here: `\\t` (Claude Code compact, our default),\n * `|`, and `→`. Pattern: optional leading whitespace, 1-9 digits, then one\n * of `\\t | →`. The 9-digit ceiling covers files up to ~1B lines without\n * overshooting into legitimate `\\d{N}<sep>` content like Markdown table\n * cells with long numeric IDs.\n */\nconst LINE_NUMBER_PREFIX_RE = /^[ \\t]*\\d{1,9}[\\t|\\u2192]/gm\nexport function stripLineNumberPrefixes(s: string): string {\n return s.replace(LINE_NUMBER_PREFIX_RE, '')\n}\n\n/**\n * Locate the actual substring in `haystack` that corresponds to `needle`,\n * recovering from typographical mismatch on six escalating fallbacks:\n *\n * 1. Exact substring match (the happy path — no transformation).\n * 2. Curly-quote normalization on both sides — when the model emits straight\n * quotes but the file has curly ones (or vice versa), the slice of the\n * file at the matched position carries the file's actual typography.\n * 3. Anthropic-sanitization undo on the needle — the model's `<n>` becomes\n * the file's `<name>`, etc.\n * 4. Combined: desanitize + quote normalization on the needle.\n * 5. Line-number-prefix strip — when the model pasted a numbered `read_file`\n * chunk verbatim into `old_string` and the file carries no such prefix.\n * 6. Combined: line-number strip + quote normalization — paste-back of a\n * numbered chunk against a file whose typography differs from the model's.\n *\n * Returns `{ actual, occurrences }` — `actual` is the string that exists in\n * the file (use this to do the actual replace; preserves the file's\n * typography). `occurrences` is the count of those matches in the file.\n *\n * Fallbacks 3-4 (desanitize-class) only fire when the transformed needle is\n * UNIQUE in the file — they rewrite the needle's meaning rather than its\n * typography, so an ambiguous match risks silently retargeting the wrong\n * text (see the inline comment at step 3).\n *\n * Returns `null` when no recovery worked.\n */\nexport interface ResolvedMatch {\n actual: string\n occurrences: number\n /** Recovery path — `'exact'` when no transformation was applied. */\n via: 'exact' | 'quotes' | 'desanitize' | 'quotes+desanitize' | 'line-numbers' | 'quotes+line-numbers'\n}\n\n/**\n * Search `target` in `normFile` and slice the matching span out of the\n * original `haystack`, counting all non-overlapping occurrences. `normFile`\n * is the haystack with whatever transform (quotes / desanitize / combined)\n * was applied to make the indices align — slicing the original haystack\n * preserves the file's actual typography so `replace_all` writes back the\n * file's form, not the model's.\n *\n * Pre-condition: `normFile.length === haystack.length` (every transform\n * we use is one-to-one). Returns null on miss.\n */\nfunction locateAndCount(\n haystack: string,\n normFile: string,\n target: string,\n via: ResolvedMatch['via'],\n): ResolvedMatch | null {\n const idx = normFile.indexOf(target)\n if (idx === -1)\n return null\n const actual = haystack.slice(idx, idx + target.length)\n let occ = 0\n let cursor = 0\n while (true) {\n const next = normFile.indexOf(target, cursor)\n if (next === -1)\n break\n occ++\n cursor = next + target.length\n }\n return { actual, occurrences: occ, via }\n}\n\nexport function resolveOldString(haystack: string, needle: string): ResolvedMatch | null {\n // 1. Exact match — happy path.\n const exact = countExactMatches(haystack, needle)\n if (exact > 0)\n return { actual: needle, occurrences: exact, via: 'exact' }\n\n // 2. Curly-quote normalization. Either side can carry curly quotes:\n // model emitted straight + file has curly, OR model emitted curly +\n // file has straight. Normalize both and look there. Slice the original\n // haystack to recover the actual file-side typography.\n const normNeedle = normalizeQuotes(needle)\n const normFile = normalizeQuotes(haystack)\n if (normNeedle !== needle || normFile !== haystack) {\n const m = locateAndCount(haystack, normFile, normNeedle, 'quotes')\n if (m)\n return m\n }\n\n // 3. Desanitize the needle — model-side substitution undo (`<n>` → `<name>`,\n // etc.) The file always has the unsanitized form; only the model emits\n // the abbreviated version.\n //\n // Desanitize-class fallbacks additionally require a UNIQUE transformed\n // match. Unlike the quote / line-number transforms (typography-only /\n // verbatim paste-back), this one rewrites the needle's meaning — a model\n // that genuinely meant the literal `<n>` against a file full of `<name>`\n // would otherwise silently retarget every occurrence under `replace_all`.\n // A unique hit bounds the blast radius to one visible replacement.\n const desan = desanitize(needle)\n if (desan !== needle) {\n const desanCount = countExactMatches(haystack, desan)\n if (desanCount === 1)\n return { actual: desan, occurrences: desanCount, via: 'desanitize' }\n }\n\n // 4. Combined: desanitize + quote normalization. Hit when the model\n // emitted both sanitized tokens and straight quotes, but the file has\n // the unsanitized form with curly quotes. Same uniqueness requirement\n // as #3.\n const combo = desanitize(normNeedle)\n if (combo !== needle) {\n const m = locateAndCount(haystack, normFile, combo, 'quotes+desanitize')\n if (m && m.occurrences === 1)\n return m\n }\n\n // 5. Line-number-prefix strip. When `read_file` returns line-numbered\n // output and the model pasted the chunk verbatim into `old_string`,\n // the on-disk file doesn't carry those prefixes. Strip them and\n // retry; the file-side `actual` is the prefix-free needle so the\n // replacement lands on real bytes.\n //\n // Guard against a needle that strips down to whitespace-only (e.g.\n // `1\\t\\n2\\t\\n3\\t` → `\\n\\n`). Searching for `\\n\\n` would match arbitrary\n // blank-line patterns anywhere in the file — a high false-positive risk.\n // Require the stripped needle to carry at least one non-whitespace\n // character before we trust the result.\n const stripped = stripLineNumberPrefixes(needle)\n if (stripped !== needle && stripped.trim().length > 0) {\n const count = countExactMatches(haystack, stripped)\n if (count > 0)\n return { actual: stripped, occurrences: count, via: 'line-numbers' }\n\n // 6. Combined: line-number strip + curly-quote normalization. The\n // typography mismatch may live in the file, the needle, or both.\n const strippedNorm = normalizeQuotes(stripped)\n if (strippedNorm !== stripped || normFile !== haystack) {\n const m = locateAndCount(haystack, normFile, strippedNorm, 'quotes+line-numbers')\n if (m)\n return m\n }\n }\n\n return null\n}\n\n/**\n * Short human-readable label for a recovery path, used by `edit` /\n * `multi_edit` to flag non-exact matches in their result messages — when a\n * fallback mistargets, the model (and the user reading the transcript) can\n * see WHICH transform fired instead of silently trusting the edit.\n */\nexport function describeVia(via: ResolvedMatch['via']): string {\n switch (via) {\n case 'exact': return 'exact match'\n case 'quotes': return 'curly-quote normalization'\n case 'desanitize': return 'sanitization recovery (e.g. <n> → <name>)'\n case 'quotes+desanitize': return 'sanitization recovery + curly-quote normalization'\n case 'line-numbers': return 'line-number-prefix stripping'\n case 'quotes+line-numbers': return 'line-number-prefix stripping + curly-quote normalization'\n }\n}\n\n/**\n * Apply the same recovery transforms used to find `old_string` to\n * `new_string`, so the file gets back its native form: desanitize when\n * the model emitted `<n>` for `<name>`, strip line-number prefixes when\n * the match required them, then re-curlify when the match required\n * quote normalization. Shared between `edit` and `multi_edit`.\n */\nexport function styleReplacementForVia(\n replacement: string,\n via: ResolvedMatch['via'],\n actual: string,\n): string {\n let out = replacement\n if (via === 'desanitize' || via === 'quotes+desanitize')\n out = desanitize(out)\n if (via === 'line-numbers' || via === 'quotes+line-numbers')\n out = stripLineNumberPrefixes(out)\n if (via === 'quotes' || via === 'quotes+desanitize' || via === 'quotes+line-numbers')\n out = preserveQuoteStyle(actual, out)\n return out\n}\n\n/**\n * When `old_string` matched via curly-quote normalization, re-style\n * `new_string` so the file's typography is preserved across the edit.\n * Detects whether the matched file region had curly singles, doubles, or\n * both, and applies the matching curlification to the replacement.\n *\n * Apostrophes in contractions (`don't`, `it's`) get the right-single curly\n * quote regardless of opening context — that's the canonical typographer's\n * convention for English. Other quotes use a simple\n * preceded-by-whitespace-or-opening-punctuation heuristic.\n */\nexport function preserveQuoteStyle(actual: string, replacement: string): string {\n const hasDouble = actual.includes(LEFT_DOUBLE_CURLY_QUOTE) || actual.includes(RIGHT_DOUBLE_CURLY_QUOTE)\n const hasSingle = actual.includes(LEFT_SINGLE_CURLY_QUOTE) || actual.includes(RIGHT_SINGLE_CURLY_QUOTE)\n if (!hasDouble && !hasSingle)\n return replacement\n\n let out = replacement\n if (hasDouble)\n out = applyCurly(out, '\"', LEFT_DOUBLE_CURLY_QUOTE, RIGHT_DOUBLE_CURLY_QUOTE, false)\n if (hasSingle)\n out = applyCurly(out, '\\'', LEFT_SINGLE_CURLY_QUOTE, RIGHT_SINGLE_CURLY_QUOTE, true)\n return out\n}\n\nfunction applyCurly(\n s: string,\n straight: string,\n left: string,\n right: string,\n contractionAware: boolean,\n): string {\n const chars = [...s]\n const result: string[] = []\n for (let i = 0; i < chars.length; i++) {\n if (chars[i] !== straight) {\n result.push(chars[i])\n continue\n }\n if (contractionAware) {\n const prev = i > 0 ? chars[i - 1] : ''\n const next = i < chars.length - 1 ? chars[i + 1] : ''\n // Letter-quote-letter is a contraction, not a quote — always right.\n if (/\\p{L}/u.test(prev) && /\\p{L}/u.test(next)) {\n result.push(right)\n continue\n }\n }\n result.push(isOpeningContext(chars, i) ? left : right)\n }\n return result.join('')\n}\n\nfunction isOpeningContext(chars: string[], i: number): boolean {\n if (i === 0)\n return true\n const prev = chars[i - 1]\n return prev === ' ' || prev === '\\t' || prev === '\\n' || prev === '\\r'\n || prev === '(' || prev === '[' || prev === '{'\n || prev === '\\u2014' || prev === '\\u2013' // em / en dash\n}\n","/**\n * Context-usage breakdown — pure transforms.\n *\n * Turns a {@link ContextSnapshot} (the raw pieces the agent assembled for a\n * run: system prompt, wire tools, deferred tools, MCP tools/instructions,\n * skills catalog, ...) plus the real last-turn token total into a categorized\n * {@link ContextBreakdown} the TUI panel / GUI popover render.\n *\n * No React, no node — a browser-context renderer imports these via\n * `zidane/chat/pure`. The snapshot is captured main-side (TUI direct, GUI in\n * `main/chat`) because building it reads provider/agent state; only the pure\n * shaping lives here.\n *\n * Accuracy: per-category counts are estimates when no provider `countTokens`\n * is available — the heuristic ({@link estimateTokens}, ~4 bytes/token) sizes\n * each static segment and the bar is reconciled so it always sums to the real\n * last-turn total (`conversation = realTotal - sum(static)`). When a provider\n * exposes exact counts (Anthropic, OpenAI), the caller passes them in via\n * {@link ContextSnapshot.exact} and the corresponding categories drop their\n * `estimated` flag. Exact buckets (free space, autocompact buffer) are never\n * estimated.\n */\n\nimport type { SessionTurn } from '../types'\nimport { estimateTokens } from '../compact/utils'\n\n/**\n * Stable identifiers for each breakdown category. Drives swatch color +\n * ordering in both UIs. `*Deferred` buckets are tools/MCP that exist but are\n * NOT currently on the wire (lazy disclosure); `autocompactBuffer` is the\n * reserved output headroom; `freeSpace` is the remaining window.\n */\nexport type ContextCategoryId\n = | 'systemPrompt'\n | 'rules'\n | 'tools'\n | 'mcpTools'\n | 'mcpInstructions'\n | 'skills'\n | 'subagentDefs'\n | 'conversation'\n | 'mcpToolsDeferred'\n | 'toolsDeferred'\n | 'autocompactBuffer'\n | 'freeSpace'\n\n/**\n * Exact last-turn token usage split (provider-reported — always exact). Drives\n * the cache breakdown shown below the categories. `cacheRead + cacheCreation +\n * input` equals the live context total (`used`).\n */\nexport interface ContextUsageSplit {\n /** Fresh, uncached input tokens this turn. */\n input: number\n /** Tokens served from the prompt cache (the cached prefix). */\n cacheRead: number\n /** Tokens written to the cache this turn. */\n cacheCreation: number\n /** Assistant output tokens (not part of the input window; informational). */\n output: number\n}\n\n/** One display row contributed by an extension to the context panel. */\nexport interface ContextExtensionRow {\n label: string\n value: string\n}\n\n/** Extension-owned context panel section. Core treats rows as opaque display data. */\nexport interface ContextExtensionSection {\n id: string\n label: string\n /** Optional section-title foreground color. UIs fall back to their theme accent. */\n accentColor?: string\n rows: readonly ContextExtensionRow[]\n}\n\n/** Data exposed to extension context-breakdown contributors. */\nexport interface ContextBreakdownContributionContext {\n turns: readonly SessionTurn[]\n}\n\n/** Extension hook for adding opaque rows to the context panel. */\nexport type ContextBreakdownContributor\n = (ctx: ContextBreakdownContributionContext) =>\n | ContextExtensionSection\n | readonly ContextExtensionSection[]\n | null\n | undefined\n | Promise<ContextExtensionSection | readonly ContextExtensionSection[] | null | undefined>\n\n/** One expandable child row under a category (e.g. a single MCP tool / memory file). */\nexport interface ContextItem {\n /** Stable-ish key for rendering (tool name, file path). */\n id: string\n /** Display label. */\n label: string\n /** Token count for this item. */\n tokens: number\n /** True when `tokens` came from the heuristic rather than an exact count. */\n estimated: boolean\n /** Tool description (tool items only) — what a UI shows on hover. */\n description?: string\n /** Owning group when the category flattens several (MCP server name). */\n group?: string\n}\n\n/** One category row in the breakdown. */\nexport interface ContextCategory {\n id: ContextCategoryId\n /** Display label (e.g. \"Tool definitions\"). */\n label: string\n /** Token count for the category. */\n tokens: number\n /** True when `tokens` came from the heuristic rather than an exact count. */\n estimated: boolean\n /**\n * True for buckets that are NOT counted against the live window total\n * (deferred tools, free space, autocompact buffer) — the UI renders these\n * dimmed / below a divider, mirroring Claude Code's layout.\n */\n deferred?: boolean\n /** Optional expandable child rows (per MCP tool, per memory file, ...). */\n items?: ContextItem[]\n}\n\n/** The shaped, render-ready breakdown. */\nexport interface ContextBreakdown {\n /** Model id the snapshot was built for. */\n modelId: string\n /**\n * Real last-turn context size (provider-reported `input + cacheRead +\n * cacheCreation`) — the SAME number the footer/orb shows. The non-deferred\n * categories always sum to this.\n */\n used: number\n /** Effective window (raw - output reserve), the bar's denominator. */\n effectiveWindow: number\n /** `used / effectiveWindow`, clamped to [0, 1]. */\n fraction: number\n /** Live categories (sum to `used`) followed by deferred + free-space buckets. */\n categories: ContextCategory[]\n /** True when ANY live category is estimated (drives the panel's footnote). */\n hasEstimates: boolean\n /**\n * Exact last-turn usage split (cache read / write / fresh input / output),\n * when the host supplied it. Always exact — rendered as an informational\n * section below the categories. Absent when no usage is available yet.\n */\n usage?: ContextUsageSplit\n /** Extension-owned context panel sections. */\n extensionSections?: readonly ContextExtensionSection[]\n /**\n * Names of currently-active skills. Informational — an activated skill's body\n * lands in the conversation (tool-results), so its tokens are already counted\n * under Conversation; this just surfaces \"which skills are loaded\". Empty/absent\n * when none are active.\n */\n activeSkills?: string[]\n}\n\n/** Host-supplied options for `agent.getContextBreakdown`. */\nexport interface ContextBreakdownOptions {\n /**\n * Effective context window (`rawWindow - outputReserve`) for the active\n * model, resolved by the host via the chat model registry. Drives free-space\n * + fraction. When omitted, defaults to `used` (no headroom shown).\n */\n effectiveWindow?: number\n /**\n * Active model id — used for the exact `countTokens` call + the header label.\n * Only consulted on the PRE-RUN path (no snapshot yet); once a run has fired,\n * the snapshot's own model wins. When omitted, the provider default is used.\n */\n model?: string\n /** Tokens reserved for output (autocompact buffer). Defaults to 0. */\n autocompactBuffer?: number\n /**\n * Auto-compact threshold as a fraction of the window (0–1), when enabled.\n * When set, the \"Autocompact buffer\" bucket represents the ENTIRE tail from\n * the threshold to the end of the window (`(1 − threshold) × window`) rather\n * than just the reserved-output tokens — so the bar/row show exactly where\n * compaction fires. When omitted, `autocompactBuffer` is used as-is.\n */\n compactThreshold?: number\n /** Abort signal forwarded to the provider's `countTokens`. */\n signal?: AbortSignal\n}\n\n/** Tools grouped by MCP server, for the expandable per-server rows. */\nexport interface ContextMcpGroup {\n server: string\n /** Wire tool specs for this server (their JSON size is measured). */\n tools: { name: string, json: string, description?: string }[]\n}\n\n/**\n * Exact per-segment counts from a provider's `countTokens`, when available.\n * Each field is the count of the cumulative payload up to and including that\n * segment, so categories are derived by differencing (see\n * {@link buildContextBreakdown}). Any subset may be present; missing fields\n * fall back to the heuristic for that category.\n */\nexport interface ContextExactCounts {\n /** Tokens for system prompt alone. */\n system?: number\n /** Tokens for system + tools (so tools = systemAndTools - system). */\n systemAndTools?: number\n /** Tokens for the full payload (system + tools + messages) = the real total. */\n full?: number\n}\n\n/**\n * Raw inputs captured at agent prompt-assembly time. Everything here is what\n * actually went on (or was withheld from) the wire for the last run.\n */\nexport interface ContextSnapshot {\n modelId: string\n /** Full rendered system prompt (marker-stripped, as sent). */\n system: string\n /**\n * Host-composed base system BEFORE the agent appended skills / searchable /\n * MCP-instructions catalogs. Includes the rules block. The \"System prompt\"\n * (base doctrine) bucket = base − rules − env-noise. Defaults to `system`\n * when not provided (back-compat).\n */\n baseSystem?: string\n /** Rendered AGENTS.md/CLAUDE.md rules block (a substring of `baseSystem`). */\n rulesBlock?: string\n /** Source files behind the rules block, for per-file rows. */\n rulesFiles?: { path: string, source: string }[]\n /** Wire tool specs currently disclosed to the model, as JSON strings. */\n toolsJson: string[]\n /**\n * Per-tool detail for `toolsJson`, same order, when the host has it —\n * lets the breakdown list native tools like it lists MCP tools. Optional so\n * SDK callers assembling a snapshot by hand are unaffected.\n */\n toolItems?: { name: string, json: string, description?: string }[]\n /** Lazy tool entries NOT currently disclosed (deferred), as JSON strings. */\n deferredToolsJson: string[]\n /** MCP tools grouped by server (disclosed ones). */\n mcpGroups: ContextMcpGroup[]\n /** Deferred (undisclosed) MCP tools grouped by server. */\n deferredMcpGroups: ContextMcpGroup[]\n /** Rendered MCP instructions block, if any. */\n mcpInstructions?: string\n /** Rendered skills catalog text, if any. */\n skillsCatalog?: string\n /** Searchable / subagent (spawn) tool definitions text, if any. */\n subagentDefs?: string\n /** Memory / rules files in context. */\n /** Real last-turn total (input + cacheRead + cacheCreation). */\n used: number\n /** Effective window (raw - output reserve). */\n effectiveWindow: number\n /** Tokens reserved for output (autocompact buffer). */\n autocompactBuffer: number\n /** Exact per-segment counts from the provider, when available. */\n exact?: ContextExactCounts\n /** Exact last-turn usage split, when available (passed straight through). */\n usage?: ContextUsageSplit\n /** Extension-owned context panel sections. */\n extensionSections?: readonly ContextExtensionSection[]\n /** Names of currently-active skills (passed straight through). */\n activeSkills?: string[]\n}\n\nconst LABELS: Record<ContextCategoryId, string> = {\n systemPrompt: 'System prompt',\n rules: 'Rules (AGENTS.md)',\n tools: 'Tool definitions',\n mcpTools: 'MCP tools',\n mcpInstructions: 'MCP instructions',\n skills: 'Skills',\n subagentDefs: 'Subagent definitions',\n conversation: 'Conversation',\n mcpToolsDeferred: 'MCP tools (deferred)',\n toolsDeferred: 'System tools (deferred)',\n autocompactBuffer: 'Autocompact buffer',\n freeSpace: 'Free space',\n}\n\n/** Sum the heuristic token sizes of a list of strings. */\nfunction sumEstimate(parts: readonly string[]): number {\n let total = 0\n for (const p of parts)\n total += estimateTokens(p)\n return total\n}\n\nfunction mcpGroupTokens(group: ContextMcpGroup): { total: number, items: ContextItem[] } {\n const items: ContextItem[] = group.tools.map(t => ({\n id: `${group.server}:${t.name}`,\n label: t.name,\n tokens: estimateTokens(t.json),\n estimated: true,\n ...(t.description ? { description: t.description } : {}),\n group: group.server,\n }))\n let total = 0\n for (const it of items)\n total += it.tokens\n return { total, items }\n}\n\n/**\n * Shape a {@link ContextSnapshot} into a render-ready {@link ContextBreakdown}.\n *\n * Live categories (system prompt, tools, MCP tools/instructions, skills,\n * memory, subagent defs, conversation) sum to `snapshot.used` — `conversation`\n * absorbs the remainder so the bar matches the provider-reported total exactly.\n * Deferred + autocompact + free-space buckets follow.\n *\n * When `snapshot.exact` carries provider counts, the matching categories use\n * them (system, tools) and drop their `estimated` flag; everything else stays\n * on the heuristic.\n */\nexport function buildContextBreakdown(snapshot: ContextSnapshot): ContextBreakdown {\n const exact = snapshot.exact\n const systemExact = typeof exact?.system === 'number'\n\n // --- System-embedded sub-sections (heuristic) ----------------------------\n // The exact `count_tokens` system number covers the WHOLE system text. The\n // appended catalogs (rules / skills / MCP instructions / subagent defs) all\n // live inside it, so we size each heuristically and let the \"System prompt\"\n // (base doctrine) bucket absorb the remainder — keeping the system group's\n // sum exact while still attributing each section.\n const rulesTokens = snapshot.rulesBlock ? estimateTokens(snapshot.rulesBlock) : 0\n const rulesItems: ContextItem[] = (snapshot.rulesFiles ?? []).map(f => ({\n id: f.path,\n label: f.path,\n // Per-file size isn't separable from the rendered block; show the path only\n // (tokens 0, not estimated — there's nothing to estimate) so the row lists\n // sources without implying a per-file count or a `~` marker.\n tokens: 0,\n estimated: false,\n }))\n const skillsTokens = snapshot.skillsCatalog ? estimateTokens(snapshot.skillsCatalog) : 0\n const mcpInstructionsTokens = snapshot.mcpInstructions ? estimateTokens(snapshot.mcpInstructions) : 0\n const subagentTokens = snapshot.subagentDefs ? estimateTokens(snapshot.subagentDefs) : 0\n const embeddedSubsections = rulesTokens + skillsTokens + mcpInstructionsTokens + subagentTokens\n\n // System TOTAL (whole system text) — exact when available.\n const systemTotal = systemExact ? exact!.system! : estimateTokens(snapshot.system)\n // Base doctrine = system total minus the attributed sub-sections.\n const baseSystemTokens = Math.max(0, systemTotal - embeddedSubsections)\n\n // --- Native tool definitions (non-MCP, disclosed) ------------------------\n // When exact `systemAndTools` is available it covers BOTH native + MCP tools,\n // so we split that combined number proportionally by heuristic weight rather\n // than claiming exactness per sub-bucket.\n const nativeToolsEst = sumEstimate(snapshot.toolsJson)\n const mcpDisclosed = snapshot.mcpGroups.map(mcpGroupTokens)\n const mcpToolsEst = mcpDisclosed.reduce((a, g) => a + g.total, 0)\n\n let nativeToolsTokens = nativeToolsEst\n let mcpToolsTokens = mcpToolsEst\n let toolsEstimated = true\n if (systemExact && typeof exact?.systemAndTools === 'number') {\n const exactToolsTotal = Math.max(0, exact.systemAndTools - exact.system!)\n const estTotal = nativeToolsEst + mcpToolsEst\n if (estTotal > 0) {\n nativeToolsTokens = Math.round(exactToolsTotal * (nativeToolsEst / estTotal))\n mcpToolsTokens = exactToolsTotal - nativeToolsTokens\n }\n else {\n nativeToolsTokens = exactToolsTotal\n mcpToolsTokens = 0\n }\n toolsEstimated = false\n }\n\n // --- Live categories -----------------------------------------------------\n // Detailed split. The system-embedded sub-sections (rules / skills / MCP\n // instructions / subagent defs) are heuristic; the \"System prompt\" base\n // bucket carries the exact remainder so the whole system group still sums to\n // the exact system count. Tools/MCP-tools/conversation are split as before.\n const live: ContextCategory[] = []\n const push = (id: ContextCategoryId, tokens: number, estimated: boolean, items?: ContextItem[]) => {\n if (tokens <= 0 && !items?.length)\n return\n live.push({ id, label: LABELS[id], tokens: Math.max(0, tokens), estimated, ...(items?.length ? { items } : {}) })\n }\n\n // System group: base doctrine (exact remainder) + attributed sub-sections.\n push('systemPrompt', baseSystemTokens, !systemExact)\n push('rules', rulesTokens, true, rulesItems)\n push('skills', skillsTokens, true)\n push('mcpInstructions', mcpInstructionsTokens, true)\n push('subagentDefs', subagentTokens, true)\n // Tools.\n push('tools', nativeToolsTokens, toolsEstimated, snapshot.toolItems?.map(t => ({\n id: t.name,\n label: t.name,\n tokens: estimateTokens(t.json),\n estimated: true,\n ...(t.description ? { description: t.description } : {}),\n })))\n push('mcpTools', mcpToolsTokens, toolsEstimated, mcpDisclosed.flatMap(g => g.items))\n\n // --- Conversation = remainder (keeps the bar summing to `used`) ----------\n const accountedStatic = live.reduce((a, c) => a + c.tokens, 0)\n const conversationTokens = Math.max(0, snapshot.used - accountedStatic)\n // Exact when both system AND tools were exactly counted — then the remainder\n // (used − exactSystem − exactTools) is itself exact, since `used` is the\n // provider-reported total.\n const conversationEstimated = !(systemExact && !toolsEstimated)\n push('conversation', conversationTokens, conversationEstimated)\n\n // --- Deferred buckets (not counted against `used`) -----------------------\n const deferred: ContextCategory[] = []\n const deferredNativeTools = sumEstimate(snapshot.deferredToolsJson)\n if (deferredNativeTools > 0) {\n deferred.push({ id: 'toolsDeferred', label: LABELS.toolsDeferred, tokens: deferredNativeTools, estimated: true, deferred: true })\n }\n const deferredMcp = snapshot.deferredMcpGroups.map(mcpGroupTokens)\n const deferredMcpTotal = deferredMcp.reduce((a, g) => a + g.total, 0)\n if (deferredMcpTotal > 0) {\n deferred.push({\n id: 'mcpToolsDeferred',\n label: LABELS.mcpToolsDeferred,\n tokens: deferredMcpTotal,\n estimated: true,\n deferred: true,\n items: deferredMcp.flatMap(g => g.items),\n })\n }\n\n // --- Autocompact buffer + free space (exact) -----------------------------\n if (snapshot.autocompactBuffer > 0) {\n deferred.push({ id: 'autocompactBuffer', label: LABELS.autocompactBuffer, tokens: snapshot.autocompactBuffer, estimated: false, deferred: true })\n }\n const free = Math.max(0, snapshot.effectiveWindow - snapshot.used)\n deferred.push({ id: 'freeSpace', label: LABELS.freeSpace, tokens: free, estimated: false, deferred: true })\n\n const categories = [...live, ...deferred]\n const hasEstimates = live.some(c => c.estimated && c.tokens > 0)\n const fraction = snapshot.effectiveWindow > 0\n ? Math.max(0, Math.min(1, snapshot.used / snapshot.effectiveWindow))\n : 0\n\n return {\n modelId: snapshot.modelId,\n used: snapshot.used,\n effectiveWindow: snapshot.effectiveWindow,\n fraction,\n categories,\n hasEstimates,\n ...(snapshot.usage ? { usage: snapshot.usage } : {}),\n ...(snapshot.extensionSections?.length ? { extensionSections: snapshot.extensionSections } : {}),\n ...(snapshot.activeSkills?.length ? { activeSkills: snapshot.activeSkills } : {}),\n }\n}\n","/**\n * Context segments — pure transforms.\n *\n * Sibling to `context-breakdown.ts`: where that module answers \"how many\n * tokens is each part of my context\", this one answers \"what IS each part,\n * and where did it come from\". It turns the same assembled-prompt pieces into\n * a flat list of {@link ContextSegment}s carrying the actual TEXT plus its\n * provenance, so a UI can list every chunk loaded by default in a session,\n * let the user read it, and open the file behind it when there is one.\n *\n * No React, no node — a browser-context renderer imports these via\n * `zidane/chat/pure`.\n *\n * Provenance is honest about what can and can't be opened:\n * - `'file'` — a real path on disk (AGENTS.md / CLAUDE.md / ruler md).\n * The only origin that carries `path`, hence the only one\n * a host can hand to `$EDITOR`.\n * - `'built-in'` — compiled into the binary (base doctrine, subagent defs).\n * - `'generated'` — assembled at prompt time from discovered state (the\n * skills catalog is rendered from the skill manifests).\n * - `'mcp'` — served by a remote MCP server at connect time.\n */\n\nimport { estimateTokens } from '../compact/utils'\n\n/** Where a segment's text came from. Only `'file'` segments carry a `path`. */\nexport type ContextSegmentOrigin = 'built-in' | 'file' | 'generated' | 'mcp'\n\n/** One chunk of text present in the session's default context. */\nexport interface ContextSegment {\n /** Stable key for rendering (`'system'`, `'rules:<path>'`, `'skills'`, ...). */\n id: string\n /** Display label (e.g. \"System prompt\", or the file's basename). */\n label: string\n origin: ContextSegmentOrigin\n /**\n * Short right-hand qualifier — the instruction scope for files, the server\n * list for MCP, a count for the skills catalog. Absent when there's nothing\n * useful to add beyond the origin badge.\n */\n detail?: string\n /** The text itself, as it sits in the prompt. Empty segments are dropped. */\n text: string\n /**\n * Absolute path of the file backing this segment. Present only for\n * `origin: 'file'` — a host uses it as the \"open in $EDITOR\" target.\n */\n path?: string\n /**\n * Heuristic token size (~4 bytes/token). Always an estimate: exact\n * per-segment counts aren't separable from the single system-prompt string\n * the provider counts, which is why {@link ContextSegment} carries no\n * `estimated` flag — every value here is one.\n */\n tokens: number\n}\n\n/**\n * A host-discovered instruction file. Structurally compatible with\n * `AgentsMdFile` from `./agents-md` (whose `source` field is the SCOPE, not\n * the text — `contents` is the text), so callers can pass those straight in.\n */\nexport interface ContextSegmentFile {\n path: string\n /** Instruction scope — `'project'` / `'user'`, surfaced as the row detail. */\n source?: string\n contents: string\n}\n\n/**\n * The assembled-prompt pieces {@link buildContextSegments} shapes. Mirrors the\n * subset of the agent's `ContextAssembly` that carries text, plus host-side\n * instruction files (which the assembly only knows as paths).\n */\nexport interface ContextSegmentsInput {\n /**\n * Host-composed base system BEFORE the agent appended its catalogs. The\n * rules block is a substring of this; the \"System prompt\" segment is the\n * remainder. Falls back to `system` when absent, which over-attributes the\n * appended catalogs into the base row rather than losing them.\n */\n baseSystem?: string\n /** Full rendered system prompt as sent. Used as the `baseSystem` fallback. */\n system?: string\n /**\n * Rendered instruction block (a substring of `baseSystem`). Subtracted from\n * the base so its text isn't reported twice — once as doctrine and once as\n * per-file rows.\n */\n rulesBlock?: string\n /** The files behind `rulesBlock`, each with its own text. */\n rulesFiles?: readonly ContextSegmentFile[]\n /**\n * Absolute path of a `SYSTEM.md` override backing the base prompt. When set,\n * the \"System prompt\" segment reports `origin: 'file'` and becomes openable\n * — the doctrine is the user's file, not compiled-in text.\n */\n systemPath?: string\n /** Rendered skills catalog (the per-skill blurbs, not skill bodies). */\n skillsCatalog?: string\n /** Rendered MCP instructions block. */\n mcpInstructions?: string\n /** Searchable / subagent (spawn) tool catalog text. */\n subagentDefs?: string\n}\n\n/**\n * Remove the first occurrence of `part` from `whole`, collapsing the blank-line\n * run left AT THE JOIN.\n *\n * Used to carve the rules block out of the base system so the \"System prompt\"\n * segment reports only doctrine + env. Substring-based because that's the\n * contract the assembly documents (`rulesBlock` IS a substring of\n * `baseSystem`); a miss leaves `whole` untouched, which degrades to\n * over-reporting the base row rather than dropping text on the floor.\n *\n * The collapse is deliberately scoped to the seam. An earlier version ran\n * `/\\n{3,}/g` over the whole result, which rewrote blank-line runs ANYWHERE in\n * the doctrine — and this tab exists precisely so the user can read what is in\n * context, not a reflowed approximation of it. Interior bytes now survive\n * verbatim; only the newlines that met when `part` was excised are normalized,\n * plus a `trim()` so a segment can't open or close on blank lines.\n */\nfunction removeFirst(whole: string, part: string): string {\n if (!part)\n return whole\n const at = whole.indexOf(part)\n if (at < 0)\n return whole\n const before = whole.slice(0, at)\n const after = whole.slice(at + part.length)\n const trailing = /\\n*$/.exec(before)?.[0] ?? ''\n const leading = /^\\n*/.exec(after)?.[0] ?? ''\n // Two newlines (one blank line) is the separator the prompt builder uses\n // between sections, so that's what the seam becomes when either side had any.\n const seam = trailing.length + leading.length >= 2 ? '\\n\\n' : `${trailing}${leading}`\n const head = before.slice(0, before.length - trailing.length)\n return `${head}${seam}${after.slice(leading.length)}`.trim()\n}\n\n/**\n * Best-effort display name for an instruction file: its basename, with the\n * parent directory prefixed when the basename alone would be ambiguous\n * (`AGENTS.md` appears at up to four paths per scope). Path-separator handling\n * covers both POSIX and Windows so this stays node-free.\n */\nfunction fileLabel(path: string): string {\n const parts = path.split(/[/\\\\]/).filter(Boolean)\n const base = parts.at(-1) ?? path\n const parent = parts.at(-2)\n // A dotted parent (`.agents`, `.zidane`, `.claude`, `.ruler`) is the\n // meaningful discriminator between same-named instruction files.\n return parent?.startsWith('.') ? `${parent}/${base}` : base\n}\n\n/**\n * Shape assembled-prompt pieces into a flat, render-ready segment list.\n *\n * Order is prompt order — base doctrine, then instruction files (broadest\n * scope first, as `discoverAgentsMd` returns them), then the appended\n * catalogs. Empty / whitespace-only pieces are dropped so the list never\n * shows a zero-byte row.\n */\nexport function buildContextSegments(input: ContextSegmentsInput): ContextSegment[] {\n const segments: ContextSegment[] = []\n const push = (seg: Omit<ContextSegment, 'tokens'>) => {\n if (!seg.text.trim())\n return\n segments.push({ ...seg, tokens: estimateTokens(seg.text) })\n }\n\n // --- Base doctrine -------------------------------------------------------\n // `baseSystem` minus the rules block. The per-file rows below carry the\n // instruction text, so leaving the block in would double-report it.\n const base = input.baseSystem ?? input.system ?? ''\n const overridden = input.systemPath !== undefined\n push({\n id: 'system',\n label: 'System prompt',\n // An override makes this a real file on disk; without one it's compiled in.\n origin: overridden ? 'file' : 'built-in',\n detail: overridden ? 'SYSTEM.md override + environment' : 'doctrine + environment',\n text: input.rulesBlock ? removeFirst(base, input.rulesBlock) : base,\n ...(input.systemPath !== undefined ? { path: input.systemPath } : {}),\n })\n\n // --- Instruction files ---------------------------------------------------\n // The only file-backed segments, and so the only openable ones.\n for (const file of input.rulesFiles ?? []) {\n push({\n id: `rules:${file.path}`,\n label: fileLabel(file.path),\n origin: 'file',\n ...(file.source ? { detail: file.source } : {}),\n text: file.contents,\n path: file.path,\n })\n }\n\n // --- Appended catalogs ---------------------------------------------------\n push({\n id: 'skills',\n label: 'Skills catalog',\n origin: 'generated',\n detail: 'name + description per skill (bodies load on activation)',\n text: input.skillsCatalog ?? '',\n })\n push({\n id: 'mcp-instructions',\n label: 'MCP instructions',\n origin: 'mcp',\n detail: 'served by the connected servers',\n text: input.mcpInstructions ?? '',\n })\n push({\n id: 'subagent-defs',\n label: 'Subagent definitions',\n origin: 'built-in',\n text: input.subagentDefs ?? '',\n })\n\n return segments\n}\n","/**\n * Credential-file key arithmetic, split from `./credentials` so the rules can\n * be enforced where credentials themselves must not be pulled in.\n *\n * `./credentials` reaches the provider registry (and through it the pi-ai\n * factories) for `credKeyOf`; the extension loader — an edge entrypoint that\n * validates descriptor keys at registration time — must stay clear of that\n * graph. This module is string arithmetic with no imports.\n */\n\n/**\n * Separator between a provider's canonical key and a slot qualifier. Every\n * non-canonical slot (`#alt`, `#account:N`) starts with it, so the character is\n * reserved in descriptor credential keys outright.\n */\nexport const CRED_KEY_SLOT_SEPARATOR = '#'\n\n/**\n * Reserved suffix marking a provider's SECOND credential slot.\n *\n * Not usable as (or as the tail of) a descriptor's credential key: `foo#alt`\n * holds `foo`'s alternate credential, so a provider claiming that name would\n * share storage with it.\n */\nexport const ALTERNATE_CRED_KEY_SUFFIX = '#alt'\n\n/**\n * Reserved infix marking one of a provider's ADDITIONAL OAuth accounts:\n * `foo#account:1`, `foo#account:2`, …\n */\nexport const ACCOUNT_CRED_KEY_INFIX = '#account:'\n\n/**\n * File key holding a provider's second credential, when it has one of each kind.\n *\n * The canonical key always holds the credential the user prefers; this sibling\n * holds the other. That one invariant is what makes preference selection free:\n * every existing reader (`applyApiKeyEnv`, the harness provider factories)\n * already resolves the canonical key, so \"switch priority\" is just moving two\n * objects between two keys — no precedence flag to interpret, no resolution\n * order to keep in sync across layers.\n *\n * A sibling key rather than a nested field because the canonical entry gets\n * REPLACED wholesale on token refresh; anything nested inside it would be\n * dropped by the next rotation. And older zidane versions look credentials up\n * by `credKeyOf`, so a suffixed key is simply invisible to them — they read the\n * preferred credential and behave exactly as before, which is why this needs no\n * migration or schema version.\n */\nexport function alternateCredKey(fileKey: string): string {\n return `${fileKey}${ALTERNATE_CRED_KEY_SUFFIX}`\n}\n\n/**\n * File key holding one of a provider's non-active OAuth accounts.\n *\n * Same sibling-key reasoning as {@link alternateCredKey}: the canonical key is\n * the active one, so a provider with three OAuth grants stores the active one\n * canonically and the other two under `#account:N`. `#alt` stays dedicated to\n * the other-kind (API key) alternate so files written by builds that predate\n * multi-account keep meaning the same thing.\n */\nexport function accountCredKey(fileKey: string, n: number): string {\n return `${fileKey}${ACCOUNT_CRED_KEY_INFIX}${n}`\n}\n\n/** True when `key` is one of `fileKey`'s `#account:N` slots. */\nexport function isAccountCredKey(fileKey: string, key: string): boolean {\n const prefix = `${fileKey}${ACCOUNT_CRED_KEY_INFIX}`\n return key.startsWith(prefix) && /^\\d+$/.test(key.slice(prefix.length))\n}\n\n/**\n * Smallest `#account:N` key of `fileKey` not present in `existing`.\n *\n * Deterministic rather than random so a file hand-edited or written by two\n * processes in sequence stays readable; the write lock keeps it collision-free.\n */\nexport function nextAccountCredKey(fileKey: string, existing: Iterable<string>): string {\n const taken = new Set(existing)\n for (let n = 1; ; n++) {\n const key = accountCredKey(fileKey, n)\n if (!taken.has(key))\n return key\n }\n}\n\n/**\n * Name shown for an OAuth account that was never given one.\n *\n * Also what a first OAuth login is stored under, so a second account has\n * something to be told apart from. Pre-multi-account files hold unnamed\n * grants; {@link oauthAccountLabel} makes them read the same.\n */\nexport const DEFAULT_OAUTH_ACCOUNT_LABEL = 'Default'\n\n/** Trimmed user-given account name, or {@link DEFAULT_OAUTH_ACCOUNT_LABEL}. */\nexport function oauthAccountLabel(credential: { label?: unknown }): string {\n const label = typeof credential.label === 'string' ? credential.label.trim() : ''\n return label || DEFAULT_OAUTH_ACCOUNT_LABEL\n}\n\n/**\n * True when a key claims a reserved slot namespace.\n *\n * Built-in keys are plain identifiers (`anthropic`, `openai-codex`), but\n * `ProviderDescriptor.key` / `credentialFileKey` are open strings — so the\n * reservation is checked, not assumed.\n */\nexport function isReservedCredKey(fileKey: string): boolean {\n return fileKey.includes(CRED_KEY_SLOT_SEPARATOR)\n}\n"],"mappings":";;;;;;;;;;;;;AAYA,SAAgB,kBAAkB,UAAkB,QAAwB;CAC1E,IAAI,OAAO,WAAW,GACpB,OAAO;CACT,IAAI,QAAQ;CACZ,IAAI,MAAM;CACV,OAAO,MAAM;EACX,MAAM,OAAO,SAAS,QAAQ,QAAQ,GAAG;EACzC,IAAI,SAAS,IACX;EACF;EACA,MAAM,OAAO,OAAO;CACtB;CACA,OAAO;AACT;;AAsBA,SAAgB,gBAAgB,KAAqB;CACnD,OAAO,IACJ,WAAA,KAAoC,GAAI,CAAC,CACzC,WAAA,KAAqC,GAAI,CAAC,CAC1C,WAAA,KAAoC,IAAG,CAAC,CACxC,WAAA,KAAqC,IAAG;AAC7C;;;;;;;;;AAUA,MAAM,kBAA4D;CAChE,CAAC,SAAS,oBAAoB;CAC9B,CAAC,OAAO,QAAQ;CAChB,CAAC,QAAQ,SAAS;CAClB,CAAC,OAAO,UAAU;CAClB,CAAC,QAAQ,WAAW;CACpB,CAAC,OAAO,SAAS;CACjB,CAAC,QAAQ,UAAU;CACnB,CAAC,OAAO,UAAU;CAClB,CAAC,QAA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,IAAI,IAAK,KAAK;EACrB,MAAM,MAAM,eAAe,SAAS,CAAC;EACrC,IAAI,CAAC,MAAM,IAAI,GAAG,GAChB,OAAO;CACX;AACF;;;;;;;;AASA,MAAa,8BAA8B;;AAG3C,SAAgB,kBAAkB,YAAyC;CAEzE,QADc,OAAO,WAAW,UAAU,WAAW,WAAW,MAAM,KAAK,IAAI,OAAA;AAEjF;;;;;;;;AASA,SAAgB,kBAAkB,SAA0B;CAC1D,OAAO,QAAQ,SAAA,GAAgC;AACjD"}
|
package/dist/daemon-cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { d as defaultSocketPath, t as startIpcDaemon } from "./server-
|
|
2
|
+
import { d as defaultSocketPath, t as startIpcDaemon } from "./server-Cdrcncg-.js";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import { spawnSync } from "node:child_process";
|
|
5
5
|
import { parseArgs } from "node:util";
|
package/dist/eval.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $t as EvalRunUsage, An as efficiencyMetricValues, Bn as functionalityMetric, Bt as EvalAgentStats, Cn as clearRegisteredEvals, Dn as createReusableExecutionContext, En as createEvalRunReporter, Fn as fileExistsOneOf, Ft as EvalAgent, Gn as runEvalCase, Gt as EvalDefinitionContext, Hn as normalizeMetric, Ht as EvalCaseOptions, In as finalizeEvalMetrics, It as EvalAgentMcpServers, Jt as EvalRunMetricAggregate, Kn as statusCompleted, Kt as EvalMetric, Ln as formatEvalCaseSummary, Lt as EvalAgentRunOptions, Mn as fileContains, Nn as fileContentQuality, Nt as CreateEvalAgentOptions, On as defineEval, Pn as fileExists, Pt as EFFICIENCY_METRICS, Qt as EvalRunSummaryCase, Rn as formatEvalRunSummary, Rt as EvalAgentRunResult, Sn as buildTrajectory, Tn as createEvalAgent, Un as registerEvalTests, Ut as EvalCaseResult, Vn as llmJudge, Vt as EvalArtifacts, Wn as relativeArtifactPath, Wt as EvalDefinition, Xt as EvalRunReporterOptions, Yt as EvalRunReporter, Zt as EvalRunSummary, _n as TrajectoryStep, an as EvalWorkspaceFile, bn as buildEvalRunSummary, cn as LlmJudgeOptions, dn as MetricSpec, en as EvalScore, fn as MetricSpecMap, gn as Trajectory, hn as ReusableExecutionContext, in as EvalVariantSummary, jn as emitEfficiencyMetrics, kn as defineMetrics, ln as MetricDirection, mn as RegisterEvalTestsOptions, nn as EvalScorerContext, on as EvalWorkspaceOptions, pn as MetricStats, qt as EvalMetricError, rn as EvalTestRunner, sn as EvalWorkspaceSnapshot, tn as EvalScorer, un as MetricEmitter, vn as TrajectoryStepKind, wn as computeEvalTagScores, xn as buildRegisteredEvals, yn as artifactPath, zn as formatTrajectoryLine, zt as EvalAgentRunStats } from "./index-
|
|
1
|
+
import { $t as EvalRunUsage, An as efficiencyMetricValues, Bn as functionalityMetric, Bt as EvalAgentStats, Cn as clearRegisteredEvals, Dn as createReusableExecutionContext, En as createEvalRunReporter, Fn as fileExistsOneOf, Ft as EvalAgent, Gn as runEvalCase, Gt as EvalDefinitionContext, Hn as normalizeMetric, Ht as EvalCaseOptions, In as finalizeEvalMetrics, It as EvalAgentMcpServers, Jt as EvalRunMetricAggregate, Kn as statusCompleted, Kt as EvalMetric, Ln as formatEvalCaseSummary, Lt as EvalAgentRunOptions, Mn as fileContains, Nn as fileContentQuality, Nt as CreateEvalAgentOptions, On as defineEval, Pn as fileExists, Pt as EFFICIENCY_METRICS, Qt as EvalRunSummaryCase, Rn as formatEvalRunSummary, Rt as EvalAgentRunResult, Sn as buildTrajectory, Tn as createEvalAgent, Un as registerEvalTests, Ut as EvalCaseResult, Vn as llmJudge, Vt as EvalArtifacts, Wn as relativeArtifactPath, Wt as EvalDefinition, Xt as EvalRunReporterOptions, Yt as EvalRunReporter, Zt as EvalRunSummary, _n as TrajectoryStep, an as EvalWorkspaceFile, bn as buildEvalRunSummary, cn as LlmJudgeOptions, dn as MetricSpec, en as EvalScore, fn as MetricSpecMap, gn as Trajectory, hn as ReusableExecutionContext, in as EvalVariantSummary, jn as emitEfficiencyMetrics, kn as defineMetrics, ln as MetricDirection, mn as RegisterEvalTestsOptions, nn as EvalScorerContext, on as EvalWorkspaceOptions, pn as MetricStats, qt as EvalMetricError, rn as EvalTestRunner, sn as EvalWorkspaceSnapshot, tn as EvalScorer, un as MetricEmitter, vn as TrajectoryStepKind, wn as computeEvalTagScores, xn as buildRegisteredEvals, yn as artifactPath, zn as formatTrajectoryLine, zt as EvalAgentRunStats } from "./index-BIJKozYj.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/extensions.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $a as branchKind, $o as ExtensionStorageSurface, $s as StoredExtensionConfigItem, Aa as registerExtensionHostModules, Ao as ExtensionCustomRendererEntry, As as ExtensionSessionSummary, Ba as discoverAndBuildExtensionRegistry, Bo as ExtensionModalNode, Bs as ExtensionConfigBooleanItem, Ca as fetchExtensionSource, Co as ExtensionBusMessage, Cs as ExtensionStatusOptions, Da as readExtensionInstallProvenance, Do as ExtensionContextTransform, Ds as ExtensionHostRuntimeImpl, Ea as parseExtensionInstallSource, Eo as ExtensionContext, Es as ExtensionHostRuntimeBridge, Fa as inlineLoadedExtension, Fo as ExtensionKeybinding, Fs as createExtensionHostRuntimeBridge, Ga as EXTENSION_BUS_MAX_PAYLOAD_BYTES, Go as ExtensionProviderMiddleware, Gs as ExtensionConfigItemBase, Ha as ExtensionPromptDelivery, Ho as ExtensionPaths, Hs as ExtensionConfigChangeBehavior, Ia as isExtensionDefinition, Io as ExtensionKeybindingDispatchContext, Is as createWorkspaceSurface, Ja as ExtensionBusEnvelope, Jo as ExtensionRuntimeEnv, Js as ExtensionConfigScope, Ka as ExtensionBus, Ko as ExtensionRegistry, Ks as ExtensionConfigModelItem, La as parseExtensionScanPathEnv, Lo as ExtensionManifest, Ls as ExtensionConfigActionItem, Ma as ExtensionScanEntry, Mo as ExtensionFooterHint, Ms as ExtensionWorkspacePair, Na as defaultExtensionScanPaths, No as ExtensionGuiPanel, Ns as ExtensionWorkspaceSurface, Oa as removeInstalledExtension, Oo as ExtensionContributions, Os as ExtensionModelEntry, Pa as discoverExtensions, Po as ExtensionGuiSurface, Ps as createArtifactsSurface, Qa as artifactKindLabel, Qo as ExtensionStorageScope, Qs as ExtensionConfigValueItem, Ra as scanExtensionDirectories, Ro as ExtensionMcpConfigTransform, Rs as ExtensionConfigActionResult, Sa as InstalledExtensionTargetOptions, So as ExtensionBusEmitOptions, Ss as ExtensionNotifyTone, Ta as listExtensionCandidates, To as ExtensionCapability, Ts as ExtensionArtifactScope, Ua as createExtensionPromptBridge, Uo as ExtensionPermission, Us as ExtensionConfigEnumItem, Va as ExtensionPromptBridge, Vo as ExtensionOrderedContribution, Vs as ExtensionConfigCategory, Wa as defineExtension, Wo as ExtensionPromptTransform, Ws as ExtensionConfigItem, Xa as serializedPayloadBytes, Xo as ExtensionSkillPolicy, Xs as ExtensionConfigSurface, Ya as createExtensionBus, Yo as ExtensionSessionStateSurface, Ys as ExtensionConfigStringItem, Za as BUILTIN_ARTIFACT_KINDS, Zo as ExtensionSource, Zs as ExtensionConfigValue, _a as ExtensionInstallProvenance, _o as ExtensionArtifactRendererEntry, _s as ExtensionHudState, aa as buildExtensionRegistry, ac as isValidExtensionConfigValue, ao as refreshArtifact, as as ExtensionToolRendererRegistration, ba as ExtensionInstallSource, bo as ExtensionArtifactsSurface, bs as ExtensionNotification, ca as filterExtensionRegistry, cc as sanitizeExtensionConfigActionPatch, co as ArtifactDetectHookOptions, cs as ExtensionToolResultTransform, da as partitionExtensionCatalog, do as EMPTY_EXTENSION_REGISTRY, ds as GuiContributions, ec as WireExtensionConfigItem, eo as commitKind, es as ExtensionToolCatalogTransform, fa as ExtensionFetchResult, fo as ExtensionAgentPluginOptions, fs as LoadedExtension, ga as ExtensionInstallIo, go as ExtensionArtifactQuery, gs as ExtensionHud, ha as ExtensionInstallErrorCode, ho as ExtensionArtifactKindRegistration, hs as ExtensionBannerOptions, ia as buildExtensionPreset, ic as isValidExtensionConfigItem, io as pullRequestKind, is as ExtensionToolRendererEntry, ja as ENTRY_CANDIDATES, jo as ExtensionDefinition, js as ExtensionSessionsSurface, ka as updateInstalledExtension, ko as ExtensionCustomRenderer, ks as ExtensionRuntimeSurface, la as filterRegistryPlugins, lc as toWireConfigSchema, lo as createArtifactDetectHook, ls as ExtensionToolVerdict, ma as ExtensionInstallError, mo as ExtensionArtifactDetection, ms as TuiContributions, na as BuildExtensionRegistryOptions, nc as clampExtensionConfigNumber, no as githubTokenSource, ns as ExtensionToolRenderProps, oa as composeExtensionPreset, oc as resolveExtensionConfig, oo as renderArtifactRow, os as ExtensionToolResultMetadataRegistration, pa as ExtensionInstallCandidate, po as ExtensionApiVersion, ps as LoadedPluginRecord, qa as ExtensionBusChannel, qo as ExtensionRunTransform, qs as ExtensionConfigNumberItem, ra as ExtensionCatalogPartition, rc as coerceExtensionConfigInput, ro as parseShortstat, rs as ExtensionToolRenderer, sa as disposeExtensionRegistry, sc as resolveExtensionConfigValue, so as resolveArtifactKind, ss as ExtensionToolResultPatch, tc as WireExtensionConfigSchema, to as fileKind, ts as ExtensionToolPolicy, ua as mergeContributions, uo as ArtifactResolveOptions, us as ExtensionTuiSurface, va as ExtensionInstallResult, vo as ExtensionArtifactRendererRegistration, vs as ExtensionHudStatus, wa as installExtensionFromSpec, wo as ExtensionBusSurface, ws as createExtensionHud, xa as InstallExtensionFromSpecOptions, xo as ExtensionBehaviorTransform, xs as ExtensionNotifyOptions, ya as ExtensionInstallScope, yo as ExtensionArtifactRow, ys as ExtensionHudWriter, za as DiscoverAndBuildExtensionRegistryOptions, zo as ExtensionModal, zs as ExtensionConfigActionStatus } from "./index-
|
|
1
|
+
import { $a as branchKind, $o as ExtensionStorageSurface, $s as StoredExtensionConfigItem, Aa as registerExtensionHostModules, Ao as ExtensionCustomRendererEntry, As as ExtensionSessionSummary, Ba as discoverAndBuildExtensionRegistry, Bo as ExtensionModalNode, Bs as ExtensionConfigBooleanItem, Ca as fetchExtensionSource, Co as ExtensionBusMessage, Cs as ExtensionStatusOptions, Da as readExtensionInstallProvenance, Do as ExtensionContextTransform, Ds as ExtensionHostRuntimeImpl, Ea as parseExtensionInstallSource, Eo as ExtensionContext, Es as ExtensionHostRuntimeBridge, Fa as inlineLoadedExtension, Fo as ExtensionKeybinding, Fs as createExtensionHostRuntimeBridge, Ga as EXTENSION_BUS_MAX_PAYLOAD_BYTES, Go as ExtensionProviderMiddleware, Gs as ExtensionConfigItemBase, Ha as ExtensionPromptDelivery, Ho as ExtensionPaths, Hs as ExtensionConfigChangeBehavior, Ia as isExtensionDefinition, Io as ExtensionKeybindingDispatchContext, Is as createWorkspaceSurface, Ja as ExtensionBusEnvelope, Jo as ExtensionRuntimeEnv, Js as ExtensionConfigScope, Ka as ExtensionBus, Ko as ExtensionRegistry, Ks as ExtensionConfigModelItem, La as parseExtensionScanPathEnv, Lo as ExtensionManifest, Ls as ExtensionConfigActionItem, Ma as ExtensionScanEntry, Mo as ExtensionFooterHint, Ms as ExtensionWorkspacePair, Na as defaultExtensionScanPaths, No as ExtensionGuiPanel, Ns as ExtensionWorkspaceSurface, Oa as removeInstalledExtension, Oo as ExtensionContributions, Os as ExtensionModelEntry, Pa as discoverExtensions, Po as ExtensionGuiSurface, Ps as createArtifactsSurface, Qa as artifactKindLabel, Qo as ExtensionStorageScope, Qs as ExtensionConfigValueItem, Ra as scanExtensionDirectories, Ro as ExtensionMcpConfigTransform, Rs as ExtensionConfigActionResult, Sa as InstalledExtensionTargetOptions, So as ExtensionBusEmitOptions, Ss as ExtensionNotifyTone, Ta as listExtensionCandidates, To as ExtensionCapability, Ts as ExtensionArtifactScope, Ua as createExtensionPromptBridge, Uo as ExtensionPermission, Us as ExtensionConfigEnumItem, Va as ExtensionPromptBridge, Vo as ExtensionOrderedContribution, Vs as ExtensionConfigCategory, Wa as defineExtension, Wo as ExtensionPromptTransform, Ws as ExtensionConfigItem, Xa as serializedPayloadBytes, Xo as ExtensionSkillPolicy, Xs as ExtensionConfigSurface, Ya as createExtensionBus, Yo as ExtensionSessionStateSurface, Ys as ExtensionConfigStringItem, Za as BUILTIN_ARTIFACT_KINDS, Zo as ExtensionSource, Zs as ExtensionConfigValue, _a as ExtensionInstallProvenance, _o as ExtensionArtifactRendererEntry, _s as ExtensionHudState, aa as buildExtensionRegistry, ac as isValidExtensionConfigValue, ao as refreshArtifact, as as ExtensionToolRendererRegistration, ba as ExtensionInstallSource, bo as ExtensionArtifactsSurface, bs as ExtensionNotification, ca as filterExtensionRegistry, cc as sanitizeExtensionConfigActionPatch, co as ArtifactDetectHookOptions, cs as ExtensionToolResultTransform, da as partitionExtensionCatalog, do as EMPTY_EXTENSION_REGISTRY, ds as GuiContributions, ec as WireExtensionConfigItem, eo as commitKind, es as ExtensionToolCatalogTransform, fa as ExtensionFetchResult, fo as ExtensionAgentPluginOptions, fs as LoadedExtension, ga as ExtensionInstallIo, go as ExtensionArtifactQuery, gs as ExtensionHud, ha as ExtensionInstallErrorCode, ho as ExtensionArtifactKindRegistration, hs as ExtensionBannerOptions, ia as buildExtensionPreset, ic as isValidExtensionConfigItem, io as pullRequestKind, is as ExtensionToolRendererEntry, ja as ENTRY_CANDIDATES, jo as ExtensionDefinition, js as ExtensionSessionsSurface, ka as updateInstalledExtension, ko as ExtensionCustomRenderer, ks as ExtensionRuntimeSurface, la as filterRegistryPlugins, lc as toWireConfigSchema, lo as createArtifactDetectHook, ls as ExtensionToolVerdict, ma as ExtensionInstallError, mo as ExtensionArtifactDetection, ms as TuiContributions, na as BuildExtensionRegistryOptions, nc as clampExtensionConfigNumber, no as githubTokenSource, ns as ExtensionToolRenderProps, oa as composeExtensionPreset, oc as resolveExtensionConfig, oo as renderArtifactRow, os as ExtensionToolResultMetadataRegistration, pa as ExtensionInstallCandidate, po as ExtensionApiVersion, ps as LoadedPluginRecord, qa as ExtensionBusChannel, qo as ExtensionRunTransform, qs as ExtensionConfigNumberItem, ra as ExtensionCatalogPartition, rc as coerceExtensionConfigInput, ro as parseShortstat, rs as ExtensionToolRenderer, sa as disposeExtensionRegistry, sc as resolveExtensionConfigValue, so as resolveArtifactKind, ss as ExtensionToolResultPatch, tc as WireExtensionConfigSchema, to as fileKind, ts as ExtensionToolPolicy, ua as mergeContributions, uo as ArtifactResolveOptions, us as ExtensionTuiSurface, va as ExtensionInstallResult, vo as ExtensionArtifactRendererRegistration, vs as ExtensionHudStatus, wa as installExtensionFromSpec, wo as ExtensionBusSurface, ws as createExtensionHud, xa as InstallExtensionFromSpecOptions, xo as ExtensionBehaviorTransform, xs as ExtensionNotifyOptions, ya as ExtensionInstallScope, yo as ExtensionArtifactRow, ys as ExtensionHudWriter, za as DiscoverAndBuildExtensionRegistryOptions, zo as ExtensionModal, zs as ExtensionConfigActionStatus } from "./index-BIJKozYj.js";
|
|
2
2
|
export { type ArtifactDetectHookOptions, type ArtifactResolveOptions, BUILTIN_ARTIFACT_KINDS, type BuildExtensionRegistryOptions, type DiscoverAndBuildExtensionRegistryOptions, EMPTY_EXTENSION_REGISTRY, ENTRY_CANDIDATES, EXTENSION_BUS_MAX_PAYLOAD_BYTES, type ExtensionAgentPluginOptions, type ExtensionApiVersion, type ExtensionArtifactDetection, type ExtensionArtifactKindRegistration, type ExtensionArtifactQuery, type ExtensionArtifactRendererEntry, type ExtensionArtifactRendererRegistration, type ExtensionArtifactRow, type ExtensionArtifactScope, type ExtensionArtifactsSurface, type ExtensionBannerOptions, type ExtensionBehaviorTransform, type ExtensionBus, type ExtensionBusChannel, type ExtensionBusEmitOptions, type ExtensionBusEnvelope, type ExtensionBusMessage, type ExtensionBusSurface, 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 LoadedPluginRecord, type StoredExtensionConfigItem, type TuiContributions, type WireExtensionConfigItem, type WireExtensionConfigSchema, artifactKindLabel, branchKind, buildExtensionPreset, buildExtensionRegistry, clampExtensionConfigNumber, coerceExtensionConfigInput, commitKind, composeExtensionPreset, createArtifactDetectHook, createArtifactsSurface, createExtensionBus, createExtensionHostRuntimeBridge, createExtensionHud, createExtensionPromptBridge, createWorkspaceSurface, defaultExtensionScanPaths, defineExtension, discoverAndBuildExtensionRegistry, discoverExtensions, disposeExtensionRegistry, fetchExtensionSource, fileKind, filterExtensionRegistry, filterRegistryPlugins, githubTokenSource, inlineLoadedExtension, installExtensionFromSpec, isExtensionDefinition, isValidExtensionConfigItem, isValidExtensionConfigValue, listExtensionCandidates, mergeContributions, parseExtensionInstallSource, parseExtensionScanPathEnv, parseShortstat, partitionExtensionCatalog, pullRequestKind, readExtensionInstallProvenance, refreshArtifact, registerExtensionHostModules, removeInstalledExtension, renderArtifactRow, resolveArtifactKind, resolveExtensionConfig, resolveExtensionConfigValue, sanitizeExtensionConfigActionPatch, scanExtensionDirectories, serializedPayloadBytes, toWireConfigSchema, updateInstalledExtension };
|
package/dist/extensions.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as ExtensionInstallError, An as
|
|
1
|
+
import { $ as ExtensionInstallError, An as resolveExtensionConfigValue, Bn as fileKind, Dn as isValidExtensionConfigItem, En as coerceExtensionConfigInput, Fn as serializedPayloadBytes, Gn as renderArtifactRow, Hn as parseShortstat, In as BUILTIN_ARTIFACT_KINDS, Kn as resolveArtifactKind, Ln as artifactKindLabel, Mn as toWireConfigSchema, Nn as EXTENSION_BUS_MAX_PAYLOAD_BYTES, On as isValidExtensionConfigValue, Pn as createExtensionBus, Q as createExtensionPromptBridge, Rn as branchKind, Tn as clampExtensionConfigNumber, Un as pullRequestKind, Vn as githubTokenSource, Wn as refreshArtifact, Z as EMPTY_EXTENSION_REGISTRY, _n as discoverExtensions, _t as createArtifactsSurface, at as removeInstalledExtension, bn as parseExtensionScanPathEnv, ct as discoverAndBuildExtensionRegistry, dt as composeExtensionPreset, et as fetchExtensionSource, ft as disposeExtensionRegistry, gn as defaultExtensionScanPaths, gt as partitionExtensionCatalog, hn as ENTRY_CANDIDATES, ht as mergeContributions, it as readExtensionInstallProvenance, jn as sanitizeExtensionConfigActionPatch, kn as resolveExtensionConfig, lt as buildExtensionPreset, mn as registerExtensionHostModules, mt as filterRegistryPlugins, nt as listExtensionCandidates, ot as updateInstalledExtension, pt as filterExtensionRegistry, qn as createArtifactDetectHook, rt as parseExtensionInstallSource, st as createExtensionHud, tt as installExtensionFromSpec, ut as buildExtensionRegistry, vn as inlineLoadedExtension, vt as createExtensionHostRuntimeBridge, wn as defineExtension, xn as scanExtensionDirectories, yn as isExtensionDefinition, yt as createWorkspaceSurface, zn as commitKind } from "./agent-BlGt76qk.js";
|
|
2
2
|
export { BUILTIN_ARTIFACT_KINDS, EMPTY_EXTENSION_REGISTRY, ENTRY_CANDIDATES, EXTENSION_BUS_MAX_PAYLOAD_BYTES, ExtensionInstallError, artifactKindLabel, branchKind, buildExtensionPreset, buildExtensionRegistry, clampExtensionConfigNumber, coerceExtensionConfigInput, commitKind, composeExtensionPreset, createArtifactDetectHook, createArtifactsSurface, createExtensionBus, createExtensionHostRuntimeBridge, createExtensionHud, createExtensionPromptBridge, createWorkspaceSurface, defaultExtensionScanPaths, defineExtension, discoverAndBuildExtensionRegistry, discoverExtensions, disposeExtensionRegistry, fetchExtensionSource, fileKind, filterExtensionRegistry, filterRegistryPlugins, githubTokenSource, inlineLoadedExtension, installExtensionFromSpec, isExtensionDefinition, isValidExtensionConfigItem, isValidExtensionConfigValue, listExtensionCandidates, mergeContributions, parseExtensionInstallSource, parseExtensionScanPathEnv, parseShortstat, partitionExtensionCatalog, pullRequestKind, readExtensionInstallProvenance, refreshArtifact, registerExtensionHostModules, removeInstalledExtension, renderArtifactRow, resolveArtifactKind, resolveExtensionConfig, resolveExtensionConfigValue, sanitizeExtensionConfigActionPatch, scanExtensionDirectories, serializedPayloadBytes, toWireConfigSchema, updateInstalledExtension };
|
package/dist/headless.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $n as HeadlessResult, Jn as FormattedHeadlessTurnEvent, Qn as HeadlessOutputFormat, Xn as HeadlessEvent, Yn as HeadlessErrorInfo, Zn as HeadlessOptions, ar as exitCodeForHeadlessResult, cr as formattedHeadlessTurnEventToJsonl, dr as providerTranscriptFormatForProvider, er as HeadlessStatus, fr as runHeadless, ir as ProviderTranscriptFormat, lr as headlessEventToJsonl, mr as transcriptToProviderMessages, nr as OpenAIChatContentPart, or as formatHeadlessResult, pr as transcriptToOpenAIMessages, qn as FormattedHeadlessResult, rr as OpenAIChatMessage, sr as formatHeadlessTurnEvent, tr as HeadlessUsage, ur as installHeadlessEventAdapter } from "./index-
|
|
1
|
+
import { $n as HeadlessResult, Jn as FormattedHeadlessTurnEvent, Qn as HeadlessOutputFormat, Xn as HeadlessEvent, Yn as HeadlessErrorInfo, Zn as HeadlessOptions, ar as exitCodeForHeadlessResult, cr as formattedHeadlessTurnEventToJsonl, dr as providerTranscriptFormatForProvider, er as HeadlessStatus, fr as runHeadless, ir as ProviderTranscriptFormat, lr as headlessEventToJsonl, mr as transcriptToProviderMessages, nr as OpenAIChatContentPart, or as formatHeadlessResult, pr as transcriptToOpenAIMessages, qn as FormattedHeadlessResult, rr as OpenAIChatMessage, sr as formatHeadlessTurnEvent, tr as HeadlessUsage, ur as installHeadlessEventAdapter } from "./index-BIJKozYj.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,5 +1,5 @@
|
|
|
1
1
|
import { a as documentBlockMarker, o as isWireTurn, r as assertResolvedMediaBlock, u as toolResultToText } from "./types-CWgENVLY.js";
|
|
2
|
-
import { Ct as basic_default, t as createAgent } from "./agent-
|
|
2
|
+
import { Ct as basic_default, t as createAgent } from "./agent-BlGt76qk.js";
|
|
3
3
|
import { r as createProcessContext } from "./contexts-CRE9pw07.js";
|
|
4
4
|
import { t as audioFormatFromMediaType } from "./media-sniff-UKijEaiQ.js";
|
|
5
5
|
import { c as ensureToolResultPairing, g as toAnthropic } from "./messages-2jcOA_5R.js";
|
|
@@ -9235,8 +9235,8 @@ interface AuthMethod {
|
|
|
9235
9235
|
* True for the credential every reader actually resolves.
|
|
9236
9236
|
*
|
|
9237
9237
|
* Exactly one STORED credential is active: the one in the canonical file key
|
|
9238
|
-
* (see `alternateCredKey`). A provider can
|
|
9239
|
-
* OAuth
|
|
9238
|
+
* (see `alternateCredKey`). A provider can hold an API key and any number of
|
|
9239
|
+
* OAuth accounts, so the list alone no longer says which one wins. `env` is
|
|
9240
9240
|
* never marked active — it is an observable signal, not a stored credential
|
|
9241
9241
|
* the user can promote.
|
|
9242
9242
|
*
|
|
@@ -9245,6 +9245,18 @@ interface AuthMethod {
|
|
|
9245
9245
|
* {@link detectAuth} always sets it.
|
|
9246
9246
|
*/
|
|
9247
9247
|
active?: boolean;
|
|
9248
|
+
/**
|
|
9249
|
+
* Credentials-file key of a STORED credential — the identity to hand to
|
|
9250
|
+
* `setPreferredCredential({ key })` / `removeStoredCredential`. Several OAuth
|
|
9251
|
+
* accounts share `source: 'oauth'`, so `source` alone no longer selects one.
|
|
9252
|
+
* Absent for `env`.
|
|
9253
|
+
*/
|
|
9254
|
+
key?: string;
|
|
9255
|
+
/**
|
|
9256
|
+
* Account name — always set for stored OAuth credentials: the user-given one,
|
|
9257
|
+
* or `DEFAULT_OAUTH_ACCOUNT_LABEL` when the grant was never named.
|
|
9258
|
+
*/
|
|
9259
|
+
label?: string;
|
|
9248
9260
|
}
|
|
9249
9261
|
interface ProviderAuth {
|
|
9250
9262
|
key: ProviderKey;
|
|
@@ -9268,13 +9280,14 @@ interface ProviderAuth {
|
|
|
9268
9280
|
*
|
|
9269
9281
|
* - `kind: 'apikey'` from `credentials.json` (injected into env at TUI launch)
|
|
9270
9282
|
* - explicit env var (descriptor's `envKey`)
|
|
9271
|
-
* - `kind: 'oauth'` from `credentials.json` (or legacy `cwd/.credentials.json`)
|
|
9283
|
+
* - `kind: 'oauth'` from `credentials.json` (or legacy `cwd/.credentials.json`),
|
|
9284
|
+
* one per stored account
|
|
9272
9285
|
*
|
|
9273
|
-
*
|
|
9274
|
-
*
|
|
9275
|
-
*
|
|
9276
|
-
* Order within `methods` is presentational —
|
|
9277
|
-
* order, because the active flag answers that directly.
|
|
9286
|
+
* The preferred credential lives in the canonical file key and is flagged
|
|
9287
|
+
* {@link AuthMethod.active}; the others sit in sibling slots and are reported
|
|
9288
|
+
* too, keyed by {@link AuthMethod.key}, so the UI can offer to promote or
|
|
9289
|
+
* remove them. Order within `methods` is presentational — active first — not a
|
|
9290
|
+
* resolution order, because the active flag answers that directly.
|
|
9278
9291
|
*
|
|
9279
9292
|
* Pure read — never refreshes or rewrites the credentials file.
|
|
9280
9293
|
*/
|
|
@@ -20682,4 +20695,4 @@ declare function definePreset(config: Preset): Preset;
|
|
|
20682
20695
|
declare function composePresets(...presets: Preset[]): Preset;
|
|
20683
20696
|
//#endregion
|
|
20684
20697
|
export { SessionArtifactDirMigration as $, SkillsConfig as $_, branchKind as $a, matchesAllowedTool as $c, CustomField as $d, isModelInteraction as $f, SessionHookContext as $g, credentialsFilePath as $h, McpToolMeta as $i, InlineAutocompleteContext as $l, buildAssistantContent as $m, HeadlessResult as $n, ExtensionStorageSurface as $o, ContextExtensionRow as $p, RunSummaryTokens as $r, StoredExtensionConfigItem as $s, EvalRunUsage as $t, ProjectBrief as $u, SessionArtifact as $v, Meter as A, HydrateReadStateOptions as A_, registerExtensionHostModules as Aa, parsePluginManifest as Ac, hasRunReceipt as Ad, InteractionRequest as Af, JsonValue as Ag, AnthropicParams as Ah, ANCHOR_PREVIEW_MAX_CHARS as Ai, ActivationVia as Al, planZaiReasoning as Am, efficiencyMetricValues as An, ExtensionCustomRendererEntry as Ao, AgentProfile as Ap, createSkillsReadTool as Ar, ExtensionSessionSummary as As, resolveExtensionDocsDir as At, CommandSpawnTask as Au, SYNTHETIC_TOOL_RESULT_PLACEHOLDER as Av, McpCredentialStore as B, StagedToolState as B_, discoverAndBuildExtensionRegistry as Ba, PluginDiagnostic as Bc, pickPrimaryKeyed as Bd, PlanStep as Bf, PromptDocumentPart as Bg, credentialIdentity as Bh, generateStructuredData as Bi, resolveStorageDirs as Bl, normalizeOpenRouterModelId as Bm, functionalityMetric as Bn, ExtensionModalNode as Bo, singleAgentRegistry as Bp, InteractionToolOptions as Br, ExtensionConfigBooleanItem as Bs, EvalAgentStats as Bt, EditHunk as Bu, fromAnthropic as Bv, SuccessfulMutationOutcome as C, TurnUsage as C_, fetchExtensionSource as Ca, createModelSearchTool as Cc, fitRunReceiptCells as Cd, ASK_USER_TOOL as Cf, CompactFunction as Cg, BasetenParams as Ch, NO_TOOLS_PREAMBLE as Ci, getDefaultScanPaths as Cl, StreamOptions as Cm, clearRegisteredEvals as Cn, ExtensionBusMessage as Co, fanoutSink as Cp, ToolSearchToolOptions as Cr, ExtensionStatusOptions as Cs, ZIDANE_SKILL_EDIT_SKILL_NAME as Ct, CommandAttachment as Cu, ORPHANED_TOOL_RESULT_MARKER as Cv, originPinnedFetch as Cy, Counter as D, ToolContext as D_, readExtensionInstallProvenance as Da, PLUGIN_MCP_FILE as Dc, formatRunReceiptLine as Dd, CreateInteractionToolsOptions as Df, DedupHasher as Dg, arcee as Dh, buildFullCompactPrompt as Di, buildCatalog as Dl, ToolSpec as Dm, createReusableExecutionContext as Dn, ExtensionContextTransform as Do, formatLogLine as Dp, SkillsRunScriptToolOptions as Dr, ExtensionHostRuntimeImpl as Ds, extensionDirForCwd as Dt, CommandInvocation as Du, PairingRepairMode as Dv, getModelCatalog as Dy, resolveModelTargets as E, toolResultToText as E_, parseExtensionInstallSource as Ea, PLUGIN_SKILLS_DIR as Ec, formatRunReceiptCells as Ed, ConfirmQuestion as Ef, DEFAULT_AGENT_CLOCK as Eg, ArceeParams as Eh, buildFromCompactPrompt as Ei, parseSkillFile as El, ToolResult as Em, createEvalRunReporter as En, ExtensionContext as Eo, filterLogRecords as Ep, createSkillsUseTool as Er, ExtensionHostRuntimeBridge as Es, editSessionMetadata as Et, CommandInteraction as Eu, PairingRepair as Ev, ModelCatalogSource as Ey, createMetricsHooks as F, hydrateReadStateFromSession as F_, inlineLoadedExtension as Fa, AgentPluginsVersion as Fc, chainPositionOf as Fd, PendingInteractionEntry as Ff, ModelTargetSpec as Fg, anthropic as Fh, sliceForCompaction as Fi, createSkillActivationState as Fl, SchemaSanitizeProfile as Fm, fileExistsOneOf as Fn, ExtensionKeybinding as Fo, DEFAULT_BUDGET_EXCLUDE_TOOLS as Fp, RECORD_ARTIFACT_TOOL as Fr, createExtensionHostRuntimeBridge as Fs, EvalAgent as Ft, commandBlocksToContent as Fu, detectTurnInterruption as Fv, OAuthCallbackHandle as G, createToolStateController as G_, EXTENSION_BUS_MAX_PAYLOAD_BYTES as Ga, isSupportedAgentPluginsVersion as Gc, sanitizeModelChain as Gd, QuestionResponse as Gf, RepeatGuardConfig as Gg, resolveAnthropicMaxOutput as Gh, localReliabilityBehavior as Gi, SyntaxStyles as Gl, OpenAICompatAuthHeader as Gm, runEvalCase as Gn, ExtensionProviderMiddleware as Go, buildContextSegments as Gp, RunSummary as Gr, ExtensionConfigItemBase as Gs, EvalDefinitionContext as Gt, Owner as Gu, toAnthropic as Gv, McpOAuthProviderOptions as H, ToolStateOp as H_, ExtensionPromptDelivery as Ha, PluginSchemaKind as Hc, providerKeySetChanged as Hd, QuestionChoice as Hf, PromptPart as Hg, planAnthropicThinking as Hh, defaultRepeatGuardTracked as Hi, ChipColor as Hl, ASSISTANT_TOOL_CALLS_TAG as Hm, normalizeMetric as Hn, ExtensionPaths as Ho, ContextSegmentFile as Hp, grep as Hr, ExtensionConfigChangeBehavior as Hs, EvalCaseOptions as Ht, EditOutcomeKind as Hu, reasoningWireAction as Hv, LoginMcpServerOptions as I, hydrateReadStateFromSessionAsync as I_, isExtensionDefinition as Ia, LoadAgentPluginOptions as Ic, chainsEqual as Id, PlanDecision as If, OAuthRefreshHookContext as Ig, applyAnthropicCacheBreakpoints as Ih, stripImagesFromTurns as Ii, ResolveStorageDirsOptions as Il, SchemaSanitizeResult as Im, finalizeEvalMetrics as In, ExtensionKeybindingDispatchContext as Io, DEFAULT_PERSIST_EXCLUDE_TOOLS as Ip, recordArtifact as Ir, createWorkspaceSurface as Is, EvalAgentMcpServers as It, commandSteps as Iu, dropInvalidToolPairings as Iv, startOAuthCallback as J, ShellInterpolationApproval as J_, ExtensionBusEnvelope as Ja, writeSkillToDisk as Jc, AuthMethod as Jd, TextQuestion as Jf, ResolveContentRefBlock as Jg, PromptCacheKeyOption as Jh, AgentHookMap as Ji, ThemeColors as Jl, OpenAICompatStreamError as Jm, FormattedHeadlessTurnEvent as Jn, ExtensionRuntimeEnv as Jo, ContextBreakdownContributor as Jp, RunSummaryByModel as Jr, ExtensionConfigScope as Js, EvalRunMetricAggregate as Jt, SessionMeta as Ju, ARTIFACTS_METADATA_KEY as Jv, OAuthCallbackOptions as K, isToolStateOps as K_, ExtensionBus as Ka, parseSchemaId as Kc, toggleChainEntry as Kd, QuestionType as Kf, RepeatGuardToolMatcher as Kg, resolveThinkingBinding as Kh, _default$1 as Ki, SyntaxTokenStyle as Kl, OpenAICompatHttpError as Km, statusCompleted as Kn, ExtensionRegistry as Ko, ContextBreakdown as Kp, RunSummaryBlock as Kr, ExtensionConfigModelItem as Ks, EvalMetric as Kt, Picked as Ku, toOpenAI as Kv, LoginMcpServerResult as L, readStateKey as L_, parseExtensionScanPathEnv as La, LoadedPlugin as Lc, chainsEqualKeyed as Ld, PlanPayload as Lf, ProgressNudgeKind as Lg, buildAnthropicClientOptions as Lh, summaryToTurn as Li, StorageDirs as Ll, sanitizeToolSchema as Lm, formatEvalCaseSummary as Ln, ExtensionManifest as Lo, PLAN_AGENT as Lp, readFile as Lr, ExtensionConfigActionItem as Ls, EvalAgentRunOptions as Lt, executeCommand as Lu, ensureEndsWithUserMessage as Lv, MetricsHookSet as M, ReadStateMap as M_, ExtensionScanEntry as Ma, PLUGIN_MANIFEST_FILE as Mc, ModelChainEntry as Md, InteractionsActions as Mf, McpToolHookContext as Mg, EXTENDED_CACHE_TTL_BETA as Mh, CompactionSlice as Mi, DeactivationReason as Ml, XaiParams as Mm, fileContains as Mn, ExtensionFooterHint as Mo, BUILD_AGENT as Mp, CreateShellToolOptions as Mr, ExtensionWorkspacePair as Ms, withZidaneSkillEditSkill as Mt, CommandStepContext as Mu, ToWireMessagesOptions as Mv, MetricsHooksOptions as N, getReadState as N_, defaultExtensionScanPaths as Na, defaultPluginDataRoot as Nc, buildRunModel as Nd, InteractionsProvider as Nf, McpToolSchema as Ng, THINKING_BINDING_SETTING_ENV as Nh, SummaryToTurnInput as Ni, SkillActivationState as Nl, xai as Nm, fileContentQuality as Nn, ExtensionGuiPanel as No, BUILTIN_AGENTS as Np, createShellTool as Nr, ExtensionWorkspaceSurface as Ns, CreateEvalAgentOptions as Nt, CommandStepFn as Nu, TurnInterruptionState as Nv, Histogram as O, ToolDef as O_, removeInstalledExtension as Oa, expandPluginVars as Oc, formatTokenCount as Od, HOST_INTERACTION_ID_PREFIX as Of, DedupToolConfig as Og, AnthropicBedrockConfig as Oh, buildTailCompactPrompt as Oi, IMPLICITLY_ALLOWED_SKILL_TOOLS as Ol, TurnResult as Om, defineEval as On, ExtensionContributions as Oo, nextLogLevel as Op, createSkillsRunScriptTool as Or, ExtensionModelEntry as Os, extensionScaffold as Ot, CommandOutputBlock as Ou, ReasoningWireAction as Ov, setModelCatalog as Oy, UpDownCounter as P, hashContent as P_, discoverExtensions as Pa, loadAgentPlugin as Pc, chainEntryKey as Pd, PRESENT_PLAN_TOOL as Pf, ModelTarget as Pg, ThinkingBindingBehavior as Ph, anchorPreviewFor as Pi, SkillActivationStateOptions as Pl, SchemaSanitizeOptions as Pm, fileExists as Pn, ExtensionGuiSurface as Po, DEFAULT_AGENT_ID as Pp, shell as Pr, createArtifactsSurface as Ps, EFFICIENCY_METRICS as Pt, commandBlockToEvent as Pu, autoDetectAndConvert as Pv, PersistOutcome as Q, SkillSource as Q_, artifactKindLabel as Qa, isToolAllowedByUnion as Qc, BUILTIN_PROVIDERS as Qd, isInteractionTool as Qf, SessionEndStatus as Qg, ResolveOAuthApiKeyOptions as Qh, McpConnector as Qi, resolveTheme as Ql, assistantMessage as Qm, HeadlessOutputFormat as Qn, ExtensionStorageScope as Qo, ContextExactCounts as Qp, RunSummaryRepeatGuard as Qr, ExtensionConfigValueItem as Qs, EvalRunSummaryCase as Qt, ORCHESTRATED_BY_KEY as Qu, ArtifactFilter as Qv, loginMcpServer as R, resolveReadStateMap as R_, scanExtensionDirectories as Ra, PluginAuthor as Rc, filterChainFallbacks as Rd, PlanRequest as Rf, ProgressNudgeMessage as Rg, cacheWriteTtlMultiplier as Rh, truncateHeadForPtlRetry as Ri, StorageMode as Rl, sanitizeToolSpecs as Rm, formatEvalRunSummary as Rn, ExtensionMcpConfigTransform as Ro, accentColor as Rp, multiEdit as Rr, ExtensionConfigActionResult as Rs, EvalAgentRunResult as Rt, parseCommandInvocation as Ru, ensureToolResultPairing as Rv, MutationValidationResult as S, TurnFinishReason as S_, InstalledExtensionTargetOptions as Sa, SpawnModelEntry as Sc, RunReceiptSegmentKind as Sd, shouldAutoCompact as Sf, CompactEndHookContext as Sg, cerebras as Sh, CompactPromptOptions as Si, discoverSkills as Sl, StreamCallbacks as Sm, buildTrajectory as Sn, ExtensionBusEmitOptions as So, createRingBufferSink as Sp, LazyToolEntry as Sr, ExtensionNotifyTone as Ss, ZIDANE_EXTENSION_SKILL_NAME as St, CommandArgSuggestion as Su, EnsureToolResultPairingOptions as Sv, isAllowedRemoteUrl as Sy, normalizeProviders as T, toolOutputByteLength as T_, listExtensionCandidates as Ta, matchModelEntries as Tc, formatRunDuration as Td, AnswerValue as Tf, CompactStartHookContext as Tg, planBasetenReasoning as Th, buildCompactPrompt as Ti, parseFrontmatter as Tl, ToolCall as Tm, createEvalAgent as Tn, ExtensionCapability as To, LOG_LEVEL_CYCLE as Tp, SkillsUseToolOptions as Tr, ExtensionArtifactScope as Ts, buildZidaneSkillEditSkill as Tt, CommandGenerateDataOptions as Tu, PairingDropKind as Tv, ModelCatalogEntry as Ty, createMemoryMcpCredentialStore as U, ToolStateStore as U_, createExtensionPromptBridge as Ua, SUPPORTED_AGENT_PLUGINS_VERSIONS as Uc, reorderKeyed as Ud, QuestionPayload as Uf, PromptTextPart as Ug, resolveAnthropicAuthShape as Uh, normalizeShellCommand as Ui, ChipColorMap as Ul, OAIMessage as Um, registerEvalTests as Un, ExtensionPermission as Uo, ContextSegmentOrigin as Up, glob as Ur, ExtensionConfigEnumItem as Us, EvalCaseResult as Ut, EditPayload as Uu, remintDuplicateToolCallIds as Uv, McpOAuthProvider as V, ToolStateController as V_, ExtensionPromptBridge as Va, PluginManifest as Vc, positionKeyed as Vd, Question as Vf, PromptImagePart as Vg, defaultAnthropicMaxTokens as Vh, defaultRepeatGuardNormalize as Vi, BUILTIN_THEMES as Vl, openrouter as Vm, llmJudge as Vn, ExtensionOrderedContribution as Vo, ContextSegment as Vp, createInteractionTool as Vr, ExtensionConfigCategory as Vs, EvalArtifacts as Vt, EditOutcome as Vu, fromOpenAI as Vv, hasAuthorizationHeader as W, ToolStateView as W_, defineExtension as Wa, agentPluginsSchemaId as Wc, restoreChainFallbacks as Wd, QuestionRequest as Wf, PromptVideoPart as Wg, resolveAnthropicBetas as Wh, stableStringify as Wi, DEFAULT_THEME as Wl, OAITool as Wm, relativeArtifactPath as Wn, ExtensionPromptTransform as Wo, ContextSegmentsInput as Wp, edit as Wr, ExtensionConfigItem as Ws, EvalDefinition as Wt, InteractionMode as Wu, sanitizeHistoryForProvider as Wv, PERSISTENCE_PREVIEW_BYTES as X, SkillDiagnostic as X_, serializedPayloadBytes as Xa, SkillValidationIssue as Xc, ProviderKey as Xd, createAutomaticInteractionResponse as Xf, RunHookMap as Xg, resolvePromptCacheKey as Xh, AgentOptions as Xi, ThemeSurfaces as Xl, applyOAICacheBreakpoints as Xm, HeadlessEvent as Xn, ExtensionSkillPolicy as Xo, ContextCategory as Xp, RunSummaryCollectorOptions as Xr, ExtensionConfigSurface as Xs, EvalRunReporterOptions as Xt, StreamEvent as Xu, ARTIFACT_KINDS as Xv, PERSISTED_STUB_PREFIX as Y, SkillConfig as Y_, createExtensionBus as Ya, writeSkillsToDisk as Yc, ProviderAuth as Yd, buildResumedToolResultsTurn as Yf, RetryConfig as Yg, derivePromptCacheKey as Yh, AgentHooks as Yi, ThemeSelect as Yl, TOOL_RESULTS_TAG as Ym, HeadlessErrorInfo as Yn, ExtensionSessionStateSurface as Yo, ContextBreakdownOptions as Yp, RunSummaryCollector as Yr, ExtensionConfigStringItem as Ys, EvalRunReporter as Yt, Settings as Yu, ARTIFACTS_PER_SESSION_CAP as Yv, PersistInput as Z, SkillResource as Z_, BUILTIN_ARTIFACT_KINDS as Za, SkillValidationResult as Zc, detectAuth as Zd, createInteractionTools as Zf, SessionContentBlock as Zg, OAuthParams as Zh, AgentToolState as Zi, resolveChipColor as Zl, applyOAIToolCacheBreakpoint as Zm, HeadlessOptions as Zn, ExtensionSource as Zo, ContextCategoryId as Zp, RunSummaryError as Zr, ExtensionConfigValue as Zs, EvalRunSummary as Zt, ToolCallDisplay as Zu, ARTIFACT_META_MAX_BYTES as Zv, statsByModel as _, ToolResultImageContent as __, ExtensionInstallProvenance as _a, SubagentDef as _c, RUN_RECEIPT_GLYPH as _d, AUTO_COMPACT_MIN_GROWTH_FRACTION as _f, AgentStats as _g, LocalParams as _h, CompactInvalidInputError as _i, installSkillFromSpec as _l, HistoryRepair as _m, TrajectoryStep as _n, ExtensionArtifactRendererEntry as _o, LoggingHooksOptions as _p, waitTask as _r, ExtensionHudState as _s, EXTENSION_EDIT_METADATA_KEY as _t, mergeReferences as _u, createRemoteStore as _v, normalizeMcpServers as _y, basicTools as a, StreamHookContext as a_, buildExtensionRegistry as aa, isValidExtensionConfigValue as ac, SessionEventTone as ad, credKeyOf as af, resolveOAuthApiKey as ag, openaiCompat as ah, PostCompactAttachments as ai, resolveSkills as al, buildContextBreakdown as am, EvalWorkspaceFile as an, refreshArtifact as ao, InferSchemaOutput as ap, exitCodeForHeadlessResult as ar, ExtensionToolRendererRegistration as as, resolveLegacySessionDir as at, tokenEndingAtCursor as au, SessionRun as av, sortArtifacts as ay, MutationValidationHooksOptions as b, ToolResultTextContent as b_, ExtensionInstallSource as ba, createSpawnTool as bc, RunReceiptCellKind as bd, OUTPUT_RESERVE_TOKENS as bf, CacheTtl as bg, cursor as bh, CompactDirection as bi, readSkillProvenance as bl, ProviderCapabilities as bm, buildEvalRunSummary as bn, ExtensionArtifactsSurface as bo, createLogger as bp, TailTruncateOptions as br, ExtensionNotification as bs, SKILL_EDIT_METADATA_KEY as bt, Command as bu, FileMapStoreOptions as bv, wrapDiscoveredMcpTools as by, StartSpan as c, ThinkingDecay as c_, filterExtensionRegistry as ca, sanitizeExtensionConfigActionPatch as cc, orchestratedBy as cd, getModelInfo as cf, ensureBundledOAuthFlows as cg, userMessage as ch, buildPostCompactAttachments as ci, stripShellInterpolations as cl, CacheDimensionDiff as cm, LlmJudgeOptions as cn, ArtifactDetectHookOptions as co, isStandardSchema as cp, formattedHeadlessTurnEventToJsonl as cr, ExtensionToolResultTransform as cs, resolveSessionDir as ct, ActiveTrigger as cu, currentExtensionSession as cv, McpExecutionBinding as cy, TracingHooksOptions as d, ToolHookContext as d_, partitionExtensionCatalog as da, ExtensionSubagentDef as dc, sessionDirLabel as dd, modelSupportsReasoning as df, refreshAnthropicToken as dg, mapCodexStopReason as dh, selectRecentFiles as di, SkillInstallCandidate as dl, CacheDriftInfo as dm, MetricSpec as dn, EMPTY_EXTENSION_REGISTRY as do, ConsoleSinkOptions as dp, providerTranscriptFormatForProvider as dr, GuiContributions as ds, SHELL_CASCADE_CANCEL_MESSAGE as dt, CompletionProvider as du, getExtensionSessionState as dv, createStderrLineEmitter as dy, SessionMessage as e_, McpToolWrap as ea, WireExtensionConfigItem as ec, SESSION_EVENT_STATUS_STYLE as ed, ModelInfo as ef, credentialsFromParams as eg, classifyOpenAICompatError as eh, RunSummaryValidation as ei, parseAllowedToolPattern as el, ContextExtensionSection as em, EvalScore as en, commitKind as eo, makeRequestInteraction as ep, HeadlessStatus as er, ExtensionToolCatalogTransform as es, buildPersistedStub as et, InlineAutocompleteProvider as eu, CreateSessionOptions as ev, SessionArtifactInput as ey, createTracingHooks as f, ToolOutcome as f_, ExtensionFetchResult as fa, SpawnTaskInput as fc, sessionEventExcerpt as fd, modelsForDescriptor as ff, refreshOpenAICodexToken as fg, openai as fh, CompactEndEvent as fi, SkillInstallError as fl, diffCacheDimensions as fm, MetricSpecMap as fn, ExtensionAgentPluginOptions as fo, LogLevel as fp, runHeadless as fr, LoadedExtension as fs, TOOL_USE_CANCELLED_MESSAGE as ft, CompletionReference as fu, loadSession as fv, deriveMcpToolMeta as fy, formatTokenUsage as g, ToolResultDocumentRefContent as g_, ExtensionInstallIo as ga, SpawnToolState as gc, truncateTitle as gd, restoreModelOptions as gf, AgentRunOptions as gg, planMistralReasoning as gh, compactConversation as gi, SkillInstallSpec as gl, snapshotCacheDimensions as gm, Trajectory as gn, ExtensionArtifactQuery as go, LoggingHookSet as gp, WAIT_TASK_TIMED_OUT_PREFIX as gr, ExtensionHud as gs, renderStaleReadNotice as gt, findActiveTrigger as gu, RemoteStoreOptions as gv, normalizeMcpBlocks as gy, flattenTurns as h, ToolResultDocumentContent as h_, ExtensionInstallErrorCode as ha, SpawnToolOptions as hc, shortSessionId as hd, piIdOf as hf, AgentClock as hg, mistral as hh, CompactStartEvent as hi, SkillInstallResult as hl, installCacheBreakLogger as hm, ReusableExecutionContext as hn, ExtensionArtifactKindRegistration as ho, Logger as hp, writeFile as hr, ExtensionBannerOptions as hs, collectNewlyStaleReadPaths as ht, collectReferences as hu, withExtensionSession as hv, nonOwningMcpView as hy, _default as i, StepThinkingDecay as i_, buildExtensionPreset as ia, isValidExtensionConfigItem as ic, SessionEventStatusStyle as id, cerebrasDescriptor as if, registerCustomOAuthProvider as ig, openAICompatPromptMessage as ih, utf8ByteLength as ii, validateSkillName as il, ContextUsageSplit as im, EvalVariantSummary as in, pullRequestKind as io, useInteractionsQueue as ip, ProviderTranscriptFormat as ir, ExtensionToolRendererEntry as is, resolveLegacyPersistDir as it, resolveInlineSuggestion as iu, SessionMetaRow as iv, selectArtifactEvictions as iy, MetricAttributes as j, ReadStateEntry as j_, ENTRY_CANDIDATES as ja, validatePluginManifest as jc, runReceiptFromRun as jd, InteractionResponse as jf, McpServerConfig as jg, AnthropicThinkingPlan as jh, CompactScope as ji, ActiveSkill as jl, zai as jm, emitEfficiencyMetrics as jn, ExtensionDefinition as jo, AgentRegistry as jp, shellKill as jr, ExtensionSessionsSurface as js, withZidaneExtensionSkill as jt, CommandStep as ju, TOOL_USE_INTERRUPTED_MARKER as jv, InstrumentOptions as k, ToolMap as k_, updateInstalledExtension as ka, ManifestValidation as kc, formatTokensPerSecond as kd, InteractionOrigin as kf, GeometricThinkingDecay as kg, AnthropicContextManagement as kh, buildUpToCompactPrompt as ki, installAllowedToolsGate as kl, ZaiParams as km, defineMetrics as kn, ExtensionCustomRenderer as ko, AgentAccent as kp, SkillsReadToolOptions as kr, ExtensionRuntimeSurface as ks, readSkillEditMarker as kt, CommandSpawnResult as ku, RemintResult as kv, TracingConventions as l, ThinkingLevel as l_, filterRegistryPlugins as la, toWireConfigSchema as lc, parseSessionEventXml as ld, localDescriptor as lf, getOAuthApiKey as lg, OpenAIParams as lh, selectFilesFromReadState as li, SKILL_PROVENANCE_FILE as ll, CacheDimensionName as lm, MetricDirection as ln, createArtifactDetectHook as lo, resolveSchemaInput as lp, headlessEventToJsonl as lr, ExtensionToolVerdict as ls, resolveTasksDir as lt, CompletionContext as lu, deleteExtensionSessionState as lv, attachStderrWarnPump as ly, TokenUsageLike as m, ToolResultContent as m_, ExtensionInstallError as ma, SpawnTool as mc, sessionEventMeta as md, openrouterDescriptor as mf, AgentBehavior as mg, MistralParams as mh, CompactResult as mi, SkillInstallOptions as ml, hashMessages as mm, RegisterEvalTestsOptions as mn, ExtensionArtifactDetection as mo, LogSink as mp, transcriptToProviderMessages as mr, TuiContributions as ms, applyCompactSummaryCutoff as mt, applyInsert as mu, setExtensionSessionState as mv, expandMcpConfigEnv as my, composePresets as n, SpawnHookContext as n_, BuildExtensionRegistryOptions as na, clampExtensionConfigNumber as nc, SessionEvent as nd, ProviderDescriptor as nf, isOAuthAccessToken as ng, formatTools as nh, BYTES_PER_TOKEN as ni, validateResourcePathReal as nl, ContextMcpGroup as nm, EvalScorerContext as nn, githubTokenSource as no, serializeInteractionResponse as np, OpenAIChatContentPart as nr, ExtensionToolRenderProps as ns, maybePersistToolResult as nt, createPathAutocompleteProvider as nu, Session as nv, mergeArtifact as ny, GEN_AI_ATTRIBUTES as o, StreamProgressHookContext as o_, composeExtensionPreset as oa, resolveExtensionConfig as oc, WORKER_REPORT_FRAGMENT as od, enabledModelOptions as of, writeOAuthCredentials as og, toOAIMessages as oh, PostCompactRestoreOptions as oi, InterpolateShellCommandsOptions as ol, CacheBreakInfo as om, EvalWorkspaceOptions as on, renderArtifactRow as oo, SchemaInput as op, formatHeadlessResult as or, ExtensionToolResultMetadataRegistration as os, resolveMcpWarningsDir as ot, CompletionState as ou, SessionStore as ov, ConnectMcpServersOptions as oy, ModelUsage as p, ToolResultAudioContent as p_, ExtensionInstallCandidate as pa, SpawnTaskOutcome as pc, sessionEventLabel as pd, openaiDescriptor as pf, registerOAuthProvider as pg, toPiMessages as ph, CompactOptions as pi, SkillInstallErrorCode as pl, fnv1a32 as pm, MetricStats as pn, ExtensionApiVersion as po, LogRecord as pp, transcriptToOpenAIMessages as pr, LoadedPluginRecord as ps, TOOL_USE_SKIPPED_MESSAGE as pt, CompletionSubmitContext as pu, resumeChainRunIds as pv, expandEnvPlaceholders as py, OAuthCallbackResult as q, stagedToolState as q_, ExtensionBusChannel as qa, defineSkill as qc, toggleKeyed as qd, SelectQuestion as qf, ResolveContentRef as qg, PromptCacheKeyContext as qh, Agent as qi, Theme as ql, OpenAICompatParams as qm, FormattedHeadlessResult as qn, ExtensionRunTransform as qo, ContextBreakdownContributionContext as qp, RunSummaryBudget as qr, ExtensionConfigNumberItem as qs, EvalMetricError as qt, Screen as qu, toWireMessages as qv, definePreset as r, StaleReadPolicy as r_, ExtensionCatalogPartition as ra, coerceExtensionConfigInput as rc, SessionEventStatus as rd, anthropicDescriptor as rf, readOAuthCredentials as rg, mapOAIFinishReason as rh, estimateTokens as ri, validateSkillForWrite as rl, ContextSnapshot as rm, EvalTestRunner as rn, parseShortstat as ro, useInteractionsActions as rp, OpenAIChatMessage as rr, ExtensionToolRenderer as rs, migrateSessionArtifactDirs as rt, patchInlineGhost as ru, SessionData as rv, normalizeArtifactInput as ry, Span as s, StreamUsageSnapshot as s_, disposeExtensionRegistry as sa, resolveExtensionConfigValue as sc, isMainSession as sd, getContextWindow as sf, OAuthProviderInterface as sg, toolResultsMessage as sh, RecentFile as si, interpolateShellCommands as sl, CacheBreakLoggerOptions as sm, EvalWorkspaceSnapshot as sn, resolveArtifactKind as so, StandardSchemaLike as sp, formatHeadlessTurnEvent as sr, ExtensionToolResultPatch as ss, resolvePersistDir as st, useCompletion as su, createSession as sv, McpConnection as sy, Preset as t, SessionTurn as t_, createAgent as ta, WireExtensionConfigSchema as tc, SESSION_ROLE_KEY as td, ModelOption as tf, extractRuntimeCredentials as tg, consumeSSE as th, createRunSummaryCollector as ti, validateResourcePath as tl, ContextItem as tm, EvalScorer as tn, fileKind as to, pendingInteractionsFromTurns as tp, HeadlessUsage as tr, ExtensionToolPolicy as ts, cleanupPersistedSession as tt, InlineGhost as tu, LoadSessionOptions as tv, matchesArtifactFilter as ty, TracingHookSet as u, ToolBatchExecutor as u_, mergeContributions as ua, ChildAgent as uc, renderSessionEventXml as ud, modelOptionsFor as uf, getOAuthProvider as ug, classifyOpenAIError as uh, selectFilesFromSession as ui, SkillCandidateDetail as ul, CacheDimensionSnapshot as um, MetricEmitter as un, ArtifactResolveOptions as uo, zodToJsonSchema as up, installHeadlessEventAdapter as ur, ExtensionTuiSurface as us, INTERRUPT_MESSAGE_FOR_TOOL_USE as ut, CompletionItem as uu, demoteStaleRunningStatus as uv, connectMcpServers as uy, MutationValidationBatch as v, ToolResultImageRefContent as v_, ExtensionInstallResult as va, SubagentOverride as vc, RunReceipt as vd, AutoCompactDecision as vf, AutoCompact as vg, local as vh, CompactPromptTooLongError as vi, listSkillCandidates as vl, InputTransformation as vm, TrajectoryStepKind as vn, ExtensionArtifactRendererRegistration as vo, RingBufferSink as vp, ValidationResult as vr, ExtensionHudStatus as vs, EditSessionTarget as vt, mergeSuggestions as vu, createMemoryStore as vv, resolveTransportConfig as vy, createMutationValidationHooks as w, toolOutputBudgetByteLength as w_, installExtensionFromSpec as wa, formatModelLine as wc, formatCostUsd as wd, AUTOMATIC_INTERACTION_INSTRUCTION as wf, CompactHookContext as wg, baseten as wh, TRAILER as wi, inferSource as wl, TokenCountPayload as wm, computeEvalTagScores as wn, ExtensionBusSurface as wo, jsonSink as wp, createToolSearchTool as wr, createExtensionHud as ws, buildZidaneExtensionSkill as wt, CommandExecution as wu, PairingDrop as wv, ModelCatalog as wy, MutationValidationMutation as x, ToolResultVideoContent as x_, InstallExtensionFromSpecOptions as xa, isSpawnTool as xc, RunReceiptSegment as xd, effectiveContextWindow as xf, ChildRunStats as xg, CerebrasParams as xh, CompactPromptBuilder as xi, SourcedScanPath as xl, ProviderMeta as xm, buildRegisteredEvals as xn, ExtensionBehaviorTransform as xo, createLoggingHooks as xp, tailTruncate as xr, ExtensionNotifyOptions as xs, SkillEditMarker as xt, CommandAgentResult as xu, createFileMapStore as xv, PinnedFetch as xy, MutationValidationFailure as y, ToolResultMetadata as y_, ExtensionInstallScope as ya, SubagentRegistry as yc, RunReceiptCell as yd, AutoCompactInput as yf, AutoCompactConfig as yg, CursorParams as yh, BASE_INSTRUCTIONS as yi, parseSkillInstallSpec as yl, Provider as ym, artifactPath as yn, ExtensionArtifactRow as yo, consoleSink as yp, validateToolArgs as yr, ExtensionHudWriter as ys, ExtensionEditMarker as yt, resolveCompletionSubmit as yu, FileMapAdapter as yv, resultToString as yy, McpCredentialEntry as z, DEFAULT_MAX_VALUE_BYTES as z_, DiscoverAndBuildExtensionRegistryOptions as za, PluginComponentStatus as zc, pickChainPrimary as zd, PlanResponse as zf, PromptAudioPart as zg, classifyAnthropicError as zh, GenerateStructuredDataOptions as zi, StorageSlot as zl, OpenRouterParams as zm, formatTrajectoryLine as zn, ExtensionModal as zo, resolveAgentId as zp, listFiles as zr, ExtensionConfigActionStatus as zs, EvalAgentRunStats as zt, EditDiffDisplay as zu, filterUnresolvedToolUses as zv };
|
|
20685
|
-
//# sourceMappingURL=index-
|
|
20698
|
+
//# sourceMappingURL=index-BIJKozYj.d.ts.map
|