@draht/coding-agent 2026.11.5 → 2026.11.14-1

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 (328) hide show
  1. package/CHANGELOG.md +66 -0
  2. package/dist/bundle/chunks/anthropic-messages-C5ZJVCKX.js +6 -0
  3. package/dist/bundle/chunks/{azure-openai-responses-5YLWRJ4E.js → azure-openai-responses-TNRID5YC.js} +1 -1
  4. package/dist/bundle/chunks/bedrock-converse-stream.js +22 -22
  5. package/dist/bundle/chunks/chunk-2CHTECAU.js +2 -0
  6. package/dist/bundle/chunks/{chunk-MKVW4KK2.js → chunk-2IQVBLH6.js} +1 -1
  7. package/dist/bundle/chunks/chunk-2JZLKNZ4.js +3 -0
  8. package/dist/bundle/chunks/{chunk-LJ3SEGWI.js → chunk-4FPBO5KP.js} +6 -2
  9. package/dist/bundle/chunks/{chunk-3LFBXSCO.js → chunk-5C4MAPF6.js} +1 -1
  10. package/dist/bundle/chunks/chunk-5WEOWREV.js +82 -0
  11. package/dist/bundle/chunks/chunk-6M3D4XVD.js +2 -0
  12. package/dist/bundle/chunks/{chunk-KVH4HR57.js → chunk-6WESOD4H.js} +1 -1
  13. package/dist/bundle/chunks/{chunk-UQSONZLL.js → chunk-ATYP3OSV.js} +3 -1
  14. package/dist/bundle/chunks/chunk-B6S2UR4T.js +2 -0
  15. package/dist/bundle/chunks/chunk-EBTEI43G.js +20 -0
  16. package/dist/bundle/chunks/{chunk-EXZUXBS5.js → chunk-GAABJAG4.js} +13 -16
  17. package/dist/bundle/chunks/chunk-GBFVS2SF.js +12 -0
  18. package/dist/bundle/chunks/{chunk-ITP6IDBA.js → chunk-GQXRTK54.js} +2 -2
  19. package/dist/bundle/chunks/{chunk-YUBUKEPQ.js → chunk-JHKMYVPC.js} +187 -148
  20. package/dist/bundle/chunks/{chunk-QVGSXIKT.js → chunk-KFREX3FS.js} +1 -1
  21. package/dist/bundle/chunks/{chunk-PRT3JHOZ.js → chunk-LCTFXH4P.js} +1 -1
  22. package/dist/bundle/chunks/chunk-LO6CVU2L.js +6 -0
  23. package/dist/bundle/chunks/{chunk-ABW2JATG.js → chunk-MPJIXESS.js} +1 -1
  24. package/dist/bundle/chunks/{chunk-PZKD35UB.js → chunk-MXA4WY3C.js} +1 -1
  25. package/dist/bundle/chunks/chunk-O2XYFH2E.js +30 -0
  26. package/dist/bundle/chunks/{chunk-CLNF6E5P.js → chunk-OUXJRC2W.js} +1 -1
  27. package/dist/bundle/chunks/{chunk-SKQFE2GA.js → chunk-RI7HJ6AF.js} +10 -10
  28. package/dist/bundle/chunks/chunk-RVXTPNXQ.js +44 -0
  29. package/dist/bundle/chunks/{chunk-SPVE2GM7.js → chunk-SXHVGWCU.js} +1 -1
  30. package/dist/bundle/chunks/chunk-WNZ64GW3.js +2 -0
  31. package/dist/bundle/chunks/chunk-XWZLYE4L.js +9 -0
  32. package/dist/bundle/chunks/{chunk-JAT7HEFU.js → chunk-YSE3VKKB.js} +2 -2
  33. package/dist/bundle/chunks/{cli-7AMCJ2UG.js → cli-2QKCAPPD.js} +3 -3
  34. package/dist/bundle/chunks/{cloudflare-workers-ai-system-one-QBCV2OWJ.js → cloudflare-workers-ai-system-one-UCG6T3XP.js} +1 -1
  35. package/dist/bundle/chunks/codemode-worker.js +2 -0
  36. package/dist/bundle/chunks/{execute-VOIPQMCI.js → execute-KGJOWTPG.js} +2 -2
  37. package/dist/bundle/chunks/github-copilot.js +1 -1
  38. package/dist/bundle/chunks/google-generative-ai-GPBKPOXA.js +2 -0
  39. package/dist/bundle/chunks/google-vertex-USZY53NF.js +2 -0
  40. package/dist/bundle/chunks/https-proxy-agent-WQIRL24U.js +13 -0
  41. package/dist/bundle/chunks/lib-ULKZYRGD.js +9 -0
  42. package/dist/bundle/chunks/{llama-cpp-classify-WGVYEPG2.js → llama-cpp-classify-7DEQ4ZUF.js} +1 -1
  43. package/dist/bundle/chunks/{mistral-conversations-PV6RDK65.js → mistral-conversations-UOGXPDZ3.js} +1 -1
  44. package/dist/bundle/chunks/{multipart-parser-AZP5BX2W.js → multipart-parser-HMCXZ4BD.js} +1 -1
  45. package/dist/bundle/chunks/{node-BZAVEWJ3.js → node-DXZFQBEO.js} +1 -1
  46. package/dist/bundle/chunks/{node-C2JGH2OB.js → node-LBZLUIBE.js} +1 -1
  47. package/dist/bundle/chunks/{openai-codex-responses-SEOL3EDF.js → openai-codex-responses-VUDXQ3EU.js} +1 -1
  48. package/dist/bundle/chunks/{openai-completions-U32QPS37.js → openai-completions-UQOOS7NM.js} +3 -3
  49. package/dist/bundle/chunks/{openai-decisions-ULSYFV2A.js → openai-decisions-24WNXO2R.js} +1 -1
  50. package/dist/bundle/chunks/{openai-responses-5MYZJYPK.js → openai-responses-5AF6MZ5L.js} +1 -1
  51. package/dist/bundle/chunks/{openrouter-images-SGOP5SDW.js → openrouter-images-OUXVVTYQ.js} +1 -1
  52. package/dist/bundle/chunks/{pi-messages-QALFE2BD.js → pi-messages-DRMOEO6B.js} +1 -1
  53. package/dist/bundle/chunks/{runtime-Z74VFUDD.js → runtime-FZKS2BWI.js} +1 -1
  54. package/dist/bundle/chunks/{runtime-GDH3ZURV.js → runtime-L23MZBKL.js} +1 -1
  55. package/dist/bundle/chunks/{settings-manager-T6UJFO2F.js → settings-manager-CWRQW6PZ.js} +1 -1
  56. package/dist/bundle/chunks/src-KDGO7EGF.js +4 -0
  57. package/dist/bundle/chunks/{typesafe-system-one-GTGS5MG6.js → typesafe-system-one-K63EBJDD.js} +1 -1
  58. package/dist/bundle/chunks/virtual-modules-JZV35VDE.js +2 -0
  59. package/dist/bundle/cli-runtime.js +1 -1
  60. package/dist/bundle/index.js +1 -1
  61. package/dist/bundle/rpc-entry.js +1 -1
  62. package/dist/cli/args.d.ts.map +1 -1
  63. package/dist/cli/args.js +5 -3
  64. package/dist/cli/args.js.map +1 -1
  65. package/dist/cli/auth-command.d.ts.map +1 -1
  66. package/dist/cli/auth-command.js +30 -6
  67. package/dist/cli/auth-command.js.map +1 -1
  68. package/dist/cli/auth-login.d.ts +15 -0
  69. package/dist/cli/auth-login.d.ts.map +1 -0
  70. package/dist/cli/auth-login.js +232 -0
  71. package/dist/cli/auth-login.js.map +1 -0
  72. package/dist/cli/auth-logout.d.ts +14 -0
  73. package/dist/cli/auth-logout.d.ts.map +1 -0
  74. package/dist/cli/auth-logout.js +57 -0
  75. package/dist/cli/auth-logout.js.map +1 -0
  76. package/dist/cli/auth-terminal.d.ts +17 -0
  77. package/dist/cli/auth-terminal.d.ts.map +1 -0
  78. package/dist/cli/auth-terminal.js +63 -0
  79. package/dist/cli/auth-terminal.js.map +1 -0
  80. package/dist/core/agent-session-runtime.d.ts +5 -0
  81. package/dist/core/agent-session-runtime.d.ts.map +1 -1
  82. package/dist/core/agent-session-runtime.js +16 -2
  83. package/dist/core/agent-session-runtime.js.map +1 -1
  84. package/dist/core/agent-session.d.ts +20 -9
  85. package/dist/core/agent-session.d.ts.map +1 -1
  86. package/dist/core/agent-session.js +71 -29
  87. package/dist/core/agent-session.js.map +1 -1
  88. package/dist/core/ai-schemas.d.ts +1 -0
  89. package/dist/core/ai-schemas.d.ts.map +1 -1
  90. package/dist/core/builtins/budgets.d.ts.map +1 -1
  91. package/dist/core/builtins/budgets.js +6 -3
  92. package/dist/core/builtins/budgets.js.map +1 -1
  93. package/dist/core/cache-warmer.d.ts +4 -37
  94. package/dist/core/cache-warmer.d.ts.map +1 -1
  95. package/dist/core/cache-warmer.js +11 -91
  96. package/dist/core/cache-warmer.js.map +1 -1
  97. package/dist/core/compaction/utils.d.ts.map +1 -1
  98. package/dist/core/compaction/utils.js +2 -1
  99. package/dist/core/compaction/utils.js.map +1 -1
  100. package/dist/core/exec.d.ts +1 -0
  101. package/dist/core/exec.d.ts.map +1 -1
  102. package/dist/core/exec.js +4 -1
  103. package/dist/core/exec.js.map +1 -1
  104. package/dist/core/export-html/ansi-to-html.d.ts +5 -0
  105. package/dist/core/export-html/ansi-to-html.d.ts.map +1 -1
  106. package/dist/core/export-html/ansi-to-html.js +57 -20
  107. package/dist/core/export-html/ansi-to-html.js.map +1 -1
  108. package/dist/core/export-html/template.js +1 -1
  109. package/dist/core/export-html/tool-renderer.d.ts.map +1 -1
  110. package/dist/core/export-html/tool-renderer.js +2 -3
  111. package/dist/core/export-html/tool-renderer.js.map +1 -1
  112. package/dist/core/extensions/types.d.ts +3 -2
  113. package/dist/core/extensions/types.d.ts.map +1 -1
  114. package/dist/core/extensions/types.js.map +1 -1
  115. package/dist/core/model-config.d.ts +13 -0
  116. package/dist/core/model-config.d.ts.map +1 -1
  117. package/dist/core/model-resolver.d.ts +0 -1
  118. package/dist/core/model-resolver.d.ts.map +1 -1
  119. package/dist/core/model-resolver.js +17 -24
  120. package/dist/core/model-resolver.js.map +1 -1
  121. package/dist/core/model-runtime.d.ts +5 -0
  122. package/dist/core/model-runtime.d.ts.map +1 -1
  123. package/dist/core/model-runtime.js +7 -0
  124. package/dist/core/model-runtime.js.map +1 -1
  125. package/dist/core/polyphase/render/format.d.ts +2 -0
  126. package/dist/core/polyphase/render/format.d.ts.map +1 -1
  127. package/dist/core/polyphase/render/format.js +6 -0
  128. package/dist/core/polyphase/render/format.js.map +1 -1
  129. package/dist/core/polyphase/render/run-block.d.ts +4 -0
  130. package/dist/core/polyphase/render/run-block.d.ts.map +1 -1
  131. package/dist/core/polyphase/render/run-block.js +71 -12
  132. package/dist/core/polyphase/render/run-block.js.map +1 -1
  133. package/dist/core/polyphase/render/snapshot.d.ts +1 -1
  134. package/dist/core/polyphase/render/snapshot.d.ts.map +1 -1
  135. package/dist/core/polyphase/render/snapshot.js +22 -7
  136. package/dist/core/polyphase/render/snapshot.js.map +1 -1
  137. package/dist/core/polyphase/ui/dock.d.ts.map +1 -1
  138. package/dist/core/polyphase/ui/dock.js +34 -2
  139. package/dist/core/polyphase/ui/dock.js.map +1 -1
  140. package/dist/core/polyphase/ui/inspector.d.ts +18 -6
  141. package/dist/core/polyphase/ui/inspector.d.ts.map +1 -1
  142. package/dist/core/polyphase/ui/inspector.js +125 -44
  143. package/dist/core/polyphase/ui/inspector.js.map +1 -1
  144. package/dist/core/polyphase/ui/transcript-layout.d.ts.map +1 -1
  145. package/dist/core/polyphase/ui/transcript-layout.js +5 -1
  146. package/dist/core/polyphase/ui/transcript-layout.js.map +1 -1
  147. package/dist/core/preferred-providers.d.ts +17 -0
  148. package/dist/core/preferred-providers.d.ts.map +1 -0
  149. package/dist/core/preferred-providers.js +24 -0
  150. package/dist/core/preferred-providers.js.map +1 -0
  151. package/dist/core/prompt-templates.d.ts.map +1 -1
  152. package/dist/core/prompt-templates.js +18 -2
  153. package/dist/core/prompt-templates.js.map +1 -1
  154. package/dist/core/provider-composer.d.ts.map +1 -1
  155. package/dist/core/provider-composer.js +2 -0
  156. package/dist/core/provider-composer.js.map +1 -1
  157. package/dist/core/provider-matching.d.ts +6 -0
  158. package/dist/core/provider-matching.d.ts.map +1 -0
  159. package/dist/core/provider-matching.js +8 -0
  160. package/dist/core/provider-matching.js.map +1 -0
  161. package/dist/core/radius-mcp.d.ts +13 -0
  162. package/dist/core/radius-mcp.d.ts.map +1 -0
  163. package/dist/core/radius-mcp.js +29 -0
  164. package/dist/core/radius-mcp.js.map +1 -0
  165. package/dist/core/remote-catalog-provider.d.ts.map +1 -1
  166. package/dist/core/remote-catalog-provider.js +2 -0
  167. package/dist/core/remote-catalog-provider.js.map +1 -1
  168. package/dist/core/runtime-credentials.d.ts +8 -0
  169. package/dist/core/runtime-credentials.d.ts.map +1 -1
  170. package/dist/core/runtime-credentials.js +15 -1
  171. package/dist/core/runtime-credentials.js.map +1 -1
  172. package/dist/core/session-cwd.d.ts +7 -0
  173. package/dist/core/session-cwd.d.ts.map +1 -1
  174. package/dist/core/session-cwd.js +9 -1
  175. package/dist/core/session-cwd.js.map +1 -1
  176. package/dist/core/session-manager.d.ts.map +1 -1
  177. package/dist/core/session-manager.js +45 -36
  178. package/dist/core/session-manager.js.map +1 -1
  179. package/dist/core/settings-defaults.d.ts +1 -1
  180. package/dist/core/settings-defaults.d.ts.map +1 -1
  181. package/dist/core/settings-defaults.js +1 -1
  182. package/dist/core/settings-defaults.js.map +1 -1
  183. package/dist/core/tools/bash.d.ts.map +1 -1
  184. package/dist/core/tools/bash.js +35 -5
  185. package/dist/core/tools/bash.js.map +1 -1
  186. package/dist/core/tools/edit-diff.d.ts +23 -14
  187. package/dist/core/tools/edit-diff.d.ts.map +1 -1
  188. package/dist/core/tools/edit-diff.js +182 -41
  189. package/dist/core/tools/edit-diff.js.map +1 -1
  190. package/dist/core/tools/edit.d.ts.map +1 -1
  191. package/dist/core/tools/edit.js +8 -7
  192. package/dist/core/tools/edit.js.map +1 -1
  193. package/dist/core/tools/find.d.ts.map +1 -1
  194. package/dist/core/tools/find.js +57 -16
  195. package/dist/core/tools/find.js.map +1 -1
  196. package/dist/core/tools/grep.d.ts +4 -0
  197. package/dist/core/tools/grep.d.ts.map +1 -1
  198. package/dist/core/tools/grep.js +20 -8
  199. package/dist/core/tools/grep.js.map +1 -1
  200. package/dist/core/tools/output-accumulator.d.ts.map +1 -1
  201. package/dist/core/tools/output-accumulator.js +4 -1
  202. package/dist/core/tools/output-accumulator.js.map +1 -1
  203. package/dist/core/tools/powershell.d.ts.map +1 -1
  204. package/dist/core/tools/powershell.js +15 -2
  205. package/dist/core/tools/powershell.js.map +1 -1
  206. package/dist/core/tools/read.d.ts +13 -0
  207. package/dist/core/tools/read.d.ts.map +1 -1
  208. package/dist/core/tools/read.js +146 -35
  209. package/dist/core/tools/read.js.map +1 -1
  210. package/dist/core/tools/renderers/read.d.ts.map +1 -1
  211. package/dist/core/tools/renderers/read.js +6 -2
  212. package/dist/core/tools/renderers/read.js.map +1 -1
  213. package/dist/core/tools/truncate.d.ts +4 -0
  214. package/dist/core/tools/truncate.d.ts.map +1 -1
  215. package/dist/core/tools/truncate.js +24 -1
  216. package/dist/core/tools/truncate.js.map +1 -1
  217. package/dist/extensions/codemode/execute.js +4 -4
  218. package/dist/extensions/codemode/execute.js.map +1 -1
  219. package/dist/extensions/codemode/tool.d.ts.map +1 -1
  220. package/dist/extensions/codemode/tool.js +34 -12
  221. package/dist/extensions/codemode/tool.js.map +1 -1
  222. package/dist/extensions/llama/provider.d.ts +1 -1
  223. package/dist/extensions/llama/provider.js +1 -1
  224. package/dist/extensions/llama/provider.js.map +1 -1
  225. package/dist/extensions/llama/ui.d.ts.map +1 -1
  226. package/dist/extensions/llama/ui.js +15 -3
  227. package/dist/extensions/llama/ui.js.map +1 -1
  228. package/dist/extensions/mcp/cli.js +5 -8
  229. package/dist/extensions/mcp/cli.js.map +1 -1
  230. package/dist/extensions/mcp/index.d.ts.map +1 -1
  231. package/dist/extensions/mcp/index.js +2 -1
  232. package/dist/extensions/mcp/index.js.map +1 -1
  233. package/dist/extensions/mcp/runtime.d.ts.map +1 -1
  234. package/dist/extensions/mcp/runtime.js +3 -2
  235. package/dist/extensions/mcp/runtime.js.map +1 -1
  236. package/dist/extensions/tool-search/tool.d.ts.map +1 -1
  237. package/dist/extensions/tool-search/tool.js +18 -6
  238. package/dist/extensions/tool-search/tool.js.map +1 -1
  239. package/dist/main.d.ts.map +1 -1
  240. package/dist/main.js +67 -15
  241. package/dist/main.js.map +1 -1
  242. package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
  243. package/dist/modes/interactive/components/login-dialog.js +2 -19
  244. package/dist/modes/interactive/components/login-dialog.js.map +1 -1
  245. package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
  246. package/dist/modes/interactive/components/model-selector.js +14 -6
  247. package/dist/modes/interactive/components/model-selector.js.map +1 -1
  248. package/dist/modes/interactive/components/oauth-selector.d.ts +10 -3
  249. package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
  250. package/dist/modes/interactive/components/oauth-selector.js +32 -5
  251. package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
  252. package/dist/modes/interactive/components/provider-brand.d.ts +14 -0
  253. package/dist/modes/interactive/components/provider-brand.d.ts.map +1 -0
  254. package/dist/modes/interactive/components/provider-brand.js +66 -0
  255. package/dist/modes/interactive/components/provider-brand.js.map +1 -0
  256. package/dist/modes/interactive/components/radius-login-selector.d.ts +1 -2
  257. package/dist/modes/interactive/components/radius-login-selector.d.ts.map +1 -1
  258. package/dist/modes/interactive/components/radius-login-selector.js +6 -37
  259. package/dist/modes/interactive/components/radius-login-selector.js.map +1 -1
  260. package/dist/modes/interactive/components/session-selector.d.ts +6 -1
  261. package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
  262. package/dist/modes/interactive/components/session-selector.js +23 -5
  263. package/dist/modes/interactive/components/session-selector.js.map +1 -1
  264. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  265. package/dist/modes/interactive/components/tool-execution.js +3 -1
  266. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  267. package/dist/modes/interactive/interactive-mode.d.ts +11 -1
  268. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  269. package/dist/modes/interactive/interactive-mode.js +133 -78
  270. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  271. package/dist/modes/interactive/session-share.js +2 -0
  272. package/dist/modes/interactive/session-share.js.map +1 -1
  273. package/dist/package-manager-cli.d.ts.map +1 -1
  274. package/dist/package-manager-cli.js +27 -4
  275. package/dist/package-manager-cli.js.map +1 -1
  276. package/dist/prompts/commands/test-audit.md +84 -0
  277. package/dist/utils/image-resize.d.ts.map +1 -1
  278. package/dist/utils/image-resize.js +3 -1
  279. package/dist/utils/image-resize.js.map +1 -1
  280. package/dist/utils/terminal-question.d.ts +8 -0
  281. package/dist/utils/terminal-question.d.ts.map +1 -0
  282. package/dist/utils/terminal-question.js +24 -0
  283. package/dist/utils/terminal-question.js.map +1 -0
  284. package/dist/utils/web-url.d.ts +12 -0
  285. package/dist/utils/web-url.d.ts.map +1 -0
  286. package/dist/utils/web-url.js +20 -0
  287. package/dist/utils/web-url.js.map +1 -0
  288. package/docs/cli.md +14 -1
  289. package/docs/extensions.md +6 -4
  290. package/docs/llama-cpp.md +5 -5
  291. package/docs/models-configuration.md +2 -1
  292. package/docs/nvidia-rtx-llama-cpp.md +5 -5
  293. package/docs/polyphase.md +13 -1
  294. package/docs/prompt-templates.md +1 -1
  295. package/docs/providers.md +4 -2
  296. package/docs/quickstart.md +1 -1
  297. package/docs/rpc-commands.md +1 -1
  298. package/docs/rpc.md +1 -1
  299. package/docs/sessions.md +7 -1
  300. package/docs/settings.md +1 -1
  301. package/docs/tui.md +1 -1
  302. package/examples/extensions/gondolin/index.ts +4 -7
  303. package/examples/extensions/subagent/index.ts +5 -1
  304. package/package.json +10 -10
  305. package/prompts/commands/test-audit.md +84 -0
  306. package/schemas/models.schema.json +5 -1
  307. package/schemas/settings.schema.json +1 -1
  308. package/dist/bundle/chunks/anthropic-messages-TXQXPH4S.js +0 -6
  309. package/dist/bundle/chunks/chunk-6MSE6LZ3.js +0 -6
  310. package/dist/bundle/chunks/chunk-736QBNUZ.js +0 -12
  311. package/dist/bundle/chunks/chunk-AOCWORXE.js +0 -2
  312. package/dist/bundle/chunks/chunk-BIBUE2PO.js +0 -2
  313. package/dist/bundle/chunks/chunk-DQ4G4IS4.js +0 -20
  314. package/dist/bundle/chunks/chunk-J7QTCDIN.js +0 -2
  315. package/dist/bundle/chunks/chunk-NNYZSIKR.js +0 -9
  316. package/dist/bundle/chunks/chunk-SUVMF4W5.js +0 -2
  317. package/dist/bundle/chunks/chunk-THDNEOXP.js +0 -44
  318. package/dist/bundle/chunks/chunk-TIA2T6EO.js +0 -3
  319. package/dist/bundle/chunks/chunk-TK3LS5QZ.js +0 -82
  320. package/dist/bundle/chunks/chunk-TYAEYYRA.js +0 -30
  321. package/dist/bundle/chunks/google-generative-ai-NC5KHHW3.js +0 -2
  322. package/dist/bundle/chunks/google-vertex-GAPUJEF7.js +0 -2
  323. package/dist/bundle/chunks/https-proxy-agent-O2PVUIOI.js +0 -13
  324. package/dist/bundle/chunks/lib-XOG5PI3Y.js +0 -9
  325. package/dist/bundle/chunks/src-TIBHS42X.js +0 -4
  326. package/dist/bundle/chunks/virtual-modules-ZUI2T3XR.js +0 -2
  327. /package/dist/bundle/chunks/{chunk-PX3CDFUB.js → chunk-ITKDPD4D.js} +0 -0
  328. /package/dist/bundle/chunks/{chunk-ZZD35WKM.js → chunk-MOOADNVS.js} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"inspector.js","sourceRoot":"","sources":["../../../../src/core/polyphase/ui/inspector.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,2DAA2D,CAAC;AAGrG,OAAO,EAEN,OAAO,EACP,OAAO,EACP,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,OAAO,EACP,UAAU,EACV,WAAW,GACX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAA2C,mBAAmB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAItH,OAAO,EACN,kBAAkB,EAClB,mBAAmB,EAEnB,YAAY,GACZ,MAAM,wBAAwB,CAAC;AAqBhC,MAAM,SAAS,GAAG,EAAE,CAAC;AACrB,MAAM,eAAe,GAAG,GAAG,CAAC;AAC5B,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAkB5B,SAAS,KAAK,CAAC,CAAS,EAAE,GAAW,EAAE,GAAW;IACjD,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;AACxC,CAAC;AAED;;;+FAG+F;AAC/F,SAAS,YAAY,CAAC,KAAwB,EAAE,MAAc,EAAE,KAAa,EAAE,KAAY;IAC1F,IAAI,KAAK,CAAC,MAAM,IAAI,MAAM;QAAE,OAAO,KAAK,CAAC;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CAAC,CAAC,eAAe,EAAE,iBAAiB,CAAC,EAAE,QAAQ,CAAC;YAC/D,OAAO,CAAC,oBAAoB,EAAE,QAAQ,CAAC;YACvC,OAAO,CAAC,2BAA2B,EAAE,cAAc,CAAC;YACpD,OAAO,CAAC,yBAAyB,EAAE,YAAY,CAAC;YAChD,OAAO,CAAC,mBAAmB,EAAE,MAAM,CAAC;SACpC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAEO,aAAa,CAAC,MAAoB;QACzC,MAAM,QAAQ,GAAG,MAAM,KAAK,SAAS,IAAI,qBAAqB,CAAC,MAAM,CAAC,CAAC;QACvE,OAAO;YACN,OAAO,CAAC,yBAAyB,EAAE,YAAY,CAAC;YAChD,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,sBAAsB,EAAE,QAAQ,CAAC,CAAC,CAAC;YAChE,OAAO,CAAC,qBAAqB,EAAE,UAAU,CAAC;YAC1C,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,2BAA2B,EAAE,QAAQ,CAAC,CAAC,CAAC;YACrE,OAAO,CAAC,mBAAmB,EAAE,MAAM,CAAC;SACpC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;CACD","sourcesContent":["/**\n * `PolyphaseInspector`: the `alt+a` popup overlay listing runs and following an agent's live\n * transcript. See DESIGN.md §12.1-12.6, §12.8.\n */\n\nimport type { Component, Focusable, KeybindingsManager, TUI } from \"@draht/tui\";\nimport { visibleWidth, wrapTextWithAnsi } from \"@draht/tui\";\nimport { combinedKeyHint, keyHint } from \"../../../modes/interactive/components/keybinding-hints.ts\";\nimport type { Theme } from \"../../../modes/interactive/theme/theme.ts\";\nimport type { ArchivedRun } from \"../details.ts\";\nimport {\n\ttype ColumnCell,\n\tcolumns,\n\tfitLine,\n\tformatCost,\n\tformatDuration,\n\tformatModelLabel,\n\tformatTokens,\n\toneLine,\n\tpadToWidth,\n\tstatusGlyph,\n} from \"../render/format.ts\";\nimport { sanitizeChildText, sanitizeSnapshot } from \"../render/run-block.ts\";\nimport { type AgentSnapshotRow, type RunSnapshot, snapshotFromDetails, snapshotFromRun } from \"../render/snapshot.ts\";\nimport type { PolyphaseSession } from \"../session.ts\";\nimport type { AgentStatus, TranscriptItem } from \"../types.ts\";\nimport type { SavedWorkflowSummary } from \"../workflow/saved.ts\";\nimport {\n\tsanitizeForDisplay,\n\tTranscriptLineCache,\n\ttype TranscriptLineRange,\n\ttailWindowOf,\n} from \"./transcript-layout.ts\";\n\nexport type InspectorInitialView =\n\t| { view: \"auto\" }\n\t| { view: \"runs\" }\n\t| { view: \"run\"; runId: string }\n\t| { view: \"agent\"; runId: string; agentIndex: number };\n\nexport interface InspectorDeps {\n\tsession: PolyphaseSession;\n\ttui: TUI;\n\ttheme: Theme;\n\tkeybindings: KeybindingsManager;\n\tgetArchivedRuns(): readonly ArchivedRun[];\n\tgetSavedWorkflows(): readonly SavedWorkflowSummary[];\n\tinitial: InspectorInitialView;\n\tshowThinking: boolean;\n\tclose(): void;\n\tinsertCommand(text: string): void;\n}\n\nconst PAGE_SIZE = 10;\nconst SPLIT_MIN_WIDTH = 120;\nconst SPLIT_LEFT_WIDTH = 40;\n\ntype ViewMode = \"runs\" | \"run\" | \"agent\";\n\ninterface RunsRow {\n\tkind: \"live\" | \"earlier\" | \"saved\";\n\trunId?: string;\n\tsnapshot?: RunSnapshot;\n\tsaved?: SavedWorkflowSummary;\n}\n\ninterface CancelTarget {\n\trunId: string;\n\tagentIndex?: number;\n\tlabel: string;\n\tfinished: boolean;\n}\n\nfunction clamp(n: number, min: number, max: number): number {\n\treturn Math.min(max, Math.max(min, n));\n}\n\n/** Slices `lines` to `height` rows centred on `pivot`, replacing the first/last visible row with\n * a muted \"N more\" marker when the window hides rows above/below. The window is always centred on\n * `pivot` (clamped only at the list's edges), so `pivot` lands on an edge row of the window only\n * when that edge has nothing hidden past it — the marker never overwrites the selected row. */\nfunction windowAround(lines: readonly string[], height: number, pivot: number, theme: Theme): readonly string[] {\n\tif (lines.length <= height) return lines;\n\tconst start = Math.max(0, Math.min(pivot - Math.floor(height / 2), lines.length - height));\n\tconst end = start + height;\n\tconst windowed = lines.slice(start, end);\n\tif (height < 2) return windowed;\n\tconst pivotOffset = pivot - start;\n\tconst marked = windowed.slice();\n\tif (start > 0 && pivotOffset !== 0) {\n\t\tmarked[0] = theme.fg(\"muted\", `↑ ${start} more`);\n\t}\n\tif (end < lines.length && pivotOffset !== marked.length - 1) {\n\t\tmarked[marked.length - 1] = theme.fg(\"muted\", `↓ ${lines.length - end} more`);\n\t}\n\treturn marked;\n}\n\nfunction padLines(lines: readonly string[], height: number): string[] {\n\tif (lines.length >= height) return lines.slice(0, height);\n\treturn [...lines, ...Array.from({ length: height - lines.length }, () => \"\")];\n}\n\ninterface PauseAnchor {\n\tseq: number;\n\tlineInItem: number;\n}\n\n/** Resolves a pause anchor back to an absolute window-end line (exclusive), against the item line\n * ranges from the most recent render. If the anchored item was evicted, clamps to just past the\n * first still-kept item instead of drifting the view forward by the wrong amount. */\nfunction resolvePauseEndLine(anchor: PauseAnchor, ranges: readonly TranscriptLineRange[], totalLines: number): number {\n\tconst range = ranges.find((r) => r.seq === anchor.seq);\n\tif (range) return clamp(range.start + anchor.lineInItem + 1, 0, totalLines);\n\tconst first = ranges[0];\n\treturn first ? clamp(first.start + 1, 0, totalLines) : 0;\n}\n\n/** Converts an absolute window-end line (exclusive) into a pause anchor on whichever item renders\n * that line, so the anchor survives evictions that shift line numbers. */\nfunction anchorAtEndLine(endLine: number, ranges: readonly TranscriptLineRange[]): PauseAnchor | undefined {\n\tconst lastVisibleLine = endLine - 1;\n\tfor (const range of ranges) {\n\t\tif (lastVisibleLine >= range.start && lastVisibleLine < range.end) {\n\t\t\treturn { seq: range.seq, lineInItem: lastVisibleLine - range.start };\n\t\t}\n\t}\n\tconst last = ranges[ranges.length - 1];\n\treturn last ? { seq: last.seq, lineInItem: Math.max(0, last.end - last.start - 1) } : undefined;\n}\n\n/** Truncates the title (never the right segment or the closing corner) so the border always stays\n * closed, instead of handing the whole assembled string to `fitLine` and letting it cut off\n * whichever happens to sit at the end. */\nfunction borderTop(title: string, right: string, width: number): string {\n\tconst inner = Math.max(0, width - 2);\n\tlet rightSeg = right ? ` ${right} ` : \"\";\n\tlet rightWidth = visibleWidth(rightSeg);\n\tif (rightWidth > inner) {\n\t\trightSeg = \"\";\n\t\trightWidth = 0;\n\t}\n\tconst minDashes = 1;\n\tconst titleBudget = Math.max(0, inner - rightWidth - minDashes);\n\tconst titleSeg = fitLine(` ${title} `, titleBudget);\n\tconst dashes = Math.max(0, inner - visibleWidth(titleSeg) - rightWidth);\n\treturn `┌${titleSeg}${\"─\".repeat(dashes)}${rightSeg}┐`;\n}\n\nfunction borderBottom(width: number): string {\n\treturn fitLine(`└${\"─\".repeat(Math.max(0, width - 2))}┘`, width);\n}\n\nfunction sideLine(content: string, width: number): string {\n\tconst inner = Math.max(0, width - 4);\n\treturn fitLine(`│ ${padToWidth(content, inner)} │`, width);\n}\n\nfunction runsRowKey(row: RunsRow): string {\n\tif (row.kind === \"saved\") return `saved:${row.saved?.name ?? \"\"}`;\n\treturn `run:${row.runId ?? \"\"}`;\n}\n\nfunction groupLabel(kind: RunsRow[\"kind\"]): string {\n\tswitch (kind) {\n\t\tcase \"live\":\n\t\t\treturn \"Live\";\n\t\tcase \"earlier\":\n\t\t\treturn \"Earlier in this session\";\n\t\tcase \"saved\":\n\t\t\treturn \"Saved workflows\";\n\t}\n}\n\n/** Drops a trailing agent-count suffix (e.g. \"subagent parallel · 2 agents\"): `runSubtitleText`\n * is the single place that shows the count, so the title must not repeat it. */\nconst TRAILING_AGENT_COUNT = / · \\d+ agents?$/;\n\n/** The phase marker is only meaningful while the run is still progressing through phases; a\n * finished or cancelled run has no \"current\" phase left, so showing one would misread as still\n * running. */\nfunction isCurrentlyPhased(status: RunSnapshot[\"status\"]): boolean {\n\treturn status === \"running\";\n}\n\nfunction runTitleText(snapshot: RunSnapshot): string {\n\tif (snapshot.kind === \"workflow\") return `workflow ${snapshot.workflow?.name ?? snapshot.title}`;\n\tif (snapshot.kind === \"duet\") return `duet · ${snapshot.title}`;\n\treturn snapshot.title.replace(TRAILING_AGENT_COUNT, \"\");\n}\n\nfunction runSubtitleText(snapshot: RunSnapshot): string {\n\tif (snapshot.kind === \"workflow\") {\n\t\tconst phase =\n\t\t\tisCurrentlyPhased(snapshot.status) && snapshot.currentPhase !== undefined\n\t\t\t\t? snapshot.phases[snapshot.currentPhase]\n\t\t\t\t: undefined;\n\t\tif (phase) return `▸ ${phase.title}`;\n\t\tconst n = snapshot.phases.length;\n\t\treturn n > 0 ? `${n} phase${n === 1 ? \"\" : \"s\"}` : \"\";\n\t}\n\tconst n = snapshot.agents.length;\n\treturn `${n} agent${n === 1 ? \"\" : \"s\"}`;\n}\n\n/** `› ` (or ` `) + glyph, always a fixed-width cell outside the title's flex cell: the cursor and\n * status glyph must stay visible even when nothing else does. `columns()`'s own 1-column gap\n * supplies the separator space before the title, matching `› ● label` elsewhere in this file. */\nconst RUNS_ROW_CURSOR_WIDTH = 3;\n\nfunction savedWorkflowSourceLabel(source: SavedWorkflowSummary[\"source\"]): string {\n\treturn source === \"project\" ? \"proj\" : \"user\";\n}\n\n/** Drops or shrinks the runs-view row's optional columns as `width` decreases, in order of least\n * useful first (tokens, then cost, then the subtitle, then counts and duration), so the title (the\n * flex cell) keeps a usable share of the row instead of being squeezed to nothing by fixed columns\n * that no longer fit. */\nfunction runsRowOptionalWidths(width: number): {\n\tsubtitle: number;\n\tcounts: number;\n\tduration: number;\n\ttokens: number;\n\tcost: number;\n} {\n\treturn {\n\t\tsubtitle: width >= 80 ? 16 : width >= 60 ? 10 : 0,\n\t\tcounts: width >= 56 ? 10 : 0,\n\t\tduration: width >= 50 ? 7 : 0,\n\t\ttokens: width >= 70 ? 6 : 0,\n\t\tcost: width >= 60 ? 7 : 0,\n\t};\n}\n\n/** The agent detail header's right side (§12.2: `◐ thinking 0:41`) shows only the current activity\n * keyword, not `row.now`'s full content: `row.now` for a thinking/writing agent is `\"thinking · <the\n * actual text>\"`, and showing that verbatim in the border would leak hidden-thinking content past the\n * `app.thinking.toggle` gate that otherwise hides it in the transcript below. */\nfunction headerActivityText(row: AgentSnapshotRow): string {\n\tconst now = row.now ? oneLine(sanitizeForDisplay(row.now)) : undefined;\n\tif (!now) return row.status;\n\tconst separator = now.indexOf(\" · \");\n\treturn separator === -1 ? now : now.slice(0, separator);\n}\n\n/** Mirrors `headerActivityText`'s thinking-keyword cut: the run view's agent list and the split\n * view's left pane must not leak hidden thinking content into the \"now\" column either (§12.2 shows\n * just `thinking` there), even though the same column shows the activity in full once thinking is\n * visible. */\nfunction agentRowRightText(row: AgentSnapshotRow, showThinking: boolean): string {\n\tif (row.now) {\n\t\tconst now = oneLine(sanitizeForDisplay(row.now));\n\t\t// \"thinking\" is the only `computeNowLine()` activity word that can be followed by child-written\n\t\t// text; checking the prefix (not the full `\"thinking · \"` separator) also catches the edge case\n\t\t// where the thinking block is still empty and `oneLine()` has trimmed the trailing separator.\n\t\tif (!showThinking && now.startsWith(\"thinking\")) return \"thinking\";\n\t\treturn now;\n\t}\n\tif (row.statusLine) return oneLine(sanitizeForDisplay(row.statusLine));\n\tif (row.error) return oneLine(sanitizeForDisplay(row.error));\n\tswitch (row.status) {\n\t\tcase \"queued\":\n\t\t\treturn \"queued\";\n\t\tcase \"pending\":\n\t\t\treturn row.step !== undefined && row.step > 1 ? `waits for step ${row.step - 1}` : \"not run\";\n\t\tcase \"skipped\":\n\t\t\treturn \"not run\";\n\t\tcase \"cancelled\":\n\t\t\treturn row.cancelReason === \"time\" ? \"cancelled (time limit)\" : \"cancelled\";\n\t\tcase \"done\":\n\t\t\t// A finished agent with no `now` and no `STATUS:` line still has output worth showing\n\t\t\t// (§11.3's tool-row fallback does the same): the first line beats a blank column.\n\t\t\treturn row.output ? oneLine(sanitizeForDisplay(row.output)) : \"\";\n\t\tdefault:\n\t\t\treturn \"\";\n\t}\n}\n\nconst COUNT_ORDER: readonly AgentStatus[] = [\"running\", \"done\", \"failed\", \"cancelled\", \"queued\", \"pending\", \"skipped\"];\n\nfunction formatCounts(theme: Theme, now: number, counts: Record<AgentStatus, number>): string {\n\tconst parts: string[] = [];\n\tfor (const status of COUNT_ORDER) {\n\t\tconst n = counts[status];\n\t\tif (n > 0) parts.push(`${statusGlyph(status, theme, { now, animate: false })}${n}`);\n\t}\n\treturn parts.join(\" \");\n}\n\nfunction isFinishedAgentStatus(status: AgentStatus): boolean {\n\treturn status === \"done\" || status === \"failed\" || status === \"cancelled\" || status === \"skipped\";\n}\n\n/**\n * The `alt+a` popup. `render()` recomputes the live runs-view list, the current run's agent list\n * and the selected agent's transcript window on every call, since those come straight from the\n * live store; nothing here owns a timer. Dirtiness (when to re-render at all) is the caller's job,\n * driven by `session.store`'s flush notifications.\n */\nexport class PolyphaseInspector implements Component, Focusable {\n\tfocused = false;\n\n\tprivate readonly deps: InspectorDeps;\n\tprivate readonly transcriptCache: TranscriptLineCache;\n\tprivate readonly unsubscribe: () => void;\n\n\tprivate mode: ViewMode = \"runs\";\n\tprivate currentRunId: string | undefined;\n\tprivate currentAgentIndex: number | undefined;\n\tprivate runsRows: RunsRow[] = [];\n\tprivate runsSelection = 0;\n\tprivate runsSelectionKey: string | undefined;\n\tprivate runSelection = 0;\n\tprivate following = true;\n\t/** Anchors the paused window to an item (`seq`) and a line within it, not an absolute line index:\n\t * the transcript keeps at most `maxItems`, so a paused run that keeps producing output evicts\n\t * older items and shifts every absolute line index after them. Resolved back to an absolute line\n\t * on each render via `resolvePauseEndLine`. See `renderAgentDetailBody`. */\n\tprivate pauseAnchor: PauseAnchor | undefined;\n\tprivate lastTranscriptTotalLines: number | undefined;\n\tprivate lastTranscriptRanges: readonly TranscriptLineRange[] = [];\n\tprivate lastDetailBodyHeight: number | undefined;\n\tprivate lastRenderWidth = 0;\n\tprivate showThinking: boolean;\n\tprivate showToolPreviews = false;\n\tprivate armed: { action: \"cancelAgent\" | \"cancelRun\"; runId: string; agentIndex?: number } | undefined;\n\tprivate footerNotice: string | undefined;\n\n\tconstructor(deps: InspectorDeps) {\n\t\tthis.deps = deps;\n\t\tthis.showThinking = deps.showThinking;\n\t\tthis.transcriptCache = new TranscriptLineCache(deps.theme);\n\t\tthis.resolveInitialView();\n\t\tthis.unsubscribe = deps.session.store.subscribe((change) => {\n\t\t\tif (change.type === \"disposed\") {\n\t\t\t\tthis.deps.close();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.deps.tui.requestRender();\n\t\t});\n\t}\n\n\thandleInput(data: string): void {\n\t\tif (this.mode === \"runs\") {\n\t\t\tthis.runsRows = this.buildRunsRows();\n\t\t\tthis.runsSelection = this.resolveRunsSelectionIndex(this.runsRows);\n\t\t}\n\t\tconst kb = this.deps.keybindings;\n\n\t\tif (kb.matches(data, \"app.polyphase.inspector\")) {\n\t\t\tthis.deps.close();\n\t\t\treturn;\n\t\t}\n\t\tif (kb.matches(data, \"app.polyphase.cancelAgent\")) {\n\t\t\tthis.handleCancelKey(\"cancelAgent\");\n\t\t\treturn;\n\t\t}\n\t\tif (kb.matches(data, \"app.polyphase.cancelRun\")) {\n\t\t\tthis.handleCancelKey(\"cancelRun\");\n\t\t\treturn;\n\t\t}\n\n\t\tthis.armed = undefined;\n\t\tthis.footerNotice = undefined;\n\n\t\tif (kb.matches(data, \"tui.select.cancel\")) {\n\t\t\tthis.goBack();\n\t\t} else if (kb.matches(data, \"app.thinking.toggle\")) {\n\t\t\tthis.showThinking = !this.showThinking;\n\t\t} else if (kb.matches(data, \"app.tools.expand\")) {\n\t\t\tthis.showToolPreviews = !this.showToolPreviews;\n\t\t} else if (kb.matches(data, \"app.polyphase.follow\")) {\n\t\t\tthis.toggleFollow();\n\t\t} else if (kb.matches(data, \"app.polyphase.nextAgent\")) {\n\t\t\tthis.cycleAgent(1);\n\t\t} else if (kb.matches(data, \"app.polyphase.previousAgent\")) {\n\t\t\tthis.cycleAgent(-1);\n\t\t} else if (kb.matches(data, \"tui.select.up\")) {\n\t\t\tthis.moveSelection(-1);\n\t\t} else if (kb.matches(data, \"tui.select.down\")) {\n\t\t\tthis.moveSelection(1);\n\t\t} else if (kb.matches(data, \"tui.select.pageUp\")) {\n\t\t\tthis.handlePage(-1);\n\t\t} else if (kb.matches(data, \"tui.select.pageDown\")) {\n\t\t\tthis.handlePage(1);\n\t\t} else if (kb.matches(data, \"tui.select.confirm\")) {\n\t\t\tthis.confirmSelection();\n\t\t}\n\t}\n\n\trender(width: number): string[] {\n\t\tthis.lastRenderWidth = width;\n\t\tconst terminal = this.deps.tui.terminal;\n\t\tif (width < 40 || terminal.rows < 10) {\n\t\t\treturn [fitLine(\"terminal too small for the agent inspector\", width)];\n\t\t}\n\t\tconst height = Math.max(8, terminal.rows - 2);\n\t\tconst bodyHeight = Math.max(1, height - 2);\n\t\tconst innerWidth = Math.max(1, width - 4);\n\n\t\tlet topTitle: string;\n\t\tlet topRight: string;\n\t\tlet bodyLines: string[];\n\n\t\tif (this.mode === \"runs\") {\n\t\t\tthis.runsRows = this.buildRunsRows();\n\t\t\tthis.runsSelection = this.resolveRunsSelectionIndex(this.runsRows);\n\t\t\t// Tracks the selection by identity from the very first render, not only once the user has\n\t\t\t// pressed an arrow key, so a live run inserted above the selection between renders cannot\n\t\t\t// change what a subsequent `enter` opens.\n\t\t\tif (this.runsSelectionKey === undefined) {\n\t\t\t\tconst row = this.runsRows[this.runsSelection];\n\t\t\t\tthis.runsSelectionKey = row ? runsRowKey(row) : undefined;\n\t\t\t}\n\t\t\tconst liveCount = this.runsRows.filter((row) => row.kind === \"live\").length;\n\t\t\tconst earlierCount = this.runsRows.filter((row) => row.kind === \"earlier\").length;\n\t\t\tconst limiter = this.deps.session.limiter.stats();\n\t\t\ttopTitle = `polyphase · ${liveCount} live · ${earlierCount} earlier · slots ${limiter.active}/${limiter.capacity}`;\n\t\t\ttopRight = keyHint(\"app.polyphase.inspector\", \"close\");\n\t\t\tbodyLines = this.renderRunsBody(innerWidth, bodyHeight);\n\t\t} else if (this.mode === \"run\") {\n\t\t\t// Built once here and threaded through, instead of each of the header and the body methods\n\t\t\t// calling `currentRunSnapshot()`/`currentRunAgents()` again: `snapshotFromRun` runs a regex\n\t\t\t// over every agent's output and hashes the whole details object, so repeating it several\n\t\t\t// times per render on every pump flush is wasted work.\n\t\t\tconst snapshot = this.currentRunSnapshot();\n\t\t\tconst rows = this.sortedAgentsOf(snapshot);\n\t\t\ttopTitle = snapshot ? this.runTitleForHeader(snapshot) : \"run\";\n\t\t\ttopRight = snapshot ? this.runHeaderRight(snapshot) : \"\";\n\t\t\tbodyLines =\n\t\t\t\twidth >= SPLIT_MIN_WIDTH\n\t\t\t\t\t? this.renderSplitBody(innerWidth, bodyHeight, rows)\n\t\t\t\t\t: this.renderRunBody(innerWidth, bodyHeight, snapshot, rows);\n\t\t} else {\n\t\t\tconst snapshot = this.currentRunSnapshot();\n\t\t\tconst rows = this.sortedAgentsOf(snapshot);\n\t\t\tconst row = rows.find((r) => r.i === this.currentAgentIndex);\n\t\t\tconst phaseTitle = row?.phase !== undefined ? snapshot?.phases[row.phase]?.title : undefined;\n\t\t\ttopTitle = row ? `${row.label} · ${row.agentType}${phaseTitle ? ` · ${phaseTitle}` : \"\"}` : \"agent\";\n\t\t\ttopRight = row\n\t\t\t\t? `${statusGlyph(row.status, this.deps.theme, { now: this.now(), animate: false })} ${headerActivityText(row)}${\n\t\t\t\t\t\trow.elapsedMs === undefined ? \"\" : ` ${formatDuration(row.elapsedMs)}`\n\t\t\t\t\t}`\n\t\t\t\t: \"\";\n\t\t\tbodyLines = this.renderAgentDetailBody(this.currentAgentIndex, innerWidth, bodyHeight, rows);\n\t\t}\n\n\t\tconst padded = padLines(bodyLines, bodyHeight);\n\t\treturn [\n\t\t\tborderTop(topTitle, topRight, width),\n\t\t\t...padded.map((line) => sideLine(line, width)),\n\t\t\tborderBottom(width),\n\t\t];\n\t}\n\n\tinvalidate(): void {}\n\n\tdispose(): void {\n\t\tthis.unsubscribe();\n\t}\n\n\tprivate now(): number {\n\t\treturn Date.now();\n\t}\n\n\t// ── Navigation ──────────────────────────────────────────────────────────\n\n\tprivate resolveInitialView(): void {\n\t\tconst initial = this.deps.initial;\n\t\tif (initial.view === \"runs\") {\n\t\t\tthis.mode = \"runs\";\n\t\t\treturn;\n\t\t}\n\t\tif (initial.view === \"run\") {\n\t\t\tthis.mode = \"run\";\n\t\t\tthis.currentRunId = initial.runId;\n\t\t\tthis.selectFirstActiveAgentForCurrentRun();\n\t\t\treturn;\n\t\t}\n\t\tif (initial.view === \"agent\") {\n\t\t\tthis.mode = \"agent\";\n\t\t\tthis.currentRunId = initial.runId;\n\t\t\tthis.currentAgentIndex = initial.agentIndex;\n\t\t\treturn;\n\t\t}\n\t\tconst liveRuns = this.deps.session.store.runs().filter((run) => run.status === \"running\");\n\t\tif (liveRuns.length === 1) {\n\t\t\tthis.mode = \"run\";\n\t\t\tthis.currentRunId = liveRuns[0]?.id;\n\t\t\tthis.selectFirstActiveAgentForCurrentRun();\n\t\t} else {\n\t\t\tthis.mode = \"runs\";\n\t\t}\n\t}\n\n\tprivate selectFirstActiveAgentForCurrentRun(): void {\n\t\tconst rows = this.currentRunAgents();\n\t\tconst idx = rows.findIndex((row) => row.status === \"running\" || row.status === \"starting\");\n\t\tthis.runSelection = idx === -1 ? 0 : idx;\n\t}\n\n\t/** Resolves the runs-view selection by the identity of the previously selected row (its runId or\n\t * saved-workflow name), not its index, so a live update that reorders rows between a render and the\n\t * next key press does not silently select a different run. Falls back to a clamped index when the\n\t * previous row is gone (e.g. an archived run was pruned). */\n\tprivate resolveRunsSelectionIndex(rows: readonly RunsRow[]): number {\n\t\tif (this.runsSelectionKey !== undefined) {\n\t\t\tconst idx = rows.findIndex((row) => runsRowKey(row) === this.runsSelectionKey);\n\t\t\tif (idx !== -1) return idx;\n\t\t}\n\t\treturn clamp(this.runsSelection, 0, Math.max(0, rows.length - 1));\n\t}\n\n\tprivate resetFollowing(): void {\n\t\tthis.following = true;\n\t\tthis.pauseAnchor = undefined;\n\t}\n\n\tprivate isSplitActive(): boolean {\n\t\treturn this.lastRenderWidth >= SPLIT_MIN_WIDTH;\n\t}\n\n\tprivate goBack(): void {\n\t\tif (this.mode === \"agent\") {\n\t\t\tconst rows = this.currentRunAgents();\n\t\t\tconst idx = rows.findIndex((row) => row.i === this.currentAgentIndex);\n\t\t\tif (idx !== -1) this.runSelection = idx;\n\t\t\tthis.mode = \"run\";\n\t\t\tthis.resetFollowing();\n\t\t\treturn;\n\t\t}\n\t\tif (this.mode === \"run\") {\n\t\t\t// Reselects the run the user came from, so the runs view does not fall back to the index it\n\t\t\t// had before drilling in (which may now point at a different row).\n\t\t\tif (this.currentRunId) this.runsSelectionKey = `run:${this.currentRunId}`;\n\t\t\tthis.mode = \"runs\";\n\t\t\tthis.currentRunId = undefined;\n\t\t\treturn;\n\t\t}\n\t\tthis.deps.close();\n\t}\n\n\tprivate confirmSelection(): void {\n\t\tif (this.mode === \"runs\") {\n\t\t\tconst row = this.runsRows[this.runsSelection];\n\t\t\tif (!row) return;\n\t\t\tif (row.kind === \"saved\") {\n\t\t\t\tconst saved = row.saved;\n\t\t\t\tif (!saved) return;\n\t\t\t\tif (!saved.valid) {\n\t\t\t\t\tthis.footerNotice = `/${saved.name} is invalid`;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst command = saved.command ? `/${saved.command.replace(/^\\//, \"\")} ` : `/workflow ${saved.name} `;\n\t\t\t\tthis.deps.insertCommand(command);\n\t\t\t\tthis.deps.close();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (row.runId) {\n\t\t\t\tthis.currentRunId = row.runId;\n\t\t\t\tthis.mode = \"run\";\n\t\t\t\tthis.selectFirstActiveAgentForCurrentRun();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif (this.mode === \"run\") {\n\t\t\tconst rows = this.currentRunAgents();\n\t\t\tconst row = rows[this.runSelection];\n\t\t\tif (!row) return;\n\t\t\tthis.currentAgentIndex = row.i;\n\t\t\tthis.mode = \"agent\";\n\t\t\tthis.resetFollowing();\n\t\t}\n\t}\n\n\tprivate moveSelection(delta: number): void {\n\t\tif (this.mode === \"runs\") {\n\t\t\tif (this.runsRows.length === 0) return;\n\t\t\tthis.runsSelection = clamp(this.runsSelection + delta, 0, this.runsRows.length - 1);\n\t\t\tconst row = this.runsRows[this.runsSelection];\n\t\t\tthis.runsSelectionKey = row ? runsRowKey(row) : undefined;\n\t\t\treturn;\n\t\t}\n\t\tif (this.mode === \"run\") {\n\t\t\tconst rows = this.currentRunAgents();\n\t\t\tif (rows.length === 0) return;\n\t\t\tconst next = clamp(this.runSelection + delta, 0, rows.length - 1);\n\t\t\tif (next !== this.runSelection) {\n\t\t\t\tthis.runSelection = next;\n\t\t\t\tthis.resetFollowing();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tthis.scrollTranscript(delta);\n\t}\n\n\t/** Shared by the agent detail view and, in split view, by page keys on the run view: both drive\n\t * the same `following`/`pauseAnchor` pair against whichever agent is currently shown on the\n\t * right. */\n\tprivate scrollTranscript(delta: number): void {\n\t\tconst total = this.lastTranscriptTotalLines ?? 0;\n\t\tconst ranges = this.lastTranscriptRanges;\n\t\tconst visible = Math.max(1, this.lastDetailBodyHeight ?? 1);\n\t\tconst currentEnd = this.pauseAnchor ? resolvePauseEndLine(this.pauseAnchor, ranges, total) : total;\n\t\tif (delta < 0) {\n\t\t\tif (total <= visible) return;\n\t\t\tconst minEnd = Math.min(total, visible);\n\t\t\tthis.pauseAnchor = anchorAtEndLine(Math.max(minEnd, currentEnd + delta), ranges);\n\t\t\tthis.following = false;\n\t\t} else if (delta > 0 && this.pauseAnchor !== undefined) {\n\t\t\tconst next = Math.min(total, currentEnd + delta);\n\t\t\tif (next >= total) {\n\t\t\t\tthis.pauseAnchor = undefined;\n\t\t\t\tthis.following = true;\n\t\t\t} else {\n\t\t\t\tthis.pauseAnchor = anchorAtEndLine(next, ranges);\n\t\t\t}\n\t\t}\n\t}\n\n\t/** Page keys scroll the right pane in split view (§12.2) instead of moving the left selection by\n\t * a page. Up/down always move the left selection; only page keys are redirected. */\n\tprivate handlePage(direction: 1 | -1): void {\n\t\tif (this.mode === \"run\" && this.isSplitActive()) {\n\t\t\tthis.scrollTranscript(direction * PAGE_SIZE);\n\t\t\treturn;\n\t\t}\n\t\tthis.moveSelection(direction * PAGE_SIZE);\n\t}\n\n\tprivate cycleAgent(direction: 1 | -1): void {\n\t\tif (this.mode === \"run\") {\n\t\t\tconst rows = this.currentRunAgents();\n\t\t\tif (rows.length === 0) return;\n\t\t\tthis.runSelection = (this.runSelection + direction + rows.length) % rows.length;\n\t\t\tthis.resetFollowing();\n\t\t\treturn;\n\t\t}\n\t\tif (this.mode === \"agent\") {\n\t\t\tconst rows = this.currentRunAgents();\n\t\t\tif (rows.length === 0) return;\n\t\t\tconst curIdx = rows.findIndex((row) => row.i === this.currentAgentIndex);\n\t\t\tconst nextIdx = ((curIdx === -1 ? 0 : curIdx) + direction + rows.length) % rows.length;\n\t\t\tthis.currentAgentIndex = rows[nextIdx]?.i;\n\t\t\tthis.resetFollowing();\n\t\t}\n\t}\n\n\tprivate toggleFollow(): void {\n\t\tif (this.mode !== \"agent\" && !(this.mode === \"run\" && this.isSplitActive())) return;\n\t\tif (this.following) {\n\t\t\tconst anchor = anchorAtEndLine(this.lastTranscriptTotalLines ?? 0, this.lastTranscriptRanges);\n\t\t\t// An empty transcript (no ranges yet, or the archived/retention-dropped summary body, which\n\t\t\t// never sets any ranges) has nothing to anchor a pause to. Pressing `f` must stay a no-op\n\t\t\t// then, not flip into a paused state the view can never escape: `scrollTranscript` only\n\t\t\t// resumes following once `pauseAnchor` advances to the end, which it can never do without an\n\t\t\t// anchor.\n\t\t\tif (anchor === undefined) return;\n\t\t\tthis.pauseAnchor = anchor;\n\t\t\tthis.following = false;\n\t\t} else {\n\t\t\tthis.resetFollowing();\n\t\t}\n\t}\n\n\t// ── Two-press cancel (§12.4) ────────────────────────────────────────────\n\n\tprivate handleCancelKey(action: \"cancelAgent\" | \"cancelRun\"): void {\n\t\tconst target = this.cancelTarget(action);\n\t\tif (!target) {\n\t\t\tthis.armed = undefined;\n\t\t\tthis.footerNotice = undefined;\n\t\t\treturn;\n\t\t}\n\t\tconst sameTarget =\n\t\t\tthis.armed?.action === action &&\n\t\t\tthis.armed.runId === target.runId &&\n\t\t\tthis.armed.agentIndex === target.agentIndex;\n\t\tif (sameTarget) {\n\t\t\tthis.armed = undefined;\n\t\t\tthis.footerNotice = undefined;\n\t\t\tif (action === \"cancelAgent\" && target.agentIndex !== undefined) {\n\t\t\t\tthis.deps.session.store.cancelAgent(target.runId, target.agentIndex);\n\t\t\t} else {\n\t\t\t\tthis.deps.session.store.cancelRun(target.runId);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif (target.finished) {\n\t\t\tthis.armed = undefined;\n\t\t\tthis.footerNotice = \"already finished\";\n\t\t\treturn;\n\t\t}\n\t\tthis.armed = { action, runId: target.runId, agentIndex: target.agentIndex };\n\t\tthis.footerNotice =\n\t\t\taction === \"cancelAgent\" ? `press x again to cancel ${target.label}` : \"press X again to cancel the run\";\n\t}\n\n\tprivate cancelTarget(action: \"cancelAgent\" | \"cancelRun\"): CancelTarget | undefined {\n\t\tif (action === \"cancelAgent\") {\n\t\t\tif (this.mode === \"run\") {\n\t\t\t\tconst row = this.currentRunAgents()[this.runSelection];\n\t\t\t\tif (!row || !this.currentRunId) return undefined;\n\t\t\t\treturn {\n\t\t\t\t\trunId: this.currentRunId,\n\t\t\t\t\tagentIndex: row.i,\n\t\t\t\t\tlabel: row.label,\n\t\t\t\t\tfinished: isFinishedAgentStatus(row.status),\n\t\t\t\t};\n\t\t\t}\n\t\t\tif (this.mode === \"agent\") {\n\t\t\t\tconst row = this.currentAgentRow();\n\t\t\t\tif (!row || !this.currentRunId) return undefined;\n\t\t\t\treturn {\n\t\t\t\t\trunId: this.currentRunId,\n\t\t\t\t\tagentIndex: row.i,\n\t\t\t\t\tlabel: row.label,\n\t\t\t\t\tfinished: isFinishedAgentStatus(row.status),\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn undefined;\n\t\t}\n\t\tif (this.mode === \"runs\") {\n\t\t\tconst row = this.runsRows[this.runsSelection];\n\t\t\tif (!row || row.kind === \"saved\" || !row.runId || !row.snapshot) return undefined;\n\t\t\treturn { runId: row.runId, label: row.snapshot.title, finished: row.snapshot.status !== \"running\" };\n\t\t}\n\t\tconst snapshot = this.currentRunSnapshot();\n\t\tif (!snapshot || !this.currentRunId) return undefined;\n\t\treturn { runId: this.currentRunId, label: snapshot.title, finished: snapshot.status !== \"running\" };\n\t}\n\n\t// ── Data access ─────────────────────────────────────────────────────────\n\n\tprivate buildRunsRows(): RunsRow[] {\n\t\tconst store = this.deps.session.store;\n\t\tconst allRuns = store.runs();\n\t\tconst liveRuns = allRuns.filter((run) => run.status === \"running\");\n\t\tconst finishedLive = allRuns.filter((run) => run.status !== \"running\");\n\t\tconst knownIds = new Set([...liveRuns, ...finishedLive].map((run) => run.id));\n\t\tconst archived = this.deps.getArchivedRuns().filter((entry) => !knownIds.has(entry.runId));\n\n\t\tconst rows: RunsRow[] = [];\n\t\tfor (const run of liveRuns) {\n\t\t\trows.push({\n\t\t\t\tkind: \"live\",\n\t\t\t\trunId: run.id,\n\t\t\t\tsnapshot: sanitizeSnapshot(\n\t\t\t\t\tsnapshotFromRun(run, { now: this.now(), tailItems: 0, limiter: this.deps.session.limiter.stats() }),\n\t\t\t\t),\n\t\t\t});\n\t\t}\n\t\tfor (const run of finishedLive) {\n\t\t\trows.push({\n\t\t\t\tkind: \"earlier\",\n\t\t\t\trunId: run.id,\n\t\t\t\tsnapshot: sanitizeSnapshot(snapshotFromRun(run, { now: this.now(), tailItems: 0 })),\n\t\t\t});\n\t\t}\n\t\tfor (const entry of archived) {\n\t\t\trows.push({\n\t\t\t\tkind: \"earlier\",\n\t\t\t\trunId: entry.runId,\n\t\t\t\tsnapshot: sanitizeSnapshot(snapshotFromDetails(entry.details, { now: this.now() })),\n\t\t\t});\n\t\t}\n\t\tfor (const saved of this.deps.getSavedWorkflows()) {\n\t\t\trows.push({ kind: \"saved\", saved });\n\t\t}\n\t\treturn rows;\n\t}\n\n\tprivate currentRunSnapshot(): RunSnapshot | undefined {\n\t\tif (!this.currentRunId) return undefined;\n\t\tconst liveRun = this.deps.session.store.getRun(this.currentRunId);\n\t\tif (liveRun) {\n\t\t\treturn sanitizeSnapshot(\n\t\t\t\tsnapshotFromRun(liveRun, { now: this.now(), tailItems: 0, limiter: this.deps.session.limiter.stats() }),\n\t\t\t);\n\t\t}\n\t\tconst archived = this.deps.getArchivedRuns().find((entry) => entry.runId === this.currentRunId);\n\t\treturn archived ? sanitizeSnapshot(snapshotFromDetails(archived.details, { now: this.now() })) : undefined;\n\t}\n\n\tprivate sortedAgentsOf(snapshot: RunSnapshot | undefined): AgentSnapshotRow[] {\n\t\tif (!snapshot) return [];\n\t\treturn [...snapshot.agents].sort((a, b) => a.i - b.i);\n\t}\n\n\tprivate currentRunAgents(): AgentSnapshotRow[] {\n\t\treturn this.sortedAgentsOf(this.currentRunSnapshot());\n\t}\n\n\tprivate currentAgentRow(): AgentSnapshotRow | undefined {\n\t\tif (this.currentAgentIndex === undefined) return undefined;\n\t\treturn this.currentRunAgents().find((row) => row.i === this.currentAgentIndex);\n\t}\n\n\tprivate currentAgentTranscriptFor(\n\t\tagentIndex: number,\n\t): { items: readonly TranscriptItem[]; dropped: number } | undefined {\n\t\tif (!this.currentRunId) return undefined;\n\t\tconst run = this.deps.session.store.getRun(this.currentRunId);\n\t\tconst agent = run?.agents[agentIndex];\n\t\t// Retention drops every agent's transcript on a finished run once it falls past\n\t\t// `keepTranscriptRuns`; `undefined` here sends the caller to the archived-style summary body\n\t\t// (status, output, error, the \"only kept while in memory\" note) instead of an empty transcript.\n\t\tif (!run || !agent || run.transcriptsDropped) return undefined;\n\t\treturn { items: agent.state.transcript, dropped: agent.state.droppedItems };\n\t}\n\n\t// ── Rendering ───────────────────────────────────────────────────────────\n\n\tprivate formatRunsRow(row: RunsRow, width: number, selected: boolean): string {\n\t\tconst cursor = selected ? \"› \" : \" \";\n\t\tif (row.kind === \"saved\" && row.saved) {\n\t\t\tconst saved = row.saved;\n\t\t\t// `name`/`description` come from the saved script's own meta block (`workflow/meta.ts`), the\n\t\t\t// same kind of script-supplied text `sanitizeSnapshot` cleans for live/archived runs.\n\t\t\tconst nameText = `${cursor}/${sanitizeChildText(saved.name)}`;\n\t\t\treturn columns(\n\t\t\t\t[\n\t\t\t\t\t{ text: saved.valid ? nameText : this.deps.theme.fg(\"error\", `${nameText} invalid`), width: 18 },\n\t\t\t\t\t{ text: sanitizeChildText(saved.description), width: \"flex\" },\n\t\t\t\t\t{ text: savedWorkflowSourceLabel(saved.source), width: 4, align: \"right\" },\n\t\t\t\t],\n\t\t\t\twidth,\n\t\t\t);\n\t\t}\n\t\tconst snapshot = row.snapshot;\n\t\tif (!snapshot) return fitLine(`${cursor}?`, width);\n\t\tconst glyph = statusGlyph(snapshot.status, this.deps.theme, { now: this.now(), animate: false });\n\t\tconst optional = runsRowOptionalWidths(width);\n\t\t// The cursor, glyph and title are fixed/flex cells ahead of every optional column, so they\n\t\t// always render, even at widths where every optional column below has been dropped.\n\t\tconst cells: ColumnCell[] = [\n\t\t\t{ text: `${cursor}${glyph}`, width: RUNS_ROW_CURSOR_WIDTH },\n\t\t\t{ text: runTitleText(snapshot), width: \"flex\" },\n\t\t];\n\t\tif (optional.subtitle > 0) cells.push({ text: runSubtitleText(snapshot), width: optional.subtitle });\n\t\tif (optional.counts > 0) {\n\t\t\tcells.push({ text: formatCounts(this.deps.theme, this.now(), snapshot.counts), width: optional.counts });\n\t\t}\n\t\tif (optional.duration > 0) {\n\t\t\tcells.push({ text: formatDuration(snapshot.elapsedMs), width: optional.duration, align: \"right\" });\n\t\t}\n\t\tif (optional.tokens > 0) {\n\t\t\tcells.push({\n\t\t\t\ttext: snapshot.tokens > 0 ? formatTokens(snapshot.tokens) : \"\",\n\t\t\t\twidth: optional.tokens,\n\t\t\t\talign: \"right\",\n\t\t\t});\n\t\t}\n\t\tif (optional.cost > 0) cells.push({ text: formatCost(snapshot.cost), width: optional.cost, align: \"right\" });\n\t\treturn columns(cells, width);\n\t}\n\n\tprivate renderRunsBody(width: number, height: number): string[] {\n\t\tconst rows = this.runsRows;\n\t\tconst lines: string[] = [];\n\t\tconst lineForRow: number[] = [];\n\t\tlet lastKind: RunsRow[\"kind\"] | undefined;\n\t\trows.forEach((row, idx) => {\n\t\t\tif (row.kind !== lastKind) {\n\t\t\t\tlines.push(this.deps.theme.bold(groupLabel(row.kind)));\n\t\t\t\tlastKind = row.kind;\n\t\t\t}\n\t\t\tlineForRow[idx] = lines.length;\n\t\t\tlines.push(this.formatRunsRow(row, width, idx === this.runsSelection));\n\t\t});\n\t\tif (rows.length === 0) {\n\t\t\tlines.push('No agents yet. Put \"polyphase\" in a prompt or run /workflow <name>.');\n\t\t}\n\t\tconst pivot = lineForRow[this.runsSelection] ?? 0;\n\t\tconst contentHeight = Math.max(1, height - 1);\n\t\tconst windowed = padLines(windowAround(lines, contentHeight, pivot, this.deps.theme), contentHeight);\n\t\treturn [...windowed, this.footerLine(this.runsHintLine(), width)];\n\t}\n\n\tprivate formatAgentRow(row: AgentSnapshotRow, width: number, selected: boolean): string {\n\t\tconst cursor = selected ? \"› \" : \" \";\n\t\tconst glyph = statusGlyph(row.status, this.deps.theme, { now: this.now(), animate: false });\n\t\tconst model = formatModelLabel(row, { withProvider: false });\n\t\tconst cells: ColumnCell[] = [\n\t\t\t{ text: `${cursor}${glyph} ${row.label}`, width: 18 },\n\t\t\t{ text: model, width: 20 },\n\t\t];\n\t\t// Dropped below 60 columns, the same threshold `layoutRun` uses for its elapsed column: at\n\t\t// the 40-column split-pane width there is no room for a 5th fixed cell ahead of the flex one.\n\t\tif (width >= 60) {\n\t\t\tcells.push({\n\t\t\t\ttext: row.elapsedMs === undefined ? \"\" : formatDuration(row.elapsedMs),\n\t\t\t\twidth: 5,\n\t\t\t\talign: \"right\",\n\t\t\t});\n\t\t}\n\t\tcells.push({ text: agentRowRightText(row, this.showThinking), width: \"flex\" });\n\t\treturn columns(cells, width);\n\t}\n\n\tprivate runTitleForHeader(snapshot: RunSnapshot): string {\n\t\tconst base = runTitleText(snapshot);\n\t\tif (snapshot.kind === \"workflow\" && isCurrentlyPhased(snapshot.status) && snapshot.currentPhase !== undefined) {\n\t\t\tconst phase = snapshot.phases[snapshot.currentPhase];\n\t\t\tif (phase) return `${base} ▸ ${phase.title}`;\n\t\t}\n\t\treturn base;\n\t}\n\n\tprivate runHeaderRight(snapshot: RunSnapshot): string {\n\t\tconst parts = [formatCounts(this.deps.theme, this.now(), snapshot.counts), formatDuration(snapshot.elapsedMs)];\n\t\tif (snapshot.tokens > 0) parts.push(formatTokens(snapshot.tokens));\n\t\tconst cost = formatCost(snapshot.cost);\n\t\tif (cost) parts.push(cost);\n\t\treturn parts.filter((part) => part.length > 0).join(\" \");\n\t}\n\n\tprivate renderRunBody(\n\t\twidth: number,\n\t\theight: number,\n\t\tsnapshot: RunSnapshot | undefined,\n\t\trows: AgentSnapshotRow[],\n\t): string[] {\n\t\tif (!snapshot) return [this.deps.theme.fg(\"muted\", \"run not found\")];\n\t\tthis.runSelection = clamp(this.runSelection, 0, Math.max(0, rows.length - 1));\n\n\t\tconst lines: string[] = [];\n\t\tconst lineForAgent: number[] = [];\n\t\tif (snapshot.phases.length > 0) {\n\t\t\t// Agents spawned before any phase()/agent({phase}) call (§13.3) carry no phase index; they\n\t\t\t// are still selectable, so they get an ungrouped block ahead of the phase list instead of\n\t\t\t// being silently dropped from the view.\n\t\t\trows.forEach((row, idx) => {\n\t\t\t\tif (row.phase !== undefined) return;\n\t\t\t\tlineForAgent[idx] = lines.length;\n\t\t\t\tlines.push(this.formatAgentRow(row, width, idx === this.runSelection));\n\t\t\t});\n\t\t\tfor (const phase of snapshot.phases) {\n\t\t\t\tlines.push(\n\t\t\t\t\tcolumns(\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttext: `${statusGlyph(phase.status, this.deps.theme, { now: this.now(), animate: false })} ${phase.index + 1} ${phase.title}`,\n\t\t\t\t\t\t\t\twidth: \"flex\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{ text: `${phase.done}/${phase.total}`, width: 7, align: \"right\" },\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttext: phase.elapsedMs === undefined ? \"\" : formatDuration(phase.elapsedMs),\n\t\t\t\t\t\t\t\twidth: 7,\n\t\t\t\t\t\t\t\talign: \"right\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t\twidth,\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\trows.forEach((row, idx) => {\n\t\t\t\t\tif (row.phase !== phase.index) return;\n\t\t\t\t\tlineForAgent[idx] = lines.length;\n\t\t\t\t\tlines.push(` ${this.formatAgentRow(row, Math.max(1, width - 4), idx === this.runSelection)}`);\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\trows.forEach((row, idx) => {\n\t\t\t\tlineForAgent[idx] = lines.length;\n\t\t\t\tconst prefix = row.step !== undefined ? `${row.step} ` : \"\";\n\t\t\t\tlines.push(\n\t\t\t\t\t`${prefix}${this.formatAgentRow(row, Math.max(1, width - prefix.length), idx === this.runSelection)}`,\n\t\t\t\t);\n\t\t\t});\n\t\t}\n\t\tif (snapshot.log.length > 0) {\n\t\t\tlines.push(`» ${oneLine(sanitizeForDisplay(snapshot.log[snapshot.log.length - 1] ?? \"\"))}`);\n\t\t} else if (snapshot.resultPreview && snapshot.status !== \"running\") {\n\t\t\tlines.push(`→ ${oneLine(sanitizeForDisplay(snapshot.resultPreview))}`);\n\t\t}\n\n\t\tconst pivot = lineForAgent[this.runSelection] ?? 0;\n\t\tconst contentHeight = Math.max(1, height - 1);\n\t\tconst windowed = padLines(windowAround(lines, contentHeight, pivot, this.deps.theme), contentHeight);\n\t\treturn [...windowed, this.footerLine(this.runHintLine(), width)];\n\t}\n\n\tprivate renderSplitBody(width: number, height: number, rows: AgentSnapshotRow[]): string[] {\n\t\tconst rightWidth = Math.max(1, width - SPLIT_LEFT_WIDTH - 1);\n\t\tthis.runSelection = clamp(this.runSelection, 0, Math.max(0, rows.length - 1));\n\t\tconst leftLines = rows.map((row, idx) =>\n\t\t\tfitLine(this.formatAgentRow(row, SPLIT_LEFT_WIDTH, idx === this.runSelection), SPLIT_LEFT_WIDTH),\n\t\t);\n\t\tconst selectedAgentIndex = rows[this.runSelection]?.i;\n\t\tconst rightLines = this.renderAgentDetailBody(selectedAgentIndex, rightWidth, height, rows);\n\t\t// Windowed the same way `renderRunBody` windows the flat agent list, so a run with more agents\n\t\t// than the pane has rows keeps the `›` cursor on screen instead of scrolling it off the top.\n\t\tconst paddedLeft = padLines(windowAround(leftLines, height, this.runSelection, this.deps.theme), height);\n\t\tconst paddedRight = padLines(rightLines, height);\n\t\treturn paddedLeft.map((line, idx) => `${padToWidth(line, SPLIT_LEFT_WIDTH)}│${paddedRight[idx] ?? \"\"}`);\n\t}\n\n\tprivate renderAgentDetailBody(\n\t\tagentIndex: number | undefined,\n\t\twidth: number,\n\t\theight: number,\n\t\trows: AgentSnapshotRow[],\n\t): string[] {\n\t\tconst footerFallback = this.agentHintLine();\n\t\tconst contentHeight = Math.max(1, height - 1);\n\t\tif (agentIndex === undefined) {\n\t\t\treturn [\n\t\t\t\t...padLines([this.deps.theme.fg(\"muted\", \"no agent selected\")], contentHeight),\n\t\t\t\tthis.footerLine(footerFallback, width),\n\t\t\t];\n\t\t}\n\t\tconst row = rows.find((r) => r.i === agentIndex);\n\t\tif (!row) {\n\t\t\treturn [\n\t\t\t\t...padLines([this.deps.theme.fg(\"muted\", \"agent not found\")], contentHeight),\n\t\t\t\tthis.footerLine(footerFallback, width),\n\t\t\t];\n\t\t}\n\n\t\tconst header: string[] = [];\n\t\tconst modelLabel = formatModelLabel(row, { withProvider: true, withSource: true });\n\t\tconst confirmText = row.modelConfirmed ? \"confirmed\" : \"unconfirmed\";\n\t\tconst tokensText = row.tokens > 0 ? ` · ${formatTokens(row.tokens)} tok` : \"\";\n\t\tconst costText = row.cost > 0 ? ` · ${formatCost(row.cost)}` : \"\";\n\t\tconst turnsText = `${row.turns} turn${row.turns === 1 ? \"\" : \"s\"}`;\n\t\tconst toolsText = `${row.toolCalls} tool${row.toolCalls === 1 ? \"\" : \"s\"}`;\n\t\theader.push(oneLine(`${modelLabel} · ${confirmText} · ${turnsText} · ${toolsText}${tokensText}${costText}`));\n\t\theader.push(`task ${oneLine(row.task)}`);\n\t\theader.push(\"─\".repeat(Math.max(0, width)));\n\n\t\tconst footer = this.footerLine(this.agentHintLine(row.status), width);\n\t\tconst transcript = this.currentAgentTranscriptFor(agentIndex);\n\t\tif (!transcript) {\n\t\t\tconst OUTPUT_PREVIEW_MAX_LINES = 8;\n\t\t\tlet statusLines = row.statusLine ? 1 : 0;\n\t\t\tlet errorLines = row.error ? 1 : 0;\n\t\t\tconst noteLines = 1;\n\t\t\t// The note explains why the transcript is gone, so it must survive trimming even at the\n\t\t\t// smallest supported height: reserve header + note first, then drop error, then status,\n\t\t\t// before giving any remaining budget to the output preview. `padLines` below only pads or\n\t\t\t// truncates from the end, so whatever we build here must already fit `contentHeight`.\n\t\t\tif (header.length + statusLines + errorLines + noteLines > contentHeight && errorLines > 0) {\n\t\t\t\terrorLines = 0;\n\t\t\t}\n\t\t\tif (header.length + statusLines + errorLines + noteLines > contentHeight && statusLines > 0) {\n\t\t\t\tstatusLines = 0;\n\t\t\t}\n\t\t\tconst outputBudget = row.output\n\t\t\t\t? Math.max(0, contentHeight - header.length - statusLines - errorLines - noteLines - 1)\n\t\t\t\t: 0;\n\t\t\tconst body = [...header];\n\t\t\tif (statusLines > 0 && row.statusLine) {\n\t\t\t\tbody.push(fitLine(`status ${oneLine(sanitizeForDisplay(row.statusLine))}`, width));\n\t\t\t}\n\t\t\tif (row.output && outputBudget > 0) {\n\t\t\t\tbody.push(\"output\");\n\t\t\t\tbody.push(\n\t\t\t\t\t...wrapTextWithAnsi(sanitizeForDisplay(row.output), Math.max(1, width - 2))\n\t\t\t\t\t\t.slice(0, Math.min(OUTPUT_PREVIEW_MAX_LINES, outputBudget))\n\t\t\t\t\t\t.map((line) => fitLine(` ${line}`, width)),\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (errorLines > 0 && row.error) body.push(fitLine(`error ${oneLine(sanitizeForDisplay(row.error))}`, width));\n\t\t\tbody.push(this.deps.theme.fg(\"muted\", \"Live transcript is only kept while the run is in memory.\"));\n\t\t\tthis.lastTranscriptTotalLines = undefined;\n\t\t\tthis.lastTranscriptRanges = [];\n\t\t\tthis.lastDetailBodyHeight = undefined;\n\t\t\treturn [...padLines(body, contentHeight), footer];\n\t\t}\n\n\t\tconst owner = `${this.currentRunId}:${agentIndex}`;\n\t\tconst transcriptLines = this.transcriptCache.linesFor(owner, transcript.items, transcript.dropped, {\n\t\t\twidth,\n\t\t\tshowThinking: this.showThinking,\n\t\t\tshowToolPreviews: this.showToolPreviews,\n\t\t\tnow: this.now(),\n\t\t});\n\t\tconst tail = tailWindowOf(transcriptLines);\n\t\tthis.lastTranscriptTotalLines = tail.totalLines;\n\t\tthis.lastTranscriptRanges = this.transcriptCache.lineRanges();\n\t\t// A finished or cancelled agent has nothing left to follow or pause: the indicator row only\n\t\t// makes sense while the agent could still produce more output.\n\t\tconst showFollowLine = !isFinishedAgentStatus(row.status);\n\t\tconst transcriptRows = Math.max(1, contentHeight - header.length - (showFollowLine ? 1 : 0));\n\t\tthis.lastDetailBodyHeight = transcriptRows;\n\t\tconst pinnedEndLine = this.pauseAnchor\n\t\t\t? resolvePauseEndLine(this.pauseAnchor, this.lastTranscriptRanges, tail.totalLines)\n\t\t\t: undefined;\n\t\tconst offsetFromEnd = this.following ? 0 : Math.max(0, tail.totalLines - (pinnedEndLine ?? tail.totalLines));\n\t\tconst windowLines = padLines(tail.window(transcriptRows, offsetFromEnd), transcriptRows);\n\t\tconst followLine = showFollowLine\n\t\t\t? [fitLine(this.following ? \"◆ following\" : \"‖ paused · f to follow\", width)]\n\t\t\t: [];\n\t\tconst body = [...header, ...windowLines, ...followLine];\n\t\treturn [...padLines(body, contentHeight), footer];\n\t}\n\n\t/** `width` is the same inner width the caller laid its body out to, so a hint line that does not\n\t * fit is ellipsised like every other row instead of being hard-cut by `sideLine`'s padding,\n\t * which carries no ellipsis of its own. */\n\tprivate footerLine(hint: string, width: number): string {\n\t\treturn fitLine(this.footerNotice ? this.deps.theme.fg(\"warning\", this.footerNotice) : hint, width);\n\t}\n\n\tprivate runsHintLine(): string {\n\t\treturn [\n\t\t\tcombinedKeyHint([\"tui.select.up\", \"tui.select.down\"], \"select\"),\n\t\t\tkeyHint(\"tui.select.confirm\", \"open\"),\n\t\t\tkeyHint(\"app.polyphase.cancelRun\", \"cancel run\"),\n\t\t\tkeyHint(\"tui.select.cancel\", \"close\"),\n\t\t].join(\" \");\n\t}\n\n\tprivate runHintLine(): string {\n\t\treturn [\n\t\t\tcombinedKeyHint([\"tui.select.up\", \"tui.select.down\"], \"select\"),\n\t\t\tkeyHint(\"tui.select.confirm\", \"follow\"),\n\t\t\tkeyHint(\"app.polyphase.cancelAgent\", \"cancel agent\"),\n\t\t\tkeyHint(\"app.polyphase.cancelRun\", \"cancel run\"),\n\t\t\tkeyHint(\"tui.select.cancel\", \"back\"),\n\t\t].join(\" \");\n\t}\n\n\tprivate agentHintLine(status?: AgentStatus): string {\n\t\tconst finished = status !== undefined && isFinishedAgentStatus(status);\n\t\treturn [\n\t\t\tkeyHint(\"app.polyphase.nextAgent\", \"next agent\"),\n\t\t\t...(finished ? [] : [keyHint(\"app.polyphase.follow\", \"follow\")]),\n\t\t\tkeyHint(\"app.thinking.toggle\", \"thinking\"),\n\t\t\t...(finished ? [] : [keyHint(\"app.polyphase.cancelAgent\", \"cancel\")]),\n\t\t\tkeyHint(\"tui.select.cancel\", \"back\"),\n\t\t].join(\" \");\n\t}\n}\n"]}
1
+ {"version":3,"file":"inspector.js","sourceRoot":"","sources":["../../../../src/core/polyphase/ui/inspector.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,2DAA2D,CAAC;AAGrG,OAAO,EAEN,OAAO,EACP,OAAO,EACP,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,OAAO,EACP,UAAU,EACV,WAAW,EACX,WAAW,GACX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAA2C,mBAAmB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAItH,OAAO,EACN,kBAAkB,EAClB,mBAAmB,EAEnB,YAAY,GACZ,MAAM,wBAAwB,CAAC;AAqBhC,MAAM,SAAS,GAAG,EAAE,CAAC;AACrB,MAAM,eAAe,GAAG,GAAG,CAAC;AAC5B,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAkB5B,SAAS,KAAK,CAAC,CAAS,EAAE,GAAW,EAAE,GAAW;IACjD,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;AACxC,CAAC;AAED;;;+FAG+F;AAC/F,SAAS,YAAY,CAAC,KAAwB,EAAE,MAAc,EAAE,KAAa,EAAE,KAAY;IAC1F,IAAI,KAAK,CAAC,MAAM,IAAI,MAAM;QAAE,OAAO,KAAK,CAAC;IACzC,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI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AEO,SAAS;QAChB,OAAO;YACN,eAAe,CAAC,CAAC,eAAe,EAAE,iBAAiB,CAAC,EAAE,QAAQ,CAAC;YAC/D,OAAO,CAAC,oBAAoB,EAAE,MAAM,CAAC;YACrC,OAAO,CAAC,yBAAyB,EAAE,YAAY,CAAC;YAChD,OAAO,CAAC,mBAAmB,EAAE,OAAO,CAAC;SACrC,CAAC;IACH,CAAC;IAEO,QAAQ;QACf,OAAO;YACN,eAAe,CAAC,CAAC,eAAe,EAAE,iBAAiB,CAAC,EAAE,QAAQ,CAAC;YAC/D,OAAO,CAAC,oBAAoB,EAAE,QAAQ,CAAC;YACvC,OAAO,CAAC,2BAA2B,EAAE,cAAc,CAAC;YACpD,OAAO,CAAC,yBAAyB,EAAE,YAAY,CAAC;YAChD,OAAO,CAAC,mBAAmB,EAAE,MAAM,CAAC;SACpC,CAAC;IACH,CAAC;IAEO,UAAU,CAAC,MAAoB;QACtC,MAAM,QAAQ,GAAG,MAAM,KAAK,SAAS,IAAI,qBAAqB,CAAC,MAAM,CAAC,CAAC;QACvE,OAAO;YACN,OAAO,CAAC,yBAAyB,EAAE,YAAY,CAAC;YAChD,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,sBAAsB,EAAE,QAAQ,CAAC,CAAC,CAAC;YAChE,OAAO,CAAC,qBAAqB,EAAE,UAAU,CAAC;YAC1C,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,2BAA2B,EAAE,QAAQ,CAAC,CAAC,CAAC;YACrE,OAAO,CAAC,mBAAmB,EAAE,MAAM,CAAC;SACpC,CAAC;IACH,CAAC;CACD","sourcesContent":["/**\n * `PolyphaseInspector`: the `alt+a` popup overlay listing runs and following an agent's live\n * transcript. See DESIGN.md §12.1-12.6, §12.8.\n */\n\nimport type { Component, Focusable, KeybindingsManager, TUI } from \"@draht/tui\";\nimport { visibleWidth, wrapTextWithAnsi } from \"@draht/tui\";\nimport { combinedKeyHint, keyHint } from \"../../../modes/interactive/components/keybinding-hints.ts\";\nimport type { Theme } from \"../../../modes/interactive/theme/theme.ts\";\nimport type { ArchivedRun } from \"../details.ts\";\nimport {\n\ttype ColumnCell,\n\tcolumns,\n\tfitLine,\n\tformatCost,\n\tformatDuration,\n\tformatModelLabel,\n\tformatTokens,\n\toneLine,\n\tpadToWidth,\n\tprogressBar,\n\tstatusGlyph,\n} from \"../render/format.ts\";\nimport { sanitizeChildText, sanitizeSnapshot } from \"../render/run-block.ts\";\nimport { type AgentSnapshotRow, type RunSnapshot, snapshotFromDetails, snapshotFromRun } from \"../render/snapshot.ts\";\nimport type { PolyphaseSession } from \"../session.ts\";\nimport type { AgentStatus, TranscriptItem } from \"../types.ts\";\nimport type { SavedWorkflowSummary } from \"../workflow/saved.ts\";\nimport {\n\tsanitizeForDisplay,\n\tTranscriptLineCache,\n\ttype TranscriptLineRange,\n\ttailWindowOf,\n} from \"./transcript-layout.ts\";\n\nexport type InspectorInitialView =\n\t| { view: \"auto\" }\n\t| { view: \"runs\" }\n\t| { view: \"run\"; runId: string }\n\t| { view: \"agent\"; runId: string; agentIndex: number };\n\nexport interface InspectorDeps {\n\tsession: PolyphaseSession;\n\ttui: TUI;\n\ttheme: Theme;\n\tkeybindings: KeybindingsManager;\n\tgetArchivedRuns(): readonly ArchivedRun[];\n\tgetSavedWorkflows(): readonly SavedWorkflowSummary[];\n\tinitial: InspectorInitialView;\n\tshowThinking: boolean;\n\tclose(): void;\n\tinsertCommand(text: string): void;\n}\n\nconst PAGE_SIZE = 10;\nconst SPLIT_MIN_WIDTH = 120;\nconst SPLIT_LEFT_WIDTH = 40;\n\ntype ViewMode = \"runs\" | \"run\" | \"agent\";\n\ninterface RunsRow {\n\tkind: \"live\" | \"earlier\" | \"saved\";\n\trunId?: string;\n\tsnapshot?: RunSnapshot;\n\tsaved?: SavedWorkflowSummary;\n}\n\ninterface CancelTarget {\n\trunId: string;\n\tagentIndex?: number;\n\tlabel: string;\n\tfinished: boolean;\n}\n\nfunction clamp(n: number, min: number, max: number): number {\n\treturn Math.min(max, Math.max(min, n));\n}\n\n/** Slices `lines` to `height` rows centred on `pivot`, replacing the first/last visible row with\n * a muted \"N more\" marker when the window hides rows above/below. The window is always centred on\n * `pivot` (clamped only at the list's edges), so `pivot` lands on an edge row of the window only\n * when that edge has nothing hidden past it — the marker never overwrites the selected row. */\nfunction windowAround(lines: readonly string[], height: number, pivot: number, theme: Theme): readonly string[] {\n\tif (lines.length <= height) return lines;\n\tconst start = Math.max(0, Math.min(pivot - Math.floor(height / 2), lines.length - height));\n\tconst end = start + height;\n\tconst windowed = lines.slice(start, end);\n\tif (height < 2) return windowed;\n\tconst pivotOffset = pivot - start;\n\tconst marked = windowed.slice();\n\tif (start > 0 && pivotOffset !== 0) {\n\t\tmarked[0] = theme.fg(\"muted\", `↑ ${start} more`);\n\t}\n\tif (end < lines.length && pivotOffset !== marked.length - 1) {\n\t\tmarked[marked.length - 1] = theme.fg(\"muted\", `↓ ${lines.length - end} more`);\n\t}\n\treturn marked;\n}\n\nfunction padLines(lines: readonly string[], height: number): string[] {\n\tif (lines.length >= height) return lines.slice(0, height);\n\treturn [...lines, ...Array.from({ length: height - lines.length }, () => \"\")];\n}\n\ninterface PauseAnchor {\n\tseq: number;\n\tlineInItem: number;\n}\n\n/** Resolves a pause anchor back to an absolute window-end line (exclusive), against the item line\n * ranges from the most recent render. If the anchored item was evicted, clamps to just past the\n * first still-kept item instead of drifting the view forward by the wrong amount. */\nfunction resolvePauseEndLine(anchor: PauseAnchor, ranges: readonly TranscriptLineRange[], totalLines: number): number {\n\tconst range = ranges.find((r) => r.seq === anchor.seq);\n\tif (range) return clamp(range.start + anchor.lineInItem + 1, 0, totalLines);\n\tconst first = ranges[0];\n\treturn first ? clamp(first.start + 1, 0, totalLines) : 0;\n}\n\n/** Converts an absolute window-end line (exclusive) into a pause anchor on whichever item renders\n * that line, so the anchor survives evictions that shift line numbers. */\nfunction anchorAtEndLine(endLine: number, ranges: readonly TranscriptLineRange[]): PauseAnchor | undefined {\n\tconst lastVisibleLine = endLine - 1;\n\tfor (const range of ranges) {\n\t\tif (lastVisibleLine >= range.start && lastVisibleLine < range.end) {\n\t\t\treturn { seq: range.seq, lineInItem: lastVisibleLine - range.start };\n\t\t}\n\t}\n\tconst last = ranges[ranges.length - 1];\n\treturn last ? { seq: last.seq, lineInItem: Math.max(0, last.end - last.start - 1) } : undefined;\n}\n\n/** Truncates the title (never the right segment or the closing corner) so the border always stays\n * closed, instead of handing the whole assembled string to `fitLine` and letting it cut off\n * whichever happens to sit at the end. */\nfunction borderTop(title: string, right: string, width: number): string {\n\tconst inner = Math.max(0, width - 2);\n\tlet rightSeg = right ? ` ${right} ` : \"\";\n\tlet rightWidth = visibleWidth(rightSeg);\n\tif (rightWidth > inner) {\n\t\trightSeg = \"\";\n\t\trightWidth = 0;\n\t}\n\tconst minDashes = 1;\n\tconst titleBudget = Math.max(0, inner - rightWidth - minDashes);\n\tconst titleSeg = fitLine(` ${title} `, titleBudget);\n\tconst dashes = Math.max(0, inner - visibleWidth(titleSeg) - rightWidth);\n\treturn `┌${titleSeg}${\"─\".repeat(dashes)}${rightSeg}┐`;\n}\n\nfunction borderBottom(width: number): string {\n\treturn fitLine(`└${\"─\".repeat(Math.max(0, width - 2))}┘`, width);\n}\n\nfunction sideLine(content: string, width: number): string {\n\tconst inner = Math.max(0, width - 4);\n\treturn fitLine(`│ ${padToWidth(content, inner)} │`, width);\n}\n\nfunction runsRowKey(row: RunsRow): string {\n\tif (row.kind === \"saved\") return `saved:${row.saved?.name ?? \"\"}`;\n\treturn `run:${row.runId ?? \"\"}`;\n}\n\nfunction groupLabel(kind: RunsRow[\"kind\"]): string {\n\tswitch (kind) {\n\t\tcase \"live\":\n\t\t\treturn \"Live\";\n\t\tcase \"earlier\":\n\t\t\treturn \"Earlier in this session\";\n\t\tcase \"saved\":\n\t\t\treturn \"Saved workflows\";\n\t}\n}\n\n/** Drops a trailing agent-count suffix (e.g. \"subagent parallel · 2 agents\"): `runSubtitleText`\n * is the single place that shows the count, so the title must not repeat it. */\nconst TRAILING_AGENT_COUNT = / · \\d+ agents?$/;\n\n/** The phase marker is only meaningful while the run is still progressing through phases; a\n * finished or cancelled run has no \"current\" phase left, so showing one would misread as still\n * running. */\nfunction isCurrentlyPhased(status: RunSnapshot[\"status\"]): boolean {\n\treturn status === \"running\";\n}\n\nfunction runTitleText(snapshot: RunSnapshot): string {\n\tif (snapshot.kind === \"workflow\") return `workflow ${snapshot.workflow?.name ?? snapshot.title}`;\n\tif (snapshot.kind === \"duet\") return `duet · ${snapshot.title}`;\n\treturn snapshot.title.replace(TRAILING_AGENT_COUNT, \"\");\n}\n\nfunction runSubtitleText(snapshot: RunSnapshot): string {\n\tif (snapshot.kind === \"workflow\") {\n\t\tconst phase =\n\t\t\tisCurrentlyPhased(snapshot.status) && snapshot.currentPhase !== undefined\n\t\t\t\t? snapshot.phases[snapshot.currentPhase]\n\t\t\t\t: undefined;\n\t\tif (phase) return `▸ ${phase.title}`;\n\t\tconst n = snapshot.phases.length;\n\t\treturn n > 0 ? `${n} phase${n === 1 ? \"\" : \"s\"}` : \"\";\n\t}\n\tconst n = snapshot.agents.length;\n\treturn `${n} agent${n === 1 ? \"\" : \"s\"}`;\n}\n\n/** `› ` (or ` `) + glyph, always a fixed-width cell outside the title's flex cell: the cursor and\n * status glyph must stay visible even when nothing else does. `columns()`'s own 1-column gap\n * supplies the separator space before the title, matching `› ● label` elsewhere in this file. */\nconst RUNS_ROW_CURSOR_WIDTH = 3;\n/** Cap for the runs view's widened counts cell, so it never squeezes the title to nothing. */\nconst RUNS_COUNTS_MAX_WIDTH = 20;\n\nfunction savedWorkflowSourceLabel(source: SavedWorkflowSummary[\"source\"]): string {\n\treturn source === \"project\" ? \"proj\" : \"user\";\n}\n\n/** Drops or shrinks the runs-view row's optional columns as `width` decreases, in order of least\n * useful first (tokens, then cost, then the subtitle, then counts and duration), so the title (the\n * flex cell) keeps a usable share of the row instead of being squeezed to nothing by fixed columns\n * that no longer fit. */\nfunction runsRowOptionalWidths(width: number): {\n\tsubtitle: number;\n\tcounts: number;\n\tduration: number;\n\ttokens: number;\n\tcost: number;\n} {\n\treturn {\n\t\tsubtitle: width >= 80 ? 16 : width >= 60 ? 10 : 0,\n\t\tcounts: width >= 56 ? 10 : 0,\n\t\tduration: width >= 50 ? 7 : 0,\n\t\ttokens: width >= 70 ? 6 : 0,\n\t\tcost: width >= 60 ? 7 : 0,\n\t};\n}\n\n/** The agent detail header's right side (§12.2: `◐ thinking 0:41`) shows only the current activity\n * keyword, not `row.now`'s full content: `row.now` for a thinking/writing agent is `\"thinking · <the\n * actual text>\"`, and showing that verbatim in the border would leak hidden-thinking content past the\n * `app.thinking.toggle` gate that otherwise hides it in the transcript below. */\nfunction headerActivityText(row: AgentSnapshotRow): string {\n\tconst now = row.now ? oneLine(sanitizeForDisplay(row.now)) : undefined;\n\tif (!now) return row.status;\n\tconst separator = now.indexOf(\" · \");\n\treturn separator === -1 ? now : now.slice(0, separator);\n}\n\n/** Mirrors `headerActivityText`'s thinking-keyword cut: the run view's agent list and the split\n * view's left pane must not leak hidden thinking content into the \"now\" column either (§12.2 shows\n * just `thinking` there), even though the same column shows the activity in full once thinking is\n * visible. */\nfunction agentRowRightText(row: AgentSnapshotRow, showThinking: boolean): string {\n\tif (row.now) {\n\t\tconst now = oneLine(sanitizeForDisplay(row.now));\n\t\t// \"thinking\" is the only `computeNowLine()` activity word that can be followed by child-written\n\t\t// text; checking the prefix (not the full `\"thinking · \"` separator) also catches the edge case\n\t\t// where the thinking block is still empty and `oneLine()` has trimmed the trailing separator.\n\t\tif (!showThinking && now.startsWith(\"thinking\")) return \"thinking\";\n\t\treturn now;\n\t}\n\tif (row.statusLine) return oneLine(sanitizeForDisplay(row.statusLine));\n\tif (row.error) return oneLine(sanitizeForDisplay(row.error));\n\tswitch (row.status) {\n\t\tcase \"queued\":\n\t\t\treturn \"queued\";\n\t\tcase \"pending\":\n\t\t\treturn row.step !== undefined && row.step > 1 ? `waits for step ${row.step - 1}` : \"not run\";\n\t\tcase \"skipped\":\n\t\t\treturn \"not run\";\n\t\tcase \"cancelled\":\n\t\t\treturn row.cancelReason === \"time\" ? \"cancelled (time limit)\" : \"cancelled\";\n\t\tcase \"done\":\n\t\t\t// A finished agent with no `now` and no `STATUS:` line still has output worth showing\n\t\t\t// (§11.3's tool-row fallback does the same): the first line beats a blank column.\n\t\t\treturn row.output ? oneLine(sanitizeForDisplay(row.output)) : \"\";\n\t\tdefault:\n\t\t\treturn \"\";\n\t}\n}\n\nconst COUNT_ORDER: readonly AgentStatus[] = [\"running\", \"done\", \"failed\", \"cancelled\", \"queued\", \"pending\", \"skipped\"];\n\nfunction formatCounts(theme: Theme, now: number, counts: Record<AgentStatus, number>): string {\n\tconst parts: string[] = [];\n\tfor (const status of COUNT_ORDER) {\n\t\tconst n = counts[status];\n\t\tif (n > 0) parts.push(`${statusGlyph(status, theme, { now, animate: false })}${n}`);\n\t}\n\treturn parts.join(\" \");\n}\n\nfunction isFinishedAgentStatus(status: AgentStatus): boolean {\n\treturn status === \"done\" || status === \"failed\" || status === \"cancelled\" || status === \"skipped\";\n}\n\n/** `label · agentType · phase`, minus any part that repeats an earlier one (a workflow agent is\n * often labelled after its type or its phase, which would otherwise read `cleanup · cleanup`). */\nfunction agentTitleText(row: AgentSnapshotRow, phaseTitle: string | undefined): string {\n\tconst parts: string[] = [];\n\tfor (const part of [row.label, row.agentType, phaseTitle]) {\n\t\tif (part && !parts.includes(part)) parts.push(part);\n\t}\n\treturn parts.join(\" · \");\n}\n\n/** `budget ███░░ 12.3k/50.0k tok · time ██░░░ 4:10/30:00` for a run with a token budget or a time\n * limit, so how close the run is to being stopped is visible before it happens. */\nfunction limitsGaugeText(snapshot: RunSnapshot, theme: Theme): string | undefined {\n\tconst parts: string[] = [];\n\tconst gauge = (ratio: number, hit: boolean) =>\n\t\ttheme.fg(hit ? \"error\" : ratio >= 0.8 ? \"warning\" : \"accent\", progressBar(ratio, 10));\n\tif (snapshot.budget) {\n\t\tconst { spentTokens, totalTokens, exhausted } = snapshot.budget;\n\t\tparts.push(\n\t\t\t`budget ${gauge(spentTokens / totalTokens, exhausted)} ${formatTokens(spentTokens)}/${formatTokens(totalTokens)} tok`,\n\t\t);\n\t}\n\tif (snapshot.timeLimit) {\n\t\tconst { totalMs, reached } = snapshot.timeLimit;\n\t\tparts.push(\n\t\t\t`time ${gauge(snapshot.elapsedMs / totalMs, reached)} ${formatDuration(Math.min(snapshot.elapsedMs, totalMs))}/${formatDuration(totalMs)}`,\n\t\t);\n\t}\n\treturn parts.length > 0 ? parts.join(\" · \") : undefined;\n}\n\n/** Joins hints with two spaces, dropping hints from just before the last one until the line fits,\n * so the closing `back`/`close` hint stays visible on a narrow terminal instead of being cut. */\nfunction fitHints(hints: readonly string[], width: number): string {\n\tconst kept = [...hints];\n\twhile (kept.length > 2 && visibleWidth(kept.join(\" \")) > width) kept.splice(kept.length - 2, 1);\n\treturn kept.join(\" \");\n}\n\n/**\n * The `alt+a` popup. `render()` recomputes the live runs-view list, the current run's agent list\n * and the selected agent's transcript window on every call, since those come straight from the\n * live store; nothing here owns a timer. Dirtiness (when to re-render at all) is the caller's job,\n * driven by `session.store`'s flush notifications.\n */\nexport class PolyphaseInspector implements Component, Focusable {\n\tfocused = false;\n\n\tprivate readonly deps: InspectorDeps;\n\tprivate readonly transcriptCache: TranscriptLineCache;\n\tprivate readonly unsubscribe: () => void;\n\n\tprivate mode: ViewMode = \"runs\";\n\tprivate currentRunId: string | undefined;\n\tprivate currentAgentIndex: number | undefined;\n\tprivate runsRows: RunsRow[] = [];\n\tprivate runsSelection = 0;\n\tprivate runsSelectionKey: string | undefined;\n\tprivate runSelection = 0;\n\tprivate following = true;\n\t/** Anchors the paused window to an item (`seq`) and a line within it, not an absolute line index:\n\t * the transcript keeps at most `maxItems`, so a paused run that keeps producing output evicts\n\t * older items and shifts every absolute line index after them. Resolved back to an absolute line\n\t * on each render via `resolvePauseEndLine`. See `renderAgentDetailBody`. */\n\tprivate pauseAnchor: PauseAnchor | undefined;\n\tprivate lastTranscriptTotalLines: number | undefined;\n\tprivate lastTranscriptRanges: readonly TranscriptLineRange[] = [];\n\tprivate lastDetailBodyHeight: number | undefined;\n\tprivate lastRenderWidth = 0;\n\tprivate showThinking: boolean;\n\tprivate showToolPreviews = false;\n\tprivate armed: { action: \"cancelAgent\" | \"cancelRun\"; runId: string; agentIndex?: number } | undefined;\n\tprivate footerNotice: string | undefined;\n\n\tconstructor(deps: InspectorDeps) {\n\t\tthis.deps = deps;\n\t\tthis.showThinking = deps.showThinking;\n\t\tthis.transcriptCache = new TranscriptLineCache(deps.theme);\n\t\tthis.resolveInitialView();\n\t\tthis.unsubscribe = deps.session.store.subscribe((change) => {\n\t\t\tif (change.type === \"disposed\") {\n\t\t\t\tthis.deps.close();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.deps.tui.requestRender();\n\t\t});\n\t}\n\n\thandleInput(data: string): void {\n\t\tif (this.mode === \"runs\") {\n\t\t\tthis.runsRows = this.buildRunsRows();\n\t\t\tthis.runsSelection = this.resolveRunsSelectionIndex(this.runsRows);\n\t\t}\n\t\tconst kb = this.deps.keybindings;\n\n\t\tif (kb.matches(data, \"app.polyphase.inspector\")) {\n\t\t\tthis.deps.close();\n\t\t\treturn;\n\t\t}\n\t\tif (kb.matches(data, \"app.polyphase.cancelAgent\")) {\n\t\t\tthis.handleCancelKey(\"cancelAgent\");\n\t\t\treturn;\n\t\t}\n\t\tif (kb.matches(data, \"app.polyphase.cancelRun\")) {\n\t\t\tthis.handleCancelKey(\"cancelRun\");\n\t\t\treturn;\n\t\t}\n\n\t\tthis.armed = undefined;\n\t\tthis.footerNotice = undefined;\n\n\t\tif (kb.matches(data, \"tui.select.cancel\")) {\n\t\t\tthis.goBack();\n\t\t} else if (kb.matches(data, \"app.thinking.toggle\")) {\n\t\t\tthis.showThinking = !this.showThinking;\n\t\t} else if (kb.matches(data, \"app.tools.expand\")) {\n\t\t\tthis.showToolPreviews = !this.showToolPreviews;\n\t\t} else if (kb.matches(data, \"app.polyphase.follow\")) {\n\t\t\tthis.toggleFollow();\n\t\t} else if (kb.matches(data, \"app.polyphase.nextAgent\")) {\n\t\t\tthis.cycleAgent(1);\n\t\t} else if (kb.matches(data, \"app.polyphase.previousAgent\")) {\n\t\t\tthis.cycleAgent(-1);\n\t\t} else if (kb.matches(data, \"tui.select.up\")) {\n\t\t\tthis.moveSelection(-1);\n\t\t} else if (kb.matches(data, \"tui.select.down\")) {\n\t\t\tthis.moveSelection(1);\n\t\t} else if (kb.matches(data, \"tui.select.pageUp\")) {\n\t\t\tthis.handlePage(-1);\n\t\t} else if (kb.matches(data, \"tui.select.pageDown\")) {\n\t\t\tthis.handlePage(1);\n\t\t} else if (kb.matches(data, \"tui.select.confirm\")) {\n\t\t\tthis.confirmSelection();\n\t\t}\n\t}\n\n\trender(width: number): string[] {\n\t\tthis.lastRenderWidth = width;\n\t\tconst terminal = this.deps.tui.terminal;\n\t\tif (width < 40 || terminal.rows < 10) {\n\t\t\treturn [fitLine(\"terminal too small for the agent inspector\", width)];\n\t\t}\n\t\tconst height = Math.max(8, terminal.rows - 2);\n\t\tconst bodyHeight = Math.max(1, height - 2);\n\t\tconst innerWidth = Math.max(1, width - 4);\n\n\t\tlet topTitle: string;\n\t\tlet topRight: string;\n\t\tlet bodyLines: string[];\n\n\t\tif (this.mode === \"runs\") {\n\t\t\tthis.runsRows = this.buildRunsRows();\n\t\t\tthis.runsSelection = this.resolveRunsSelectionIndex(this.runsRows);\n\t\t\t// Tracks the selection by identity from the very first render, not only once the user has\n\t\t\t// pressed an arrow key, so a live run inserted above the selection between renders cannot\n\t\t\t// change what a subsequent `enter` opens.\n\t\t\tif (this.runsSelectionKey === undefined) {\n\t\t\t\tconst row = this.runsRows[this.runsSelection];\n\t\t\t\tthis.runsSelectionKey = row ? runsRowKey(row) : undefined;\n\t\t\t}\n\t\t\tconst liveCount = this.runsRows.filter((row) => row.kind === \"live\").length;\n\t\t\tconst earlierCount = this.runsRows.filter((row) => row.kind === \"earlier\").length;\n\t\t\tconst limiter = this.deps.session.limiter.stats();\n\t\t\ttopTitle = `polyphase · ${liveCount} live · ${earlierCount} earlier · slots ${limiter.active}/${limiter.capacity}`;\n\t\t\ttopRight = keyHint(\"app.polyphase.inspector\", \"close\");\n\t\t\tbodyLines = this.renderRunsBody(innerWidth, bodyHeight);\n\t\t} else if (this.mode === \"run\") {\n\t\t\t// Built once here and threaded through, instead of each of the header and the body methods\n\t\t\t// calling `currentRunSnapshot()`/`currentRunAgents()` again: `snapshotFromRun` runs a regex\n\t\t\t// over every agent's output and hashes the whole details object, so repeating it several\n\t\t\t// times per render on every pump flush is wasted work.\n\t\t\tconst snapshot = this.currentRunSnapshot();\n\t\t\tconst rows = this.sortedAgentsOf(snapshot);\n\t\t\ttopTitle = snapshot ? this.runTitleForHeader(snapshot) : \"run\";\n\t\t\ttopRight = snapshot ? this.runHeaderRight(snapshot) : \"\";\n\t\t\tbodyLines =\n\t\t\t\twidth >= SPLIT_MIN_WIDTH\n\t\t\t\t\t? this.renderSplitBody(innerWidth, bodyHeight, snapshot, rows)\n\t\t\t\t\t: this.renderRunBody(innerWidth, bodyHeight, snapshot, rows);\n\t\t} else {\n\t\t\tconst snapshot = this.currentRunSnapshot();\n\t\t\tconst rows = this.sortedAgentsOf(snapshot);\n\t\t\tconst row = rows.find((r) => r.i === this.currentAgentIndex);\n\t\t\ttopTitle = row ? agentTitleText(row, this.phaseTitleOf(snapshot, row)) : \"agent\";\n\t\t\ttopRight = row ? this.agentStatusText(row) : \"\";\n\t\t\tbodyLines = this.renderAgentDetailBody(this.currentAgentIndex, innerWidth, bodyHeight, rows);\n\t\t}\n\n\t\tconst padded = padLines(bodyLines, bodyHeight);\n\t\treturn [\n\t\t\tborderTop(topTitle, topRight, width),\n\t\t\t...padded.map((line) => sideLine(line, width)),\n\t\t\tborderBottom(width),\n\t\t];\n\t}\n\n\tinvalidate(): void {}\n\n\tdispose(): void {\n\t\tthis.unsubscribe();\n\t}\n\n\tprivate now(): number {\n\t\treturn Date.now();\n\t}\n\n\tprivate phaseTitleOf(snapshot: RunSnapshot | undefined, row: AgentSnapshotRow): string | undefined {\n\t\treturn row.phase !== undefined ? snapshot?.phases[row.phase]?.title : undefined;\n\t}\n\n\t/** `● thinking 0:41`: the agent detail header's right side (§12.2). */\n\tprivate agentStatusText(row: AgentSnapshotRow): string {\n\t\tconst glyph = statusGlyph(row.status, this.deps.theme, { now: this.now(), animate: false });\n\t\tconst elapsed = row.elapsedMs === undefined ? \"\" : ` ${formatDuration(row.elapsedMs)}`;\n\t\treturn `${glyph} ${headerActivityText(row)}${elapsed}`;\n\t}\n\n\t// ── Navigation ──────────────────────────────────────────────────────────\n\n\tprivate resolveInitialView(): void {\n\t\tconst initial = this.deps.initial;\n\t\tif (initial.view === \"runs\") {\n\t\t\tthis.mode = \"runs\";\n\t\t\treturn;\n\t\t}\n\t\tif (initial.view === \"run\") {\n\t\t\tthis.mode = \"run\";\n\t\t\tthis.currentRunId = initial.runId;\n\t\t\tthis.selectFirstActiveAgentForCurrentRun();\n\t\t\treturn;\n\t\t}\n\t\tif (initial.view === \"agent\") {\n\t\t\tthis.mode = \"agent\";\n\t\t\tthis.currentRunId = initial.runId;\n\t\t\tthis.currentAgentIndex = initial.agentIndex;\n\t\t\treturn;\n\t\t}\n\t\tconst liveRuns = this.deps.session.store.runs().filter((run) => run.status === \"running\");\n\t\tif (liveRuns.length === 1) {\n\t\t\tthis.mode = \"run\";\n\t\t\tthis.currentRunId = liveRuns[0]?.id;\n\t\t\tthis.selectFirstActiveAgentForCurrentRun();\n\t\t} else {\n\t\t\tthis.mode = \"runs\";\n\t\t}\n\t}\n\n\tprivate selectFirstActiveAgentForCurrentRun(): void {\n\t\tconst rows = this.currentRunAgents();\n\t\tconst idx = rows.findIndex((row) => row.status === \"running\" || row.status === \"starting\");\n\t\tthis.runSelection = idx === -1 ? 0 : idx;\n\t}\n\n\t/** Resolves the runs-view selection by the identity of the previously selected row (its runId or\n\t * saved-workflow name), not its index, so a live update that reorders rows between a render and the\n\t * next key press does not silently select a different run. Falls back to a clamped index when the\n\t * previous row is gone (e.g. an archived run was pruned). */\n\tprivate resolveRunsSelectionIndex(rows: readonly RunsRow[]): number {\n\t\tif (this.runsSelectionKey !== undefined) {\n\t\t\tconst idx = rows.findIndex((row) => runsRowKey(row) === this.runsSelectionKey);\n\t\t\tif (idx !== -1) return idx;\n\t\t}\n\t\treturn clamp(this.runsSelection, 0, Math.max(0, rows.length - 1));\n\t}\n\n\tprivate resetFollowing(): void {\n\t\tthis.following = true;\n\t\tthis.pauseAnchor = undefined;\n\t}\n\n\tprivate isSplitActive(): boolean {\n\t\treturn this.lastRenderWidth >= SPLIT_MIN_WIDTH;\n\t}\n\n\tprivate goBack(): void {\n\t\tif (this.mode === \"agent\") {\n\t\t\tconst rows = this.currentRunAgents();\n\t\t\tconst idx = rows.findIndex((row) => row.i === this.currentAgentIndex);\n\t\t\tif (idx !== -1) this.runSelection = idx;\n\t\t\tthis.mode = \"run\";\n\t\t\tthis.resetFollowing();\n\t\t\treturn;\n\t\t}\n\t\tif (this.mode === \"run\") {\n\t\t\t// Reselects the run the user came from, so the runs view does not fall back to the index it\n\t\t\t// had before drilling in (which may now point at a different row).\n\t\t\tif (this.currentRunId) this.runsSelectionKey = `run:${this.currentRunId}`;\n\t\t\tthis.mode = \"runs\";\n\t\t\tthis.currentRunId = undefined;\n\t\t\treturn;\n\t\t}\n\t\tthis.deps.close();\n\t}\n\n\tprivate confirmSelection(): void {\n\t\tif (this.mode === \"runs\") {\n\t\t\tconst row = this.runsRows[this.runsSelection];\n\t\t\tif (!row) return;\n\t\t\tif (row.kind === \"saved\") {\n\t\t\t\tconst saved = row.saved;\n\t\t\t\tif (!saved) return;\n\t\t\t\tif (!saved.valid) {\n\t\t\t\t\tthis.footerNotice = `/${saved.name} is invalid`;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst command = saved.command ? `/${saved.command.replace(/^\\//, \"\")} ` : `/workflow ${saved.name} `;\n\t\t\t\tthis.deps.insertCommand(command);\n\t\t\t\tthis.deps.close();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (row.runId) {\n\t\t\t\tthis.currentRunId = row.runId;\n\t\t\t\tthis.mode = \"run\";\n\t\t\t\tthis.selectFirstActiveAgentForCurrentRun();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif (this.mode === \"run\") {\n\t\t\tconst rows = this.currentRunAgents();\n\t\t\tconst row = rows[this.runSelection];\n\t\t\tif (!row) return;\n\t\t\tthis.currentAgentIndex = row.i;\n\t\t\tthis.mode = \"agent\";\n\t\t\tthis.resetFollowing();\n\t\t}\n\t}\n\n\tprivate moveSelection(delta: number): void {\n\t\tif (this.mode === \"runs\") {\n\t\t\tif (this.runsRows.length === 0) return;\n\t\t\tthis.runsSelection = clamp(this.runsSelection + delta, 0, this.runsRows.length - 1);\n\t\t\tconst row = this.runsRows[this.runsSelection];\n\t\t\tthis.runsSelectionKey = row ? runsRowKey(row) : undefined;\n\t\t\treturn;\n\t\t}\n\t\tif (this.mode === \"run\") {\n\t\t\tconst rows = this.currentRunAgents();\n\t\t\tif (rows.length === 0) return;\n\t\t\tconst next = clamp(this.runSelection + delta, 0, rows.length - 1);\n\t\t\tif (next !== this.runSelection) {\n\t\t\t\tthis.runSelection = next;\n\t\t\t\tthis.resetFollowing();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tthis.scrollTranscript(delta);\n\t}\n\n\t/** Shared by the agent detail view and, in split view, by page keys on the run view: both drive\n\t * the same `following`/`pauseAnchor` pair against whichever agent is currently shown on the\n\t * right. */\n\tprivate scrollTranscript(delta: number): void {\n\t\tconst total = this.lastTranscriptTotalLines ?? 0;\n\t\tconst ranges = this.lastTranscriptRanges;\n\t\tconst visible = Math.max(1, this.lastDetailBodyHeight ?? 1);\n\t\tconst currentEnd = this.pauseAnchor ? resolvePauseEndLine(this.pauseAnchor, ranges, total) : total;\n\t\tif (delta < 0) {\n\t\t\tif (total <= visible) return;\n\t\t\tconst minEnd = Math.min(total, visible);\n\t\t\tthis.pauseAnchor = anchorAtEndLine(Math.max(minEnd, currentEnd + delta), ranges);\n\t\t\tthis.following = false;\n\t\t} else if (delta > 0 && this.pauseAnchor !== undefined) {\n\t\t\tconst next = Math.min(total, currentEnd + delta);\n\t\t\tif (next >= total) {\n\t\t\t\tthis.pauseAnchor = undefined;\n\t\t\t\tthis.following = true;\n\t\t\t} else {\n\t\t\t\tthis.pauseAnchor = anchorAtEndLine(next, ranges);\n\t\t\t}\n\t\t}\n\t}\n\n\t/** Page keys scroll the right pane in split view (§12.2) instead of moving the left selection by\n\t * a page. Up/down always move the left selection; only page keys are redirected. */\n\tprivate handlePage(direction: 1 | -1): void {\n\t\tif (this.mode === \"run\" && this.isSplitActive()) {\n\t\t\tthis.scrollTranscript(direction * PAGE_SIZE);\n\t\t\treturn;\n\t\t}\n\t\tthis.moveSelection(direction * PAGE_SIZE);\n\t}\n\n\tprivate cycleAgent(direction: 1 | -1): void {\n\t\tif (this.mode === \"run\") {\n\t\t\tconst rows = this.currentRunAgents();\n\t\t\tif (rows.length === 0) return;\n\t\t\tthis.runSelection = (this.runSelection + direction + rows.length) % rows.length;\n\t\t\tthis.resetFollowing();\n\t\t\treturn;\n\t\t}\n\t\tif (this.mode === \"agent\") {\n\t\t\tconst rows = this.currentRunAgents();\n\t\t\tif (rows.length === 0) return;\n\t\t\tconst curIdx = rows.findIndex((row) => row.i === this.currentAgentIndex);\n\t\t\tconst nextIdx = ((curIdx === -1 ? 0 : curIdx) + direction + rows.length) % rows.length;\n\t\t\tthis.currentAgentIndex = rows[nextIdx]?.i;\n\t\t\tthis.resetFollowing();\n\t\t}\n\t}\n\n\tprivate toggleFollow(): void {\n\t\tif (this.mode !== \"agent\" && !(this.mode === \"run\" && this.isSplitActive())) return;\n\t\tif (this.following) {\n\t\t\tconst anchor = anchorAtEndLine(this.lastTranscriptTotalLines ?? 0, this.lastTranscriptRanges);\n\t\t\t// An empty transcript (no ranges yet, or the archived/retention-dropped summary body, which\n\t\t\t// never sets any ranges) has nothing to anchor a pause to. Pressing `f` must stay a no-op\n\t\t\t// then, not flip into a paused state the view can never escape: `scrollTranscript` only\n\t\t\t// resumes following once `pauseAnchor` advances to the end, which it can never do without an\n\t\t\t// anchor.\n\t\t\tif (anchor === undefined) return;\n\t\t\tthis.pauseAnchor = anchor;\n\t\t\tthis.following = false;\n\t\t} else {\n\t\t\tthis.resetFollowing();\n\t\t}\n\t}\n\n\t// ── Two-press cancel (§12.4) ────────────────────────────────────────────\n\n\tprivate handleCancelKey(action: \"cancelAgent\" | \"cancelRun\"): void {\n\t\tconst target = this.cancelTarget(action);\n\t\tif (!target) {\n\t\t\tthis.armed = undefined;\n\t\t\tthis.footerNotice = undefined;\n\t\t\treturn;\n\t\t}\n\t\tconst sameTarget =\n\t\t\tthis.armed?.action === action &&\n\t\t\tthis.armed.runId === target.runId &&\n\t\t\tthis.armed.agentIndex === target.agentIndex;\n\t\tif (sameTarget) {\n\t\t\tthis.armed = undefined;\n\t\t\tthis.footerNotice = undefined;\n\t\t\tif (action === \"cancelAgent\" && target.agentIndex !== undefined) {\n\t\t\t\tthis.deps.session.store.cancelAgent(target.runId, target.agentIndex);\n\t\t\t} else {\n\t\t\t\tthis.deps.session.store.cancelRun(target.runId);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif (target.finished) {\n\t\t\tthis.armed = undefined;\n\t\t\tthis.footerNotice = \"already finished\";\n\t\t\treturn;\n\t\t}\n\t\tthis.armed = { action, runId: target.runId, agentIndex: target.agentIndex };\n\t\tthis.footerNotice =\n\t\t\taction === \"cancelAgent\" ? `press x again to cancel ${target.label}` : \"press X again to cancel the run\";\n\t}\n\n\tprivate cancelTarget(action: \"cancelAgent\" | \"cancelRun\"): CancelTarget | undefined {\n\t\tif (action === \"cancelAgent\") {\n\t\t\tif (this.mode === \"run\") {\n\t\t\t\tconst row = this.currentRunAgents()[this.runSelection];\n\t\t\t\tif (!row || !this.currentRunId) return undefined;\n\t\t\t\treturn {\n\t\t\t\t\trunId: this.currentRunId,\n\t\t\t\t\tagentIndex: row.i,\n\t\t\t\t\tlabel: row.label,\n\t\t\t\t\tfinished: isFinishedAgentStatus(row.status),\n\t\t\t\t};\n\t\t\t}\n\t\t\tif (this.mode === \"agent\") {\n\t\t\t\tconst row = this.currentAgentRow();\n\t\t\t\tif (!row || !this.currentRunId) return undefined;\n\t\t\t\treturn {\n\t\t\t\t\trunId: this.currentRunId,\n\t\t\t\t\tagentIndex: row.i,\n\t\t\t\t\tlabel: row.label,\n\t\t\t\t\tfinished: isFinishedAgentStatus(row.status),\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn undefined;\n\t\t}\n\t\tif (this.mode === \"runs\") {\n\t\t\tconst row = this.runsRows[this.runsSelection];\n\t\t\tif (!row || row.kind === \"saved\" || !row.runId || !row.snapshot) return undefined;\n\t\t\treturn { runId: row.runId, label: row.snapshot.title, finished: row.snapshot.status !== \"running\" };\n\t\t}\n\t\tconst snapshot = this.currentRunSnapshot();\n\t\tif (!snapshot || !this.currentRunId) return undefined;\n\t\treturn { runId: this.currentRunId, label: snapshot.title, finished: snapshot.status !== \"running\" };\n\t}\n\n\t// ── Data access ─────────────────────────────────────────────────────────\n\n\tprivate buildRunsRows(): RunsRow[] {\n\t\tconst store = this.deps.session.store;\n\t\tconst allRuns = store.runs();\n\t\tconst liveRuns = allRuns.filter((run) => run.status === \"running\");\n\t\tconst finishedLive = allRuns.filter((run) => run.status !== \"running\");\n\t\tconst knownIds = new Set([...liveRuns, ...finishedLive].map((run) => run.id));\n\t\tconst archived = this.deps.getArchivedRuns().filter((entry) => !knownIds.has(entry.runId));\n\n\t\tconst rows: RunsRow[] = [];\n\t\tfor (const run of liveRuns) {\n\t\t\trows.push({\n\t\t\t\tkind: \"live\",\n\t\t\t\trunId: run.id,\n\t\t\t\tsnapshot: sanitizeSnapshot(\n\t\t\t\t\tsnapshotFromRun(run, { now: this.now(), tailItems: 0, limiter: this.deps.session.limiter.stats() }),\n\t\t\t\t),\n\t\t\t});\n\t\t}\n\t\tfor (const run of finishedLive) {\n\t\t\trows.push({\n\t\t\t\tkind: \"earlier\",\n\t\t\t\trunId: run.id,\n\t\t\t\tsnapshot: sanitizeSnapshot(snapshotFromRun(run, { now: this.now(), tailItems: 0 })),\n\t\t\t});\n\t\t}\n\t\tfor (const entry of archived) {\n\t\t\trows.push({\n\t\t\t\tkind: \"earlier\",\n\t\t\t\trunId: entry.runId,\n\t\t\t\tsnapshot: sanitizeSnapshot(snapshotFromDetails(entry.details, { now: this.now() })),\n\t\t\t});\n\t\t}\n\t\tfor (const saved of this.deps.getSavedWorkflows()) {\n\t\t\trows.push({ kind: \"saved\", saved });\n\t\t}\n\t\treturn rows;\n\t}\n\n\tprivate currentRunSnapshot(): RunSnapshot | undefined {\n\t\tif (!this.currentRunId) return undefined;\n\t\tconst liveRun = this.deps.session.store.getRun(this.currentRunId);\n\t\tif (liveRun) {\n\t\t\treturn sanitizeSnapshot(\n\t\t\t\tsnapshotFromRun(liveRun, { now: this.now(), tailItems: 0, limiter: this.deps.session.limiter.stats() }),\n\t\t\t);\n\t\t}\n\t\tconst archived = this.deps.getArchivedRuns().find((entry) => entry.runId === this.currentRunId);\n\t\treturn archived ? sanitizeSnapshot(snapshotFromDetails(archived.details, { now: this.now() })) : undefined;\n\t}\n\n\tprivate sortedAgentsOf(snapshot: RunSnapshot | undefined): AgentSnapshotRow[] {\n\t\tif (!snapshot) return [];\n\t\treturn [...snapshot.agents].sort((a, b) => a.i - b.i);\n\t}\n\n\tprivate currentRunAgents(): AgentSnapshotRow[] {\n\t\treturn this.sortedAgentsOf(this.currentRunSnapshot());\n\t}\n\n\tprivate currentAgentRow(): AgentSnapshotRow | undefined {\n\t\tif (this.currentAgentIndex === undefined) return undefined;\n\t\treturn this.currentRunAgents().find((row) => row.i === this.currentAgentIndex);\n\t}\n\n\tprivate currentAgentTranscriptFor(\n\t\tagentIndex: number,\n\t): { items: readonly TranscriptItem[]; dropped: number } | undefined {\n\t\tif (!this.currentRunId) return undefined;\n\t\tconst run = this.deps.session.store.getRun(this.currentRunId);\n\t\tconst agent = run?.agents[agentIndex];\n\t\t// Retention drops every agent's transcript on a finished run once it falls past\n\t\t// `keepTranscriptRuns`; `undefined` here sends the caller to the archived-style summary body\n\t\t// (status, output, error, the \"only kept while in memory\" note) instead of an empty transcript.\n\t\tif (!run || !agent || run.transcriptsDropped) return undefined;\n\t\treturn { items: agent.state.transcript, dropped: agent.state.droppedItems };\n\t}\n\n\t// ── Rendering ───────────────────────────────────────────────────────────\n\n\t/** `countsWidth` is the widest counts cell across every listed run (at least the default), so\n\t * multi-digit counts like `●10 ✓12` are never cut to `●1`. */\n\tprivate formatRunsRow(row: RunsRow, width: number, selected: boolean, countsWidth: number): string {\n\t\tconst cursor = selected ? \"› \" : \" \";\n\t\tif (row.kind === \"saved\" && row.saved) {\n\t\t\tconst saved = row.saved;\n\t\t\t// `name`/`description` come from the saved script's own meta block (`workflow/meta.ts`), the\n\t\t\t// same kind of script-supplied text `sanitizeSnapshot` cleans for live/archived runs.\n\t\t\tconst nameText = `${cursor}/${sanitizeChildText(saved.name)}`;\n\t\t\treturn columns(\n\t\t\t\t[\n\t\t\t\t\t{ text: saved.valid ? nameText : this.deps.theme.fg(\"error\", `${nameText} invalid`), width: 18 },\n\t\t\t\t\t{ text: sanitizeChildText(saved.description), width: \"flex\" },\n\t\t\t\t\t{ text: savedWorkflowSourceLabel(saved.source), width: 4, align: \"right\" },\n\t\t\t\t],\n\t\t\t\twidth,\n\t\t\t);\n\t\t}\n\t\tconst snapshot = row.snapshot;\n\t\tif (!snapshot) return fitLine(`${cursor}?`, width);\n\t\tconst glyph = statusGlyph(snapshot.status, this.deps.theme, { now: this.now(), animate: false });\n\t\tconst optional = runsRowOptionalWidths(width);\n\t\t// The cursor, glyph and title are fixed/flex cells ahead of every optional column, so they\n\t\t// always render, even at widths where every optional column below has been dropped.\n\t\tconst cells: ColumnCell[] = [\n\t\t\t{ text: `${cursor}${glyph}`, width: RUNS_ROW_CURSOR_WIDTH },\n\t\t\t{ text: runTitleText(snapshot), width: \"flex\" },\n\t\t];\n\t\tif (optional.subtitle > 0) cells.push({ text: runSubtitleText(snapshot), width: optional.subtitle });\n\t\tif (optional.counts > 0) {\n\t\t\tcells.push({\n\t\t\t\ttext: formatCounts(this.deps.theme, this.now(), snapshot.counts),\n\t\t\t\twidth: Math.max(optional.counts, countsWidth),\n\t\t\t});\n\t\t}\n\t\tif (optional.duration > 0) {\n\t\t\tcells.push({ text: formatDuration(snapshot.elapsedMs), width: optional.duration, align: \"right\" });\n\t\t}\n\t\tif (optional.tokens > 0) {\n\t\t\tcells.push({\n\t\t\t\ttext: snapshot.tokens > 0 ? formatTokens(snapshot.tokens) : \"\",\n\t\t\t\twidth: optional.tokens,\n\t\t\t\talign: \"right\",\n\t\t\t});\n\t\t}\n\t\tif (optional.cost > 0) cells.push({ text: formatCost(snapshot.cost), width: optional.cost, align: \"right\" });\n\t\treturn columns(cells, width);\n\t}\n\n\tprivate renderRunsBody(width: number, height: number): string[] {\n\t\tconst rows = this.runsRows;\n\t\tconst lines: string[] = [];\n\t\tconst lineForRow: number[] = [];\n\t\tlet countsWidth = 0;\n\t\tfor (const row of rows) {\n\t\t\tif (row.snapshot) {\n\t\t\t\tcountsWidth = Math.max(\n\t\t\t\t\tcountsWidth,\n\t\t\t\t\tvisibleWidth(formatCounts(this.deps.theme, this.now(), row.snapshot.counts)),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tcountsWidth = Math.min(RUNS_COUNTS_MAX_WIDTH, countsWidth);\n\t\tlet lastKind: RunsRow[\"kind\"] | undefined;\n\t\trows.forEach((row, idx) => {\n\t\t\tif (row.kind !== lastKind) {\n\t\t\t\tlines.push(this.deps.theme.bold(groupLabel(row.kind)));\n\t\t\t\tlastKind = row.kind;\n\t\t\t}\n\t\t\tlineForRow[idx] = lines.length;\n\t\t\tlines.push(this.formatRunsRow(row, width, idx === this.runsSelection, countsWidth));\n\t\t});\n\t\tif (rows.length === 0) {\n\t\t\tlines.push('No agents yet. Put \"polyphase\" in a prompt or run /workflow <name>.');\n\t\t}\n\t\tconst pivot = lineForRow[this.runsSelection] ?? 0;\n\t\tconst contentHeight = Math.max(1, height - 1);\n\t\tconst windowed = padLines(windowAround(lines, contentHeight, pivot, this.deps.theme), contentHeight);\n\t\treturn [...windowed, this.footerLine(this.runsHints(), width)];\n\t}\n\n\tprivate formatAgentRow(row: AgentSnapshotRow, width: number, selected: boolean): string {\n\t\tconst cursor = selected ? \"› \" : \" \";\n\t\tconst glyph = statusGlyph(row.status, this.deps.theme, { now: this.now(), animate: false });\n\t\tconst cells: ColumnCell[] = [{ text: `${cursor}${glyph} ${row.label}`, width: 18 }];\n\t\t// Below 50 columns (the split view's left pane, a phase-indented row in it) the model column\n\t\t// would leave no room for the activity; the split view's right pane names the model anyway.\n\t\tif (width >= 50) cells.push({ text: formatModelLabel(row, { withProvider: false }), width: 20 });\n\t\t// Dropped below 60 columns, the same threshold `layoutRun` uses for its elapsed column: at\n\t\t// the 40-column split-pane width there is no room for a 5th fixed cell ahead of the flex one.\n\t\tif (width >= 60) {\n\t\t\tcells.push({\n\t\t\t\ttext: row.elapsedMs === undefined ? \"\" : formatDuration(row.elapsedMs),\n\t\t\t\twidth: 5,\n\t\t\t\talign: \"right\",\n\t\t\t});\n\t\t}\n\t\tcells.push({ text: agentRowRightText(row, this.showThinking), width: \"flex\" });\n\t\treturn columns(cells, width);\n\t}\n\n\tprivate runTitleForHeader(snapshot: RunSnapshot): string {\n\t\tconst base = runTitleText(snapshot);\n\t\tif (snapshot.kind === \"workflow\" && isCurrentlyPhased(snapshot.status) && snapshot.currentPhase !== undefined) {\n\t\t\tconst phase = snapshot.phases[snapshot.currentPhase];\n\t\t\tif (phase) return `${base} ▸ ${phase.title}`;\n\t\t}\n\t\treturn base;\n\t}\n\n\tprivate runHeaderRight(snapshot: RunSnapshot): string {\n\t\tconst parts = [formatCounts(this.deps.theme, this.now(), snapshot.counts), formatDuration(snapshot.elapsedMs)];\n\t\tif (snapshot.tokens > 0) parts.push(`${formatTokens(snapshot.tokens)} tok`);\n\t\tconst cost = formatCost(snapshot.cost);\n\t\tif (cost) parts.push(cost);\n\t\treturn parts.filter((part) => part.length > 0).join(\" \");\n\t}\n\n\tprivate renderRunBody(\n\t\twidth: number,\n\t\theight: number,\n\t\tsnapshot: RunSnapshot | undefined,\n\t\trows: AgentSnapshotRow[],\n\t): string[] {\n\t\tif (!snapshot) return [this.deps.theme.fg(\"muted\", \"run not found\")];\n\t\tthis.runSelection = clamp(this.runSelection, 0, Math.max(0, rows.length - 1));\n\t\tconst { lines, lineForAgent } = this.runListLines(snapshot, rows, width);\n\t\tconst pivot = lineForAgent[this.runSelection] ?? 0;\n\t\tconst contentHeight = Math.max(1, height - 1);\n\t\tconst windowed = padLines(windowAround(lines, contentHeight, pivot, this.deps.theme), contentHeight);\n\t\treturn [...windowed, this.footerLine(this.runHints(), width)];\n\t}\n\n\t/** The run view's list (§12.2): a limits gauge when the run has a budget or time limit, then\n\t * agents grouped by phase for workflows, numbered for chains, flat otherwise, then the newest log\n\t * line or the result. Shared by the full-width run view and the split view's left pane, so the\n\t * phase tree survives the split. */\n\tprivate runListLines(\n\t\tsnapshot: RunSnapshot,\n\t\trows: AgentSnapshotRow[],\n\t\twidth: number,\n\t): { lines: string[]; lineForAgent: number[] } {\n\t\tconst lines: string[] = [];\n\t\tconst lineForAgent: number[] = [];\n\t\tconst gauge = limitsGaugeText(snapshot, this.deps.theme);\n\t\tif (gauge) lines.push(fitLine(gauge, width));\n\t\tif (snapshot.phases.length > 0) {\n\t\t\t// Agents spawned before any phase()/agent({phase}) call (§13.3) carry no phase index; they\n\t\t\t// are still selectable, so they get an ungrouped block ahead of the phase list instead of\n\t\t\t// being silently dropped from the view.\n\t\t\trows.forEach((row, idx) => {\n\t\t\t\tif (row.phase !== undefined) return;\n\t\t\t\tlineForAgent[idx] = lines.length;\n\t\t\t\tlines.push(this.formatAgentRow(row, width, idx === this.runSelection));\n\t\t\t});\n\t\t\tfor (const phase of snapshot.phases) {\n\t\t\t\tlines.push(\n\t\t\t\t\tcolumns(\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttext: `${statusGlyph(phase.status, this.deps.theme, { now: this.now(), animate: false })} ${phase.index + 1} ${phase.title}`,\n\t\t\t\t\t\t\t\twidth: \"flex\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{ text: `${phase.done}/${phase.total}`, width: 7, align: \"right\" },\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttext: phase.elapsedMs === undefined ? \"\" : formatDuration(phase.elapsedMs),\n\t\t\t\t\t\t\t\twidth: 7,\n\t\t\t\t\t\t\t\talign: \"right\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t\twidth,\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\trows.forEach((row, idx) => {\n\t\t\t\t\tif (row.phase !== phase.index) return;\n\t\t\t\t\tlineForAgent[idx] = lines.length;\n\t\t\t\t\tlines.push(` ${this.formatAgentRow(row, Math.max(1, width - 4), idx === this.runSelection)}`);\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\trows.forEach((row, idx) => {\n\t\t\t\tlineForAgent[idx] = lines.length;\n\t\t\t\tconst prefix = row.step !== undefined ? `${row.step} ` : \"\";\n\t\t\t\tlines.push(\n\t\t\t\t\t`${prefix}${this.formatAgentRow(row, Math.max(1, width - prefix.length), idx === this.runSelection)}`,\n\t\t\t\t);\n\t\t\t});\n\t\t}\n\t\tif (snapshot.log.length > 0) {\n\t\t\tlines.push(`» ${oneLine(sanitizeForDisplay(snapshot.log[snapshot.log.length - 1] ?? \"\"))}`);\n\t\t} else if (snapshot.resultPreview && snapshot.status !== \"running\") {\n\t\t\tlines.push(`→ ${oneLine(sanitizeForDisplay(snapshot.resultPreview))}`);\n\t\t}\n\t\treturn { lines: lines.map((line) => fitLine(line, width)), lineForAgent };\n\t}\n\n\tprivate renderSplitBody(\n\t\twidth: number,\n\t\theight: number,\n\t\tsnapshot: RunSnapshot | undefined,\n\t\trows: AgentSnapshotRow[],\n\t): string[] {\n\t\tif (!snapshot) return [this.deps.theme.fg(\"muted\", \"run not found\")];\n\t\t// The left list stops one column short of the divider, and one more column of air follows it.\n\t\tconst rightWidth = Math.max(1, width - SPLIT_LEFT_WIDTH - 2);\n\t\tthis.runSelection = clamp(this.runSelection, 0, Math.max(0, rows.length - 1));\n\t\tconst { lines: leftLines, lineForAgent } = this.runListLines(snapshot, rows, SPLIT_LEFT_WIDTH - 1);\n\t\tconst selected = rows[this.runSelection];\n\t\tconst rightLines = this.renderAgentDetailBody(selected?.i, rightWidth, height, rows, snapshot);\n\t\t// Windowed the same way `renderRunBody` windows its list, so a run with more agents than the\n\t\t// pane has rows keeps the `›` cursor on screen instead of scrolling it off the top.\n\t\tconst pivot = lineForAgent[this.runSelection] ?? 0;\n\t\tconst paddedLeft = padLines(windowAround(leftLines, height, pivot, this.deps.theme), height);\n\t\tconst paddedRight = padLines(rightLines, height);\n\t\tconst divider = this.deps.theme.fg(\"dim\", \"│\");\n\t\treturn paddedLeft.map((line, idx) => `${padToWidth(line, SPLIT_LEFT_WIDTH)}${divider} ${paddedRight[idx] ?? \"\"}`);\n\t}\n\n\t/** `identityFrom` is set by the split view, whose border title names the run rather than the\n\t * agent: the pane then opens with the agent's own title and status line. */\n\tprivate renderAgentDetailBody(\n\t\tagentIndex: number | undefined,\n\t\twidth: number,\n\t\theight: number,\n\t\trows: AgentSnapshotRow[],\n\t\tidentityFrom?: RunSnapshot,\n\t): string[] {\n\t\tconst footerFallback = this.agentHints();\n\t\tconst contentHeight = Math.max(1, height - 1);\n\t\tif (agentIndex === undefined) {\n\t\t\treturn [\n\t\t\t\t...padLines([this.deps.theme.fg(\"muted\", \"no agent selected\")], contentHeight),\n\t\t\t\tthis.footerLine(footerFallback, width),\n\t\t\t];\n\t\t}\n\t\tconst row = rows.find((r) => r.i === agentIndex);\n\t\tif (!row) {\n\t\t\treturn [\n\t\t\t\t...padLines([this.deps.theme.fg(\"muted\", \"agent not found\")], contentHeight),\n\t\t\t\tthis.footerLine(footerFallback, width),\n\t\t\t];\n\t\t}\n\n\t\tconst header: string[] = [];\n\t\tif (identityFrom) {\n\t\t\tconst status = this.agentStatusText(row);\n\t\t\theader.push(\n\t\t\t\tcolumns(\n\t\t\t\t\t[\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttext: this.deps.theme.bold(agentTitleText(row, this.phaseTitleOf(identityFrom, row))),\n\t\t\t\t\t\t\twidth: \"flex\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{ text: status, width: visibleWidth(status), align: \"right\" },\n\t\t\t\t\t],\n\t\t\t\t\twidth,\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\t\tconst modelLabel = formatModelLabel(row, { withProvider: true, withSource: true });\n\t\tconst confirmText = row.modelConfirmed ? \"confirmed\" : \"unconfirmed\";\n\t\tconst tokensText = row.tokens > 0 ? ` · ${formatTokens(row.tokens)} tok` : \"\";\n\t\tconst costText = row.cost > 0 ? ` · ${formatCost(row.cost)}` : \"\";\n\t\tconst turnsText = `${row.turns} turn${row.turns === 1 ? \"\" : \"s\"}`;\n\t\tconst toolsText = `${row.toolCalls} tool${row.toolCalls === 1 ? \"\" : \"s\"}`;\n\t\theader.push(oneLine(`${modelLabel} · ${confirmText} · ${turnsText} · ${toolsText}${tokensText}${costText}`));\n\t\theader.push(`task ${oneLine(row.task)}`);\n\t\theader.push(\"─\".repeat(Math.max(0, width)));\n\n\t\tconst footer = this.footerLine(this.agentHints(row.status), width);\n\t\tconst transcript = this.currentAgentTranscriptFor(agentIndex);\n\t\tif (!transcript) {\n\t\t\tconst OUTPUT_PREVIEW_MAX_LINES = 8;\n\t\t\tlet statusLines = row.statusLine ? 1 : 0;\n\t\t\tlet errorLines = row.error ? 1 : 0;\n\t\t\tconst noteLines = 1;\n\t\t\t// The note explains why the transcript is gone, so it must survive trimming even at the\n\t\t\t// smallest supported height: reserve header + note first, then drop error, then status,\n\t\t\t// before giving any remaining budget to the output preview. `padLines` below only pads or\n\t\t\t// truncates from the end, so whatever we build here must already fit `contentHeight`.\n\t\t\tif (header.length + statusLines + errorLines + noteLines > contentHeight && errorLines > 0) {\n\t\t\t\terrorLines = 0;\n\t\t\t}\n\t\t\tif (header.length + statusLines + errorLines + noteLines > contentHeight && statusLines > 0) {\n\t\t\t\tstatusLines = 0;\n\t\t\t}\n\t\t\tconst outputBudget = row.output\n\t\t\t\t? Math.max(0, contentHeight - header.length - statusLines - errorLines - noteLines - 1)\n\t\t\t\t: 0;\n\t\t\tconst body = [...header];\n\t\t\tif (statusLines > 0 && row.statusLine) {\n\t\t\t\tbody.push(fitLine(`status ${oneLine(sanitizeForDisplay(row.statusLine))}`, width));\n\t\t\t}\n\t\t\tif (row.output && outputBudget > 0) {\n\t\t\t\tbody.push(\"output\");\n\t\t\t\tbody.push(\n\t\t\t\t\t...wrapTextWithAnsi(sanitizeForDisplay(row.output), Math.max(1, width - 2))\n\t\t\t\t\t\t.slice(0, Math.min(OUTPUT_PREVIEW_MAX_LINES, outputBudget))\n\t\t\t\t\t\t.map((line) => fitLine(` ${line}`, width)),\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (errorLines > 0 && row.error) body.push(fitLine(`error ${oneLine(sanitizeForDisplay(row.error))}`, width));\n\t\t\tbody.push(this.deps.theme.fg(\"muted\", \"Live transcript is only kept while the run is in memory.\"));\n\t\t\tthis.lastTranscriptTotalLines = undefined;\n\t\t\tthis.lastTranscriptRanges = [];\n\t\t\tthis.lastDetailBodyHeight = undefined;\n\t\t\treturn [...padLines(body, contentHeight), footer];\n\t\t}\n\n\t\tconst owner = `${this.currentRunId}:${agentIndex}`;\n\t\tconst transcriptLines = this.transcriptCache.linesFor(owner, transcript.items, transcript.dropped, {\n\t\t\twidth,\n\t\t\tshowThinking: this.showThinking,\n\t\t\tshowToolPreviews: this.showToolPreviews,\n\t\t\tnow: this.now(),\n\t\t});\n\t\tconst tail = tailWindowOf(transcriptLines);\n\t\tthis.lastTranscriptTotalLines = tail.totalLines;\n\t\tthis.lastTranscriptRanges = this.transcriptCache.lineRanges();\n\t\t// A finished or cancelled agent has nothing left to follow or pause: the indicator row only\n\t\t// makes sense while the agent could still produce more output.\n\t\tconst showFollowLine = !isFinishedAgentStatus(row.status);\n\t\tconst transcriptRows = Math.max(1, contentHeight - header.length - (showFollowLine ? 1 : 0));\n\t\tthis.lastDetailBodyHeight = transcriptRows;\n\t\tconst pinnedEndLine = this.pauseAnchor\n\t\t\t? resolvePauseEndLine(this.pauseAnchor, this.lastTranscriptRanges, tail.totalLines)\n\t\t\t: undefined;\n\t\tconst offsetFromEnd = this.following ? 0 : Math.max(0, tail.totalLines - (pinnedEndLine ?? tail.totalLines));\n\t\tconst windowLines = padLines(tail.window(transcriptRows, offsetFromEnd), transcriptRows);\n\t\tconst followLine = showFollowLine\n\t\t\t? [fitLine(this.following ? \"◆ following\" : \"‖ paused · f to follow\", width)]\n\t\t\t: [];\n\t\tconst body = [...header, ...windowLines, ...followLine];\n\t\treturn [...padLines(body, contentHeight), footer];\n\t}\n\n\t/** `width` is the same inner width the caller laid its body out to: hints that do not fit are\n\t * dropped by `fitHints`, and anything still too wide is ellipsised like every other row instead\n\t * of being hard-cut by `sideLine`'s padding, which carries no ellipsis of its own. */\n\tprivate footerLine(hints: readonly string[], width: number): string {\n\t\treturn fitLine(\n\t\t\tthis.footerNotice ? this.deps.theme.fg(\"warning\", this.footerNotice) : fitHints(hints, width),\n\t\t\twidth,\n\t\t);\n\t}\n\n\tprivate runsHints(): string[] {\n\t\treturn [\n\t\t\tcombinedKeyHint([\"tui.select.up\", \"tui.select.down\"], \"select\"),\n\t\t\tkeyHint(\"tui.select.confirm\", \"open\"),\n\t\t\tkeyHint(\"app.polyphase.cancelRun\", \"cancel run\"),\n\t\t\tkeyHint(\"tui.select.cancel\", \"close\"),\n\t\t];\n\t}\n\n\tprivate runHints(): string[] {\n\t\treturn [\n\t\t\tcombinedKeyHint([\"tui.select.up\", \"tui.select.down\"], \"select\"),\n\t\t\tkeyHint(\"tui.select.confirm\", \"follow\"),\n\t\t\tkeyHint(\"app.polyphase.cancelAgent\", \"cancel agent\"),\n\t\t\tkeyHint(\"app.polyphase.cancelRun\", \"cancel run\"),\n\t\t\tkeyHint(\"tui.select.cancel\", \"back\"),\n\t\t];\n\t}\n\n\tprivate agentHints(status?: AgentStatus): string[] {\n\t\tconst finished = status !== undefined && isFinishedAgentStatus(status);\n\t\treturn [\n\t\t\tkeyHint(\"app.polyphase.nextAgent\", \"next agent\"),\n\t\t\t...(finished ? [] : [keyHint(\"app.polyphase.follow\", \"follow\")]),\n\t\t\tkeyHint(\"app.thinking.toggle\", \"thinking\"),\n\t\t\t...(finished ? [] : [keyHint(\"app.polyphase.cancelAgent\", \"cancel\")]),\n\t\t\tkeyHint(\"tui.select.cancel\", \"back\"),\n\t\t];\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"transcript-layout.d.ts","sourceRoot":"","sources":["../../../../src/core/polyphase/ui/transcript-layout.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AAKvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAOlD,MAAM,WAAW,uBAAuB;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,OAAO,CAAC;IACtB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,GAAG,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,oBAAoB;IACpC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,oF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AED,MAAM,WAAW,oBAAoB;IACpC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,oFAAoF;IACpF,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CACxD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,oBAAoB,CAc3E;AAMD;;;;;;;;wEAQwE;AACxE,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvD;AA8HD;kGACkG;AAClG,MAAM,WAAW,mBAAmB;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACZ;AAED;;;;;;;GAOG;AACH,qBAAa,mBAAmB;IAC/B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAQ;IAC9B,OAAO,CAAC,KAAK,CAAqB;IAClC,OAAO,CAAC,OAAO,CAAiC;IAChD,OAAO,CAAC,MAAM,CAAsC;IAEpD,YAAY,KAAK,EAAE,KAAK,EAEvB;IAED,QAAQ,CACP,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,SAAS,cAAc,EAAE,EAChC,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,uBAAuB,GAC9B,MAAM,EAAE,CAoCV;IAED,0EAA0E;IAC1E,UAAU,IAAI,SAAS,mBAAmB,EAAE,CAE3C;IAED,OAAO,CAAC,UAAU;CAYlB"}
@@ -8,6 +8,7 @@ import { stripAnsi } from "../../../utils/ansi.js";
8
8
  import { sanitizeBinaryOutput } from "../../../utils/shell.js";
9
9
  import { replaceTabs } from "../../tools/render-utils.js";
10
10
  import { columns, fitLine, formatDuration, oneLine } from "../render/format.js";
11
+ import { isBlockedEchoNotice } from "../render/run-block.js";
11
12
  /** Only the last 16 KiB of an open (not-yet-done) item's text is re-wrapped on every delta, so
12
13
  * rendering cost stays bounded while the item streams in. */
13
14
  const STREAM_TAIL_CHARS = 16 * 1024;
@@ -170,7 +171,10 @@ export class TranscriptLineCache {
170
171
  liveSeqs.add(item.seq);
171
172
  const open = i === lastIndex && isOpenItem(item);
172
173
  const start = lines.length;
173
- if (isLiveTimed(item)) {
174
+ if (isBlockedEchoNotice(item, items[i - 1])) {
175
+ // Kept as an empty range so pause anchors and evictions still see the item.
176
+ }
177
+ else if (isLiveTimed(item)) {
174
178
  lines.push(...this.renderItem(item, options, open));
175
179
  }
176
180
  else {