@namzu/cli 51.2.0 → 51.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (409) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/bin-main.d.ts.map +1 -1
  3. package/dist/bin.js +1 -1
  4. package/dist/chunks/{acp-HCVLUS7I.js → acp-5EVQDZJC.js} +70 -61
  5. package/dist/chunks/acp-5EVQDZJC.js.map +6 -0
  6. package/dist/chunks/{activity-command-I3OMRZ2T.js → activity-command-4IUJ2CE4.js} +12 -12
  7. package/dist/chunks/{add-A65AU46H.js → add-FT7HDU36.js} +20 -20
  8. package/dist/chunks/{agent-3A66KRCM.js → agent-6O4DOLIL.js} +40 -38
  9. package/dist/chunks/agent-session-Z2BK2E7H.js +73 -0
  10. package/dist/chunks/apply-at-exit-PY2MP23E.js +118 -0
  11. package/dist/chunks/apply-at-exit-PY2MP23E.js.map +6 -0
  12. package/dist/chunks/{archive-IWWDLSAO.js → archive-5JVH6NLF.js} +10 -10
  13. package/dist/chunks/{bin-main-CRX2U7A6.js → bin-main-BEUIPMW3.js} +55 -22
  14. package/dist/chunks/bin-main-BEUIPMW3.js.map +6 -0
  15. package/dist/chunks/{binding-4AMPOED7.js → binding-S6NFVWG5.js} +3 -3
  16. package/dist/chunks/{browser-SAS7YPVD.js → browser-5GSFFOI3.js} +6 -6
  17. package/dist/chunks/{chat-ANHTX7D5.js → chat-I62ZOZRM.js} +18 -18
  18. package/dist/chunks/{chunk-U7AQ4OQJ.js → chunk-2MHTEUWP.js} +3 -3
  19. package/dist/chunks/{chunk-KZHMLRKY.js → chunk-2MLY3HJM.js} +4 -4
  20. package/dist/chunks/{chunk-OEKCCZ7I.js → chunk-2WRNHAVP.js} +5 -5
  21. package/dist/chunks/{chunk-K52DES57.js → chunk-3PDX3NC2.js} +2 -2
  22. package/dist/chunks/{chunk-NAWIOVUH.js → chunk-3TINX26N.js} +3 -3
  23. package/dist/chunks/{chunk-V23HHK5D.js → chunk-4ACKQXK5.js} +2 -2
  24. package/dist/chunks/{chunk-QZ4V25KD.js → chunk-4BEZSMMK.js} +3 -3
  25. package/dist/chunks/{chunk-3YM3IWPW.js → chunk-4GIWPKXI.js} +4 -4
  26. package/dist/chunks/{chunk-ANVIYMV6.js → chunk-4HCSIYER.js} +3 -3
  27. package/dist/chunks/{chunk-52YXYXRG.js → chunk-4U245XO5.js} +2 -2
  28. package/dist/chunks/{chunk-SQWFNFEX.js → chunk-4UC67RGJ.js} +3 -3
  29. package/dist/chunks/{chunk-TTXZK3BR.js → chunk-5BPI6U3L.js} +3 -3
  30. package/dist/chunks/{chunk-56ZS6OTK.js → chunk-5CP365QA.js} +4 -4
  31. package/dist/chunks/{chunk-BN32BPU6.js → chunk-5ZVFXZV4.js} +5 -5
  32. package/dist/chunks/{chunk-JETLWXUE.js → chunk-6ITTTCLD.js} +26 -2
  33. package/dist/chunks/chunk-6ITTTCLD.js.map +6 -0
  34. package/dist/chunks/{chunk-ILPXZDTW.js → chunk-74CPSWI7.js} +110 -98
  35. package/dist/chunks/{chunk-ILPXZDTW.js.map → chunk-74CPSWI7.js.map} +1 -1
  36. package/dist/chunks/chunk-7COFRJAP.js +60 -0
  37. package/dist/chunks/chunk-7COFRJAP.js.map +6 -0
  38. package/dist/chunks/{chunk-IPTWZUSV.js → chunk-7QIJT537.js} +2 -2
  39. package/dist/chunks/{chunk-VQHVH7X2.js → chunk-A4KQCS3B.js} +3 -3
  40. package/dist/chunks/{chunk-NXJQTDVT.js → chunk-AJ3K7Z27.js} +17 -17
  41. package/dist/chunks/{chunk-FMAUDMYL.js → chunk-AOMD2UUT.js} +12 -12
  42. package/dist/chunks/{chunk-PI6KC5CD.js → chunk-BFAMP45Q.js} +5 -5
  43. package/dist/chunks/chunk-BGODFPA6.js +208 -0
  44. package/dist/chunks/chunk-BGODFPA6.js.map +6 -0
  45. package/dist/chunks/{chunk-5YMIK3VP.js → chunk-BLSCBY2C.js} +3 -3
  46. package/dist/chunks/{chunk-Q5DW33F4.js → chunk-BZVF3B6D.js} +2 -2
  47. package/dist/chunks/{chunk-OL5SKFPM.js → chunk-CZHAME47.js} +4 -4
  48. package/dist/chunks/{chunk-AGC67H4M.js → chunk-DC67SNZK.js} +4 -4
  49. package/dist/chunks/{chunk-JUN4VUC6.js → chunk-DUUK4VHP.js} +16 -16
  50. package/dist/chunks/chunk-EQILSCM7.js +537 -0
  51. package/dist/chunks/chunk-EQILSCM7.js.map +6 -0
  52. package/dist/chunks/{chunk-6I4V7I5M.js → chunk-FENQC4LO.js} +2 -2
  53. package/dist/chunks/{chunk-UPSI724V.js → chunk-GDHAOY4Y.js} +3 -3
  54. package/dist/chunks/{chunk-WOX4KI7C.js → chunk-GID5WBC3.js} +32 -75
  55. package/dist/chunks/chunk-GID5WBC3.js.map +6 -0
  56. package/dist/chunks/{chunk-CYCUJOAD.js → chunk-H2SUL7EJ.js} +3 -3
  57. package/dist/chunks/{chunk-XYT53O3Z.js → chunk-H47LSNSP.js} +2 -2
  58. package/dist/chunks/chunk-HMRSZOTE.js +54 -0
  59. package/dist/chunks/chunk-HMRSZOTE.js.map +6 -0
  60. package/dist/chunks/{chunk-6MI4Q5QQ.js → chunk-IIOWVRGQ.js} +4 -4
  61. package/dist/chunks/{chunk-BC3IZXTY.js → chunk-IJEESVK5.js} +2 -2
  62. package/dist/chunks/{chunk-XFMGW2C5.js → chunk-J7IH3JCJ.js} +2 -2
  63. package/dist/chunks/{chunk-ALXE3SUZ.js → chunk-JCXJ3QSC.js} +3 -3
  64. package/dist/chunks/{chunk-KJVRHBMX.js → chunk-JEJL64OB.js} +8 -3
  65. package/dist/chunks/chunk-JEJL64OB.js.map +6 -0
  66. package/dist/chunks/{chunk-6CKU4TCF.js → chunk-JPQNCR67.js} +2 -2
  67. package/dist/chunks/chunk-K6GW3ZS7.js +66 -0
  68. package/dist/chunks/chunk-K6GW3ZS7.js.map +6 -0
  69. package/dist/chunks/{chunk-57QGQNRI.js → chunk-KCRZA2E3.js} +2 -2
  70. package/dist/chunks/{chunk-BUP54TBX.js → chunk-KQYWFHRH.js} +4 -4
  71. package/dist/chunks/{chunk-H56PLZHW.js → chunk-KROVFC6L.js} +2 -2
  72. package/dist/chunks/{chunk-2HB47MDS.js → chunk-KU7HGYKU.js} +51 -42
  73. package/dist/chunks/chunk-KU7HGYKU.js.map +6 -0
  74. package/dist/chunks/{chunk-M44I7P3H.js → chunk-LAR6KRME.js} +2 -2
  75. package/dist/chunks/{chunk-WJXVNXJZ.js → chunk-LBE2FBOM.js} +23 -23
  76. package/dist/chunks/{chunk-LQJ3TB5E.js → chunk-LFJ73AX2.js} +7 -7
  77. package/dist/chunks/chunk-LIO5MS6U.js +69 -0
  78. package/dist/chunks/chunk-LIO5MS6U.js.map +6 -0
  79. package/dist/chunks/{chunk-RCLTSI6G.js → chunk-LKHMBU72.js} +2 -2
  80. package/dist/chunks/{chunk-QS65X7D6.js → chunk-LWNTLOML.js} +3 -3
  81. package/dist/chunks/{chunk-DLVHJFXI.js → chunk-LXLM4OQO.js} +2 -2
  82. package/dist/chunks/{chunk-45Z4OPC6.js → chunk-M5NDHHMG.js} +3 -3
  83. package/dist/chunks/{chunk-FKQOGEKL.js → chunk-MLYGIG7M.js} +112 -9
  84. package/dist/chunks/chunk-MLYGIG7M.js.map +6 -0
  85. package/dist/chunks/{chunk-6S4L4SAU.js → chunk-MNQDNDGD.js} +6 -6
  86. package/dist/chunks/{chunk-E5OETSRN.js → chunk-N4B5NJTM.js} +6 -6
  87. package/dist/chunks/{chunk-HQ4WFN7B.js → chunk-ONCQ3NZ6.js} +864 -405
  88. package/dist/chunks/chunk-ONCQ3NZ6.js.map +6 -0
  89. package/dist/chunks/{chunk-DOPHHI6C.js → chunk-OU5UYDZ6.js} +4 -4
  90. package/dist/chunks/{chunk-R66H2G5R.js → chunk-OZQHNGZ3.js} +9 -2
  91. package/dist/chunks/chunk-OZQHNGZ3.js.map +6 -0
  92. package/dist/chunks/{chunk-3D52GNVJ.js → chunk-P4SMB7ZH.js} +4 -4
  93. package/dist/chunks/{chunk-TJSGSC2W.js → chunk-PGV6N7MI.js} +9 -9
  94. package/dist/chunks/{chunk-E7IXVEOQ.js → chunk-PXIVFM3R.js} +3 -3
  95. package/dist/chunks/{chunk-LGH2T6KL.js → chunk-QISKJ5SO.js} +2 -2
  96. package/dist/chunks/{chunk-WJ4YRFPQ.js → chunk-QNS2KLVT.js} +2 -2
  97. package/dist/chunks/{chunk-NY3I4WL7.js → chunk-RBVNETI2.js} +190 -52
  98. package/dist/chunks/chunk-RBVNETI2.js.map +6 -0
  99. package/dist/chunks/{chunk-XPCRLKFO.js → chunk-RLGFYOUI.js} +6 -6
  100. package/dist/chunks/{chunk-3MJ3YKNV.js → chunk-RSGMOAEC.js} +5 -5
  101. package/dist/chunks/{chunk-X3L6N5RM.js → chunk-RSJVDB4N.js} +8 -7
  102. package/dist/chunks/{chunk-KJ7Q3BC3.js → chunk-SO322MOO.js} +2 -2
  103. package/dist/chunks/{chunk-HHLWXGOG.js → chunk-SPO4YDME.js} +2 -2
  104. package/dist/chunks/{chunk-HXPRWMLH.js → chunk-SSYBTI26.js} +4 -4
  105. package/dist/chunks/{chunk-YSV633T5.js → chunk-SUFXIANI.js} +9 -9
  106. package/dist/chunks/chunk-SZOC2LYR.js +625 -0
  107. package/dist/chunks/chunk-SZOC2LYR.js.map +6 -0
  108. package/dist/chunks/{chunk-SMX5YHRV.js → chunk-TL6X6MAW.js} +2 -2
  109. package/dist/chunks/{chunk-SR75L2R5.js → chunk-TOGEJIC5.js} +4 -4
  110. package/dist/chunks/{chunk-T5X3GYBF.js → chunk-UVYM67LE.js} +2 -2
  111. package/dist/chunks/{chunk-NGE7TNCY.js → chunk-UZ6GL6GO.js} +2 -2
  112. package/dist/chunks/{chunk-RDWVNVZS.js → chunk-UZLAIMHO.js} +5 -5
  113. package/dist/chunks/{chunk-FSS72QJP.js → chunk-V7IK6MHO.js} +2 -2
  114. package/dist/chunks/{chunk-5U42MB6F.js → chunk-VM7ERL3Q.js} +10 -10
  115. package/dist/chunks/chunk-VO2M2XZD.js +107 -0
  116. package/dist/chunks/chunk-VO2M2XZD.js.map +6 -0
  117. package/dist/chunks/{chunk-DNOI4BL2.js → chunk-W2IBHK6I.js} +2 -2
  118. package/dist/chunks/{chunk-P53E77KS.js → chunk-WFKHAW6M.js} +3 -3
  119. package/dist/chunks/{chunk-5TPQGNYN.js → chunk-XC2RVHA4.js} +4 -4
  120. package/dist/chunks/{chunk-LYPEV765.js → chunk-XRPWPMV4.js} +16 -4
  121. package/dist/chunks/chunk-XRPWPMV4.js.map +6 -0
  122. package/dist/chunks/{chunk-LAXSPXNP.js → chunk-XUKM6GTW.js} +42 -518
  123. package/dist/chunks/chunk-XUKM6GTW.js.map +6 -0
  124. package/dist/chunks/{chunk-ITY5SBAS.js → chunk-YEMHAEO5.js} +2 -2
  125. package/dist/chunks/{chunk-ZXFEHB7N.js → chunk-YLSDJOE6.js} +2 -2
  126. package/dist/chunks/chunk-ZC7ZL42B.js +262 -0
  127. package/dist/chunks/chunk-ZC7ZL42B.js.map +6 -0
  128. package/dist/chunks/{chunk-OMP25UWR.js → chunk-ZM7SGAOM.js} +2 -2
  129. package/dist/chunks/{chunk-FLPT7I7I.js → chunk-ZR3FTR77.js} +4 -4
  130. package/dist/chunks/{cli-runtime-5UE6P2QW.js → cli-runtime-NNMDASHO.js} +16 -16
  131. package/dist/chunks/{commands-IOHIM2PX.js → commands-5MHVFUYY.js} +5 -5
  132. package/dist/chunks/{cost-MYSYQTT3.js → cost-XLXGPE4O.js} +3 -3
  133. package/dist/chunks/{crash-report-WLLGI2U4.js → crash-report-6V5QGAWA.js} +7 -7
  134. package/dist/chunks/{dist-IXAUMLZH.js → dist-AYALCT3C.js} +2 -2
  135. package/dist/chunks/{dist-CFPNJCLJ.js → dist-HOZJYOTI.js} +2 -2
  136. package/dist/chunks/{dist-E2PF4PGO.js → dist-K5Z6YPNW.js} +2 -2
  137. package/dist/chunks/{dist-MBVPANQB.js → dist-NESMLP2I.js} +40 -2
  138. package/dist/chunks/{dist-33QU2MGT.js → dist-NVATKUF3.js} +2 -2
  139. package/dist/chunks/{dist-6G55RC27.js → dist-O526SRCF.js} +2 -2
  140. package/dist/chunks/{dist-PKKDBDSA.js → dist-WQB34UXN.js} +2 -2
  141. package/dist/chunks/{dist-FZYKXUR4.js → dist-ZJ6G2XMS.js} +2 -2
  142. package/dist/chunks/{doctor-BXRPVVKL.js → doctor-WBAZKRZZ.js} +21 -18
  143. package/dist/chunks/{drain-EWKGL77B.js → drain-WWQCYAWR.js} +9 -9
  144. package/dist/chunks/{entry-XPXHELKT.js → entry-IJAMOWTT.js} +6 -6
  145. package/dist/chunks/{eval-OLNNJGUO.js → eval-45MNYTZQ.js} +171 -13
  146. package/dist/chunks/eval-45MNYTZQ.js.map +6 -0
  147. package/dist/chunks/{exec-XNMHHHTZ.js → exec-27CO6TKJ.js} +53 -51
  148. package/dist/chunks/exec-27CO6TKJ.js.map +6 -0
  149. package/dist/chunks/{home-T4ZVXIEX.js → home-A2HSOG27.js} +3 -3
  150. package/dist/chunks/{host-LQ6V4NJS.js → host-I3PPCCQ3.js} +10 -10
  151. package/dist/chunks/{host-queries-LEPTBKZK.js → host-queries-KIYOEKT2.js} +17 -16
  152. package/dist/chunks/host-queries-KIYOEKT2.js.map +6 -0
  153. package/dist/chunks/{learn-WOZKPYR4.js → learn-EC2QFA66.js} +11 -11
  154. package/dist/chunks/{learn-builtin-BVJFZF4R.js → learn-builtin-5BIIU7HC.js} +14 -14
  155. package/dist/chunks/{lifecycle-KKIDSRJV.js → lifecycle-6FKBXE32.js} +31 -31
  156. package/dist/chunks/{list-ZWIXNGJV.js → list-HQDI3H4N.js} +12 -12
  157. package/dist/chunks/{live-4GQNVGPU.js → live-CJEVZFJZ.js} +20 -17
  158. package/dist/chunks/{login-MBXPJW6F.js → login-C2QJP446.js} +13 -13
  159. package/dist/chunks/{logs-7GVMBYAQ.js → logs-QDXZ6HMD.js} +4 -4
  160. package/dist/chunks/{mcp-45UUEZMF.js → mcp-CFQMYILA.js} +21 -21
  161. package/dist/chunks/{message-command-YVAI3SLS.js → message-command-X5BGZN6B.js} +46 -44
  162. package/dist/chunks/message-command-X5BGZN6B.js.map +6 -0
  163. package/dist/chunks/{open-UG6VAHDW.js → open-USUNNL3C.js} +8 -8
  164. package/dist/chunks/{operator-tools-M4SMIAYS.js → operator-tools-B5EKAIEU.js} +13 -13
  165. package/dist/chunks/{output-schema-MZ6X4WQ2.js → output-schema-4JBWQTYX.js} +3 -3
  166. package/dist/chunks/{pal-R4RSZP2U.js → pal-RFDMWYUT.js} +16 -16
  167. package/dist/chunks/peers-EQUVQXAR.js +215 -0
  168. package/dist/chunks/peers-EQUVQXAR.js.map +6 -0
  169. package/dist/chunks/{peers-T5SXNFYU.js → peers-U4NWN44W.js} +6 -6
  170. package/dist/chunks/{plugin-SAQJPDKX.js → plugin-MGHRREZ7.js} +9 -9
  171. package/dist/chunks/{providers-CPHEQZCV.js → providers-QFMAPZK7.js} +11 -11
  172. package/dist/chunks/{pty-YAFV4ZA6.js → pty-YX7E7UJ6.js} +3 -3
  173. package/dist/chunks/resume-DHAMPNCN.js +23 -0
  174. package/dist/chunks/{resume-command-WJH7SKYB.js → resume-command-I7SNRBQE.js} +4 -4
  175. package/dist/chunks/running-2LN4IWKC.js +20 -0
  176. package/dist/chunks/{schedule-I7ZNWSN3.js → schedule-75QPB5GP.js} +10 -9
  177. package/dist/chunks/schedule-75QPB5GP.js.map +6 -0
  178. package/dist/chunks/send-II2KFKIK.js +42 -0
  179. package/dist/chunks/send-person-74VABPSV.js +28 -0
  180. package/dist/chunks/{service-ZRXXXJW7.js → service-6E7VOOO3.js} +33 -33
  181. package/dist/chunks/{skills-RIJBOCKN.js → skills-YVKRYB7M.js} +8 -8
  182. package/dist/chunks/{start-check-5DQL76YU.js → start-check-24S2MXPQ.js} +2 -2
  183. package/dist/chunks/{startup-failure-7KMOAOXE.js → startup-failure-SAPN77LY.js} +2 -2
  184. package/dist/chunks/{state-QNSG3QWY.js → state-JUVAH65X.js} +2 -2
  185. package/dist/chunks/{store-IDSNTJRG.js → store-CQOALIPR.js} +10 -10
  186. package/dist/chunks/{store-7NXFZTW7.js → store-EOOW5RU2.js} +6 -6
  187. package/dist/chunks/store-EOOW5RU2.js.map +6 -0
  188. package/dist/chunks/{store-NE2I4H7E.js → store-LX7F4E5A.js} +3 -3
  189. package/dist/chunks/store-LX7F4E5A.js.map +6 -0
  190. package/dist/chunks/{store-TY2ZO2EP.js → store-RS7ZLTDT.js} +4 -4
  191. package/dist/chunks/store-RS7ZLTDT.js.map +6 -0
  192. package/dist/chunks/{tui-DLUH6HQ4.js → tui-AVATPIDP.js} +93 -81
  193. package/dist/chunks/tui-AVATPIDP.js.map +6 -0
  194. package/dist/chunks/{upgrade-UZTPAIDF.js → upgrade-7MSTVPZZ.js} +33 -18
  195. package/dist/chunks/upgrade-7MSTVPZZ.js.map +6 -0
  196. package/dist/chunks/watch-PEJNCDLA.js +756 -0
  197. package/dist/chunks/watch-PEJNCDLA.js.map +6 -0
  198. package/dist/chunks/{workspaces-KLYC5537.js → workspaces-3F2DSKWC.js} +16 -16
  199. package/dist/chunks/{worktree-4PKAJ7LT.js → worktree-HPE4E4UF.js} +12 -12
  200. package/dist/cli.d.ts.map +1 -1
  201. package/dist/commands/eval-settings.d.ts +19 -0
  202. package/dist/commands/eval-settings.d.ts.map +1 -0
  203. package/dist/commands/eval.d.ts.map +1 -1
  204. package/dist/commands/manifest.d.ts +1 -0
  205. package/dist/commands/manifest.d.ts.map +1 -1
  206. package/dist/commands/send.d.ts +42 -0
  207. package/dist/commands/send.d.ts.map +1 -0
  208. package/dist/commands/upgrade.d.ts +5 -0
  209. package/dist/commands/upgrade.d.ts.map +1 -1
  210. package/dist/commands/watch.d.ts +10 -0
  211. package/dist/commands/watch.d.ts.map +1 -1
  212. package/dist/context/runtime-message.d.ts +12 -0
  213. package/dist/context/runtime-message.d.ts.map +1 -1
  214. package/dist/index.js +32 -29
  215. package/dist/integrations/auto-update/apply-at-exit.d.ts +41 -0
  216. package/dist/integrations/auto-update/apply-at-exit.d.ts.map +1 -0
  217. package/dist/integrations/auto-update/apply.d.ts +7 -12
  218. package/dist/integrations/auto-update/apply.d.ts.map +1 -1
  219. package/dist/integrations/auto-update/current-install.d.ts +8 -0
  220. package/dist/integrations/auto-update/current-install.d.ts.map +1 -0
  221. package/dist/integrations/auto-update/deferred-apply.d.ts +25 -0
  222. package/dist/integrations/auto-update/deferred-apply.d.ts.map +1 -0
  223. package/dist/integrations/auto-update/replaced-install.d.ts +32 -0
  224. package/dist/integrations/auto-update/replaced-install.d.ts.map +1 -0
  225. package/dist/integrations/auto-update/running.d.ts +43 -0
  226. package/dist/integrations/auto-update/running.d.ts.map +1 -0
  227. package/dist/integrations/auto-update/shared-state.d.ts +15 -0
  228. package/dist/integrations/auto-update/shared-state.d.ts.map +1 -0
  229. package/dist/integrations/auto-update/start.d.ts +2 -6
  230. package/dist/integrations/auto-update/start.d.ts.map +1 -1
  231. package/dist/integrations/auto-update/updater.d.ts +15 -0
  232. package/dist/integrations/auto-update/updater.d.ts.map +1 -1
  233. package/dist/integrations/harness/process.d.ts.map +1 -1
  234. package/dist/integrations/peers/process-ancestry.d.ts +14 -0
  235. package/dist/integrations/peers/process-ancestry.d.ts.map +1 -0
  236. package/dist/integrations/peers/runtime.d.ts +9 -0
  237. package/dist/integrations/peers/runtime.d.ts.map +1 -1
  238. package/dist/integrations/peers/send-once.d.ts +42 -0
  239. package/dist/integrations/peers/send-once.d.ts.map +1 -1
  240. package/dist/integrations/peers/send-person.d.ts +54 -0
  241. package/dist/integrations/peers/send-person.d.ts.map +1 -0
  242. package/dist/integrations/sessions/watch-say.d.ts +28 -0
  243. package/dist/integrations/sessions/watch-say.d.ts.map +1 -0
  244. package/dist/integrations/sessions/watch-view.d.ts +9 -0
  245. package/dist/integrations/sessions/watch-view.d.ts.map +1 -1
  246. package/dist/permissions/read-only-gate.d.ts.map +1 -1
  247. package/dist/permissions/send-floor.d.ts +54 -0
  248. package/dist/permissions/send-floor.d.ts.map +1 -0
  249. package/dist/terminal/manager.d.ts.map +1 -1
  250. package/dist/termination-state.d.ts +8 -2
  251. package/dist/termination-state.d.ts.map +1 -1
  252. package/dist/termination.d.ts +5 -0
  253. package/dist/termination.d.ts.map +1 -1
  254. package/dist/tui/App.d.ts.map +1 -1
  255. package/dist/tui/log-pane.d.ts.map +1 -1
  256. package/dist/tui/plain-failure.d.ts.map +1 -1
  257. package/dist/tui/update-notice.d.ts.map +1 -1
  258. package/package.json +5 -5
  259. package/dist/chunks/acp-HCVLUS7I.js.map +0 -6
  260. package/dist/chunks/agent-session-LJZO5VIZ.js +0 -71
  261. package/dist/chunks/bin-main-CRX2U7A6.js.map +0 -6
  262. package/dist/chunks/chunk-2HB47MDS.js.map +0 -6
  263. package/dist/chunks/chunk-FKQOGEKL.js.map +0 -6
  264. package/dist/chunks/chunk-HQ4WFN7B.js.map +0 -6
  265. package/dist/chunks/chunk-JETLWXUE.js.map +0 -6
  266. package/dist/chunks/chunk-KJVRHBMX.js.map +0 -6
  267. package/dist/chunks/chunk-LAXSPXNP.js.map +0 -6
  268. package/dist/chunks/chunk-LYPEV765.js.map +0 -6
  269. package/dist/chunks/chunk-NY3I4WL7.js.map +0 -6
  270. package/dist/chunks/chunk-R66H2G5R.js.map +0 -6
  271. package/dist/chunks/chunk-WOX4KI7C.js.map +0 -6
  272. package/dist/chunks/eval-OLNNJGUO.js.map +0 -6
  273. package/dist/chunks/exec-XNMHHHTZ.js.map +0 -6
  274. package/dist/chunks/host-queries-LEPTBKZK.js.map +0 -6
  275. package/dist/chunks/message-command-YVAI3SLS.js.map +0 -6
  276. package/dist/chunks/peers-6TIMGPGR.js +0 -417
  277. package/dist/chunks/peers-6TIMGPGR.js.map +0 -6
  278. package/dist/chunks/resume-GZGHY4UR.js +0 -23
  279. package/dist/chunks/schedule-I7ZNWSN3.js.map +0 -6
  280. package/dist/chunks/tui-DLUH6HQ4.js.map +0 -6
  281. package/dist/chunks/upgrade-UZTPAIDF.js.map +0 -6
  282. package/dist/chunks/watch-AAZHSSIE.js +0 -982
  283. package/dist/chunks/watch-AAZHSSIE.js.map +0 -6
  284. /package/dist/chunks/{activity-command-I3OMRZ2T.js.map → activity-command-4IUJ2CE4.js.map} +0 -0
  285. /package/dist/chunks/{add-A65AU46H.js.map → add-FT7HDU36.js.map} +0 -0
  286. /package/dist/chunks/{agent-3A66KRCM.js.map → agent-6O4DOLIL.js.map} +0 -0
  287. /package/dist/chunks/{agent-session-LJZO5VIZ.js.map → agent-session-Z2BK2E7H.js.map} +0 -0
  288. /package/dist/chunks/{archive-IWWDLSAO.js.map → archive-5JVH6NLF.js.map} +0 -0
  289. /package/dist/chunks/{binding-4AMPOED7.js.map → binding-S6NFVWG5.js.map} +0 -0
  290. /package/dist/chunks/{browser-SAS7YPVD.js.map → browser-5GSFFOI3.js.map} +0 -0
  291. /package/dist/chunks/{chat-ANHTX7D5.js.map → chat-I62ZOZRM.js.map} +0 -0
  292. /package/dist/chunks/{chunk-U7AQ4OQJ.js.map → chunk-2MHTEUWP.js.map} +0 -0
  293. /package/dist/chunks/{chunk-KZHMLRKY.js.map → chunk-2MLY3HJM.js.map} +0 -0
  294. /package/dist/chunks/{chunk-OEKCCZ7I.js.map → chunk-2WRNHAVP.js.map} +0 -0
  295. /package/dist/chunks/{chunk-K52DES57.js.map → chunk-3PDX3NC2.js.map} +0 -0
  296. /package/dist/chunks/{chunk-NAWIOVUH.js.map → chunk-3TINX26N.js.map} +0 -0
  297. /package/dist/chunks/{chunk-V23HHK5D.js.map → chunk-4ACKQXK5.js.map} +0 -0
  298. /package/dist/chunks/{chunk-QZ4V25KD.js.map → chunk-4BEZSMMK.js.map} +0 -0
  299. /package/dist/chunks/{chunk-3YM3IWPW.js.map → chunk-4GIWPKXI.js.map} +0 -0
  300. /package/dist/chunks/{chunk-ANVIYMV6.js.map → chunk-4HCSIYER.js.map} +0 -0
  301. /package/dist/chunks/{chunk-52YXYXRG.js.map → chunk-4U245XO5.js.map} +0 -0
  302. /package/dist/chunks/{chunk-SQWFNFEX.js.map → chunk-4UC67RGJ.js.map} +0 -0
  303. /package/dist/chunks/{chunk-TTXZK3BR.js.map → chunk-5BPI6U3L.js.map} +0 -0
  304. /package/dist/chunks/{chunk-56ZS6OTK.js.map → chunk-5CP365QA.js.map} +0 -0
  305. /package/dist/chunks/{chunk-BN32BPU6.js.map → chunk-5ZVFXZV4.js.map} +0 -0
  306. /package/dist/chunks/{chunk-IPTWZUSV.js.map → chunk-7QIJT537.js.map} +0 -0
  307. /package/dist/chunks/{chunk-VQHVH7X2.js.map → chunk-A4KQCS3B.js.map} +0 -0
  308. /package/dist/chunks/{chunk-NXJQTDVT.js.map → chunk-AJ3K7Z27.js.map} +0 -0
  309. /package/dist/chunks/{chunk-FMAUDMYL.js.map → chunk-AOMD2UUT.js.map} +0 -0
  310. /package/dist/chunks/{chunk-PI6KC5CD.js.map → chunk-BFAMP45Q.js.map} +0 -0
  311. /package/dist/chunks/{chunk-5YMIK3VP.js.map → chunk-BLSCBY2C.js.map} +0 -0
  312. /package/dist/chunks/{chunk-Q5DW33F4.js.map → chunk-BZVF3B6D.js.map} +0 -0
  313. /package/dist/chunks/{chunk-OL5SKFPM.js.map → chunk-CZHAME47.js.map} +0 -0
  314. /package/dist/chunks/{chunk-AGC67H4M.js.map → chunk-DC67SNZK.js.map} +0 -0
  315. /package/dist/chunks/{chunk-JUN4VUC6.js.map → chunk-DUUK4VHP.js.map} +0 -0
  316. /package/dist/chunks/{chunk-6I4V7I5M.js.map → chunk-FENQC4LO.js.map} +0 -0
  317. /package/dist/chunks/{chunk-UPSI724V.js.map → chunk-GDHAOY4Y.js.map} +0 -0
  318. /package/dist/chunks/{chunk-CYCUJOAD.js.map → chunk-H2SUL7EJ.js.map} +0 -0
  319. /package/dist/chunks/{chunk-XYT53O3Z.js.map → chunk-H47LSNSP.js.map} +0 -0
  320. /package/dist/chunks/{chunk-6MI4Q5QQ.js.map → chunk-IIOWVRGQ.js.map} +0 -0
  321. /package/dist/chunks/{chunk-BC3IZXTY.js.map → chunk-IJEESVK5.js.map} +0 -0
  322. /package/dist/chunks/{chunk-XFMGW2C5.js.map → chunk-J7IH3JCJ.js.map} +0 -0
  323. /package/dist/chunks/{chunk-ALXE3SUZ.js.map → chunk-JCXJ3QSC.js.map} +0 -0
  324. /package/dist/chunks/{chunk-6CKU4TCF.js.map → chunk-JPQNCR67.js.map} +0 -0
  325. /package/dist/chunks/{chunk-57QGQNRI.js.map → chunk-KCRZA2E3.js.map} +0 -0
  326. /package/dist/chunks/{chunk-BUP54TBX.js.map → chunk-KQYWFHRH.js.map} +0 -0
  327. /package/dist/chunks/{chunk-H56PLZHW.js.map → chunk-KROVFC6L.js.map} +0 -0
  328. /package/dist/chunks/{chunk-M44I7P3H.js.map → chunk-LAR6KRME.js.map} +0 -0
  329. /package/dist/chunks/{chunk-WJXVNXJZ.js.map → chunk-LBE2FBOM.js.map} +0 -0
  330. /package/dist/chunks/{chunk-LQJ3TB5E.js.map → chunk-LFJ73AX2.js.map} +0 -0
  331. /package/dist/chunks/{chunk-RCLTSI6G.js.map → chunk-LKHMBU72.js.map} +0 -0
  332. /package/dist/chunks/{chunk-QS65X7D6.js.map → chunk-LWNTLOML.js.map} +0 -0
  333. /package/dist/chunks/{chunk-DLVHJFXI.js.map → chunk-LXLM4OQO.js.map} +0 -0
  334. /package/dist/chunks/{chunk-45Z4OPC6.js.map → chunk-M5NDHHMG.js.map} +0 -0
  335. /package/dist/chunks/{chunk-6S4L4SAU.js.map → chunk-MNQDNDGD.js.map} +0 -0
  336. /package/dist/chunks/{chunk-E5OETSRN.js.map → chunk-N4B5NJTM.js.map} +0 -0
  337. /package/dist/chunks/{chunk-DOPHHI6C.js.map → chunk-OU5UYDZ6.js.map} +0 -0
  338. /package/dist/chunks/{chunk-3D52GNVJ.js.map → chunk-P4SMB7ZH.js.map} +0 -0
  339. /package/dist/chunks/{chunk-TJSGSC2W.js.map → chunk-PGV6N7MI.js.map} +0 -0
  340. /package/dist/chunks/{chunk-E7IXVEOQ.js.map → chunk-PXIVFM3R.js.map} +0 -0
  341. /package/dist/chunks/{chunk-LGH2T6KL.js.map → chunk-QISKJ5SO.js.map} +0 -0
  342. /package/dist/chunks/{chunk-WJ4YRFPQ.js.map → chunk-QNS2KLVT.js.map} +0 -0
  343. /package/dist/chunks/{chunk-XPCRLKFO.js.map → chunk-RLGFYOUI.js.map} +0 -0
  344. /package/dist/chunks/{chunk-3MJ3YKNV.js.map → chunk-RSGMOAEC.js.map} +0 -0
  345. /package/dist/chunks/{chunk-X3L6N5RM.js.map → chunk-RSJVDB4N.js.map} +0 -0
  346. /package/dist/chunks/{chunk-KJ7Q3BC3.js.map → chunk-SO322MOO.js.map} +0 -0
  347. /package/dist/chunks/{chunk-HHLWXGOG.js.map → chunk-SPO4YDME.js.map} +0 -0
  348. /package/dist/chunks/{chunk-HXPRWMLH.js.map → chunk-SSYBTI26.js.map} +0 -0
  349. /package/dist/chunks/{chunk-YSV633T5.js.map → chunk-SUFXIANI.js.map} +0 -0
  350. /package/dist/chunks/{chunk-SMX5YHRV.js.map → chunk-TL6X6MAW.js.map} +0 -0
  351. /package/dist/chunks/{chunk-SR75L2R5.js.map → chunk-TOGEJIC5.js.map} +0 -0
  352. /package/dist/chunks/{chunk-T5X3GYBF.js.map → chunk-UVYM67LE.js.map} +0 -0
  353. /package/dist/chunks/{chunk-NGE7TNCY.js.map → chunk-UZ6GL6GO.js.map} +0 -0
  354. /package/dist/chunks/{chunk-RDWVNVZS.js.map → chunk-UZLAIMHO.js.map} +0 -0
  355. /package/dist/chunks/{chunk-FSS72QJP.js.map → chunk-V7IK6MHO.js.map} +0 -0
  356. /package/dist/chunks/{chunk-5U42MB6F.js.map → chunk-VM7ERL3Q.js.map} +0 -0
  357. /package/dist/chunks/{chunk-DNOI4BL2.js.map → chunk-W2IBHK6I.js.map} +0 -0
  358. /package/dist/chunks/{chunk-P53E77KS.js.map → chunk-WFKHAW6M.js.map} +0 -0
  359. /package/dist/chunks/{chunk-5TPQGNYN.js.map → chunk-XC2RVHA4.js.map} +0 -0
  360. /package/dist/chunks/{chunk-ITY5SBAS.js.map → chunk-YEMHAEO5.js.map} +0 -0
  361. /package/dist/chunks/{chunk-ZXFEHB7N.js.map → chunk-YLSDJOE6.js.map} +0 -0
  362. /package/dist/chunks/{chunk-OMP25UWR.js.map → chunk-ZM7SGAOM.js.map} +0 -0
  363. /package/dist/chunks/{chunk-FLPT7I7I.js.map → chunk-ZR3FTR77.js.map} +0 -0
  364. /package/dist/chunks/{cli-runtime-5UE6P2QW.js.map → cli-runtime-NNMDASHO.js.map} +0 -0
  365. /package/dist/chunks/{commands-IOHIM2PX.js.map → commands-5MHVFUYY.js.map} +0 -0
  366. /package/dist/chunks/{cost-MYSYQTT3.js.map → cost-XLXGPE4O.js.map} +0 -0
  367. /package/dist/chunks/{crash-report-WLLGI2U4.js.map → crash-report-6V5QGAWA.js.map} +0 -0
  368. /package/dist/chunks/{dist-IXAUMLZH.js.map → dist-AYALCT3C.js.map} +0 -0
  369. /package/dist/chunks/{dist-CFPNJCLJ.js.map → dist-HOZJYOTI.js.map} +0 -0
  370. /package/dist/chunks/{dist-E2PF4PGO.js.map → dist-K5Z6YPNW.js.map} +0 -0
  371. /package/dist/chunks/{dist-MBVPANQB.js.map → dist-NESMLP2I.js.map} +0 -0
  372. /package/dist/chunks/{dist-33QU2MGT.js.map → dist-NVATKUF3.js.map} +0 -0
  373. /package/dist/chunks/{dist-6G55RC27.js.map → dist-O526SRCF.js.map} +0 -0
  374. /package/dist/chunks/{dist-PKKDBDSA.js.map → dist-WQB34UXN.js.map} +0 -0
  375. /package/dist/chunks/{dist-FZYKXUR4.js.map → dist-ZJ6G2XMS.js.map} +0 -0
  376. /package/dist/chunks/{doctor-BXRPVVKL.js.map → doctor-WBAZKRZZ.js.map} +0 -0
  377. /package/dist/chunks/{drain-EWKGL77B.js.map → drain-WWQCYAWR.js.map} +0 -0
  378. /package/dist/chunks/{entry-XPXHELKT.js.map → entry-IJAMOWTT.js.map} +0 -0
  379. /package/dist/chunks/{home-T4ZVXIEX.js.map → home-A2HSOG27.js.map} +0 -0
  380. /package/dist/chunks/{host-LQ6V4NJS.js.map → host-I3PPCCQ3.js.map} +0 -0
  381. /package/dist/chunks/{learn-WOZKPYR4.js.map → learn-EC2QFA66.js.map} +0 -0
  382. /package/dist/chunks/{learn-builtin-BVJFZF4R.js.map → learn-builtin-5BIIU7HC.js.map} +0 -0
  383. /package/dist/chunks/{lifecycle-KKIDSRJV.js.map → lifecycle-6FKBXE32.js.map} +0 -0
  384. /package/dist/chunks/{list-ZWIXNGJV.js.map → list-HQDI3H4N.js.map} +0 -0
  385. /package/dist/chunks/{live-4GQNVGPU.js.map → live-CJEVZFJZ.js.map} +0 -0
  386. /package/dist/chunks/{login-MBXPJW6F.js.map → login-C2QJP446.js.map} +0 -0
  387. /package/dist/chunks/{logs-7GVMBYAQ.js.map → logs-QDXZ6HMD.js.map} +0 -0
  388. /package/dist/chunks/{mcp-45UUEZMF.js.map → mcp-CFQMYILA.js.map} +0 -0
  389. /package/dist/chunks/{open-UG6VAHDW.js.map → open-USUNNL3C.js.map} +0 -0
  390. /package/dist/chunks/{operator-tools-M4SMIAYS.js.map → operator-tools-B5EKAIEU.js.map} +0 -0
  391. /package/dist/chunks/{output-schema-MZ6X4WQ2.js.map → output-schema-4JBWQTYX.js.map} +0 -0
  392. /package/dist/chunks/{pal-R4RSZP2U.js.map → pal-RFDMWYUT.js.map} +0 -0
  393. /package/dist/chunks/{peers-T5SXNFYU.js.map → peers-U4NWN44W.js.map} +0 -0
  394. /package/dist/chunks/{plugin-SAQJPDKX.js.map → plugin-MGHRREZ7.js.map} +0 -0
  395. /package/dist/chunks/{providers-CPHEQZCV.js.map → providers-QFMAPZK7.js.map} +0 -0
  396. /package/dist/chunks/{pty-YAFV4ZA6.js.map → pty-YX7E7UJ6.js.map} +0 -0
  397. /package/dist/chunks/{resume-GZGHY4UR.js.map → resume-DHAMPNCN.js.map} +0 -0
  398. /package/dist/chunks/{resume-command-WJH7SKYB.js.map → resume-command-I7SNRBQE.js.map} +0 -0
  399. /package/dist/chunks/{start-check-5DQL76YU.js.map → running-2LN4IWKC.js.map} +0 -0
  400. /package/dist/chunks/{store-7NXFZTW7.js.map → send-II2KFKIK.js.map} +0 -0
  401. /package/dist/chunks/{store-IDSNTJRG.js.map → send-person-74VABPSV.js.map} +0 -0
  402. /package/dist/chunks/{service-ZRXXXJW7.js.map → service-6E7VOOO3.js.map} +0 -0
  403. /package/dist/chunks/{skills-RIJBOCKN.js.map → skills-YVKRYB7M.js.map} +0 -0
  404. /package/dist/chunks/{store-NE2I4H7E.js.map → start-check-24S2MXPQ.js.map} +0 -0
  405. /package/dist/chunks/{startup-failure-7KMOAOXE.js.map → startup-failure-SAPN77LY.js.map} +0 -0
  406. /package/dist/chunks/{state-QNSG3QWY.js.map → state-JUVAH65X.js.map} +0 -0
  407. /package/dist/chunks/{store-TY2ZO2EP.js.map → store-CQOALIPR.js.map} +0 -0
  408. /package/dist/chunks/{workspaces-KLYC5537.js.map → workspaces-3F2DSKWC.js.map} +0 -0
  409. /package/dist/chunks/{worktree-4PKAJ7LT.js.map → worktree-HPE4E4UF.js.map} +0 -0
@@ -0,0 +1,756 @@
1
+ import { createRequire as __namzuCreateRequire } from 'node:module';
2
+ const require = __namzuCreateRequire(import.meta.url);
3
+ import {
4
+ DEFAULT_SEND_WAIT_SECONDS,
5
+ renderSendReceipt
6
+ } from "./chunk-ZC7ZL42B.js";
7
+ import {
8
+ SessionFollower,
9
+ SessionNotFoundError,
10
+ SessionNotOwnedError,
11
+ SessionUnreadableError,
12
+ findSession,
13
+ listRunningSessions
14
+ } from "./chunk-SZOC2LYR.js";
15
+ import "./chunk-7COFRJAP.js";
16
+ import "./chunk-BGODFPA6.js";
17
+ import {
18
+ glyphForRole,
19
+ projectConversation,
20
+ trailFromRecords
21
+ } from "./chunk-74CPSWI7.js";
22
+ import "./chunk-27R3OTVS.js";
23
+ import "./chunk-JPQNCR67.js";
24
+ import "./chunk-NADQQMMG.js";
25
+ import "./chunk-7QIJT537.js";
26
+ import "./chunk-DUUK4VHP.js";
27
+ import "./chunk-KQYWFHRH.js";
28
+ import "./chunk-MDK4RMBQ.js";
29
+ import "./chunk-4BEZSMMK.js";
30
+ import "./chunk-YLSDJOE6.js";
31
+ import "./chunk-B5AIMVRI.js";
32
+ import "./chunk-LFJ73AX2.js";
33
+ import "./chunk-GWQEMJFS.js";
34
+ import "./chunk-AJ3K7Z27.js";
35
+ import "./chunk-UZLAIMHO.js";
36
+ import "./chunk-OG2MLME3.js";
37
+ import "./chunk-H2SUL7EJ.js";
38
+ import "./chunk-YEMHAEO5.js";
39
+ import "./chunk-SSYBTI26.js";
40
+ import "./chunk-XEUQN4JC.js";
41
+ import "./chunk-3PDX3NC2.js";
42
+ import "./chunk-4ACKQXK5.js";
43
+ import "./chunk-6YG7D7U4.js";
44
+ import "./chunk-6ULKBT6P.js";
45
+ import "./chunk-4U245XO5.js";
46
+ import "./chunk-HREK4V2O.js";
47
+ import "./chunk-MLYGIG7M.js";
48
+ import "./chunk-G4N43E6M.js";
49
+ import "./chunk-OU5UYDZ6.js";
50
+ import "./chunk-RSGMOAEC.js";
51
+ import "./chunk-LKHMBU72.js";
52
+ import "./chunk-PXIVFM3R.js";
53
+ import "./chunk-6ITTTCLD.js";
54
+ import "./chunk-JCXJ3QSC.js";
55
+ import "./chunk-VM7ERL3Q.js";
56
+ import "./chunk-N4B5NJTM.js";
57
+ import "./chunk-CZHAME47.js";
58
+ import "./chunk-RBVNETI2.js";
59
+ import "./chunk-P4SMB7ZH.js";
60
+ import "./chunk-4GIWPKXI.js";
61
+ import "./chunk-2MHTEUWP.js";
62
+ import "./chunk-JEJL64OB.js";
63
+ import "./chunk-K6GW3ZS7.js";
64
+ import "./chunk-BBTPD3DU.js";
65
+ import "./chunk-M5NDHHMG.js";
66
+ import "./chunk-TOGEJIC5.js";
67
+ import "./chunk-2MLY3HJM.js";
68
+ import "./chunk-UVYM67LE.js";
69
+ import "./chunk-5CP365QA.js";
70
+ import "./chunk-WHODOMXA.js";
71
+ import "./chunk-FENQC4LO.js";
72
+ import "./chunk-5BPI6U3L.js";
73
+ import "./chunk-ZM7SGAOM.js";
74
+ import "./chunk-YOWYTBJS.js";
75
+ import "./chunk-2IPDTDB3.js";
76
+ import {
77
+ terminalDisplayText
78
+ } from "./chunk-I4GTRFPK.js";
79
+ import "./chunk-3TINX26N.js";
80
+ import "./chunk-ZWA2JRJV.js";
81
+ import "./chunk-NUGPLXVK.js";
82
+ import "./chunk-2WRNHAVP.js";
83
+ import "./chunk-WFKHAW6M.js";
84
+ import "./chunk-BFAMP45Q.js";
85
+ import "./chunk-ZR3FTR77.js";
86
+ import "./chunk-RLGFYOUI.js";
87
+ import {
88
+ readIdentity
89
+ } from "./chunk-A4KQCS3B.js";
90
+ import "./chunk-JQIBPPOL.js";
91
+ import "./chunk-XC2RVHA4.js";
92
+ import "./chunk-J7IH3JCJ.js";
93
+ import "./chunk-IJEESVK5.js";
94
+ import "./chunk-LIO5MS6U.js";
95
+ import "./chunk-GID5WBC3.js";
96
+ import "./chunk-XUKM6GTW.js";
97
+ import "./chunk-AK2U3N2A.js";
98
+ import "./chunk-HMRSZOTE.js";
99
+ import "./chunk-4UC67RGJ.js";
100
+ import "./chunk-JR6EFL7G.js";
101
+ import "./chunk-A22MBIYU.js";
102
+ import "./chunk-OEW7CJKK.js";
103
+ import "./chunk-EQILSCM7.js";
104
+ import "./chunk-CHIEVVQ2.js";
105
+ import "./chunk-EDOJTQQU.js";
106
+ import "./chunk-BLSCBY2C.js";
107
+ import "./chunk-OH6TB27S.js";
108
+ import "./chunk-RSJVDB4N.js";
109
+ import "./chunk-LCGXWCVU.js";
110
+ import "./chunk-4HCSIYER.js";
111
+ import "./chunk-H47LSNSP.js";
112
+ import "./chunk-SIG7WHBU.js";
113
+ import "./chunk-LVVD32KJ.js";
114
+ import "./chunk-KONYGNG6.js";
115
+ import "./chunk-WMEZTDLT.js";
116
+ import "./chunk-GNBMKISG.js";
117
+ import "./chunk-6PWRKA5T.js";
118
+ import {
119
+ CLI_VERSION
120
+ } from "./chunk-HE7WUOX2.js";
121
+ import "./chunk-QLDUL46Z.js";
122
+ import "./chunk-U5UV2YRE.js";
123
+ import {
124
+ EXIT_FAIL,
125
+ EXIT_NOINPUT,
126
+ EXIT_OK,
127
+ EXIT_UNAVAILABLE,
128
+ EXIT_USAGE
129
+ } from "./chunk-FTMONTUX.js";
130
+ import "./chunk-AOMD2UUT.js";
131
+ import "./chunk-IIOWVRGQ.js";
132
+ import "./chunk-4QIWRKJO.js";
133
+ import "./chunk-G6YSAHKC.js";
134
+ import "./chunk-KTPFUCRU.js";
135
+ import "./chunk-RI2KAZJO.js";
136
+ import "./chunk-V7IK6MHO.js";
137
+ import "./chunk-BZVF3B6D.js";
138
+ import "./chunk-LAR6KRME.js";
139
+ import "./chunk-JORONMD3.js";
140
+ import "./chunk-QISKJ5SO.js";
141
+ import "./chunk-UZ6GL6GO.js";
142
+ import {
143
+ resolveNamzuHome
144
+ } from "./chunk-ONCQ3NZ6.js";
145
+ import {
146
+ __name
147
+ } from "./chunk-76FLAFCG.js";
148
+
149
+ // src/commands/watch.ts
150
+ import { join } from "node:path";
151
+ import { createInterface } from "node:readline/promises";
152
+
153
+ // src/integrations/sessions/watch-say.ts
154
+ var SAY_KEY = "m";
155
+ function typable(ch) {
156
+ const code = ch.codePointAt(0) ?? 0;
157
+ if (code < 32 || code >= 127 && code <= 159) return false;
158
+ if (code === 8232 || code === 8233) return false;
159
+ if (code >= 8203 && code <= 8207 || code >= 8234 && code <= 8238) return false;
160
+ if (code >= 8288 && code <= 8303 || code === 65279) return false;
161
+ return true;
162
+ }
163
+ __name(typable, "typable");
164
+ var SayLine = class {
165
+ static {
166
+ __name(this, "SayLine");
167
+ }
168
+ #text;
169
+ /** Whether the line is open. */
170
+ get open() {
171
+ return this.#text !== void 0;
172
+ }
173
+ /** What a chunk of raw terminal input does. Ctrl+C always leaves. */
174
+ feed(chunk) {
175
+ const events = [];
176
+ if (chunk === "\x1B") {
177
+ if (this.#text === void 0) return events;
178
+ this.#text = void 0;
179
+ return [{ kind: "cancel" }];
180
+ }
181
+ if (chunk.startsWith("\x1B")) return events;
182
+ for (const ch of chunk) {
183
+ if (ch === "") return [{ kind: "leave" }];
184
+ if (this.#text === void 0) {
185
+ if (ch === SAY_KEY) {
186
+ this.#text = "";
187
+ events.push({ kind: "compose", text: "" });
188
+ }
189
+ continue;
190
+ }
191
+ if (ch === "\r" || ch === "\n") {
192
+ const text = this.#text;
193
+ this.#text = void 0;
194
+ if (text.trim().length === 0) events.push({ kind: "cancel" });
195
+ else events.push({ kind: "submit", text });
196
+ return events;
197
+ }
198
+ if (ch === "\x7F" || ch === "\b") {
199
+ this.#text = [...this.#text].slice(0, -1).join("");
200
+ events.push({ kind: "compose", text: this.#text });
201
+ } else if (ch === "") {
202
+ this.#text = "";
203
+ events.push({ kind: "compose", text: "" });
204
+ } else if (typable(ch)) {
205
+ this.#text += ch;
206
+ events.push({ kind: "compose", text: this.#text });
207
+ }
208
+ }
209
+ return events;
210
+ }
211
+ };
212
+
213
+ // src/integrations/sessions/watch-view.ts
214
+ var WATCH_READ_ONLY_NOTE = "Read-only: this view never sends a message, approves or answers anything.";
215
+ var WATCH_SAY_NOTE = "This view never approves or answers anything and never writes the session. Press m to say something to the session as yourself; it cannot approve anything.";
216
+ var WATCH_SETTLED_NOTE = "Steps appear here as they settle; text a step is still writing appears when that step ends.";
217
+ function rowsOf(snapshot, cwd) {
218
+ let n = 0;
219
+ return projectConversation(snapshot.messages, () => `watch-${n++}`, [], {
220
+ trail: trailFromRecords(snapshot.records, {
221
+ ...snapshot.liveTurnId !== void 0 ? { liveTurnId: snapshot.liveTurnId } : {}
222
+ }),
223
+ cwd
224
+ });
225
+ }
226
+ __name(rowsOf, "rowsOf");
227
+ function rowLines(row) {
228
+ const glyph = terminalDisplayText(row.glyph ?? glyphForRole(row.role));
229
+ const body = terminalDisplayText(row.content).replace(/\n+$/, "");
230
+ const meta = row.meta ? ` ${terminalDisplayText(row.meta)}` : "";
231
+ const lines = body.split("\n");
232
+ const indent = glyph === "\u23BF" ? " " : "";
233
+ return lines.map(
234
+ (line, index) => index === 0 ? `${indent}${glyph} ${line}${meta}` : `${indent} ${line}`
235
+ );
236
+ }
237
+ __name(rowLines, "rowLines");
238
+ function transcriptLines(rows, options) {
239
+ const inFlight = options.holdOpenTail ? rows.findIndex((row) => row.pending === true) : -1;
240
+ const settled = inFlight >= 0 ? rows.slice(0, inFlight) : rows;
241
+ const shown = inFlight < 0 && options.holdOpenTail && rows.length > 0 && isOpenRow(rows[rows.length - 1]) ? rows.slice(0, -1) : settled;
242
+ const lines = [];
243
+ shown.forEach((row, index) => {
244
+ if (index > 0 && row.glyph !== "\u23BF") lines.push("");
245
+ lines.push(...rowLines(row));
246
+ });
247
+ return lines;
248
+ }
249
+ __name(transcriptLines, "transcriptLines");
250
+ function isOpenRow(row) {
251
+ return row.group !== void 0 || row.pending === true;
252
+ }
253
+ __name(isOpenRow, "isOpenRow");
254
+ function statusLine(status, options) {
255
+ const tail = status.state === "finished" && options.ended === "stay" ? " Still watching; a new turn will appear here. Ctrl+C leaves." : "";
256
+ const mode = options.canSay ? "m to message it" : "read-only";
257
+ return `watching \xB7 ${mode} \xB7 ${status.state} \xB7 ${terminalDisplayText(status.sentence)}${tail}`;
258
+ }
259
+ __name(statusLine, "statusLine");
260
+ var WatchPrinter = class {
261
+ static {
262
+ __name(this, "WatchPrinter");
263
+ }
264
+ #o;
265
+ #printed = [];
266
+ #lastState;
267
+ #lastSentence;
268
+ #statusShown = false;
269
+ #statusText = "";
270
+ #prompt;
271
+ #fitted = "";
272
+ constructor(options) {
273
+ this.#o = options;
274
+ }
275
+ header(line) {
276
+ this.#clearStatus();
277
+ this.#o.write(`${this.#o.plain ? "[watch] " : ""}${terminalDisplayText(line)}
278
+ `);
279
+ }
280
+ update(snapshot, rows) {
281
+ const open = snapshot.status.state === "running" || snapshot.status.state === "waiting";
282
+ const lines = transcriptLines(rows, { holdOpenTail: open });
283
+ const out = [];
284
+ const prefixHolds = this.#printed.every((line, index) => lines[index] === line);
285
+ if (this.#printed.length > 0 && !prefixHolds) {
286
+ out.push(
287
+ this.#o.plain ? "[watch] the session rewrote its history (compaction); showing it again from the top" : "\u2500\u2500 the session rewrote its history (compaction); showing it again from the top \u2500\u2500"
288
+ );
289
+ this.#printed = [];
290
+ }
291
+ out.push(...lines.slice(this.#printed.length));
292
+ this.#printed = lines;
293
+ if (snapshot.brokenAt !== void 0 && snapshot.changed) {
294
+ out.push(
295
+ `${this.#o.plain ? "[watch] " : ""}the log's chain breaks at record ${snapshot.brokenAt}; what precedes it is shown`
296
+ );
297
+ }
298
+ const { status } = snapshot;
299
+ if (this.#o.plain) {
300
+ if (out.length > 0) this.#o.write(`${out.join("\n")}
301
+ `);
302
+ if (status.state !== this.#lastState || status.sentence !== this.#lastSentence) {
303
+ this.#o.write(`[watch] ${status.state}: ${terminalDisplayText(status.sentence)}
304
+ `);
305
+ }
306
+ } else {
307
+ const line = statusLine(status, {
308
+ ended: this.#o.ended,
309
+ ...this.#o.canSay ? { canSay: true } : {}
310
+ });
311
+ const room = Math.max(10, this.#o.columns - 1);
312
+ const fitted = line.length > room ? `${line.slice(0, room - 1)}\u2026` : line;
313
+ this.#fitted = fitted;
314
+ const bottom = this.#prompt !== void 0 ? this.#promptLine() : fitted;
315
+ if (out.length > 0 || !this.#statusShown || bottom !== this.#statusText) {
316
+ this.#clearStatus();
317
+ if (out.length > 0) this.#o.write(`${out.join("\n")}
318
+ `);
319
+ this.#o.write(bottom);
320
+ this.#statusShown = true;
321
+ this.#statusText = bottom;
322
+ }
323
+ }
324
+ this.#lastState = status.state;
325
+ this.#lastSentence = status.sentence;
326
+ }
327
+ /** Show the line being typed in place of the status line; `undefined` brings the status back. */
328
+ prompt(text) {
329
+ if (this.#o.plain) return;
330
+ this.#prompt = text;
331
+ this.#clearStatus();
332
+ const bottom = text !== void 0 ? this.#promptLine() : this.#fitted;
333
+ this.#o.write(bottom);
334
+ this.#statusShown = bottom.length > 0;
335
+ this.#statusText = bottom;
336
+ }
337
+ /** One finished line of scrollback that is the watcher's own, such as what became of a message. */
338
+ note(line) {
339
+ this.#clearStatus();
340
+ this.#o.write(`${this.#o.plain ? "[watch] " : "\u2500\u2500 "}${terminalDisplayText(line)}
341
+ `);
342
+ const bottom = this.#prompt !== void 0 ? this.#promptLine() : this.#fitted;
343
+ this.#o.write(bottom);
344
+ this.#statusShown = bottom.length > 0;
345
+ this.#statusText = bottom;
346
+ }
347
+ #promptLine() {
348
+ const label = "message> ";
349
+ const room = Math.max(4, this.#o.columns - label.length - 2);
350
+ const typed = terminalDisplayText(this.#prompt ?? "");
351
+ const shown = typed.length > room ? `\u2026${typed.slice(typed.length - room + 1)}` : typed;
352
+ return `${label}${shown}`;
353
+ }
354
+ /** Leave the terminal with the status line finished, not half-erased. */
355
+ close(note) {
356
+ this.#clearStatus();
357
+ if (note) this.#o.write(`${this.#o.plain ? "[watch] " : ""}${terminalDisplayText(note)}
358
+ `);
359
+ }
360
+ #clearStatus() {
361
+ if (this.#statusShown) this.#o.write("\r\x1B[2K");
362
+ this.#statusShown = false;
363
+ }
364
+ };
365
+ function isEnded(state) {
366
+ return state === "finished" || state === "interrupted";
367
+ }
368
+ __name(isEnded, "isEnded");
369
+ async function follow(options) {
370
+ let last;
371
+ let rows;
372
+ for (; ; ) {
373
+ if (options.signal.aborted) return { reason: "aborted", status: last };
374
+ const snapshot = await options.follower.poll();
375
+ last = snapshot.status;
376
+ if (rows === void 0 || snapshot.changed) rows = rowsOf(snapshot, options.cwd);
377
+ options.printer.update(snapshot, rows);
378
+ if (options.exitOnEnd && isEnded(snapshot.status.state)) {
379
+ return { reason: "ended", status: snapshot.status };
380
+ }
381
+ await options.wait(options.signal);
382
+ }
383
+ }
384
+ __name(follow, "follow");
385
+
386
+ // src/integrations/sessions/watch-wait.ts
387
+ import { watch } from "node:fs";
388
+ var DEFAULT_FALLBACK_MS = 1e3;
389
+ var ChangeWaiter = class {
390
+ static {
391
+ __name(this, "ChangeWaiter");
392
+ }
393
+ #fallbackMs;
394
+ #watchers = [];
395
+ #dirty = false;
396
+ #wake;
397
+ constructor(options) {
398
+ this.#fallbackMs = options.fallbackMs ?? DEFAULT_FALLBACK_MS;
399
+ const open = options.watchDir ?? ((dir, listener) => watch(dir, { persistent: false }, (event, name) => listener(event, name)));
400
+ for (const target of options.targets) {
401
+ try {
402
+ const watcher = open(target.dir, (_event, name) => {
403
+ if (target.name !== void 0 && name !== null && String(name) !== target.name) return;
404
+ this.#dirty = true;
405
+ this.#wake?.();
406
+ });
407
+ watcher.on("error", () => void 0);
408
+ this.#watchers.push(watcher);
409
+ } catch {
410
+ }
411
+ }
412
+ }
413
+ /** Resolves on the next change, on the fallback timer, or when `signal` aborts. */
414
+ wait(signal) {
415
+ if (signal.aborted) return Promise.resolve();
416
+ if (this.#dirty) {
417
+ this.#dirty = false;
418
+ return Promise.resolve();
419
+ }
420
+ return new Promise((resolve) => {
421
+ const done = /* @__PURE__ */ __name(() => {
422
+ clearTimeout(timer);
423
+ signal.removeEventListener("abort", done);
424
+ this.#wake = void 0;
425
+ this.#dirty = false;
426
+ resolve();
427
+ }, "done");
428
+ const timer = setTimeout(done, this.#fallbackMs);
429
+ signal.addEventListener("abort", done, { once: true });
430
+ this.#wake = done;
431
+ });
432
+ }
433
+ close() {
434
+ for (const watcher of this.#watchers) {
435
+ try {
436
+ watcher.close();
437
+ } catch {
438
+ }
439
+ }
440
+ this.#watchers.length = 0;
441
+ }
442
+ };
443
+
444
+ // src/commands/watch.ts
445
+ var EXIT_WATCH_STOPPED = 130;
446
+ var HELP = `namzu watch \u2014 follow a session from another terminal
447
+
448
+ Usage:
449
+ namzu watch [session] [--exit-on-end] [--plain]
450
+
451
+ session A whole session id or the start of one. Without it, the sessions
452
+ with a turn in flight now are offered, this folder's first.
453
+
454
+ --exit-on-end Leave when the session ends (a turn settles, or the process that
455
+ ran it is gone) instead of staying open for the next turn.
456
+ --plain Plain lines only: no cursor movement, no status line, for a pipe.
457
+ This is the default when standard output is not a terminal.
458
+
459
+ This view never takes the session's lease, never writes to its log and never
460
+ answers an approval or a question. A session that waits for one says so and names
461
+ where to answer it: the terminal that runs the session.
462
+
463
+ In a terminal, press m to say something to the session: a line opens at the
464
+ bottom, Enter sends it, Esc cancels. It goes the way \`namzu send\` sends it, as
465
+ your own words from another terminal, and says what became of it. Not in a pipe
466
+ or with --plain: there the view is read-only and has no keys.
467
+
468
+ Steps appear as they settle in the session's log. Text a step is still writing
469
+ appears when that step ends; the log does not hold it earlier.
470
+
471
+ Only sessions of this account on this machine are read, and nothing is opened
472
+ to the network.
473
+
474
+ Exit status with --exit-on-end:
475
+ 0 the last turn finished
476
+ 1 the last turn failed, was stopped, or stopped before finishing its work
477
+ 69 the process that ran it is gone and the turn never ended (interrupted)
478
+ Always:
479
+ 130 stopped with Ctrl+C or a signal
480
+ 64 bad arguments, or several sessions run and none was named in a pipe
481
+ 66 no such session, or none is running to offer
482
+ `;
483
+ function parseWatchArgs(rawArgs) {
484
+ let exitOnEnd = false;
485
+ let plain = false;
486
+ const operands = [];
487
+ for (let i = 0; i < rawArgs.length; i++) {
488
+ const arg = rawArgs[i];
489
+ if (arg === "--") {
490
+ operands.push(...rawArgs.slice(i + 1));
491
+ break;
492
+ }
493
+ if (arg === "--exit-on-end") exitOnEnd = true;
494
+ else if (arg === "--plain") plain = true;
495
+ else if (arg.startsWith("-")) return { error: `Unknown option ${arg}.` };
496
+ else operands.push(arg);
497
+ }
498
+ if (operands.length > 1) return { error: "Name one session." };
499
+ return { ...operands[0] !== void 0 ? { session: operands[0] } : {}, exitOnEnd, plain };
500
+ }
501
+ __name(parseWatchArgs, "parseWatchArgs");
502
+ function exitCodeOf(status) {
503
+ if (status.state === "interrupted") return EXIT_UNAVAILABLE;
504
+ return status.outcome === "completed" ? EXIT_OK : EXIT_FAIL;
505
+ }
506
+ __name(exitCodeOf, "exitCodeOf");
507
+ function offerLine(row, index) {
508
+ const where = row.here ? "here" : terminalDisplayText(row.target.folder);
509
+ return `${index + 1}. ${row.target.sessionId} ${row.state} ${terminalDisplayText(row.title)} (${where})`;
510
+ }
511
+ __name(offerLine, "offerLine");
512
+ async function pick(args, io) {
513
+ const base = {
514
+ root: io.root,
515
+ tenantId: io.tenantId,
516
+ ...io.currentSlug ? { currentSlug: io.currentSlug } : {}
517
+ };
518
+ if (args.session !== void 0) {
519
+ try {
520
+ return await findSession(base, args.session);
521
+ } catch (error) {
522
+ if (error instanceof SessionNotFoundError) {
523
+ io.writeError(`${error.message}
524
+ `);
525
+ return EXIT_NOINPUT;
526
+ }
527
+ throw error;
528
+ }
529
+ }
530
+ const running = await listRunningSessions({
531
+ ...base,
532
+ ...io.now ? { now: io.now } : {},
533
+ ...io.isProcessAlive ? { isProcessAlive: io.isProcessAlive } : {}
534
+ });
535
+ if (running.length === 0) {
536
+ io.writeError(
537
+ "No session has a turn running now. Give a session id to watch one that is finished or between turns.\n"
538
+ );
539
+ return EXIT_NOINPUT;
540
+ }
541
+ if (running.length === 1) return running[0].target;
542
+ if (io.interactive && io.choose) {
543
+ const chosen = await io.choose(running);
544
+ if (!chosen) return EXIT_WATCH_STOPPED;
545
+ return chosen.target;
546
+ }
547
+ io.writeError(
548
+ `${running.length} sessions are running; name one:
549
+ ${running.map(offerLine).join("\n")}
550
+ `
551
+ );
552
+ return EXIT_USAGE;
553
+ }
554
+ __name(pick, "pick");
555
+ async function runWatch(args, io) {
556
+ const target = await pick(args, io);
557
+ if (typeof target === "number") return target;
558
+ const follower = new SessionFollower({
559
+ target,
560
+ ...io.now ? { now: io.now } : {},
561
+ ...io.isProcessAlive ? { isProcessAlive: io.isProcessAlive } : {}
562
+ });
563
+ const canSay = !io.plain && io.keys !== void 0 && io.say !== void 0;
564
+ const printer = new WatchPrinter({
565
+ write: io.write,
566
+ plain: io.plain,
567
+ columns: io.columns,
568
+ ended: args.exitOnEnd ? "exit" : "stay",
569
+ ...canSay ? { canSay: true } : {}
570
+ });
571
+ const waiter = io.makeWaiter(target);
572
+ const leave = new AbortController();
573
+ const onOuterAbort = /* @__PURE__ */ __name(() => leave.abort(), "onOuterAbort");
574
+ if (io.signal.aborted) leave.abort();
575
+ else io.signal.addEventListener("abort", onOuterAbort, { once: true });
576
+ const stopped = new Promise(
577
+ (resolve) => leave.signal.addEventListener("abort", () => resolve(), { once: true })
578
+ );
579
+ const sends = /* @__PURE__ */ new Set();
580
+ let unsubscribe;
581
+ try {
582
+ await follower.poll();
583
+ printer.header(
584
+ `session ${target.sessionId} in ${target.folder}. ${canSay ? WATCH_SAY_NOTE : WATCH_READ_ONLY_NOTE} ${WATCH_SETTLED_NOTE}`
585
+ );
586
+ if (canSay && io.keys && io.say) {
587
+ const say = io.say;
588
+ const line = new SayLine();
589
+ unsubscribe = io.keys.subscribe((chunk) => {
590
+ for (const event of line.feed(chunk)) {
591
+ if (event.kind === "compose") printer.prompt(event.text);
592
+ else if (event.kind === "cancel") printer.prompt(void 0);
593
+ else if (event.kind === "leave") leave.abort();
594
+ else {
595
+ printer.prompt(void 0);
596
+ const send = say(target, event.text, stopped).then((receipt) => printer.note(`message: ${renderSendReceipt(receipt)}`)).catch(
597
+ (error) => printer.note(
598
+ `message: could not be sent: ${error instanceof Error ? error.message : String(error)}`
599
+ )
600
+ ).finally(() => sends.delete(send));
601
+ sends.add(send);
602
+ }
603
+ }
604
+ });
605
+ }
606
+ const end = await follow({
607
+ follower,
608
+ printer,
609
+ cwd: target.folder,
610
+ exitOnEnd: args.exitOnEnd,
611
+ signal: leave.signal,
612
+ wait: /* @__PURE__ */ __name((signal) => waiter.wait(signal), "wait")
613
+ });
614
+ if (end.reason === "aborted") {
615
+ printer.close("stopped watching; the session was not touched.");
616
+ return EXIT_WATCH_STOPPED;
617
+ }
618
+ printer.close("the session ended; leaving.");
619
+ return exitCodeOf(end.status);
620
+ } catch (error) {
621
+ printer.close();
622
+ if (error instanceof SessionNotFoundError || error instanceof SessionNotOwnedError || error instanceof SessionUnreadableError) {
623
+ io.writeError(`${error.message}
624
+ `);
625
+ return EXIT_NOINPUT;
626
+ }
627
+ throw error;
628
+ } finally {
629
+ unsubscribe?.();
630
+ io.signal.removeEventListener("abort", onOuterAbort);
631
+ leave.abort();
632
+ await Promise.allSettled([...sends]);
633
+ waiter.close();
634
+ }
635
+ }
636
+ __name(runWatch, "runWatch");
637
+ var watchCommand = {
638
+ name: "watch",
639
+ description: "Follow a running or finished session from another terminal, read-only",
640
+ passThrough: true,
641
+ help: HELP,
642
+ handler: /* @__PURE__ */ __name(async ({ ctx, rawArgs }) => {
643
+ const parsed = parseWatchArgs(rawArgs);
644
+ if ("error" in parsed) {
645
+ ctx.formatter.error({ message: `${parsed.error}
646
+
647
+ ${HELP}` });
648
+ return EXIT_USAGE;
649
+ }
650
+ const root = resolveNamzuHome();
651
+ const identity = readIdentity(root);
652
+ if (!identity) {
653
+ ctx.formatter.error({
654
+ message: "Namzu has not been used on this machine yet, so there is no session to watch."
655
+ });
656
+ return EXIT_NOINPUT;
657
+ }
658
+ let currentSlug;
659
+ try {
660
+ const { openSessionScope } = await import("./store-CQOALIPR.js");
661
+ currentSlug = (await openSessionScope(process.cwd(), { readOnly: true })).slug;
662
+ } catch {
663
+ }
664
+ const controller = new AbortController();
665
+ const stop = /* @__PURE__ */ __name(() => controller.abort(), "stop");
666
+ process.once("SIGINT", stop);
667
+ process.once("SIGTERM", stop);
668
+ process.once("SIGHUP", stop);
669
+ const tty = process.stdout.isTTY === true;
670
+ try {
671
+ return await runWatch(parsed, {
672
+ root,
673
+ tenantId: identity.tenantId,
674
+ ...currentSlug ? { currentSlug } : {},
675
+ cwd: process.cwd(),
676
+ write: /* @__PURE__ */ __name((text) => void process.stdout.write(text), "write"),
677
+ writeError: /* @__PURE__ */ __name((text) => void process.stderr.write(text), "writeError"),
678
+ plain: parsed.plain || !tty,
679
+ columns: process.stdout.columns || 80,
680
+ interactive: tty && process.stdin.isTTY === true,
681
+ choose: /* @__PURE__ */ __name(async (rows) => {
682
+ const rl = createInterface({ input: process.stdin, output: process.stderr });
683
+ try {
684
+ process.stderr.write(`${rows.map(offerLine).join("\n")}
685
+ `);
686
+ const answer = await rl.question("Watch which? (number, empty to leave) ");
687
+ const index = Number.parseInt(answer, 10);
688
+ return Number.isInteger(index) ? rows[index - 1] : void 0;
689
+ } finally {
690
+ rl.close();
691
+ }
692
+ }, "choose"),
693
+ signal: controller.signal,
694
+ ...tty && process.stdin.isTTY === true && !parsed.plain ? {
695
+ keys: {
696
+ subscribe: /* @__PURE__ */ __name((listener) => {
697
+ const input = process.stdin;
698
+ input.setRawMode(true);
699
+ input.setEncoding("utf8");
700
+ const onData = /* @__PURE__ */ __name((chunk) => listener(String(chunk)), "onData");
701
+ input.on("data", onData);
702
+ input.resume();
703
+ return () => {
704
+ input.off("data", onData);
705
+ input.setRawMode(false);
706
+ input.pause();
707
+ };
708
+ }, "subscribe")
709
+ },
710
+ say: /* @__PURE__ */ __name(async (watched, text, stop2) => {
711
+ const { sendToSession } = await import("./send-person-74VABPSV.js");
712
+ let timer;
713
+ const window = Promise.race([
714
+ new Promise((resolve) => {
715
+ timer = setTimeout(resolve, DEFAULT_SEND_WAIT_SECONDS * 1e3);
716
+ }),
717
+ stop2
718
+ ]);
719
+ try {
720
+ return await sendToSession({
721
+ home: root,
722
+ tenantId: identity.tenantId,
723
+ ...currentSlug ? { currentSlug } : {},
724
+ cwd: process.cwd(),
725
+ version: CLI_VERSION,
726
+ session: watched.sessionId,
727
+ message: text,
728
+ window
729
+ });
730
+ } finally {
731
+ if (timer) clearTimeout(timer);
732
+ }
733
+ }, "say")
734
+ } : {},
735
+ makeWaiter: /* @__PURE__ */ __name((target) => new ChangeWaiter({
736
+ targets: [
737
+ { dir: target.paths.projectDir(), name: `${target.sessionId}.jsonl` },
738
+ { dir: join(target.paths.projectDir(), target.sessionId) }
739
+ ]
740
+ }), "makeWaiter")
741
+ });
742
+ } finally {
743
+ process.removeListener("SIGINT", stop);
744
+ process.removeListener("SIGTERM", stop);
745
+ process.removeListener("SIGHUP", stop);
746
+ }
747
+ }, "handler")
748
+ };
749
+ export {
750
+ EXIT_WATCH_STOPPED,
751
+ exitCodeOf,
752
+ parseWatchArgs,
753
+ runWatch,
754
+ watchCommand
755
+ };
756
+ //# sourceMappingURL=watch-PEJNCDLA.js.map