@moberg_hr/work-tree 2.10.0 → 2.11.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 (285) hide show
  1. package/dist/{account-QSNXX5YV.js → account-Q5Y3YKI7.js} +21 -21
  2. package/dist/{add-repo-YZ32MLZG.js → add-repo-L4ZTGBLO.js} +17 -17
  3. package/dist/{answer-Y4T5X446.js → answer-GNR4ZBWV.js} +12 -12
  4. package/dist/{attach-XPYWYHDP.js → attach-QNSDKRW7.js} +19 -19
  5. package/dist/bin.js +5 -5
  6. package/dist/{block-JVAGG5QA.js → block-3YUIMA62.js} +15 -16
  7. package/dist/{block-JVAGG5QA.js.map → block-3YUIMA62.js.map} +1 -1
  8. package/dist/{broadcast-FATIANHX.js → broadcast-DR3JFINO.js} +10 -10
  9. package/dist/{catchup-OTI2KZG5.js → catchup-YG2UOZBL.js} +15 -15
  10. package/dist/{chunk-RHDZPV6C.js → chunk-246OTVRR.js} +2 -2
  11. package/dist/{chunk-VV3NFLLP.js → chunk-26YZYL77.js} +3 -3
  12. package/dist/{chunk-IKX3B26P.js → chunk-2KN5ECHJ.js} +4 -4
  13. package/dist/{chunk-V4U5RGEG.js → chunk-2QLLPZ2L.js} +2 -2
  14. package/dist/{chunk-E67DOUVU.js → chunk-2ZQRD73B.js} +102 -15
  15. package/dist/chunk-2ZQRD73B.js.map +1 -0
  16. package/dist/{chunk-ZRATYLBB.js → chunk-33XSEAHO.js} +2 -2
  17. package/dist/{chunk-MM7344RC.js → chunk-4CNBSPNL.js} +2 -2
  18. package/dist/chunk-5PAMO6OG.js +9 -0
  19. package/dist/{chunk-3BSFVKMK.js → chunk-7DUGVGUZ.js} +2 -2
  20. package/dist/{chunk-6J6U7JXN.js → chunk-7NNGYM3G.js} +3 -3
  21. package/dist/{chunk-UP2JTDBI.js → chunk-7NNOGTMC.js} +3 -3
  22. package/dist/{chunk-IOHK45WE.js → chunk-7OFVXQSM.js} +2 -2
  23. package/dist/{chunk-PHGVVFTF.js → chunk-7RHC5U7X.js} +108 -133
  24. package/dist/chunk-7RHC5U7X.js.map +1 -0
  25. package/dist/{chunk-RJUMLWXP.js → chunk-B6MWNZCN.js} +114 -18
  26. package/dist/chunk-B6MWNZCN.js.map +1 -0
  27. package/dist/{chunk-FMLE2WSN.js → chunk-BLGCU4HT.js} +2 -2
  28. package/dist/{chunk-RCGFHJM7.js → chunk-CBCOVIXZ.js} +2 -2
  29. package/dist/{chunk-3S6L437Q.js → chunk-CDYCZ3PR.js} +4 -4
  30. package/dist/{chunk-6YMLYU5G.js → chunk-CR4LUAP4.js} +7 -7
  31. package/dist/{chunk-ZXHMC7UO.js → chunk-D2J3AD6L.js} +3 -5
  32. package/dist/chunk-D2J3AD6L.js.map +1 -0
  33. package/dist/{chunk-ICXUTMGH.js → chunk-DGVCN7HB.js} +2 -2
  34. package/dist/{chunk-B5WDN63X.js → chunk-DMGNJ73M.js} +2 -2
  35. package/dist/{chunk-353ZINJ2.js → chunk-DYQQLUSB.js} +3 -3
  36. package/dist/{chunk-AHI2WVWP.js → chunk-DZ4LX2EK.js} +8 -8
  37. package/dist/{chunk-IFQOOCT7.js → chunk-EDIHBLZY.js} +46 -24
  38. package/dist/chunk-EDIHBLZY.js.map +1 -0
  39. package/dist/{chunk-2K5TDJ7M.js → chunk-F2CDUWZU.js} +5 -5
  40. package/dist/{chunk-TIG7NHVO.js → chunk-F2NOCGMA.js} +18 -6
  41. package/dist/chunk-F2NOCGMA.js.map +1 -0
  42. package/dist/chunk-FGPXMAYU.js +25 -0
  43. package/dist/chunk-FGPXMAYU.js.map +1 -0
  44. package/dist/{chunk-FKM67CZZ.js → chunk-FLHMFRZB.js} +7 -9
  45. package/dist/{chunk-FKM67CZZ.js.map → chunk-FLHMFRZB.js.map} +1 -1
  46. package/dist/{chunk-F3PEUOTP.js → chunk-FR7B7QH6.js} +2 -2
  47. package/dist/{chunk-WVV54JP3.js → chunk-G4QUJO7W.js} +53 -53
  48. package/dist/{chunk-BNKVENDF.js → chunk-G4ZR5YZL.js} +5 -5
  49. package/dist/{chunk-ADIN3DTD.js → chunk-GG4VKPAX.js} +2 -2
  50. package/dist/{chunk-WKOJ7NXD.js → chunk-GZNF6762.js} +4 -4
  51. package/dist/{chunk-66VPQOVZ.js → chunk-H3LP3Z4U.js} +13 -10
  52. package/dist/chunk-H3LP3Z4U.js.map +1 -0
  53. package/dist/{chunk-E7WPTSHQ.js → chunk-HJKYE57I.js} +11 -11
  54. package/dist/{chunk-KL4YYV37.js → chunk-I5FZXDCO.js} +4 -4
  55. package/dist/{chunk-LKESANVD.js → chunk-IQ4MITHC.js} +2 -2
  56. package/dist/{chunk-NWOCQVSL.js → chunk-J3GEINBH.js} +7 -7
  57. package/dist/{chunk-LJKF73JB.js → chunk-JCFCEJ2D.js} +3 -3
  58. package/dist/{chunk-Z6ZMWFNV.js → chunk-JF25PSYF.js} +6 -8
  59. package/dist/{chunk-Z6ZMWFNV.js.map → chunk-JF25PSYF.js.map} +1 -1
  60. package/dist/{chunk-OCMNBOPX.js → chunk-JVHHSKBJ.js} +2 -2
  61. package/dist/{chunk-KDO7D46L.js → chunk-LHM3GB5K.js} +3 -3
  62. package/dist/{chunk-PSUJZUYX.js → chunk-LM2T5OR3.js} +3 -2
  63. package/dist/{chunk-5R5JEQW7.js → chunk-LQNHIMJM.js} +12 -12
  64. package/dist/{chunk-UBOKRHNV.js → chunk-MKJH2D4V.js} +2 -2
  65. package/dist/{chunk-4TTYEMOY.js → chunk-MXOHW4U2.js} +14 -7
  66. package/dist/chunk-MXOHW4U2.js.map +1 -0
  67. package/dist/{chunk-Z7I6DQAR.js → chunk-N4W34U3I.js} +42 -9
  68. package/dist/chunk-N4W34U3I.js.map +1 -0
  69. package/dist/{chunk-PCNNW63Z.js → chunk-NFWSJFYY.js} +2 -2
  70. package/dist/{chunk-2MAZV5KS.js → chunk-O5ZJY5BT.js} +16 -3
  71. package/dist/chunk-O5ZJY5BT.js.map +1 -0
  72. package/dist/{chunk-JVBIWU7S.js → chunk-OY46QHLX.js} +3 -3
  73. package/dist/{chunk-GZGJQKQT.js → chunk-PKQROEFP.js} +2 -2
  74. package/dist/{chunk-2HHIDWHH.js → chunk-QBI6K23L.js} +7 -7
  75. package/dist/{chunk-3XG23PLG.js → chunk-QLFJNYBV.js} +3 -3
  76. package/dist/{chunk-IDQVTWLX.js → chunk-R5JCCRGD.js} +5 -5
  77. package/dist/{chunk-Y7T73SAP.js → chunk-RUYTU2WJ.js} +7 -3
  78. package/dist/chunk-RUYTU2WJ.js.map +1 -0
  79. package/dist/{chunk-VFH4SU3M.js → chunk-SPP7MA3D.js} +9 -9
  80. package/dist/{chunk-46XSWHCQ.js → chunk-TEL27NRC.js} +5 -4
  81. package/dist/chunk-TEL27NRC.js.map +1 -0
  82. package/dist/{chunk-TKWUSJNQ.js → chunk-TEVCBUEN.js} +7 -9
  83. package/dist/{chunk-TKWUSJNQ.js.map → chunk-TEVCBUEN.js.map} +1 -1
  84. package/dist/{chunk-FSQJOZS4.js → chunk-URGHBFB3.js} +9 -9
  85. package/dist/{chunk-2VRZVUM7.js → chunk-VAMLU5VH.js} +6 -6
  86. package/dist/{chunk-4O4VQQEA.js → chunk-VJ5XMYXE.js} +3 -3
  87. package/dist/{chunk-JNCKZ3OF.js → chunk-VRQKIIC2.js} +4 -4
  88. package/dist/{chunk-34E2LA3M.js → chunk-W7MGB3Q2.js} +5 -5
  89. package/dist/{chunk-V7GCYL6A.js → chunk-X3RHLYGI.js} +6 -6
  90. package/dist/{chunk-RQFHA5BM.js → chunk-YKQLHFY4.js} +43 -8
  91. package/dist/chunk-YKQLHFY4.js.map +1 -0
  92. package/dist/{chunk-WY7QZ2P7.js → chunk-YPXFDJ76.js} +2 -2
  93. package/dist/{chunk-LZZCJAJQ.js → chunk-YQBBFX7D.js} +7 -7
  94. package/dist/{chunk-27LWL6QE.js → chunk-ZG2M4ECW.js} +464 -12
  95. package/dist/chunk-ZG2M4ECW.js.map +1 -0
  96. package/dist/{cleanup-M5TY4FQS.js → cleanup-X7G66SPY.js} +35 -35
  97. package/dist/{cli-446A536X.js → cli-RJVX6HVT.js} +5 -5
  98. package/dist/{command-hook-installer-7Q7UD7AU.js → command-hook-installer-GMQ4IVDE.js} +3 -3
  99. package/dist/{config-JLORGUXN.js → config-ZBU5PHMG.js} +11 -11
  100. package/dist/{diff-4O5HXNZ7.js → diff-ADSD4SNQ.js} +12 -12
  101. package/dist/{digest-IAAZXJCC.js → digest-ORN6JFNE.js} +11 -11
  102. package/dist/{fork-ULJYPEKY.js → fork-VWHAU76U.js} +32 -32
  103. package/dist/{history-JFZF22M7.js → history-PP7RHA2V.js} +9 -9
  104. package/dist/{hook-UYOIQVJ7.js → hook-6AL5LIQO.js} +17 -17
  105. package/dist/{hydrate-DROI4RJ7.js → hydrate-JW5MIWLZ.js} +10 -10
  106. package/dist/{init-FF75CQM7.js → init-SIIKJF3K.js} +16 -16
  107. package/dist/{install-skills-XSAHNBYD.js → install-skills-KS6N4U6L.js} +8 -8
  108. package/dist/install-skills-bin.js +7 -7
  109. package/dist/{list-5FEHBP6N.js → list-UTQF7KHP.js} +9 -9
  110. package/dist/{move-422L6PPI.js → move-P6WOVUGF.js} +20 -20
  111. package/dist/{note-AAXPD5VA.js → note-GEFCZKMT.js} +13 -13
  112. package/dist/{overlaps-WPNUYOFF.js → overlaps-QMI2RJSG.js} +16 -16
  113. package/dist/{pin-QXPF23BB.js → pin-ZALBX2XK.js} +13 -13
  114. package/dist/{pr-QLGXPKPQ.js → pr-D3EZ7C5H.js} +24 -24
  115. package/dist/{prune-GRHKRRVT.js → prune-ZCOBL7IB.js} +33 -33
  116. package/dist/{pty-host-XDDXA4SL.js → pty-host-UCM6GV42.js} +16 -16
  117. package/dist/{read-YWKD2DGP.js → read-NHRSGZI4.js} +12 -12
  118. package/dist/{recent-SI5BDVVH.js → recent-V4JVL4Y2.js} +17 -17
  119. package/dist/{remove-RXXCHY44.js → remove-YNO2I3HR.js} +32 -32
  120. package/dist/{restart-CPNDEXU6.js → restart-6YKAD7QQ.js} +12 -12
  121. package/dist/{resume-BLP4TTJK.js → resume-PNZ7BRXJ.js} +17 -17
  122. package/dist/{review-now-ADWZPELT.js → review-now-HHQIBVUS.js} +5 -5
  123. package/dist/{run-JFCDJ3EV.js → run-3QYP7GBN.js} +9 -9
  124. package/dist/{screen-LBOPAUXV.js → screen-I6N6FKMF.js} +12 -12
  125. package/dist/{search-AMEGRH24.js → search-MLLK3ZCW.js} +9 -9
  126. package/dist/{section-73Z34PVE.js → section-EQOZ36FS.js} +13 -13
  127. package/dist/{send-IZBSEET5.js → send-LET73FB6.js} +13 -13
  128. package/dist/{sessions-WVQ2U2W4.js → sessions-MDOJJZCK.js} +28 -28
  129. package/dist/{snooze-7IBHY5MY.js → snooze-TNA7QTXS.js} +12 -12
  130. package/dist/{start-AU62TW6M.js → start-OV6LZJ2V.js} +12 -12
  131. package/dist/{state-IZV7DAPL.js → state-BR43ONIH.js} +15 -6
  132. package/dist/state-BR43ONIH.js.map +1 -0
  133. package/dist/{status-Z7OMNYZX.js → status-HDDGCX4J.js} +14 -14
  134. package/dist/{statusline-VJFY7ZAB.js → statusline-WKKYCH7O.js} +5 -5
  135. package/dist/{statusline-hook-JA7MNE5H.js → statusline-hook-K7KPN2H6.js} +3 -3
  136. package/dist/{stop-PWNXSFBD.js → stop-3TJWZBJB.js} +12 -12
  137. package/dist/{sync-2BTZVDDG.js → sync-67AOBEYR.js} +33 -33
  138. package/dist/{time-CTCIAXIY.js → time-F6SLY6HR.js} +14 -14
  139. package/dist/{time-actions-UYBOXET6.js → time-actions-YOXF5WC7.js} +5 -5
  140. package/dist/{timesheet-BUFQ34FC.js → timesheet-QUEDQSJ2.js} +16 -16
  141. package/dist/{todo-2R7VID57.js → todo-TALKJYK6.js} +5 -5
  142. package/dist/{tree-LQDPAXQA.js → tree-FOOQBNVW.js} +32 -33
  143. package/dist/{tree-LQDPAXQA.js.map → tree-FOOQBNVW.js.map} +1 -1
  144. package/dist/{update-2IYJHY7H.js → update-5O3I5P4N.js} +19 -19
  145. package/dist/{usage-IR5GNF4R.js → usage-DVKHDT5J.js} +11 -11
  146. package/dist/{version-ONEI52TI.js → version-TVT6GSRF.js} +5 -5
  147. package/dist/{wait-6DH34L53.js → wait-5HZZPKNM.js} +13 -13
  148. package/dist/wd-bin.js +4 -4
  149. package/dist/web/assets/{PtyView-kBcAOwHr.js → PtyView-DIGlBtjg.js} +2 -2
  150. package/dist/web/assets/{PtyView-kBcAOwHr.js.map → PtyView-DIGlBtjg.js.map} +1 -1
  151. package/dist/web/assets/index-CpqiTeqj.css +1 -0
  152. package/dist/web/assets/index-Cx0PMo6D.js +126 -0
  153. package/dist/web/assets/index-Cx0PMo6D.js.map +1 -0
  154. package/dist/web/index.html +2 -2
  155. package/dist/{web-RIHGV7YY.js → web-T7UPV3QY.js} +3713 -2712
  156. package/dist/web-T7UPV3QY.js.map +1 -0
  157. package/npm-shrinkwrap.json +2 -2
  158. package/package.json +1 -1
  159. package/dist/chunk-27LWL6QE.js.map +0 -1
  160. package/dist/chunk-2MAZV5KS.js.map +0 -1
  161. package/dist/chunk-46XSWHCQ.js.map +0 -1
  162. package/dist/chunk-4TTYEMOY.js.map +0 -1
  163. package/dist/chunk-66VPQOVZ.js.map +0 -1
  164. package/dist/chunk-7S2NQRWL.js +0 -9
  165. package/dist/chunk-AQP6SCCJ.js +0 -66
  166. package/dist/chunk-AQP6SCCJ.js.map +0 -1
  167. package/dist/chunk-E67DOUVU.js.map +0 -1
  168. package/dist/chunk-IFQOOCT7.js.map +0 -1
  169. package/dist/chunk-L22AWXWA.js +0 -29
  170. package/dist/chunk-L22AWXWA.js.map +0 -1
  171. package/dist/chunk-PHGVVFTF.js.map +0 -1
  172. package/dist/chunk-RJUMLWXP.js.map +0 -1
  173. package/dist/chunk-RQFHA5BM.js.map +0 -1
  174. package/dist/chunk-TIG7NHVO.js.map +0 -1
  175. package/dist/chunk-Y7T73SAP.js.map +0 -1
  176. package/dist/chunk-Z7I6DQAR.js.map +0 -1
  177. package/dist/chunk-ZXHMC7UO.js.map +0 -1
  178. package/dist/state-IZV7DAPL.js.map +0 -1
  179. package/dist/web/assets/index-BgfR3N99.js +0 -124
  180. package/dist/web/assets/index-BgfR3N99.js.map +0 -1
  181. package/dist/web/assets/index-CKpHjII8.css +0 -1
  182. package/dist/web-RIHGV7YY.js.map +0 -1
  183. /package/dist/{account-QSNXX5YV.js.map → account-Q5Y3YKI7.js.map} +0 -0
  184. /package/dist/{add-repo-YZ32MLZG.js.map → add-repo-L4ZTGBLO.js.map} +0 -0
  185. /package/dist/{answer-Y4T5X446.js.map → answer-GNR4ZBWV.js.map} +0 -0
  186. /package/dist/{attach-XPYWYHDP.js.map → attach-QNSDKRW7.js.map} +0 -0
  187. /package/dist/{broadcast-FATIANHX.js.map → broadcast-DR3JFINO.js.map} +0 -0
  188. /package/dist/{catchup-OTI2KZG5.js.map → catchup-YG2UOZBL.js.map} +0 -0
  189. /package/dist/{chunk-RHDZPV6C.js.map → chunk-246OTVRR.js.map} +0 -0
  190. /package/dist/{chunk-VV3NFLLP.js.map → chunk-26YZYL77.js.map} +0 -0
  191. /package/dist/{chunk-IKX3B26P.js.map → chunk-2KN5ECHJ.js.map} +0 -0
  192. /package/dist/{chunk-V4U5RGEG.js.map → chunk-2QLLPZ2L.js.map} +0 -0
  193. /package/dist/{chunk-ZRATYLBB.js.map → chunk-33XSEAHO.js.map} +0 -0
  194. /package/dist/{chunk-MM7344RC.js.map → chunk-4CNBSPNL.js.map} +0 -0
  195. /package/dist/{chunk-7S2NQRWL.js.map → chunk-5PAMO6OG.js.map} +0 -0
  196. /package/dist/{chunk-3BSFVKMK.js.map → chunk-7DUGVGUZ.js.map} +0 -0
  197. /package/dist/{chunk-6J6U7JXN.js.map → chunk-7NNGYM3G.js.map} +0 -0
  198. /package/dist/{chunk-UP2JTDBI.js.map → chunk-7NNOGTMC.js.map} +0 -0
  199. /package/dist/{chunk-IOHK45WE.js.map → chunk-7OFVXQSM.js.map} +0 -0
  200. /package/dist/{chunk-FMLE2WSN.js.map → chunk-BLGCU4HT.js.map} +0 -0
  201. /package/dist/{chunk-RCGFHJM7.js.map → chunk-CBCOVIXZ.js.map} +0 -0
  202. /package/dist/{chunk-3S6L437Q.js.map → chunk-CDYCZ3PR.js.map} +0 -0
  203. /package/dist/{chunk-6YMLYU5G.js.map → chunk-CR4LUAP4.js.map} +0 -0
  204. /package/dist/{chunk-ICXUTMGH.js.map → chunk-DGVCN7HB.js.map} +0 -0
  205. /package/dist/{chunk-B5WDN63X.js.map → chunk-DMGNJ73M.js.map} +0 -0
  206. /package/dist/{chunk-353ZINJ2.js.map → chunk-DYQQLUSB.js.map} +0 -0
  207. /package/dist/{chunk-AHI2WVWP.js.map → chunk-DZ4LX2EK.js.map} +0 -0
  208. /package/dist/{chunk-2K5TDJ7M.js.map → chunk-F2CDUWZU.js.map} +0 -0
  209. /package/dist/{chunk-F3PEUOTP.js.map → chunk-FR7B7QH6.js.map} +0 -0
  210. /package/dist/{chunk-WVV54JP3.js.map → chunk-G4QUJO7W.js.map} +0 -0
  211. /package/dist/{chunk-BNKVENDF.js.map → chunk-G4ZR5YZL.js.map} +0 -0
  212. /package/dist/{chunk-ADIN3DTD.js.map → chunk-GG4VKPAX.js.map} +0 -0
  213. /package/dist/{chunk-WKOJ7NXD.js.map → chunk-GZNF6762.js.map} +0 -0
  214. /package/dist/{chunk-E7WPTSHQ.js.map → chunk-HJKYE57I.js.map} +0 -0
  215. /package/dist/{chunk-KL4YYV37.js.map → chunk-I5FZXDCO.js.map} +0 -0
  216. /package/dist/{chunk-LKESANVD.js.map → chunk-IQ4MITHC.js.map} +0 -0
  217. /package/dist/{chunk-NWOCQVSL.js.map → chunk-J3GEINBH.js.map} +0 -0
  218. /package/dist/{chunk-LJKF73JB.js.map → chunk-JCFCEJ2D.js.map} +0 -0
  219. /package/dist/{chunk-OCMNBOPX.js.map → chunk-JVHHSKBJ.js.map} +0 -0
  220. /package/dist/{chunk-KDO7D46L.js.map → chunk-LHM3GB5K.js.map} +0 -0
  221. /package/dist/{chunk-PSUJZUYX.js.map → chunk-LM2T5OR3.js.map} +0 -0
  222. /package/dist/{chunk-5R5JEQW7.js.map → chunk-LQNHIMJM.js.map} +0 -0
  223. /package/dist/{chunk-UBOKRHNV.js.map → chunk-MKJH2D4V.js.map} +0 -0
  224. /package/dist/{chunk-PCNNW63Z.js.map → chunk-NFWSJFYY.js.map} +0 -0
  225. /package/dist/{chunk-JVBIWU7S.js.map → chunk-OY46QHLX.js.map} +0 -0
  226. /package/dist/{chunk-GZGJQKQT.js.map → chunk-PKQROEFP.js.map} +0 -0
  227. /package/dist/{chunk-2HHIDWHH.js.map → chunk-QBI6K23L.js.map} +0 -0
  228. /package/dist/{chunk-3XG23PLG.js.map → chunk-QLFJNYBV.js.map} +0 -0
  229. /package/dist/{chunk-IDQVTWLX.js.map → chunk-R5JCCRGD.js.map} +0 -0
  230. /package/dist/{chunk-VFH4SU3M.js.map → chunk-SPP7MA3D.js.map} +0 -0
  231. /package/dist/{chunk-FSQJOZS4.js.map → chunk-URGHBFB3.js.map} +0 -0
  232. /package/dist/{chunk-2VRZVUM7.js.map → chunk-VAMLU5VH.js.map} +0 -0
  233. /package/dist/{chunk-4O4VQQEA.js.map → chunk-VJ5XMYXE.js.map} +0 -0
  234. /package/dist/{chunk-JNCKZ3OF.js.map → chunk-VRQKIIC2.js.map} +0 -0
  235. /package/dist/{chunk-34E2LA3M.js.map → chunk-W7MGB3Q2.js.map} +0 -0
  236. /package/dist/{chunk-V7GCYL6A.js.map → chunk-X3RHLYGI.js.map} +0 -0
  237. /package/dist/{chunk-WY7QZ2P7.js.map → chunk-YPXFDJ76.js.map} +0 -0
  238. /package/dist/{chunk-LZZCJAJQ.js.map → chunk-YQBBFX7D.js.map} +0 -0
  239. /package/dist/{cleanup-M5TY4FQS.js.map → cleanup-X7G66SPY.js.map} +0 -0
  240. /package/dist/{cli-446A536X.js.map → cli-RJVX6HVT.js.map} +0 -0
  241. /package/dist/{command-hook-installer-7Q7UD7AU.js.map → command-hook-installer-GMQ4IVDE.js.map} +0 -0
  242. /package/dist/{config-JLORGUXN.js.map → config-ZBU5PHMG.js.map} +0 -0
  243. /package/dist/{diff-4O5HXNZ7.js.map → diff-ADSD4SNQ.js.map} +0 -0
  244. /package/dist/{digest-IAAZXJCC.js.map → digest-ORN6JFNE.js.map} +0 -0
  245. /package/dist/{fork-ULJYPEKY.js.map → fork-VWHAU76U.js.map} +0 -0
  246. /package/dist/{history-JFZF22M7.js.map → history-PP7RHA2V.js.map} +0 -0
  247. /package/dist/{hook-UYOIQVJ7.js.map → hook-6AL5LIQO.js.map} +0 -0
  248. /package/dist/{hydrate-DROI4RJ7.js.map → hydrate-JW5MIWLZ.js.map} +0 -0
  249. /package/dist/{init-FF75CQM7.js.map → init-SIIKJF3K.js.map} +0 -0
  250. /package/dist/{install-skills-XSAHNBYD.js.map → install-skills-KS6N4U6L.js.map} +0 -0
  251. /package/dist/{list-5FEHBP6N.js.map → list-UTQF7KHP.js.map} +0 -0
  252. /package/dist/{move-422L6PPI.js.map → move-P6WOVUGF.js.map} +0 -0
  253. /package/dist/{note-AAXPD5VA.js.map → note-GEFCZKMT.js.map} +0 -0
  254. /package/dist/{overlaps-WPNUYOFF.js.map → overlaps-QMI2RJSG.js.map} +0 -0
  255. /package/dist/{pin-QXPF23BB.js.map → pin-ZALBX2XK.js.map} +0 -0
  256. /package/dist/{pr-QLGXPKPQ.js.map → pr-D3EZ7C5H.js.map} +0 -0
  257. /package/dist/{prune-GRHKRRVT.js.map → prune-ZCOBL7IB.js.map} +0 -0
  258. /package/dist/{pty-host-XDDXA4SL.js.map → pty-host-UCM6GV42.js.map} +0 -0
  259. /package/dist/{read-YWKD2DGP.js.map → read-NHRSGZI4.js.map} +0 -0
  260. /package/dist/{recent-SI5BDVVH.js.map → recent-V4JVL4Y2.js.map} +0 -0
  261. /package/dist/{remove-RXXCHY44.js.map → remove-YNO2I3HR.js.map} +0 -0
  262. /package/dist/{restart-CPNDEXU6.js.map → restart-6YKAD7QQ.js.map} +0 -0
  263. /package/dist/{resume-BLP4TTJK.js.map → resume-PNZ7BRXJ.js.map} +0 -0
  264. /package/dist/{review-now-ADWZPELT.js.map → review-now-HHQIBVUS.js.map} +0 -0
  265. /package/dist/{run-JFCDJ3EV.js.map → run-3QYP7GBN.js.map} +0 -0
  266. /package/dist/{screen-LBOPAUXV.js.map → screen-I6N6FKMF.js.map} +0 -0
  267. /package/dist/{search-AMEGRH24.js.map → search-MLLK3ZCW.js.map} +0 -0
  268. /package/dist/{section-73Z34PVE.js.map → section-EQOZ36FS.js.map} +0 -0
  269. /package/dist/{send-IZBSEET5.js.map → send-LET73FB6.js.map} +0 -0
  270. /package/dist/{sessions-WVQ2U2W4.js.map → sessions-MDOJJZCK.js.map} +0 -0
  271. /package/dist/{snooze-7IBHY5MY.js.map → snooze-TNA7QTXS.js.map} +0 -0
  272. /package/dist/{start-AU62TW6M.js.map → start-OV6LZJ2V.js.map} +0 -0
  273. /package/dist/{status-Z7OMNYZX.js.map → status-HDDGCX4J.js.map} +0 -0
  274. /package/dist/{statusline-VJFY7ZAB.js.map → statusline-WKKYCH7O.js.map} +0 -0
  275. /package/dist/{statusline-hook-JA7MNE5H.js.map → statusline-hook-K7KPN2H6.js.map} +0 -0
  276. /package/dist/{stop-PWNXSFBD.js.map → stop-3TJWZBJB.js.map} +0 -0
  277. /package/dist/{sync-2BTZVDDG.js.map → sync-67AOBEYR.js.map} +0 -0
  278. /package/dist/{time-CTCIAXIY.js.map → time-F6SLY6HR.js.map} +0 -0
  279. /package/dist/{time-actions-UYBOXET6.js.map → time-actions-YOXF5WC7.js.map} +0 -0
  280. /package/dist/{timesheet-BUFQ34FC.js.map → timesheet-QUEDQSJ2.js.map} +0 -0
  281. /package/dist/{todo-2R7VID57.js.map → todo-TALKJYK6.js.map} +0 -0
  282. /package/dist/{update-2IYJHY7H.js.map → update-5O3I5P4N.js.map} +0 -0
  283. /package/dist/{usage-IR5GNF4R.js.map → usage-DVKHDT5J.js.map} +0 -0
  284. /package/dist/{version-ONEI52TI.js.map → version-TVT6GSRF.js.map} +0 -0
  285. /package/dist/{wait-6DH34L53.js.map → wait-5HZZPKNM.js.map} +0 -0
@@ -8,16 +8,16 @@ import {
8
8
  sessionIdFor,
9
9
  tx,
10
10
  withDb
11
- } from "./chunk-Y7T73SAP.js";
11
+ } from "./chunk-RUYTU2WJ.js";
12
12
  import {
13
13
  agentFor,
14
14
  agentOf,
15
15
  agentToRecord,
16
16
  readJsonlTail
17
- } from "./chunk-Z7I6DQAR.js";
17
+ } from "./chunk-N4W34U3I.js";
18
18
  import {
19
19
  loadConfig
20
- } from "./chunk-2MAZV5KS.js";
20
+ } from "./chunk-O5ZJY5BT.js";
21
21
  import {
22
22
  bootTime,
23
23
  isPidAlive,
@@ -32,7 +32,7 @@ import {
32
32
  atomicWriteFile,
33
33
  ensureFile,
34
34
  withFileLock
35
- } from "./chunk-ZXHMC7UO.js";
35
+ } from "./chunk-D2J3AD6L.js";
36
36
  import {
37
37
  report
38
38
  } from "./chunk-AU27USPZ.js";
@@ -410,7 +410,9 @@ var RANK = {
410
410
  closed: 9
411
411
  };
412
412
  function prStageOf(repos) {
413
- const withPr = repos.filter((r) => !!r.pr);
413
+ const withPr = repos.flatMap(
414
+ (r) => r.pr ? [{ name: r.name, pr: r.pr }, ...(r.also ?? []).map((a) => ({ name: r.name, pr: a.pr }))] : []
415
+ );
414
416
  if (!withPr.length) return null;
415
417
  const open = withPr.filter((r) => r.pr.state === "OPEN");
416
418
  const shown = open.length ? open : withPr;
@@ -449,7 +451,8 @@ function stageRepos(repos) {
449
451
  name: r.name,
450
452
  pr: chosen?.pr ?? null,
451
453
  ...chosen?.branch ? { branch: chosen.branch } : {},
452
- earlier: all.filter((x) => x !== chosen).sort((a, b) => b.pr.number - a.pr.number)
454
+ also: open.filter((x) => x !== chosen),
455
+ earlier: all.filter((x) => x !== chosen && x.pr.state !== "OPEN").sort((a, b) => b.pr.number - a.pr.number)
453
456
  };
454
457
  });
455
458
  }
@@ -1241,6 +1244,7 @@ function restoreArchivedTranscripts(s, root = archiveRoot(), restoreDir = (x) =>
1241
1244
  import fs5 from "fs";
1242
1245
  import path4 from "path";
1243
1246
  import zlib2 from "zlib";
1247
+ import { promisify } from "util";
1244
1248
 
1245
1249
  // src/core/archive/archive-search.ts
1246
1250
  var SNIPPET_CHARS = 220;
@@ -1286,12 +1290,311 @@ function matchingLines(raw, words, jsonWords, max, entries) {
1286
1290
  return out;
1287
1291
  }
1288
1292
 
1293
+ // src/core/hosts/github/origin.ts
1294
+ var GITHUB_THREAD_ID = /^PRRT_[A-Za-z0-9_-]{4,120}$/;
1295
+ function onGithub(origin) {
1296
+ return /(^|[@/.])github\.com[:/]/i.test(origin);
1297
+ }
1298
+ function githubRepoId(origin) {
1299
+ if (!onGithub(origin)) return null;
1300
+ const m = /[:/]([^/:]+)\/([^/]+?)(?:\.git)?\/?$/.exec(origin.trim());
1301
+ return m ? `${m[1]}/${m[2]}`.toLowerCase() : null;
1302
+ }
1303
+ function parseGithubPrUrl(text) {
1304
+ const m = /^(?:https?:\/\/)?(?:www\.)?github\.com\/([\w.-]+)\/([\w.-]+)\/pull\/(\d+)(?:[/?#].*)?$/i.exec(text.trim());
1305
+ if (!m) return null;
1306
+ const number = Number(m[3]);
1307
+ return {
1308
+ repoId: `${m[1]}/${m[2]}`.toLowerCase(),
1309
+ number,
1310
+ url: `https://github.com/${m[1]}/${m[2]}/pull/${number}`,
1311
+ label: `${m[2]}#${number}`
1312
+ };
1313
+ }
1314
+
1315
+ // src/core/hosts/azure/origin.ts
1316
+ var dec = (s) => {
1317
+ try {
1318
+ return decodeURIComponent(s);
1319
+ } catch {
1320
+ return s;
1321
+ }
1322
+ };
1323
+ var strip = (s) => s.replace(/\.git$/, "").replace(/\/+$/, "");
1324
+ var ORG_NAME = /^[A-Za-z0-9][A-Za-z0-9-]{0,49}$/;
1325
+ var PART_NAME = /^[^\\/:*?"'<>;#$*{},+=[\]|%&^!\x00-\x1f\x7f]{1,128}$/;
1326
+ var azureNameOk = (org, project, repo) => ORG_NAME.test(org) && PART_NAME.test(project) && PART_NAME.test(repo) && project.trim() === project && repo.trim() === repo;
1327
+ function azureOrgOf(orgUrl) {
1328
+ const m = /^https:\/\/dev\.azure\.com\/([^/]+)$/.exec(orgUrl) ?? /^https:\/\/([^./]+)\.visualstudio\.com$/.exec(orgUrl);
1329
+ return m && ORG_NAME.test(m[1]) ? m[1] : null;
1330
+ }
1331
+ function repoOf(org, project, repo, orgUrl) {
1332
+ const r = { org: dec(org), project: dec(project), repo: dec(strip(repo)), orgUrl };
1333
+ return azureNameOk(r.org, r.project, r.repo) && azureOrgOf(orgUrl) === r.org ? r : null;
1334
+ }
1335
+ function parseAzureOrigin(origin) {
1336
+ const o = origin.trim();
1337
+ let m = /^https?:\/\/(?:[^@/]+@)?dev\.azure\.com\/([^/]+)\/([^/]+)\/_git\/([^/?#]+)/i.exec(o);
1338
+ if (m) return repoOf(m[1], m[2], m[3], `https://dev.azure.com/${m[1]}`);
1339
+ m = /^https?:\/\/(?:[^@/]+@)?([^./]+)\.visualstudio\.com\/(?:DefaultCollection\/)?([^/]+)\/_git\/([^/?#]+)/i.exec(o);
1340
+ if (m) return repoOf(m[1], m[2], m[3], `https://${m[1]}.visualstudio.com`);
1341
+ m = /^(?:ssh:\/\/)?[^@]+@ssh\.dev\.azure\.com[:/]v3\/([^/]+)\/([^/]+)\/([^/]+)$/i.exec(o);
1342
+ if (m) return repoOf(m[1], m[2], m[3], `https://dev.azure.com/${m[1]}`);
1343
+ m = /^(?:ssh:\/\/)?[^@]+@vs-ssh\.visualstudio\.com[:/]v3\/([^/]+)\/([^/]+)\/([^/]+)$/i.exec(o);
1344
+ if (m) return repoOf(m[1], m[2], m[3], `https://${m[1]}.visualstudio.com`);
1345
+ return null;
1346
+ }
1347
+ var onAzure = (origin) => parseAzureOrigin(origin) !== null;
1348
+ function azureRepoId(origin) {
1349
+ const r = parseAzureOrigin(origin);
1350
+ return r ? `${r.org}/${r.project}/${r.repo}`.toLowerCase() : null;
1351
+ }
1352
+ function azureWebUrl(r) {
1353
+ return `${r.orgUrl}/${encodeURIComponent(r.project)}/_git/${encodeURIComponent(r.repo)}`;
1354
+ }
1355
+ function parseAzurePrUrl(text) {
1356
+ const t = text.trim();
1357
+ const m = /^(https?:\/\/[^?#]+\/_git\/[^/?#]+)\/pullrequest\/(\d+)(?:[/?#].*)?$/i.exec(t);
1358
+ if (!m) return null;
1359
+ const repo = parseAzureOrigin(m[1]);
1360
+ if (!repo) return null;
1361
+ const number = Number(m[2]);
1362
+ return {
1363
+ repoId: `${repo.org}/${repo.project}/${repo.repo}`.toLowerCase(),
1364
+ number,
1365
+ url: `${azureWebUrl(repo)}/pullrequest/${number}`,
1366
+ label: `${repo.repo}!${number}`,
1367
+ repo
1368
+ };
1369
+ }
1370
+ var AZURE_THREAD_ID = /^AZT_[A-Za-z0-9_-]{2,400}_\d{1,9}_\d{1,9}$/;
1371
+ var b64url = (s) => {
1372
+ const bytes = new TextEncoder().encode(s);
1373
+ let bin = "";
1374
+ for (const b of bytes) bin += String.fromCharCode(b);
1375
+ return btoa(bin).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
1376
+ };
1377
+ var unb64url = (s) => {
1378
+ const bin = atob(s.replace(/-/g, "+").replace(/_/g, "/"));
1379
+ return new TextDecoder().decode(Uint8Array.from(bin, (c) => c.charCodeAt(0)));
1380
+ };
1381
+ function azureThreadRepoId(id) {
1382
+ const t = parseAzureThreadId(id);
1383
+ const org = t ? azureOrgOf(t.repo.orgUrl) : null;
1384
+ return t && org ? `${org}/${t.repo.project}/${t.repo.repo}`.toLowerCase() : null;
1385
+ }
1386
+ function azureThreadId(r, pr, thread) {
1387
+ return `AZT_${b64url(JSON.stringify([r.orgUrl, r.project, r.repo]))}_${pr}_${thread}`;
1388
+ }
1389
+ function parseAzureThreadId(id) {
1390
+ if (!AZURE_THREAD_ID.test(id)) return null;
1391
+ const m = /^AZT_(.+)_(\d+)_(\d+)$/.exec(id);
1392
+ if (!m) return null;
1393
+ try {
1394
+ const v = JSON.parse(unb64url(m[1]));
1395
+ if (!Array.isArray(v) || v.length !== 3 || !v.every((x) => typeof x === "string")) return null;
1396
+ const [orgUrl, project, repo] = v;
1397
+ const back = parseAzureOrigin(azureWebUrl({ orgUrl, project, repo }));
1398
+ if (!back || back.orgUrl !== orgUrl || back.project !== project || back.repo !== repo) return null;
1399
+ return { repo: { orgUrl, project, repo }, pr: Number(m[2]), thread: Number(m[3]) };
1400
+ } catch {
1401
+ return null;
1402
+ }
1403
+ }
1404
+
1405
+ // src/core/hosts/github/commands.ts
1406
+ var githubCommands = {
1407
+ host: "GitHub",
1408
+ cli: "gh",
1409
+ view: (n) => `gh pr view ${n}`,
1410
+ comments: (n) => `gh pr view ${n} --comments`,
1411
+ diff: (n) => `gh pr diff ${n}`,
1412
+ checks: (n) => `gh pr checks ${n}`,
1413
+ failedLog: "gh run view <run-id> --log-failed",
1414
+ checkout: (n, detach) => `gh pr checkout ${n}${detach ? " --detach" : ""}`,
1415
+ create: "gh pr create"
1416
+ };
1417
+
1418
+ // src/core/hosts/azure/commands.ts
1419
+ var azureCommands = {
1420
+ host: "Azure DevOps",
1421
+ cli: "az",
1422
+ view: (n) => `az repos pr show --id ${n}`,
1423
+ comments: (n) => `az repos pr show --id ${n} (and its threads: az devops invoke --area git --resource pullRequestThreads)`,
1424
+ diff: (n) => `git fetch origin refs/pull/${n}/merge && git diff FETCH_HEAD^1 FETCH_HEAD`,
1425
+ checks: (n) => `az repos pr policy list --id ${n}`,
1426
+ failedLog: "az pipelines runs show --id <run-id>",
1427
+ checkout: (n) => `az repos pr checkout --id ${n}`,
1428
+ create: "az repos pr create"
1429
+ };
1430
+
1431
+ // src/core/hosts/commands.ts
1432
+ var TABLE = { github: githubCommands, azure: azureCommands };
1433
+ var DEFAULT_HOST = "github";
1434
+ function commandsFor(hostId) {
1435
+ return TABLE[hostId ?? DEFAULT_HOST] ?? TABLE[DEFAULT_HOST];
1436
+ }
1437
+ function hostName(hostId) {
1438
+ return commandsFor(hostId).host;
1439
+ }
1440
+
1441
+ // src/core/hosts/links.ts
1442
+ var PARSERS = [
1443
+ { host: "github", parse: parseGithubPrUrl },
1444
+ {
1445
+ host: "azure",
1446
+ parse: (t) => {
1447
+ const l = parseAzurePrUrl(t);
1448
+ return l ? { repoId: l.repoId, number: l.number, url: l.url, label: l.label } : null;
1449
+ }
1450
+ }
1451
+ ];
1452
+ function parsePrLink(text) {
1453
+ for (const p of PARSERS) {
1454
+ const link = p.parse(text);
1455
+ if (link) return { ...link, host: p.host };
1456
+ }
1457
+ return null;
1458
+ }
1459
+
1460
+ // src/core/pr/session-prs.ts
1461
+ var MAX_SESSION_PRS = 100;
1462
+ var isIso = (v) => typeof v === "string" && Number.isFinite(Date.parse(v));
1463
+ var SOURCES = ["agent", "branch"];
1464
+ function isShipPr(v) {
1465
+ const p = v;
1466
+ return !!p && typeof p === "object" && typeof p.number === "number" && typeof p.url === "string" && (p.state === "OPEN" || p.state === "MERGED" || p.state === "CLOSED") && typeof p.isDraft === "boolean" && typeof p.mergeStateStatus === "string" && (p.checks === "pass" || p.checks === "fail" || p.checks === "pending" || p.checks === "none") && typeof p.headSha === "string";
1467
+ }
1468
+ function cleanSessionPrs(raw) {
1469
+ const o = raw;
1470
+ if (!o || typeof o !== "object" || !Array.isArray(o.prs)) return null;
1471
+ const prs = [];
1472
+ for (const x of o.prs) {
1473
+ const r = x;
1474
+ if (!r || typeof r !== "object" || typeof r.url !== "string" || !r.url) continue;
1475
+ if (typeof r.number !== "number" || !Number.isInteger(r.number) || r.number <= 0) continue;
1476
+ if (typeof r.repoId !== "string" || !isIso(r.firstSeen) || !Array.isArray(r.sources)) continue;
1477
+ const sources = r.sources.filter((s) => SOURCES.includes(s));
1478
+ if (!sources.length) continue;
1479
+ prs.push({
1480
+ url: r.url,
1481
+ number: r.number,
1482
+ repoId: r.repoId,
1483
+ ...typeof r.branch === "string" && r.branch ? { branch: r.branch } : {},
1484
+ sources,
1485
+ firstSeen: r.firstSeen,
1486
+ ...isShipPr(r.final) && r.final.state !== "OPEN" ? { final: r.final } : {}
1487
+ });
1488
+ }
1489
+ return { prs, ...isIso(o.scanned) ? { scanned: o.scanned } : {} };
1490
+ }
1491
+ function normal(s) {
1492
+ const link = parsePrLink(s.url);
1493
+ if (link && link.number === s.number) return { url: link.url, repoId: link.repoId };
1494
+ return { url: s.url, repoId: s.repoId ?? "" };
1495
+ }
1496
+ function withPrSightings(rec, seen, now, opts = {}) {
1497
+ const base = rec ?? { prs: [] };
1498
+ let changed = !rec || opts.scanned === true && !base.scanned;
1499
+ const prs = base.prs.map((p) => ({ ...p, sources: [...p.sources] }));
1500
+ for (const s of seen) {
1501
+ if (!Number.isInteger(s.number) || s.number <= 0 || !s.url) continue;
1502
+ const { url, repoId } = normal(s);
1503
+ const p = prs.find((x) => x.url === url);
1504
+ if (!p) {
1505
+ prs.push({
1506
+ url,
1507
+ number: s.number,
1508
+ repoId,
1509
+ ...s.branch ? { branch: s.branch } : {},
1510
+ sources: [s.source],
1511
+ firstSeen: isIso(s.at) ? s.at : now.toISOString()
1512
+ });
1513
+ changed = true;
1514
+ continue;
1515
+ }
1516
+ if (!p.sources.includes(s.source)) {
1517
+ p.sources.push(s.source);
1518
+ changed = true;
1519
+ }
1520
+ if (s.branch && !p.branch) {
1521
+ p.branch = s.branch;
1522
+ changed = true;
1523
+ }
1524
+ if (!p.repoId && repoId) {
1525
+ p.repoId = repoId;
1526
+ changed = true;
1527
+ }
1528
+ if (isIso(s.at) && Date.parse(s.at) < Date.parse(p.firstSeen)) {
1529
+ p.firstSeen = s.at;
1530
+ changed = true;
1531
+ }
1532
+ }
1533
+ if (!changed) return base;
1534
+ return { prs: trim(prs), ...base.scanned ? { scanned: base.scanned } : opts.scanned ? { scanned: now.toISOString() } : {} };
1535
+ }
1536
+ function trim(prs) {
1537
+ if (prs.length <= MAX_SESSION_PRS) return prs;
1538
+ const finished = prs.filter((p) => p.final).sort((a, b) => Date.parse(b.firstSeen) - Date.parse(a.firstSeen));
1539
+ const drop = new Set(finished.slice(Math.max(0, MAX_SESSION_PRS - (prs.length - finished.length))));
1540
+ return prs.filter((p) => !drop.has(p));
1541
+ }
1542
+ function withPrLooks(rec, looks) {
1543
+ let changed = false;
1544
+ const prs = rec.prs.map((p) => {
1545
+ const look = looks.find((l) => l.url === p.url || l.pr.url === p.url);
1546
+ if (!look) return p;
1547
+ const next = { ...p };
1548
+ if (look.branch && !p.branch) {
1549
+ next.branch = look.branch;
1550
+ changed = true;
1551
+ }
1552
+ if (look.pr.state !== "OPEN" && !p.final) {
1553
+ next.final = look.pr;
1554
+ changed = true;
1555
+ }
1556
+ return next;
1557
+ });
1558
+ return changed ? { ...rec, prs } : rec;
1559
+ }
1560
+ function readRow2(d, sessionId) {
1561
+ const row = d.prepare("SELECT data FROM session_prs WHERE session_id = ?").get(sessionId);
1562
+ return row ? cleanSessionPrs(json.parse(row.data)) : null;
1563
+ }
1564
+ function writeRow(d, sessionId, rec) {
1565
+ d.prepare("INSERT OR REPLACE INTO session_prs (session_id, data) VALUES (?, ?)").run(sessionId, JSON.stringify(rec));
1566
+ }
1567
+ function readSessionPrs(sessionId) {
1568
+ return withDb((d) => readRow2(d, sessionId));
1569
+ }
1570
+ function noteSessionPrs(sessionId, seen, now = /* @__PURE__ */ new Date(), opts = {}) {
1571
+ return tx((d) => {
1572
+ const old = readRow2(d, sessionId);
1573
+ const next = withPrSightings(old, seen, now, opts);
1574
+ if (next !== old) writeRow(d, sessionId, next);
1575
+ return next;
1576
+ });
1577
+ }
1578
+ function notePrLooks(sessionId, looks) {
1579
+ if (!looks.length) return;
1580
+ tx((d) => {
1581
+ const old = readRow2(d, sessionId);
1582
+ if (!old) return;
1583
+ const next = withPrLooks(old, looks);
1584
+ if (next !== old) writeRow(d, sessionId, next);
1585
+ });
1586
+ }
1587
+
1289
1588
  // src/core/conversations/conversation-store.ts
1589
+ var gunzip = promisify(zlib2.gunzip);
1290
1590
  var conversationRoot = () => path4.join(getConfigDir(), "conversations");
1291
1591
  var conversationDirFor = (id, root = conversationRoot()) => path4.join(root, id);
1292
- async function syncConversation(s, root = conversationRoot(), sources = agentOf(s).conversation?.files(s) ?? []) {
1293
- const dir = conversationDirFor(sessionIdFor(s), root);
1592
+ async function syncConversation(s, root = conversationRoot(), sources = agentOf(s).conversation?.files(s) ?? [], prLinks = agentOf(s).conversation?.prLinks) {
1593
+ const id = sessionIdFor(s);
1594
+ const dir = conversationDirFor(id, root);
1294
1595
  const out = { files: 0, bytes: 0 };
1596
+ const found = [];
1597
+ const scan = prLinks ? lineScanner((text) => found.push(...prLinks(text))) : null;
1295
1598
  for (const src of sources) {
1296
1599
  const dest = path4.join(dir, path4.basename(src.file));
1297
1600
  const packed = await packedState(dest, src.mtimeMs);
@@ -1314,13 +1617,87 @@ async function syncConversation(s, root = conversationRoot(), sources = agentOf(
1314
1617
  await fs5.promises.copyFile(src.file, dest);
1315
1618
  out.bytes += src.size;
1316
1619
  } else {
1317
- out.bytes += await appendRange(src.file, dest, have, src.size);
1620
+ const feed = scan?.file();
1621
+ out.bytes += await appendRange(src.file, dest, have, src.size, feed);
1622
+ feed?.end();
1318
1623
  }
1319
1624
  await fs5.promises.utimes(dest, /* @__PURE__ */ new Date(), new Date(src.mtimeMs)).catch(() => void 0);
1320
1625
  out.files++;
1321
1626
  }
1627
+ if (prLinks) {
1628
+ const prs = await notePrLinks(s, id, dir, found, prLinks);
1629
+ if (prs) out.prs = prs;
1630
+ }
1322
1631
  return out;
1323
1632
  }
1633
+ function lineScanner(onLines) {
1634
+ return {
1635
+ file() {
1636
+ let carry = "";
1637
+ return {
1638
+ push(buf) {
1639
+ const text = carry + buf.toString("utf8");
1640
+ const nl = text.lastIndexOf("\n");
1641
+ if (nl < 0) {
1642
+ carry = text.length > 1e6 ? "" : text;
1643
+ return;
1644
+ }
1645
+ onLines(text.slice(0, nl));
1646
+ carry = text.slice(nl + 1);
1647
+ },
1648
+ end() {
1649
+ if (carry) onLines(carry);
1650
+ carry = "";
1651
+ }
1652
+ };
1653
+ }
1654
+ };
1655
+ }
1656
+ async function notePrLinks(s, id, dir, found, prLinks) {
1657
+ if (s.archivedAt) return 0;
1658
+ const whole = rescanPrLinks.has(id) || !readSessionPrs(id)?.scanned;
1659
+ const links = [...found];
1660
+ let readAll = true;
1661
+ if (whole) {
1662
+ const names = await fs5.promises.readdir(dir).catch((err) => {
1663
+ if (err.code !== "ENOENT") readAll = false;
1664
+ return [];
1665
+ });
1666
+ for (const n of names.filter((x) => x.endsWith(".jsonl") || x.endsWith(".jsonl.gz"))) {
1667
+ try {
1668
+ const buf = await fs5.promises.readFile(path4.join(dir, n));
1669
+ links.push(...prLinks((n.endsWith(".gz") ? await gunzip(buf) : buf).toString("utf8")));
1670
+ } catch (err) {
1671
+ if (err.code !== "ENOENT") readAll = false;
1672
+ }
1673
+ }
1674
+ }
1675
+ if (!links.length && !whole) return 0;
1676
+ try {
1677
+ notedPrLinks(id, links, whole && readAll);
1678
+ } catch (err) {
1679
+ rescanPrLinks.add(id);
1680
+ report("warn", `couldn't keep the PRs named in ${id}'s conversation (${err.message}); read again at the next sync`);
1681
+ return 0;
1682
+ }
1683
+ if (whole && readAll) rescanPrLinks.delete(id);
1684
+ return new Set(links.map((l) => l.url)).size;
1685
+ }
1686
+ var rescanPrLinks = /* @__PURE__ */ new Set();
1687
+ function notedPrLinks(id, links, scanned) {
1688
+ noteSessionPrs(
1689
+ id,
1690
+ links.map((l) => ({
1691
+ url: l.url,
1692
+ number: l.number,
1693
+ ...l.repo ? { repoId: l.repo.toLowerCase() } : {},
1694
+ source: "agent",
1695
+ ...l.at ? { at: l.at } : {}
1696
+ })),
1697
+ /* @__PURE__ */ new Date(),
1698
+ scanned ? { scanned: true } : {}
1699
+ );
1700
+ }
1324
1701
  async function packedState(dest, srcMtimeMs) {
1325
1702
  try {
1326
1703
  const st = await fs5.promises.stat(`${dest}.gz`);
@@ -1372,7 +1749,7 @@ async function compressQuietCopies(root = conversationRoot(), now = Date.now(),
1372
1749
  }
1373
1750
  return out;
1374
1751
  }
1375
- async function appendRange(src, dest, from, to) {
1752
+ async function appendRange(src, dest, from, to, feed) {
1376
1753
  await (await fs5.promises.open(dest, "a")).close();
1377
1754
  const [inp, out] = [await fs5.promises.open(src, "r"), await fs5.promises.open(dest, "r+")];
1378
1755
  try {
@@ -1383,6 +1760,7 @@ async function appendRange(src, dest, from, to) {
1383
1760
  const { bytesRead } = await inp.read(buf, 0, buf.length, pos);
1384
1761
  if (bytesRead === 0) break;
1385
1762
  await out.write(buf, 0, bytesRead, pos);
1763
+ feed?.push(buf.subarray(0, bytesRead));
1386
1764
  done += bytesRead;
1387
1765
  }
1388
1766
  return done;
@@ -1681,6 +2059,20 @@ function checkedOutBranch(checkout) {
1681
2059
  return null;
1682
2060
  }
1683
2061
  }
2062
+ function workingBranch(checkout) {
2063
+ const name = checkedOutBranch(checkout);
2064
+ if (name) return name;
2065
+ const dirs = gitDirs(checkout);
2066
+ if (!dirs) return null;
2067
+ for (const folder of ["rebase-merge", "rebase-apply"]) {
2068
+ try {
2069
+ const b = branchFromHead(`ref: ${fs7.readFileSync(path7.join(dirs.gitDir, folder, "head-name"), "utf8").trim()}`);
2070
+ if (b) return b;
2071
+ } catch {
2072
+ }
2073
+ }
2074
+ return null;
2075
+ }
1684
2076
  function gitDirs(checkout) {
1685
2077
  try {
1686
2078
  const dotGit = path7.join(checkout, ".git");
@@ -1698,6 +2090,35 @@ function gitDirs(checkout) {
1698
2090
  return null;
1699
2091
  }
1700
2092
  }
2093
+ function refShaFromFiles(checkout, ref) {
2094
+ const dirs = gitDirs(checkout);
2095
+ if (!dirs) return null;
2096
+ const sha = (s) => /^[0-9a-f]{40,64}$/.test(s) ? s : null;
2097
+ let name = ref;
2098
+ if (ref === "HEAD") {
2099
+ let head;
2100
+ try {
2101
+ head = fs7.readFileSync(path7.join(dirs.gitDir, "HEAD"), "utf8").trim();
2102
+ } catch {
2103
+ return null;
2104
+ }
2105
+ const m = /^ref:\s*(refs\/heads\/.+)$/.exec(head);
2106
+ if (!m) return sha(head);
2107
+ name = m[1];
2108
+ }
2109
+ try {
2110
+ return sha(fs7.readFileSync(path7.join(dirs.commonDir, ...name.split("/")), "utf8").trim());
2111
+ } catch {
2112
+ }
2113
+ try {
2114
+ for (const line of fs7.readFileSync(path7.join(dirs.commonDir, "packed-refs"), "utf8").split(/\r?\n/)) {
2115
+ const [s, r] = line.split(" ");
2116
+ if (r === name) return sha(s);
2117
+ }
2118
+ } catch {
2119
+ }
2120
+ return null;
2121
+ }
1701
2122
  function branchFromHead(head) {
1702
2123
  const m = /^ref:\s*refs\/heads\/(.+?)\s*$/m.exec(head);
1703
2124
  return m ? m[1] : null;
@@ -1705,7 +2126,7 @@ function branchFromHead(head) {
1705
2126
 
1706
2127
  // src/core/diff/checkpoint.ts
1707
2128
  function branchesOf(repos) {
1708
- return Object.fromEntries(repos.map((r) => [r.name, checkedOutBranch(r.root)]));
2129
+ return Object.fromEntries(repos.map((r) => [r.name, workingBranch(r.root)]));
1709
2130
  }
1710
2131
  function manifestPath(scopeHash) {
1711
2132
  const dir = path8.join(os2.homedir(), ".work", "diffs");
@@ -1925,6 +2346,12 @@ async function headAdvancedSinceInitial(scopeHash, repos) {
1925
2346
  }
1926
2347
  return false;
1927
2348
  }
2349
+ function switchedBranch(turn, repo) {
2350
+ if (!turn.branches || !(repo.name in turn.branches)) return false;
2351
+ const was = turn.branches[repo.name];
2352
+ const now = workingBranch(repo.root);
2353
+ return !!was && !!now && was !== now;
2354
+ }
1928
2355
  async function headBroughtInOtherWork(scopeHash, repos) {
1929
2356
  const entries = loadManifest(scopeHash).entries;
1930
2357
  if (entries.length === 0) return false;
@@ -1940,6 +2367,7 @@ async function headBroughtInOtherWork(scopeHash, repos) {
1940
2367
  const broughtIn = async (repo) => {
1941
2368
  const snap = newest.repos[repo.name];
1942
2369
  if (!snap) return false;
2370
+ if (switchedBranch(newest, repo)) return false;
1943
2371
  const was = await run(repo.root, ["rev-parse", "--verify", "--quiet", `${snap}^`]);
1944
2372
  const now = await run(repo.root, ["rev-parse", "--verify", "--quiet", "HEAD"]);
1945
2373
  if (!was.ok || !now.ok || !was.out || was.out === now.out) return false;
@@ -2582,7 +3010,9 @@ export {
2582
3010
  activeWithin,
2583
3011
  effectiveLastAccessedAt,
2584
3012
  checkedOutBranch,
3013
+ workingBranch,
2585
3014
  gitDirs,
3015
+ refShaFromFiles,
2586
3016
  writeTempTree,
2587
3017
  runGitAsync,
2588
3018
  archiveRefFor,
@@ -2645,6 +3075,28 @@ export {
2645
3075
  readArchive,
2646
3076
  restoreArchivedTranscripts,
2647
3077
  messageOf,
3078
+ GITHUB_THREAD_ID,
3079
+ onGithub,
3080
+ githubRepoId,
3081
+ parseGithubPrUrl,
3082
+ parseAzureOrigin,
3083
+ onAzure,
3084
+ azureRepoId,
3085
+ azureWebUrl,
3086
+ parseAzurePrUrl,
3087
+ AZURE_THREAD_ID,
3088
+ azureThreadRepoId,
3089
+ azureThreadId,
3090
+ parseAzureThreadId,
3091
+ githubCommands,
3092
+ azureCommands,
3093
+ DEFAULT_HOST,
3094
+ commandsFor,
3095
+ hostName,
3096
+ parsePrLink,
3097
+ readSessionPrs,
3098
+ noteSessionPrs,
3099
+ notePrLooks,
2648
3100
  syncConversation,
2649
3101
  compressQuietCopies,
2650
3102
  syncConversations,
@@ -2706,4 +3158,4 @@ export {
2706
3158
  mergeHydratedSessions,
2707
3159
  forgetOtherBaseCheckoutEntries
2708
3160
  };
2709
- //# sourceMappingURL=chunk-27LWL6QE.js.map
3161
+ //# sourceMappingURL=chunk-ZG2M4ECW.js.map