zidane 7.0.8 → 7.0.10

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.
Files changed (77) hide show
  1. package/dist/{acp-Wr8l4IDI.js → acp-bTPYx7Sd.js} +2 -2
  2. package/dist/{acp-Wr8l4IDI.js.map → acp-bTPYx7Sd.js.map} +1 -1
  3. package/dist/acp-cli.js +3 -3
  4. package/dist/acp.d.ts +1 -1
  5. package/dist/acp.js +1 -1
  6. package/dist/{agent-C-camKQW.js → agent-DRNT6DbC.js} +5 -2
  7. package/dist/agent-DRNT6DbC.js.map +1 -0
  8. package/dist/agent.d.ts +1 -1
  9. package/dist/agent.js +1 -1
  10. package/dist/{approvals-BF15XIhM.js → approvals-B4PYwOnW.js} +333 -95
  11. package/dist/approvals-B4PYwOnW.js.map +1 -0
  12. package/dist/{auth-BdwDROYg.js → auth-BcG1Y3QL.js} +2 -2
  13. package/dist/{auth-BdwDROYg.js.map → auth-BcG1Y3QL.js.map} +1 -1
  14. package/dist/chat/pure.d.ts +3 -3
  15. package/dist/chat.d.ts +6 -6
  16. package/dist/chat.js +4 -4
  17. package/dist/contexts/daytona.d.ts +1 -1
  18. package/dist/contexts/e2b.d.ts +1 -1
  19. package/dist/daemon-cli.js +1 -1
  20. package/dist/eval.d.ts +1 -1
  21. package/dist/extensions.d.ts +1 -1
  22. package/dist/extensions.js +1 -1
  23. package/dist/headless.d.ts +1 -1
  24. package/dist/headless.js +1 -1
  25. package/dist/{index-B-FSaM3_.d.ts → index-DFGECPfm.d.ts} +13 -1
  26. package/dist/{index-B-FSaM3_.d.ts.map → index-DFGECPfm.d.ts.map} +1 -1
  27. package/dist/{index-Dju2gu3w.d.ts → index-DP7xYXr9.d.ts} +74 -7
  28. package/dist/index-DP7xYXr9.d.ts.map +1 -0
  29. package/dist/index.d.ts +1 -1
  30. package/dist/index.js +1 -1
  31. package/dist/{ipc-3Pb7G8JY.js → ipc-CB6NoNxG.js} +2 -2
  32. package/dist/{ipc-3Pb7G8JY.js.map → ipc-CB6NoNxG.js.map} +1 -1
  33. package/dist/ipc.d.ts +25 -7
  34. package/dist/ipc.d.ts.map +1 -1
  35. package/dist/ipc.js +4 -4
  36. package/dist/mcp.d.ts +1 -1
  37. package/dist/output/stream-json.d.ts +1 -1
  38. package/dist/output/terminal.d.ts +1 -1
  39. package/dist/plugins.d.ts +1 -1
  40. package/dist/presets.d.ts +1 -1
  41. package/dist/presets.js +1 -1
  42. package/dist/providers/anthropic.d.ts +1 -1
  43. package/dist/providers/arcee.d.ts +1 -1
  44. package/dist/providers/baseten.d.ts +1 -1
  45. package/dist/providers/cerebras.d.ts +1 -1
  46. package/dist/providers/local.d.ts +1 -1
  47. package/dist/providers/openai-compat.d.ts +1 -1
  48. package/dist/providers/openai.d.ts +1 -1
  49. package/dist/providers/openrouter.d.ts +1 -1
  50. package/dist/providers/xai.d.ts +1 -1
  51. package/dist/providers.d.ts +1 -1
  52. package/dist/restate.d.ts +1 -1
  53. package/dist/restate.js +1 -1
  54. package/dist/{server-CcqxlLf3.js → server-BuqLVgQA.js} +27 -12
  55. package/dist/server-BuqLVgQA.js.map +1 -0
  56. package/dist/session/sqlite.d.ts +1 -1
  57. package/dist/session.d.ts +1 -1
  58. package/dist/skills.d.ts +1 -1
  59. package/dist/{tool-formatters-DO56YBBw.d.ts → tool-formatters-C-s_-u0v.d.ts} +2 -2
  60. package/dist/{tool-formatters-DO56YBBw.d.ts.map → tool-formatters-C-s_-u0v.d.ts.map} +1 -1
  61. package/dist/tools/fetch-url.d.ts +1 -1
  62. package/dist/tools/web-search.d.ts +1 -1
  63. package/dist/tools.d.ts +1 -1
  64. package/dist/tools.js +1 -1
  65. package/dist/{transcript-anchors-DXqWWGbq.d.ts → transcript-anchors-D1ToF-EW.d.ts} +2 -2
  66. package/dist/{transcript-anchors-DXqWWGbq.d.ts.map → transcript-anchors-D1ToF-EW.d.ts.map} +1 -1
  67. package/dist/tui.d.ts +3 -3
  68. package/dist/tui.js +4 -4
  69. package/dist/{turn-operations-DKFYWP3O.d.ts → turn-operations-Bp5-BAki.d.ts} +3 -3
  70. package/dist/{turn-operations-DKFYWP3O.d.ts.map → turn-operations-Bp5-BAki.d.ts.map} +1 -1
  71. package/dist/types.d.ts +1 -1
  72. package/docs/IPC.md +5 -0
  73. package/package.json +1 -1
  74. package/dist/agent-C-camKQW.js.map +0 -1
  75. package/dist/approvals-BF15XIhM.js.map +0 -1
  76. package/dist/index-Dju2gu3w.d.ts.map +0 -1
  77. package/dist/server-CcqxlLf3.js.map +0 -1
package/dist/agent.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { $r as createRunSummaryCollector, Bp as fnv1a32, Fp as CacheDimensionDiff, Gi as AgentHookMap, Gr as RunSummaryBudget, Hp as installCacheBreakLogger, Ip as CacheDimensionName, Ji as McpConnector, Jr as RunSummaryCollectorOptions, Ki as AgentHooks, Kr as RunSummaryByModel, Lp as CacheDimensionSnapshot, Np as CacheBreakInfo, Pp as CacheBreakLoggerOptions, Qg as getReadState, Qr as RunSummaryValidation, Rp as CacheDriftInfo, Up as snapshotCacheDimensions, Ur as RunSummary, Vp as hashMessages, Wi as Agent, Wr as RunSummaryBlock, Xg as ReadStateEntry, Xi as McpToolWrap, Xr as RunSummaryRepeatGuard, Yg as HydrateReadStateOptions, Yi as McpToolMeta, Yr as RunSummaryError, Zg as ReadStateMap, Zi as createAgent, Zr as RunSummaryTokens, e_ as hydrateReadStateFromSession, n_ as readStateKey, qi as AgentOptions, qr as RunSummaryCollector, r_ as resolveReadStateMap, t_ as hydrateReadStateFromSessionAsync, zp as diffCacheDimensions } from "./index-B-FSaM3_.js";
1
+ import { $r as createRunSummaryCollector, Bp as fnv1a32, Fp as CacheDimensionDiff, Gi as AgentHookMap, Gr as RunSummaryBudget, Hp as installCacheBreakLogger, Ip as CacheDimensionName, Ji as McpConnector, Jr as RunSummaryCollectorOptions, Ki as AgentHooks, Kr as RunSummaryByModel, Lp as CacheDimensionSnapshot, Np as CacheBreakInfo, Pp as CacheBreakLoggerOptions, Qg as getReadState, Qr as RunSummaryValidation, Rp as CacheDriftInfo, Up as snapshotCacheDimensions, Ur as RunSummary, Vp as hashMessages, Wi as Agent, Wr as RunSummaryBlock, Xg as ReadStateEntry, Xi as McpToolWrap, Xr as RunSummaryRepeatGuard, Yg as HydrateReadStateOptions, Yi as McpToolMeta, Yr as RunSummaryError, Zg as ReadStateMap, Zi as createAgent, Zr as RunSummaryTokens, e_ as hydrateReadStateFromSession, n_ as readStateKey, qi as AgentOptions, qr as RunSummaryCollector, r_ as resolveReadStateMap, t_ as hydrateReadStateFromSessionAsync, zp as diffCacheDimensions } from "./index-DFGECPfm.js";
2
2
  export { type Agent, type AgentHookMap, type AgentHooks, type AgentOptions, type CacheBreakInfo, type CacheBreakLoggerOptions, type CacheDimensionDiff, type CacheDimensionName, type CacheDimensionSnapshot, type CacheDriftInfo, type HydrateReadStateOptions, type McpConnector, type McpToolMeta, type McpToolWrap, type ReadStateEntry, type ReadStateMap, type RunSummary, type RunSummaryBlock, type RunSummaryBudget, type RunSummaryByModel, type RunSummaryCollector, type RunSummaryCollectorOptions, type RunSummaryError, type RunSummaryRepeatGuard, type RunSummaryTokens, type RunSummaryValidation, createAgent, createRunSummaryCollector, diffCacheDimensions, fnv1a32, getReadState, hashMessages, hydrateReadStateFromSession, hydrateReadStateFromSessionAsync, installCacheBreakLogger, readStateKey, resolveReadStateMap, snapshotCacheDimensions };
package/dist/agent.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Gn as readStateKey, Kn as resolveReadStateMap, Un as hydrateReadStateFromSession, Vn as getReadState, Wn as hydrateReadStateFromSessionAsync, t as createAgent } from "./agent-C-camKQW.js";
1
+ import { Gn as readStateKey, Kn as resolveReadStateMap, Un as hydrateReadStateFromSession, Vn as getReadState, Wn as hydrateReadStateFromSessionAsync, t as createAgent } from "./agent-DRNT6DbC.js";
2
2
  import { a as snapshotCacheDimensions, i as installCacheBreakLogger, n as fnv1a32, r as hashMessages, t as diffCacheDimensions } from "./cache-telemetry-ehVdWsg2.js";
3
3
  import { t as createRunSummaryCollector } from "./run-summary-BU_NgwUT.js";
4
4
  export { createAgent, createRunSummaryCollector, diffCacheDimensions, fnv1a32, getReadState, hashMessages, hydrateReadStateFromSession, hydrateReadStateFromSessionAsync, installCacheBreakLogger, readStateKey, resolveReadStateMap, snapshotCacheDimensions };
@@ -1,6 +1,6 @@
1
1
  import { n as __require } from "./rolldown-runtime-BhDjJH2R.js";
2
2
  import { n as THINKING_LEVELS, u as toolResultToText } from "./types-CWgENVLY.js";
3
- import { A as selectFilesFromSession, Ct as waitTask, D as resolveTasksDir, Et as isSpawnTool, Fn as effectiveContextWindow, Ft as readFile$1, G as summaryToTurn, Gt as edit, Lt as multiEdit, M as compactConversation, Nt as shell, O as buildPostCompactAttachments, Pn as OUTPUT_RESERVE_TOKENS, T as resolvePersistDir, Tt as createSpawnTool, Ut as grep, Vt as listFiles, Wt as glob, Y as EMPTY_EXTENSION_REGISTRY, _t as composePresets, an as readKeybindingsRaw, b as migrateSessionArtifactDirs, f as applyCompactSummaryCutoff, ft as filterRegistryPlugins, jt as shellKill, lt as composeExtensionPreset, nn as mergeKeybindings, on as resolveExtensionKeybindings, st as buildExtensionPreset, t as createAgent, vt as definePreset, w as resolveMcpWarningsDir, xt as writeFile$1, yn as createDebugLog } from "./agent-C-camKQW.js";
3
+ import { A as selectFilesFromSession, Ct as waitTask, D as resolveTasksDir, Et as isSpawnTool, Fn as effectiveContextWindow, Ft as readFile$1, G as summaryToTurn, Gt as edit, Lt as multiEdit, M as compactConversation, Nt as shell, O as buildPostCompactAttachments, Pn as OUTPUT_RESERVE_TOKENS, T as resolvePersistDir, Tt as createSpawnTool, Ut as grep, Vt as listFiles, Wt as glob, Y as EMPTY_EXTENSION_REGISTRY, _t as composePresets, an as readKeybindingsRaw, b as migrateSessionArtifactDirs, f as applyCompactSummaryCutoff, ft as filterRegistryPlugins, jt as shellKill, lt as composeExtensionPreset, nn as mergeKeybindings, on as resolveExtensionKeybindings, st as buildExtensionPreset, t as createAgent, vt as definePreset, w as resolveMcpWarningsDir, xt as writeFile$1, yn as createDebugLog } from "./agent-DRNT6DbC.js";
4
4
  import { F as parseCommandInvocation, M as commandBlocksToContent, P as executeCommand, c as SKILL_EDIT_METADATA_KEY, g as readSkillEditMarker, j as commandBlockToEvent, l as ZIDANE_EXTENSION_SKILL_NAME, m as extensionDirForCwd, s as EXTENSION_EDIT_METADATA_KEY, u as ZIDANE_SKILL_EDIT_SKILL_NAME, v as withZidaneExtensionSkill, w as generateStructuredData, y as withZidaneSkillEditSkill } from "./src-DzzhE2YO.js";
5
5
  import { a as formatDuration, c as previewLine, i as fmtTokens, l as shortId, s as formatTaskSummary } from "./format-BF745pLL.js";
6
6
  import { r as createProcessContext } from "./contexts-BSFQVclW.js";
@@ -18,7 +18,7 @@ import { i as findActiveTriggers, n as collectReferences, o as mergeSuggestions,
18
18
  import { r as fetchUrl } from "./fetch-url-ma-5_p0p.js";
19
19
  import { webSearch } from "./tools/web-search.js";
20
20
  import { $t as hasRunReceipt, A as chunkMarkdownForRender, Dt as MAIN_PLAYBOOK_FRAGMENT, Ft as orchestratedBy, It as parseSessionEventXml, K as filterChainFallbacks, Lt as renderProjectsBriefing, Mt as WORKER_REPORT_FRAGMENT, Nt as artifactsFromTurns, Ot as MAIN_SESSION_TITLE, Pt as isMainSession, Q as restoreChainFallbacks, Rt as renderSessionEventXml, Sn as chatReferenceTokensFromText, V as buildRunModel, Vt as sessionEventLabel, Xt as formatRunReceiptLine, _n as resolveApprovalForPayload, bt as promptTurnRefs, en as runReceiptFromRun, gn as parseEditOutcomesFromResult, hn as mergeApprovalAndBodyOutcomes, jt as SESSION_ROLE_KEY, kt as ORCHESTRATED_BY_KEY, ln as previewEditPayload, m as ownerOf, pn as buildEditOutcomesAnnotation, sn as extractEditPayload, u as capTranscriptEvents, vn as rewriteMultiEditHeader, yn as stripEditOutcomesAnnotation } from "./turn-operations-CZLsNgw-.js";
21
- import { T as restoreModelOptions, b as modelSupportsReasoning, d as BUILTIN_PROVIDERS, g as getContextWindow, h as enabledModelOptions, i as readCredentials, m as credKeyOf, n as applyApiKeyEnv, r as credentialsPath, t as detectAuth, x as modelsForDescriptor } from "./auth-BdwDROYg.js";
21
+ import { T as restoreModelOptions, b as modelSupportsReasoning, d as BUILTIN_PROVIDERS, g as getContextWindow, h as enabledModelOptions, i as readCredentials, m as credKeyOf, n as applyApiKeyEnv, r as credentialsPath, t as detectAuth, x as modelsForDescriptor } from "./auth-BcG1Y3QL.js";
22
22
  import { basename, delimiter, dirname, isAbsolute, join, posix, relative, resolve, sep } from "node:path";
23
23
  import { Buffer } from "node:buffer";
24
24
  import { chmodSync, closeSync, cpSync, createReadStream, createWriteStream, existsSync, mkdirSync, mkdtempSync, openSync, readFileSync, readSync, readdirSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
@@ -3110,6 +3110,49 @@ function detectPackageManager(opts = {}) {
3110
3110
  };
3111
3111
  }
3112
3112
  /**
3113
+ * Whether `<packageName>@<version>` can actually be DOWNLOADED right now, not
3114
+ * merely resolved. Right after a publish the registry serves the new
3115
+ * manifest minutes before the tarball reaches the CDN; a package manager
3116
+ * that hits that window on an `optionalDependencies` platform binary
3117
+ * silently skips it and leaves a bin with nothing behind it. `upgrade` asks
3118
+ * this before spawning the PM so it can wait instead of breaking the install.
3119
+ *
3120
+ * - `'ok'` tarball responds 2xx
3121
+ * - `'missing'` manifest or tarball 404 (published, not propagated)
3122
+ * - `'unknown'` network / registry error; the caller decides
3123
+ */
3124
+ async function checkTarballAvailable(opts) {
3125
+ const fetcher = opts.fetcher ?? globalThis.fetch;
3126
+ const registry = trimSlash(opts.registry ?? "https://registry.npmjs.org");
3127
+ const ac = new AbortController();
3128
+ const timer = setTimeout(() => ac.abort(), opts.timeoutMs ?? 8e3);
3129
+ try {
3130
+ const manifest = await fetcher(`${registry}/${encodeURIComponent(opts.packageName)}/${encodeURIComponent(opts.version)}`, {
3131
+ headers: {
3132
+ "accept": "application/json",
3133
+ "user-agent": "zidane-update-check/1"
3134
+ },
3135
+ signal: ac.signal,
3136
+ redirect: "follow"
3137
+ });
3138
+ if (manifest.status === 404) return "missing";
3139
+ if (!manifest.ok) return "unknown";
3140
+ const tarball = (await manifest.json()).dist?.tarball;
3141
+ if (!tarball) return "unknown";
3142
+ const head = await fetcher(tarball, {
3143
+ method: "HEAD",
3144
+ signal: ac.signal,
3145
+ redirect: "follow"
3146
+ });
3147
+ if (head.status === 404) return "missing";
3148
+ return head.ok ? "ok" : "unknown";
3149
+ } catch {
3150
+ return "unknown";
3151
+ } finally {
3152
+ clearTimeout(timer);
3153
+ }
3154
+ }
3155
+ /**
3113
3156
  * Re-install the package globally via the host's package manager. Resolves
3114
3157
  * with the spawned command's exit code, or rejects only when the caller's
3115
3158
  * `signal` aborts. PM failures surface as a non-zero `exitCode` — the
@@ -3117,7 +3160,7 @@ function detectPackageManager(opts = {}) {
3117
3160
  */
3118
3161
  async function performSelfUpdate(options) {
3119
3162
  const detect = options.detect ?? detectPackageManager;
3120
- const command = options.packageManager && options.packageManager !== "auto" ? overrideManager(options.packageManager, options.packageName, options.channel ?? "latest") : detect({
3163
+ const command = options.packageManager && options.packageManager !== "auto" ? overrideManager$1(options.packageManager, options.packageName, options.channel ?? "latest") : detect({
3121
3164
  packageName: options.packageName,
3122
3165
  channel: options.channel ?? "latest"
3123
3166
  });
@@ -3161,7 +3204,7 @@ async function performSelfUpdate(options) {
3161
3204
  }
3162
3205
  });
3163
3206
  }
3164
- function overrideManager(id, packageName, channel) {
3207
+ function overrideManager$1(id, packageName, channel) {
3165
3208
  const target = `${packageName}@${channel}`;
3166
3209
  switch (id) {
3167
3210
  case "pnpm": return {
@@ -3611,8 +3654,16 @@ Environment:
3611
3654
  * - `0` — update succeeded, `--check` reported no update, or `--check`
3612
3655
  * reported an update (informational only).
3613
3656
  * - `1` — update failed (PM exit non-zero, in-place download failed,
3614
- * registry returned non-2xx).
3657
+ * registry returned non-2xx, release not downloadable yet).
3615
3658
  * - `2` — argv parse error (unknown flag).
3659
+ *
3660
+ * Output is a short ledger, one line per package, ASCII-only apart from the
3661
+ * arrow:
3662
+ * zidane-tui 7.0.7 → 7.0.8
3663
+ * $ volta install zidane-tui@latest
3664
+ * …
3665
+ * zidane-tui 7.0.8 ok
3666
+ * Diagnostics go to stderr and say what to do next.
3616
3667
  */
3617
3668
  async function runUpdateCommand(options) {
3618
3669
  const out = options.stdout ?? process.stdout;
@@ -3628,8 +3679,10 @@ async function runUpdateCommand(options) {
3628
3679
  return { exitCode: 0 };
3629
3680
  }
3630
3681
  const flags = parsed;
3631
- const channel = parsed.channel ?? options.defaultChannel ?? "latest";
3632
- const registry = parsed.registry ?? options.registry;
3682
+ const channel = flags.channel ?? options.defaultChannel ?? "latest";
3683
+ const registry = flags.registry ?? options.registry;
3684
+ const tarballAvailable = options.checkTarballAvailable ?? checkTarballAvailable;
3685
+ const install = options.performSelfUpdate ?? performSelfUpdate;
3633
3686
  const status = await checkForUpdate({
3634
3687
  packageName: options.packageName,
3635
3688
  currentVersion: options.currentVersion,
@@ -3639,41 +3692,64 @@ async function runUpdateCommand(options) {
3639
3692
  force: true,
3640
3693
  timeoutMs: 8e3
3641
3694
  });
3642
- const companions = parsed.tuiOnly ? [] : await resolveCompanions(options, channel, registry);
3643
- if (parsed.check) {
3644
- if (status.source === "error") err.write(`Could not check \`${channel}\` (${status.error ?? "unknown error"}). Current: v${options.currentVersion}.\n`);
3645
- else if (!status.latest) err.write(`Could not determine latest version on \`${channel}\`. Current: v${options.currentVersion}.\n`);
3646
- else if (compareSemver(status.latest, options.currentVersion) > 0) out.write(`v${status.latest} is available on \`${channel}\` (current: v${options.currentVersion}).\n`);
3647
- else out.write(`Already on v${options.currentVersion} (latest on \`${channel}\` is v${status.latest}).\n`);
3648
- for (const c of companions) out.write(`${companionStatusLine(c, channel)}\n`);
3695
+ const self = {
3696
+ name: options.packageName,
3697
+ current: options.currentVersion,
3698
+ status,
3699
+ outdated: status.latest !== null && compareSemver(status.latest, options.currentVersion) > 0
3700
+ };
3701
+ const companions = flags.tuiOnly ? [] : await resolveCompanions(options, channel, registry);
3702
+ const entries = [self, ...companions];
3703
+ const label = (name) => name.padEnd(Math.max(...entries.map((e) => e.name.length)));
3704
+ if (flags.check) {
3705
+ for (const e of entries) out.write(`${label(e.name)} ${statusText(e)}\n`);
3649
3706
  return { exitCode: 0 };
3650
3707
  }
3651
3708
  if (status.source === "error") {
3652
- err.write(`zidane upgrade: registry check failed (${status.error ?? "unknown error"})\n`);
3653
- if (!parsed.force) {
3654
- err.write("Pass --force to attempt the install anyway.\n");
3709
+ err.write(`${self.name}: registry check failed: ${status.error ?? "unknown error"}\n`);
3710
+ if (!flags.force) {
3711
+ err.write("Use --force to install anyway.\n");
3655
3712
  return { exitCode: 1 };
3656
3713
  }
3657
3714
  }
3658
- const pendingCompanions = companions.filter((c) => parsed.force || c.outdated);
3659
- for (const c of companions.filter((c) => c.status.source === "error" && !parsed.force)) err.write(`${companionStatusLine(c, channel)}\n`);
3660
- const tuiUpToDate = status.latest !== null && !parsed.force && compareSemver(status.latest, options.currentVersion) <= 0;
3661
- if (tuiUpToDate) {
3662
- out.write(`Already on v${options.currentVersion} (latest on \`${channel}\` is v${status.latest}).\n`);
3663
- for (const c of companions.filter((c) => !c.outdated)) out.write(`${companionStatusLine(c, channel)}\n`);
3664
- if (pendingCompanions.length === 0) return { exitCode: 0 };
3715
+ for (const c of companions.filter((c) => c.status.source === "error" && !flags.force)) err.write(`${c.name}: registry check failed: ${c.status.error ?? "unknown error"}\n`);
3716
+ const selfPending = flags.force || self.outdated;
3717
+ const pendingCompanions = companions.filter((c) => flags.force || c.outdated);
3718
+ for (const e of entries.filter((e) => !e.outdated && e.status.source !== "error")) out.write(`${label(e.name)} ${statusText(e)}\n`);
3719
+ if (!selfPending && pendingCompanions.length === 0) return { exitCode: 0 };
3720
+ let exitCode = 0;
3721
+ if (selfPending) exitCode = await upgradeSelf();
3722
+ for (const c of pendingCompanions) {
3723
+ const code = await upgradeCompanion(c);
3724
+ if (exitCode === 0) exitCode = code;
3725
+ }
3726
+ return { exitCode };
3727
+ /**
3728
+ * Refuse to spawn the PM while the release is not fetchable yet: npm treats
3729
+ * a 404 on an `optionalDependencies` platform binary as "skip" and leaves
3730
+ * an empty install behind the bin. `--force` overrides (mirrors, offline
3731
+ * registries).
3732
+ */
3733
+ async function ready(packageName, version) {
3734
+ if (flags.force || flags.dryRun) return true;
3735
+ if (await tarballAvailable({
3736
+ packageName,
3737
+ version,
3738
+ registry
3739
+ }) !== "missing") return true;
3740
+ err.write(`${packageName} ${version} is published but not downloadable yet. Try again in a few minutes.\n`);
3741
+ return false;
3665
3742
  }
3666
- const tuiExit = tuiUpToDate ? 0 : await upgradeSelf();
3667
- const companionExit = await upgradeCompanions(pendingCompanions, parsed, out, err, options);
3668
- return { exitCode: tuiExit !== 0 ? tuiExit : companionExit };
3669
3743
  async function upgradeSelf() {
3744
+ const target = status.latest ?? channel;
3745
+ out.write(`${label(self.name)} ${self.current} → ${target}\n`);
3670
3746
  if (flags.inPlace) {
3671
3747
  const platformPkg = resolvePlatformPackage({ prefix: options.platformPackagePrefix ?? `${options.packageName}-` });
3672
3748
  if (!platformPkg) {
3673
- err.write(`No prebuilt binary for ${process.platform}/${process.arch}. Run \`${options.packageName}-upgrade\` via your package manager instead.\n`);
3749
+ err.write(`${self.name}: no prebuilt binary for ${process.platform}/${process.arch}. Use your package manager instead.\n`);
3674
3750
  return 1;
3675
3751
  }
3676
- out.write(`Downloading ${platformPkg}@${channel}…\n`);
3752
+ if (status.latest && !await ready(platformPkg, status.latest)) return 1;
3677
3753
  const result = await performInPlaceSelfUpdate({
3678
3754
  packageName: platformPkg,
3679
3755
  channel,
@@ -3681,38 +3757,147 @@ async function runUpdateCommand(options) {
3681
3757
  dryRun: flags.dryRun
3682
3758
  });
3683
3759
  if (result.status === "success") {
3684
- const verb = flags.dryRun ? "Would install" : "Installed";
3685
- out.write(`${verb} v${result.installedVersion} at ${result.binaryPath}.\n`);
3760
+ out.write(`${label(self.name)} ${result.installedVersion} ${flags.dryRun ? "would install" : "ok"}\n`);
3686
3761
  return 0;
3687
3762
  }
3688
- err.write(`In-place update failed: ${result.reason ?? "unknown error"}\n`);
3689
- if (result.status === "refused") err.write("Falling back to package-manager path (drop --in-place to retry).\n");
3763
+ err.write(`${self.name}: in-place update failed: ${result.reason ?? "unknown error"}\n`);
3764
+ if (result.status === "refused") err.write("Drop --in-place to go through the package manager.\n");
3690
3765
  return 1;
3691
3766
  }
3692
- const detected = detectPackageManager({
3767
+ const platformPkg = resolvePlatformPackage({ prefix: options.platformPackagePrefix ?? `${options.packageName}-` });
3768
+ if (status.latest && !await ready(platformPkg ?? options.packageName, status.latest)) return 1;
3769
+ const command = flags.packageManager ? overrideManager(flags.packageManager, options.packageName, channel) : detectPackageManager({
3693
3770
  packageName: options.packageName,
3694
3771
  channel
3695
3772
  });
3696
- if (detected.note) out.write(`${detected.note}\n`);
3697
- out.write(`Running: ${detected.argv.join(" ")}\n`);
3773
+ out.write(`$ ${command.argv.join(" ")}\n`);
3698
3774
  if (flags.dryRun) return 0;
3699
- const result = await (options.performSelfUpdate ?? performSelfUpdate)({
3775
+ const result = await install({
3700
3776
  packageName: options.packageName,
3701
3777
  channel,
3702
3778
  packageManager: flags.packageManager ?? "auto"
3703
3779
  });
3704
3780
  if (result.spawnError) {
3705
- err.write(`Failed to launch \`${result.command.argv[0]}\`: ${result.spawnError}\n`);
3706
- err.write("Is the package manager installed and on $PATH?\n");
3781
+ err.write(`${self.name}: could not run ${result.command.argv[0]}: ${result.spawnError}\n`);
3782
+ return 1;
3783
+ }
3784
+ if (result.exitCode !== 0) {
3785
+ err.write(`${self.name}: ${result.command.argv[0]} exited with ${result.exitCode ?? "unknown"}\n`);
3786
+ return result.exitCode ?? 1;
3787
+ }
3788
+ return verify(self.name, status.latest, options.verifyInstalled?.(options.packageName), result.command);
3789
+ }
3790
+ async function upgradeCompanion(c) {
3791
+ const target = c.status.latest ?? channel;
3792
+ out.write(`${label(c.name)} ${c.current} → ${target}\n`);
3793
+ if (c.status.latest && !await ready(c.name, c.status.latest)) return 1;
3794
+ const command = flags.packageManager ? overrideManager(flags.packageManager, c.name, channel) : c.command;
3795
+ out.write(`$ ${command.argv.join(" ")}\n`);
3796
+ if (flags.dryRun) return 0;
3797
+ const result = await install({
3798
+ packageName: c.name,
3799
+ channel,
3800
+ packageManager: flags.packageManager ?? c.command.id
3801
+ });
3802
+ if (result.spawnError) {
3803
+ err.write(`${c.name}: could not run ${result.command.argv[0]}: ${result.spawnError}\n`);
3804
+ return 1;
3805
+ }
3806
+ if (result.exitCode !== 0) {
3807
+ err.write(`${c.name}: ${result.command.argv[0]} exited with ${result.exitCode ?? "unknown"}\n`);
3707
3808
  return 1;
3708
3809
  }
3709
- return result.exitCode ?? 1;
3810
+ const find = options.findCompanion ?? findInstalledCompanion;
3811
+ return verify(c.name, c.status.latest, find(c.spec)?.version, result.command);
3812
+ }
3813
+ /**
3814
+ * The PM exiting 0 is not proof: a skipped optional platform binary or a
3815
+ * Volta no-op ("already installed") both exit 0 and leave the old version
3816
+ * behind. Compare what is actually on disk with what we asked for.
3817
+ */
3818
+ function verify(name, expected, actual, command) {
3819
+ if (!expected || actual === void 0) {
3820
+ out.write(`${label(name)} ${expected ?? channel} ok\n`);
3821
+ return 0;
3822
+ }
3823
+ if (actual !== null && compareSemver(actual, expected) >= 0) {
3824
+ out.write(`${label(name)} ${actual} ok\n`);
3825
+ return 0;
3826
+ }
3827
+ err.write(`${name}: install finished but ${actual ?? "nothing"} is on disk, expected ${expected}.\n`);
3828
+ err.write(`Reinstall: ${reinstallHint(command, name, channel)}\n`);
3829
+ return 1;
3830
+ }
3831
+ }
3832
+ function statusText(e) {
3833
+ if (e.status.source === "error") return `${e.current} (check failed: ${e.status.error ?? "unknown error"})`;
3834
+ if (!e.status.latest) return `${e.current} (latest unknown)`;
3835
+ return e.outdated ? `${e.current} → ${e.status.latest} available` : `${e.current} up to date`;
3836
+ }
3837
+ /**
3838
+ * Volta treats `install` of an already-recorded version as a no-op, so the
3839
+ * only way to replace a broken install is to remove it first.
3840
+ */
3841
+ function reinstallHint(command, packageName, channel) {
3842
+ const cmd = command.argv.join(" ");
3843
+ return command.id === "volta" ? `volta uninstall ${packageName} && volta install ${packageName}@${channel}` : cmd;
3844
+ }
3845
+ function overrideManager(id, packageName, channel) {
3846
+ const target = `${packageName}@${channel}`;
3847
+ switch (id) {
3848
+ case "pnpm": return {
3849
+ id,
3850
+ argv: [
3851
+ "pnpm",
3852
+ "add",
3853
+ "--global",
3854
+ target
3855
+ ]
3856
+ };
3857
+ case "yarn": return {
3858
+ id,
3859
+ argv: [
3860
+ "yarn",
3861
+ "global",
3862
+ "add",
3863
+ target
3864
+ ]
3865
+ };
3866
+ case "bun": return {
3867
+ id,
3868
+ argv: [
3869
+ "bun",
3870
+ "add",
3871
+ "--global",
3872
+ target
3873
+ ]
3874
+ };
3875
+ case "volta": return {
3876
+ id,
3877
+ argv: [
3878
+ "volta",
3879
+ "install",
3880
+ target
3881
+ ]
3882
+ };
3883
+ case "npm": return {
3884
+ id,
3885
+ argv: [
3886
+ "npm",
3887
+ "install",
3888
+ "--global",
3889
+ target
3890
+ ]
3891
+ };
3710
3892
  }
3711
3893
  }
3712
3894
  async function resolveCompanions(options, channel, registry) {
3713
3895
  const find = options.findCompanion ?? findInstalledCompanion;
3714
- const found = (options.companions ?? []).map((spec) => find(spec)).filter((c) => c !== null);
3715
- return await Promise.all(found.map(async (installed) => {
3896
+ const found = (options.companions ?? []).map((spec) => ({
3897
+ spec,
3898
+ installed: find(spec)
3899
+ })).filter((c) => c.installed !== null);
3900
+ return await Promise.all(found.map(async ({ spec, installed }) => {
3716
3901
  const status = await checkForUpdate({
3717
3902
  packageName: installed.packageName,
3718
3903
  currentVersion: installed.version,
@@ -3723,7 +3908,10 @@ async function resolveCompanions(options, channel, registry) {
3723
3908
  timeoutMs: 8e3
3724
3909
  });
3725
3910
  return {
3911
+ spec,
3726
3912
  installed,
3913
+ name: installed.packageName,
3914
+ current: installed.version,
3727
3915
  status,
3728
3916
  outdated: status.latest !== null && compareSemver(status.latest, installed.version) > 0,
3729
3917
  command: detectPackageManager({
@@ -3734,43 +3922,6 @@ async function resolveCompanions(options, channel, registry) {
3734
3922
  };
3735
3923
  }));
3736
3924
  }
3737
- function companionStatusLine(c, channel) {
3738
- const name = c.installed.packageName;
3739
- if (c.status.source === "error") return `${name}: could not check \`${channel}\` (${c.status.error ?? "unknown error"}). Current: v${c.installed.version}.`;
3740
- if (!c.status.latest) return `${name}: could not determine latest version on \`${channel}\`. Current: v${c.installed.version}.`;
3741
- return c.outdated ? `${name}: v${c.status.latest} is available on \`${channel}\` (current: v${c.installed.version}).` : `${name}: already on v${c.installed.version}.`;
3742
- }
3743
- async function upgradeCompanions(pending, parsed, out, err, options) {
3744
- let exitCode = 0;
3745
- for (const c of pending) {
3746
- const name = c.installed.packageName;
3747
- if (c.status.source === "error" && !parsed.force) {
3748
- err.write(`${name}: registry check failed (${c.status.error ?? "unknown error"}) — skipped. Pass --force to install anyway.\n`);
3749
- exitCode = 1;
3750
- continue;
3751
- }
3752
- if (c.status.latest) out.write(`${name}: v${c.installed.version} → v${c.status.latest}\n`);
3753
- const pm = parsed.packageManager ?? c.command.id;
3754
- if (c.command.note) out.write(`${c.command.note}\n`);
3755
- out.write(`Running: ${c.command.argv.join(" ")}\n`);
3756
- if (parsed.dryRun) continue;
3757
- const result = await (options.performSelfUpdate ?? performSelfUpdate)({
3758
- packageName: name,
3759
- channel: parsed.channel ?? options.defaultChannel ?? "latest",
3760
- packageManager: pm
3761
- });
3762
- if (result.spawnError) {
3763
- err.write(`${name}: failed to launch \`${result.command.argv[0]}\`: ${result.spawnError}\n`);
3764
- exitCode = 1;
3765
- continue;
3766
- }
3767
- if (result.exitCode !== 0) {
3768
- err.write(`${name}: install exited with ${result.exitCode ?? "unknown"}.\n`);
3769
- exitCode = 1;
3770
- }
3771
- }
3772
- return exitCode;
3773
- }
3774
3925
  function parseArgs(argv) {
3775
3926
  let check = false;
3776
3927
  let inPlace = false;
@@ -8875,6 +9026,50 @@ function serializePreview(preview) {
8875
9026
  };
8876
9027
  }
8877
9028
  //#endregion
9029
+ //#region src/chat/host/host-runtime.ts
9030
+ function sessionHostRuntime(run, env, deps) {
9031
+ return {
9032
+ model: () => run.modelOverride ?? run.model,
9033
+ models: () => [],
9034
+ thinking: () => {
9035
+ const effort = run.agent.session?.metadata?.effort;
9036
+ return typeof effort === "string" && isThinkingLevel$2(effort) ? effort : null;
9037
+ },
9038
+ setThinking: (level) => {
9039
+ const session = run.agent.session;
9040
+ if (!session) return false;
9041
+ session.setMeta("effort", level);
9042
+ session.save().catch(() => void 0);
9043
+ return true;
9044
+ },
9045
+ listSessions: async () => {
9046
+ return (await listSessionMeta(env.store)).map((s) => ({
9047
+ id: s.id,
9048
+ ...s.title ? { title: s.title } : {},
9049
+ ...s.updatedAt ? { updatedAt: s.updatedAt } : {}
9050
+ }));
9051
+ },
9052
+ switchSession: async () => false,
9053
+ createSession: async () => false,
9054
+ appendNote: (blocks) => {
9055
+ if (blocks.length === 0) return false;
9056
+ deps.appendNote(blocks);
9057
+ return true;
9058
+ },
9059
+ workspace: async () => {
9060
+ const handle = await run.agent.ensureExecution();
9061
+ return {
9062
+ execution: run.agent.execution,
9063
+ handle
9064
+ };
9065
+ },
9066
+ workspaceAvailable: () => true
9067
+ };
9068
+ }
9069
+ function isThinkingLevel$2(value) {
9070
+ return THINKING_LEVELS.includes(value);
9071
+ }
9072
+ //#endregion
8878
9073
  //#region src/chat/host/commands.ts
8879
9074
  function errorMessage(err) {
8880
9075
  return err instanceof Error ? err.message : String(err);
@@ -9337,13 +9532,15 @@ function createCommandModule(deps) {
9337
9532
  separateNextEmit = true;
9338
9533
  }
9339
9534
  };
9535
+ const execute = () => executeCommand(command, ctx);
9536
+ const executeScoped = env.hostRuntime ? () => env.hostRuntime.runWith(sessionHostRuntime(run, env, { appendNote: (blocks) => blocks.forEach(emitBlock) }), execute) : execute;
9340
9537
  try {
9341
9538
  if (session.turns.length > 0) emitEvent({
9342
9539
  kind: "separator",
9343
9540
  text: ""
9344
9541
  });
9345
9542
  emitBlock({ text: `\`❯ /${invocation.name}${invocation.args ? ` ${invocation.args}` : ""}\`` });
9346
- const result = await executeCommand(command, ctx);
9543
+ const result = await executeScoped();
9347
9544
  if (result.error) emitEvent({
9348
9545
  kind: "error",
9349
9546
  text: `/${invocation.name}: ${errorMessage(result.error)}`
@@ -9374,7 +9571,7 @@ function createCommandModule(deps) {
9374
9571
  //#endregion
9375
9572
  //#region src/chat/host/interactions.ts
9376
9573
  function createInteractionHub(options) {
9377
- const { broadcast, store, readSettings } = options;
9574
+ const { broadcast, store, readSettings, onPlanRejected } = options;
9378
9575
  /** Slots keyed by `request.id` (canonical tool_call id — stable across the wire). */
9379
9576
  const pending = /* @__PURE__ */ new Map();
9380
9577
  /**
@@ -9440,6 +9637,7 @@ function createInteractionHub(options) {
9440
9637
  sessionId: slot.sessionId,
9441
9638
  requestId
9442
9639
  });
9640
+ if (response.kind === "plan" && response.decision === "reject") onPlanRejected?.(slot.sessionId);
9443
9641
  return { ok: true };
9444
9642
  }
9445
9643
  const bucket = resumedResponses.get(slot.sessionId) ?? /* @__PURE__ */ new Map();
@@ -10383,7 +10581,8 @@ function createChatHost(env) {
10383
10581
  const interactions = createInteractionHub({
10384
10582
  broadcast,
10385
10583
  store: env.store,
10386
- readSettings: () => env.readSettings()
10584
+ readSettings: () => env.readSettings(),
10585
+ onPlanRejected: (sessionId) => interruptSession(sessionId)
10387
10586
  });
10388
10587
  const approvals = createApprovalHub({
10389
10588
  broadcast,
@@ -10452,6 +10651,31 @@ function createChatHost(env) {
10452
10651
  * Not persisted as a turn — replay synthesizes it from the same record in
10453
10652
  * `eventsFromTurns`, so live and reloaded transcripts match.
10454
10653
  */
10654
+ /**
10655
+ * `ctx.appendNote` from an extension tool/hook DURING a run: a durable,
10656
+ * display-only `command` turn — same block vocabulary, live events and
10657
+ * persisted form as command output, so it renders now and survives reload.
10658
+ * Live events and the turn share one pre-minted id (anchors depend on it).
10659
+ */
10660
+ function appendNoteTurn(run, blocks) {
10661
+ const session = run.agent.session;
10662
+ if (!session) return;
10663
+ const turnId = randomUUID();
10664
+ for (const block of blocks) broadcast({
10665
+ kind: "event",
10666
+ sessionId: run.sessionId,
10667
+ event: {
10668
+ ...commandBlockToEvent(block),
10669
+ turnId
10670
+ }
10671
+ });
10672
+ session.appendTurns([{
10673
+ id: turnId,
10674
+ role: "command",
10675
+ createdAt: Date.now(),
10676
+ content: commandBlocksToContent(blocks)
10677
+ }]).catch(() => void 0);
10678
+ }
10455
10679
  function broadcastRunReceipt(entry) {
10456
10680
  const session = entry.agent.session;
10457
10681
  if (!session) return;
@@ -11762,7 +11986,7 @@ function createChatHost(env) {
11762
11986
  sessionId: opts.sessionId,
11763
11987
  isRunning: () => run.agent.isRunning
11764
11988
  });
11765
- run.agent.run({
11989
+ const runAgent = () => run.agent.run({
11766
11990
  prompt: promptValue,
11767
11991
  system: systemNudge && run.system ? `${run.system}\n\n${systemNudge}` : systemNudge,
11768
11992
  signal: run.controller.signal,
@@ -11780,7 +12004,8 @@ function createChatHost(env) {
11780
12004
  }) : modelOverride } : {},
11781
12005
  ...thinking ? { thinking } : {},
11782
12006
  ...modelOptions ? { modelOptions } : {}
11783
- }).then(() => {
12007
+ });
12008
+ (env.hostRuntime ? env.hostRuntime.runWith(sessionHostRuntime(run, env, { appendNote: (blocks) => appendNoteTurn(run, blocks) }), runAgent) : runAgent()).then(() => {
11784
12009
  broadcastRunReceipt(run);
11785
12010
  broadcast({
11786
12011
  kind: "run:end",
@@ -11834,15 +12059,22 @@ function createChatHost(env) {
11834
12059
  else rebuildAgentOnly(sessionId);
11835
12060
  }
11836
12061
  const queues = /* @__PURE__ */ new Map();
11837
- function broadcastQueue(sessionId) {
11838
- const items = (queues.get(sessionId) ?? []).map(({ id, text }) => ({
12062
+ /** Wire shape of a queued entry: text plus an attachment SUMMARY, never the bytes. */
12063
+ function toQueuedItem({ id, text, attachments }) {
12064
+ return {
11839
12065
  id,
11840
- text
11841
- }));
12066
+ text,
12067
+ ...attachments?.length ? { attachments: attachments.map((a) => ({
12068
+ mediaType: a.mediaType,
12069
+ ...a.name ? { name: a.name } : {}
12070
+ })) } : {}
12071
+ };
12072
+ }
12073
+ function broadcastQueue(sessionId) {
11842
12074
  broadcast({
11843
12075
  kind: "queue:changed",
11844
12076
  sessionId,
11845
- items
12077
+ items: (queues.get(sessionId) ?? []).map(toQueuedItem)
11846
12078
  });
11847
12079
  }
11848
12080
  /** Per-session drain lock — two overlapping drains would double-send the head. */
@@ -12041,10 +12273,16 @@ function createChatHost(env) {
12041
12273
  return true;
12042
12274
  },
12043
12275
  queueList(sessionId) {
12044
- return (queues.get(sessionId) ?? []).map(({ id, text }) => ({
12045
- id,
12046
- text
12047
- }));
12276
+ return (queues.get(sessionId) ?? []).map(toQueuedItem);
12277
+ },
12278
+ queueUpdate(sessionId, id, text) {
12279
+ const entry = queues.get(sessionId)?.find((item) => item.id === id);
12280
+ if (!entry) return false;
12281
+ if (entry.text !== text) {
12282
+ entry.text = text;
12283
+ broadcastQueue(sessionId);
12284
+ }
12285
+ return true;
12048
12286
  },
12049
12287
  sessionSystemMd(sessionId) {
12050
12288
  return active.get(sessionId)?.systemMd ?? null;
@@ -15987,6 +16225,6 @@ function createApprovalHub(options) {
15987
16225
  };
15988
16226
  }
15989
16227
  //#endregion
15990
- export { supportsOAuth as $, buildUpdateHint as $n, envSection as $r, runCompaction as $t, useSafeModeQueue as A, createDiscoverySlot as An, createTodoTools as Ar, makeRequestInteraction as At, USAGE_CACHE_TTL_MS as B, hasClaudeCodeSetup as Bn, useActiveTodos as Br, readFileSafe as Bt, resolveSessionExportTarget as C, GRUVBOX_LIGHT as Cn, DEFAULT_MAX_TODO_ITEMS as Cr, InteractionsProvider as Ct, scopeCwd as D, CATPPUCCIN_MOCHA as Dn, TODO_STATUS_GLYPHS as Dr, createInteractionTools as Dt, resolveSessionCwd as E, CATPPUCCIN_MACCHIATO as En, TODOWRITE_TOOL as Er, createAutomaticInteractionResponse as Et, matchesSafelistEntry as F, useConfig as Fn, pruneTodosByRun as Fr, STALE_RUN_MARKER_MS as Ft, usageChecksOptedOut as G, buildMcpServers as Gn, INTERACTION_GUIDANCE as Gr, modelChainMetadata as Gt, fetchAllProviderUsage as H, mcpsWritePath as Hn, COMMUNICATION_DOCTRINE as Hr, serializePreview as Ht, projectsFilePath as I, resolveConfig as In, sanitizeTodoItems as Ir, createChatHost as It, fetchOAuthRedirect as J, discoverProjectMcps as Jn, PLAN_MODE_DOCTRINE_NO_PROMPTS as Jr, buildPluginContributions as Jt, usageSourceFor as K, dedupMcpServersByName as Kn, INTERACTION_GUIDANCE_NO_PROMPTS as Kr, sessionModelFallbacks as Kt, readProjects as L, resolveStoragePaths as Ln, selectActiveTodos as Lr, toTodosSnapshot as Lt, addToSafelist as M, useDiscovery as Mn, getTodosForRun as Mr, serializeInteractionResponse as Mt, getSafelist as N, useDiscoveryOptional as Nn, isTodoTool as Nr, useInteractionsActions as Nt, SafeModeProvider as O, parseEditorCommand as On, TODO_WRITE_COUNTS_METADATA_KEY as Or, isInteractionTool as Ot, isOnSafelist as P, ConfigProvider as Pn, pickActiveRunId as Pr, useInteractionsQueue as Pt, runOAuthLogin as Q, bootTick as Qn, buildPlanSystem as Qr, EditOutcomeLedger as Qt, suggestSafelistEntries as R, useCompletion as Rn, setTodosForRun as Rr, createInteractionHub as Rt, renderSession as S, GRUVBOX_DARK as Sn, singleAgentRegistry as Sr, HOST_INTERACTION_ID_PREFIX as St, folderlessCwd as T, CATPPUCCIN_LATTE as Tn, TODOS_METADATA_KEY as Tr, buildResumedToolResultsTurn as Tt, fetchProviderUsage as U, removeMcpServer as Un, DOING_TASKS_DOCTRINE as Ur, createBuiltinCommands as Ut, clearProviderUsageCache as V, importFromClaudeCode as Vn, ACTIONS_WITH_CARE_DOCTRINE as Vr, resolveCwdPath as Vt, providerUsageSupported as W, upsertMcpServer as Wn, IDENTITY_PREFIX as Wr, createMainSession as Wt, redirectUriFromAuthUrl as X, tryOpenBrowser as Xn, TOKEN_DISCIPLINE_DOCTRINE as Xr, parsePluginScanPathEnv as Xt, normalizeRedirectPaste as Y, parseMcpsFile as Yn, SUBAGENT_GUIDANCE as Yr, discoverProjectPlugins as Yt, oauthUsesManualCodePaste as Z, bootProfileEnabled as Zn, buildBuildSystem as Zr, attachMcpWarnLog as Zt, buildSpawnEndEvent as _, titleFromTurns as _i, BUILTIN_THEMES as _n, DEFAULT_BUDGET_EXCLUDE_TOOLS as _r, useMcpAuthState as _t, renderActiveTodoAnchor as a, deriveSessionTitle as ai, shortChord as an, detectLibc as ar, subscribeMcpToolsCache as at, defaultSkillScanPaths as b, updateToolEventOutcomes as bi, resolveTheme as bn, accentColor as br, ASK_USER_TOOL as bt, useSelectStyle as c, lastContextSizeFromTurns as ci, DEFAULT_SETTINGS as cn, performInPlaceSelfUpdate as cr, useMcpToolToggleSet as ct, useTheme as d, marginTopFor as di, SETTINGS_INPUTS as dn, chatAutoCompactBehavior as dr, parentServerName as dt, chatReferenceTokensForPrompt as ei, EMPTY_HINTS as en, useUpdateCheck as er, clearMcpToolsCache as et, discoverSystemMd as f, noticeTurnContent as fi, SETTINGS_TOGGLES as fn, discoverAgentsMd as fr, createFileMcpCredentialStore as ft, useStreamBuffer as g, sumRunCosts as gi, useSettings as gn, DEFAULT_AGENT_ID as gr, useMcpAuthDispatch as gt, userSystemMdPath as h, stripSpawnTokensLine as hi, enforceSettingsInvariants as hn, BUILTIN_AGENTS as hr, McpAuthProvider as ht, createActiveTodoAnchorHooks as i, createStateStore as ii, buildHints as in, compareSemver as ir, saveMcpToolsCache as it, IMPLICITLY_SAFE_TOOLS as j, DiscoveryProvider as jn, getArchivedTodosForRun as jr, pendingInteractionsFromTurns as jt, useSafeModeActions as k, quoteForShell as kn, applyTodosSnapshot as kr, isModelInteraction as kt, useSurfaces as l, listSessionMeta as li, SETTINGS_CATEGORIES as ln, performSelfUpdate as lr, buildVisibleMcpRows as lt, userScopeOverridesLoad as m, serverToolResultSummary as mi, clampFps as mn, BUILD_AGENT as mr, patchMcpCredential as mt, createMemoryApprovalsStore as n, DEFAULT_SESSION_TITLE as ni, hintsLength as nn, findInstalledCompanion as nr, mcpToolsCachePath as nt, ThemeProvider as o, eventsFromTurns as oi, listProjectFiles as on, detectPackageManager as or, buildToolToggle as ot, renderSystemMdSeed as p, saveState as pi, SettingsProvider as pn, renderAgentsMdBlock as pr, mcpCredentialsPath as pt, formatPathForCwd as q, defaultMcpsConfigPaths as qn, PLAN_MODE_DOCTRINE as qr, runEndNotice as qt, computeTurnAnchors as r, compactSummaryEvent as ri, truncateTrailing as rn, checkForUpdate as rr, refreshMcpToolsCatalog as rt, useColors as s, getSessionMeta as si, useEnabledToggleSet as sn, parseSemver as sr, useMcpToolToggleMap as st, createApprovalHub as t, createChatTurnsReadTool as ti, clipHintsToWidth as tn, runUpdateCommand as tr, loadMcpToolsCache as tt, useSyntaxStyles as u, loadState as ui, SETTINGS_CHOICES as un, resolvePlatformPackage as ur, indexOfServerRow as ut, buildSpawnStartEvent as v, toolCallPreview as vi, DEFAULT_THEME as vn, DEFAULT_PERSIST_EXCLUDE_TOOLS as vr, getMcpAuthStatus as vt, writeSessionExport as w, CATPPUCCIN_FRAPPE as wn, TODOREAD_TOOL as wr, PRESENT_PLAN_TOOL as wt, discoverProjectSkills as x, usageByModel as xi, VAPORWAVE_THEME as xn, resolveAgentId as xr, AUTOMATIC_INTERACTION_INSTRUCTION as xt, buildSkillsConfig as y, toolResultText as yi, resolveChipColor as yn, PLAN_AGENT as yr, reduceMcpAuth as yt, writeProjects as z, countClaudeSessionFiles as zn, todoProgressLabel as zr, extractEditPayloadForGate as zt };
16228
+ export { supportsOAuth as $, buildUpdateHint as $n, buildPlanSystem as $r, runCompaction as $t, useSafeModeQueue as A, createDiscoverySlot as An, applyTodosSnapshot as Ar, makeRequestInteraction as At, USAGE_CACHE_TTL_MS as B, hasClaudeCodeSetup as Bn, todoProgressLabel as Br, readFileSafe as Bt, resolveSessionExportTarget as C, GRUVBOX_LIGHT as Cn, singleAgentRegistry as Cr, InteractionsProvider as Ct, scopeCwd as D, CATPPUCCIN_MOCHA as Dn, TODOWRITE_TOOL as Dr, createInteractionTools as Dt, resolveSessionCwd as E, CATPPUCCIN_MACCHIATO as En, TODOS_METADATA_KEY as Er, createAutomaticInteractionResponse as Et, matchesSafelistEntry as F, useConfig as Fn, pickActiveRunId as Fr, STALE_RUN_MARKER_MS as Ft, usageChecksOptedOut as G, buildMcpServers as Gn, IDENTITY_PREFIX as Gr, modelChainMetadata as Gt, fetchAllProviderUsage as H, mcpsWritePath as Hn, ACTIONS_WITH_CARE_DOCTRINE as Hr, serializePreview as Ht, projectsFilePath as I, resolveConfig as In, pruneTodosByRun as Ir, createChatHost as It, fetchOAuthRedirect as J, discoverProjectMcps as Jn, PLAN_MODE_DOCTRINE as Jr, buildPluginContributions as Jt, usageSourceFor as K, dedupMcpServersByName as Kn, INTERACTION_GUIDANCE as Kr, sessionModelFallbacks as Kt, readProjects as L, resolveStoragePaths as Ln, sanitizeTodoItems as Lr, toTodosSnapshot as Lt, addToSafelist as M, useDiscovery as Mn, getArchivedTodosForRun as Mr, serializeInteractionResponse as Mt, getSafelist as N, useDiscoveryOptional as Nn, getTodosForRun as Nr, useInteractionsActions as Nt, SafeModeProvider as O, parseEditorCommand as On, TODO_STATUS_GLYPHS as Or, isInteractionTool as Ot, isOnSafelist as P, ConfigProvider as Pn, isTodoTool as Pr, useInteractionsQueue as Pt, runOAuthLogin as Q, bootTick as Qn, buildBuildSystem as Qr, EditOutcomeLedger as Qt, suggestSafelistEntries as R, useCompletion as Rn, selectActiveTodos as Rr, createInteractionHub as Rt, renderSession as S, usageByModel as Si, GRUVBOX_DARK as Sn, resolveAgentId as Sr, HOST_INTERACTION_ID_PREFIX as St, folderlessCwd as T, CATPPUCCIN_LATTE as Tn, TODOREAD_TOOL as Tr, buildResumedToolResultsTurn as Tt, fetchProviderUsage as U, removeMcpServer as Un, COMMUNICATION_DOCTRINE as Ur, createBuiltinCommands as Ut, clearProviderUsageCache as V, importFromClaudeCode as Vn, useActiveTodos as Vr, resolveCwdPath as Vt, providerUsageSupported as W, upsertMcpServer as Wn, DOING_TASKS_DOCTRINE as Wr, createMainSession as Wt, redirectUriFromAuthUrl as X, tryOpenBrowser as Xn, SUBAGENT_GUIDANCE as Xr, parsePluginScanPathEnv as Xt, normalizeRedirectPaste as Y, parseMcpsFile as Yn, PLAN_MODE_DOCTRINE_NO_PROMPTS as Yr, discoverProjectPlugins as Yt, oauthUsesManualCodePaste as Z, bootProfileEnabled as Zn, TOKEN_DISCIPLINE_DOCTRINE as Zr, attachMcpWarnLog as Zt, buildSpawnEndEvent as _, sumRunCosts as _i, BUILTIN_THEMES as _n, DEFAULT_AGENT_ID as _r, useMcpAuthState as _t, renderActiveTodoAnchor as a, createStateStore as ai, shortChord as an, compareSemver as ar, subscribeMcpToolsCache as at, defaultSkillScanPaths as b, toolResultText as bi, resolveTheme as bn, PLAN_AGENT as br, ASK_USER_TOOL as bt, useSelectStyle as c, getSessionMeta as ci, DEFAULT_SETTINGS as cn, parseSemver as cr, useMcpToolToggleSet as ct, useTheme as d, loadState as di, SETTINGS_INPUTS as dn, resolvePlatformPackage as dr, parentServerName as dt, envSection as ei, EMPTY_HINTS as en, useUpdateCheck as er, clearMcpToolsCache as et, discoverSystemMd as f, marginTopFor as fi, SETTINGS_TOGGLES as fn, chatAutoCompactBehavior as fr, createFileMcpCredentialStore as ft, useStreamBuffer as g, stripSpawnTokensLine as gi, useSettings as gn, BUILTIN_AGENTS as gr, useMcpAuthDispatch as gt, userSystemMdPath as h, serverToolResultSummary as hi, enforceSettingsInvariants as hn, BUILD_AGENT as hr, McpAuthProvider as ht, createActiveTodoAnchorHooks as i, compactSummaryEvent as ii, buildHints as in, checkTarballAvailable as ir, saveMcpToolsCache as it, IMPLICITLY_SAFE_TOOLS as j, DiscoveryProvider as jn, createTodoTools as jr, pendingInteractionsFromTurns as jt, useSafeModeActions as k, quoteForShell as kn, TODO_WRITE_COUNTS_METADATA_KEY as kr, isModelInteraction as kt, useSurfaces as l, lastContextSizeFromTurns as li, SETTINGS_CATEGORIES as ln, performInPlaceSelfUpdate as lr, buildVisibleMcpRows as lt, userScopeOverridesLoad as m, saveState as mi, clampFps as mn, renderAgentsMdBlock as mr, patchMcpCredential as mt, createMemoryApprovalsStore as n, createChatTurnsReadTool as ni, hintsLength as nn, findInstalledCompanion as nr, mcpToolsCachePath as nt, ThemeProvider as o, deriveSessionTitle as oi, listProjectFiles as on, detectLibc as or, buildToolToggle as ot, renderSystemMdSeed as p, noticeTurnContent as pi, SettingsProvider as pn, discoverAgentsMd as pr, mcpCredentialsPath as pt, formatPathForCwd as q, defaultMcpsConfigPaths as qn, INTERACTION_GUIDANCE_NO_PROMPTS as qr, runEndNotice as qt, computeTurnAnchors as r, DEFAULT_SESSION_TITLE as ri, truncateTrailing as rn, checkForUpdate as rr, refreshMcpToolsCatalog as rt, useColors as s, eventsFromTurns as si, useEnabledToggleSet as sn, detectPackageManager as sr, useMcpToolToggleMap as st, createApprovalHub as t, chatReferenceTokensForPrompt as ti, clipHintsToWidth as tn, runUpdateCommand as tr, loadMcpToolsCache as tt, useSyntaxStyles as u, listSessionMeta as ui, SETTINGS_CHOICES as un, performSelfUpdate as ur, indexOfServerRow as ut, buildSpawnStartEvent as v, titleFromTurns as vi, DEFAULT_THEME as vn, DEFAULT_BUDGET_EXCLUDE_TOOLS as vr, getMcpAuthStatus as vt, writeSessionExport as w, CATPPUCCIN_FRAPPE as wn, DEFAULT_MAX_TODO_ITEMS as wr, PRESENT_PLAN_TOOL as wt, discoverProjectSkills as x, updateToolEventOutcomes as xi, VAPORWAVE_THEME as xn, accentColor as xr, AUTOMATIC_INTERACTION_INSTRUCTION as xt, buildSkillsConfig as y, toolCallPreview as yi, resolveChipColor as yn, DEFAULT_PERSIST_EXCLUDE_TOOLS as yr, reduceMcpAuth as yt, writeProjects as z, countClaudeSessionFiles as zn, setTodosForRun as zr, extractEditPayloadForGate as zt };
15991
16229
 
15992
- //# sourceMappingURL=approvals-BF15XIhM.js.map
16230
+ //# sourceMappingURL=approvals-B4PYwOnW.js.map