@namzu/cli 44.2.0 → 45.0.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 (485) hide show
  1. package/CHANGELOG.md +145 -0
  2. package/README.md +4 -2
  3. package/dist/bin.js +1 -1
  4. package/dist/chunks/{acp-OUBJWH5B.js → acp-XSAUUT2D.js} +59 -165
  5. package/dist/chunks/acp-XSAUUT2D.js.map +6 -0
  6. package/dist/chunks/{activity-command-R7MUSZIY.js → activity-command-DB4DREW7.js} +13 -13
  7. package/dist/chunks/{add-PSEIDDRW.js → add-NVXRVUGY.js} +22 -19
  8. package/dist/chunks/add-NVXRVUGY.js.map +6 -0
  9. package/dist/chunks/{agent-YPEXUYPH.js → agent-6TD66IMV.js} +42 -38
  10. package/dist/chunks/agent-session-3A5K5VK3.js +69 -0
  11. package/dist/chunks/{archive-ET4PXE34.js → archive-A3X7KX2U.js} +11 -11
  12. package/dist/chunks/{bin-main-PMB57AZJ.js → bin-main-5PYV7WYI.js} +7 -7
  13. package/dist/chunks/{binding-K6RIQ5AP.js → binding-EMMG5PAE.js} +3 -3
  14. package/dist/chunks/{browser-SKTIAVBF.js → browser-FUFFJBRR.js} +6 -6
  15. package/dist/chunks/{chat-AVIVXXMD.js → chat-M653DEAF.js} +16 -16
  16. package/dist/chunks/{chunk-YXIG4OT2.js → chunk-24FBGXYR.js} +3 -3
  17. package/dist/chunks/{chunk-XX2SP5AM.js → chunk-2OAD3CZE.js} +3 -3
  18. package/dist/chunks/{chunk-7FPKSX4M.js → chunk-2YCPLLUW.js} +3 -3
  19. package/dist/chunks/{chunk-LF76CVOZ.js → chunk-325X27UO.js} +4 -4
  20. package/dist/chunks/{chunk-GBS6ATYF.js → chunk-43HR3AF5.js} +2 -2
  21. package/dist/chunks/{chunk-B3XIVOLM.js → chunk-43PTHA5N.js} +2 -2
  22. package/dist/chunks/{chunk-RSIWTHYS.js → chunk-46OOPRR6.js} +3 -3
  23. package/dist/chunks/{chunk-U4SST7AD.js → chunk-4DVCHAWN.js} +2 -2
  24. package/dist/chunks/{chunk-G73G2WGR.js → chunk-667W6Z5W.js} +72 -5
  25. package/dist/chunks/chunk-667W6Z5W.js.map +6 -0
  26. package/dist/chunks/chunk-6PDIDZGX.js +363 -0
  27. package/dist/chunks/chunk-6PDIDZGX.js.map +6 -0
  28. package/dist/chunks/{chunk-LKJBDF7W.js → chunk-6TT7NXLP.js} +170 -139
  29. package/dist/chunks/chunk-6TT7NXLP.js.map +6 -0
  30. package/dist/chunks/{chunk-HELINLSD.js → chunk-6ZEHXLF7.js} +2 -2
  31. package/dist/chunks/{chunk-6EJFXJDO.js → chunk-7DR7EU3J.js} +1661 -569
  32. package/dist/chunks/chunk-7DR7EU3J.js.map +6 -0
  33. package/dist/chunks/chunk-7NJAEWFK.js +153 -0
  34. package/dist/chunks/chunk-7NJAEWFK.js.map +6 -0
  35. package/dist/chunks/{chunk-MGZSEPDY.js → chunk-7TBETDTX.js} +2 -2
  36. package/dist/chunks/{chunk-L2NNJ4XL.js → chunk-ADCVLGQO.js} +3 -3
  37. package/dist/chunks/{chunk-2Y26DLOF.js → chunk-AHNXQAYZ.js} +74 -56
  38. package/dist/chunks/chunk-AHNXQAYZ.js.map +6 -0
  39. package/dist/chunks/{chunk-IZVN6K6U.js → chunk-ANHFJD66.js} +4 -4
  40. package/dist/chunks/{chunk-LYGD5P7O.js → chunk-B6INWHLR.js} +3 -3
  41. package/dist/chunks/{chunk-4OXIJ2EF.js → chunk-BICC735N.js} +3 -3
  42. package/dist/chunks/{chunk-6FWFSPUL.js → chunk-BOM64EUQ.js} +2 -2
  43. package/dist/chunks/{chunk-WYJ3CNXX.js → chunk-C4MAQ64X.js} +38 -38
  44. package/dist/chunks/chunk-CDDS3UKB.js +425 -0
  45. package/dist/chunks/chunk-CDDS3UKB.js.map +6 -0
  46. package/dist/chunks/{chunk-2EHPXO4E.js → chunk-D23EJNO5.js} +3 -3
  47. package/dist/chunks/{chunk-G5RAECIB.js → chunk-E2MNVA3X.js} +2 -2
  48. package/dist/chunks/{chunk-3QGJXD7U.js → chunk-E3FA5H3Q.js} +5 -5
  49. package/dist/chunks/{chunk-YJ6NWB2B.js → chunk-EFU2OFEK.js} +2 -2
  50. package/dist/chunks/{chunk-7QQOUCGI.js → chunk-FUJSGQYW.js} +14 -12
  51. package/dist/chunks/chunk-FUJSGQYW.js.map +6 -0
  52. package/dist/chunks/{chunk-QWSZ5P4C.js → chunk-FZR4XULA.js} +6 -6
  53. package/dist/chunks/{chunk-ITA57VY5.js → chunk-G5FWVYK2.js} +45 -9
  54. package/dist/chunks/chunk-G5FWVYK2.js.map +6 -0
  55. package/dist/chunks/{chunk-6LLJQ3KY.js → chunk-G6YSAHKC.js} +4 -3
  56. package/dist/chunks/chunk-G6YSAHKC.js.map +6 -0
  57. package/dist/chunks/{chunk-WKPRYH24.js → chunk-GAEZQRQI.js} +3 -3
  58. package/dist/chunks/{chunk-S4QOQGAT.js → chunk-GCFXQSN6.js} +2 -2
  59. package/dist/chunks/{chunk-XPS3W7FC.js → chunk-GMUWAUKQ.js} +2 -2
  60. package/dist/chunks/{chunk-KLKAK2O5.js → chunk-GWGIAZLZ.js} +37 -1
  61. package/dist/chunks/{chunk-KLKAK2O5.js.map → chunk-GWGIAZLZ.js.map} +1 -1
  62. package/dist/chunks/{chunk-VDKDXDOH.js → chunk-H6AUN2YD.js} +5 -5
  63. package/dist/chunks/{chunk-7TEXDZVO.js → chunk-HFD2VRQP.js} +4 -4
  64. package/dist/chunks/{chunk-M2OZ4SVS.js → chunk-HGIIAAEG.js} +5 -6
  65. package/dist/chunks/chunk-HGIIAAEG.js.map +6 -0
  66. package/dist/chunks/{chunk-WKFHQQOU.js → chunk-HH3NBBBE.js} +2 -2
  67. package/dist/chunks/{chunk-A5GTZ7R2.js → chunk-HV2JFRSE.js} +2 -2
  68. package/dist/chunks/{chunk-BGKQCLLH.js → chunk-IRUDNBAR.js} +4 -4
  69. package/dist/chunks/{chunk-PIVHVYCN.js → chunk-IYEDXZQZ.js} +412 -15
  70. package/dist/chunks/chunk-IYEDXZQZ.js.map +6 -0
  71. package/dist/chunks/{chunk-PMX2WTZL.js → chunk-J2FGTLZV.js} +2 -2
  72. package/dist/chunks/{chunk-YDSWGJWF.js → chunk-JAB62RI5.js} +2 -2
  73. package/dist/chunks/{chunk-AX5ESG6K.js → chunk-JKPUOSDC.js} +2 -2
  74. package/dist/chunks/{chunk-DFCJYRT5.js → chunk-K5FQ4G64.js} +2 -2
  75. package/dist/chunks/{chunk-HB5ZN5KQ.js → chunk-KVCYYXCS.js} +2 -2
  76. package/dist/chunks/{chunk-2X6JZAKH.js → chunk-KZ5WYSA6.js} +9 -9
  77. package/dist/chunks/chunk-L2WEBN6A.js +49 -0
  78. package/dist/chunks/chunk-L2WEBN6A.js.map +6 -0
  79. package/dist/chunks/{chunk-JL64XHSL.js → chunk-L6QJZZCJ.js} +6 -6
  80. package/dist/chunks/{chunk-GCCFTP47.js → chunk-LHZSSQ6K.js} +4 -4
  81. package/dist/chunks/{chunk-VFVWHYHT.js → chunk-LR4QQMJH.js} +4 -4
  82. package/dist/chunks/{chunk-3NJPNX6V.js → chunk-LVVD32KJ.js} +14 -4
  83. package/dist/chunks/chunk-LVVD32KJ.js.map +6 -0
  84. package/dist/chunks/{chunk-TZZOQ62Z.js → chunk-M7LCVDP3.js} +9 -2
  85. package/dist/chunks/chunk-M7LCVDP3.js.map +6 -0
  86. package/dist/chunks/{chunk-JV3LONAU.js → chunk-MDK4RMBQ.js} +9 -3
  87. package/dist/chunks/{chunk-JV3LONAU.js.map → chunk-MDK4RMBQ.js.map} +1 -1
  88. package/dist/chunks/{chunk-DQLSLXDF.js → chunk-MKRYUMLP.js} +6 -6
  89. package/dist/chunks/{chunk-YTE3QIH3.js → chunk-MMZHUQZQ.js} +3688 -1279
  90. package/dist/chunks/chunk-MMZHUQZQ.js.map +6 -0
  91. package/dist/chunks/{chunk-SJFPZPOJ.js → chunk-MYSU54EZ.js} +14 -12
  92. package/dist/chunks/chunk-MYSU54EZ.js.map +6 -0
  93. package/dist/chunks/{chunk-VZ4PKWLF.js → chunk-NUNOIP4Y.js} +2 -2
  94. package/dist/chunks/{chunk-SGRO4RJP.js → chunk-NXX6C3WS.js} +2 -2
  95. package/dist/chunks/{chunk-XPLHAOGE.js → chunk-OENL667J.js} +2 -2
  96. package/dist/chunks/{chunk-2NI5NS5S.js → chunk-OMRU22BQ.js} +4 -4
  97. package/dist/chunks/{chunk-GANFMGV7.js → chunk-P6FEQPES.js} +2 -2
  98. package/dist/chunks/{chunk-ACSG5R5P.js → chunk-P6RUYL3F.js} +3 -3
  99. package/dist/chunks/{chunk-26C37THH.js → chunk-P7MNE6YP.js} +8 -419
  100. package/dist/chunks/chunk-P7MNE6YP.js.map +6 -0
  101. package/dist/chunks/{chunk-FHQTXWDA.js → chunk-RJQ6WQYX.js} +358 -32
  102. package/dist/chunks/chunk-RJQ6WQYX.js.map +6 -0
  103. package/dist/chunks/{chunk-MYL75RA4.js → chunk-S2UDKXWH.js} +2 -2
  104. package/dist/chunks/chunk-S766UWAQ.js +227 -0
  105. package/dist/chunks/chunk-S766UWAQ.js.map +6 -0
  106. package/dist/chunks/{chunk-435DYOG4.js → chunk-TFOIA3U3.js} +2 -2
  107. package/dist/chunks/{chunk-HTBMDD6Y.js → chunk-THJQXERD.js} +8 -8
  108. package/dist/chunks/{chunk-DECJPLLA.js → chunk-THQAGFMO.js} +17 -17
  109. package/dist/chunks/{chunk-GNEDN6MU.js → chunk-THUX2WOG.js} +12 -12
  110. package/dist/chunks/{chunk-HKCIZR5P.js → chunk-TKIWAXRU.js} +10 -10
  111. package/dist/chunks/{chunk-AI6PBE5G.js → chunk-TUF4NNJV.js} +2 -2
  112. package/dist/chunks/{chunk-IJZ7SLBV.js → chunk-U33GIKBK.js} +4 -4
  113. package/dist/chunks/{chunk-LQRP2VRQ.js → chunk-U3EQTU4G.js} +4 -4
  114. package/dist/chunks/{chunk-WQFHJ4TO.js → chunk-U6U472VN.js} +3 -3
  115. package/dist/chunks/chunk-VAP6YMB6.js +362 -0
  116. package/dist/chunks/chunk-VAP6YMB6.js.map +6 -0
  117. package/dist/chunks/{chunk-2U5M5IYH.js → chunk-VGUU6E6X.js} +6 -6
  118. package/dist/chunks/{chunk-BT7ZELXJ.js → chunk-VHFPIYVY.js} +2 -2
  119. package/dist/chunks/{chunk-I5E4MT3C.js → chunk-VY377HAA.js} +4 -4
  120. package/dist/chunks/{chunk-MJBGVVI5.js → chunk-WG32TSVL.js} +3 -3
  121. package/dist/chunks/{chunk-LFPTXRMM.js → chunk-WSIMHBEQ.js} +2 -2
  122. package/dist/chunks/{chunk-YUYNIAJX.js → chunk-X4WCRRZV.js} +6 -6
  123. package/dist/chunks/{chunk-LG27EJU6.js → chunk-X7WLWVR7.js} +2 -2
  124. package/dist/chunks/{chunk-2OVZNENW.js → chunk-XH5YF2YX.js} +2 -2
  125. package/dist/chunks/{chunk-6IDFHPY3.js → chunk-Y2PZNQH5.js} +3 -3
  126. package/dist/chunks/{chunk-UGDZ7MLG.js → chunk-YLNQLDMP.js} +5 -5
  127. package/dist/chunks/{chunk-HRJPVPSU.js → chunk-YOWYTBJS.js} +2 -70
  128. package/dist/chunks/chunk-YOWYTBJS.js.map +6 -0
  129. package/dist/chunks/{cli-runtime-F4MEMBDL.js → cli-runtime-QWBGE2VF.js} +15 -15
  130. package/dist/chunks/{commands-ZCNZVYTG.js → commands-LVUUZ6LF.js} +5 -5
  131. package/dist/chunks/{crash-report-K53VF4H5.js → crash-report-PGXMRS5P.js} +8 -8
  132. package/dist/chunks/{dist-XNGK3C4G.js → dist-6HN2ZMLV.js} +2 -2
  133. package/dist/chunks/{dist-H53G25BE.js → dist-JJANJMY5.js} +162 -13
  134. package/dist/chunks/dist-JJANJMY5.js.map +6 -0
  135. package/dist/chunks/{dist-6IPPA55L.js → dist-JRBSW53E.js} +2 -2
  136. package/dist/chunks/{dist-RIH2Q2ER.js → dist-NSCNMOX7.js} +2 -2
  137. package/dist/chunks/{dist-VSJGDIXP.js → dist-TC6H7TPQ.js} +48 -2
  138. package/dist/chunks/{dist-T6KE7URX.js → dist-V4SNHHMB.js} +2 -2
  139. package/dist/chunks/{dist-L5LBM77I.js → dist-VON3NRHE.js} +35 -6
  140. package/dist/chunks/dist-VON3NRHE.js.map +6 -0
  141. package/dist/chunks/{dist-RTIKLSUV.js → dist-VV3V36IP.js} +2 -2
  142. package/dist/chunks/{doctor-DOCGTBME.js → doctor-P7L35KGN.js} +17 -15
  143. package/dist/chunks/{drain-LT3J2MEA.js → drain-HOHRXIYY.js} +11 -11
  144. package/dist/chunks/{entry-UHKDLPDS.js → entry-L7XZIE7J.js} +13 -12
  145. package/dist/chunks/entry-L7XZIE7J.js.map +6 -0
  146. package/dist/chunks/{eval-DH26W2QK.js → eval-2F473JAC.js} +2 -2
  147. package/dist/chunks/{exec-QGAHWUUQ.js → exec-VCM4AL2S.js} +43 -39
  148. package/dist/chunks/exec-VCM4AL2S.js.map +6 -0
  149. package/dist/chunks/{github-JTMZJAZL.js → github-OFCHQMQQ.js} +2 -2
  150. package/dist/chunks/{home-GGVNSCCU.js → home-R6WCBSOT.js} +3 -3
  151. package/dist/chunks/host-JGPJVLTC.js +28 -0
  152. package/dist/chunks/{host-queries-4EW7M54U.js → host-queries-QWV47CFK.js} +17 -17
  153. package/dist/chunks/{learn-PAO3IOYA.js → learn-3UPHM5OI.js} +14 -14
  154. package/dist/chunks/{learn-builtin-DXZUXOGG.js → learn-builtin-3Q4BJFCF.js} +17 -17
  155. package/dist/chunks/{lifecycle-KDN4D7DP.js → lifecycle-EJLVISCU.js} +33 -30
  156. package/dist/chunks/{list-KSP6S57Z.js → list-DQJBF4AB.js} +13 -13
  157. package/dist/chunks/{live-XWJ2JOFO.js → live-IWDOVSLG.js} +16 -14
  158. package/dist/chunks/login-B2PHE6IL.js +34 -0
  159. package/dist/chunks/{logs-UYB55HOX.js → logs-5UTV3FMG.js} +4 -4
  160. package/dist/chunks/{mcp-JWSI4KA6.js → mcp-JN36OQLX.js} +24 -21
  161. package/dist/chunks/mcp-JN36OQLX.js.map +6 -0
  162. package/dist/chunks/{message-command-YP6TGD3K.js → message-command-RMLQ2PU5.js} +48 -44
  163. package/dist/chunks/message-command-RMLQ2PU5.js.map +6 -0
  164. package/dist/chunks/mouse-WFSJSLQD.js +22 -0
  165. package/dist/chunks/{open-QUDHJK5H.js → open-LDBJL43A.js} +8 -7
  166. package/dist/chunks/{operator-tools-43NL7HKO.js → operator-tools-NA7PLRIP.js} +14 -14
  167. package/dist/chunks/{output-schema-TLW5FA37.js → output-schema-UKYWRZPS.js} +3 -3
  168. package/dist/chunks/{pal-EZE2KLYZ.js → pal-MAVUNYMB.js} +17 -14
  169. package/dist/chunks/pal-MAVUNYMB.js.map +6 -0
  170. package/dist/chunks/{peers-OBENILN2.js → peers-FBTQW2SY.js} +6 -6
  171. package/dist/chunks/{providers-PJIHLTXP.js → providers-M75ET3GT.js} +31 -16
  172. package/dist/chunks/{pty-HDEXCPR6.js → pty-VMUEEJRN.js} +3 -3
  173. package/dist/chunks/{resident-2GHB3BKR.js → resident-URNRPE2S.js} +27 -27
  174. package/dist/chunks/resume-7B3EHDJ7.js +24 -0
  175. package/dist/chunks/{resume-command-VB6VA64L.js → resume-command-5QGHV6WR.js} +4 -4
  176. package/dist/chunks/{schedule-42N4JOQJ.js → schedule-BK3WF2VK.js} +8 -8
  177. package/dist/chunks/{service-6WGZKKI4.js → service-VWASFP3R.js} +31 -28
  178. package/dist/chunks/service-VWASFP3R.js.map +6 -0
  179. package/dist/chunks/{session-step-SBWIM4MZ.js → session-step-DORV5FER.js} +16 -16
  180. package/dist/chunks/{skills-V3VDOL3D.js → skills-TDDPMTQI.js} +9 -9
  181. package/dist/chunks/{spaces-6II4JYTZ.js → spaces-AEOU6MSZ.js} +31 -21
  182. package/dist/chunks/spaces-AEOU6MSZ.js.map +6 -0
  183. package/dist/chunks/{start-check-MRSPS5JT.js → start-check-N4TPV2TM.js} +2 -2
  184. package/dist/chunks/{state-HX3XRNPC.js → state-SHLWYVZU.js} +2 -2
  185. package/dist/chunks/{store-MQXI7G2H.js → store-75YZOOZI.js} +4 -4
  186. package/dist/chunks/{store-IX6KNJA4.js → store-CQVUIU7K.js} +6 -6
  187. package/dist/chunks/{store-FUQE7EWU.js → store-GUSFCKJA.js} +11 -11
  188. package/dist/chunks/{store-7P462EUD.js → store-Z5H6LYVE.js} +3 -3
  189. package/dist/chunks/store-Z5H6LYVE.js.map +6 -0
  190. package/dist/chunks/{tui-PH5B6UCO.js → tui-PGHWYFN4.js} +8263 -7114
  191. package/dist/chunks/tui-PGHWYFN4.js.map +6 -0
  192. package/dist/chunks/{upgrade-HDW5MWLE.js → upgrade-RHPZQ33L.js} +6 -6
  193. package/dist/chunks/{worktree-MLFYZF56.js → worktree-5IYFN33C.js} +13 -13
  194. package/dist/commands/login.d.ts +2 -2
  195. package/dist/commands/login.d.ts.map +1 -1
  196. package/dist/commands/spaces.d.ts +5 -1
  197. package/dist/commands/spaces.d.ts.map +1 -1
  198. package/dist/config/load.d.ts +6 -1
  199. package/dist/config/load.d.ts.map +1 -1
  200. package/dist/config/model-environment.d.ts.map +1 -1
  201. package/dist/config/schema.d.ts +20 -0
  202. package/dist/config/schema.d.ts.map +1 -1
  203. package/dist/context/environment.d.ts.map +1 -1
  204. package/dist/index.js +23 -21
  205. package/dist/integrations/clipboard/copy.d.ts +94 -0
  206. package/dist/integrations/clipboard/copy.d.ts.map +1 -0
  207. package/dist/integrations/clipboard/image-fit.d.ts +91 -0
  208. package/dist/integrations/clipboard/image-fit.d.ts.map +1 -0
  209. package/dist/integrations/clipboard/image-paths.d.ts +56 -0
  210. package/dist/integrations/clipboard/image-paths.d.ts.map +1 -0
  211. package/dist/integrations/clipboard/image.d.ts +80 -15
  212. package/dist/integrations/clipboard/image.d.ts.map +1 -1
  213. package/dist/integrations/clipboard/text-read.d.ts +28 -0
  214. package/dist/integrations/clipboard/text-read.d.ts.map +1 -0
  215. package/dist/integrations/clipboard/text.d.ts +16 -1
  216. package/dist/integrations/clipboard/text.d.ts.map +1 -1
  217. package/dist/integrations/clipboard/wsl.d.ts +38 -0
  218. package/dist/integrations/clipboard/wsl.d.ts.map +1 -0
  219. package/dist/integrations/outstanding/collect.d.ts +51 -0
  220. package/dist/integrations/outstanding/collect.d.ts.map +1 -0
  221. package/dist/integrations/outstanding/facts.d.ts +23 -0
  222. package/dist/integrations/outstanding/facts.d.ts.map +1 -0
  223. package/dist/integrations/outstanding/note.d.ts +26 -0
  224. package/dist/integrations/outstanding/note.d.ts.map +1 -0
  225. package/dist/integrations/outstanding/progress-notices.d.ts +66 -0
  226. package/dist/integrations/outstanding/progress-notices.d.ts.map +1 -0
  227. package/dist/integrations/outstanding/status.d.ts +104 -0
  228. package/dist/integrations/outstanding/status.d.ts.map +1 -0
  229. package/dist/integrations/providers/anthropic-endpoint.d.ts +34 -0
  230. package/dist/integrations/providers/anthropic-endpoint.d.ts.map +1 -0
  231. package/dist/integrations/providers/connections.d.ts +8 -0
  232. package/dist/integrations/providers/connections.d.ts.map +1 -1
  233. package/dist/integrations/providers/credential-store.d.ts +2 -0
  234. package/dist/integrations/providers/credential-store.d.ts.map +1 -1
  235. package/dist/integrations/providers/index.d.ts +3 -1
  236. package/dist/integrations/providers/index.d.ts.map +1 -1
  237. package/dist/integrations/providers/key-migration.d.ts +22 -0
  238. package/dist/integrations/providers/key-migration.d.ts.map +1 -0
  239. package/dist/integrations/providers/model-reasoning.d.ts +1 -1
  240. package/dist/integrations/providers/model-reasoning.d.ts.map +1 -1
  241. package/dist/integrations/providers/registry.d.ts.map +1 -1
  242. package/dist/integrations/resident/runner-worker.js +22 -22
  243. package/dist/integrations/subagents/activity.d.ts +6 -0
  244. package/dist/integrations/subagents/activity.d.ts.map +1 -1
  245. package/dist/integrations/subagents/idle-watch.d.ts +30 -0
  246. package/dist/integrations/subagents/idle-watch.d.ts.map +1 -0
  247. package/dist/integrations/subagents/runtime.d.ts +23 -0
  248. package/dist/integrations/subagents/runtime.d.ts.map +1 -1
  249. package/dist/integrations/subagents/saved-agents.d.ts +3 -1
  250. package/dist/integrations/subagents/saved-agents.d.ts.map +1 -1
  251. package/dist/integrations/subagents/task-observation.d.ts +20 -0
  252. package/dist/integrations/subagents/task-observation.d.ts.map +1 -0
  253. package/dist/integrations/workflows/doctrine.d.ts.map +1 -1
  254. package/dist/integrations/workflows/host.d.ts +8 -1
  255. package/dist/integrations/workflows/host.d.ts.map +1 -1
  256. package/dist/integrations/workflows/notice.d.ts +1 -1
  257. package/dist/integrations/workflows/notice.d.ts.map +1 -1
  258. package/dist/integrations/workflows/offering.d.ts.map +1 -1
  259. package/dist/integrations/workflows/orphans.d.ts +38 -0
  260. package/dist/integrations/workflows/orphans.d.ts.map +1 -0
  261. package/dist/integrations/workflows/registry.d.ts +12 -1
  262. package/dist/integrations/workflows/registry.d.ts.map +1 -1
  263. package/dist/integrations/workflows/resume.d.ts +93 -0
  264. package/dist/integrations/workflows/resume.d.ts.map +1 -0
  265. package/dist/integrations/workflows/view.d.ts +13 -0
  266. package/dist/integrations/workflows/view.d.ts.map +1 -1
  267. package/dist/permissions/image-read.d.ts +20 -0
  268. package/dist/permissions/image-read.d.ts.map +1 -0
  269. package/dist/permissions/path-rules.d.ts.map +1 -1
  270. package/dist/rounds/gates.d.ts +63 -0
  271. package/dist/rounds/gates.d.ts.map +1 -0
  272. package/dist/rounds/goal-admission.d.ts +55 -0
  273. package/dist/rounds/goal-admission.d.ts.map +1 -0
  274. package/dist/rounds/queue.d.ts +39 -0
  275. package/dist/rounds/queue.d.ts.map +1 -0
  276. package/dist/rounds/types.d.ts +105 -0
  277. package/dist/rounds/types.d.ts.map +1 -0
  278. package/dist/rounds/wake-ledger.d.ts +126 -0
  279. package/dist/rounds/wake-ledger.d.ts.map +1 -0
  280. package/dist/spaces/host.d.ts +66 -0
  281. package/dist/spaces/host.d.ts.map +1 -1
  282. package/dist/spaces/mouse.d.ts +34 -0
  283. package/dist/spaces/mouse.d.ts.map +1 -0
  284. package/dist/spaces/selection.d.ts +52 -0
  285. package/dist/spaces/selection.d.ts.map +1 -0
  286. package/dist/terminal/screen.d.ts +14 -0
  287. package/dist/terminal/screen.d.ts.map +1 -1
  288. package/dist/tui/App.d.ts +9 -63
  289. package/dist/tui/App.d.ts.map +1 -1
  290. package/dist/tui/BackgroundJobsPanel.d.ts +9 -7
  291. package/dist/tui/BackgroundJobsPanel.d.ts.map +1 -1
  292. package/dist/tui/Composer.d.ts +8 -1
  293. package/dist/tui/Composer.d.ts.map +1 -1
  294. package/dist/tui/LiveActivity.d.ts.map +1 -1
  295. package/dist/tui/PermissionOverlay.d.ts.map +1 -1
  296. package/dist/tui/Picker.d.ts.map +1 -1
  297. package/dist/tui/StatusBar.d.ts +9 -7
  298. package/dist/tui/StatusBar.d.ts.map +1 -1
  299. package/dist/tui/TaskList.d.ts +15 -2
  300. package/dist/tui/TaskList.d.ts.map +1 -1
  301. package/dist/tui/agent.d.ts +21 -9
  302. package/dist/tui/agent.d.ts.map +1 -1
  303. package/dist/tui/background-view.d.ts +46 -0
  304. package/dist/tui/background-view.d.ts.map +1 -0
  305. package/dist/tui/computer-use-screen-approval.d.ts +10 -0
  306. package/dist/tui/computer-use-screen-approval.d.ts.map +1 -0
  307. package/dist/tui/context-grid.d.ts +2 -0
  308. package/dist/tui/context-grid.d.ts.map +1 -1
  309. package/dist/tui/context-usage.d.ts +4 -0
  310. package/dist/tui/context-usage.d.ts.map +1 -1
  311. package/dist/tui/credential-entry.d.ts +7 -6
  312. package/dist/tui/credential-entry.d.ts.map +1 -1
  313. package/dist/tui/hypermode.d.ts +1 -3
  314. package/dist/tui/hypermode.d.ts.map +1 -1
  315. package/dist/tui/index.d.ts.map +1 -1
  316. package/dist/tui/keymap.d.ts +10 -1
  317. package/dist/tui/keymap.d.ts.map +1 -1
  318. package/dist/tui/login-prompt.d.ts +4 -2
  319. package/dist/tui/login-prompt.d.ts.map +1 -1
  320. package/dist/tui/model-switch.d.ts.map +1 -1
  321. package/dist/tui/permission-review.d.ts +5 -0
  322. package/dist/tui/permission-review.d.ts.map +1 -1
  323. package/dist/tui/slashCommands.d.ts +11 -26
  324. package/dist/tui/slashCommands.d.ts.map +1 -1
  325. package/dist/tui/system-rows.d.ts +0 -6
  326. package/dist/tui/system-rows.d.ts.map +1 -1
  327. package/dist/tui/typed-key-save.d.ts +27 -0
  328. package/dist/tui/typed-key-save.d.ts.map +1 -0
  329. package/dist/tui/zoom/entry.d.ts +3 -0
  330. package/dist/tui/zoom/entry.d.ts.map +1 -1
  331. package/package.json +10 -9
  332. package/dist/chunks/acp-OUBJWH5B.js.map +0 -6
  333. package/dist/chunks/add-PSEIDDRW.js.map +0 -6
  334. package/dist/chunks/agent-session-EZB2OYG3.js +0 -65
  335. package/dist/chunks/chunk-26C37THH.js.map +0 -6
  336. package/dist/chunks/chunk-2Y26DLOF.js.map +0 -6
  337. package/dist/chunks/chunk-3NJPNX6V.js.map +0 -6
  338. package/dist/chunks/chunk-6EJFXJDO.js.map +0 -6
  339. package/dist/chunks/chunk-6LLJQ3KY.js.map +0 -6
  340. package/dist/chunks/chunk-7QQOUCGI.js.map +0 -6
  341. package/dist/chunks/chunk-FHQTXWDA.js.map +0 -6
  342. package/dist/chunks/chunk-G73G2WGR.js.map +0 -6
  343. package/dist/chunks/chunk-HRJPVPSU.js.map +0 -6
  344. package/dist/chunks/chunk-ITA57VY5.js.map +0 -6
  345. package/dist/chunks/chunk-LKJBDF7W.js.map +0 -6
  346. package/dist/chunks/chunk-LKODRKMZ.js +0 -575
  347. package/dist/chunks/chunk-LKODRKMZ.js.map +0 -6
  348. package/dist/chunks/chunk-M2OZ4SVS.js.map +0 -6
  349. package/dist/chunks/chunk-PIVHVYCN.js.map +0 -6
  350. package/dist/chunks/chunk-SJFPZPOJ.js.map +0 -6
  351. package/dist/chunks/chunk-TZZOQ62Z.js.map +0 -6
  352. package/dist/chunks/chunk-YTE3QIH3.js.map +0 -6
  353. package/dist/chunks/dist-H53G25BE.js.map +0 -6
  354. package/dist/chunks/dist-L5LBM77I.js.map +0 -6
  355. package/dist/chunks/entry-UHKDLPDS.js.map +0 -6
  356. package/dist/chunks/exec-QGAHWUUQ.js.map +0 -6
  357. package/dist/chunks/host-6CUYPX4T.js +0 -23
  358. package/dist/chunks/login-3Q2HKQUW.js +0 -31
  359. package/dist/chunks/mcp-JWSI4KA6.js.map +0 -6
  360. package/dist/chunks/message-command-YP6TGD3K.js.map +0 -6
  361. package/dist/chunks/pal-EZE2KLYZ.js.map +0 -6
  362. package/dist/chunks/resume-FHPY2RU3.js +0 -24
  363. package/dist/chunks/service-6WGZKKI4.js.map +0 -6
  364. package/dist/chunks/spaces-6II4JYTZ.js.map +0 -6
  365. package/dist/chunks/tui-PH5B6UCO.js.map +0 -6
  366. package/dist/integrations/subagents/batches.d.ts +0 -91
  367. package/dist/integrations/subagents/batches.d.ts.map +0 -1
  368. package/dist/integrations/subagents/slash.d.ts +0 -55
  369. package/dist/integrations/subagents/slash.d.ts.map +0 -1
  370. /package/dist/chunks/{activity-command-R7MUSZIY.js.map → activity-command-DB4DREW7.js.map} +0 -0
  371. /package/dist/chunks/{agent-YPEXUYPH.js.map → agent-6TD66IMV.js.map} +0 -0
  372. /package/dist/chunks/{agent-session-EZB2OYG3.js.map → agent-session-3A5K5VK3.js.map} +0 -0
  373. /package/dist/chunks/{archive-ET4PXE34.js.map → archive-A3X7KX2U.js.map} +0 -0
  374. /package/dist/chunks/{bin-main-PMB57AZJ.js.map → bin-main-5PYV7WYI.js.map} +0 -0
  375. /package/dist/chunks/{binding-K6RIQ5AP.js.map → binding-EMMG5PAE.js.map} +0 -0
  376. /package/dist/chunks/{browser-SKTIAVBF.js.map → browser-FUFFJBRR.js.map} +0 -0
  377. /package/dist/chunks/{chat-AVIVXXMD.js.map → chat-M653DEAF.js.map} +0 -0
  378. /package/dist/chunks/{chunk-YXIG4OT2.js.map → chunk-24FBGXYR.js.map} +0 -0
  379. /package/dist/chunks/{chunk-XX2SP5AM.js.map → chunk-2OAD3CZE.js.map} +0 -0
  380. /package/dist/chunks/{chunk-7FPKSX4M.js.map → chunk-2YCPLLUW.js.map} +0 -0
  381. /package/dist/chunks/{chunk-LF76CVOZ.js.map → chunk-325X27UO.js.map} +0 -0
  382. /package/dist/chunks/{chunk-GBS6ATYF.js.map → chunk-43HR3AF5.js.map} +0 -0
  383. /package/dist/chunks/{chunk-B3XIVOLM.js.map → chunk-43PTHA5N.js.map} +0 -0
  384. /package/dist/chunks/{chunk-RSIWTHYS.js.map → chunk-46OOPRR6.js.map} +0 -0
  385. /package/dist/chunks/{chunk-U4SST7AD.js.map → chunk-4DVCHAWN.js.map} +0 -0
  386. /package/dist/chunks/{chunk-HELINLSD.js.map → chunk-6ZEHXLF7.js.map} +0 -0
  387. /package/dist/chunks/{chunk-MGZSEPDY.js.map → chunk-7TBETDTX.js.map} +0 -0
  388. /package/dist/chunks/{chunk-L2NNJ4XL.js.map → chunk-ADCVLGQO.js.map} +0 -0
  389. /package/dist/chunks/{chunk-IZVN6K6U.js.map → chunk-ANHFJD66.js.map} +0 -0
  390. /package/dist/chunks/{chunk-LYGD5P7O.js.map → chunk-B6INWHLR.js.map} +0 -0
  391. /package/dist/chunks/{chunk-4OXIJ2EF.js.map → chunk-BICC735N.js.map} +0 -0
  392. /package/dist/chunks/{chunk-6FWFSPUL.js.map → chunk-BOM64EUQ.js.map} +0 -0
  393. /package/dist/chunks/{chunk-WYJ3CNXX.js.map → chunk-C4MAQ64X.js.map} +0 -0
  394. /package/dist/chunks/{chunk-2EHPXO4E.js.map → chunk-D23EJNO5.js.map} +0 -0
  395. /package/dist/chunks/{chunk-G5RAECIB.js.map → chunk-E2MNVA3X.js.map} +0 -0
  396. /package/dist/chunks/{chunk-3QGJXD7U.js.map → chunk-E3FA5H3Q.js.map} +0 -0
  397. /package/dist/chunks/{chunk-YJ6NWB2B.js.map → chunk-EFU2OFEK.js.map} +0 -0
  398. /package/dist/chunks/{chunk-QWSZ5P4C.js.map → chunk-FZR4XULA.js.map} +0 -0
  399. /package/dist/chunks/{chunk-WKPRYH24.js.map → chunk-GAEZQRQI.js.map} +0 -0
  400. /package/dist/chunks/{chunk-S4QOQGAT.js.map → chunk-GCFXQSN6.js.map} +0 -0
  401. /package/dist/chunks/{chunk-XPS3W7FC.js.map → chunk-GMUWAUKQ.js.map} +0 -0
  402. /package/dist/chunks/{chunk-VDKDXDOH.js.map → chunk-H6AUN2YD.js.map} +0 -0
  403. /package/dist/chunks/{chunk-7TEXDZVO.js.map → chunk-HFD2VRQP.js.map} +0 -0
  404. /package/dist/chunks/{chunk-WKFHQQOU.js.map → chunk-HH3NBBBE.js.map} +0 -0
  405. /package/dist/chunks/{chunk-A5GTZ7R2.js.map → chunk-HV2JFRSE.js.map} +0 -0
  406. /package/dist/chunks/{chunk-BGKQCLLH.js.map → chunk-IRUDNBAR.js.map} +0 -0
  407. /package/dist/chunks/{chunk-PMX2WTZL.js.map → chunk-J2FGTLZV.js.map} +0 -0
  408. /package/dist/chunks/{chunk-YDSWGJWF.js.map → chunk-JAB62RI5.js.map} +0 -0
  409. /package/dist/chunks/{chunk-AX5ESG6K.js.map → chunk-JKPUOSDC.js.map} +0 -0
  410. /package/dist/chunks/{chunk-DFCJYRT5.js.map → chunk-K5FQ4G64.js.map} +0 -0
  411. /package/dist/chunks/{chunk-HB5ZN5KQ.js.map → chunk-KVCYYXCS.js.map} +0 -0
  412. /package/dist/chunks/{chunk-2X6JZAKH.js.map → chunk-KZ5WYSA6.js.map} +0 -0
  413. /package/dist/chunks/{chunk-JL64XHSL.js.map → chunk-L6QJZZCJ.js.map} +0 -0
  414. /package/dist/chunks/{chunk-GCCFTP47.js.map → chunk-LHZSSQ6K.js.map} +0 -0
  415. /package/dist/chunks/{chunk-VFVWHYHT.js.map → chunk-LR4QQMJH.js.map} +0 -0
  416. /package/dist/chunks/{chunk-DQLSLXDF.js.map → chunk-MKRYUMLP.js.map} +0 -0
  417. /package/dist/chunks/{chunk-VZ4PKWLF.js.map → chunk-NUNOIP4Y.js.map} +0 -0
  418. /package/dist/chunks/{chunk-SGRO4RJP.js.map → chunk-NXX6C3WS.js.map} +0 -0
  419. /package/dist/chunks/{chunk-XPLHAOGE.js.map → chunk-OENL667J.js.map} +0 -0
  420. /package/dist/chunks/{chunk-2NI5NS5S.js.map → chunk-OMRU22BQ.js.map} +0 -0
  421. /package/dist/chunks/{chunk-GANFMGV7.js.map → chunk-P6FEQPES.js.map} +0 -0
  422. /package/dist/chunks/{chunk-ACSG5R5P.js.map → chunk-P6RUYL3F.js.map} +0 -0
  423. /package/dist/chunks/{chunk-MYL75RA4.js.map → chunk-S2UDKXWH.js.map} +0 -0
  424. /package/dist/chunks/{chunk-435DYOG4.js.map → chunk-TFOIA3U3.js.map} +0 -0
  425. /package/dist/chunks/{chunk-HTBMDD6Y.js.map → chunk-THJQXERD.js.map} +0 -0
  426. /package/dist/chunks/{chunk-DECJPLLA.js.map → chunk-THQAGFMO.js.map} +0 -0
  427. /package/dist/chunks/{chunk-GNEDN6MU.js.map → chunk-THUX2WOG.js.map} +0 -0
  428. /package/dist/chunks/{chunk-HKCIZR5P.js.map → chunk-TKIWAXRU.js.map} +0 -0
  429. /package/dist/chunks/{chunk-AI6PBE5G.js.map → chunk-TUF4NNJV.js.map} +0 -0
  430. /package/dist/chunks/{chunk-IJZ7SLBV.js.map → chunk-U33GIKBK.js.map} +0 -0
  431. /package/dist/chunks/{chunk-LQRP2VRQ.js.map → chunk-U3EQTU4G.js.map} +0 -0
  432. /package/dist/chunks/{chunk-WQFHJ4TO.js.map → chunk-U6U472VN.js.map} +0 -0
  433. /package/dist/chunks/{chunk-2U5M5IYH.js.map → chunk-VGUU6E6X.js.map} +0 -0
  434. /package/dist/chunks/{chunk-BT7ZELXJ.js.map → chunk-VHFPIYVY.js.map} +0 -0
  435. /package/dist/chunks/{chunk-I5E4MT3C.js.map → chunk-VY377HAA.js.map} +0 -0
  436. /package/dist/chunks/{chunk-MJBGVVI5.js.map → chunk-WG32TSVL.js.map} +0 -0
  437. /package/dist/chunks/{chunk-LFPTXRMM.js.map → chunk-WSIMHBEQ.js.map} +0 -0
  438. /package/dist/chunks/{chunk-YUYNIAJX.js.map → chunk-X4WCRRZV.js.map} +0 -0
  439. /package/dist/chunks/{chunk-LG27EJU6.js.map → chunk-X7WLWVR7.js.map} +0 -0
  440. /package/dist/chunks/{chunk-2OVZNENW.js.map → chunk-XH5YF2YX.js.map} +0 -0
  441. /package/dist/chunks/{chunk-6IDFHPY3.js.map → chunk-Y2PZNQH5.js.map} +0 -0
  442. /package/dist/chunks/{chunk-UGDZ7MLG.js.map → chunk-YLNQLDMP.js.map} +0 -0
  443. /package/dist/chunks/{cli-runtime-F4MEMBDL.js.map → cli-runtime-QWBGE2VF.js.map} +0 -0
  444. /package/dist/chunks/{commands-ZCNZVYTG.js.map → commands-LVUUZ6LF.js.map} +0 -0
  445. /package/dist/chunks/{crash-report-K53VF4H5.js.map → crash-report-PGXMRS5P.js.map} +0 -0
  446. /package/dist/chunks/{dist-XNGK3C4G.js.map → dist-6HN2ZMLV.js.map} +0 -0
  447. /package/dist/chunks/{dist-6IPPA55L.js.map → dist-JRBSW53E.js.map} +0 -0
  448. /package/dist/chunks/{dist-RIH2Q2ER.js.map → dist-NSCNMOX7.js.map} +0 -0
  449. /package/dist/chunks/{dist-VSJGDIXP.js.map → dist-TC6H7TPQ.js.map} +0 -0
  450. /package/dist/chunks/{dist-T6KE7URX.js.map → dist-V4SNHHMB.js.map} +0 -0
  451. /package/dist/chunks/{dist-RTIKLSUV.js.map → dist-VV3V36IP.js.map} +0 -0
  452. /package/dist/chunks/{doctor-DOCGTBME.js.map → doctor-P7L35KGN.js.map} +0 -0
  453. /package/dist/chunks/{drain-LT3J2MEA.js.map → drain-HOHRXIYY.js.map} +0 -0
  454. /package/dist/chunks/{eval-DH26W2QK.js.map → eval-2F473JAC.js.map} +0 -0
  455. /package/dist/chunks/{github-JTMZJAZL.js.map → github-OFCHQMQQ.js.map} +0 -0
  456. /package/dist/chunks/{home-GGVNSCCU.js.map → home-R6WCBSOT.js.map} +0 -0
  457. /package/dist/chunks/{host-6CUYPX4T.js.map → host-JGPJVLTC.js.map} +0 -0
  458. /package/dist/chunks/{host-queries-4EW7M54U.js.map → host-queries-QWV47CFK.js.map} +0 -0
  459. /package/dist/chunks/{learn-PAO3IOYA.js.map → learn-3UPHM5OI.js.map} +0 -0
  460. /package/dist/chunks/{learn-builtin-DXZUXOGG.js.map → learn-builtin-3Q4BJFCF.js.map} +0 -0
  461. /package/dist/chunks/{lifecycle-KDN4D7DP.js.map → lifecycle-EJLVISCU.js.map} +0 -0
  462. /package/dist/chunks/{list-KSP6S57Z.js.map → list-DQJBF4AB.js.map} +0 -0
  463. /package/dist/chunks/{live-XWJ2JOFO.js.map → live-IWDOVSLG.js.map} +0 -0
  464. /package/dist/chunks/{login-3Q2HKQUW.js.map → login-B2PHE6IL.js.map} +0 -0
  465. /package/dist/chunks/{logs-UYB55HOX.js.map → logs-5UTV3FMG.js.map} +0 -0
  466. /package/dist/chunks/{open-QUDHJK5H.js.map → mouse-WFSJSLQD.js.map} +0 -0
  467. /package/dist/chunks/{output-schema-TLW5FA37.js.map → open-LDBJL43A.js.map} +0 -0
  468. /package/dist/chunks/{operator-tools-43NL7HKO.js.map → operator-tools-NA7PLRIP.js.map} +0 -0
  469. /package/dist/chunks/{peers-OBENILN2.js.map → output-schema-UKYWRZPS.js.map} +0 -0
  470. /package/dist/chunks/{providers-PJIHLTXP.js.map → peers-FBTQW2SY.js.map} +0 -0
  471. /package/dist/chunks/{pty-HDEXCPR6.js.map → providers-M75ET3GT.js.map} +0 -0
  472. /package/dist/chunks/{resume-FHPY2RU3.js.map → pty-VMUEEJRN.js.map} +0 -0
  473. /package/dist/chunks/{resident-2GHB3BKR.js.map → resident-URNRPE2S.js.map} +0 -0
  474. /package/dist/chunks/{resume-command-VB6VA64L.js.map → resume-7B3EHDJ7.js.map} +0 -0
  475. /package/dist/chunks/{session-step-SBWIM4MZ.js.map → resume-command-5QGHV6WR.js.map} +0 -0
  476. /package/dist/chunks/{schedule-42N4JOQJ.js.map → schedule-BK3WF2VK.js.map} +0 -0
  477. /package/dist/chunks/{start-check-MRSPS5JT.js.map → session-step-DORV5FER.js.map} +0 -0
  478. /package/dist/chunks/{skills-V3VDOL3D.js.map → skills-TDDPMTQI.js.map} +0 -0
  479. /package/dist/chunks/{store-7P462EUD.js.map → start-check-N4TPV2TM.js.map} +0 -0
  480. /package/dist/chunks/{state-HX3XRNPC.js.map → state-SHLWYVZU.js.map} +0 -0
  481. /package/dist/chunks/{store-FUQE7EWU.js.map → store-75YZOOZI.js.map} +0 -0
  482. /package/dist/chunks/{store-IX6KNJA4.js.map → store-CQVUIU7K.js.map} +0 -0
  483. /package/dist/chunks/{store-MQXI7G2H.js.map → store-GUSFCKJA.js.map} +0 -0
  484. /package/dist/chunks/{upgrade-HDW5MWLE.js.map → upgrade-RHPZQ33L.js.map} +0 -0
  485. /package/dist/chunks/{worktree-MLFYZF56.js.map → worktree-5IYFN33C.js.map} +0 -0
@@ -1,9 +1,18 @@
1
1
  import { createRequire as __namzuCreateRequire } from 'node:module';
2
2
  const require = __namzuCreateRequire(import.meta.url);
3
3
  import {
4
+ MAX_CLIPBOARD_TEXT_BYTES,
4
5
  SignalFilter,
5
- formatResetTime
6
- } from "./chunk-HRJPVPSU.js";
6
+ bypassKey,
7
+ createClipboardCopier,
8
+ describeCopy
9
+ } from "./chunk-6PDIDZGX.js";
10
+ import {
11
+ LEAVE_SCREEN,
12
+ LEAVE_TO_NATIVE,
13
+ enterScreen,
14
+ mouseOn
15
+ } from "./chunk-L2WEBN6A.js";
7
16
  import {
8
17
  advertisesTruecolor,
9
18
  paletteFor
@@ -11,10 +20,10 @@ import {
11
20
  import {
12
21
  recordForPid,
13
22
  recordForSlot
14
- } from "./chunk-7FPKSX4M.js";
23
+ } from "./chunk-2YCPLLUW.js";
15
24
  import {
16
25
  HeadlessScreen
17
- } from "./chunk-KLKAK2O5.js";
26
+ } from "./chunk-GWGIAZLZ.js";
18
27
  import {
19
28
  ATTR_BOLD,
20
29
  ATTR_DIM,
@@ -25,9 +34,12 @@ import {
25
34
  sameCell,
26
35
  sgr
27
36
  } from "./chunk-6HTC5TQ3.js";
37
+ import {
38
+ formatResetTime
39
+ } from "./chunk-YOWYTBJS.js";
28
40
  import {
29
41
  killProcessTree
30
- } from "./chunk-LG27EJU6.js";
42
+ } from "./chunk-X7WLWVR7.js";
31
43
  import {
32
44
  stringWidth
33
45
  } from "./chunk-U5UV2YRE.js";
@@ -37,7 +49,7 @@ import {
37
49
 
38
50
  // src/spaces/host.ts
39
51
  import { randomUUID } from "node:crypto";
40
- import { existsSync, statSync } from "node:fs";
52
+ import { existsSync, statSync, writeSync } from "node:fs";
41
53
  import { homedir } from "node:os";
42
54
  import { basename, isAbsolute, join, resolve } from "node:path";
43
55
 
@@ -1347,6 +1359,111 @@ var Roster = class {
1347
1359
  }
1348
1360
  };
1349
1361
 
1362
+ // src/spaces/selection.ts
1363
+ function orderRange(a, b) {
1364
+ const forward = a.line < b.line || a.line === b.line && a.col <= b.col;
1365
+ return forward ? { start: a, end: b } : { start: b, end: a };
1366
+ }
1367
+ __name(orderRange, "orderRange");
1368
+ function colsOnLine(range, line, cols) {
1369
+ if (line < range.start.line || line > range.end.line) return void 0;
1370
+ const from = line === range.start.line ? range.start.col : 0;
1371
+ const to = line === range.end.line ? range.end.col + 1 : cols;
1372
+ return to > from ? [from, Math.min(to, cols)] : void 0;
1373
+ }
1374
+ __name(colsOnLine, "colsOnLine");
1375
+ function extractText(source, raw) {
1376
+ const range = snapRange(source, raw);
1377
+ let out = "";
1378
+ for (let line = range.start.line; line <= range.end.line; line++) {
1379
+ const cols = colsOnLine(range, line, source.cols);
1380
+ if (!cols) {
1381
+ if (line < range.end.line) out += "\n";
1382
+ continue;
1383
+ }
1384
+ const last = line === range.end.line;
1385
+ const joins = !last && source.lineWrapped(line + 1) && cols[1] >= source.cols;
1386
+ const text = source.lineText(line, cols[0], cols[1], !joins);
1387
+ out += joins ? text : text.replace(/[ \t]+$/u, "");
1388
+ if (!last && !joins) out += "\n";
1389
+ }
1390
+ return out;
1391
+ }
1392
+ __name(extractText, "extractText");
1393
+ function cellStart(source, line, col) {
1394
+ let c = Math.max(0, Math.min(col, source.cols - 1));
1395
+ while (c > 0 && source.cellWidth(line, c) === 0) c--;
1396
+ return c;
1397
+ }
1398
+ __name(cellStart, "cellStart");
1399
+ function cellEnd(source, line, col) {
1400
+ const start = cellStart(source, line, col);
1401
+ return Math.min(source.cols - 1, start + Math.max(1, source.cellWidth(line, start)) - 1);
1402
+ }
1403
+ __name(cellEnd, "cellEnd");
1404
+ function snapRange(source, range) {
1405
+ const { start, end } = range;
1406
+ return {
1407
+ start: { line: start.line, col: cellStart(source, start.line, start.col) },
1408
+ end: { line: end.line, col: cellEnd(source, end.line, end.col) }
1409
+ };
1410
+ }
1411
+ __name(snapRange, "snapRange");
1412
+ var WORD_BREAK = /[\s"'`()[\]{}<>,;|]/u;
1413
+ function wordAt(source, line, col) {
1414
+ const breaks = /* @__PURE__ */ __name((c) => {
1415
+ const s = cellStart(source, line, c);
1416
+ const ch = source.lineText(line, s, s + 1, false);
1417
+ return ch === "" || WORD_BREAK.test(ch);
1418
+ }, "breaks");
1419
+ const last = source.cols - 1;
1420
+ const at = cellStart(source, line, col);
1421
+ if (last < 0 || breaks(at)) {
1422
+ return { start: { line, col: at }, end: { line, col: cellEnd(source, line, at) } };
1423
+ }
1424
+ let start = at;
1425
+ let end = cellEnd(source, line, at);
1426
+ while (start > 0 && !breaks(start - 1)) start = cellStart(source, line, start - 1);
1427
+ while (end < last && !breaks(end + 1)) end = cellEnd(source, line, end + 1);
1428
+ return { start: { line, col: start }, end: { line, col: end } };
1429
+ }
1430
+ __name(wordAt, "wordAt");
1431
+ function lineAt(source, line) {
1432
+ let first = line;
1433
+ while (first > 0 && source.lineWrapped(first)) first--;
1434
+ let last = line;
1435
+ while (last + 1 < source.bufferLength() && source.lineWrapped(last + 1)) last++;
1436
+ let end = -1;
1437
+ for (let c = source.cols - 1; c >= 0; c--) {
1438
+ if (source.cellWidth(last, c) === 0) continue;
1439
+ if (source.lineText(last, c, c + 1, false).trim() !== "") {
1440
+ end = cellEnd(source, last, c);
1441
+ break;
1442
+ }
1443
+ }
1444
+ return { start: { line: first, col: 0 }, end: { line: last, col: Math.max(0, end) } };
1445
+ }
1446
+ __name(lineAt, "lineAt");
1447
+ var ClickCounter = class {
1448
+ constructor(now, windowMs) {
1449
+ this.now = now;
1450
+ this.windowMs = windowMs;
1451
+ }
1452
+ now;
1453
+ windowMs;
1454
+ static {
1455
+ __name(this, "ClickCounter");
1456
+ }
1457
+ last;
1458
+ press(x, y) {
1459
+ const at = this.now();
1460
+ const last = this.last;
1461
+ const count = last && last.x === x && last.y === y && at - last.at <= this.windowMs ? last.count === 1 ? 2 : last.count === 2 ? 3 : 1 : 1;
1462
+ this.last = { x, y, at, count };
1463
+ return count;
1464
+ }
1465
+ };
1466
+
1350
1467
  // src/spaces/session.ts
1351
1468
  var SCROLLBACK = 2e3;
1352
1469
  var ChildSession = class {
@@ -1889,6 +2006,14 @@ function tabBarTarget(bar, x, y) {
1889
2006
  __name(tabBarTarget, "tabBarTarget");
1890
2007
 
1891
2008
  // src/spaces/host.ts
2009
+ var ENDING_SIGNALS = ["SIGINT", "SIGTERM", "SIGHUP"];
2010
+ var realSignalHooks = {
2011
+ on: /* @__PURE__ */ __name((signal, listener) => void process.on(signal, listener), "on"),
2012
+ off: /* @__PURE__ */ __name((signal, listener) => void process.off(signal, listener), "off"),
2013
+ count: /* @__PURE__ */ __name((signal) => process.listenerCount(signal), "count"),
2014
+ raise: /* @__PURE__ */ __name((signal) => void process.kill(process.pid, signal), "raise"),
2015
+ writeNow: /* @__PURE__ */ __name((text) => void writeSync(1, text), "writeNow")
2016
+ };
1892
2017
  var realSchedule = /* @__PURE__ */ __name((run2, ms) => {
1893
2018
  const timer = setTimeout(run2, ms);
1894
2019
  return () => clearTimeout(timer);
@@ -1901,11 +2026,11 @@ var QUIT_GRACE_MS = 3e3;
1901
2026
  var GIT_MS = 5e3;
1902
2027
  var GIT_STALE_MS = 1500;
1903
2028
  var DOUBLE_CLICK_MS = 400;
2029
+ var FORWARD_MS = 250;
2030
+ var COPY_NOTE_MS = 2e3;
2031
+ var COPY_ERROR_MS = 4e3;
1904
2032
  var WHEEL_ROWS = 3;
1905
- var ENTER_SCREEN = "\x1B[?1049h\x1B[2J\x1B[?1000h\x1B[?1002h\x1B[?1006h";
1906
2033
  var MAX_PAINT_FAILURES = 3;
1907
- var LEAVE_TO_NATIVE = "\x1B[?1006l\x1B[?1002l\x1B[?1000l\x1B[?1049l";
1908
- var LEAVE_SCREEN = "\x1B[?1006l\x1B[?1002l\x1B[?1000l\x1B[?2004l\x1B[?25h\x1B[?1049l";
1909
2034
  var MENU_ITEMS = ["accounts", "add account", "sidebar", "keybinds", "quit"];
1910
2035
  var CONTEXT_ITEMS = {
1911
2036
  space: ["Rename", "New tab", "Close"],
@@ -1925,6 +2050,7 @@ var SpacesHost = class {
1925
2050
  this.options = options;
1926
2051
  this.router = new InputRouter(options.prefix);
1927
2052
  this.schedule = options.schedule ?? realSchedule;
2053
+ this.clicks = new ClickCounter(options.now ?? Date.now, DOUBLE_CLICK_MS);
1928
2054
  this.palette = paletteFor(options.truecolor ?? advertisesTruecolor(process.env));
1929
2055
  this.git = new GitCache(
1930
2056
  options.git ?? gitLookup,
@@ -1969,6 +2095,14 @@ var SpacesHost = class {
1969
2095
  cancelSave;
1970
2096
  forgetAll = false;
1971
2097
  notice;
2098
+ /** The text being selected in a pane, if any. */
2099
+ select;
2100
+ clicks;
2101
+ tipShown = false;
2102
+ cancelNote;
2103
+ watched = /* @__PURE__ */ new WeakSet();
2104
+ lastForward = /* @__PURE__ */ new WeakMap();
2105
+ pendingForward = /* @__PURE__ */ new Map();
1972
2106
  pasteOn = false;
1973
2107
  pending;
1974
2108
  rendering = Promise.resolve();
@@ -2000,7 +2134,41 @@ var SpacesHost = class {
2000
2134
  this.finish = resolve2;
2001
2135
  });
2002
2136
  onData = /* @__PURE__ */ __name((chunk) => this.handleInput(typeof chunk === "string" ? chunk : chunk.toString("utf8")), "onData");
2003
- onResize = /* @__PURE__ */ __name(() => this.relayout(), "onResize");
2137
+ onResize = /* @__PURE__ */ __name(() => {
2138
+ if (!this.hidden && !this.closed) this.options.output.write(mouseOn(this.mouseMode));
2139
+ this.relayout();
2140
+ }, "onResize");
2141
+ signalListeners = /* @__PURE__ */ new Map();
2142
+ /** A signal is ending the process: give the terminal back now, before the default action kills us. */
2143
+ signalled(signal) {
2144
+ const hooks = this.options.signals ?? realSignalHooks;
2145
+ if (!this.hidden && !this.closed) {
2146
+ try {
2147
+ hooks.writeNow(LEAVE_SCREEN);
2148
+ } catch {
2149
+ }
2150
+ this.hidden = true;
2151
+ }
2152
+ this.releaseSignals();
2153
+ if (hooks.count(signal) === 0) hooks.raise(signal);
2154
+ else this.quit();
2155
+ }
2156
+ armSignals() {
2157
+ const hooks = this.options.signals ?? realSignalHooks;
2158
+ for (const signal of ENDING_SIGNALS) {
2159
+ const listener = /* @__PURE__ */ __name(() => this.signalled(signal), "listener");
2160
+ this.signalListeners.set(signal, listener);
2161
+ hooks.on(signal, listener);
2162
+ }
2163
+ }
2164
+ releaseSignals() {
2165
+ const hooks = this.options.signals ?? realSignalHooks;
2166
+ for (const [signal, listener] of this.signalListeners) hooks.off(signal, listener);
2167
+ this.signalListeners.clear();
2168
+ }
2169
+ get mouseMode() {
2170
+ return this.options.mouse ?? "full";
2171
+ }
2004
2172
  /** If the process ends without a clean close, still hand the terminal back and stop the sessions. */
2005
2173
  onProcessExit = /* @__PURE__ */ __name(() => {
2006
2174
  if (this.closed) return;
@@ -2023,13 +2191,14 @@ var SpacesHost = class {
2023
2191
  }, "onProcessExit");
2024
2192
  start() {
2025
2193
  const { input, output, local } = this.options;
2026
- if (!local) output.write(ENTER_SCREEN);
2194
+ if (!local) output.write(enterScreen(this.mouseMode));
2027
2195
  input.setEncoding?.("utf8");
2028
2196
  input.setRawMode?.(true);
2029
2197
  input.resume?.();
2030
2198
  input.on("data", this.onData);
2031
2199
  output.on("resize", this.onResize);
2032
2200
  process.once("exit", this.onProcessExit);
2201
+ this.armSignals();
2033
2202
  if (local) this.seedLocal(local);
2034
2203
  else this.open(this.options.restored ? this.restore(this.options.restored) : this.fresh());
2035
2204
  this.armPoll();
@@ -2054,6 +2223,7 @@ var SpacesHost = class {
2054
2223
  entry = this.newTabIn(space);
2055
2224
  }
2056
2225
  entry.child = local.session;
2226
+ this.watchClipboard(local.session.screen);
2057
2227
  entry.resume = void 0;
2058
2228
  entry.first = false;
2059
2229
  entry.verifyFolder = false;
@@ -2078,7 +2248,7 @@ var SpacesHost = class {
2078
2248
  if (this.closed || !entry) return;
2079
2249
  if (this.hidden) {
2080
2250
  this.hidden = false;
2081
- this.options.output.write(ENTER_SCREEN);
2251
+ this.options.output.write(enterScreen(this.mouseMode));
2082
2252
  this.pasteOn = false;
2083
2253
  this.writer.invalidate();
2084
2254
  }
@@ -2088,6 +2258,7 @@ var SpacesHost = class {
2088
2258
  this.fit();
2089
2259
  const size = this.paneSize(entry);
2090
2260
  this.options.local?.session.attach(size.cols, size.rows);
2261
+ if (this.options.local) this.watchClipboard(this.options.local.session.screen);
2091
2262
  this.startShown();
2092
2263
  this.router.enterNavigate();
2093
2264
  this.persist();
@@ -2119,6 +2290,25 @@ var SpacesHost = class {
2119
2290
  this.openNative();
2120
2291
  return true;
2121
2292
  }
2293
+ /**
2294
+ * Runs `run` with the terminal handed back to the real shell (an editor, a pager): the pointer is
2295
+ * switched off and the main screen returns first, and the spaces screen is entered again afterwards
2296
+ * even if `run` throws. Nothing happens around `run` when the spaces screen is not on the terminal.
2297
+ */
2298
+ async withTerminalHandoff(run2) {
2299
+ if (this.closed || this.hidden) return await run2();
2300
+ this.options.output.write(LEAVE_TO_NATIVE);
2301
+ this.pasteOn = false;
2302
+ try {
2303
+ return await run2();
2304
+ } finally {
2305
+ if (!this.closed && !this.hidden) {
2306
+ this.options.output.write(enterScreen(this.mouseMode));
2307
+ this.writer.invalidate();
2308
+ this.requestRender();
2309
+ }
2310
+ }
2311
+ }
2122
2312
  /** Moves the keyboard from a pane to the sidebar of the spaces screen. */
2123
2313
  focusSidebar() {
2124
2314
  if (this.closed || this.hidden || this.view === "full") return;
@@ -2328,6 +2518,7 @@ var SpacesHost = class {
2328
2518
  (signal) => this.childSignal(entry, signal)
2329
2519
  );
2330
2520
  entry.child = child;
2521
+ this.watchClipboard(child.screen);
2331
2522
  child.start(this.options.binding);
2332
2523
  this.roster.update(entry);
2333
2524
  }
@@ -2471,6 +2662,7 @@ var SpacesHost = class {
2471
2662
  /** Called with what the keyboard sent. */
2472
2663
  handleInput(chunk) {
2473
2664
  if (this.closed || this.hidden) return;
2665
+ if (this.selectionKey(chunk)) return;
2474
2666
  for (const action of this.router.feed(chunk)) {
2475
2667
  if (action.type === "write") this.writeToSelected(action.data);
2476
2668
  else if (action.type === "mode") {
@@ -2490,6 +2682,7 @@ var SpacesHost = class {
2490
2682
  if (!entry) return;
2491
2683
  this.ensureStarted(entry);
2492
2684
  entry.scrollBack = 0;
2685
+ if (this.select?.entry === entry) this.clearSelect();
2493
2686
  entry.child?.write(data);
2494
2687
  }
2495
2688
  /** A key the host reads: an answer, a name being typed, a mode's key, or the key after the prefix. */
@@ -3145,7 +3338,17 @@ var SpacesHost = class {
3145
3338
  }
3146
3339
  // --- mouse -----------------------------------------------------------------
3147
3340
  mouse(event) {
3148
- if (event.kind === "release") this.endDrags();
3341
+ if (this.mouseMode === "scroll" && event.kind !== "wheel-up" && event.kind !== "wheel-down")
3342
+ return;
3343
+ if (event.kind === "press") this.clearSelect();
3344
+ if (event.kind === "drag" && this.select?.pressing) {
3345
+ this.dragSelect(event);
3346
+ return;
3347
+ }
3348
+ if (event.kind === "release") {
3349
+ this.finishSelect();
3350
+ this.endDrags();
3351
+ }
3149
3352
  if (this.captured()) {
3150
3353
  this.overlayMouse(event);
3151
3354
  return;
@@ -3153,6 +3356,8 @@ var SpacesHost = class {
3153
3356
  const layout = this.layout();
3154
3357
  if (this.view === "full") {
3155
3358
  const entry = this.roster.selected;
3359
+ const whole = this.placement()?.panes[0];
3360
+ if (event.kind === "press" && whole) this.beginSelect(whole, event);
3156
3361
  if (entry && (event.kind === "wheel-up" || event.kind === "wheel-down")) {
3157
3362
  const size = entry.child?.screen.scrollbackSize() ?? 0;
3158
3363
  const direction = event.kind === "wheel-up" ? -1 : 1;
@@ -3420,7 +3625,172 @@ var SpacesHost = class {
3420
3625
  return;
3421
3626
  }
3422
3627
  const pane = paneAt(placement.panes, event.x, event.y);
3423
- if (pane) this.open(pane.entry);
3628
+ if (pane) {
3629
+ const scrolled = pane.entry.scrollBack;
3630
+ this.open(pane.entry);
3631
+ pane.entry.scrollBack = scrolled;
3632
+ this.beginSelect(pane, event);
3633
+ }
3634
+ }
3635
+ // --- selecting text --------------------------------------------------------
3636
+ /** The cell of the emulator's lines under the pointer, kept inside the pane. */
3637
+ pointAt(entry, screen, inner, event) {
3638
+ const col = Math.max(0, Math.min(event.x - inner.x, inner.width - 1, screen.cols - 1));
3639
+ const row = Math.max(0, Math.min(event.y - inner.y, inner.height - 1));
3640
+ return { line: screen.viewTop(entry.scrollBack) + row, col };
3641
+ }
3642
+ /** A press inside a pane: the anchor of a drag, or at once the word or line a double or triple click names. */
3643
+ beginSelect(pane, event) {
3644
+ const { entry, inner } = pane;
3645
+ const child = entry.child;
3646
+ if (!child || child.status === "exited") return;
3647
+ const inside = event.x >= inner.x && event.x < inner.x + inner.width && event.y >= inner.y && event.y < inner.y + inner.height;
3648
+ if (!inside) return;
3649
+ const unit = this.clicks.press(event.x, event.y);
3650
+ const screen = child.screen;
3651
+ const point = this.pointAt(entry, screen, inner, event);
3652
+ const range = unit === 2 ? wordAt(screen, point.line, point.col) : unit === 3 ? lineAt(screen, point.line) : { start: point, end: point };
3653
+ this.select = {
3654
+ entry,
3655
+ screen,
3656
+ cols: screen.cols,
3657
+ rows: inner.height,
3658
+ inner,
3659
+ anchor: range.start,
3660
+ focus: range.end,
3661
+ unit,
3662
+ pressing: true,
3663
+ active: unit !== 1,
3664
+ copied: false
3665
+ };
3666
+ this.requestRender();
3667
+ }
3668
+ dragSelect(event) {
3669
+ const sel = this.select;
3670
+ if (!sel || sel.unit !== 1) return;
3671
+ sel.focus = this.pointAt(sel.entry, sel.screen, sel.inner, event);
3672
+ if (sel.focus.line !== sel.anchor.line || sel.focus.col !== sel.anchor.col) sel.active = true;
3673
+ this.requestRender();
3674
+ }
3675
+ /** The button came up: copy what is highlighted, or forget a plain click. */
3676
+ finishSelect() {
3677
+ const sel = this.select;
3678
+ if (!sel?.pressing) return;
3679
+ sel.pressing = false;
3680
+ if (!sel.active) {
3681
+ this.select = void 0;
3682
+ return;
3683
+ }
3684
+ if (this.options.copyOnSelect === false) {
3685
+ this.note("Selected. Press ctrl+c to copy it, or esc to let go.", void 0);
3686
+ return;
3687
+ }
3688
+ this.copySelection(sel);
3689
+ }
3690
+ clearSelect() {
3691
+ if (!this.select) return;
3692
+ this.select = void 0;
3693
+ this.requestRender();
3694
+ }
3695
+ copySelection(sel) {
3696
+ const text = extractText(sel.screen, orderRange(sel.anchor, sel.focus));
3697
+ const auto = this.options.copyOnSelect !== false;
3698
+ if (text.trim() === "") {
3699
+ if (auto) this.clearSelect();
3700
+ return;
3701
+ }
3702
+ sel.copied = true;
3703
+ void this.copier().copy(text, () => !this.closed && this.select === sel).then((outcome) => {
3704
+ if (!outcome || this.closed) return;
3705
+ const { text: message, ok } = describeCopy(
3706
+ outcome,
3707
+ bypassKey(this.options.env ?? process.env)
3708
+ );
3709
+ const tip = ok && !this.tipShown && auto;
3710
+ if (tip) this.tipShown = true;
3711
+ this.note(
3712
+ tip ? `${message} Turn off: tui.copyOnSelect.` : message,
3713
+ auto && this.select === sel ? sel : void 0,
3714
+ ok ? COPY_NOTE_MS : COPY_ERROR_MS
3715
+ );
3716
+ });
3717
+ }
3718
+ clipboardCopier;
3719
+ /** The one copier for this host, so copies queue behind each other. */
3720
+ copier() {
3721
+ this.clipboardCopier ??= createClipboardCopier(
3722
+ { isTTY: true, write: /* @__PURE__ */ __name((data) => void this.options.output.write(data), "write") },
3723
+ { ...this.options.clipboard, env: this.options.env ?? process.env }
3724
+ );
3725
+ return this.clipboardCopier;
3726
+ }
3727
+ /** Says something in the status line; the selection `fading` goes with it. */
3728
+ note(text, fading, ms) {
3729
+ this.notice = text;
3730
+ this.cancelNote?.();
3731
+ this.cancelNote = void 0;
3732
+ if (ms !== void 0)
3733
+ this.cancelNote = this.schedule(() => {
3734
+ this.cancelNote = void 0;
3735
+ if (this.notice === text) this.notice = void 0;
3736
+ if (fading && this.select === fading) this.select = void 0;
3737
+ this.requestRender();
3738
+ }, ms);
3739
+ this.requestRender();
3740
+ }
3741
+ /** Ctrl+C copies a selection that was not copied on release; esc, or a second ctrl+c, lets go of it. */
3742
+ selectionKey(chunk) {
3743
+ const sel = this.select;
3744
+ if (!sel?.active || sel.pressing || this.options.copyOnSelect !== false) return false;
3745
+ if (chunk === "" && !sel.copied) this.copySelection(sel);
3746
+ else if (chunk === "" || chunk === "\x1B") this.clearSelect();
3747
+ else return false;
3748
+ return true;
3749
+ }
3750
+ /** Gives the terminal a pane's clipboard requests, once per screen. Queries are never answered. */
3751
+ watchClipboard(screen) {
3752
+ if (this.watched.has(screen)) return;
3753
+ this.watched.add(screen);
3754
+ screen.onClipboard((data) => this.forwardClipboard(screen, data));
3755
+ }
3756
+ forwardClipboard(screen, data) {
3757
+ if (this.closed || this.hidden) return;
3758
+ const split = data.indexOf(";");
3759
+ if (split < 0) return;
3760
+ const targets = data.slice(0, split);
3761
+ let payload = data.slice(split + 1);
3762
+ if (!/^[cp]*$/u.test(targets) || !/^[A-Za-z0-9+/]+={0,2}$/u.test(payload)) return;
3763
+ if (payload.length % 4 === 1) return;
3764
+ if (payload.length % 4 !== 0) payload = payload.padEnd(Math.ceil(payload.length / 4) * 4, "=");
3765
+ if (payload.length > Math.ceil(MAX_CLIPBOARD_TEXT_BYTES * 4 / 3) + 4) return;
3766
+ if (!(this.placement()?.panes ?? []).some((p) => p.entry.child?.screen === screen)) {
3767
+ this.note(
3768
+ "A session that is not on screen asked to copy something. Open it and try again.",
3769
+ void 0,
3770
+ 4e3
3771
+ );
3772
+ return;
3773
+ }
3774
+ const now = this.options.now ?? Date.now;
3775
+ const last = this.lastForward.get(screen);
3776
+ if (last !== void 0 && now() - last < FORWARD_MS) {
3777
+ const first = !this.pendingForward.has(screen);
3778
+ this.pendingForward.set(screen, data);
3779
+ if (first)
3780
+ this.schedule(
3781
+ () => {
3782
+ const held = this.pendingForward.get(screen);
3783
+ this.pendingForward.delete(screen);
3784
+ this.lastForward.delete(screen);
3785
+ if (held !== void 0) this.forwardClipboard(screen, held);
3786
+ },
3787
+ FORWARD_MS - (now() - last)
3788
+ );
3789
+ return;
3790
+ }
3791
+ this.lastForward.set(screen, now());
3792
+ const text = Buffer.from(payload, "base64").toString("utf8");
3793
+ void this.copier().copy(text, () => !this.closed, { durable: true });
3424
3794
  }
3425
3795
  /** Moves the border being dragged to follow the pointer. */
3426
3796
  dragBorder(event) {
@@ -3663,6 +4033,13 @@ var SpacesHost = class {
3663
4033
  const panes = placement?.panes ?? [];
3664
4034
  await Promise.all(panes.map((p) => p.entry.child?.screen.settled()));
3665
4035
  if (this.closed || this.hidden) return;
4036
+ const sel = this.select;
4037
+ if (sel) {
4038
+ const here = panes.find((p) => p.entry === sel.entry);
4039
+ if (!here || here.entry.child?.screen !== sel.screen || sel.screen.cols !== sel.cols || here.inner.height !== sel.rows)
4040
+ this.select = void 0;
4041
+ else sel.inner = here.inner;
4042
+ }
3666
4043
  const { output } = this.options;
3667
4044
  const frame = new Frame(output.columns, output.rows);
3668
4045
  const layout = this.layout();
@@ -3769,6 +4146,20 @@ var SpacesHost = class {
3769
4146
  });
3770
4147
  }
3771
4148
  }
4149
+ /** Shows the selected cells in reverse video. */
4150
+ paintSelection(frame, sel, inner) {
4151
+ const range = snapRange(sel.screen, orderRange(sel.anchor, sel.focus));
4152
+ const top = sel.screen.viewTop(sel.entry.scrollBack);
4153
+ for (let row = 0; row < inner.height; row++) {
4154
+ const cols = colsOnLine(range, top + row, sel.screen.cols);
4155
+ if (!cols) continue;
4156
+ for (let col = cols[0]; col < Math.min(cols[1], inner.width); col++) {
4157
+ const cell = frame.cellAt(inner.x + col, inner.y + row);
4158
+ if (cell)
4159
+ frame.set(inner.x + col, inner.y + row, { ...cell, attrs: cell.attrs ^ ATTR_INVERSE });
4160
+ }
4161
+ }
4162
+ }
3772
4163
  /** One pane: its border (the focused one in the accent colour), then its session or what stands in for it. */
3773
4164
  drawPane(frame, pane, focused, bordered) {
3774
4165
  const { entry, outer, inner } = pane;
@@ -3776,6 +4167,9 @@ var SpacesHost = class {
3776
4167
  const child = entry.child;
3777
4168
  if (child) {
3778
4169
  frame.blit(child.screen.cells(entry.scrollBack), inner);
4170
+ const sel = this.select;
4171
+ if (sel?.active && sel.entry === entry && sel.screen === child.screen)
4172
+ this.paintSelection(frame, sel, inner);
3779
4173
  const last = { ...inner, y: inner.y + inner.height - 1, height: 1 };
3780
4174
  if (child.status === "exited") {
3781
4175
  frame.fillRect(last, { attrs: ATTR_INVERSE });
@@ -3901,6 +4295,7 @@ var SpacesHost = class {
3901
4295
  this.closed = true;
3902
4296
  this.settleExit(true);
3903
4297
  this.cancelKill?.();
4298
+ this.cancelNote?.();
3904
4299
  this.cancelPoll?.();
3905
4300
  this.cancelReconcile?.();
3906
4301
  this.cancelGit?.();
@@ -3910,6 +4305,7 @@ var SpacesHost = class {
3910
4305
  input.off("data", this.onData);
3911
4306
  output.off("resize", this.onResize);
3912
4307
  process.off("exit", this.onProcessExit);
4308
+ this.releaseSignals();
3913
4309
  input.setRawMode?.(false);
3914
4310
  input.pause?.();
3915
4311
  if (!this.hidden) output.write(LEAVE_SCREEN);
@@ -3919,7 +4315,8 @@ var SpacesHost = class {
3919
4315
  };
3920
4316
 
3921
4317
  export {
4318
+ realSignalHooks,
3922
4319
  realSchedule,
3923
4320
  SpacesHost
3924
4321
  };
3925
- //# sourceMappingURL=chunk-PIVHVYCN.js.map
4322
+ //# sourceMappingURL=chunk-IYEDXZQZ.js.map