@namzu/cli 44.1.1 → 44.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (451) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/dist/bin.js +1 -1
  3. package/dist/chunks/acp-OUBJWH5B.js +7754 -0
  4. package/dist/chunks/acp-OUBJWH5B.js.map +6 -0
  5. package/dist/chunks/{activity-command-Y5ZLCQ63.js → activity-command-R7MUSZIY.js} +16 -15
  6. package/dist/chunks/activity-command-R7MUSZIY.js.map +6 -0
  7. package/dist/chunks/{add-F7M57FGR.js → add-PSEIDDRW.js} +21 -18
  8. package/dist/chunks/add-PSEIDDRW.js.map +6 -0
  9. package/dist/chunks/{agent-AFX2UZU5.js → agent-YPEXUYPH.js} +35 -30
  10. package/dist/chunks/agent-session-EZB2OYG3.js +65 -0
  11. package/dist/chunks/{archive-6NM6DYAT.js → archive-ET4PXE34.js} +11 -10
  12. package/dist/chunks/archive-ET4PXE34.js.map +6 -0
  13. package/dist/chunks/{bin-main-I6CHRYYQ.js → bin-main-PMB57AZJ.js} +9 -9
  14. package/dist/chunks/binding-K6RIQ5AP.js +17 -0
  15. package/dist/chunks/{browser-OPMOTWTV.js → browser-SKTIAVBF.js} +6 -6
  16. package/dist/chunks/{chat-KGVPXQS6.js → chat-AVIVXXMD.js} +20 -19
  17. package/dist/chunks/chat-AVIVXXMD.js.map +6 -0
  18. package/dist/chunks/chunk-26C37THH.js +867 -0
  19. package/dist/chunks/chunk-26C37THH.js.map +6 -0
  20. package/dist/chunks/{chunk-CTN4O42X.js → chunk-2EHPXO4E.js} +3 -3
  21. package/dist/chunks/{chunk-LS75R55C.js → chunk-2NI5NS5S.js} +3 -3
  22. package/dist/chunks/{chunk-RV5QY3IY.js → chunk-2U5M5IYH.js} +6 -6
  23. package/dist/chunks/{chunk-PWOG3OMH.js → chunk-2X6JZAKH.js} +9 -9
  24. package/dist/chunks/{chunk-W5QFVC74.js → chunk-2Y26DLOF.js} +27 -10
  25. package/dist/chunks/{chunk-W5QFVC74.js.map → chunk-2Y26DLOF.js.map} +1 -1
  26. package/dist/chunks/{chunk-BR6EWAKQ.js → chunk-3QGJXD7U.js} +5 -5
  27. package/dist/chunks/{chunk-XFNCCDJK.js → chunk-435DYOG4.js} +2 -2
  28. package/dist/chunks/{chunk-Y44FAVKA.js → chunk-4OXIJ2EF.js} +3 -3
  29. package/dist/chunks/{chunk-RSRJQB6Q.js → chunk-6EJFXJDO.js} +204 -68
  30. package/dist/chunks/chunk-6EJFXJDO.js.map +6 -0
  31. package/dist/chunks/{chunk-UC3ZACVN.js → chunk-6FWFSPUL.js} +2 -2
  32. package/dist/chunks/chunk-6HTC5TQ3.js +89 -0
  33. package/dist/chunks/chunk-6HTC5TQ3.js.map +6 -0
  34. package/dist/chunks/chunk-6IDFHPY3.js +413 -0
  35. package/dist/chunks/chunk-6IDFHPY3.js.map +6 -0
  36. package/dist/chunks/chunk-7FPKSX4M.js +61 -0
  37. package/dist/chunks/chunk-7FPKSX4M.js.map +6 -0
  38. package/dist/chunks/{chunk-EFEZWLZC.js → chunk-7QQOUCGI.js} +12 -10
  39. package/dist/chunks/chunk-7QQOUCGI.js.map +6 -0
  40. package/dist/chunks/{chunk-KHM2XON5.js → chunk-7TEXDZVO.js} +17 -3
  41. package/dist/chunks/chunk-7TEXDZVO.js.map +6 -0
  42. package/dist/chunks/{chunk-WPNT6IGU.js → chunk-A5GTZ7R2.js} +2 -2
  43. package/dist/chunks/{chunk-BIGRB2H4.js → chunk-ACSG5R5P.js} +3 -3
  44. package/dist/chunks/{chunk-QV43JSBP.js → chunk-AI6PBE5G.js} +2 -2
  45. package/dist/chunks/{chunk-HXZ2JXCO.js → chunk-AX5ESG6K.js} +2 -2
  46. package/dist/chunks/{chunk-DESOZLEL.js → chunk-B3XIVOLM.js} +2 -2
  47. package/dist/chunks/{chunk-ZXKN4TWP.js → chunk-BGKQCLLH.js} +242 -447
  48. package/dist/chunks/chunk-BGKQCLLH.js.map +6 -0
  49. package/dist/chunks/chunk-BT7ZELXJ.js +63 -0
  50. package/dist/chunks/chunk-BT7ZELXJ.js.map +6 -0
  51. package/dist/chunks/{chunk-ZUN2WRCB.js → chunk-DECJPLLA.js} +13 -13
  52. package/dist/chunks/{chunk-GSYPRZZU.js → chunk-DFCJYRT5.js} +2 -2
  53. package/dist/chunks/{chunk-QNTR7X7D.js → chunk-DQLSLXDF.js} +5 -5
  54. package/dist/chunks/chunk-EXFSMYH4.js +83 -0
  55. package/dist/chunks/chunk-EXFSMYH4.js.map +6 -0
  56. package/dist/chunks/{chunk-6Z2ZJ4BA.js → chunk-FHQTXWDA.js} +4 -4
  57. package/dist/chunks/chunk-G73G2WGR.js +242 -0
  58. package/dist/chunks/chunk-G73G2WGR.js.map +6 -0
  59. package/dist/chunks/{chunk-BLM6IQS4.js → chunk-GANFMGV7.js} +5 -5
  60. package/dist/chunks/{chunk-REDD2WY7.js → chunk-GBS6ATYF.js} +2 -2
  61. package/dist/chunks/{chunk-ORVWGSLG.js → chunk-GCCFTP47.js} +4 -4
  62. package/dist/chunks/{chunk-FKIO77IY.js → chunk-GNEDN6MU.js} +12 -12
  63. package/dist/chunks/{chunk-NS7EU37U.js → chunk-HB5ZN5KQ.js} +2 -2
  64. package/dist/chunks/{chunk-EFQ6FUFZ.js → chunk-HELINLSD.js} +2 -2
  65. package/dist/chunks/{chunk-AY7B43MK.js → chunk-HKCIZR5P.js} +13 -13
  66. package/dist/chunks/chunk-HRJPVPSU.js +164 -0
  67. package/dist/chunks/chunk-HRJPVPSU.js.map +6 -0
  68. package/dist/chunks/{chunk-NPZY5OJ5.js → chunk-HTBMDD6Y.js} +8 -8
  69. package/dist/chunks/{chunk-LN26A356.js → chunk-I5E4MT3C.js} +4 -4
  70. package/dist/chunks/{chunk-KK2L4FD2.js → chunk-IJZ7SLBV.js} +3 -3
  71. package/dist/chunks/{chunk-YAEHAYI4.js → chunk-ITA57VY5.js} +7 -5
  72. package/dist/chunks/chunk-ITA57VY5.js.map +6 -0
  73. package/dist/chunks/{chunk-W4E2N7TY.js → chunk-IZVN6K6U.js} +4 -4
  74. package/dist/chunks/{chunk-7U36A4WQ.js → chunk-JL64XHSL.js} +55 -5
  75. package/dist/chunks/chunk-JL64XHSL.js.map +6 -0
  76. package/dist/chunks/chunk-KLKAK2O5.js +5817 -0
  77. package/dist/chunks/chunk-KLKAK2O5.js.map +6 -0
  78. package/dist/chunks/{chunk-465CVUN4.js → chunk-L2NNJ4XL.js} +3 -3
  79. package/dist/chunks/{chunk-JCUPTKQY.js → chunk-LF76CVOZ.js} +4 -4
  80. package/dist/chunks/{chunk-ZATO2QOS.js → chunk-LFPTXRMM.js} +2 -2
  81. package/dist/chunks/chunk-LG27EJU6.js +189 -0
  82. package/dist/chunks/chunk-LG27EJU6.js.map +6 -0
  83. package/dist/chunks/{chunk-UHPRMPWX.js → chunk-LKJBDF7W.js} +15 -3
  84. package/dist/chunks/chunk-LKJBDF7W.js.map +6 -0
  85. package/dist/chunks/chunk-LKODRKMZ.js +575 -0
  86. package/dist/chunks/chunk-LKODRKMZ.js.map +6 -0
  87. package/dist/chunks/{chunk-WLUGKIYQ.js → chunk-LQRP2VRQ.js} +4 -4
  88. package/dist/chunks/{chunk-UGAT33T5.js → chunk-LYGD5P7O.js} +3 -3
  89. package/dist/chunks/{chunk-CRWNJ62V.js → chunk-M2OZ4SVS.js} +3 -3
  90. package/dist/chunks/{chunk-I32JTWDW.js → chunk-MGZSEPDY.js} +2 -2
  91. package/dist/chunks/{chunk-HYFX32Y3.js → chunk-MJBGVVI5.js} +3 -3
  92. package/dist/chunks/{chunk-YPRKTJ5P.js → chunk-MYL75RA4.js} +2 -2
  93. package/dist/chunks/chunk-PIVHVYCN.js +3925 -0
  94. package/dist/chunks/chunk-PIVHVYCN.js.map +6 -0
  95. package/dist/chunks/{chunk-AE4LOPZF.js → chunk-PMX2WTZL.js} +2 -2
  96. package/dist/chunks/{chunk-FPLDTTM2.js → chunk-QWSZ5P4C.js} +6 -6
  97. package/dist/chunks/{chunk-T5POXPXY.js → chunk-RSIWTHYS.js} +3 -3
  98. package/dist/chunks/{chunk-UP3SWACV.js → chunk-S4QOQGAT.js} +2 -2
  99. package/dist/chunks/chunk-S7WRWA25.js +33 -0
  100. package/dist/chunks/chunk-S7WRWA25.js.map +6 -0
  101. package/dist/chunks/{chunk-ZRBGY4SL.js → chunk-SGRO4RJP.js} +2 -2
  102. package/dist/chunks/{chunk-WKUTR7YW.js → chunk-SJFPZPOJ.js} +80 -17
  103. package/dist/chunks/chunk-SJFPZPOJ.js.map +6 -0
  104. package/dist/chunks/{chunk-JAYPFJGZ.js → chunk-TZZOQ62Z.js} +2 -2
  105. package/dist/chunks/chunk-U4SST7AD.js +219 -0
  106. package/dist/chunks/chunk-U4SST7AD.js.map +6 -0
  107. package/dist/chunks/{chunk-CMAZ3DYB.js → chunk-UGDZ7MLG.js} +4 -4
  108. package/dist/chunks/chunk-VDKDXDOH.js +290 -0
  109. package/dist/chunks/chunk-VDKDXDOH.js.map +6 -0
  110. package/dist/chunks/{chunk-2NFPIARP.js → chunk-VFVWHYHT.js} +4 -4
  111. package/dist/chunks/{chunk-5UB2LLPG.js → chunk-VZ4PKWLF.js} +2 -2
  112. package/dist/chunks/{chunk-WLAI3VCE.js → chunk-WKFHQQOU.js} +2 -2
  113. package/dist/chunks/{chunk-JSFF2HGX.js → chunk-WKPRYH24.js} +3 -3
  114. package/dist/chunks/{chunk-VR4MTSMH.js → chunk-WQFHJ4TO.js} +3 -3
  115. package/dist/chunks/{chunk-RFMODICJ.js → chunk-WYJ3CNXX.js} +80 -38
  116. package/dist/chunks/chunk-WYJ3CNXX.js.map +6 -0
  117. package/dist/chunks/{chunk-ZNYKZ3MI.js → chunk-XPLHAOGE.js} +2 -2
  118. package/dist/chunks/{chunk-2NGXQQPP.js → chunk-XX2SP5AM.js} +3 -3
  119. package/dist/chunks/{chunk-T2PF65KB.js → chunk-YDSWGJWF.js} +2 -2
  120. package/dist/chunks/{chunk-LUSUJZR2.js → chunk-YJ6NWB2B.js} +2 -2
  121. package/dist/chunks/{chunk-O4MFP726.js → chunk-YTE3QIH3.js} +998 -393
  122. package/dist/chunks/chunk-YTE3QIH3.js.map +6 -0
  123. package/dist/chunks/{chunk-JH3SDABI.js → chunk-YUYNIAJX.js} +6 -6
  124. package/dist/chunks/{chunk-TX2PUHTP.js → chunk-YXIG4OT2.js} +2 -2
  125. package/dist/chunks/{cli-runtime-HTTDQPEZ.js → cli-runtime-F4MEMBDL.js} +11 -10
  126. package/dist/chunks/cli-runtime-F4MEMBDL.js.map +6 -0
  127. package/dist/chunks/{commands-ZD2L5QMI.js → commands-ZCNZVYTG.js} +5 -5
  128. package/dist/chunks/{crash-report-2IRIZSBD.js → crash-report-K53VF4H5.js} +6 -6
  129. package/dist/chunks/{dist-GSYFGRQT.js → dist-6IPPA55L.js} +2 -2
  130. package/dist/chunks/{dist-45IFTDJW.js → dist-H53G25BE.js} +2 -2
  131. package/dist/chunks/{dist-RQJEJN3Z.js → dist-L5LBM77I.js} +2 -2
  132. package/dist/chunks/{dist-OJTB6QLR.js → dist-RIH2Q2ER.js} +2 -2
  133. package/dist/chunks/{dist-OCZJJFHF.js → dist-RTIKLSUV.js} +2 -2
  134. package/dist/chunks/{dist-TWYNAZDN.js → dist-T6KE7URX.js} +2 -2
  135. package/dist/chunks/{dist-FNGLTQIG.js → dist-VSJGDIXP.js} +32 -2
  136. package/dist/chunks/{dist-NL7WG7PX.js → dist-XNGK3C4G.js} +2 -2
  137. package/dist/chunks/{doctor-NKPCWPB4.js → doctor-DOCGTBME.js} +17 -15
  138. package/dist/chunks/{drain-YTSVAQP5.js → drain-LT3J2MEA.js} +13 -13
  139. package/dist/chunks/entry-UHKDLPDS.js +232 -0
  140. package/dist/chunks/entry-UHKDLPDS.js.map +6 -0
  141. package/dist/chunks/{eval-ILFXDQUQ.js → eval-DH26W2QK.js} +2 -2
  142. package/dist/chunks/{exec-3JDAB34N.js → exec-QGAHWUUQ.js} +57 -47
  143. package/dist/chunks/exec-QGAHWUUQ.js.map +6 -0
  144. package/dist/chunks/{github-FH7PPWVW.js → github-JTMZJAZL.js} +4 -4
  145. package/dist/chunks/{home-5OIZIDIT.js → home-GGVNSCCU.js} +3 -3
  146. package/dist/chunks/host-6CUYPX4T.js +23 -0
  147. package/dist/chunks/{host-queries-SO2NOQRR.js → host-queries-4EW7M54U.js} +16 -15
  148. package/dist/chunks/host-queries-4EW7M54U.js.map +6 -0
  149. package/dist/chunks/{learn-RHNMJ4BD.js → learn-PAO3IOYA.js} +13 -13
  150. package/dist/chunks/{learn-builtin-UQ3MWGK6.js → learn-builtin-DXZUXOGG.js} +19 -19
  151. package/dist/chunks/{lifecycle-RTDYXKBW.js → lifecycle-KDN4D7DP.js} +30 -26
  152. package/dist/chunks/{list-G6OA34RL.js → list-KSP6S57Z.js} +15 -14
  153. package/dist/chunks/list-KSP6S57Z.js.map +6 -0
  154. package/dist/chunks/{live-44HBQCQY.js → live-XWJ2JOFO.js} +15 -13
  155. package/dist/chunks/{login-J4PWR4FM.js → login-3Q2HKQUW.js} +10 -8
  156. package/dist/chunks/{logs-22QAEH2Q.js → logs-UYB55HOX.js} +4 -4
  157. package/dist/chunks/{mcp-EXFVIHPJ.js → mcp-JWSI4KA6.js} +25 -22
  158. package/dist/chunks/mcp-JWSI4KA6.js.map +6 -0
  159. package/dist/chunks/{message-command-B4L2W4YZ.js → message-command-YP6TGD3K.js} +47 -42
  160. package/dist/chunks/message-command-YP6TGD3K.js.map +6 -0
  161. package/dist/chunks/open-QUDHJK5H.js +19 -0
  162. package/dist/chunks/{operator-tools-TEP4UTI6.js → operator-tools-43NL7HKO.js} +15 -14
  163. package/dist/chunks/operator-tools-43NL7HKO.js.map +6 -0
  164. package/dist/chunks/{output-schema-FZXJ7V33.js → output-schema-TLW5FA37.js} +3 -3
  165. package/dist/chunks/{pal-BUDEBIBJ.js → pal-EZE2KLYZ.js} +16 -14
  166. package/dist/chunks/pal-EZE2KLYZ.js.map +6 -0
  167. package/dist/chunks/palette-WDPS7W6Q.js +15 -0
  168. package/dist/chunks/peers-OBENILN2.js +18 -0
  169. package/dist/chunks/prefix-MLAG4KTK.js +14 -0
  170. package/dist/chunks/{providers-EQ32NZAT.js → providers-PJIHLTXP.js} +22 -18
  171. package/dist/chunks/pty-HDEXCPR6.js +29 -0
  172. package/dist/chunks/{resident-FSUGNG56.js → resident-2GHB3BKR.js} +32 -30
  173. package/dist/chunks/resident-2GHB3BKR.js.map +6 -0
  174. package/dist/chunks/resume-FHPY2RU3.js +24 -0
  175. package/dist/chunks/resume-FHPY2RU3.js.map +6 -0
  176. package/dist/chunks/{resume-command-DHPXCZVL.js → resume-command-VB6VA64L.js} +4 -4
  177. package/dist/chunks/resume-command-VB6VA64L.js.map +6 -0
  178. package/dist/chunks/{schedule-OJMZEWJG.js → schedule-42N4JOQJ.js} +8 -8
  179. package/dist/chunks/{service-EP2QHCK7.js → service-6WGZKKI4.js} +33 -29
  180. package/dist/chunks/service-6WGZKKI4.js.map +6 -0
  181. package/dist/chunks/{session-step-44XBOUDV.js → session-step-SBWIM4MZ.js} +15 -15
  182. package/dist/chunks/session-step-SBWIM4MZ.js.map +6 -0
  183. package/dist/chunks/{skills-YHAQXVP2.js → skills-V3VDOL3D.js} +11 -11
  184. package/dist/chunks/spaces-6II4JYTZ.js +231 -0
  185. package/dist/chunks/spaces-6II4JYTZ.js.map +6 -0
  186. package/dist/chunks/{start-check-KVZFDBD3.js → start-check-MRSPS5JT.js} +2 -2
  187. package/dist/chunks/start-check-MRSPS5JT.js.map +6 -0
  188. package/dist/chunks/{state-NXFKMBOX.js → state-HX3XRNPC.js} +2 -2
  189. package/dist/chunks/store-7P462EUD.js +17 -0
  190. package/dist/chunks/store-7P462EUD.js.map +6 -0
  191. package/dist/chunks/{store-KFJWAELA.js → store-FUQE7EWU.js} +13 -10
  192. package/dist/chunks/store-FUQE7EWU.js.map +6 -0
  193. package/dist/chunks/{store-QNY242NN.js → store-IX6KNJA4.js} +6 -6
  194. package/dist/chunks/store-IX6KNJA4.js.map +6 -0
  195. package/dist/chunks/{store-JLTSSGKL.js → store-MQXI7G2H.js} +4 -4
  196. package/dist/chunks/store-MQXI7G2H.js.map +6 -0
  197. package/dist/chunks/{tui-L5GKR237.js → tui-PH5B6UCO.js} +1822 -816
  198. package/dist/chunks/tui-PH5B6UCO.js.map +6 -0
  199. package/dist/chunks/{upgrade-PROVWX55.js → upgrade-HDW5MWLE.js} +6 -6
  200. package/dist/chunks/{worktree-ELHDXX4X.js → worktree-MLFYZF56.js} +13 -12
  201. package/dist/chunks/worktree-MLFYZF56.js.map +6 -0
  202. package/dist/cli.d.ts.map +1 -1
  203. package/dist/commands/exec-json.d.ts.map +1 -1
  204. package/dist/commands/manifest.d.ts +1 -0
  205. package/dist/commands/manifest.d.ts.map +1 -1
  206. package/dist/commands/spaces.d.ts +42 -0
  207. package/dist/commands/spaces.d.ts.map +1 -0
  208. package/dist/config/load.d.ts.map +1 -1
  209. package/dist/config/schema.d.ts +7 -0
  210. package/dist/config/schema.d.ts.map +1 -1
  211. package/dist/doctor/checks/index.d.ts +2 -1
  212. package/dist/doctor/checks/index.d.ts.map +1 -1
  213. package/dist/doctor/checks/terminal.d.ts +12 -0
  214. package/dist/doctor/checks/terminal.d.ts.map +1 -0
  215. package/dist/index.js +22 -19
  216. package/dist/integrations/accounts/activity.d.ts +39 -0
  217. package/dist/integrations/accounts/activity.d.ts.map +1 -0
  218. package/dist/integrations/accounts/binding.d.ts +30 -0
  219. package/dist/integrations/accounts/binding.d.ts.map +1 -0
  220. package/dist/integrations/accounts/codex-login.d.ts +33 -0
  221. package/dist/integrations/accounts/codex-login.d.ts.map +1 -0
  222. package/dist/integrations/accounts/host-facts.d.ts +22 -0
  223. package/dist/integrations/accounts/host-facts.d.ts.map +1 -0
  224. package/dist/integrations/accounts/open.d.ts +23 -0
  225. package/dist/integrations/accounts/open.d.ts.map +1 -0
  226. package/dist/integrations/accounts/rows.d.ts +45 -0
  227. package/dist/integrations/accounts/rows.d.ts.map +1 -0
  228. package/dist/integrations/peers/runtime.d.ts +12 -0
  229. package/dist/integrations/peers/runtime.d.ts.map +1 -1
  230. package/dist/integrations/providers/codex-account.d.ts +30 -0
  231. package/dist/integrations/providers/codex-account.d.ts.map +1 -0
  232. package/dist/integrations/providers/codex-oauth.d.ts +12 -0
  233. package/dist/integrations/providers/codex-oauth.d.ts.map +1 -1
  234. package/dist/integrations/providers/preferences.d.ts +8 -0
  235. package/dist/integrations/providers/preferences.d.ts.map +1 -1
  236. package/dist/integrations/resident/runner-worker.js +24 -23
  237. package/dist/integrations/resident/runner-worker.js.map +1 -1
  238. package/dist/integrations/sessions/store.d.ts +13 -1
  239. package/dist/integrations/sessions/store.d.ts.map +1 -1
  240. package/dist/spaces/git.d.ts +27 -0
  241. package/dist/spaces/git.d.ts.map +1 -0
  242. package/dist/spaces/goto.d.ts +31 -0
  243. package/dist/spaces/goto.d.ts.map +1 -0
  244. package/dist/spaces/host.d.ts +380 -0
  245. package/dist/spaces/host.d.ts.map +1 -0
  246. package/dist/spaces/input.d.ts +87 -0
  247. package/dist/spaces/input.d.ts.map +1 -0
  248. package/dist/spaces/keymap.d.ts +30 -0
  249. package/dist/spaces/keymap.d.ts.map +1 -0
  250. package/dist/spaces/layout.d.ts +34 -0
  251. package/dist/spaces/layout.d.ts.map +1 -0
  252. package/dist/spaces/overlay.d.ts +105 -0
  253. package/dist/spaces/overlay.d.ts.map +1 -0
  254. package/dist/spaces/palette.d.ts +35 -0
  255. package/dist/spaces/palette.d.ts.map +1 -0
  256. package/dist/spaces/peers.d.ts +19 -0
  257. package/dist/spaces/peers.d.ts.map +1 -0
  258. package/dist/spaces/prefix.d.ts +19 -0
  259. package/dist/spaces/prefix.d.ts.map +1 -0
  260. package/dist/spaces/roster.d.ts +111 -0
  261. package/dist/spaces/roster.d.ts.map +1 -0
  262. package/dist/spaces/session.d.ts +83 -0
  263. package/dist/spaces/session.d.ts.map +1 -0
  264. package/dist/spaces/sidebar.d.ts +99 -0
  265. package/dist/spaces/sidebar.d.ts.map +1 -0
  266. package/dist/spaces/signal.d.ts +28 -0
  267. package/dist/spaces/signal.d.ts.map +1 -0
  268. package/dist/spaces/status.d.ts +20 -0
  269. package/dist/spaces/status.d.ts.map +1 -0
  270. package/dist/spaces/store.d.ts +69 -0
  271. package/dist/spaces/store.d.ts.map +1 -0
  272. package/dist/spaces/tabbar.d.ts +36 -0
  273. package/dist/spaces/tabbar.d.ts.map +1 -0
  274. package/dist/spaces/tiling.d.ts +90 -0
  275. package/dist/spaces/tiling.d.ts.map +1 -0
  276. package/dist/terminal/host/cell.d.ts +35 -0
  277. package/dist/terminal/host/cell.d.ts.map +1 -0
  278. package/dist/terminal/host/frame.d.ts +64 -0
  279. package/dist/terminal/host/frame.d.ts.map +1 -0
  280. package/dist/terminal/host/index.d.ts +5 -0
  281. package/dist/terminal/host/index.d.ts.map +1 -0
  282. package/dist/terminal/host/writer.d.ts +21 -0
  283. package/dist/terminal/host/writer.d.ts.map +1 -0
  284. package/dist/terminal/host/xterm-source.d.ts +18 -0
  285. package/dist/terminal/host/xterm-source.d.ts.map +1 -0
  286. package/dist/terminal/pty.d.ts.map +1 -1
  287. package/dist/terminal/screen.d.ts +12 -0
  288. package/dist/terminal/screen.d.ts.map +1 -1
  289. package/dist/tui/App.d.ts +106 -1
  290. package/dist/tui/App.d.ts.map +1 -1
  291. package/dist/tui/Composer.d.ts +7 -1
  292. package/dist/tui/Composer.d.ts.map +1 -1
  293. package/dist/tui/ResumePicker.d.ts.map +1 -1
  294. package/dist/tui/TextPrompt.d.ts +5 -1
  295. package/dist/tui/TextPrompt.d.ts.map +1 -1
  296. package/dist/tui/account-flow.d.ts +126 -0
  297. package/dist/tui/account-flow.d.ts.map +1 -0
  298. package/dist/tui/agent.d.ts +17 -1
  299. package/dist/tui/agent.d.ts.map +1 -1
  300. package/dist/tui/compaction-rows.d.ts.map +1 -1
  301. package/dist/tui/context-usage.d.ts +14 -0
  302. package/dist/tui/context-usage.d.ts.map +1 -1
  303. package/dist/tui/index.d.ts.map +1 -1
  304. package/dist/tui/launch-settings.d.ts +5 -2
  305. package/dist/tui/launch-settings.d.ts.map +1 -1
  306. package/dist/tui/plain-interruption.d.ts +3 -1
  307. package/dist/tui/plain-interruption.d.ts.map +1 -1
  308. package/dist/tui/resume-picker-state.d.ts +7 -0
  309. package/dist/tui/resume-picker-state.d.ts.map +1 -1
  310. package/dist/tui/slashCommands.d.ts +11 -0
  311. package/dist/tui/slashCommands.d.ts.map +1 -1
  312. package/dist/tui/tidy-tool-output.d.ts +3 -1
  313. package/dist/tui/tidy-tool-output.d.ts.map +1 -1
  314. package/dist/tui/tool-end-rows.d.ts +2 -0
  315. package/dist/tui/tool-end-rows.d.ts.map +1 -1
  316. package/dist/tui/zoom/entry.d.ts +34 -0
  317. package/dist/tui/zoom/entry.d.ts.map +1 -0
  318. package/dist/tui/zoom/gesture.d.ts +51 -0
  319. package/dist/tui/zoom/gesture.d.ts.map +1 -0
  320. package/dist/tui/zoom/leave.d.ts +11 -0
  321. package/dist/tui/zoom/leave.d.ts.map +1 -0
  322. package/dist/tui/zoom/local.d.ts +55 -0
  323. package/dist/tui/zoom/local.d.ts.map +1 -0
  324. package/dist/tui/zoom/proxy.d.ts +40 -0
  325. package/dist/tui/zoom/proxy.d.ts.map +1 -0
  326. package/package.json +9 -8
  327. package/dist/chunks/acp-P3S54TTC.js +0 -13601
  328. package/dist/chunks/acp-P3S54TTC.js.map +0 -6
  329. package/dist/chunks/activity-command-Y5ZLCQ63.js.map +0 -6
  330. package/dist/chunks/add-F7M57FGR.js.map +0 -6
  331. package/dist/chunks/agent-session-CFWQHSYT.js +0 -60
  332. package/dist/chunks/archive-6NM6DYAT.js.map +0 -6
  333. package/dist/chunks/chat-KGVPXQS6.js.map +0 -6
  334. package/dist/chunks/chunk-43PPWWYD.js +0 -1415
  335. package/dist/chunks/chunk-43PPWWYD.js.map +0 -6
  336. package/dist/chunks/chunk-7U36A4WQ.js.map +0 -6
  337. package/dist/chunks/chunk-EFEZWLZC.js.map +0 -6
  338. package/dist/chunks/chunk-KHM2XON5.js.map +0 -6
  339. package/dist/chunks/chunk-O4MFP726.js.map +0 -6
  340. package/dist/chunks/chunk-RFMODICJ.js.map +0 -6
  341. package/dist/chunks/chunk-RSRJQB6Q.js.map +0 -6
  342. package/dist/chunks/chunk-UHPRMPWX.js.map +0 -6
  343. package/dist/chunks/chunk-WKUTR7YW.js.map +0 -6
  344. package/dist/chunks/chunk-YAEHAYI4.js.map +0 -6
  345. package/dist/chunks/chunk-ZXKN4TWP.js.map +0 -6
  346. package/dist/chunks/cli-runtime-HTTDQPEZ.js.map +0 -6
  347. package/dist/chunks/exec-3JDAB34N.js.map +0 -6
  348. package/dist/chunks/host-queries-SO2NOQRR.js.map +0 -6
  349. package/dist/chunks/list-G6OA34RL.js.map +0 -6
  350. package/dist/chunks/mcp-EXFVIHPJ.js.map +0 -6
  351. package/dist/chunks/message-command-B4L2W4YZ.js.map +0 -6
  352. package/dist/chunks/operator-tools-TEP4UTI6.js.map +0 -6
  353. package/dist/chunks/pal-BUDEBIBJ.js.map +0 -6
  354. package/dist/chunks/resident-FSUGNG56.js.map +0 -6
  355. package/dist/chunks/resume-VXHGE5GC.js +0 -23
  356. package/dist/chunks/service-EP2QHCK7.js.map +0 -6
  357. package/dist/chunks/tui-L5GKR237.js.map +0 -6
  358. package/dist/chunks/worktree-ELHDXX4X.js.map +0 -6
  359. /package/dist/chunks/{agent-AFX2UZU5.js.map → agent-YPEXUYPH.js.map} +0 -0
  360. /package/dist/chunks/{agent-session-CFWQHSYT.js.map → agent-session-EZB2OYG3.js.map} +0 -0
  361. /package/dist/chunks/{bin-main-I6CHRYYQ.js.map → bin-main-PMB57AZJ.js.map} +0 -0
  362. /package/dist/chunks/{commands-ZD2L5QMI.js.map → binding-K6RIQ5AP.js.map} +0 -0
  363. /package/dist/chunks/{browser-OPMOTWTV.js.map → browser-SKTIAVBF.js.map} +0 -0
  364. /package/dist/chunks/{chunk-CTN4O42X.js.map → chunk-2EHPXO4E.js.map} +0 -0
  365. /package/dist/chunks/{chunk-LS75R55C.js.map → chunk-2NI5NS5S.js.map} +0 -0
  366. /package/dist/chunks/{chunk-RV5QY3IY.js.map → chunk-2U5M5IYH.js.map} +0 -0
  367. /package/dist/chunks/{chunk-PWOG3OMH.js.map → chunk-2X6JZAKH.js.map} +0 -0
  368. /package/dist/chunks/{chunk-BR6EWAKQ.js.map → chunk-3QGJXD7U.js.map} +0 -0
  369. /package/dist/chunks/{chunk-XFNCCDJK.js.map → chunk-435DYOG4.js.map} +0 -0
  370. /package/dist/chunks/{chunk-Y44FAVKA.js.map → chunk-4OXIJ2EF.js.map} +0 -0
  371. /package/dist/chunks/{chunk-UC3ZACVN.js.map → chunk-6FWFSPUL.js.map} +0 -0
  372. /package/dist/chunks/{chunk-WPNT6IGU.js.map → chunk-A5GTZ7R2.js.map} +0 -0
  373. /package/dist/chunks/{chunk-BIGRB2H4.js.map → chunk-ACSG5R5P.js.map} +0 -0
  374. /package/dist/chunks/{chunk-QV43JSBP.js.map → chunk-AI6PBE5G.js.map} +0 -0
  375. /package/dist/chunks/{chunk-HXZ2JXCO.js.map → chunk-AX5ESG6K.js.map} +0 -0
  376. /package/dist/chunks/{chunk-DESOZLEL.js.map → chunk-B3XIVOLM.js.map} +0 -0
  377. /package/dist/chunks/{chunk-ZUN2WRCB.js.map → chunk-DECJPLLA.js.map} +0 -0
  378. /package/dist/chunks/{chunk-GSYPRZZU.js.map → chunk-DFCJYRT5.js.map} +0 -0
  379. /package/dist/chunks/{chunk-QNTR7X7D.js.map → chunk-DQLSLXDF.js.map} +0 -0
  380. /package/dist/chunks/{chunk-6Z2ZJ4BA.js.map → chunk-FHQTXWDA.js.map} +0 -0
  381. /package/dist/chunks/{chunk-BLM6IQS4.js.map → chunk-GANFMGV7.js.map} +0 -0
  382. /package/dist/chunks/{chunk-REDD2WY7.js.map → chunk-GBS6ATYF.js.map} +0 -0
  383. /package/dist/chunks/{chunk-ORVWGSLG.js.map → chunk-GCCFTP47.js.map} +0 -0
  384. /package/dist/chunks/{chunk-FKIO77IY.js.map → chunk-GNEDN6MU.js.map} +0 -0
  385. /package/dist/chunks/{chunk-NS7EU37U.js.map → chunk-HB5ZN5KQ.js.map} +0 -0
  386. /package/dist/chunks/{chunk-EFQ6FUFZ.js.map → chunk-HELINLSD.js.map} +0 -0
  387. /package/dist/chunks/{chunk-AY7B43MK.js.map → chunk-HKCIZR5P.js.map} +0 -0
  388. /package/dist/chunks/{chunk-NPZY5OJ5.js.map → chunk-HTBMDD6Y.js.map} +0 -0
  389. /package/dist/chunks/{chunk-LN26A356.js.map → chunk-I5E4MT3C.js.map} +0 -0
  390. /package/dist/chunks/{chunk-KK2L4FD2.js.map → chunk-IJZ7SLBV.js.map} +0 -0
  391. /package/dist/chunks/{chunk-W4E2N7TY.js.map → chunk-IZVN6K6U.js.map} +0 -0
  392. /package/dist/chunks/{chunk-465CVUN4.js.map → chunk-L2NNJ4XL.js.map} +0 -0
  393. /package/dist/chunks/{chunk-JCUPTKQY.js.map → chunk-LF76CVOZ.js.map} +0 -0
  394. /package/dist/chunks/{chunk-ZATO2QOS.js.map → chunk-LFPTXRMM.js.map} +0 -0
  395. /package/dist/chunks/{chunk-WLUGKIYQ.js.map → chunk-LQRP2VRQ.js.map} +0 -0
  396. /package/dist/chunks/{chunk-UGAT33T5.js.map → chunk-LYGD5P7O.js.map} +0 -0
  397. /package/dist/chunks/{chunk-CRWNJ62V.js.map → chunk-M2OZ4SVS.js.map} +0 -0
  398. /package/dist/chunks/{chunk-I32JTWDW.js.map → chunk-MGZSEPDY.js.map} +0 -0
  399. /package/dist/chunks/{chunk-HYFX32Y3.js.map → chunk-MJBGVVI5.js.map} +0 -0
  400. /package/dist/chunks/{chunk-YPRKTJ5P.js.map → chunk-MYL75RA4.js.map} +0 -0
  401. /package/dist/chunks/{chunk-AE4LOPZF.js.map → chunk-PMX2WTZL.js.map} +0 -0
  402. /package/dist/chunks/{chunk-FPLDTTM2.js.map → chunk-QWSZ5P4C.js.map} +0 -0
  403. /package/dist/chunks/{chunk-T5POXPXY.js.map → chunk-RSIWTHYS.js.map} +0 -0
  404. /package/dist/chunks/{chunk-UP3SWACV.js.map → chunk-S4QOQGAT.js.map} +0 -0
  405. /package/dist/chunks/{chunk-ZRBGY4SL.js.map → chunk-SGRO4RJP.js.map} +0 -0
  406. /package/dist/chunks/{chunk-JAYPFJGZ.js.map → chunk-TZZOQ62Z.js.map} +0 -0
  407. /package/dist/chunks/{chunk-CMAZ3DYB.js.map → chunk-UGDZ7MLG.js.map} +0 -0
  408. /package/dist/chunks/{chunk-2NFPIARP.js.map → chunk-VFVWHYHT.js.map} +0 -0
  409. /package/dist/chunks/{chunk-5UB2LLPG.js.map → chunk-VZ4PKWLF.js.map} +0 -0
  410. /package/dist/chunks/{chunk-WLAI3VCE.js.map → chunk-WKFHQQOU.js.map} +0 -0
  411. /package/dist/chunks/{chunk-JSFF2HGX.js.map → chunk-WKPRYH24.js.map} +0 -0
  412. /package/dist/chunks/{chunk-VR4MTSMH.js.map → chunk-WQFHJ4TO.js.map} +0 -0
  413. /package/dist/chunks/{chunk-ZNYKZ3MI.js.map → chunk-XPLHAOGE.js.map} +0 -0
  414. /package/dist/chunks/{chunk-2NGXQQPP.js.map → chunk-XX2SP5AM.js.map} +0 -0
  415. /package/dist/chunks/{chunk-T2PF65KB.js.map → chunk-YDSWGJWF.js.map} +0 -0
  416. /package/dist/chunks/{chunk-LUSUJZR2.js.map → chunk-YJ6NWB2B.js.map} +0 -0
  417. /package/dist/chunks/{chunk-JH3SDABI.js.map → chunk-YUYNIAJX.js.map} +0 -0
  418. /package/dist/chunks/{chunk-TX2PUHTP.js.map → chunk-YXIG4OT2.js.map} +0 -0
  419. /package/dist/chunks/{crash-report-2IRIZSBD.js.map → commands-ZCNZVYTG.js.map} +0 -0
  420. /package/dist/chunks/{dist-FNGLTQIG.js.map → crash-report-K53VF4H5.js.map} +0 -0
  421. /package/dist/chunks/{dist-GSYFGRQT.js.map → dist-6IPPA55L.js.map} +0 -0
  422. /package/dist/chunks/{dist-45IFTDJW.js.map → dist-H53G25BE.js.map} +0 -0
  423. /package/dist/chunks/{dist-RQJEJN3Z.js.map → dist-L5LBM77I.js.map} +0 -0
  424. /package/dist/chunks/{dist-OJTB6QLR.js.map → dist-RIH2Q2ER.js.map} +0 -0
  425. /package/dist/chunks/{dist-OCZJJFHF.js.map → dist-RTIKLSUV.js.map} +0 -0
  426. /package/dist/chunks/{dist-TWYNAZDN.js.map → dist-T6KE7URX.js.map} +0 -0
  427. /package/dist/chunks/{doctor-NKPCWPB4.js.map → dist-VSJGDIXP.js.map} +0 -0
  428. /package/dist/chunks/{dist-NL7WG7PX.js.map → dist-XNGK3C4G.js.map} +0 -0
  429. /package/dist/chunks/{home-5OIZIDIT.js.map → doctor-DOCGTBME.js.map} +0 -0
  430. /package/dist/chunks/{drain-YTSVAQP5.js.map → drain-LT3J2MEA.js.map} +0 -0
  431. /package/dist/chunks/{eval-ILFXDQUQ.js.map → eval-DH26W2QK.js.map} +0 -0
  432. /package/dist/chunks/{github-FH7PPWVW.js.map → github-JTMZJAZL.js.map} +0 -0
  433. /package/dist/chunks/{lifecycle-RTDYXKBW.js.map → home-GGVNSCCU.js.map} +0 -0
  434. /package/dist/chunks/{live-44HBQCQY.js.map → host-6CUYPX4T.js.map} +0 -0
  435. /package/dist/chunks/{learn-RHNMJ4BD.js.map → learn-PAO3IOYA.js.map} +0 -0
  436. /package/dist/chunks/{learn-builtin-UQ3MWGK6.js.map → learn-builtin-DXZUXOGG.js.map} +0 -0
  437. /package/dist/chunks/{login-J4PWR4FM.js.map → lifecycle-KDN4D7DP.js.map} +0 -0
  438. /package/dist/chunks/{output-schema-FZXJ7V33.js.map → live-XWJ2JOFO.js.map} +0 -0
  439. /package/dist/chunks/{providers-EQ32NZAT.js.map → login-3Q2HKQUW.js.map} +0 -0
  440. /package/dist/chunks/{logs-22QAEH2Q.js.map → logs-UYB55HOX.js.map} +0 -0
  441. /package/dist/chunks/{resume-VXHGE5GC.js.map → open-QUDHJK5H.js.map} +0 -0
  442. /package/dist/chunks/{resume-command-DHPXCZVL.js.map → output-schema-TLW5FA37.js.map} +0 -0
  443. /package/dist/chunks/{session-step-44XBOUDV.js.map → palette-WDPS7W6Q.js.map} +0 -0
  444. /package/dist/chunks/{start-check-KVZFDBD3.js.map → peers-OBENILN2.js.map} +0 -0
  445. /package/dist/chunks/{store-JLTSSGKL.js.map → prefix-MLAG4KTK.js.map} +0 -0
  446. /package/dist/chunks/{store-KFJWAELA.js.map → providers-PJIHLTXP.js.map} +0 -0
  447. /package/dist/chunks/{store-QNY242NN.js.map → pty-HDEXCPR6.js.map} +0 -0
  448. /package/dist/chunks/{schedule-OJMZEWJG.js.map → schedule-42N4JOQJ.js.map} +0 -0
  449. /package/dist/chunks/{skills-YHAQXVP2.js.map → skills-V3VDOL3D.js.map} +0 -0
  450. /package/dist/chunks/{state-NXFKMBOX.js.map → state-HX3XRNPC.js.map} +0 -0
  451. /package/dist/chunks/{upgrade-PROVWX55.js.map → upgrade-HDW5MWLE.js.map} +0 -0
@@ -0,0 +1,105 @@
1
+ import type { Frame, Rect } from '../terminal/host/frame.js';
2
+ import type { Palette } from './palette.js';
3
+ /** The size of the terminal an overlay is placed on. */
4
+ export interface Screen {
5
+ readonly cols: number;
6
+ readonly rows: number;
7
+ }
8
+ export type ModalAction = 'confirm' | 'cancel' | 'clear';
9
+ /** Where an overlay's parts are, so the same numbers draw it and find what a click lands on. */
10
+ export interface Surface {
11
+ readonly rect: Rect;
12
+ readonly buttons: readonly {
13
+ readonly rect: Rect;
14
+ readonly action: ModalAction;
15
+ }[];
16
+ readonly rows: readonly {
17
+ readonly rect: Rect;
18
+ readonly index: number;
19
+ }[];
20
+ }
21
+ export type Hit = {
22
+ readonly kind: 'outside';
23
+ } | {
24
+ readonly kind: 'inside';
25
+ } | {
26
+ readonly kind: 'button';
27
+ readonly action: ModalAction;
28
+ } | {
29
+ readonly kind: 'row';
30
+ readonly index: number;
31
+ };
32
+ /** What a press at a cell lands on: a button, a row, the overlay's body, or outside it. */
33
+ export declare function hitSurface(surface: Surface, x: number, y: number): Hit;
34
+ /** A square box in one colour. */
35
+ export declare function drawBox(frame: Frame, rect: Rect, fg: number, bg?: number): void;
36
+ /** Dims everything drawn so far, so the overlay on top stands out. */
37
+ export declare function dimFrame(frame: Frame): void;
38
+ export interface ModalButton {
39
+ readonly label: string;
40
+ readonly action: ModalAction;
41
+ /** The button enter presses: filled in the modal's colour. */
42
+ readonly primary?: boolean;
43
+ }
44
+ export interface ModalSpec {
45
+ readonly title: string;
46
+ /** A destructive question: its border, title and main button are red. */
47
+ readonly danger?: boolean;
48
+ readonly lines?: readonly string[];
49
+ /** A text field, shown with its text and a cursor. */
50
+ readonly input?: {
51
+ readonly value: string;
52
+ };
53
+ readonly error?: string;
54
+ readonly buttons: readonly ModalButton[];
55
+ }
56
+ export interface ModalLayout extends Surface {
57
+ readonly inputRect: Rect | undefined;
58
+ }
59
+ /** The buttons that fit in `room` columns: the optional ones (neither primary nor cancel) go first, then the label of the rest is kept whole. */
60
+ export declare function fittingButtons(buttons: readonly ModalButton[], room: number): ModalButton[];
61
+ export declare function layoutModal(screen: Screen, fullSpec: ModalSpec): ModalLayout;
62
+ export declare function drawModal(frame: Frame, layout: ModalLayout, spec: ModalSpec, palette: Palette): void;
63
+ export interface ListRow {
64
+ readonly text: string;
65
+ /** Columns the row is pushed right, for a tree. */
66
+ readonly indent?: number;
67
+ readonly dot?: {
68
+ readonly glyph: string;
69
+ readonly fg: number;
70
+ };
71
+ /** A group heading: drawn bold, never chosen. */
72
+ readonly heading?: boolean;
73
+ /** The keys of a help row, drawn in the accent colour before the text. */
74
+ readonly keys?: string;
75
+ /** Dim text, for a row that is context rather than a choice. */
76
+ readonly muted?: boolean;
77
+ }
78
+ export interface ListSpec {
79
+ readonly title: string;
80
+ readonly input?: {
81
+ readonly value: string;
82
+ };
83
+ readonly rows: readonly ListRow[];
84
+ /** The chosen row, or -1 when nothing is chosen (a help screen). */
85
+ readonly index: number;
86
+ readonly scroll: number;
87
+ readonly footer: string;
88
+ readonly width: number;
89
+ }
90
+ export interface ListLayout extends Surface {
91
+ readonly inputRect: Rect | undefined;
92
+ /** The first row shown. */
93
+ readonly top: number;
94
+ /** How many rows fit. */
95
+ readonly capacity: number;
96
+ }
97
+ export declare function layoutList(screen: Screen, spec: ListSpec): ListLayout;
98
+ export declare function drawList(frame: Frame, layout: ListLayout, spec: ListSpec, palette: Palette): void;
99
+ /** The box a menu or a context menu draws: rows of text at a point of the screen. */
100
+ export declare function layoutPopup(screen: Screen, at: {
101
+ readonly x: number;
102
+ readonly y: number;
103
+ }, items: readonly string[], minWidth?: number): Surface;
104
+ export declare function drawPopup(frame: Frame, surface: Surface, items: readonly string[], index: number, palette: Palette): void;
105
+ //# sourceMappingURL=overlay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../src/spaces/overlay.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAA;AAC5D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAE3C,wDAAwD;AACxD,MAAM,WAAW,MAAM;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAA;AAExD,gGAAgG;AAChG,MAAM,WAAW,OAAO;IACvB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAA;IACnB,QAAQ,CAAC,OAAO,EAAE,SAAS;QAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;QAAC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAA;KAAE,EAAE,CAAA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used pane's border, the active tab and keys in the mode bar. */
4
+ readonly accent: number;
5
+ /** The mode bar and the tab bar. */
6
+ readonly panelBg: number;
7
+ /** The tab bar's resting tabs. */
8
+ readonly surface: number;
9
+ /** Text on a resting tab: dim, except where the 16 colours leave no contrast. */
10
+ readonly tabRest: number;
11
+ /** The border of a pane without focus, and dim text. */
12
+ readonly dim: number;
13
+ readonly dimmer: number;
14
+ readonly text: number;
15
+ readonly subtext: number;
16
+ /** The resize mode's chip. */
17
+ readonly mauve: number;
18
+ readonly green: number;
19
+ readonly yellow: number;
20
+ readonly red: number;
21
+ readonly teal: number;
22
+ /** The faint tint behind the shown space and the pane in focus. */
23
+ readonly activeRow: number;
24
+ /** The stronger tint behind the row the navigate cursor is on. */
25
+ readonly cursorRow: number;
26
+ }
27
+ type Rgb = readonly [number, number, number];
28
+ /** The index of the 16 colours nearest to a true colour. */
29
+ export declare function nearestAnsi(color: Rgb): number;
30
+ /** Whether the terminal says it shows true colour. */
31
+ export declare function advertisesTruecolor(env: NodeJS.ProcessEnv): boolean;
32
+ /** The default palette in true colour, or its nearest 16 colours where that is not shown. */
33
+ export declare function paletteFor(truecolor: boolean): Palette;
34
+ export {};
35
+ //# sourceMappingURL=palette.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"palette.d.ts","sourceRoot":"","sources":["../../src/spaces/palette.ts"],"names":[],"mappings":"AAEA,oDAAoD;AACpD,MAAM,WAAW,OAAO;IACvB,0EAA0E;IAC1E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,oCAAoC;IACpC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,kCAAkC;IAClC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,iFAAiF;IACjF,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,wDAAwD;IACxD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,8BAA8B;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,mEAAmE;IACnE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,kEAAkE;IAClE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAC1B;AAED,KAAK,GAAG,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;AAqC5C,4DAA4D;AAC5D,wBAAgB,WAAW,CAAC,KAAK,EAAE,GAAG,GAAG,MAAM,CAc9C;AAED,sDAAsD;AACtD,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG,OAAO,CAEnE;AAED,6FAA6F;AAC7F,wBAAgB,UAAU,CAAC,SAAS,EAAE,OAAO,GAAG,OAAO,CAoBtD"}
@@ -0,0 +1,19 @@
1
+ import { type PeerRecord, type PeerSessionState } from '@namzu/sdk';
2
+ /**
3
+ * Where the host learns what its sessions are doing. Each session's own terminal
4
+ * publishes a live record and answers a ping; nothing is read off its screen.
5
+ */
6
+ export interface PeerSource {
7
+ /** Every live-session record in the runtime directory. */
8
+ records(): readonly PeerRecord[];
9
+ /** Asks a terminal for its state now; undefined when it did not answer. */
10
+ ping(record: PeerRecord): Promise<PeerSessionState | undefined>;
11
+ /** Calls `onChange` when records are written or removed; returns how to stop. */
12
+ watch?(onChange: () => void): () => void;
13
+ }
14
+ /** Picks the record that belongs to a host slot; a copy that came from a nested run loses to the session's own process. */
15
+ export declare function recordForSlot(records: readonly PeerRecord[], slot: string, pid: number | undefined): PeerRecord | undefined;
16
+ /** The record of the process the host itself runs in, for a session that is not a child: the one with its own id. */
17
+ export declare function recordForPid(records: readonly PeerRecord[], pid: number | undefined): PeerRecord | undefined;
18
+ export declare function createPeerSource(env: NodeJS.ProcessEnv): PeerSource | undefined;
19
+ //# sourceMappingURL=peers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"peers.d.ts","sourceRoot":"","sources":["../../src/spaces/peers.ts"],"names":[],"mappings":"AACA,OAAO,EAEN,KAAK,UAAU,EACf,KAAK,gBAAgB,EAGrB,MAAM,YAAY,CAAA;AAGnB;;;GAGG;AACH,MAAM,WAAW,UAAU;IAC1B,0DAA0D;IAC1D,OAAO,IAAI,SAAS,UAAU,EAAE,CAAA;IAChC,2EAA2E;IAC3E,IAAI,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC,CAAA;IAC/D,iFAAiF;IACjF,KAAK,CAAC,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAA;CACxC;AAED,2HAA2H;AAC3H,wBAAgB,aAAa,CAC5B,OAAO,EAAE,SAAS,UAAU,EAAE,EAC9B,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,GAAG,SAAS,GACrB,UAAU,GAAG,SAAS,CAGxB;AAED,qHAAqH;AACrH,wBAAgB,YAAY,CAC3B,OAAO,EAAE,SAAS,UAAU,EAAE,EAC9B,GAAG,EAAE,MAAM,GAAG,SAAS,GACrB,UAAU,GAAG,SAAS,CAGxB;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG,UAAU,GAAG,SAAS,CAwB/E"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * The key that puts the spaces host in navigate mode.
3
+ *
4
+ * It must be one control byte the host can see before the child does, so it is
5
+ * written `ctrl+<letter>` or `ctrl+space`. Keys that a terminal program needs for
6
+ * itself (interrupt, end of input, suspend) or that are the same byte as Tab,
7
+ * Enter, Backspace or Escape cannot be the prefix.
8
+ */
9
+ export interface Prefix {
10
+ /** The setting as written, normalised: `ctrl+b`, `ctrl+space`. */
11
+ readonly name: string;
12
+ /** The single byte the terminal sends for it. */
13
+ readonly byte: string;
14
+ }
15
+ export declare const DEFAULT_PREFIX: Prefix;
16
+ export declare function parsePrefix(value: string): Prefix | undefined;
17
+ /** The words shown for a prefix, for example `ctrl+b`. */
18
+ export declare function describePrefix(prefix: Prefix): string;
19
+ //# sourceMappingURL=prefix.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prefix.d.ts","sourceRoot":"","sources":["../../src/spaces/prefix.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,MAAM;IACtB,kEAAkE;IAClE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,iDAAiD;IACjD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACrB;AAED,eAAO,MAAM,cAAc,EAAE,MAAyC,CAAA;AAKtE,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAW7D;AAED,0DAA0D;AAC1D,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAErD"}
@@ -0,0 +1,111 @@
1
+ import type { PeerSessionState } from '@namzu/sdk';
2
+ import type { PaneSession } from './session.js';
3
+ import { type Dot, type SessionActivity } from './status.js';
4
+ import { type Node, type SplitDir } from './tiling.js';
5
+ /** One tab of a space: the tiling of its panes, which one has focus, and whether it is zoomed. */
6
+ export interface Tab {
7
+ /** The name the user gave it; without one the tab shows its number. */
8
+ name?: string;
9
+ root: Node;
10
+ focus: Entry;
11
+ zoomed: boolean;
12
+ }
13
+ /** A project folder; the sidebar lists these on top. */
14
+ export interface Space {
15
+ readonly id: string;
16
+ name: string;
17
+ readonly cwd: string;
18
+ /** The account id the last session started here ran on; the picker offers it first. */
19
+ lastAccount?: string;
20
+ readonly tabs: Tab[];
21
+ /** The tab shown when the space is shown. */
22
+ activeTab: Tab | undefined;
23
+ }
24
+ /** One pane's session. The terminal behind it starts only when the pane is first opened. */
25
+ export declare class Entry {
26
+ readonly slot: string;
27
+ readonly spaceId: string;
28
+ label: string;
29
+ child: PaneSession | undefined;
30
+ /** What the session's own terminal last reported through the peer feed. */
31
+ reported: PeerSessionState | undefined;
32
+ /** A turn finished while nobody was looking at this session. */
33
+ unseen: boolean;
34
+ /** Rows scrolled back into the session's history; 0 follows the live screen. */
35
+ scrollBack: number;
36
+ /** The label of the non-usual account the session is on, as its terminal last reported. */
37
+ account: string | undefined;
38
+ conversationId: string | undefined;
39
+ limited: boolean;
40
+ /** When the spent allowance is expected back (epoch ms), if the terminal knows. */
41
+ limitedUntil: number | undefined;
42
+ /** The account id picked when the session was started; what a first launch binds. */
43
+ pickedAccount: string | undefined;
44
+ /** The session the command itself started, which alone receives the command's options. */
45
+ first: boolean;
46
+ /** The conversation to open when the session first starts, for one restored from a previous run. */
47
+ resume: string | undefined;
48
+ /** Whether its conversation is already open in another terminal: it is not started. */
49
+ openElsewhere: boolean;
50
+ /** Restored from a previous run: its folder is looked at again each time it is opened. */
51
+ verifyFolder: boolean;
52
+ /** Its folder was not found when it was last opened, so it is not started. */
53
+ folderMissing: boolean;
54
+ /** The check for that is running. */
55
+ checking: boolean;
56
+ /** When its activity last changed, as a count that only grows; the priority order puts the newest first. */
57
+ changedAt: number;
58
+ private seen;
59
+ constructor(slot: string, spaceId: string, label: string);
60
+ activity(): SessionActivity;
61
+ dot(): Dot;
62
+ /** Records the activity just observed; returns the previous one. */
63
+ observe(): SessionActivity;
64
+ }
65
+ /**
66
+ * The spaces, their sessions and which session is shown. Knows nothing about
67
+ * terminals beyond what an entry's child reports about itself.
68
+ */
69
+ export declare class Roster {
70
+ readonly spaces: Space[];
71
+ readonly entries: Entry[];
72
+ private current;
73
+ private counter;
74
+ private ticks;
75
+ /** The session with focus: the focused pane of the shown tab of the shown space. */
76
+ get selected(): Entry | undefined;
77
+ spaceOf(entry: Entry): Space;
78
+ entriesOf(space: Space): Entry[];
79
+ tabOf(entry: Entry): Tab | undefined;
80
+ /** The tab being shown. */
81
+ get shownTab(): Tab | undefined;
82
+ addSpace(cwd: string, name: string): Space;
83
+ /** Moves a space to a place in the list; the others keep their order. False when nothing moved. */
84
+ moveSpace(space: Space, to: number): boolean;
85
+ /** A session that is not in any tab yet; give it a place with `addTab` or `splitBeside`. */
86
+ addSession(space: Space, slot: string, label?: string): Entry;
87
+ /** A tab holding one pane, after the space's others. */
88
+ addTab(space: Space, entry: Entry, name?: string): Tab;
89
+ /** A tab built from a whole tree, as when a layout is restored. */
90
+ addTree(space: Space, root: Node, focus: Entry, name?: string, zoomed?: boolean): Tab;
91
+ /** Splits the pane of `target` and puts `created` in the new half, which takes focus. */
92
+ splitBeside(target: Entry, created: Entry, dir: SplitDir): void;
93
+ /** `session N` for the smallest N not already used, so a name never repeats after a close. */
94
+ private freeLabel;
95
+ /** Whether the entry's pane is on screen: in the shown tab of the shown space. */
96
+ isVisible(entry: Entry): boolean;
97
+ /** Shows an entry's tab with that pane focused; looking at panes clears their "finished" mark. */
98
+ select(entry: Entry): void;
99
+ /** Re-reads an entry's activity and marks a finished turn nobody was watching. */
100
+ update(entry: Entry): void;
101
+ spaceDot(space: Space): Dot;
102
+ /**
103
+ * Removes a session and its pane: the neighbour takes the room and focus. A tab
104
+ * left empty goes, and so does a space left with no tab.
105
+ */
106
+ removeEntry(entry: Entry): void;
107
+ removeSpace(space: Space): Entry[];
108
+ /** Takes a tab out with its sessions. */
109
+ removeTab(space: Space, tab: Tab): Entry[];
110
+ }
111
+ //# sourceMappingURL=roster.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"roster.d.ts","sourceRoot":"","sources":["../../src/spaces/roster.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,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wDAAwD;IACxD,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,GAAG;IAYtD,mEAAmE;IACnE,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,UAAQ,GAAG,GAAG;IAOnF,yFAAyF;IACzF,WAAW,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,QAAQ,GAAG,IAAI;IAQ/D,8FAA8F;IAC9F,OAAO,CAAC,SAAS;IAKjB,kFAAkF;IAClF,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO;IAKhC,kGAAkG;IAClG,MAAM,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAa1B,kFAAkF;IAClF,MAAM,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAS1B,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,GAAG;IAI3B;;;OAGG;IACH,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAmC/B,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,EAAE;IAMlC,yCAAyC;IACzC,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,GAAG,KAAK,EAAE;CAK1C"}
@@ -0,0 +1,83 @@
1
+ import { type HostPty, type HostPtyModule } from '../terminal/pty.js';
2
+ import { HeadlessScreen } from '../terminal/screen.js';
3
+ import { type SignalName } from './signal.js';
4
+ /** What to run in a session's pseudo-terminal. */
5
+ export interface SessionSpec {
6
+ readonly file: string;
7
+ readonly args: readonly string[];
8
+ readonly cwd: string;
9
+ readonly env: Record<string, string>;
10
+ }
11
+ /**
12
+ * `starting` until the program prints its first byte, `running` after, `exited`
13
+ * once it is gone for any reason. How it ended is `ending`.
14
+ */
15
+ export type SessionStatus = 'starting' | 'running' | 'exited';
16
+ export type SessionEnding = 'finished' | 'stopped' | 'could-not-start';
17
+ /**
18
+ * What the host needs of a pane's session, whatever runs behind it: a program in
19
+ * a pseudo-terminal of its own (`ChildSession`) or the conversation this very
20
+ * process is running (`LocalSession`).
21
+ */
22
+ export interface PaneSession {
23
+ readonly status: SessionStatus;
24
+ readonly ending: SessionEnding | undefined;
25
+ readonly screen: HeadlessScreen;
26
+ readonly pid: number | undefined;
27
+ /** True for the session the host runs inside of: it is not started or hung up like a child. */
28
+ readonly local?: boolean;
29
+ write(data: string): void;
30
+ resize(cols: number, rows: number): void;
31
+ stop(signal?: 'SIGHUP' | 'SIGTERM' | 'SIGKILL'): void;
32
+ dispose(): void;
33
+ }
34
+ /**
35
+ * The session the host runs inside of. Its terminal is the process's own, so
36
+ * the host shows it through a mirror while the spaces screen is up and gives the
37
+ * terminal back to it for full screen.
38
+ */
39
+ export interface LocalPaneSession extends PaneSession {
40
+ readonly local: true;
41
+ /** Starts showing the session in a mirror of this size; its output goes to `screen`. */
42
+ attach(cols: number, rows: number): void;
43
+ /** Gives the real terminal back to the session, full size, and has it repaint. */
44
+ detach(): void;
45
+ /** Calls `listener` when the session's screen or status changes. */
46
+ observe(listener: () => void): void;
47
+ }
48
+ /**
49
+ * One child program in a pseudo-terminal, with a headless screen that follows
50
+ * what it prints. Everything that touches the pseudo-terminal after the program
51
+ * is gone is a no-op: writing or resizing a closed descriptor throws, and a host
52
+ * that dies on a child's exit would take every other session down with it.
53
+ */
54
+ export declare class ChildSession implements PaneSession {
55
+ readonly label: string;
56
+ private readonly spec;
57
+ private readonly onChange;
58
+ private readonly kill;
59
+ private readonly onSignal?;
60
+ status: SessionStatus;
61
+ ending: SessionEnding | undefined;
62
+ readonly screen: HeadlessScreen;
63
+ private pty;
64
+ private readonly signals;
65
+ private cols;
66
+ private rows;
67
+ constructor(label: string, spec: SessionSpec, size: {
68
+ cols: number;
69
+ rows: number;
70
+ }, onChange: () => void, kill?: (pty: HostPty, signal: 'SIGHUP' | 'SIGTERM' | 'SIGKILL') => void, onSignal?: ((signal: SignalName) => void) | undefined);
71
+ /** The process id of the program, once it has started. */
72
+ get pid(): number | undefined;
73
+ start(binding: HostPtyModule): void;
74
+ private finish;
75
+ /** Sends input to the program; nothing once it has ended. */
76
+ write(data: string): void;
77
+ /** Gives the program a new size; the screen follows even when the program is gone. */
78
+ resize(cols: number, rows: number): void;
79
+ /** Ends the program and what it started. */
80
+ stop(signal?: 'SIGHUP' | 'SIGTERM' | 'SIGKILL'): void;
81
+ dispose(): void;
82
+ }
83
+ //# sourceMappingURL=session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/spaces/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,aAAa,EAAmB,MAAM,oBAAoB,CAAA;AACtF,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,aAAa,CAAA;AAE3D,kDAAkD;AAClD,MAAM,WAAW,WAAW;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;IAChC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACpC;AAED;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,CAAA;AAC7D,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,SAAS,GAAG,iBAAiB,CAAA;AAItE;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC3B,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAA;IAC9B,QAAQ,CAAC,MAAM,EAAE,aAAa,GAAG,SAAS,CAAA;IAC1C,QAAQ,CAAC,MAAM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M,EACL,IAAI,EAAE,WAAW,EAClC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EACnB,QAAQ,EAAE,MAAM,IAAI,EACpB,IAAI,GAAE,CACtB,GAAG,EAAE,OAAO,EACZ,MAAM,EAAE,QAAQ,GAAG,SAAS,GAAG,SAAS,KACpC,IAAsB,EACV,QAAQ,CAAC,GAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,aAAA;IAOzD,0DAA0D;IAC1D,IAAI,GAAG,IAAI,MAAM,GAAG,SAAS,CAE5B;IAED,KAAK,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IA8BnC,OAAO,CAAC,MAAM;IAOd,6DAA6D;IAC7D,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IASzB,sFAAsF;IACtF,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAkBxC,4CAA4C;IAC5C,IAAI,CAAC,MAAM,GAAE,QAAQ,GAAG,SAAS,GAAG,SAAoB,GAAG,IAAI;IAK/D,OAAO,IAAI,IAAI;CAGf"}
@@ -0,0 +1,99 @@
1
+ import type { Frame, Rect } from '../terminal/host/frame.js';
2
+ import type { GitStatus } from './git.js';
3
+ import type { Palette } from './palette.js';
4
+ import type { Entry, Roster, Space } from './roster.js';
5
+ import { type Dot } from './status.js';
6
+ /** How the agents list is ordered: by space, or the ones that want a look first. */
7
+ export type AgentOrder = 'grouped' | 'priority';
8
+ export interface SidebarScroll {
9
+ /** The first space shown. */
10
+ spaces: number;
11
+ /** The first agent shown. */
12
+ agents: number;
13
+ }
14
+ export interface SidebarModel {
15
+ readonly roster: Roster;
16
+ readonly mode: 'terminal' | 'navigate';
17
+ /** Lines for the foot of the sidebar: a question, or a name being typed. */
18
+ readonly foot: readonly string[];
19
+ readonly scroll: SidebarScroll;
20
+ readonly palette: Palette;
21
+ readonly git: (cwd: string) => GitStatus | undefined;
22
+ readonly order: AgentOrder;
23
+ /** The share of the height the spaces section takes. */
24
+ readonly split: number;
25
+ /** Draw the thin rail of dots instead of the lists. */
26
+ readonly rail: boolean;
27
+ }
28
+ export type SidebarTarget = {
29
+ readonly kind: 'space';
30
+ readonly space: Space;
31
+ } | {
32
+ readonly kind: 'agent';
33
+ readonly entry: Entry;
34
+ } | {
35
+ readonly kind: 'new';
36
+ } | {
37
+ readonly kind: 'menu';
38
+ } | {
39
+ readonly kind: 'order';
40
+ } | {
41
+ readonly kind: 'collapse';
42
+ } | {
43
+ readonly kind: 'split';
44
+ };
45
+ /** The glyph and colour of a dot, for the tests that check what a row says. */
46
+ export declare function dotStyle(dot: Dot, palette: Palette): {
47
+ glyph: string;
48
+ fg: number;
49
+ };
50
+ /** Where each part of the sidebar sits, in rows from its top. */
51
+ export interface Geometry {
52
+ readonly rail: boolean;
53
+ readonly height: number;
54
+ /** The rule between the two sections. */
55
+ readonly ruleY: number;
56
+ /** The "spaces" header; none on the rail. */
57
+ readonly headerY: number | undefined;
58
+ readonly spaceTop: number;
59
+ /** Rows a space takes: 2 in the full sidebar, 1 on the rail. */
60
+ readonly spaceStep: 1 | 2;
61
+ /** How many spaces fit. */
62
+ readonly spaceCap: number;
63
+ /** The "new" and "menu" row; none on the rail. */
64
+ readonly footerY: number | undefined;
65
+ readonly agentHeaderY: number | undefined;
66
+ readonly agentTop: number;
67
+ readonly agentCap: number;
68
+ /** The row with the collapse toggle. */
69
+ readonly toggleY: number;
70
+ }
71
+ /** The rule's row for a split: each section keeps at least three rows where the height allows. */
72
+ export declare function ruleRow(height: number, split: number): number;
73
+ export declare function geometry(height: number, footLines: number, split: number, rail: boolean): Geometry;
74
+ /** Every session of every space, in the order the agents list shows them. */
75
+ export declare function agentList(roster: Roster, order: AgentOrder): Entry[];
76
+ /** Keeps both scrolls in range and, if asked, brings the shown space and session into view. */
77
+ export declare function clampScroll(scroll: SidebarScroll, model: Pick<SidebarModel, 'roster' | 'order' | 'foot' | 'split' | 'rail'>, height: number, reveal?: boolean): SidebarScroll;
78
+ /** Which scrollable list sidebar row `y` is in. */
79
+ export declare function regionAt(model: Pick<SidebarModel, 'foot' | 'split' | 'rail'>, height: number, y: number): 'spaces' | 'agents' | undefined;
80
+ /** The label of the order toggle: the order the list is in now. */
81
+ export declare function orderLabel(order: AgentOrder): string;
82
+ /** What a click at a cell of the sidebar lands on. */
83
+ export declare function hitTest(model: Pick<SidebarModel, 'roster' | 'scroll' | 'order' | 'foot' | 'split' | 'rail'>, width: number, height: number, x: number, y: number): SidebarTarget | undefined;
84
+ /**
85
+ * The second line of an agent: its tab (when the space has several), its name and
86
+ * its account. When they do not fit, the tab shrinks to its number, then the name
87
+ * gives way; the account is the part worth keeping.
88
+ */
89
+ export declare function agentDetail(roster: Roster, entry: Entry, width?: number): string;
90
+ /** The thumb of a list's scrollbar: where it starts and how long it is, in rows; none if the list fits. */
91
+ export declare function scrollThumb(total: number, cap: number, scroll: number, rows: number): {
92
+ start: number;
93
+ length: number;
94
+ } | undefined;
95
+ export declare function drawSidebar(frame: Frame, rect: Rect, model: SidebarModel): void;
96
+ export declare function drawRule(frame: Frame, rect: Rect, palette: Palette): void;
97
+ /** What the session area says over a session that is gone. */
98
+ export declare function endedMessage(ending: 'finished' | 'stopped' | 'could-not-start' | undefined, prefixName: string): string;
99
+ //# sourceMappingURL=sidebar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../src/spaces/sidebar.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAa,KAAK,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAA;AACvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AACzC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AACvD,OAAO,EAAE,KAAK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Y,GAAG,IAAI,CA0J/E;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAKzE;AAED,8DAA8D;AAC9D,wBAAgB,YAAY,CAC3B,MAAM,EAAE,UAAU,GAAG,SAAS,GAAG,iBAAiB,GAAG,SAAS,EAC9D,UAAU,EAAE,MAAM,GAChB,MAAM,CAKR"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * A private message from a hosted session to the host that owns its terminal.
3
+ *
4
+ * A session started by the spaces host cannot open the spaces screen itself: the
5
+ * host already is that screen. When its `←` gesture fires it writes this
6
+ * operating-system-command sequence to its own terminal instead; the host reads
7
+ * the session's output, strips the sequence and acts on it.
8
+ */
9
+ /** What a hosted session can ask of its host. */
10
+ export type SignalName = 'zoom-out';
11
+ export declare function isSignalName(name: string): name is SignalName;
12
+ /** The bytes a session writes to ask its host to leave it. */
13
+ export declare function spacesSignal(name: SignalName): string;
14
+ /** True when this process is a session the spaces host started directly. */
15
+ export declare function hostedByHost(env: NodeJS.ProcessEnv, ppid: number): boolean;
16
+ /**
17
+ * Takes the sequences out of a session's output as it arrives. A sequence cut
18
+ * in two by the terminal is held back until its other half comes; anything that
19
+ * turns out not to be ours is released unchanged.
20
+ */
21
+ export declare class SignalFilter {
22
+ private carry;
23
+ feed(data: string): {
24
+ text: string;
25
+ signals: SignalName[];
26
+ };
27
+ }
28
+ //# sourceMappingURL=signal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signal.d.ts","sourceRoot":"","sources":["../../src/spaces/signal.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,iDAAiD;AACjD,MAAM,MAAM,UAAU,GAAG,UAAU,CAAA;AAInC,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,UAAU,CAE7D;AAQD,8DAA8D;AAC9D,wBAAgB,YAAY,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAErD;AAED,4EAA4E;AAC5E,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAE1E;AAED;;;;GAIG;AACH,qBAAa,YAAY;IACxB,OAAO,CAAC,KAAK,CAAK;IAElB,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,UAAU,EAAE,CAAA;KAAE;CAwC3D"}
@@ -0,0 +1,20 @@
1
+ import type { PeerSessionState } from '@namzu/sdk';
2
+ /** What a session is doing, as the host knows it. */
3
+ export type SessionActivity = 'not-started' | 'starting' | 'working' | 'needs-approval' | 'idle' | 'exited';
4
+ /** The one dot a row shows. `done` is a finished turn nobody has looked at yet. */
5
+ export type Dot = 'blocked' | 'done' | 'working' | 'idle' | 'none';
6
+ /**
7
+ * Combines what the session's own terminal last reported with what the host sees
8
+ * of the process. A terminal that has not reported yet is `starting`.
9
+ */
10
+ export declare function deriveActivity(child: 'none' | 'starting' | 'running' | 'exited', reported: PeerSessionState | undefined): SessionActivity;
11
+ export declare function dotFor(activity: SessionActivity, unseen: boolean): Dot;
12
+ /** The most urgent dot of a group: blocked, then finished-unseen, then working, then idle. */
13
+ export declare function aggregateDot(dots: readonly Dot[]): Dot;
14
+ /** The plain words under a row, or nothing when the dot says enough. */
15
+ export declare function activityNote(activity: SessionActivity, unseen: boolean, ending?: 'finished' | 'stopped' | 'could-not-start'): string | undefined;
16
+ /** The note a space row carries when something in it wants a look. */
17
+ export declare function spaceNote(dot: Dot): string | undefined;
18
+ /** The note under a session whose account is out of allowance. */
19
+ export declare function limitedNote(until: number | undefined, now: number): string;
20
+ //# sourceMappingURL=status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/spaces/status.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAGlD,qDAAqD;AACrD,MAAM,MAAM,eAAe,GACxB,aAAa,GACb,UAAU,GACV,SAAS,GACT,gBAAgB,GAChB,MAAM,GACN,QAAQ,CAAA;AAEX,mFAAmF;AACnF,MAAM,MAAM,GAAG,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAA;AAIlE;;;GAGG;AACH,wBAAgB,cAAc,CAC7B,KAAK,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,EACjD,QAAQ,EAAE,gBAAgB,GAAG,SAAS,GACpC,eAAe,CAMjB;AAED,wBAAgB,MAAM,CAAC,QAAQ,EAAE,eAAe,EAAE,MAAM,EAAE,OAAO,GAAG,GAAG,CAKtE;AAED,8FAA8F;AAC9F,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,GAAG,EAAE,GAAG,GAAG,CAGtD;AAED,wEAAwE;AACxE,wBAAgB,YAAY,CAC3B,QAAQ,EAAE,eAAe,EACzB,MAAM,EAAE,OAAO,EACf,MAAM,CAAC,EAAE,UAAU,GAAG,SAAS,GAAG,iBAAiB,GACjD,MAAM,GAAG,SAAS,CAgBpB;AAED,sEAAsE;AACtE,wBAAgB,SAAS,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,GAAG,SAAS,CAItD;AAED,kEAAkE;AAClE,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAG1E"}