@namzu/cli 51.0.1 → 51.2.0

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 (451) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/dist/bin.js +1 -1
  3. package/dist/chunks/{acp-OKCSCFH2.js → acp-HCVLUS7I.js} +125 -72
  4. package/dist/chunks/acp-HCVLUS7I.js.map +6 -0
  5. package/dist/chunks/{activity-command-SJGXPUYE.js → activity-command-I3OMRZ2T.js} +13 -13
  6. package/dist/chunks/{add-H4FUTHAQ.js → add-A65AU46H.js} +90 -24
  7. package/dist/chunks/add-A65AU46H.js.map +6 -0
  8. package/dist/chunks/{agent-U4YLYJ4N.js → agent-3A66KRCM.js} +40 -38
  9. package/dist/chunks/agent-session-LJZO5VIZ.js +71 -0
  10. package/dist/chunks/{archive-O236ZKWI.js → archive-IWWDLSAO.js} +11 -11
  11. package/dist/chunks/{bin-main-YS3HF46K.js → bin-main-CRX2U7A6.js} +9 -9
  12. package/dist/chunks/{binding-SS7YOEIZ.js → binding-4AMPOED7.js} +3 -3
  13. package/dist/chunks/{browser-OA2KB5Z2.js → browser-SAS7YPVD.js} +7 -7
  14. package/dist/chunks/{chat-EBNDAIRO.js → chat-ANHTX7D5.js} +16 -16
  15. package/dist/chunks/{chunk-F3QD24YN.js → chunk-2HB47MDS.js} +70 -41
  16. package/dist/chunks/chunk-2HB47MDS.js.map +6 -0
  17. package/dist/chunks/{chunk-YGLJBR4L.js → chunk-3D52GNVJ.js} +4 -4
  18. package/dist/chunks/{chunk-BPZQYXLI.js → chunk-3MJ3YKNV.js} +5 -5
  19. package/dist/chunks/chunk-3YM3IWPW.js +221 -0
  20. package/dist/chunks/chunk-3YM3IWPW.js.map +6 -0
  21. package/dist/chunks/{chunk-KN3FKKYY.js → chunk-45Z4OPC6.js} +3 -3
  22. package/dist/chunks/{chunk-MTY3SZOT.js → chunk-52YXYXRG.js} +2 -2
  23. package/dist/chunks/{chunk-XMYFIXCP.js → chunk-56ZS6OTK.js} +4 -4
  24. package/dist/chunks/{chunk-KUVGN7VF.js → chunk-57QGQNRI.js} +2 -2
  25. package/dist/chunks/{chunk-HXWIEKOB.js → chunk-5TPQGNYN.js} +4 -4
  26. package/dist/chunks/{chunk-WCMXLFUB.js → chunk-5U42MB6F.js} +10 -10
  27. package/dist/chunks/{chunk-LMLCGIQR.js → chunk-5YMIK3VP.js} +3 -3
  28. package/dist/chunks/{chunk-ZIUKLIUS.js → chunk-6CKU4TCF.js} +8 -3
  29. package/dist/chunks/chunk-6CKU4TCF.js.map +6 -0
  30. package/dist/chunks/{chunk-Y5D6542Z.js → chunk-6I4V7I5M.js} +2 -2
  31. package/dist/chunks/{chunk-R6ZDPAEV.js → chunk-6MI4Q5QQ.js} +4 -4
  32. package/dist/chunks/{chunk-JHLJJDNJ.js → chunk-6S4L4SAU.js} +7 -7
  33. package/dist/chunks/{chunk-UBOE47YI.js → chunk-AGC67H4M.js} +4 -4
  34. package/dist/chunks/{chunk-WD45OZPT.js → chunk-ALXE3SUZ.js} +3 -3
  35. package/dist/chunks/{chunk-4HGQJYDZ.js → chunk-ANVIYMV6.js} +3 -3
  36. package/dist/chunks/chunk-BBTPD3DU.js +19 -0
  37. package/dist/chunks/chunk-BBTPD3DU.js.map +6 -0
  38. package/dist/chunks/{chunk-HAIXGRRS.js → chunk-BC3IZXTY.js} +2 -2
  39. package/dist/chunks/{chunk-7J3IMJKF.js → chunk-BN32BPU6.js} +2 -2
  40. package/dist/chunks/chunk-BUP54TBX.js +214 -0
  41. package/dist/chunks/chunk-BUP54TBX.js.map +6 -0
  42. package/dist/chunks/chunk-CYCUJOAD.js +313 -0
  43. package/dist/chunks/chunk-CYCUJOAD.js.map +6 -0
  44. package/dist/chunks/{chunk-HDBTTV2S.js → chunk-DLVHJFXI.js} +2 -2
  45. package/dist/chunks/{chunk-CIHHPULI.js → chunk-DNOI4BL2.js} +2 -2
  46. package/dist/chunks/{chunk-PWNFXNFK.js → chunk-DOPHHI6C.js} +3 -65
  47. package/dist/chunks/chunk-DOPHHI6C.js.map +6 -0
  48. package/dist/chunks/{chunk-UNQYPFDZ.js → chunk-E5OETSRN.js} +6 -6
  49. package/dist/chunks/{chunk-YM5DH66D.js → chunk-E7IXVEOQ.js} +3 -3
  50. package/dist/chunks/{chunk-GUZEB3KN.js → chunk-FKQOGEKL.js} +3 -3
  51. package/dist/chunks/{chunk-JEEF7UIH.js → chunk-FLPT7I7I.js} +4 -4
  52. package/dist/chunks/{chunk-QY4UUQQT.js → chunk-FMAUDMYL.js} +12 -12
  53. package/dist/chunks/{chunk-TQG7WZI5.js → chunk-FSS72QJP.js} +2 -2
  54. package/dist/chunks/{chunk-YMWHDGCW.js → chunk-FTMONTUX.js} +3 -1
  55. package/dist/chunks/chunk-FTMONTUX.js.map +6 -0
  56. package/dist/chunks/chunk-G4N43E6M.js +62 -0
  57. package/dist/chunks/chunk-G4N43E6M.js.map +6 -0
  58. package/dist/chunks/{chunk-OLI35PTE.js → chunk-H56PLZHW.js} +2 -2
  59. package/dist/chunks/{chunk-2E3ALKOF.js → chunk-HHLWXGOG.js} +3 -3
  60. package/dist/chunks/{chunk-VVMRXGQ6.js → chunk-HQ4WFN7B.js} +4649 -2177
  61. package/dist/chunks/chunk-HQ4WFN7B.js.map +6 -0
  62. package/dist/chunks/{chunk-P52PAWBP.js → chunk-HXPRWMLH.js} +4 -4
  63. package/dist/chunks/{tui-L4BRR4H5.js → chunk-ILPXZDTW.js} +699 -1390
  64. package/dist/chunks/chunk-ILPXZDTW.js.map +6 -0
  65. package/dist/chunks/{chunk-FA2ZVSEU.js → chunk-IPTWZUSV.js} +2 -2
  66. package/dist/chunks/{chunk-LLR7GHVU.js → chunk-ITY5SBAS.js} +2 -2
  67. package/dist/chunks/{chunk-TXP6SOA7.js → chunk-JR6EFL7G.js} +5 -4
  68. package/dist/chunks/chunk-JR6EFL7G.js.map +6 -0
  69. package/dist/chunks/{chunk-JVIS6M37.js → chunk-JUN4VUC6.js} +64 -224
  70. package/dist/chunks/chunk-JUN4VUC6.js.map +6 -0
  71. package/dist/chunks/{chunk-22PMPEFX.js → chunk-K52DES57.js} +3 -3
  72. package/dist/chunks/chunk-KD6WL3W7.js +10 -0
  73. package/dist/chunks/chunk-KD6WL3W7.js.map +6 -0
  74. package/dist/chunks/{chunk-BK5AJ7TL.js → chunk-KJ7Q3BC3.js} +2 -2
  75. package/dist/chunks/{chunk-F7ECNFNX.js → chunk-KJVRHBMX.js} +9 -4
  76. package/dist/chunks/chunk-KJVRHBMX.js.map +6 -0
  77. package/dist/chunks/{chunk-MV2T5HFQ.js → chunk-KZHMLRKY.js} +4 -4
  78. package/dist/chunks/{chunk-FSPBJ5VF.js → chunk-LAXSPXNP.js} +4 -3
  79. package/dist/chunks/{chunk-FSPBJ5VF.js.map → chunk-LAXSPXNP.js.map} +1 -1
  80. package/dist/chunks/{chunk-D3ITBQ7T.js → chunk-LGH2T6KL.js} +2 -2
  81. package/dist/chunks/{chunk-3XIWMQLP.js → chunk-LQJ3TB5E.js} +10 -10
  82. package/dist/chunks/{chunk-6GITBOHO.js → chunk-LYPEV765.js} +2 -2
  83. package/dist/chunks/chunk-LYUY2FK2.js +141 -0
  84. package/dist/chunks/chunk-LYUY2FK2.js.map +6 -0
  85. package/dist/chunks/{chunk-O53H43CX.js → chunk-M44I7P3H.js} +2 -2
  86. package/dist/chunks/{chunk-MOGE5ZMI.js → chunk-NAWIOVUH.js} +3 -3
  87. package/dist/chunks/{chunk-ZNC5BEFK.js → chunk-NGE7TNCY.js} +2 -2
  88. package/dist/chunks/{chunk-AJHNH4WR.js → chunk-NXJQTDVT.js} +121 -90
  89. package/dist/chunks/chunk-NXJQTDVT.js.map +6 -0
  90. package/dist/chunks/{chunk-NWIOFCDB.js → chunk-NY3I4WL7.js} +217 -372
  91. package/dist/chunks/chunk-NY3I4WL7.js.map +6 -0
  92. package/dist/chunks/{chunk-JABCT4RQ.js → chunk-OEKCCZ7I.js} +5 -5
  93. package/dist/chunks/{chunk-HFY2647W.js → chunk-OG2MLME3.js} +2 -1
  94. package/dist/chunks/{chunk-HFY2647W.js.map → chunk-OG2MLME3.js.map} +1 -1
  95. package/dist/chunks/{chunk-DWFJETFP.js → chunk-OL5SKFPM.js} +4 -4
  96. package/dist/chunks/{chunk-V4WSIY32.js → chunk-OMP25UWR.js} +6 -2
  97. package/dist/chunks/chunk-OMP25UWR.js.map +6 -0
  98. package/dist/chunks/{chunk-VLE4DKQR.js → chunk-P53E77KS.js} +3 -3
  99. package/dist/chunks/{chunk-PV4TEEGI.js → chunk-PI6KC5CD.js} +5 -5
  100. package/dist/chunks/{chunk-O62YM5KA.js → chunk-Q5DW33F4.js} +2 -2
  101. package/dist/chunks/{chunk-V5DDXBVW.js → chunk-QS65X7D6.js} +4 -4
  102. package/dist/chunks/{chunk-P5OZ7YN6.js → chunk-QZ4V25KD.js} +8 -3
  103. package/dist/chunks/chunk-QZ4V25KD.js.map +6 -0
  104. package/dist/chunks/chunk-RCLTSI6G.js +102 -0
  105. package/dist/chunks/chunk-RCLTSI6G.js.map +6 -0
  106. package/dist/chunks/{chunk-WEUXBFYG.js → chunk-RDWVNVZS.js} +51 -93
  107. package/dist/chunks/chunk-RDWVNVZS.js.map +6 -0
  108. package/dist/chunks/{chunk-PKGMZRUT.js → chunk-SMX5YHRV.js} +2 -2
  109. package/dist/chunks/{chunk-R6P5H47N.js → chunk-SQWFNFEX.js} +3 -3
  110. package/dist/chunks/{chunk-RTDE5QSZ.js → chunk-SR75L2R5.js} +4 -4
  111. package/dist/chunks/{chunk-FUVWMCRY.js → chunk-T5X3GYBF.js} +2 -2
  112. package/dist/chunks/{chunk-YY6RFZ2L.js → chunk-TJSGSC2W.js} +9 -9
  113. package/dist/chunks/{chunk-O7J6EFVD.js → chunk-TTXZK3BR.js} +3 -3
  114. package/dist/chunks/{chunk-77RA2AU7.js → chunk-U7AQ4OQJ.js} +4 -3
  115. package/dist/chunks/{chunk-635U2FDK.js → chunk-UPSI724V.js} +3 -3
  116. package/dist/chunks/{chunk-56SPZGFT.js → chunk-V23HHK5D.js} +3 -3
  117. package/dist/chunks/{chunk-C5P7OAML.js → chunk-VQHVH7X2.js} +3 -3
  118. package/dist/chunks/{chunk-HARFWJBQ.js → chunk-WJ4YRFPQ.js} +2 -2
  119. package/dist/chunks/{chunk-DFFTGAS7.js → chunk-WJXVNXJZ.js} +22 -22
  120. package/dist/chunks/{chunk-PR2EE4G4.js → chunk-WOX4KI7C.js} +3 -3
  121. package/dist/chunks/{chunk-CDDXHKSP.js → chunk-X3L6N5RM.js} +36 -11
  122. package/dist/chunks/{chunk-CDDXHKSP.js.map → chunk-X3L6N5RM.js.map} +1 -1
  123. package/dist/chunks/{chunk-ONVXBWB5.js → chunk-XFMGW2C5.js} +2 -2
  124. package/dist/chunks/{chunk-RTFC2VXR.js → chunk-XPCRLKFO.js} +7 -6
  125. package/dist/chunks/{chunk-MEZUNP2E.js → chunk-XYT53O3Z.js} +2 -2
  126. package/dist/chunks/{chunk-EB7AS2K4.js → chunk-YSV633T5.js} +10 -10
  127. package/dist/chunks/{chunk-PN2UBL2H.js → chunk-ZXFEHB7N.js} +2 -2
  128. package/dist/chunks/{cli-runtime-5GEVVA3K.js → cli-runtime-5UE6P2QW.js} +20 -17
  129. package/dist/chunks/cli-runtime-5UE6P2QW.js.map +6 -0
  130. package/dist/chunks/{commands-Y37MKMRJ.js → commands-IOHIM2PX.js} +6 -6
  131. package/dist/chunks/{computer-UE2AN7NW.js → computer-ZWTWBY67.js} +2 -2
  132. package/dist/chunks/cost-MYSYQTT3.js +755 -0
  133. package/dist/chunks/cost-MYSYQTT3.js.map +6 -0
  134. package/dist/chunks/{crash-report-S6W5DXCO.js → crash-report-WLLGI2U4.js} +6 -6
  135. package/dist/chunks/day-CU5J7UAK.js +22 -0
  136. package/dist/chunks/{dist-YO357DAD.js → dist-33QU2MGT.js} +2 -2
  137. package/dist/chunks/{dist-5E47CZZT.js → dist-6G55RC27.js} +2 -2
  138. package/dist/chunks/{dist-HCI4L6AO.js → dist-CFPNJCLJ.js} +2 -2
  139. package/dist/chunks/{dist-3FVIUYVA.js → dist-E2PF4PGO.js} +2 -2
  140. package/dist/chunks/{dist-4ATGJMUC.js → dist-FZYKXUR4.js} +2 -2
  141. package/dist/chunks/{dist-2RVY7QOH.js → dist-IXAUMLZH.js} +2 -2
  142. package/dist/chunks/{dist-DODOSCTW.js → dist-MBVPANQB.js} +106 -2
  143. package/dist/chunks/{dist-IPQPISKD.js → dist-PKKDBDSA.js} +2 -2
  144. package/dist/chunks/{doctor-EZEJEK6B.js → doctor-BXRPVVKL.js} +20 -20
  145. package/dist/chunks/{drain-VVEMLN3L.js → drain-EWKGL77B.js} +10 -10
  146. package/dist/chunks/{entry-CZ63UJYN.js → entry-XPXHELKT.js} +6 -6
  147. package/dist/chunks/eval-OLNNJGUO.js +351 -0
  148. package/dist/chunks/eval-OLNNJGUO.js.map +6 -0
  149. package/dist/chunks/{exec-DYAFXHZM.js → exec-XNMHHHTZ.js} +81 -53
  150. package/dist/chunks/exec-XNMHHHTZ.js.map +6 -0
  151. package/dist/chunks/{github-VCUDZDGI.js → github-FQAXV2KP.js} +2 -2
  152. package/dist/chunks/{home-UVU2HRDB.js → home-T4ZVXIEX.js} +3 -3
  153. package/dist/chunks/{host-Q3YNLTNL.js → host-LQ6V4NJS.js} +10 -10
  154. package/dist/chunks/{host-queries-Z4BSL457.js → host-queries-LEPTBKZK.js} +15 -15
  155. package/dist/chunks/{learn-SAZ3JOK3.js → learn-WOZKPYR4.js} +12 -12
  156. package/dist/chunks/{learn-builtin-SQ2BTDFH.js → learn-builtin-BVJFZF4R.js} +15 -15
  157. package/dist/chunks/{lifecycle-24A5HH4I.js → lifecycle-KKIDSRJV.js} +34 -33
  158. package/dist/chunks/{list-HAI55KLQ.js → list-ZWIXNGJV.js} +27 -17
  159. package/dist/chunks/list-ZWIXNGJV.js.map +6 -0
  160. package/dist/chunks/{live-EIQ666TU.js → live-4GQNVGPU.js} +18 -18
  161. package/dist/chunks/{login-YJ6L7KSY.js → login-MBXPJW6F.js} +14 -14
  162. package/dist/chunks/{logs-RWGXFRMN.js → logs-7GVMBYAQ.js} +6 -6
  163. package/dist/chunks/{mcp-DO454555.js → mcp-45UUEZMF.js} +24 -24
  164. package/dist/chunks/{message-command-AJOTC3UK.js → message-command-YVAI3SLS.js} +48 -46
  165. package/dist/chunks/message-command-YVAI3SLS.js.map +6 -0
  166. package/dist/chunks/{open-LEAR5UBX.js → open-UG6VAHDW.js} +8 -8
  167. package/dist/chunks/{operator-tools-AHP32F2J.js → operator-tools-M4SMIAYS.js} +13 -13
  168. package/dist/chunks/{output-schema-YDKTNTMM.js → output-schema-MZ6X4WQ2.js} +3 -3
  169. package/dist/chunks/{pal-XPZD6PAO.js → pal-R4RSZP2U.js} +17 -17
  170. package/dist/chunks/{peers-MRKWY3MG.js → peers-6TIMGPGR.js} +8 -8
  171. package/dist/chunks/{peers-NLUBD4IW.js → peers-T5SXNFYU.js} +6 -6
  172. package/dist/chunks/plugin-SAQJPDKX.js +1043 -0
  173. package/dist/chunks/plugin-SAQJPDKX.js.map +6 -0
  174. package/dist/chunks/{providers-QPESWN6K.js → providers-CPHEQZCV.js} +11 -11
  175. package/dist/chunks/{pty-BDOOEOCB.js → pty-YAFV4ZA6.js} +3 -3
  176. package/dist/chunks/render-QFCCPEEL.js +14 -0
  177. package/dist/chunks/resume-GZGHY4UR.js +23 -0
  178. package/dist/chunks/{resume-command-KIXKOEM3.js → resume-command-WJH7SKYB.js} +5 -5
  179. package/dist/chunks/{schedule-6BKCRYAT.js → schedule-I7ZNWSN3.js} +15 -10
  180. package/dist/chunks/schedule-I7ZNWSN3.js.map +6 -0
  181. package/dist/chunks/{service-ENTDZAVD.js → service-ZRXXXJW7.js} +34 -33
  182. package/dist/chunks/service-ZRXXXJW7.js.map +6 -0
  183. package/dist/chunks/{skills-MG2BRTPV.js → skills-RIJBOCKN.js} +9 -9
  184. package/dist/chunks/{start-check-7WYNSBON.js → start-check-5DQL76YU.js} +2 -2
  185. package/dist/chunks/{startup-failure-EWWYKPVE.js → startup-failure-7KMOAOXE.js} +2 -2
  186. package/dist/chunks/{state-6UVY4EHA.js → state-QNSG3QWY.js} +3 -3
  187. package/dist/chunks/{store-OKK7A6ZE.js → store-7NXFZTW7.js} +6 -6
  188. package/dist/chunks/{store-UFUDXZG6.js → store-IDSNTJRG.js} +10 -10
  189. package/dist/chunks/{store-ASWK7TVD.js → store-NE2I4H7E.js} +3 -3
  190. package/dist/chunks/store-NE2I4H7E.js.map +6 -0
  191. package/dist/chunks/{store-XU4PITDA.js → store-TY2ZO2EP.js} +4 -4
  192. package/dist/chunks/store-TY2ZO2EP.js.map +6 -0
  193. package/dist/chunks/tui-DLUH6HQ4.js +1034 -0
  194. package/dist/chunks/tui-DLUH6HQ4.js.map +6 -0
  195. package/dist/chunks/{upgrade-IJFMAW3T.js → upgrade-UZTPAIDF.js} +8 -8
  196. package/dist/chunks/watch-AAZHSSIE.js +982 -0
  197. package/dist/chunks/watch-AAZHSSIE.js.map +6 -0
  198. package/dist/chunks/{workspaces-KVFY66IC.js → workspaces-KLYC5537.js} +16 -16
  199. package/dist/chunks/{worktree-7JTMEYRX.js → worktree-4PKAJ7LT.js} +13 -13
  200. package/dist/cli.d.ts.map +1 -1
  201. package/dist/commands/acp.d.ts +20 -1
  202. package/dist/commands/acp.d.ts.map +1 -1
  203. package/dist/commands/cost.d.ts +26 -0
  204. package/dist/commands/cost.d.ts.map +1 -0
  205. package/dist/commands/desktop-host.d.ts.map +1 -1
  206. package/dist/commands/eval.d.ts.map +1 -1
  207. package/dist/commands/exec-flags.d.ts +2 -0
  208. package/dist/commands/exec-flags.d.ts.map +1 -1
  209. package/dist/commands/exec-json.d.ts.map +1 -1
  210. package/dist/commands/exec.d.ts.map +1 -1
  211. package/dist/commands/manifest.d.ts +3 -0
  212. package/dist/commands/manifest.d.ts.map +1 -1
  213. package/dist/commands/plugin.d.ts +18 -0
  214. package/dist/commands/plugin.d.ts.map +1 -0
  215. package/dist/commands/schedule.d.ts.map +1 -1
  216. package/dist/commands/watch.d.ts +41 -0
  217. package/dist/commands/watch.d.ts.map +1 -0
  218. package/dist/config/load.d.ts.map +1 -1
  219. package/dist/config/schema.d.ts +25 -0
  220. package/dist/config/schema.d.ts.map +1 -1
  221. package/dist/config/settings-descriptors.d.ts.map +1 -1
  222. package/dist/config/turn-guards.d.ts +5 -2
  223. package/dist/config/turn-guards.d.ts.map +1 -1
  224. package/dist/desktop-contract.d.ts +21 -0
  225. package/dist/desktop-contract.d.ts.map +1 -0
  226. package/dist/exit-codes.d.ts +9 -1
  227. package/dist/exit-codes.d.ts.map +1 -1
  228. package/dist/index.d.ts +1 -0
  229. package/dist/index.d.ts.map +1 -1
  230. package/dist/index.js +37 -33
  231. package/dist/integrations/auto-update/install-kind.d.ts.map +1 -1
  232. package/dist/integrations/plugins/check-hint.d.ts +5 -0
  233. package/dist/integrations/plugins/check-hint.d.ts.map +1 -0
  234. package/dist/integrations/plugins/files.d.ts +17 -0
  235. package/dist/integrations/plugins/files.d.ts.map +1 -1
  236. package/dist/integrations/plugins/validate.d.ts +75 -0
  237. package/dist/integrations/plugins/validate.d.ts.map +1 -0
  238. package/dist/integrations/sessions/session-watch.d.ts +127 -0
  239. package/dist/integrations/sessions/session-watch.d.ts.map +1 -0
  240. package/dist/integrations/sessions/watch-view.d.ts +73 -0
  241. package/dist/integrations/sessions/watch-view.d.ts.map +1 -0
  242. package/dist/integrations/sessions/watch-wait.d.ts +32 -0
  243. package/dist/integrations/sessions/watch-wait.d.ts.map +1 -0
  244. package/dist/integrations/spend/day.d.ts +26 -0
  245. package/dist/integrations/spend/day.d.ts.map +1 -0
  246. package/dist/integrations/spend/fold.d.ts +136 -0
  247. package/dist/integrations/spend/fold.d.ts.map +1 -0
  248. package/dist/integrations/spend/ledger.d.ts +74 -0
  249. package/dist/integrations/spend/ledger.d.ts.map +1 -0
  250. package/dist/integrations/spend/render.d.ts +6 -0
  251. package/dist/integrations/spend/render.d.ts.map +1 -0
  252. package/dist/integrations/spend/report.d.ts +110 -0
  253. package/dist/integrations/spend/report.d.ts.map +1 -0
  254. package/dist/integrations/telemetry/otlp-export.d.ts +3 -0
  255. package/dist/integrations/telemetry/otlp-export.d.ts.map +1 -1
  256. package/dist/schedule/build.d.ts +12 -0
  257. package/dist/schedule/build.d.ts.map +1 -1
  258. package/dist/schedule/changes.d.ts.map +1 -1
  259. package/dist/schedule/commands/add.d.ts +1 -1
  260. package/dist/schedule/commands/add.d.ts.map +1 -1
  261. package/dist/schedule/commands/list.d.ts +2 -0
  262. package/dist/schedule/commands/list.d.ts.map +1 -1
  263. package/dist/schedule/daemon/daemon.d.ts.map +1 -1
  264. package/dist/schedule/daemon/notify.d.ts +7 -2
  265. package/dist/schedule/daemon/notify.d.ts.map +1 -1
  266. package/dist/schedule/delivery.d.ts.map +1 -1
  267. package/dist/schedule/fire/calls.d.ts +2 -0
  268. package/dist/schedule/fire/calls.d.ts.map +1 -1
  269. package/dist/schedule/fire/fire.d.ts +3 -0
  270. package/dist/schedule/fire/fire.d.ts.map +1 -1
  271. package/dist/schedule/fire/run-script.d.ts +4 -0
  272. package/dist/schedule/fire/run-script.d.ts.map +1 -1
  273. package/dist/schedule/fire/unattended-note.d.ts +5 -0
  274. package/dist/schedule/fire/unattended-note.d.ts.map +1 -1
  275. package/dist/schedule/gate.d.ts +73 -0
  276. package/dist/schedule/gate.d.ts.map +1 -0
  277. package/dist/schedule/store/jobs.d.ts +2 -2
  278. package/dist/schedule/store/jobs.d.ts.map +1 -1
  279. package/dist/schedule/types.d.ts +60 -1
  280. package/dist/schedule/types.d.ts.map +1 -1
  281. package/dist/tui/App.d.ts.map +1 -1
  282. package/dist/tui/Markdown.d.ts +5 -1
  283. package/dist/tui/Markdown.d.ts.map +1 -1
  284. package/dist/tui/ScheduleReviewOverlay.d.ts.map +1 -1
  285. package/dist/tui/agent.d.ts +14 -1
  286. package/dist/tui/agent.d.ts.map +1 -1
  287. package/dist/tui/fullscreen/markdown-rows.d.ts.map +1 -1
  288. package/dist/tui/markdown-structure.d.ts +24 -0
  289. package/dist/tui/markdown-structure.d.ts.map +1 -0
  290. package/dist/tui/markdownParser.d.ts +11 -0
  291. package/dist/tui/markdownParser.d.ts.map +1 -1
  292. package/dist/tui/outcome-line.d.ts +29 -1
  293. package/dist/tui/outcome-line.d.ts.map +1 -1
  294. package/dist/tui/restored-rows.d.ts +8 -1
  295. package/dist/tui/restored-rows.d.ts.map +1 -1
  296. package/dist/tui/schedule/host-commands.d.ts.map +1 -1
  297. package/dist/tui/schedule/source-deliveries.d.ts.map +1 -1
  298. package/dist/tui/schedule/tool-host.d.ts.map +1 -1
  299. package/dist/tui/slashCommands.d.ts +5 -0
  300. package/dist/tui/slashCommands.d.ts.map +1 -1
  301. package/dist/tui/tool-end-rows.d.ts +1 -1
  302. package/dist/tui/tool-end-rows.d.ts.map +1 -1
  303. package/dist/tui/types.d.ts +5 -1
  304. package/dist/tui/types.d.ts.map +1 -1
  305. package/dist/user-commands/store.d.ts +14 -0
  306. package/dist/user-commands/store.d.ts.map +1 -1
  307. package/package.json +5 -5
  308. package/skills/schedule-task/SKILL.md +8 -0
  309. package/dist/chunks/acp-OKCSCFH2.js.map +0 -6
  310. package/dist/chunks/add-H4FUTHAQ.js.map +0 -6
  311. package/dist/chunks/agent-session-YNUAPMAL.js +0 -69
  312. package/dist/chunks/chunk-AJHNH4WR.js.map +0 -6
  313. package/dist/chunks/chunk-F3QD24YN.js.map +0 -6
  314. package/dist/chunks/chunk-F7ECNFNX.js.map +0 -6
  315. package/dist/chunks/chunk-JVIS6M37.js.map +0 -6
  316. package/dist/chunks/chunk-NWIOFCDB.js.map +0 -6
  317. package/dist/chunks/chunk-P5OZ7YN6.js.map +0 -6
  318. package/dist/chunks/chunk-PWNFXNFK.js.map +0 -6
  319. package/dist/chunks/chunk-TXP6SOA7.js.map +0 -6
  320. package/dist/chunks/chunk-V4WSIY32.js.map +0 -6
  321. package/dist/chunks/chunk-VVMRXGQ6.js.map +0 -6
  322. package/dist/chunks/chunk-WEUXBFYG.js.map +0 -6
  323. package/dist/chunks/chunk-YMWHDGCW.js.map +0 -6
  324. package/dist/chunks/chunk-ZIUKLIUS.js.map +0 -6
  325. package/dist/chunks/cli-runtime-5GEVVA3K.js.map +0 -6
  326. package/dist/chunks/eval-ZOF3EXZS.js +0 -187
  327. package/dist/chunks/eval-ZOF3EXZS.js.map +0 -6
  328. package/dist/chunks/exec-DYAFXHZM.js.map +0 -6
  329. package/dist/chunks/list-HAI55KLQ.js.map +0 -6
  330. package/dist/chunks/message-command-AJOTC3UK.js.map +0 -6
  331. package/dist/chunks/resume-ZS3VS5OQ.js +0 -23
  332. package/dist/chunks/schedule-6BKCRYAT.js.map +0 -6
  333. package/dist/chunks/service-ENTDZAVD.js.map +0 -6
  334. package/dist/chunks/tui-L4BRR4H5.js.map +0 -6
  335. /package/dist/chunks/{activity-command-SJGXPUYE.js.map → activity-command-I3OMRZ2T.js.map} +0 -0
  336. /package/dist/chunks/{agent-U4YLYJ4N.js.map → agent-3A66KRCM.js.map} +0 -0
  337. /package/dist/chunks/{agent-session-YNUAPMAL.js.map → agent-session-LJZO5VIZ.js.map} +0 -0
  338. /package/dist/chunks/{archive-O236ZKWI.js.map → archive-IWWDLSAO.js.map} +0 -0
  339. /package/dist/chunks/{bin-main-YS3HF46K.js.map → bin-main-CRX2U7A6.js.map} +0 -0
  340. /package/dist/chunks/{binding-SS7YOEIZ.js.map → binding-4AMPOED7.js.map} +0 -0
  341. /package/dist/chunks/{browser-OA2KB5Z2.js.map → browser-SAS7YPVD.js.map} +0 -0
  342. /package/dist/chunks/{chat-EBNDAIRO.js.map → chat-ANHTX7D5.js.map} +0 -0
  343. /package/dist/chunks/{chunk-YGLJBR4L.js.map → chunk-3D52GNVJ.js.map} +0 -0
  344. /package/dist/chunks/{chunk-BPZQYXLI.js.map → chunk-3MJ3YKNV.js.map} +0 -0
  345. /package/dist/chunks/{chunk-KN3FKKYY.js.map → chunk-45Z4OPC6.js.map} +0 -0
  346. /package/dist/chunks/{chunk-MTY3SZOT.js.map → chunk-52YXYXRG.js.map} +0 -0
  347. /package/dist/chunks/{chunk-XMYFIXCP.js.map → chunk-56ZS6OTK.js.map} +0 -0
  348. /package/dist/chunks/{chunk-KUVGN7VF.js.map → chunk-57QGQNRI.js.map} +0 -0
  349. /package/dist/chunks/{chunk-HXWIEKOB.js.map → chunk-5TPQGNYN.js.map} +0 -0
  350. /package/dist/chunks/{chunk-WCMXLFUB.js.map → chunk-5U42MB6F.js.map} +0 -0
  351. /package/dist/chunks/{chunk-LMLCGIQR.js.map → chunk-5YMIK3VP.js.map} +0 -0
  352. /package/dist/chunks/{chunk-Y5D6542Z.js.map → chunk-6I4V7I5M.js.map} +0 -0
  353. /package/dist/chunks/{chunk-R6ZDPAEV.js.map → chunk-6MI4Q5QQ.js.map} +0 -0
  354. /package/dist/chunks/{chunk-JHLJJDNJ.js.map → chunk-6S4L4SAU.js.map} +0 -0
  355. /package/dist/chunks/{chunk-UBOE47YI.js.map → chunk-AGC67H4M.js.map} +0 -0
  356. /package/dist/chunks/{chunk-WD45OZPT.js.map → chunk-ALXE3SUZ.js.map} +0 -0
  357. /package/dist/chunks/{chunk-4HGQJYDZ.js.map → chunk-ANVIYMV6.js.map} +0 -0
  358. /package/dist/chunks/{chunk-HAIXGRRS.js.map → chunk-BC3IZXTY.js.map} +0 -0
  359. /package/dist/chunks/{chunk-7J3IMJKF.js.map → chunk-BN32BPU6.js.map} +0 -0
  360. /package/dist/chunks/{chunk-HDBTTV2S.js.map → chunk-DLVHJFXI.js.map} +0 -0
  361. /package/dist/chunks/{chunk-CIHHPULI.js.map → chunk-DNOI4BL2.js.map} +0 -0
  362. /package/dist/chunks/{chunk-UNQYPFDZ.js.map → chunk-E5OETSRN.js.map} +0 -0
  363. /package/dist/chunks/{chunk-YM5DH66D.js.map → chunk-E7IXVEOQ.js.map} +0 -0
  364. /package/dist/chunks/{chunk-GUZEB3KN.js.map → chunk-FKQOGEKL.js.map} +0 -0
  365. /package/dist/chunks/{chunk-JEEF7UIH.js.map → chunk-FLPT7I7I.js.map} +0 -0
  366. /package/dist/chunks/{chunk-QY4UUQQT.js.map → chunk-FMAUDMYL.js.map} +0 -0
  367. /package/dist/chunks/{chunk-TQG7WZI5.js.map → chunk-FSS72QJP.js.map} +0 -0
  368. /package/dist/chunks/{chunk-OLI35PTE.js.map → chunk-H56PLZHW.js.map} +0 -0
  369. /package/dist/chunks/{chunk-2E3ALKOF.js.map → chunk-HHLWXGOG.js.map} +0 -0
  370. /package/dist/chunks/{chunk-P52PAWBP.js.map → chunk-HXPRWMLH.js.map} +0 -0
  371. /package/dist/chunks/{chunk-FA2ZVSEU.js.map → chunk-IPTWZUSV.js.map} +0 -0
  372. /package/dist/chunks/{chunk-LLR7GHVU.js.map → chunk-ITY5SBAS.js.map} +0 -0
  373. /package/dist/chunks/{chunk-22PMPEFX.js.map → chunk-K52DES57.js.map} +0 -0
  374. /package/dist/chunks/{chunk-BK5AJ7TL.js.map → chunk-KJ7Q3BC3.js.map} +0 -0
  375. /package/dist/chunks/{chunk-MV2T5HFQ.js.map → chunk-KZHMLRKY.js.map} +0 -0
  376. /package/dist/chunks/{chunk-D3ITBQ7T.js.map → chunk-LGH2T6KL.js.map} +0 -0
  377. /package/dist/chunks/{chunk-3XIWMQLP.js.map → chunk-LQJ3TB5E.js.map} +0 -0
  378. /package/dist/chunks/{chunk-6GITBOHO.js.map → chunk-LYPEV765.js.map} +0 -0
  379. /package/dist/chunks/{chunk-O53H43CX.js.map → chunk-M44I7P3H.js.map} +0 -0
  380. /package/dist/chunks/{chunk-MOGE5ZMI.js.map → chunk-NAWIOVUH.js.map} +0 -0
  381. /package/dist/chunks/{chunk-ZNC5BEFK.js.map → chunk-NGE7TNCY.js.map} +0 -0
  382. /package/dist/chunks/{chunk-JABCT4RQ.js.map → chunk-OEKCCZ7I.js.map} +0 -0
  383. /package/dist/chunks/{chunk-DWFJETFP.js.map → chunk-OL5SKFPM.js.map} +0 -0
  384. /package/dist/chunks/{chunk-VLE4DKQR.js.map → chunk-P53E77KS.js.map} +0 -0
  385. /package/dist/chunks/{chunk-PV4TEEGI.js.map → chunk-PI6KC5CD.js.map} +0 -0
  386. /package/dist/chunks/{chunk-O62YM5KA.js.map → chunk-Q5DW33F4.js.map} +0 -0
  387. /package/dist/chunks/{chunk-V5DDXBVW.js.map → chunk-QS65X7D6.js.map} +0 -0
  388. /package/dist/chunks/{chunk-PKGMZRUT.js.map → chunk-SMX5YHRV.js.map} +0 -0
  389. /package/dist/chunks/{chunk-R6P5H47N.js.map → chunk-SQWFNFEX.js.map} +0 -0
  390. /package/dist/chunks/{chunk-RTDE5QSZ.js.map → chunk-SR75L2R5.js.map} +0 -0
  391. /package/dist/chunks/{chunk-FUVWMCRY.js.map → chunk-T5X3GYBF.js.map} +0 -0
  392. /package/dist/chunks/{chunk-YY6RFZ2L.js.map → chunk-TJSGSC2W.js.map} +0 -0
  393. /package/dist/chunks/{chunk-O7J6EFVD.js.map → chunk-TTXZK3BR.js.map} +0 -0
  394. /package/dist/chunks/{chunk-77RA2AU7.js.map → chunk-U7AQ4OQJ.js.map} +0 -0
  395. /package/dist/chunks/{chunk-635U2FDK.js.map → chunk-UPSI724V.js.map} +0 -0
  396. /package/dist/chunks/{chunk-56SPZGFT.js.map → chunk-V23HHK5D.js.map} +0 -0
  397. /package/dist/chunks/{chunk-C5P7OAML.js.map → chunk-VQHVH7X2.js.map} +0 -0
  398. /package/dist/chunks/{chunk-HARFWJBQ.js.map → chunk-WJ4YRFPQ.js.map} +0 -0
  399. /package/dist/chunks/{chunk-DFFTGAS7.js.map → chunk-WJXVNXJZ.js.map} +0 -0
  400. /package/dist/chunks/{chunk-PR2EE4G4.js.map → chunk-WOX4KI7C.js.map} +0 -0
  401. /package/dist/chunks/{chunk-ONVXBWB5.js.map → chunk-XFMGW2C5.js.map} +0 -0
  402. /package/dist/chunks/{chunk-RTFC2VXR.js.map → chunk-XPCRLKFO.js.map} +0 -0
  403. /package/dist/chunks/{chunk-MEZUNP2E.js.map → chunk-XYT53O3Z.js.map} +0 -0
  404. /package/dist/chunks/{chunk-EB7AS2K4.js.map → chunk-YSV633T5.js.map} +0 -0
  405. /package/dist/chunks/{chunk-PN2UBL2H.js.map → chunk-ZXFEHB7N.js.map} +0 -0
  406. /package/dist/chunks/{commands-Y37MKMRJ.js.map → commands-IOHIM2PX.js.map} +0 -0
  407. /package/dist/chunks/{computer-UE2AN7NW.js.map → computer-ZWTWBY67.js.map} +0 -0
  408. /package/dist/chunks/{crash-report-S6W5DXCO.js.map → crash-report-WLLGI2U4.js.map} +0 -0
  409. /package/dist/chunks/{dist-DODOSCTW.js.map → day-CU5J7UAK.js.map} +0 -0
  410. /package/dist/chunks/{dist-YO357DAD.js.map → dist-33QU2MGT.js.map} +0 -0
  411. /package/dist/chunks/{dist-5E47CZZT.js.map → dist-6G55RC27.js.map} +0 -0
  412. /package/dist/chunks/{dist-HCI4L6AO.js.map → dist-CFPNJCLJ.js.map} +0 -0
  413. /package/dist/chunks/{dist-3FVIUYVA.js.map → dist-E2PF4PGO.js.map} +0 -0
  414. /package/dist/chunks/{dist-4ATGJMUC.js.map → dist-FZYKXUR4.js.map} +0 -0
  415. /package/dist/chunks/{dist-2RVY7QOH.js.map → dist-IXAUMLZH.js.map} +0 -0
  416. /package/dist/chunks/{doctor-EZEJEK6B.js.map → dist-MBVPANQB.js.map} +0 -0
  417. /package/dist/chunks/{dist-IPQPISKD.js.map → dist-PKKDBDSA.js.map} +0 -0
  418. /package/dist/chunks/{home-UVU2HRDB.js.map → doctor-BXRPVVKL.js.map} +0 -0
  419. /package/dist/chunks/{drain-VVEMLN3L.js.map → drain-EWKGL77B.js.map} +0 -0
  420. /package/dist/chunks/{entry-CZ63UJYN.js.map → entry-XPXHELKT.js.map} +0 -0
  421. /package/dist/chunks/{github-VCUDZDGI.js.map → github-FQAXV2KP.js.map} +0 -0
  422. /package/dist/chunks/{host-Q3YNLTNL.js.map → home-T4ZVXIEX.js.map} +0 -0
  423. /package/dist/chunks/{lifecycle-24A5HH4I.js.map → host-LQ6V4NJS.js.map} +0 -0
  424. /package/dist/chunks/{host-queries-Z4BSL457.js.map → host-queries-LEPTBKZK.js.map} +0 -0
  425. /package/dist/chunks/{learn-SAZ3JOK3.js.map → learn-WOZKPYR4.js.map} +0 -0
  426. /package/dist/chunks/{learn-builtin-SQ2BTDFH.js.map → learn-builtin-BVJFZF4R.js.map} +0 -0
  427. /package/dist/chunks/{live-EIQ666TU.js.map → lifecycle-KKIDSRJV.js.map} +0 -0
  428. /package/dist/chunks/{login-YJ6L7KSY.js.map → live-4GQNVGPU.js.map} +0 -0
  429. /package/dist/chunks/{open-LEAR5UBX.js.map → login-MBXPJW6F.js.map} +0 -0
  430. /package/dist/chunks/{logs-RWGXFRMN.js.map → logs-7GVMBYAQ.js.map} +0 -0
  431. /package/dist/chunks/{mcp-DO454555.js.map → mcp-45UUEZMF.js.map} +0 -0
  432. /package/dist/chunks/{output-schema-YDKTNTMM.js.map → open-UG6VAHDW.js.map} +0 -0
  433. /package/dist/chunks/{operator-tools-AHP32F2J.js.map → operator-tools-M4SMIAYS.js.map} +0 -0
  434. /package/dist/chunks/{peers-NLUBD4IW.js.map → output-schema-MZ6X4WQ2.js.map} +0 -0
  435. /package/dist/chunks/{pal-XPZD6PAO.js.map → pal-R4RSZP2U.js.map} +0 -0
  436. /package/dist/chunks/{peers-MRKWY3MG.js.map → peers-6TIMGPGR.js.map} +0 -0
  437. /package/dist/chunks/{providers-QPESWN6K.js.map → peers-T5SXNFYU.js.map} +0 -0
  438. /package/dist/chunks/{pty-BDOOEOCB.js.map → providers-CPHEQZCV.js.map} +0 -0
  439. /package/dist/chunks/{resume-ZS3VS5OQ.js.map → pty-YAFV4ZA6.js.map} +0 -0
  440. /package/dist/chunks/{resume-command-KIXKOEM3.js.map → render-QFCCPEEL.js.map} +0 -0
  441. /package/dist/chunks/{start-check-7WYNSBON.js.map → resume-GZGHY4UR.js.map} +0 -0
  442. /package/dist/chunks/{store-ASWK7TVD.js.map → resume-command-WJH7SKYB.js.map} +0 -0
  443. /package/dist/chunks/{skills-MG2BRTPV.js.map → skills-RIJBOCKN.js.map} +0 -0
  444. /package/dist/chunks/{store-OKK7A6ZE.js.map → start-check-5DQL76YU.js.map} +0 -0
  445. /package/dist/chunks/{startup-failure-EWWYKPVE.js.map → startup-failure-7KMOAOXE.js.map} +0 -0
  446. /package/dist/chunks/{state-6UVY4EHA.js.map → state-QNSG3QWY.js.map} +0 -0
  447. /package/dist/chunks/{store-UFUDXZG6.js.map → store-7NXFZTW7.js.map} +0 -0
  448. /package/dist/chunks/{store-XU4PITDA.js.map → store-IDSNTJRG.js.map} +0 -0
  449. /package/dist/chunks/{upgrade-IJFMAW3T.js.map → upgrade-UZTPAIDF.js.map} +0 -0
  450. /package/dist/chunks/{workspaces-KVFY66IC.js.map → workspaces-KLYC5537.js.map} +0 -0
  451. /package/dist/chunks/{worktree-7JTMEYRX.js.map → worktree-4PKAJ7LT.js.map} +0 -0
@@ -0,0 +1,1034 @@
1
+ import { createRequire as __namzuCreateRequire } from 'node:module';
2
+ const require = __namzuCreateRequire(import.meta.url);
3
+ import {
4
+ App,
5
+ render_default,
6
+ terminalFocus
7
+ } from "./chunk-ILPXZDTW.js";
8
+ import "./chunk-6CKU4TCF.js";
9
+ import "./chunk-NADQQMMG.js";
10
+ import "./chunk-IPTWZUSV.js";
11
+ import "./chunk-27R3OTVS.js";
12
+ import {
13
+ handleTerminationSignals
14
+ } from "./chunk-LYPEV765.js";
15
+ import "./chunk-R66H2G5R.js";
16
+ import {
17
+ setThemeSetting
18
+ } from "./chunk-JUN4VUC6.js";
19
+ import "./chunk-MDK4RMBQ.js";
20
+ import "./chunk-BUP54TBX.js";
21
+ import "./chunk-QZ4V25KD.js";
22
+ import "./chunk-LQJ3TB5E.js";
23
+ import "./chunk-GWQEMJFS.js";
24
+ import "./chunk-NXJQTDVT.js";
25
+ import "./chunk-RDWVNVZS.js";
26
+ import "./chunk-OG2MLME3.js";
27
+ import "./chunk-CYCUJOAD.js";
28
+ import "./chunk-ITY5SBAS.js";
29
+ import "./chunk-HXPRWMLH.js";
30
+ import "./chunk-XEUQN4JC.js";
31
+ import {
32
+ formatResumeShellCommand
33
+ } from "./chunk-K52DES57.js";
34
+ import "./chunk-V23HHK5D.js";
35
+ import "./chunk-6YG7D7U4.js";
36
+ import {
37
+ reportCrash
38
+ } from "./chunk-BN32BPU6.js";
39
+ import "./chunk-ZXFEHB7N.js";
40
+ import "./chunk-B5AIMVRI.js";
41
+ import {
42
+ backgroundFromColorFgBg,
43
+ queryTerminalBackground
44
+ } from "./chunk-6ULKBT6P.js";
45
+ import {
46
+ hostedByHost,
47
+ workspacesSignal
48
+ } from "./chunk-52YXYXRG.js";
49
+ import {
50
+ require_react,
51
+ setReducedMotion
52
+ } from "./chunk-HREK4V2O.js";
53
+ import {
54
+ MOUSE_OFF,
55
+ mouseOn,
56
+ resolveMouseMode,
57
+ writeLaunchMouseReset
58
+ } from "./chunk-DH4X2E6M.js";
59
+ import "./chunk-FKQOGEKL.js";
60
+ import "./chunk-G4N43E6M.js";
61
+ import "./chunk-DOPHHI6C.js";
62
+ import "./chunk-3MJ3YKNV.js";
63
+ import "./chunk-JETLWXUE.js";
64
+ import "./chunk-RCLTSI6G.js";
65
+ import "./chunk-E7IXVEOQ.js";
66
+ import "./chunk-ALXE3SUZ.js";
67
+ import "./chunk-5U42MB6F.js";
68
+ import "./chunk-E5OETSRN.js";
69
+ import "./chunk-OL5SKFPM.js";
70
+ import "./chunk-NY3I4WL7.js";
71
+ import "./chunk-3D52GNVJ.js";
72
+ import "./chunk-KZHMLRKY.js";
73
+ import "./chunk-T5X3GYBF.js";
74
+ import "./chunk-3YM3IWPW.js";
75
+ import "./chunk-U7AQ4OQJ.js";
76
+ import "./chunk-KJVRHBMX.js";
77
+ import "./chunk-BBTPD3DU.js";
78
+ import "./chunk-45Z4OPC6.js";
79
+ import "./chunk-SR75L2R5.js";
80
+ import "./chunk-WHODOMXA.js";
81
+ import "./chunk-TTXZK3BR.js";
82
+ import "./chunk-OMP25UWR.js";
83
+ import "./chunk-56ZS6OTK.js";
84
+ import "./chunk-6I4V7I5M.js";
85
+ import "./chunk-YOWYTBJS.js";
86
+ import "./chunk-2IPDTDB3.js";
87
+ import "./chunk-I4GTRFPK.js";
88
+ import "./chunk-NAWIOVUH.js";
89
+ import "./chunk-ZWA2JRJV.js";
90
+ import "./chunk-NUGPLXVK.js";
91
+ import "./chunk-OEKCCZ7I.js";
92
+ import "./chunk-P53E77KS.js";
93
+ import "./chunk-PI6KC5CD.js";
94
+ import "./chunk-FLPT7I7I.js";
95
+ import "./chunk-XPCRLKFO.js";
96
+ import "./chunk-VQHVH7X2.js";
97
+ import "./chunk-JQIBPPOL.js";
98
+ import "./chunk-5TPQGNYN.js";
99
+ import "./chunk-XFMGW2C5.js";
100
+ import "./chunk-BC3IZXTY.js";
101
+ import "./chunk-WOX4KI7C.js";
102
+ import "./chunk-AK2U3N2A.js";
103
+ import "./chunk-LAXSPXNP.js";
104
+ import "./chunk-SQWFNFEX.js";
105
+ import "./chunk-JR6EFL7G.js";
106
+ import "./chunk-A22MBIYU.js";
107
+ import "./chunk-OEW7CJKK.js";
108
+ import "./chunk-EDOJTQQU.js";
109
+ import "./chunk-CHIEVVQ2.js";
110
+ import "./chunk-HE7WUOX2.js";
111
+ import "./chunk-5YMIK3VP.js";
112
+ import "./chunk-GNBMKISG.js";
113
+ import "./chunk-X3L6N5RM.js";
114
+ import "./chunk-ANVIYMV6.js";
115
+ import "./chunk-LCGXWCVU.js";
116
+ import {
117
+ contextLogging,
118
+ installCliLogging
119
+ } from "./chunk-XYT53O3Z.js";
120
+ import "./chunk-SIG7WHBU.js";
121
+ import "./chunk-LVVD32KJ.js";
122
+ import "./chunk-OH6TB27S.js";
123
+ import "./chunk-KONYGNG6.js";
124
+ import "./chunk-WMEZTDLT.js";
125
+ import "./chunk-6PWRKA5T.js";
126
+ import "./chunk-QLDUL46Z.js";
127
+ import "./chunk-U5UV2YRE.js";
128
+ import {
129
+ EXIT_INTERNAL_ERROR
130
+ } from "./chunk-FTMONTUX.js";
131
+ import "./chunk-FMAUDMYL.js";
132
+ import "./chunk-6MI4Q5QQ.js";
133
+ import "./chunk-4QIWRKJO.js";
134
+ import "./chunk-G6YSAHKC.js";
135
+ import "./chunk-KTPFUCRU.js";
136
+ import "./chunk-RI2KAZJO.js";
137
+ import "./chunk-FSS72QJP.js";
138
+ import "./chunk-Q5DW33F4.js";
139
+ import "./chunk-M44I7P3H.js";
140
+ import "./chunk-JORONMD3.js";
141
+ import "./chunk-LGH2T6KL.js";
142
+ import {
143
+ namzuHomePath
144
+ } from "./chunk-NGE7TNCY.js";
145
+ import {
146
+ jsonLinesSink,
147
+ prettySink
148
+ } from "./chunk-HQ4WFN7B.js";
149
+ import {
150
+ __name,
151
+ __toESM
152
+ } from "./chunk-76FLAFCG.js";
153
+
154
+ // src/tui/index.tsx
155
+ import { resolve } from "node:path";
156
+ var import_react = __toESM(require_react(), 1);
157
+
158
+ // src/tui/console-input.ts
159
+ import { closeSync, openSync } from "node:fs";
160
+ import { ReadStream } from "node:tty";
161
+ var CONSOLE_INPUT_DEVICE = String.raw`\\.\CONIN$`;
162
+ function openConsoleInput(streams = process, platform = process.platform, io = {
163
+ open: /* @__PURE__ */ __name((path) => openSync(path, "r+"), "open"),
164
+ close: closeSync,
165
+ stream: /* @__PURE__ */ __name((fd) => new ReadStream(fd), "stream")
166
+ }) {
167
+ if (platform !== "win32" || streams.stdin.isTTY === true || streams.stdout.isTTY !== true)
168
+ return void 0;
169
+ let fd;
170
+ try {
171
+ fd = io.open(CONSOLE_INPUT_DEVICE);
172
+ } catch {
173
+ return void 0;
174
+ }
175
+ try {
176
+ const stream = io.stream(fd);
177
+ return { stream, release: /* @__PURE__ */ __name(() => stream.destroy(), "release") };
178
+ } catch {
179
+ try {
180
+ io.close(fd);
181
+ } catch {
182
+ }
183
+ return void 0;
184
+ }
185
+ }
186
+ __name(openConsoleInput, "openConsoleInput");
187
+
188
+ // src/tui/exit-summary.ts
189
+ function publicCommand(command) {
190
+ return command && command.length === 1 ? command : ["namzu"];
191
+ }
192
+ __name(publicCommand, "publicCommand");
193
+ function formatTuiExitSummary(summary, invocation = {}, platform = process.platform) {
194
+ if (!summary?.conversationId) return "";
195
+ const palId = summary.palId ?? invocation.palId;
196
+ const args = [
197
+ ...publicCommand(invocation.command),
198
+ ...palId ? ["pal", "chat", palId, "--resume", summary.conversationId] : ["resume", summary.conversationId]
199
+ ];
200
+ const cwd = !palId && invocation.cwd && invocation.cwd !== process.cwd() ? invocation.cwd : void 0;
201
+ const command = formatResumeShellCommand(args, { platform, cwd });
202
+ if (platform === "win32") {
203
+ return `
204
+ To resume this conversation, run in PowerShell:
205
+ ${command}
206
+ `;
207
+ }
208
+ return `
209
+ To resume this conversation, run:
210
+ ${command}
211
+ `;
212
+ }
213
+ __name(formatTuiExitSummary, "formatTuiExitSummary");
214
+
215
+ // src/tui/focus-reporting.ts
216
+ var FOCUS_REPORTING_ENABLE = "\x1B[?1004h";
217
+ var FOCUS_REPORTING_DISABLE = "\x1B[?1004l";
218
+ var FOCUS_IN = "\x1B[I";
219
+ var FOCUS_OUT = "\x1B[O";
220
+ function stripFocusReports(chunk) {
221
+ if (!chunk.includes("\x1B[")) return { text: chunk, events: [] };
222
+ const events = [];
223
+ let text = "";
224
+ let from = 0;
225
+ for (let i = 0; i < chunk.length - 2; i += 1) {
226
+ if (chunk.charCodeAt(i) !== 27) continue;
227
+ const token = chunk.slice(i, i + 3);
228
+ if (token !== FOCUS_IN && token !== FOCUS_OUT) continue;
229
+ text += chunk.slice(from, i);
230
+ events.push(token === FOCUS_IN ? "in" : "out");
231
+ from = i + 3;
232
+ i += 2;
233
+ }
234
+ return { text: text + chunk.slice(from), events };
235
+ }
236
+ __name(stripFocusReports, "stripFocusReports");
237
+ function installFocusReporting(stdin, stdout, onFocus) {
238
+ if (stdin.isTTY !== true || stdout.isTTY !== true || typeof stdin.setRawMode !== "function") {
239
+ return () => void 0;
240
+ }
241
+ const originalRead = stdin.read;
242
+ const originalSetRawMode = stdin.setRawMode;
243
+ let enabled = false;
244
+ const write = /* @__PURE__ */ __name((text) => {
245
+ try {
246
+ stdout.write(text);
247
+ } catch {
248
+ }
249
+ }, "write");
250
+ stdin.read = /* @__PURE__ */ __name(function patchedRead(...args) {
251
+ const chunk = originalRead.apply(this, args);
252
+ if (typeof chunk !== "string") return chunk;
253
+ const stripped = stripFocusReports(chunk);
254
+ for (const event of stripped.events) onFocus(event === "in");
255
+ return stripped.text;
256
+ }, "patchedRead");
257
+ stdin.setRawMode = /* @__PURE__ */ __name(function patchedSetRawMode(mode) {
258
+ const result = originalSetRawMode.call(this, mode);
259
+ if (mode && !enabled) {
260
+ enabled = true;
261
+ write(FOCUS_REPORTING_ENABLE);
262
+ } else if (!mode && enabled) {
263
+ enabled = false;
264
+ write(FOCUS_REPORTING_DISABLE);
265
+ }
266
+ return result;
267
+ }, "patchedSetRawMode");
268
+ let removed = false;
269
+ return () => {
270
+ if (removed) return;
271
+ removed = true;
272
+ stdin.read = originalRead;
273
+ stdin.setRawMode = originalSetRawMode;
274
+ enabled = false;
275
+ write(FOCUS_REPORTING_DISABLE);
276
+ };
277
+ }
278
+ __name(installFocusReporting, "installFocusReporting");
279
+
280
+ // src/tui/fullscreen/mode.ts
281
+ var OFF = /* @__PURE__ */ new Set(["", "0", "false", "no", "off"]);
282
+ function fullscreenFromEnv(env) {
283
+ const raw = env.NAMZU_FULLSCREEN;
284
+ if (raw === void 0) return void 0;
285
+ return !OFF.has(raw.trim().toLowerCase());
286
+ }
287
+ __name(fullscreenFromEnv, "fullscreenFromEnv");
288
+ function resolveFullscreen(world) {
289
+ if (!world.interactive || world.hosted) return false;
290
+ return fullscreenFromEnv(world.env) ?? world.setting ?? false;
291
+ }
292
+ __name(resolveFullscreen, "resolveFullscreen");
293
+
294
+ // src/tui/fullscreen/mouse-wheel.ts
295
+ var REPORT = /\u001b\[<(\d+);(\d+);(\d+)([Mm])/g;
296
+ var UNFINISHED = /\u001b\[<[\d;]*$/;
297
+ function wheelOf(code) {
298
+ if ((code & 64) === 0) return null;
299
+ return (code & 3) === 0 ? "up" : (code & 3) === 1 ? "down" : null;
300
+ }
301
+ __name(wheelOf, "wheelOf");
302
+ function pointerOf(code, x, y, kind) {
303
+ if ((code & 3) !== 0 || (code & 64) !== 0) return null;
304
+ if (kind === "m") return { kind: "release", x, y };
305
+ return { kind: (code & 32) !== 0 ? "drag" : "press", x, y };
306
+ }
307
+ __name(pointerOf, "pointerOf");
308
+ function createMouseFilter() {
309
+ let held = "";
310
+ return {
311
+ feed(chunk) {
312
+ const input = held + chunk;
313
+ held = "";
314
+ if (!input.includes("\x1B[<")) return { text: input, wheel: [], pointer: [] };
315
+ const wheel = [];
316
+ const pointer = [];
317
+ let text = input.replace(REPORT, (_all, code, x, y, kind) => {
318
+ const direction = kind === "M" ? wheelOf(Number(code)) : null;
319
+ if (direction) wheel.push(direction);
320
+ else {
321
+ const report = pointerOf(Number(code), Number(x), Number(y), kind);
322
+ if (report) pointer.push(report);
323
+ }
324
+ return "";
325
+ });
326
+ const tail = UNFINISHED.exec(text);
327
+ if (tail) {
328
+ held = tail[0];
329
+ text = text.slice(0, tail.index);
330
+ }
331
+ return { text, wheel, pointer };
332
+ }
333
+ };
334
+ }
335
+ __name(createMouseFilter, "createMouseFilter");
336
+ function installMouseWheel(stdin, stdout, onWheel, onPointer) {
337
+ if (stdin.isTTY !== true || stdout.isTTY !== true) return () => void 0;
338
+ const filter = createMouseFilter();
339
+ const originalRead = stdin.read;
340
+ const write = /* @__PURE__ */ __name((text) => {
341
+ try {
342
+ stdout.write(text);
343
+ } catch {
344
+ }
345
+ }, "write");
346
+ stdin.read = /* @__PURE__ */ __name(function patchedRead(...args) {
347
+ const chunk = originalRead.apply(this, args);
348
+ if (typeof chunk !== "string") return chunk;
349
+ const filtered = filter.feed(chunk);
350
+ for (const direction of filtered.wheel) onWheel(direction);
351
+ if (onPointer) for (const report of filtered.pointer) onPointer(report);
352
+ return filtered.text;
353
+ }, "patchedRead");
354
+ write(mouseOn(onPointer ? "full" : "scroll"));
355
+ let removed = false;
356
+ return () => {
357
+ if (removed) return;
358
+ removed = true;
359
+ stdin.read = originalRead;
360
+ write(MOUSE_OFF);
361
+ };
362
+ }
363
+ __name(installMouseWheel, "installMouseWheel");
364
+ var FULLSCREEN_PANIC_RESET = `${MOUSE_OFF}\x1B[?2004l\x1B[?25h`;
365
+
366
+ // src/tui/hint-counts.ts
367
+ import { randomUUID } from "node:crypto";
368
+ import { mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
369
+ import { dirname, join } from "node:path";
370
+ var FILE_MODE = 384;
371
+ var DIR_MODE = 448;
372
+ function hintCountsPath(home) {
373
+ return join(namzuHomePath(home), "hint-counts.json");
374
+ }
375
+ __name(hintCountsPath, "hintCountsPath");
376
+ function readAll(path) {
377
+ try {
378
+ const parsed = JSON.parse(readFileSync(path, "utf8"));
379
+ if (typeof parsed !== "object" || parsed === null) return {};
380
+ const counts = {};
381
+ for (const [key, value] of Object.entries(parsed)) {
382
+ if (typeof value === "number" && Number.isInteger(value) && value >= 0) counts[key] = value;
383
+ }
384
+ return counts;
385
+ } catch {
386
+ return {};
387
+ }
388
+ }
389
+ __name(readAll, "readAll");
390
+ function readHintCount(name, home) {
391
+ return readAll(hintCountsPath(home))[name] ?? 0;
392
+ }
393
+ __name(readHintCount, "readHintCount");
394
+ function writeHintCount(name, count, home) {
395
+ const path = hintCountsPath(home);
396
+ const temp = `${path}.${randomUUID()}.tmp`;
397
+ try {
398
+ mkdirSync(dirname(path), { recursive: true, mode: DIR_MODE });
399
+ writeFileSync(temp, `${JSON.stringify({ ...readAll(path), [name]: count }, null, 2)}
400
+ `, {
401
+ mode: FILE_MODE
402
+ });
403
+ renameSync(temp, path);
404
+ } catch {
405
+ rmSync(temp, { force: true });
406
+ }
407
+ }
408
+ __name(writeHintCount, "writeHintCount");
409
+ function fileQueuedHintCount(home) {
410
+ return {
411
+ read: /* @__PURE__ */ __name(() => readHintCount("queuedMessagesHint", home), "read"),
412
+ write: /* @__PURE__ */ __name((count) => writeHintCount("queuedMessagesHint", count, home), "write")
413
+ };
414
+ }
415
+ __name(fileQueuedHintCount, "fileQueuedHintCount");
416
+
417
+ // src/tui/log-pane.tsx
418
+ var RING_CAPACITY = 512;
419
+ function createRingBufferSink(capacity) {
420
+ const buffer = [];
421
+ return {
422
+ emit(record) {
423
+ buffer.push(record);
424
+ if (buffer.length > capacity) buffer.shift();
425
+ },
426
+ drain() {
427
+ return buffer.splice(0, buffer.length);
428
+ }
429
+ };
430
+ }
431
+ __name(createRingBufferSink, "createRingBufferSink");
432
+ function installTuiLogSink(logging) {
433
+ const resolved = contextLogging({ logging });
434
+ const ring = createRingBufferSink(RING_CAPACITY);
435
+ installCliLogging(ring, resolved.level);
436
+ let settled = false;
437
+ const detach = /* @__PURE__ */ __name(() => {
438
+ process.removeListener("uncaughtException", onFatal);
439
+ process.removeListener("unhandledRejection", onFatal);
440
+ }, "detach");
441
+ const collectDiagnostics = /* @__PURE__ */ __name(() => {
442
+ if (settled) return "";
443
+ settled = true;
444
+ detach();
445
+ let text = "";
446
+ const sink = {
447
+ write: /* @__PURE__ */ __name((chunk) => {
448
+ text += String(chunk);
449
+ return true;
450
+ }, "write")
451
+ };
452
+ const out = resolved.format === "json" ? jsonLinesSink(sink) : prettySink(sink);
453
+ for (const record of ring.drain()) out.emit(record);
454
+ return text;
455
+ }, "collectDiagnostics");
456
+ const flush = /* @__PURE__ */ __name(() => {
457
+ if (settled) return;
458
+ settled = true;
459
+ detach();
460
+ const out = resolved.format === "json" ? jsonLinesSink(process.stderr) : prettySink(process.stderr);
461
+ for (const record of ring.drain()) out.emit(record);
462
+ }, "flush");
463
+ const close = /* @__PURE__ */ __name(() => {
464
+ if (settled) return;
465
+ settled = true;
466
+ detach();
467
+ ring.drain();
468
+ }, "close");
469
+ const onFatal = /* @__PURE__ */ __name((err) => {
470
+ const diagnostics = collectDiagnostics();
471
+ process.stderr.write(reportCrash(err, { extra: diagnostics }));
472
+ process.exit(EXIT_INTERNAL_ERROR);
473
+ }, "onFatal");
474
+ process.once("uncaughtException", onFatal);
475
+ process.once("unhandledRejection", onFatal);
476
+ return { close, flush };
477
+ }
478
+ __name(installTuiLogSink, "installTuiLogSink");
479
+
480
+ // src/tui/output-size-watch.ts
481
+ var SIZE_WATCH_INTERVAL_MS = 250;
482
+ function watchOutputSize(output, platform = process.platform, timers = { setInterval, clearInterval }) {
483
+ if (platform !== "win32" || output.isTTY !== true) return void 0;
484
+ if (typeof output._refreshSize !== "function") return void 0;
485
+ const handle = timers.setInterval(() => {
486
+ try {
487
+ output._refreshSize?.();
488
+ } catch {
489
+ }
490
+ }, SIZE_WATCH_INTERVAL_MS);
491
+ handle?.unref?.();
492
+ return () => timers.clearInterval(handle);
493
+ }
494
+ __name(watchOutputSize, "watchOutputSize");
495
+
496
+ // src/tui/paste-marker-guard.ts
497
+ var ESC = "\x1B";
498
+ var MARKERS = [`${ESC}[200~`, `${ESC}[201~`];
499
+ var SHARED_PREFIX_MS = 200;
500
+ var MARKER_PREFIX_MS = 2e3;
501
+ function heldTailLength(text) {
502
+ const longest = Math.min(text.length, MARKERS[0].length - 1);
503
+ for (let length = longest; length >= 2; length -= 1) {
504
+ const tail = text.slice(-length);
505
+ if (MARKERS.some((marker) => marker.startsWith(tail))) return length;
506
+ }
507
+ return 0;
508
+ }
509
+ __name(heldTailLength, "heldTailLength");
510
+ function createPasteMarkerGuard(onRelease) {
511
+ let held = "";
512
+ let ready = "";
513
+ let timer;
514
+ const stop = /* @__PURE__ */ __name(() => {
515
+ if (timer === void 0) return;
516
+ clearTimeout(timer);
517
+ timer = void 0;
518
+ }, "stop");
519
+ return {
520
+ read(chunk) {
521
+ if (chunk === null) {
522
+ const out2 = ready;
523
+ ready = "";
524
+ return out2 === "" ? null : out2;
525
+ }
526
+ stop();
527
+ const input = ready + held + chunk;
528
+ ready = "";
529
+ held = "";
530
+ const keep = heldTailLength(input);
531
+ if (keep > 0) {
532
+ held = input.slice(input.length - keep);
533
+ const bound = keep >= 4 ? MARKER_PREFIX_MS : SHARED_PREFIX_MS;
534
+ timer = setTimeout(() => {
535
+ timer = void 0;
536
+ ready = held;
537
+ held = "";
538
+ onRelease();
539
+ }, bound);
540
+ }
541
+ const out = input.slice(0, input.length - keep);
542
+ return out === "" ? null : out;
543
+ },
544
+ dispose() {
545
+ stop();
546
+ }
547
+ };
548
+ }
549
+ __name(createPasteMarkerGuard, "createPasteMarkerGuard");
550
+ function installPasteMarkerGuard(stdin) {
551
+ const originalRead = stdin.read;
552
+ const guard = createPasteMarkerGuard(() => stdin.emit("readable"));
553
+ stdin.read = /* @__PURE__ */ __name(function patchedRead(...args) {
554
+ for (; ; ) {
555
+ const chunk = originalRead.apply(this, args);
556
+ if (chunk !== null && typeof chunk !== "string") return chunk;
557
+ const passed = guard.read(chunk);
558
+ if (passed !== null || chunk === null) return passed;
559
+ }
560
+ }, "patchedRead");
561
+ let removed = false;
562
+ return () => {
563
+ if (removed) return;
564
+ removed = true;
565
+ guard.dispose();
566
+ stdin.read = originalRead;
567
+ };
568
+ }
569
+ __name(installPasteMarkerGuard, "installPasteMarkerGuard");
570
+
571
+ // src/tui/render-mode.ts
572
+ function liveRenderOption(stdout, input, inputIsConsole) {
573
+ return stdout.isTTY === true && (input.isTTY === true || inputIsConsole) ? { interactive: true } : {};
574
+ }
575
+ __name(liveRenderOption, "liveRenderOption");
576
+
577
+ // src/tui/theme-launch.ts
578
+ var BACKGROUND_QUERY_WAIT_MS = 250;
579
+ function applyLaunchTheme(tui, streams, env = process.env) {
580
+ setReducedMotion(tui?.reducedMotion === true);
581
+ const setting = tui?.theme ?? "dark";
582
+ if (setting !== "auto") {
583
+ setThemeSetting(setting, { env });
584
+ return void 0;
585
+ }
586
+ const settle = /* @__PURE__ */ __name((reported) => {
587
+ const answer = reported ?? backgroundFromColorFgBg(env.COLORFGBG);
588
+ setThemeSetting("auto", { env, ...answer ? { reported: answer } : {} });
589
+ }, "settle");
590
+ if (!streams) {
591
+ settle(void 0);
592
+ return void 0;
593
+ }
594
+ return askTerminal(streams).then(settle);
595
+ }
596
+ __name(applyLaunchTheme, "applyLaunchTheme");
597
+ async function askTerminal(streams) {
598
+ let timer;
599
+ const giveUp = new Promise((resolve2) => {
600
+ timer = setTimeout(resolve2, BACKGROUND_QUERY_WAIT_MS);
601
+ });
602
+ try {
603
+ return await queryTerminalBackground(streams, giveUp);
604
+ } finally {
605
+ clearTimeout(timer);
606
+ }
607
+ }
608
+ __name(askTerminal, "askTerminal");
609
+
610
+ // src/tui/tip-history.ts
611
+ import { randomUUID as randomUUID2 } from "node:crypto";
612
+ import { mkdirSync as mkdirSync2, readFileSync as readFileSync2, renameSync as renameSync2, rmSync as rmSync2, writeFileSync as writeFileSync2 } from "node:fs";
613
+ import { dirname as dirname2, join as join2 } from "node:path";
614
+ var FILE_MODE2 = 384;
615
+ var DIR_MODE2 = 448;
616
+ var EMPTY_TIP_HISTORY = { launches: 0, shown: {}, used: {} };
617
+ function tipHistoryPath(home) {
618
+ return join2(namzuHomePath(home), "tip-history.json");
619
+ }
620
+ __name(tipHistoryPath, "tipHistoryPath");
621
+ function wholeNumber(value) {
622
+ return typeof value === "number" && Number.isInteger(value) && value >= 0;
623
+ }
624
+ __name(wholeNumber, "wholeNumber");
625
+ function readTipHistory(path) {
626
+ try {
627
+ const parsed = JSON.parse(readFileSync2(path, "utf8"));
628
+ if (typeof parsed !== "object" || parsed === null) return EMPTY_TIP_HISTORY;
629
+ const raw = parsed;
630
+ const shown = {};
631
+ if (typeof raw.shown === "object" && raw.shown !== null) {
632
+ for (const [id, entry] of Object.entries(raw.shown)) {
633
+ const e = entry;
634
+ if (e && wholeNumber(e.lastLaunch) && wholeNumber(e.total))
635
+ shown[id] = { lastLaunch: e.lastLaunch, total: e.total };
636
+ }
637
+ }
638
+ const used = {};
639
+ if (typeof raw.used === "object" && raw.used !== null) {
640
+ for (const [name, count] of Object.entries(raw.used))
641
+ if (wholeNumber(count)) used[name] = count;
642
+ }
643
+ return { launches: wholeNumber(raw.launches) ? raw.launches : 0, shown, used };
644
+ } catch {
645
+ return EMPTY_TIP_HISTORY;
646
+ }
647
+ }
648
+ __name(readTipHistory, "readTipHistory");
649
+ function writeTipHistory(path, history) {
650
+ const temp = `${path}.${randomUUID2()}.tmp`;
651
+ try {
652
+ mkdirSync2(dirname2(path), { recursive: true, mode: DIR_MODE2 });
653
+ writeFileSync2(temp, `${JSON.stringify(history, null, 2)}
654
+ `, { mode: FILE_MODE2 });
655
+ renameSync2(temp, path);
656
+ } catch {
657
+ try {
658
+ rmSync2(temp, { force: true });
659
+ } catch {
660
+ }
661
+ }
662
+ }
663
+ __name(writeTipHistory, "writeTipHistory");
664
+ function fileTipHistory(home) {
665
+ const path = tipHistoryPath(home);
666
+ const update = /* @__PURE__ */ __name((change) => writeTipHistory(path, change(readTipHistory(path))), "update");
667
+ return {
668
+ read: /* @__PURE__ */ __name(() => readTipHistory(path), "read"),
669
+ recordLaunch: /* @__PURE__ */ __name(() => update((h) => ({ ...h, launches: h.launches + 1 })), "recordLaunch"),
670
+ // Idempotent within a launch: a tip counts once per start, however often it is picked.
671
+ recordShown: /* @__PURE__ */ __name((id) => update(
672
+ (h) => h.shown[id]?.lastLaunch === h.launches ? h : {
673
+ ...h,
674
+ shown: {
675
+ ...h.shown,
676
+ [id]: { lastLaunch: h.launches, total: (h.shown[id]?.total ?? 0) + 1 }
677
+ }
678
+ }
679
+ ), "recordShown"),
680
+ recordUse: /* @__PURE__ */ __name((command) => update((h) => ({ ...h, used: { ...h.used, [command]: (h.used[command] ?? 0) + 1 } })), "recordUse")
681
+ };
682
+ }
683
+ __name(fileTipHistory, "fileTipHistory");
684
+
685
+ // src/tui/zoom/leave.ts
686
+ async function leaveWorkspacesBounded(options) {
687
+ let wanted = true;
688
+ let timer;
689
+ const hand = /* @__PURE__ */ __name(async () => {
690
+ if (await options.release(() => wanted)) {
691
+ if (wanted) await options.flush();
692
+ }
693
+ }, "hand");
694
+ try {
695
+ await Promise.race([
696
+ hand().catch(() => void 0),
697
+ new Promise((resolve2) => {
698
+ timer = setTimeout(resolve2, options.limitMs);
699
+ })
700
+ ]);
701
+ } finally {
702
+ wanted = false;
703
+ clearTimeout(timer);
704
+ }
705
+ }
706
+ __name(leaveWorkspacesBounded, "leaveWorkspacesBounded");
707
+
708
+ // src/tui/zoom/proxy.ts
709
+ import { EventEmitter } from "node:events";
710
+ var HIDE = "\x1B[?25l";
711
+ var SHOW = "\x1B[?25h";
712
+ var PASTE_ON = "\x1B[?2004h";
713
+ var PASTE_OFF = "\x1B[?2004l";
714
+ var RESIZE = "resize";
715
+ function createTerminalProxy(realOut, realIn) {
716
+ let zoomed = null;
717
+ let keyHandler = null;
718
+ const realResizes = /* @__PURE__ */ new Set();
719
+ const injected = [];
720
+ let announced = false;
721
+ let cursorHidden = false;
722
+ let bracketedPaste = false;
723
+ const resizes = new EventEmitter();
724
+ let subscribed = false;
725
+ const noteModes = /* @__PURE__ */ __name((chunk) => {
726
+ if (typeof chunk !== "string") return;
727
+ if (chunk.includes("\x1B[?25")) {
728
+ const hide = chunk.lastIndexOf(HIDE);
729
+ const show = chunk.lastIndexOf(SHOW);
730
+ if (hide !== show) cursorHidden = hide > show;
731
+ }
732
+ if (chunk.includes("\x1B[?2004")) {
733
+ const on = chunk.lastIndexOf(PASTE_ON);
734
+ const off = chunk.lastIndexOf(PASTE_OFF);
735
+ if (on !== off) bracketedPaste = on > off;
736
+ }
737
+ }, "noteModes");
738
+ const subscribe = /* @__PURE__ */ __name(() => {
739
+ if (subscribed) return;
740
+ subscribed = true;
741
+ realOut.on(RESIZE, () => {
742
+ if (zoomed) for (const listener of [...realResizes]) listener();
743
+ else resizes.emit(RESIZE);
744
+ });
745
+ }, "subscribe");
746
+ const out = new Proxy(realOut, {
747
+ get(target, prop) {
748
+ if (prop === "write") {
749
+ return (chunk, ...rest) => {
750
+ noteModes(chunk);
751
+ if (zoomed === null)
752
+ return Reflect.apply(target.write, target, [chunk, ...rest]);
753
+ zoomed.write(typeof chunk === "string" ? chunk : String(chunk));
754
+ const done = rest.find((r) => typeof r === "function");
755
+ done?.();
756
+ return true;
757
+ };
758
+ }
759
+ if (prop === "columns") return zoomed ? zoomed.columns : target.columns;
760
+ if (prop === "rows") return zoomed ? zoomed.rows : target.rows;
761
+ if (prop === "getWindowSize") {
762
+ return () => zoomed ? [zoomed.columns, zoomed.rows] : target.getWindowSize();
763
+ }
764
+ if (prop === "on" || prop === "addListener" || prop === "once" || prop === "off" || prop === "removeListener") {
765
+ return (event, listener) => {
766
+ if (event !== RESIZE) {
767
+ Reflect.apply(target[prop], target, [event, listener]);
768
+ return out;
769
+ }
770
+ subscribe();
771
+ resizes[prop](event, listener);
772
+ return out;
773
+ };
774
+ }
775
+ const value = Reflect.get(target, prop, target);
776
+ return typeof value === "function" ? value.bind(target) : value;
777
+ }
778
+ });
779
+ const inn = new Proxy(realIn, {
780
+ get(target, prop) {
781
+ if (prop === "read") {
782
+ return (...args) => {
783
+ for (; ; ) {
784
+ const next = injected.shift();
785
+ if (next !== void 0) return next;
786
+ const chunk = Reflect.apply(target.read, target, args);
787
+ if (typeof chunk !== "string") return chunk;
788
+ if (zoomed !== null && keyHandler !== null) {
789
+ const kept = keyHandler(chunk);
790
+ if (kept !== null) return kept;
791
+ continue;
792
+ }
793
+ return chunk;
794
+ }
795
+ };
796
+ }
797
+ const value = Reflect.get(target, prop, target);
798
+ return typeof value === "function" ? value.bind(target) : value;
799
+ }
800
+ });
801
+ return {
802
+ stdout: out,
803
+ stdin: inn,
804
+ get mode() {
805
+ return zoomed ? "zoomed" : "direct";
806
+ },
807
+ get cursorHidden() {
808
+ return cursorHidden;
809
+ },
810
+ get bracketedPaste() {
811
+ return bracketedPaste;
812
+ },
813
+ enterZoomed(output, onKey) {
814
+ zoomed = output;
815
+ keyHandler = onKey;
816
+ resizes.emit(RESIZE);
817
+ },
818
+ leaveZoomed() {
819
+ zoomed = null;
820
+ keyHandler = null;
821
+ resizes.emit(RESIZE);
822
+ },
823
+ resizeZoomed(columns, rows) {
824
+ if (!zoomed) return;
825
+ zoomed.columns = columns;
826
+ zoomed.rows = rows;
827
+ resizes.emit(RESIZE);
828
+ },
829
+ onRealResize(listener) {
830
+ realResizes.add(listener);
831
+ subscribe();
832
+ return () => {
833
+ realResizes.delete(listener);
834
+ };
835
+ },
836
+ inject(chunk) {
837
+ injected.push(chunk);
838
+ if (announced) return;
839
+ announced = true;
840
+ queueMicrotask(() => {
841
+ announced = false;
842
+ if (injected.length > 0) realIn.emit("readable");
843
+ });
844
+ }
845
+ };
846
+ }
847
+ __name(createTerminalProxy, "createTerminalProxy");
848
+
849
+ // src/tui/index.tsx
850
+ var LEAVE_WORKSPACES_MS = 2e3;
851
+ async function launchTui(ctx, options = {}) {
852
+ const invocation = {
853
+ cwd: resolve(ctx.cwd),
854
+ command: options.resumeCommand,
855
+ ...ctx.palId ? { palId: ctx.palId } : {}
856
+ };
857
+ const logs = installTuiLogSink(ctx.logging);
858
+ const tipHistory = fileTipHistory();
859
+ tipHistory.recordLaunch();
860
+ let exitSummary = null;
861
+ writeLaunchMouseReset(process.stdout, hostedByHost(process.env, process.ppid));
862
+ const fullscreen = resolveFullscreen({
863
+ env: process.env,
864
+ ...ctx.tui?.fullscreen !== void 0 ? { setting: ctx.tui.fullscreen } : {},
865
+ interactive: process.stdout.isTTY === true && process.stdin.isTTY === true,
866
+ hosted: hostedByHost(process.env, process.ppid)
867
+ });
868
+ if (process.stdout.isTTY && !fullscreen) {
869
+ process.stdout.write("\x1B[2J\x1B[3J\x1B[H");
870
+ }
871
+ const termination = handleTerminationSignals();
872
+ const consoleInput = openConsoleInput();
873
+ const stopSizeWatch = watchOutputSize(process.stdout);
874
+ const themeReady = applyLaunchTheme(
875
+ ctx.tui,
876
+ consoleInput === void 0 ? { input: process.stdin, output: process.stdout } : void 0
877
+ );
878
+ if (themeReady) await themeReady;
879
+ const inputStream = consoleInput?.stream ?? process.stdin;
880
+ const stopPasteMarkerGuard = installPasteMarkerGuard(inputStream);
881
+ const stopFocusReporting = installFocusReporting(
882
+ inputStream,
883
+ process.stdout,
884
+ (focused) => terminalFocus.set(focused)
885
+ );
886
+ const hosted = hostedByHost(process.env, process.ppid);
887
+ const proxy = !hosted && !fullscreen && consoleInput === void 0 && process.platform !== "win32" && process.stdout.isTTY === true && inputStream.isTTY === true ? createTerminalProxy(process.stdout, inputStream) : null;
888
+ const terminationExit = { current: null };
889
+ const repaint = { current: null };
890
+ const workspaces = {
891
+ current: null
892
+ };
893
+ const workspacesEntry = /* @__PURE__ */ __name(() => {
894
+ workspaces.current ??= import("./entry-XPXHELKT.js").then(
895
+ (m) => m.createWorkspacesEntry({
896
+ proxy,
897
+ realOut: process.stdout,
898
+ env: process.env,
899
+ cwd: process.cwd(),
900
+ entry: process.argv[1],
901
+ prefixSetting: ctx.tui?.workspacesPrefix ?? ctx.tui?.spacesPrefix,
902
+ ...ctx.tui?.mouse !== void 0 ? { mouseSetting: ctx.tui.mouse } : {},
903
+ ...ctx.tui?.copyOnSelect !== void 0 ? { copyOnSelect: ctx.tui.copyOnSelect } : {},
904
+ requestExit: /* @__PURE__ */ __name(() => terminationExit.current ? terminationExit.current() : instance.unmount(), "requestExit"),
905
+ repaint: /* @__PURE__ */ __name(() => repaint.current?.(), "repaint")
906
+ })
907
+ );
908
+ return workspaces.current;
909
+ }, "workspacesEntry");
910
+ const onOpenWorkspaces = hosted ? () => {
911
+ process.stdout.write(workspacesSignal("zoom-out"));
912
+ return Promise.resolve(true);
913
+ } : proxy !== null ? async () => {
914
+ try {
915
+ return await (await workspacesEntry()).open();
916
+ } catch {
917
+ return false;
918
+ }
919
+ } : void 0;
920
+ const onConfirmExit = !hosted && proxy !== null ? async () => {
921
+ try {
922
+ return workspaces.current === null ? true : await (await workspaces.current).confirmExit();
923
+ } catch {
924
+ return true;
925
+ }
926
+ } : void 0;
927
+ const beforeExit = !hosted && proxy !== null ? async () => {
928
+ if (workspaces.current === null) return;
929
+ await leaveWorkspacesBounded({
930
+ release: /* @__PURE__ */ __name((stillWanted) => workspaces.current.then(
931
+ (entry) => entry.release(stillWanted)
932
+ ), "release"),
933
+ flush: /* @__PURE__ */ __name(() => instance.waitUntilRenderFlush(), "flush"),
934
+ limitMs: LEAVE_WORKSPACES_MS
935
+ });
936
+ } : void 0;
937
+ let terminatedBy = null;
938
+ const wheelListeners = /* @__PURE__ */ new Set();
939
+ const pointerListeners = /* @__PURE__ */ new Set();
940
+ const selectable = fullscreen && resolveMouseMode(process.env, ctx.tui?.mouse) === "full";
941
+ const fullscreenHost = fullscreen ? {
942
+ ...selectable ? {
943
+ subscribePointer: /* @__PURE__ */ __name((listener) => {
944
+ pointerListeners.add(listener);
945
+ return () => {
946
+ pointerListeners.delete(listener);
947
+ };
948
+ }, "subscribePointer")
949
+ } : {},
950
+ ...ctx.tui?.copyOnSelect !== void 0 ? { copyOnSelect: ctx.tui.copyOnSelect } : {},
951
+ subscribeWheel: /* @__PURE__ */ __name((listener) => {
952
+ wheelListeners.add(listener);
953
+ return () => {
954
+ wheelListeners.delete(listener);
955
+ };
956
+ }, "subscribeWheel")
957
+ } : void 0;
958
+ const instance = render_default(
959
+ import_react.default.createElement(App, {
960
+ ctx,
961
+ onExitSummary: /* @__PURE__ */ __name((summary) => {
962
+ exitSummary = summary;
963
+ }, "onExitSummary"),
964
+ terminationExit,
965
+ repaint,
966
+ ...fullscreenHost ? { fullscreen: fullscreenHost } : {},
967
+ ...onOpenWorkspaces ? { onOpenWorkspaces } : {},
968
+ ...onConfirmExit ? { onConfirmExit } : {},
969
+ ...beforeExit ? { beforeExit } : {},
970
+ examplePrompts: true,
971
+ decisionSetup: {},
972
+ queuedHintCount: fileQueuedHintCount(),
973
+ tipHistory
974
+ }),
975
+ {
976
+ stdout: proxy?.stdout ?? process.stdout,
977
+ stderr: process.stderr,
978
+ stdin: proxy?.stdin ?? inputStream,
979
+ exitOnCtrlC: false,
980
+ // A CI marker in the environment must not blank a real terminal (see render-mode.ts).
981
+ ...liveRenderOption(process.stdout, process.stdin, consoleInput !== void 0),
982
+ // Ink enters the alternate screen here and leaves it on every way out
983
+ // (unmount, a signal, a crash). It repaints only the lines that changed.
984
+ ...fullscreen ? { alternateScreen: true, incrementalRendering: true } : {},
985
+ kittyKeyboard: {
986
+ mode: "auto",
987
+ flags: ["disambiguateEscapeCodes"]
988
+ }
989
+ }
990
+ );
991
+ const stopWheel = fullscreen ? installMouseWheel(
992
+ inputStream,
993
+ process.stdout,
994
+ (direction) => {
995
+ for (const listener of wheelListeners) listener(direction);
996
+ },
997
+ selectable ? (report) => {
998
+ for (const listener of pointerListeners) listener(report);
999
+ } : void 0
1000
+ ) : void 0;
1001
+ const panicReset = fullscreen ? () => process.stdout.write(FULLSCREEN_PANIC_RESET) : void 0;
1002
+ if (panicReset) process.on("exit", panicReset);
1003
+ termination.onTerminate(async (signal) => {
1004
+ terminatedBy = signal;
1005
+ if (signal === "SIGHUP") {
1006
+ process.stdout.on("error", () => void 0);
1007
+ process.stderr.on("error", () => void 0);
1008
+ }
1009
+ if (terminationExit.current) terminationExit.current();
1010
+ else instance.unmount();
1011
+ await instance.waitUntilExit();
1012
+ if (workspaces.current !== null) await (await workspaces.current).shutdown();
1013
+ });
1014
+ try {
1015
+ await instance.waitUntilExit();
1016
+ } finally {
1017
+ if (workspaces.current !== null) await (await workspaces.current).shutdown();
1018
+ termination.dispose();
1019
+ stopSizeWatch?.();
1020
+ stopFocusReporting();
1021
+ stopWheel?.();
1022
+ stopPasteMarkerGuard();
1023
+ if (panicReset) process.off("exit", panicReset);
1024
+ consoleInput?.release();
1025
+ logs.close();
1026
+ const summary = terminatedBy === "SIGHUP" ? "" : formatTuiExitSummary(exitSummary, invocation);
1027
+ if (summary.length > 0) process.stdout.write(summary);
1028
+ }
1029
+ }
1030
+ __name(launchTui, "launchTui");
1031
+ export {
1032
+ launchTui
1033
+ };
1034
+ //# sourceMappingURL=tui-DLUH6HQ4.js.map