@moberg_hr/work-tree 2.10.0 → 2.11.1

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