@moberg_hr/work-tree 2.9.2 → 2.9.3

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 (219) hide show
  1. package/dist/{account-3A7RQSUC.js → account-NG75VLRU.js} +14 -14
  2. package/dist/{add-repo-YGDJZ6HG.js → add-repo-EDU3QEYI.js} +9 -9
  3. package/dist/{answer-GHVFFKNF.js → answer-MHOJ2J6S.js} +7 -7
  4. package/dist/{attach-LWOZKLTF.js → attach-37JOJ4C3.js} +12 -12
  5. package/dist/bin.js +3 -3
  6. package/dist/{block-WVUT63QY.js → block-D5CAR53T.js} +8 -8
  7. package/dist/{broadcast-WM423JGR.js → broadcast-LLYHUWXA.js} +5 -5
  8. package/dist/{catchup-KJZTLHN7.js → catchup-2SL3JGA7.js} +10 -10
  9. package/dist/{chunk-SWKTDMLL.js → chunk-26OVU2AE.js} +4 -4
  10. package/dist/{chunk-PDWEPIL6.js → chunk-2JNW2AQ2.js} +2 -1
  11. package/dist/chunk-2JNW2AQ2.js.map +1 -0
  12. package/dist/{chunk-SBLK524A.js → chunk-37XQIG7F.js} +63 -97
  13. package/dist/chunk-37XQIG7F.js.map +1 -0
  14. package/dist/{chunk-Z2XY3PLX.js → chunk-3C3BKZ3H.js} +3 -3
  15. package/dist/{chunk-UB3DOOPB.js → chunk-63VY4YJM.js} +4 -4
  16. package/dist/{chunk-5NKXGQX4.js → chunk-6E2I2FBJ.js} +10 -10
  17. package/dist/{chunk-F4EWBHTA.js → chunk-6FVYSW3E.js} +2 -2
  18. package/dist/{chunk-BNGX2JGD.js → chunk-72IBYKIY.js} +2 -2
  19. package/dist/{chunk-4SZ7YW7N.js → chunk-7OUIZ2YQ.js} +53 -53
  20. package/dist/{chunk-3NXRBRRJ.js → chunk-AAYWHIIT.js} +11 -4
  21. package/dist/chunk-AAYWHIIT.js.map +1 -0
  22. package/dist/{chunk-4BZGUMP7.js → chunk-ATED7SAH.js} +3 -3
  23. package/dist/{chunk-JWWG624P.js → chunk-BSP2Z7B7.js} +2 -2
  24. package/dist/{chunk-VUNJVF6C.js → chunk-CCTALU3C.js} +2 -2
  25. package/dist/{chunk-5WEBLABB.js → chunk-CLBQ7ZC4.js} +2 -2
  26. package/dist/{chunk-6IUFNTBQ.js → chunk-CMO5YUZR.js} +2 -2
  27. package/dist/{chunk-GJ5V357G.js → chunk-CYWI3ZW7.js} +4 -4
  28. package/dist/{chunk-VGRZKBUK.js → chunk-DQCUYCMX.js} +2 -2
  29. package/dist/{chunk-TR7CTHJA.js → chunk-GRLKPVTP.js} +11 -8
  30. package/dist/chunk-GRLKPVTP.js.map +1 -0
  31. package/dist/{chunk-LIE5GVDG.js → chunk-HCVONKJI.js} +6 -6
  32. package/dist/{chunk-V4IHZJD4.js → chunk-HEPBANFJ.js} +5 -5
  33. package/dist/{chunk-AGTVDF4O.js → chunk-INQQGV2G.js} +3 -3
  34. package/dist/{chunk-AQJSY4CI.js → chunk-IPGH7TXJ.js} +2 -2
  35. package/dist/{chunk-JB6LU6JV.js → chunk-IWJXFNM4.js} +6 -6
  36. package/dist/{chunk-JFN67PRA.js → chunk-KSUOVFO3.js} +2 -2
  37. package/dist/{chunk-7NSQVIIK.js → chunk-MG5TTLYZ.js} +2 -2
  38. package/dist/chunk-NWIVXGSL.js +9 -0
  39. package/dist/{chunk-K2MOQVTJ.js → chunk-OTAZOIXK.js} +2 -2
  40. package/dist/{chunk-TQOHPNDW.js → chunk-P6BHOAQG.js} +2 -2
  41. package/dist/{chunk-BWD24JIP.js → chunk-PRDRRU2B.js} +4 -4
  42. package/dist/{chunk-H7GHJ3CR.js → chunk-PTWVOT7A.js} +5 -5
  43. package/dist/{chunk-XMWVBLMJ.js → chunk-QEVYCCKD.js} +2 -2
  44. package/dist/{chunk-2YXY6S7G.js → chunk-QHTXLCG7.js} +7 -7
  45. package/dist/{chunk-BV2PPIKP.js → chunk-QL36KN7X.js} +3 -3
  46. package/dist/{chunk-HP2QVRSQ.js → chunk-QSOEMCWQ.js} +6 -6
  47. package/dist/{chunk-YHSB7IVZ.js → chunk-RFINYWID.js} +3 -3
  48. package/dist/{chunk-XEAFWIN6.js → chunk-S3FMTEFR.js} +4 -4
  49. package/dist/{chunk-KVQNJCXH.js → chunk-T7AFYEQ7.js} +4 -4
  50. package/dist/{chunk-JT5AR7PO.js → chunk-TPSFJSO7.js} +72 -3
  51. package/dist/chunk-TPSFJSO7.js.map +1 -0
  52. package/dist/{chunk-MPY2ZQBL.js → chunk-VUAVPBFR.js} +4 -4
  53. package/dist/{chunk-GBMY7IMP.js → chunk-WC534PXU.js} +4 -4
  54. package/dist/{chunk-XTDTM6JI.js → chunk-WTQ2QCAG.js} +3 -3
  55. package/dist/{chunk-ZGT4ZDGG.js → chunk-WXE7D44E.js} +3 -3
  56. package/dist/{chunk-PKXHK5CJ.js → chunk-WXMWZRBH.js} +2 -2
  57. package/dist/{chunk-RG7NJEN7.js → chunk-XVNRP7XE.js} +6 -6
  58. package/dist/{chunk-2Z2O5LEA.js → chunk-ZI2KXTKM.js} +2 -2
  59. package/dist/{cleanup-7E3YWQUC.js → cleanup-5PSLKZLF.js} +20 -20
  60. package/dist/{cli-BHIBPUQG.js → cli-AF7636FA.js} +4 -4
  61. package/dist/{config-TUJNIUIO.js → config-6MSITKGB.js} +7 -7
  62. package/dist/{diff-PZKOXAU3.js → diff-Q7MV6YGJ.js} +8 -8
  63. package/dist/{digest-XHDDBXA6.js → digest-KUMVYXKZ.js} +7 -7
  64. package/dist/{fork-HYWZW72R.js → fork-OFENISEM.js} +18 -18
  65. package/dist/{history-MRRY2VTS.js → history-5WKRWARZ.js} +5 -5
  66. package/dist/{hook-OWP4H2MT.js → hook-ARS32DG2.js} +9 -9
  67. package/dist/{hydrate-ZTGARW3U.js → hydrate-LCT6DVB3.js} +5 -5
  68. package/dist/{init-7VISW3JJ.js → init-FJKPEY5N.js} +6 -6
  69. package/dist/{install-skills-IIMTRQ4K.js → install-skills-UYAFVJBA.js} +5 -5
  70. package/dist/install-skills-bin.js +4 -4
  71. package/dist/{list-5XWYT37A.js → list-GTKP5FAW.js} +5 -5
  72. package/dist/{move-PSAODKRK.js → move-GOCLEFGZ.js} +8 -8
  73. package/dist/{note-7WQ2YC2F.js → note-B7TQBXQF.js} +7 -7
  74. package/dist/{overlaps-R27DEX36.js → overlaps-UKQHIJMU.js} +7 -7
  75. package/dist/{pin-LS4WPLOE.js → pin-UZZCDK7M.js} +7 -7
  76. package/dist/{pr-SMEC5O7O.js → pr-NU2ME2XW.js} +8 -8
  77. package/dist/{prune-VA3V5B2I.js → prune-IZGEYTSB.js} +18 -18
  78. package/dist/{pty-host-PN4A3X2Y.js → pty-host-AWDIKPQN.js} +46 -42
  79. package/dist/pty-host-AWDIKPQN.js.map +1 -0
  80. package/dist/{read-75DP75TI.js → read-U6GBGA5E.js} +7 -7
  81. package/dist/{recent-YDSLMD6Y.js → recent-2DUMLUDG.js} +6 -6
  82. package/dist/{remove-XPSU2VTR.js → remove-OXUP4O33.js} +17 -17
  83. package/dist/{restart-7EPW5VDV.js → restart-QEW4DJC3.js} +7 -7
  84. package/dist/{resume-26Y6G4UT.js → resume-K45IT4QO.js} +6 -6
  85. package/dist/{run-IIURYUD2.js → run-42LORGPS.js} +5 -5
  86. package/dist/{screen-AORRCOZQ.js → screen-2TLIUH3G.js} +7 -7
  87. package/dist/{search-Z3XD7ZNQ.js → search-7E4B2KX6.js} +5 -5
  88. package/dist/{section-6N7J4Y6J.js → section-OVA5VD7L.js} +7 -7
  89. package/dist/{send-SHHXHICL.js → send-BJY5CYLO.js} +8 -8
  90. package/dist/{sessions-AD5HPY2L.js → sessions-4A24ZORW.js} +15 -15
  91. package/dist/{snooze-JZMIVMNS.js → snooze-WIVKB3GH.js} +7 -7
  92. package/dist/{start-6VNWRLPK.js → start-G6GR533S.js} +7 -7
  93. package/dist/{state-OZF4S7PG.js → state-S3DGLT4J.js} +2 -2
  94. package/dist/{status-YRBJR4YB.js → status-BTAWY6JQ.js} +5 -5
  95. package/dist/{statusline-RSQMMCRN.js → statusline-WLXEU5DM.js} +3 -3
  96. package/dist/{stop-A2Q4CO6Z.js → stop-FN6EPFJ4.js} +7 -7
  97. package/dist/{sync-GXXBOQ4W.js → sync-T3BSHX6Q.js} +18 -18
  98. package/dist/{time-XKEMSDMN.js → time-5CH5O5MZ.js} +8 -8
  99. package/dist/{time-actions-DB7OQ2IS.js → time-actions-XEUQ3UF7.js} +3 -3
  100. package/dist/{timesheet-ZAZXN6LK.js → timesheet-FMQKPS5S.js} +10 -10
  101. package/dist/{todo-ODF7RI27.js → todo-23COLGR2.js} +2 -2
  102. package/dist/{tree-HJGFWO6G.js → tree-T33VU473.js} +14 -14
  103. package/dist/{update-6427PE7F.js → update-PJRSKQZ2.js} +9 -9
  104. package/dist/{usage-HIXH42ZH.js → usage-TL66LWO4.js} +7 -7
  105. package/dist/{wait-VHPP2B7P.js → wait-YIEJO6YM.js} +8 -8
  106. package/dist/wd-bin.js +3 -3
  107. package/dist/web/assets/PtyView-DnDd6jLI.js +96 -0
  108. package/dist/web/assets/PtyView-DnDd6jLI.js.map +1 -0
  109. package/dist/web/assets/index-DxozAoUO.css +1 -0
  110. package/dist/web/assets/{index-C4cR3Hwy.js → index-InmdAx6g.js} +51 -51
  111. package/dist/web/assets/index-InmdAx6g.js.map +1 -0
  112. package/dist/web/index.html +2 -2
  113. package/dist/{web-QTXU66K5.js → web-IYUNJMQD.js} +204 -90
  114. package/dist/web-IYUNJMQD.js.map +1 -0
  115. package/npm-shrinkwrap.json +2 -2
  116. package/package.json +1 -1
  117. package/dist/chunk-3NXRBRRJ.js.map +0 -1
  118. package/dist/chunk-4MVT7QPZ.js +0 -9
  119. package/dist/chunk-JT5AR7PO.js.map +0 -1
  120. package/dist/chunk-PDWEPIL6.js.map +0 -1
  121. package/dist/chunk-SBLK524A.js.map +0 -1
  122. package/dist/chunk-TR7CTHJA.js.map +0 -1
  123. package/dist/pty-host-PN4A3X2Y.js.map +0 -1
  124. package/dist/web/assets/PtyView-B7zFUh_M.js +0 -96
  125. package/dist/web/assets/PtyView-B7zFUh_M.js.map +0 -1
  126. package/dist/web/assets/index-BAxeogV4.css +0 -1
  127. package/dist/web/assets/index-C4cR3Hwy.js.map +0 -1
  128. package/dist/web-QTXU66K5.js.map +0 -1
  129. /package/dist/{account-3A7RQSUC.js.map → account-NG75VLRU.js.map} +0 -0
  130. /package/dist/{add-repo-YGDJZ6HG.js.map → add-repo-EDU3QEYI.js.map} +0 -0
  131. /package/dist/{answer-GHVFFKNF.js.map → answer-MHOJ2J6S.js.map} +0 -0
  132. /package/dist/{attach-LWOZKLTF.js.map → attach-37JOJ4C3.js.map} +0 -0
  133. /package/dist/{block-WVUT63QY.js.map → block-D5CAR53T.js.map} +0 -0
  134. /package/dist/{broadcast-WM423JGR.js.map → broadcast-LLYHUWXA.js.map} +0 -0
  135. /package/dist/{catchup-KJZTLHN7.js.map → catchup-2SL3JGA7.js.map} +0 -0
  136. /package/dist/{chunk-SWKTDMLL.js.map → chunk-26OVU2AE.js.map} +0 -0
  137. /package/dist/{chunk-Z2XY3PLX.js.map → chunk-3C3BKZ3H.js.map} +0 -0
  138. /package/dist/{chunk-UB3DOOPB.js.map → chunk-63VY4YJM.js.map} +0 -0
  139. /package/dist/{chunk-5NKXGQX4.js.map → chunk-6E2I2FBJ.js.map} +0 -0
  140. /package/dist/{chunk-F4EWBHTA.js.map → chunk-6FVYSW3E.js.map} +0 -0
  141. /package/dist/{chunk-BNGX2JGD.js.map → chunk-72IBYKIY.js.map} +0 -0
  142. /package/dist/{chunk-4SZ7YW7N.js.map → chunk-7OUIZ2YQ.js.map} +0 -0
  143. /package/dist/{chunk-4BZGUMP7.js.map → chunk-ATED7SAH.js.map} +0 -0
  144. /package/dist/{chunk-JWWG624P.js.map → chunk-BSP2Z7B7.js.map} +0 -0
  145. /package/dist/{chunk-VUNJVF6C.js.map → chunk-CCTALU3C.js.map} +0 -0
  146. /package/dist/{chunk-5WEBLABB.js.map → chunk-CLBQ7ZC4.js.map} +0 -0
  147. /package/dist/{chunk-6IUFNTBQ.js.map → chunk-CMO5YUZR.js.map} +0 -0
  148. /package/dist/{chunk-GJ5V357G.js.map → chunk-CYWI3ZW7.js.map} +0 -0
  149. /package/dist/{chunk-VGRZKBUK.js.map → chunk-DQCUYCMX.js.map} +0 -0
  150. /package/dist/{chunk-LIE5GVDG.js.map → chunk-HCVONKJI.js.map} +0 -0
  151. /package/dist/{chunk-V4IHZJD4.js.map → chunk-HEPBANFJ.js.map} +0 -0
  152. /package/dist/{chunk-AGTVDF4O.js.map → chunk-INQQGV2G.js.map} +0 -0
  153. /package/dist/{chunk-AQJSY4CI.js.map → chunk-IPGH7TXJ.js.map} +0 -0
  154. /package/dist/{chunk-JB6LU6JV.js.map → chunk-IWJXFNM4.js.map} +0 -0
  155. /package/dist/{chunk-JFN67PRA.js.map → chunk-KSUOVFO3.js.map} +0 -0
  156. /package/dist/{chunk-7NSQVIIK.js.map → chunk-MG5TTLYZ.js.map} +0 -0
  157. /package/dist/{chunk-4MVT7QPZ.js.map → chunk-NWIVXGSL.js.map} +0 -0
  158. /package/dist/{chunk-K2MOQVTJ.js.map → chunk-OTAZOIXK.js.map} +0 -0
  159. /package/dist/{chunk-TQOHPNDW.js.map → chunk-P6BHOAQG.js.map} +0 -0
  160. /package/dist/{chunk-BWD24JIP.js.map → chunk-PRDRRU2B.js.map} +0 -0
  161. /package/dist/{chunk-H7GHJ3CR.js.map → chunk-PTWVOT7A.js.map} +0 -0
  162. /package/dist/{chunk-XMWVBLMJ.js.map → chunk-QEVYCCKD.js.map} +0 -0
  163. /package/dist/{chunk-2YXY6S7G.js.map → chunk-QHTXLCG7.js.map} +0 -0
  164. /package/dist/{chunk-BV2PPIKP.js.map → chunk-QL36KN7X.js.map} +0 -0
  165. /package/dist/{chunk-HP2QVRSQ.js.map → chunk-QSOEMCWQ.js.map} +0 -0
  166. /package/dist/{chunk-YHSB7IVZ.js.map → chunk-RFINYWID.js.map} +0 -0
  167. /package/dist/{chunk-XEAFWIN6.js.map → chunk-S3FMTEFR.js.map} +0 -0
  168. /package/dist/{chunk-KVQNJCXH.js.map → chunk-T7AFYEQ7.js.map} +0 -0
  169. /package/dist/{chunk-MPY2ZQBL.js.map → chunk-VUAVPBFR.js.map} +0 -0
  170. /package/dist/{chunk-GBMY7IMP.js.map → chunk-WC534PXU.js.map} +0 -0
  171. /package/dist/{chunk-XTDTM6JI.js.map → chunk-WTQ2QCAG.js.map} +0 -0
  172. /package/dist/{chunk-ZGT4ZDGG.js.map → chunk-WXE7D44E.js.map} +0 -0
  173. /package/dist/{chunk-PKXHK5CJ.js.map → chunk-WXMWZRBH.js.map} +0 -0
  174. /package/dist/{chunk-RG7NJEN7.js.map → chunk-XVNRP7XE.js.map} +0 -0
  175. /package/dist/{chunk-2Z2O5LEA.js.map → chunk-ZI2KXTKM.js.map} +0 -0
  176. /package/dist/{cleanup-7E3YWQUC.js.map → cleanup-5PSLKZLF.js.map} +0 -0
  177. /package/dist/{cli-BHIBPUQG.js.map → cli-AF7636FA.js.map} +0 -0
  178. /package/dist/{config-TUJNIUIO.js.map → config-6MSITKGB.js.map} +0 -0
  179. /package/dist/{diff-PZKOXAU3.js.map → diff-Q7MV6YGJ.js.map} +0 -0
  180. /package/dist/{digest-XHDDBXA6.js.map → digest-KUMVYXKZ.js.map} +0 -0
  181. /package/dist/{fork-HYWZW72R.js.map → fork-OFENISEM.js.map} +0 -0
  182. /package/dist/{history-MRRY2VTS.js.map → history-5WKRWARZ.js.map} +0 -0
  183. /package/dist/{hook-OWP4H2MT.js.map → hook-ARS32DG2.js.map} +0 -0
  184. /package/dist/{hydrate-ZTGARW3U.js.map → hydrate-LCT6DVB3.js.map} +0 -0
  185. /package/dist/{init-7VISW3JJ.js.map → init-FJKPEY5N.js.map} +0 -0
  186. /package/dist/{install-skills-IIMTRQ4K.js.map → install-skills-UYAFVJBA.js.map} +0 -0
  187. /package/dist/{list-5XWYT37A.js.map → list-GTKP5FAW.js.map} +0 -0
  188. /package/dist/{move-PSAODKRK.js.map → move-GOCLEFGZ.js.map} +0 -0
  189. /package/dist/{note-7WQ2YC2F.js.map → note-B7TQBXQF.js.map} +0 -0
  190. /package/dist/{overlaps-R27DEX36.js.map → overlaps-UKQHIJMU.js.map} +0 -0
  191. /package/dist/{pin-LS4WPLOE.js.map → pin-UZZCDK7M.js.map} +0 -0
  192. /package/dist/{pr-SMEC5O7O.js.map → pr-NU2ME2XW.js.map} +0 -0
  193. /package/dist/{prune-VA3V5B2I.js.map → prune-IZGEYTSB.js.map} +0 -0
  194. /package/dist/{read-75DP75TI.js.map → read-U6GBGA5E.js.map} +0 -0
  195. /package/dist/{recent-YDSLMD6Y.js.map → recent-2DUMLUDG.js.map} +0 -0
  196. /package/dist/{remove-XPSU2VTR.js.map → remove-OXUP4O33.js.map} +0 -0
  197. /package/dist/{restart-7EPW5VDV.js.map → restart-QEW4DJC3.js.map} +0 -0
  198. /package/dist/{resume-26Y6G4UT.js.map → resume-K45IT4QO.js.map} +0 -0
  199. /package/dist/{run-IIURYUD2.js.map → run-42LORGPS.js.map} +0 -0
  200. /package/dist/{screen-AORRCOZQ.js.map → screen-2TLIUH3G.js.map} +0 -0
  201. /package/dist/{search-Z3XD7ZNQ.js.map → search-7E4B2KX6.js.map} +0 -0
  202. /package/dist/{section-6N7J4Y6J.js.map → section-OVA5VD7L.js.map} +0 -0
  203. /package/dist/{send-SHHXHICL.js.map → send-BJY5CYLO.js.map} +0 -0
  204. /package/dist/{sessions-AD5HPY2L.js.map → sessions-4A24ZORW.js.map} +0 -0
  205. /package/dist/{snooze-JZMIVMNS.js.map → snooze-WIVKB3GH.js.map} +0 -0
  206. /package/dist/{start-6VNWRLPK.js.map → start-G6GR533S.js.map} +0 -0
  207. /package/dist/{state-OZF4S7PG.js.map → state-S3DGLT4J.js.map} +0 -0
  208. /package/dist/{status-YRBJR4YB.js.map → status-BTAWY6JQ.js.map} +0 -0
  209. /package/dist/{statusline-RSQMMCRN.js.map → statusline-WLXEU5DM.js.map} +0 -0
  210. /package/dist/{stop-A2Q4CO6Z.js.map → stop-FN6EPFJ4.js.map} +0 -0
  211. /package/dist/{sync-GXXBOQ4W.js.map → sync-T3BSHX6Q.js.map} +0 -0
  212. /package/dist/{time-XKEMSDMN.js.map → time-5CH5O5MZ.js.map} +0 -0
  213. /package/dist/{time-actions-DB7OQ2IS.js.map → time-actions-XEUQ3UF7.js.map} +0 -0
  214. /package/dist/{timesheet-ZAZXN6LK.js.map → timesheet-FMQKPS5S.js.map} +0 -0
  215. /package/dist/{todo-ODF7RI27.js.map → todo-23COLGR2.js.map} +0 -0
  216. /package/dist/{tree-HJGFWO6G.js.map → tree-T33VU473.js.map} +0 -0
  217. /package/dist/{update-6427PE7F.js.map → update-PJRSKQZ2.js.map} +0 -0
  218. /package/dist/{usage-HIXH42ZH.js.map → usage-TL66LWO4.js.map} +0 -0
  219. /package/dist/{wait-VHPP2B7P.js.map → wait-YIEJO6YM.js.map} +0 -0
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  computeDiff,
4
4
  isInsideRoot
5
- } from "./chunk-JWWG624P.js";
5
+ } from "./chunk-BSP2Z7B7.js";
6
6
  import {
7
7
  packageRoot
8
8
  } from "./chunk-LNHSBM4L.js";
@@ -12,7 +12,7 @@ import {
12
12
  import {
13
13
  createFsWatcher,
14
14
  loadHistory
15
- } from "./chunk-SBLK524A.js";
15
+ } from "./chunk-37XQIG7F.js";
16
16
  import {
17
17
  spawn_default
18
18
  } from "./chunk-RCYI7SRA.js";
@@ -512,4 +512,4 @@ export {
512
512
  submitReviewSchema,
513
513
  resolveSchema
514
514
  };
515
- //# sourceMappingURL=chunk-Z2XY3PLX.js.map
515
+ //# sourceMappingURL=chunk-3C3BKZ3H.js.map
@@ -1,15 +1,15 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  computeRangeDiff
4
- } from "./chunk-JWWG624P.js";
4
+ } from "./chunk-BSP2Z7B7.js";
5
5
  import {
6
6
  loadManifest
7
- } from "./chunk-SBLK524A.js";
7
+ } from "./chunk-37XQIG7F.js";
8
8
  import {
9
9
  agentSettings,
10
10
  internalAgent,
11
11
  internalRunEnv
12
- } from "./chunk-MPY2ZQBL.js";
12
+ } from "./chunk-VUAVPBFR.js";
13
13
  import {
14
14
  killTree
15
15
  } from "./chunk-4NITDMDH.js";
@@ -187,4 +187,4 @@ export {
187
187
  runInternal,
188
188
  summarizeCheckpoint
189
189
  };
190
- //# sourceMappingURL=chunk-UB3DOOPB.js.map
190
+ //# sourceMappingURL=chunk-63VY4YJM.js.map
@@ -1,33 +1,33 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  listReplies
4
- } from "./chunk-H7GHJ3CR.js";
4
+ } from "./chunk-PTWVOT7A.js";
5
5
  import {
6
6
  examineWorktree,
7
7
  normPath
8
8
  } from "./chunk-AKMPF72Y.js";
9
9
  import {
10
10
  shownState
11
- } from "./chunk-AGTVDF4O.js";
11
+ } from "./chunk-INQQGV2G.js";
12
12
  import {
13
13
  runningFromNames,
14
14
  stopRunningFrom
15
15
  } from "./chunk-SG5LUMGE.js";
16
16
  import {
17
17
  runInternal
18
- } from "./chunk-UB3DOOPB.js";
18
+ } from "./chunk-63VY4YJM.js";
19
19
  import {
20
20
  disposePty
21
- } from "./chunk-TR7CTHJA.js";
21
+ } from "./chunk-GRLKPVTP.js";
22
22
  import {
23
23
  checkedOutBranch,
24
24
  readPendingForSession
25
- } from "./chunk-XMWVBLMJ.js";
25
+ } from "./chunk-QEVYCCKD.js";
26
26
  import {
27
27
  saveIgnored,
28
28
  teardownWorktree,
29
29
  worktreeFor
30
- } from "./chunk-GBMY7IMP.js";
30
+ } from "./chunk-WC534PXU.js";
31
31
  import {
32
32
  isLeftover
33
33
  } from "./chunk-KUCMJHQW.js";
@@ -50,16 +50,16 @@ import {
50
50
  setSessionArchived,
51
51
  stopDev,
52
52
  turnInProgress
53
- } from "./chunk-SBLK524A.js";
53
+ } from "./chunk-37XQIG7F.js";
54
54
  import {
55
55
  sessionIdFor
56
56
  } from "./chunk-YYBXQBW2.js";
57
57
  import {
58
58
  agentOf
59
- } from "./chunk-MPY2ZQBL.js";
59
+ } from "./chunk-VUAVPBFR.js";
60
60
  import {
61
61
  loadConfig
62
- } from "./chunk-PDWEPIL6.js";
62
+ } from "./chunk-2JNW2AQ2.js";
63
63
 
64
64
  // src/core/archive/session-archive-deps.ts
65
65
  import fs from "fs";
@@ -282,4 +282,4 @@ export {
282
282
  archiveMergedSession,
283
283
  defaultArchiveDeps
284
284
  };
285
- //# sourceMappingURL=chunk-5NKXGQX4.js.map
285
+ //# sourceMappingURL=chunk-6E2I2FBJ.js.map
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  DISPLAY_LABEL,
4
4
  displayStatus
5
- } from "./chunk-K2MOQVTJ.js";
5
+ } from "./chunk-OTAZOIXK.js";
6
6
  import {
7
7
  atomicWriteFile
8
8
  } from "./chunk-ZXHMC7UO.js";
@@ -146,4 +146,4 @@ export {
146
146
  assistantContextMonth,
147
147
  readAssistantContext
148
148
  };
149
- //# sourceMappingURL=chunk-F4EWBHTA.js.map
149
+ //# sourceMappingURL=chunk-6FVYSW3E.js.map
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  DEFAULT_ACCOUNT
4
- } from "./chunk-PDWEPIL6.js";
4
+ } from "./chunk-2JNW2AQ2.js";
5
5
  import {
6
6
  report
7
7
  } from "./chunk-AU27USPZ.js";
@@ -166,4 +166,4 @@ export {
166
166
  configDirEnv,
167
167
  accountEnv
168
168
  };
169
- //# sourceMappingURL=chunk-BNGX2JGD.js.map
169
+ //# sourceMappingURL=chunk-72IBYKIY.js.map
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  VERSION
4
- } from "./chunk-4MVT7QPZ.js";
4
+ } from "./chunk-NWIVXGSL.js";
5
5
  import {
6
6
  resolveProjectTarget
7
7
  } from "./chunk-J36ULZBO.js";
@@ -11,7 +11,7 @@ import {
11
11
  } from "./chunk-3N3UQEC4.js";
12
12
  import {
13
13
  loadConfig
14
- } from "./chunk-PDWEPIL6.js";
14
+ } from "./chunk-2JNW2AQ2.js";
15
15
 
16
16
  // src/cli.ts
17
17
  import chalk from "chalk";
@@ -136,7 +136,7 @@ function completeRepoBranches(alias, current, config, done) {
136
136
  }
137
137
  async function recordedGroupBranches(groupName) {
138
138
  try {
139
- const { loadHistory } = await import("./history-MRRY2VTS.js");
139
+ const { loadHistory } = await import("./history-5WKRWARZ.js");
140
140
  return loadHistory().filter((s) => s.target === groupName && s.isGroup && !s.archivedAt).map((s) => s.branch);
141
141
  } catch {
142
142
  return [];
@@ -172,55 +172,55 @@ async function completeGroupBranches(groupName, repoAliases, current, config, do
172
172
 
173
173
  // src/cli.ts
174
174
  var COMMANDS = [
175
- { names: ["init"], load: async () => (await import("./init-7VISW3JJ.js")).initCommand },
176
- { names: ["config"], load: async () => (await import("./config-TUJNIUIO.js")).configCommand },
177
- { names: ["tree", "t"], load: async () => (await import("./tree-HJGFWO6G.js")).treeCommand },
178
- { names: ["remove"], load: async () => (await import("./remove-XPSU2VTR.js")).removeCommand },
179
- { names: ["fork"], load: async () => (await import("./fork-HYWZW72R.js")).forkCommand },
180
- { names: ["add-repo"], load: async () => (await import("./add-repo-YGDJZ6HG.js")).addRepoCommand },
181
- { names: ["update"], load: async () => (await import("./update-6427PE7F.js")).updateCommand },
182
- { names: ["catchup"], load: async () => (await import("./catchup-KJZTLHN7.js")).catchupCommand },
183
- { names: ["snooze"], load: async () => (await import("./snooze-JZMIVMNS.js")).snoozeCommand },
184
- { names: ["pin"], load: async () => (await import("./pin-LS4WPLOE.js")).pinCommand },
185
- { names: ["section"], load: async () => (await import("./section-6N7J4Y6J.js")).sectionCommand },
186
- { names: ["note"], load: async () => (await import("./note-7WQ2YC2F.js")).noteCommand },
187
- { names: ["block"], load: async () => (await import("./block-WVUT63QY.js")).blockCommand },
188
- { names: ["time"], load: async () => (await import("./time-XKEMSDMN.js")).timeCommand },
189
- { names: ["account"], load: async () => (await import("./account-3A7RQSUC.js")).accountCommand },
190
- { names: ["usage"], load: async () => (await import("./usage-HIXH42ZH.js")).usageCommand },
191
- { names: ["read"], load: async () => (await import("./read-75DP75TI.js")).readCommand },
192
- { names: ["screen"], load: async () => (await import("./screen-AORRCOZQ.js")).screenCommand },
193
- { names: ["send"], load: async () => (await import("./send-SHHXHICL.js")).sendCommand },
194
- { names: ["wait"], load: async () => (await import("./wait-VHPP2B7P.js")).waitCommand },
195
- { names: ["start"], load: async () => (await import("./start-6VNWRLPK.js")).startCommand },
196
- { names: ["stop"], load: async () => (await import("./stop-A2Q4CO6Z.js")).stopCommand },
197
- { names: ["restart"], load: async () => (await import("./restart-7EPW5VDV.js")).restartCommand },
198
- { names: ["answer"], load: async () => (await import("./answer-GHVFFKNF.js")).answerCommand },
199
- { names: ["list"], load: async () => (await import("./list-5XWYT37A.js")).listCommand },
200
- { names: ["status"], load: async () => (await import("./status-YRBJR4YB.js")).statusCommand },
201
- { names: ["recent"], load: async () => (await import("./recent-YDSLMD6Y.js")).recentCommand },
202
- { names: ["resume"], load: async () => (await import("./resume-26Y6G4UT.js")).resumeCommand },
203
- { names: ["sessions"], load: async () => (await import("./sessions-AD5HPY2L.js")).sessionsCommand },
204
- { names: ["digest"], load: async () => (await import("./digest-XHDDBXA6.js")).digestCommand },
205
- { names: ["cleanup"], load: async () => (await import("./cleanup-7E3YWQUC.js")).cleanupCommand },
206
- { names: ["overlaps"], load: async () => (await import("./overlaps-R27DEX36.js")).overlapsCommand },
207
- { names: ["search"], load: async () => (await import("./search-Z3XD7ZNQ.js")).searchCommand },
208
- { names: ["pr"], load: async () => (await import("./pr-SMEC5O7O.js")).prCommand },
209
- { names: ["timesheet"], load: async () => (await import("./timesheet-ZAZXN6LK.js")).timesheetCommand },
210
- { names: ["prune"], load: async () => (await import("./prune-VA3V5B2I.js")).pruneCommand },
211
- { names: ["sync"], load: async () => (await import("./sync-GXXBOQ4W.js")).syncCommand },
212
- { names: ["todo"], load: async () => (await import("./todo-ODF7RI27.js")).todoCommand },
213
- { names: ["hydrate"], load: async () => (await import("./hydrate-ZTGARW3U.js")).hydrateCommand },
214
- { names: ["diff"], load: async () => (await import("./diff-PZKOXAU3.js")).diffCommand },
215
- { names: ["web"], load: async () => (await import("./web-QTXU66K5.js")).webCommand },
216
- { names: ["hook"], load: async () => (await import("./hook-OWP4H2MT.js")).hookCommand },
217
- { names: ["run"], load: async () => (await import("./run-IIURYUD2.js")).runCommand },
218
- { names: ["broadcast"], load: async () => (await import("./broadcast-WM423JGR.js")).broadcastCommand },
219
- { names: ["attach", "a"], load: async () => (await import("./attach-LWOZKLTF.js")).attachCommand },
220
- { names: ["pty-host"], load: async () => (await import("./pty-host-PN4A3X2Y.js")).ptyHostCommand },
221
- { names: ["state"], load: async () => (await import("./state-OZF4S7PG.js")).stateCommand },
222
- { names: ["move"], load: async () => (await import("./move-PSAODKRK.js")).moveCommand },
223
- { names: ["install-skills"], load: async () => (await import("./install-skills-IIMTRQ4K.js")).installSkillsCommand },
175
+ { names: ["init"], load: async () => (await import("./init-FJKPEY5N.js")).initCommand },
176
+ { names: ["config"], load: async () => (await import("./config-6MSITKGB.js")).configCommand },
177
+ { names: ["tree", "t"], load: async () => (await import("./tree-T33VU473.js")).treeCommand },
178
+ { names: ["remove"], load: async () => (await import("./remove-OXUP4O33.js")).removeCommand },
179
+ { names: ["fork"], load: async () => (await import("./fork-OFENISEM.js")).forkCommand },
180
+ { names: ["add-repo"], load: async () => (await import("./add-repo-EDU3QEYI.js")).addRepoCommand },
181
+ { names: ["update"], load: async () => (await import("./update-PJRSKQZ2.js")).updateCommand },
182
+ { names: ["catchup"], load: async () => (await import("./catchup-2SL3JGA7.js")).catchupCommand },
183
+ { names: ["snooze"], load: async () => (await import("./snooze-WIVKB3GH.js")).snoozeCommand },
184
+ { names: ["pin"], load: async () => (await import("./pin-UZZCDK7M.js")).pinCommand },
185
+ { names: ["section"], load: async () => (await import("./section-OVA5VD7L.js")).sectionCommand },
186
+ { names: ["note"], load: async () => (await import("./note-B7TQBXQF.js")).noteCommand },
187
+ { names: ["block"], load: async () => (await import("./block-D5CAR53T.js")).blockCommand },
188
+ { names: ["time"], load: async () => (await import("./time-5CH5O5MZ.js")).timeCommand },
189
+ { names: ["account"], load: async () => (await import("./account-NG75VLRU.js")).accountCommand },
190
+ { names: ["usage"], load: async () => (await import("./usage-TL66LWO4.js")).usageCommand },
191
+ { names: ["read"], load: async () => (await import("./read-U6GBGA5E.js")).readCommand },
192
+ { names: ["screen"], load: async () => (await import("./screen-2TLIUH3G.js")).screenCommand },
193
+ { names: ["send"], load: async () => (await import("./send-BJY5CYLO.js")).sendCommand },
194
+ { names: ["wait"], load: async () => (await import("./wait-YIEJO6YM.js")).waitCommand },
195
+ { names: ["start"], load: async () => (await import("./start-G6GR533S.js")).startCommand },
196
+ { names: ["stop"], load: async () => (await import("./stop-FN6EPFJ4.js")).stopCommand },
197
+ { names: ["restart"], load: async () => (await import("./restart-QEW4DJC3.js")).restartCommand },
198
+ { names: ["answer"], load: async () => (await import("./answer-MHOJ2J6S.js")).answerCommand },
199
+ { names: ["list"], load: async () => (await import("./list-GTKP5FAW.js")).listCommand },
200
+ { names: ["status"], load: async () => (await import("./status-BTAWY6JQ.js")).statusCommand },
201
+ { names: ["recent"], load: async () => (await import("./recent-2DUMLUDG.js")).recentCommand },
202
+ { names: ["resume"], load: async () => (await import("./resume-K45IT4QO.js")).resumeCommand },
203
+ { names: ["sessions"], load: async () => (await import("./sessions-4A24ZORW.js")).sessionsCommand },
204
+ { names: ["digest"], load: async () => (await import("./digest-KUMVYXKZ.js")).digestCommand },
205
+ { names: ["cleanup"], load: async () => (await import("./cleanup-5PSLKZLF.js")).cleanupCommand },
206
+ { names: ["overlaps"], load: async () => (await import("./overlaps-UKQHIJMU.js")).overlapsCommand },
207
+ { names: ["search"], load: async () => (await import("./search-7E4B2KX6.js")).searchCommand },
208
+ { names: ["pr"], load: async () => (await import("./pr-NU2ME2XW.js")).prCommand },
209
+ { names: ["timesheet"], load: async () => (await import("./timesheet-FMQKPS5S.js")).timesheetCommand },
210
+ { names: ["prune"], load: async () => (await import("./prune-IZGEYTSB.js")).pruneCommand },
211
+ { names: ["sync"], load: async () => (await import("./sync-T3BSHX6Q.js")).syncCommand },
212
+ { names: ["todo"], load: async () => (await import("./todo-23COLGR2.js")).todoCommand },
213
+ { names: ["hydrate"], load: async () => (await import("./hydrate-LCT6DVB3.js")).hydrateCommand },
214
+ { names: ["diff"], load: async () => (await import("./diff-Q7MV6YGJ.js")).diffCommand },
215
+ { names: ["web"], load: async () => (await import("./web-IYUNJMQD.js")).webCommand },
216
+ { names: ["hook"], load: async () => (await import("./hook-ARS32DG2.js")).hookCommand },
217
+ { names: ["run"], load: async () => (await import("./run-42LORGPS.js")).runCommand },
218
+ { names: ["broadcast"], load: async () => (await import("./broadcast-LLYHUWXA.js")).broadcastCommand },
219
+ { names: ["attach", "a"], load: async () => (await import("./attach-37JOJ4C3.js")).attachCommand },
220
+ { names: ["pty-host"], load: async () => (await import("./pty-host-AWDIKPQN.js")).ptyHostCommand },
221
+ { names: ["state"], load: async () => (await import("./state-S3DGLT4J.js")).stateCommand },
222
+ { names: ["move"], load: async () => (await import("./move-GOCLEFGZ.js")).moveCommand },
223
+ { names: ["install-skills"], load: async () => (await import("./install-skills-UYAFVJBA.js")).installSkillsCommand },
224
224
  { names: ["completion"], load: async () => (await import("./completion-MXX5TRIV.js")).completionCommand }
225
225
  ];
226
226
  async function commandsFor(argv) {
@@ -323,4 +323,4 @@ export {
323
323
  commandsFor,
324
324
  run
325
325
  };
326
- //# sourceMappingURL=chunk-4SZ7YW7N.js.map
326
+ //# sourceMappingURL=chunk-7OUIZ2YQ.js.map
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  isEnvDelta
4
- } from "./chunk-MPY2ZQBL.js";
4
+ } from "./chunk-VUAVPBFR.js";
5
5
  import {
6
6
  isPidAlive,
7
7
  spawnDetachedWork
@@ -77,8 +77,7 @@ async function probeHostDetailed(info, timeoutMs = 800) {
77
77
  } catch (err) {
78
78
  const e = err;
79
79
  if (e.cause?.code === "ECONNREFUSED") return { kind: "refused" };
80
- if (e.name === "TimeoutError" || e.name === "AbortError") return { kind: "timeout" };
81
- return { kind: "refused" };
80
+ return { kind: "timeout" };
82
81
  }
83
82
  }
84
83
  var PtyHostBusyError = class extends Error {
@@ -171,6 +170,8 @@ var PtyHostClient = class {
171
170
  }
172
171
  /** What the host said it supports (`/health`'s `features`), asked once per host (a client is one host). */
173
172
  featureList = null;
173
+ /** The work release it runs (`/health`'s `work`); '' for a host from before it said. */
174
+ hostWork = null;
174
175
  /**
175
176
  * The host's features (HOST_FEATURES): [] for a host from before they were answered. Null when it couldn't be asked
176
177
  * (not answering in time): unknown, asked again next time.
@@ -186,11 +187,17 @@ var PtyHostClient = class {
186
187
  const body = await res.json();
187
188
  const list = Array.isArray(body.features) ? body.features.filter((f) => typeof f === "string") : [];
188
189
  this.featureList = list;
190
+ this.hostWork = typeof body.work === "string" ? body.work : "";
189
191
  return list;
190
192
  } catch {
191
193
  return null;
192
194
  }
193
195
  }
196
+ /** The work release the host runs: '' for one from before it said (older than 2.9.3), null when it couldn't be asked. */
197
+ async workVersion() {
198
+ if (this.hostWork === null) await this.features();
199
+ return this.hostWork;
200
+ }
194
201
  async call(method, p, body) {
195
202
  const res = await fetch(`http://127.0.0.1:${this.info.port}${p}`, {
196
203
  method,
@@ -310,4 +317,4 @@ export {
310
317
  ensureHost,
311
318
  PtyHostClient
312
319
  };
313
- //# sourceMappingURL=chunk-3NXRBRRJ.js.map
320
+ //# sourceMappingURL=chunk-AAYWHIIT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/core/pty/pty-host-protocol.ts","../src/core/pty/pty-host-client.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\nimport { getConfigDir } from '../platform/config.js';\nimport type { AiToolSpec } from '../platform/ai-launcher.js';\nimport { isEnvDelta, type EnvDelta } from '../platform/env-delta.js';\n\n/**\n * Wire contract between the PTY host (`work pty-host`, the long-lived\n * process that owns every Claude PTY) and its clients (`work web`,\n * `work attach`). Bump PROTOCOL_VERSION on any incompatible change: a\n * client that finds an older host running tells the user to restart it\n * (`work pty-host --restart`) instead of silently misbehaving — the host\n * outlives rebuilds by design.\n *\n * 2: the restore list moved from pty-sessions.json into state.db. A v1 host\n * still writes the file, which a v2 host adopts on start\n * (adoptLegacyRestoreList).\n */\nexport const PROTOCOL_VERSION = 2;\n\n/**\n * What this host can do beyond PROTOCOL_VERSION, answered by `/health` (additive: a host from before answers none).\n * `agentEnv`: it applies a spawn's / restart's / resume's `agentEnv` (a session's Claude account); `halt`: halt / resume.\n * A client asks before sending something an older host would silently drop (pty-pool.ts).\n */\nexport const HOST_FEATURES = ['agentEnv', 'halt'] as const;\nexport type HostFeature = (typeof HOST_FEATURES)[number];\n\n/** Discovery file: where the running host listens and its auth token. */\nexport interface HostInfo {\n pid: number;\n port: number;\n token: string;\n version: number;\n}\n\n/** What a client asks the host to spawn. The host decides `--continue`\n * itself (see `hasClaudeConversation`) so restores after a reboot make\n * the same call a fresh spawn would. */\nexport interface SpawnSpec {\n cwd: string;\n tool: AiToolSpec;\n port?: number;\n cols?: number;\n rows?: number;\n /** `--unsafe`: the tool's skip-permissions flag. Persisted, so a restore\n * comes back with the same permission mode. */\n unsafe?: boolean;\n /** `--fresh`: start a new conversation even if one exists. First spawn\n * only — a restore always continues. */\n fresh?: boolean;\n /** `--prompt` / `--prompt-file` contents. First spawn only. */\n initialPrompt?: string;\n /** The launching shell's environment. First spawn only and never\n * persisted — it can hold secrets; a restore after reboot uses the\n * host's own environment. */\n env?: Record<string, string>;\n /**\n * What the agent's environment differs by for this session (its account's `CLAUDE_CONFIG_DIR`: set, or `null` = taken\n * out), applied over whatever environment the process starts with — the shell's, or the host's own. Persisted (a\n * folder path is no secret), so a restore keeps it. Additive, no PROTOCOL_VERSION bump: a host from before ignores\n * it and starts the agent on the environment it inherits (`work pty-host --restart` after upgrading).\n */\n agentEnv?: EnvDelta;\n}\n\n/** One entry of the host's restore list: how to respawn a session. The\n * spec as launched, minus `env` (never persisted: it can hold secrets) —\n * except the variables config `hostEnv` names (`keptEnv`), which a restore\n * after a reboot puts back over the host's own environment. */\nexport interface PersistedPty extends SpawnSpec {\n startedAt: string;\n keptEnv?: Record<string, string>;\n}\n\n/** Names that look like secrets (or carry them, as a connection string does): never kept on disk, whatever `hostEnv` says. */\nconst SECRET_NAME =\n /TOKEN|SECRET|PASS|PWD|CREDENTIAL|PRIVATE|KEY|AUTH|BEARER|COOKIE|SESSION|CERT|SIGN|SALT|(^|_)PAT($|_)|DSN|CONN|DATABASE_URL|_URI$|_URL$/i;\n/** Values that carry a password whatever their name: `scheme://user:pass@host`. */\nconst SECRET_VALUE = /:\\/\\/[^/\\s:@]+:[^/\\s@]+@/;\n\n/** Always kept for a restore, whatever `hostEnv` says: the agent's account folder (a path, not a secret — SECRET_VALUE still applies). */\nexport const ALWAYS_KEPT_ENV = ['CLAUDE_CONFIG_DIR'] as const;\n\n/** The variables of `env` to keep for a restore: the ones named (and `ALWAYS_KEPT_ENV`), that exist, and look like neither a secret nor a URL with a password in it. Pure. */\nexport function keepEnv(env: Record<string, string> | undefined, names: readonly string[]): Record<string, string> | undefined {\n if (!env) return undefined;\n const kept = Object.fromEntries(\n [...new Set([...names, ...ALWAYS_KEPT_ENV])]\n .filter((n) => !SECRET_NAME.test(n) && typeof env[n] === 'string' && !SECRET_VALUE.test(env[n]))\n .map((n) => [n, env[n]]),\n );\n return Object.keys(kept).length ? kept : undefined;\n}\nexport type PersistedPtys = Record<string, PersistedPty>;\n\n/** Shape check for a restore-list entry read back from storage. */\nexport function isPersistedPty(x: unknown): x is PersistedPty {\n const e = x as PersistedPty | null;\n return (\n !!e &&\n typeof e === 'object' &&\n typeof e.cwd === 'string' &&\n !!e.tool &&\n typeof e.tool === 'object' &&\n (e.agentEnv === undefined || isEnvDelta(e.agentEnv)) &&\n (e.keptEnv === undefined ||\n (!!e.keptEnv && typeof e.keptEnv === 'object' && Object.values(e.keptEnv).every((v) => typeof v === 'string')))\n );\n}\n\nexport interface PtyInfo {\n id: string;\n cwd: string;\n pid: number;\n exited: boolean;\n cols: number;\n rows: number;\n startedAt: string;\n /** Respawned by the host on startup from the persisted session list\n * (after a crash, `--restart` or reboot), not by a client. */\n restored: boolean;\n /** Clients attached right now (dashboard Terminal tabs, `work attach`).\n * Additive: a host from before it sends none. */\n clients?: number;\n /** When the PTY last printed anything (ISO). Additive, like clients. */\n lastOutputAt?: string;\n /** The tool's binary (`claude`, `opencode`…). Additive, like clients. */\n tool?: string;\n}\n\n/** Client → host frames on the attach WebSocket (text, JSON). Host →\n * client PTY output is sent as binary frames; control frames as text. */\nexport type ClientFrame = { type: 'input'; data: string } | { type: 'resize'; cols: number; rows: number };\n\nexport type HostControlFrame =\n /** Sent once, first, on attach: the serialized screen and the grid it was\n * drawn for. Clients draw it at exactly cols×rows, then resize to their\n * own size (which makes Claude redraw), and only then send input. */\n { type: 'replay'; data: string; cols: number; rows: number } | { type: 'exit'; code: number } | { type: 'error'; message: string };\n\nexport function hostInfoPath(): string {\n return path.join(getConfigDir(), 'pty-host.json');\n}\n\n/** Held by a starting host from \"is one running?\" through writing its\n * discovery file AND restoring the saved sessions — so two hosts can't\n * both start, and a `work remove` racing a start waits for the restore\n * instead of slipping between it (see stopSessionPty). */\nexport function hostStartLockPath(): string {\n return path.join(getConfigDir(), 'pty-host.start.lock');\n}\n\n/** The pre-SQLite restore list. Only the one-time import reads it now. */\nexport function ptySessionsPath(): string {\n return path.join(getConfigDir(), 'pty-sessions.json');\n}\n\nexport function readHostInfo(): HostInfo | null {\n try {\n const raw = JSON.parse(fs.readFileSync(hostInfoPath(), 'utf-8')) as HostInfo;\n if (typeof raw.port === 'number' && typeof raw.token === 'string' && typeof raw.pid === 'number') {\n return raw;\n }\n return null;\n } catch {\n return null;\n }\n}\n","import path from 'node:path';\nimport { spawnDetachedWork } from '../platform/process.js';\nimport { getConfigDir } from '../platform/config.js';\nimport { isPidAlive } from '../platform/process.js';\nimport { ensureFile, withFileLock } from '../platform/fs-safe.js';\nimport type { EnvDelta } from '../platform/env-delta.js';\nimport { PROTOCOL_VERSION, readHostInfo, type HostInfo, type PtyInfo, type SpawnSpec } from './pty-host-protocol.js';\n\nexport class PtyHostVersionError extends Error {\n constructor(readonly hostVersion: number) {\n super(\n `A PTY host from an older build (protocol v${hostVersion}, need v${PROTOCOL_VERSION}) ` +\n 'is running. Restart it with `work pty-host --restart` — sessions come back via --continue.',\n );\n }\n}\n\n/**\n * Ask whoever listens on the discovery file's port whether it's our host:\n * it must answer /health with our token. Returns what it reports (its\n * protocol version and pid), or null if nothing answers / the token is\n * wrong — i.e. the discovery file is stale.\n */\nexport async function probeHost(info: HostInfo, timeoutMs = 800): Promise<{ version: number; pid: number } | null> {\n const r = await probeHostDetailed(info, timeoutMs);\n return r.kind === 'host' ? { version: r.version, pid: r.pid } : null;\n}\n\nexport type ProbeResult =\n | { kind: 'host'; version: number; pid: number }\n /** Nothing listens on the port (connection refused): definitely gone. */\n | { kind: 'refused' }\n /** Something answered, but not as our host (wrong token, bad body). */\n | { kind: 'not-ours' }\n /** No answer in time, or the connection dropped (reset, hang-up) — could be a BUSY or hung host\n * (e.g. restoring many sessions, a ConPTY start that blocks). Never treat this as proof the host is gone. */\n | { kind: 'timeout' };\n\nexport async function probeHostDetailed(info: HostInfo, timeoutMs = 800): Promise<ProbeResult> {\n try {\n const res = await fetch(`http://127.0.0.1:${info.port}/health`, {\n headers: { 'x-work-token': info.token },\n signal: AbortSignal.timeout(timeoutMs),\n });\n if (!res.ok) return { kind: 'not-ours' };\n const body = (await res.json()) as { version?: number; pid?: number };\n if (typeof body.version !== 'number' || typeof body.pid !== 'number') return { kind: 'not-ours' };\n return { kind: 'host', version: body.version, pid: body.pid };\n } catch (err) {\n const e = err as { name?: string; cause?: { code?: string } };\n // Only a refused connection proves nothing listens. Anything else — a reset, a dropped socket — is no answer,\n // not proof it's gone: a hung host keeps its port, and once requests pile up unanswered Windows resets new\n // connections. Read as \"refused\", that started a second host beside the hung one (two Claudes per conversation).\n if (e.cause?.code === 'ECONNREFUSED') return { kind: 'refused' };\n return { kind: 'timeout' };\n }\n}\n\n/** A host is there but didn't answer in time (event loop busy: a ConPTY\n * spawn, restoring many sessions). It is RUNNING — never start another. */\nexport class PtyHostBusyError extends Error {\n constructor() {\n super('The PTY host is running but not answering (busy?). Try again in a moment.');\n this.name = 'PtyHostBusyError';\n }\n}\n\n/**\n * The running host, or null when there is none. Throws PtyHostVersionError\n * on a mismatch, and PtyHostBusyError when a host holds the port but\n * doesn't answer even a patient second probe — treating that as \"no host\"\n * would start a second one, which restores every session again (two\n * Claudes per conversation).\n */\nexport async function findHost(timeoutsMs: number[] = [800, 5000]): Promise<HostInfo | null> {\n const info = readHostInfo();\n if (!info) return null;\n let probe: ProbeResult = { kind: 'timeout' };\n for (const t of timeoutsMs) {\n probe = await probeHostDetailed(info, t);\n if (probe.kind !== 'timeout') break;\n }\n if (probe.kind === 'timeout') {\n // No answer: a host whose process is alive is busy — but a dead one\n // (crashed, killed) left a stale file, and whatever now holds that port\n // is not our host. Calling THAT busy would make the host unstartable.\n if (!isPidAlive(info.pid)) return null;\n throw new PtyHostBusyError();\n }\n if (probe.kind !== 'host' || probe.pid !== info.pid) return null;\n if (probe.version !== PROTOCOL_VERSION) throw new PtyHostVersionError(probe.version);\n return info;\n}\n\n/**\n * findHost that waits out a busy host: retries until it answers or\n * `timeoutMs` passes, then throws PtyHostBusyError. For callers that must\n * reach the host (stopping a session before its worktree is deleted).\n */\nexport async function findHostPatient(timeoutMs = 20_000): Promise<HostInfo | null> {\n const deadline = Date.now() + timeoutMs;\n for (;;) {\n try {\n return await findHost();\n } catch (err) {\n if (!(err instanceof PtyHostBusyError) || Date.now() >= deadline) throw err;\n await new Promise((r) => setTimeout(r, 250));\n }\n }\n}\n\n/** findHost for \"should I start one?\": a busy host counts as running. */\nasync function findHostOrBusy(): Promise<HostInfo | 'busy' | null> {\n try {\n return await findHost();\n } catch (err) {\n if (err instanceof PtyHostBusyError) return 'busy';\n throw err;\n }\n}\n\n/** Serializes host spawning across `work` processes (see ensureHost). */\nexport function hostSpawnLockPath(): string {\n return path.join(getConfigDir(), 'pty-host.spawn.lock');\n}\n\nlet inFlight: Promise<HostInfo> | null = null;\n\n/**\n * Return the running host, spawning a detached one if none is. `workBin` is\n * the path to the `work` binary (dist/bin.js) — passed in rather than\n * derived because core can't reach the commands layer's resolver (§2.1).\n *\n * Exactly one host may start: two hosts would each restore every saved\n * session — two Claudes on one conversation. So spawning is single-flight\n * within this process (concurrent callers share one attempt) and serialized\n * across processes by a file lock held from \"is one running?\" until the new\n * host answers; a caller that waited on the lock re-checks and finds it.\n */\n// A cold host start loads the whole `work` bundle; on a busy machine (right\n// after login with autostart, or a loaded test run) that can pass 8 s.\nexport function ensureHost(workBin: string, timeoutMs = 20_000): Promise<HostInfo> {\n if (!inFlight) {\n inFlight = ensureHostLocked(workBin, timeoutMs).finally(() => {\n inFlight = null;\n });\n }\n return inFlight;\n}\n\nasync function ensureHostLocked(workBin: string, timeoutMs: number): Promise<HostInfo> {\n const existing = await findHostOrBusy();\n if (existing === 'busy') return waitForHost(timeoutMs); // it's there; wait for it to answer\n if (existing) return existing;\n const lock = hostSpawnLockPath();\n ensureFile(lock, '');\n try {\n return await withFileLock(lock, async () => {\n // Another process may have started it while we waited for the lock.\n const started = await findHostOrBusy();\n if (started === 'busy') return waitForHost(timeoutMs);\n if (started) return started;\n spawnHost(workBin);\n return waitForHost(timeoutMs);\n });\n } catch (err) {\n // Couldn't get the lock in time (another process is mid-spawn and slow):\n // don't spawn a second one — wait for theirs.\n if ((err as { code?: string }).code === 'ELOCKED') return waitForHost(timeoutMs);\n throw err;\n }\n}\n\nfunction spawnHost(workBin: string): void {\n spawnDetachedWork(workBin, ['pty-host'], path.join(getConfigDir(), 'pty-host.log'));\n}\n\nasync function waitForHost(timeoutMs: number): Promise<HostInfo> {\n const deadline = Date.now() + timeoutMs;\n while (Date.now() < deadline) {\n const found = await findHost().catch(() => null);\n if (found) return found;\n await new Promise((r) => setTimeout(r, 100));\n }\n throw new Error('PTY host did not start (see ~/.work/pty-host.log)');\n}\n\nexport class PtyHostClient {\n constructor(readonly info: HostInfo) {}\n\n /** What the host said it supports (`/health`'s `features`), asked once per host (a client is one host). */\n private featureList: readonly string[] | null = null;\n /** The work release it runs (`/health`'s `work`); '' for a host from before it said. */\n private hostWork: string | null = null;\n\n /**\n * The host's features (HOST_FEATURES): [] for a host from before they were answered. Null when it couldn't be asked\n * (not answering in time): unknown, asked again next time.\n */\n async features(): Promise<readonly string[] | null> {\n if (this.featureList) return this.featureList;\n try {\n const res = await fetch(`http://127.0.0.1:${this.info.port}/health`, {\n headers: { 'x-work-token': this.info.token },\n signal: AbortSignal.timeout(5000),\n });\n if (!res.ok) return null;\n const body = (await res.json()) as { features?: unknown; work?: unknown };\n const list = Array.isArray(body.features) ? body.features.filter((f): f is string => typeof f === 'string') : [];\n this.featureList = list;\n this.hostWork = typeof body.work === 'string' ? body.work : '';\n return list;\n } catch {\n return null;\n }\n }\n\n /** The work release the host runs: '' for one from before it said (older than 2.9.3), null when it couldn't be asked. */\n async workVersion(): Promise<string | null> {\n if (this.hostWork === null) await this.features();\n return this.hostWork;\n }\n\n private async call<T>(method: string, p: string, body?: unknown): Promise<T> {\n const res = await fetch(`http://127.0.0.1:${this.info.port}${p}`, {\n method,\n headers: {\n 'x-work-token': this.info.token,\n ...(body !== undefined ? { 'Content-Type': 'application/json' } : {}),\n },\n body: body !== undefined ? JSON.stringify(body) : undefined,\n signal: AbortSignal.timeout(5000),\n });\n const json = (await res.json().catch(() => ({}))) as T & { error?: string };\n if (!res.ok) throw new Error(json.error ?? `PTY host ${method} ${p}: ${res.status}`);\n return json;\n }\n\n list(): Promise<PtyInfo[]> {\n return this.call('GET', '/ptys');\n }\n\n get(id: string): Promise<PtyInfo | null> {\n return this.call<PtyInfo>('GET', `/ptys/${encodeURIComponent(id)}`).catch(() => null);\n }\n\n spawn(id: string, spec: SpawnSpec): Promise<PtyInfo> {\n return this.call('POST', `/ptys/${encodeURIComponent(id)}`, spec);\n }\n\n /** The session's visible screen as text; null when it has none — or the\n * host predates this call (404 either way: nothing to answer by key). */\n async screen(id: string): Promise<string | null> {\n try {\n const r = await this.call<{ text?: unknown }>('GET', `/ptys/${encodeURIComponent(id)}/screen`);\n return typeof r.text === 'string' ? r.text : null;\n } catch {\n return null;\n }\n }\n\n async write(id: string, data: string): Promise<boolean> {\n try {\n await this.call('POST', `/ptys/${encodeURIComponent(id)}/write`, { data });\n return true;\n } catch {\n return false;\n }\n }\n\n /**\n * Its agent restarted in place, the attached terminals kept (registry.restart).\n * `unsupported`: a host from before the call (404) — stop and start it instead. With `agentEnv` (a session moved to\n * another account) a host that restarted it without taking the environment (one from before it) is `unsupported` too:\n * what runs now is on the old account, and the caller starts it again.\n */\n async restart(id: string, opts: { agentEnv?: EnvDelta } = {}): Promise<'restarted' | 'not-running' | 'unsupported'> {\n const res = await fetch(`http://127.0.0.1:${this.info.port}/ptys/${encodeURIComponent(id)}/restart`, {\n method: 'POST',\n headers: { 'x-work-token': this.info.token, ...(opts.agentEnv ? { 'content-type': 'application/json' } : {}) },\n ...(opts.agentEnv ? { body: JSON.stringify({ agentEnv: opts.agentEnv }) } : {}),\n // Waits for the old process to exit (up to 3 s) before the new one starts.\n signal: AbortSignal.timeout(15_000),\n });\n if (res.ok) {\n if (!opts.agentEnv) return 'restarted';\n const json = (await res.json().catch(() => null)) as { agentEnvApplied?: unknown } | null;\n return json?.agentEnvApplied === true ? 'restarted' : 'unsupported';\n }\n if (res.status === 409) return 'not-running';\n if (res.status === 404) return 'unsupported';\n const json = (await res.json().catch(() => ({}))) as { error?: string };\n throw new Error(json.error ?? `PTY host restart ${id}: ${res.status}`);\n }\n\n /**\n * Stop its agent and keep the session (entry, terminals) until `resume`. `unsupported`: a host from before the call (404):\n * nothing was stopped — the caller stops it the old way.\n */\n async halt(id: string): Promise<'halted' | 'not-running' | 'unsupported'> {\n const res = await fetch(`http://127.0.0.1:${this.info.port}/ptys/${encodeURIComponent(id)}/halt`, {\n method: 'POST',\n headers: { 'x-work-token': this.info.token },\n signal: AbortSignal.timeout(15_000),\n });\n if (res.ok) return 'halted';\n if (res.status === 409) return 'not-running';\n if (res.status === 404) return 'unsupported';\n const json = (await res.json().catch(() => ({}))) as { error?: string };\n throw new Error(json.error ?? `PTY host halt ${id}: ${res.status}`);\n }\n\n /** Start a halted agent again in place (`--continue`), on `agentEnv` when given. `not-halted`: it isn't halted (resumed already, or gone). */\n async resume(id: string, opts: { agentEnv?: EnvDelta } = {}): Promise<'resumed' | 'not-halted'> {\n const res = await fetch(`http://127.0.0.1:${this.info.port}/ptys/${encodeURIComponent(id)}/resume`, {\n method: 'POST',\n headers: { 'x-work-token': this.info.token, 'content-type': 'application/json' },\n body: JSON.stringify(opts.agentEnv ? { agentEnv: opts.agentEnv } : {}),\n signal: AbortSignal.timeout(15_000),\n });\n if (res.ok) return 'resumed';\n if (res.status === 409) return 'not-halted';\n const json = (await res.json().catch(() => ({}))) as { error?: string };\n throw new Error(json.error ?? `PTY host resume ${id}: ${res.status}`);\n }\n\n async kill(id: string): Promise<void> {\n await this.call('DELETE', `/ptys/${encodeURIComponent(id)}`);\n }\n\n attachUrl(id: string): string {\n return `ws://127.0.0.1:${this.info.port}/ptys/${encodeURIComponent(id)}/attach?token=${this.info.token}`;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ;AACf,OAAO,UAAU;AAiBV,IAAM,mBAAmB;AAOzB,IAAM,gBAAgB,CAAC,YAAY,MAAM;AAmDhD,IAAM,cACJ;AAEF,IAAM,eAAe;AAGd,IAAM,kBAAkB,CAAC,mBAAmB;AAG5C,SAAS,QAAQ,KAAyC,OAA8D;AAC7H,MAAI,CAAC,I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9
9
  loadHistory
10
- } from "./chunk-SBLK524A.js";
10
+ } from "./chunk-37XQIG7F.js";
11
11
  import {
12
12
  getConfigPath,
13
13
  loadConfig
14
- } from "./chunk-PDWEPIL6.js";
14
+ } from "./chunk-2JNW2AQ2.js";
15
15
  import {
16
16
  atomicWriteFile,
17
17
  withFileLock
@@ -127,4 +127,4 @@ export {
127
127
  checkTools,
128
128
  setupState
129
129
  };
130
- //# sourceMappingURL=chunk-4BZGUMP7.js.map
130
+ //# sourceMappingURL=chunk-ATED7SAH.js.map
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-3N3UQEC4.js";
5
5
  import {
6
6
  writeTempTree
7
- } from "./chunk-SBLK524A.js";
7
+ } from "./chunk-37XQIG7F.js";
8
8
  import {
9
9
  spawn_default
10
10
  } from "./chunk-RCYI7SRA.js";
@@ -534,4 +534,4 @@ export {
534
534
  computeDiff,
535
535
  computeRangeDiff
536
536
  };
537
- //# sourceMappingURL=chunk-JWWG624P.js.map
537
+ //# sourceMappingURL=chunk-BSP2Z7B7.js.map
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  readStatus
4
- } from "./chunk-SBLK524A.js";
4
+ } from "./chunk-37XQIG7F.js";
5
5
 
6
6
  // src/commands/shared/turn-wait.ts
7
7
  var cliWaitDeps = {
@@ -16,4 +16,4 @@ var cliWaitDeps = {
16
16
  export {
17
17
  cliWaitDeps
18
18
  };
19
- //# sourceMappingURL=chunk-VUNJVF6C.js.map
19
+ //# sourceMappingURL=chunk-CCTALU3C.js.map
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-3GIH4WTA.js";
5
5
  import {
6
6
  logSwallowed
7
- } from "./chunk-SBLK524A.js";
7
+ } from "./chunk-37XQIG7F.js";
8
8
 
9
9
  // src/core/diff/diff-stat.ts
10
10
  import fs from "fs";
@@ -207,4 +207,4 @@ export {
207
207
  wantsDiffStat,
208
208
  findOverlaps
209
209
  };
210
- //# sourceMappingURL=chunk-5WEBLABB.js.map
210
+ //# sourceMappingURL=chunk-CLBQ7ZC4.js.map
@@ -3,7 +3,7 @@ import {
3
3
  computeChanges,
4
4
  findOverlaps,
5
5
  wantsDiffStat
6
- } from "./chunk-5WEBLABB.js";
6
+ } from "./chunk-CLBQ7ZC4.js";
7
7
  import {
8
8
  pool
9
9
  } from "./chunk-AKMPF72Y.js";
@@ -34,4 +34,4 @@ async function scanChanges(sessions, opts = {}) {
34
34
  export {
35
35
  scanChanges
36
36
  };
37
- //# sourceMappingURL=chunk-6IUFNTBQ.js.map
37
+ //# sourceMappingURL=chunk-CMO5YUZR.js.map
@@ -4,14 +4,14 @@ import {
4
4
  } from "./chunk-6AQRYLOB.js";
5
5
  import {
6
6
  findSessionForCwd
7
- } from "./chunk-XMWVBLMJ.js";
7
+ } from "./chunk-QEVYCCKD.js";
8
8
  import {
9
9
  findSession,
10
10
  loadHistory
11
- } from "./chunk-SBLK524A.js";
11
+ } from "./chunk-37XQIG7F.js";
12
12
  import {
13
13
  loadConfig
14
- } from "./chunk-PDWEPIL6.js";
14
+ } from "./chunk-2JNW2AQ2.js";
15
15
 
16
16
  // src/commands/shared/session-arg.ts
17
17
  import chalk from "chalk";
@@ -38,4 +38,4 @@ export {
38
38
  sessionPositionals,
39
39
  sessionFromArgs
40
40
  };
41
- //# sourceMappingURL=chunk-GJ5V357G.js.map
41
+ //# sourceMappingURL=chunk-CYWI3ZW7.js.map
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  findSessionForCwd
4
- } from "./chunk-XMWVBLMJ.js";
4
+ } from "./chunk-QEVYCCKD.js";
5
5
  import {
6
6
  sessionIdFor
7
7
  } from "./chunk-YYBXQBW2.js";
@@ -40,4 +40,4 @@ export {
40
40
  agentsBySession,
41
41
  summarizeAgents
42
42
  };
43
- //# sourceMappingURL=chunk-VGRZKBUK.js.map
43
+ //# sourceMappingURL=chunk-DQCUYCMX.js.map
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  dbPtySessions,
4
4
  forgetPersistedSession
5
- } from "./chunk-7NSQVIIK.js";
5
+ } from "./chunk-MG5TTLYZ.js";
6
6
  import {
7
7
  PtyHostBusyError,
8
8
  PtyHostClient,
@@ -11,18 +11,18 @@ import {
11
11
  findHost,
12
12
  findHostPatient,
13
13
  hostStartLockPath
14
- } from "./chunk-3NXRBRRJ.js";
14
+ } from "./chunk-AAYWHIIT.js";
15
15
  import {
16
16
  ASSISTANT_ID,
17
17
  prepareAssistantDir
18
- } from "./chunk-F4EWBHTA.js";
18
+ } from "./chunk-6FVYSW3E.js";
19
19
  import {
20
20
  createFsWatcher,
21
21
  findSessionById,
22
22
  logSwallowed,
23
23
  noClaudeBecause,
24
24
  swallow
25
- } from "./chunk-SBLK524A.js";
25
+ } from "./chunk-37XQIG7F.js";
26
26
  import {
27
27
  sessionIdFor
28
28
  } from "./chunk-YYBXQBW2.js";
@@ -31,10 +31,10 @@ import {
31
31
  agentSettings,
32
32
  assistantAgent,
33
33
  hasEnvDelta
34
- } from "./chunk-MPY2ZQBL.js";
34
+ } from "./chunk-VUAVPBFR.js";
35
35
  import {
36
36
  loadConfig
37
- } from "./chunk-PDWEPIL6.js";
37
+ } from "./chunk-2JNW2AQ2.js";
38
38
  import {
39
39
  ensureFile,
40
40
  withFileLock
@@ -126,7 +126,7 @@ var live = /* @__PURE__ */ new Set();
126
126
  var livePids = /* @__PURE__ */ new Set();
127
127
  var outputs = /* @__PURE__ */ new Map();
128
128
  var refreshTimer = null;
129
- var beat = { known: false, lastOkAt: null, latencyMs: null, lastError: null };
129
+ var beat = { known: false, lastOkAt: null, latencyMs: null, lastError: null, hostVersion: null };
130
130
  function hostBeat() {
131
131
  return { ...beat };
132
132
  }
@@ -158,6 +158,7 @@ async function refresh() {
158
158
  const c = await getClient(false);
159
159
  if (!c) {
160
160
  beat.known = false;
161
+ beat.hostVersion = null;
161
162
  live = /* @__PURE__ */ new Set();
162
163
  livePids = /* @__PURE__ */ new Set();
163
164
  outputs = /* @__PURE__ */ new Map();
@@ -168,6 +169,7 @@ async function refresh() {
168
169
  beat.lastOkAt = Date.now();
169
170
  beat.latencyMs = beat.lastOkAt - t0;
170
171
  beat.lastError = null;
172
+ beat.hostVersion = await c.workVersion();
171
173
  live = new Set(ptys.filter((p) => !p.exited).map((p) => p.id));
172
174
  livePids = new Set(ptys.filter((p) => !p.exited).map((p) => p.pid));
173
175
  outputs = new Map(
@@ -177,6 +179,7 @@ async function refresh() {
177
179
  beat.known = beat.known || err instanceof PtyHostBusyError;
178
180
  beat.lastError = err.message;
179
181
  client = null;
182
+ beat.hostVersion = null;
180
183
  live = /* @__PURE__ */ new Set();
181
184
  livePids = /* @__PURE__ */ new Set();
182
185
  outputs = /* @__PURE__ */ new Map();
@@ -433,4 +436,4 @@ export {
433
436
  stopSessionPty,
434
437
  detachPtyPool
435
438
  };
436
- //# sourceMappingURL=chunk-TR7CTHJA.js.map
439
+ //# sourceMappingURL=chunk-GRLKPVTP.js.map