@moberg_hr/work-tree 2.9.1 → 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 (222) hide show
  1. package/dist/{account-RTOXCLE6.js → account-NG75VLRU.js} +14 -13
  2. package/dist/{account-RTOXCLE6.js.map → account-NG75VLRU.js.map} +1 -1
  3. package/dist/{add-repo-AA3XTOZT.js → add-repo-EDU3QEYI.js} +9 -9
  4. package/dist/{answer-NT62U5MY.js → answer-MHOJ2J6S.js} +7 -7
  5. package/dist/{attach-HKVFNOOK.js → attach-37JOJ4C3.js} +12 -11
  6. package/dist/{attach-HKVFNOOK.js.map → attach-37JOJ4C3.js.map} +1 -1
  7. package/dist/bin.js +3 -3
  8. package/dist/{block-YZQGJMLI.js → block-D5CAR53T.js} +8 -8
  9. package/dist/{broadcast-2NOVIUZI.js → broadcast-LLYHUWXA.js} +5 -5
  10. package/dist/{catchup-LZ5FMXEO.js → catchup-2SL3JGA7.js} +10 -10
  11. package/dist/{chunk-ODBA4PVE.js → chunk-26OVU2AE.js} +4 -4
  12. package/dist/{chunk-PDWEPIL6.js → chunk-2JNW2AQ2.js} +2 -1
  13. package/dist/chunk-2JNW2AQ2.js.map +1 -0
  14. package/dist/{chunk-RVT4435Z.js → chunk-37XQIG7F.js} +63 -97
  15. package/dist/chunk-37XQIG7F.js.map +1 -0
  16. package/dist/{chunk-GEGRI67Z.js → chunk-3C3BKZ3H.js} +3 -3
  17. package/dist/{chunk-BDFAIHTM.js → chunk-63VY4YJM.js} +4 -4
  18. package/dist/{chunk-VNNAKJZA.js → chunk-6E2I2FBJ.js} +10 -10
  19. package/dist/{chunk-FK2ZZUR5.js → chunk-6FVYSW3E.js} +4 -73
  20. package/dist/chunk-6FVYSW3E.js.map +1 -0
  21. package/dist/{chunk-BNGX2JGD.js → chunk-72IBYKIY.js} +2 -2
  22. package/dist/{chunk-SXPC4FQM.js → chunk-7OUIZ2YQ.js} +53 -53
  23. package/dist/{chunk-3NXRBRRJ.js → chunk-AAYWHIIT.js} +11 -4
  24. package/dist/chunk-AAYWHIIT.js.map +1 -0
  25. package/dist/{chunk-BGKHI4FC.js → chunk-ATED7SAH.js} +3 -3
  26. package/dist/{chunk-T6BX6B5B.js → chunk-BSP2Z7B7.js} +2 -2
  27. package/dist/{chunk-PGZMPB2Q.js → chunk-CCTALU3C.js} +2 -2
  28. package/dist/{chunk-N7EHLEYG.js → chunk-CLBQ7ZC4.js} +2 -2
  29. package/dist/{chunk-4GVXOUVN.js → chunk-CMO5YUZR.js} +2 -2
  30. package/dist/{chunk-JAU62YN5.js → chunk-CYWI3ZW7.js} +4 -4
  31. package/dist/{chunk-QNH6ZRFV.js → chunk-DQCUYCMX.js} +2 -2
  32. package/dist/{chunk-ZJSEDIFT.js → chunk-GRLKPVTP.js} +11 -8
  33. package/dist/chunk-GRLKPVTP.js.map +1 -0
  34. package/dist/{chunk-IGC64EGV.js → chunk-HCVONKJI.js} +6 -6
  35. package/dist/{chunk-4OK2WJ2B.js → chunk-HEPBANFJ.js} +5 -5
  36. package/dist/{chunk-AHA65ZCO.js → chunk-INQQGV2G.js} +3 -3
  37. package/dist/{chunk-AQJSY4CI.js → chunk-IPGH7TXJ.js} +2 -2
  38. package/dist/{chunk-HJZSMSP4.js → chunk-IWJXFNM4.js} +6 -6
  39. package/dist/{chunk-JFN67PRA.js → chunk-KSUOVFO3.js} +2 -2
  40. package/dist/{chunk-7NSQVIIK.js → chunk-MG5TTLYZ.js} +2 -2
  41. package/dist/chunk-NWIVXGSL.js +9 -0
  42. package/dist/chunk-OTAZOIXK.js +78 -0
  43. package/dist/chunk-OTAZOIXK.js.map +1 -0
  44. package/dist/{chunk-HKK3WUPZ.js → chunk-P6BHOAQG.js} +2 -2
  45. package/dist/{chunk-RCZZAQFN.js → chunk-PRDRRU2B.js} +4 -4
  46. package/dist/{chunk-CYXMVMVO.js → chunk-PTWVOT7A.js} +223 -9
  47. package/dist/chunk-PTWVOT7A.js.map +1 -0
  48. package/dist/{chunk-6KOJSRML.js → chunk-QEVYCCKD.js} +2 -2
  49. package/dist/{chunk-7NZC7EAP.js → chunk-QHTXLCG7.js} +7 -7
  50. package/dist/{chunk-A633PJUP.js → chunk-QL36KN7X.js} +3 -3
  51. package/dist/{chunk-7POCHRUP.js → chunk-QSOEMCWQ.js} +6 -6
  52. package/dist/{chunk-J4Y7DKQN.js → chunk-RFINYWID.js} +3 -3
  53. package/dist/{chunk-4WG66W6U.js → chunk-S3FMTEFR.js} +4 -4
  54. package/dist/{chunk-MVMLNEHM.js → chunk-T7AFYEQ7.js} +4 -4
  55. package/dist/{chunk-JT5AR7PO.js → chunk-TPSFJSO7.js} +72 -3
  56. package/dist/chunk-TPSFJSO7.js.map +1 -0
  57. package/dist/{chunk-MPY2ZQBL.js → chunk-VUAVPBFR.js} +4 -4
  58. package/dist/{chunk-T22E35FV.js → chunk-WC534PXU.js} +5 -5
  59. package/dist/{chunk-T22E35FV.js.map → chunk-WC534PXU.js.map} +1 -1
  60. package/dist/{chunk-UJWMBDFX.js → chunk-WTQ2QCAG.js} +3 -3
  61. package/dist/{chunk-7OTYC7T5.js → chunk-WXE7D44E.js} +3 -3
  62. package/dist/{chunk-IJSW2U6U.js → chunk-WXMWZRBH.js} +2 -2
  63. package/dist/{chunk-FXWY22ZP.js → chunk-XVNRP7XE.js} +6 -6
  64. package/dist/{chunk-2Z2O5LEA.js → chunk-ZI2KXTKM.js} +2 -2
  65. package/dist/{cleanup-6NOT6VTS.js → cleanup-5PSLKZLF.js} +20 -19
  66. package/dist/{cleanup-6NOT6VTS.js.map → cleanup-5PSLKZLF.js.map} +1 -1
  67. package/dist/{cli-PAICDKJT.js → cli-AF7636FA.js} +4 -4
  68. package/dist/{config-U4SGJ7RB.js → config-6MSITKGB.js} +7 -7
  69. package/dist/{diff-CYXW5YWD.js → diff-Q7MV6YGJ.js} +8 -8
  70. package/dist/{digest-KRIBJHII.js → digest-KUMVYXKZ.js} +7 -7
  71. package/dist/{fork-LQYEB4A4.js → fork-OFENISEM.js} +18 -17
  72. package/dist/{fork-LQYEB4A4.js.map → fork-OFENISEM.js.map} +1 -1
  73. package/dist/{history-DCALTZMM.js → history-5WKRWARZ.js} +5 -5
  74. package/dist/{hook-MDFVVCD2.js → hook-ARS32DG2.js} +9 -8
  75. package/dist/{hook-MDFVVCD2.js.map → hook-ARS32DG2.js.map} +1 -1
  76. package/dist/{hydrate-KBWZSSBL.js → hydrate-LCT6DVB3.js} +5 -5
  77. package/dist/{init-R47WGD62.js → init-FJKPEY5N.js} +6 -6
  78. package/dist/{install-skills-IIMTRQ4K.js → install-skills-UYAFVJBA.js} +5 -5
  79. package/dist/install-skills-bin.js +4 -4
  80. package/dist/{list-X5YB4JRL.js → list-GTKP5FAW.js} +5 -5
  81. package/dist/{move-WSK5UU5T.js → move-GOCLEFGZ.js} +8 -8
  82. package/dist/{note-VMO2PKYX.js → note-B7TQBXQF.js} +7 -7
  83. package/dist/{overlaps-ZNZTQHU7.js → overlaps-UKQHIJMU.js} +7 -7
  84. package/dist/{pin-RGRNNJUL.js → pin-UZZCDK7M.js} +7 -7
  85. package/dist/{pr-B2V3N3SV.js → pr-NU2ME2XW.js} +8 -7
  86. package/dist/{pr-B2V3N3SV.js.map → pr-NU2ME2XW.js.map} +1 -1
  87. package/dist/{prune-M2MYPNI6.js → prune-IZGEYTSB.js} +18 -17
  88. package/dist/{prune-M2MYPNI6.js.map → prune-IZGEYTSB.js.map} +1 -1
  89. package/dist/{pty-host-I2I7SVOL.js → pty-host-AWDIKPQN.js} +46 -41
  90. package/dist/pty-host-AWDIKPQN.js.map +1 -0
  91. package/dist/{read-E22APCUR.js → read-U6GBGA5E.js} +7 -7
  92. package/dist/{recent-F3Z3JXFX.js → recent-2DUMLUDG.js} +6 -6
  93. package/dist/{remove-YGVUESDY.js → remove-OXUP4O33.js} +17 -16
  94. package/dist/{remove-YGVUESDY.js.map → remove-OXUP4O33.js.map} +1 -1
  95. package/dist/{restart-BAGGJDD2.js → restart-QEW4DJC3.js} +7 -7
  96. package/dist/{resume-PIFCI727.js → resume-K45IT4QO.js} +6 -6
  97. package/dist/{run-MW3QTOXU.js → run-42LORGPS.js} +5 -5
  98. package/dist/{screen-UILBPWSR.js → screen-2TLIUH3G.js} +7 -7
  99. package/dist/{search-DLZEPI4I.js → search-7E4B2KX6.js} +5 -5
  100. package/dist/{section-A5JKTX4J.js → section-OVA5VD7L.js} +7 -7
  101. package/dist/{send-EPPQKYOK.js → send-BJY5CYLO.js} +8 -8
  102. package/dist/{sessions-3HLVK6HG.js → sessions-4A24ZORW.js} +15 -14
  103. package/dist/{sessions-3HLVK6HG.js.map → sessions-4A24ZORW.js.map} +1 -1
  104. package/dist/{snooze-GA46Z56G.js → snooze-WIVKB3GH.js} +7 -7
  105. package/dist/{start-L6G3NC2J.js → start-G6GR533S.js} +7 -7
  106. package/dist/{state-OZF4S7PG.js → state-S3DGLT4J.js} +2 -2
  107. package/dist/{status-H5S3DZBI.js → status-BTAWY6JQ.js} +5 -5
  108. package/dist/{statusline-RSQMMCRN.js → statusline-WLXEU5DM.js} +3 -3
  109. package/dist/{stop-HQLHTY5V.js → stop-FN6EPFJ4.js} +7 -7
  110. package/dist/{sync-N2CDSJA4.js → sync-T3BSHX6Q.js} +18 -17
  111. package/dist/{sync-N2CDSJA4.js.map → sync-T3BSHX6Q.js.map} +1 -1
  112. package/dist/{time-H54NH62B.js → time-5CH5O5MZ.js} +8 -8
  113. package/dist/{time-actions-DB7OQ2IS.js → time-actions-XEUQ3UF7.js} +3 -3
  114. package/dist/{timesheet-PAS5SHPD.js → timesheet-FMQKPS5S.js} +10 -10
  115. package/dist/{todo-ODF7RI27.js → todo-23COLGR2.js} +2 -2
  116. package/dist/{tree-7EBS7PVA.js → tree-T33VU473.js} +14 -13
  117. package/dist/{tree-7EBS7PVA.js.map → tree-T33VU473.js.map} +1 -1
  118. package/dist/{update-M7ECF7UE.js → update-PJRSKQZ2.js} +9 -9
  119. package/dist/{usage-IFKUY6LC.js → usage-TL66LWO4.js} +7 -7
  120. package/dist/{wait-K3NSSNFR.js → wait-YIEJO6YM.js} +8 -8
  121. package/dist/wd-bin.js +3 -3
  122. package/dist/web/assets/PtyView-DnDd6jLI.js +96 -0
  123. package/dist/web/assets/PtyView-DnDd6jLI.js.map +1 -0
  124. package/dist/web/assets/index-DxozAoUO.css +1 -0
  125. package/dist/web/assets/index-InmdAx6g.js +120 -0
  126. package/dist/web/assets/index-InmdAx6g.js.map +1 -0
  127. package/dist/web/index.html +2 -2
  128. package/dist/{web-U34XTVBA.js → web-IYUNJMQD.js} +241 -263
  129. package/dist/web-IYUNJMQD.js.map +1 -0
  130. package/npm-shrinkwrap.json +2 -2
  131. package/package.json +1 -1
  132. package/dist/chunk-3NXRBRRJ.js.map +0 -1
  133. package/dist/chunk-CYXMVMVO.js.map +0 -1
  134. package/dist/chunk-FK2ZZUR5.js.map +0 -1
  135. package/dist/chunk-JT5AR7PO.js.map +0 -1
  136. package/dist/chunk-MYXLQMF7.js +0 -9
  137. package/dist/chunk-PDWEPIL6.js.map +0 -1
  138. package/dist/chunk-RVT4435Z.js.map +0 -1
  139. package/dist/chunk-ZJSEDIFT.js.map +0 -1
  140. package/dist/pty-host-I2I7SVOL.js.map +0 -1
  141. package/dist/web/assets/PtyView-Cg5gjgaQ.js +0 -96
  142. package/dist/web/assets/PtyView-Cg5gjgaQ.js.map +0 -1
  143. package/dist/web/assets/index-BOyg0f4L.css +0 -1
  144. package/dist/web/assets/index-CBK3PI8Y.js +0 -119
  145. package/dist/web/assets/index-CBK3PI8Y.js.map +0 -1
  146. package/dist/web-U34XTVBA.js.map +0 -1
  147. /package/dist/{add-repo-AA3XTOZT.js.map → add-repo-EDU3QEYI.js.map} +0 -0
  148. /package/dist/{answer-NT62U5MY.js.map → answer-MHOJ2J6S.js.map} +0 -0
  149. /package/dist/{block-YZQGJMLI.js.map → block-D5CAR53T.js.map} +0 -0
  150. /package/dist/{broadcast-2NOVIUZI.js.map → broadcast-LLYHUWXA.js.map} +0 -0
  151. /package/dist/{catchup-LZ5FMXEO.js.map → catchup-2SL3JGA7.js.map} +0 -0
  152. /package/dist/{chunk-ODBA4PVE.js.map → chunk-26OVU2AE.js.map} +0 -0
  153. /package/dist/{chunk-GEGRI67Z.js.map → chunk-3C3BKZ3H.js.map} +0 -0
  154. /package/dist/{chunk-BDFAIHTM.js.map → chunk-63VY4YJM.js.map} +0 -0
  155. /package/dist/{chunk-VNNAKJZA.js.map → chunk-6E2I2FBJ.js.map} +0 -0
  156. /package/dist/{chunk-BNGX2JGD.js.map → chunk-72IBYKIY.js.map} +0 -0
  157. /package/dist/{chunk-SXPC4FQM.js.map → chunk-7OUIZ2YQ.js.map} +0 -0
  158. /package/dist/{chunk-BGKHI4FC.js.map → chunk-ATED7SAH.js.map} +0 -0
  159. /package/dist/{chunk-T6BX6B5B.js.map → chunk-BSP2Z7B7.js.map} +0 -0
  160. /package/dist/{chunk-PGZMPB2Q.js.map → chunk-CCTALU3C.js.map} +0 -0
  161. /package/dist/{chunk-N7EHLEYG.js.map → chunk-CLBQ7ZC4.js.map} +0 -0
  162. /package/dist/{chunk-4GVXOUVN.js.map → chunk-CMO5YUZR.js.map} +0 -0
  163. /package/dist/{chunk-JAU62YN5.js.map → chunk-CYWI3ZW7.js.map} +0 -0
  164. /package/dist/{chunk-QNH6ZRFV.js.map → chunk-DQCUYCMX.js.map} +0 -0
  165. /package/dist/{chunk-IGC64EGV.js.map → chunk-HCVONKJI.js.map} +0 -0
  166. /package/dist/{chunk-4OK2WJ2B.js.map → chunk-HEPBANFJ.js.map} +0 -0
  167. /package/dist/{chunk-AHA65ZCO.js.map → chunk-INQQGV2G.js.map} +0 -0
  168. /package/dist/{chunk-AQJSY4CI.js.map → chunk-IPGH7TXJ.js.map} +0 -0
  169. /package/dist/{chunk-HJZSMSP4.js.map → chunk-IWJXFNM4.js.map} +0 -0
  170. /package/dist/{chunk-JFN67PRA.js.map → chunk-KSUOVFO3.js.map} +0 -0
  171. /package/dist/{chunk-7NSQVIIK.js.map → chunk-MG5TTLYZ.js.map} +0 -0
  172. /package/dist/{chunk-MYXLQMF7.js.map → chunk-NWIVXGSL.js.map} +0 -0
  173. /package/dist/{chunk-HKK3WUPZ.js.map → chunk-P6BHOAQG.js.map} +0 -0
  174. /package/dist/{chunk-RCZZAQFN.js.map → chunk-PRDRRU2B.js.map} +0 -0
  175. /package/dist/{chunk-6KOJSRML.js.map → chunk-QEVYCCKD.js.map} +0 -0
  176. /package/dist/{chunk-7NZC7EAP.js.map → chunk-QHTXLCG7.js.map} +0 -0
  177. /package/dist/{chunk-A633PJUP.js.map → chunk-QL36KN7X.js.map} +0 -0
  178. /package/dist/{chunk-7POCHRUP.js.map → chunk-QSOEMCWQ.js.map} +0 -0
  179. /package/dist/{chunk-J4Y7DKQN.js.map → chunk-RFINYWID.js.map} +0 -0
  180. /package/dist/{chunk-4WG66W6U.js.map → chunk-S3FMTEFR.js.map} +0 -0
  181. /package/dist/{chunk-MVMLNEHM.js.map → chunk-T7AFYEQ7.js.map} +0 -0
  182. /package/dist/{chunk-MPY2ZQBL.js.map → chunk-VUAVPBFR.js.map} +0 -0
  183. /package/dist/{chunk-UJWMBDFX.js.map → chunk-WTQ2QCAG.js.map} +0 -0
  184. /package/dist/{chunk-7OTYC7T5.js.map → chunk-WXE7D44E.js.map} +0 -0
  185. /package/dist/{chunk-IJSW2U6U.js.map → chunk-WXMWZRBH.js.map} +0 -0
  186. /package/dist/{chunk-FXWY22ZP.js.map → chunk-XVNRP7XE.js.map} +0 -0
  187. /package/dist/{chunk-2Z2O5LEA.js.map → chunk-ZI2KXTKM.js.map} +0 -0
  188. /package/dist/{cli-PAICDKJT.js.map → cli-AF7636FA.js.map} +0 -0
  189. /package/dist/{config-U4SGJ7RB.js.map → config-6MSITKGB.js.map} +0 -0
  190. /package/dist/{diff-CYXW5YWD.js.map → diff-Q7MV6YGJ.js.map} +0 -0
  191. /package/dist/{digest-KRIBJHII.js.map → digest-KUMVYXKZ.js.map} +0 -0
  192. /package/dist/{history-DCALTZMM.js.map → history-5WKRWARZ.js.map} +0 -0
  193. /package/dist/{hydrate-KBWZSSBL.js.map → hydrate-LCT6DVB3.js.map} +0 -0
  194. /package/dist/{init-R47WGD62.js.map → init-FJKPEY5N.js.map} +0 -0
  195. /package/dist/{install-skills-IIMTRQ4K.js.map → install-skills-UYAFVJBA.js.map} +0 -0
  196. /package/dist/{list-X5YB4JRL.js.map → list-GTKP5FAW.js.map} +0 -0
  197. /package/dist/{move-WSK5UU5T.js.map → move-GOCLEFGZ.js.map} +0 -0
  198. /package/dist/{note-VMO2PKYX.js.map → note-B7TQBXQF.js.map} +0 -0
  199. /package/dist/{overlaps-ZNZTQHU7.js.map → overlaps-UKQHIJMU.js.map} +0 -0
  200. /package/dist/{pin-RGRNNJUL.js.map → pin-UZZCDK7M.js.map} +0 -0
  201. /package/dist/{read-E22APCUR.js.map → read-U6GBGA5E.js.map} +0 -0
  202. /package/dist/{recent-F3Z3JXFX.js.map → recent-2DUMLUDG.js.map} +0 -0
  203. /package/dist/{restart-BAGGJDD2.js.map → restart-QEW4DJC3.js.map} +0 -0
  204. /package/dist/{resume-PIFCI727.js.map → resume-K45IT4QO.js.map} +0 -0
  205. /package/dist/{run-MW3QTOXU.js.map → run-42LORGPS.js.map} +0 -0
  206. /package/dist/{screen-UILBPWSR.js.map → screen-2TLIUH3G.js.map} +0 -0
  207. /package/dist/{search-DLZEPI4I.js.map → search-7E4B2KX6.js.map} +0 -0
  208. /package/dist/{section-A5JKTX4J.js.map → section-OVA5VD7L.js.map} +0 -0
  209. /package/dist/{send-EPPQKYOK.js.map → send-BJY5CYLO.js.map} +0 -0
  210. /package/dist/{snooze-GA46Z56G.js.map → snooze-WIVKB3GH.js.map} +0 -0
  211. /package/dist/{start-L6G3NC2J.js.map → start-G6GR533S.js.map} +0 -0
  212. /package/dist/{state-OZF4S7PG.js.map → state-S3DGLT4J.js.map} +0 -0
  213. /package/dist/{status-H5S3DZBI.js.map → status-BTAWY6JQ.js.map} +0 -0
  214. /package/dist/{statusline-RSQMMCRN.js.map → statusline-WLXEU5DM.js.map} +0 -0
  215. /package/dist/{stop-HQLHTY5V.js.map → stop-FN6EPFJ4.js.map} +0 -0
  216. /package/dist/{time-H54NH62B.js.map → time-5CH5O5MZ.js.map} +0 -0
  217. /package/dist/{time-actions-DB7OQ2IS.js.map → time-actions-XEUQ3UF7.js.map} +0 -0
  218. /package/dist/{timesheet-PAS5SHPD.js.map → timesheet-FMQKPS5S.js.map} +0 -0
  219. /package/dist/{todo-ODF7RI27.js.map → todo-23COLGR2.js.map} +0 -0
  220. /package/dist/{update-M7ECF7UE.js.map → update-PJRSKQZ2.js.map} +0 -0
  221. /package/dist/{usage-IFKUY6LC.js.map → usage-TL66LWO4.js.map} +0 -0
  222. /package/dist/{wait-K3NSSNFR.js.map → wait-YIEJO6YM.js.map} +0 -0
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  computeDiff,
4
4
  isInsideRoot
5
- } from "./chunk-T6BX6B5B.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-RVT4435Z.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-GEGRI67Z.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-T6BX6B5B.js";
4
+ } from "./chunk-BSP2Z7B7.js";
5
5
  import {
6
6
  loadManifest
7
- } from "./chunk-RVT4435Z.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-BDFAIHTM.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-CYXMVMVO.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-AHA65ZCO.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-BDFAIHTM.js";
18
+ } from "./chunk-63VY4YJM.js";
19
19
  import {
20
20
  disposePty
21
- } from "./chunk-ZJSEDIFT.js";
21
+ } from "./chunk-GRLKPVTP.js";
22
22
  import {
23
23
  checkedOutBranch,
24
24
  readPendingForSession
25
- } from "./chunk-6KOJSRML.js";
25
+ } from "./chunk-QEVYCCKD.js";
26
26
  import {
27
27
  saveIgnored,
28
28
  teardownWorktree,
29
29
  worktreeFor
30
- } from "./chunk-T22E35FV.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-RVT4435Z.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-VNNAKJZA.js.map
285
+ //# sourceMappingURL=chunk-6E2I2FBJ.js.map
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
- owedToYou,
4
- stageWaiting
5
- } from "./chunk-RVT4435Z.js";
3
+ DISPLAY_LABEL,
4
+ displayStatus
5
+ } from "./chunk-OTAZOIXK.js";
6
6
  import {
7
7
  atomicWriteFile
8
8
  } from "./chunk-ZXHMC7UO.js";
@@ -10,68 +10,6 @@ import {
10
10
  getConfigDir
11
11
  } from "./chunk-6THUVP6T.js";
12
12
 
13
- // src/core/sessions/session-view.ts
14
- var RECENT_MS = 24 * 36e5;
15
- function lastActiveAt(s) {
16
- const candidates = [Date.parse(s.lastAccessedAt) || 0, s.lastActivity ?? 0, s.attention ? Date.parse(s.attention.updatedAt) || 0 : 0];
17
- return new Date(Math.max(...candidates)).toISOString();
18
- }
19
- function displayStatus(s, now = Date.now()) {
20
- if (s.archiving) return "archiving";
21
- if (s.restoring) return "restoring";
22
- const a = s.attention;
23
- if (a) {
24
- if (a.state === "needs_input") return "needs_input";
25
- if (a.state === "working") return a.background ? "background" : "working";
26
- }
27
- if (s.asleep) return "asleep";
28
- if (a) return "quiet";
29
- if (s.activityState === "active") return "active";
30
- if (s.activityState === "open") return "open";
31
- return now - Date.parse(lastActiveAt(s)) < RECENT_MS ? "recent" : "stale";
32
- }
33
- var DISPLAY_LABEL = {
34
- archiving: "Archiving",
35
- restoring: "Restoring",
36
- needs_input: "Needs your input",
37
- done: "Done",
38
- working: "Working",
39
- background: "In background",
40
- asleep: "Asleep",
41
- quiet: "Idle",
42
- active: "Active",
43
- open: "Open",
44
- recent: "Idle",
45
- stale: "Stale"
46
- };
47
- var CONTEXT_WARN = 0.7;
48
- var AGE_LABEL = {
49
- now: "Now",
50
- week: "This week",
51
- older: "Older"
52
- };
53
- var WEEK_MS = 7 * 24 * 36e5;
54
- function ageBucket(s, now = Date.now()) {
55
- const kind = displayStatus(s, now);
56
- if (owedToYou(s).length) return "now";
57
- if (kind === "needs_input" || kind === "done" || kind === "working" || kind === "background" || kind === "archiving" || kind === "restoring" || kind === "active" || kind === "open")
58
- return "now";
59
- const age = now - Date.parse(lastActiveAt(s));
60
- if (age < RECENT_MS) return "now";
61
- return age < WEEK_MS ? "week" : "older";
62
- }
63
- var OWED_LONG = {
64
- turn: () => "a finished turn to review",
65
- reply: (n) => `${n} ${n === 1 ? "reply" : "replies"} to post`,
66
- thread: (n) => `${n} review ${n === 1 ? "thread" : "threads"} with no answer`,
67
- conflict: (n) => n === 1 ? "a merge conflict" : `${n} PRs with merge conflicts`,
68
- checks: (n) => n === 1 ? "checks failing" : `${n} PRs with checks failing`,
69
- merge: () => "ready to merge"
70
- };
71
- function waitingOnOthers(s) {
72
- return !owedToYou(s).length && stageWaiting(s.prStage);
73
- }
74
-
75
13
  // src/core/agents/assistant.ts
76
14
  import fs from "fs";
77
15
  import path from "path";
@@ -199,13 +137,6 @@ ${dayNow}` : ""}`;
199
137
  }
200
138
 
201
139
  export {
202
- displayStatus,
203
- DISPLAY_LABEL,
204
- CONTEXT_WARN,
205
- AGE_LABEL,
206
- ageBucket,
207
- OWED_LONG,
208
- waitingOnOthers,
209
140
  ASSISTANT_ID,
210
141
  assistantDir,
211
142
  prepareAssistantDir,
@@ -215,4 +146,4 @@ export {
215
146
  assistantContextMonth,
216
147
  readAssistantContext
217
148
  };
218
- //# sourceMappingURL=chunk-FK2ZZUR5.js.map
149
+ //# sourceMappingURL=chunk-6FVYSW3E.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/core/agents/assistant.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\nimport { getConfigDir } from '../platform/config.js';\nimport { atomicWriteFile } from '../platform/fs-safe.js';\nimport type { AssistantView, SessionWire } from '../api-types.js';\nimport { DISPLAY_LABEL, displayStatus } from '../sessions/session-view.js';\nimport type { AgentAdapter, AllowRule, WorkHook } from './types.js';\n\n/**\n * The dashboard assistant (Ctrl+K): a persistent agent session in the PTY\n * host, like any worktree's, with its own folder under ~/.work/assistant. It\n * runs config `assistantAgent` (Claude Code by default; `assistantAgent()`).\n *\n * That folder is written by work: the agent's instructions file (CLAUDE.md\n * for Claude) saying what it is for and how to get the data (the\n * `work … --json` commands), and through its adapter's `workspace` its own\n * settings: the read-only commands pre-allowed, and a hook at the start of\n * each turn that adds what the user is looking at in the dashboard to the\n * prompt (`work hook assistant-context`), so \"clean these up\" or \"why is this\n * one blocked?\" need no explaining. An agent without a workspace gets the\n * instructions only (it asks before every command, and sees no view).\n *\n * It runs in the agent's normal permission mode, never --unsafe: anything\n * not pre-allowed — `work cleanup --apply`, `work remove`, git — asks first,\n * in the panel (and the Inbox).\n */\n\nexport const ASSISTANT_ID = 'assistant';\n\n/** What the dashboard reported, kept this long for the hook. */\nexport const CONTEXT_TTL_MS = 30 * 60_000;\n\nexport function assistantDir(): string {\n return path.join(getConfigDir(), 'assistant');\n}\nconst contextFile = () => path.join(assistantDir(), 'context.json');\n\n/**\n * Read-only commands it may run without asking (each agent's adapter writes\n * them in its own terms). Exact forms for cleanup: a `work cleanup --json`\n * prefix rule would also allow `--apply`.\n */\nexport const ASSISTANT_ALLOW: AllowRule[] = [\n { command: 'work sessions', prefix: true },\n { command: 'work digest', prefix: true },\n { command: 'work overlaps', prefix: true },\n { command: 'work search', prefix: true },\n { command: 'work cleanup --json' },\n { command: 'work cleanup --json --no-fetch' },\n { command: 'work cleanup --no-fetch --json' },\n { command: 'work list', prefix: true },\n { command: 'work recent', prefix: true },\n // The Time tab's day, read only (set / reset / off / gather / post ask first).\n { command: 'work timesheet show', prefix: true },\n { command: 'work timesheet month', prefix: true },\n];\n\n/** Its hook: what the dashboard shows, added at the start of each turn. */\nexport const ASSISTANT_HOOKS: WorkHook[] = [\n { owner: 'assistant', edge: 'turn-start', command: 'work hook assistant-context', timeoutSec: 5 },\n];\n\nexport const ASSISTANT_INSTRUCTIONS = `# You are the work dashboard's assistant\n\nThe user opens you with Ctrl+K in \\`work web\\`, the dashboard over all their git worktrees and the coding agent session in each. Help them make sense of it and act on it: what needs them, what each session did, what can be cleaned up, which sessions will conflict.\n\n## Getting the data\n\nUse the \\`work\\` CLI with \\`--json\\` (see the work-sessions skill) and parse it; don't guess from the filesystem:\n\n- \\`work sessions --json\\` — every session: status (\\`view.label\\`), age, last active, context usage, archive state. \\`--changes\\` adds +N −M and same-file overlaps; \\`--all\\` adds older and archived ones.\n- \\`work digest --json --since today|yesterday|week\\` — what each session did (prompts, turns, PRs).\n- \\`work overlaps --json\\` — live sessions changing the same files.\n- \\`work cleanup --json\\` — which worktrees can go, and why.\n- \\`work timesheet show [day] --json\\` — the Time tab's day: hours per ticket, and why (sessions' Claude minutes, commits, Jira, meetings, chats). On the Time tab, the day on screen is described to you with each message.\n- \\`work timesheet month [YYYY-MM] --json\\` — a month: every day's rows with how each got its hours, the month's tickets, and what posting it would do. On the Month view, the month on screen is described to you with each message.\n- \\`work search <words> --json\\` — sessions whose conversation (live or archived, also older than the agent keeps) mentions it, with the matching lines: \"what did we do about X?\".\n\nEach prompt comes with what the user is looking at in the dashboard (the tab, the selected session). When they say \"this\", \"these\" or \"here\", that is what they mean.\n\n## Changing things\n\nAsk before you change anything, and say exactly what will happen:\n- Removing, archiving or forgetting worktrees: \\`work cleanup --apply <id>… --action delete|archive|forget --json\\`. Each is checked again right before it runs; report what was refused and why. Never \\`--force\\` unless the user asked for exactly that.\n- A day's hours: \\`work timesheet set <day> KEY=HOURS …\\` (all its rows; quarter hours, the day's total as the user wants it), \\`reset <day>\\`, \\`off <day>\\`; several days: one command per day. Explain the change first. To look at a day again (its sessions, commits, Jira, meetings): \\`work timesheet gather <day>\\`, or \\`gather <YYYY-MM>\\` for a month's days not gathered yet. Posting to Tempo (\\`work timesheet post <day>\\`) only when the user asks for it.\n- Anything else (\\`work remove\\`, git, files in a worktree): only when asked, and show the command first.\n\nDon't post on GitHub, and don't send prompts to other sessions, unless the user asks. Keep answers short: the user is in the middle of something.\n`;\n\n/** What work wrote in the folder last time (relative paths), so files an earlier agent's setup left can go. */\nconst writtenFile = () => path.join(assistantDir(), '.work-written.json');\n/** What a work from before the list wrote: Claude's. */\nconst BEFORE_THE_LIST = ['CLAUDE.md', path.join('.claude', 'settings.json')];\n\nfunction readWritten(): string[] {\n try {\n const v = JSON.parse(fs.readFileSync(writtenFile(), 'utf-8')) as unknown;\n return Array.isArray(v) ? v.filter((x): x is string => typeof x === 'string') : [];\n } catch (err) {\n return (err as NodeJS.ErrnoException).code === 'ENOENT' ? BEFORE_THE_LIST : [];\n }\n}\n\n/**\n * Write (or refresh) the assistant's folder for the agent it runs; returns\n * it. Idempotent. Files work wrote there for another agent before (its\n * instructions, its settings with their allow rules and hooks) are removed:\n * after a switch they would be instructions and permissions nothing manages.\n * Only files work wrote and listed, inside the folder — never the user's own.\n */\nexport function prepareAssistantDir(agent: Pick<AgentAdapter, 'instructionsFile' | 'workspace'>): string {\n const dir = assistantDir();\n fs.mkdirSync(dir, { recursive: true });\n const before = readWritten();\n atomicWriteFile(path.join(dir, agent.instructionsFile), ASSISTANT_INSTRUCTIONS);\n const written = [agent.instructionsFile, ...(agent.workspace?.write(dir, { allow: ASSISTANT_ALLOW, hooks: ASSISTANT_HOOKS }) ?? [])].map(\n (f) => path.normalize(f),\n );\n const root = path.resolve(dir);\n for (const old of before.map((f) => path.normalize(f))) {\n const file = path.resolve(root, old);\n if (written.includes(old) || path.isAbsolute(old) || !file.startsWith(root + path.sep)) continue; // listed by us, inside the folder: nothing else\n fs.rmSync(file, { force: true });\n }\n atomicWriteFile(writtenFile(), JSON.stringify(written));\n return dir;\n}\n\ninterface StoredContext {\n at: string;\n text: string;\n /** The Time tab's day on screen: described afresh at each prompt (rows change by Save, Post, a rebuild). */\n day?: string;\n /** The Time tab's Month view on screen (`YYYY-MM`), described afresh the same way. */\n month?: string;\n}\n\n/**\n * The dashboard view in words, for the hook: which tab, and the selected\n * session's state. Pure.\n */\nexport function describeView(view: AssistantView, session: SessionWire | null, now = Date.now()): string {\n const lines = [`The user is looking at the dashboard's ${view.tab} tab${view.sub ? ` (${view.sub})` : ''}.`];\n if (session) {\n const status = DISPLAY_LABEL[displayStatus(session, now)];\n lines.push(\n `Selected session: ${session.target} · ${session.branch} (id ${session.id}) — ${status}.`,\n ...(session.attention?.summary ? [` Its last line: ${session.attention.summary}`] : []),\n ...(session.diffStat?.files\n ? [` Uncommitted: +${session.diffStat.added} −${session.diffStat.deleted} in ${session.diffStat.files} files.`]\n : []),\n ...(session.overlaps?.length\n ? [` Changes the same files as: ${session.overlaps.map((o) => `${o.target} · ${o.branch}`).join(', ')}.`]\n : []),\n ...(session.context ? [` Its conversation is ${Math.round((session.context.used / session.context.window) * 100)}% full.`] : []),\n ...(session.archivedAt ? [' It is archived.'] : []),\n ` Worktree: ${session.paths.join(', ')}`,\n );\n }\n if (view.note) lines.push(view.note);\n return lines.join('\\n');\n}\n\nexport function writeAssistantContext(text: string, now = Date.now(), day?: string, month?: string): void {\n fs.mkdirSync(assistantDir(), { recursive: true });\n const stored: StoredContext = { at: new Date(now).toISOString(), text, ...(day ? { day } : {}), ...(month ? { month } : {}) };\n atomicWriteFile(contextFile(), JSON.stringify(stored));\n}\n\n/** The day on screen, if the Time tab is: for the hook to describe as it is now. */\nexport function assistantContextDay(now = Date.now()): string | null {\n const s = readStored(now);\n return s && typeof s.day === 'string' && /^\\d{4}-\\d{2}-\\d{2}$/.test(s.day) ? s.day : null;\n}\n\n/** The month on screen, if the Time tab's Month view is: for the hook to describe as it is now. */\nexport function assistantContextMonth(now = Date.now()): string | null {\n const s = readStored(now);\n return s && typeof s.month === 'string' && /^\\d{4}-(0[1-9]|1[0-2])$/.test(s.month) ? s.month : null;\n}\n\nfunction readStored(now: number): Partial<StoredContext> | null {\n try {\n const s = JSON.parse(fs.readFileSync(contextFile(), 'utf-8')) as Partial<StoredContext> | null;\n if (!s || typeof s.text !== 'string' || typeof s.at !== 'string') return null;\n return now - Date.parse(s.at) > CONTEXT_TTL_MS ? null : s;\n } catch {\n return null;\n }\n}\n\n/**\n * What the hook adds to a prompt; null when the dashboard said nothing\n * lately. `dayNow` describes the Time tab's day as it is at this prompt\n * (the hook reads it from state.db), not as it was when the tab was opened.\n */\nexport function readAssistantContext(now = Date.now(), dayNow?: string | null): string | null {\n const s = readStored(now);\n if (!s) return null;\n return `[work dashboard] ${s.text}${dayNow ? `\\n${dayNow}` : ''}`;\n}\n"],"mappings":";;;;;;;;;;;;;AAAA,OAAO,QAAQ;AACf,OAAO,UAAU;AA0BV,IAAM,eAAe;AAGrB,IAAM,iBAAiB,KAAK;AAE5B,SAAS,eAAuB;AACrC,SAAO,KAAK,KAAK,aAAa,GAAG,WAAW;AAC9C;AACA,IAAM,cAAc,MAAM,KAAK,KAAK,aAAa,GAAG,cAAc;AAO3D,IAAM,kBAA+B;AAAA,EAC1C,EAAE,SAAS,iBAAiB,QAAQ,KAAK;AAAA,EACzC,EAAE,SAAS,eAAe,QAAQ,KAAK;AAAA,EACvC,EAAE,SAAS,iBAAiB,QAAQ,KAAK;AAAA,EACzC,EAAE,SAAS,eAAe,QAAQ,KAAK;AAAA,EACvC,EAAE,SAAS,sBAAsB;AAAA,EACjC,EAAE,SAAS,iCAAiC;AAAA,EAC5C,EAAE,SAAS,iCAAiC;AAAA,EAC5C,EAAE,SAAS,aAAa,QAAQ,KAAK;AAAA,EACrC,EAAE,SAAS,eAAe,QAAQ,KAAK;AAAA;AAAA,EAEvC,EAAE,SAAS,uBAAuB,QAAQ,KAAK;AAAA,E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names":[]}
@@ -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-MYXLQMF7.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-DCALTZMM.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-R47WGD62.js")).initCommand },
176
- { names: ["config"], load: async () => (await import("./config-U4SGJ7RB.js")).configCommand },
177
- { names: ["tree", "t"], load: async () => (await import("./tree-7EBS7PVA.js")).treeCommand },
178
- { names: ["remove"], load: async () => (await import("./remove-YGVUESDY.js")).removeCommand },
179
- { names: ["fork"], load: async () => (await import("./fork-LQYEB4A4.js")).forkCommand },
180
- { names: ["add-repo"], load: async () => (await import("./add-repo-AA3XTOZT.js")).addRepoCommand },
181
- { names: ["update"], load: async () => (await import("./update-M7ECF7UE.js")).updateCommand },
182
- { names: ["catchup"], load: async () => (await import("./catchup-LZ5FMXEO.js")).catchupCommand },
183
- { names: ["snooze"], load: async () => (await import("./snooze-GA46Z56G.js")).snoozeCommand },
184
- { names: ["pin"], load: async () => (await import("./pin-RGRNNJUL.js")).pinCommand },
185
- { names: ["section"], load: async () => (await import("./section-A5JKTX4J.js")).sectionCommand },
186
- { names: ["note"], load: async () => (await import("./note-VMO2PKYX.js")).noteCommand },
187
- { names: ["block"], load: async () => (await import("./block-YZQGJMLI.js")).blockCommand },
188
- { names: ["time"], load: async () => (await import("./time-H54NH62B.js")).timeCommand },
189
- { names: ["account"], load: async () => (await import("./account-RTOXCLE6.js")).accountCommand },
190
- { names: ["usage"], load: async () => (await import("./usage-IFKUY6LC.js")).usageCommand },
191
- { names: ["read"], load: async () => (await import("./read-E22APCUR.js")).readCommand },
192
- { names: ["screen"], load: async () => (await import("./screen-UILBPWSR.js")).screenCommand },
193
- { names: ["send"], load: async () => (await import("./send-EPPQKYOK.js")).sendCommand },
194
- { names: ["wait"], load: async () => (await import("./wait-K3NSSNFR.js")).waitCommand },
195
- { names: ["start"], load: async () => (await import("./start-L6G3NC2J.js")).startCommand },
196
- { names: ["stop"], load: async () => (await import("./stop-HQLHTY5V.js")).stopCommand },
197
- { names: ["restart"], load: async () => (await import("./restart-BAGGJDD2.js")).restartCommand },
198
- { names: ["answer"], load: async () => (await import("./answer-NT62U5MY.js")).answerCommand },
199
- { names: ["list"], load: async () => (await import("./list-X5YB4JRL.js")).listCommand },
200
- { names: ["status"], load: async () => (await import("./status-H5S3DZBI.js")).statusCommand },
201
- { names: ["recent"], load: async () => (await import("./recent-F3Z3JXFX.js")).recentCommand },
202
- { names: ["resume"], load: async () => (await import("./resume-PIFCI727.js")).resumeCommand },
203
- { names: ["sessions"], load: async () => (await import("./sessions-3HLVK6HG.js")).sessionsCommand },
204
- { names: ["digest"], load: async () => (await import("./digest-KRIBJHII.js")).digestCommand },
205
- { names: ["cleanup"], load: async () => (await import("./cleanup-6NOT6VTS.js")).cleanupCommand },
206
- { names: ["overlaps"], load: async () => (await import("./overlaps-ZNZTQHU7.js")).overlapsCommand },
207
- { names: ["search"], load: async () => (await import("./search-DLZEPI4I.js")).searchCommand },
208
- { names: ["pr"], load: async () => (await import("./pr-B2V3N3SV.js")).prCommand },
209
- { names: ["timesheet"], load: async () => (await import("./timesheet-PAS5SHPD.js")).timesheetCommand },
210
- { names: ["prune"], load: async () => (await import("./prune-M2MYPNI6.js")).pruneCommand },
211
- { names: ["sync"], load: async () => (await import("./sync-N2CDSJA4.js")).syncCommand },
212
- { names: ["todo"], load: async () => (await import("./todo-ODF7RI27.js")).todoCommand },
213
- { names: ["hydrate"], load: async () => (await import("./hydrate-KBWZSSBL.js")).hydrateCommand },
214
- { names: ["diff"], load: async () => (await import("./diff-CYXW5YWD.js")).diffCommand },
215
- { names: ["web"], load: async () => (await import("./web-U34XTVBA.js")).webCommand },
216
- { names: ["hook"], load: async () => (await import("./hook-MDFVVCD2.js")).hookCommand },
217
- { names: ["run"], load: async () => (await import("./run-MW3QTOXU.js")).runCommand },
218
- { names: ["broadcast"], load: async () => (await import("./broadcast-2NOVIUZI.js")).broadcastCommand },
219
- { names: ["attach", "a"], load: async () => (await import("./attach-HKVFNOOK.js")).attachCommand },
220
- { names: ["pty-host"], load: async () => (await import("./pty-host-I2I7SVOL.js")).ptyHostCommand },
221
- { names: ["state"], load: async () => (await import("./state-OZF4S7PG.js")).stateCommand },
222
- { names: ["move"], load: async () => (await import("./move-WSK5UU5T.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-SXPC4FQM.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,IAAK,QAAO;AACjB,QAAM,OAAO,OAAO;AAAA,IAClB,CAAC,GAAG,oBAAI,IAAI,CAAC,GAAG,OAAO,GAAG,eAAe,CAAC,CAAC,EACxC,OAAO,CAAC,MAAM,CAAC,YAAY,KAAK,CAAC,KAAK,OAAO,IAAI,CAAC,MAAM,YAAY,CAAC,aAAa,KAAK,IAAI,CAAC,CAAC,CAAC,EAC9F,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;AAAA,EAC3B;AACA,SAAO,OAAO,KAAK,IAAI,EAAE,SAAS,OAAO;AAC3C;AAIO,SAAS,eAAe,GAA+B;AAC5D,QAAM,IAAI;AACV,SACE,CAAC,CAAC,KACF,OAAO,MAAM,YACb,OAAO,EAAE,QAAQ,YACjB,CAAC,CAAC,EAAE,QACJ,OAAO,EAAE,SAAS,aACjB,EAAE,aAAa,UAAa,WAAW,EAAE,QAAQ,OACjD,EAAE,YAAY,UACZ,CAAC,CAAC,EAAE,WAAW,OAAO,EAAE,YAAY,YAAY,OAAO,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,OAAO,MAAM,QAAQ;AAElH;AAgCO,SAAS,eA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I,IAAI,WAAW,IAAK,QAAO;AAC/B,UAAM,OAAQ,MAAM,IAAI,KAAK,EAAE,MAAM,OAAO,CAAC,EAAE;AAC/C,UAAM,IAAI,MAAM,KAAK,SAAS,mBAAmB,EAAE,KAAK,IAAI,MAAM,EAAE;AAAA,EACtE;AAAA,EAEA,MAAM,KAAK,IAA2B;AACpC,UAAM,KAAK,KAAK,UAAU,SAAS,mBAAmB,EAAE,CAAC,EAAE;AAAA,EAC7D;AAAA,EAEA,UAAU,IAAoB;AAC5B,WAAO,kBAAkB,KAAK,KAAK,IAAI,SAAS,mBAAmB,EAAE,CAAC,iBAAiB,KAAK,KAAK,KAAK;AAAA,EACxG;AACF;","names":["path","path","json"]}
@@ -7,11 +7,11 @@ import {
7
7
  } from "./chunk-3GIH4WTA.js";
8
8
  import {
9
9
  loadHistory
10
- } from "./chunk-RVT4435Z.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-BGKHI4FC.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-RVT4435Z.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-T6BX6B5B.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-RVT4435Z.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-PGZMPB2Q.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-RVT4435Z.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-N7EHLEYG.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-N7EHLEYG.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-4GVXOUVN.js.map
37
+ //# sourceMappingURL=chunk-CMO5YUZR.js.map