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
package/dist/ipc.d.ts CHANGED
@@ -1,964 +1,6 @@
1
- import { Ka as ExtensionBus, Ld as StreamEvent, Pm as ContextBreakdown, Rf as ProviderKey, U_ as SessionTurn, Wy as SessionArtifact, Z_ as ThinkingLevel, v_ as JsonValue, yp as InteractionResponse } from "./index-BgN1T3lk.js";
2
- import { An as createMemoryApprovalsStore, Cn as EditOutcomeLedger, Dn as ApprovalHub, En as runCompaction, Fn as CommandSummary, Gn as SessionPresence, Hn as RunningWorkItem, In as HostSettings, Jn as WireApprovalRequest, Ln as HostSignal, Mn as PendingApprovalsStore, Nn as ApprovalOriginator, On as ApprovalRequestInput, Pn as CommandArgSuggestionSummary, Rn as PendingInteraction, Sn as createInteractionHub, Tn as CompactionEntry, Un as SendOptions, Vn as QueuedItem, Wn as SerializedPreview, _n as createChatHost, bn as WorkerSummary, dn as extractEditPayloadForGate, fn as readFileSafe, gn as ContextSegmentsReport, hn as ChatHost, jn as ChatHostEnvironment, kn as createApprovalHub, mn as serializePreview, pn as resolveCwdPath, qn as TodosSnapshot, v as SystemMdFile, vn as CreateWorkerParams, wn as PendingAnnotation, xn as InteractionHub, yn as WorkerRow, zn as PromptAttachment } from "./index-C6NEd5y_.js";
3
- import { Y as ResolvedConfig } from "./transcript-anchors-BeudMbXx.js";
4
- import { p as TodoItem } from "./turn-operations-C8bMBDl_.js";
5
- import { T as SessionHistoryMatch, V as ApprovalDecision, w as SearchTurnResult } from "./tool-formatters-DoRLnfuD.js";
6
-
7
- //#region src/ipc/attach.d.ts
8
- interface AttachOptions {
9
- socketPath?: string;
10
- /** Attach to this session id (prefix match against the list). */
11
- sessionId?: string;
12
- /** Create a fresh session instead of picking. */
13
- createNew?: boolean;
14
- cwd?: string;
15
- appVersion?: string;
16
- /** Spawn-on-demand command when no daemon is listening. */
17
- spawnCommand?: string[];
18
- /** Injectable streams for tests. */
19
- stdin?: NodeJS.ReadableStream;
20
- stdout?: NodeJS.WritableStream;
21
- }
22
- declare function runAttach(options?: AttachOptions): Promise<void>;
23
- //#endregion
24
- //#region src/ipc/daemon/lifecycle.d.ts
25
- /**
26
- * Build fingerprint for the handshake — the mtime of this module's file
27
- * at import time. Client and daemon load the same file from disk, so a
28
- * daemon spawned before a rebuild (or a source edit in dev) reports a
29
- * different id than a freshly-started client, and the client drains +
30
- * respawns it. This closes the "same protocol version, different code"
31
- * gap that a hand-bumped version constant can't: during development the
32
- * daemon process is frozen at spawn while the tree keeps moving.
33
- *
34
- * Compiled binaries (`/$bunfs/…` virtual paths) can't be stat'ed and
35
- * report `'unknown'`; the check is skipped when EITHER side is unknown,
36
- * so released builds rely on `IPC_PROTOCOL_VERSION` alone — correct,
37
- * since their code only changes when the version does.
38
- */
39
- declare const IPC_BUILD_ID: string;
40
- /**
41
- * Socket file name. Dev builds (`ZIDANE_DEV=1`, set by every `dev` script
42
- * in the repo) get their OWN socket so a checkout's TUI, GUI and `zidane
43
- * daemon` pair up among themselves and never attach to — or get refused by
44
- * — the installed daemon. Without this, a protocol bump in the working
45
- * tree turned the dev GUI's dot red against the stable daemon, and a dev
46
- * daemon could drain the one the installed TUI relies on.
47
- */
48
- declare function daemonSocketName(env?: NodeJS.ProcessEnv): 'daemon.sock' | 'dev.sock';
49
- declare function defaultSocketPath(): string;
50
- /**
51
- * Spawn command that re-enters the CURRENT zidane program as `… daemon`.
52
- *
53
- * Three launch shapes:
54
- * - compiled Bun binary — `Bun.main` is the virtual `/$bunfs/…` entry the
55
- * binary self-inserts as argv[1], so the spawn must NOT repeat it
56
- * (verified: repeating it makes the child parse the junk path as its
57
- * subcommand and boot the full TUI instead of the daemon).
58
- * - dev (`bun run cli.ts`) — the script path must ride along.
59
- * - Node hosts (no `Bun` global) — fall back to the published bin.
60
- */
61
- declare function selfDaemonSpawnCommand(): string[];
62
- /**
63
- * True when something accepts connections on `socketPath`. Distinguishes a
64
- * live daemon from a stale socket file left by a crashed one.
65
- */
66
- declare function probeSocket(socketPath: string, timeoutMs?: number): Promise<boolean>;
67
- interface EnsureDaemonOptions {
68
- socketPath?: string;
69
- /**
70
- * Command used to spawn the daemon when nothing is listening. Defaults to
71
- * `['zidane-daemon']` (the published bin). The child is detached and
72
- * unref'd — it outlives the spawning client by design.
73
- */
74
- spawnCommand?: string[];
75
- /** Total time to wait for the daemon to accept connections. */
76
- timeoutMs?: number;
77
- }
78
- declare function ensureDaemonRunning(options?: EnsureDaemonOptions): Promise<string>;
79
- //#endregion
80
- //#region src/ipc/protocol.d.ts
81
- /**
82
- * v6 (changes since v5):
83
- * - `event` signals carry an optional `echo` flag marking host-generated
84
- * SEND/STEER echoes of the user's own message.
85
- * - `chat.pushQueued` result gained the `'queued'` delivered variant.
86
- * - `sessions.setModel` now honors `fallbacks`: it persists the canonical
87
- * `metadata.modelChain` and CLEARS a previously persisted chain when
88
- * omitted/empty. It also accepts `effort` / `modelOptions` and resets
89
- * both when omitted (a pick is atomic — no stale per-model knobs).
90
- * - additive: `extension.emit` notification + `extension:signal` fan-out
91
- * (the permission-gated per-extension cross-window bus, `ctx.bus`).
92
- * Older daemons ignore the unknown notification; older clients drop the
93
- * unknown signal kind — no version bump needed.
94
- * - additive: `extension.emit` / `extension:signal` carry an optional
95
- * `nonce` (the emitter's per-process random id) so receivers dedupe on
96
- * `(extensionId, nonce, seq)` instead of the collision-prone
97
- * `(extensionId, seq)`. Older peers omit it and fall back to the
98
- * seq-only key — no version bump needed.
99
- * - `SessionRow.modelFallbacks` is now populated from the session's
100
- * persisted `metadata.modelChain`.
101
- * - Default socket path moved from `<stateDir>/daemon.sock` to the
102
- * dedicated `<stateDir>/daemon/daemon.sock` (dir chmod'd 0700) so the
103
- * daemon can harden its socket dir without touching shared state files.
104
- * - ADDITIVE (no version bump — older daemons answer "method not
105
- * found", clients degrade to local compute): `suggest.resolve` RPC
106
- * resolves inline ghost-text autocomplete daemon-side, and the
107
- * `suggest:changed` signal fans the result out to every OTHER peer
108
- * on the session so mirroring windows paint the same ghost without
109
- * recomputing.
110
- * - ADDITIVE (no version bump — optional field, older daemons simply
111
- * omit it and clients fall back to the single `suggestion`):
112
- * `suggest.resolve` results and `suggest:changed` signals carry the
113
- * resolver's full ordered `candidates` list so daemon mode keeps
114
- * ↑/↓ candidate rotation instead of degrading to one suggestion.
115
- * - ADDITIVE (no version bump — `optional()` swallows "method not
116
- * found" on an older daemon, which then simply keeps its stale
117
- * registries as before): `runtime.reload` RPC drops the daemon's
118
- * cached extension registries and retires live agents after a window
119
- * reloaded its extensions.
120
- */
121
- declare const IPC_PROTOCOL_VERSION = 9;
122
- /**
123
- * JSON-RPC error codes specific to the zidane daemon. Lives here (not in
124
- * `daemon/server.ts`) so clients can import the codes without pulling the
125
- * server's module graph.
126
- */
127
- declare const IpcErrorCode: {
128
- readonly VersionMismatch: -32010;
129
- readonly NotHandshaken: -32011;
130
- };
131
- /**
132
- * Typed method map for the daemon transport. Keys are JSON-RPC method
133
- * names; each entry pins params/result so both the daemon dispatch table
134
- * and the client proxy are checked against the same contract.
135
- *
136
- * Scope: the chat core every client needs. Host-UI-specific surfaces
137
- * (folder pickers, themes, keybindings) intentionally stay client-local.
138
- */
139
- interface IpcMethods {
140
- /** `wake` is host-internal (see `SendOptions.wake`) — not accepted over the wire. */
141
- 'chat.send': {
142
- params: Omit<SendOptions, 'wake'>;
143
- result: {
144
- runId: string;
145
- };
146
- };
147
- 'chat.interrupt': {
148
- params: {
149
- sessionId: string;
150
- };
151
- result: void;
152
- };
153
- 'chat.steer': {
154
- params: {
155
- sessionId: string;
156
- message: string;
157
- };
158
- result: void;
159
- };
160
- 'chat.followUp': {
161
- params: {
162
- sessionId: string;
163
- message: string;
164
- };
165
- result: void;
166
- };
167
- 'chat.pushQueued': {
168
- params: {
169
- sessionId: string;
170
- message: string;
171
- activatedSkills?: string[];
172
- };
173
- result: {
174
- delivered: 'steer' | 'send' | 'command' | 'queued';
175
- };
176
- };
177
- 'chat.isRunning': {
178
- params: {
179
- sessionId: string;
180
- };
181
- result: boolean;
182
- };
183
- /**
184
- * Retire the session's live agent so the next run rebuilds against
185
- * fresh config/credentials (MCP login, extension reload). Run-end
186
- * deferred when a run is in flight; HITL/queue state survives.
187
- */
188
- 'chat.rebuildAgent': {
189
- params: {
190
- sessionId: string;
191
- };
192
- result: void;
193
- };
194
- /**
195
- * Drop the daemon's cached runtime configs (extension registries, per
196
- * cwd) and retire every live agent so the next command or run rebuilds
197
- * against what is on disk now. Sent by a window after it reloaded its
198
- * own extensions (install, update, remove, `/reload`): extension `/`
199
- * commands execute daemon-side, so without this the daemon keeps
200
- * running the code it loaded at boot. Busy sessions rebuild at run end.
201
- */
202
- 'runtime.reload': {
203
- params: Record<string, never>;
204
- result: void;
205
- };
206
- 'chat.listWork': {
207
- params: {
208
- sessionId: string;
209
- };
210
- result: RunningWorkItem[];
211
- };
212
- 'chat.cancelWork': {
213
- params: {
214
- sessionId: string;
215
- id: string | 'all';
216
- reason?: string;
217
- };
218
- result: boolean;
219
- };
220
- 'sessions.list': {
221
- params: {
222
- projectRoot?: string | null;
223
- archive?: 'active' | 'archived' | 'all';
224
- };
225
- result: SessionRow[];
226
- };
227
- 'sessions.create': {
228
- params: CreateSessionParams;
229
- result: SessionRow;
230
- };
231
- 'sessions.delete': {
232
- params: {
233
- sessionId: string;
234
- };
235
- result: void;
236
- };
237
- 'sessions.setTitle': {
238
- params: {
239
- sessionId: string;
240
- title: string;
241
- };
242
- result: void;
243
- };
244
- 'sessions.setArchived': {
245
- params: {
246
- sessionId: string;
247
- archived: boolean;
248
- };
249
- result: void;
250
- };
251
- 'sessions.setAgentId': {
252
- params: {
253
- sessionId: string;
254
- agentId: string;
255
- };
256
- result: void;
257
- };
258
- 'sessions.setEffort': {
259
- params: {
260
- sessionId: string;
261
- effort: ThinkingLevel;
262
- };
263
- result: void;
264
- };
265
- /**
266
- * The one model-swap contract (`ChatHost.setSessionModel`). A pick is a
267
- * whole: `fallbacks` (ordered, primary excluded) REPLACES the persisted
268
- * `metadata.modelChain` (omitted/empty clears it); `effort` and
269
- * `modelOptions` are reset to the supplied values (omitted clears them —
270
- * per-model knobs never leak onto the new model). The live agent is
271
- * retired so the next run rebuilds on the new pick (run-end deferred
272
- * while a run is in flight).
273
- */
274
- 'sessions.setModel': {
275
- params: {
276
- sessionId: string;
277
- providerKey: ProviderKey;
278
- modelId: string;
279
- fallbacks?: ModelFallbackRef[];
280
- effort?: ThinkingLevel;
281
- modelOptions?: Record<string, boolean>;
282
- };
283
- result: void;
284
- };
285
- 'sessions.setModelOptions': {
286
- params: {
287
- sessionId: string;
288
- options: Record<string, boolean>;
289
- };
290
- result: void;
291
- };
292
- 'sessions.loadEvents': {
293
- params: {
294
- sessionId: string;
295
- };
296
- result: StreamEvent[];
297
- };
298
- 'sessions.getTurn': {
299
- params: {
300
- sessionId: string;
301
- turnId: string;
302
- };
303
- result: SessionTurn | null;
304
- };
305
- 'sessions.contextBreakdown': {
306
- params: {
307
- sessionId: string;
308
- };
309
- result: ContextBreakdown | null;
310
- };
311
- /**
312
- * Artifacts one session recorded (PRs, branches, commits, files,
313
- * extension kinds — see `session/artifacts.ts`), newest first. Empty on
314
- * stores without artifact support. Additive; pre-artifact daemons
315
- * reject the method and clients treat that as empty.
316
- */
317
- 'sessions.artifacts': {
318
- params: {
319
- sessionId: string;
320
- kind?: string;
321
- limit?: number;
322
- };
323
- result: SessionArtifact[];
324
- };
325
- /**
326
- * Artifacts across sessions, filtered by project root (`null` = untagged
327
- * sessions, omitted = every project) and/or kind/uri (reverse lookup).
328
- */
329
- 'artifacts.list': {
330
- params: {
331
- projectRoot?: string | null;
332
- kind?: string;
333
- uri?: string;
334
- since?: number;
335
- limit?: number;
336
- };
337
- result: SessionArtifact[];
338
- };
339
- /** Remove one artifact. `false` when the store has no artifact support. Fans out `artifact:changed`. */
340
- 'artifacts.delete': {
341
- params: {
342
- sessionId: string;
343
- artifactId: string;
344
- };
345
- result: boolean;
346
- };
347
- /**
348
- * Upsert an artifact — the lazy `resolve()` write-back (refreshed
349
- * `label` / `meta`). Same merge semantics as `SessionStore.upsertArtifact`;
350
- * `null` when the session is unknown or the store lacks support.
351
- */
352
- 'artifacts.upsert': {
353
- params: {
354
- artifact: SessionArtifact;
355
- };
356
- result: SessionArtifact | null;
357
- };
358
- /**
359
- * Transcript search over ONE session, daemon-side. The daemon owns the
360
- * authoritative turns (live wrapper when an agent is active — fresh
361
- * mid-run, which a window's load-time snapshot is not) and an LRU index
362
- * cache shared by every window, so repeat queries pay match cost only.
363
- * Results come back in TURN ORDER (search is a transcript filter).
364
- */
365
- 'history.searchSession': {
366
- params: {
367
- sessionId: string;
368
- query: string;
369
- limit?: number;
370
- };
371
- result: SearchTurnResult[];
372
- };
373
- /**
374
- * Cross-session content search, daemon-side. One RPC replaces a
375
- * window's per-session index/build/search round-trips — indexes are
376
- * built once in the daemon and shared by every window.
377
- */
378
- 'history.searchAll': {
379
- params: {
380
- query: string;
381
- sessionIds: string[];
382
- excerptLimit?: number;
383
- };
384
- result: Record<string, SessionHistoryMatch>;
385
- };
386
- /**
387
- * A window appended transcript content OUT-OF-BAND (local `/` command
388
- * output, `!` shell turns — written straight to the shared store, not
389
- * through a host run). The daemon fans out `sessions:changed` so every
390
- * window (issuer included) re-converges on the canonical replay NOW
391
- * instead of at the next run end. Sent as a notification.
392
- */
393
- 'sessions.touch': {
394
- params: {
395
- sessionId: string;
396
- };
397
- result: void;
398
- };
399
- 'sessions.compact': {
400
- params: {
401
- sessionId: string;
402
- };
403
- result: void;
404
- };
405
- 'todos.get': {
406
- params: {
407
- sessionId: string;
408
- };
409
- result: TodosSnapshot | null;
410
- };
411
- /**
412
- * Apply a user todo edit (add / edit / remove / cycle / clear) to the
413
- * session the MODEL reads.
414
- *
415
- * Required because todos live in `session.metadata` and `todowrite` reads
416
- * them off the daemon agent's in-memory `Session`. A window writing its own
417
- * `Session` instance persisted an edit that the daemon never observed, so the
418
- * model's next `todowrite` silently overwrote it.
419
- *
420
- * Sends the whole list rather than a delta: the mutators in
421
- * `chat/todo-edits.ts` are already whole-list transforms, and a delta would
422
- * need conflict rules against a list the model rewrites concurrently.
423
- *
424
- * `null` = no live agent (or no run owns a todo slot), and the caller should
425
- * apply its own store-level write — race-free, since nothing is appending.
426
- */
427
- 'todos.set': {
428
- params: {
429
- sessionId: string;
430
- items: readonly TodoItem[];
431
- };
432
- result: TodosSnapshot | null;
433
- };
434
- /** The main session id, creating it (directory-less) when the setting is on and none exists. */
435
- 'orchestration.main': {
436
- params: Record<string, never>;
437
- result: string | null;
438
- };
439
- 'orchestration.createWorker': {
440
- params: {
441
- mainId: string;
442
- } & CreateWorkerParams;
443
- result: string;
444
- };
445
- 'orchestration.list': {
446
- params: {
447
- mainId: string;
448
- limit?: number;
449
- };
450
- result: WorkerRow[];
451
- };
452
- 'orchestration.read': {
453
- params: {
454
- mainId: string;
455
- sessionId: string;
456
- };
457
- result: WorkerSummary | null;
458
- };
459
- /** `wake` (default true): whether that run finishing wakes the main. */
460
- 'orchestration.send': {
461
- params: {
462
- mainId: string;
463
- sessionId: string;
464
- prompt: string;
465
- wake?: boolean;
466
- };
467
- result: void;
468
- };
469
- 'orchestration.steer': {
470
- params: {
471
- mainId: string;
472
- sessionId: string;
473
- message: string;
474
- };
475
- result: void;
476
- };
477
- 'orchestration.cancel': {
478
- params: {
479
- mainId: string;
480
- sessionId: string;
481
- };
482
- result: void;
483
- };
484
- 'orchestration.transcript': {
485
- params: {
486
- mainId: string;
487
- sessionId: string;
488
- limit?: number;
489
- };
490
- result: string;
491
- };
492
- /** Extension-contributed `/` commands discovered for `cwd`. */
493
- 'commands.list': {
494
- params: {
495
- cwd: string;
496
- };
497
- result: CommandSummary[];
498
- };
499
- /** Argument suggestions for `/name <prefix>` — best-effort, empty on failure. */
500
- 'commands.completeArgs': {
501
- params: {
502
- cwd: string;
503
- name: string;
504
- argsPrefix: string;
505
- };
506
- result: CommandArgSuggestionSummary[];
507
- };
508
- 'interactions.list': {
509
- params: {
510
- sessionId?: string;
511
- };
512
- result: PendingInteraction[];
513
- };
514
- 'interactions.respond': {
515
- params: {
516
- requestId: string;
517
- response: InteractionResponse;
518
- };
519
- result: {
520
- ok: boolean;
521
- };
522
- };
523
- 'interactions.cancel': {
524
- params: {
525
- requestId: string;
526
- reason?: string;
527
- };
528
- result: {
529
- ok: boolean;
530
- };
531
- };
532
- 'interactions.rehydrate': {
533
- params: {
534
- sessionId: string;
535
- };
536
- result: PendingInteraction[];
537
- };
538
- 'approvals.resolve': {
539
- params: {
540
- requestId: string;
541
- decision: ApprovalDecision;
542
- };
543
- result: void;
544
- };
545
- 'approvals.denyAll': {
546
- params: {
547
- sessionId?: string;
548
- };
549
- result: void;
550
- };
551
- 'approvals.listPending': {
552
- params: Record<string, never>;
553
- result: WireApprovalRequest[];
554
- };
555
- /**
556
- * Type-ahead queue, host-owned so every window sees and can manipulate
557
- * the same list. `queue.add` queues when a run is in flight and sends
558
- * immediately otherwise; the host auto-drains the queue FIFO at run end.
559
- */
560
- 'queue.list': {
561
- params: {
562
- sessionId: string;
563
- };
564
- result: QueuedItem[];
565
- };
566
- /**
567
- * Which `SYSTEM.md` override composes this session's prompt, for windows
568
- * attaching to an already-warm agent.
569
- *
570
- * The `system-md` signal fires once per agent BUILD and the daemon caches
571
- * agents, so the normal multi-window case (daemon already running, open a
572
- * second terminal or the GUI) would otherwise never learn that the built-in
573
- * safety and git doctrine has been replaced. `null` = no live agent yet, in
574
- * which case the next build broadcasts it.
575
- */
576
- 'sessions.systemMd': {
577
- params: {
578
- sessionId: string;
579
- };
580
- result: {
581
- file: SystemMdFile | null;
582
- shadowed: readonly SystemMdFile[];
583
- } | null;
584
- };
585
- /**
586
- * Every chunk of the session's system prompt with provenance — the
587
- * Instructions tab. Built from the live agent's assembly, so it reflects
588
- * MCP instructions, extension fragments and the resolved `SYSTEM.md`.
589
- */
590
- 'sessions.contextSegments': {
591
- params: {
592
- sessionId: string;
593
- };
594
- result: ContextSegmentsReport | null;
595
- };
596
- /** Seed a user-scope `SYSTEM.md` from the session's doctrine; throws when an override could not apply. */
597
- 'sessions.createSystemOverride': {
598
- params: {
599
- sessionId: string;
600
- };
601
- result: {
602
- path: string;
603
- created: boolean;
604
- };
605
- };
606
- 'queue.add': {
607
- /** `asCommand`: see `SendOptions.asCommand` — the host refuses when it cannot resolve it. */params: {
608
- sessionId: string;
609
- text: string;
610
- activatedSkills?: string[];
611
- attachments?: PromptAttachment[];
612
- asCommand?: string;
613
- };
614
- result: {
615
- delivered: 'queued' | 'sent';
616
- };
617
- };
618
- 'queue.remove': {
619
- params: {
620
- sessionId: string;
621
- id: string;
622
- };
623
- result: boolean;
624
- };
625
- /** Edit a queued entry in place; order is kept. `false` when already sent / dropped. */
626
- 'queue.update': {
627
- params: {
628
- sessionId: string;
629
- id: string;
630
- text: string;
631
- };
632
- result: boolean;
633
- };
634
- /** Steer a queued entry into the live run now (falls back to send when idle). */
635
- 'queue.pushNow': {
636
- params: {
637
- sessionId: string;
638
- id: string;
639
- };
640
- result: {
641
- delivered: 'steer' | 'send' | 'missing';
642
- };
643
- };
644
- /** Current shared draft for a session — backfill on window attach. */
645
- 'drafts.get': {
646
- params: {
647
- sessionId: string;
648
- };
649
- result: {
650
- text: string;
651
- shell?: boolean;
652
- attachments?: PromptAttachment[];
653
- search?: {
654
- active: boolean;
655
- query: string;
656
- };
657
- };
658
- };
659
- /**
660
- * Replace the session's shared draft. Fans out `draft:changed` to every
661
- * OTHER peer. Ephemeral daemon state — drafts don't survive a daemon
662
- * restart and are cleared when any window submits the prompt.
663
- */
664
- /**
665
- * `shell` carries the prompt's shell mode OUT OF BAND — never encoded
666
- * into the text, so a literal leading `!` in a normal draft can't flip
667
- * other windows into shell-execution semantics.
668
- */
669
- 'drafts.set': {
670
- params: {
671
- sessionId: string;
672
- text: string;
673
- shell?: boolean;
674
- };
675
- result: void;
676
- };
677
- /** Replace the shared draft's composing attachments (notification). */
678
- 'drafts.setAttachments': {
679
- params: {
680
- sessionId: string;
681
- attachments: PromptAttachment[];
682
- };
683
- result: void;
684
- };
685
- /** Replace the shared transcript-search state (notification, per keystroke). */
686
- 'search.set': {
687
- params: {
688
- sessionId: string;
689
- active: boolean;
690
- query: string;
691
- };
692
- result: void;
693
- };
694
- /**
695
- * Extension bus emit from a wire client whose extensions run CLIENT-side
696
- * (TUI daemon mode — the extension has no host to broadcast through).
697
- * Sent as a notification. The daemon validates the extension id against
698
- * the session cwd's registry (boot registry when no `sessionId`) and the
699
- * `'ipc'` permission, re-validates the 64 KiB payload cap, delivers to
700
- * its own subscribers, and fans out `extension:signal` to every OTHER
701
- * peer (origin excluded — the emitter already delivered locally).
702
- */
703
- 'extension.emit': {
704
- params: {
705
- extensionId: string;
706
- sessionId?: string;
707
- payload: JsonValue;
708
- seq: number;
709
- nonce?: string;
710
- };
711
- result: void;
712
- };
713
- /**
714
- * Resolve inline ghost-text autocomplete daemon-side (the typing
715
- * window's request IS the single computation): canonical resolver
716
- * against the session cwd's extension registry. Latest-wins per
717
- * session — a `seq` older than the newest seen returns
718
- * `{ suggestion: null }` without computing, and a newer request
719
- * aborts an in-flight compute. The result additionally fans out as
720
- * `suggest:changed` to every OTHER peer.
721
- */
722
- 'suggest.resolve': {
723
- params: {
724
- sessionId: string;
725
- text: string;
726
- caret: number;
727
- seq: number;
728
- };
729
- result: {
730
- suggestion: string | null;
731
- seq: number;
732
- candidates?: string[];
733
- };
734
- };
735
- 'settings.get': {
736
- params: Record<string, never>;
737
- result: HostSettings;
738
- };
739
- 'settings.set': {
740
- params: {
741
- patch: Partial<HostSettings>;
742
- };
743
- result: HostSettings;
744
- };
745
- /** Current presence snapshot — backfill for a freshly opened session list. */
746
- 'presence.list': {
747
- params: Record<string, never>;
748
- result: SessionPresence[];
749
- };
750
- /**
751
- * Tag the calling peer as watching a session (one per connection; the
752
- * TUI opens one connection per activated session). Sent as a
753
- * notification right after the handshake. Detach is implicit — the
754
- * daemon recomputes presence when the socket drops.
755
- */
756
- 'presence.watch': {
757
- params: {
758
- sessionId: string;
759
- };
760
- result: void;
761
- };
762
- 'daemon.info': {
763
- params: Record<string, never>;
764
- result: HelloResult;
765
- };
766
- /**
767
- * Graceful drain: deny pending approvals, abort live runs, close the
768
- * socket. Used by clients that detect a protocol-version mismatch and
769
- * need the stale daemon gone before respawning.
770
- */
771
- 'daemon.shutdown': {
772
- params: Record<string, never>;
773
- result: void;
774
- };
775
- }
776
- type IpcMethodName = keyof IpcMethods;
777
- type IpcParams<M extends IpcMethodName> = IpcMethods[M]['params'];
778
- type IpcResult<M extends IpcMethodName> = IpcMethods[M]['result'];
779
- /** One row in a cross-window session list. */
780
- /** One ordered model-fallback target (primary excluded). */
781
- interface ModelFallbackRef {
782
- providerKey: ProviderKey;
783
- modelId: string;
784
- }
785
- interface SessionRow {
786
- id: string;
787
- title: string;
788
- projectRoot: string | null;
789
- cwd: string;
790
- agentId?: string;
791
- status: 'idle' | 'running' | 'completed' | 'error';
792
- createdAt: number;
793
- updatedAt: number;
794
- archived: boolean;
795
- /** Orchestration main session — see `SessionMeta.isMain`. Additive. */
796
- isMain?: boolean;
797
- providerKey?: ProviderKey;
798
- modelId?: string;
799
- effort?: ThinkingLevel;
800
- modelOptions?: Record<string, boolean>;
801
- /** Validated (head-matched) fallback chain tail, for pickers/badges. */
802
- modelFallbacks?: ModelFallbackRef[];
803
- }
804
- interface CreateSessionParams {
805
- /** Tool-execution directory — `projectRoot` is derived from it host-side. */
806
- cwd: string;
807
- title?: string;
808
- agentId?: string;
809
- providerKey?: ProviderKey;
810
- modelId?: string;
811
- /** Seed an ordered fallback chain alongside the model pick. */
812
- fallbacks?: ModelFallbackRef[];
813
- /** Mark as an extension-authoring session (auto-activates the docs skill). */
814
- extensionEdit?: boolean;
815
- }
816
- interface HelloParams {
817
- protocolVersion: number;
818
- /** Client's zidane version — surfaced in daemon diagnostics. */
819
- appVersion: string;
820
- pid: number;
821
- /**
822
- * Build fingerprint (module mtime; `'unknown'` in compiled binaries).
823
- * When BOTH sides report a real id and they differ, the daemon rejects
824
- * the handshake like a protocol-version mismatch — the client drains it
825
- * and respawns. Closes same-version code drift during development.
826
- */
827
- buildId?: string;
828
- /**
829
- * Version of the zidane code the client runs (`ZIDANE_VERSION`, inlined at
830
- * build). Unlike `buildId` this survives compiled binaries, so it closes
831
- * the gap released builds had: same protocol version, older code. A
832
- * client STRICTLY NEWER than the daemon is rejected like a build mismatch
833
- * and the stale daemon is drained; an older client is accepted and
834
- * degrades via `optional()`.
835
- */
836
- codeVersion?: string;
837
- }
838
- interface HelloResult {
839
- protocolVersion: number;
840
- appVersion: string;
841
- pid: number;
842
- startedAt: number;
843
- buildId?: string;
844
- codeVersion?: string;
845
- }
846
- //#endregion
847
- //#region src/ipc/client.d.ts
848
- declare class IpcVersionMismatchError extends Error {
849
- readonly daemon?: HelloResult | undefined;
850
- constructor(message: string, daemon?: HelloResult | undefined);
851
- }
852
- interface IpcClientOptions {
853
- socketPath: string;
854
- /** Client zidane version, surfaced in daemon diagnostics. */
855
- appVersion?: string;
856
- /** Called when the daemon connection drops (socket close/error). */
857
- onClose?: () => void;
858
- /**
859
- * On a version/build mismatch, ask the stale daemon to drain before
860
- * throwing (default). PASSIVE clients (the presence watcher) must set
861
- * this false: they retry on a timer, and an old-build window left open
862
- * across a protocol bump would otherwise drain the NEW daemon in a
863
- * loop, aborting every other window's runs.
864
- */
865
- drainOnMismatch?: boolean;
866
- }
867
- interface IpcClient {
868
- hello: HelloResult;
869
- request: <M extends IpcMethodName>(method: M, params: IpcParams<M>) => Promise<IpcResult<M>>;
870
- /**
871
- * Fire-and-forget notification — same method table as `request`, but no
872
- * id, no response, no pending-promise bookkeeping. The hot path for
873
- * high-frequency writes (per-keystroke draft sync). Daemons that don't
874
- * know the method ignore it silently.
875
- */
876
- notify: <M extends IpcMethodName>(method: M, params: IpcParams<M>) => void;
877
- onSignal: (cb: (signal: HostSignal) => void) => () => void;
878
- close: () => void;
879
- }
880
- declare function connectIpcClient(options: IpcClientOptions): Promise<IpcClient>;
881
- /**
882
- * One-call convenience for windows: make sure a daemon is up (spawning if
883
- * needed), connect, and — when the running daemon speaks an older protocol
884
- * — drain it and spawn a fresh one before retrying once.
885
- */
886
- declare function connectOrSpawnDaemon(options?: Omit<IpcClientOptions, 'socketPath'> & EnsureDaemonOptions): Promise<IpcClient>;
887
- //#endregion
888
- //#region src/ipc/daemon/environment.d.ts
889
- interface DaemonEnvironment extends ChatHostEnvironment {
890
- writeSettings: (patch: Partial<HostSettings>) => HostSettings;
891
- /** Drop the per-cwd runtime-config memo (settings changed). */
892
- invalidateRuntime: () => void;
893
- /** Base config resolved at daemon boot (paths, store, state). */
894
- config: ResolvedConfig;
895
- /**
896
- * Shared extension bus for daemon-side registries (`ctx.bus`). The
897
- * server delivers validated `extension.emit` notifications into it;
898
- * daemon-side emits leave through its `onEmit` → `broadcast`. Optional:
899
- * test environments without extensions omit it.
900
- */
901
- extensionBus?: ExtensionBus;
902
- }
903
- /**
904
- * File-backed pending-approvals persistence (`pending-approvals.json` next
905
- * to `state.json`). Small, rewritten atomically enough for its purpose —
906
- * the queue holds at most a handful of rows.
907
- */
908
- declare function createFileApprovalsStore(path: string): PendingApprovalsStore;
909
- declare function createDaemonEnvironment(options: {
910
- broadcast: (signal: HostSignal) => void; /** Base cwd for boot-time config resolution. Default: `process.cwd()`. */
911
- cwd?: string;
912
- debugStream?: boolean;
913
- }): Promise<DaemonEnvironment>;
914
- //#endregion
915
- //#region src/ipc/daemon/server.d.ts
916
- interface IpcDaemonOptions {
917
- socketPath: string;
918
- /**
919
- * Environment factory — the production daemon uses the disk-backed
920
- * `createDaemonEnvironment`; tests inject an in-memory one. Receives the
921
- * broadcast sink wired to peer fan-out.
922
- */
923
- createEnvironment?: (broadcast: (signal: HostSignal) => void) => DaemonEnvironment | Promise<DaemonEnvironment>;
924
- appVersion?: string;
925
- /**
926
- * Called when the daemon has had zero peers for `idleShutdownMs` and no
927
- * session is running. The CLI exits the process; embedded servers ignore.
928
- */
929
- idleShutdownMs?: number;
930
- onIdle?: () => void;
931
- onLog?: (line: string) => void;
932
- }
933
- interface IpcDaemon {
934
- socketPath: string;
935
- host: ChatHost;
936
- peerCount: () => number;
937
- close: () => Promise<void>;
938
- }
939
- declare function startIpcDaemon(options: IpcDaemonOptions): Promise<IpcDaemon>;
940
- //#endregion
941
- //#region src/ipc/daemon/shell-path.d.ts
942
- /**
943
- * PATH as seen by an interactive login shell, or `undefined` when no shell
944
- * answers in time. Tries the user's shell first, then POSIX fallbacks for
945
- * non-POSIX defaults (nushell, xonsh) whose `-ilc` differs. An explicit
946
- * `shell` is tried alone.
947
- */
948
- declare function shellPath(options?: {
949
- env?: NodeJS.ProcessEnv;
950
- timeoutMs?: number;
951
- shell?: string;
952
- }): string | undefined;
953
- /**
954
- * Entries of `current` the shell doesn't know about (ad-hoc prepends from the
955
- * launching terminal) stay in front; then the shell's PATH in its own order.
956
- * From the Dock every launchd entry is already in the shell PATH, so the
957
- * result is exactly the shell PATH, with the shell's precedence intact.
958
- */
959
- declare function mergePath(current: string | undefined, shell: string | undefined): string;
960
- /** Merge the login shell's PATH into `process.env.PATH`. No-op on Windows or when no shell answers. */
961
- declare function fixPath(): void;
962
- //#endregion
963
- export { type ApprovalHub, type ApprovalOriginator, type ApprovalRequestInput, type AttachOptions, type ChatHost, type ChatHostEnvironment, type CompactionEntry, type CreateSessionParams, type DaemonEnvironment, EditOutcomeLedger, type EnsureDaemonOptions, type HelloParams, type HelloResult, type HostSettings, type HostSignal, IPC_BUILD_ID, IPC_PROTOCOL_VERSION, type InteractionHub, type IpcClient, type IpcClientOptions, type IpcDaemon, type IpcDaemonOptions, IpcErrorCode, type IpcMethodName, type IpcMethods, type IpcParams, type IpcResult, IpcVersionMismatchError, type ModelFallbackRef, type PendingAnnotation, type PendingApprovalsStore, type PendingInteraction, type PromptAttachment, type QueuedItem, type RunningWorkItem, type SendOptions, type SerializedPreview, type SessionPresence, type SessionRow, type TodosSnapshot, type WireApprovalRequest, connectIpcClient, connectOrSpawnDaemon, createApprovalHub, createChatHost, createDaemonEnvironment, createFileApprovalsStore, createInteractionHub, createMemoryApprovalsStore, daemonSocketName, defaultSocketPath, ensureDaemonRunning, extractEditPayloadForGate, fixPath, mergePath, probeSocket, readFileSafe, resolveCwdPath, runAttach, runCompaction, selfDaemonSpawnCommand, serializePreview, shellPath, startIpcDaemon };
964
- //# sourceMappingURL=ipc.d.ts.map
1
+ import { Eu as StorageDirs, ku as resolveStorageDirs } from "./index-BGe1fQT7.js";
2
+ import { $n as PendingApprovalsStore, Jn as ApprovalHub, Kn as EditOutcomeLedger, Mn as createInteractionHub, Qn as ChatHostEnvironment, Sn as ChatHost, Xn as createApprovalHub, Yn as ApprovalRequestInput, Zn as createMemoryApprovalsStore, _n as serializePreview, ar as PendingInteraction, cr as QueuedItem, dr as SerializedPreview, er as ApprovalOriginator, fr as SessionPresence, gn as resolveCwdPath, hn as readFileSafe, hr as WireApprovalRequest, ir as HostSignal, jn as InteractionHub, lr as RunningWorkItem, mn as extractEditPayloadForGate, mr as TodosSnapshot, or as PromptAttachment, qn as PendingAnnotation, rr as HostSettings, ur as SendOptions, vn as createChatHost, xn as runCompaction, yn as CompactionEntry } from "./index-CHABJd-L.js";
3
+ import { Cn as MachineInfo, Nn as MachineStatusChange, Sn as MachineErrorCode, jn as MachineRoot, xn as MACHINE_PROTOCOL_VERSION } from "./turn-operations-DQX5ZZni.js";
4
+ import { A as createFileApprovalsStore, B as probeSocket, C as createMachineHandlers, D as HostEnvironmentOptions, E as DaemonEnvironment, F as EnsureDaemonOptions, H as AttachOptions, I as IPC_BUILD_ID, L as daemonSocketName, M as IpcClientOptions, N as connectIpcClient, O as SharedHostSetup, P as connectOrSpawnDaemon, R as defaultSocketPath, S as turnCutPoints, T as createMachineLinkHandlers, U as runAttach, V as selfDaemonSpawnCommand, _ as IpcDaemonOptions, a as RemoteOAuthTarget, b as exchangeBoundaries, c as InProcessClientOptions, d as startInProcessHost, f as fixPath, g as IpcDaemon, h as shellPathAsync, i as RemoteOAuthStart, j as createHostEnvironment, k as createDaemonEnvironment, l as InProcessHost, m as shellPath, n as WorkspaceExecStreamResult, o as RemoteOAuthUi, p as mergePath, r as runWorkspaceExecStream, s as runRemoteOAuth, t as WorkspaceExecStreamOptions, u as InProcessHostOptions, v as startIpcDaemon, w as MachineLinksHandlerOptions, x as transcriptPage, y as WHOLE_RUN_PAGES, z as ensureDaemonRunning } from "./index-BVQsIKGn.js";
5
+ import { A as LOAD_EVENTS_PAGE_TURNS, B as SessionResumeResult, C as IPC_PROTOCOL_VERSION, D as IpcParams, E as IpcMethods, F as SESSION_TURNS_PAGE, G as loadEventsPage, H as SignalMeta, I as SIGNAL_SEQ_FIELD, K as loadSessionDocument, L as SequencedSignal, M as ModelFallbackRef, N as REDACTED, O as IpcResult, P as SESSION_TURNS_MAX_PAGE, R as SessionDocumentHead, S as HostRef, T as IpcMethodName, U as hostRefOf, V as SessionRow, W as loadAllEvents, _ as HostModelProvider, a as FsDirListing, b as HostOAuthStep, c as HelloResult, d as HostCatalogExtension, f as HostCatalogMcp, g as HostModelInfo, h as HostKind, i as FsDirEntry, j as LoadEventsPaging, k as LOAD_EVENTS_MAX_PAGE_TURNS, l as HostAuthMethod, m as HostCatalogSkill, n as IpcVersionMismatchError, o as FsRoots, p as HostCatalogPlugin, r as CreateSessionParams, s as HelloParams, t as IpcClient, u as HostCatalogError, v as HostOAuthBegin, w as IpcErrorCode, x as HostProviderAuth, y as HostOAuthComplete, z as SessionEventsPage } from "./client-core-BQSyDALT.js";
6
+ export { type ApprovalHub, type ApprovalOriginator, type ApprovalRequestInput, type AttachOptions, type ChatHost, type ChatHostEnvironment, type CompactionEntry, type CreateSessionParams, type DaemonEnvironment, EditOutcomeLedger, type EnsureDaemonOptions, type FsDirEntry, type FsDirListing, type FsRoots, type HelloParams, type HelloResult, type HostAuthMethod, type HostCatalogError, type HostCatalogExtension, type HostCatalogMcp, type HostCatalogPlugin, type HostCatalogSkill, type HostEnvironmentOptions, type HostKind, type HostModelInfo, type HostModelProvider, type HostOAuthBegin, type HostOAuthComplete, type HostOAuthStep, type HostProviderAuth, type HostRef, type HostSettings, type HostSignal, IPC_BUILD_ID, IPC_PROTOCOL_VERSION, type InProcessClientOptions, type InProcessHost, type InProcessHostOptions, type InteractionHub, type IpcClient, type IpcClientOptions, type IpcDaemon, type IpcDaemonOptions, IpcErrorCode, type IpcMethodName, type IpcMethods, type IpcParams, type IpcResult, IpcVersionMismatchError, LOAD_EVENTS_MAX_PAGE_TURNS, LOAD_EVENTS_PAGE_TURNS, type LoadEventsPaging, MACHINE_PROTOCOL_VERSION, MachineErrorCode, type MachineInfo, type MachineLinksHandlerOptions, type MachineRoot, type MachineStatusChange, type ModelFallbackRef, type PendingAnnotation, type PendingApprovalsStore, type PendingInteraction, type PromptAttachment, type QueuedItem, REDACTED, type RemoteOAuthStart, type RemoteOAuthTarget, type RemoteOAuthUi, type RunningWorkItem, SESSION_TURNS_MAX_PAGE, SESSION_TURNS_PAGE, SIGNAL_SEQ_FIELD, type SendOptions, type SequencedSignal, type SerializedPreview, type SessionDocumentHead, type SessionEventsPage, type SessionPresence, type SessionResumeResult, type SessionRow, type SharedHostSetup, type SignalMeta, type StorageDirs, type TodosSnapshot, WHOLE_RUN_PAGES, type WireApprovalRequest, type WorkspaceExecStreamOptions, type WorkspaceExecStreamResult, connectIpcClient, connectOrSpawnDaemon, createApprovalHub, createChatHost, createDaemonEnvironment, createFileApprovalsStore, createHostEnvironment, createInteractionHub, createMachineHandlers, createMachineLinkHandlers, createMemoryApprovalsStore, daemonSocketName, defaultSocketPath, ensureDaemonRunning, exchangeBoundaries, extractEditPayloadForGate, fixPath, hostRefOf, loadAllEvents, loadEventsPage, loadSessionDocument, mergePath, probeSocket, readFileSafe, resolveCwdPath, resolveStorageDirs, runAttach, runCompaction, runRemoteOAuth, runWorkspaceExecStream, selfDaemonSpawnCommand, serializePreview, shellPath, shellPathAsync, startInProcessHost, startIpcDaemon, transcriptPage, turnCutPoints };