zidane 7.1.3 → 7.1.5
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 +4 -4
- 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/{anthropic-DPPs3wjJ.js → anthropic-BQdAnY-w.js} +2 -2
- package/dist/{anthropic-DPPs3wjJ.js.map → anthropic-BQdAnY-w.js.map} +1 -1
- package/dist/{approvals-u2T19Dc-.js → approvals-BznYVVGD.js} +137 -42
- package/dist/{approvals-u2T19Dc-.js.map → approvals-BznYVVGD.js.map} +1 -1
- package/dist/{auth-HRKkOErn.js → auth-DvMdkpGD.js} +245 -82
- package/dist/{auth-HRKkOErn.js.map → auth-DvMdkpGD.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 +2 -1
- package/dist/daemon-cli.js.map +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-D3TTaaQ5.d.ts → index-D9ntsW7o.d.ts} +20 -198
- package/dist/index-D9ntsW7o.d.ts.map +1 -0
- package/dist/{index-DZhrTn-v.d.ts → index-Dw8ruU-j.d.ts} +37 -9
- package/dist/index-Dw8ruU-j.d.ts.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/dist/{ipc-ChQeueur.js → ipc-CNrpBs9P.js} +2 -2
- package/dist/{ipc-ChQeueur.js.map → ipc-CNrpBs9P.js.map} +1 -1
- package/dist/ipc.d.ts +28 -6
- package/dist/ipc.d.ts.map +1 -1
- package/dist/ipc.js +4 -4
- package/dist/mcp.d.ts +1 -1
- package/dist/{oauth-B6F43fti.js → oauth-DxHO17JE.js} +10 -8
- package/dist/{oauth-B6F43fti.js.map → oauth-DxHO17JE.js.map} +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/anthropic.js +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/openai.js +1 -1
- package/dist/providers/openrouter.d.ts +1 -1
- package/dist/providers/xai.d.ts +1 -1
- package/dist/providers/xai.js +1 -1
- package/dist/{providers-DP9kwXYo.js → providers-BVhnFyiY.js} +2 -2
- package/dist/{providers-DP9kwXYo.js.map → providers-BVhnFyiY.js.map} +1 -1
- package/dist/providers.d.ts +1 -1
- package/dist/providers.js +3 -3
- package/dist/restate.d.ts +1 -1
- package/dist/restate.js +1 -1
- package/dist/session/sqlite.d.ts +1 -1
- package/dist/session.d.ts +1 -1
- package/dist/{server-CTUpOdh3.js → shell-path-3tZ2lyQ2.js} +95 -9
- package/dist/shell-path-3tZ2lyQ2.js.map +1 -0
- package/dist/skills.d.ts +1 -1
- package/dist/{tool-formatters-C5s88MUd.d.ts → tool-formatters-CJoSmRjH.d.ts} +83 -3
- package/dist/tool-formatters-CJoSmRjH.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-nWzUc3WT.d.ts} +201 -3
- package/dist/transcript-anchors-nWzUc3WT.d.ts.map +1 -0
- package/dist/tui.d.ts +20 -6
- package/dist/tui.d.ts.map +1 -1
- package/dist/tui.js +388 -58
- package/dist/tui.js.map +1 -1
- package/dist/{turn-operations-BaQnxzhr.d.ts → turn-operations-GRw5vbtr.d.ts} +34 -4
- package/dist/{turn-operations-BaQnxzhr.d.ts.map → turn-operations-GRw5vbtr.d.ts.map} +1 -1
- package/dist/{turn-operations-6JDu2ewy.js → turn-operations-JynC5ODZ.js} +31 -3
- package/dist/{turn-operations-6JDu2ewy.js.map → turn-operations-JynC5ODZ.js.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/server-CTUpOdh3.js.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;E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AAa,0BAA0B;;;;;;;;AASvC,MAAa,4BAA4B;;;;;AAMzC,MAAa,yBAAyB;;;;;;;;;;;;;;;;;;AAmBtC,SAAgB,iBAAiB,SAAyB;CACxD,OAAO,GAAG,UAAU;AACtB;;;;;;;;;;AAWA,SAAgB,eAAe,SAAiB,GAAmB;CACjE,OAAO,GAAG,UAAU,yBAAyB;AAC/C;;AAGA,SAAgB,iBAAiB,SAAiB,KAAsB;CACtE,MAAM,SAAS,GAAG,UAAU;CAC5B,OAAO,IAAI,WAAW,MAAM,KAAK,QAAQ,KAAK,IAAI,MAAM,OAAO,MAAM,CAAC;AACxE;;;;;;;AAQA,SAAgB,mBAAmB,SAAiB,UAAoC;CACtF,MAAM,QAAQ,IAAI,IAAI,QAAQ;CAC9B,KAAK,IAAI,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 {
|
|
2
|
+
import { i as startIpcDaemon, m as defaultSocketPath, t as fixPath } from "./shell-path-3tZ2lyQ2.js";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import { spawnSync } from "node:child_process";
|
|
5
5
|
import { parseArgs } from "node:util";
|
|
@@ -59,6 +59,7 @@ async function main() {
|
|
|
59
59
|
process.stdout.write("usage: zidane-daemon [--socket <path>] [--idle-exit <ms>] [--verbose]\n");
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
|
+
fixPath();
|
|
62
63
|
const socketPath = values.socket ?? defaultSocketPath();
|
|
63
64
|
const idleExitMs = values["idle-exit"] !== void 0 ? Number(values["idle-exit"]) : DEFAULT_IDLE_EXIT_MS;
|
|
64
65
|
const log = values.verbose ? (line) => process.stderr.write(`${line}\n`) : void 0;
|
package/dist/daemon-cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daemon-cli.js","names":[],"sources":["../src/daemon-cli.ts"],"sourcesContent":["#!/usr/bin/env node\n/**\n * `zidane-daemon` — the shared chat host behind every zidane window.\n *\n * Starts a unix-socket JSON-RPC server (see `src/ipc/daemon/server.ts`) so\n * multiple terminal / GUI windows attach to the same live agents and stay\n * in sync. Normally spawned on demand by a client (`connectOrSpawnDaemon`);\n * run it directly for a long-lived foreground daemon.\n *\n * REQUIRES BUN: the canonical session store is `bun:sqlite`. Users of the\n * published TUI don't need Bun installed — the compiled `zidane` binary\n * embeds it, and `zidane daemon` runs this same server in-process.\n *\n * Flags:\n * --socket <path> Socket path (default: ~/.zidane/daemon/daemon.sock, or\n * $ZIDANE_DAEMON_SOCKET)\n * --idle-exit <ms> Exit after this long with zero connected peers\n * (default: 30 minutes; 0 disables)\n * --verbose Log peer / stream activity to stderr\n */\nimport { spawnSync } from 'node:child_process'\nimport { createRequire } from 'node:module'\nimport process from 'node:process'\nimport { parseArgs } from 'node:util'\nimport { defaultSocketPath } from './ipc/daemon/lifecycle'\nimport { startIpcDaemon } from './ipc/daemon/server'\n\nfunction appVersion(): string {\n try {\n const require = createRequire(import.meta.url)\n return (require('../package.json') as { version?: string }).version ?? 'dev'\n }\n catch {\n return 'dev'\n }\n}\n\nconst DEFAULT_IDLE_EXIT_MS = 30 * 60 * 1000\n\nasync function main(): Promise<void> {\n if (typeof (globalThis as { Bun?: unknown }).Bun === 'undefined') {\n /*\n * Node shebang so this guard actually RUNS on machines without bun\n * on PATH (a bun shebang dies inside `env` with a cryptic error\n * before any code executes). Re-exec under bun when it's available;\n * otherwise print the guidance the shebang used to preempt.\n */\n const script = process.argv[1]\n const reexec = script\n ? spawnSync('bun', [script, ...process.argv.slice(2)], { stdio: 'inherit' })\n : null\n if (reexec && reexec.error === undefined)\n process.exit(reexec.status ?? 0)\n\n process.stderr.write(\n 'zidane-daemon requires the Bun runtime (the session store uses bun:sqlite).\\n'\n + 'Install Bun (https://bun.sh), or use the compiled `zidane daemon` command which embeds it.\\n',\n )\n process.exit(1)\n }\n\n const { values } = parseArgs({\n args: process.argv.slice(2),\n options: {\n 'socket': { type: 'string' },\n 'idle-exit': { type: 'string' },\n 'verbose': { type: 'boolean', default: false },\n 'help': { type: 'boolean', default: false },\n },\n })\n\n if (values.help) {\n process.stdout.write(\n 'usage: zidane-daemon [--socket <path>] [--idle-exit <ms>] [--verbose]\\n',\n )\n return\n }\n\n const socketPath = values.socket ?? defaultSocketPath()\n const idleExitMs = values['idle-exit'] !== undefined ? Number(values['idle-exit']) : DEFAULT_IDLE_EXIT_MS\n const log = values.verbose ? (line: string) => process.stderr.write(`${line}\\n`) : undefined\n\n const daemon = await startIpcDaemon({\n socketPath,\n appVersion: appVersion(),\n ...(idleExitMs > 0\n ? {\n idleShutdownMs: idleExitMs,\n onIdle: () => {\n void daemon.close().finally(() => process.exit(0))\n },\n }\n : {}),\n ...(log ? { onLog: log } : {}),\n })\n\n process.stderr.write(`zidane daemon listening on ${daemon.socketPath} (pid ${process.pid})\\n`)\n\n const shutdown = (): void => {\n void daemon.close().finally(() => process.exit(0))\n }\n process.on('SIGINT', shutdown)\n process.on('SIGTERM', shutdown)\n}\n\nmain().catch((err) => {\n process.stderr.write(`zidane-daemon: ${err instanceof Error ? err.message : String(err)}\\n`)\n process.exit(1)\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"daemon-cli.js","names":[],"sources":["../src/daemon-cli.ts"],"sourcesContent":["#!/usr/bin/env node\n/**\n * `zidane-daemon` — the shared chat host behind every zidane window.\n *\n * Starts a unix-socket JSON-RPC server (see `src/ipc/daemon/server.ts`) so\n * multiple terminal / GUI windows attach to the same live agents and stay\n * in sync. Normally spawned on demand by a client (`connectOrSpawnDaemon`);\n * run it directly for a long-lived foreground daemon.\n *\n * REQUIRES BUN: the canonical session store is `bun:sqlite`. Users of the\n * published TUI don't need Bun installed — the compiled `zidane` binary\n * embeds it, and `zidane daemon` runs this same server in-process.\n *\n * Flags:\n * --socket <path> Socket path (default: ~/.zidane/daemon/daemon.sock, or\n * $ZIDANE_DAEMON_SOCKET)\n * --idle-exit <ms> Exit after this long with zero connected peers\n * (default: 30 minutes; 0 disables)\n * --verbose Log peer / stream activity to stderr\n */\nimport { spawnSync } from 'node:child_process'\nimport { createRequire } from 'node:module'\nimport process from 'node:process'\nimport { parseArgs } from 'node:util'\nimport { defaultSocketPath } from './ipc/daemon/lifecycle'\nimport { startIpcDaemon } from './ipc/daemon/server'\nimport { fixPath } from './ipc/daemon/shell-path'\n\nfunction appVersion(): string {\n try {\n const require = createRequire(import.meta.url)\n return (require('../package.json') as { version?: string }).version ?? 'dev'\n }\n catch {\n return 'dev'\n }\n}\n\nconst DEFAULT_IDLE_EXIT_MS = 30 * 60 * 1000\n\nasync function main(): Promise<void> {\n if (typeof (globalThis as { Bun?: unknown }).Bun === 'undefined') {\n /*\n * Node shebang so this guard actually RUNS on machines without bun\n * on PATH (a bun shebang dies inside `env` with a cryptic error\n * before any code executes). Re-exec under bun when it's available;\n * otherwise print the guidance the shebang used to preempt.\n */\n const script = process.argv[1]\n const reexec = script\n ? spawnSync('bun', [script, ...process.argv.slice(2)], { stdio: 'inherit' })\n : null\n if (reexec && reexec.error === undefined)\n process.exit(reexec.status ?? 0)\n\n process.stderr.write(\n 'zidane-daemon requires the Bun runtime (the session store uses bun:sqlite).\\n'\n + 'Install Bun (https://bun.sh), or use the compiled `zidane daemon` command which embeds it.\\n',\n )\n process.exit(1)\n }\n\n const { values } = parseArgs({\n args: process.argv.slice(2),\n options: {\n 'socket': { type: 'string' },\n 'idle-exit': { type: 'string' },\n 'verbose': { type: 'boolean', default: false },\n 'help': { type: 'boolean', default: false },\n },\n })\n\n if (values.help) {\n process.stdout.write(\n 'usage: zidane-daemon [--socket <path>] [--idle-exit <ms>] [--verbose]\\n',\n )\n return\n }\n\n // Every agent shell command inherits this process's PATH; a daemon spawned\n // by a Dock-launched GUI would otherwise hand tools launchd's bare PATH.\n fixPath()\n\n const socketPath = values.socket ?? defaultSocketPath()\n const idleExitMs = values['idle-exit'] !== undefined ? Number(values['idle-exit']) : DEFAULT_IDLE_EXIT_MS\n const log = values.verbose ? (line: string) => process.stderr.write(`${line}\\n`) : undefined\n\n const daemon = await startIpcDaemon({\n socketPath,\n appVersion: appVersion(),\n ...(idleExitMs > 0\n ? {\n idleShutdownMs: idleExitMs,\n onIdle: () => {\n void daemon.close().finally(() => process.exit(0))\n },\n }\n : {}),\n ...(log ? { onLog: log } : {}),\n })\n\n process.stderr.write(`zidane daemon listening on ${daemon.socketPath} (pid ${process.pid})\\n`)\n\n const shutdown = (): void => {\n void daemon.close().finally(() => process.exit(0))\n }\n process.on('SIGINT', shutdown)\n process.on('SIGTERM', shutdown)\n}\n\nmain().catch((err) => {\n process.stderr.write(`zidane-daemon: ${err instanceof Error ? err.message : String(err)}\\n`)\n process.exit(1)\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,SAAS,aAAqB;CAC5B,IAAI;EAEF,OADgB,cAAc,OAAO,KAAK,GAC5B,CAAC,CAAC,iBAAiB,CAAC,CAA0B,WAAW;CACzE,QACM;EACJ,OAAO;CACT;AACF;AAEA,MAAM,uBAAuB,OAAU;AAEvC,eAAe,OAAsB;CACnC,IAAI,OAAQ,WAAiC,QAAQ,aAAa;EAOhE,MAAM,SAAS,QAAQ,KAAK;EAC5B,MAAM,SAAS,SACX,UAAU,OAAO,CAAC,QAAQ,GAAG,QAAQ,KAAK,MAAM,CAAC,CAAC,GAAG,EAAE,OAAO,UAAU,CAAC,IACzE;EACJ,I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AAE,GAAG;CAC3F,QAAQ,KAAK,CAAC;AAChB,CAAC"}
|
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-Dw8ruU-j.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-Dw8ruU-j.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-Dw8ruU-j.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";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $_ as SkillsConfig, $u as ProjectBrief, $v as SessionArtifact, Af as InteractionRequest, Ag as JsonValue, B as McpCredentialStore, C_ as TurnUsage, Es as ExtensionHostRuntimeBridge, Gl as SyntaxStyles, Ji as AgentHookMap, Jl as ThemeColors, Ju as SessionMeta, Ko as ExtensionRegistry, Kp as ContextBreakdown, Md as ModelChainEntry, Ng as McpToolSchema, O_ as ToolDef, S_ as TurnFinishReason, Uu as EditPayload, Vp as ContextSegment, Vu as EditOutcome, Xd as ProviderKey, Xl as ThemeSurfaces, Xu as StreamEvent, Y_ as SkillConfig, Yi as AgentHooks, Yl as ThemeSelect, Yu as Settings, _g as AgentStats, du as CompletionProvider, jf as InteractionResponse, jg as McpServerConfig, l_ as ThinkingLevel, nf as ProviderDescriptor, nv as Session, om as CacheBreakInfo, ov as SessionStore, qi as Agent, ql as Theme, qu as Screen, t_ as SessionTurn, uu as CompletionItem, vg as AutoCompact, xl as SourcedScanPath, ym as Provider, yo as ExtensionArtifactRow, z as McpCredentialEntry } from "./index-
|
|
2
|
-
import {
|
|
3
|
-
import { P as ProviderUsageSnapshot,
|
|
4
|
-
import { H as ApprovalRequest, V as ApprovalDecision,
|
|
1
|
+
import { $_ as SkillsConfig, $u as ProjectBrief, $v as SessionArtifact, Af as InteractionRequest, Ag as JsonValue, B as McpCredentialStore, C_ as TurnUsage, Es as ExtensionHostRuntimeBridge, Gl as SyntaxStyles, Ji as AgentHookMap, Jl as ThemeColors, Ju as SessionMeta, Ko as ExtensionRegistry, Kp as ContextBreakdown, Md as ModelChainEntry, Ng as McpToolSchema, O_ as ToolDef, S_ as TurnFinishReason, Uu as EditPayload, Vp as ContextSegment, Vu as EditOutcome, Xd as ProviderKey, Xl as ThemeSurfaces, Xu as StreamEvent, Y_ as SkillConfig, Yi as AgentHooks, Yl as ThemeSelect, Yu as Settings, _g as AgentStats, du as CompletionProvider, jf as InteractionResponse, jg as McpServerConfig, l_ as ThinkingLevel, nf as ProviderDescriptor, nv as Session, om as CacheBreakInfo, ov as SessionStore, qi as Agent, ql as Theme, qu as Screen, t_ as SessionTurn, uu as CompletionItem, vg as AutoCompact, xl as SourcedScanPath, ym as Provider, yo as ExtensionArtifactRow, z as McpCredentialEntry } from "./index-Dw8ruU-j.js";
|
|
2
|
+
import { Bt as Hint, Tt as KeyBindings, Y as ResolvedConfig, _ as DiscoveredMcp, f as DiscoveredPlugin, v as DiscoveryError } from "./transcript-anchors-nWzUc3WT.js";
|
|
3
|
+
import { P as ProviderUsageSnapshot, Wt as FileEntry, _t as PreviewResult, a as ActiveTodosState, h as TodoTally, mt as HunkResolution, p as TodoItem } from "./turn-operations-GRw5vbtr.js";
|
|
4
|
+
import { H as ApprovalRequest, V as ApprovalDecision, ut as PromptTurnRef } from "./tool-formatters-CJoSmRjH.js";
|
|
5
5
|
import { Hookable } from "hookable";
|
|
6
6
|
import { spawn } from "node:child_process";
|
|
7
7
|
import { Dispatch, ReactNode, SetStateAction } from "react";
|
|
@@ -1118,193 +1118,6 @@ declare function ConfigProvider({
|
|
|
1118
1118
|
}): import("react").JSX.Element;
|
|
1119
1119
|
declare function useConfig(): ResolvedConfig;
|
|
1120
1120
|
//#endregion
|
|
1121
|
-
//#region src/chat/cred-keys.d.ts
|
|
1122
|
-
/**
|
|
1123
|
-
* Credential-file key arithmetic, split from `./credentials` so the rules can
|
|
1124
|
-
* be enforced where credentials themselves must not be pulled in.
|
|
1125
|
-
*
|
|
1126
|
-
* `./credentials` reaches the provider registry (and through it the pi-ai
|
|
1127
|
-
* factories) for `credKeyOf`; the extension loader — an edge entrypoint that
|
|
1128
|
-
* validates descriptor keys at registration time — must stay clear of that
|
|
1129
|
-
* graph. This module is string arithmetic with no imports.
|
|
1130
|
-
*/
|
|
1131
|
-
/**
|
|
1132
|
-
* Reserved suffix marking a provider's SECOND credential slot.
|
|
1133
|
-
*
|
|
1134
|
-
* Not usable as (or as the tail of) a descriptor's credential key: `foo#alt`
|
|
1135
|
-
* holds `foo`'s alternate credential, so a provider claiming that name would
|
|
1136
|
-
* share storage with it.
|
|
1137
|
-
*/
|
|
1138
|
-
declare const ALTERNATE_CRED_KEY_SUFFIX = "#alt";
|
|
1139
|
-
/**
|
|
1140
|
-
* File key holding a provider's second credential, when it has one of each kind.
|
|
1141
|
-
*
|
|
1142
|
-
* The canonical key always holds the credential the user prefers; this sibling
|
|
1143
|
-
* holds the other. That one invariant is what makes preference selection free:
|
|
1144
|
-
* every existing reader (`applyApiKeyEnv`, the harness provider factories)
|
|
1145
|
-
* already resolves the canonical key, so "switch priority" is just moving two
|
|
1146
|
-
* objects between two keys — no precedence flag to interpret, no resolution
|
|
1147
|
-
* order to keep in sync across layers.
|
|
1148
|
-
*
|
|
1149
|
-
* A sibling key rather than a nested field because the canonical entry gets
|
|
1150
|
-
* REPLACED wholesale on token refresh; anything nested inside it would be
|
|
1151
|
-
* dropped by the next rotation. And older zidane versions look credentials up
|
|
1152
|
-
* by `credKeyOf`, so a suffixed key is simply invisible to them — they read the
|
|
1153
|
-
* preferred credential and behave exactly as before, which is why this needs no
|
|
1154
|
-
* migration or schema version.
|
|
1155
|
-
*/
|
|
1156
|
-
declare function alternateCredKey(fileKey: string): string;
|
|
1157
|
-
/**
|
|
1158
|
-
* True when a key claims the reserved alternate namespace.
|
|
1159
|
-
*
|
|
1160
|
-
* Built-in keys are plain identifiers (`anthropic`, `openai-codex`), but
|
|
1161
|
-
* `ProviderDescriptor.key` / `credentialFileKey` are open strings — so the
|
|
1162
|
-
* reservation is checked, not assumed.
|
|
1163
|
-
*/
|
|
1164
|
-
declare function isReservedCredKey(fileKey: string): boolean;
|
|
1165
|
-
//#endregion
|
|
1166
|
-
//#region src/chat/credentials.d.ts
|
|
1167
|
-
interface ApiKeyCredential {
|
|
1168
|
-
kind: 'apikey';
|
|
1169
|
-
/**
|
|
1170
|
-
* Bearer API key. May be empty when the descriptor has no `envKey` and
|
|
1171
|
-
* authenticates entirely via {@link customFields} (e.g. the `local`
|
|
1172
|
-
* provider, where the auth signal is the configured base URL).
|
|
1173
|
-
*/
|
|
1174
|
-
value: string;
|
|
1175
|
-
/**
|
|
1176
|
-
* Free-form fields collected by the wizard from the descriptor's
|
|
1177
|
-
* `customFields` definitions. Keys match the descriptor field's `key`.
|
|
1178
|
-
* Mirrored into `process.env[field.envVar]` by `applyApiKeyEnv` so the
|
|
1179
|
-
* provider's factory can read them via the existing env-var convention.
|
|
1180
|
-
*/
|
|
1181
|
-
customFields?: Record<string, string>;
|
|
1182
|
-
}
|
|
1183
|
-
interface OAuthCredential {
|
|
1184
|
-
kind: 'oauth';
|
|
1185
|
-
access: string;
|
|
1186
|
-
refresh?: string;
|
|
1187
|
-
expires?: number;
|
|
1188
|
-
/** Provider-specific extras (e.g. OpenAI Codex `accountId`). */
|
|
1189
|
-
[extra: string]: unknown;
|
|
1190
|
-
}
|
|
1191
|
-
type ProviderCredential = ApiKeyCredential | OAuthCredential;
|
|
1192
|
-
/** Top-level shape of `credentials.json` — keys are credential-file keys. */
|
|
1193
|
-
type CredentialsFile = Record<string, ProviderCredential>;
|
|
1194
|
-
/**
|
|
1195
|
-
* Resolve the credentials file path given the resolved TUI data directory
|
|
1196
|
-
* (typically `~/.zidane`, i.e. `config.paths.dir`).
|
|
1197
|
-
*
|
|
1198
|
-
* Matches the convention used elsewhere in the TUI (sessions.db, state.json)
|
|
1199
|
-
* so a single `ZIDANE_STORAGE_DIR` override moves the entire data root.
|
|
1200
|
-
*/
|
|
1201
|
-
declare function credentialsPath(dataDir: string): string;
|
|
1202
|
-
/**
|
|
1203
|
-
* Read credentials from disk.
|
|
1204
|
-
*
|
|
1205
|
-
* Returns `{}` when the file is missing or corrupt (last-ditch tolerance —
|
|
1206
|
-
* a hand-edit gone wrong shouldn't lock the user out of re-authing). On first
|
|
1207
|
-
* call with no file present, attempts a migration from `cwd/.credentials.json`
|
|
1208
|
-
* (the legacy location used by `bun run auth`).
|
|
1209
|
-
*/
|
|
1210
|
-
declare function readCredentials(dataDir: string): CredentialsFile;
|
|
1211
|
-
/** Read a single provider's credential (translating via the descriptor). */
|
|
1212
|
-
declare function readProviderCredential(dataDir: string, descriptor: ProviderDescriptor): ProviderCredential | undefined;
|
|
1213
|
-
/**
|
|
1214
|
-
* Both stored credentials for a provider: `active` is the one every reader
|
|
1215
|
-
* resolves, `alternate` is the stored-but-not-preferred one (if any).
|
|
1216
|
-
*/
|
|
1217
|
-
declare function readProviderCredentialPair(dataDir: string, descriptor: ProviderDescriptor): {
|
|
1218
|
-
active?: ProviderCredential;
|
|
1219
|
-
alternate?: ProviderCredential;
|
|
1220
|
-
};
|
|
1221
|
-
/**
|
|
1222
|
-
* Write credentials atomically (write-then-rename) with mode 0o600.
|
|
1223
|
-
*
|
|
1224
|
-
* Atomic on the same filesystem — readers either see the previous file or the
|
|
1225
|
-
* new one, never a half-written intermediate. Creates the parent dir if needed
|
|
1226
|
-
* (first launch on a fresh machine: `~/.zidane/` may not exist yet).
|
|
1227
|
-
*/
|
|
1228
|
-
declare function writeCredentials(dataDir: string, creds: CredentialsFile): void;
|
|
1229
|
-
/**
|
|
1230
|
-
* Store a credential as the provider's preferred one.
|
|
1231
|
-
*
|
|
1232
|
-
* A credential of the OTHER kind already in the canonical slot is demoted to
|
|
1233
|
-
* {@link alternateCredKey}, not destroyed: authenticating with OAuth used to
|
|
1234
|
-
* silently delete a working API key (and vice versa), leaving the user to
|
|
1235
|
-
* re-enter it. Replacing a credential of the SAME kind is a plain overwrite —
|
|
1236
|
-
* that's a re-auth, not a second source.
|
|
1237
|
-
*
|
|
1238
|
-
* The pair holds AT MOST ONE credential of each kind. A same-kind alternate is
|
|
1239
|
-
* therefore stale — no code path here can produce one, but a file written by an
|
|
1240
|
-
* older build can carry it, and it would surface as two identical source rows
|
|
1241
|
-
* that "switch" between each other. Dropping it on the next write self-heals.
|
|
1242
|
-
*/
|
|
1243
|
-
declare function setProviderCredential(dataDir: string, descriptor: ProviderDescriptor, cred: ProviderCredential): void;
|
|
1244
|
-
/**
|
|
1245
|
-
* Outcome of {@link setPreferredCredential}.
|
|
1246
|
-
*
|
|
1247
|
-
* Three states rather than a boolean because the two non-promoting cases need
|
|
1248
|
-
* opposite handling: `already-active` is a harmless idempotent call (the UI
|
|
1249
|
-
* repaints and moves on), while `not-stored` means the caller asked for a
|
|
1250
|
-
* credential that does not exist and should say so.
|
|
1251
|
-
*/
|
|
1252
|
-
type PreferCredentialResult = 'promoted' | 'already-active' | 'not-stored';
|
|
1253
|
-
/**
|
|
1254
|
-
* Make the provider's stored `source` credential the preferred one.
|
|
1255
|
-
*
|
|
1256
|
-
* Only promotes when a credential of that kind is sitting in the alternate
|
|
1257
|
-
* slot; calling it for the already-active source is harmless. Returns which of
|
|
1258
|
-
* those happened so a caller cannot report a swap that provably did not occur
|
|
1259
|
-
* — the write is silent either way, and a success-shaped `void` was a trap for
|
|
1260
|
-
* any caller that trusted it instead of refetching.
|
|
1261
|
-
*/
|
|
1262
|
-
declare function setPreferredCredential(dataDir: string, descriptor: ProviderDescriptor, source: ProviderCredential['kind']): PreferCredentialResult;
|
|
1263
|
-
/**
|
|
1264
|
-
* Sign a provider out — drops BOTH stored credentials.
|
|
1265
|
-
*
|
|
1266
|
-
* "Signed out" has to mean the provider resolves nothing afterwards, which is
|
|
1267
|
-
* what this has always guaranteed and what callers named it for; promoting the
|
|
1268
|
-
* alternate instead would silently leave the provider authenticated through the
|
|
1269
|
-
* other source. Callers that want the fall-back behavior can read the pair
|
|
1270
|
-
* first ({@link readProviderCredentialPair}) and re-store the survivor.
|
|
1271
|
-
*/
|
|
1272
|
-
declare function removeProviderCredential(dataDir: string, descriptor: ProviderDescriptor): void;
|
|
1273
|
-
/**
|
|
1274
|
-
* Reconcile `process.env` with the stored credentials so the harness providers
|
|
1275
|
-
* pick up the wizard's output via their existing env-var resolution. Called
|
|
1276
|
-
* once at TUI launch after the credentials file has been resolved.
|
|
1277
|
-
*
|
|
1278
|
-
* **Precedence: stored credential > ambient env.** When the user has run the
|
|
1279
|
-
* auth wizard, that's an explicit, recent action — it MUST win over whatever
|
|
1280
|
-
* ambient value is already in `process.env`. Otherwise an upgrade reliably
|
|
1281
|
-
* breaks for anyone whose cwd happens to contain a stale `.env`: Bun
|
|
1282
|
-
* auto-loads `.env` from cwd into `process.env` before our code runs, the
|
|
1283
|
-
* legacy `bun run auth` used to upsert tokens into `cwd/.env`, and even a
|
|
1284
|
-
* one-off `export ANTHROPIC_API_KEY=…` from months ago in the user's shell rc
|
|
1285
|
-
* can outlive its usefulness. None of those should override a key the user
|
|
1286
|
-
* just typed into the wizard.
|
|
1287
|
-
*
|
|
1288
|
-
* Three cases per registered provider with an `envKey`:
|
|
1289
|
-
*
|
|
1290
|
-
* 1. Stored `kind: 'apikey'` → overwrite env with the stored value. Wizard
|
|
1291
|
-
* wins. A debug log fires when this clobbers a different ambient value.
|
|
1292
|
-
* 2. Stored `kind: 'oauth'` → DELETE env, so {@link resolveOAuthApiKey}
|
|
1293
|
-
* falls through to the file-read + refresh path. A stale OAuth token
|
|
1294
|
-
* in env would otherwise short-circuit refresh and get rejected.
|
|
1295
|
-
* 3. No stored entry → leave env alone. Env-only setups (no wizard run yet,
|
|
1296
|
-
* hosts driving zidane purely from secrets management) keep working.
|
|
1297
|
-
*
|
|
1298
|
-
* To opt out and force ambient env to win again, the user signs the provider
|
|
1299
|
-
* out via the wizard (which deletes the stored entry → case 3 above).
|
|
1300
|
-
*
|
|
1301
|
-
* Descriptors without an `envKey` (OAuth-only providers, custom providers
|
|
1302
|
-
* that bypass env-var resolution) are skipped silently.
|
|
1303
|
-
*/
|
|
1304
|
-
declare function applyApiKeyEnv(dataDir: string, registry: Readonly<Record<string, ProviderDescriptor>>, opts?: {
|
|
1305
|
-
log?: (message: string) => void;
|
|
1306
|
-
}): void;
|
|
1307
|
-
//#endregion
|
|
1308
1121
|
//#region src/chat/discovery-context.d.ts
|
|
1309
1122
|
interface DiscoveryContextValue {
|
|
1310
1123
|
/** Parsed `SkillConfig[]` from project + user scan paths. */
|
|
@@ -3350,17 +3163,26 @@ interface FetchProviderUsageOptions {
|
|
|
3350
3163
|
refresh?: boolean;
|
|
3351
3164
|
}
|
|
3352
3165
|
/**
|
|
3353
|
-
* Usage for one provider
|
|
3354
|
-
*
|
|
3355
|
-
*
|
|
3356
|
-
*
|
|
3166
|
+
* Usage for one provider, probed with the credential requests use — or, when
|
|
3167
|
+
* that one is not the kind the probe needs (an API key in use, OAuth accounts
|
|
3168
|
+
* parked beside it), the first stored one that is. What the footer shows.
|
|
3169
|
+
*
|
|
3170
|
+
* `null` means there is nothing to show: the provider has no usage surface,
|
|
3171
|
+
* no credential of the kind its probe needs (file or, for API keys, env), or
|
|
3172
|
+
* the environment opted out (see {@link usageChecksOptedOut}).
|
|
3357
3173
|
*
|
|
3358
3174
|
* Never rejects. Transport and parse failures land in the snapshot.
|
|
3359
3175
|
*/
|
|
3360
3176
|
declare function fetchProviderUsage(dataDir: string, descriptor: ProviderDescriptor, opts?: FetchProviderUsageOptions): Promise<ProviderUsageSnapshot | null>;
|
|
3177
|
+
/**
|
|
3178
|
+
* Usage for EVERY credential of a provider the probe can use — one snapshot
|
|
3179
|
+
* per stored OAuth account, the active one first. What the panel renders.
|
|
3180
|
+
* Empty under the same conditions {@link fetchProviderUsage} returns `null`.
|
|
3181
|
+
*/
|
|
3182
|
+
declare function fetchProviderUsageAccounts(dataDir: string, descriptor: ProviderDescriptor, opts?: FetchProviderUsageOptions): Promise<readonly ProviderUsageSnapshot[]>;
|
|
3361
3183
|
/**
|
|
3362
3184
|
* Usage for every registered provider that has both a usage surface and a
|
|
3363
|
-
* usable credential, in registry order
|
|
3185
|
+
* usable credential, in registry order, every account included.
|
|
3364
3186
|
*/
|
|
3365
3187
|
declare function fetchAllProviderUsage(dataDir: string, registry: Readonly<Record<string, ProviderDescriptor>>, opts?: FetchProviderUsageOptions): Promise<readonly ProviderUsageSnapshot[]>;
|
|
3366
3188
|
//#endregion
|
|
@@ -4015,5 +3837,5 @@ declare function renderActiveTodoAnchor(todos: readonly TodoItem[], options?: Ac
|
|
|
4015
3837
|
*/
|
|
4016
3838
|
declare function createActiveTodoAnchorHooks(options?: ActiveTodoAnchorOptions): AgentHookMap;
|
|
4017
3839
|
//#endregion
|
|
4018
|
-
export { ProjectsFile as $,
|
|
4019
|
-
//# sourceMappingURL=index-
|
|
3840
|
+
export { ProjectsFile as $, ChatTurnsReadToolOptions as $i, shouldAutoGenerateTitle as $n, updateAppliedMarkerPath as $r, parentServerName as $t, buildSkillsConfig as A, ArtifactViewRow as Ai, createMemoryApprovalsStore as An, bootTick as Ar, modelChainMetadata as At, SettingsCategoryDescriptor as B, COMMUNICATION_DOCTRINE as Bi, QueuedAttachment as Bn, useUpdateCheck as Br, clearMcpToolsCache as Bt, userSystemMdPath as C, performInPlaceSelfUpdate as Ci, EditOutcomeLedger as Cn, ClaudeImportSummary as Cr, redirectUriFromAuthUrl as Ct, SpawnStartRecord as D, chatWindowBehavior as Di, ApprovalHub as Dn, importFromClaudeCode as Dr, runOAuthLogin as Dt, useStreamBuffer as E, chatAutoCompactBehavior as Ei, runCompaction as En, hasClaudeCodeSetup as Er, oauthUsesManualCodePaste as Et, SETTINGS_CATEGORIES as F, DiscoverAgentsMdOptions as Fi, CommandSummary as Fn, upgradeInstalledPackages as Fr, mcpsWritePath as Ft, StringSettingKey as G, INTERACTION_GUIDANCE_NO_PROMPTS as Gi, SessionPresence as Gn, InstalledVersionWatcher as Gr, subscribeMcpToolsCache as Gt, SettingsInput as H, EnvSectionOptions as Hi, RunningWorkItem as Hn, RunUpdateCommandResult as Hr, mcpToolsCachePath as Ht, SETTINGS_CHOICES as I, discoverAgentsMd as Ii, HostSettings as In, BuildUpdateHintOptions as Ir, removeMcpServer as It, folderlessCwd as J, SUBAGENT_GUIDANCE as Ji, WireApprovalRequest as Jn, UseRestartRequiredOptions as Jr, useMcpToolToggleMap as Jt, enforceSettingsInvariants as K, PLAN_MODE_DOCTRINE as Ki, StreamProgressInfo as Kn, UPDATE_APPLIED_MARKER as Kr, McpToolToggleSet as Kt, SETTINGS_INPUTS as L, renderAgentsMdBlock as Li, HostSignal as Ln, UseUpdateCheckOptions as Lr, upsertMcpServer as Lt, discoverProjectSkills as M, summarizeArtifactCounts as Mi, PendingApprovalsStore as Mn, UpgradePackageResult as Mr, McpConfigScope as Mt, BooleanSettingKey as N, AgentsMdFile as Ni, ApprovalOriginator as Nn, UpgradeProgressEvent as Nr, RemoveMcpResult as Nt, buildSpawnEndEvent as O, ArtifactScope as Oi, ApprovalRequestInput as On, tryOpenBrowser as Or, supportsOAuth as Ot, DEFAULT_SETTINGS as P, AgentsMdResult as Pi, CommandArgSuggestionSummary as Pn, UpgradeReport as Pr, UpsertMcpResult as Pt, ProjectEntry as Q, envSection as Qi, generateSessionTitle as Qn, readUpdateAppliedMarker as Qr, indexOfServerRow as Qt, SETTINGS_TOGGLES as R, ACTIONS_WITH_CARE_DOCTRINE as Ri, PendingInteraction as Rn, buildRestartHint as Rr, CachedMcpToolList as Rt, userScopeOverridesLoad as S, parseSemver as Si, createInteractionHub as Sn, ClaudeImportOptions as Sr, normalizeRedirectPaste as St, StreamSource as T, resolvePlatformPackage as Ti, CompactionEntry as Tn, countClaudeSessionFiles as Tr, OAuthPrompt$1 as Tt, SettingsProvider as U, IDENTITY_PREFIX as Ui, SendOptions as Un, runUpdateCommand as Ur, refreshMcpToolsCatalog as Ut, SettingsChoice as V, DOING_TASKS_DOCTRINE as Vi, QueuedItem as Vn, RunUpdateCommandOptions as Vr, loadMcpToolsCache as Vt, SettingsToggle as W, INTERACTION_GUIDANCE as Wi, SerializedPreview as Wn, InstalledVersionState as Wr, saveMcpToolsCache as Wt, scopeCwd as X, buildBuildSystem as Xi, GenerateSessionTitleOptions as Xn, hasUpdateAppliedMarker as Xr, VisibleMcpRow as Xt, resolveSessionCwd as Y, TOKEN_DISCIPLINE_DOCTRINE as Yi, toTodosSnapshot as Yn, WatchInstalledVersionOptions as Yr, useMcpToolToggleSet as Yt, IMPLICITLY_SAFE_TOOLS as Z, buildPlanSystem as Zi, cleanTitle as Zn, probeInstalledVersion as Zr, buildVisibleMcpRows as Zt, DiscoverSystemMdOptions as _, checkForUpdate as _i, createChatHost as _n, ArtifactReferenceData as _r, usageSourceFor as _t, GRUVBOX_DARK as a, findInstalledCompanion as ai, useMcpAuthState as an, Commit as ar, readProjects as at, discoverSystemMd as b, detectLibc as bi, WorkerSummary as bn, scoreArtifacts as br, FetchOAuthRedirectResult as bt, CATPPUCCIN_LATTE as c, InPlaceUpdateResult as ci, McpAuthStatus as cn, Walk as cr, runEndNotice as ct, ThemeProvider as d, PerformInPlaceUpdateOptions as di, extractEditPayloadForGate as dn, DiscoveryProvider as dr, clearProviderUsageCache as dt, chatReferenceTokensForPrompt as ea, useRestartRequired as ei, createFileMcpCredentialStore as en, BuildHintsOptions as er, addToSafelist as et, useColors as f, PerformSelfUpdateOptions as fi, readFileSafe as fn, useDiscovery as fr, fetchAllProviderUsage as ft, useTheme as g, UpdateStatus as gi, ContextSegmentsReport as gn, ARTIFACTS_COMPLETION_PROVIDER_ID as gr, usageChecksOptedOut as gt, useSyntaxStyles as h, TarballAvailabilityOptions as hi, ChatHost as hn, useConfig as hr, providerUsageSupported as ht, VAPORWAVE_THEME as i, unwrapCallTool as ia, InstalledCompanion as ii, useMcpAuthDispatch as in, quoteForShell as ir, projectsFilePath as it, defaultSkillScanPaths as j, groupArtifacts as ji, ChatHostEnvironment as jn, UpgradeInstalledPackagesOptions as jr, sessionModelFallbacks as jt, buildSpawnStartEvent as k, ArtifactViewGroup as ki, createApprovalHub as kn, bootProfileEnabled as kr, ModelFallbackTarget as kt, CATPPUCCIN_MACCHIATO as l, PackageManagerCommand as li, getMcpAuthStatus as ln, createDiscoverySlot as lr, FetchProviderUsageOptions as lt, useSurfaces as m, SelfUpdateResult as mi, serializePreview as mn, ConfigProvider as mr, fetchProviderUsageAccounts as mt, createActiveTodoAnchorHooks as n, CALL_TOOL_NAME as na, writeUpdateAppliedMarker as ni, patchMcpCredential as nn, shortChord as nr, isOnSafelist as nt, GRUVBOX_LIGHT as o, CheckForUpdateOptions as oi, McpAuthEvent as on, DiscoverySlot as or, suggestSafelistEntries as ot, useSelectStyle as p, PlatformTarballOptions as pi, resolveCwdPath as pn, useDiscoveryOptional as pr, fetchProviderUsage as pt, useSettings as q, PLAN_MODE_DOCTRINE_NO_PROMPTS as qi, TodosSnapshot as qn, UpdateAppliedMarker as qr, buildToolToggle as qt, renderActiveTodoAnchor as r, UnwrappedToolCall as ra, CompanionSpec as ri, McpAuthProvider as rn, parseEditorCommand as rr, matchesSafelistEntry as rt, CATPPUCCIN_FRAPPE as s, DetectPackageManagerOptions as si, McpAuthStateMap as sn, DiscoverySlotOptions as sr, writeProjects as st, ActiveTodoAnchorOptions as t, createChatTurnsReadTool as ta, watchInstalledVersion as ti, mcpCredentialsPath as tn, buildHints as tr, getSafelist as tt, CATPPUCCIN_MOCHA as u, PackageManagerId as ui, reduceMcpAuth as un, DiscoveryContextValue as ur, USAGE_CACHE_TTL_MS as ut, SystemMdFile as v, checkTarballAvailable as vi, CreateWorkerParams as vn, ArtifactReferenceEntry as vr, findGitRoot as vt, StreamBuffer as w, performSelfUpdate as wi, PendingAnnotation as wn, ClaudeSessionImportResult as wr, OAuthFlowOptions as wt, renderSystemMdSeed as x, detectPackageManager as xi, InteractionHub as xn, ClaudeCopyResult as xr, fetchOAuthRedirect as xt, SystemMdResult as y, compareSemver as yi, WorkerRow as yn, createArtifactsCompletionProvider as yr, formatPathForCwd as yt, SettingsCategory as z, BuildSystemOptions as zi, PromptAttachment as zn, buildUpdateHint as zr, McpToolsCache as zt };
|
|
3841
|
+
//# sourceMappingURL=index-D9ntsW7o.d.ts.map
|