@moberg_hr/work-tree 2.9.2 → 2.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (362) hide show
  1. package/dist/{account-3A7RQSUC.js → account-QSNXX5YV.js} +81 -98
  2. package/dist/account-QSNXX5YV.js.map +1 -0
  3. package/dist/{add-repo-YGDJZ6HG.js → add-repo-YZ32MLZG.js} +32 -28
  4. package/dist/{add-repo-YGDJZ6HG.js.map → add-repo-YZ32MLZG.js.map} +1 -1
  5. package/dist/{answer-GHVFFKNF.js → answer-Y4T5X446.js} +16 -13
  6. package/dist/{answer-GHVFFKNF.js.map → answer-Y4T5X446.js.map} +1 -1
  7. package/dist/{attach-LWOZKLTF.js → attach-XPYWYHDP.js} +25 -19
  8. package/dist/{attach-LWOZKLTF.js.map → attach-XPYWYHDP.js.map} +1 -1
  9. package/dist/bin.js +4 -4
  10. package/dist/{block-WVUT63QY.js → block-JVAGG5QA.js} +22 -13
  11. package/dist/block-JVAGG5QA.js.map +1 -0
  12. package/dist/{broadcast-WM423JGR.js → broadcast-FATIANHX.js} +11 -9
  13. package/dist/{broadcast-WM423JGR.js.map → broadcast-FATIANHX.js.map} +1 -1
  14. package/dist/{catchup-KJZTLHN7.js → catchup-OTI2KZG5.js} +17 -15
  15. package/dist/{catchup-KJZTLHN7.js.map → catchup-OTI2KZG5.js.map} +1 -1
  16. package/dist/{chunk-SBLK524A.js → chunk-27LWL6QE.js} +171 -143
  17. package/dist/chunk-27LWL6QE.js.map +1 -0
  18. package/dist/chunk-2HHIDWHH.js +50 -0
  19. package/dist/chunk-2HHIDWHH.js.map +1 -0
  20. package/dist/{chunk-KVQNJCXH.js → chunk-2K5TDJ7M.js} +5 -5
  21. package/dist/{chunk-PDWEPIL6.js → chunk-2MAZV5KS.js} +18 -2
  22. package/dist/chunk-2MAZV5KS.js.map +1 -0
  23. package/dist/{chunk-XEAFWIN6.js → chunk-2VRZVUM7.js} +13 -6
  24. package/dist/chunk-2VRZVUM7.js.map +1 -0
  25. package/dist/{chunk-UB3DOOPB.js → chunk-34E2LA3M.js} +34 -9
  26. package/dist/chunk-34E2LA3M.js.map +1 -0
  27. package/dist/{chunk-BV2PPIKP.js → chunk-353ZINJ2.js} +3 -3
  28. package/dist/{chunk-5QGCF3PS.js → chunk-3BSFVKMK.js} +2 -2
  29. package/dist/{chunk-XTDTM6JI.js → chunk-3S6L437Q.js} +4 -5
  30. package/dist/chunk-3S6L437Q.js.map +1 -0
  31. package/dist/{chunk-3NXRBRRJ.js → chunk-3XG23PLG.js} +17 -57
  32. package/dist/chunk-3XG23PLG.js.map +1 -0
  33. package/dist/{chunk-YHSB7IVZ.js → chunk-46XSWHCQ.js} +14 -5
  34. package/dist/{chunk-YHSB7IVZ.js.map → chunk-46XSWHCQ.js.map} +1 -1
  35. package/dist/{chunk-J36ULZBO.js → chunk-4K4S53KX.js} +2 -2
  36. package/dist/{chunk-2Z2O5LEA.js → chunk-4O4VQQEA.js} +6 -10
  37. package/dist/chunk-4O4VQQEA.js.map +1 -0
  38. package/dist/chunk-4TTYEMOY.js +180 -0
  39. package/dist/chunk-4TTYEMOY.js.map +1 -0
  40. package/dist/{chunk-TR7CTHJA.js → chunk-5R5JEQW7.js} +59 -81
  41. package/dist/chunk-5R5JEQW7.js.map +1 -0
  42. package/dist/chunk-63ZLPXRL.js +199 -0
  43. package/dist/chunk-63ZLPXRL.js.map +1 -0
  44. package/dist/{chunk-2YXY6S7G.js → chunk-66VPQOVZ.js} +17 -14
  45. package/dist/chunk-66VPQOVZ.js.map +1 -0
  46. package/dist/{chunk-F4EWBHTA.js → chunk-6J6U7JXN.js} +20 -5
  47. package/dist/chunk-6J6U7JXN.js.map +1 -0
  48. package/dist/{chunk-P2HOLCBF.js → chunk-6UTH3A76.js} +18 -2
  49. package/dist/{chunk-P2HOLCBF.js.map → chunk-6UTH3A76.js.map} +1 -1
  50. package/dist/{chunk-LIE5GVDG.js → chunk-6YMLYU5G.js} +15 -17
  51. package/dist/{chunk-LIE5GVDG.js.map → chunk-6YMLYU5G.js.map} +1 -1
  52. package/dist/chunk-7E5XPDKX.js +22 -0
  53. package/dist/chunk-7E5XPDKX.js.map +1 -0
  54. package/dist/chunk-7QNVFVG6.js +196 -0
  55. package/dist/chunk-7QNVFVG6.js.map +1 -0
  56. package/dist/chunk-7S2NQRWL.js +9 -0
  57. package/dist/{chunk-4MVT7QPZ.js.map → chunk-7S2NQRWL.js.map} +1 -1
  58. package/dist/{chunk-P4EQWC5W.js → chunk-ADIN3DTD.js} +2 -2
  59. package/dist/{chunk-JB6LU6JV.js → chunk-AHI2WVWP.js} +16 -24
  60. package/dist/chunk-AHI2WVWP.js.map +1 -0
  61. package/dist/{chunk-KUCMJHQW.js → chunk-AHYCZUPI.js} +2 -2
  62. package/dist/chunk-AQP6SCCJ.js +66 -0
  63. package/dist/chunk-AQP6SCCJ.js.map +1 -0
  64. package/dist/chunk-B5WDN63X.js +84 -0
  65. package/dist/chunk-B5WDN63X.js.map +1 -0
  66. package/dist/{chunk-SWKTDMLL.js → chunk-BNKVENDF.js} +8 -8
  67. package/dist/chunk-DAKJTB6N.js +76 -0
  68. package/dist/chunk-DAKJTB6N.js.map +1 -0
  69. package/dist/{chunk-3N3UQEC4.js → chunk-DCCC7LEP.js} +4 -3
  70. package/dist/chunk-DCCC7LEP.js.map +1 -0
  71. package/dist/chunk-E67DOUVU.js +289 -0
  72. package/dist/chunk-E67DOUVU.js.map +1 -0
  73. package/dist/{chunk-5NKXGQX4.js → chunk-E7WPTSHQ.js} +22 -22
  74. package/dist/chunk-EL3XL2OC.js +150 -0
  75. package/dist/chunk-EL3XL2OC.js.map +1 -0
  76. package/dist/{chunk-5WEBLABB.js → chunk-F3PEUOTP.js} +3 -3
  77. package/dist/{chunk-ICJPVSRY.js → chunk-FKM67CZZ.js} +53 -51
  78. package/dist/chunk-FKM67CZZ.js.map +1 -0
  79. package/dist/{chunk-VUNJVF6C.js → chunk-FMLE2WSN.js} +2 -2
  80. package/dist/{chunk-HP2QVRSQ.js → chunk-FSQJOZS4.js} +17 -10
  81. package/dist/chunk-FSQJOZS4.js.map +1 -0
  82. package/dist/chunk-FZHFD2AY.js +27 -0
  83. package/dist/chunk-FZHFD2AY.js.map +1 -0
  84. package/dist/{chunk-K2MOQVTJ.js → chunk-GZGJQKQT.js} +2 -2
  85. package/dist/{chunk-5WM24P5N.js → chunk-I6MILNM5.js} +2 -2
  86. package/dist/chunk-I6MILNM5.js.map +1 -0
  87. package/dist/{chunk-S3BAD4IR.js → chunk-ICXUTMGH.js} +2 -2
  88. package/dist/{chunk-BWD24JIP.js → chunk-IDQVTWLX.js} +5 -5
  89. package/dist/{chunk-Z2XY3PLX.js → chunk-IFQOOCT7.js} +8 -8
  90. package/dist/{chunk-JT5AR7PO.js → chunk-IKX3B26P.js} +78 -6
  91. package/dist/chunk-IKX3B26P.js.map +1 -0
  92. package/dist/{chunk-OMIMK3LB.js → chunk-IOHK45WE.js} +2 -2
  93. package/dist/{chunk-SG5LUMGE.js → chunk-JNBMANFM.js} +6 -3
  94. package/dist/chunk-JNBMANFM.js.map +1 -0
  95. package/dist/{chunk-XMWVBLMJ.js → chunk-JNCKZ3OF.js} +12 -34
  96. package/dist/chunk-JNCKZ3OF.js.map +1 -0
  97. package/dist/{chunk-6IUFNTBQ.js → chunk-JVBIWU7S.js} +4 -4
  98. package/dist/chunk-JVE2JFLV.js +15 -0
  99. package/dist/chunk-JVE2JFLV.js.map +1 -0
  100. package/dist/{chunk-7NSQVIIK.js → chunk-KDO7D46L.js} +3 -3
  101. package/dist/{chunk-GJ5V357G.js → chunk-KL4YYV37.js} +4 -4
  102. package/dist/chunk-KSVYR4G2.js +47 -0
  103. package/dist/chunk-KSVYR4G2.js.map +1 -0
  104. package/dist/{chunk-RYNBBSLY.js → chunk-KWHHB737.js} +6 -8
  105. package/dist/chunk-KWHHB737.js.map +1 -0
  106. package/dist/chunk-L22AWXWA.js +29 -0
  107. package/dist/chunk-L22AWXWA.js.map +1 -0
  108. package/dist/{chunk-ZGT4ZDGG.js → chunk-LJKF73JB.js} +8 -8
  109. package/dist/chunk-LJKF73JB.js.map +1 -0
  110. package/dist/{chunk-JWWG624P.js → chunk-LKESANVD.js} +6 -6
  111. package/dist/{chunk-RG7NJEN7.js → chunk-LZZCJAJQ.js} +11 -11
  112. package/dist/{chunk-AQJSY4CI.js → chunk-MM7344RC.js} +2 -2
  113. package/dist/{chunk-HMK3INUS.js → chunk-MQCDFSVF.js} +2 -2
  114. package/dist/{chunk-VJ7SVDED.js → chunk-MSJWQC7H.js} +6 -4
  115. package/dist/chunk-MSJWQC7H.js.map +1 -0
  116. package/dist/chunk-NWOCQVSL.js +307 -0
  117. package/dist/chunk-NWOCQVSL.js.map +1 -0
  118. package/dist/{chunk-RGUSVBGN.js → chunk-OCMNBOPX.js} +2 -2
  119. package/dist/{chunk-BNGX2JGD.js → chunk-PCNNW63Z.js} +16 -5
  120. package/dist/chunk-PCNNW63Z.js.map +1 -0
  121. package/dist/chunk-PHGVVFTF.js +1603 -0
  122. package/dist/chunk-PHGVVFTF.js.map +1 -0
  123. package/dist/{chunk-4NITDMDH.js → chunk-PPZP7CA7.js} +9 -186
  124. package/dist/chunk-PPZP7CA7.js.map +1 -0
  125. package/dist/{chunk-X4AXKO3A.js → chunk-RGLIW45S.js} +2 -2
  126. package/dist/{chunk-TQOHPNDW.js → chunk-RHDZPV6C.js} +2 -2
  127. package/dist/{chunk-3GIH4WTA.js → chunk-RJUMLWXP.js} +109 -104
  128. package/dist/chunk-RJUMLWXP.js.map +1 -0
  129. package/dist/chunk-RQFHA5BM.js +1443 -0
  130. package/dist/chunk-RQFHA5BM.js.map +1 -0
  131. package/dist/chunk-S3CTXKSN.js +17 -0
  132. package/dist/chunk-S3CTXKSN.js.map +1 -0
  133. package/dist/chunk-SJBEIYLK.js +16 -0
  134. package/dist/chunk-SJBEIYLK.js.map +1 -0
  135. package/dist/chunk-TIG7NHVO.js +231 -0
  136. package/dist/chunk-TIG7NHVO.js.map +1 -0
  137. package/dist/{chunk-4BZGUMP7.js → chunk-TKWUSJNQ.js} +36 -23
  138. package/dist/chunk-TKWUSJNQ.js.map +1 -0
  139. package/dist/{chunk-VGRZKBUK.js → chunk-UP2JTDBI.js} +3 -3
  140. package/dist/chunk-V4U5RGEG.js +59 -0
  141. package/dist/chunk-V4U5RGEG.js.map +1 -0
  142. package/dist/{chunk-V4IHZJD4.js → chunk-V7GCYL6A.js} +93 -196
  143. package/dist/chunk-V7GCYL6A.js.map +1 -0
  144. package/dist/{chunk-GBMY7IMP.js → chunk-VFH4SU3M.js} +34 -23
  145. package/dist/chunk-VFH4SU3M.js.map +1 -0
  146. package/dist/{chunk-JFN67PRA.js → chunk-VV3NFLLP.js} +16 -9
  147. package/dist/chunk-VV3NFLLP.js.map +1 -0
  148. package/dist/{chunk-AGTVDF4O.js → chunk-WKOJ7NXD.js} +4 -4
  149. package/dist/{chunk-4SZ7YW7N.js → chunk-WVV54JP3.js} +56 -58
  150. package/dist/chunk-WVV54JP3.js.map +1 -0
  151. package/dist/chunk-WY7QZ2P7.js +71 -0
  152. package/dist/chunk-WY7QZ2P7.js.map +1 -0
  153. package/dist/{chunk-YYBXQBW2.js → chunk-Y7T73SAP.js} +13 -3
  154. package/dist/chunk-Y7T73SAP.js.map +1 -0
  155. package/dist/{chunk-PKXHK5CJ.js → chunk-Z6ZMWFNV.js} +25 -7
  156. package/dist/chunk-Z6ZMWFNV.js.map +1 -0
  157. package/dist/{chunk-MPY2ZQBL.js → chunk-Z7I6DQAR.js} +42 -57
  158. package/dist/chunk-Z7I6DQAR.js.map +1 -0
  159. package/dist/{chunk-GNGXYXBC.js → chunk-ZRATYLBB.js} +2 -2
  160. package/dist/{cleanup-7E3YWQUC.js → cleanup-M5TY4FQS.js} +46 -34
  161. package/dist/{cleanup-7E3YWQUC.js.map → cleanup-M5TY4FQS.js.map} +1 -1
  162. package/dist/cli-446A536X.js +19 -0
  163. package/dist/{completion-MXX5TRIV.js → completion-IAH7WRKJ.js} +3 -2
  164. package/dist/{completion-MXX5TRIV.js.map → completion-IAH7WRKJ.js.map} +1 -1
  165. package/dist/{config-TUJNIUIO.js → config-JLORGUXN.js} +16 -13
  166. package/dist/{config-TUJNIUIO.js.map → config-JLORGUXN.js.map} +1 -1
  167. package/dist/{diff-PZKOXAU3.js → diff-4O5HXNZ7.js} +23 -20
  168. package/dist/{diff-PZKOXAU3.js.map → diff-4O5HXNZ7.js.map} +1 -1
  169. package/dist/{digest-XHDDBXA6.js → digest-IAAZXJCC.js} +13 -11
  170. package/dist/{digest-XHDDBXA6.js.map → digest-IAAZXJCC.js.map} +1 -1
  171. package/dist/{fork-HYWZW72R.js → fork-ULJYPEKY.js} +41 -28
  172. package/dist/{fork-HYWZW72R.js.map → fork-ULJYPEKY.js.map} +1 -1
  173. package/dist/{history-MRRY2VTS.js → history-JFZF22M7.js} +12 -10
  174. package/dist/{hook-OWP4H2MT.js → hook-UYOIQVJ7.js} +54 -20
  175. package/dist/hook-UYOIQVJ7.js.map +1 -0
  176. package/dist/{hydrate-ZTGARW3U.js → hydrate-DROI4RJ7.js} +14 -12
  177. package/dist/{hydrate-ZTGARW3U.js.map → hydrate-DROI4RJ7.js.map} +1 -1
  178. package/dist/{init-7VISW3JJ.js → init-FF75CQM7.js} +27 -19
  179. package/dist/{init-7VISW3JJ.js.map → init-FF75CQM7.js.map} +1 -1
  180. package/dist/install-skills-XSAHNBYD.js +22 -0
  181. package/dist/install-skills-bin.js +8 -6
  182. package/dist/install-skills-bin.js.map +1 -1
  183. package/dist/{list-5XWYT37A.js → list-5FEHBP6N.js} +15 -13
  184. package/dist/{list-5XWYT37A.js.map → list-5FEHBP6N.js.map} +1 -1
  185. package/dist/{move-PSAODKRK.js → move-422L6PPI.js} +33 -24
  186. package/dist/{move-PSAODKRK.js.map → move-422L6PPI.js.map} +1 -1
  187. package/dist/{note-7WQ2YC2F.js → note-AAXPD5VA.js} +14 -12
  188. package/dist/{note-7WQ2YC2F.js.map → note-AAXPD5VA.js.map} +1 -1
  189. package/dist/{overlaps-R27DEX36.js → overlaps-WPNUYOFF.js} +21 -11
  190. package/dist/{overlaps-R27DEX36.js.map → overlaps-WPNUYOFF.js.map} +1 -1
  191. package/dist/{pin-LS4WPLOE.js → pin-QXPF23BB.js} +14 -12
  192. package/dist/{pin-LS4WPLOE.js.map → pin-QXPF23BB.js.map} +1 -1
  193. package/dist/{pr-SMEC5O7O.js → pr-QLGXPKPQ.js} +46 -21
  194. package/dist/pr-QLGXPKPQ.js.map +1 -0
  195. package/dist/{prune-VA3V5B2I.js → prune-GRHKRRVT.js} +44 -32
  196. package/dist/{prune-VA3V5B2I.js.map → prune-GRHKRRVT.js.map} +1 -1
  197. package/dist/{pty-host-PN4A3X2Y.js → pty-host-XDDXA4SL.js} +135 -67
  198. package/dist/pty-host-XDDXA4SL.js.map +1 -0
  199. package/dist/{read-75DP75TI.js → read-YWKD2DGP.js} +13 -11
  200. package/dist/{read-75DP75TI.js.map → read-YWKD2DGP.js.map} +1 -1
  201. package/dist/{recent-YDSLMD6Y.js → recent-SI5BDVVH.js} +35 -26
  202. package/dist/recent-SI5BDVVH.js.map +1 -0
  203. package/dist/{remove-XPSU2VTR.js → remove-RXXCHY44.js} +48 -36
  204. package/dist/{remove-XPSU2VTR.js.map → remove-RXXCHY44.js.map} +1 -1
  205. package/dist/{restart-7EPW5VDV.js → restart-CPNDEXU6.js} +17 -15
  206. package/dist/{restart-7EPW5VDV.js.map → restart-CPNDEXU6.js.map} +1 -1
  207. package/dist/{resume-26Y6G4UT.js → resume-BLP4TTJK.js} +35 -20
  208. package/dist/resume-BLP4TTJK.js.map +1 -0
  209. package/dist/review-now-ADWZPELT.js +22 -0
  210. package/dist/review-now-ADWZPELT.js.map +1 -0
  211. package/dist/{run-IIURYUD2.js → run-JFCDJ3EV.js} +21 -15
  212. package/dist/run-JFCDJ3EV.js.map +1 -0
  213. package/dist/{screen-AORRCOZQ.js → screen-LBOPAUXV.js} +14 -12
  214. package/dist/{screen-AORRCOZQ.js.map → screen-LBOPAUXV.js.map} +1 -1
  215. package/dist/{search-Z3XD7ZNQ.js → search-AMEGRH24.js} +10 -8
  216. package/dist/{search-Z3XD7ZNQ.js.map → search-AMEGRH24.js.map} +1 -1
  217. package/dist/{section-6N7J4Y6J.js → section-73Z34PVE.js} +14 -12
  218. package/dist/{section-6N7J4Y6J.js.map → section-73Z34PVE.js.map} +1 -1
  219. package/dist/{send-SHHXHICL.js → send-IZBSEET5.js} +19 -16
  220. package/dist/send-IZBSEET5.js.map +1 -0
  221. package/dist/{sessions-AD5HPY2L.js → sessions-WVQ2U2W4.js} +58 -23
  222. package/dist/sessions-WVQ2U2W4.js.map +1 -0
  223. package/dist/{snooze-JZMIVMNS.js → snooze-7IBHY5MY.js} +13 -11
  224. package/dist/{snooze-JZMIVMNS.js.map → snooze-7IBHY5MY.js.map} +1 -1
  225. package/dist/{start-6VNWRLPK.js → start-AU62TW6M.js} +14 -12
  226. package/dist/{start-6VNWRLPK.js.map → start-AU62TW6M.js.map} +1 -1
  227. package/dist/{state-OZF4S7PG.js → state-IZV7DAPL.js} +8 -5
  228. package/dist/state-IZV7DAPL.js.map +1 -0
  229. package/dist/{status-YRBJR4YB.js → status-Z7OMNYZX.js} +38 -13
  230. package/dist/status-Z7OMNYZX.js.map +1 -0
  231. package/dist/{statusline-RSQMMCRN.js → statusline-VJFY7ZAB.js} +12 -11
  232. package/dist/{statusline-RSQMMCRN.js.map → statusline-VJFY7ZAB.js.map} +1 -1
  233. package/dist/{statusline-hook-OVWHHFBV.js → statusline-hook-JA7MNE5H.js} +4 -3
  234. package/dist/{statusline-hook-OVWHHFBV.js.map → statusline-hook-JA7MNE5H.js.map} +1 -1
  235. package/dist/{stop-A2Q4CO6Z.js → stop-PWNXSFBD.js} +14 -12
  236. package/dist/{stop-A2Q4CO6Z.js.map → stop-PWNXSFBD.js.map} +1 -1
  237. package/dist/{sync-GXXBOQ4W.js → sync-2BTZVDDG.js} +44 -32
  238. package/dist/{sync-GXXBOQ4W.js.map → sync-2BTZVDDG.js.map} +1 -1
  239. package/dist/{time-XKEMSDMN.js → time-CTCIAXIY.js} +15 -13
  240. package/dist/{time-XKEMSDMN.js.map → time-CTCIAXIY.js.map} +1 -1
  241. package/dist/{time-actions-DB7OQ2IS.js → time-actions-UYBOXET6.js} +5 -4
  242. package/dist/{timesheet-ZAZXN6LK.js → timesheet-BUFQ34FC.js} +24 -15
  243. package/dist/{timesheet-ZAZXN6LK.js.map → timesheet-BUFQ34FC.js.map} +1 -1
  244. package/dist/{todo-ODF7RI27.js → todo-2R7VID57.js} +4 -4
  245. package/dist/{tree-HJGFWO6G.js → tree-LQDPAXQA.js} +65 -45
  246. package/dist/tree-LQDPAXQA.js.map +1 -0
  247. package/dist/{update-6427PE7F.js → update-2IYJHY7H.js} +24 -14
  248. package/dist/{update-6427PE7F.js.map → update-2IYJHY7H.js.map} +1 -1
  249. package/dist/{usage-HIXH42ZH.js → usage-IR5GNF4R.js} +13 -11
  250. package/dist/{usage-HIXH42ZH.js.map → usage-IR5GNF4R.js.map} +1 -1
  251. package/dist/version-ONEI52TI.js +115 -0
  252. package/dist/version-ONEI52TI.js.map +1 -0
  253. package/dist/{wait-VHPP2B7P.js → wait-6DH34L53.js} +16 -13
  254. package/dist/{wait-VHPP2B7P.js.map → wait-6DH34L53.js.map} +1 -1
  255. package/dist/wd-bin.js +6 -6
  256. package/dist/web/assets/PtyView-kBcAOwHr.js +96 -0
  257. package/dist/web/assets/PtyView-kBcAOwHr.js.map +1 -0
  258. package/dist/web/assets/index-BgfR3N99.js +124 -0
  259. package/dist/web/assets/index-BgfR3N99.js.map +1 -0
  260. package/dist/web/assets/index-CKpHjII8.css +1 -0
  261. package/dist/web/index.html +2 -2
  262. package/dist/{web-QTXU66K5.js → web-RIHGV7YY.js} +2893 -444
  263. package/dist/web-RIHGV7YY.js.map +1 -0
  264. package/npm-shrinkwrap.json +2 -2
  265. package/package.json +1 -1
  266. package/plugins/work-tree/skills/wd-review/SKILL.md +1 -1
  267. package/plugins/work-tree/skills/work-sessions/SKILL.md +2 -2
  268. package/dist/account-3A7RQSUC.js.map +0 -1
  269. package/dist/block-WVUT63QY.js.map +0 -1
  270. package/dist/chunk-2YXY6S7G.js.map +0 -1
  271. package/dist/chunk-2Z2O5LEA.js.map +0 -1
  272. package/dist/chunk-3GIH4WTA.js.map +0 -1
  273. package/dist/chunk-3N3UQEC4.js.map +0 -1
  274. package/dist/chunk-3NXRBRRJ.js.map +0 -1
  275. package/dist/chunk-4BZGUMP7.js.map +0 -1
  276. package/dist/chunk-4MVT7QPZ.js +0 -9
  277. package/dist/chunk-4NITDMDH.js.map +0 -1
  278. package/dist/chunk-4SZ7YW7N.js.map +0 -1
  279. package/dist/chunk-5WM24P5N.js.map +0 -1
  280. package/dist/chunk-BNGX2JGD.js.map +0 -1
  281. package/dist/chunk-F4EWBHTA.js.map +0 -1
  282. package/dist/chunk-GBMY7IMP.js.map +0 -1
  283. package/dist/chunk-H7GHJ3CR.js +0 -551
  284. package/dist/chunk-H7GHJ3CR.js.map +0 -1
  285. package/dist/chunk-HP2QVRSQ.js.map +0 -1
  286. package/dist/chunk-ICJPVSRY.js.map +0 -1
  287. package/dist/chunk-JB6LU6JV.js.map +0 -1
  288. package/dist/chunk-JFN67PRA.js.map +0 -1
  289. package/dist/chunk-JT5AR7PO.js.map +0 -1
  290. package/dist/chunk-MPY2ZQBL.js.map +0 -1
  291. package/dist/chunk-PDWEPIL6.js.map +0 -1
  292. package/dist/chunk-PKXHK5CJ.js.map +0 -1
  293. package/dist/chunk-RCYI7SRA.js +0 -15
  294. package/dist/chunk-RCYI7SRA.js.map +0 -1
  295. package/dist/chunk-RYNBBSLY.js.map +0 -1
  296. package/dist/chunk-SBLK524A.js.map +0 -1
  297. package/dist/chunk-SG5LUMGE.js.map +0 -1
  298. package/dist/chunk-TR7CTHJA.js.map +0 -1
  299. package/dist/chunk-UB3DOOPB.js.map +0 -1
  300. package/dist/chunk-V4IHZJD4.js.map +0 -1
  301. package/dist/chunk-VJ7SVDED.js.map +0 -1
  302. package/dist/chunk-VTLDYH3C.js +0 -227
  303. package/dist/chunk-VTLDYH3C.js.map +0 -1
  304. package/dist/chunk-XEAFWIN6.js.map +0 -1
  305. package/dist/chunk-XMWVBLMJ.js.map +0 -1
  306. package/dist/chunk-XTDTM6JI.js.map +0 -1
  307. package/dist/chunk-YYBXQBW2.js.map +0 -1
  308. package/dist/chunk-ZDMJPEBO.js +0 -31
  309. package/dist/chunk-ZDMJPEBO.js.map +0 -1
  310. package/dist/chunk-ZGT4ZDGG.js.map +0 -1
  311. package/dist/cli-BHIBPUQG.js +0 -19
  312. package/dist/hook-OWP4H2MT.js.map +0 -1
  313. package/dist/install-skills-IIMTRQ4K.js +0 -20
  314. package/dist/pr-SMEC5O7O.js.map +0 -1
  315. package/dist/pty-host-PN4A3X2Y.js.map +0 -1
  316. package/dist/recent-YDSLMD6Y.js.map +0 -1
  317. package/dist/resume-26Y6G4UT.js.map +0 -1
  318. package/dist/run-IIURYUD2.js.map +0 -1
  319. package/dist/send-SHHXHICL.js.map +0 -1
  320. package/dist/sessions-AD5HPY2L.js.map +0 -1
  321. package/dist/state-OZF4S7PG.js.map +0 -1
  322. package/dist/status-YRBJR4YB.js.map +0 -1
  323. package/dist/tree-HJGFWO6G.js.map +0 -1
  324. package/dist/web/assets/PtyView-B7zFUh_M.js +0 -96
  325. package/dist/web/assets/PtyView-B7zFUh_M.js.map +0 -1
  326. package/dist/web/assets/index-BAxeogV4.css +0 -1
  327. package/dist/web/assets/index-C4cR3Hwy.js +0 -120
  328. package/dist/web/assets/index-C4cR3Hwy.js.map +0 -1
  329. package/dist/web-QTXU66K5.js.map +0 -1
  330. /package/dist/{chunk-KVQNJCXH.js.map → chunk-2K5TDJ7M.js.map} +0 -0
  331. /package/dist/{chunk-BV2PPIKP.js.map → chunk-353ZINJ2.js.map} +0 -0
  332. /package/dist/{chunk-5QGCF3PS.js.map → chunk-3BSFVKMK.js.map} +0 -0
  333. /package/dist/{chunk-J36ULZBO.js.map → chunk-4K4S53KX.js.map} +0 -0
  334. /package/dist/{chunk-P4EQWC5W.js.map → chunk-ADIN3DTD.js.map} +0 -0
  335. /package/dist/{chunk-KUCMJHQW.js.map → chunk-AHYCZUPI.js.map} +0 -0
  336. /package/dist/{chunk-SWKTDMLL.js.map → chunk-BNKVENDF.js.map} +0 -0
  337. /package/dist/{chunk-5NKXGQX4.js.map → chunk-E7WPTSHQ.js.map} +0 -0
  338. /package/dist/{chunk-5WEBLABB.js.map → chunk-F3PEUOTP.js.map} +0 -0
  339. /package/dist/{chunk-VUNJVF6C.js.map → chunk-FMLE2WSN.js.map} +0 -0
  340. /package/dist/{chunk-K2MOQVTJ.js.map → chunk-GZGJQKQT.js.map} +0 -0
  341. /package/dist/{chunk-S3BAD4IR.js.map → chunk-ICXUTMGH.js.map} +0 -0
  342. /package/dist/{chunk-BWD24JIP.js.map → chunk-IDQVTWLX.js.map} +0 -0
  343. /package/dist/{chunk-Z2XY3PLX.js.map → chunk-IFQOOCT7.js.map} +0 -0
  344. /package/dist/{chunk-OMIMK3LB.js.map → chunk-IOHK45WE.js.map} +0 -0
  345. /package/dist/{chunk-6IUFNTBQ.js.map → chunk-JVBIWU7S.js.map} +0 -0
  346. /package/dist/{chunk-7NSQVIIK.js.map → chunk-KDO7D46L.js.map} +0 -0
  347. /package/dist/{chunk-GJ5V357G.js.map → chunk-KL4YYV37.js.map} +0 -0
  348. /package/dist/{chunk-JWWG624P.js.map → chunk-LKESANVD.js.map} +0 -0
  349. /package/dist/{chunk-RG7NJEN7.js.map → chunk-LZZCJAJQ.js.map} +0 -0
  350. /package/dist/{chunk-AQJSY4CI.js.map → chunk-MM7344RC.js.map} +0 -0
  351. /package/dist/{chunk-HMK3INUS.js.map → chunk-MQCDFSVF.js.map} +0 -0
  352. /package/dist/{chunk-RGUSVBGN.js.map → chunk-OCMNBOPX.js.map} +0 -0
  353. /package/dist/{chunk-X4AXKO3A.js.map → chunk-RGLIW45S.js.map} +0 -0
  354. /package/dist/{chunk-TQOHPNDW.js.map → chunk-RHDZPV6C.js.map} +0 -0
  355. /package/dist/{chunk-VGRZKBUK.js.map → chunk-UP2JTDBI.js.map} +0 -0
  356. /package/dist/{chunk-AGTVDF4O.js.map → chunk-WKOJ7NXD.js.map} +0 -0
  357. /package/dist/{chunk-GNGXYXBC.js.map → chunk-ZRATYLBB.js.map} +0 -0
  358. /package/dist/{cli-BHIBPUQG.js.map → cli-446A536X.js.map} +0 -0
  359. /package/dist/{history-MRRY2VTS.js.map → history-JFZF22M7.js.map} +0 -0
  360. /package/dist/{install-skills-IIMTRQ4K.js.map → install-skills-XSAHNBYD.js.map} +0 -0
  361. /package/dist/{time-actions-DB7OQ2IS.js.map → time-actions-UYBOXET6.js.map} +0 -0
  362. /package/dist/{todo-ODF7RI27.js.map → todo-2R7VID57.js.map} +0 -0
@@ -6,41 +6,20 @@ import {
6
6
  getCommentFileStore,
7
7
  readStoreComments,
8
8
  readStoresComments
9
- } from "./chunk-5QGCF3PS.js";
9
+ } from "./chunk-3BSFVKMK.js";
10
10
  import {
11
+ checkedOutBranch,
11
12
  loadHistory
12
- } from "./chunk-SBLK524A.js";
13
+ } from "./chunk-27LWL6QE.js";
13
14
  import {
14
15
  sessionIdFor,
15
16
  tx,
16
17
  withDb
17
- } from "./chunk-YYBXQBW2.js";
18
+ } from "./chunk-Y7T73SAP.js";
18
19
 
19
- // src/core/git/git-head.ts
20
+ // src/core/comments/pending-delivery.ts
20
21
  import fs from "fs";
21
22
  import path from "path";
22
- function checkedOutBranch(checkout) {
23
- try {
24
- const dotGit = path.join(checkout, ".git");
25
- let gitDir = dotGit;
26
- if (fs.statSync(dotGit).isFile()) {
27
- const m = /^gitdir:\s*(.+?)\s*$/m.exec(fs.readFileSync(dotGit, "utf8"));
28
- if (!m) return null;
29
- gitDir = path.resolve(checkout, m[1]);
30
- }
31
- return branchFromHead(fs.readFileSync(path.join(gitDir, "HEAD"), "utf8"));
32
- } catch {
33
- return null;
34
- }
35
- }
36
- function branchFromHead(head) {
37
- const m = /^ref:\s*refs\/heads\/(.+?)\s*$/m.exec(head);
38
- return m ? m[1] : null;
39
- }
40
-
41
- // src/core/comments/pending-delivery.ts
42
- import fs2 from "fs";
43
- import path2 from "path";
44
23
  function deliveredIds(d, sessionId) {
45
24
  return new Set(
46
25
  d.prepare("SELECT comment_id FROM comment_deliveries WHERE session_id = ?").all(sessionId).map(
@@ -49,7 +28,7 @@ function deliveredIds(d, sessionId) {
49
28
  );
50
29
  }
51
30
  function normalize(p) {
52
- return path2.resolve(p).replace(/\\/g, "/").toLowerCase();
31
+ return path.resolve(p).replace(/\\/g, "/").toLowerCase();
53
32
  }
54
33
  function owns(candidate, current, root) {
55
34
  if (!!candidate.archivedAt !== !!current.archivedAt) return !candidate.archivedAt;
@@ -63,7 +42,7 @@ function findSessionForCwd(cwd, sessions = loadHistory()) {
63
42
  const here = normalize(cwd);
64
43
  let best = null;
65
44
  for (const s of sessions) {
66
- const roots = s.isGroup && s.paths[0] ? [...s.paths, path2.dirname(s.paths[0])] : s.paths;
45
+ const roots = s.isGroup && s.paths[0] ? [...s.paths, path.dirname(s.paths[0])] : s.paths;
67
46
  for (const root of roots) {
68
47
  const r = normalize(root);
69
48
  if (!(here === r || here.startsWith(r + "/"))) continue;
@@ -75,9 +54,9 @@ function findSessionForCwd(cwd, sessions = loadHistory()) {
75
54
  if (!best) return null;
76
55
  const own = new Set(best.session.paths.map(normalize));
77
56
  const top = normalize(best.root);
78
- for (let dir = path2.resolve(cwd); normalize(dir) !== top && normalize(dir).startsWith(top + "/"); dir = path2.dirname(dir)) {
79
- if (!own.has(normalize(dir)) && fs2.existsSync(path2.join(dir, ".git"))) return null;
80
- if (path2.dirname(dir) === dir) break;
57
+ for (let dir = path.resolve(cwd); normalize(dir) !== top && normalize(dir).startsWith(top + "/"); dir = path.dirname(dir)) {
58
+ if (!own.has(normalize(dir)) && fs.existsSync(path.join(dir, ".git"))) return null;
59
+ if (path.dirname(dir) === dir) break;
81
60
  }
82
61
  return best.session;
83
62
  }
@@ -90,7 +69,7 @@ function readPendingForSession(sessionId) {
90
69
  return readStoreComments(sessionId).filter(isPendingFor(delivered));
91
70
  }
92
71
  function scopeStoreIdsForPaths(paths) {
93
- const resolved = paths.map((p) => path2.resolve(p));
72
+ const resolved = paths.map((p) => path.resolve(p));
94
73
  const ids = /* @__PURE__ */ new Set();
95
74
  ids.add(`scope-${scopeHashFor(resolved)}`);
96
75
  for (const p of resolved) ids.add(`scope-${scopeHashFor([p])}`);
@@ -196,7 +175,6 @@ function formatFullBody(prefix, c) {
196
175
  }
197
176
 
198
177
  export {
199
- checkedOutBranch,
200
178
  findSessionForCwd,
201
179
  NOTE_NUDGE,
202
180
  readPendingForSession,
@@ -206,4 +184,4 @@ export {
206
184
  claimForDelivery,
207
185
  formatPendingForPrompt
208
186
  };
209
- //# sourceMappingURL=chunk-XMWVBLMJ.js.map
187
+ //# sourceMappingURL=chunk-JNCKZ3OF.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/core/comments/pending-delivery.ts"],"sourcesContent":["/**\n * Bridge between `work web` review comments and any live Claude session\n * running in the same worktree. Storage (state.db, see db.ts):\n *\n * comments the comment stores (comment-file-store.ts)\n * comment_deliveries (session, comment id) pairs surfaced to Claude\n *\n * \"Pending\" = published, user-authored, not in the delivered list. Replies\n * authored by Claude (author === 'claude') are excluded — Claude wrote\n * them; we don't need to echo them back.\n *\n * Delivery is lazy: when a Claude in the matching worktree submits a\n * prompt, the hook reads pending comments via this module, prints them as\n * a system-reminder block to stdout (which Claude Code injects into the\n * conversation), and marks them delivered.\n */\n\nimport { checkedOutBranch } from '../git/git-head.js';\nimport fs from 'node:fs';\nimport path from 'node:path';\nimport { loadHistory, type WorktreeSession } from '../sessions/history.js';\nimport { sessionIdFor } from '../sessions/session-id.js';\nimport { getCommentFileStore, readStoreComments, readStoresComments } from './comment-file-store.js';\nimport { scopeHashFor } from '../diff/repo-spec.js';\nimport { tx, withDb, type Db } from '../platform/db.js';\nimport type { Comment } from './comment-types.js';\n\nfunction deliveredIds(d: Db, sessionId: string): Set<string> {\n return new Set(\n (d.prepare('SELECT comment_id FROM comment_deliveries WHERE session_id = ?').all(sessionId) as Array<{ comment_id: string }>).map(\n (r) => r.comment_id,\n ),\n );\n}\n\n/** Norm-path comparison that mirrors what we do server-side. */\nfunction normalize(p: string): string {\n return path.resolve(p).replace(/\\\\/g, '/').toLowerCase();\n}\n\n/** Map a Claude cwd back to a session. Tries direct-match against any\n * session's path first, then ancestor match (so cwd inside a subdir of a\n * worktree still resolves to the worktree's session). */\n/**\n * Two sessions on one folder (an old entry and a newer one, a typo'd target\n * re-added): which of them a Claude there is. Not an archived one when the\n * other isn't; then the one whose branch is checked out there; then the one\n * entered last. The oldest used to win, so status and comments went to an\n * entry nobody looks at.\n */\nfunction owns(candidate: WorktreeSession, current: WorktreeSession, root: string): boolean {\n if (!!candidate.archivedAt !== !!current.archivedAt) return !candidate.archivedAt;\n const onBranch = checkedOutBranch(root);\n const a = candidate.branch === onBranch;\n const b = current.branch === onBranch;\n if (a !== b) return a;\n return (Date.parse(candidate.lastAccessedAt) || 0) > (Date.parse(current.lastAccessedAt) || 0);\n}\n\nexport function findSessionForCwd(cwd: string, sessions: WorktreeSession[] = loadHistory()): WorktreeSession | null {\n const here = normalize(cwd);\n // Deepest root containing cwd wins, so nested worktrees disambiguate. A\n // group's roots include the group root (the sub-repos' parent) — that's\n // where `work tree` launches Claude for a group, so hooks fire from there.\n let best: { session: WorktreeSession; root: string; len: number } | null = null;\n for (const s of sessions) {\n const roots = s.isGroup && s.paths[0] ? [...s.paths, path.dirname(s.paths[0])] : s.paths;\n for (const root of roots) {\n const r = normalize(root);\n if (!(here === r || here.startsWith(r + '/'))) continue;\n if (!best || r.length > best.len || (r.length === best.len && owns(s, best.session, root))) {\n best = { session: s, root, len: r.length };\n }\n }\n }\n if (!best) return null;\n // A separate checkout nested INSIDE the session's tree (a git worktree at\n // <repo>/.claude/worktrees/x, a vendored repo) is not this session: its\n // Claude must not report status, take checkpoints or receive comments as\n // if it were the parent. Any `.git` between cwd and the matched root —\n // other than the session's own repos — marks a different checkout.\n // (Plain fs checks: this runs on every hook.)\n const own = new Set(best.session.paths.map(normalize));\n const top = normalize(best.root);\n for (let dir = path.resolve(cwd); normalize(dir) !== top && normalize(dir).startsWith(top + '/'); dir = path.dirname(dir)) {\n if (!own.has(normalize(dir)) && fs.existsSync(path.join(dir, '.git'))) return null;\n if (path.dirname(dir) === dir) break;\n }\n return best.session;\n}\n\nfunction isPendingFor(delivered: Set<string>) {\n return (c: Comment) => c.status === 'published' && c.author === 'user' && !delivered.has(c.id);\n}\n\n/** Returns published user comments that haven't been delivered yet.\n * Reads through the file-store cache so we see in-flight writes\n * (`session-meta.ts` and other readers couldn't, when they re-read the\n * disk directly). */\n/**\n * The line typed into an idle Claude (or given as the first prompt of one\n * work starts) so its UserPromptSubmit hook attaches the pending comments.\n * Short on purpose: a long typed note got mangled by Claude Code's paste\n * handling. It says where the content is, so it reads right in the\n * transcript.\n */\nexport const NOTE_NUDGE =\n 'work has new notes for you (review feedback, CI results or comments); they are attached to this message. Work through them now.';\n\nexport function readPendingForSession(sessionId: string): Comment[] {\n const delivered = withDb((d) => deliveredIds(d, sessionId));\n return readStoreComments(sessionId).filter(isPendingFor(delivered));\n}\n\n/** Comment-store ids for every `wd` scope that could cover this worktree.\n * A scope is keyed by `sha1` of its sorted repo roots (see\n * `repo-spec.scopeHashFor`), so from a session's paths we can rebuild the\n * exact ids without consulting `work web`'s in-memory scope registry:\n * - the whole-set hash → a group `wd` opened at the group root, or the\n * single-repo `wd` (one path);\n * - each individual path's hash → a `wd` opened inside one sub-repo of a\n * group worktree.\n * `registerScope` hashes `path.resolve()`d roots, so we resolve here too or\n * the hashes won't line up. Mirrors `scope-manager.commentStoreIdForScope`\n * (`scope-<hash>`). */\nexport function scopeStoreIdsForPaths(paths: string[]): string[] {\n const resolved = paths.map((p) => path.resolve(p));\n const ids = new Set<string>();\n ids.add(`scope-${scopeHashFor(resolved)}`);\n for (const p of resolved) ids.add(`scope-${scopeHashFor([p])}`);\n return [...ids];\n}\n\n/**\n * Pending comments for a whole worktree: the session's own comment store\n * PLUS any `wd` / `wd -c` scope review store covering the same paths.\n *\n * `wd` registers its review under a scope-hash comment store, not the\n * session store the hook reads — without this merge, comments left in the\n * `wd` review UI would never reach the Claude running in that worktree.\n * Delivered-tracking stays per-session (one `<sessionId>.delivered.json`),\n * so a comment surfaced here won't be re-delivered regardless of which\n * store it came from.\n */\nexport function readPendingForWorktree(session: WorktreeSession, sessionId: string = sessionIdFor(session)): Comment[] {\n const delivered = withDb((d) => deliveredIds(d, sessionId));\n const pending = isPendingFor(delivered);\n const storeIds = [sessionId, ...scopeStoreIdsForPaths(session.paths)];\n const rows = readStoresComments(storeIds); // one query: this runs for every row of /api/sessions\n const seen = new Set<string>();\n const out: Comment[] = [];\n for (const storeId of storeIds) {\n for (const c of rows.get(storeId) ?? []) {\n if (seen.has(c.id) || !pending(c)) continue;\n seen.add(c.id);\n out.push(c);\n }\n }\n return out;\n}\n\n/**\n * What was handed to Claude is done once its turn really ends: your review\n * comments and work's notes to it (PR feedback, CI, a prompt you sent) —\n * every top-level comment of yours it was given, in the session's store and\n * any `wd` scope store over its paths — are marked resolved. Left open, they\n * piled up on the Diff tab's badge (three PR-watch notes read as \"3\"), to\n * resolve or delete by hand. Resolved threads stay listed (dimmed) and can\n * be reopened. Claude's own replies are left as they are. Returns the ids\n * resolved.\n */\nexport function resolveAddressed(session: WorktreeSession): string[] {\n const sessionId = sessionIdFor(session);\n const delivered = withDb((d) => deliveredIds(d, sessionId));\n if (delivered.size === 0) return [];\n const done: string[] = [];\n for (const storeId of [sessionId, ...scopeStoreIdsForPaths(session.paths)]) {\n const open = readStoreComments(storeId).filter(\n (c) => delivered.has(c.id) && c.author === 'user' && c.status === 'published' && !c.parentId && !c.resolved,\n );\n if (open.length === 0) continue;\n const store = getCommentFileStore(storeId);\n for (const c of open) if (store.setResolved(c.id, true)) done.push(c.id);\n }\n return done;\n}\n\n/** Persist a delivery batch, so these ids are never surfaced again. */\nexport function markDelivered(sessionId: string, ids: string[]): void {\n if (ids.length === 0) return;\n tx((d) => {\n const ins = d.prepare('INSERT OR IGNORE INTO comment_deliveries (session_id, comment_id) VALUES (?, ?)');\n for (const id of ids) ins.run(sessionId, id);\n });\n}\n\n/**\n * Claim comments for delivery: of `ids`, return the ones nobody has\n * delivered yet, and mark them delivered — atomically. Two deliverers\n * racing (a Stop hook and the PTY push for the same comment) then can't\n * both send it: only the one that claimed it does. A deliverer whose send\n * fails gives the ids back with `releaseClaim`.\n */\nexport function claimForDelivery(sessionId: string, ids: string[]): string[] {\n if (ids.length === 0) return [];\n // INSERT OR IGNORE in one write transaction: a row inserted here is our\n // claim; one that already existed was someone else's.\n return tx((d) => {\n const ins = d.prepare('INSERT OR IGNORE INTO comment_deliveries (session_id, comment_id) VALUES (?, ?)');\n return ids.filter((id) => ins.run(sessionId, id).changes > 0);\n });\n}\n\n/** Undo a claim whose delivery failed, so the next hook picks them up. */\nexport function releaseClaim(sessionId: string, ids: string[]): void {\n if (ids.length === 0) return;\n tx((d) => {\n const del = d.prepare('DELETE FROM comment_deliveries WHERE session_id = ? AND comment_id = ?');\n for (const id of ids) del.run(sessionId, id);\n });\n}\n\n/** Cap the size of one comment body we surface to Claude. A pathologically\n * long comment shouldn't blow out Claude's context — we truncate, then\n * hint at the rest via \"(truncated)\". 4 KB is generous for a code-review\n * note while leaving headroom for batches. */\nconst MAX_BODY_BYTES = 4 * 1024;\n/** A general note: a prompt, or work's own note (a PR review round quotes\n * every thread, then a bot's overview). 4 KB once cut such a note before\n * the line telling Claude how to draft its replies. */\nconst MAX_NOTE_BYTES = 16 * 1024;\n/** Overall cap on the whole system-reminder payload. Multiple long\n * comments at once still get bounded — but room for four whole notes, since\n * the cut falls on the newest one's end: its instructions. */\nconst MAX_TOTAL_BYTES = 4 * MAX_NOTE_BYTES;\n\n/**\n * Format pending comments as a system-reminder block suitable for stdout.\n * Returns empty string when there's nothing pending — the caller (the\n * `work hook` CLI) just exits silently in that case.\n *\n * Truncates pathologically long bodies and caps the overall payload so\n * one runaway comment can't displace the rest of Claude's context.\n */\nexport function formatPendingForPrompt(pending: Comment[]): string {\n if (pending.length === 0) return '';\n\n const sorted = [...pending].sort((a, b) => a.createdAt.localeCompare(b.createdAt));\n\n const general = sorted.filter((c) => c.side === 'general' && !c.parentId);\n const inline = sorted.filter((c) => c.side !== 'general' && !c.parentId);\n const replies = sorted.filter((c) => c.parentId);\n\n const lines: string[] = [];\n lines.push('<system-reminder>');\n lines.push(`New review comments from \\`work web\\` (${pending.length} item${pending.length === 1 ? '' : 's'}):`);\n lines.push('');\n\n if (general.length > 0) {\n lines.push('## General notes');\n for (const c of general) {\n // General notes (this is where `work broadcast` lands) may be multi-line\n // prompts — deliver the whole body, not just line 1. Only the byte cap\n // applies. Inline/reply comments still use the one-line `formatBody`.\n lines.push(formatFullBody('-', c));\n }\n lines.push('');\n }\n\n if (inline.length > 0) {\n lines.push('## Inline comments');\n for (const c of inline) {\n const where = `${c.repo}/${c.file}:${c.line} (${c.side})`;\n lines.push(formatBody(`- ${where}`, c));\n }\n lines.push('');\n }\n\n if (replies.length > 0) {\n lines.push('## Replies');\n for (const c of replies) {\n lines.push(formatBody(`- (reply to ${c.parentId})`, c));\n }\n lines.push('');\n }\n\n lines.push(\n 'Address them as part of your next response. You can reply via the same review UI by posting back to the latest review URL at `~/.work/web.url` + `/api/sessions/<id>/comments` with `author: \"claude\"`.',\n );\n lines.push('</system-reminder>');\n const out = lines.join('\\n');\n if (out.length <= MAX_TOTAL_BYTES) return out;\n const trimmed = out.slice(0, MAX_TOTAL_BYTES - 200);\n return (\n trimmed +\n '\\n\\n(…review payload truncated for context-window safety; ' +\n `${pending.length} comment(s) total — open work web for the full list.)\\n` +\n '</system-reminder>'\n );\n}\n\nfunction formatBody(prefix: string, c: Comment): string {\n const lead = c.body.split('\\n')[0].trim();\n const capped = lead.length > MAX_BODY_BYTES ? `${lead.slice(0, MAX_BODY_BYTES)}…` : lead;\n return `${prefix}: ${capped}${c.body.includes('\\n') ? ' …' : ''}`;\n}\n\n/** Like `formatBody` but preserves the full multi-line body (only the note\n * cap applies). Multi-line bodies are emitted under the bullet, indented, so\n * a broadcast prompt arrives intact rather than truncated to its first line. */\nfunction formatFullBody(prefix: string, c: Comment): string {\n const body = c.body.trim();\n const capped = body.length > MAX_NOTE_BYTES ? `${body.slice(0, MAX_NOTE_BYTES)}…` : body;\n const bodyLines = capped.split('\\n');\n if (bodyLines.length === 1) return `${prefix}: ${bodyLines[0]}`;\n const [first, ...rest] = bodyLines;\n return [`${prefix}: ${first}`, ...rest.map((l) => ` ${l}`)].join('\\n');\n}\n\n/** Re-export so consumers don't have to know which module owns it. */\nexport { sessionIdFor };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAkBA,OAAO,QAAQ;AACf,OAAO,UAAU;AAQjB,SAAS,aAAa,GAAO,WAAgC;AAC3D,SAAO,IAAI;AAAA,IACR,EAAE,QAAQ,gEAAgE,EAAE,IAAI,SAAS,EAAoC;AAAA,MAC5H,CAAC,MAAM,EAAE;AAAA,IACX;AAAA,EACF;AACF;AAGA,SAAS,UAAU,GAAmB;AACpC,SAAO,KAAK,QAAQ,CAAC,EAAE,QAAQ,OAAO,GAAG,EAAE,YAAY;AACzD;AAYA,SAAS,KAAK,WAA4B,SAA0B,MAAuB;AACzF,MAAI,CAAC,CAAC,UAAU,eAAe,CAAC,CAAC,QAAQ,WAAY,QAAO,CAAC,UAAU;AACvE,QAAM,WAAW,iBAAiB,IAAI;AACtC,QAAM,IAAI,UAAU,WAAW;AAC/B,QAAM,IAAI,QAAQ,WAAW;AAC7B,MAAI,MAAM,EAAG,QAAO;AACpB,UAAQ,KAAK,MAAM,UAAU,cAAc,KAAK,MAAM,KAAK,MAAM,QAAQ,cAAc,KAAK;AAC9F;AAEO,SAAS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c,CAAC,WAAM;AACpF,QAAM,YAAY,OAAO,MAAM,IAAI;AACnC,MAAI,UAAU,WAAW,EAAG,QAAO,GAAG,MAAM,KAAK,UAAU,CAAC,CAAC;AAC7D,QAAM,CAAC,OAAO,GAAG,IAAI,IAAI;AACzB,SAAO,CAAC,GAAG,MAAM,KAAK,KAAK,IAAI,GAAG,KAAK,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC,EAAE,KAAK,IAAI;AACxE;","names":[]}
@@ -3,16 +3,16 @@ import {
3
3
  computeChanges,
4
4
  findOverlaps,
5
5
  wantsDiffStat
6
- } from "./chunk-5WEBLABB.js";
6
+ } from "./chunk-F3PEUOTP.js";
7
7
  import {
8
8
  pool
9
9
  } from "./chunk-AKMPF72Y.js";
10
10
  import {
11
11
  defaultRunner
12
- } from "./chunk-3GIH4WTA.js";
12
+ } from "./chunk-KSVYR4G2.js";
13
13
  import {
14
14
  sessionIdFor
15
- } from "./chunk-YYBXQBW2.js";
15
+ } from "./chunk-Y7T73SAP.js";
16
16
 
17
17
  // src/core/diff/overlap-scan.ts
18
18
  import path from "path";
@@ -34,4 +34,4 @@ async function scanChanges(sessions, opts = {}) {
34
34
  export {
35
35
  scanChanges
36
36
  };
37
- //# sourceMappingURL=chunk-6IUFNTBQ.js.map
37
+ //# sourceMappingURL=chunk-JVBIWU7S.js.map
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/core/time/fence.ts
4
+ function asData(text, max = 300) {
5
+ return text.replace(/\s+/g, " ").replace(/<{3,}|>{3,}/g, (m) => m.replace(/[<>]/g, (c) => c === "<" ? "\u2039" : "\u203A")).trim().slice(0, max);
6
+ }
7
+ function asDataBlock(text) {
8
+ return text.replace(/<{3,}|>{3,}/g, (m) => m.replace(/[<>]/g, (c) => c === "<" ? "\u2039" : "\u203A"));
9
+ }
10
+
11
+ export {
12
+ asData,
13
+ asDataBlock
14
+ };
15
+ //# sourceMappingURL=chunk-JVE2JFLV.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/core/time/fence.ts"],"sourcesContent":["/**\n * Text written by others (meeting subjects, Jira titles, chat names, commit\n * subjects), made safe to put between a prompt's `<<<` and `>>>` data fence:\n * one line (a newline could start what reads as a line of the prompt's own),\n * and no fence marker (a `>>>` in a subject would close the fence early and\n * put what follows outside it). Pure (the server, the demo and the CLI share it).\n */\nexport function asData(text: string, max = 300): string {\n return text\n .replace(/\\s+/g, ' ')\n .replace(/<{3,}|>{3,}/g, (m) => m.replace(/[<>]/g, (c) => (c === '<' ? '‹' : '›')))\n .trim()\n .slice(0, max);\n}\n\n/**\n * Many lines of text written by others (a diff), made safe to put between `<<<` and `>>>`: its lines kept, only a\n * fence marker changed (`>>>` → `›››`), so nothing in it can close the fence early. Pure.\n */\nexport function asDataBlock(text: string): string {\n return text.replace(/<{3,}|>{3,}/g, (m) => m.replace(/[<>]/g, (c) => (c === '<' ? '‹' : '›')));\n}\n"],"mappings":";;;AAOO,SAAS,OAAO,MAAc,MAAM,KAAa;AACtD,SAAO,KACJ,QAAQ,QAAQ,GAAG,EACnB,QAAQ,gBAAgB,CAAC,MAAM,EAAE,QAAQ,SAAS,CAAC,MAAO,MAAM,MAAM,WAAM,QAAI,CAAC,EACjF,KAAK,EACL,MAAM,GAAG,GAAG;AACjB;AAMO,SAAS,YAAY,MAAsB;AAChD,SAAO,KAAK,QAAQ,gBAAgB,CAAC,MAAM,EAAE,QAAQ,SAAS,CAAC,MAAO,MAAM,MAAM,WAAM,QAAI,CAAC;AAC/F;","names":[]}
@@ -2,12 +2,12 @@
2
2
  import {
3
3
  isPersistedPty,
4
4
  ptySessionsPath
5
- } from "./chunk-3NXRBRRJ.js";
5
+ } from "./chunk-V4U5RGEG.js";
6
6
  import {
7
7
  json,
8
8
  tx,
9
9
  withDb
10
- } from "./chunk-YYBXQBW2.js";
10
+ } from "./chunk-Y7T73SAP.js";
11
11
 
12
12
  // src/core/pty/pty-sessions-file.ts
13
13
  import fs from "fs";
@@ -73,4 +73,4 @@ export {
73
73
  adoptLegacyRestoreList,
74
74
  forgetPersistedSession
75
75
  };
76
- //# sourceMappingURL=chunk-7NSQVIIK.js.map
76
+ //# sourceMappingURL=chunk-KDO7D46L.js.map
@@ -4,14 +4,14 @@ import {
4
4
  } from "./chunk-6AQRYLOB.js";
5
5
  import {
6
6
  findSessionForCwd
7
- } from "./chunk-XMWVBLMJ.js";
7
+ } from "./chunk-JNCKZ3OF.js";
8
8
  import {
9
9
  findSession,
10
10
  loadHistory
11
- } from "./chunk-SBLK524A.js";
11
+ } from "./chunk-27LWL6QE.js";
12
12
  import {
13
13
  loadConfig
14
- } from "./chunk-PDWEPIL6.js";
14
+ } from "./chunk-2MAZV5KS.js";
15
15
 
16
16
  // src/commands/shared/session-arg.ts
17
17
  import chalk from "chalk";
@@ -38,4 +38,4 @@ export {
38
38
  sessionPositionals,
39
39
  sessionFromArgs
40
40
  };
41
- //# sourceMappingURL=chunk-GJ5V357G.js.map
41
+ //# sourceMappingURL=chunk-KL4YYV37.js.map
@@ -0,0 +1,47 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ launchFor
4
+ } from "./chunk-DAKJTB6N.js";
5
+ import {
6
+ spawn_default
7
+ } from "./chunk-EL3XL2OC.js";
8
+
9
+ // src/core/platform/command-runner.ts
10
+ var RUN_TIMED_OUT = 124;
11
+ var defaultRunner = (cmd, args, cwd, env) => new Promise((resolve) => {
12
+ const launch = launchFor(cmd, args);
13
+ if ("refused" in launch) {
14
+ resolve({ code: 1, stdout: "", stderr: launch.refused });
15
+ return;
16
+ }
17
+ let stdout = "";
18
+ let stderr = "";
19
+ let settled = false;
20
+ const done = (r) => {
21
+ if (settled) return;
22
+ settled = true;
23
+ clearTimeout(timer);
24
+ resolve(r);
25
+ };
26
+ const child = spawn_default(launch.cmd, launch.args, { cwd, windowsHide: true, ...env ? { env: { ...process.env, ...env } } : {} });
27
+ const timer = setTimeout(() => {
28
+ child.kill();
29
+ done({ code: RUN_TIMED_OUT, stdout, stderr: stderr || `${cmd} timed out` });
30
+ }, 6e4);
31
+ child.stdout?.on("data", (d) => {
32
+ stdout += d.toString();
33
+ });
34
+ child.stderr?.on("data", (d) => {
35
+ stderr += d.toString();
36
+ });
37
+ child.on("error", (err) => {
38
+ done({ code: err.code === "ENOENT" ? 127 : 1, stdout, stderr: err.message });
39
+ });
40
+ child.on("close", (code) => done({ code: code ?? 1, stdout, stderr }));
41
+ });
42
+
43
+ export {
44
+ RUN_TIMED_OUT,
45
+ defaultRunner
46
+ };
47
+ //# sourceMappingURL=chunk-KSVYR4G2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/core/platform/command-runner.ts"],"sourcesContent":["import { launchFor } from './batch-launch.js';\nimport crossSpawn from './spawn.js';\n\n/**\n * How work runs a CLI (git, a git host's CLI, acli) for a decision it makes:\n * argv only, never a shell (§1.1), injectable so the decision logic is\n * unit-testable. Moved from core/pr/ship.ts, which re-exports it.\n */\n\nexport interface RunResult {\n code: number;\n stdout: string;\n stderr: string;\n}\n/** `env`: variables set for this run, over the process's own (a runner that can't set them ignores them). */\nexport type CommandRunner = (cmd: string, args: string[], cwd: string, env?: Record<string, string>) => Promise<RunResult>;\n\n/** The exit code a run that timed out reports (as coreutils' `timeout` does): what it was doing may have happened. */\nexport const RUN_TIMED_OUT = 124;\n\n/**\n * Real runner: cross-spawn, not execFile — on Windows execFile only finds\n * .exe files, so a `gh` installed as a .cmd shim (scoop, wrappers) would\n * look \"not installed\"; cross-spawn resolves shims like `work tree` does,\n * with cmd-escaped args. Exit code 127 = the binary itself is missing.\n * On Windows it starts what `launchFor` (batch-launch.ts) resolved — the\n * absolute file on PATH, never the bare name (cross-spawn would look that up\n * again, the working folder first: a worktree's own `git.cmd` would run) —\n * and a batch file is never handed cmd.exe's special characters: a Python\n * or Node shim (`az.cmd`, npm's) is skipped for its interpreter, any other\n * refuses such an argument (exit 1, said why).\n */\nexport const defaultRunner: CommandRunner = (cmd, args, cwd, env) =>\n new Promise((resolve) => {\n const launch = launchFor(cmd, args);\n if ('refused' in launch) {\n resolve({ code: 1, stdout: '', stderr: launch.refused });\n return;\n }\n let stdout = '';\n let stderr = '';\n let settled = false;\n const done = (r: RunResult) => {\n if (settled) return;\n settled = true;\n clearTimeout(timer);\n resolve(r);\n };\n const child = crossSpawn(launch.cmd, launch.args, { cwd, windowsHide: true, ...(env ? { env: { ...process.env, ...env } } : {}) });\n const timer = setTimeout(() => {\n child.kill();\n done({ code: RUN_TIMED_OUT, stdout, stderr: stderr || `${cmd} timed out` });\n }, 60_000);\n child.stdout?.on('data', (d: Buffer) => {\n stdout += d.toString();\n });\n child.stderr?.on('data', (d: Buffer) => {\n stderr += d.toString();\n });\n child.on('error', (err: NodeJS.ErrnoException) => {\n done({ code: err.code === 'ENOENT' ? 127 : 1, stdout, stderr: err.message });\n });\n child.on('close', (code) => done({ code: code ?? 1, stdout, stderr }));\n });\n"],"mappings":";;;;;;;;;AAkBO,IAAM,gBAAgB;AActB,IAAM,gBAA+B,CAAC,KAAK,MAAM,KAAK,QAC3D,IAAI,QAAQ,CAAC,YAAY;AACvB,QAAM,SAAS,UAAU,KAAK,IAAI;AAClC,MAAI,aAAa,QAAQ;AACvB,YAAQ,EAAE,MAAM,GAAG,QAAQ,IAAI,QAAQ,OAAO,QAAQ,CAAC;AACvD;AAAA,EACF;AACA,MAAI,SAAS;AACb,MAAI,SAAS;AACb,MAAI,UAAU;AACd,QAAM,OAAO,CAAC,MAAiB;AAC7B,QAAI,QAAS;AACb,cAAU;AACV,iBAAa,KAAK;AAClB,YAAQ,CAAC;AAAA,EACX;AACA,QAAM,QAAQ,cAAW,OAAO,KAAK,OAAO,MAAM,EAAE,KAAK,aAAa,MAAM,GAAI,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,KAAK,GAAG,IAAI,EAAE,IAAI,CAAC,EAAG,CAAC;AACjI,QAAM,QAAQ,WAAW,MAAM;AAC7B,UAAM,KAAK;AACX,SAAK,EAAE,MAAM,eAAe,QAAQ,QAAQ,UAAU,GAAG,GAAG,aAAa,CAAC;AAAA,EAC5E,GAAG,GAAM;AACT,QAAM,QAAQ,GAAG,QAAQ,CAAC,MAAc;AACtC,cAAU,EAAE,SAAS;AAAA,EACvB,CAAC;AACD,QAAM,QAAQ,GAAG,QAAQ,CAAC,MAAc;AACtC,cAAU,EAAE,SAAS;AAAA,EACvB,CAAC;AACD,QAAM,GAAG,SAAS,CAAC,QAA+B;AAChD,SAAK,EAAE,MAAM,IAAI,SAAS,WAAW,MAAM,GAAG,QAAQ,QAAQ,IAAI,QAAQ,CAAC;AAAA,EAC7E,CAAC;AACD,QAAM,GAAG,SAAS,CAAC,SAAS,KAAK,EAAE,MAAM,QAAQ,GAAG,QAAQ,OAAO,CAAC,CAAC;AACvE,CAAC;","names":[]}
@@ -1,4 +1,7 @@
1
1
  #!/usr/bin/env node
2
+ import {
3
+ stillUnsafeMessage
4
+ } from "./chunk-FZHFD2AY.js";
2
5
 
3
6
  // src/core/sessions/session-control.ts
4
7
  var MAX_SEND_CHARS = 2e4;
@@ -7,13 +10,8 @@ async function sendToSession(id, text, deps, opts = {}) {
7
10
  if (!body) return { ok: false, status: 400, error: "the message is empty" };
8
11
  if (body.length > MAX_SEND_CHARS) return { ok: false, status: 400, error: `the message is over ${MAX_SEND_CHARS} characters` };
9
12
  if (deps.archived(id)) return { ok: false, status: 409, error: "it is archived: restore it first" };
10
- if (deps.unsafe(id) && !opts.force) {
11
- return {
12
- ok: false,
13
- status: 409,
14
- error: "its Claude runs with permission checks off (--unsafe), so it would act on this without asking you; send with --force if you mean it"
15
- };
16
- }
13
+ const unsafe = deps.stillUnsafe?.(id);
14
+ if (unsafe) return { ok: false, status: 409, error: stillUnsafeMessage(unsafe) };
17
15
  const sentAt = (opts.now?.() ?? /* @__PURE__ */ new Date()).toISOString();
18
16
  const delivered = await deps.post(id, body);
19
17
  if (delivered) return { ok: true, how: delivered, sentAt };
@@ -64,4 +62,4 @@ export {
64
62
  pendingRequest,
65
63
  parseDuration
66
64
  };
67
- //# sourceMappingURL=chunk-RYNBBSLY.js.map
65
+ //# sourceMappingURL=chunk-KWHHB737.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/core/sessions/session-control.ts"],"sourcesContent":["import type { AgentState } from '../status/attention.js';\nimport type { PermissionRequest, SendHow } from '../api-types.js';\nimport { stillUnsafeMessage, type LegacyUnsafe } from './legacy-unsafe.js';\n\n/**\n * Driving a session from outside its terminal — another Claude, a script,\n * you in a shell: send it a message, wait for its turn to end, answer its\n * permission prompt. The policy is here; I/O is passed in (the routes in\n * session-control-routes.ts give the real one, tests a fake).\n *\n * A message goes the way every note to a session goes (§ saved prompts): a\n * published comment, which the dashboard types into a terminal it owns when\n * that Claude is idle, or which the prompt hook hands over on its next turn.\n * Never typed into a terminal directly.\n */\n\nexport const MAX_SEND_CHARS = 20_000;\n\nexport type { SendHow } from '../api-types.js';\n\nexport interface SendDeps {\n /** Queue it as a published comment (the comment route), resolving to what that route did with it: typed into an idle host Claude, left for the end of its turn, or null (no host terminal). */\n post: (id: string, body: string) => Promise<'typed' | 'next-turn' | null>;\n /** Its Claude runs in the PTY host. */\n hostRuns: (id: string) => boolean;\n /** Its Claude runs in a terminal outside work (seen in Claude Code's process files). */\n runningOutside: (id: string) => boolean;\n /** Start its Claude in the host, resuming its conversation, its first message saying a note is attached (NOTE_NUDGE). */\n start: (id: string) => Promise<boolean>;\n state: (id: string) => AgentState | null;\n archived: (id: string) => boolean;\n /** Its agent still runs as started `--unsafe` before the retirement (legacy-unsafe.ts). REMOVE IN THE NEXT RELEASE. */\n stillUnsafe?: (id: string) => LegacyUnsafe | null;\n}\n\nexport type SendResult = { ok: true; how: SendHow; sentAt: string } | { ok: false; status: 400 | 409 | 502; error: string };\n\nexport async function sendToSession(id: string, text: string, deps: SendDeps, opts: { now?: () => Date } = {}): Promise<SendResult> {\n const body = text.trim();\n if (!body) return { ok: false, status: 400, error: 'the message is empty' };\n if (body.length > MAX_SEND_CHARS) return { ok: false, status: 400, error: `the message is over ${MAX_SEND_CHARS} characters` };\n if (deps.archived(id)) return { ok: false, status: 409, error: 'it is archived: restore it first' };\n // It would act on this unreviewed, and it may have come from another agent (legacy-unsafe.ts; remove next release).\n const unsafe = deps.stillUnsafe?.(id);\n if (unsafe) return { ok: false, status: 409, error: stillUnsafeMessage(unsafe) };\n const sentAt = (opts.now?.() ?? new Date()).toISOString();\n // What the comment route did, as it decided it — not a second look at the state.\n const delivered = await deps.post(id, body);\n if (delivered) return { ok: true, how: delivered, sentAt };\n if (deps.hostRuns(id)) return { ok: true, how: 'next-turn', sentAt };\n if (deps.runningOutside(id)) return { ok: true, how: 'outside', sentAt };\n if (!(await deps.start(id)))\n return { ok: false, status: 502, error: 'queued, but its Claude could not be started: it gets it when you open the session' };\n return { ok: true, how: 'started', sentAt };\n}\n\n/** What `how` means, in a line. */\nexport function sendHowText(how: SendHow): string {\n switch (how) {\n case 'typed':\n return 'sent: typed into its terminal';\n case 'next-turn':\n return 'queued: it is working, so it gets this when the turn ends';\n case 'outside':\n return 'queued: its Claude runs in a terminal outside work, and gets this on its next turn there';\n case 'started':\n return 'sent: its Claude was started (resuming its conversation) with this as the first message';\n }\n}\n\nexport interface TurnStatus {\n state: AgentState;\n /** When it entered that state (ISO). */\n since: string;\n summary?: string;\n}\n\nexport interface WaitDeps {\n status: (id: string) => TurnStatus | null;\n sleep: (ms: number) => Promise<void>;\n now: () => number;\n}\n\nexport type WaitResult = { ok: true; status: TurnStatus } | { ok: false; reason: 'timeout'; status: TurnStatus | null };\n\n/**\n * Wait until the session isn't working: its turn ended (idle) or it asks\n * you something (needs input). With `after` (when a message was sent), only\n * a state entered after it counts — the turn that message started, not the\n * one before.\n */\nexport async function waitForTurn(\n id: string,\n deps: WaitDeps,\n opts: { after?: string; timeoutMs: number; pollMs?: number },\n): Promise<WaitResult> {\n const deadline = deps.now() + opts.timeoutMs;\n const after = opts.after ? Date.parse(opts.after) : null;\n for (;;) {\n const s = deps.status(id);\n const fresh = after === null || (!!s && Date.parse(s.since) > after);\n if (s && s.state !== 'working' && fresh) return { ok: true, status: s };\n if (deps.now() >= deadline) return { ok: false, reason: 'timeout', status: s };\n await deps.sleep(opts.pollMs ?? 1000);\n }\n}\n\n/** The permission prompt it is waiting on, if any (what `work answer` shows, and must send back). */\nexport function pendingRequest(status: { state: AgentState; request?: PermissionRequest } | null): PermissionRequest | null {\n return status?.state === 'needs_input' && status.request ? status.request : null;\n}\n\n/** Parse \"15m\", \"90s\", \"2h\", or a number of seconds. */\nexport function parseDuration(text: string): number | null {\n const m = /^\\s*(\\d+(?:\\.\\d+)?)\\s*(s|m|h)?\\s*$/i.exec(text);\n if (!m) return null;\n const n = Number(m[1]);\n const unit = (m[2] ?? 's').toLowerCase();\n return Math.round(n * (unit === 'h' ? 3_600_000 : unit === 'm' ? 60_000 : 1000));\n}\n"],"mappings":";;;;;;AAgBO,IAAM,iBAAiB;AAqB9B,eAAsB,cAAc,IAAY,MAAc,MAAgB,OAA6B,CAAC,GAAwB;AAClI,QAAM,OAAO,KAAK,KAAK;AACvB,MAAI,CAAC,KAAM,QAAO,EAAE,IAAI,OAAO,QAAQ,KAAK,OAAO,uBAAuB;AAC1E,MAAI,KAAK,SAAS,eAAgB,QAAO,EAAE,IAAI,OAAO,QAAQ,KAAK,OAAO,uBAAuB,cAAc,cAAc;AAC7H,MAAI,KAAK,SAAS,EAAE,EAAG,QAAO,EAAE,IAAI,OAAO,QAAQ,KAAK,OAAO,mCAAmC;AAElG,QAAM,SAAS,KAAK,cAAc,EAAE;AACpC,MAAI,OAAQ,QAAO,EAAE,IAAI,OAAO,QAAQ,KAAK,OAAO,mBAAmB,MAAM,EAAE;AAC/E,QAAM,UAAU,KAAK,MAAM,KAAK,oBAAI,KAAK,GAAG,YAAY;AAExD,QAAM,YAAY,MAAM,KAAK,KAAK,IAAI,IAAI;AAC1C,MAAI,UAAW,QAAO,EAAE,IAAI,MAAM,KAAK,WAAW,OAAO;AACzD,MAAI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AAK,YAAY;AACvC,SAAO,KAAK,MAAM,KAAK,SAAS,MAAM,OAAY,SAAS,MAAM,MAAS,IAAK;AACjF;","names":[]}
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ parseAzurePrUrl,
4
+ parseGithubPrUrl
5
+ } from "./chunk-PHGVVFTF.js";
6
+
7
+ // src/core/hosts/links.ts
8
+ var PARSERS = [
9
+ { host: "github", parse: parseGithubPrUrl },
10
+ {
11
+ host: "azure",
12
+ parse: (t) => {
13
+ const l = parseAzurePrUrl(t);
14
+ return l ? { repoId: l.repoId, number: l.number, url: l.url, label: l.label } : null;
15
+ }
16
+ }
17
+ ];
18
+ function parsePrLink(text) {
19
+ for (const p of PARSERS) {
20
+ const link = p.parse(text);
21
+ if (link) return { ...link, host: p.host };
22
+ }
23
+ return null;
24
+ }
25
+
26
+ export {
27
+ parsePrLink
28
+ };
29
+ //# sourceMappingURL=chunk-L22AWXWA.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/core/hosts/links.ts"],"sourcesContent":["import { GITHUB_THREAD_ID, parseGithubPrUrl } from './github/origin.js';\nimport { AZURE_THREAD_ID, parseAzurePrUrl } from './azure/origin.js';\nimport { DEFAULT_HOST } from './commands.js';\nimport type { PrLink } from './types.js';\n\n/**\n * Pull request links of the built-in hosts, read without the registry (which\n * reads git config from disk): pure, so the SPA, the demo and the pure\n * modules (`pr-ref.ts`, `blocks.ts`) share it. A host registered at run time\n * (a test's fake) is read by the registry's `hostOfPrUrl` instead.\n */\nconst PARSERS: Array<{ host: string; parse: (text: string) => PrLink | null }> = [\n { host: 'github', parse: parseGithubPrUrl },\n {\n host: 'azure',\n parse: (t) => {\n const l = parseAzurePrUrl(t);\n return l ? { repoId: l.repoId, number: l.number, url: l.url, label: l.label } : null;\n },\n },\n];\n\n/** A pull request link of a built-in host, read, with the host's id; null for anything else. */\nexport function parsePrLink(text: string): (PrLink & { host: string }) | null {\n for (const p of PARSERS) {\n const link = p.parse(text);\n if (link) return { ...link, host: p.host };\n }\n return null;\n}\n\nconst THREAD_IDS: Array<{ host: string; re: RegExp }> = [\n { host: 'github', re: GITHUB_THREAD_ID },\n { host: 'azure', re: AZURE_THREAD_ID },\n];\n\n/** The built-in host a review-thread id is shaped for (the UI names it); the default host's for anything else. */\nexport function threadHostId(id: string): string {\n return THREAD_IDS.find((t) => t.re.test(id))?.host ?? DEFAULT_HOST;\n}\n"],"mappings":";;;;;;;AAWA,IAAM,UAA2E;AAAA,EAC/E,EAAE,MAAM,UAAU,OAAO,iBAAiB;AAAA,EAC1C;AAAA,IACE,MAAM;AAAA,IACN,OAAO,CAAC,MAAM;AACZ,YAAM,IAAI,gBAAgB,CAAC;AAC3B,aAAO,IAAI,EAAE,QAAQ,EAAE,QAAQ,QAAQ,EAAE,QAAQ,KAAK,EAAE,KAAK,OAAO,EAAE,MAAM,IAAI;AAAA,IAClF;AAAA,EACF;AACF;AAGO,SAAS,YAAY,MAAkD;AAC5E,aAAW,KAAK,SAAS;AACvB,UAAM,OAAO,EAAE,MAAM,IAAI;AACzB,QAAI,KAAM,QAAO,EAAE,GAAG,MAAM,MAAM,EAAE,KAAK;AAAA,EAC3C;AACA,SAAO;AACT;","names":[]}
@@ -2,21 +2,21 @@
2
2
  import {
3
3
  openBaseCheckout,
4
4
  setupWorktree
5
- } from "./chunk-GBMY7IMP.js";
5
+ } from "./chunk-VFH4SU3M.js";
6
6
  import {
7
7
  defaultRunner
8
- } from "./chunk-3GIH4WTA.js";
9
- import {
10
- resolveProjectTarget
11
- } from "./chunk-J36ULZBO.js";
8
+ } from "./chunk-KSVYR4G2.js";
12
9
  import {
13
10
  findSession,
14
11
  loadHistory,
15
12
  sessionAliases
16
- } from "./chunk-SBLK524A.js";
13
+ } from "./chunk-27LWL6QE.js";
14
+ import {
15
+ resolveProjectTarget
16
+ } from "./chunk-4K4S53KX.js";
17
17
  import {
18
18
  spawn_default
19
- } from "./chunk-RCYI7SRA.js";
19
+ } from "./chunk-EL3XL2OC.js";
20
20
  import {
21
21
  collectingReporter,
22
22
  withReporter
@@ -200,4 +200,4 @@ export {
200
200
  createInChild,
201
201
  createInProcess
202
202
  };
203
- //# sourceMappingURL=chunk-ZGT4ZDGG.js.map
203
+ //# sourceMappingURL=chunk-LJKF73JB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/core/worktree/setup-child.ts"],"sourcesContent":["import path from 'node:path';\nimport crossSpawn from '../platform/spawn.js';\nimport type { BaseSpec } from '../git/base-spec.js';\nimport type { WorkConfig } from '../platform/config.js';\nimport { findSession, loadHistory } from '../sessions/history.js';\nimport { openBaseCheckout, setupWorktree } from './worktree.js';\nimport { collectingReporter, withReporter } from '../platform/report.js';\nimport { resolveProjectTarget } from './resolve.js';\nimport { defaultRunner } from '../pr/ship.js';\nimport { sessionAliases } from '../sessions/session-repos.js';\n\n/**\n * Creating a worktree runs git synchronously (fetch, pull, worktree add):\n * done inside work web, that held up every request — the dashboard, the\n * terminals' relays, the status hooks — for as long as the network took.\n * So work web runs it as `work tree … --setup-only` in a child process and\n * reads the result back from the history it wrote. The CLI and tests use\n * the in-process `createInProcess`; both answer the same way.\n */\n\nexport interface CreateRequest {\n target: string;\n /** Empty: the repo's own checkout, on the branch it has (`work tree <repo>`). */\n branch?: string;\n base?: BaseSpec;\n jiraKey?: string;\n name?: string;\n /** A new session's repos instead of its group's config (a fork of a session folder: the parent's own). */\n repos?: string[];\n /** The Claude account a new session runs on; unset: the configured default. */\n account?: string;\n}\n\nexport type CreateResult =\n { ok: true; branch: string; launchDir: string; paths: string[]; warnings?: string[] } | { ok: false; error: string };\n\n/** The line `work tree --setup-only` ends with on success: what it warned about (the parent reads only this). */\nexport const SETUP_WARNINGS = 'work-setup-warnings ';\n\n/** The warnings a `--setup-only` child printed (its last such line); none when there is none. Pure. */\nexport function setupWarningsOf(stdout: string): string[] {\n const line = stdout\n .split(/\\r?\\n/)\n .reverse()\n .find((l) => l.startsWith(SETUP_WARNINGS));\n if (!line) return [];\n try {\n const v: unknown = JSON.parse(line.slice(SETUP_WARNINGS.length));\n return Array.isArray(v) ? v.filter((x): x is string => typeof x === 'string') : [];\n } catch {\n return [];\n }\n}\nexport type CreateWorktree = (req: CreateRequest, config: WorkConfig) => Promise<CreateResult>;\n\n/**\n * A request the child's command line could misread: a project or branch\n * starting with `-` would be taken for a flag (`--fresh` as a branch opened\n * the base checkout instead). Git refuses such branch names anyway. Pure.\n */\nexport function invalidRequest(req: CreateRequest): string | null {\n if (req.target.startsWith('-')) return `not a project: ${req.target}`;\n if (req.branch?.startsWith('-')) return `${req.branch} is not a valid branch name (it can't start with \"-\")`;\n for (const [alias, b] of Object.entries(req.base?.perRepo ?? {}))\n if (alias.startsWith('-') || b.startsWith('-')) return `not a valid base: ${alias}=${b}`;\n if (req.base?.default?.startsWith('-')) return `not a valid base: ${req.base.default}`;\n if (req.account?.startsWith('-')) return `not a Claude account: ${req.account}`;\n for (const alias of req.repos ?? []) if (!alias || alias.startsWith('-') || alias.includes(',')) return `not a repo: ${alias}`;\n return null;\n}\n\n/** `--base` flags for a base spec (`--base=dev`, `--base=backend=dev`). Pure. */\nexport function baseArgs(spec: BaseSpec | undefined): string[] {\n if (!spec) return [];\n const out: string[] = [];\n if (spec.default) out.push(`--base=${spec.default}`);\n for (const [alias, b] of Object.entries(spec.perRepo)) out.push(`--base=${alias}=${b}`);\n return out;\n}\n\n/**\n * The argv of the child `work tree` run (after node and the bin). Values go\n * as `--flag=value`: a name like `--fresh` given as `--name --fresh` would\n * be read as a flag of its own (and the name lost). Pure.\n */\nexport function childArgs(req: CreateRequest): string[] {\n return [\n 'tree',\n req.target,\n ...(req.branch ? [req.branch] : []),\n '--setup-only',\n ...baseArgs(req.base),\n ...(req.jiraKey ? [`--jira-key=${req.jiraKey}`] : []),\n ...(req.name?.trim() ? [`--name=${req.name.trim()}`] : []),\n ...(req.repos?.length ? [`--repos=${req.repos.join(',')}`] : []),\n ...(req.account ? [`--account=${req.account}`] : []),\n ];\n}\n\n/**\n * One creation at a time per project: they fetch, pull and add worktrees in\n * the same repos (git's own locks would turn two at once into a failure),\n * and a double-clicked create of the same branch gets the first one's answer.\n */\nexport function oneAtATime(create: CreateWorktree, queue: KeyedQueue = keyedQueue()): CreateWorktree {\n const same = new Map<string, Promise<CreateResult>>();\n return (req, config) => {\n const key = `${req.target}\\0${req.branch ?? ''}`;\n const running = same.get(key);\n if (running) return running;\n const job = queue(req.target, () => create(req, config));\n same.set(key, job);\n void job\n .catch(() => undefined)\n .then(() => {\n if (same.get(key) === job) same.delete(key);\n });\n return job;\n };\n}\n\n/** Runs jobs one after another per key (a project, or a repo), any number of keys at once. */\nexport type KeyedQueue = <T>(key: string, job: () => Promise<T>) => Promise<T>;\n\nexport function keyedQueue(): KeyedQueue {\n const queues = new Map<string, Promise<unknown>>();\n return <T>(key: string, job: () => Promise<T>): Promise<T> => {\n const before = queues.get(key) ?? Promise.resolve();\n const run = before.then(job);\n const tail = run.catch(() => undefined);\n queues.set(key, tail);\n void tail.then(() => {\n if (queues.get(key) === tail) queues.delete(key);\n });\n return run;\n };\n}\n\n/** What a child `work` run gave back. */\nexport interface ChildRun {\n stdout: string;\n stderr: string;\n code: number | null;\n /** Killed after its time ran out. */\n timedOut: boolean;\n /** It couldn't be started at all. */\n spawnError?: string;\n}\n\n/**\n * Run `node <work> <args…>` in a child process (no window, no colours),\n * killed after `timeoutMs` (5 min). This process's node flags go with it:\n * under tsx (dev) they are what loads a .ts entry (but not a debugger's,\n * whose port is taken).\n */\nexport function runWorkChild(\n workBin: string,\n args: string[],\n opts: { node?: string; execArgv?: string[]; timeoutMs?: number } = {},\n): Promise<ChildRun> {\n return new Promise((resolve) => {\n const child = crossSpawn(\n opts.node ?? process.execPath,\n [...(opts.execArgv ?? process.execArgv).filter((f) => !/^--inspect/.test(f)), workBin, ...args],\n { windowsHide: true, env: { ...process.env, NO_COLOR: '1', FORCE_COLOR: '0' } },\n );\n let stdout = '';\n let stderr = '';\n child.stdout?.on('data', (d: Buffer) => (stdout += d.toString()));\n child.stderr?.on('data', (d: Buffer) => (stderr += d.toString()));\n let timedOut = false;\n const timer = setTimeout(\n () => {\n timedOut = true;\n child.kill();\n },\n opts.timeoutMs ?? 5 * 60_000,\n );\n let settled = false;\n const done = (r: ChildRun) => {\n if (settled) return;\n settled = true;\n clearTimeout(timer);\n resolve(r);\n };\n child.on('error', (err) => done({ stdout, stderr, code: null, timedOut, spawnError: err.message }));\n child.on('close', (code) => done({ stdout, stderr, code, timedOut }));\n });\n}\n\n/** What a child printed, in one line, its colours stripped. Pure. */\nexport function childText(text: string): string {\n return text\n .replace(ANSI, '')\n .split(/\\r?\\n/)\n .map((l) => l.trim())\n .filter(Boolean)\n .join(' ');\n}\n\nconst ANSI = /\\x1b\\[[0-9;]*m/g;\n\nconst norm = (p: string) => path.resolve(p).replace(/\\\\/g, '/').toLowerCase();\n\n/** What the run left in the history: the session it created or opened. */\nfunction resultFromHistory(req: CreateRequest, config: WorkConfig): CreateResult {\n const history = loadHistory();\n if (req.branch) {\n const s = findSession(history, req.target, req.branch);\n if (!s) return { ok: false, error: 'the worktree was set up, but its session is not in the history' };\n return { ok: true, branch: s.branch, launchDir: s.isGroup && s.paths[0] ? path.dirname(s.paths[0]) : s.paths[0], paths: s.paths };\n }\n const repo = config.repos[req.target];\n const s = repo\n ? history\n .filter((x) => !x.archivedAt && x.target === req.target && x.paths.some((p) => norm(p) === norm(repo)))\n .sort((a, b) => b.lastAccessedAt.localeCompare(a.lastAccessedAt))[0]\n : undefined;\n if (!s) return { ok: false, error: `opened ${req.target}, but its session is not in the history` };\n return { ok: true, branch: s.branch, launchDir: repo, paths: [repo] };\n}\n\n/** Out of process (work web): `node <work> tree … --setup-only`, then the history. */\nexport function createInChild(workBin: string, opts: { node?: string; execArgv?: string[]; timeoutMs?: number } = {}): CreateWorktree {\n return async (req, config) => {\n const invalid = invalidRequest(req);\n if (invalid) return { ok: false, error: invalid };\n const r = await runWorkChild(workBin, childArgs(req), opts);\n if (r.spawnError) return { ok: false, error: `could not run work: ${r.spawnError}` };\n if (r.timedOut) {\n // Killed from outside, its own rollback never ran: drop what a\n // half-made `git worktree add` registered, so a retry can make it.\n await pruneWorktrees(req.target, req.branch, config, req.repos);\n return { ok: false, error: 'setting it up took too long (stopped; run it again, or `work tree` it from a terminal to see why)' };\n }\n if (r.code === 0) {\n const made = resultFromHistory(req, config);\n const warnings = setupWarningsOf(r.stdout);\n return made.ok && warnings.length ? { ...made, warnings } : made;\n }\n // Its errors, as the CLI printed them (the reporter sends errors to stderr).\n const why = childText(r.stderr || r.stdout);\n return { ok: false, error: why || (r.code === null ? 'setting it up took too long' : `work tree exited ${r.code}`) };\n };\n}\n\n/**\n * `git worktree prune` in each repo of the session (best effort): its own\n * repos when it has a row (sessionAliases: one added to it, or a fork's list),\n * else the project's.\n */\nexport async function pruneWorktrees(\n target: string,\n branch: string | undefined,\n config: WorkConfig,\n /** The repos the run was asked for (a fork of a session folder: its own), when it has no row yet. */\n repos?: string[],\n): Promise<void> {\n const known = branch ? findSession(loadHistory(), target, branch) : undefined;\n const aliases = known ? sessionAliases(known, config) : repos?.length ? repos : (resolveProjectTarget(target, config)?.repoAliases ?? []);\n for (const alias of aliases) {\n const repo = config.repos[alias];\n if (repo) await defaultRunner('git', ['-C', repo, 'worktree', 'prune'], repo).catch(() => undefined);\n }\n}\n\n/** In process (the CLI, tests): the same core calls `work tree` makes. */\nexport const createInProcess: CreateWorktree = async (req, config) => {\n const invalid = invalidRequest(req);\n if (invalid) return { ok: false, error: invalid };\n if (!req.branch) {\n const opened = await openBaseCheckout(req.target, config, { jiraKey: req.jiraKey, name: req.name, account: req.account });\n return opened.ok\n ? { ok: true, branch: opened.branch, launchDir: opened.repoPath, paths: [opened.repoPath] }\n : { ok: false, error: opened.error };\n }\n // Keep what core reports, so a failure says why.\n const reports = collectingReporter();\n const created = await withReporter(reports, () =>\n setupWorktree(req.target, req.branch!, config, req.base, req.jiraKey, {\n name: req.name,\n ...(req.account ? { account: req.account } : {}),\n ...(req.repos?.length ? { repos: req.repos } : {}),\n }),\n );\n const warnings = reports.entries.filter((e) => e.level === 'warn' && e.text.trim()).map((e) => e.text.trim());\n if (!created)\n return {\n ok: false,\n error:\n reports\n .errors()\n .map((e) => e.trim())\n .join(' ') || 'setup failed (target not found?)',\n };\n return { ok: true, branch: req.branch, launchDir: created.launchDir, paths: created.paths, ...(warnings.length ? { warnings } : {}) };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,UAAU;AAqCV,IAAM,iBAAiB;AAGvB,SAAS,gBAAgB,QAA0B;AACxD,QAAM,OAAO,OACV,MAAM,OAAO,EACb,QAAQ,EACR,KAAK,CAAC,MAAM,EAAE,WAAW,cAAc,CAAC;AAC3C,MAAI,CAAC,KAAM,QAAO,CAAC;AACnB,MAAI;AACF,UAAM,IAAa,KAAK,MAAM,KAAK,MAAM,eAAe,MAAM,CAAC;AAC/D,WAAO,MAAM,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,MAAmB,OAAO,MAAM,QAAQ,IAAI,CAAC;AAAA,EACnF,QAAQ;AACN,WAAO,CAAC;AAAA,EACV;AACF;AAQO,SAAS,eAAe,KAAmC;AAChE,MAAI,IAAI,OAAO,WAAW,GAAG,EAAG,QAAO,kBAAkB,IAAI,MAAM;AACnE,MAAI,IAAI,QAAQ,WAAW,GAAG,EAAG,QAAO,GAAG,IAAI,MAAM;AACrD,aAAW,CAAC,OAAO,CAAC,KAAK,OAAO,QAAQ,IAAI,MAAM,WAAW,CAAC,CAAC;AAC7D,QAAI,MAAM,WAAW,GAAG,KAAK,EAAE,WAAW,GAAG,EAAG,QAAO,qBAAqB,KAAK,IAAI,CAAC;AACxF,MAAI,IAAI,MAAM,SAAS,WAAW,GAAG,EAAG,QAAO,qBAAqB,IAAI,KAAK,OAAO;AACpF,MAAI,IAAI,SAAS,WAAW,GAAG,EAAG,QAAO,yBAAyB,IAAI,OAAO;AAC7E,aAAW,SAAS,IAA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nB,KAAK,GAAG,KAAK;AAAA,IACpB;AACF,SAAO,EAAE,IAAI,MAAM,QAAQ,IAAI,QAAQ,WAAW,QAAQ,WAAW,OAAO,QAAQ,OAAO,GAAI,SAAS,SAAS,EAAE,SAAS,IAAI,CAAC,EAAG;AACtI;","names":["s"]}
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
- import {
3
- git
4
- } from "./chunk-3N3UQEC4.js";
5
2
  import {
6
3
  writeTempTree
7
- } from "./chunk-SBLK524A.js";
4
+ } from "./chunk-27LWL6QE.js";
5
+ import {
6
+ git
7
+ } from "./chunk-DCCC7LEP.js";
8
8
  import {
9
9
  spawn_default
10
- } from "./chunk-RCYI7SRA.js";
10
+ } from "./chunk-EL3XL2OC.js";
11
11
  import {
12
12
  report
13
13
  } from "./chunk-AU27USPZ.js";
@@ -534,4 +534,4 @@ export {
534
534
  computeDiff,
535
535
  computeRangeDiff
536
536
  };
537
- //# sourceMappingURL=chunk-JWWG624P.js.map
537
+ //# sourceMappingURL=chunk-LKESANVD.js.map
@@ -1,22 +1,19 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  defaultArchiveDeps
4
- } from "./chunk-5NKXGQX4.js";
4
+ } from "./chunk-E7WPTSHQ.js";
5
5
  import {
6
6
  normPath
7
7
  } from "./chunk-AKMPF72Y.js";
8
8
  import {
9
9
  disposePty
10
- } from "./chunk-TR7CTHJA.js";
10
+ } from "./chunk-5R5JEQW7.js";
11
11
  import {
12
12
  teardownWorktree
13
- } from "./chunk-GBMY7IMP.js";
13
+ } from "./chunk-VFH4SU3M.js";
14
14
  import {
15
15
  defaultRunner
16
- } from "./chunk-3GIH4WTA.js";
17
- import {
18
- fetchRemoteAsync
19
- } from "./chunk-3N3UQEC4.js";
16
+ } from "./chunk-KSVYR4G2.js";
20
17
  import {
21
18
  archiveSession,
22
19
  loadHistory,
@@ -24,13 +21,16 @@ import {
24
21
  readStatus,
25
22
  removeSession,
26
23
  sessionAliases
27
- } from "./chunk-SBLK524A.js";
24
+ } from "./chunk-27LWL6QE.js";
28
25
  import {
29
26
  sessionIdFor
30
- } from "./chunk-YYBXQBW2.js";
27
+ } from "./chunk-Y7T73SAP.js";
28
+ import {
29
+ fetchRemoteAsync
30
+ } from "./chunk-DCCC7LEP.js";
31
31
  import {
32
32
  loadConfig
33
- } from "./chunk-PDWEPIL6.js";
33
+ } from "./chunk-2MAZV5KS.js";
34
34
 
35
35
  // src/core/cleanup/cleanup-deps.ts
36
36
  import fs from "fs";
@@ -160,4 +160,4 @@ function defaultCleanupDeps(opts = {}) {
160
160
  export {
161
161
  defaultCleanupDeps
162
162
  };
163
- //# sourceMappingURL=chunk-RG7NJEN7.js.map
163
+ //# sourceMappingURL=chunk-LZZCJAJQ.js.map
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-LNHSBM4L.js";
5
5
  import {
6
6
  knownAgents
7
- } from "./chunk-MPY2ZQBL.js";
7
+ } from "./chunk-Z7I6DQAR.js";
8
8
 
9
9
  // src/commands/install-skills.ts
10
10
  import chalk from "chalk";
@@ -44,4 +44,4 @@ export {
44
44
  runInstallSkills,
45
45
  installSkillsCommand
46
46
  };
47
- //# sourceMappingURL=chunk-AQJSY4CI.js.map
47
+ //# sourceMappingURL=chunk-MM7344RC.js.map
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  BUILD_DIR_NAMES
4
- } from "./chunk-5WM24P5N.js";
4
+ } from "./chunk-I6MILNM5.js";
5
5
 
6
6
  // src/core/worktree/repo-rules.ts
7
7
  var baseName = (p) => p.replace(/[\\/]+$/, "").split(/[\\/]/).pop() ?? p;
@@ -143,4 +143,4 @@ export {
143
143
  readGitConfig,
144
144
  scanForRepos
145
145
  };
146
- //# sourceMappingURL=chunk-HMK3INUS.js.map
146
+ //# sourceMappingURL=chunk-MQCDFSVF.js.map
@@ -1,11 +1,13 @@
1
1
  #!/usr/bin/env node
2
+ import {
3
+ spawn_default
4
+ } from "./chunk-EL3XL2OC.js";
2
5
 
3
6
  // src/commands/shared/setup-completions.ts
4
7
  import fs from "fs";
5
8
  import path from "path";
6
9
  import os from "os";
7
10
  import chalk from "chalk";
8
- import spawn from "cross-spawn";
9
11
  var PS_COMPLETION_LINE = "work completion --shell powershell | Out-String | Invoke-Expression";
10
12
  var BASH_COMPLETION_LINE = 'eval "$(work completion)"';
11
13
  var ZSH_COMPLETION_LINE = 'eval "$(work completion --shell zsh)"';
@@ -21,7 +23,7 @@ var MARKER = "# work tab completions";
21
23
  var LEGACY_MARKER = "# work2 tab completions";
22
24
  function getWindowsDocumentsFolder() {
23
25
  for (const exe of ["pwsh", "powershell"]) {
24
- const result = spawn.sync(exe, ["-NoProfile", "-Command", "[Environment]::GetFolderPath('MyDocuments')"], {
26
+ const result = spawn_default.sync(exe, ["-NoProfile", "-Command", "[Environment]::GetFolderPath('MyDocuments')"], {
25
27
  encoding: "utf-8",
26
28
  stdio: ["pipe", "pipe", "pipe"],
27
29
  windowsHide: true
@@ -35,7 +37,7 @@ function getWindowsDocumentsFolder() {
35
37
  }
36
38
  function executableExists(name) {
37
39
  const cmd = process.platform === "win32" ? "where" : "which";
38
- const result = spawn.sync(cmd, [name], {
40
+ const result = spawn_default.sync(cmd, [name], {
39
41
  encoding: "utf-8",
40
42
  stdio: ["pipe", "pipe", "pipe"],
41
43
  windowsHide: true
@@ -174,4 +176,4 @@ export {
174
176
  printCompletionResults,
175
177
  printManualInstructions
176
178
  };
177
- //# sourceMappingURL=chunk-VJ7SVDED.js.map
179
+ //# sourceMappingURL=chunk-MSJWQC7H.js.map