@andorra-labs/code 0.1.11 → 0.1.13

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 (614) hide show
  1. package/README.md +8 -2
  2. package/THIRD_PARTY_NOTICES.md +15 -0
  3. package/dist/src/account-presentation.d.ts +1 -37
  4. package/dist/src/account-presentation.js +2 -42
  5. package/dist/src/activity.d.ts +0 -25
  6. package/dist/src/activity.js +1 -23
  7. package/dist/src/agent-definitions.d.ts +0 -26
  8. package/dist/src/agent-definitions.js +0 -43
  9. package/dist/src/agent-execution.d.ts +0 -2
  10. package/dist/src/agent-execution.js +59 -414
  11. package/dist/src/agent-mcp-catalog.d.ts +0 -8
  12. package/dist/src/agent-mcp-catalog.js +0 -2
  13. package/dist/src/agent-mcp.d.ts +0 -56
  14. package/dist/src/agent-mcp.js +14 -153
  15. package/dist/src/agent-modifiers.d.ts +0 -1
  16. package/dist/src/agent-modifiers.js +25 -68
  17. package/dist/src/analytics.d.ts +0 -66
  18. package/dist/src/analytics.js +0 -45
  19. package/dist/src/anthropic-console-auth.d.ts +0 -24
  20. package/dist/src/anthropic-console-auth.js +0 -37
  21. package/dist/src/anthropic-credentials.d.ts +0 -25
  22. package/dist/src/anthropic-credentials.js +0 -28
  23. package/dist/src/app-server/protocol.d.ts +19 -244
  24. package/dist/src/app-server/protocol.js +1 -132
  25. package/dist/src/app-server/reasoning.d.ts +0 -31
  26. package/dist/src/app-server/reasoning.js +0 -54
  27. package/dist/src/app-server/terminal.d.ts +0 -36
  28. package/dist/src/app-server/terminal.js +3 -39
  29. package/dist/src/app-server/workspace.d.ts +0 -167
  30. package/dist/src/app-server/workspace.js +4 -406
  31. package/dist/src/app-server.d.ts +33 -918
  32. package/dist/src/app-server.js +608 -2984
  33. package/dist/src/artifacts.d.ts +0 -10
  34. package/dist/src/artifacts.js +1 -11
  35. package/dist/src/attachments.d.ts +4 -98
  36. package/dist/src/attachments.js +10 -130
  37. package/dist/src/auth/AuthManager.d.ts +0 -93
  38. package/dist/src/auth/AuthManager.js +3 -165
  39. package/dist/src/auth/callback-page.d.ts +0 -1
  40. package/dist/src/auth/callback-page.js +0 -4
  41. package/dist/src/auth/callback.d.ts +0 -25
  42. package/dist/src/auth/callback.js +1 -29
  43. package/dist/src/auth/deployment.d.ts +0 -16
  44. package/dist/src/auth/deployment.js +0 -16
  45. package/dist/src/auth/index.d.ts +0 -11
  46. package/dist/src/auth/index.js +0 -11
  47. package/dist/src/auth/lock.d.ts +0 -1
  48. package/dist/src/auth/lock.js +0 -1
  49. package/dist/src/auth/store.d.ts +7 -108
  50. package/dist/src/auth/store.js +21 -129
  51. package/dist/src/auth/types.d.ts +0 -8
  52. package/dist/src/auth-commands.d.ts +0 -5
  53. package/dist/src/auth-commands.js +0 -1
  54. package/dist/src/automation-runner.d.ts +0 -9
  55. package/dist/src/automation-runner.js +0 -11
  56. package/dist/src/automation-service.d.ts +0 -10
  57. package/dist/src/automation-service.js +3 -17
  58. package/dist/src/automation-tool.js +0 -5
  59. package/dist/src/automation-worker-shutdown.d.ts +0 -1
  60. package/dist/src/automation-worker-shutdown.js +0 -3
  61. package/dist/src/automations.d.ts +23 -2
  62. package/dist/src/automations.js +91 -12
  63. package/dist/src/background-tasks.d.ts +0 -23
  64. package/dist/src/background-tasks.js +0 -11
  65. package/dist/src/boot-trace.d.ts +0 -13
  66. package/dist/src/boot-trace.js +1 -14
  67. package/dist/src/browser-activity.js +0 -2
  68. package/dist/src/browser-bridge.d.ts +0 -2
  69. package/dist/src/browser-bridge.js +0 -27
  70. package/dist/src/browser-captcha-tool.d.ts +0 -13
  71. package/dist/src/browser-captcha-tool.js +3 -35
  72. package/dist/src/browser-extensions-tool.d.ts +24 -0
  73. package/dist/src/browser-extensions-tool.js +137 -0
  74. package/dist/src/browser-extensions.d.ts +127 -0
  75. package/dist/src/browser-extensions.js +729 -0
  76. package/dist/src/browser-observation.d.ts +0 -15
  77. package/dist/src/browser-observation.js +1 -22
  78. package/dist/src/browser-panel-tool.d.ts +10 -25
  79. package/dist/src/browser-panel-tool.js +64 -60
  80. package/dist/src/browser-runner.d.ts +0 -1
  81. package/dist/src/browser-runner.js +7 -46
  82. package/dist/src/browser-server.d.ts +0 -6
  83. package/dist/src/browser-server.js +6 -229
  84. package/dist/src/browser-session.d.ts +0 -25
  85. package/dist/src/browser-session.js +1 -71
  86. package/dist/src/browser-stealth.d.ts +0 -12
  87. package/dist/src/browser-stealth.js +0 -36
  88. package/dist/src/browser-ui/app.js +7 -174
  89. package/dist/src/browser-ui/style.css +0 -68
  90. package/dist/src/browser-ui/tokens.css +11 -93
  91. package/dist/src/browser-view.d.ts +52 -290
  92. package/dist/src/browser-view.js +354 -567
  93. package/dist/src/capabilities.d.ts +0 -8
  94. package/dist/src/capabilities.js +0 -29
  95. package/dist/src/capsolver.d.ts +0 -13
  96. package/dist/src/capsolver.js +0 -15
  97. package/dist/src/clarification-ui.d.ts +0 -7
  98. package/dist/src/clarification-ui.js +0 -8
  99. package/dist/src/claude-executable.d.ts +0 -1
  100. package/dist/src/claude-executable.js +1 -2
  101. package/dist/src/claude-provider.d.ts +6 -19
  102. package/dist/src/claude-provider.js +166 -61
  103. package/dist/src/cli-executable.d.ts +0 -16
  104. package/dist/src/cli-executable.js +0 -7
  105. package/dist/src/cli-process.d.ts +0 -26
  106. package/dist/src/cli-process.js +0 -18
  107. package/dist/src/cli-sign-in.d.ts +0 -20
  108. package/dist/src/cli-sign-in.js +1 -17
  109. package/dist/src/cli.d.ts +3 -56
  110. package/dist/src/cli.js +193 -702
  111. package/dist/src/code-intelligence/CodeIntelligenceManager.d.ts +4 -59
  112. package/dist/src/code-intelligence/CodeIntelligenceManager.js +27 -100
  113. package/dist/src/code-intelligence/ContextLedger.d.ts +0 -4
  114. package/dist/src/code-intelligence/ContextLedger.js +0 -10
  115. package/dist/src/code-intelligence/ContextRouter.d.ts +0 -6
  116. package/dist/src/code-intelligence/ContextRouter.js +0 -8
  117. package/dist/src/code-intelligence/codegraph/CodeGraphProjectSession.d.ts +0 -2
  118. package/dist/src/code-intelligence/codegraph/CodeGraphProjectSession.js +5 -12
  119. package/dist/src/code-intelligence/codegraph/CodeGraphProvider.d.ts +0 -6
  120. package/dist/src/code-intelligence/codegraph/CodeGraphProvider.js +0 -6
  121. package/dist/src/code-intelligence/codegraph/CodeGraphSyncBarrier.d.ts +0 -5
  122. package/dist/src/code-intelligence/codegraph/CodeGraphSyncBarrier.js +1 -17
  123. package/dist/src/code-intelligence/codegraph/repoExploreTool.d.ts +0 -5
  124. package/dist/src/code-intelligence/codegraph/repoExploreTool.js +0 -5
  125. package/dist/src/code-intelligence/repository.d.ts +0 -9
  126. package/dist/src/code-intelligence/repository.js +1 -11
  127. package/dist/src/code-intelligence/types.d.ts +0 -8
  128. package/dist/src/codex-auth.d.ts +0 -44
  129. package/dist/src/codex-auth.js +0 -45
  130. package/dist/src/codex-browser-auth.d.ts +0 -13
  131. package/dist/src/codex-browser-auth.js +3 -20
  132. package/dist/src/codex-errors.js +0 -2
  133. package/dist/src/codex-executable.d.ts +0 -2
  134. package/dist/src/codex-executable.js +1 -7
  135. package/dist/src/codex-provider.d.ts +0 -13
  136. package/dist/src/codex-provider.js +1 -26
  137. package/dist/src/codex-rpc.d.ts +0 -10
  138. package/dist/src/codex-rpc.js +0 -12
  139. package/dist/src/coding-tools.d.ts +6 -27
  140. package/dist/src/coding-tools.js +193 -205
  141. package/dist/src/command-metrics.d.ts +0 -4
  142. package/dist/src/command-output-tap.d.ts +0 -11
  143. package/dist/src/command-output-tap.js +0 -3
  144. package/dist/src/command-screens.d.ts +24 -0
  145. package/dist/src/command-screens.js +132 -100
  146. package/dist/src/commands.d.ts +6 -63
  147. package/dist/src/commands.js +20 -100
  148. package/dist/src/completion-gates.d.ts +0 -47
  149. package/dist/src/completion-gates.js +0 -14
  150. package/dist/src/completion.d.ts +2 -58
  151. package/dist/src/completion.js +90 -186
  152. package/dist/src/config.d.ts +12 -116
  153. package/dist/src/config.js +41 -171
  154. package/dist/src/context-budget.d.ts +0 -22
  155. package/dist/src/context-budget.js +0 -44
  156. package/dist/src/context-compaction.d.ts +29 -6
  157. package/dist/src/context-compaction.js +94 -25
  158. package/dist/src/context-selection.d.ts +0 -24
  159. package/dist/src/context-selection.js +0 -34
  160. package/dist/src/dashboard-view.d.ts +0 -2
  161. package/dist/src/dashboard-view.js +0 -35
  162. package/dist/src/dashboard.d.ts +0 -2
  163. package/dist/src/dashboard.js +0 -9
  164. package/dist/src/deadline.d.ts +0 -45
  165. package/dist/src/deadline.js +0 -54
  166. package/dist/src/decision/ContinuationAdapter.d.ts +0 -5
  167. package/dist/src/decision/ContinuationAdapter.js +0 -5
  168. package/dist/src/decision/DecisionEngine.d.ts +0 -4
  169. package/dist/src/decision/DecisionManager.d.ts +0 -1
  170. package/dist/src/decision/DecisionManager.js +2 -7
  171. package/dist/src/decision/DecisionPolicy.d.ts +0 -1
  172. package/dist/src/decision/DecisionPolicy.js +0 -1
  173. package/dist/src/decision/FactContinuations.d.ts +11 -43
  174. package/dist/src/decision/FactContinuations.js +126 -95
  175. package/dist/src/decision/FactServiceGate.d.ts +0 -1
  176. package/dist/src/decision/FactServiceGate.js +0 -4
  177. package/dist/src/decision/PreparedSteps.d.ts +0 -15
  178. package/dist/src/decision/PreparedSteps.js +1 -11
  179. package/dist/src/decision/applyToolMenu.d.ts +0 -1
  180. package/dist/src/decision/applyToolMenu.js +1 -5
  181. package/dist/src/decision/checks.d.ts +15 -28
  182. package/dist/src/decision/checks.js +118 -49
  183. package/dist/src/decision/facts.d.ts +0 -16
  184. package/dist/src/decision/facts.js +0 -30
  185. package/dist/src/decision/guidancePolicy.js +0 -1
  186. package/dist/src/decision/hostedPolicy.d.ts +0 -6
  187. package/dist/src/decision/hostedPolicy.js +0 -7
  188. package/dist/src/decision/hostedSkills.d.ts +0 -19
  189. package/dist/src/decision/hostedSkills.js +0 -19
  190. package/dist/src/decision/optimizationPolicy.d.ts +0 -3
  191. package/dist/src/decision/optimizationPolicy.js +1 -4
  192. package/dist/src/decision/providers/AndorraDecisionProvider.d.ts +0 -7
  193. package/dist/src/decision/providers/AndorraDecisionProvider.js +4 -27
  194. package/dist/src/decision/providers/HttpDecisionProvider.d.ts +0 -2
  195. package/dist/src/decision/providers/HttpDecisionProvider.js +0 -6
  196. package/dist/src/decision/routeTools.d.ts +0 -8
  197. package/dist/src/decision/routeTools.js +1 -8
  198. package/dist/src/decision/toolFamilies.d.ts +0 -1
  199. package/dist/src/decision/toolFamilies.js +0 -1
  200. package/dist/src/decision/toolMenu.d.ts +0 -3
  201. package/dist/src/decision/toolMenu.js +0 -4
  202. package/dist/src/decision/types.d.ts +0 -6
  203. package/dist/src/default-graph.d.ts +0 -9
  204. package/dist/src/default-graph.js +0 -9
  205. package/dist/src/delegation-changes.d.ts +0 -56
  206. package/dist/src/delegation-changes.js +15 -124
  207. package/dist/src/diff-preview.d.ts +1 -1
  208. package/dist/src/diff-preview.js +4 -12
  209. package/dist/src/duration.d.ts +0 -50
  210. package/dist/src/duration.js +0 -50
  211. package/dist/src/efficiency.d.ts +0 -39
  212. package/dist/src/efficiency.js +0 -16
  213. package/dist/src/engine/protocol.d.ts +0 -2
  214. package/dist/src/engine/protocol.js +0 -2
  215. package/dist/src/engine-streams.d.ts +13 -0
  216. package/dist/src/engine-streams.js +16 -0
  217. package/dist/src/extensions.d.ts +3 -2
  218. package/dist/src/extensions.js +76 -37
  219. package/dist/src/favicons.d.ts +0 -26
  220. package/dist/src/favicons.js +0 -34
  221. package/dist/src/file-diff.d.ts +2 -58
  222. package/dist/src/file-diff.js +0 -32
  223. package/dist/src/file-read-key.d.ts +1 -0
  224. package/dist/src/file-read-key.js +5 -0
  225. package/dist/src/file-read-state.d.ts +0 -1
  226. package/dist/src/file-read-state.js +0 -4
  227. package/dist/src/firefox-cookies.d.ts +0 -34
  228. package/dist/src/firefox-cookies.js +1 -55
  229. package/dist/src/git-identity-audit.d.ts +27 -0
  230. package/dist/src/git-identity-audit.js +286 -0
  231. package/dist/src/git-identity-guard.d.ts +4 -0
  232. package/dist/src/git-identity-guard.js +998 -0
  233. package/dist/src/git-identity-hold.d.ts +12 -0
  234. package/dist/src/git-identity-hold.js +81 -0
  235. package/dist/src/git-summary.d.ts +0 -58
  236. package/dist/src/git-summary.js +2 -212
  237. package/dist/src/goal-completion-verification.d.ts +2 -2
  238. package/dist/src/goal-completion-verification.js +3 -6
  239. package/dist/src/graph-account.d.ts +0 -21
  240. package/dist/src/graph-account.js +0 -17
  241. package/dist/src/graph-editor-session.d.ts +0 -1
  242. package/dist/src/graph-editor-session.js +1 -3
  243. package/dist/src/graph-health.d.ts +7 -49
  244. package/dist/src/graph-health.js +35 -46
  245. package/dist/src/graph-manager-chat.d.ts +27 -128
  246. package/dist/src/graph-manager-chat.js +36 -166
  247. package/dist/src/graph-provider-portability.d.ts +1 -21
  248. package/dist/src/graph-provider-portability.js +6 -45
  249. package/dist/src/graph-quota.d.ts +0 -33
  250. package/dist/src/graph-quota.js +1 -44
  251. package/dist/src/graph-runner.d.ts +0 -1
  252. package/dist/src/graph-runner.js +47 -387
  253. package/dist/src/graph-selection.d.ts +0 -14
  254. package/dist/src/graph-selection.js +0 -14
  255. package/dist/src/graph-server.d.ts +3 -11
  256. package/dist/src/graph-server.js +70 -111
  257. package/dist/src/graph-studio-features.d.ts +0 -5
  258. package/dist/src/graph-studio-features.js +2 -42
  259. package/dist/src/graph-sync.d.ts +0 -78
  260. package/dist/src/graph-sync.js +5 -201
  261. package/dist/src/graph-tool.d.ts +0 -18
  262. package/dist/src/graph-tool.js +0 -27
  263. package/dist/src/graph-ui/app.js +229 -498
  264. package/dist/src/graph-ui/compat.js +0 -7
  265. package/dist/src/graph-ui/controls.css +47 -43
  266. package/dist/src/graph-ui/controls.js +0 -88
  267. package/dist/src/graph-ui/drafts.js +0 -12
  268. package/dist/src/graph-ui/edge-router.js +0 -62
  269. package/dist/src/graph-ui/embed.js +0 -59
  270. package/dist/src/graph-ui/icons.js +2 -7
  271. package/dist/src/graph-ui/index.html +2 -2
  272. package/dist/src/graph-ui/library.css +0 -5
  273. package/dist/src/graph-ui/manager-markdown.js +0 -11
  274. package/dist/src/graph-ui/manager-state.js +110 -49
  275. package/dist/src/graph-ui/manager.css +2 -20
  276. package/dist/src/graph-ui/manager.js +251 -166
  277. package/dist/src/graph-ui/model-picker.js +250 -0
  278. package/dist/src/graph-ui/provider-glyphs/alibaba-cloud.png +0 -0
  279. package/dist/src/graph-ui/provider-glyphs/anthropic.png +0 -0
  280. package/dist/src/graph-ui/provider-glyphs/aws-bedrock.png +0 -0
  281. package/dist/src/graph-ui/provider-glyphs/claude.png +0 -0
  282. package/dist/src/graph-ui/provider-glyphs/deepseek.png +0 -0
  283. package/dist/src/graph-ui/provider-glyphs/fireworks.png +0 -0
  284. package/dist/src/graph-ui/provider-glyphs/kimi.png +0 -0
  285. package/dist/src/graph-ui/provider-glyphs/minimax.png +0 -0
  286. package/dist/src/graph-ui/provider-glyphs/openai.png +0 -0
  287. package/dist/src/graph-ui/provider-glyphs/opencode.png +0 -0
  288. package/dist/src/graph-ui/provider-glyphs/openrouter.png +0 -0
  289. package/dist/src/graph-ui/provider-glyphs/xai.png +0 -0
  290. package/dist/src/graph-ui/provider-glyphs/xiaomi-mimo.png +0 -0
  291. package/dist/src/graph-ui/provider-glyphs/zai.png +0 -0
  292. package/dist/src/graph-ui/sidebar.js +2 -3
  293. package/dist/src/graph-ui/skill-picker.js +373 -39
  294. package/dist/src/graph-ui/studio-canvas.js +3 -38
  295. package/dist/src/graph-ui/studio.css +0 -18
  296. package/dist/src/graph-ui/studio.js +3 -71
  297. package/dist/src/graph-ui/style.css +11 -134
  298. package/dist/src/graph-ui/theme.js +1 -26
  299. package/dist/src/graph-ui/tokens.css +15 -114
  300. package/dist/src/graphs.d.ts +7 -156
  301. package/dist/src/graphs.js +72 -273
  302. package/dist/src/grep-regex-worker.js +0 -2
  303. package/dist/src/grep-regex.d.ts +1 -5
  304. package/dist/src/grep-regex.js +6 -8
  305. package/dist/src/grok-provider.d.ts +0 -17
  306. package/dist/src/grok-provider.js +1 -26
  307. package/dist/src/handoffs.d.ts +0 -11
  308. package/dist/src/handoffs.js +0 -13
  309. package/dist/src/hardened-runtime.d.ts +0 -10
  310. package/dist/src/hardened-runtime.js +8 -46
  311. package/dist/src/harness-home.d.ts +21 -0
  312. package/dist/src/harness-home.js +87 -0
  313. package/dist/src/host-process-guard.d.ts +0 -50
  314. package/dist/src/host-process-guard.js +0 -641
  315. package/dist/src/limits.d.ts +0 -64
  316. package/dist/src/limits.js +0 -62
  317. package/dist/src/managed-sign-in.d.ts +0 -12
  318. package/dist/src/managed-sign-in.js +0 -16
  319. package/dist/src/markdown.d.ts +0 -28
  320. package/dist/src/markdown.js +1 -175
  321. package/dist/src/mcp.d.ts +21 -82
  322. package/dist/src/mcp.js +228 -237
  323. package/dist/src/membership-errors.d.ts +0 -14
  324. package/dist/src/membership-errors.js +0 -13
  325. package/dist/src/membership.d.ts +2 -60
  326. package/dist/src/membership.js +0 -85
  327. package/dist/src/memory/LocalToolMemory.d.ts +0 -1
  328. package/dist/src/memory/LocalToolMemory.js +2 -7
  329. package/dist/src/memory/MemoryDistiller.js +0 -15
  330. package/dist/src/memory/MemoryManager.d.ts +0 -3
  331. package/dist/src/memory/MemoryManager.js +6 -18
  332. package/dist/src/memory/MemoryPolicy.d.ts +0 -2
  333. package/dist/src/memory/MemoryPolicy.js +0 -2
  334. package/dist/src/memory/MemoryProvider.d.ts +0 -6
  335. package/dist/src/memory/MemoryRetriever.js +0 -7
  336. package/dist/src/memory/PermissionMemoryProvider.d.ts +0 -1
  337. package/dist/src/memory/PermissionMemoryProvider.js +0 -1
  338. package/dist/src/memory/ProjectMemory.d.ts +42 -0
  339. package/dist/src/memory/ProjectMemory.js +285 -0
  340. package/dist/src/memory/ToolFailureLessons.d.ts +0 -3
  341. package/dist/src/memory/ToolFailureLessons.js +0 -6
  342. package/dist/src/memory/index.d.ts +1 -0
  343. package/dist/src/memory/index.js +1 -0
  344. package/dist/src/memory/providers/NoOpMemoryProvider.d.ts +0 -1
  345. package/dist/src/memory/providers/NoOpMemoryProvider.js +0 -1
  346. package/dist/src/memory/redaction.d.ts +0 -5
  347. package/dist/src/memory/redaction.js +0 -11
  348. package/dist/src/memory/repository.d.ts +0 -6
  349. package/dist/src/memory/repository.js +2 -12
  350. package/dist/src/memory/types.d.ts +0 -1
  351. package/dist/src/model-health-cache.d.ts +0 -38
  352. package/dist/src/model-health-cache.js +1 -49
  353. package/dist/src/model-metadata.d.ts +0 -18
  354. package/dist/src/model-metadata.js +2 -42
  355. package/dist/src/model-override.d.ts +0 -36
  356. package/dist/src/model-override.js +0 -43
  357. package/dist/src/model-tiers.d.ts +0 -13
  358. package/dist/src/model-tiers.js +0 -23
  359. package/dist/src/opencode-catalog.d.ts +0 -2
  360. package/dist/src/opencode-catalog.js +0 -11
  361. package/dist/src/opencode-cli-provider.d.ts +0 -35
  362. package/dist/src/opencode-cli-provider.js +1 -44
  363. package/dist/src/opencode-provider.d.ts +0 -2
  364. package/dist/src/opencode-provider.js +6 -22
  365. package/dist/src/package-name.d.ts +1 -0
  366. package/dist/src/package-name.js +1 -0
  367. package/dist/src/paged-transcript.d.ts +0 -11
  368. package/dist/src/paged-transcript.js +2 -20
  369. package/dist/src/palette.d.ts +0 -63
  370. package/dist/src/palette.js +0 -63
  371. package/dist/src/permissions.d.ts +0 -15
  372. package/dist/src/permissions.js +0 -17
  373. package/dist/src/powershell-pool.d.ts +0 -9
  374. package/dist/src/powershell-pool.js +3 -26
  375. package/dist/src/process-warnings.d.ts +4 -0
  376. package/dist/src/process-warnings.js +103 -0
  377. package/dist/src/profile.d.ts +0 -43
  378. package/dist/src/profile.js +0 -43
  379. package/dist/src/project-reservation.d.ts +11 -0
  380. package/dist/src/project-reservation.js +143 -0
  381. package/dist/src/provider-connection.d.ts +0 -18
  382. package/dist/src/provider-connection.js +0 -39
  383. package/dist/src/provider-engine.d.ts +0 -21
  384. package/dist/src/provider-engine.js +3 -98
  385. package/dist/src/provider-import.d.ts +0 -49
  386. package/dist/src/provider-import.js +0 -60
  387. package/dist/src/provider-keys.d.ts +1 -36
  388. package/dist/src/provider-keys.js +5 -48
  389. package/dist/src/provider-settings.d.ts +0 -2
  390. package/dist/src/provider-settings.js +0 -32
  391. package/dist/src/providers.d.ts +0 -217
  392. package/dist/src/providers.js +0 -315
  393. package/dist/src/pull-requests.d.ts +0 -173
  394. package/dist/src/pull-requests.js +5 -195
  395. package/dist/src/qa/browser/PlaywrightRunner.d.ts +0 -7
  396. package/dist/src/qa/browser/PlaywrightRunner.js +2 -16
  397. package/dist/src/qa/command-policy.d.ts +0 -23
  398. package/dist/src/qa/command-policy.js +0 -30
  399. package/dist/src/qa/guidance.d.ts +0 -21
  400. package/dist/src/qa/guidance.js +0 -20
  401. package/dist/src/qa/profile/ProjectInspector.d.ts +0 -4
  402. package/dist/src/qa/profile/ProjectInspector.js +0 -6
  403. package/dist/src/qa/profile/QaConfigLoader.d.ts +0 -7
  404. package/dist/src/qa/profile/QaConfigLoader.js +0 -6
  405. package/dist/src/qa/profile/QaProfile.d.ts +0 -7
  406. package/dist/src/qa/profile/QaProfile.js +0 -7
  407. package/dist/src/qa/profile/yaml.d.ts +0 -9
  408. package/dist/src/qa/profile/yaml.js +0 -13
  409. package/dist/src/qa/qa-authorize.d.ts +0 -19
  410. package/dist/src/qa/qa-authorize.js +4 -11
  411. package/dist/src/qa/runtime/ProcessManager.d.ts +0 -31
  412. package/dist/src/qa/runtime/ProcessManager.js +4 -41
  413. package/dist/src/qa/runtime/PtyManager.d.ts +0 -4
  414. package/dist/src/qa/runtime/PtyManager.js +2 -7
  415. package/dist/src/qa/runtime/changes.d.ts +0 -11
  416. package/dist/src/qa/runtime/changes.js +1 -3
  417. package/dist/src/qa/tools.d.ts +0 -10
  418. package/dist/src/qa/tools.js +0 -12
  419. package/dist/src/qa/types.d.ts +0 -13
  420. package/dist/src/react-runtime.d.ts +2 -21
  421. package/dist/src/react-runtime.js +106 -418
  422. package/dist/src/read-document-doc.d.ts +0 -6
  423. package/dist/src/read-document-doc.js +0 -55
  424. package/dist/src/read-document-docx.d.ts +0 -16
  425. package/dist/src/read-document-docx.js +2 -69
  426. package/dist/src/read-document-text.d.ts +0 -17
  427. package/dist/src/read-document-text.js +0 -22
  428. package/dist/src/read-document-tool.d.ts +0 -31
  429. package/dist/src/read-document-tool.js +0 -30
  430. package/dist/src/read-document.d.ts +0 -49
  431. package/dist/src/read-document.js +1 -67
  432. package/dist/src/read-image.d.ts +0 -32
  433. package/dist/src/read-image.js +0 -33
  434. package/dist/src/remote/cert.d.ts +1 -19
  435. package/dist/src/remote/cert.js +2 -51
  436. package/dist/src/remote/client.d.ts +0 -70
  437. package/dist/src/remote/client.js +2 -117
  438. package/dist/src/remote/command.js +0 -17
  439. package/dist/src/remote/engine-pool.d.ts +0 -152
  440. package/dist/src/remote/engine-pool.js +17 -335
  441. package/dist/src/remote/errors.d.ts +0 -15
  442. package/dist/src/remote/errors.js +0 -7
  443. package/dist/src/remote/network.d.ts +0 -26
  444. package/dist/src/remote/network.js +1 -34
  445. package/dist/src/remote/pairing.d.ts +16 -51
  446. package/dist/src/remote/pairing.js +50 -57
  447. package/dist/src/remote/pem.d.ts +2 -0
  448. package/dist/src/remote/pem.js +7 -0
  449. package/dist/src/remote/roots.d.ts +0 -20
  450. package/dist/src/remote/roots.js +0 -8
  451. package/dist/src/remote/serve.d.ts +0 -47
  452. package/dist/src/remote/serve.js +0 -30
  453. package/dist/src/remote/server.d.ts +0 -14
  454. package/dist/src/remote/server.js +1 -79
  455. package/dist/src/remote/types.d.ts +1 -32
  456. package/dist/src/remote/types.js +0 -10
  457. package/dist/src/run-control.d.ts +0 -7
  458. package/dist/src/run-control.js +0 -7
  459. package/dist/src/run-progress.d.ts +0 -170
  460. package/dist/src/run-progress.js +0 -285
  461. package/dist/src/run-records.d.ts +0 -443
  462. package/dist/src/run-records.js +44 -678
  463. package/dist/src/run-temp.d.ts +12 -0
  464. package/dist/src/run-temp.js +50 -0
  465. package/dist/src/runtime.d.ts +11 -227
  466. package/dist/src/runtime.js +0 -127
  467. package/dist/src/sandbox-child.js +0 -1
  468. package/dist/src/save-lock.d.ts +0 -12
  469. package/dist/src/save-lock.js +0 -28
  470. package/dist/src/screen-selection.d.ts +0 -23
  471. package/dist/src/screen-selection.js +0 -22
  472. package/dist/src/secret-redaction.d.ts +0 -12
  473. package/dist/src/secret-redaction.js +0 -45
  474. package/dist/src/session-changes.d.ts +4 -80
  475. package/dist/src/session-changes.js +25 -130
  476. package/dist/src/session-goal.d.ts +129 -0
  477. package/dist/src/session-goal.js +230 -0
  478. package/dist/src/session-monitor.d.ts +1 -10
  479. package/dist/src/session-monitor.js +2 -39
  480. package/dist/src/session-reaper.d.ts +0 -15
  481. package/dist/src/session-reaper.js +0 -14
  482. package/dist/src/session-skills.d.ts +15 -44
  483. package/dist/src/session-skills.js +75 -60
  484. package/dist/src/session-summary.d.ts +0 -26
  485. package/dist/src/session-summary.js +0 -32
  486. package/dist/src/session-title.d.ts +0 -1
  487. package/dist/src/session-title.js +0 -2
  488. package/dist/src/sessions.d.ts +2 -120
  489. package/dist/src/sessions.js +9 -178
  490. package/dist/src/shell.d.ts +3 -20
  491. package/dist/src/shell.js +8 -72
  492. package/dist/src/side-panel.d.ts +5 -99
  493. package/dist/src/side-panel.js +76 -133
  494. package/dist/src/sign-in-detection.d.ts +43 -0
  495. package/dist/src/sign-in-detection.js +154 -0
  496. package/dist/src/sign-in-offer.d.ts +17 -0
  497. package/dist/src/sign-in-offer.js +103 -0
  498. package/dist/src/skill-commands.d.ts +0 -1
  499. package/dist/src/skill-commands.js +1 -4
  500. package/dist/src/skills/bundled/control-browser/SKILL.md +1 -1
  501. package/dist/src/skills/bundled/graph-manager/SKILL.md +22 -4
  502. package/dist/src/skills/bundled/provenance.json +2 -2
  503. package/dist/src/skills/invocable-skills.d.ts +0 -18
  504. package/dist/src/skills/invocable-skills.js +0 -17
  505. package/dist/src/skills/project-skills.d.ts +0 -1
  506. package/dist/src/skills/project-skills.js +0 -3
  507. package/dist/src/skills/prompt-skills.js +0 -14
  508. package/dist/src/skills/runtime-skills.d.ts +1 -8
  509. package/dist/src/skills/runtime-skills.js +8 -32
  510. package/dist/src/stall-recovery.d.ts +0 -25
  511. package/dist/src/stall-recovery.js +0 -38
  512. package/dist/src/stray-files.d.ts +5 -0
  513. package/dist/src/stray-files.js +65 -0
  514. package/dist/src/structured-step.d.ts +0 -22
  515. package/dist/src/structured-step.js +0 -22
  516. package/dist/src/subagent-run.d.ts +0 -163
  517. package/dist/src/subagent-run.js +10 -374
  518. package/dist/src/subagent-tree.d.ts +32 -0
  519. package/dist/src/subagent-tree.js +128 -0
  520. package/dist/src/telemetry/aggregate.d.ts +0 -37
  521. package/dist/src/telemetry/aggregate.js +0 -40
  522. package/dist/src/telemetry/capture-core.d.ts +0 -87
  523. package/dist/src/telemetry/capture-core.js +0 -67
  524. package/dist/src/telemetry/capture.d.ts +0 -1
  525. package/dist/src/telemetry/capture.js +0 -3
  526. package/dist/src/telemetry/classify.d.ts +0 -58
  527. package/dist/src/telemetry/classify.js +0 -60
  528. package/dist/src/telemetry/decision-capture.d.ts +0 -1
  529. package/dist/src/telemetry/emitter.d.ts +0 -30
  530. package/dist/src/telemetry/emitter.js +1 -62
  531. package/dist/src/telemetry/gate.d.ts +0 -29
  532. package/dist/src/telemetry/gate.js +0 -22
  533. package/dist/src/telemetry/identity.d.ts +0 -13
  534. package/dist/src/telemetry/identity.js +0 -29
  535. package/dist/src/telemetry/outbox.d.ts +0 -64
  536. package/dist/src/telemetry/outbox.js +1 -108
  537. package/dist/src/telemetry/schema.d.ts +1 -49
  538. package/dist/src/telemetry/schema.js +1 -82
  539. package/dist/src/telemetry/state.d.ts +0 -53
  540. package/dist/src/telemetry/state.js +0 -64
  541. package/dist/src/telemetry/surface.d.ts +0 -31
  542. package/dist/src/telemetry/surface.js +1 -39
  543. package/dist/src/telemetry/uploader.d.ts +0 -11
  544. package/dist/src/telemetry/uploader.js +0 -46
  545. package/dist/src/telemetry/uploads.d.ts +0 -11
  546. package/dist/src/telemetry/uploads.js +0 -11
  547. package/dist/src/telemetry/version.d.ts +0 -4
  548. package/dist/src/telemetry/version.js +0 -14
  549. package/dist/src/telemetry/workspace.d.ts +0 -7
  550. package/dist/src/telemetry/workspace.js +1 -22
  551. package/dist/src/terminal-ui.d.ts +15 -524
  552. package/dist/src/terminal-ui.js +80 -876
  553. package/dist/src/test-edit-guard.d.ts +74 -0
  554. package/dist/src/test-edit-guard.js +269 -0
  555. package/dist/src/text.d.ts +0 -1
  556. package/dist/src/text.js +0 -1
  557. package/dist/src/time-limit.d.ts +0 -36
  558. package/dist/src/time-limit.js +0 -37
  559. package/dist/src/timers.d.ts +0 -161
  560. package/dist/src/timers.js +0 -126
  561. package/dist/src/todos.d.ts +0 -1
  562. package/dist/src/todos.js +0 -3
  563. package/dist/src/token-rate.d.ts +0 -94
  564. package/dist/src/token-rate.js +0 -154
  565. package/dist/src/tool-activity.d.ts +0 -6
  566. package/dist/src/tool-activity.js +1 -8
  567. package/dist/src/tool-availability.d.ts +0 -13
  568. package/dist/src/tool-availability.js +1 -14
  569. package/dist/src/tool-call-clock.d.ts +1 -4
  570. package/dist/src/tool-call-clock.js +0 -13
  571. package/dist/src/tool-catalog.d.ts +0 -11
  572. package/dist/src/tool-catalog.js +0 -23
  573. package/dist/src/tool-dependencies.d.ts +0 -5
  574. package/dist/src/tool-dependencies.js +0 -4
  575. package/dist/src/tool-diff-stats.d.ts +0 -23
  576. package/dist/src/tool-diff-stats.js +0 -49
  577. package/dist/src/tool-errors.d.ts +9 -7
  578. package/dist/src/tool-errors.js +13 -6
  579. package/dist/src/tool-failure-tracker.d.ts +3 -11
  580. package/dist/src/tool-failure-tracker.js +19 -27
  581. package/dist/src/tool-names.d.ts +0 -16
  582. package/dist/src/tool-names.js +0 -12
  583. package/dist/src/tool-profile.d.ts +6 -0
  584. package/dist/src/tool-profile.js +23 -0
  585. package/dist/src/tool-result-filter.d.ts +0 -19
  586. package/dist/src/tool-result-filter.js +1 -66
  587. package/dist/src/tool-schema-compatibility.d.ts +1 -2
  588. package/dist/src/tool-schema-compatibility.js +2 -7
  589. package/dist/src/tools.d.ts +0 -4
  590. package/dist/src/tools.js +11 -114
  591. package/dist/src/trajectory.d.ts +0 -13
  592. package/dist/src/trajectory.js +23 -79
  593. package/dist/src/transcript.d.ts +1 -37
  594. package/dist/src/transcript.js +11 -61
  595. package/dist/src/types.d.ts +2 -167
  596. package/dist/src/untracked-file-removal.d.ts +3 -0
  597. package/dist/src/untracked-file-removal.js +105 -0
  598. package/dist/src/update-check.d.ts +0 -14
  599. package/dist/src/update-check.js +2 -16
  600. package/dist/src/update.d.ts +4 -29
  601. package/dist/src/update.js +20 -98
  602. package/dist/src/usage-analytics.d.ts +17 -17
  603. package/dist/src/usage-analytics.js +168 -209
  604. package/dist/src/web-search.d.ts +0 -23
  605. package/dist/src/web-search.js +1 -27
  606. package/dist/src/widgets.d.ts +0 -25
  607. package/dist/src/widgets.js +0 -24
  608. package/dist/src/workspace-facts.d.ts +0 -12
  609. package/dist/src/workspace-facts.js +1 -18
  610. package/dist/src/workspace-git-metadata.d.ts +4 -5
  611. package/dist/src/workspace-git-metadata.js +37 -9
  612. package/dist/src/workspace-instructions.d.ts +3 -15
  613. package/dist/src/workspace-instructions.js +7 -20
  614. package/package.json +2 -2
@@ -4,6 +4,7 @@ import type { Graph } from './graphs.js';
4
4
  import type { RuntimeEvent } from './types.js';
5
5
  import type { BrowserApprovalDetails, BrowserPending } from './browser-bridge.js';
6
6
  import type { TodoItem } from './todos.js';
7
+ import { type SessionGoal } from './session-goal.js';
7
8
  import type { AccountPresentation } from './account-presentation.js';
8
9
  import { type ToolCallStamp } from './tool-call-clock.js';
9
10
  import { type PanelChanges, type PanelTerminal } from './side-panel.js';
@@ -19,39 +20,19 @@ export interface TerminalStatus {
19
20
  inputTokens?: number;
20
21
  outputTokens?: number;
21
22
  requests?: number;
22
- /**
23
- * The activity is a background check (the startup graph-model check), not a task: the welcome
24
- * card names it, but no working clock runs and the composer keeps its idle layout. Any later
25
- * activity that does not repeat the flag clears it.
26
- */
27
23
  backgroundActivity?: boolean;
28
24
  contextWindow?: number;
29
- /** Input tokens reported for the most recent model request; live context-window use. */
30
25
  contextUsed?: number;
31
26
  reasoningEffort?: string;
32
27
  graph?: Graph;
33
28
  providerModels?: Record<string, string>;
34
29
  graphSelection?: string;
35
- /**
36
- * The selected graph names providers this machine cannot bind, so it cannot run as it stands.
37
- *
38
- * Only the refresh that resolves the selected graph sets this, so the hint it drives is never
39
- * shown for a graph the session is not actually on. A successful load, or a selection that
40
- * loads, clears it.
41
- */
42
30
  graphNeedsOverride?: boolean;
43
31
  codeIntel?: string;
44
32
  account?: AccountPresentation;
45
33
  jevEnabled?: boolean;
46
- /**
47
- * Working-tree summary the side panel's Git section reports.
48
- *
49
- * Owned by the CLI rather than the render pass: reading it spawns `git`, so the CLI
50
- * refreshes it at run boundaries and on write-shaped tool completions instead of once
51
- * per frame.
52
- */
34
+ goal?: SessionGoal;
53
35
  changes?: PanelChanges;
54
- /** Background terminal sessions the side panel lists; likewise refreshed by the CLI. */
55
36
  terminals?: readonly PanelTerminal[];
56
37
  }
57
38
  export interface TerminalOptions extends TerminalStatus {
@@ -60,28 +41,8 @@ export interface TerminalOptions extends TerminalStatus {
60
41
  workspace: string;
61
42
  version: string;
62
43
  appName?: string;
63
- /**
64
- * Clock backing the view's time readings - the footer's token speed and the side panel's
65
- * terminal ages; defaults to `Date.now`.
66
- *
67
- * The meter compares request windows and the panel ages background sessions, so a caller that
68
- * needs a deterministic reading (a test, or an embedder driving the UI from its own clock)
69
- * supplies this instead of patching the global clock.
70
- */
71
44
  tokenClock?: () => number;
72
- /**
73
- * Reads an image from the system clipboard for the composer's Ctrl+V binding.
74
- *
75
- * Terminals cannot paste an image as text, so the binding asks the platform; the CLI
76
- * supplies the probe and tests supply a stub, keeping this module free of child processes.
77
- */
78
45
  clipboardImageProbe?: () => Promise<Buffer | undefined>;
79
- /**
80
- * Writes text to the system clipboard for Ctrl+C / Ctrl+X over a composer selection.
81
- *
82
- * A rejection, or no writer at all, falls back to an OSC 52 clipboard sequence, which most
83
- * terminals honor and which also reaches the local clipboard over SSH.
84
- */
85
46
  clipboardTextWriter?: (text: string) => Promise<void>;
86
47
  }
87
48
  export interface TerminalChoice {
@@ -96,8 +57,14 @@ export interface ScreenOptions {
96
57
  signal?: AbortSignal;
97
58
  editPrefix?: string;
98
59
  footer?: string;
60
+ yieldToQuestions?: boolean;
61
+ /** Right Arrow on a choice resolves with this prefix plus the choice id (tree expand). */
62
+ expandPrefix?: string;
63
+ /** Left Arrow on a choice resolves with this prefix plus the choice id (tree collapse). */
64
+ collapsePrefix?: string;
65
+ /** The choice marked with a check, when it differs from the one the cursor starts on. */
66
+ checkedId?: string;
99
67
  }
100
- /** Full-screen terminal presentation; provider/runtime behavior remains owned by the CLI. */
101
68
  export declare class TerminalUI extends EventEmitter {
102
69
  private readonly input;
103
70
  private readonly output;
@@ -107,30 +74,10 @@ export declare class TerminalUI extends EventEmitter {
107
74
  private readonly keys;
108
75
  private readonly decoder;
109
76
  private status;
110
- /**
111
- * Graph nodes the user currently has running, in the order they started.
112
- *
113
- * `provider` and `model` are what each node's own executor reported, not what the graph file
114
- * configured, so a retry that falls back to another profile moves the footer with it.
115
- *
116
- * `resolved` carries the reasoning effort and context window of that same resolution. It stays
117
- * absent until a run reports them, and an absent `resolved` keeps the session's own numbers on
118
- * the footer; a present one whose fields are undefined means that node's model has no effort or
119
- * window of its own, which the footer shows as `provider default` and as no window at all
120
- * rather than falling back to the session's unrelated values.
121
- */
122
77
  private activeNodes;
123
- /**
124
- * Node ids the current run has finished, in visit order.
125
- *
126
- * The side panel's zoom marks the run's trail with it, so it survives the run's end - a
127
- * reader looking at a finished run can still see where it went - and is cleared only when
128
- * the next run starts, which is the point the trail stops describing what is on screen.
129
- */
130
- /** Whether the last frame drew without the panel, so its return can be announced once. */
131
78
  private panelWasHidden;
132
79
  private visitedNodes;
133
- /** The node a stopped run ended on, kept as the panel's position until the next run starts. */
80
+ private subagents;
134
81
  private stoppedNode?;
135
82
  private readonly toolClock;
136
83
  private toolClockTimer?;
@@ -142,108 +89,30 @@ export declare class TerminalUI extends EventEmitter {
142
89
  private dashboardNotices;
143
90
  private nodeModels;
144
91
  toggleDashboard(): void;
145
- /** Start of a run: open the dashboard's run window. */
146
92
  startTask(): void;
147
- /** End of a run: close the dashboard's run window. */
148
93
  finishTask(): void;
149
94
  resetDashboardSession(usage?: {
150
95
  inputTokens: number;
151
96
  outputTokens: number;
152
97
  requests: number;
153
98
  }): void;
154
- /** Clock backing the per-node speed meters; see {@link TerminalOptions.tokenClock}. */
155
99
  private readonly tokenClock;
156
- /**
157
- * One cumulative speed meter per generating identity, each stamped with the provider, model
158
- * and reasoning effort its requests were measured under.
159
- *
160
- * Parallel nodes interleave model calls (`src/graph-runner.ts` runs branch workers side by
161
- * side), so a single shared meter would have one node's first request discard the other's
162
- * in-flight window and both nodes' totals alternate between wipes. Keys extend the nodeId
163
- * with the parallel `copy` number the modifier stamps on every forwarded event, because two
164
- * copies of one node can resolve different models and retry independently. Keeping the
165
- * accumulation per identity means a switch simply displays the new identity's own average,
166
- * and returning to an earlier one resumes the average it built.
167
- */
168
100
  private speedMeters;
169
- /** The executor's `invocationId` → the meter key whose marker opened that request's window. */
170
101
  private speedInvocations;
171
- /** The node whose requests the readout currently follows: the most recent to open a call. */
172
102
  private activeSpeedNode;
173
- /** The parallel copy of {@link activeSpeedNode} the readout follows, when one is named. */
174
103
  private activeSpeedCopy;
175
- /** The exact meter key the readout displays - a node, a node's copy, or a distillation. */
176
104
  private activeSpeedKey;
177
105
  handleRuntimeEvent(event: RuntimeEvent): void;
178
106
  private nodeProgress;
179
- /**
180
- * The columns the chat column actually draws in, panel and gutter excluded.
181
- *
182
- * Everything that measures chat content outside the render pass - input navigation, the
183
- * echoed-prompt frame, the docked selection card, the command popup's own visibility gate -
184
- * has to measure against this rather than the terminal width, or a draft that the composer
185
- * wrapped onto two rows is treated as one by the arrow keys, and a stored card is built
186
- * wider than the transcript that must re-wrap it.
187
- */
188
107
  private chatColumns;
189
- /**
190
- * Columns the transcript itself would have with the panel drawn.
191
- *
192
- * A prompt echo is stored in the transcript and re-wrapped there, so its frame has to be built for
193
- * that column rather than for whatever surface is on screen when the text is submitted: a task sent
194
- * from the Ctrl+B dashboard (or from a modal) would otherwise freeze a full-width box whose rows the
195
- * transcript splits as soon as the panel returns. This is `chatColumns()` with the two full-screen
196
- * surfaces ignored.
197
- */
198
108
  private transcriptColumns;
199
- /**
200
- * Columns the side panel occupies this frame, or 0 when it is not drawn.
201
- *
202
- * The panel is a second column of the same frame, so its width has to be known before the
203
- * chat column renders: below {@link PANEL_MIN_COLUMNS} the chat column would be squeezed
204
- * past the point where its own wrapping and the command popup still read well, and the two
205
- * full-screen surfaces - the dashboard (which already reports the same state) and a modal
206
- * screen (which is a focused flow) - keep the frame to themselves.
207
- */
208
- /**
209
- * Whether the side panel is on screen for the current terminal and surface.
210
- *
211
- * Exposed because the panel is the only consumer of the CLI's Git summary: a caller that would
212
- * spawn processes to fill it can ask first, and skip the work while nothing can display it.
213
- */
214
109
  panelVisible(): boolean;
215
110
  private panelColumns;
216
- /**
217
- * The side panel's rows for this frame.
218
- *
219
- * Assembled per render rather than cached: the rows carry a clock (how long a background
220
- * terminal has been running) and follow the node set the run is publishing, and the packing
221
- * only ever walks a handful of sections.
222
- * @param columns - total columns the panel occupies, divider and gutter included.
223
- * @param height - rows the panel may use, the whole frame height.
224
- */
225
111
  private panelRows;
226
- /**
227
- * Compose the chat column's rows with the panel's into the frame's rows.
228
- *
229
- * Each row is padded to the chat width so the divider column stays unbroken, then carries
230
- * the panel cell for that row. A painted row is measured with `stringWidth`, which ignores
231
- * escape sequences, so padding cannot be confused by the color the chat row already holds.
232
- */
233
112
  private composePanel;
234
- /**
235
- * The model currently answering, as its footer label plus the thinking effort and context window
236
- * that belong to it.
237
- *
238
- * While a graph node is active this names the node the user is watching - the one whose
239
- * requests the speed readout follows, or the first-started one when no speed identity is
240
- * named - followed by the provider and model that node actually resolved and by the effort
241
- * and window of that same resolution, so the whole line describes one model. With no active
242
- * node it is the session's own selection, and no node is named for an idle prompt or for a
243
- * plain run that never started a graph node.
244
- */
245
113
  private activeModel;
246
114
  private started;
115
+ private releaseWarnings;
247
116
  private closed;
248
117
  private wasRaw;
249
118
  private wasPaused;
@@ -258,47 +127,22 @@ export declare class TerminalUI extends EventEmitter {
258
127
  private todoOffset;
259
128
  private todoPageSize;
260
129
  private scroll;
261
- /** Whether a run is streaming. */
262
130
  private runActive;
263
- /**
264
- * The drag selection over the drawn frame, in screen cells.
265
- *
266
- * The app holds mouse reporting for the whole session so the wheel arrives as a wheel report
267
- * and never as the Up/Down bytes that recall input history. Holding the mouse takes the drag
268
- * away from the terminal, so the app draws the selection itself and copies it on release.
269
- */
270
131
  private selection?;
271
- /** The last left press, kept to recognize a double-click on the same cell. */
272
132
  private lastPress?;
273
- /** The frame as composed, before the selection highlight is laid over it. */
274
133
  private frame;
275
- /**
276
- * Live reasoning preview state. `thinkingActive` marks a stream in progress; the text
277
- * is the bounded tail the preview renders from.
278
- */
279
134
  private thinking;
280
135
  private thinkingActive;
281
- /** The preview opens expanded on every stream; Ctrl+Y collapses the current one. */
282
136
  private thinkingExpanded;
283
137
  private expandedPromptIds;
284
- /** Prompts the reader explicitly collapsed; an explicit toggle wins over Ctrl+O (see promptExpanded). */
285
138
  private collapsedPromptIds;
286
- /** Every prompt box the transcript currently holds, so Ctrl+O can invert each one on screen. */
287
139
  private promptBoxIds;
288
140
  private expandedPromptVisible;
289
141
  private nextPromptId;
290
142
  private thinkingPaintedAt;
291
143
  private thinkingFlush?;
292
- /**
293
- * The rows currently on screen, so a repaint can rewrite only what changed.
294
- *
295
- * See {@link writeFrame}: a terminal drops an in-progress drag selection when the app
296
- * rewrites the cells under it, and a run repaints eight times a second for its animation.
297
- */
298
144
  private drawn;
299
- /** Terminal size `drawn` was produced at; a resize invalidates the comparison. */
300
145
  private drawnSize;
301
- /** The caret sequence last emitted, so an unmoved caret costs no extra write. */
302
146
  private drawnCursor;
303
147
  private history;
304
148
  private historyIndex;
@@ -306,15 +150,6 @@ export declare class TerminalUI extends EventEmitter {
306
150
  private completion?;
307
151
  private dismissedCompletion?;
308
152
  private incoming;
309
- /**
310
- * Raw bytes not yet decoded to `incoming`.
311
- *
312
- * Legacy mouse reports are framed here, on bytes, before UTF-8 decoding: their payload
313
- * is three value-plus-32 bytes that the decoder would buffer while an incomplete
314
- * sequence (column 192, row 128 ends in E0 A0) and collapse when the pair forms a
315
- * valid one (column 162, row 128 encodes as C2 A0), so no string-domain measurement
316
- * can see a report in time without risking the keystroke that follows it.
317
- */
318
153
  private rawIncoming;
319
154
  private rawTimer?;
320
155
  private pasting;
@@ -327,78 +162,33 @@ export declare class TerminalUI extends EventEmitter {
327
162
  private plainQuestion?;
328
163
  private modal?;
329
164
  private modalInput;
330
- /**
331
- * The last selection screen that was answered.
332
- *
333
- * Setup closes a selection screen and then asks for a value, which used to leave the home
334
- * card where the list had been: the reader lost both the list and the entry it led to the
335
- * moment they started typing. The card is kept here so a typed field can be answered with
336
- * the list still on screen (see selectionCard).
337
- */
338
165
  private lastSelection?;
339
166
  private escapeTimer?;
340
167
  private workingTimer?;
341
- /** The panel's one-second age clock; see render(). */
342
168
  private panelTimer?;
343
169
  private workingSince?;
344
170
  private workingElapsed;
345
- /**
346
- * Whether the composer accepts input while a run is active.
347
- *
348
- * Enabled for the duration of an interactive run so the user can steer it. Text
349
- * submitted in this mode is queued rather than resolved as a question answer.
350
- */
351
171
  private steering;
352
172
  private runInputHandler?;
353
173
  private localCommandHandler?;
354
174
  private commandInput;
355
- /** Handle active commands and resumed direction synchronously; true consumes the input. */
356
175
  setRunInputHandler(handler?: (text: string) => boolean): void;
357
- /** Observe slash commands consumed by the view without submitting them to the run. */
358
176
  setLocalCommandHandler(handler?: (input: string, mode: 'interactive' | 'in-run', durationMs: number) => void): void;
359
- /** Settle the current approval after an explicit session permission change. */
360
177
  resolveQuestion(value: string): void;
361
- /** Submit from the browser only while the terminal is accepting a conversation prompt. */
362
178
  acceptConversationPrompt(value: string): boolean;
363
- /** Current runtime question for connected GUI surfaces. Conversation prompts stay in the composer. */
364
179
  private browserPendingIdentity?;
365
180
  private browserQuestionNumber;
366
181
  browserQuestion(): BrowserPending | undefined;
367
182
  private steered;
368
- /**
369
- * Attachments queued in the composer draft — large pastes spooled to text, dropped file
370
- * paths, clipboard images. Each sits in the draft as an inline token (its `marker` code
371
- * point), drawn as a bold label and edited as one character. They ride the next submitted
372
- * task (or the next queued steer) and are drained by the CLI, mirroring how `steered` is
373
- * drained at turn boundaries.
374
- */
375
183
  private attachments;
376
- /** The skills the `/` popup offers after the built-in commands, with the description it shows. */
377
184
  private skillCommands;
378
- /** The command the skill chip in the draft stands for, while one is there. */
379
185
  private skillChip?;
380
186
  private attachmentSeq;
381
- /**
382
- * Generation of the composer's attachment surface. Advanced by every draft clear and steer
383
- * submission: an asynchronous clipboard probe that started before one of those lands nowhere,
384
- * because the composer it was reading for is gone (steering keeps the same owner all run).
385
- */
386
187
  private clipboardProbe;
387
188
  private readonly clipboardImageProbe?;
388
189
  private readonly clipboardTextWriter?;
389
- /**
390
- * Where the composer's Shift+Arrow selection started; it runs from here to the cursor.
391
- * `selectionValue` is the draft it was made in: replacing the draft (a submission, history
392
- * recall, a completion) swaps the array, which drops the selection without bookkeeping.
393
- */
394
190
  private selectionAnchor;
395
191
  private selectionValue;
396
- /**
397
- * A half-typed steer parked while a question temporarily takes the composer.
398
- *
399
- * Questions and steering share `value`; without this a partially typed steer would be
400
- * wiped the moment the runtime asks for an approval or clarification.
401
- */
402
192
  private steerDraft?;
403
193
  private steerCursor;
404
194
  constructor(options: TerminalOptions);
@@ -418,183 +208,44 @@ export declare class TerminalUI extends EventEmitter {
418
208
  signal?: AbortSignal;
419
209
  printPrompt?: boolean;
420
210
  }): Promise<string | undefined>;
211
+ private yieldScreen;
421
212
  select(title: string, items: readonly TerminalChoice[], options?: ScreenOptions & {
422
213
  selectedId?: string;
423
214
  }): Promise<string | undefined>;
424
- /** Move the select highlight, carrying the movement past separator rows: separators are visual line breaks, never choices. */
425
215
  private moveSelection;
426
216
  showScreen(title: string, lines: readonly string[], options?: ScreenOptions): Promise<void>;
427
217
  loadScreen<T>(title: string, load: (signal: AbortSignal) => Promise<T>, options?: ScreenOptions): Promise<T | undefined>;
428
218
  private openModal;
429
219
  private finishModal;
430
- print(text: string, detail?: string, toolCall?: ToolCallStamp, conversation?: boolean, notice?: boolean, alignRight?: boolean): void;
431
- /**
432
- * Echo submitted text as its own bordered box.
433
- *
434
- * The box mirrors the live input field's frame and color so the text reads as the
435
- * same surface the user typed into, rather than a `You >` transcript prefix. The
436
- * frame itself identifies the text as user input, so a submitted prompt is left
437
- * untitled; only a surface that is genuinely something other than a task prompt —
438
- * a clarification answer — passes a title. The frame is sized to the terminal at
439
- * echo time; a later resize re-wraps the body but keeps the original box, which is
440
- * an accepted trade for not rewriting history on resize. The finished box is drawn right-aligned against the transcript's right margin (see wrapTranscript), so a submission reads as the user's speech bubble and re-aligns when the window is resized.
441
- * @param text - the submitted text to echo.
442
- * @param title - optional top-border label; omitted draws a plain frame.
443
- */
220
+ print(text: string, detail?: string, toolCall?: ToolCallStamp, conversation?: boolean, notice?: boolean, alignRight?: boolean, clipRows?: boolean): void;
444
221
  printPrompt(text: string, title?: string): void;
445
- /**
446
- * Stream one reasoning delta into the live preview line.
447
- *
448
- * The preview always shows the tail of what has arrived, so each call only has to grow
449
- * the bounded buffer; rendering stays on the working clock's repaint cadence, with a
450
- * small throttle so a token firehose cannot trigger a full-frame render per network
451
- * chunk.
452
- * @param delta - the reasoning fragment that just arrived; empty fragments are ignored.
453
- */
454
222
  appendThinking(delta: string): void;
455
- /**
456
- * Wipe the on-screen conversation so the display reads as a freshly started session.
457
- *
458
- * Only the transcript entries, the scroll position and the live reasoning preview are dropped:
459
- * the welcome card is rebuilt as the scrollback prefix on the next render, so the frame returns
460
- * to its startup shape without re-emitting a banner or a terminal clear escape. The composer's
461
- * prompt-recall history is deliberately kept — it is input history, not chat output.
462
- */
463
223
  clearConversation(): void;
464
- /** Retract the preview: the stream ended, was retried, or the whole run finished. */
465
224
  clearThinking(): void;
466
225
  setStatus(partial: Partial<TerminalStatus>): void;
467
- /**
468
- * Feed the footer's token-speed readout with one finished model request.
469
- *
470
- * Providers report a request's tokens only when it completes. A streamed request carries its
471
- * measured decode window, which is the time the tokens are credited with; otherwise the
472
- * number is measured over the window opened by the call's `agent.iteration.started` event
473
- * rather than credited to the instant it arrived, which would leave the readout no duration
474
- * to divide by. The completion also replaces the live estimate {@link noteStreamedOutput}
475
- * kept for the same request. `invocationId` - the id the executor stamps on both the start
476
- * event and the usage delta - selects that window and, through the marker that opened it,
477
- * the node whose average the measurement belongs to, so a completion from a concurrent request cannot
478
- * borrow another request's window or another node's average. The measurement folds into
479
- * that node's cumulative average, which only a changed selection or a changed model
480
- * resolution for the node resets. Deltas that carry no tokens (the adapter's per-attempt
481
- * request counting, retries included) are not completions and are passed through to the
482
- * meter, which ignores them for window pairing. A final delta without tokens - a provider
483
- * that omits usage - still closes its request's window but leaves the average untouched:
484
- * it describes the requests that did report.
485
- * @param tokens - output tokens the provider reported for that single request.
486
- * @param invocationId - request identity from the executor, when one is known.
487
- * @param final - true when the delta closes its request, per the runtime's origin flag.
488
- * @param decodeMs - the adapter's measured decode window for the request, when it has one.
489
- */
490
226
  noteGeneratedTokens(tokens: number, invocationId?: string, final?: boolean, decodeMs?: number): void;
491
- /**
492
- * Feed the footer's token-speed readout with a fragment a request is still streaming.
493
- *
494
- * A thinking model can stream for minutes before its usage arrives, and a readout that moved
495
- * only on completions sat on the previous number the whole time. The fragment is estimated
496
- * into the same meter the completion will report to, and repaints only when the number on
497
- * screen changes - a stream from a node the footer does not follow costs nothing.
498
- * @param text - the streamed reasoning or answer fragment.
499
- * @param invocationId - request identity from the executor, when one is known.
500
- */
501
227
  noteStreamedOutput(text: string, invocationId?: string): void;
502
- /** Drop a request's live estimate: the attempt failed, is about to be retried, or was aborted. */
503
228
  noteStreamEnded(invocationId?: string): void;
504
- /** The meter a request's measurements belong to: the one its start marker named, else the followed one. */
505
229
  private speedRoute;
506
- /** The meter key for a node's requests: parallel copies each keep their own meter. */
507
230
  private speedKey;
508
- /** The meter's speed entry, created on first sight so no measurement is ever dropped. */
509
231
  private ensureSpeedMeter;
510
- /**
511
- * Stamp a meter with the resolution its generating identity announced.
512
- *
513
- * A resolution different from the one the meter already measured under rebuilds the meter:
514
- * its average described the previous model or reasoning effort, which is exactly the
515
- * whole-agent-fallback case. Learning the identity for a meter that had none (the session
516
- * event merely arrives before the meter was stamped) never discards measurements.
517
- */
518
232
  private stampSpeedMeter;
519
- /**
520
- * The footer's token speed: the cumulative average of the generating identity the readout
521
- * currently follows, unchanged between completions.
522
- *
523
- * Exposed for callers and tests that need the exact number the readout is based on. The
524
- * footer draws {@link displayRate}, which adds the model-identity check.
525
- */
526
233
  tokenSpeed(): number;
527
- /**
528
- * The node whose resolution the model row and the speed readout describe.
529
- *
530
- * This is the identity the readout follows - the most recent node or parallel copy to open
531
- * a model call - so the row names the same node whose average is drawn, not whichever node
532
- * happened to start first. Without a followed identity it falls back to the first active
533
- * node, and with no active node at all the session's own selection answers.
534
- */
535
234
  private displayNode;
536
- /**
537
- * The speed the footer shows: the followed identity's cumulative average, but only while
538
- * the model row names the resolution the average was measured under.
539
- *
540
- * After a run ends the row reverts to the session's own selection, so an average measured
541
- * on a node with a provider, model or effort override would otherwise sit beside a
542
- * different resolution's name; the segment disappears instead of misdescribing it.
543
- */
544
235
  private displayRate;
545
- /**
546
- * Let the composer accept steering input for the duration of a run.
547
- *
548
- * Called with `true` when an interactive run starts and `false` when it ends, so the
549
- * normal question flow owns the composer outside a run.
550
- * @param enabled - whether submitted text should be queued as a steer.
551
- * @returns when disabling, any queued steers that can no longer be injected. The
552
- * executor's last poll happens before finalization, so a steer submitted in that
553
- * window is visibly accepted but has nowhere to go; returning it lets the caller say
554
- * so instead of dropping it silently.
555
- */
556
236
  setSteering(enabled: boolean): string[];
557
- /** The surface that currently owns the composer, if any. */
558
237
  private composerOwner;
559
- /**
560
- * Whether a captured composer owner is still the owner.
561
- *
562
- * Deferred input (a paste, or an Enter held back by the input-burst window) is only
563
- * delivered when the surface that armed it still owns the composer. Steering is an
564
- * owner too, so a pasted steer must not be discarded just because no question is
565
- * pending.
566
- * @param token - the owner captured when the input arrived.
567
- * @returns whether that owner may still accept the deferred input.
568
- */
569
238
  private ownsComposer;
570
- /**
571
- * Take every queued steer message, without blocking.
572
- *
573
- * The hardened executor polls this at turn boundaries; returning immediately with an
574
- * empty array is what lets a run continue when the user has typed nothing.
575
- * @returns the queued messages, oldest first.
576
- */
577
239
  takeSteering(): string[];
578
- /** The queued steers with their attachments, oldest first; each turn is one injected user message. */
579
240
  takeSteeringTurns(): {
580
241
  text: string;
581
242
  attachments: PendingAttachment[];
582
243
  }[];
583
244
  setTodos(todos: readonly TodoItem[]): void;
245
+ private agentLines;
246
+ private goalLines;
584
247
  private todoLines;
585
- /**
586
- * Rows for the live reasoning preview, standing in for the plain working line.
587
- *
588
- * Collapsed it keeps the latest reasoning on one row and pins elapsed time plus the
589
- * expand control on the row directly beneath it, so a growing reasoning tail cannot push
590
- * the control off to the right. Expanded, the default for every new stream, it opens a
591
- * fixed {@link THINKING_ROWS}-row window on the tail, padded at the top with the marker on
592
- * the first reasoning row, with the same control row beneath it. `maxRows`
593
- * is the room the terminal offers once the transcript keeps at least its last row; a
594
- * one-row budget still shows the reasoning row.
595
- */
596
248
  private thinkingLines;
597
- /** The last nonempty line of the retained reasoning, flattened for one row. */
598
249
  private thinkingTail;
599
250
  private updateWorkingClock;
600
251
  close(): void;
@@ -602,224 +253,64 @@ export declare class TerminalUI extends EventEmitter {
602
253
  private onEnd;
603
254
  private onResize;
604
255
  private onData;
605
- /**
606
- * Frame legacy X10 mouse reports on the raw byte stream before UTF-8 decoding.
607
- *
608
- * A terminal with mouse tracking but without the SGR encoding of mode 1006 answers capture
609
- * with ESC[M plus three raw payload bytes (button, then coordinates, each offset by
610
- * 32). Those bytes are framed here rather than in the decoded string because decoding
611
- * buffers an incomplete trailing sequence and collapses a complete pair into one
612
- * character, so a string-domain match could only see a report late, consuming the
613
- * keystroke that follows it. A report split across reads holds the buffer for the
614
- * input burst, the same grace a lone Escape gets; a burst that elapses with an
615
- * incomplete prefix hands the bytes to the key parser as if they were typed. Inside a
616
- * bracketed paste the bytes are text, so once the decoded stream opens a paste the
617
- * remainder is handed over untouched.
618
- */
619
256
  private consumeRaw;
620
257
  private feedRaw;
621
258
  private armRawTimer;
622
- /** Drain the decoded stream: paste markers, SGR mouse reports and ordinary keys. */
623
259
  private consumeIncoming;
624
- /**
625
- * The effective disclosure state of one prompt box.
626
- *
627
- * An explicit per-prompt toggle wins over the Ctrl+O default, and Ctrl+O clears those
628
- * toggles when it is pressed (see onKey), so the keyboard always remains a way out of
629
- * either state.
630
- */
631
260
  private promptExpanded;
632
- /**
633
- * Act on one mouse report: the wheel scrolls, and a left drag selects text on the screen.
634
- *
635
- * The selection lives in screen cells over the frame as drawn. Releasing the button copies
636
- * it; the highlight stays until the next key, click or wheel tick so the reader can see what
637
- * was taken. A press and release on one cell selects nothing, and a second press on the same
638
- * cell within the double-click window takes the word under it. Other buttons are swallowed,
639
- * so no click reaches the composer as text.
640
- * @param button - the report's button code, modifiers and motion bit included.
641
- * @param pressed - false for a release.
642
- * @param column - 1-based screen column.
643
- * @param row - 1-based screen row.
644
- */
645
261
  private mouse;
646
- /** Copy the screen selection; over SSH only the terminal's clipboard is the reader's own. */
647
262
  private copyScreenSelection;
648
- /** Lay the selection highlight over a composed frame. */
649
263
  private withSelection;
650
- /**
651
- * Scroll the transcript (or the active screen). Positive `direction` scrolls up (toward
652
- * older output), which is what a wheel-up report and an Up key during a run both mean.
653
- */
654
264
  private scrollBy;
655
265
  private normalData;
656
266
  private insertPlain;
657
267
  private clearPlainInput;
658
268
  private armPlainInput;
659
269
  private insert;
660
- /** Whether the surface that owns the composer accepts task input — the only place attachments mean anything. */
661
270
  private conversationComposer;
662
- /**
663
- * Land a completed bracketed paste. Terminal drag-and-drop arrives as one or more existing
664
- * filesystem paths, which become file references; a paste past the inline threshold becomes a
665
- * spooled text attachment instead of flooding the composer; everything else inlines as before.
666
- */
667
271
  private landPaste;
668
- /**
669
- * Queue one attachment as an inline token at the composer cursor; false means the per-turn cap
670
- * refused it. Outside the conversation composer the token waits, and `adoptTokens` appends it
671
- * to the draft once that composer is armed again.
672
- */
673
272
  addAttachment(pending: PendingAttachment): boolean;
674
- /** The skills the `/` popup lists after the built-in commands; a skill whose command a built-in owns is left out. */
675
273
  setSkillCommands(skills: readonly {
676
274
  command: string;
677
275
  description: string;
678
276
  }[]): void;
679
277
  private skillCommand;
680
- /** Replace the draft's leading `command` (and anything typed after it) with the skill chip and a space. */
681
278
  private insertSkillChip;
682
- /**
683
- * Turn a leading, fully typed skill command into the chip once a space follows it, so a command
684
- * typed out in full reads the same as one picked from the popup.
685
- */
686
279
  private chipTypedSkill;
687
- /**
688
- * Backspace and Delete. Beside the skill chip they remove the chip and the space that follows it in
689
- * one keystroke, so a picked skill comes out as it went in.
690
- */
691
280
  private backspace;
692
281
  private deleteForward;
693
- /** Take every queued attachment in draft order, without blocking — the CLI drains this when a task is submitted. */
694
282
  takeAttachments(): PendingAttachment[];
695
- /** The bold label a token draws as in the composer. */
696
283
  private tokenLabel;
697
- /** The draft as display elements: each token replaced by its label, clipped to the composer. */
698
284
  private visibleDraft;
699
- /**
700
- * The draft as submitted text. Tokens become `[name]` references the model can match against
701
- * the attachment block, and the queue is put in the order the tokens appear. A draft that is
702
- * only tokens submits empty, so the CLI keeps its attachment-only task text, and a slash
703
- * command submits without them, so the command runs and the attachments stay queued.
704
- */
705
285
  private submittedDraft;
706
- /**
707
- * The draft as it is parked (history browsing, a question interrupting steering): the skill chip is
708
- * written out as its command, so `restoredDraft` can turn it back into a chip — the token alone would
709
- * not survive the trip, and the draft would lose the skill it names.
710
- */
711
286
  private parkedDraft;
712
- /** A parked draft brought back into the composer, keeping only tokens whose attachment is still queued. */
713
287
  private restoredDraft;
714
- /** Remove draft elements, dropping the attachment behind every token they held. */
715
288
  private removeDraft;
716
- /**
717
- * Put every queued token that is missing from the armed conversation draft back at its end. A
718
- * submitted prompt clears the composer before the CLI drains the queue, and `/attach` queues a
719
- * file between prompts, so a token can be queued while no draft holds it.
720
- */
721
289
  private adoptTokens;
722
- /** Whether attachments are queued, without draining them (the CLI decides whether a submission carries them). */
723
290
  hasQueuedAttachments(): boolean;
724
- /** Read the system clipboard for an image and attach it (Ctrl+V; terminals cannot paste images as text). */
725
291
  private pasteClipboardImage;
726
292
  private clearDraft;
727
293
  private onKey;
728
294
  private modalKey;
729
295
  private navigate;
730
- /** Move the caret one wrapped row up or down inside the draft; false on the first/last row. */
731
296
  private moveRow;
732
- /** The composer's selected grapheme range, or undefined when nothing is selected. */
733
297
  private selectionRange;
734
298
  private deleteSelection;
735
- /**
736
- * Selection keys for the prompt and steering editors. Shift with an arrow, Home or End
737
- * extends the selection from where it started (Shift+Up/Down past the first or last row runs
738
- * to that end of the draft, never into history). Over a selection a plain Left/Right
739
- * collapses it to that edge and Backspace/Delete remove it; typed or pasted text replaces it
740
- * in `insert`. Any other key drops it. True when the key was consumed.
741
- */
742
299
  private selectionKey;
743
- /**
744
- * Copy the composer selection to the clipboard; a cut also removes it from the draft.
745
- *
746
- * The system writer is preferred; without one, or when it fails, an OSC 52 sequence asks
747
- * the terminal to set the clipboard instead.
748
- */
749
- /**
750
- * Put text on the clipboard of whoever is looking at this terminal.
751
- *
752
- * `terminalOnly` skips the system writer for an OSC 52 sequence alone: over SSH the system
753
- * clipboard belongs to the remote host, while the terminal's is the one on the user's own machine.
754
- */
755
300
  copyText(text: string, options?: {
756
301
  terminalOnly?: boolean;
757
302
  }): void;
758
303
  private copySelection;
759
304
  private complete;
760
- /** Put `command ` in the composer and open its argument list, without submitting anything. */
761
305
  private awaitArgument;
762
- /**
763
- * The command Enter must not run yet: the draft is only the name of a command that needs an
764
- * argument, so it is completed to `command ` and the argument list opens. Applies wherever the
765
- * popup does — the conversation prompt and the live-run composer — and never to a question,
766
- * a secret, or a modal.
767
- */
768
306
  private argumentPending;
769
- /**
770
- * The popup entry Enter should run, or undefined when there is nothing runnable.
771
- *
772
- * Re-derived from the composer text on every call rather than read from the cached
773
- * completion: that cache is shared with the renderer, and a resize or an edit outside the
774
- * popup's own key handling can leave it stale, which would let Enter run a row that is no
775
- * longer highlighted or no longer drawn. `commandMatches(true)` applies the same visibility
776
- * gate the renderer uses, so a candidate that is off-screen on a short terminal reports
777
- * nothing, and an entry identical to the draft is not a completion at all.
778
- */
779
307
  private selectedCompletion;
780
308
  private commandMatches;
781
309
  private scheduleRender;
782
- /**
783
- * Paint a frame, rewriting only the rows whose content actually changed.
784
- *
785
- * The app never takes the mouse (`start`), so the terminal keeps drag-to-select and the
786
- * clipboard in every state. What defeated those selections was output churn: a run repaints eight times a second for the working animation alone, and an
787
- * emulator abandons the cells under a drag as soon as the app rewrites them. Diffing
788
- * against what is already drawn means an unchanged screen writes nothing at all, and every
789
- * *contiguous run* of changed rows gets its own write: when two separated rows change (the
790
- * animated working row and the footer counters after a request completes, say) the
791
- * unchanged rows between them are left alone, so a selection over the transcript, the
792
- * composer or the model line survives a footer update. The composed picture is identical
793
- * either way - the row diff is a delivery detail, never a change in what is drawn.
794
- * @param lines - the frame's rows, top to bottom, exactly as they should read.
795
- * @param cursor - optional caret sequence; re-emitted after any painted row, because painting
796
- * hides the caret and only this sequence brings it back. A frame that paints nothing and
797
- * leaves the caret where it was still writes zero bytes, so the caret can ride along with
798
- * the frame without breaking the settled-frame contract.
799
- */
800
310
  private writeFrame;
801
- /** A quiet startup identity, never a full-width alert-colored diagnostics panel. */
802
311
  private welcome;
803
- /**
804
- * The selection screen to dock above the composer while a typed field is being answered.
805
- *
806
- * A plain question that follows a selection screen is a field belonging to that screen, so
807
- * the card is drawn where the home card would otherwise be. Run-time questions (approvals,
808
- * clarifications) keep their own surface, and the card is windowed around the highlighted
809
- * entry so a long list cannot eat the composer's rows on a short terminal.
810
- * @param rows - the transcript rows the render pass left for this card.
811
- * @returns the card's lines, or undefined when the home card belongs there instead.
812
- */
813
312
  private selectionCard;
814
313
  private renderModal;
815
- /**
816
- * Wrap transcript text into drawn rows.
817
- * @param alignRight - pad each stored row that fits the transcript allowance onto its right margin,
818
- * which is what makes a user submission read as a speech bubble. The decision is made on the
819
- * stored row rather than on the fragments: wrapping a row that does not fit leaves short tails
820
- * (the last cells of a split border) that would otherwise be pushed into the margin, smearing
821
- * the frame across the screen, so no fragment of an over-wide row is padded.
822
- */
823
314
  private wrapTranscript;
824
315
  private transcriptRows;
825
316
  private render;