@moberg_hr/work-tree 2.9.3 → 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 (360) hide show
  1. package/dist/{account-NG75VLRU.js → account-QSNXX5YV.js} +81 -98
  2. package/dist/account-QSNXX5YV.js.map +1 -0
  3. package/dist/{add-repo-EDU3QEYI.js → add-repo-YZ32MLZG.js} +32 -28
  4. package/dist/{add-repo-EDU3QEYI.js.map → add-repo-YZ32MLZG.js.map} +1 -1
  5. package/dist/{answer-MHOJ2J6S.js → answer-Y4T5X446.js} +16 -13
  6. package/dist/{answer-MHOJ2J6S.js.map → answer-Y4T5X446.js.map} +1 -1
  7. package/dist/{attach-37JOJ4C3.js → attach-XPYWYHDP.js} +25 -19
  8. package/dist/{attach-37JOJ4C3.js.map → attach-XPYWYHDP.js.map} +1 -1
  9. package/dist/bin.js +4 -4
  10. package/dist/{block-D5CAR53T.js → block-JVAGG5QA.js} +22 -13
  11. package/dist/block-JVAGG5QA.js.map +1 -0
  12. package/dist/{broadcast-LLYHUWXA.js → broadcast-FATIANHX.js} +11 -9
  13. package/dist/{broadcast-LLYHUWXA.js.map → broadcast-FATIANHX.js.map} +1 -1
  14. package/dist/{catchup-2SL3JGA7.js → catchup-OTI2KZG5.js} +17 -15
  15. package/dist/{catchup-2SL3JGA7.js.map → catchup-OTI2KZG5.js.map} +1 -1
  16. package/dist/{chunk-37XQIG7F.js → chunk-27LWL6QE.js} +111 -49
  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-T7AFYEQ7.js → chunk-2K5TDJ7M.js} +5 -5
  21. package/dist/{chunk-2JNW2AQ2.js → chunk-2MAZV5KS.js} +17 -2
  22. package/dist/chunk-2MAZV5KS.js.map +1 -0
  23. package/dist/{chunk-S3FMTEFR.js → chunk-2VRZVUM7.js} +13 -6
  24. package/dist/chunk-2VRZVUM7.js.map +1 -0
  25. package/dist/{chunk-63VY4YJM.js → chunk-34E2LA3M.js} +34 -9
  26. package/dist/chunk-34E2LA3M.js.map +1 -0
  27. package/dist/{chunk-QL36KN7X.js → chunk-353ZINJ2.js} +3 -3
  28. package/dist/{chunk-5QGCF3PS.js → chunk-3BSFVKMK.js} +2 -2
  29. package/dist/{chunk-WTQ2QCAG.js → chunk-3S6L437Q.js} +4 -5
  30. package/dist/chunk-3S6L437Q.js.map +1 -0
  31. package/dist/{chunk-AAYWHIIT.js → chunk-3XG23PLG.js} +8 -55
  32. package/dist/chunk-3XG23PLG.js.map +1 -0
  33. package/dist/{chunk-RFINYWID.js → chunk-46XSWHCQ.js} +14 -5
  34. package/dist/{chunk-RFINYWID.js.map → chunk-46XSWHCQ.js.map} +1 -1
  35. package/dist/{chunk-J36ULZBO.js → chunk-4K4S53KX.js} +2 -2
  36. package/dist/{chunk-ZI2KXTKM.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-GRLKPVTP.js → chunk-5R5JEQW7.js} +55 -80
  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-QHTXLCG7.js → chunk-66VPQOVZ.js} +17 -14
  45. package/dist/chunk-66VPQOVZ.js.map +1 -0
  46. package/dist/{chunk-6FVYSW3E.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-HCVONKJI.js → chunk-6YMLYU5G.js} +15 -17
  51. package/dist/{chunk-HCVONKJI.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-NWIVXGSL.js.map → chunk-7S2NQRWL.js.map} +1 -1
  58. package/dist/{chunk-P4EQWC5W.js → chunk-ADIN3DTD.js} +2 -2
  59. package/dist/{chunk-IWJXFNM4.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-26OVU2AE.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-6E2I2FBJ.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-CLBQ7ZC4.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-CCTALU3C.js → chunk-FMLE2WSN.js} +2 -2
  80. package/dist/{chunk-QSOEMCWQ.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-OTAZOIXK.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-PRDRRU2B.js → chunk-IDQVTWLX.js} +5 -5
  89. package/dist/{chunk-3C3BKZ3H.js → chunk-IFQOOCT7.js} +8 -8
  90. package/dist/{chunk-TPSFJSO7.js → chunk-IKX3B26P.js} +13 -10
  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-QEVYCCKD.js → chunk-JNCKZ3OF.js} +12 -34
  96. package/dist/chunk-JNCKZ3OF.js.map +1 -0
  97. package/dist/{chunk-CMO5YUZR.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-MG5TTLYZ.js → chunk-KDO7D46L.js} +3 -3
  101. package/dist/{chunk-CYWI3ZW7.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-WXE7D44E.js → chunk-LJKF73JB.js} +8 -8
  109. package/dist/chunk-LJKF73JB.js.map +1 -0
  110. package/dist/{chunk-BSP2Z7B7.js → chunk-LKESANVD.js} +6 -6
  111. package/dist/{chunk-XVNRP7XE.js → chunk-LZZCJAJQ.js} +11 -11
  112. package/dist/{chunk-IPGH7TXJ.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-72IBYKIY.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-P6BHOAQG.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-ATED7SAH.js → chunk-TKWUSJNQ.js} +36 -23
  138. package/dist/chunk-TKWUSJNQ.js.map +1 -0
  139. package/dist/{chunk-DQCUYCMX.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-HEPBANFJ.js → chunk-V7GCYL6A.js} +93 -196
  143. package/dist/chunk-V7GCYL6A.js.map +1 -0
  144. package/dist/{chunk-WC534PXU.js → chunk-VFH4SU3M.js} +34 -23
  145. package/dist/chunk-VFH4SU3M.js.map +1 -0
  146. package/dist/{chunk-KSUOVFO3.js → chunk-VV3NFLLP.js} +16 -9
  147. package/dist/chunk-VV3NFLLP.js.map +1 -0
  148. package/dist/{chunk-INQQGV2G.js → chunk-WKOJ7NXD.js} +4 -4
  149. package/dist/{chunk-7OUIZ2YQ.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-WXMWZRBH.js → chunk-Z6ZMWFNV.js} +25 -7
  156. package/dist/chunk-Z6ZMWFNV.js.map +1 -0
  157. package/dist/{chunk-VUAVPBFR.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-5PSLKZLF.js → cleanup-M5TY4FQS.js} +46 -34
  161. package/dist/{cleanup-5PSLKZLF.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-6MSITKGB.js → config-JLORGUXN.js} +16 -13
  166. package/dist/{config-6MSITKGB.js.map → config-JLORGUXN.js.map} +1 -1
  167. package/dist/{diff-Q7MV6YGJ.js → diff-4O5HXNZ7.js} +23 -20
  168. package/dist/{diff-Q7MV6YGJ.js.map → diff-4O5HXNZ7.js.map} +1 -1
  169. package/dist/{digest-KUMVYXKZ.js → digest-IAAZXJCC.js} +13 -11
  170. package/dist/{digest-KUMVYXKZ.js.map → digest-IAAZXJCC.js.map} +1 -1
  171. package/dist/{fork-OFENISEM.js → fork-ULJYPEKY.js} +41 -28
  172. package/dist/{fork-OFENISEM.js.map → fork-ULJYPEKY.js.map} +1 -1
  173. package/dist/{history-5WKRWARZ.js → history-JFZF22M7.js} +12 -10
  174. package/dist/{hook-ARS32DG2.js → hook-UYOIQVJ7.js} +54 -20
  175. package/dist/hook-UYOIQVJ7.js.map +1 -0
  176. package/dist/{hydrate-LCT6DVB3.js → hydrate-DROI4RJ7.js} +14 -12
  177. package/dist/{hydrate-LCT6DVB3.js.map → hydrate-DROI4RJ7.js.map} +1 -1
  178. package/dist/{init-FJKPEY5N.js → init-FF75CQM7.js} +27 -19
  179. package/dist/{init-FJKPEY5N.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-GTKP5FAW.js → list-5FEHBP6N.js} +15 -13
  184. package/dist/{list-GTKP5FAW.js.map → list-5FEHBP6N.js.map} +1 -1
  185. package/dist/{move-GOCLEFGZ.js → move-422L6PPI.js} +33 -24
  186. package/dist/{move-GOCLEFGZ.js.map → move-422L6PPI.js.map} +1 -1
  187. package/dist/{note-B7TQBXQF.js → note-AAXPD5VA.js} +14 -12
  188. package/dist/{note-B7TQBXQF.js.map → note-AAXPD5VA.js.map} +1 -1
  189. package/dist/{overlaps-UKQHIJMU.js → overlaps-WPNUYOFF.js} +21 -11
  190. package/dist/{overlaps-UKQHIJMU.js.map → overlaps-WPNUYOFF.js.map} +1 -1
  191. package/dist/{pin-UZZCDK7M.js → pin-QXPF23BB.js} +14 -12
  192. package/dist/{pin-UZZCDK7M.js.map → pin-QXPF23BB.js.map} +1 -1
  193. package/dist/{pr-NU2ME2XW.js → pr-QLGXPKPQ.js} +46 -21
  194. package/dist/pr-QLGXPKPQ.js.map +1 -0
  195. package/dist/{prune-IZGEYTSB.js → prune-GRHKRRVT.js} +44 -32
  196. package/dist/{prune-IZGEYTSB.js.map → prune-GRHKRRVT.js.map} +1 -1
  197. package/dist/{pty-host-AWDIKPQN.js → pty-host-XDDXA4SL.js} +103 -39
  198. package/dist/pty-host-XDDXA4SL.js.map +1 -0
  199. package/dist/{read-U6GBGA5E.js → read-YWKD2DGP.js} +13 -11
  200. package/dist/{read-U6GBGA5E.js.map → read-YWKD2DGP.js.map} +1 -1
  201. package/dist/{recent-2DUMLUDG.js → recent-SI5BDVVH.js} +35 -26
  202. package/dist/recent-SI5BDVVH.js.map +1 -0
  203. package/dist/{remove-OXUP4O33.js → remove-RXXCHY44.js} +48 -36
  204. package/dist/{remove-OXUP4O33.js.map → remove-RXXCHY44.js.map} +1 -1
  205. package/dist/{restart-QEW4DJC3.js → restart-CPNDEXU6.js} +17 -15
  206. package/dist/{restart-QEW4DJC3.js.map → restart-CPNDEXU6.js.map} +1 -1
  207. package/dist/{resume-K45IT4QO.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-42LORGPS.js → run-JFCDJ3EV.js} +21 -15
  212. package/dist/run-JFCDJ3EV.js.map +1 -0
  213. package/dist/{screen-2TLIUH3G.js → screen-LBOPAUXV.js} +14 -12
  214. package/dist/{screen-2TLIUH3G.js.map → screen-LBOPAUXV.js.map} +1 -1
  215. package/dist/{search-7E4B2KX6.js → search-AMEGRH24.js} +10 -8
  216. package/dist/{search-7E4B2KX6.js.map → search-AMEGRH24.js.map} +1 -1
  217. package/dist/{section-OVA5VD7L.js → section-73Z34PVE.js} +14 -12
  218. package/dist/{section-OVA5VD7L.js.map → section-73Z34PVE.js.map} +1 -1
  219. package/dist/{send-BJY5CYLO.js → send-IZBSEET5.js} +19 -16
  220. package/dist/send-IZBSEET5.js.map +1 -0
  221. package/dist/{sessions-4A24ZORW.js → sessions-WVQ2U2W4.js} +58 -23
  222. package/dist/sessions-WVQ2U2W4.js.map +1 -0
  223. package/dist/{snooze-WIVKB3GH.js → snooze-7IBHY5MY.js} +13 -11
  224. package/dist/{snooze-WIVKB3GH.js.map → snooze-7IBHY5MY.js.map} +1 -1
  225. package/dist/{start-G6GR533S.js → start-AU62TW6M.js} +14 -12
  226. package/dist/{start-G6GR533S.js.map → start-AU62TW6M.js.map} +1 -1
  227. package/dist/{state-S3DGLT4J.js → state-IZV7DAPL.js} +8 -5
  228. package/dist/state-IZV7DAPL.js.map +1 -0
  229. package/dist/{status-BTAWY6JQ.js → status-Z7OMNYZX.js} +38 -13
  230. package/dist/status-Z7OMNYZX.js.map +1 -0
  231. package/dist/{statusline-WLXEU5DM.js → statusline-VJFY7ZAB.js} +12 -11
  232. package/dist/{statusline-WLXEU5DM.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-FN6EPFJ4.js → stop-PWNXSFBD.js} +14 -12
  236. package/dist/{stop-FN6EPFJ4.js.map → stop-PWNXSFBD.js.map} +1 -1
  237. package/dist/{sync-T3BSHX6Q.js → sync-2BTZVDDG.js} +44 -32
  238. package/dist/{sync-T3BSHX6Q.js.map → sync-2BTZVDDG.js.map} +1 -1
  239. package/dist/{time-5CH5O5MZ.js → time-CTCIAXIY.js} +15 -13
  240. package/dist/{time-5CH5O5MZ.js.map → time-CTCIAXIY.js.map} +1 -1
  241. package/dist/{time-actions-XEUQ3UF7.js → time-actions-UYBOXET6.js} +5 -4
  242. package/dist/{timesheet-FMQKPS5S.js → timesheet-BUFQ34FC.js} +24 -15
  243. package/dist/{timesheet-FMQKPS5S.js.map → timesheet-BUFQ34FC.js.map} +1 -1
  244. package/dist/{todo-23COLGR2.js → todo-2R7VID57.js} +4 -4
  245. package/dist/{tree-T33VU473.js → tree-LQDPAXQA.js} +65 -45
  246. package/dist/tree-LQDPAXQA.js.map +1 -0
  247. package/dist/{update-PJRSKQZ2.js → update-2IYJHY7H.js} +24 -14
  248. package/dist/{update-PJRSKQZ2.js.map → update-2IYJHY7H.js.map} +1 -1
  249. package/dist/{usage-TL66LWO4.js → usage-IR5GNF4R.js} +13 -11
  250. package/dist/{usage-TL66LWO4.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-YIEJO6YM.js → wait-6DH34L53.js} +16 -13
  254. package/dist/{wait-YIEJO6YM.js.map → wait-6DH34L53.js.map} +1 -1
  255. package/dist/wd-bin.js +6 -6
  256. package/dist/web/assets/{PtyView-DnDd6jLI.js → PtyView-kBcAOwHr.js} +2 -2
  257. package/dist/web/assets/{PtyView-DnDd6jLI.js.map → PtyView-kBcAOwHr.js.map} +1 -1
  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-IYUNJMQD.js → web-RIHGV7YY.js} +2786 -451
  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-NG75VLRU.js.map +0 -1
  269. package/dist/block-D5CAR53T.js.map +0 -1
  270. package/dist/chunk-2JNW2AQ2.js.map +0 -1
  271. package/dist/chunk-37XQIG7F.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-4NITDMDH.js.map +0 -1
  275. package/dist/chunk-5WM24P5N.js.map +0 -1
  276. package/dist/chunk-63VY4YJM.js.map +0 -1
  277. package/dist/chunk-6FVYSW3E.js.map +0 -1
  278. package/dist/chunk-72IBYKIY.js.map +0 -1
  279. package/dist/chunk-7OUIZ2YQ.js.map +0 -1
  280. package/dist/chunk-AAYWHIIT.js.map +0 -1
  281. package/dist/chunk-ATED7SAH.js.map +0 -1
  282. package/dist/chunk-GRLKPVTP.js.map +0 -1
  283. package/dist/chunk-HEPBANFJ.js.map +0 -1
  284. package/dist/chunk-ICJPVSRY.js.map +0 -1
  285. package/dist/chunk-IWJXFNM4.js.map +0 -1
  286. package/dist/chunk-KSUOVFO3.js.map +0 -1
  287. package/dist/chunk-NWIVXGSL.js +0 -9
  288. package/dist/chunk-PTWVOT7A.js +0 -551
  289. package/dist/chunk-PTWVOT7A.js.map +0 -1
  290. package/dist/chunk-QEVYCCKD.js.map +0 -1
  291. package/dist/chunk-QHTXLCG7.js.map +0 -1
  292. package/dist/chunk-QSOEMCWQ.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-S3FMTEFR.js.map +0 -1
  297. package/dist/chunk-SG5LUMGE.js.map +0 -1
  298. package/dist/chunk-TPSFJSO7.js.map +0 -1
  299. package/dist/chunk-VJ7SVDED.js.map +0 -1
  300. package/dist/chunk-VTLDYH3C.js +0 -227
  301. package/dist/chunk-VTLDYH3C.js.map +0 -1
  302. package/dist/chunk-VUAVPBFR.js.map +0 -1
  303. package/dist/chunk-WC534PXU.js.map +0 -1
  304. package/dist/chunk-WTQ2QCAG.js.map +0 -1
  305. package/dist/chunk-WXE7D44E.js.map +0 -1
  306. package/dist/chunk-WXMWZRBH.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-ZI2KXTKM.js.map +0 -1
  311. package/dist/cli-AF7636FA.js +0 -19
  312. package/dist/hook-ARS32DG2.js.map +0 -1
  313. package/dist/install-skills-UYAFVJBA.js +0 -20
  314. package/dist/pr-NU2ME2XW.js.map +0 -1
  315. package/dist/pty-host-AWDIKPQN.js.map +0 -1
  316. package/dist/recent-2DUMLUDG.js.map +0 -1
  317. package/dist/resume-K45IT4QO.js.map +0 -1
  318. package/dist/run-42LORGPS.js.map +0 -1
  319. package/dist/send-BJY5CYLO.js.map +0 -1
  320. package/dist/sessions-4A24ZORW.js.map +0 -1
  321. package/dist/state-S3DGLT4J.js.map +0 -1
  322. package/dist/status-BTAWY6JQ.js.map +0 -1
  323. package/dist/tree-T33VU473.js.map +0 -1
  324. package/dist/web/assets/index-DxozAoUO.css +0 -1
  325. package/dist/web/assets/index-InmdAx6g.js +0 -120
  326. package/dist/web/assets/index-InmdAx6g.js.map +0 -1
  327. package/dist/web-IYUNJMQD.js.map +0 -1
  328. /package/dist/{chunk-T7AFYEQ7.js.map → chunk-2K5TDJ7M.js.map} +0 -0
  329. /package/dist/{chunk-QL36KN7X.js.map → chunk-353ZINJ2.js.map} +0 -0
  330. /package/dist/{chunk-5QGCF3PS.js.map → chunk-3BSFVKMK.js.map} +0 -0
  331. /package/dist/{chunk-J36ULZBO.js.map → chunk-4K4S53KX.js.map} +0 -0
  332. /package/dist/{chunk-P4EQWC5W.js.map → chunk-ADIN3DTD.js.map} +0 -0
  333. /package/dist/{chunk-KUCMJHQW.js.map → chunk-AHYCZUPI.js.map} +0 -0
  334. /package/dist/{chunk-26OVU2AE.js.map → chunk-BNKVENDF.js.map} +0 -0
  335. /package/dist/{chunk-6E2I2FBJ.js.map → chunk-E7WPTSHQ.js.map} +0 -0
  336. /package/dist/{chunk-CLBQ7ZC4.js.map → chunk-F3PEUOTP.js.map} +0 -0
  337. /package/dist/{chunk-CCTALU3C.js.map → chunk-FMLE2WSN.js.map} +0 -0
  338. /package/dist/{chunk-OTAZOIXK.js.map → chunk-GZGJQKQT.js.map} +0 -0
  339. /package/dist/{chunk-S3BAD4IR.js.map → chunk-ICXUTMGH.js.map} +0 -0
  340. /package/dist/{chunk-PRDRRU2B.js.map → chunk-IDQVTWLX.js.map} +0 -0
  341. /package/dist/{chunk-3C3BKZ3H.js.map → chunk-IFQOOCT7.js.map} +0 -0
  342. /package/dist/{chunk-OMIMK3LB.js.map → chunk-IOHK45WE.js.map} +0 -0
  343. /package/dist/{chunk-CMO5YUZR.js.map → chunk-JVBIWU7S.js.map} +0 -0
  344. /package/dist/{chunk-MG5TTLYZ.js.map → chunk-KDO7D46L.js.map} +0 -0
  345. /package/dist/{chunk-CYWI3ZW7.js.map → chunk-KL4YYV37.js.map} +0 -0
  346. /package/dist/{chunk-BSP2Z7B7.js.map → chunk-LKESANVD.js.map} +0 -0
  347. /package/dist/{chunk-XVNRP7XE.js.map → chunk-LZZCJAJQ.js.map} +0 -0
  348. /package/dist/{chunk-IPGH7TXJ.js.map → chunk-MM7344RC.js.map} +0 -0
  349. /package/dist/{chunk-HMK3INUS.js.map → chunk-MQCDFSVF.js.map} +0 -0
  350. /package/dist/{chunk-RGUSVBGN.js.map → chunk-OCMNBOPX.js.map} +0 -0
  351. /package/dist/{chunk-X4AXKO3A.js.map → chunk-RGLIW45S.js.map} +0 -0
  352. /package/dist/{chunk-P6BHOAQG.js.map → chunk-RHDZPV6C.js.map} +0 -0
  353. /package/dist/{chunk-DQCUYCMX.js.map → chunk-UP2JTDBI.js.map} +0 -0
  354. /package/dist/{chunk-INQQGV2G.js.map → chunk-WKOJ7NXD.js.map} +0 -0
  355. /package/dist/{chunk-GNGXYXBC.js.map → chunk-ZRATYLBB.js.map} +0 -0
  356. /package/dist/{cli-AF7636FA.js.map → cli-446A536X.js.map} +0 -0
  357. /package/dist/{history-5WKRWARZ.js.map → history-JFZF22M7.js.map} +0 -0
  358. /package/dist/{install-skills-UYAFVJBA.js.map → install-skills-XSAHNBYD.js.map} +0 -0
  359. /package/dist/{time-actions-XEUQ3UF7.js.map → time-actions-UYBOXET6.js.map} +0 -0
  360. /package/dist/{todo-23COLGR2.js.map → todo-2R7VID57.js.map} +0 -0
@@ -1,206 +1,31 @@
1
1
  #!/usr/bin/env node
2
- import {
3
- findOnPath
4
- } from "./chunk-ZDMJPEBO.js";
5
2
  import {
6
3
  agentsBySession
7
- } from "./chunk-DQCUYCMX.js";
8
- import {
9
- LATER_TEXT,
10
- restartCountsText
11
- } from "./chunk-TNJF7T33.js";
4
+ } from "./chunk-UP2JTDBI.js";
12
5
  import {
13
6
  accountSwitchRefusal,
14
- findSession,
15
7
  haltPty,
16
8
  peekPty,
17
9
  ptyPid,
18
10
  ptyPids,
19
11
  resumePtyOnAccount
20
- } from "./chunk-GRLKPVTP.js";
12
+ } from "./chunk-5R5JEQW7.js";
13
+ import {
14
+ findSession
15
+ } from "./chunk-WY7QZ2P7.js";
21
16
  import {
22
17
  isArchiving,
23
18
  loadHistory,
24
19
  setSessionAccount
25
- } from "./chunk-37XQIG7F.js";
20
+ } from "./chunk-27LWL6QE.js";
26
21
  import {
22
+ AccountAdminError,
27
23
  agentOf,
28
24
  liveAgents
29
- } from "./chunk-VUAVPBFR.js";
30
-
31
- // src/core/pty/agent-restart.ts
32
- import fs from "fs";
33
- var PACKED_MTIME_BEFORE = Date.parse("1990-01-01T00:00:00Z");
34
- function installedAt(cmd, find = findOnPath) {
35
- const file = find(cmd);
36
- if (!file) return null;
37
- try {
38
- return installTime(fs.statSync(fs.realpathSync(file)));
39
- } catch {
40
- return null;
41
- }
42
- }
43
- function installTime(st) {
44
- const real = (ms) => ms >= PACKED_MTIME_BEFORE ? ms : null;
45
- const known = [real(st.mtimeMs), real(st.birthtimeMs)].filter((x) => x !== null);
46
- return known.length ? Math.max(...known) : st.ctimeMs;
47
- }
48
- function installedAtCache(ttlMs = 6e4, look = installedAt, now = Date.now) {
49
- const cache = /* @__PURE__ */ new Map();
50
- return (cmd) => {
51
- const hit = cache.get(cmd);
52
- if (hit && now() - hit.read < ttlMs) return hit.at;
53
- const at = look(cmd);
54
- cache.set(cmd, { at, read: now() });
55
- return at;
56
- };
57
- }
58
- function outdatedPtys(ptys, toolInstalledAt) {
59
- return ptys.filter((p) => {
60
- if (p.exited || !p.tool) return false;
61
- const at = toolInstalledAt(p.tool);
62
- const started = Date.parse(p.startedAt);
63
- return at !== null && Number.isFinite(started) && started < at;
64
- });
65
- }
66
- var PRINTING_MS = 1e4;
67
- function busyForRestart(state, lastOutputMs, now = Date.now(), live = null) {
68
- if (live === "busy" || live === "waiting") return true;
69
- if (state === "working" || state === "needs_input") return true;
70
- return lastOutputMs !== null && now - lastOutputMs < PRINTING_MS;
71
- }
72
- function restartPlan(ids, busy) {
73
- const now = [];
74
- const later = [];
75
- for (const id of new Set(ids)) (busy(id) ? later : now).push(id);
76
- return { now, later };
77
- }
78
- var RESTART_AT_ONCE = 3;
79
- function restartNotesSummary(notes) {
80
- const n = (level) => notes.filter((x) => x.level === level).length;
81
- return restartCountsText({ restarted: n("action"), later: n("info"), failed: n("warn") });
82
- }
83
- var QUEUE_RECHECK_MS = 15e3;
84
- var TURN_END_GRACE_MS = 1e4;
85
- function createRestarter(deps) {
86
- const queued = /* @__PURE__ */ new Set();
87
- const inFlight = /* @__PURE__ */ new Map();
88
- const later = deps.later ?? ((fn, ms) => void setTimeout(fn, ms).unref?.());
89
- const one = (id) => {
90
- const running = inFlight.get(id);
91
- if (running) return running;
92
- queued.delete(id);
93
- const p = deps.restart(id).then(
94
- (how) => ({ ok: true, how: how || "restarted its agent (its conversation goes on)" }),
95
- (err) => ({ ok: false, error: err.message })
96
- );
97
- inFlight.set(id, p);
98
- void p.finally(() => inFlight.delete(id));
99
- return p;
100
- };
101
- const run = async (ids, notes) => {
102
- const failed = [];
103
- const ok = /* @__PURE__ */ new Set();
104
- const queue = [...ids];
105
- const worker = async () => {
106
- for (let id = queue.shift(); id !== void 0; id = queue.shift()) {
107
- const r = await one(id);
108
- if (r.ok) {
109
- ok.add(id);
110
- notes.push({ id, text: r.how, level: "action" });
111
- } else {
112
- failed.push({ id, error: r.error });
113
- notes.push({ id, text: `couldn't restart its agent: ${r.error}`, level: "warn" });
114
- }
115
- }
116
- };
117
- await Promise.all(Array.from({ length: Math.min(RESTART_AT_ONCE, queue.length) }, worker));
118
- return { done: ids.filter((id) => ok.has(id)), failed };
119
- };
120
- const finish = (notes) => {
121
- if (!notes.length) return;
122
- deps.report?.(notes);
123
- deps.changed?.();
124
- };
125
- const request = async (ids) => {
126
- const notes = [];
127
- const folded = [];
128
- for (const id of ids) {
129
- const into = deps.foldedInto?.(id);
130
- if (!into) continue;
131
- folded.push(id);
132
- notes.push({ id, text: `restarts with ${into} (no second restart)`, level: "info" });
133
- }
134
- const plan = restartPlan(
135
- ids.filter((id) => !folded.includes(id)),
136
- (id) => deps.busy(id)
137
- );
138
- for (const id of plan.later) {
139
- queued.add(id);
140
- notes.push({ id, text: `${LATER_TEXT} (it is working or waiting on you)`, level: "info" });
141
- }
142
- const { done, failed } = await run(plan.now, notes);
143
- finish(notes);
144
- tick();
145
- return { now: done, later: [...folded, ...plan.later], failed };
146
- };
147
- let ticking = false;
148
- const tick = () => {
149
- if (ticking) return;
150
- if (queued.size === 0) {
151
- deps.scheduled?.(null);
152
- return;
153
- }
154
- ticking = true;
155
- deps.scheduled?.(Date.now() + QUEUE_RECHECK_MS);
156
- later(() => {
157
- ticking = false;
158
- void retry().catch(() => {
159
- }).finally(tick);
160
- }, QUEUE_RECHECK_MS);
161
- };
162
- const retry = async (only, opts) => {
163
- const notes = [];
164
- const ready = [];
165
- for (const id of [...queued]) {
166
- if (only !== void 0 && id !== only) continue;
167
- if (!deps.running(id)) {
168
- queued.delete(id);
169
- notes.push({ id, text: "no longer waits to restart: it was stopped meanwhile (it starts on the new version)", level: "info" });
170
- continue;
171
- }
172
- const into = deps.foldedInto?.(id);
173
- if (into) {
174
- queued.delete(id);
175
- notes.push({ id, text: `no longer waits to restart: ${into} restarts it`, level: "info" });
176
- continue;
177
- }
178
- if (!deps.busy(id, opts)) ready.push(id);
179
- }
180
- await run(ready, notes);
181
- finish(notes);
182
- };
183
- return {
184
- request,
185
- retry: () => retry(),
186
- /** A session's turn ended: restart it if it was waiting for that — and if it still reads as busy, look again shortly. */
187
- turnEnded: (id) => {
188
- if (!queued.has(id)) return;
189
- later(() => void retry(id, { turnEnded: true }).catch(() => {
190
- }), TURN_END_GRACE_MS);
191
- },
192
- queued: () => [...queued],
193
- /** Take one off the queue (it no longer waits for its turn); false when it wasn't waiting (not queued, or running now). */
194
- cancel: (id) => {
195
- if (!queued.delete(id)) return false;
196
- if (queued.size === 0) deps.scheduled?.(null);
197
- deps.changed?.();
198
- return true;
199
- },
200
- /** Being restarted now (the host lists them as exited meanwhile: still this session's). */
201
- restarting: () => [...inFlight.keys()]
202
- };
203
- }
25
+ } from "./chunk-Z7I6DQAR.js";
26
+ import {
27
+ createRestarter
28
+ } from "./chunk-7QNVFVG6.js";
204
29
 
205
30
  // src/core/sessions/account-switch-rules.ts
206
31
  function switchRefusal(to, f) {
@@ -374,9 +199,9 @@ function createAccountSwitcher(deps) {
374
199
  }
375
200
  };
376
201
  }
377
- function accountSwitchNote(activity, label) {
202
+ function accountSwitchNote(activity, label2) {
378
203
  return (id, text, level) => {
379
- const name = label(id);
204
+ const name = label2(id);
380
205
  const run = activity.start("accounts", "Switching a Claude account");
381
206
  run.note(`${name ?? id}: ${text}`, { level, sessionId: name ? id : void 0 });
382
207
  if (level === "warn") run.fail(text);
@@ -427,16 +252,88 @@ function defaultAccountSwitchDeps(opts) {
427
252
  };
428
253
  }
429
254
 
255
+ // src/core/sessions/account-users.ts
256
+ var label = (s) => `${s.target} \xB7 ${s.branch}`;
257
+ function sessionsOnAccount(name, accounts, sessions = loadHistory()) {
258
+ const on = sessions.filter((s) => agentOf(s).accounts === accounts && accounts.current(s) === name);
259
+ return { live: on.filter((s) => !s.archivedAt).map(label), archived: on.filter((s) => s.archivedAt).map(label) };
260
+ }
261
+ async function removeAgentAccount(accounts, name, opts = {}) {
262
+ if (!accounts.admin) throw new AccountAdminError("its accounts are not managed by work");
263
+ await accounts.admin.remove(name, () => {
264
+ const users = sessionsOnAccount(name, accounts, opts.sessions ? opts.sessions() : loadHistory());
265
+ return opts.force ? { live: users.live, archived: [] } : users;
266
+ });
267
+ }
268
+
269
+ // src/core/sessions/account-admin.ts
270
+ function accountOverview(accounts, readings, sessions = loadHistory()) {
271
+ return accounts.list().map((a) => {
272
+ const users = sessionsOnAccount(a.name, accounts, sessions);
273
+ return {
274
+ name: a.name,
275
+ dir: a.dir,
276
+ isDefault: a.isDefault,
277
+ loggedIn: a.loggedIn,
278
+ live: users.live,
279
+ archived: users.archived,
280
+ usage: readings.find((r) => r.account === a.name) ?? null
281
+ };
282
+ });
283
+ }
284
+ function adminOf(accounts) {
285
+ if (!accounts?.admin) throw new AccountAdminError("its accounts are not managed by work");
286
+ return accounts.admin;
287
+ }
288
+ async function addAgentAccount(accounts, name, folder) {
289
+ return adminOf(accounts).add(name, folder?.trim() || void 0);
290
+ }
291
+ async function setDefaultAgentAccount(accounts, name) {
292
+ return adminOf(accounts).setDefault(name);
293
+ }
294
+ function createAccountLogins(deps) {
295
+ const installed = /* @__PURE__ */ new Set();
296
+ const installing = /* @__PURE__ */ new Set();
297
+ return {
298
+ async start(name) {
299
+ if (!deps.has(name)) throw new AccountAdminError(`no account \u201C${name}\u201D`);
300
+ return deps.start(name);
301
+ },
302
+ async stop(name) {
303
+ await deps.stop(name);
304
+ if (!deps.has(name) || installed.has(name) || installing.has(name)) return { skills: null };
305
+ installing.add(name);
306
+ const skills = deps.installSkills(name).catch((e) => ({ ok: false, message: e instanceof Error ? e.message : String(e) })).then((r) => {
307
+ installing.delete(name);
308
+ if (r.ok) installed.add(name);
309
+ deps.note?.(name, r);
310
+ return r;
311
+ });
312
+ return { skills };
313
+ }
314
+ };
315
+ }
316
+ function accountSkillsNote(activity) {
317
+ return (name, r) => {
318
+ const run = activity.start("accounts", `Work's skills for the ${name} account`);
319
+ if (r.ok) run.done(r.message);
320
+ else {
321
+ run.note(`${r.message} \u2014 or run \`work account skills ${name}\``, { level: "warn" });
322
+ run.fail(r.message);
323
+ }
324
+ };
325
+ }
326
+
430
327
  export {
431
- installedAtCache,
432
- outdatedPtys,
433
- busyForRestart,
434
- restartNotesSummary,
435
- QUEUE_RECHECK_MS,
436
- createRestarter,
437
328
  switchRefusal,
438
329
  createAccountSwitcher,
439
330
  accountSwitchNote,
440
- defaultAccountSwitchDeps
331
+ defaultAccountSwitchDeps,
332
+ removeAgentAccount,
333
+ accountOverview,
334
+ addAgentAccount,
335
+ setDefaultAgentAccount,
336
+ createAccountLogins,
337
+ accountSkillsNote
441
338
  };
442
- //# sourceMappingURL=chunk-HEPBANFJ.js.map
339
+ //# sourceMappingURL=chunk-V7GCYL6A.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/core/sessions/account-switch-rules.ts","../src/core/sessions/account-switch.ts","../src/core/sessions/account-switch-deps.ts","../src/core/sessions/account-users.ts","../src/core/sessions/account-admin.ts"],"sourcesContent":["/**\n * When a switch of account is refused before anything is stopped or moved — the rules the real switch\n * (account-switch.ts) and the demo's (server/demo/demo-accounts.ts) share. Pure: no imports.\n */\n\n/** An account as the rules see it (agents/types.ts `AccountInfo`; the wire's `AccountWire`). */\nexport interface SwitchAccountInfo {\n name: string;\n /** Logged in; null: can't tell (macOS keeps Claude's credentials in the keychain) — allowed. */\n loggedIn: boolean | null;\n}\n\nexport interface SwitchFacts {\n /** Archived, or being archived right now. */\n archived: boolean;\n /** Its agent's accounts and the one it is on; null: its agent has none. */\n accounts: { list: readonly SwitchAccountInfo[]; current: string } | null;\n /** Where a switch already waiting for its turn (or being done now) goes; null: none. */\n pendingTo: string | null;\n /** Its agent runs in the PTY host (a switch can stop and start it there). */\n inHost: boolean;\n /** Its agent runs in a terminal outside work. */\n runningOutside: boolean;\n}\n\nexport type SwitchRefusal = { status: 400 | 409; error: string };\n\n/** Why the session can't be moved to `to` (status and reason), or null. In the order the user is told them. */\nexport function switchRefusal(to: string, f: SwitchFacts): SwitchRefusal | null {\n if (f.archived) return { status: 409, error: 'it is archived: restore it first' };\n if (!f.accounts) return { status: 409, error: \"its agent doesn't have accounts\" };\n const target = f.accounts.list.find((a) => a.name === to);\n if (!target) return { status: 400, error: `no account “${to}” (see \\`work account list\\`)` };\n if (target.loggedIn === false)\n return { status: 409, error: `nobody is logged in on “${to}”: run \\`work account add ${to}\\` again to log in, or /login on it` };\n if (f.pendingTo !== null)\n return { status: 409, error: `a switch is already waiting for its turn to end (to ${f.pendingTo || 'another account'})` };\n if (f.accounts.current === to) return { status: 409, error: `it already runs on “${to}”` };\n if (!f.inHost && f.runningOutside)\n return {\n status: 409,\n error: 'its Claude runs in a terminal outside work: stop it there first (its conversation would be moved from under it)',\n };\n return null;\n}\n","import type { AccountInfo } from '../agents/types.js';\nimport { createRestarter, type Restarter } from '../pty/agent-restart.js';\nimport type { WorktreeSession } from './session-types.js';\nimport type { ActivityLog } from '../platform/activity.js';\nimport { switchRefusal } from './account-switch-rules.js';\n\n/**\n * Moving a session to another account of its agent (Claude: another login, for when the first one's limit runs out).\n * The policy is here; I/O is passed in (account-routes.ts and web-server.ts give the real one, tests a fake).\n *\n * Refused: an unknown or archived session, an agent with no accounts, an unknown account, one nobody is logged in to, the\n * account it is on, a Claude running in a terminal outside work (a switch can't stop it), one switch already waiting.\n *\n * Not running in the PTY host: its conversations move and the account is recorded — the next start uses it. Running and\n * idle: its Claude is halted in the host (stopped, its terminals kept), the conversations move, the account is recorded, and it\n * is resumed in place on the new account — in that order, so nothing writes into the old folder while it moves. Working, or waiting\n * on you: after its turn — through the agent restarter's queue (agent-restart.ts), so the rule for \"not mid-turn\" is the\n * restart's own, with a switch as the thing that runs when its turn ends.\n */\n\nexport interface AccountSwitchDeps {\n session: (id: string) => WorktreeSession | null;\n /** Being archived right now (its Claude was stopped on purpose, and mustn't be started again). */\n beingArchived: (id: string) => boolean;\n /** Its agent's accounts; null: its agent has none. */\n accounts: (session: WorktreeSession) => { list: AccountInfo[]; current: string } | null;\n /** Move its conversations to `to`'s folders (puts back what it moved when it fails, and throws). */\n switchFiles: (session: WorktreeSession, to: string) => Promise<{ moved: string[] }>;\n /** Record the account on the session, in one transaction. */\n record: (session: WorktreeSession, to: string) => Promise<void>;\n /** Its Claude runs in the PTY host. */\n hostRuns: (id: string) => boolean;\n /** Its Claude runs in a terminal outside work. */\n runningOutside: (id: string) => boolean;\n /** A folder whose conversations the switch would move where another agent (of any account, not this session's own in\n * the host) runs now — its files would move from under it; null: none. */\n othersRunningIn?: (session: WorktreeSession, id: string) => string | null;\n /** Why the PTY host can't run it on another account (one from before accounts), or null. Asked before anything stops. */\n hostRefusal?: () => Promise<string | null>;\n /** Working, or waiting on you (`turnEnded`: its turn just ended, so what it printed a moment ago isn't work going on). */\n busy: (id: string, opts?: { turnEnded?: boolean }) => boolean;\n /** Stop its Claude in the host and keep its session (terminals attached) until `resume`: the files move only after it is stopped.\n * `stopped`: an older host stopped it the old way; `gone`: nothing was running. */\n halt: (id: string) => Promise<'halted' | 'stopped' | 'gone'>;\n /** Start it again after `halt`, on the account the session records now (so the old one after a switch that failed): in place\n * when it was `halted` (its terminals carry on), from a fresh spec when `stopped` (an older host). A string: how it went instead. */\n resume: (id: string, how: 'halted' | 'stopped') => Promise<string | void>;\n /** One line of what a switch decided, for the Activity panel. */\n note?: (id: string, text: string, level: 'action' | 'info' | 'warn') => void;\n changed?: () => void;\n scheduled?: (nextAt: number | null) => void;\n /** A look again a little later (the restarter's own default: setTimeout). */\n later?: (fn: () => void, ms: number) => void;\n /** Drop an agent restart waiting for its turn (agent-restart.ts): the switch restarts it anyway. True when one was waiting. */\n cancelRestart?: (id: string) => boolean;\n}\n\nexport type SwitchOutcome = 'switched' | 'queued' | 'recorded';\n\nexport type SwitchResult =\n { ok: true; outcome: SwitchOutcome; moved?: number } | { ok: false; status: 400 | 404 | 409 | 502; error: string };\n\nconst msg = (err: unknown) => (err instanceof Error ? err.message : String(err));\n\nexport function createAccountSwitcher(deps: AccountSwitchDeps) {\n /** Where each waiting (or running) switch goes. */\n const targets = new Map<string, string>();\n /** How many entries each finished switch moved, for the answer. */\n const movedBy = new Map<string, number>();\n\n const name = (s: WorktreeSession) => `${s.target} ${s.branch}`;\n\n /** Move the files and record the account; a failed record puts the files back. Returns how many entries moved. */\n const moveAndRecord = async (s: WorktreeSession, to: string, from: string): Promise<number> => {\n const { moved } = await deps.switchFiles(s, to);\n try {\n await deps.record(s, to);\n } catch (err) {\n // The files are in the new account's folders and the session still says the old one: back, or its --continue finds\n // nothing. A move back that fails is said with the error (its message names what is stuck where).\n const back = await deps.switchFiles({ ...s, account: to }, from).then(\n () => '',\n (e2: unknown) => `; and its conversations couldn't all be moved back: ${msg(e2)}`,\n );\n throw new Error(`${msg(err)}${back}`, { cause: err });\n }\n return moved.length;\n };\n\n /** What the restarter runs for a session (at once when idle, after its turn when not): the move, the record, the restart. */\n const perform = async (id: string): Promise<string | void> => {\n const to = targets.get(id);\n const s = deps.session(id);\n try {\n if (!to || !s) throw new Error('the session is gone');\n if (s.archivedAt || deps.beingArchived(id)) throw new Error('it was archived meanwhile');\n const acc = deps.accounts(s);\n if (!acc) throw new Error('its agent has no accounts');\n const from = acc.current;\n if (from === to) return `already on ${to}`;\n const before = await refusalBeforeStop(s, id);\n if (before) throw new Error(`stays on ${from}: ${before}`);\n // A restart of its agent that waited for this turn too would stop it a second time: the switch's restart does its job.\n if (deps.cancelRestart?.(id)) deps.note?.(id, 'its agent restart that waited for this turn is done by the switch instead', 'info');\n // Stopped first: a running (or just exiting) Claude writes to its transcript, and on Windows holds the file.\n let halted: 'halted' | 'stopped' | null = null;\n if (deps.hostRuns(id)) {\n let h: 'halted' | 'stopped' | 'gone';\n try {\n h = await deps.halt(id);\n } catch (err) {\n throw new Error(`stays on ${from}: couldn't stop its Claude: ${msg(err)}`, { cause: err });\n }\n if (h !== 'gone') halted = h;\n }\n /** Start it again on the account the session records (still the old one until the record is made). */\n const resume = async (): Promise<string | void> => (halted ? deps.resume(id, halted) : undefined);\n let moved: number;\n try {\n moved = await moveAndRecord(s, to, from);\n } catch (err) {\n // Put back (the move rolled itself back, a failed record moved the files back): it goes on running on the account it has.\n const back = await resume().then(\n () => '',\n (e2: unknown) => ` (and couldn't start its Claude again: ${msg(e2)}; opening the session starts it)`,\n );\n throw new Error(`stays on ${from}: ${msg(err)}${back}`, { cause: err });\n }\n movedBy.set(id, moved);\n if (!halted) {\n deps.note?.(id, `moved to the ${to} account (${moved} entries moved; its next start uses it)`, 'action');\n return `moved to the ${to} account`;\n }\n try {\n const how = await resume();\n deps.note?.(id, `moved to the ${to} account: its Claude restarted on it${how ? ` (${how})` : ''}`, 'action');\n return how || `moved to the ${to} account: its Claude restarted on it`;\n } catch (err) {\n // The account is recorded and the files are there: opening the session starts it on the new one.\n const why = `moved to the ${to} account, but its Claude couldn't be restarted: ${msg(err)} (opening the session starts it on ${to})`;\n deps.note?.(id, why, 'warn');\n throw new Error(why, { cause: err });\n }\n } catch (err) {\n if (s && !String(msg(err)).startsWith('moved to')) deps.note?.(id, `couldn't switch: ${msg(err)}`, 'warn');\n throw err;\n } finally {\n targets.delete(id);\n }\n };\n\n const restarter: Restarter = createRestarter({\n restart: perform,\n busy: deps.busy,\n // A queued switch is never dropped as \"stopped meanwhile\": perform handles a Claude no longer running (it records the account).\n running: () => true,\n changed: deps.changed,\n scheduled: deps.scheduled,\n later: deps.later,\n });\n\n /** What stops a switch before anything is stopped or moved: an older PTY host, another Claude in one of its folders. */\n const refusalBeforeStop = async (s: WorktreeSession, id: string): Promise<string | null> => {\n const other = deps.othersRunningIn?.(s, id);\n if (other) return `a Claude outside this session runs in ${other}`;\n return deps.hostRuns(id) ? ((await deps.hostRefusal?.()) ?? null) : null;\n };\n\n const pending = (id: string) => restarter.queued().includes(id) || restarter.restarting().includes(id);\n\n async function switchAccount(id: string, to: string): Promise<SwitchResult> {\n const s = deps.session(id);\n if (!s) return { ok: false, status: 404, error: 'unknown session' };\n const acc = deps.accounts(s);\n const inHost = deps.hostRuns(id);\n const refused = switchRefusal(to, {\n archived: !!s.archivedAt || deps.beingArchived(id),\n accounts: acc,\n pendingTo: pending(id) ? (targets.get(id) ?? '') : null,\n inHost,\n runningOutside: !inHost && deps.runningOutside(id),\n });\n if (refused) return { ok: false, ...refused };\n if (!acc) return { ok: false, status: 409, error: \"its agent doesn't have accounts\" }; // (refused above: for the type)\n\n const before = await refusalBeforeStop(s, id);\n if (before) return { ok: false, status: 409, error: `stays on ${acc.current}: ${before}` };\n\n if (!inHost) {\n // Nothing to stop: the files move and the account is recorded; the next start uses it.\n try {\n const moved = await moveAndRecord(s, to, acc.current);\n deps.note?.(id, `${name(s)}: moved to the ${to} account (${moved} entries moved; its next start uses it)`, 'action');\n deps.changed?.();\n return { ok: true, outcome: 'recorded', moved };\n } catch (err) {\n deps.note?.(id, `couldn't switch: ${msg(err)}`, 'warn');\n return { ok: false, status: 502, error: `stays on ${acc.current}: ${msg(err)}` };\n }\n }\n\n targets.set(id, to);\n movedBy.delete(id);\n const r = await restarter.request([id]);\n if (r.later.includes(id)) {\n deps.note?.(id, `will move to the ${to} account when its turn ends (it is working or waiting on you)`, 'info');\n return { ok: true, outcome: 'queued' };\n }\n const failed = r.failed.find((f) => f.id === id);\n if (failed) return { ok: false, status: 502, error: failed.error };\n return { ok: true, outcome: 'switched', moved: movedBy.get(id) };\n }\n\n return {\n switchAccount,\n /** Its turn ended: do the switch that waited for it. */\n turnEnded: (id: string) => restarter.turnEnded(id),\n /** Do the waiting switches that can go now (a turn whose end no hook reported). */\n retry: () => restarter.retry(),\n /** Sessions waiting for their turn to end, and where each goes. */\n waiting: (): Array<{ id: string; to: string }> => restarter.queued().map((id) => ({ id, to: targets.get(id) ?? '' })),\n /** The account a switch waiting for its turn, or being done now, moves it to; null: none. Either way its agent restarts. */\n restartsAnyway: (id: string): string | null => (pending(id) ? (targets.get(id) ?? '') : null),\n /** The account a session is waiting to move to (its turn first), or null. Kept in memory: a work web restart drops it. */\n pendingFor: (id: string): string | null => (restarter.queued().includes(id) ? (targets.get(id) ?? null) : null),\n /**\n * Drop the switch waiting for its turn to end. `running`: it is being done right now (too late to cancel); `none`:\n * nothing waits for it.\n */\n cancel: (id: string): 'cancelled' | 'running' | 'none' => {\n if (restarter.restarting().includes(id)) return 'running';\n const to = targets.get(id);\n if (!restarter.cancel(id)) return 'none';\n targets.delete(id);\n deps.note?.(id, `no longer moves to the ${to ?? 'other'} account: the switch was cancelled`, 'info');\n return 'cancelled';\n },\n };\n}\n\nexport type AccountSwitcher = ReturnType<typeof createAccountSwitcher>;\n\n/**\n * The switcher's `note` as Activity runs: one run per note, a failure (`warn`) failing it — so a switch that waited for its\n * turn and then couldn't be done lights the Activity dot, rather than passing as a run that went fine.\n */\nexport function accountSwitchNote(\n activity: Pick<ActivityLog, 'start'>,\n label: (id: string) => string | null,\n): NonNullable<AccountSwitchDeps['note']> {\n return (id, text, level) => {\n const name = label(id);\n const run = activity.start('accounts', 'Switching a Claude account');\n run.note(`${name ?? id}: ${text}`, { level, sessionId: name ? id : undefined });\n if (level === 'warn') run.fail(text);\n else run.done(text);\n };\n}\n","import path from 'node:path';\nimport { agentOf, liveAgents } from '../agents/index.js';\nimport { isArchiving } from '../archive/archiving.js';\nimport { accountSwitchRefusal, peekPty, ptyPid, ptyPids, haltPty, resumePtyOnAccount } from '../pty/pty-pool.js';\nimport type { AccountSwitchDeps } from './account-switch.js';\nimport { loadHistory, setSessionAccount } from './history.js';\nimport { agentsBySession } from './live-agents.js';\nimport { findSession } from './web-state.js';\n\n/** The real inputs of createAccountSwitcher (account-switch.ts); work web gives `busy`, the Activity notes and the broadcast. */\nexport function defaultAccountSwitchDeps(opts: Pick<AccountSwitchDeps, 'busy'> & Partial<AccountSwitchDeps>): AccountSwitchDeps {\n return {\n session: findSession,\n beingArchived: isArchiving,\n accounts: (s) => {\n const accounts = agentOf(s).accounts;\n return accounts ? { list: accounts.list(), current: accounts.current(s) } : null;\n },\n switchFiles: (s, to) => {\n const accounts = agentOf(s).accounts;\n if (!accounts) throw new Error('its agent has no accounts');\n return accounts.switchFiles(s, to);\n },\n record: async (s, to) => {\n if (!(await setSessionAccount(s.target, s.branch, to))) throw new Error('unknown session');\n },\n hostRuns: peekPty,\n // Claude Code's process files say one runs for it that isn't the host's (terminal-ws.ts, session-control-routes.ts).\n runningOutside: (id) => {\n const hostPids = ptyPids();\n return (agentsBySession(liveAgents(), loadHistory()).get(id) ?? []).some((c) => !hostPids.has(c.pid));\n },\n othersRunningIn: (s, id) => {\n const folders = agentOf(s).accounts?.folders(s) ?? [];\n if (!folders.length) return null;\n const own = ptyPid(id);\n const key = (p: string) => {\n const r = path.resolve(p).replace(/[\\\\/]+$/, '');\n return process.platform === 'win32' ? r.toLowerCase() : r;\n };\n const wanted = new Map(folders.map((f) => [key(f), f]));\n const other = liveAgents().find((a) => a.pid !== own && wanted.has(key(a.cwd)));\n return other ? (wanted.get(key(other.cwd)) ?? other.cwd) : null;\n },\n hostRefusal: accountSwitchRefusal,\n halt: haltPty,\n resume: resumePtyOnAccount,\n ...opts,\n };\n}\n","import { agentOf, AccountAdminError, type AccountUsers, type AgentAccounts } from '../agents/index.js';\nimport { loadHistory } from './history.js';\nimport type { WorktreeSession } from './session-types.js';\n\n/**\n * Which sessions are on an account, and forgetting one (`work account remove`): agent-neutral — a session's account is\n * what its own agent's `accounts` part says (agents/types.ts); a session of an agent without accounts is on none.\n */\n\nconst label = (s: WorktreeSession) => `${s.target} · ${s.branch}`;\n\n/** The sessions on `name` of the agent `accounts` belongs to: live ones, and archived ones (a Restore would start one on it). */\nexport function sessionsOnAccount(\n name: string,\n accounts: Pick<AgentAccounts, 'current'>,\n sessions: readonly WorktreeSession[] = loadHistory(),\n): AccountUsers {\n const on = sessions.filter((s) => agentOf(s).accounts === accounts && accounts.current(s) === name);\n return { live: on.filter((s) => !s.archivedAt).map(label), archived: on.filter((s) => s.archivedAt).map(label) };\n}\n\n/**\n * Forget an account of an agent. Refused while a live session runs on it, and while archived ones use it unless `force`\n * (their Restore would then start on the default account): the sessions are read under the config's lock, right before\n * the write, so one made meanwhile on it still stops it.\n */\nexport async function removeAgentAccount(\n accounts: AgentAccounts,\n name: string,\n opts: { force?: boolean; sessions?: () => readonly WorktreeSession[] } = {},\n): Promise<void> {\n if (!accounts.admin) throw new AccountAdminError('its accounts are not managed by work');\n await accounts.admin.remove(name, () => {\n const users = sessionsOnAccount(name, accounts, opts.sessions ? opts.sessions() : loadHistory());\n return opts.force ? { live: users.live, archived: [] } : users;\n });\n}\n","import { AccountAdminError, type AgentAccountAdmin, type AgentAccounts } from '../agents/index.js';\nimport type { ActivityLog } from '../platform/activity.js';\nimport type { UsageAccount } from '../usage/usage.js';\nimport { sessionsOnAccount } from './account-users.js';\nimport { loadHistory } from './history.js';\nimport type { WorktreeSession } from './session-types.js';\n\n/**\n * The accounts of an agent as `work account` and the dashboard's Accounts page both manage them: one overview (who is\n * logged in, its last usage reading, the sessions on it), adding one and choosing the default through the agent's\n * `accounts.admin`, and the login terminals the page opens (start, stop, and work's skills put into a new account's\n * folder once its first login is over). Agent-neutral: everything of the agent's goes through its adapter.\n */\n\n/** One account, with what the page and `work account list` show of it. */\nexport interface AccountOverview {\n name: string;\n dir: string;\n isDefault: boolean;\n /** Null: can't tell (macOS keeps Claude's credentials in the keychain). */\n loggedIn: boolean | null;\n /** The sessions on it as \"target · branch\": the live ones, and the archived ones (whose Restore needs it). */\n live: string[];\n archived: string[];\n /** Its last usage reading (as recorded: a window past its reset is aged by whoever shows it); null: none yet. */\n usage: UsageAccount | null;\n}\n\nexport function accountOverview(\n accounts: AgentAccounts,\n readings: readonly UsageAccount[],\n sessions: readonly WorktreeSession[] = loadHistory(),\n): AccountOverview[] {\n return accounts.list().map((a) => {\n const users = sessionsOnAccount(a.name, accounts, sessions);\n return {\n name: a.name,\n dir: a.dir,\n isDefault: a.isDefault,\n loggedIn: a.loggedIn,\n live: users.live,\n archived: users.archived,\n usage: readings.find((r) => r.account === a.name) ?? null,\n };\n });\n}\n\n/** The agent's account administration, or the refusal every caller says the same way. */\nfunction adminOf(accounts: AgentAccounts | undefined): AgentAccountAdmin {\n if (!accounts?.admin) throw new AccountAdminError('its accounts are not managed by work');\n return accounts.admin;\n}\n\n/** Record a new account (its folder: `folder`, else the agent's default place, made when missing). Returns the folder. */\nexport async function addAgentAccount(accounts: AgentAccounts | undefined, name: string, folder?: string): Promise<string> {\n return adminOf(accounts).add(name, folder?.trim() || undefined);\n}\n\n/** New sessions use this account. */\nexport async function setDefaultAgentAccount(accounts: AgentAccounts | undefined, name: string): Promise<void> {\n return adminOf(accounts).setDefault(name);\n}\n\nexport interface SkillsOutcome {\n ok: boolean;\n message: string;\n}\n\n/** What the login terminals need: the account lookup, the PTY host, and work's skills install for one account. */\nexport interface AccountLoginDeps {\n has(name: string): boolean;\n /** Start (or find running) the account's login terminal in the PTY host; its id. */\n start(name: string): Promise<string>;\n stop(name: string): Promise<void>;\n /** Put work's skills into the account's folder (slow: the agent's own CLI, several times). */\n installSkills(name: string): Promise<SkillsOutcome>;\n /** How an install went (the Activity panel). */\n note?(name: string, outcome: SkillsOutcome): void;\n}\n\nexport interface AccountLogins {\n /** The login terminal's id. Refused (AccountAdminError) for an account there isn't. */\n start(name: string): Promise<string>;\n /**\n * Stop the login terminal. The first time for an account in this process, work's skills go into its folder after —\n * as `work account add` installs them once the login is over (installing while the agent writes its settings would\n * race it). `skills`: that install, under way (null: none started); nobody need wait for it.\n */\n stop(name: string): Promise<{ skills: Promise<SkillsOutcome> | null }>;\n}\n\nexport function createAccountLogins(deps: AccountLoginDeps): AccountLogins {\n const installed = new Set<string>();\n const installing = new Set<string>();\n return {\n async start(name) {\n if (!deps.has(name)) throw new AccountAdminError(`no account “${name}”`);\n return deps.start(name);\n },\n async stop(name) {\n await deps.stop(name);\n if (!deps.has(name) || installed.has(name) || installing.has(name)) return { skills: null };\n installing.add(name);\n const skills = deps\n .installSkills(name)\n .catch((e: unknown): SkillsOutcome => ({ ok: false, message: e instanceof Error ? e.message : String(e) }))\n .then((r) => {\n installing.delete(name);\n // A failed install is tried again at the next close.\n if (r.ok) installed.add(name);\n deps.note?.(name, r);\n return r;\n });\n return { skills };\n },\n };\n}\n\n/** How a skills install for an account went, as an Activity run (kind `accounts`): a failure lights the Activity dot. */\nexport function accountSkillsNote(activity: Pick<ActivityLog, 'start'>): NonNullable<AccountLoginDeps['note']> {\n return (name, r) => {\n const run = activity.start('accounts', `Work's skills for the ${name} account`);\n if (r.ok) run.done(r.message);\n else {\n run.note(`${r.message} — or run \\`work account skills ${name}\\``, { level: 'warn' });\n run.fail(r.message);\n }\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BO,SAAS,cAAc,IAAY,GAAsC;AAC9E,MAAI,EAAE,SAAU,QAAO,EAAE,QAAQ,KAAK,OAAO,mCAAmC;AAChF,MAAI,CAAC,EAAE,SAAU,QAAO,EAAE,QAAQ,KAAK,OAAO,kCAAkC;AAChF,QAAM,SAAS,EAAE,SAAS,KAAK,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE;AACxD,MAAI,CAAC,OAAQ,QAAO,EAAE,QAAQ,KAAK,OAAO,oBAAe,EAAE,qCAAgC;AAC3F,MAAI,OAAO,aAAa;AACtB,WAAO,EAAE,QAAQ,KAAK,OAAO,gCA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,QAAQ,EAAE,UAAU,OAAO,CAAC,EAAE,EAAE,EACzG,KAAK,CAAC,MAAM;AACX,mBAAW,OAAO,IAAI;AAEtB,YAAI,EAAE,GAAI,WAAU,IAAI,IAAI;AAC5B,aAAK,OAAO,MAAM,CAAC;AACnB,eAAO;AAAA,MACT,CAAC;AACH,aAAO,EAAE,OAAO;AAAA,IAClB;AAAA,EACF;AACF;AAGO,SAAS,kBAAkB,UAA6E;AAC7G,SAAO,CAAC,MAAM,MAAM;AAClB,UAAM,MAAM,SAAS,MAAM,YAAY,yBAAyB,IAAI,UAAU;AAC9E,QAAI,EAAE,GAAI,KAAI,KAAK,EAAE,OAAO;AAAA,SACvB;AACH,UAAI,KAAK,GAAG,EAAE,OAAO,wCAAmC,IAAI,MAAM,EAAE,OAAO,OAAO,CAAC;AACnF,UAAI,KAAK,EAAE,OAAO;AAAA,IACpB;AAAA,EACF;AACF;","names":["label"]}
@@ -1,35 +1,23 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  sessionFolderPath
4
- } from "./chunk-RGUSVBGN.js";
4
+ } from "./chunk-OCMNBOPX.js";
5
5
  import {
6
6
  isLeftover,
7
7
  putLeftoverBack,
8
8
  setLeftoverAside,
9
9
  takeLeftover
10
- } from "./chunk-KUCMJHQW.js";
10
+ } from "./chunk-AHYCZUPI.js";
11
11
  import {
12
12
  makeFolder,
13
13
  worktreeFolderMessage
14
14
  } from "./chunk-PSUJZUYX.js";
15
15
  import {
16
- isBuildOutputPath
17
- } from "./chunk-5WM24P5N.js";
18
- import {
19
- resolveProjectTarget
20
- } from "./chunk-J36ULZBO.js";
16
+ recordCheckedOutBranches
17
+ } from "./chunk-E67DOUVU.js";
21
18
  import {
22
- fetchRemoteAsync,
23
- getCurrentBranch,
24
- getStatusChecked,
25
- getUnpushedCommits,
26
- git,
27
- isGitRepo,
28
- localBranchExists,
29
- parseWorktreeList,
30
- remoteBranchExists,
31
- repoState
32
- } from "./chunk-3N3UQEC4.js";
19
+ isBuildOutputPath
20
+ } from "./chunk-I6MILNM5.js";
33
21
  import {
34
22
  archiveDirFor,
35
23
  archiveRoot,
@@ -48,16 +36,31 @@ import {
48
36
  upsertSession,
49
37
  upsertSessionWithPort,
50
38
  writeArchiveRecord
51
- } from "./chunk-37XQIG7F.js";
39
+ } from "./chunk-27LWL6QE.js";
52
40
  import {
53
41
  sessionIdFor
54
- } from "./chunk-YYBXQBW2.js";
42
+ } from "./chunk-Y7T73SAP.js";
55
43
  import {
56
44
  agentFor
57
- } from "./chunk-VUAVPBFR.js";
45
+ } from "./chunk-Z7I6DQAR.js";
46
+ import {
47
+ resolveProjectTarget
48
+ } from "./chunk-4K4S53KX.js";
49
+ import {
50
+ fetchRemoteAsync,
51
+ getCurrentBranch,
52
+ getStatusChecked,
53
+ getUnpushedCommits,
54
+ git,
55
+ isGitRepo,
56
+ localBranchExists,
57
+ parseWorktreeList,
58
+ remoteBranchExists,
59
+ repoState
60
+ } from "./chunk-DCCC7LEP.js";
58
61
  import {
59
62
  DEFAULT_ACCOUNT
60
- } from "./chunk-2JNW2AQ2.js";
63
+ } from "./chunk-2MAZV5KS.js";
61
64
  import {
62
65
  atomicWriteFile
63
66
  } from "./chunk-ZXHMC7UO.js";
@@ -918,6 +921,10 @@ async function setupGroupWorktree(groupName, repoAliases, branchName, config, sp
918
921
  account: opts.account
919
922
  }
920
923
  );
924
+ bestEffort(
925
+ `record the branches of ${groupName}:${branchName}`,
926
+ () => recordCheckedOutBranches({ target: groupName, branch: branchName, isGroup: true, paths: allPaths })
927
+ );
921
928
  report("info", "");
922
929
  report("info", `Branch: ${branchName}`);
923
930
  if (port !== void 0) report("detail", `Dev-server port: ${port}`);
@@ -974,6 +981,10 @@ async function setupSingleWorktree(targetName, branchName, workTreeDirName, conf
974
981
  base ? { [workTreePath]: base } : void 0,
975
982
  { ...isNew ? { repos: [targetName] } : {}, account: opts.account }
976
983
  );
984
+ bestEffort(
985
+ `record the branches of ${targetName}:${branchName}`,
986
+ () => recordCheckedOutBranches({ target: targetName, branch: branchName, isGroup: false, paths: [workTreePath] })
987
+ );
977
988
  report("info", `Branch: ${branchName}`);
978
989
  if (port !== void 0) report("detail", `Dev-server port: ${port}`);
979
990
  return { launchDir: workTreePath, paths: [workTreePath], isGroup: false, port };
@@ -1089,4 +1100,4 @@ export {
1089
1100
  teardownWorktree,
1090
1101
  openBaseCheckout
1091
1102
  };
1092
- //# sourceMappingURL=chunk-WC534PXU.js.map
1103
+ //# sourceMappingURL=chunk-VFH4SU3M.js.map