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