@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
@@ -11,17 +11,18 @@ import {
11
11
  serveSpa,
12
12
  sessionBaseForPath,
13
13
  submitReviewSchema
14
- } from "./chunk-Z2XY3PLX.js";
14
+ } from "./chunk-3C3BKZ3H.js";
15
15
  import {
16
- ensureAgentPath
17
- } from "./chunk-JT5AR7PO.js";
16
+ ensureAgentPath,
17
+ restartHost
18
+ } from "./chunk-TPSFJSO7.js";
18
19
  import {
19
20
  createBuildFoldersJob,
20
21
  defaultBranchTidyDeps,
21
22
  defaultBuildFoldersDeps,
22
23
  deleteMergedBranches,
23
24
  findMergedBranches
24
- } from "./chunk-JB6LU6JV.js";
25
+ } from "./chunk-IWJXFNM4.js";
25
26
  import {
26
27
  createMonthGather,
27
28
  defaultTimeDeps,
@@ -35,10 +36,10 @@ import {
35
36
  graphProblem,
36
37
  signOutGraph,
37
38
  startDeviceLogin
38
- } from "./chunk-HP2QVRSQ.js";
39
+ } from "./chunk-QSOEMCWQ.js";
39
40
  import {
40
41
  defaultCleanupDeps
41
- } from "./chunk-RG7NJEN7.js";
42
+ } from "./chunk-XVNRP7XE.js";
42
43
  import {
43
44
  addTask,
44
45
  completeTask,
@@ -61,15 +62,15 @@ import {
61
62
  stageSeenKey,
62
63
  storeHolding,
63
64
  withRestoring
64
- } from "./chunk-2YXY6S7G.js";
65
+ } from "./chunk-QHTXLCG7.js";
65
66
  import {
66
67
  DiffStatCache,
67
68
  findOverlaps,
68
69
  wantsDiffStat
69
- } from "./chunk-5WEBLABB.js";
70
+ } from "./chunk-CLBQ7ZC4.js";
70
71
  import {
71
72
  createDigestSource
72
- } from "./chunk-BWD24JIP.js";
73
+ } from "./chunk-PRDRRU2B.js";
73
74
  import {
74
75
  QUEUE_RECHECK_MS,
75
76
  accountSwitchNote,
@@ -81,18 +82,18 @@ import {
81
82
  outdatedPtys,
82
83
  restartNotesSummary,
83
84
  switchRefusal
84
- } from "./chunk-V4IHZJD4.js";
85
+ } from "./chunk-HEPBANFJ.js";
85
86
  import "./chunk-ZDMJPEBO.js";
86
87
  import {
87
88
  agentsBySession,
88
89
  summarizeAgents
89
- } from "./chunk-VGRZKBUK.js";
90
+ } from "./chunk-DQCUYCMX.js";
90
91
  import "./chunk-TNJF7T33.js";
91
92
  import {
92
93
  buildUsage,
93
94
  realUsageDeps,
94
95
  setupAgentUsage
95
- } from "./chunk-SWKTDMLL.js";
96
+ } from "./chunk-26OVU2AE.js";
96
97
  import "./chunk-P2HOLCBF.js";
97
98
  import {
98
99
  sendToSession
@@ -112,7 +113,7 @@ import {
112
113
  stackedOn,
113
114
  updateFromBase,
114
115
  updateFromMain
115
- } from "./chunk-XEAFWIN6.js";
116
+ } from "./chunk-S3FMTEFR.js";
116
117
  import {
117
118
  applyPlacePatch,
118
119
  applySectionOp,
@@ -138,7 +139,7 @@ import {
138
139
  removeBlocker,
139
140
  sweepBlocks,
140
141
  unblockedPrompt
141
- } from "./chunk-PKXHK5CJ.js";
142
+ } from "./chunk-WXMWZRBH.js";
142
143
  import {
143
144
  jiraWorklogPoster,
144
145
  logWorkDay,
@@ -147,7 +148,7 @@ import {
147
148
  } from "./chunk-P4EQWC5W.js";
148
149
  import {
149
150
  sessionWorkTime
150
- } from "./chunk-BV2PPIKP.js";
151
+ } from "./chunk-QL36KN7X.js";
151
152
  import {
152
153
  DEFAULT_CATCH_UP_DAYS,
153
154
  addDays,
@@ -172,12 +173,12 @@ import {
172
173
  tempoSetup,
173
174
  timeRange,
174
175
  updateDay
175
- } from "./chunk-2Z2O5LEA.js";
176
+ } from "./chunk-ZI2KXTKM.js";
176
177
  import {
177
178
  checkTools,
178
179
  saveFolders,
179
180
  setupState
180
- } from "./chunk-4BZGUMP7.js";
181
+ } from "./chunk-ATED7SAH.js";
181
182
  import {
182
183
  RepoAdminError,
183
184
  deleteGroup,
@@ -187,7 +188,7 @@ import {
187
188
  saveGroup,
188
189
  setRepoIgnored,
189
190
  setScanRoot
190
- } from "./chunk-YHSB7IVZ.js";
191
+ } from "./chunk-RFINYWID.js";
191
192
  import {
192
193
  freeLeftovers,
193
194
  leftoversOf,
@@ -199,12 +200,12 @@ import {
199
200
  import {
200
201
  editorArgs,
201
202
  openUrl
202
- } from "./chunk-JFN67PRA.js";
203
+ } from "./chunk-KSUOVFO3.js";
203
204
  import {
204
205
  archiveMergedSession,
205
206
  archiveWaiting,
206
207
  defaultArchiveDeps
207
- } from "./chunk-5NKXGQX4.js";
208
+ } from "./chunk-6E2I2FBJ.js";
208
209
  import {
209
210
  DEFAULT_TRUSTED_BOTS,
210
211
  MAX_REPLY_CHARS,
@@ -229,7 +230,7 @@ import {
229
230
  subAgentHint,
230
231
  viewerLogin,
231
232
  withThreadContext
232
- } from "./chunk-H7GHJ3CR.js";
233
+ } from "./chunk-PTWVOT7A.js";
233
234
  import {
234
235
  cleanupVerdict,
235
236
  createCleanupJob
@@ -237,7 +238,7 @@ import {
237
238
  import {
238
239
  sessionStatusView,
239
240
  shownState
240
- } from "./chunk-AGTVDF4O.js";
241
+ } from "./chunk-INQQGV2G.js";
241
242
  import {
242
243
  listProcesses,
243
244
  runningFromNames
@@ -254,14 +255,14 @@ import {
254
255
  defaultForkDeps,
255
256
  forkSession,
256
257
  startSessionWithPrompt
257
- } from "./chunk-LIE5GVDG.js";
258
+ } from "./chunk-HCVONKJI.js";
258
259
  import {
259
260
  askCatchUp,
260
261
  cachedCatchUp,
261
262
  catchUp,
262
263
  catchUpFacts,
263
264
  forgetCatchUp
264
- } from "./chunk-KVQNJCXH.js";
265
+ } from "./chunk-T7AFYEQ7.js";
265
266
  import {
266
267
  childText,
267
268
  createInChild,
@@ -269,7 +270,7 @@ import {
269
270
  keyedQueue,
270
271
  oneAtATime,
271
272
  runWorkChild
272
- } from "./chunk-ZGT4ZDGG.js";
273
+ } from "./chunk-WXE7D44E.js";
273
274
  import {
274
275
  resolveWorkBinPath
275
276
  } from "./chunk-AH5TM3NB.js";
@@ -277,12 +278,12 @@ import {
277
278
  runInternal,
278
279
  summarizeCheckpoint,
279
280
  throttleTrailing
280
- } from "./chunk-UB3DOOPB.js";
281
+ } from "./chunk-63VY4YJM.js";
281
282
  import {
282
283
  computeDiff,
283
284
  computeRangeDiff,
284
285
  parseGitDiff
285
- } from "./chunk-JWWG624P.js";
286
+ } from "./chunk-BSP2Z7B7.js";
286
287
  import {
287
288
  configurePtyPool,
288
289
  detachPtyPool,
@@ -307,22 +308,22 @@ import {
307
308
  subscribeSession,
308
309
  syncPtyPool,
309
310
  writeToPty
310
- } from "./chunk-TR7CTHJA.js";
311
+ } from "./chunk-GRLKPVTP.js";
311
312
  import {
312
313
  dbPtySessions
313
- } from "./chunk-7NSQVIIK.js";
314
- import "./chunk-3NXRBRRJ.js";
314
+ } from "./chunk-MG5TTLYZ.js";
315
+ import "./chunk-AAYWHIIT.js";
315
316
  import {
316
317
  ASSISTANT_ID,
317
318
  assistantDir,
318
319
  describeView,
319
320
  writeAssistantContext
320
- } from "./chunk-F4EWBHTA.js";
321
- import "./chunk-K2MOQVTJ.js";
321
+ } from "./chunk-6FVYSW3E.js";
322
+ import "./chunk-OTAZOIXK.js";
322
323
  import {
323
324
  addRepoRefusal,
324
325
  addedRepoNote
325
- } from "./chunk-TQOHPNDW.js";
326
+ } from "./chunk-P6BHOAQG.js";
326
327
  import {
327
328
  clearDevWebDiscovery,
328
329
  clearWebDiscovery,
@@ -340,7 +341,7 @@ import {
340
341
  findSessionForCwd,
341
342
  readPendingForSession,
342
343
  readPendingForWorktree
343
- } from "./chunk-XMWVBLMJ.js";
344
+ } from "./chunk-QEVYCCKD.js";
344
345
  import "./chunk-ZSHWP2VS.js";
345
346
  import {
346
347
  getCommentFileStore
@@ -352,7 +353,7 @@ import {
352
353
  teardownWorktree,
353
354
  toBaseSpec,
354
355
  wouldRefuseRemoval
355
- } from "./chunk-GBMY7IMP.js";
356
+ } from "./chunk-WC534PXU.js";
356
357
  import "./chunk-RGUSVBGN.js";
357
358
  import {
358
359
  isWorktreeFolder
@@ -370,7 +371,7 @@ import {
370
371
  } from "./chunk-LNHSBM4L.js";
371
372
  import {
372
373
  VERSION
373
- } from "./chunk-4MVT7QPZ.js";
374
+ } from "./chunk-NWIVXGSL.js";
374
375
  import {
375
376
  resolveProjectTarget
376
377
  } from "./chunk-J36ULZBO.js";
@@ -457,7 +458,7 @@ import {
457
458
  updateCheckpoint,
458
459
  whileRestoring,
459
460
  writeArchiveRecord
460
- } from "./chunk-SBLK524A.js";
461
+ } from "./chunk-37XQIG7F.js";
461
462
  import {
462
463
  dayKey
463
464
  } from "./chunk-NEJVK5CF.js";
@@ -480,18 +481,18 @@ import {
480
481
  lineTimeOf,
481
482
  liveAgents,
482
483
  readJsonlSince
483
- } from "./chunk-MPY2ZQBL.js";
484
+ } from "./chunk-VUAVPBFR.js";
484
485
  import {
485
486
  usageDir
486
487
  } from "./chunk-RCGFHJM7.js";
487
- import "./chunk-BNGX2JGD.js";
488
+ import "./chunk-72IBYKIY.js";
488
489
  import {
489
490
  DEFAULT_ACCOUNT,
490
491
  DEFAULT_PROMPTS,
491
492
  DEFAULT_TIME_SETTINGS,
492
493
  isWorkday,
493
494
  loadConfig
494
- } from "./chunk-PDWEPIL6.js";
495
+ } from "./chunk-2JNW2AQ2.js";
495
496
  import {
496
497
  detachHere,
497
498
  isPidAlive,
@@ -511,7 +512,7 @@ import {
511
512
  } from "./chunk-6THUVP6T.js";
512
513
 
513
514
  // src/commands/web.ts
514
- import fs16 from "fs";
515
+ import fs17 from "fs";
515
516
  import chalk from "chalk";
516
517
 
517
518
  // src/server/web-server.ts
@@ -1255,9 +1256,9 @@ var NOT_NAMES = /* @__PURE__ */ new Set([
1255
1256
  "typeof",
1256
1257
  "await"
1257
1258
  ]);
1258
- function declarationOf(path17, text) {
1259
+ function declarationOf(path18, text) {
1259
1260
  for (const r of RULES) {
1260
- if (!r.ext.test(path17)) continue;
1261
+ if (!r.ext.test(path18)) continue;
1261
1262
  const m = r.re.exec(text);
1262
1263
  if (!m) continue;
1263
1264
  const name = r.name(m);
@@ -2622,9 +2623,9 @@ function ownedPtyDelivery(sessionId, author) {
2622
2623
  if ((session ? readPendingForWorktree(session, sessionId) : readPendingForSession(sessionId)).length === 0) return null;
2623
2624
  return readStatus(sessionId)?.state === "working" ? "next-turn" : "typed";
2624
2625
  }
2625
- async function typeAndSubmit(sessionId, text, write = writeToPty, wait) {
2626
+ async function typeAndSubmit(sessionId, text, write2 = writeToPty, wait) {
2626
2627
  const agent = agentOf(findSession2(sessionId));
2627
- return agent.input.submit((data) => write(sessionId, data), text, wait);
2628
+ return agent.input.submit((data) => write2(sessionId, data), text, wait);
2628
2629
  }
2629
2630
 
2630
2631
  // src/server/routes/panes-routes.ts
@@ -3067,6 +3068,13 @@ import { EventEmitter } from "events";
3067
3068
  import path7 from "path";
3068
3069
  import { streamSSE } from "hono/streaming";
3069
3070
  function mountScopeRoutes(app, opts) {
3071
+ const background = /* @__PURE__ */ new Set();
3072
+ const inBackground = (p) => {
3073
+ background.add(p);
3074
+ void p.finally(() => background.delete(p)).catch(() => {
3075
+ });
3076
+ return p;
3077
+ };
3070
3078
  const checkpointWatched = /* @__PURE__ */ new Set();
3071
3079
  const lastStatus = /* @__PURE__ */ new Map();
3072
3080
  const liveCheckpoint = /* @__PURE__ */ new Map();
@@ -3105,9 +3113,9 @@ function mountScopeRoutes(app, opts) {
3105
3113
  if (sessionOwnsScope(
3106
3114
  hash,
3107
3115
  loadHistory().map((s) => s.paths)
3108
- ) && !headBroughtInOtherWork(hash, repos))
3116
+ ) && !await headBroughtInOtherWork(hash, repos))
3109
3117
  return false;
3110
- if (!headAdvancedSinceInitial(hash, repos)) return false;
3118
+ if (!await headAdvancedSinceInitial(hash, repos)) return false;
3111
3119
  liveCheckpoint.delete(hash);
3112
3120
  lastStatus.delete(hash);
3113
3121
  const entry = await resetBaseline(hash, repos).catch(() => null);
@@ -3133,13 +3141,13 @@ function mountScopeRoutes(app, opts) {
3133
3141
  scopeBus.emit("checkpoints-changed", payload);
3134
3142
  };
3135
3143
  if (loadManifest(scope.hash).entries.length === 0) {
3136
- takeCheckpoint(scope.hash, scopeRepos(scope.paths)).then((entry) => {
3144
+ void inBackground(takeCheckpoint(scope.hash, scopeRepos(scope.paths))).then((entry) => {
3137
3145
  if (entry) announceCheckpoint(entry);
3138
3146
  }).catch((err) => {
3139
3147
  report("warn", `[checkpoint] initial snapshot failed: ${err.message}`);
3140
3148
  });
3141
3149
  } else {
3142
- rebaselineIfHeadAdvanced(scope.hash, scope.paths).catch((err) => {
3150
+ inBackground(rebaselineIfHeadAdvanced(scope.hash, scope.paths)).catch((err) => {
3143
3151
  report("warn", `[checkpoint] re-baseline failed: ${err.message}`);
3144
3152
  });
3145
3153
  }
@@ -3158,7 +3166,7 @@ function mountScopeRoutes(app, opts) {
3158
3166
  lastStatus.set(hash, fp);
3159
3167
  } catch {
3160
3168
  }
3161
- rebaselineIfHeadAdvanced(hash, scope.paths).then(() => takeCheckpoint(hash, scopeRepos(scope.paths))).then((entry) => {
3169
+ inBackground(rebaselineIfHeadAdvanced(hash, scope.paths).then(() => takeCheckpoint(hash, scopeRepos(scope.paths)))).then((entry) => {
3162
3170
  if (entry) {
3163
3171
  announceCheckpoint(entry);
3164
3172
  ensureSummary(scope, entry.id);
@@ -3524,7 +3532,10 @@ function mountScopeRoutes(app, opts) {
3524
3532
  return existing ?? ensureScope(paths, label);
3525
3533
  }
3526
3534
  const releaseSessionScope = (paths, clearRefs) => dropScope(scopeHashForPaths(paths), { clearRefs });
3527
- return { ensureScope, sessionScope, releaseSessionScope, emitCommentsChanged };
3535
+ const settled = async () => {
3536
+ while (background.size) await Promise.allSettled([...background]);
3537
+ };
3538
+ return { ensureScope, sessionScope, releaseSessionScope, emitCommentsChanged, settled };
3528
3539
  }
3529
3540
 
3530
3541
  // src/server/routes/terminal-routes.ts
@@ -5651,10 +5662,35 @@ function createAccountSwitchLink() {
5651
5662
  // src/core/pty/host-health.ts
5652
5663
  var UNRESPONSIVE_MS = 11e3;
5653
5664
  var SLOW_MS = 1500;
5654
- function hostHealth(b, now = Date.now()) {
5665
+ function hostHealth(b, now = Date.now(), running) {
5655
5666
  const quietMs = b.lastOkAt === null ? null : Math.max(0, now - b.lastOkAt);
5656
5667
  const state = !b.known ? "none" : quietMs === null || quietMs > UNRESPONSIVE_MS ? "unresponsive" : (b.latencyMs ?? 0) > SLOW_MS ? "slow" : "ok";
5657
- return { state, latencyMs: b.latencyMs, quietMs, error: state === "ok" ? null : b.lastError };
5668
+ const v = b.hostVersion;
5669
+ const comparable = !!running && running !== "dev" && !running.includes("-dev.") && v !== null && v !== void 0 && !v.includes("-dev.");
5670
+ const outdated = state !== "none" && comparable && v !== running ? v || "an older version" : null;
5671
+ return { state, latencyMs: b.latencyMs, quietMs, error: state === "ok" ? null : b.lastError, outdated };
5672
+ }
5673
+
5674
+ // src/server/routes/pty-host-routes.ts
5675
+ var SAID = {
5676
+ stopped: "restarted it; sessions are being restored",
5677
+ "not-running": "started one; sessions are being restored",
5678
+ "stale-file": "started one; sessions are being restored",
5679
+ unresponsive: "it doesn't answer, and its process doesn't look like work's PTY host: nothing was stopped",
5680
+ failed: "couldn't stop it"
5681
+ };
5682
+ function mountPtyHostRoutes(app, deps) {
5683
+ app.get("/api/pty-host/health", (c) => c.json(deps.health()));
5684
+ app.post("/api/pty-host/restart", async (c) => {
5685
+ if (deps.dev) return c.json({ error: "the dev server doesn't restart the PTY host: the installed work owns it" }, 409);
5686
+ const r = await deps.restart().catch((err) => ({ outcome: "failed", pid: null, error: err.message }));
5687
+ const said = SAID[r.outcome];
5688
+ const why = "error" in r && r.error ? ` (${r.error})` : "";
5689
+ report(r.pid ? "info" : "warn", `[web] PTY host restart: ${said}${why}`);
5690
+ if (!r.pid || r.outcome === "failed" || r.outcome === "unresponsive") return c.json({ error: said + why }, 409);
5691
+ deps.broadcast("host-health", deps.health());
5692
+ return c.json({ outcome: r.outcome, pid: r.pid });
5693
+ });
5658
5694
  }
5659
5695
 
5660
5696
  // src/core/pty/idle-sleep.ts
@@ -6350,12 +6386,18 @@ async function startWebServer(opts = {}) {
6350
6386
  const onDesktopUpdate = () => broadcast("updates-changed", { ts: Date.now() });
6351
6387
  if (jobs) fs14.watchFile(desktopFile, { interval: 3e3 }, onDesktopUpdate);
6352
6388
  const usageWatcher = wireUsage(app, { broadcast, build: () => buildUsage(realUsageDeps()) });
6353
- app.get("/api/pty-host/health", (c) => c.json(hostHealth(hostBeat())));
6354
- let lastHostState = hostHealth(hostBeat()).state;
6389
+ mountPtyHostRoutes(app, {
6390
+ dev: !!dev,
6391
+ health: () => hostHealth(hostBeat(), Date.now(), VERSION),
6392
+ restart: () => restartHost(getWorkBin(), { force: true }),
6393
+ broadcast
6394
+ });
6395
+ const hostKey = (h) => `${h.state}:${h.outdated ?? ""}`;
6396
+ let lastHostState = hostKey(hostHealth(hostBeat(), Date.now(), VERSION));
6355
6397
  const hostTick = lean ? null : setInterval(() => {
6356
- const h = hostHealth(hostBeat());
6357
- if (h.state === lastHostState) return;
6358
- lastHostState = h.state;
6398
+ const h = hostHealth(hostBeat(), Date.now(), VERSION);
6399
+ if (hostKey(h) === lastHostState) return;
6400
+ lastHostState = hostKey(h);
6359
6401
  broadcast("host-health", h);
6360
6402
  if (h.state === "unresponsive") report("warn", `[web] PTY host not answering: ${h.error ?? "no reply"}`);
6361
6403
  }, 5e3);
@@ -6542,7 +6584,7 @@ function createDemoRepos(liveTargets) {
6542
6584
  /** GET /api/projects: what New worktree offers, as the real one reads config. */
6543
6585
  projects() {
6544
6586
  return {
6545
- singles: Object.entries(repos).map(([name, path17]) => ({ name, kind: "single", path: path17 })),
6587
+ singles: Object.entries(repos).map(([name, path18]) => ({ name, kind: "single", path: path18 })),
6546
6588
  groups: Object.entries(groups).map(([name, members]) => ({ name, kind: "group", members }))
6547
6589
  };
6548
6590
  },
@@ -6584,12 +6626,12 @@ function createDemoRepos(liveTargets) {
6584
6626
  }));
6585
6627
  return { roots: [root], repos: rows, groups: groupRows };
6586
6628
  },
6587
- enroll(alias, path17) {
6588
- if (!found.some((f) => f.path === path17)) throw new DemoRepoError(`${path17} is not the top folder of a git repository`);
6589
- const problem = enrollProblem(alias, path17, config());
6629
+ enroll(alias, path18) {
6630
+ if (!found.some((f) => f.path === path18)) throw new DemoRepoError(`${path18} is not the top folder of a git repository`);
6631
+ const problem = enrollProblem(alias, path18, config());
6590
6632
  if (problem) throw new DemoRepoError(problem);
6591
- repos[alias] = path17;
6592
- ignored.delete(path17);
6633
+ repos[alias] = path18;
6634
+ ignored.delete(path18);
6593
6635
  },
6594
6636
  remove(alias, force) {
6595
6637
  if (!(alias in repos)) throw new DemoRepoError(`no repo \u201C${alias}\u201D`);
@@ -6598,9 +6640,9 @@ function createDemoRepos(liveTargets) {
6598
6640
  delete repos[alias];
6599
6641
  for (const g of Object.keys(groups)) groups[g] = groups[g].filter((m) => m !== alias);
6600
6642
  },
6601
- ignore(path17, on) {
6602
- if (on) ignored.add(path17);
6603
- else ignored.delete(path17);
6643
+ ignore(path18, on) {
6644
+ if (on) ignored.add(path18);
6645
+ else ignored.delete(path18);
6604
6646
  },
6605
6647
  saveGroup(name, members, creating) {
6606
6648
  const problem = groupProblem(name, members, config(), { creating });
@@ -7515,15 +7557,15 @@ ${reply}\r
7515
7557
  if (refusal || !s) return { ok: false, status: refusal?.status ?? 404, error: refusal?.error ?? "unknown session" };
7516
7558
  s.repos.push({ name: alias, uncommitted: "", sinceBranch: "", published: false, pr: null });
7517
7559
  const from = base || "main";
7518
- const path17 = this.wire(s).paths[s.repos.length - 1];
7560
+ const path18 = this.wire(s).paths[s.repos.length - 1];
7519
7561
  s.comments.post({
7520
7562
  side: "general",
7521
7563
  status: "published",
7522
- body: addedRepoNote({ alias, path: path17, branch: s.branch, from, imported: true })
7564
+ body: addedRepoNote({ alias, path: path18, branch: s.branch, from, imported: true })
7523
7565
  });
7524
7566
  this.emit("comments-changed", { sessionId: id });
7525
7567
  this.changed();
7526
- return { ok: true, wire: { ok: true, path: path17, branch: s.branch, created: true, from, imported: true, warnings: [] } };
7568
+ return { ok: true, wire: { ok: true, path: path18, branch: s.branch, created: true, from, imported: true, warnings: [] } };
7527
7569
  }
7528
7570
  // -- CI (the PR watch, simulated) ------------------------------------------
7529
7571
  /** The Today digest, through the same builder as work web: the demo's
@@ -8129,20 +8171,20 @@ function demoCodeFiles(repos, group) {
8129
8171
  })
8130
8172
  };
8131
8173
  }
8132
- function demoCodeFile(repos, group, repo, path17) {
8174
+ function demoCodeFile(repos, group, repo, path18) {
8133
8175
  if (repo === "") {
8134
- if (!group || path17 !== "CLAUDE.md") return null;
8176
+ if (!group || path18 !== "CLAUDE.md") return null;
8135
8177
  const text2 = `# Group instructions
8136
8178
 
8137
8179
  Repos: ${repos.map((r2) => r2.name).join(", ")}.
8138
8180
  `;
8139
- return { repo, path: path17, size: text2.length, text: text2 };
8181
+ return { repo, path: path18, size: text2.length, text: text2 };
8140
8182
  }
8141
8183
  const r = repos.find((x) => x.name === repo);
8142
8184
  if (!r) return null;
8143
- const changed = r.changed.find((f) => f.path === path17 && f.status !== "deleted");
8144
- const text = changed ? newSide(changed) : COMMON[path17]?.replace(/\{repo\}/g, repo);
8145
- return text === void 0 ? null : { repo, path: path17, size: text.length, text };
8185
+ const changed = r.changed.find((f) => f.path === path18 && f.status !== "deleted");
8186
+ const text = changed ? newSide(changed) : COMMON[path18]?.replace(/\{repo\}/g, repo);
8187
+ return text === void 0 ? null : { repo, path: path18, size: text.length, text };
8146
8188
  }
8147
8189
  function demoCodeSearch(repos, group, query) {
8148
8190
  const q = query.trim();
@@ -8151,12 +8193,12 @@ function demoCodeSearch(repos, group, query) {
8151
8193
  const text = [];
8152
8194
  const fold = (x) => ignoresCase(q) ? x.toLowerCase() : x;
8153
8195
  for (const r of demoCodeFiles(repos, group).repos) {
8154
- for (const path17 of r.files) {
8155
- const lines = (demoCodeFile(repos, group, r.name, path17)?.text ?? "").split("\n");
8196
+ for (const path18 of r.files) {
8197
+ const lines = (demoCodeFile(repos, group, r.name, path18)?.text ?? "").split("\n");
8156
8198
  lines.forEach((line, i) => {
8157
- const d = declarationOf(path17, line);
8158
- if (d) symbols.push({ ...d, repo: r.name, path: path17, line: i + 1, text: line.trim() });
8159
- if (fold(line).includes(fold(q))) text.push({ repo: r.name, path: path17, line: i + 1, text: line });
8199
+ const d = declarationOf(path18, line);
8200
+ if (d) symbols.push({ ...d, repo: r.name, path: path18, line: i + 1, text: line.trim() });
8201
+ if (fold(line).includes(fold(q))) text.push({ repo: r.name, path: path18, line: i + 1, text: line });
8160
8202
  });
8161
8203
  }
8162
8204
  }
@@ -8473,7 +8515,11 @@ async function startDemoServer(opts) {
8473
8515
  broadcast({ event: "agents-changed", data: { ts: Date.now() } });
8474
8516
  return c.json({ now: ids, later: [], failed: [] });
8475
8517
  });
8476
- app.get("/api/pty-host/health", (c) => c.json({ state: "ok", latencyMs: 4, quietMs: 1e3, error: null }));
8518
+ app.get(
8519
+ "/api/pty-host/health",
8520
+ (c) => c.json({ state: "ok", latencyMs: 4, quietMs: 1e3, error: null, outdated: null })
8521
+ );
8522
+ app.post("/api/pty-host/restart", (c) => c.json({ outcome: "stopped", pid: 4242 }));
8477
8523
  const worklogs = /* @__PURE__ */ new Map();
8478
8524
  app.get("/api/sessions/:id/worklog", (c) => {
8479
8525
  const w = scenario.list().find((x) => x.id === c.req.param("id"));
@@ -9298,6 +9344,64 @@ async function startDemoServer(opts) {
9298
9344
  };
9299
9345
  }
9300
9346
 
9347
+ // src/core/platform/web-life.ts
9348
+ import fs16 from "fs";
9349
+ import path17 from "path";
9350
+ var lifePath = () => path17.join(getConfigDir(), "web-life.json");
9351
+ function isLife(v) {
9352
+ const l = v;
9353
+ return !!l && typeof l === "object" && typeof l.pid === "number" && typeof l.version === "string" && typeof l.startedAt === "string" && typeof l.lastSeen === "string" && (l.ended === void 0 || typeof l.ended?.at === "string" && typeof l.ended?.how === "string");
9354
+ }
9355
+ function readWebLife() {
9356
+ try {
9357
+ const v = JSON.parse(fs16.readFileSync(lifePath(), "utf-8"));
9358
+ return isLife(v) ? v : null;
9359
+ } catch {
9360
+ return null;
9361
+ }
9362
+ }
9363
+ function write(life) {
9364
+ try {
9365
+ atomicWriteFile(lifePath(), JSON.stringify(life));
9366
+ } catch {
9367
+ }
9368
+ }
9369
+ function previousEnd(prev, alive, myPid) {
9370
+ if (!prev || prev.ended || prev.pid === myPid || alive(prev.pid)) return null;
9371
+ return `the work web before this one (${prev.version}, pid ${prev.pid}, up since ${prev.startedAt}) ended without saying how \u2014 last seen alive at ${prev.lastSeen}. It was stopped from outside (killed, or the app or the machine went down with it), not by an error of its own.`;
9372
+ }
9373
+ function startWebLife(version, now = () => /* @__PURE__ */ new Date()) {
9374
+ const life = { pid: process.pid, version, startedAt: now().toISOString(), lastSeen: now().toISOString() };
9375
+ write(life);
9376
+ let ended = false;
9377
+ return {
9378
+ beat: () => {
9379
+ if (ended) return;
9380
+ life.lastSeen = now().toISOString();
9381
+ write(life);
9382
+ },
9383
+ // The first word wins: a signal's "stopping on SIGTERM" before the exit that follows it.
9384
+ end: (how) => {
9385
+ if (ended) return;
9386
+ ended = true;
9387
+ life.lastSeen = now().toISOString();
9388
+ write({ ...life, ended: { at: life.lastSeen, how } });
9389
+ }
9390
+ };
9391
+ }
9392
+ var STOP_SIGNALS = {
9393
+ SIGINT: "stopped on SIGINT (Ctrl+C)",
9394
+ SIGTERM: "stopped on SIGTERM",
9395
+ SIGHUP: "stopped on SIGHUP (its console closed)",
9396
+ SIGBREAK: "stopped on SIGBREAK (Ctrl+Break)"
9397
+ };
9398
+ function recordExit(proc, life) {
9399
+ proc.on("exit", (code) => life.end(`exited with code ${code}`));
9400
+ }
9401
+ function stopOnSignals(proc, stop) {
9402
+ for (const [sig, how] of Object.entries(STOP_SIGNALS)) proc.on(sig, () => stop(how));
9403
+ }
9404
+
9301
9405
  // src/commands/web.ts
9302
9406
  var FULL_HOOKS = [
9303
9407
  { owner: "web-turn", edge: "turn-start", command: "work hook turn-start", timeoutSec: 10 },
@@ -9329,7 +9433,7 @@ async function reinstallAgentSetup(lean) {
9329
9433
  }
9330
9434
  function startAccountSetupSync(lean, o = {}) {
9331
9435
  return startAccountSync({
9332
- folders: () => (o.folders ?? agentAccountFolders)().filter((dir) => fs16.existsSync(dir)),
9436
+ folders: () => (o.folders ?? agentAccountFolders)().filter((dir) => fs17.existsSync(dir)),
9333
9437
  apply: o.apply ?? (() => reinstallAgentSetup(lean)),
9334
9438
  onError: swallow("set up a changed Claude account"),
9335
9439
  ...o.everyMs !== void 0 ? { everyMs: o.everyMs } : {}
@@ -9470,9 +9574,16 @@ var webCommand = {
9470
9574
  clearWebDiscovery();
9471
9575
  if (!lean) ensureAgentPath();
9472
9576
  configurePtyPool({ workBin: resolveWorkBinPath(process.argv[1]) });
9473
- let shutdown = () => {
9577
+ let shutdown = (_how) => {
9474
9578
  };
9475
- const handle = await startWebServer({ lean, onShutdownRequest: () => shutdown() });
9579
+ const before = previousEnd(readWebLife(), isPidAlive, process.pid);
9580
+ if (before) info(chalk.yellow(`Note: ${before}`));
9581
+ const life = startWebLife(VERSION);
9582
+ recordExit(process, life);
9583
+ const handle = await startWebServer({
9584
+ lean,
9585
+ onShutdownRequest: () => shutdown("asked to stop (work web --stop, or the app replacing it)")
9586
+ });
9476
9587
  bestEffort("write work web discovery files", () => writeWebDiscovery(handle.url, process.pid));
9477
9588
  info(chalk.gray(`work web running at ${handle.url}${lean ? " (lean \u2014 diff-only mode)" : ""}`));
9478
9589
  info(chalk.gray("Press Ctrl+C to stop. Or: `work web --stop` from another shell."));
@@ -9488,20 +9599,23 @@ var webCommand = {
9488
9599
  await installAgentHooks(lean, (name) => swallow(`install ${name} hooks`));
9489
9600
  await setupAgentUsage(knownAgents(), loadConfig(), lean).catch(swallow("set up the usage readings"));
9490
9601
  const accountSync = startAccountSetupSync(lean);
9491
- shutdown = () => {
9602
+ shutdown = (how) => {
9603
+ life.end(how);
9492
9604
  accountSync.stop();
9493
- info(chalk.gray("\nStopping work web."));
9605
+ info(chalk.gray(`
9606
+ Stopping work web (${how}).`));
9494
9607
  clearWebDiscovery(process.pid);
9495
9608
  removeAgentHooksSync(lean);
9496
9609
  void handle.stop().finally(() => process.exit(0));
9497
9610
  };
9498
- process.on("SIGINT", shutdown);
9499
- process.on("SIGTERM", shutdown);
9611
+ stopOnSignals(process, (how) => shutdown(how));
9500
9612
  const discoveryTimer = setInterval(() => {
9613
+ life.beat();
9501
9614
  void discoveryCheck({ pid: process.pid, url: handle.url }).then((d) => {
9502
9615
  if (d === "reclaim") bestEffort("rewrite work web discovery files", () => writeWebDiscovery(handle.url, process.pid));
9503
9616
  if (d !== "retire") return;
9504
9617
  info(chalk.gray(`Another work web (${readWebUrl()}) is the running one; stopping this duplicate.`));
9618
+ life.end(`stopped as a duplicate: ${readWebUrl()} is the running one`);
9505
9619
  clearInterval(discoveryTimer);
9506
9620
  void handle.stop().finally(() => process.exit(0));
9507
9621
  }, swallow("check work web discovery"));
@@ -9623,4 +9737,4 @@ export {
9623
9737
  stopExisting,
9624
9738
  webCommand
9625
9739
  };
9626
- //# sourceMappingURL=web-QTXU66K5.js.map
9740
+ //# sourceMappingURL=web-IYUNJMQD.js.map