zidane 6.5.4 → 6.5.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.
Files changed (128) hide show
  1. package/dist/{acp-CIpD8UIw.js → acp-BPJbXS2J.js} +6 -6
  2. package/dist/{acp-CIpD8UIw.js.map → acp-BPJbXS2J.js.map} +1 -1
  3. package/dist/acp-cli.js +6 -6
  4. package/dist/acp.d.ts +1 -1
  5. package/dist/acp.js +1 -1
  6. package/dist/{agent-8kfGIDb_.js → agent-gZjHsUft.js} +176 -166
  7. package/dist/agent-gZjHsUft.js.map +1 -0
  8. package/dist/agent.d.ts +1 -1
  9. package/dist/agent.js +1 -1
  10. package/dist/{anthropic-qaw8XAc9.js → anthropic-D3le2d-s.js} +75 -14
  11. package/dist/anthropic-D3le2d-s.js.map +1 -0
  12. package/dist/{auth-BLy7X1SY.js → auth-DCiXCwGa.js} +5 -5
  13. package/dist/{auth-BLy7X1SY.js.map → auth-DCiXCwGa.js.map} +1 -1
  14. package/dist/chat/pure.d.ts +3 -3
  15. package/dist/chat/pure.js +2 -2
  16. package/dist/chat.d.ts +29 -8
  17. package/dist/chat.d.ts.map +1 -1
  18. package/dist/chat.js +8 -8
  19. package/dist/{context-segments-1mcqSCM3.js → context-segments-CJCtJ9sU.js} +16 -3
  20. package/dist/{context-segments-1mcqSCM3.js.map → context-segments-CJCtJ9sU.js.map} +1 -1
  21. package/dist/{context-transport-Bco9Wo0b.js → context-transport-D8yeGdpd.js} +2 -2
  22. package/dist/{context-transport-Bco9Wo0b.js.map → context-transport-D8yeGdpd.js.map} +1 -1
  23. package/dist/contexts/daytona.d.ts +1 -1
  24. package/dist/contexts/daytona.js +1 -1
  25. package/dist/contexts/e2b.d.ts +1 -1
  26. package/dist/{errors-BwBxu3zD.js → errors-DKiMrOKq.js} +61 -2
  27. package/dist/{errors-BwBxu3zD.js.map → errors-DKiMrOKq.js.map} +1 -1
  28. package/dist/errors.js +2 -2
  29. package/dist/eval.d.ts +1 -1
  30. package/dist/eval.js +1 -1
  31. package/dist/extensions.d.ts +1 -1
  32. package/dist/extensions.js +1 -1
  33. package/dist/{fetch-url-B7aSg6Bp.js → fetch-url-ma-5_p0p.js} +2 -2
  34. package/dist/{fetch-url-B7aSg6Bp.js.map → fetch-url-ma-5_p0p.js.map} +1 -1
  35. package/dist/headless.d.ts +1 -1
  36. package/dist/headless.js +3 -3
  37. package/dist/{index-BSNr0OQn.d.ts → index-BYKzzYzi.d.ts} +68 -22
  38. package/dist/index-BYKzzYzi.d.ts.map +1 -0
  39. package/dist/index.d.ts +1 -1
  40. package/dist/index.js +13 -13
  41. package/dist/{login-D3CKhgbI.js → login-CB23LyI1.js} +3 -3
  42. package/dist/{login-D3CKhgbI.js.map → login-CB23LyI1.js.map} +1 -1
  43. package/dist/{mcp-D9fqOQo5.js → mcp-CVtSQTWg.js} +3 -3
  44. package/dist/{mcp-D9fqOQo5.js.map → mcp-CVtSQTWg.js.map} +1 -1
  45. package/dist/mcp.d.ts +1 -1
  46. package/dist/mcp.js +1 -1
  47. package/dist/{messages-C_H9soi5.js → messages-CVVg5jUL.js} +2 -2
  48. package/dist/{messages-C_H9soi5.js.map → messages-CVVg5jUL.js.map} +1 -1
  49. package/dist/{oauth-ZebH9NHb.js → oauth-C4GvY_p1.js} +27 -8
  50. package/dist/oauth-C4GvY_p1.js.map +1 -0
  51. package/dist/{openai-compat-CnHeo4Lz.js → openai-compat-hmZzpDrB.js} +2 -2
  52. package/dist/{openai-compat-CnHeo4Lz.js.map → openai-compat-hmZzpDrB.js.map} +1 -1
  53. package/dist/output/stream-json.d.ts +1 -1
  54. package/dist/output/terminal.d.ts +1 -1
  55. package/dist/{plugins-2PMTVcp-.js → plugins-onDvTHEm.js} +2 -2
  56. package/dist/{plugins-2PMTVcp-.js.map → plugins-onDvTHEm.js.map} +1 -1
  57. package/dist/plugins.d.ts +1 -1
  58. package/dist/plugins.js +1 -1
  59. package/dist/presets.d.ts +1 -1
  60. package/dist/presets.js +1 -1
  61. package/dist/providers/anthropic.d.ts +1 -1
  62. package/dist/providers/anthropic.js +1 -1
  63. package/dist/providers/arcee.d.ts +1 -1
  64. package/dist/providers/arcee.js +1 -1
  65. package/dist/providers/baseten.d.ts +1 -1
  66. package/dist/providers/baseten.js +1 -1
  67. package/dist/providers/cerebras.d.ts +1 -1
  68. package/dist/providers/cerebras.js +1 -1
  69. package/dist/providers/local.d.ts +1 -1
  70. package/dist/providers/local.js +1 -1
  71. package/dist/providers/openai-compat.d.ts +1 -1
  72. package/dist/providers/openai-compat.js +1 -1
  73. package/dist/providers/openai.d.ts +1 -1
  74. package/dist/providers/openai.js +4 -4
  75. package/dist/providers/openrouter.d.ts +1 -1
  76. package/dist/providers/openrouter.js +1 -1
  77. package/dist/providers/xai.d.ts +1 -1
  78. package/dist/providers/xai.js +2 -2
  79. package/dist/{providers-Bxs-XHir.js → providers-Cf0AXIIZ.js} +3 -3
  80. package/dist/{providers-Bxs-XHir.js.map → providers-Cf0AXIIZ.js.map} +1 -1
  81. package/dist/providers.d.ts +1 -1
  82. package/dist/providers.js +4 -4
  83. package/dist/restate.d.ts +1 -1
  84. package/dist/restate.js +2 -2
  85. package/dist/session/sqlite.d.ts +1 -1
  86. package/dist/session/sqlite.js +1 -1
  87. package/dist/{session-VpLrNaFQ.js → session-cqN5NbO-.js} +2 -2
  88. package/dist/{session-VpLrNaFQ.js.map → session-cqN5NbO-.js.map} +1 -1
  89. package/dist/session.d.ts +1 -1
  90. package/dist/session.js +2 -2
  91. package/dist/{skills-Cp9vnBwd.js → skills-BMGH_KK1.js} +2 -2
  92. package/dist/{skills-Cp9vnBwd.js.map → skills-BMGH_KK1.js.map} +1 -1
  93. package/dist/skills.d.ts +1 -1
  94. package/dist/skills.js +1 -1
  95. package/dist/{timeout-BDetbuN6.js → timeout-CjOG2mea.js} +29 -2
  96. package/dist/timeout-CjOG2mea.js.map +1 -0
  97. package/dist/timeout-DEaqslLO.d.ts.map +1 -1
  98. package/dist/{tool-formatters-BfKqWm5N.d.ts → tool-formatters-B5WSHMCU.d.ts} +2 -2
  99. package/dist/{tool-formatters-BfKqWm5N.d.ts.map → tool-formatters-B5WSHMCU.d.ts.map} +1 -1
  100. package/dist/tools/fetch-url.d.ts +1 -1
  101. package/dist/tools/fetch-url.js +1 -1
  102. package/dist/tools/web-search.d.ts +1 -1
  103. package/dist/tools/web-search.js +2 -2
  104. package/dist/tools.d.ts +1 -1
  105. package/dist/tools.js +1 -1
  106. package/dist/{transcript-anchors-CNqDbrc9.d.ts → transcript-anchors-BPnWHLyr.d.ts} +2 -2
  107. package/dist/{transcript-anchors-CNqDbrc9.d.ts.map → transcript-anchors-BPnWHLyr.d.ts.map} +1 -1
  108. package/dist/{transcript-anchors-Bv8HQ3S2.js → transcript-anchors-BvC8t7dt.js} +177 -63
  109. package/dist/transcript-anchors-BvC8t7dt.js.map +1 -0
  110. package/dist/tui.d.ts +18 -29
  111. package/dist/tui.d.ts.map +1 -1
  112. package/dist/tui.js +737 -236
  113. package/dist/tui.js.map +1 -1
  114. package/dist/{turn-operations-iGu5J08j.js → turn-operations-7_Ff7INF.js} +2 -2
  115. package/dist/{turn-operations-iGu5J08j.js.map → turn-operations-7_Ff7INF.js.map} +1 -1
  116. package/dist/{turn-operations-CnIpcenJ.d.ts → turn-operations-BvP3_HsU.d.ts} +3 -3
  117. package/dist/{turn-operations-CnIpcenJ.d.ts.map → turn-operations-BvP3_HsU.d.ts.map} +1 -1
  118. package/dist/types.d.ts +1 -1
  119. package/dist/types.js +1 -1
  120. package/docs/CHAT.md +1 -1
  121. package/docs/TUI.md +4 -4
  122. package/package.json +2 -1
  123. package/dist/agent-8kfGIDb_.js.map +0 -1
  124. package/dist/anthropic-qaw8XAc9.js.map +0 -1
  125. package/dist/index-BSNr0OQn.d.ts.map +0 -1
  126. package/dist/oauth-ZebH9NHb.js.map +0 -1
  127. package/dist/timeout-BDetbuN6.js.map +0 -1
  128. package/dist/transcript-anchors-Bv8HQ3S2.js.map +0 -1
@@ -1,19 +1,19 @@
1
1
  import { n as __require } from "./rolldown-runtime-BhDjJH2R.js";
2
2
  import { l as toolResultToText } from "./types-BIarq1qE.js";
3
- import { Ct as waitTask, Ft as readFile$1, Gt as edit, Lt as multiEdit, Nt as shell, 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, jt as shellKill, nn as mergeKeybindings, on as resolveExtensionKeybindings, st as buildExtensionPreset, vt as definePreset, xt as writeFile$1 } from "./agent-8kfGIDb_.js";
3
+ import { Ct as waitTask, Ft as readFile$1, Gt as edit, Lt as multiEdit, Nt as shell, 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, jt as shellKill, nn as mergeKeybindings, on as resolveExtensionKeybindings, st as buildExtensionPreset, vt as definePreset, xt as writeFile$1 } from "./agent-gZjHsUft.js";
4
4
  import { a as formatDuration, c as previewLine, i as fmtTokens, l as shortId } from "./format-BF745pLL.js";
5
- import { u as errorMessage } from "./errors-BwBxu3zD.js";
6
- import { R as projectUserPaths, x as discoverSkills, z as findGitRoot$1 } from "./skills-Cp9vnBwd.js";
5
+ import { u as errorMessage } from "./errors-DKiMrOKq.js";
6
+ import { R as projectUserPaths, x as discoverSkills, z as findGitRoot$1 } from "./skills-BMGH_KK1.js";
7
7
  import { t as writeFileAtomic } from "./atomic-write-B7zr1ddF.js";
8
- import { p as resolveStorageDirs } from "./plugins-2PMTVcp-.js";
9
- import { l as normalizeMcpServers, n as connectMcpServers } from "./mcp-D9fqOQo5.js";
8
+ import { p as resolveStorageDirs } from "./plugins-onDvTHEm.js";
9
+ import { l as normalizeMcpServers, n as connectMcpServers } from "./mcp-CVtSQTWg.js";
10
10
  import { joinSystemPrompt } from "./prompt.js";
11
11
  import { r as formatTokenUsage } from "./stats-DAKBEKjc.js";
12
12
  import { i as findActiveTriggers, n as collectReferences, o as mergeSuggestions, t as applyInsert } from "./completion-core-BRo86R_L.js";
13
- import { r as fetchUrl } from "./fetch-url-B7aSg6Bp.js";
13
+ import { r as fetchUrl } from "./fetch-url-ma-5_p0p.js";
14
14
  import { webSearch } from "./tools/web-search.js";
15
- import { C as restoreModelOptions, l as BUILTIN_PROVIDERS, n as applyApiKeyEnv, r as credentialsPath, t as detectAuth, v as modelSupportsReasoning, y as modelsForDescriptor } from "./auth-BLy7X1SY.js";
16
- import { C as chunkMarkdownForRender, it as extractEditPayload, m as ownerOf, pt as parseEditOutcomesFromResult, u as capTranscriptEvents, yt as chatReferenceTokensFromText } from "./turn-operations-iGu5J08j.js";
15
+ import { C as restoreModelOptions, l as BUILTIN_PROVIDERS, n as applyApiKeyEnv, r as credentialsPath, t as detectAuth, v as modelSupportsReasoning, y as modelsForDescriptor } from "./auth-DCiXCwGa.js";
16
+ import { C as chunkMarkdownForRender, it as extractEditPayload, m as ownerOf, pt as parseEditOutcomesFromResult, u as capTranscriptEvents, yt as chatReferenceTokensFromText } from "./turn-operations-7_Ff7INF.js";
17
17
  import { basename, dirname, isAbsolute, join, posix, relative, resolve, sep } from "node:path";
18
18
  import { Buffer } from "node:buffer";
19
19
  import { chmodSync, closeSync, cpSync, createReadStream, createWriteStream, existsSync, mkdirSync, mkdtempSync, openSync, readFileSync, readSync, readdirSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
@@ -1142,7 +1142,7 @@ const INTERACTION_GUIDANCE_PLAN = `# Interacting with the user
1142
1142
  - Don't ask what the code can tell you.`;
1143
1143
  /**
1144
1144
  * Variant of {@link INTERACTION_GUIDANCE} for the no-interactive-prompts
1145
- * configuration (`Settings.allowInteraction = false`). The two tools are
1145
+ * configuration (`Settings.interactionMode = 'disabled'`). The two tools are
1146
1146
  * stripped from the agent's tool set; this section tells the model to
1147
1147
  * operate autonomously and surface assumptions / open questions in its
1148
1148
  * final prose message rather than via tool calls.
@@ -1326,8 +1326,16 @@ function getTodosForRun(session, runId) {
1326
1326
  * clearing the live list (whether explicitly or via the tool's auto-
1327
1327
  * clear) preserves the "last shown" snapshot so UI surfaces can keep
1328
1328
  * rendering what was just completed. See {@link getArchivedTodosForRun}.
1329
+ *
1330
+ * `opts.clearArchive` opts OUT of that preservation, and exists because the
1331
+ * archive is only the right answer for the AUTO-CLEAR path. UI surfaces render
1332
+ * `todos.length > 0 ? todos : archive`, so a user who deletes every todo would
1333
+ * otherwise watch the archive fall straight back into view with the same items
1334
+ * — a destructive action they confirmed, with no visible effect, and the footer
1335
+ * chip still counting the list they just deleted. Pass it for user-initiated
1336
+ * writes; leave it off for the tool.
1329
1337
  */
1330
- function setTodosForRun(session, runId, items) {
1338
+ function setTodosForRun(session, runId, items, opts = {}) {
1331
1339
  const bag = readTodosBag(session);
1332
1340
  const normalized = items.map(normalizeItem);
1333
1341
  const subagent = isSubagentRun(session, runId);
@@ -1346,6 +1354,14 @@ function setTodosForRun(session, runId, items) {
1346
1354
  archive.byRun = archiveByRun;
1347
1355
  } else archive.session = normalized;
1348
1356
  bag.archive = archive;
1357
+ } else if (opts.clearArchive) {
1358
+ const archive = { ...bag.archive ?? {} };
1359
+ if (subagent) {
1360
+ const archiveByRun = { ...archive.byRun ?? {} };
1361
+ delete archiveByRun[runId];
1362
+ archive.byRun = archiveByRun;
1363
+ } else delete archive.session;
1364
+ bag.archive = archive;
1349
1365
  }
1350
1366
  writeTodosBag(session, bag);
1351
1367
  }
@@ -1846,6 +1862,29 @@ function selectActiveTodos(session) {
1846
1862
  };
1847
1863
  }
1848
1864
  /**
1865
+ * Progress label for the footer chip: `"2/5"`, or `null` when there is nothing
1866
+ * to advertise.
1867
+ *
1868
+ * The chip replaced a full-width bar that printed the in-progress todo's TITLE
1869
+ * above the prompt. Titles are model-authored and arbitrarily long, so the bar
1870
+ * had to truncate, reflow with terminal width, and still told you nothing you
1871
+ * couldn't get by opening the list. A position reads at a glance and costs a
1872
+ * fixed handful of columns in a row that's already scanned for shortcuts.
1873
+ *
1874
+ * The numerator is the POSITION of the in-progress item — the direct
1875
+ * replacement for "which one is live". With nothing in progress (list finished,
1876
+ * or the archive is on screen) it falls back to the completed count, so a done
1877
+ * list reads `5/5` rather than `0/5`.
1878
+ *
1879
+ * Pure and renderer-agnostic, so the GUI and the tests can both use it.
1880
+ */
1881
+ function todoProgressLabel(state) {
1882
+ const display = state.todos.length > 0 ? state.todos : state.archive;
1883
+ if (display.length === 0) return null;
1884
+ const activeIndex = state.inProgress ? display.findIndex((t) => t.id === state.inProgress.id) : -1;
1885
+ return `${activeIndex >= 0 ? activeIndex + 1 : state.tally.completed}/${display.length}`;
1886
+ }
1887
+ /**
1849
1888
  * React hook — active-todos state for the supplied session. Recomputes
1850
1889
  * on every parent re-render; the work is O(runs + todos), both bounded
1851
1890
  * by small constants in practice.
@@ -5089,34 +5128,14 @@ function userOnlyPaths(dirs) {
5089
5128
  storageMode: dirs.mode
5090
5129
  };
5091
5130
  }
5092
- /**
5093
- * Migrate legacy `state.json` settings shapes forward. Pre-5.x persisted
5094
- * `showToolCalls: boolean` controlled whether `↳ <tool>` lines rendered;
5095
- * 5.x replaces that with a 3-way `toolCallDisplay: 'hidden' | 'formatted'
5096
- * | 'full'` choice that adds a per-tool clean summary and a JSON debug
5097
- * view alongside the existing "show / hide" behavior.
5098
- *
5099
- * Mapping (only when the new key is absent — never overwrite a user's
5100
- * explicit modern choice):
5101
- *
5102
- * showToolCalls: true → toolCallDisplay: 'formatted'
5103
- * showToolCalls: false → toolCallDisplay: 'hidden'
5104
- *
5105
- * The legacy key is dropped from the returned object so the in-memory
5106
- * Settings shape stays clean; persisted state still carries it until
5107
- * the next save overwrites the file, which is harmless (extra fields
5108
- * round-trip through JSON without consequence).
5109
- */
5131
+ /** Migrate legacy `state.json` settings without overriding modern keys. */
5110
5132
  function migrateLegacySettings(loaded) {
5111
- if ("showToolCalls" in loaded && !("toolCallDisplay" in loaded)) {
5112
- const legacy = loaded.showToolCalls;
5113
- const { showToolCalls: _, ...rest } = loaded;
5114
- return {
5115
- ...rest,
5116
- toolCallDisplay: legacy === false ? "hidden" : "formatted"
5117
- };
5118
- }
5119
- return loaded;
5133
+ const migrated = { ...loaded };
5134
+ if ("allowInteraction" in migrated && !("interactionMode" in migrated)) migrated.interactionMode = migrated.allowInteraction === false ? "disabled" : "ask";
5135
+ delete migrated.allowInteraction;
5136
+ if ("showToolCalls" in migrated && !("toolCallDisplay" in migrated)) migrated.toolCallDisplay = migrated.showToolCalls === false ? "hidden" : "formatted";
5137
+ delete migrated.showToolCalls;
5138
+ return migrated;
5120
5139
  }
5121
5140
  /** Tri-state parse for env-var bools — explicit `undefined` keeps absence from forcing a default. */
5122
5141
  function parseEnvFlag(raw) {
@@ -6549,7 +6568,7 @@ const DEFAULT_SETTINGS = {
6549
6568
  compactionModel: "",
6550
6569
  targetFps: 60,
6551
6570
  mouseInteractions: true,
6552
- allowInteraction: true,
6571
+ interactionMode: "ask",
6553
6572
  smoothStreaming: true,
6554
6573
  fileLogging: false,
6555
6574
  showTodoIndicator: true,
@@ -6645,12 +6664,6 @@ const SETTINGS_TOGGLES = [
6645
6664
  label: "Safe mode",
6646
6665
  description: "prompt before each tool call (unless safelisted)"
6647
6666
  },
6648
- {
6649
- category: "agent",
6650
- key: "allowInteraction",
6651
- label: "Interactive prompts",
6652
- description: "let the agent pause for `ask_user` questions / `present_plan` approvals"
6653
- },
6654
6667
  {
6655
6668
  category: "agent",
6656
6669
  key: "resumeLastSession",
@@ -6781,7 +6794,7 @@ const SETTINGS_TOGGLES = [
6781
6794
  category: "ui",
6782
6795
  key: "showTodoIndicator",
6783
6796
  label: "Todo indicator",
6784
- description: "show the subtle \"in progress\" todo line above the prompt (modal stays accessible regardless)"
6797
+ description: "show the `n/total todos` chip in the footer (ctrl+t opens the list regardless)"
6785
6798
  },
6786
6799
  {
6787
6800
  category: "ui",
@@ -6803,6 +6816,26 @@ const SETTINGS_TOGGLES = [
6803
6816
  }
6804
6817
  ];
6805
6818
  const SETTINGS_CHOICES = [
6819
+ {
6820
+ category: "agent",
6821
+ key: "interactionMode",
6822
+ label: "Interaction mode",
6823
+ description: "ask normally, skip UI with repository-aware automatic responses, or disable interaction tools",
6824
+ options: [
6825
+ {
6826
+ value: "ask",
6827
+ label: "Ask normally"
6828
+ },
6829
+ {
6830
+ value: "skip",
6831
+ label: "Skip interactions"
6832
+ },
6833
+ {
6834
+ value: "disabled",
6835
+ label: "Disable tools"
6836
+ }
6837
+ ]
6838
+ },
6806
6839
  {
6807
6840
  category: "agent",
6808
6841
  key: "autoCompactThreshold",
@@ -7453,8 +7486,13 @@ function toEntries(paths, source, maxFiles) {
7453
7486
  * effort picker as a discoverable, in-place affordance.
7454
7487
  */
7455
7488
  function buildHints(options) {
7456
- const { screen, busy, pending, pendingInteractionLive, pendingInteractionResumed, currentSession, hasMultipleAgents, uiMode, modelLabel, modelColor, effortLabel, effortColor, effortKeyColor, modelOptionsLabel, agentLabel, agentColor, keybindings, inFlightToolCount, activeSkillCount, skillsChipColor, updateHint, cacheBreakHint = null, sessionsScopeAll } = options;
7457
- if (pending) return [
7489
+ const { screen, busy, pending, pendingInteractionLive, pendingInteractionResumed, currentSession, hasMultipleAgents, uiMode, modelLabel, modelColor, effortLabel, effortColor, effortKeyColor, modelOptionsLabel, agentLabel, agentColor, keybindings, inFlightToolCount, activeSkillCount, skillsChipColor, todoProgress, updateHint, cacheBreakHint = null, sessionsScopeAll } = options;
7490
+ const todosChip = todoProgress !== null ? {
7491
+ key: keybindings.openTodos,
7492
+ label: `${todoProgress} todos`
7493
+ } : null;
7494
+ const withTodos = (hints) => todosChip ? [...hints, todosChip] : hints;
7495
+ if (pending) return withTodos([
7458
7496
  {
7459
7497
  key: "↑↓",
7460
7498
  label: "navigate"
@@ -7467,8 +7505,8 @@ function buildHints(options) {
7467
7505
  key: "esc",
7468
7506
  label: "abort run"
7469
7507
  }
7470
- ];
7471
- if (pendingInteractionLive) return [
7508
+ ]);
7509
+ if (pendingInteractionLive) return withTodos([
7472
7510
  {
7473
7511
  key: "↑↓",
7474
7512
  label: "navigate"
@@ -7481,8 +7519,8 @@ function buildHints(options) {
7481
7519
  key: "esc",
7482
7520
  label: "abort run"
7483
7521
  }
7484
- ];
7485
- if (pendingInteractionResumed) return [
7522
+ ]);
7523
+ if (pendingInteractionResumed) return withTodos([
7486
7524
  {
7487
7525
  key: "↑↓",
7488
7526
  label: "navigate"
@@ -7495,7 +7533,7 @@ function buildHints(options) {
7495
7533
  key: "esc",
7496
7534
  label: "leave for later"
7497
7535
  }
7498
- ];
7536
+ ]);
7499
7537
  if (busy) {
7500
7538
  const baseBusyHints = [];
7501
7539
  if (inFlightToolCount > 0) baseBusyHints.push({
@@ -7506,7 +7544,7 @@ function buildHints(options) {
7506
7544
  key: "esc",
7507
7545
  label: "abort"
7508
7546
  });
7509
- return baseBusyHints;
7547
+ return withTodos(baseBusyHints);
7510
7548
  }
7511
7549
  if (screen === "auth") return [
7512
7550
  {
@@ -7591,6 +7629,7 @@ function buildHints(options) {
7591
7629
  }] : [],
7592
7630
  ...modelHint ? [modelHint] : [],
7593
7631
  ...skillsChip ? [skillsChip] : [],
7632
+ ...todosChip ? [todosChip] : [],
7594
7633
  ...cancelTaskChip ? [cancelTaskChip] : [],
7595
7634
  ...currentSession ? [{
7596
7635
  key: keybindings.openSessionDetails,
@@ -7693,14 +7732,80 @@ const ASK_USER_TOOL = "ask_user";
7693
7732
  function isInteractionTool(name) {
7694
7733
  return name === "present_plan" || name === "ask_user";
7695
7734
  }
7735
+ const AUTOMATIC_INTERACTION_INSTRUCTION = "Automatic mode is enabled. Make the best choice from the repository and current task, then continue without asking for this input again.";
7736
+ /**
7737
+ * Id prefix for interactions the HOST synthesizes — slash commands and
7738
+ * extension `ctx.interaction.*` share the prompt slot with the tools but
7739
+ * never pass through {@link createInteractionTools}. Model-originated
7740
+ * requests carry the provider's `tool_call.id` instead. Naming only:
7741
+ * origin policy reads {@link BaseRequest.origin}, never the id.
7742
+ */
7743
+ const HOST_INTERACTION_ID_PREFIX = "command_";
7744
+ /**
7745
+ * Whether a queued request came from a model tool call. Automatic mode
7746
+ * answers on the model's behalf, so it must leave host-originated prompts
7747
+ * alone: their consumer is local code awaiting a real decision, with no
7748
+ * model on the other end to act on an instruction sentence.
7749
+ */
7750
+ function isModelInteraction(request) {
7751
+ return request.origin === "model";
7752
+ }
7753
+ /**
7754
+ * Stand-in for a free-text answer nobody typed. Deliberately NOT the
7755
+ * instruction sentence: {@link serializeInteractionResponse} already leads
7756
+ * the envelope with it once, so repeating it per answer only restates the
7757
+ * same disclosure — four times over on a three-question form.
7758
+ */
7759
+ const AUTOMATIC_FREE_TEXT_ANSWER = "(no answer, automatic mode)";
7760
+ /**
7761
+ * Automatic answer for one question, in the shape its `type` promises:
7762
+ * `confirm` declares a boolean and `select` declares one of its own choice
7763
+ * ids, so a free-text placeholder would be out of contract there.
7764
+ *
7765
+ * These are defaults, not decisions — nobody chose them. The response
7766
+ * carries `automatic: true` so the model reads them as such and overrides
7767
+ * whatever doesn't fit; see {@link serializeInteractionResponse}.
7768
+ */
7769
+ function automaticAnswerFor(question) {
7770
+ switch (question.type) {
7771
+ case "confirm": return true;
7772
+ case "select": {
7773
+ const picked = question.choices[0]?.id ?? "";
7774
+ return question.multi ? picked ? [picked] : [] : picked;
7775
+ }
7776
+ default: return AUTOMATIC_FREE_TEXT_ANSWER;
7777
+ }
7778
+ }
7779
+ /** Build the deterministic response used when the host skips interaction UI. */
7780
+ function createAutomaticInteractionResponse(request) {
7781
+ if (request.kind === "plan") return {
7782
+ kind: "plan",
7783
+ decision: "approve",
7784
+ automatic: true
7785
+ };
7786
+ const answers = {};
7787
+ for (const question of request.payload.questions) answers[question.id] = automaticAnswerFor(question);
7788
+ return {
7789
+ kind: "question",
7790
+ answers,
7791
+ automatic: true
7792
+ };
7793
+ }
7696
7794
  /**
7697
7795
  * Format an {@link InteractionResponse} as the tool_result content. JSON
7698
7796
  * keeps the envelope parseable and explicit. Empty fields are stripped so
7699
7797
  * the model doesn't waste tokens reading absent values.
7700
7798
  */
7701
7799
  function serializeInteractionResponse(response) {
7800
+ const automatic = response.automatic ? {
7801
+ automatic: true,
7802
+ note: AUTOMATIC_INTERACTION_INSTRUCTION
7803
+ } : {};
7702
7804
  if (response.kind === "plan") {
7703
- const body = { decision: response.decision };
7805
+ const body = {
7806
+ ...automatic,
7807
+ decision: response.decision
7808
+ };
7704
7809
  if (response.comment && response.comment.trim().length > 0) body.comment = response.comment.trim();
7705
7810
  return JSON.stringify(body);
7706
7811
  }
@@ -7713,7 +7818,10 @@ function serializeInteractionResponse(response) {
7713
7818
  const picked = value.map((v) => String(v).trim()).filter((v) => v.length > 0);
7714
7819
  if (picked.length > 0) answers[id] = picked;
7715
7820
  }
7716
- return JSON.stringify({ answers });
7821
+ return JSON.stringify({
7822
+ ...automatic,
7823
+ answers
7824
+ });
7717
7825
  }
7718
7826
  /**
7719
7827
  * Build a protocol-valid user `SessionTurn` that closes a batch of
@@ -7777,6 +7885,7 @@ function pendingInteractionsFromTurns(turns) {
7777
7885
  if (!payload) continue;
7778
7886
  pending.push({
7779
7887
  id: call.callId,
7888
+ origin: "model",
7780
7889
  kind: "plan",
7781
7890
  tool: PRESENT_PLAN_TOOL,
7782
7891
  payload,
@@ -7789,6 +7898,7 @@ function pendingInteractionsFromTurns(turns) {
7789
7898
  if (!payload) continue;
7790
7899
  pending.push({
7791
7900
  id: call.callId,
7901
+ origin: "model",
7792
7902
  kind: "question",
7793
7903
  tool: ASK_USER_TOOL,
7794
7904
  payload,
@@ -7937,7 +8047,7 @@ function createInteractionTools(opts) {
7937
8047
  }
7938
8048
  const PLAN_DESCRIPTION = "Present a multi-step plan to the user for approval BEFORE executing it. Use this when you have a concrete proposal that materially changes the workspace and want explicit confirmation. The user can approve, reject, or request revisions; revisions come back as a comment alongside a `revise` decision.";
7939
8049
  const QUESTION_DESCRIPTION = "Ask the user one or more clarifying questions and pause until they answer. Batch related questions into a single call instead of asking one at a time — every call pauses the conversation. Each question carries a `type`: `text` (single line), `textarea` (multi-line), `select` (one of `choices`), or `confirm` (yes/no). Use sparingly: only when explicit user input materially changes the next steps.";
7940
- function createPlanTool({ requestInteraction }) {
8050
+ function createPlanTool({ requestInteraction, shouldSkipInteractions }) {
7941
8051
  return {
7942
8052
  spec: {
7943
8053
  name: PRESENT_PLAN_TOOL,
@@ -7973,21 +8083,23 @@ function createPlanTool({ requestInteraction }) {
7973
8083
  async execute(input, ctx) {
7974
8084
  const payload = parsePlanPayload(input);
7975
8085
  if (!payload) throw new Error("present_plan: invalid input — expected non-empty `title` and `plan` strings.");
7976
- const response = await requestInteraction({
8086
+ const request = {
7977
8087
  id: ctx.callId,
8088
+ origin: "model",
7978
8089
  kind: "plan",
7979
8090
  tool: PRESENT_PLAN_TOOL,
7980
8091
  payload,
7981
8092
  ...ctx.runId ? { runId: ctx.runId } : {},
7982
8093
  turnId: ctx.turnId,
7983
8094
  createdAt: Date.now()
7984
- });
8095
+ };
8096
+ const response = shouldSkipInteractions?.() ? createAutomaticInteractionResponse(request) : await requestInteraction(request);
7985
8097
  if (response.kind !== "plan") throw new Error(`present_plan: unexpected response kind "${response.kind}".`);
7986
8098
  return serializeInteractionResponse(response);
7987
8099
  }
7988
8100
  };
7989
8101
  }
7990
- function createQuestionTool({ requestInteraction }) {
8102
+ function createQuestionTool({ requestInteraction, shouldSkipInteractions }) {
7991
8103
  return {
7992
8104
  spec: {
7993
8105
  name: ASK_USER_TOOL,
@@ -8076,15 +8188,17 @@ function createQuestionTool({ requestInteraction }) {
8076
8188
  async execute(input, ctx) {
8077
8189
  const payload = parseQuestionPayload(input);
8078
8190
  if (!payload) throw new Error("ask_user: invalid input — expected a non-empty `questions` array.");
8079
- const response = await requestInteraction({
8191
+ const request = {
8080
8192
  id: ctx.callId,
8193
+ origin: "model",
8081
8194
  kind: "question",
8082
8195
  tool: ASK_USER_TOOL,
8083
8196
  payload,
8084
8197
  ...ctx.runId ? { runId: ctx.runId } : {},
8085
8198
  turnId: ctx.turnId,
8086
8199
  createdAt: Date.now()
8087
- });
8200
+ };
8201
+ const response = shouldSkipInteractions?.() ? createAutomaticInteractionResponse(request) : await requestInteraction(request);
8088
8202
  if (response.kind !== "question") throw new Error(`ask_user: unexpected response kind "${response.kind}".`);
8089
8203
  return serializeInteractionResponse(response);
8090
8204
  }
@@ -10436,6 +10550,6 @@ function computeTurnAnchors(items) {
10436
10550
  };
10437
10551
  }
10438
10552
  //#endregion
10439
- export { McpAuthProvider as $, setTodosForRun as $n, filterChainFallbacks as $t, writeProjects as A, discoverAgentsMd as An, toolCallPreview as Ar, useSettings as At, mcpToolsCachePath as B, singleAgentRegistry as Bn, CATPPUCCIN_MACCHIATO as Bt, addToSafelist as C, detectLibc as Cn, loadState as Cr, DEFAULT_SETTINGS as Ct, projectsFilePath as D, performSelfUpdate as Dn, stripSpawnTokensLine as Dr, SETTINGS_TOGGLES as Dt, matchesSafelistEntry as E, performInPlaceSelfUpdate as En, serverToolResultSummary as Er, SETTINGS_INPUTS as Et, oauthUsesManualCodePaste as F, DEFAULT_BUDGET_EXCLUDE_TOOLS as Fn, VAPORWAVE_THEME as Ft, useMcpToolToggleMap as G, TODO_WRITE_COUNTS_METADATA_KEY as Gn, useDiscoveryOptional as Gt, saveMcpToolsCache as H, TODOS_METADATA_KEY as Hn, createDiscoverySlot as Ht, runOAuthLogin as I, DEFAULT_PERSIST_EXCLUDE_TOOLS as In, GRUVBOX_DARK as It, indexOfServerRow as J, getTodosForRun as Jn, resolveConfig as Jt, useMcpToolToggleSet as K, createTodoTools as Kn, ConfigProvider as Kt, supportsOAuth as L, PLAN_AGENT as Ln, GRUVBOX_LIGHT as Lt, fetchOAuthRedirect as M, BUILD_AGENT as Mn, updateToolEventOutcomes as Mr, DEFAULT_THEME as Mt, normalizeRedirectPaste as N, BUILTIN_AGENTS as Nn, usageByModel as Nr, resolveChipColor as Nt, readProjects as O, resolvePlatformPackage as On, sumRunCosts as Or, SettingsProvider as Ot, redirectUriFromAuthUrl as P, DEFAULT_AGENT_ID as Pn, resolveTheme as Pt, patchMcpCredential as Q, selectActiveTodos as Qn, chainsEqual as Qt, clearMcpToolsCache as R, accentColor as Rn, CATPPUCCIN_FRAPPE as Rt, IMPLICITLY_SAFE_TOOLS as S, compareSemver as Sn, listSessionMeta as Sr, useEnabledToggleSet as St, isOnSafelist as T, parseSemver as Tn, saveState as Tr, SETTINGS_CHOICES as Tt, subscribeMcpToolsCache as U, TODOWRITE_TOOL as Un, DiscoveryProvider as Ut, refreshMcpToolsCatalog as V, TODOREAD_TOOL as Vn, CATPPUCCIN_MOCHA as Vt, buildToolToggle as W, TODO_STATUS_GLYPHS as Wn, useDiscovery as Wt, createFileMcpCredentialStore as X, pickActiveRunId as Xn, buildRunModel as Xt, parentServerName as Y, isTodoTool as Yn, resolveStoragePaths as Yt, mcpCredentialsPath as Z, pruneTodosByRun as Zn, chainPositionOf as Zt, resolveSessionExportTarget as _, bootProfileEnabled as _n, compactSummaryEvent as _r, hintsLength as _t, useSurfaces as a, countClaudeSessionFiles as an, INTERACTION_GUIDANCE as ar, InteractionsProvider as at, useSafeModeActions as b, useUpdateCheck as bn, eventsFromTurns as br, shortChord as bt, discoverSystemMd as c, mcpsWritePath as cn, PLAN_MODE_DOCTRINE_NO_PROMPTS as cr, createInteractionTools as ct, userSystemMdPath as d, buildMcpServers as dn, buildBuildSystem as dr, pendingInteractionsFromTurns as dt, providerKeySetChanged as en, useActiveTodos as er, useMcpAuthDispatch as et, useStreamBuffer as f, dedupMcpServersByName as fn, buildPlanSystem as fr, serializeInteractionResponse as ft, renderSession as g, tryOpenBrowser as gn, DEFAULT_SESSION_TITLE as gr, clipHintsToWidth as gt, discoverProjectSkills as h, parseMcpsFile as hn, createChatTurnsReadTool as hr, EMPTY_HINTS as ht, useSelectStyle as i, useCompletion as in, IDENTITY_PREFIX as ir, ASK_USER_TOOL as it, formatPathForCwd as j, renderAgentsMdBlock as jn, toolResultText as jr, BUILTIN_THEMES as jt, suggestSafelistEntries as k, chatAutoCompactBehavior as kn, titleFromTurns as kr, clampFps as kt, renderSystemMdSeed as l, removeMcpServer as ln, SUBAGENT_GUIDANCE as lr, isInteractionTool as lt, defaultSkillScanPaths as m, discoverProjectMcps as mn, chatReferenceTokensForPrompt as mr, useInteractionsQueue as mt, ThemeProvider as n, sanitizeModelChain as nn, COMMUNICATION_DOCTRINE as nr, getMcpAuthStatus as nt, useSyntaxStyles as o, hasClaudeCodeSetup as on, INTERACTION_GUIDANCE_NO_PROMPTS as or, PRESENT_PLAN_TOOL as ot, buildSkillsConfig as p, defaultMcpsConfigPaths as pn, envSection as pr, useInteractionsActions as pt, buildVisibleMcpRows as q, getArchivedTodosForRun as qn, useConfig as qt, useColors as r, toggleChainEntry as rn, DOING_TASKS_DOCTRINE as rr, reduceMcpAuth as rt, useTheme as s, importFromClaudeCode as sn, PLAN_MODE_DOCTRINE as sr, buildResumedToolResultsTurn as st, computeTurnAnchors as t, restoreChainFallbacks as tn, ACTIONS_WITH_CARE_DOCTRINE as tr, useMcpAuthState as tt, userScopeOverridesLoad as u, upsertMcpServer as un, TOKEN_DISCIPLINE_DOCTRINE as ur, makeRequestInteraction as ut, writeSessionExport as v, bootTick as vn, createStateStore as vr, truncateTrailing as vt, getSafelist as w, detectPackageManager as wn, marginTopFor as wr, SETTINGS_CATEGORIES as wt, useSafeModeQueue as x, checkForUpdate as xn, lastContextSizeFromTurns as xr, listProjectFiles as xt, SafeModeProvider as y, buildUpdateHint as yn, deriveSessionTitle as yr, buildHints as yt, loadMcpToolsCache as z, resolveAgentId as zn, CATPPUCCIN_LATTE as zt };
10553
+ export { McpAuthProvider as $, isTodoTool as $n, resolveStoragePaths as $t, writeProjects as A, performInPlaceSelfUpdate as An, saveState as Ar, SETTINGS_INPUTS as At, mcpToolsCachePath as B, DEFAULT_PERSIST_EXCLUDE_TOOLS as Bn, GRUVBOX_DARK as Bt, addToSafelist as C, buildUpdateHint as Cn, createStateStore as Cr, buildHints as Ct, projectsFilePath as D, detectLibc as Dn, listSessionMeta as Dr, DEFAULT_SETTINGS as Dt, matchesSafelistEntry as E, compareSemver as En, lastContextSizeFromTurns as Er, useEnabledToggleSet as Et, oauthUsesManualCodePaste as F, renderAgentsMdBlock as Fn, toolCallPreview as Fr, BUILTIN_THEMES as Ft, useMcpToolToggleMap as G, TODOREAD_TOOL as Gn, CATPPUCCIN_MOCHA as Gt, saveMcpToolsCache as H, accentColor as Hn, CATPPUCCIN_FRAPPE as Ht, runOAuthLogin as I, BUILD_AGENT as In, toolResultText as Ir, DEFAULT_THEME as It, indexOfServerRow as J, TODO_STATUS_GLYPHS as Jn, useDiscovery as Jt, useMcpToolToggleSet as K, TODOS_METADATA_KEY as Kn, createDiscoverySlot as Kt, supportsOAuth as L, BUILTIN_AGENTS as Ln, updateToolEventOutcomes as Lr, resolveChipColor as Lt, fetchOAuthRedirect as M, resolvePlatformPackage as Mn, stripSpawnTokensLine as Mr, SettingsProvider as Mt, normalizeRedirectPaste as N, chatAutoCompactBehavior as Nn, sumRunCosts as Nr, clampFps as Nt, readProjects as O, detectPackageManager as On, loadState as Or, SETTINGS_CATEGORIES as Ot, redirectUriFromAuthUrl as P, discoverAgentsMd as Pn, titleFromTurns as Pr, useSettings as Pt, patchMcpCredential as Q, getTodosForRun as Qn, resolveConfig as Qt, clearMcpToolsCache as R, DEFAULT_AGENT_ID as Rn, usageByModel as Rr, resolveTheme as Rt, IMPLICITLY_SAFE_TOOLS as S, bootTick as Sn, compactSummaryEvent as Sr, truncateTrailing as St, isOnSafelist as T, checkForUpdate as Tn, eventsFromTurns as Tr, listProjectFiles as Tt, subscribeMcpToolsCache as U, resolveAgentId as Un, CATPPUCCIN_LATTE as Ut, refreshMcpToolsCatalog as V, PLAN_AGENT as Vn, GRUVBOX_LIGHT as Vt, buildToolToggle as W, singleAgentRegistry as Wn, CATPPUCCIN_MACCHIATO as Wt, createFileMcpCredentialStore as X, createTodoTools as Xn, ConfigProvider as Xt, parentServerName as Y, TODO_WRITE_COUNTS_METADATA_KEY as Yn, useDiscoveryOptional as Yt, mcpCredentialsPath as Z, getArchivedTodosForRun as Zn, useConfig as Zt, resolveSessionExportTarget as _, defaultMcpsConfigPaths as _n, buildPlanSystem as _r, useInteractionsActions as _t, useSurfaces as a, restoreChainFallbacks as an, useActiveTodos as ar, AUTOMATIC_INTERACTION_INSTRUCTION as at, useSafeModeActions as b, tryOpenBrowser as bn, createChatTurnsReadTool as br, clipHintsToWidth as bt, discoverSystemMd as c, useCompletion as cn, DOING_TASKS_DOCTRINE as cr, PRESENT_PLAN_TOOL as ct, userSystemMdPath as d, importFromClaudeCode as dn, INTERACTION_GUIDANCE_NO_PROMPTS as dr, createInteractionTools as dt, buildRunModel as en, pickActiveRunId as er, useMcpAuthDispatch as et, useStreamBuffer as f, mcpsWritePath as fn, PLAN_MODE_DOCTRINE as fr, isInteractionTool as ft, renderSession as g, dedupMcpServersByName as gn, buildBuildSystem as gr, serializeInteractionResponse as gt, discoverProjectSkills as h, buildMcpServers as hn, TOKEN_DISCIPLINE_DOCTRINE as hr, pendingInteractionsFromTurns as ht, useSelectStyle as i, providerKeySetChanged as in, todoProgressLabel as ir, ASK_USER_TOOL as it, formatPathForCwd as j, performSelfUpdate as jn, serverToolResultSummary as jr, SETTINGS_TOGGLES as jt, suggestSafelistEntries as k, parseSemver as kn, marginTopFor as kr, SETTINGS_CHOICES as kt, renderSystemMdSeed as l, countClaudeSessionFiles as ln, IDENTITY_PREFIX as lr, buildResumedToolResultsTurn as lt, defaultSkillScanPaths as m, upsertMcpServer as mn, SUBAGENT_GUIDANCE as mr, makeRequestInteraction as mt, ThemeProvider as n, chainsEqual as nn, selectActiveTodos as nr, getMcpAuthStatus as nt, useSyntaxStyles as o, sanitizeModelChain as on, ACTIONS_WITH_CARE_DOCTRINE as or, HOST_INTERACTION_ID_PREFIX as ot, buildSkillsConfig as p, removeMcpServer as pn, PLAN_MODE_DOCTRINE_NO_PROMPTS as pr, isModelInteraction as pt, buildVisibleMcpRows as q, TODOWRITE_TOOL as qn, DiscoveryProvider as qt, useColors as r, filterChainFallbacks as rn, setTodosForRun as rr, reduceMcpAuth as rt, useTheme as s, toggleChainEntry as sn, COMMUNICATION_DOCTRINE as sr, InteractionsProvider as st, computeTurnAnchors as t, chainPositionOf as tn, pruneTodosByRun as tr, useMcpAuthState as tt, userScopeOverridesLoad as u, hasClaudeCodeSetup as un, INTERACTION_GUIDANCE as ur, createAutomaticInteractionResponse as ut, writeSessionExport as v, discoverProjectMcps as vn, envSection as vr, useInteractionsQueue as vt, getSafelist as w, useUpdateCheck as wn, deriveSessionTitle as wr, shortChord as wt, useSafeModeQueue as x, bootProfileEnabled as xn, DEFAULT_SESSION_TITLE as xr, hintsLength as xt, SafeModeProvider as y, parseMcpsFile as yn, chatReferenceTokensForPrompt as yr, EMPTY_HINTS as yt, loadMcpToolsCache as z, DEFAULT_BUDGET_EXCLUDE_TOOLS as zn, VAPORWAVE_THEME as zt };
10440
10554
 
10441
- //# sourceMappingURL=transcript-anchors-Bv8HQ3S2.js.map
10555
+ //# sourceMappingURL=transcript-anchors-BvC8t7dt.js.map