@moberg_hr/work-tree 2.23.2 → 2.23.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (294) hide show
  1. package/dist/{account-6ZQ3VFA2.js → account-CCXROECI.js} +26 -27
  2. package/dist/{account-6ZQ3VFA2.js.map → account-CCXROECI.js.map} +1 -1
  3. package/dist/{add-repo-WXDEKZRX.js → add-repo-KYSKVWWL.js} +20 -21
  4. package/dist/{add-repo-WXDEKZRX.js.map → add-repo-KYSKVWWL.js.map} +1 -1
  5. package/dist/{answer-L55DWMR5.js → answer-M5SVGKGO.js} +12 -12
  6. package/dist/{attach-KLVI7BHS.js → attach-YHIUKOTE.js} +21 -22
  7. package/dist/{attach-KLVI7BHS.js.map → attach-YHIUKOTE.js.map} +1 -1
  8. package/dist/bin.js +4 -4
  9. package/dist/{block-BRNRP226.js → block-ONJSUTQ6.js} +17 -18
  10. package/dist/{block-BRNRP226.js.map → block-ONJSUTQ6.js.map} +1 -1
  11. package/dist/{broadcast-GQE7H3MF.js → broadcast-TVDWHKJE.js} +10 -10
  12. package/dist/{catchup-ZMG4OWF2.js → catchup-UGDVV5RI.js} +15 -15
  13. package/dist/{child-MPXXJ2QX.js → child-GPVONLJF.js} +18 -15
  14. package/dist/child-GPVONLJF.js.map +1 -0
  15. package/dist/{chunk-7HQSILMM.js → chunk-2MAMYB72.js} +4 -4
  16. package/dist/{chunk-RGKGJOES.js → chunk-2YDY25YI.js} +9 -9
  17. package/dist/{chunk-HCYES6U7.js → chunk-32CMRR6M.js} +2 -2
  18. package/dist/{chunk-SF3DIIKN.js → chunk-35WLDIMQ.js} +3 -3
  19. package/dist/{chunk-VQEMPGJL.js → chunk-3DPHZKSL.js} +2 -2
  20. package/dist/{chunk-NWKVTUTN.js → chunk-3PO2LUY7.js} +355 -176
  21. package/dist/chunk-3PO2LUY7.js.map +1 -0
  22. package/dist/{chunk-T5GJVUSL.js → chunk-4CUYK2XD.js} +2 -2
  23. package/dist/{chunk-QAIG5FSQ.js → chunk-4JQ3CMLS.js} +3 -3
  24. package/dist/{chunk-LCYYJFSZ.js → chunk-5KYEDVL7.js} +5 -5
  25. package/dist/{chunk-6S3DYLGH.js → chunk-6A6XOLVB.js} +6 -6
  26. package/dist/{chunk-HBYXSFLN.js → chunk-6EFDXIA6.js} +5 -5
  27. package/dist/{chunk-NREZVTBP.js → chunk-6ER6IBFJ.js} +2 -2
  28. package/dist/{chunk-XIN6XUFL.js → chunk-6NOZK4JY.js} +2 -2
  29. package/dist/{chunk-HUGHF45U.js → chunk-7CH7FS5V.js} +3 -3
  30. package/dist/{chunk-K6FD5WDW.js → chunk-AB2KARHU.js} +8 -8
  31. package/dist/{chunk-BGQ6NUU7.js → chunk-ADOCX5G3.js} +4 -4
  32. package/dist/{chunk-QMWV4UKB.js → chunk-B26TVG74.js} +3 -3
  33. package/dist/{chunk-XB4SCJWD.js → chunk-BFGD6UNG.js} +7 -7
  34. package/dist/{chunk-NLU6MBYT.js → chunk-BHPTGWMO.js} +12 -12
  35. package/dist/{chunk-XT3FON6A.js → chunk-BUFPEKEG.js} +5 -5
  36. package/dist/{chunk-GNIYYXQX.js → chunk-CNR4IKC7.js} +2 -2
  37. package/dist/{chunk-IUVMVNIO.js → chunk-CUEAIOPD.js} +6 -6
  38. package/dist/{chunk-QSSCVTFG.js → chunk-D4VRDMPK.js} +4 -4
  39. package/dist/{chunk-LW6VCL6S.js → chunk-D66CHEKN.js} +7 -7
  40. package/dist/{chunk-GF7RAQFD.js → chunk-FB7OAPCV.js} +3 -3
  41. package/dist/{chunk-LOFGDH5B.js → chunk-FW35KEAD.js} +2 -2
  42. package/dist/{chunk-2JLG65GB.js → chunk-G6LOB5IT.js} +3 -3
  43. package/dist/{chunk-DK3UMOX7.js → chunk-HEGROFQI.js} +2 -2
  44. package/dist/{chunk-KJAE7WO5.js → chunk-IMVJ3NEI.js} +2 -2
  45. package/dist/{chunk-JVOQSU6R.js → chunk-J5QY4YRW.js} +6 -6
  46. package/dist/{chunk-XBWS77S2.js → chunk-J7IGCYHZ.js} +2 -2
  47. package/dist/{chunk-BBI4YQTS.js → chunk-JYYI2M4H.js} +18 -18
  48. package/dist/{chunk-G4VKMMIC.js → chunk-K3I2ZG2R.js} +15 -15
  49. package/dist/chunk-KBYXAQS3.js +482 -0
  50. package/dist/chunk-KBYXAQS3.js.map +1 -0
  51. package/dist/{chunk-A53OR6P5.js → chunk-KEIID3YY.js} +7 -7
  52. package/dist/{chunk-CRAGAIOS.js → chunk-KPPDUVMP.js} +11 -11
  53. package/dist/{chunk-P53UYZZ4.js → chunk-KVLPKFGJ.js} +2 -2
  54. package/dist/{chunk-BZOYUBK4.js → chunk-LSEEMJH7.js} +6 -6
  55. package/dist/{chunk-M2P722BR.js → chunk-M6PVGN5W.js} +2 -2
  56. package/dist/{chunk-HO5KESIB.js → chunk-MBYQBTH2.js} +4 -4
  57. package/dist/{chunk-DNC2ZJOF.js → chunk-MFSXOQLX.js} +7 -7
  58. package/dist/{chunk-MMEFW2PI.js → chunk-MG773CN7.js} +7 -7
  59. package/dist/{chunk-WH6DAD6D.js → chunk-NA4AOKAJ.js} +2 -2
  60. package/dist/{chunk-SUHANL3G.js → chunk-NH6QDR7V.js} +7 -7
  61. package/dist/{chunk-ZG6HB4BO.js → chunk-NKC3QM4W.js} +13 -17
  62. package/dist/chunk-NKC3QM4W.js.map +1 -0
  63. package/dist/{chunk-XL4YNA3L.js → chunk-NVVDE63M.js} +22 -13
  64. package/dist/chunk-NVVDE63M.js.map +1 -0
  65. package/dist/{chunk-C5BBVVHW.js → chunk-O3YB7GKT.js} +2 -2
  66. package/dist/{chunk-NS7WH53I.js → chunk-O45NATRC.js} +2 -2
  67. package/dist/{chunk-KWJ6S4NZ.js → chunk-OFIIGVE7.js} +9 -9
  68. package/dist/{chunk-MYXEX6BB.js → chunk-OPZL2MRQ.js} +33 -10
  69. package/dist/chunk-OPZL2MRQ.js.map +1 -0
  70. package/dist/{chunk-ETWP7MDS.js → chunk-Q53APMHH.js} +1 -1
  71. package/dist/chunk-Q53APMHH.js.map +1 -0
  72. package/dist/{chunk-ZPDCVDE2.js → chunk-QTDNSMOT.js} +2 -2
  73. package/dist/{chunk-VNZBFVGY.js → chunk-QZW77GWD.js} +6 -6
  74. package/dist/chunk-REVI2JIA.js +9 -0
  75. package/dist/{chunk-PSALWCBD.js → chunk-RO25CJ2V.js} +5 -5
  76. package/dist/{chunk-MYASALCU.js → chunk-RSJZG4SD.js} +9 -9
  77. package/dist/chunk-RWGD6EXK.js +21 -0
  78. package/dist/chunk-RWGD6EXK.js.map +1 -0
  79. package/dist/{chunk-ZHK5XOV5.js → chunk-S2Q6M64P.js} +60 -60
  80. package/dist/{chunk-773UJC5C.js → chunk-SEFMLXA6.js} +7 -7
  81. package/dist/{chunk-7BH2PUYY.js → chunk-V6U4HDFJ.js} +5 -5
  82. package/dist/{chunk-EORL2V7P.js → chunk-XPMXRCBW.js} +2 -2
  83. package/dist/{chunk-VPZ5ILKT.js → chunk-XR6EXIZN.js} +5 -5
  84. package/dist/{chunk-APHVSSLI.js → chunk-XZAJSEXA.js} +2 -2
  85. package/dist/{chunk-ED6YLB4S.js → chunk-YQSWVHKK.js} +13 -13
  86. package/dist/chunk-YQSWVHKK.js.map +1 -0
  87. package/dist/{cleanup-DRELB6UC.js → cleanup-54DBWJWN.js} +38 -40
  88. package/dist/{cleanup-DRELB6UC.js.map → cleanup-54DBWJWN.js.map} +1 -1
  89. package/dist/{cli-C3U2BC44.js → cli-VOZ6BCM5.js} +4 -4
  90. package/dist/{color-T75ANAWG.js → color-BVSEJ6G5.js} +14 -14
  91. package/dist/{config-KI6JOXKW.js → config-6H54DGHU.js} +16 -17
  92. package/dist/{config-KI6JOXKW.js.map → config-6H54DGHU.js.map} +1 -1
  93. package/dist/{coordinate-4PPZN4U4.js → coordinate-WXN3OGJE.js} +26 -16
  94. package/dist/coordinate-WXN3OGJE.js.map +1 -0
  95. package/dist/{diff-NDZPRQV7.js → diff-ZBMQVDNF.js} +15 -16
  96. package/dist/{diff-NDZPRQV7.js.map → diff-ZBMQVDNF.js.map} +1 -1
  97. package/dist/{digest-H5YFX5WR.js → digest-XEHPAI5L.js} +12 -12
  98. package/dist/{fork-HHHATXVI.js → fork-UBBXUFNS.js} +33 -35
  99. package/dist/{fork-HHHATXVI.js.map → fork-UBBXUFNS.js.map} +1 -1
  100. package/dist/{history-3Z7AS2AC.js → history-CK3FEKBC.js} +10 -10
  101. package/dist/{hook-KOK7NKCO.js → hook-FRKNNKO3.js} +31 -24
  102. package/dist/hook-FRKNNKO3.js.map +1 -0
  103. package/dist/{hydrate-VI3XSZQH.js → hydrate-K6TOIE7S.js} +11 -11
  104. package/dist/{init-7NOKRHNJ.js → init-JJFHX26N.js} +18 -19
  105. package/dist/{init-7NOKRHNJ.js.map → init-JJFHX26N.js.map} +1 -1
  106. package/dist/{install-skills-TL5D7HZU.js → install-skills-IUD6FMAF.js} +11 -9
  107. package/dist/install-skills-bin.js +10 -8
  108. package/dist/install-skills-bin.js.map +1 -1
  109. package/dist/{keep-G62GSDOQ.js → keep-APP2WSKT.js} +12 -12
  110. package/dist/{list-CEVAZQ4V.js → list-OHGYVSWI.js} +11 -11
  111. package/dist/{move-ISAW6RDM.js → move-OU33UWX6.js} +24 -25
  112. package/dist/{move-ISAW6RDM.js.map → move-OU33UWX6.js.map} +1 -1
  113. package/dist/{note-YIVFXTGM.js → note-ELTUIFB6.js} +12 -12
  114. package/dist/{overlaps-YBEHBRRK.js → overlaps-C7LV7U47.js} +18 -19
  115. package/dist/{overlaps-YBEHBRRK.js.map → overlaps-C7LV7U47.js.map} +1 -1
  116. package/dist/{pin-J4IDSHRG.js → pin-W7A4GXHE.js} +13 -13
  117. package/dist/{pr-Z7CPBBGT.js → pr-G5PW3CQB.js} +26 -27
  118. package/dist/{pr-Z7CPBBGT.js.map → pr-G5PW3CQB.js.map} +1 -1
  119. package/dist/{prune-UA3UDZSM.js → prune-ZVGGPC2X.js} +35 -37
  120. package/dist/{prune-UA3UDZSM.js.map → prune-ZVGGPC2X.js.map} +1 -1
  121. package/dist/{pty-host-JIQUP62K.js → pty-host-QRHAVCCV.js} +29 -32
  122. package/dist/{pty-host-JIQUP62K.js.map → pty-host-QRHAVCCV.js.map} +1 -1
  123. package/dist/{read-DG4PCLFH.js → read-FHJHBUDI.js} +17 -13
  124. package/dist/{read-DG4PCLFH.js.map → read-FHJHBUDI.js.map} +1 -1
  125. package/dist/{recent-PGD6QYAH.js → recent-QOCMWXZY.js} +21 -22
  126. package/dist/{recent-PGD6QYAH.js.map → recent-QOCMWXZY.js.map} +1 -1
  127. package/dist/{remove-TPLA64HP.js → remove-BIF6SAUC.js} +36 -38
  128. package/dist/{remove-TPLA64HP.js.map → remove-BIF6SAUC.js.map} +1 -1
  129. package/dist/{report-K3OTT2ED.js → report-7TRHC2CQ.js} +16 -13
  130. package/dist/report-7TRHC2CQ.js.map +1 -0
  131. package/dist/{restart-477IX2JX.js → restart-YVWOAA7D.js} +14 -15
  132. package/dist/{restart-477IX2JX.js.map → restart-YVWOAA7D.js.map} +1 -1
  133. package/dist/{resume-OYBAJCYE.js → resume-KDCRPOAZ.js} +21 -22
  134. package/dist/{resume-OYBAJCYE.js.map → resume-KDCRPOAZ.js.map} +1 -1
  135. package/dist/{review-6PWFSBAO.js → review-YH5TH37K.js} +11 -11
  136. package/dist/{review-now-AT2SPPRO.js → review-now-4NBXZUJV.js} +2 -2
  137. package/dist/{run-XEHF2N4A.js → run-T6YFDM2T.js} +10 -10
  138. package/dist/{screen-SFU6TCDV.js → screen-LXXS4KCS.js} +12 -12
  139. package/dist/{search-VJ3BGWPX.js → search-HOIGQH66.js} +10 -10
  140. package/dist/{section-ZLINSTGS.js → section-NF6SAXSF.js} +14 -14
  141. package/dist/{send-NBP2WYBG.js → send-ELRCW7PJ.js} +26 -16
  142. package/dist/send-ELRCW7PJ.js.map +1 -0
  143. package/dist/{sessions-UT4I7A43.js → sessions-Y5X6OG3D.js} +31 -33
  144. package/dist/{sessions-UT4I7A43.js.map → sessions-Y5X6OG3D.js.map} +1 -1
  145. package/dist/{show-RK2EWOR6.js → show-5NYBZRYX.js} +11 -11
  146. package/dist/{snooze-T2WWIKZN.js → snooze-J2PV4C6X.js} +12 -12
  147. package/dist/{start-AWHOIA3Q.js → start-DO4UJCS4.js} +12 -12
  148. package/dist/{state-HK67C4UA.js → state-63M6QBOW.js} +2 -2
  149. package/dist/{status-QE2DA6RR.js → status-FHIC2MKA.js} +15 -16
  150. package/dist/{status-QE2DA6RR.js.map → status-FHIC2MKA.js.map} +1 -1
  151. package/dist/{statusline-Z5HLKDIA.js → statusline-UP2KMHYX.js} +5 -5
  152. package/dist/{statusline-hook-VPPS3PFO.js → statusline-hook-6BNEVENM.js} +4 -4
  153. package/dist/{stop-YOU3P3ZR.js → stop-T2E62H4M.js} +12 -12
  154. package/dist/{sync-74EFTPBJ.js → sync-3E4STI7L.js} +35 -37
  155. package/dist/{sync-74EFTPBJ.js.map → sync-3E4STI7L.js.map} +1 -1
  156. package/dist/{time-ZGMZZ5OY.js → time-JVF77UUA.js} +14 -14
  157. package/dist/{time-actions-VAGRSY5B.js → time-actions-JM3QKB5T.js} +3 -3
  158. package/dist/{timesheet-N74LPF5M.js → timesheet-B2HNBQQM.js} +20 -21
  159. package/dist/{timesheet-N74LPF5M.js.map → timesheet-B2HNBQQM.js.map} +1 -1
  160. package/dist/{todo-UVKGOG7D.js → todo-3UNVCCMY.js} +2 -2
  161. package/dist/{tree-FXTCWC6D.js → tree-EMUBZEDU.js} +37 -39
  162. package/dist/{tree-FXTCWC6D.js.map → tree-EMUBZEDU.js.map} +1 -1
  163. package/dist/{update-5QSRHIWH.js → update-4XHZ4VQZ.js} +20 -21
  164. package/dist/{update-5QSRHIWH.js.map → update-4XHZ4VQZ.js.map} +1 -1
  165. package/dist/{usage-CW7CDFU3.js → usage-JDXG5SDA.js} +12 -12
  166. package/dist/{usage-ask-V2SIRW4F.js → usage-ask-5ZWNYLVJ.js} +11 -11
  167. package/dist/version-VT2JXBQT.js +31 -0
  168. package/dist/version-VT2JXBQT.js.map +1 -0
  169. package/dist/{wait-XXC3I6DK.js → wait-FEN3WAEQ.js} +13 -13
  170. package/dist/wd-bin.js +3 -3
  171. package/dist/web/assets/{PtyView-BLTE5F3E.js → PtyView-C1X1ErwB.js} +2 -2
  172. package/dist/web/assets/{PtyView-BLTE5F3E.js.map → PtyView-C1X1ErwB.js.map} +1 -1
  173. package/dist/web/assets/{index-BiadbzE6.js → index-vE5o2Ywu.js} +27 -27
  174. package/dist/web/assets/index-vE5o2Ywu.js.map +1 -0
  175. package/dist/web/index.html +1 -1
  176. package/dist/{web-SUSR4IAK.js → web-LU6GSQMK.js} +141 -89
  177. package/dist/web-LU6GSQMK.js.map +1 -0
  178. package/npm-shrinkwrap.json +2 -2
  179. package/package.json +1 -1
  180. package/plugins/work-tree/skills/work-sessions/SKILL.md +35 -50
  181. package/dist/child-MPXXJ2QX.js.map +0 -1
  182. package/dist/chunk-4CXUVBOD.js +0 -76
  183. package/dist/chunk-4CXUVBOD.js.map +0 -1
  184. package/dist/chunk-BMPTUIP4.js +0 -105
  185. package/dist/chunk-BMPTUIP4.js.map +0 -1
  186. package/dist/chunk-DYKA3LO3.js +0 -9
  187. package/dist/chunk-ED6YLB4S.js.map +0 -1
  188. package/dist/chunk-ETWP7MDS.js.map +0 -1
  189. package/dist/chunk-MYXEX6BB.js.map +0 -1
  190. package/dist/chunk-NWKVTUTN.js.map +0 -1
  191. package/dist/chunk-SJBEIYLK.js +0 -16
  192. package/dist/chunk-SJBEIYLK.js.map +0 -1
  193. package/dist/chunk-TC3H7I6O.js +0 -196
  194. package/dist/chunk-TC3H7I6O.js.map +0 -1
  195. package/dist/chunk-TNJF7T33.js +0 -17
  196. package/dist/chunk-TNJF7T33.js.map +0 -1
  197. package/dist/chunk-XL4YNA3L.js.map +0 -1
  198. package/dist/chunk-ZG6HB4BO.js.map +0 -1
  199. package/dist/coordinate-4PPZN4U4.js.map +0 -1
  200. package/dist/hook-KOK7NKCO.js.map +0 -1
  201. package/dist/report-K3OTT2ED.js.map +0 -1
  202. package/dist/send-NBP2WYBG.js.map +0 -1
  203. package/dist/version-RJ4PCHPB.js +0 -117
  204. package/dist/version-RJ4PCHPB.js.map +0 -1
  205. package/dist/web/assets/index-BiadbzE6.js.map +0 -1
  206. package/dist/web-SUSR4IAK.js.map +0 -1
  207. /package/dist/{answer-L55DWMR5.js.map → answer-M5SVGKGO.js.map} +0 -0
  208. /package/dist/{broadcast-GQE7H3MF.js.map → broadcast-TVDWHKJE.js.map} +0 -0
  209. /package/dist/{catchup-ZMG4OWF2.js.map → catchup-UGDVV5RI.js.map} +0 -0
  210. /package/dist/{chunk-7HQSILMM.js.map → chunk-2MAMYB72.js.map} +0 -0
  211. /package/dist/{chunk-RGKGJOES.js.map → chunk-2YDY25YI.js.map} +0 -0
  212. /package/dist/{chunk-HCYES6U7.js.map → chunk-32CMRR6M.js.map} +0 -0
  213. /package/dist/{chunk-SF3DIIKN.js.map → chunk-35WLDIMQ.js.map} +0 -0
  214. /package/dist/{chunk-VQEMPGJL.js.map → chunk-3DPHZKSL.js.map} +0 -0
  215. /package/dist/{chunk-T5GJVUSL.js.map → chunk-4CUYK2XD.js.map} +0 -0
  216. /package/dist/{chunk-QAIG5FSQ.js.map → chunk-4JQ3CMLS.js.map} +0 -0
  217. /package/dist/{chunk-LCYYJFSZ.js.map → chunk-5KYEDVL7.js.map} +0 -0
  218. /package/dist/{chunk-6S3DYLGH.js.map → chunk-6A6XOLVB.js.map} +0 -0
  219. /package/dist/{chunk-HBYXSFLN.js.map → chunk-6EFDXIA6.js.map} +0 -0
  220. /package/dist/{chunk-NREZVTBP.js.map → chunk-6ER6IBFJ.js.map} +0 -0
  221. /package/dist/{chunk-XIN6XUFL.js.map → chunk-6NOZK4JY.js.map} +0 -0
  222. /package/dist/{chunk-HUGHF45U.js.map → chunk-7CH7FS5V.js.map} +0 -0
  223. /package/dist/{chunk-K6FD5WDW.js.map → chunk-AB2KARHU.js.map} +0 -0
  224. /package/dist/{chunk-BGQ6NUU7.js.map → chunk-ADOCX5G3.js.map} +0 -0
  225. /package/dist/{chunk-QMWV4UKB.js.map → chunk-B26TVG74.js.map} +0 -0
  226. /package/dist/{chunk-XB4SCJWD.js.map → chunk-BFGD6UNG.js.map} +0 -0
  227. /package/dist/{chunk-NLU6MBYT.js.map → chunk-BHPTGWMO.js.map} +0 -0
  228. /package/dist/{chunk-XT3FON6A.js.map → chunk-BUFPEKEG.js.map} +0 -0
  229. /package/dist/{chunk-GNIYYXQX.js.map → chunk-CNR4IKC7.js.map} +0 -0
  230. /package/dist/{chunk-IUVMVNIO.js.map → chunk-CUEAIOPD.js.map} +0 -0
  231. /package/dist/{chunk-QSSCVTFG.js.map → chunk-D4VRDMPK.js.map} +0 -0
  232. /package/dist/{chunk-LW6VCL6S.js.map → chunk-D66CHEKN.js.map} +0 -0
  233. /package/dist/{chunk-GF7RAQFD.js.map → chunk-FB7OAPCV.js.map} +0 -0
  234. /package/dist/{chunk-LOFGDH5B.js.map → chunk-FW35KEAD.js.map} +0 -0
  235. /package/dist/{chunk-2JLG65GB.js.map → chunk-G6LOB5IT.js.map} +0 -0
  236. /package/dist/{chunk-DK3UMOX7.js.map → chunk-HEGROFQI.js.map} +0 -0
  237. /package/dist/{chunk-KJAE7WO5.js.map → chunk-IMVJ3NEI.js.map} +0 -0
  238. /package/dist/{chunk-JVOQSU6R.js.map → chunk-J5QY4YRW.js.map} +0 -0
  239. /package/dist/{chunk-XBWS77S2.js.map → chunk-J7IGCYHZ.js.map} +0 -0
  240. /package/dist/{chunk-BBI4YQTS.js.map → chunk-JYYI2M4H.js.map} +0 -0
  241. /package/dist/{chunk-G4VKMMIC.js.map → chunk-K3I2ZG2R.js.map} +0 -0
  242. /package/dist/{chunk-A53OR6P5.js.map → chunk-KEIID3YY.js.map} +0 -0
  243. /package/dist/{chunk-CRAGAIOS.js.map → chunk-KPPDUVMP.js.map} +0 -0
  244. /package/dist/{chunk-P53UYZZ4.js.map → chunk-KVLPKFGJ.js.map} +0 -0
  245. /package/dist/{chunk-BZOYUBK4.js.map → chunk-LSEEMJH7.js.map} +0 -0
  246. /package/dist/{chunk-M2P722BR.js.map → chunk-M6PVGN5W.js.map} +0 -0
  247. /package/dist/{chunk-HO5KESIB.js.map → chunk-MBYQBTH2.js.map} +0 -0
  248. /package/dist/{chunk-DNC2ZJOF.js.map → chunk-MFSXOQLX.js.map} +0 -0
  249. /package/dist/{chunk-MMEFW2PI.js.map → chunk-MG773CN7.js.map} +0 -0
  250. /package/dist/{chunk-WH6DAD6D.js.map → chunk-NA4AOKAJ.js.map} +0 -0
  251. /package/dist/{chunk-SUHANL3G.js.map → chunk-NH6QDR7V.js.map} +0 -0
  252. /package/dist/{chunk-C5BBVVHW.js.map → chunk-O3YB7GKT.js.map} +0 -0
  253. /package/dist/{chunk-NS7WH53I.js.map → chunk-O45NATRC.js.map} +0 -0
  254. /package/dist/{chunk-KWJ6S4NZ.js.map → chunk-OFIIGVE7.js.map} +0 -0
  255. /package/dist/{chunk-ZPDCVDE2.js.map → chunk-QTDNSMOT.js.map} +0 -0
  256. /package/dist/{chunk-VNZBFVGY.js.map → chunk-QZW77GWD.js.map} +0 -0
  257. /package/dist/{chunk-DYKA3LO3.js.map → chunk-REVI2JIA.js.map} +0 -0
  258. /package/dist/{chunk-PSALWCBD.js.map → chunk-RO25CJ2V.js.map} +0 -0
  259. /package/dist/{chunk-MYASALCU.js.map → chunk-RSJZG4SD.js.map} +0 -0
  260. /package/dist/{chunk-ZHK5XOV5.js.map → chunk-S2Q6M64P.js.map} +0 -0
  261. /package/dist/{chunk-773UJC5C.js.map → chunk-SEFMLXA6.js.map} +0 -0
  262. /package/dist/{chunk-7BH2PUYY.js.map → chunk-V6U4HDFJ.js.map} +0 -0
  263. /package/dist/{chunk-EORL2V7P.js.map → chunk-XPMXRCBW.js.map} +0 -0
  264. /package/dist/{chunk-VPZ5ILKT.js.map → chunk-XR6EXIZN.js.map} +0 -0
  265. /package/dist/{chunk-APHVSSLI.js.map → chunk-XZAJSEXA.js.map} +0 -0
  266. /package/dist/{cli-C3U2BC44.js.map → cli-VOZ6BCM5.js.map} +0 -0
  267. /package/dist/{color-T75ANAWG.js.map → color-BVSEJ6G5.js.map} +0 -0
  268. /package/dist/{digest-H5YFX5WR.js.map → digest-XEHPAI5L.js.map} +0 -0
  269. /package/dist/{history-3Z7AS2AC.js.map → history-CK3FEKBC.js.map} +0 -0
  270. /package/dist/{hydrate-VI3XSZQH.js.map → hydrate-K6TOIE7S.js.map} +0 -0
  271. /package/dist/{install-skills-TL5D7HZU.js.map → install-skills-IUD6FMAF.js.map} +0 -0
  272. /package/dist/{keep-G62GSDOQ.js.map → keep-APP2WSKT.js.map} +0 -0
  273. /package/dist/{list-CEVAZQ4V.js.map → list-OHGYVSWI.js.map} +0 -0
  274. /package/dist/{note-YIVFXTGM.js.map → note-ELTUIFB6.js.map} +0 -0
  275. /package/dist/{pin-J4IDSHRG.js.map → pin-W7A4GXHE.js.map} +0 -0
  276. /package/dist/{review-6PWFSBAO.js.map → review-YH5TH37K.js.map} +0 -0
  277. /package/dist/{review-now-AT2SPPRO.js.map → review-now-4NBXZUJV.js.map} +0 -0
  278. /package/dist/{run-XEHF2N4A.js.map → run-T6YFDM2T.js.map} +0 -0
  279. /package/dist/{screen-SFU6TCDV.js.map → screen-LXXS4KCS.js.map} +0 -0
  280. /package/dist/{search-VJ3BGWPX.js.map → search-HOIGQH66.js.map} +0 -0
  281. /package/dist/{section-ZLINSTGS.js.map → section-NF6SAXSF.js.map} +0 -0
  282. /package/dist/{show-RK2EWOR6.js.map → show-5NYBZRYX.js.map} +0 -0
  283. /package/dist/{snooze-T2WWIKZN.js.map → snooze-J2PV4C6X.js.map} +0 -0
  284. /package/dist/{start-AWHOIA3Q.js.map → start-DO4UJCS4.js.map} +0 -0
  285. /package/dist/{state-HK67C4UA.js.map → state-63M6QBOW.js.map} +0 -0
  286. /package/dist/{statusline-Z5HLKDIA.js.map → statusline-UP2KMHYX.js.map} +0 -0
  287. /package/dist/{statusline-hook-VPPS3PFO.js.map → statusline-hook-6BNEVENM.js.map} +0 -0
  288. /package/dist/{stop-YOU3P3ZR.js.map → stop-T2E62H4M.js.map} +0 -0
  289. /package/dist/{time-ZGMZZ5OY.js.map → time-JVF77UUA.js.map} +0 -0
  290. /package/dist/{time-actions-VAGRSY5B.js.map → time-actions-JM3QKB5T.js.map} +0 -0
  291. /package/dist/{todo-UVKGOG7D.js.map → todo-3UNVCCMY.js.map} +0 -0
  292. /package/dist/{usage-CW7CDFU3.js.map → usage-JDXG5SDA.js.map} +0 -0
  293. /package/dist/{usage-ask-V2SIRW4F.js.map → usage-ask-5ZWNYLVJ.js.map} +0 -0
  294. /package/dist/{wait-XXC3I6DK.js.map → wait-FEN3WAEQ.js.map} +0 -0
@@ -3,25 +3,37 @@ import {
3
3
  withoutParentSession
4
4
  } from "./chunk-KGHWHAVF.js";
5
5
  import {
6
- CLAUDE_READ_ONLY_LINES,
7
- CLAUDE_READ_ONLY_LOCAL_LINES,
8
- claudeReadDenyRules,
9
- claudeSettingsFile,
10
- internalClaudeReadOnlySpawn,
11
- internalClaudeSpawn
12
- } from "./chunk-BMPTUIP4.js";
13
- import {
14
- applyEnvDelta
15
- } from "./chunk-ED6YLB4S.js";
6
+ json,
7
+ withDb
8
+ } from "./chunk-QGUBOOEN.js";
16
9
  import {
17
10
  checkedOutBranch
18
11
  } from "./chunk-Z6ACV5ZQ.js";
12
+ import {
13
+ savedPath,
14
+ userStatusLine
15
+ } from "./chunk-7ZATXG5F.js";
19
16
  import {
20
17
  readReadings
21
18
  } from "./chunk-JUGF3YE7.js";
22
19
  import {
23
- workCommand
24
- } from "./chunk-HK6AZQ5Z.js";
20
+ accountOf
21
+ } from "./chunk-BR6OWWAA.js";
22
+ import {
23
+ CLAUDE_READ_ONLY_LINES,
24
+ CLAUDE_READ_ONLY_LOCAL_LINES,
25
+ atLeast,
26
+ claudeReadDenyRules,
27
+ claudeSettingsFile,
28
+ internalClaudeReadOnlySpawn,
29
+ internalClaudeSpawn,
30
+ launchFor,
31
+ parseClaudeVersion,
32
+ runVersion
33
+ } from "./chunk-KBYXAQS3.js";
34
+ import {
35
+ applyEnvDelta
36
+ } from "./chunk-YQSWVHKK.js";
25
37
  import {
26
38
  accountDir,
27
39
  accountDirKey,
@@ -38,25 +50,20 @@ import {
38
50
  sessionAccount,
39
51
  setUpAccounts,
40
52
  validateClaudeAccounts
41
- } from "./chunk-XIN6XUFL.js";
53
+ } from "./chunk-6NOZK4JY.js";
42
54
  import {
43
55
  DEFAULT_ACCOUNT,
44
56
  getConfigPath,
45
57
  isAgentId,
46
58
  loadConfig
47
- } from "./chunk-ETWP7MDS.js";
48
- import {
49
- savedPath,
50
- userStatusLine
51
- } from "./chunk-7ZATXG5F.js";
52
- import {
53
- accountOf
54
- } from "./chunk-BR6OWWAA.js";
59
+ } from "./chunk-Q53APMHH.js";
55
60
  import {
56
61
  bootTime,
62
+ killTreeAsync,
57
63
  processTable
58
64
  } from "./chunk-M2X6OHHR.js";
59
65
  import {
66
+ findOnPath,
60
67
  spawn_default
61
68
  } from "./chunk-QOSAWNOU.js";
62
69
  import {
@@ -68,6 +75,9 @@ import {
68
75
  import {
69
76
  debugLog
70
77
  } from "./chunk-IAKOKZYW.js";
78
+ import {
79
+ workCommand
80
+ } from "./chunk-HK6AZQ5Z.js";
71
81
  import {
72
82
  getConfigDir
73
83
  } from "./chunk-F2ECTTSY.js";
@@ -190,7 +200,147 @@ var AccountAdminError = class extends Error {
190
200
  };
191
201
 
192
202
  // src/core/agents/index.ts
193
- import path15 from "path";
203
+ import path16 from "path";
204
+
205
+ // src/core/agents/claude/tool-update.ts
206
+ import fs2 from "fs";
207
+ import os from "os";
208
+ import path2 from "path";
209
+ var slash = (p) => p.replace(/\\/g, "/");
210
+ function claudeInstallOf(realFile, platform = process.platform) {
211
+ const f = slash(realFile);
212
+ const brewAt = (marker) => {
213
+ const i = f.indexOf(marker);
214
+ return i > 0 ? path2.join(realFile.slice(0, i), "bin", "brew") : null;
215
+ };
216
+ const cask = brewAt("/Caskroom/claude-code/");
217
+ if (cask) return { kind: "brew-cask", file: realFile, update: { cmd: cask, args: ["upgrade", "--cask", "claude-code"] } };
218
+ const formula = brewAt("/Cellar/claude-code/");
219
+ if (formula) return { kind: "brew-formula", file: realFile, update: { cmd: formula, args: ["upgrade", "claude-code"] } };
220
+ if (/\/claude\/versions\/[^/]+$/.test(f) || /\/\.local\/bin\/claude(\.exe)?$/.test(f))
221
+ return { kind: "native", file: realFile, update: { cmd: realFile, args: ["update"] } };
222
+ const npmAt = f.indexOf("/node_modules/@anthropic-ai/claude-code/");
223
+ if (npmAt > 0) {
224
+ const modules = realFile.slice(0, npmAt);
225
+ const prefix = path2.basename(path2.dirname(modules)) === "lib" ? path2.dirname(path2.dirname(modules)) : path2.dirname(modules);
226
+ const npm = platform === "win32" ? path2.join(prefix, "npm.cmd") : path2.join(prefix, "bin", "npm");
227
+ return { kind: "npm", file: realFile, update: { cmd: npm, args: ["install", "-g", "@anthropic-ai/claude-code@latest"] } };
228
+ }
229
+ return { kind: "unknown", file: realFile, update: null };
230
+ }
231
+ async function latestClaudeVersion(fetchImpl = fetch, timeoutMs = 15e3) {
232
+ try {
233
+ const res = await fetchImpl("https://registry.npmjs.org/@anthropic-ai%2Fclaude-code/latest", {
234
+ signal: AbortSignal.timeout(timeoutMs),
235
+ headers: { accept: "application/json" }
236
+ });
237
+ if (!res.ok) return null;
238
+ const v = (await res.json()).version;
239
+ return typeof v === "string" && parseClaudeVersion(v) ? v : null;
240
+ } catch {
241
+ return null;
242
+ }
243
+ }
244
+ var RETRY_SAME_MS = 12 * 36e5;
245
+ var KEY = "claude:update-tried";
246
+ function lastTried() {
247
+ return withDb((d) => {
248
+ const row = d.prepare("SELECT value FROM meta WHERE key = ?").get(KEY);
249
+ const v = row ? json.parse(row.value) : null;
250
+ return v && typeof v.version === "string" && typeof v.at === "number" ? { version: v.version, at: v.at } : null;
251
+ });
252
+ }
253
+ function noteTried(version, at) {
254
+ withDb((d) => d.prepare("INSERT OR REPLACE INTO meta (key, value) VALUES (?, ?)").run(KEY, JSON.stringify({ version, at })));
255
+ }
256
+ async function keepClaudeUpdated(io = realToolUpdateIo()) {
257
+ const now = (io.now ?? Date.now)();
258
+ const file = io.find();
259
+ if (!file) return { kind: "cannot", why: "claude isn't on PATH" };
260
+ const install = claudeInstallOf(file, io.platform);
261
+ const installed = await io.installed(file);
262
+ if (!installed) return { kind: "cannot", why: "Claude Code's version can't be told (claude --version gave none)" };
263
+ const latest = await io.latest();
264
+ if (!latest) return { kind: "cannot", why: "couldn't ask npm for the newest Claude Code" };
265
+ if (atLeast(parseClaudeVersion(installed), parseClaudeVersion(latest))) return { kind: "up-to-date", installed };
266
+ if (!install.update)
267
+ return { kind: "cannot", why: `Claude Code ${latest} is out, but work doesn't know how to update this install (${file})` };
268
+ const tried = (io.tried ?? lastTried)();
269
+ if (tried && tried.version === latest && now - tried.at < RETRY_SAME_MS) return { kind: "waiting", installed, latest };
270
+ (io.noteTried ?? noteTried)(latest, now);
271
+ const r = await io.run(install.update.cmd, install.update.args);
272
+ const after = await io.installed(io.find() ?? file) ?? installed;
273
+ if (after !== installed) return { kind: "updated", from: installed, to: after };
274
+ const said = r.output.trim().split("\n").slice(-3).join(" \xB7 ").slice(0, 300);
275
+ return {
276
+ kind: "not-yet",
277
+ installed,
278
+ latest,
279
+ why: r.ok ? `${install.update.cmd.split(/[\\/]/).pop()} found nothing newer yet${said ? ` (${said})` : ""}` : `the update failed: ${said || "no output"}`
280
+ };
281
+ }
282
+ var UPDATE_TIMEOUT_MS = 10 * 6e4;
283
+ function runUpdate(cmd, args) {
284
+ return new Promise((resolve) => {
285
+ const launch = launchFor(cmd, args);
286
+ if ("refused" in launch) return resolve({ ok: false, output: launch.refused });
287
+ let out = "";
288
+ let settled = false;
289
+ const done = (ok) => {
290
+ if (settled) return;
291
+ settled = true;
292
+ clearTimeout(timer);
293
+ resolve({ ok, output: out.slice(-4e3) });
294
+ };
295
+ const env = { ...process.env, HOMEBREW_NO_ENV_HINTS: "1", HOMEBREW_NO_INSTALL_CLEANUP: "1", NONINTERACTIVE: "1" };
296
+ const child = spawn_default(launch.cmd, launch.args, { cwd: os.homedir(), env, windowsHide: true, stdio: ["ignore", "pipe", "pipe"] });
297
+ const timer = setTimeout(() => {
298
+ if (child.pid) void killTreeAsync(child.pid);
299
+ else child.kill();
300
+ out += "\n(timed out)";
301
+ done(false);
302
+ }, UPDATE_TIMEOUT_MS);
303
+ child.stdout?.on("data", (d) => out += d.toString());
304
+ child.stderr?.on("data", (d) => out += d.toString());
305
+ child.on("error", (e) => (out += `
306
+ ${e.message}`, done(false)));
307
+ child.on("close", (code) => done(code === 0));
308
+ });
309
+ }
310
+ function realToolUpdateIo() {
311
+ return {
312
+ find: () => {
313
+ const f = findOnPath("claude");
314
+ if (!f) return null;
315
+ try {
316
+ return fs2.realpathSync(f);
317
+ } catch {
318
+ return f;
319
+ }
320
+ },
321
+ installed: async (file) => {
322
+ const text = await runVersion(file);
323
+ const v = text ? parseClaudeVersion(text) : null;
324
+ return v ? v.join(".") : null;
325
+ },
326
+ latest: () => latestClaudeVersion(),
327
+ run: runUpdate
328
+ };
329
+ }
330
+ function updateCheckText(r) {
331
+ switch (r.kind) {
332
+ case "up-to-date":
333
+ return `Claude Code is up to date (${r.installed})`;
334
+ case "updated":
335
+ return `updated Claude Code ${r.from} \u2192 ${r.to}; sessions move onto it between turns`;
336
+ case "waiting":
337
+ return `Claude Code ${r.latest} is out; tried already, trying again later (this is ${r.installed})`;
338
+ case "not-yet":
339
+ return `Claude Code ${r.latest} is out, still on ${r.installed}: ${r.why}`;
340
+ case "cannot":
341
+ return r.why;
342
+ }
343
+ }
194
344
 
195
345
  // src/core/agents/claude/startup-question.ts
196
346
  var YES = /^\s*[❯>]?\s*(?:1\.\s+)?Yes, (?:I trust this folder|proceed)\s*$/;
@@ -203,23 +353,23 @@ function claudeStartupQuestion(screen) {
203
353
  }
204
354
 
205
355
  // src/core/agents/claude/temp-folders.ts
356
+ import fs4 from "fs";
357
+ import os3 from "os";
358
+ import path4 from "path";
359
+
360
+ // src/core/agents/claude/activity.ts
206
361
  import fs3 from "fs";
207
362
  import os2 from "os";
208
363
  import path3 from "path";
209
-
210
- // src/core/agents/claude/activity.ts
211
- import fs2 from "fs";
212
- import os from "os";
213
- import path2 from "path";
214
364
  function encodeProjectDir(p) {
215
- return path2.resolve(p).replace(/[^A-Za-z0-9]/g, "-");
365
+ return path3.resolve(p).replace(/[^A-Za-z0-9]/g, "-");
216
366
  }
217
367
  var listings = /* @__PURE__ */ new Map();
218
368
  var NAMES_MAX_AGE_MS = 2e3;
219
369
  function projectTranscripts(projectDir, now = Date.now()) {
220
370
  let dirMtimeMs;
221
371
  try {
222
- dirMtimeMs = fs2.statSync(projectDir).mtimeMs;
372
+ dirMtimeMs = fs3.statSync(projectDir).mtimeMs;
223
373
  } catch {
224
374
  listings.delete(projectDir);
225
375
  return [];
@@ -228,7 +378,7 @@ function projectTranscripts(projectDir, now = Date.now()) {
228
378
  if (!hit || hit.dirMtimeMs !== dirMtimeMs || now - hit.at >= NAMES_MAX_AGE_MS) {
229
379
  let names = [];
230
380
  try {
231
- names = fs2.readdirSync(projectDir).filter((n) => n.endsWith(".jsonl"));
381
+ names = fs3.readdirSync(projectDir).filter((n) => n.endsWith(".jsonl"));
232
382
  } catch {
233
383
  }
234
384
  hit = { at: now, dirMtimeMs, names };
@@ -237,8 +387,8 @@ function projectTranscripts(projectDir, now = Date.now()) {
237
387
  const files = [];
238
388
  for (const name of hit.names) {
239
389
  try {
240
- const file = path2.join(projectDir, name);
241
- const st = fs2.statSync(file);
390
+ const file = path3.join(projectDir, name);
391
+ const st = fs3.statSync(file);
242
392
  files.push({ file, mtimeMs: st.mtimeMs, size: st.size });
243
393
  } catch {
244
394
  }
@@ -251,7 +401,7 @@ function latestJsonlMtimeMs(projectDir) {
251
401
  return latest;
252
402
  }
253
403
  function projectsRootOf(configDir) {
254
- return path2.join(configDir || path2.join(os.homedir(), ".claude"), "projects");
404
+ return path3.join(configDir || path3.join(os2.homedir(), ".claude"), "projects");
255
405
  }
256
406
  function claudeProjectsRoots(first) {
257
407
  const accounts = claudeAccounts();
@@ -260,28 +410,28 @@ function claudeProjectsRoots(first) {
260
410
  const out = [];
261
411
  for (const a of ordered) {
262
412
  const root = projectsRootOf(a.dir);
263
- const key2 = path2.resolve(root);
413
+ const key2 = path3.resolve(root);
264
414
  if (seen.has(key2)) continue;
265
415
  seen.add(key2);
266
416
  out.push(root);
267
417
  }
268
418
  return out;
269
419
  }
270
- var activityIn = (launchPath, configDir) => latestJsonlMtimeMs(path2.join(projectsRootOf(configDir), encodeProjectDir(launchPath)));
420
+ var activityIn = (launchPath, configDir) => latestJsonlMtimeMs(path3.join(projectsRootOf(configDir), encodeProjectDir(launchPath)));
271
421
  function getClaudeActivityMs(launchPath, configDir) {
272
422
  if (configDir) return activityIn(launchPath, configDir);
273
423
  let latest = 0;
274
- for (const root of claudeProjectsRoots()) latest = Math.max(latest, latestJsonlMtimeMs(path2.join(root, encodeProjectDir(launchPath))));
424
+ for (const root of claudeProjectsRoots()) latest = Math.max(latest, latestJsonlMtimeMs(path3.join(root, encodeProjectDir(launchPath))));
275
425
  return latest;
276
426
  }
277
427
  function hasClaudeConversation(dir, configDir) {
278
428
  return activityIn(dir, configDir) > 0;
279
429
  }
280
430
  function sessionRunFolders(session, existing = true) {
281
- const paths = existing ? session.paths.filter((p) => fs2.existsSync(p)) : session.paths;
431
+ const paths = existing ? session.paths.filter((p) => fs3.existsSync(p)) : session.paths;
282
432
  const out = /* @__PURE__ */ new Set();
283
433
  if (session.isGroup) {
284
- for (const p of paths) out.add(path2.dirname(p));
434
+ for (const p of paths) out.add(path3.dirname(p));
285
435
  for (const p of paths) out.add(p);
286
436
  } else {
287
437
  for (const p of paths) out.add(p);
@@ -289,9 +439,9 @@ function sessionRunFolders(session, existing = true) {
289
439
  return [...out];
290
440
  }
291
441
  function resolveResumeLaunch(session) {
292
- const existing = session.paths.filter((p) => fs2.existsSync(p));
442
+ const existing = session.paths.filter((p) => fs3.existsSync(p));
293
443
  const first = existing[0] ?? session.paths[0];
294
- const defaultPath = session.isGroup ? path2.dirname(first) : first;
444
+ const defaultPath = session.isGroup ? path3.dirname(first) : first;
295
445
  const candidates = sessionRunFolders(session);
296
446
  const configDir = configDirEnv(sessionAccount(session)).CLAUDE_CONFIG_DIR;
297
447
  let launchPath = defaultPath;
@@ -307,16 +457,16 @@ function resolveResumeLaunch(session) {
307
457
  }
308
458
 
309
459
  // src/core/agents/claude/temp-folders.ts
310
- function claudeTempRoot(platform = process.platform, uid = typeof process.getuid === "function" ? process.getuid() : -1, tmpdir = os2.tmpdir()) {
311
- return platform === "win32" ? path3.win32.join(tmpdir, "claude") : `/tmp/claude-${uid}`;
460
+ function claudeTempRoot(platform = process.platform, uid = typeof process.getuid === "function" ? process.getuid() : -1, tmpdir = os3.tmpdir()) {
461
+ return platform === "win32" ? path4.win32.join(tmpdir, "claude") : `/tmp/claude-${uid}`;
312
462
  }
313
463
  function claudeTempFolders(session, root = claudeTempRoot()) {
314
- const join = root.includes("\\") ? path3.win32.join : path3.posix.join;
464
+ const join = root.includes("\\") ? path4.win32.join : path4.posix.join;
315
465
  return sessionRunFolders(session, false).map((folder) => join(root, encodeProjectDir(folder)));
316
466
  }
317
- var realIo = { realpath: (p) => fs3.realpathSync.native(p), lstat: (p) => fs3.lstatSync(p) };
467
+ var realIo = { realpath: (p) => fs4.realpathSync.native(p), lstat: (p) => fs4.lstatSync(p) };
318
468
  function trustedTempRoot(root = claudeTempRoot(), platform = process.platform, uid = typeof process.getuid === "function" ? process.getuid() : -1, io = realIo) {
319
- const p = platform === "win32" ? path3.win32 : path3.posix;
469
+ const p = platform === "win32" ? path4.win32 : path4.posix;
320
470
  try {
321
471
  const real = p.join(io.realpath(p.dirname(root)), p.basename(root));
322
472
  const st = io.lstat(real);
@@ -341,16 +491,16 @@ function sessionTempFolders(session, root = claudeTempRoot(), platform = process
341
491
  }
342
492
 
343
493
  // src/core/agents/claude/folder-trust.ts
344
- import fs5 from "fs";
345
- import path5 from "path";
494
+ import fs6 from "fs";
495
+ import path6 from "path";
346
496
 
347
497
  // src/core/agents/claude/setup-copy.ts
348
- import fs4 from "fs";
349
- import os3 from "os";
350
- import path4 from "path";
498
+ import fs5 from "fs";
499
+ import os4 from "os";
500
+ import path5 from "path";
351
501
  var TRUSTED_FOLDERS = "trusted folders";
352
- function globalConfigFile(dir, home = os3.homedir()) {
353
- return accountDirKey(dir) === accountDirKey(path4.join(home, ".claude")) ? path4.join(home, ".claude.json") : path4.join(dir, ".claude.json");
502
+ function globalConfigFile(dir, home = os4.homedir()) {
503
+ return accountDirKey(dir) === accountDirKey(path5.join(home, ".claude")) ? path5.join(home, ".claude.json") : path5.join(dir, ".claude.json");
354
504
  }
355
505
  var isObject = (v) => !!v && typeof v === "object" && !Array.isArray(v);
356
506
  var same = (a, b) => JSON.stringify(a) === JSON.stringify(b);
@@ -430,7 +580,7 @@ var FILES = ["CLAUDE.md", "statusline-command.sh"];
430
580
  var FOLDERS = ["agents", "commands"];
431
581
  var SETTINGS = ["settings.json", "settings.local.json"];
432
582
  function alreadyThere(from, to, io) {
433
- if (io.isDir(from)) return io.isDir(to) && io.list(from).every((name) => alreadyThere(path4.join(from, name), path4.join(to, name), io));
583
+ if (io.isDir(from)) return io.isDir(to) && io.list(from).every((name) => alreadyThere(path5.join(from, name), path5.join(to, name), io));
434
584
  const a = io.read(from);
435
585
  const b = io.read(to);
436
586
  return !!a && !!b && a.equals(b);
@@ -440,31 +590,31 @@ function marketplaceKey(source) {
440
590
  return args ? args[3].replace(/\\/g, "/").replace(/\/+$/, "").toLowerCase() : null;
441
591
  }
442
592
  var realSetupIo = {
443
- exists: (p) => fs4.existsSync(p),
593
+ exists: (p) => fs5.existsSync(p),
444
594
  isDir: (p) => {
445
595
  try {
446
- return fs4.statSync(p).isDirectory();
596
+ return fs5.statSync(p).isDirectory();
447
597
  } catch {
448
598
  return false;
449
599
  }
450
600
  },
451
601
  list: (dir) => {
452
602
  try {
453
- return fs4.readdirSync(dir);
603
+ return fs5.readdirSync(dir);
454
604
  } catch {
455
605
  return [];
456
606
  }
457
607
  },
458
608
  read: (file) => {
459
609
  try {
460
- return fs4.readFileSync(file);
610
+ return fs5.readFileSync(file);
461
611
  } catch {
462
612
  return null;
463
613
  }
464
614
  },
465
615
  readJson: (file) => {
466
616
  try {
467
- return JSON.parse(fs4.readFileSync(file, "utf-8"));
617
+ return JSON.parse(fs5.readFileSync(file, "utf-8"));
468
618
  } catch {
469
619
  return null;
470
620
  }
@@ -490,20 +640,20 @@ function withTrusted(config, folders) {
490
640
  }
491
641
  function planSetupCopy(from, to, io = realSetupIo) {
492
642
  const items = [];
493
- const there = (rel) => io.exists(path4.join(to.dir, rel));
494
- const differs = (rel) => !alreadyThere(path4.join(from.dir, rel), path4.join(to.dir, rel), io);
643
+ const there = (rel) => io.exists(path5.join(to.dir, rel));
644
+ const differs = (rel) => !alreadyThere(path5.join(from.dir, rel), path5.join(to.dir, rel), io);
495
645
  for (const f of FILES)
496
- if (io.exists(path4.join(from.dir, f)) && differs(f)) items.push({ kind: "file", name: f, does: there(f) ? "replaces" : "adds" });
646
+ if (io.exists(path5.join(from.dir, f)) && differs(f)) items.push({ kind: "file", name: f, does: there(f) ? "replaces" : "adds" });
497
647
  for (const d of FOLDERS)
498
- if (io.isDir(path4.join(from.dir, d)) && io.list(path4.join(from.dir, d)).length && differs(d))
648
+ if (io.isDir(path5.join(from.dir, d)) && io.list(path5.join(from.dir, d)).length && differs(d))
499
649
  items.push({ kind: "folder", name: `${d}/`, does: there(d) ? "merges into" : "adds" });
500
- for (const skill of io.list(path4.join(from.dir, "skills")).filter((s) => s !== "synced" && io.isDir(path4.join(from.dir, "skills", s))))
501
- if (differs(path4.join("skills", skill)))
502
- items.push({ kind: "folder", name: `skills/${skill}/`, does: there(path4.join("skills", skill)) ? "replaces" : "adds" });
650
+ for (const skill of io.list(path5.join(from.dir, "skills")).filter((s) => s !== "synced" && io.isDir(path5.join(from.dir, "skills", s))))
651
+ if (differs(path5.join("skills", skill)))
652
+ items.push({ kind: "folder", name: `skills/${skill}/`, does: there(path5.join("skills", skill)) ? "replaces" : "adds" });
503
653
  for (const s of SETTINGS) {
504
- const source = io.readJson(path4.join(from.dir, s));
654
+ const source = io.readJson(path5.join(from.dir, s));
505
655
  if (!isObject(source)) continue;
506
- const target = io.readJson(path4.join(to.dir, s));
656
+ const target = io.readJson(path5.join(to.dir, s));
507
657
  const have = isObject(target) ? target : {};
508
658
  if (!same(mergeSettings(source, have), have))
509
659
  items.push({
@@ -526,8 +676,8 @@ function planSetupCopy(from, to, io = realSetupIo) {
526
676
  ...remote ? { note: `needs its own sign-in on ${to.name}: /mcp \u2192 ${name} \u2192 Authenticate` } : {}
527
677
  });
528
678
  }
529
- const markets = io.readJson(path4.join(from.dir, "plugins", "known_marketplaces.json"));
530
- const haveMarkets = io.readJson(path4.join(to.dir, "plugins", "known_marketplaces.json"));
679
+ const markets = io.readJson(path5.join(from.dir, "plugins", "known_marketplaces.json"));
680
+ const haveMarkets = io.readJson(path5.join(to.dir, "plugins", "known_marketplaces.json"));
531
681
  const haveSources = new Set(
532
682
  Object.values(isObject(haveMarkets) ? haveMarkets : {}).map((m) => marketplaceKey(isObject(m) ? m.source : null)).filter((k) => k !== null)
533
683
  );
@@ -538,8 +688,8 @@ function planSetupCopy(from, to, io = realSetupIo) {
538
688
  const args = marketplaceAddArgs(isObject(m) ? m.source : null);
539
689
  if (args) items.push({ kind: "marketplace", name, does: "adds", note: args[3] });
540
690
  }
541
- const enabled = objectAt(io.readJson(path4.join(from.dir, "settings.json")), "enabledPlugins");
542
- const installed = objectAt(io.readJson(path4.join(to.dir, "plugins", "installed_plugins.json")), "plugins");
691
+ const enabled = objectAt(io.readJson(path5.join(from.dir, "settings.json")), "enabledPlugins");
692
+ const installed = objectAt(io.readJson(path5.join(to.dir, "plugins", "installed_plugins.json")), "plugins");
543
693
  for (const [id, on] of Object.entries(enabled))
544
694
  if (on === true && !(id in installed)) items.push({ kind: "plugin", name: id, does: "adds", note: "installed from its marketplace" });
545
695
  const trust = trustToCopy(from, to, io);
@@ -572,14 +722,14 @@ function setupEnv(dir) {
572
722
  return accountDirKey(dir) === accountDirKey(defaultAccountDir()) ? { CLAUDE_CONFIG_DIR: null } : { CLAUDE_CONFIG_DIR: dir };
573
723
  }
574
724
  function mergeSettingsFile(fromFile, toFile) {
575
- const source = JSON.parse(fs4.readFileSync(fromFile, "utf-8"));
725
+ const source = JSON.parse(fs5.readFileSync(fromFile, "utf-8"));
576
726
  if (!isObject(source)) throw new Error("its settings are not an object");
577
- fs4.mkdirSync(path4.dirname(toFile), { recursive: true });
727
+ fs5.mkdirSync(path5.dirname(toFile), { recursive: true });
578
728
  ensureFile(toFile, "{}\n");
579
729
  withFileLockSync(toFile, () => {
580
730
  let target = {};
581
731
  try {
582
- target = JSON.parse(fs4.readFileSync(toFile, "utf-8"));
732
+ target = JSON.parse(fs5.readFileSync(toFile, "utf-8"));
583
733
  } catch {
584
734
  }
585
735
  atomicWriteFile(toFile, `${JSON.stringify(mergeSettings(source, isObject(target) ? target : {}), null, 2)}
@@ -587,12 +737,12 @@ function mergeSettingsFile(fromFile, toFile) {
587
737
  });
588
738
  }
589
739
  function trustFolders(file, folders) {
590
- fs4.mkdirSync(path4.dirname(file), { recursive: true });
740
+ fs5.mkdirSync(path5.dirname(file), { recursive: true });
591
741
  ensureFile(file, "{}\n");
592
742
  withFileLockSync(file, () => {
593
743
  let config;
594
744
  try {
595
- config = JSON.parse(fs4.readFileSync(file, "utf-8"));
745
+ config = JSON.parse(fs5.readFileSync(file, "utf-8"));
596
746
  } catch {
597
747
  throw new Error("its config file can\u2019t be read");
598
748
  }
@@ -604,18 +754,18 @@ async function applySetupCopy(from, to, run = runClaude) {
604
754
  if (accountDirKey(from.dir) === accountDirKey(to.dir)) throw new Error("an account\u2019s setup can\u2019t be copied to itself");
605
755
  const env = setupEnv(to.dir);
606
756
  const servers = userMcpServers(from.dir);
607
- const markets = realSetupIo.readJson(path4.join(from.dir, "plugins", "known_marketplaces.json"));
757
+ const markets = realSetupIo.readJson(path5.join(from.dir, "plugins", "known_marketplaces.json"));
608
758
  const results = [];
609
759
  for (const item of planSetupCopy(from, to)) {
610
760
  try {
611
761
  const rel = item.name.replace(/\/$/, "");
612
762
  if (item.kind === "file") {
613
- fs4.mkdirSync(to.dir, { recursive: true });
614
- fs4.copyFileSync(path4.join(from.dir, rel), path4.join(to.dir, rel));
763
+ fs5.mkdirSync(to.dir, { recursive: true });
764
+ fs5.copyFileSync(path5.join(from.dir, rel), path5.join(to.dir, rel));
615
765
  } else if (item.kind === "folder") {
616
- fs4.cpSync(path4.join(from.dir, rel), path4.join(to.dir, rel), { recursive: true, force: true, verbatimSymlinks: true });
766
+ fs5.cpSync(path5.join(from.dir, rel), path5.join(to.dir, rel), { recursive: true, force: true, verbatimSymlinks: true });
617
767
  } else if (item.kind === "settings") {
618
- mergeSettingsFile(path4.join(from.dir, rel), path4.join(to.dir, rel));
768
+ mergeSettingsFile(path5.join(from.dir, rel), path5.join(to.dir, rel));
619
769
  } else if (item.kind === "mcp") {
620
770
  if (item.does === "replaces") run(["mcp", "remove", item.name, "--scope", "user"], env);
621
771
  const r = run(["mcp", "add-json", item.name, "-", "--scope", "user"], env, JSON.stringify(servers[item.name]));
@@ -645,14 +795,14 @@ async function applySetupCopy(from, to, run = runClaude) {
645
795
  var realTrustIo = {
646
796
  read(file) {
647
797
  try {
648
- return fs5.readFileSync(file, "utf-8");
798
+ return fs6.readFileSync(file, "utf-8");
649
799
  } catch {
650
800
  return null;
651
801
  }
652
802
  },
653
803
  update(file, change) {
654
804
  withFileLockSync(file, () => {
655
- const next = change(fs5.readFileSync(file, "utf-8"));
805
+ const next = change(fs6.readFileSync(file, "utf-8"));
656
806
  if (next !== null) atomicWriteFile(file, next);
657
807
  });
658
808
  }
@@ -680,7 +830,7 @@ function trustedConfigText(text, folders) {
680
830
  ` : null;
681
831
  }
682
832
  function trustFoldersIn(configFile, folders, io = realTrustIo) {
683
- const keys = [...new Set(folders.map((f) => path5.resolve(f)))];
833
+ const keys = [...new Set(folders.map((f) => path6.resolve(f)))];
684
834
  const config = parse(io.read(configFile));
685
835
  if (config === void 0) return [];
686
836
  const missing = keys.filter((f) => !isTrusted(config, f));
@@ -708,19 +858,19 @@ function claudeToolShell(command) {
708
858
  }
709
859
 
710
860
  // src/core/agents/claude/adapter.ts
711
- import path14 from "path";
861
+ import path15 from "path";
712
862
 
713
863
  // src/core/agents/claude/files.ts
714
- import fs6 from "fs";
715
- import path6 from "path";
864
+ import fs7 from "fs";
865
+ import path7 from "path";
716
866
  function listTranscripts(session) {
717
- const dirs = session.isGroup ? [...new Set(session.paths.map((p) => path6.dirname(p)))] : session.paths;
867
+ const dirs = session.isGroup ? [...new Set(session.paths.map((p) => path7.dirname(p)))] : session.paths;
718
868
  const roots = claudeProjectsRoots(sessionAccount(session));
719
869
  const seen = /* @__PURE__ */ new Set();
720
870
  const out = [];
721
871
  for (const d of dirs)
722
872
  for (const root of roots)
723
- for (const f of projectTranscripts(path6.join(root, encodeProjectDir(d)))) {
873
+ for (const f of projectTranscripts(path7.join(root, encodeProjectDir(d)))) {
724
874
  if (seen.has(f.file)) continue;
725
875
  seen.add(f.file);
726
876
  out.push(f);
@@ -731,18 +881,18 @@ function listUsageFiles(session) {
731
881
  const out = [];
732
882
  for (const t of listTranscripts(session)) {
733
883
  out.push(t);
734
- const dir = path6.join(t.file.replace(/\.jsonl$/, ""), "subagents");
884
+ const dir = path7.join(t.file.replace(/\.jsonl$/, ""), "subagents");
735
885
  let names;
736
886
  try {
737
- names = fs6.readdirSync(dir);
887
+ names = fs7.readdirSync(dir);
738
888
  } catch {
739
889
  continue;
740
890
  }
741
891
  for (const name of names) {
742
892
  if (!name.startsWith("agent-") || !name.endsWith(".jsonl")) continue;
743
- const file = path6.join(dir, name);
893
+ const file = path7.join(dir, name);
744
894
  try {
745
- const st = fs6.statSync(file);
895
+ const st = fs7.statSync(file);
746
896
  out.push({ file, mtimeMs: st.mtimeMs, size: st.size });
747
897
  } catch {
748
898
  }
@@ -770,23 +920,23 @@ function whatOf(meta) {
770
920
  function lookForBackgroundWork(session, sinceMs, afterMs, quietFrom = afterMs) {
771
921
  for (const t of listTranscripts(session)) {
772
922
  if (t.mtimeMs < sinceMs - AROUND_TURN_MS) continue;
773
- const dir = path6.join(t.file.replace(/\.jsonl$/, ""), "subagents");
923
+ const dir = path7.join(t.file.replace(/\.jsonl$/, ""), "subagents");
774
924
  let names;
775
925
  try {
776
- names = fs6.readdirSync(dir);
926
+ names = fs7.readdirSync(dir);
777
927
  } catch {
778
928
  continue;
779
929
  }
780
930
  for (const name of names) {
781
931
  if (!name.endsWith(".jsonl")) continue;
782
- const file = path6.join(dir, name);
932
+ const file = path7.join(dir, name);
783
933
  try {
784
- const written = fs6.statSync(file).mtimeMs;
934
+ const written = fs7.statSync(file).mtimeMs;
785
935
  if (written <= quietFrom) continue;
786
936
  const metaFile = file.replace(/\.jsonl$/, ".meta.json");
787
- const startedForTurn = fs6.statSync(metaFile).mtimeMs >= sinceMs - AROUND_TURN_MS;
937
+ const startedForTurn = fs7.statSync(metaFile).mtimeMs >= sinceMs - AROUND_TURN_MS;
788
938
  if (written <= afterMs && !startedForTurn) continue;
789
- const meta = JSON.parse(fs6.readFileSync(metaFile, "utf8"));
939
+ const meta = JSON.parse(fs7.readFileSync(metaFile, "utf8"));
790
940
  if (meta && typeof meta === "object" && meta.requestShape === "background")
791
941
  return { what: whatOf(meta) };
792
942
  } catch {
@@ -797,7 +947,7 @@ function lookForBackgroundWork(session, sinceMs, afterMs, quietFrom = afterMs) {
797
947
  }
798
948
 
799
949
  // src/core/conversations/jsonl.ts
800
- import fs7 from "fs";
950
+ import fs8 from "fs";
801
951
  var TAIL_BYTES = 256 * 1024;
802
952
  function parseLines(text) {
803
953
  const out = [];
@@ -816,15 +966,15 @@ function readJsonlTail(transcriptPath, bytes = TAIL_BYTES) {
816
966
  if (!transcriptPath) return [];
817
967
  let text;
818
968
  try {
819
- const fd = fs7.openSync(transcriptPath, "r");
969
+ const fd = fs8.openSync(transcriptPath, "r");
820
970
  try {
821
- const size = fs7.fstatSync(fd).size;
971
+ const size = fs8.fstatSync(fd).size;
822
972
  const start = Math.max(0, size - bytes);
823
973
  const buf = Buffer.alloc(size - start);
824
- fs7.readSync(fd, buf, 0, buf.length, start);
974
+ fs8.readSync(fd, buf, 0, buf.length, start);
825
975
  text = buf.toString("utf-8");
826
976
  } finally {
827
- fs7.closeSync(fd);
977
+ fs8.closeSync(fd);
828
978
  }
829
979
  } catch {
830
980
  return [];
@@ -838,7 +988,7 @@ async function readJsonlSince(transcriptPath, sinceMs, timeOf, opts = {}) {
838
988
  const max = Math.max(chunk, opts.maxBytes ?? SINCE_MAX_BYTES);
839
989
  let fh;
840
990
  try {
841
- fh = await fs7.promises.open(transcriptPath, "r");
991
+ fh = await fs8.promises.open(transcriptPath, "r");
842
992
  } catch {
843
993
  return { lines: [], partial: false };
844
994
  }
@@ -1053,10 +1203,10 @@ function claudeContextWindow(model, used) {
1053
1203
  }
1054
1204
 
1055
1205
  // src/core/agents/claude/hooks.ts
1056
- import path8 from "path";
1206
+ import path9 from "path";
1057
1207
 
1058
1208
  // src/core/agents/claude/permission.ts
1059
- import path7 from "path";
1209
+ import path8 from "path";
1060
1210
  function pendingToolUse(entries) {
1061
1211
  const answered = /* @__PURE__ */ new Set();
1062
1212
  for (const e of entries) {
@@ -1087,7 +1237,7 @@ var YES_SELECTED_RE = /❯\s*1\.\s*Yes\b/;
1087
1237
  var squash = (s) => s.replace(/[\s\u2500-\u257f]+/g, "");
1088
1238
  function screenAnchor(req) {
1089
1239
  if (req.tool === "Bash" || req.tool === "PowerShell") return squash(req.detail.split(" \u23CE ")[0]).slice(0, 40);
1090
- if (/[\\/]/.test(req.detail) && !/^https?:/.test(req.detail)) return path7.basename(req.detail.replace(/\\/g, "/"));
1240
+ if (/[\\/]/.test(req.detail) && !/^https?:/.test(req.detail)) return path8.basename(req.detail.replace(/\\/g, "/"));
1091
1241
  return "";
1092
1242
  }
1093
1243
  function checkDialog(screen, req) {
@@ -1147,7 +1297,7 @@ function claudeStatusEvent(edge, payload) {
1147
1297
  }
1148
1298
  }
1149
1299
  var toClaude = (h) => ({ owner: h.owner, event: CLAUDE_EVENT[h.edge] });
1150
- var settingsFiles = () => setUpAccounts().map((a) => path8.join(a.dir, "settings.json"));
1300
+ var settingsFiles = () => setUpAccounts().map((a) => path9.join(a.dir, "settings.json"));
1151
1301
  var claudeEvents = {
1152
1302
  removeInstalled: async (hooks) => {
1153
1303
  const inst = await loadInstaller();
@@ -1174,11 +1324,11 @@ var claudeEvents = {
1174
1324
  };
1175
1325
 
1176
1326
  // src/core/agents/claude/session-settings.ts
1177
- import fs8 from "fs";
1178
- import path9 from "path";
1327
+ import fs9 from "fs";
1328
+ import path10 from "path";
1179
1329
  var SESSION_SETTINGS_NAME = "claude-settings.json";
1180
1330
  var SESSION_ALLOW = ["Bash(work child:*)", "Bash(work report:*)"];
1181
- var sessionSettingsPath = () => path9.join(getConfigDir(), SESSION_SETTINGS_NAME);
1331
+ var sessionSettingsPath = () => path10.join(getConfigDir(), SESSION_SETTINGS_NAME);
1182
1332
  function claudeSessionSettings(o) {
1183
1333
  const hooks = {};
1184
1334
  for (const h of SESSION_HOOKS) {
@@ -1206,19 +1356,19 @@ function writeSessionSettings(o = {}) {
1206
1356
  const text = JSON.stringify(claudeSessionSettings({ statusLine, invocation: o.invocation }), null, 2) + "\n";
1207
1357
  let now = null;
1208
1358
  try {
1209
- now = fs8.readFileSync(file, "utf-8");
1359
+ now = fs9.readFileSync(file, "utf-8");
1210
1360
  } catch {
1211
1361
  }
1212
1362
  if (now !== text) {
1213
- fs8.mkdirSync(path9.dirname(file), { recursive: true });
1363
+ fs9.mkdirSync(path10.dirname(file), { recursive: true });
1214
1364
  atomicWriteFile(file, text);
1215
1365
  }
1216
1366
  return file;
1217
1367
  }
1218
- var isOurs = (p) => !!p && path9.basename(p) === SESSION_SETTINGS_NAME;
1368
+ var isOurs = (p) => !!p && path10.basename(p) === SESSION_SETTINGS_NAME;
1219
1369
  function sessionSettingsFile(o = {}) {
1220
1370
  const file = sessionSettingsPath();
1221
- return o.write === false && fs8.existsSync(file) ? file : writeSessionSettings();
1371
+ return o.write === false && fs9.existsSync(file) ? file : writeSessionSettings();
1222
1372
  }
1223
1373
  var startedWithSessionSettings = (commandLine) => commandLine.includes(SESSION_SETTINGS_NAME);
1224
1374
  function withSessionSettings(tool, file = sessionSettingsFile()) {
@@ -1234,9 +1384,9 @@ function withSessionSettings(tool, file = sessionSettingsFile()) {
1234
1384
  }
1235
1385
 
1236
1386
  // src/core/agents/claude/live.ts
1237
- import fs9 from "fs";
1238
- import os4 from "os";
1239
- import path10 from "path";
1387
+ import fs10 from "fs";
1388
+ import os5 from "os";
1389
+ import path11 from "path";
1240
1390
  var isObj = (v) => !!v && typeof v === "object" && !Array.isArray(v);
1241
1391
  function parseLiveClaude(raw) {
1242
1392
  if (!isObj(raw)) return null;
@@ -1266,24 +1416,24 @@ function aliveOnly(list, table, bootMs) {
1266
1416
  var TTL_MS = 5e3;
1267
1417
  var cache = null;
1268
1418
  function claudeSessionsDir() {
1269
- return path10.join(process.env.CLAUDE_CONFIG_DIR || path10.join(os4.homedir(), ".claude"), "sessions");
1419
+ return path11.join(process.env.CLAUDE_CONFIG_DIR || path11.join(os5.homedir(), ".claude"), "sessions");
1270
1420
  }
1271
1421
  function claudeSessionsDirs() {
1272
1422
  const accounts = claudeAccounts();
1273
1423
  if (accounts.length <= 1) return [claudeSessionsDir()];
1274
- return [...new Set(accounts.map((a) => path10.join(a.dir, "sessions")))];
1424
+ return [...new Set(accounts.map((a) => path11.join(a.dir, "sessions")))];
1275
1425
  }
1276
1426
  function readDir(dir, table) {
1277
1427
  let names;
1278
1428
  try {
1279
- names = fs9.readdirSync(dir).filter((n) => /^\d+\.json$/.test(n));
1429
+ names = fs10.readdirSync(dir).filter((n) => /^\d+\.json$/.test(n));
1280
1430
  } catch {
1281
1431
  return [];
1282
1432
  }
1283
1433
  const parsed = [];
1284
1434
  for (const n of names) {
1285
1435
  try {
1286
- const c = parseLiveClaude(JSON.parse(fs9.readFileSync(path10.join(dir, n), "utf8")));
1436
+ const c = parseLiveClaude(JSON.parse(fs10.readFileSync(path11.join(dir, n), "utf8")));
1287
1437
  if (c) parsed.push(c);
1288
1438
  } catch {
1289
1439
  }
@@ -1311,12 +1461,12 @@ var typeThenEnter = async (write, text, wait = (ms) => new Promise((r) => setTim
1311
1461
  };
1312
1462
 
1313
1463
  // src/core/agents/claude/workspace.ts
1314
- import fs10 from "fs";
1315
- import path11 from "path";
1464
+ import fs11 from "fs";
1465
+ import path12 from "path";
1316
1466
  var claudeAllowRule = (r) => `Bash(${r.command}${r.prefix ? ":*" : ""})`;
1317
1467
  var claudeWorkspace = {
1318
1468
  write(dir, { allow, hooks }) {
1319
- fs10.mkdirSync(path11.join(dir, ".claude"), { recursive: true });
1469
+ fs11.mkdirSync(path12.join(dir, ".claude"), { recursive: true });
1320
1470
  const byEvent = {};
1321
1471
  for (const h of hooks) {
1322
1472
  (byEvent[CLAUDE_EVENT[h.edge]] ??= []).push({
@@ -1324,8 +1474,8 @@ var claudeWorkspace = {
1324
1474
  });
1325
1475
  }
1326
1476
  const settings = { permissions: { allow: allow.map(claudeAllowRule) }, hooks: byEvent };
1327
- atomicWriteFile(path11.join(dir, ".claude", "settings.json"), JSON.stringify(settings, null, 2) + "\n");
1328
- return [path11.join(".claude", "settings.json")];
1477
+ atomicWriteFile(path12.join(dir, ".claude", "settings.json"), JSON.stringify(settings, null, 2) + "\n");
1478
+ return [path12.join(".claude", "settings.json")];
1329
1479
  }
1330
1480
  };
1331
1481
 
@@ -1395,9 +1545,9 @@ function installClaudeSkillsFor(dir, run = runClaude2) {
1395
1545
 
1396
1546
  // src/core/agents/claude/usage.ts
1397
1547
  var installer2;
1398
- var loadInstaller2 = async () => installer2 ??= await import("./statusline-Z5HLKDIA.js");
1548
+ var loadInstaller2 = async () => installer2 ??= await import("./statusline-UP2KMHYX.js");
1399
1549
  var asker;
1400
- var loadAsker = async () => asker ??= await import("./usage-ask-V2SIRW4F.js");
1550
+ var loadAsker = async () => asker ??= await import("./usage-ask-5ZWNYLVJ.js");
1401
1551
  function restoreMessage(o, saved = "~/.work/statusline.json") {
1402
1552
  switch (o) {
1403
1553
  case "restored":
@@ -1446,18 +1596,18 @@ var claudeUsage = {
1446
1596
  };
1447
1597
 
1448
1598
  // src/core/agents/claude/account-move.ts
1449
- import fs12 from "fs";
1450
- import path13 from "path";
1599
+ import fs13 from "fs";
1600
+ import path14 from "path";
1451
1601
 
1452
1602
  // src/core/agents/claude/account-admin.ts
1453
- import fs11 from "fs";
1454
- import os5 from "os";
1455
- import path12 from "path";
1603
+ import fs12 from "fs";
1604
+ import os6 from "os";
1605
+ import path13 from "path";
1456
1606
  async function editConfig(fn) {
1457
1607
  const file = getConfigPath();
1458
- if (!fs11.existsSync(file)) throw new AccountAdminError("No configuration yet: run `work init` first.");
1608
+ if (!fs12.existsSync(file)) throw new AccountAdminError("No configuration yet: run `work init` first.");
1459
1609
  return withFileLock(file, () => {
1460
- const raw = JSON.parse(fs11.readFileSync(file, "utf-8"));
1610
+ const raw = JSON.parse(fs12.readFileSync(file, "utf-8"));
1461
1611
  const existing = raw.claudeAccounts;
1462
1612
  const accounts = existing && typeof existing === "object" && !Array.isArray(existing) ? { ...existing } : {};
1463
1613
  const out = fn(raw, accounts);
@@ -1469,14 +1619,14 @@ async function editConfig(fn) {
1469
1619
  }
1470
1620
  var validIn = (raw) => validateClaudeAccounts(raw.claudeAccounts, void 0, accountForbiddenRoots(raw)).accounts ?? {};
1471
1621
  async function addAccount(name, dir) {
1472
- const folder = expandAccountDir(dir?.trim() || path12.join(os5.homedir(), `.claude-${name}`));
1622
+ const folder = expandAccountDir(dir?.trim() || path13.join(os6.homedir(), `.claude-${name}`));
1473
1623
  if (!folder) throw new AccountAdminError(`${dir} is not an absolute folder`);
1474
1624
  return editConfig((raw, accounts) => {
1475
1625
  if (name in accounts) throw new AccountAdminError(`there is already an account \u201C${name}\u201D`);
1476
1626
  const problem = accountProblem(name, folder, Object.values(validIn(raw)), accountForbiddenRoots(raw));
1477
1627
  if (problem) throw new AccountAdminError(problem);
1478
1628
  try {
1479
- fs11.mkdirSync(folder, { recursive: true });
1629
+ fs12.mkdirSync(folder, { recursive: true });
1480
1630
  } catch (e) {
1481
1631
  throw new AccountAdminError(`couldn't make ${folder}: ${e instanceof Error ? e.message : String(e)}`);
1482
1632
  }
@@ -1553,14 +1703,14 @@ var AccountMoveError = class extends Error {
1553
1703
  };
1554
1704
  var isDir = (p) => {
1555
1705
  try {
1556
- return fs12.statSync(p).isDirectory();
1706
+ return fs13.statSync(p).isDirectory();
1557
1707
  } catch {
1558
1708
  return false;
1559
1709
  }
1560
1710
  };
1561
1711
  var exists = (p) => {
1562
1712
  try {
1563
- fs12.lstatSync(p);
1713
+ fs13.lstatSync(p);
1564
1714
  return true;
1565
1715
  } catch {
1566
1716
  return false;
@@ -1568,31 +1718,31 @@ var exists = (p) => {
1568
1718
  };
1569
1719
  var mtime = (p) => {
1570
1720
  try {
1571
- return fs12.statSync(p).mtimeMs;
1721
+ return fs13.statSync(p).mtimeMs;
1572
1722
  } catch {
1573
1723
  return 0;
1574
1724
  }
1575
1725
  };
1576
1726
  function moveEntry(from, to) {
1577
- fs12.mkdirSync(path13.dirname(to), { recursive: true });
1727
+ fs13.mkdirSync(path14.dirname(to), { recursive: true });
1578
1728
  try {
1579
- fs12.renameSync(from, to);
1729
+ fs13.renameSync(from, to);
1580
1730
  return;
1581
1731
  } catch (err) {
1582
1732
  const code = err.code;
1583
1733
  if (code !== "EXDEV" && code !== "EPERM") throw err;
1584
1734
  }
1585
1735
  try {
1586
- fs12.cpSync(from, to, { recursive: true, errorOnExist: true, force: false, preserveTimestamps: true });
1736
+ fs13.cpSync(from, to, { recursive: true, errorOnExist: true, force: false, preserveTimestamps: true });
1587
1737
  } catch (err) {
1588
- fs12.rmSync(to, { recursive: true, force: true });
1738
+ fs13.rmSync(to, { recursive: true, force: true });
1589
1739
  throw err;
1590
1740
  }
1591
1741
  try {
1592
- fs12.rmSync(from, { recursive: true, force: true });
1742
+ fs13.rmSync(from, { recursive: true, force: true });
1593
1743
  } catch (err) {
1594
1744
  try {
1595
- fs12.cpSync(to, from, { recursive: true, force: false, errorOnExist: false, preserveTimestamps: true });
1745
+ fs13.cpSync(to, from, { recursive: true, force: false, errorOnExist: false, preserveTimestamps: true });
1596
1746
  } catch (back) {
1597
1747
  const why = (e) => e instanceof Error ? e.message : String(e);
1598
1748
  throw new Error(`${why(err)}; what its delete took couldn't be put back (${why(back)}), so it is kept at ${to} too`, {
@@ -1600,7 +1750,7 @@ function moveEntry(from, to) {
1600
1750
  });
1601
1751
  }
1602
1752
  try {
1603
- fs12.rmSync(to, { recursive: true, force: true });
1753
+ fs13.rmSync(to, { recursive: true, force: true });
1604
1754
  } catch {
1605
1755
  }
1606
1756
  throw err;
@@ -1619,9 +1769,9 @@ function mergeInto(src, dst, tag, steps, moved) {
1619
1769
  return;
1620
1770
  }
1621
1771
  if (isDir(src) && isDir(dst)) {
1622
- for (const name of fs12.readdirSync(src)) mergeInto(path13.join(src, name), path13.join(dst, name), tag, steps, moved);
1772
+ for (const name of fs13.readdirSync(src)) mergeInto(path14.join(src, name), path14.join(dst, name), tag, steps, moved);
1623
1773
  try {
1624
- fs12.rmdirSync(src);
1774
+ fs13.rmdirSync(src);
1625
1775
  } catch {
1626
1776
  }
1627
1777
  return;
@@ -1655,32 +1805,32 @@ function undo(steps) {
1655
1805
  }
1656
1806
  function latestConversation(dir) {
1657
1807
  let best = null;
1658
- for (const name of fs12.readdirSync(dir)) {
1808
+ for (const name of fs13.readdirSync(dir)) {
1659
1809
  if (!name.endsWith(".jsonl")) continue;
1660
- const at = mtime(path13.join(dir, name));
1810
+ const at = mtime(path14.join(dir, name));
1661
1811
  if (!best || at > best.at) best = { name, at };
1662
1812
  }
1663
1813
  if (!best) return [];
1664
1814
  const id = best.name.slice(0, -".jsonl".length);
1665
- return [best.name, ...isDir(path13.join(dir, id)) ? [id] : []];
1815
+ return [best.name, ...isDir(path14.join(dir, id)) ? [id] : []];
1666
1816
  }
1667
1817
  function moveConversations(session, fromDir, toDir, tag = "old", opts = {}) {
1668
1818
  const steps = [];
1669
1819
  const moved = [];
1670
- if (path13.resolve(fromDir) === path13.resolve(toDir)) return { moved };
1820
+ if (path14.resolve(fromDir) === path14.resolve(toDir)) return { moved };
1671
1821
  const emptied = [];
1672
1822
  let at = "";
1673
1823
  try {
1674
1824
  for (const cwd of sessionRunFolders(session, false)) {
1675
1825
  const name = encodeProjectDir(cwd);
1676
- const src = path13.join(projectsRootOf(fromDir), name);
1826
+ const src = path14.join(projectsRootOf(fromDir), name);
1677
1827
  if (!isDir(src)) continue;
1678
1828
  at = src;
1679
- const dst = path13.join(projectsRootOf(toDir), name);
1829
+ const dst = path14.join(projectsRootOf(toDir), name);
1680
1830
  if (opts.onlyLatest) {
1681
1831
  for (const entry of latestConversation(src)) {
1682
- at = path13.join(src, entry);
1683
- mergeInto(path13.join(src, entry), path13.join(dst, entry), tag, steps, moved);
1832
+ at = path14.join(src, entry);
1833
+ mergeInto(path14.join(src, entry), path14.join(dst, entry), tag, steps, moved);
1684
1834
  }
1685
1835
  continue;
1686
1836
  }
@@ -1699,7 +1849,7 @@ function moveConversations(session, fromDir, toDir, tag = "old", opts = {}) {
1699
1849
  }
1700
1850
  for (const src of emptied) {
1701
1851
  try {
1702
- fs12.rmdirSync(src);
1852
+ fs13.rmdirSync(src);
1703
1853
  } catch {
1704
1854
  }
1705
1855
  }
@@ -1747,12 +1897,8 @@ var claudeAgent = {
1747
1897
  startedWithSessionHooks: startedWithSessionSettings,
1748
1898
  // Its folder marked trusted on the session's account (`projects[<cwd>].hasTrustDialogAccepted`).
1749
1899
  trustFolder: (s, cwd) => void trustSessionFolder(s, cwd),
1750
- // `--add-dir <folder>` each, never twice (a restore's stored tool may have them already).
1751
- withFolders: (tool, folders) => {
1752
- const have = new Set(tool.baseArgs.flatMap((a, i) => tool.baseArgs[i - 1] === "--add-dir" ? [a] : []));
1753
- const add = folders.filter((f) => !have.has(f));
1754
- return add.length ? { ...tool, baseArgs: [...tool.baseArgs, ...add.flatMap((f) => ["--add-dir", f])] } : tool;
1755
- }
1900
+ // `--add-dir=<folder>` each, one argument, never twice (a restore's stored tool may have them already).
1901
+ withFolders: (tool, folders) => claudeWithFolders(tool, folders)
1756
1902
  },
1757
1903
  conversation: {
1758
1904
  files: (s) => listTranscripts(s),
@@ -1776,8 +1922,8 @@ var claudeAgent = {
1776
1922
  prLinks: claudePrLinks,
1777
1923
  // In the session's own account's projects folder: that is where its `--continue` looks.
1778
1924
  restoreDir: (s) => {
1779
- const cwd = s.isGroup && s.paths[0] ? path14.dirname(s.paths[0]) : s.paths[0];
1780
- return cwd ? path14.join(projectsRootOf(accountDir(sessionAccount(s)) ?? void 0), encodeProjectDir(cwd)) : null;
1925
+ const cwd = s.isGroup && s.paths[0] ? path15.dirname(s.paths[0]) : s.paths[0];
1926
+ return cwd ? path15.join(projectsRootOf(accountDir(sessionAccount(s)) ?? void 0), encodeProjectDir(cwd)) : null;
1781
1927
  }
1782
1928
  },
1783
1929
  events: claudeEvents,
@@ -1808,7 +1954,7 @@ var claudeAgent = {
1808
1954
  denyRules: (repos) => claudeReadDenyRules(repos),
1809
1955
  // Its flags were measured on one Claude Code (READ_ONLY_MIN_VERSION): an older one gets no checkout run.
1810
1956
  // Loaded when a review asks: the hook processes load this adapter on every turn edge.
1811
- available: async () => (await import("./version-RJ4PCHPB.js")).claudeReadOnlyAvailable()
1957
+ available: async () => (await import("./version-VT2JXBQT.js")).claudeReadOnlyAvailable()
1812
1958
  }
1813
1959
  },
1814
1960
  instructionsFile: "CLAUDE.md",
@@ -1816,9 +1962,42 @@ var claudeAgent = {
1816
1962
  instructionsImport: (relPath) => `@${relPath}`,
1817
1963
  workspace: claudeWorkspace,
1818
1964
  skills: claudeSkills,
1965
+ // Claude Code kept up to date the way it was installed (tool-update.ts).
1966
+ selfUpdate: {
1967
+ enabled: (config) => config?.claudeCode?.autoUpdate !== false,
1968
+ run: async () => {
1969
+ const r = await keepClaudeUpdated();
1970
+ return {
1971
+ text: updateCheckText(r),
1972
+ failed: r.kind === "cannot" || r.kind === "not-yet" && r.why.startsWith("the update failed"),
1973
+ updated: r.kind === "updated"
1974
+ };
1975
+ }
1976
+ },
1819
1977
  usage: claudeUsage,
1820
1978
  accounts: claudeAccountSwitch
1821
1979
  };
1980
+ function claudeWithFolders(tool, folders) {
1981
+ if (!folders.length) return tool;
1982
+ const ours = new Set(folders);
1983
+ const args = [];
1984
+ const have = /* @__PURE__ */ new Set();
1985
+ for (let i = 0; i < tool.baseArgs.length; i++) {
1986
+ const a = tool.baseArgs[i];
1987
+ const next = tool.baseArgs[i + 1];
1988
+ if (a === "--add-dir" && next !== void 0 && ours.has(next)) {
1989
+ args.push(`--add-dir=${next}`);
1990
+ have.add(next);
1991
+ i++;
1992
+ continue;
1993
+ }
1994
+ if (a.startsWith("--add-dir=")) have.add(a.slice("--add-dir=".length));
1995
+ args.push(a);
1996
+ }
1997
+ const add = folders.filter((f) => !have.has(f));
1998
+ const changed = add.length || args.length !== tool.baseArgs.length;
1999
+ return changed ? { ...tool, baseArgs: [...args, ...add.map((f) => `--add-dir=${f}`)] } : tool;
2000
+ }
1822
2001
 
1823
2002
  // src/core/agents/index.ts
1824
2003
  var settingsView = configView((p) => {
@@ -1847,7 +2026,7 @@ function plainAgent(id) {
1847
2026
  launch: {
1848
2027
  tool: (config) => getAiTool(config && getAiTool(config).cmd === id ? config : { aiCommand: id }),
1849
2028
  canResume: () => false,
1850
- resumeLaunch: (s) => ({ launchPath: s.isGroup ? path15.dirname(s.paths[0] ?? "") : s.paths[0] ?? "", hasConversation: false }),
2029
+ resumeLaunch: (s) => ({ launchPath: s.isGroup ? path16.dirname(s.paths[0] ?? "") : s.paths[0] ?? "", hasConversation: false }),
1851
2030
  cleanEnv: (env) => ({ ...env })
1852
2031
  },
1853
2032
  // Text, a pause, Enter — and no dialog to answer by keystroke (its screen is unknown).
@@ -1922,20 +2101,20 @@ function agentFor(config, session) {
1922
2101
  }
1923
2102
 
1924
2103
  // src/core/platform/package-root.ts
1925
- import fs13 from "fs";
1926
- import path16 from "path";
2104
+ import fs14 from "fs";
2105
+ import path17 from "path";
1927
2106
  import { fileURLToPath } from "url";
1928
2107
  var cached;
1929
2108
  function packageRoot() {
1930
2109
  if (cached !== void 0) return cached;
1931
- let dir = path16.dirname(fileURLToPath(import.meta.url));
2110
+ let dir = path17.dirname(fileURLToPath(import.meta.url));
1932
2111
  for (; ; ) {
1933
2112
  try {
1934
- const pkg = JSON.parse(fs13.readFileSync(path16.join(dir, "package.json"), "utf8"));
2113
+ const pkg = JSON.parse(fs14.readFileSync(path17.join(dir, "package.json"), "utf8"));
1935
2114
  if (pkg.name === "@moberg_hr/work-tree") return cached = dir;
1936
2115
  } catch {
1937
2116
  }
1938
- const up = path16.dirname(dir);
2117
+ const up = path17.dirname(dir);
1939
2118
  if (up === dir) return cached = null;
1940
2119
  dir = up;
1941
2120
  }
@@ -1973,4 +2152,4 @@ export {
1973
2152
  agentFor,
1974
2153
  packageRoot
1975
2154
  };
1976
- //# sourceMappingURL=chunk-NWKVTUTN.js.map
2155
+ //# sourceMappingURL=chunk-3PO2LUY7.js.map