zidane 7.2.5 → 8.0.4

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 (376) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +34 -6
  3. package/dist/{acp-D-tVyUjw.js → acp-DQDhi2dj.js} +230 -77
  4. package/dist/acp-DQDhi2dj.js.map +1 -0
  5. package/dist/acp-cli.d.ts +1 -1
  6. package/dist/acp-cli.js +9 -66
  7. package/dist/acp-cli.js.map +1 -1
  8. package/dist/acp.d.ts +10 -590
  9. package/dist/acp.d.ts.map +1 -1
  10. package/dist/acp.js +3 -3
  11. package/dist/{agent-D0zZnGbt.js → agent-DSLNmBp0.js} +14401 -13214
  12. package/dist/agent-DSLNmBp0.js.map +1 -0
  13. package/dist/agent.d.ts +1 -1
  14. package/dist/agent.js +3 -2
  15. package/dist/aliasing-lVFbm81n.js +217 -0
  16. package/dist/aliasing-lVFbm81n.js.map +1 -0
  17. package/dist/{anthropic-C2aole0G.js → anthropic-CD00LhUP.js} +1442 -1264
  18. package/dist/anthropic-CD00LhUP.js.map +1 -0
  19. package/dist/artifacts-CV2hUKnL.js.map +1 -1
  20. package/dist/{atomic-write-B7zr1ddF.js → atomic-write-Ijgf2Mhc.js} +13 -3
  21. package/dist/atomic-write-Ijgf2Mhc.js.map +1 -0
  22. package/dist/call-tool-dHlbGOIY.js +70 -0
  23. package/dist/call-tool-dHlbGOIY.js.map +1 -0
  24. package/dist/chat/pure.d.ts +372 -6
  25. package/dist/chat/pure.d.ts.map +1 -1
  26. package/dist/chat/pure.js +35 -244
  27. package/dist/chat/pure.js.map +1 -1
  28. package/dist/{approvals-DKaJZYlm.js → chat-JPJJ8uu5.js} +15879 -14631
  29. package/dist/chat-JPJJ8uu5.js.map +1 -0
  30. package/dist/chat.d.ts +4 -6
  31. package/dist/chat.js +23 -12
  32. package/dist/cli-shared-C-YCaglL.js +159 -0
  33. package/dist/cli-shared-C-YCaglL.js.map +1 -0
  34. package/dist/client-core-BQSyDALT.d.ts +2115 -0
  35. package/dist/client-core-BQSyDALT.d.ts.map +1 -0
  36. package/dist/codemode-worker.d.ts +1 -0
  37. package/dist/codemode-worker.js +155 -0
  38. package/dist/codemode-worker.js.map +1 -0
  39. package/dist/codemode.d.ts +352 -0
  40. package/dist/codemode.d.ts.map +1 -0
  41. package/dist/codemode.js +5 -0
  42. package/dist/connection-Dr-Js4yZ.d.ts +28 -0
  43. package/dist/connection-Dr-Js4yZ.d.ts.map +1 -0
  44. package/dist/connection-loop-gdh22LTI.js +112 -0
  45. package/dist/connection-loop-gdh22LTI.js.map +1 -0
  46. package/dist/context-segments-BHKlagL6.js +1016 -0
  47. package/dist/context-segments-BHKlagL6.js.map +1 -0
  48. package/dist/{context-transport-T_6AYIvy.js → context-transport-DSMTUsK1.js} +3 -3
  49. package/dist/{context-transport-T_6AYIvy.js.map → context-transport-DSMTUsK1.js.map} +1 -1
  50. package/dist/contexts/daytona.d.ts +19 -8
  51. package/dist/contexts/daytona.d.ts.map +1 -1
  52. package/dist/contexts/daytona.js +1 -440
  53. package/dist/contexts/docker.d.ts +36 -7
  54. package/dist/contexts/docker.d.ts.map +1 -1
  55. package/dist/contexts/docker.js +1 -456
  56. package/dist/contexts/e2b.d.ts +68 -13
  57. package/dist/contexts/e2b.d.ts.map +1 -1
  58. package/dist/contexts/e2b.js +1 -382
  59. package/dist/contexts/sandbox.d.ts +1 -1
  60. package/dist/contexts/sandbox.js +5 -0
  61. package/dist/contexts/sandbox.js.map +1 -1
  62. package/dist/{contexts-CRE9pw07.js → contexts-d7UolYot.js} +1059 -524
  63. package/dist/contexts-d7UolYot.js.map +1 -0
  64. package/dist/contexts.d.ts +3 -3
  65. package/dist/contexts.js +1 -1
  66. package/dist/cred-keys-GpBg71cP.js +105 -0
  67. package/dist/cred-keys-GpBg71cP.js.map +1 -0
  68. package/dist/{auth-BG2rVKSt.js → credentials-JttEuRON.js} +55 -206
  69. package/dist/credentials-JttEuRON.js.map +1 -0
  70. package/dist/{cursor-iojRXHF9.js → cursor-CdjaQTBW.js} +3 -3
  71. package/dist/{cursor-iojRXHF9.js.map → cursor-CdjaQTBW.js.map} +1 -1
  72. package/dist/daemon-cli.d.ts +1 -1
  73. package/dist/daemon-cli.js +3 -2
  74. package/dist/daemon-cli.js.map +1 -1
  75. package/dist/daytona-DG3omipZ.js +513 -0
  76. package/dist/daytona-DG3omipZ.js.map +1 -0
  77. package/dist/defaults-Cx3zvDOV.js +23 -0
  78. package/dist/defaults-Cx3zvDOV.js.map +1 -0
  79. package/dist/dispatcher-BMlu2BmZ.js +4941 -0
  80. package/dist/dispatcher-BMlu2BmZ.js.map +1 -0
  81. package/dist/docker-BZhMMJUp.js +727 -0
  82. package/dist/docker-BZhMMJUp.js.map +1 -0
  83. package/dist/e2b-CEVOdRib.js +480 -0
  84. package/dist/e2b-CEVOdRib.js.map +1 -0
  85. package/dist/edit-utils-EGosADZq.js +234 -0
  86. package/dist/edit-utils-EGosADZq.js.map +1 -0
  87. package/dist/environment-8wsKE2Ln.js +214 -0
  88. package/dist/environment-8wsKE2Ln.js.map +1 -0
  89. package/dist/eval-BNcvle_J.js +1595 -0
  90. package/dist/eval-BNcvle_J.js.map +1 -0
  91. package/dist/eval.d.ts +2 -2
  92. package/dist/eval.js +1 -1489
  93. package/dist/executor-Cx5-8yqi.js +621 -0
  94. package/dist/executor-Cx5-8yqi.js.map +1 -0
  95. package/dist/extension-authoring-DyGGmq9V.js +385 -0
  96. package/dist/extension-authoring-DyGGmq9V.js.map +1 -0
  97. package/dist/extensions.d.ts +2 -2
  98. package/dist/extensions.js +3 -3
  99. package/dist/{fetch-url-DX75gpL0.js → fetch-url-Ct2TjDWt.js} +4 -4
  100. package/dist/{fetch-url-DX75gpL0.js.map → fetch-url-Ct2TjDWt.js.map} +1 -1
  101. package/dist/{format-BF745pLL.js → format-C2NQEVUH.js} +39 -2
  102. package/dist/format-C2NQEVUH.js.map +1 -0
  103. package/dist/format-bytes-C7tfc3Zm.js +55 -0
  104. package/dist/format-bytes-C7tfc3Zm.js.map +1 -0
  105. package/dist/headless-C_rNUuYC.js +960 -0
  106. package/dist/headless-C_rNUuYC.js.map +1 -0
  107. package/dist/headless.d.ts +1 -1
  108. package/dist/headless.js +1 -413
  109. package/dist/{history-search-C4bk1Wz_.js → history-search-CcYzF8-0.js} +7 -3
  110. package/dist/history-search-CcYzF8-0.js.map +1 -0
  111. package/dist/history-search-worker.d.ts +1 -1
  112. package/dist/history-search-worker.js +1 -1
  113. package/dist/host-D7NrI03V.js +378 -0
  114. package/dist/host-D7NrI03V.js.map +1 -0
  115. package/dist/host-signals-BcP5QKUD.js +118 -0
  116. package/dist/host-signals-BcP5QKUD.js.map +1 -0
  117. package/dist/identity-CwfO8K-t.js +26 -0
  118. package/dist/identity-CwfO8K-t.js.map +1 -0
  119. package/dist/{index-BgN1T3lk.d.ts → index-BGe1fQT7.d.ts} +10987 -9320
  120. package/dist/index-BGe1fQT7.d.ts.map +1 -0
  121. package/dist/index-BVQsIKGn.d.ts +448 -0
  122. package/dist/index-BVQsIKGn.d.ts.map +1 -0
  123. package/dist/{index-C6NEd5y_.d.ts → index-CHABJd-L.d.ts} +3386 -502
  124. package/dist/index-CHABJd-L.d.ts.map +1 -0
  125. package/dist/{index-C37_ppWv.d.ts → index-D6a7qXpg.d.ts} +2 -3
  126. package/dist/index-D6a7qXpg.d.ts.map +1 -0
  127. package/dist/index.d.ts +6 -6
  128. package/dist/index.js +27 -23
  129. package/dist/{completion-core-BRo86R_L.js → inline-ghost-BVRQeGoL.js} +50 -2
  130. package/dist/inline-ghost-BVRQeGoL.js.map +1 -0
  131. package/dist/ipc/remote.d.ts +313 -0
  132. package/dist/ipc/remote.d.ts.map +1 -0
  133. package/dist/ipc/remote.js +4 -0
  134. package/dist/ipc.d.ts +6 -964
  135. package/dist/ipc.js +403 -4
  136. package/dist/ipc.js.map +1 -0
  137. package/dist/{isolation-Kfoof0MM.d.ts → isolation-D9L650W5.d.ts} +100 -15
  138. package/dist/isolation-D9L650W5.d.ts.map +1 -0
  139. package/dist/json-rpc--HXQti1E.js +350 -0
  140. package/dist/json-rpc--HXQti1E.js.map +1 -0
  141. package/dist/links-j8rED1sR.js +603 -0
  142. package/dist/links-j8rED1sR.js.map +1 -0
  143. package/dist/local-terminal-D8QThwo_.js +252 -0
  144. package/dist/local-terminal-D8QThwo_.js.map +1 -0
  145. package/dist/{logger--C1VQjwJ.js → logger-Gtqlayx8.js} +199 -173
  146. package/dist/logger-Gtqlayx8.js.map +1 -0
  147. package/dist/logs-view-CWG8aUAG.js.map +1 -1
  148. package/dist/{mcp-CgNd-f3F.js → mcp-_wecH9Qe.js} +608 -562
  149. package/dist/mcp-_wecH9Qe.js.map +1 -0
  150. package/dist/mcp.d.ts +2 -2
  151. package/dist/mcp.js +2 -2
  152. package/dist/media-sniff-UKijEaiQ.js.map +1 -1
  153. package/dist/{messages-2jcOA_5R.js → messages-BqiwcD2Q.js} +1017 -1014
  154. package/dist/messages-BqiwcD2Q.js.map +1 -0
  155. package/dist/{oauth-DxHO17JE.js → oauth-Px_pBB9W.js} +5 -5
  156. package/dist/{oauth-DxHO17JE.js.map → oauth-Px_pBB9W.js.map} +1 -1
  157. package/dist/{openai-compat-Dy56weK8.js → openai-compat-CFrpH7uq.js} +432 -589
  158. package/dist/openai-compat-CFrpH7uq.js.map +1 -0
  159. package/dist/orchestration-BCGmB8Ps.js +511 -0
  160. package/dist/orchestration-BCGmB8Ps.js.map +1 -0
  161. package/dist/output/stream-json.d.ts +1 -2
  162. package/dist/output/stream-json.d.ts.map +1 -1
  163. package/dist/output/stream-json.js +1 -1
  164. package/dist/output/terminal.d.ts +1 -2
  165. package/dist/output/terminal.d.ts.map +1 -1
  166. package/dist/output/terminal.js +13 -7
  167. package/dist/output/terminal.js.map +1 -1
  168. package/dist/{plugins-gbI7SBA6.js → plugins-DS7mahzZ.js} +20 -101
  169. package/dist/plugins-DS7mahzZ.js.map +1 -0
  170. package/dist/plugins.d.ts +1 -1
  171. package/dist/plugins.js +1 -2
  172. package/dist/prelude-Cxo4t74B.js +517 -0
  173. package/dist/prelude-Cxo4t74B.js.map +1 -0
  174. package/dist/presets.d.ts +1 -1
  175. package/dist/presets.js +1 -2
  176. package/dist/project-root-B8zADr4o.js +167 -0
  177. package/dist/project-root-B8zADr4o.js.map +1 -0
  178. package/dist/project-user-paths-BSgtrRxl.js +58 -0
  179. package/dist/project-user-paths-BSgtrRxl.js.map +1 -0
  180. package/dist/{prompts-Pqc3JdW_.d.ts → prompts-DYcvqShf.d.ts} +14 -11
  181. package/dist/prompts-DYcvqShf.d.ts.map +1 -0
  182. package/dist/protocol-DnhqqSmE.js +13 -0
  183. package/dist/protocol-DnhqqSmE.js.map +1 -0
  184. package/dist/providers/anthropic.d.ts +2 -2
  185. package/dist/providers/anthropic.js +1 -2
  186. package/dist/providers/arcee.d.ts +1 -1
  187. package/dist/providers/arcee.js +1 -1
  188. package/dist/providers/baseten.d.ts +1 -1
  189. package/dist/providers/baseten.js +1 -1
  190. package/dist/providers/cerebras.d.ts +1 -1
  191. package/dist/providers/cerebras.js +3 -2
  192. package/dist/providers/cerebras.js.map +1 -1
  193. package/dist/providers/local.d.ts +1 -1
  194. package/dist/providers/local.js +1 -1
  195. package/dist/providers/openai-compat.d.ts +1 -1
  196. package/dist/providers/openai-compat.js +1 -2
  197. package/dist/providers/openai.d.ts +1 -1
  198. package/dist/providers/openai.js +15 -12
  199. package/dist/providers/openai.js.map +1 -1
  200. package/dist/providers/openrouter.d.ts +1 -1
  201. package/dist/providers/openrouter.js +3 -2
  202. package/dist/providers/openrouter.js.map +1 -1
  203. package/dist/providers/xai.d.ts +1 -1
  204. package/dist/providers/xai.js +3 -3
  205. package/dist/{providers-BVhnFyiY.js → providers-XUR7F4Hi.js} +4 -4
  206. package/dist/{providers-BVhnFyiY.js.map → providers-XUR7F4Hi.js.map} +1 -1
  207. package/dist/providers.d.ts +1 -1
  208. package/dist/providers.js +4 -4
  209. package/dist/registry-D6ShBWJU.js +5234 -0
  210. package/dist/registry-D6ShBWJU.js.map +1 -0
  211. package/dist/remote-hosts-BtA_9ZGp.js +97 -0
  212. package/dist/remote-hosts-BtA_9ZGp.js.map +1 -0
  213. package/dist/restate.d.ts +2 -3
  214. package/dist/restate.d.ts.map +1 -1
  215. package/dist/restate.js +631 -572
  216. package/dist/restate.js.map +1 -1
  217. package/dist/run-summary-CklLiZ4y.js +288 -0
  218. package/dist/run-summary-CklLiZ4y.js.map +1 -0
  219. package/dist/{sandbox-BH0WQkXn.d.ts → sandbox-C5dR5DwQ.d.ts} +6 -3
  220. package/dist/sandbox-C5dR5DwQ.d.ts.map +1 -0
  221. package/dist/session/sqlite.d.ts +1 -2
  222. package/dist/session/sqlite.d.ts.map +1 -1
  223. package/dist/session/sqlite.js +1 -616
  224. package/dist/session-factory-BUGY5P40.js +1576 -0
  225. package/dist/session-factory-BUGY5P40.js.map +1 -0
  226. package/dist/{session-BqRP1hS7.js → session-xh9JXu6i.js} +94 -52
  227. package/dist/session-xh9JXu6i.js.map +1 -0
  228. package/dist/session.d.ts +1 -1
  229. package/dist/session.js +2 -2
  230. package/dist/settings-keys-Ckf29NeM.js +677 -0
  231. package/dist/settings-keys-Ckf29NeM.js.map +1 -0
  232. package/dist/shell-path-Dqaoow2J.js +412 -0
  233. package/dist/shell-path-Dqaoow2J.js.map +1 -0
  234. package/dist/{skills-BC3dodWp.js → skills-DKqZJm4X.js} +430 -470
  235. package/dist/skills-DKqZJm4X.js.map +1 -0
  236. package/dist/skills.d.ts +2 -2
  237. package/dist/skills.js +1 -2
  238. package/dist/source-mPExaUm8.js +381 -0
  239. package/dist/source-mPExaUm8.js.map +1 -0
  240. package/dist/sqlite-DV1DQzN2.js +698 -0
  241. package/dist/sqlite-DV1DQzN2.js.map +1 -0
  242. package/dist/{src-CkNQKFKr.js → src-BRMYRJib.js} +903 -1121
  243. package/dist/src-BRMYRJib.js.map +1 -0
  244. package/dist/{stdio-DPpBDPx5.js → stdio-C6YyoW3I.js} +4 -4
  245. package/dist/{stdio-DPpBDPx5.js.map → stdio-C6YyoW3I.js.map} +1 -1
  246. package/dist/{stdio-loader-Bbx19dMZ.js → stdio-loader-C830Vg-Z.js} +4 -4
  247. package/dist/{stdio-loader-Bbx19dMZ.js.map → stdio-loader-C830Vg-Z.js.map} +1 -1
  248. package/dist/system-prompt-MNVHatSD.d.ts.map +1 -1
  249. package/dist/timeout-DEaqslLO.d.ts.map +1 -1
  250. package/dist/todo-edits-Dn251YUP.js +1790 -0
  251. package/dist/todo-edits-Dn251YUP.js.map +1 -0
  252. package/dist/{turn-operations-DrbJlpq9.js → tool-formatters-IQFDrdrs.js} +1456 -2120
  253. package/dist/tool-formatters-IQFDrdrs.js.map +1 -0
  254. package/dist/tool-state-Dku6YqAB.js +989 -0
  255. package/dist/tool-state-Dku6YqAB.js.map +1 -0
  256. package/dist/tools/fetch-url.d.ts +1 -2
  257. package/dist/tools/fetch-url.d.ts.map +1 -1
  258. package/dist/tools/fetch-url.js +1 -2
  259. package/dist/tools/prompts.d.ts +1 -1
  260. package/dist/tools/prompts.js +7 -7
  261. package/dist/tools/prompts.js.map +1 -1
  262. package/dist/tools/web-search.d.ts +1 -2
  263. package/dist/tools/web-search.d.ts.map +1 -1
  264. package/dist/tools/web-search.js +2 -2
  265. package/dist/tools/web-search.js.map +1 -1
  266. package/dist/tools-_DnT3AGM.js +578 -0
  267. package/dist/tools-_DnT3AGM.js.map +1 -0
  268. package/dist/tools.d.ts +3 -3
  269. package/dist/tools.js +4 -2
  270. package/dist/tui.d.ts +534 -517
  271. package/dist/tui.d.ts.map +1 -1
  272. package/dist/tui.js +34933 -27243
  273. package/dist/tui.js.map +1 -1
  274. package/dist/turn-operations-B8sokwi5.js +333 -0
  275. package/dist/turn-operations-B8sokwi5.js.map +1 -0
  276. package/dist/turn-operations-DQX5ZZni.d.ts +3089 -0
  277. package/dist/turn-operations-DQX5ZZni.d.ts.map +1 -0
  278. package/dist/types-C7ZFOztE.d.ts +132 -0
  279. package/dist/types-C7ZFOztE.d.ts.map +1 -0
  280. package/dist/types-CH5XpIHw.js +114 -0
  281. package/dist/types-CH5XpIHw.js.map +1 -0
  282. package/dist/{types-CWgENVLY.js → types-Cu0ZGDu9.js} +10 -6
  283. package/dist/types-Cu0ZGDu9.js.map +1 -0
  284. package/dist/types-IqegbJEE.d.ts +624 -0
  285. package/dist/types-IqegbJEE.d.ts.map +1 -0
  286. package/dist/types.d.ts +4 -4
  287. package/dist/types.js +1 -1
  288. package/dist/url-D8HCl65b.js +1259 -0
  289. package/dist/url-D8HCl65b.js.map +1 -0
  290. package/dist/wasm-BVT-j5cl.js +33 -0
  291. package/dist/wasm-BVT-j5cl.js.map +1 -0
  292. package/dist/workspace-exec-stream-SV2R9d5S.js +355 -0
  293. package/dist/workspace-exec-stream-SV2R9d5S.js.map +1 -0
  294. package/dist/ws-CIHMvlSh.js +952 -0
  295. package/dist/ws-CIHMvlSh.js.map +1 -0
  296. package/dist/ws-client-N7NxzvQp.js +230 -0
  297. package/dist/ws-client-N7NxzvQp.js.map +1 -0
  298. package/dist/{xai-CazjStOK.js → xai-CvJTeLrI.js} +165 -5
  299. package/dist/xai-CvJTeLrI.js.map +1 -0
  300. package/dist/xdg-zweed0-t.js +117 -0
  301. package/dist/xdg-zweed0-t.js.map +1 -0
  302. package/docs/ACP.md +52 -0
  303. package/docs/ARCHITECTURE.md +103 -6
  304. package/docs/ARTIFACTS.md +8 -4
  305. package/docs/CHAT.md +165 -14
  306. package/docs/EXECUTION_CONTEXT.md +8 -0
  307. package/docs/EXTENSIONS.md +123 -2
  308. package/docs/HEADLESS.md +2 -0
  309. package/docs/IPC.md +775 -64
  310. package/docs/MACHINES.md +456 -0
  311. package/docs/PANELS.md +3 -0
  312. package/docs/README.md +4 -0
  313. package/docs/RESTATE.md +3 -2
  314. package/docs/RUN_IN_BACKGROUND.md +10 -2
  315. package/docs/SERVER.md +1085 -0
  316. package/docs/SKILL.md +6 -1
  317. package/docs/TERMINAL.md +75 -0
  318. package/docs/TUI.md +65 -14
  319. package/package.json +58 -26
  320. package/scripts/eval.ts +4 -0
  321. package/dist/acp-D-tVyUjw.js.map +0 -1
  322. package/dist/agent-D0zZnGbt.js.map +0 -1
  323. package/dist/anthropic-C2aole0G.js.map +0 -1
  324. package/dist/approvals-DKaJZYlm.js.map +0 -1
  325. package/dist/atomic-write-B7zr1ddF.js.map +0 -1
  326. package/dist/auth-BG2rVKSt.js.map +0 -1
  327. package/dist/completion-core-BRo86R_L.js.map +0 -1
  328. package/dist/contexts/daytona.js.map +0 -1
  329. package/dist/contexts/docker.js.map +0 -1
  330. package/dist/contexts/e2b.js.map +0 -1
  331. package/dist/contexts-CRE9pw07.js.map +0 -1
  332. package/dist/eval.js.map +0 -1
  333. package/dist/format-BF745pLL.js.map +0 -1
  334. package/dist/glob-DluQFSw1.js +0 -270
  335. package/dist/glob-DluQFSw1.js.map +0 -1
  336. package/dist/headless.js.map +0 -1
  337. package/dist/history-search-C4bk1Wz_.js.map +0 -1
  338. package/dist/index-BgN1T3lk.d.ts.map +0 -1
  339. package/dist/index-C37_ppWv.d.ts.map +0 -1
  340. package/dist/index-C6NEd5y_.d.ts.map +0 -1
  341. package/dist/ipc-BKVIIOqH.js +0 -331
  342. package/dist/ipc-BKVIIOqH.js.map +0 -1
  343. package/dist/ipc.d.ts.map +0 -1
  344. package/dist/isolation-Kfoof0MM.d.ts.map +0 -1
  345. package/dist/json-rpc-rSWMUh9b.js +0 -192
  346. package/dist/json-rpc-rSWMUh9b.js.map +0 -1
  347. package/dist/logger--C1VQjwJ.js.map +0 -1
  348. package/dist/mcp-CgNd-f3F.js.map +0 -1
  349. package/dist/messages-2jcOA_5R.js.map +0 -1
  350. package/dist/openai-compat-Dy56weK8.js.map +0 -1
  351. package/dist/output-cap-C9zukcCj.js +0 -100
  352. package/dist/output-cap-C9zukcCj.js.map +0 -1
  353. package/dist/panels-B6gRk4bf.js +0 -789
  354. package/dist/panels-B6gRk4bf.js.map +0 -1
  355. package/dist/plugins-gbI7SBA6.js.map +0 -1
  356. package/dist/prompts-Pqc3JdW_.d.ts.map +0 -1
  357. package/dist/run-summary-BU_NgwUT.js +0 -269
  358. package/dist/run-summary-BU_NgwUT.js.map +0 -1
  359. package/dist/sandbox-BH0WQkXn.d.ts.map +0 -1
  360. package/dist/session/sqlite.js.map +0 -1
  361. package/dist/session-BqRP1hS7.js.map +0 -1
  362. package/dist/shell-path-DfdXrGg9.js +0 -1549
  363. package/dist/shell-path-DfdXrGg9.js.map +0 -1
  364. package/dist/skills-BC3dodWp.js.map +0 -1
  365. package/dist/src-CkNQKFKr.js.map +0 -1
  366. package/dist/todo-edits-UOwgxGKu.js +0 -528
  367. package/dist/todo-edits-UOwgxGKu.js.map +0 -1
  368. package/dist/tool-formatters-DoRLnfuD.d.ts +0 -759
  369. package/dist/tool-formatters-DoRLnfuD.d.ts.map +0 -1
  370. package/dist/transcript-anchors-BeudMbXx.d.ts +0 -1762
  371. package/dist/transcript-anchors-BeudMbXx.d.ts.map +0 -1
  372. package/dist/turn-operations-C8bMBDl_.d.ts +0 -1258
  373. package/dist/turn-operations-C8bMBDl_.d.ts.map +0 -1
  374. package/dist/turn-operations-DrbJlpq9.js.map +0 -1
  375. package/dist/types-CWgENVLY.js.map +0 -1
  376. package/dist/xai-CazjStOK.js.map +0 -1
@@ -1,528 +0,0 @@
1
- //#region src/chat/auth-rows.ts
2
- /**
3
- * Stored credentials, i.e. the ones a user can actually choose between.
4
- *
5
- * `env` is excluded: it is observed rather than stored, and is usually just the
6
- * mirror `applyApiKeyEnv` wrote from the stored API key, so counting it would
7
- * advertise a choice that does not exist.
8
- */
9
- function selectableSources(provider) {
10
- return provider.methods.filter((m) => m.source !== "env");
11
- }
12
- /** A provider earns a chevron only when there is a real choice to reveal. */
13
- function isExpandableProvider(provider) {
14
- return selectableSources(provider).length > 1;
15
- }
16
- /**
17
- * Flatten the provider list plus the expanded set into the visible-row list.
18
- *
19
- * - `providers` — filtered / ordered provider list (post-search).
20
- * - `expanded` — keys of providers whose sources are open. Keys for
21
- * providers that are no longer expandable are ignored rather
22
- * than cleaned up, so stale expansion state (a credential
23
- * removed while the modal is open) can't desync the cursor.
24
- */
25
- function buildVisibleAuthRows(providers, expanded) {
26
- const out = [];
27
- for (const provider of providers) {
28
- const expandable = isExpandableProvider(provider);
29
- out.push({
30
- kind: "provider",
31
- provider,
32
- expandable
33
- });
34
- if (!expandable || !expanded.has(provider.key)) continue;
35
- for (const method of selectableSources(provider)) out.push({
36
- kind: "source",
37
- providerKey: provider.key,
38
- method
39
- });
40
- if (provider.envKey) {
41
- const envMethod = provider.methods.find((m) => m.source === "env");
42
- out.push({
43
- kind: "source",
44
- providerKey: provider.key,
45
- method: envMethod ?? {
46
- source: "env",
47
- detail: provider.envKey,
48
- active: false
49
- }
50
- });
51
- }
52
- }
53
- return out;
54
- }
55
- /**
56
- * Provider key a row "belongs to" — its own for a provider header, the parent's
57
- * for a source row.
58
- */
59
- function parentProviderKey(row) {
60
- return row.kind === "provider" ? row.provider.key : row.providerKey;
61
- }
62
- /**
63
- * Index in `rows` of the header for the given provider key, or `-1`.
64
- *
65
- * Collapse handlers snap the cursor up to the parent BEFORE the row list
66
- * shrinks; without that the cursor keeps its flat index and silently lands on
67
- * whichever sibling row slid into that slot.
68
- */
69
- function indexOfProviderRow(rows, providerKey) {
70
- return rows.findIndex((r) => r.kind === "provider" && r.provider.key === providerKey);
71
- }
72
- //#endregion
73
- //#region src/chat/instruction-rows.ts
74
- /**
75
- * Upper bound on preview lines rendered for one expanded segment. Mirrors the
76
- * Logs tab's render cap: the scrollbox can hold arbitrary height, but pasting a
77
- * runaway 64KB instruction file into the layout pass is a waste of a frame.
78
- * File-backed segments have `$EDITOR` as the escape hatch for the remainder.
79
- */
80
- const INSTRUCTION_PREVIEW_LINE_CAP = 400;
81
- /**
82
- * Filter segments by the active query and resolve each one's expanded state.
83
- *
84
- * Deliberately does NOT auto-expand matches the way the Extensions tab does:
85
- * the search corpus includes each segment's full text, so a query typically
86
- * matches deep inside a long document — auto-expanding every hit would dump
87
- * thousands of lines into the viewport on a keystroke. The user expands the row
88
- * they care about.
89
- */
90
- function buildVisibleInstructionRows(opts) {
91
- const { segments, expanded, queryActive, matchSegment } = opts;
92
- const out = [];
93
- for (const segment of segments) {
94
- if (queryActive && !matchSegment(segment)) continue;
95
- out.push({
96
- segment,
97
- expanded: expanded.has(segment.id)
98
- });
99
- }
100
- return out;
101
- }
102
- /**
103
- * Split a segment's text into renderable preview lines, clamped to
104
- * {@link INSTRUCTION_PREVIEW_LINE_CAP}.
105
- *
106
- * `hidden` is how many lines were dropped off the tail, so the view can render
107
- * an honest "+N more lines" marker instead of silently truncating. Tabs are
108
- * expanded to two spaces because the terminal text renderable doesn't
109
- * interpret `\t`, and `\r` is stripped so CRLF files don't leave artefacts at
110
- * every line end.
111
- */
112
- function instructionPreviewLines(text) {
113
- const all = text.replace(/\r\n?/g, "\n").replace(/\t/g, " ").split("\n");
114
- while (all.length > 0 && all[all.length - 1].trim() === "") all.pop();
115
- if (all.length <= 400) return {
116
- lines: all,
117
- hidden: 0
118
- };
119
- return {
120
- lines: all.slice(0, 400),
121
- hidden: all.length - 400
122
- };
123
- }
124
- /**
125
- * Short badge for a segment's origin — the "where does this come from" column.
126
- * `'file'` is intentionally the only one that reads like a location, since it's
127
- * the only origin the user can act on.
128
- */
129
- function instructionOriginBadge(segment) {
130
- switch (segment.origin) {
131
- case "file": return "file";
132
- case "generated": return "generated";
133
- case "mcp": return "mcp server";
134
- case "built-in": return "built-in";
135
- }
136
- }
137
- //#endregion
138
- //#region src/chat/mcp-form.ts
139
- const MCP_TRANSPORTS = [
140
- "stdio",
141
- "streamable-http",
142
- "sse"
143
- ];
144
- /**
145
- * Validate + normalize the raw field values into a config entry.
146
- * Returns the first problem in row order so the dialog can surface it.
147
- */
148
- function validateMcpForm(values) {
149
- const name = values.name.trim();
150
- if (name.length === 0) return {
151
- ok: false,
152
- error: "name is required"
153
- };
154
- if (!/^[\w.-]+$/.test(name)) return {
155
- ok: false,
156
- error: "name must be alphanumerics, dots, hyphens, underscores"
157
- };
158
- if (values.transport === "stdio") {
159
- const tokens = splitCommandLine(values.commandLine);
160
- if (tokens.length === 0) return {
161
- ok: false,
162
- error: "command is required for stdio servers"
163
- };
164
- const env = parseKeyValueLines(values.env, {
165
- label: "env",
166
- separators: ["="]
167
- });
168
- if (!env.ok) return {
169
- ok: false,
170
- error: env.error
171
- };
172
- return {
173
- ok: true,
174
- result: {
175
- entry: {
176
- name,
177
- transport: "stdio",
178
- command: tokens[0],
179
- ...tokens.length > 1 ? { args: tokens.slice(1) } : {},
180
- ...Object.keys(env.pairs).length > 0 ? { env: env.pairs } : {}
181
- },
182
- scope: values.scope
183
- }
184
- };
185
- }
186
- const url = values.url.trim();
187
- if (url.length === 0) return {
188
- ok: false,
189
- error: "url is required for http/sse servers"
190
- };
191
- if (!/^https?:\/\//.test(url)) return {
192
- ok: false,
193
- error: "url must start with http:// or https://"
194
- };
195
- const headers = parseKeyValueLines(values.headers, {
196
- label: "headers",
197
- separators: [":", "="]
198
- });
199
- if (!headers.ok) return {
200
- ok: false,
201
- error: headers.error
202
- };
203
- return {
204
- ok: true,
205
- result: {
206
- entry: {
207
- name,
208
- transport: values.transport,
209
- url,
210
- ...Object.keys(headers.pairs).length > 0 ? { headers: headers.pairs } : {}
211
- },
212
- scope: values.scope
213
- }
214
- };
215
- }
216
- /**
217
- * Split a command line into tokens, honoring single/double quotes so
218
- * `npx -y my-server --root "/path with spaces"` round-trips. No escape
219
- * processing beyond quote grouping — this is a form field, not a shell.
220
- */
221
- function splitCommandLine(line) {
222
- const out = [];
223
- const re = /"([^"]*)"|'([^']*)'|(\S+)/g;
224
- for (let m = re.exec(line); m !== null; m = re.exec(line)) out.push(m[1] ?? m[2] ?? m[3]);
225
- return out;
226
- }
227
- /**
228
- * Parse one key/value pair PER LINE. Line-based (not whitespace-split)
229
- * because values legitimately contain spaces — `Authorization: Bearer
230
- * abc123` is the canonical headers case, and env values like
231
- * `GREETING=hello world` are equally valid. The first separator found
232
- * (in `separators` priority order, `:` before `=` for headers) splits;
233
- * the rest of the line is the value, trimmed. Blank lines skipped.
234
- */
235
- function parseKeyValueLines(raw, opts) {
236
- const pairs = {};
237
- for (const line of raw.split("\n")) {
238
- const trimmed = line.trim();
239
- if (trimmed.length === 0) continue;
240
- let splitAt = -1;
241
- for (const sep of opts.separators) {
242
- const idx = trimmed.indexOf(sep);
243
- if (idx > 0 && (splitAt === -1 || idx < splitAt)) splitAt = idx;
244
- }
245
- if (splitAt <= 0) {
246
- const forms = opts.separators.map((s) => `KEY${s}VALUE`).join(" or ");
247
- return {
248
- ok: false,
249
- error: `${opts.label} entries must be ${forms}, one per line (got "${trimmed}")`
250
- };
251
- }
252
- const key = trimmed.slice(0, splitAt).trim();
253
- const value = trimmed.slice(splitAt + 1).trim();
254
- if (key.length === 0) return {
255
- ok: false,
256
- error: `${opts.label} entry has an empty key ("${trimmed}")`
257
- };
258
- pairs[key] = value;
259
- }
260
- return {
261
- ok: true,
262
- pairs
263
- };
264
- }
265
- //#endregion
266
- //#region src/chat/notice-format.ts
267
- /** Leading glyph per severity. `info` is deliberately quiet — a middle dot. */
268
- const NOTICE_GLYPH = {
269
- info: "·",
270
- warn: "!",
271
- error: "✗"
272
- };
273
- //#endregion
274
- //#region src/chat/panels.ts
275
- const INBOX_PANEL_ID = "inbox";
276
- const TODOS_PANEL_ID = "todos";
277
- const ARTIFACTS_PANEL_ID = "artifacts";
278
- const DIFFS_PANEL_ID = "diffs";
279
- const FILES_PANEL_ID = "files";
280
- const BUILTIN_PANEL_TABS = [
281
- {
282
- id: INBOX_PANEL_ID,
283
- label: "Inbox",
284
- icon: {
285
- gui: "i-ph-tray",
286
- tui: "✉"
287
- },
288
- builtin: true
289
- },
290
- {
291
- id: TODOS_PANEL_ID,
292
- label: "Todos",
293
- icon: {
294
- gui: "i-ph-list-checks",
295
- tui: "▣"
296
- },
297
- builtin: true
298
- },
299
- {
300
- id: ARTIFACTS_PANEL_ID,
301
- label: "Artifacts",
302
- icon: {
303
- gui: "i-ph-cube",
304
- tui: "◆"
305
- },
306
- builtin: true
307
- },
308
- {
309
- id: DIFFS_PANEL_ID,
310
- label: "Diffs",
311
- icon: {
312
- gui: "i-ph-git-diff",
313
- tui: "±"
314
- },
315
- builtin: true
316
- },
317
- {
318
- id: FILES_PANEL_ID,
319
- label: "Files",
320
- icon: {
321
- gui: "i-ph-tree-structure",
322
- tui: "▤"
323
- },
324
- builtin: true
325
- }
326
- ];
327
- /** Built-ins first, then extension panels in registry (load) order. */
328
- function buildPanelCatalog(extensionPanels, options = {}) {
329
- const tabs = [];
330
- for (const tab of BUILTIN_PANEL_TABS) {
331
- if (tab.id === "artifacts" && options.showArtifacts === false) continue;
332
- if (options.omitBuiltins?.includes(tab.id)) continue;
333
- tabs.push(tab);
334
- }
335
- const seen = new Set(tabs.map((t) => t.id));
336
- for (const p of extensionPanels) {
337
- if (seen.has(p.id)) continue;
338
- seen.add(p.id);
339
- tabs.push({
340
- id: p.id,
341
- label: p.label,
342
- builtin: false,
343
- owner: p.owner,
344
- ...p.icon ? { icon: p.icon } : {}
345
- });
346
- }
347
- return tabs;
348
- }
349
- const INITIAL_PANEL_STATE = {
350
- open: false,
351
- activeId: null,
352
- userPicks: 0,
353
- proactiveAt: 0
354
- };
355
- /** Add a tab to the host's pinned strip (idempotent, keeps order). */
356
- function pinTab(pinned, id) {
357
- return pinned.includes(id) ? pinned : [...pinned, id];
358
- }
359
- /** The user clicked a tab (or a keybinding cycled to it). Always honoured, always opens. */
360
- function pickTab(state, id) {
361
- return {
362
- ...state,
363
- open: true,
364
- activeId: id,
365
- userPicks: state.userPicks + 1
366
- };
367
- }
368
- function togglePanel(state) {
369
- return {
370
- ...state,
371
- open: !state.open
372
- };
373
- }
374
- function closePanel(state) {
375
- return {
376
- ...state,
377
- open: false
378
- };
379
- }
380
- /**
381
- * Agent / extension asked to show a tab. Honoured only until the user has
382
- * picked a tab themselves (a badge that flipped must never steal the tab);
383
- * otherwise the request is dropped and the state returned unchanged.
384
- */
385
- function openProactive(state, id) {
386
- if (state.userPicks !== state.proactiveAt) return state;
387
- return {
388
- ...state,
389
- open: true,
390
- activeId: id
391
- };
392
- }
393
- /**
394
- * The agent is blocked on the user (a plan to approve, a question to
395
- * answer): show the tab regardless of earlier picks. Costs at most a tab
396
- * switch, and nothing in that tab decides implicitly. Not a user pick, so
397
- * it does not lock out later proactive opens.
398
- */
399
- function openForAttention(state, id) {
400
- if (state.open && state.activeId === id) return state;
401
- return {
402
- ...state,
403
- open: true,
404
- activeId: id
405
- };
406
- }
407
- /**
408
- * Resolve the tab to render: the active one when it still exists, else the
409
- * first tab, else `null` (empty catalog). Keeps state stable when an
410
- * extension is disabled and its tab vanishes.
411
- */
412
- function resolveActiveTab(state, catalog) {
413
- if (catalog.length === 0) return null;
414
- return catalog.find((t) => t.id === state.activeId) ?? catalog[0];
415
- }
416
- /** Cycle to the next / previous tab (wraps). Counts as a user pick. */
417
- function cycleTab(state, catalog, direction) {
418
- if (catalog.length === 0) return state;
419
- const current = resolveActiveTab(state, catalog);
420
- const next = catalog[((current ? catalog.findIndex((t) => t.id === current.id) : 0) + direction + catalog.length) % catalog.length];
421
- return pickTab(state, next.id);
422
- }
423
- //#endregion
424
- //#region src/chat/todo-edits.ts
425
- /**
426
- * Prefix for ids minted here, distinguishing user-authored rows from the
427
- * model's own ids in a session file. Purely diagnostic — nothing branches on
428
- * it — but it makes "who added this" answerable after the fact.
429
- */
430
- const USER_TODO_ID_PREFIX = "user-";
431
- /**
432
- * Mint an id that cannot collide with an existing row.
433
- *
434
- * Counter-based rather than random: a stable, readable id keeps session diffs
435
- * legible, and the collision check makes it safe against ids the model already
436
- * used (including previous `user-*` ones after a reload).
437
- */
438
- function nextTodoId(items) {
439
- const taken = new Set(items.map((i) => i.id));
440
- for (let n = 1;; n++) {
441
- const id = `${USER_TODO_ID_PREFIX}${n}`;
442
- if (!taken.has(id)) return id;
443
- }
444
- }
445
- /**
446
- * Append a todo. Returns the list unchanged when `content` is blank — an empty
447
- * row is never what the user meant, and rejecting it here means every caller
448
- * (keyboard, click, future GUI) gets the same guard.
449
- */
450
- function addTodo(items, content) {
451
- const trimmed = content.trim();
452
- if (!trimmed) return [...items];
453
- return [...items, {
454
- id: nextTodoId(items),
455
- content: trimmed,
456
- status: "pending"
457
- }];
458
- }
459
- /**
460
- * Replace one todo's text. Blank content is rejected (see {@link addTodo}); an
461
- * unknown id is a no-op rather than an error, because the list can be replaced
462
- * by a `todowrite` between render and keypress.
463
- */
464
- function editTodo(items, id, content) {
465
- const trimmed = content.trim();
466
- if (!trimmed) return [...items];
467
- return items.map((item) => item.id === id ? {
468
- ...item,
469
- content: trimmed
470
- } : item);
471
- }
472
- /** Drop one todo. Unknown id is a no-op, same rationale as {@link editTodo}. */
473
- function removeTodo(items, id) {
474
- return items.filter((item) => item.id !== id);
475
- }
476
- /** Drop everything. Separate from `removeTodo` so the caller's intent is explicit at the call site. */
477
- function clearTodos() {
478
- return [];
479
- }
480
- /**
481
- * Advance a todo's status one step: pending → in_progress → completed →
482
- * pending. `cancelled` also lands on `pending`, so a dropped item can be
483
- * revived without a dedicated key.
484
- *
485
- * Cycling INTO `in_progress` demotes any other in-progress row to `pending`:
486
- * the list's whole purpose is "what is being worked on right now", and two
487
- * live rows make that unanswerable — `TodoIndicator`'s successor
488
- * (`todoProgressLabel`) reads the first one and would silently ignore the rest.
489
- */
490
- function cycleTodoStatus(items, id) {
491
- const target = items.find((item) => item.id === id);
492
- if (!target) return [...items];
493
- const next = nextStatus(target.status);
494
- return items.map((item) => {
495
- if (item.id === id) return {
496
- ...item,
497
- status: next
498
- };
499
- if (next === "in_progress" && item.status === "in_progress") return {
500
- ...item,
501
- status: "pending"
502
- };
503
- return item;
504
- });
505
- }
506
- function nextStatus(status) {
507
- switch (status) {
508
- case "pending": return "in_progress";
509
- case "in_progress": return "completed";
510
- default: return "pending";
511
- }
512
- }
513
- /**
514
- * Steering text for a "retry this todo" request.
515
- *
516
- * Quotes the content so a model reading it can match the row verbatim against
517
- * its own list, and names the status because "retry" means different things
518
- * for a row it believes is `completed` versus one it abandoned as `cancelled`.
519
- * Shared by the TUI and GUI modals so both surfaces steer with byte-identical
520
- * text; pinned by a test rather than living inside a JSX callback.
521
- */
522
- function buildTodoRetryMessage(item) {
523
- return `Retry this todo (currently ${item.status}): "${item.content}"`;
524
- }
525
- //#endregion
526
- export { buildVisibleInstructionRows as A, togglePanel as C, splitCommandLine as D, parseKeyValueLines as E, isExpandableProvider as F, parentProviderKey as I, selectableSources as L, instructionPreviewLines as M, buildVisibleAuthRows as N, validateMcpForm as O, indexOfProviderRow as P, resolveActiveTab as S, MCP_TRANSPORTS as T, cycleTab as _, editTodo as a, pickTab as b, ARTIFACTS_PANEL_ID as c, FILES_PANEL_ID as d, INBOX_PANEL_ID as f, closePanel as g, buildPanelCatalog as h, cycleTodoStatus as i, instructionOriginBadge as j, INSTRUCTION_PREVIEW_LINE_CAP as k, BUILTIN_PANEL_TABS as l, TODOS_PANEL_ID as m, buildTodoRetryMessage as n, nextTodoId as o, INITIAL_PANEL_STATE as p, clearTodos as r, removeTodo as s, addTodo as t, DIFFS_PANEL_ID as u, openForAttention as v, NOTICE_GLYPH as w, pinTab as x, openProactive as y };
527
-
528
- //# sourceMappingURL=todo-edits-UOwgxGKu.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"todo-edits-UOwgxGKu.js","names":[],"sources":["../src/chat/auth-rows.ts","../src/chat/instruction-rows.ts","../src/chat/mcp-form.ts","../src/chat/notice-format.ts","../src/chat/panels.ts","../src/chat/todo-edits.ts"],"sourcesContent":["/**\n * Renderer-agnostic data model for the Authentication settings list when a\n * provider holds more than one credential source.\n *\n * Mirrors `chat/mcp-rows.ts` deliberately: a flat row list plus a single\n * integer cursor that walks both provider headers AND their nested source\n * rows, so a renderer iterates once and never needs separate \"which provider\n * am I on / which source inside it\" state.\n *\n * Lives in `chat/` rather than `tui/` for the same reason as the MCP model —\n * the flattening and cursor arithmetic are pure, and pure means they can be\n * asserted directly instead of through a rendered modal.\n *\n * A provider is only expandable when it has MORE THAN ONE source. Single-source\n * providers (the overwhelming majority) stay exactly as they were: one row, no\n * chevron, no expansion state. That keeps the list quiet and means this model\n * changes nothing for anyone who hasn't stacked two credentials.\n */\n\nimport type { AuthMethod, ProviderAuth } from './auth'\n\n/**\n * One row in the flattened Authentication list. Two kinds:\n *\n * - `'provider'` — provider header with label, configured badge, and (when\n * expandable) the chevron. Always present.\n * - `'source'` — one credential source belonging to the provider above.\n * Present only while that provider is expanded.\n */\nexport type VisibleAuthRow\n = | { kind: 'provider', provider: ProviderAuth, expandable: boolean }\n | { kind: 'source', providerKey: string, method: AuthMethod }\n\n/**\n * Stored credentials, i.e. the ones a user can actually choose between.\n *\n * `env` is excluded: it is observed rather than stored, and is usually just the\n * mirror `applyApiKeyEnv` wrote from the stored API key, so counting it would\n * advertise a choice that does not exist.\n */\nexport function selectableSources(provider: ProviderAuth): AuthMethod[] {\n return provider.methods.filter(m => m.source !== 'env')\n}\n\n/** A provider earns a chevron only when there is a real choice to reveal. */\nexport function isExpandableProvider(provider: ProviderAuth): boolean {\n return selectableSources(provider).length > 1\n}\n\n/**\n * Flatten the provider list plus the expanded set into the visible-row list.\n *\n * - `providers` — filtered / ordered provider list (post-search).\n * - `expanded` — keys of providers whose sources are open. Keys for\n * providers that are no longer expandable are ignored rather\n * than cleaned up, so stale expansion state (a credential\n * removed while the modal is open) can't desync the cursor.\n */\nexport function buildVisibleAuthRows(\n providers: readonly ProviderAuth[],\n expanded: ReadonlySet<string>,\n): VisibleAuthRow[] {\n const out: VisibleAuthRow[] = []\n for (const provider of providers) {\n const expandable = isExpandableProvider(provider)\n out.push({ kind: 'provider', provider, expandable })\n if (!expandable || !expanded.has(provider.key))\n continue\n for (const method of selectableSources(provider))\n out.push({ kind: 'source', providerKey: provider.key, method })\n // The env slot is listed for context whenever the provider declares one,\n // present or not. It disappears from `methods` the moment a stored OAuth\n // grant wins (`applyApiKeyEnv` clears the var so the refresh path reads the\n // file), and a row that vanishes on selection reads as a bug.\n if (provider.envKey) {\n const envMethod = provider.methods.find(m => m.source === 'env')\n out.push({\n kind: 'source',\n providerKey: provider.key,\n method: envMethod ?? { source: 'env', detail: provider.envKey, active: false },\n })\n }\n }\n return out\n}\n\n/**\n * Provider key a row \"belongs to\" — its own for a provider header, the parent's\n * for a source row.\n */\nexport function parentProviderKey(row: VisibleAuthRow): string {\n return row.kind === 'provider' ? row.provider.key : row.providerKey\n}\n\n/**\n * Index in `rows` of the header for the given provider key, or `-1`.\n *\n * Collapse handlers snap the cursor up to the parent BEFORE the row list\n * shrinks; without that the cursor keeps its flat index and silently lands on\n * whichever sibling row slid into that slot.\n */\nexport function indexOfProviderRow(rows: readonly VisibleAuthRow[], providerKey: string): number {\n return rows.findIndex(r => r.kind === 'provider' && r.provider.key === providerKey)\n}\n","/**\n * Renderer-agnostic visible-row model for the Settings → Instructions tab.\n *\n * Simpler than the MCP / extension row models next door: a segment's expanded\n * TEXT is rendered inside its own row box rather than as sibling rows, so the\n * cursor walks one slot per segment no matter how long the text is. Expanding a\n * 1500-line AGENTS.md must not turn ↓ into 1500 keypresses.\n *\n * Pure (no OpenTUI / React) so the filtering + preview clamping is\n * unit-testable.\n */\n\nimport type { ContextSegment } from './context-segments'\n\n/**\n * Upper bound on preview lines rendered for one expanded segment. Mirrors the\n * Logs tab's render cap: the scrollbox can hold arbitrary height, but pasting a\n * runaway 64KB instruction file into the layout pass is a waste of a frame.\n * File-backed segments have `$EDITOR` as the escape hatch for the remainder.\n */\nexport const INSTRUCTION_PREVIEW_LINE_CAP = 400\n\n/** One selectable row: a context segment, plus its resolved open state. */\nexport interface VisibleInstructionRow {\n segment: ContextSegment\n expanded: boolean\n}\n\nexport interface BuildVisibleInstructionRowsOptions {\n segments: readonly ContextSegment[]\n /** Segment ids the user has expanded. */\n expanded: ReadonlySet<string>\n /** True when a search query is active. */\n queryActive: boolean\n /** Whether a segment matches the query. Ignored when `queryActive` is false. */\n matchSegment: (segment: ContextSegment) => boolean\n}\n\n/**\n * Filter segments by the active query and resolve each one's expanded state.\n *\n * Deliberately does NOT auto-expand matches the way the Extensions tab does:\n * the search corpus includes each segment's full text, so a query typically\n * matches deep inside a long document — auto-expanding every hit would dump\n * thousands of lines into the viewport on a keystroke. The user expands the row\n * they care about.\n */\nexport function buildVisibleInstructionRows(\n opts: BuildVisibleInstructionRowsOptions,\n): VisibleInstructionRow[] {\n const { segments, expanded, queryActive, matchSegment } = opts\n const out: VisibleInstructionRow[] = []\n for (const segment of segments) {\n if (queryActive && !matchSegment(segment))\n continue\n out.push({ segment, expanded: expanded.has(segment.id) })\n }\n return out\n}\n\n/**\n * Split a segment's text into renderable preview lines, clamped to\n * {@link INSTRUCTION_PREVIEW_LINE_CAP}.\n *\n * `hidden` is how many lines were dropped off the tail, so the view can render\n * an honest \"+N more lines\" marker instead of silently truncating. Tabs are\n * expanded to two spaces because the terminal text renderable doesn't\n * interpret `\\t`, and `\\r` is stripped so CRLF files don't leave artefacts at\n * every line end.\n */\nexport function instructionPreviewLines(text: string): { lines: string[], hidden: number } {\n const all = text.replace(/\\r\\n?/g, '\\n').replace(/\\t/g, ' ').split('\\n')\n // Trailing blank lines carry no information in a preview and would render as\n // dead space under the last line of a file that ends with a newline.\n while (all.length > 0 && all[all.length - 1]!.trim() === '')\n all.pop()\n if (all.length <= INSTRUCTION_PREVIEW_LINE_CAP)\n return { lines: all, hidden: 0 }\n return {\n lines: all.slice(0, INSTRUCTION_PREVIEW_LINE_CAP),\n hidden: all.length - INSTRUCTION_PREVIEW_LINE_CAP,\n }\n}\n\n/**\n * Short badge for a segment's origin — the \"where does this come from\" column.\n * `'file'` is intentionally the only one that reads like a location, since it's\n * the only origin the user can act on.\n */\nexport function instructionOriginBadge(segment: ContextSegment): string {\n switch (segment.origin) {\n case 'file':\n return 'file'\n case 'generated':\n return 'generated'\n case 'mcp':\n return 'mcp server'\n case 'built-in':\n return 'built-in'\n }\n}\n","/**\n * Add-MCP form model — values, validation, and the two tokenizers it depends\n * on. Renderer-agnostic and node-free.\n *\n * Lives in `chat/` because BOTH clients render this form (the TUI's\n * `settings-form-dialog`, the GUI's `McpsPanel`). It used to exist as two\n * copies that had already diverged in formatting; validation is the one place\n * a divergence would matter, because it decides which MCP configs each surface\n * accepts. One implementation means the same `mcps.json` entry is accepted or\n * rejected identically everywhere.\n */\nimport type { McpServerConfig } from '../types'\n\n/** Where a written MCP entry lands. */\nexport type InstallScopeChoice = 'user' | 'project'\n\nexport type McpTransport = 'stdio' | 'streamable-http' | 'sse'\n\nexport const MCP_TRANSPORTS: readonly McpTransport[] = ['stdio', 'streamable-http', 'sse']\n\nexport interface McpFormValues {\n name: string\n transport: McpTransport\n /** stdio: full command line (first token = command, rest = args). */\n commandLine: string\n /** http/sse: server URL. */\n url: string\n /** One `KEY=VALUE` per line — stdio only. Values may contain spaces. */\n env: string\n /** One `Name: value` (or `Name=value`) per line — http/sse only. */\n headers: string\n scope: InstallScopeChoice\n}\n\nexport interface McpFormResult {\n entry: McpServerConfig\n scope: InstallScopeChoice\n}\n\n/**\n * Validate + normalize the raw field values into a config entry.\n * Returns the first problem in row order so the dialog can surface it.\n */\nexport function validateMcpForm(values: McpFormValues): { ok: true, result: McpFormResult } | { ok: false, error: string } {\n const name = values.name.trim()\n if (name.length === 0)\n return { ok: false, error: 'name is required' }\n if (!/^[\\w.-]+$/.test(name))\n return { ok: false, error: 'name must be alphanumerics, dots, hyphens, underscores' }\n\n if (values.transport === 'stdio') {\n const tokens = splitCommandLine(values.commandLine)\n if (tokens.length === 0)\n return { ok: false, error: 'command is required for stdio servers' }\n const env = parseKeyValueLines(values.env, { label: 'env', separators: ['='] })\n if (!env.ok)\n return { ok: false, error: env.error }\n const entry: McpServerConfig = {\n name,\n transport: 'stdio',\n command: tokens[0] as string,\n ...(tokens.length > 1 ? { args: tokens.slice(1) } : {}),\n ...(Object.keys(env.pairs).length > 0 ? { env: env.pairs } : {}),\n }\n return { ok: true, result: { entry, scope: values.scope } }\n }\n\n const url = values.url.trim()\n if (url.length === 0)\n return { ok: false, error: 'url is required for http/sse servers' }\n if (!/^https?:\\/\\//.test(url))\n return { ok: false, error: 'url must start with http:// or https://' }\n const headers = parseKeyValueLines(values.headers, { label: 'headers', separators: [':', '='] })\n if (!headers.ok)\n return { ok: false, error: headers.error }\n return {\n ok: true,\n result: {\n entry: {\n name,\n transport: values.transport,\n url,\n ...(Object.keys(headers.pairs).length > 0 ? { headers: headers.pairs } : {}),\n },\n scope: values.scope,\n },\n }\n}\n\n/**\n * Split a command line into tokens, honoring single/double quotes so\n * `npx -y my-server --root \"/path with spaces\"` round-trips. No escape\n * processing beyond quote grouping — this is a form field, not a shell.\n */\nexport function splitCommandLine(line: string): string[] {\n const out: string[] = []\n const re = /\"([^\"]*)\"|'([^']*)'|(\\S+)/g\n for (let m = re.exec(line); m !== null; m = re.exec(line))\n out.push((m[1] ?? m[2] ?? m[3]) as string)\n return out\n}\n\n/**\n * Parse one key/value pair PER LINE. Line-based (not whitespace-split)\n * because values legitimately contain spaces — `Authorization: Bearer\n * abc123` is the canonical headers case, and env values like\n * `GREETING=hello world` are equally valid. The first separator found\n * (in `separators` priority order, `:` before `=` for headers) splits;\n * the rest of the line is the value, trimmed. Blank lines skipped.\n */\nexport function parseKeyValueLines(\n raw: string,\n opts: { label: string, separators: readonly string[] },\n): { ok: true, pairs: Record<string, string> } | { ok: false, error: string } {\n const pairs: Record<string, string> = {}\n for (const line of raw.split('\\n')) {\n const trimmed = line.trim()\n if (trimmed.length === 0)\n continue\n let splitAt = -1\n for (const sep of opts.separators) {\n const idx = trimmed.indexOf(sep)\n if (idx > 0 && (splitAt === -1 || idx < splitAt))\n splitAt = idx\n }\n if (splitAt <= 0) {\n const forms = opts.separators.map(s => `KEY${s}VALUE`).join(' or ')\n return { ok: false, error: `${opts.label} entries must be ${forms}, one per line (got \"${trimmed}\")` }\n }\n const key = trimmed.slice(0, splitAt).trim()\n const value = trimmed.slice(splitAt + 1).trim()\n if (key.length === 0)\n return { ok: false, error: `${opts.label} entry has an empty key (\"${trimmed}\")` }\n pairs[key] = value\n }\n return { ok: true, pairs }\n}\n","/**\n * Presentation constants for structured transcript notices (`StreamEvent.notice`).\n *\n * Shared by the TUI transcript and the GUI timeline so a `warn` notice reads\n * with the same glyph on both, and so the label vocabulary (`model fallback`,\n * `output limit`, `repeat guard`, …) is recognisably the same row across\n * surfaces. Pure; re-exported from `zidane/chat/pure`.\n */\nimport type { StreamEvent } from './types'\n\nexport type NoticeSeverity = NonNullable<StreamEvent['notice']>['severity']\n\n/** Leading glyph per severity. `info` is deliberately quiet — a middle dot. */\nexport const NOTICE_GLYPH: Readonly<Record<NoticeSeverity, string>> = {\n info: '·',\n warn: '!',\n error: '✗',\n}\n","/**\n * Side-panel catalog and open state. Renderer-agnostic: the TUI rail and\n * the GUI side panel both read the same catalog (built-ins first, then\n * extension panels in load order) and drive the same state machine.\n *\n * The one behavioural rule worth spelling out: `openProactive`. Agent- or\n * extension-driven opens (a PR was created, a badge flipped) must never\n * yank the panel away from a tab the user chose. So a proactive request\n * is honoured only while the user has not picked a tab since the previous\n * proactive open; the moment they click a tab, proactive opens are ignored\n * until the next user pick resets the gate.\n */\nimport type { ExtensionPanelEntry, PanelIcon } from '../extensions/panels'\n\nexport const INBOX_PANEL_ID = 'inbox'\nexport const TODOS_PANEL_ID = 'todos'\nexport const ARTIFACTS_PANEL_ID = 'artifacts'\nexport const DIFFS_PANEL_ID = 'diffs'\nexport const FILES_PANEL_ID = 'files'\n\n/** Built-in tabs the hosts render with their own components. */\nexport type BuiltinPanelId\n = | typeof INBOX_PANEL_ID\n | typeof TODOS_PANEL_ID\n | typeof ARTIFACTS_PANEL_ID\n | typeof DIFFS_PANEL_ID\n | typeof FILES_PANEL_ID\n\nexport interface BuiltinPanelTab {\n id: BuiltinPanelId\n label: string\n icon: PanelIcon\n builtin: true\n}\n\nexport interface ExtensionPanelTab {\n id: string\n label: string\n icon?: PanelIcon\n builtin: false\n owner: string\n}\n\nexport type PanelTab = BuiltinPanelTab | ExtensionPanelTab\n\nexport const BUILTIN_PANEL_TABS: readonly BuiltinPanelTab[] = [\n // Agent-facing surfaces first: what is waiting on the user, then the plan.\n { id: INBOX_PANEL_ID, label: 'Inbox', icon: { gui: 'i-ph-tray', tui: '✉' }, builtin: true },\n { id: TODOS_PANEL_ID, label: 'Todos', icon: { gui: 'i-ph-list-checks', tui: '▣' }, builtin: true },\n { id: ARTIFACTS_PANEL_ID, label: 'Artifacts', icon: { gui: 'i-ph-cube', tui: '◆' }, builtin: true },\n { id: DIFFS_PANEL_ID, label: 'Diffs', icon: { gui: 'i-ph-git-diff', tui: '±' }, builtin: true },\n { id: FILES_PANEL_ID, label: 'Files', icon: { gui: 'i-ph-tree-structure', tui: '▤' }, builtin: true },\n]\n\nexport interface PanelCatalogOptions {\n /** Hide the artifacts tab (the user's `artifacts: false` setting). */\n showArtifacts?: boolean\n /** Built-in ids the host can't render (the TUI has no diff viewer yet). */\n omitBuiltins?: readonly BuiltinPanelId[]\n}\n\n/** Built-ins first, then extension panels in registry (load) order. */\nexport function buildPanelCatalog(\n extensionPanels: readonly Pick<ExtensionPanelEntry, 'id' | 'label' | 'icon' | 'owner'>[],\n options: PanelCatalogOptions = {},\n): PanelTab[] {\n const tabs: PanelTab[] = []\n for (const tab of BUILTIN_PANEL_TABS) {\n if (tab.id === ARTIFACTS_PANEL_ID && options.showArtifacts === false)\n continue\n if (options.omitBuiltins?.includes(tab.id))\n continue\n tabs.push(tab)\n }\n const seen = new Set(tabs.map(t => t.id))\n for (const p of extensionPanels) {\n if (seen.has(p.id))\n continue\n seen.add(p.id)\n tabs.push({ id: p.id, label: p.label, builtin: false, owner: p.owner, ...(p.icon ? { icon: p.icon } : {}) })\n }\n return tabs\n}\n\n// ---------------------------------------------------------------------------\n// State\n// ---------------------------------------------------------------------------\n\nexport interface PanelState {\n open: boolean\n /** Active tab id; `null` when nothing has been chosen yet (hosts pick the first tab). */\n activeId: string | null\n /** Monotonic counter bumped on every user pick; gates proactive opens. */\n userPicks: number\n /** `userPicks` value at the last proactive open that was honoured. */\n proactiveAt: number\n}\n\nexport const INITIAL_PANEL_STATE: PanelState = { open: false, activeId: null, userPicks: 0, proactiveAt: 0 }\n\n/** Add a tab to the host's pinned strip (idempotent, keeps order). */\nexport function pinTab(pinned: readonly string[], id: string): readonly string[] {\n return pinned.includes(id) ? pinned : [...pinned, id]\n}\n\n/** The user clicked a tab (or a keybinding cycled to it). Always honoured, always opens. */\nexport function pickTab(state: PanelState, id: string): PanelState {\n return { ...state, open: true, activeId: id, userPicks: state.userPicks + 1 }\n}\n\nexport function togglePanel(state: PanelState): PanelState {\n return { ...state, open: !state.open }\n}\n\nexport function closePanel(state: PanelState): PanelState {\n return { ...state, open: false }\n}\n\n/**\n * Agent / extension asked to show a tab. Honoured only until the user has\n * picked a tab themselves (a badge that flipped must never steal the tab);\n * otherwise the request is dropped and the state returned unchanged.\n */\nexport function openProactive(state: PanelState, id: string): PanelState {\n if (state.userPicks !== state.proactiveAt)\n return state\n return { ...state, open: true, activeId: id }\n}\n\n/**\n * The agent is blocked on the user (a plan to approve, a question to\n * answer): show the tab regardless of earlier picks. Costs at most a tab\n * switch, and nothing in that tab decides implicitly. Not a user pick, so\n * it does not lock out later proactive opens.\n */\nexport function openForAttention(state: PanelState, id: string): PanelState {\n if (state.open && state.activeId === id)\n return state\n return { ...state, open: true, activeId: id }\n}\n\n/**\n * Resolve the tab to render: the active one when it still exists, else the\n * first tab, else `null` (empty catalog). Keeps state stable when an\n * extension is disabled and its tab vanishes.\n */\nexport function resolveActiveTab(state: PanelState, catalog: readonly PanelTab[]): PanelTab | null {\n if (catalog.length === 0)\n return null\n return catalog.find(t => t.id === state.activeId) ?? catalog[0]\n}\n\n/** Cycle to the next / previous tab (wraps). Counts as a user pick. */\nexport function cycleTab(state: PanelState, catalog: readonly PanelTab[], direction: 1 | -1): PanelState {\n if (catalog.length === 0)\n return state\n const current = resolveActiveTab(state, catalog)\n const idx = current ? catalog.findIndex(t => t.id === current.id) : 0\n const next = catalog[(idx + direction + catalog.length) % catalog.length]\n return pickTab(state, next.id)\n}\n","/**\n * User-initiated todo-list edits — pure transforms over `TodoItem[]`.\n *\n * The todo list is normally MODEL-owned: `todowrite` passes the full array on\n * every call, so a checkpoint replaces whatever was there. These transforms let\n * the TUI's `ctrl+t` panel edit the same list, with one consequence the UI must\n * surface rather than hide: **a user edit made during a live run is overwritten\n * by the agent's next checkpoint**. Nothing here can prevent that — it is the\n * tool's contract — so the modal warns while a run is in flight instead of\n * pretending the edit is durable.\n *\n * Kept pure and renderer-agnostic (no React, no node) so the reducers are\n * unit-testable and a GUI shell can drive the same edits.\n */\n\nimport type { TodoItem, TodoStatus } from './todos'\n\n/**\n * Prefix for ids minted here, distinguishing user-authored rows from the\n * model's own ids in a session file. Purely diagnostic — nothing branches on\n * it — but it makes \"who added this\" answerable after the fact.\n */\nconst USER_TODO_ID_PREFIX = 'user-'\n\n/**\n * Mint an id that cannot collide with an existing row.\n *\n * Counter-based rather than random: a stable, readable id keeps session diffs\n * legible, and the collision check makes it safe against ids the model already\n * used (including previous `user-*` ones after a reload).\n */\nexport function nextTodoId(items: readonly TodoItem[]): string {\n const taken = new Set(items.map(i => i.id))\n for (let n = 1; ; n++) {\n const id = `${USER_TODO_ID_PREFIX}${n}`\n if (!taken.has(id))\n return id\n }\n}\n\n/**\n * Append a todo. Returns the list unchanged when `content` is blank — an empty\n * row is never what the user meant, and rejecting it here means every caller\n * (keyboard, click, future GUI) gets the same guard.\n */\nexport function addTodo(items: readonly TodoItem[], content: string): TodoItem[] {\n const trimmed = content.trim()\n if (!trimmed)\n return [...items]\n return [...items, { id: nextTodoId(items), content: trimmed, status: 'pending' }]\n}\n\n/**\n * Replace one todo's text. Blank content is rejected (see {@link addTodo}); an\n * unknown id is a no-op rather than an error, because the list can be replaced\n * by a `todowrite` between render and keypress.\n */\nexport function editTodo(items: readonly TodoItem[], id: string, content: string): TodoItem[] {\n const trimmed = content.trim()\n if (!trimmed)\n return [...items]\n return items.map(item => item.id === id ? { ...item, content: trimmed } : item)\n}\n\n/** Drop one todo. Unknown id is a no-op, same rationale as {@link editTodo}. */\nexport function removeTodo(items: readonly TodoItem[], id: string): TodoItem[] {\n return items.filter(item => item.id !== id)\n}\n\n/** Drop everything. Separate from `removeTodo` so the caller's intent is explicit at the call site. */\nexport function clearTodos(): TodoItem[] {\n return []\n}\n\n/**\n * Advance a todo's status one step: pending → in_progress → completed →\n * pending. `cancelled` also lands on `pending`, so a dropped item can be\n * revived without a dedicated key.\n *\n * Cycling INTO `in_progress` demotes any other in-progress row to `pending`:\n * the list's whole purpose is \"what is being worked on right now\", and two\n * live rows make that unanswerable — `TodoIndicator`'s successor\n * (`todoProgressLabel`) reads the first one and would silently ignore the rest.\n */\nexport function cycleTodoStatus(items: readonly TodoItem[], id: string): TodoItem[] {\n const target = items.find(item => item.id === id)\n if (!target)\n return [...items]\n const next = nextStatus(target.status)\n return items.map((item) => {\n if (item.id === id)\n return { ...item, status: next }\n if (next === 'in_progress' && item.status === 'in_progress')\n return { ...item, status: 'pending' as TodoStatus }\n return item\n })\n}\n\nfunction nextStatus(status: TodoStatus): TodoStatus {\n switch (status) {\n case 'pending':\n return 'in_progress'\n case 'in_progress':\n return 'completed'\n case 'completed':\n case 'cancelled':\n default:\n return 'pending'\n }\n}\n\n/**\n * Steering text for a \"retry this todo\" request.\n *\n * Quotes the content so a model reading it can match the row verbatim against\n * its own list, and names the status because \"retry\" means different things\n * for a row it believes is `completed` versus one it abandoned as `cancelled`.\n * Shared by the TUI and GUI modals so both surfaces steer with byte-identical\n * text; pinned by a test rather than living inside a JSX callback.\n */\nexport function buildTodoRetryMessage(item: TodoItem): string {\n return `Retry this todo (currently ${item.status}): \"${item.content}\"`\n}\n"],"mappings":";;;;;;;;AAwCA,SAAgB,kBAAkB,UAAsC;CACtE,OAAO,SAAS,QAAQ,QAAO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