@moberg_hr/work-tree 2.11.5 → 2.12.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 (261) hide show
  1. package/dist/{account-EAVYWOKR.js → account-V6GS7DII.js} +18 -18
  2. package/dist/{add-repo-3THEK6UG.js → add-repo-HG24PKHR.js} +12 -12
  3. package/dist/{answer-3CJQWBGY.js → answer-S3VZFV4N.js} +8 -8
  4. package/dist/{attach-FQSBZXI7.js → attach-RKIACTP2.js} +15 -15
  5. package/dist/bin.js +2 -2
  6. package/dist/{block-NGD2KNTU.js → block-UUK564QX.js} +10 -10
  7. package/dist/{broadcast-NLASZGWR.js → broadcast-73JJELJF.js} +6 -6
  8. package/dist/{catchup-WJPWOGVI.js → catchup-JUEBM3QQ.js} +11 -11
  9. package/dist/{chunk-I7AEQDG7.js → chunk-2KW4TFVP.js} +2 -2
  10. package/dist/{chunk-33XSEAHO.js → chunk-2Y2ARDXI.js} +2 -2
  11. package/dist/{chunk-TMAQASMH.js → chunk-2YTCAJT5.js} +6 -6
  12. package/dist/{chunk-KCWU6HNJ.js → chunk-3GCD3DAB.js} +6 -6
  13. package/dist/{chunk-DROLR3NJ.js → chunk-42MD5W5R.js} +48 -3
  14. package/dist/chunk-42MD5W5R.js.map +1 -0
  15. package/dist/{chunk-FM6VLU4T.js → chunk-4F2AH2LC.js} +3 -3
  16. package/dist/{chunk-DS2CKYQ4.js → chunk-4GNX6CQ2.js} +3 -3
  17. package/dist/{chunk-B2K2I2PQ.js → chunk-4GPKT5A2.js} +8 -6
  18. package/dist/chunk-4GPKT5A2.js.map +1 -0
  19. package/dist/{chunk-JIWPC53O.js → chunk-52KXG5D3.js} +7 -7
  20. package/dist/{chunk-H4TMS567.js → chunk-552RUECR.js} +6 -6
  21. package/dist/{chunk-VPFAXLSX.js → chunk-5VV5IQC6.js} +7 -7
  22. package/dist/{chunk-I3FLUAK7.js → chunk-6Q4PTZ3J.js} +2 -2
  23. package/dist/{chunk-C7ZKDWPI.js → chunk-6RVZYOED.js} +5 -5
  24. package/dist/{chunk-IREGW23T.js → chunk-6SRDHIAK.js} +3 -3
  25. package/dist/{chunk-5LUXNIPA.js → chunk-7LQTBAYP.js} +2 -2
  26. package/dist/{chunk-TSFNTMMY.js → chunk-7XT5MRJ2.js} +4 -4
  27. package/dist/{chunk-ACNCTLFO.js → chunk-AMEJQT64.js} +4 -4
  28. package/dist/{chunk-3257QPVM.js → chunk-AORYYUMW.js} +3 -3
  29. package/dist/{chunk-RPWEOEA3.js → chunk-BMNH6B5U.js} +4 -4
  30. package/dist/{chunk-5RAAS4II.js → chunk-CLPCEQA2.js} +6 -6
  31. package/dist/{chunk-TFNDOWYP.js → chunk-CS5VPO7A.js} +5 -5
  32. package/dist/{chunk-OIVEYULL.js → chunk-D7ZQNQOJ.js} +5 -5
  33. package/dist/{chunk-EYDGX32Q.js → chunk-FFYYODXG.js} +2 -2
  34. package/dist/{chunk-N5PQHNYK.js → chunk-G6JZ3ZQI.js} +2 -2
  35. package/dist/chunk-G7OFGBLT.js +9 -0
  36. package/dist/{chunk-45MDVVW7.js → chunk-GGYXNTEB.js} +4 -4
  37. package/dist/{chunk-IUWMT6PF.js → chunk-HUD4JLK3.js} +14 -6
  38. package/dist/chunk-HUD4JLK3.js.map +1 -0
  39. package/dist/{chunk-JNAYPBAB.js → chunk-HUX6XT2P.js} +3 -3
  40. package/dist/{chunk-CS2EINZJ.js → chunk-HXQYGI3R.js} +54 -54
  41. package/dist/{chunk-7OFVXQSM.js → chunk-JQ42ERH3.js} +2 -2
  42. package/dist/{chunk-ANS6OH55.js → chunk-JVG4U3LK.js} +4 -4
  43. package/dist/{chunk-NOB3VR5I.js → chunk-KHGP6MS2.js} +3 -3
  44. package/dist/chunk-KHGP6MS2.js.map +1 -0
  45. package/dist/{chunk-DHOC2S2L.js → chunk-KX75V4AT.js} +7 -7
  46. package/dist/{chunk-TL7K3XUY.js → chunk-LN2DDJGG.js} +6 -6
  47. package/dist/{chunk-3O6QFWZ6.js → chunk-LNRODEIP.js} +2 -2
  48. package/dist/{chunk-NUPLJJOS.js → chunk-LYZQ6IKY.js} +10 -10
  49. package/dist/{chunk-S36RENUJ.js → chunk-M4NZ4UJA.js} +4 -4
  50. package/dist/{chunk-DGVCN7HB.js → chunk-MOTKVMGL.js} +2 -2
  51. package/dist/{chunk-RSCRZGUW.js → chunk-MX3JVY64.js} +2 -2
  52. package/dist/{chunk-JVRS73M6.js → chunk-NDIAONVE.js} +3 -3
  53. package/dist/{chunk-UQJQZ526.js → chunk-NGHIFLCM.js} +3 -3
  54. package/dist/{chunk-EJSGPLXO.js → chunk-NLSFJYU6.js} +5 -5
  55. package/dist/{chunk-PGGNMC34.js → chunk-P6LDKZEY.js} +5 -5
  56. package/dist/{chunk-HORDAO4Z.js → chunk-QJZCTK25.js} +3 -3
  57. package/dist/{chunk-7FNJ6A2U.js → chunk-QULZNML4.js} +2 -2
  58. package/dist/{chunk-RUYTU2WJ.js → chunk-RRNIJ7YO.js} +7 -3
  59. package/dist/chunk-RRNIJ7YO.js.map +1 -0
  60. package/dist/{chunk-7DUGVGUZ.js → chunk-RVSRZ57P.js} +2 -2
  61. package/dist/{chunk-CVMO75V5.js → chunk-S4L6BURS.js} +2 -2
  62. package/dist/{chunk-SPVVXKDV.js → chunk-SNUAISLX.js} +2 -2
  63. package/dist/{chunk-C72Y42VC.js → chunk-SOOPR7HU.js} +7 -7
  64. package/dist/{chunk-3KVOYBM4.js → chunk-SQI5NYRZ.js} +3 -3
  65. package/dist/{chunk-ZQJKAZRD.js → chunk-TW57JSKU.js} +10 -10
  66. package/dist/{chunk-JVHHSKBJ.js → chunk-UH72CZAX.js} +2 -2
  67. package/dist/{chunk-6UTH3A76.js → chunk-UVZITL47.js} +1 -1
  68. package/dist/chunk-UVZITL47.js.map +1 -0
  69. package/dist/{chunk-64M7W2OQ.js → chunk-UXL75FQC.js} +3 -3
  70. package/dist/{chunk-BW5U6ENJ.js → chunk-WIJO2LYS.js} +2 -2
  71. package/dist/{chunk-VVRSPS67.js → chunk-XTRC6IOA.js} +2 -2
  72. package/dist/{chunk-7IZVI76D.js → chunk-XXKEL6JG.js} +9 -9
  73. package/dist/{chunk-SQACJQUY.js → chunk-Y2RCCYRA.js} +2 -2
  74. package/dist/{chunk-OTKWVUGB.js → chunk-YWB42FW6.js} +3 -3
  75. package/dist/{chunk-DTFACBDD.js → chunk-Z6B4ICOI.js} +9 -5
  76. package/dist/chunk-Z6B4ICOI.js.map +1 -0
  77. package/dist/{chunk-GG4VKPAX.js → chunk-ZLQGKBBE.js} +2 -2
  78. package/dist/{chunk-BHJ73OPQ.js → chunk-ZRY7AOET.js} +6 -6
  79. package/dist/{cleanup-GFYEKCJS.js → cleanup-5DPCUQJQ.js} +29 -29
  80. package/dist/{cli-QP3BQXVW.js → cli-IELHMGEY.js} +3 -3
  81. package/dist/{config-W3AEOOUK.js → config-E6ORLTCE.js} +7 -7
  82. package/dist/{diff-G53V34KI.js → diff-DQFERMIX.js} +8 -8
  83. package/dist/{digest-W4425I4J.js → digest-ALSU7EYK.js} +7 -7
  84. package/dist/{fork-HTPJML6G.js → fork-NY4QWSPG.js} +26 -26
  85. package/dist/{history-TYKH3SKB.js → history-JY54YEZX.js} +5 -5
  86. package/dist/{hook-F7WR5UIQ.js → hook-7Q53RMB2.js} +13 -13
  87. package/dist/{hydrate-HDZ62YMD.js → hydrate-PV3F3QEI.js} +6 -6
  88. package/dist/{init-Q5KJ666H.js → init-OH6UWFOJ.js} +10 -10
  89. package/dist/{install-skills-C46BIZ5O.js → install-skills-7DE3ADWA.js} +4 -4
  90. package/dist/install-skills-bin.js +3 -3
  91. package/dist/{keep-MYHUCQWD.js → keep-H5VWXD2E.js} +8 -8
  92. package/dist/{list-BGHRHYV6.js → list-7OTXLACR.js} +5 -5
  93. package/dist/{move-OHV2DC4V.js → move-UOKARORU.js} +14 -14
  94. package/dist/{note-2I5WTKED.js → note-2BW5MIC6.js} +9 -9
  95. package/dist/{overlaps-PX4BD23H.js → overlaps-UHF6XJML.js} +11 -11
  96. package/dist/{pin-UTMH2XUZ.js → pin-GP6BZYYM.js} +9 -9
  97. package/dist/{pr-PZCO36TY.js → pr-F5PWLPUU.js} +19 -19
  98. package/dist/{prune-APCNVQKK.js → prune-ISXTZRRM.js} +27 -27
  99. package/dist/{pty-host-Q5VNQKP2.js → pty-host-IKZRLX3W.js} +12 -12
  100. package/dist/{read-HSQNG4CA.js → read-ARVCB7A2.js} +8 -8
  101. package/dist/{recent-SNDWYLUH.js → recent-NZMHV2NQ.js} +13 -13
  102. package/dist/{remove-5F5SP5TM.js → remove-NCWMZUDU.js} +28 -28
  103. package/dist/{restart-HWSAV22N.js → restart-QQEWWBSM.js} +8 -8
  104. package/dist/{resume-DBO7FTEQ.js → resume-V4P7XAT2.js} +13 -13
  105. package/dist/{review-36OJ5EES.js → review-VCMEMSGB.js} +5 -4
  106. package/dist/review-VCMEMSGB.js.map +1 -0
  107. package/dist/{review-now-CZPT7X4K.js → review-now-NXMBEJ5R.js} +3 -3
  108. package/dist/{run-QQARI2AH.js → run-M4RWGT2R.js} +5 -5
  109. package/dist/{screen-SXJEHTUY.js → screen-KCVCST6K.js} +8 -8
  110. package/dist/{search-U25QWSX4.js → search-BRKX3NF5.js} +5 -5
  111. package/dist/{section-TCH4DXE7.js → section-272JIEIG.js} +9 -9
  112. package/dist/{send-ZCKMC65W.js → send-4LFQLZR3.js} +9 -9
  113. package/dist/{sessions-7PKZZ4NG.js → sessions-Y7JJHAVI.js} +23 -23
  114. package/dist/{snooze-JBPRRYAF.js → snooze-LJ3INJ47.js} +8 -8
  115. package/dist/{start-L6AWLRVP.js → start-MULJ7JIP.js} +8 -8
  116. package/dist/{state-JHCC5CAR.js → state-LDDRQFWX.js} +6 -4
  117. package/dist/{state-JHCC5CAR.js.map → state-LDDRQFWX.js.map} +1 -1
  118. package/dist/{status-WWRZLDGT.js → status-Q4ZX37RP.js} +9 -9
  119. package/dist/{stop-WHUBU5JZ.js → stop-CBCMLFNH.js} +8 -8
  120. package/dist/{sync-AVDUHYPQ.js → sync-IYFBEFQX.js} +27 -27
  121. package/dist/{time-MIJM6SM6.js → time-WSCPEGQC.js} +10 -10
  122. package/dist/{time-actions-Y5USDGSE.js → time-actions-KYFYV7F2.js} +3 -3
  123. package/dist/{timesheet-AVRH56TG.js → timesheet-6W6OPPVP.js} +11 -11
  124. package/dist/{todo-O6Y5MEQR.js → todo-54OJY5VV.js} +3 -3
  125. package/dist/{tree-7YD6DL3H.js → tree-32OEZDDU.js} +26 -26
  126. package/dist/{update-XGT2DFTT.js → update-JQSKHI47.js} +14 -14
  127. package/dist/{usage-7NM6L2MR.js → usage-5BOIIANY.js} +8 -8
  128. package/dist/{version-V7IM2UL4.js → version-4S7I7GHM.js} +2 -2
  129. package/dist/{wait-HCIFDLNX.js → wait-I3I35CV6.js} +9 -9
  130. package/dist/wd-bin.js +2 -2
  131. package/dist/web/assets/{PtyView-R0tQXVW8.js → PtyView-BLYE_3wP.js} +2 -2
  132. package/dist/web/assets/{PtyView-R0tQXVW8.js.map → PtyView-BLYE_3wP.js.map} +1 -1
  133. package/dist/web/assets/{index-QlOaahcZ.css → index-I3G9prc8.css} +1 -1
  134. package/dist/web/assets/index-k8sUbiKa.js +126 -0
  135. package/dist/web/assets/index-k8sUbiKa.js.map +1 -0
  136. package/dist/web/index.html +2 -2
  137. package/dist/{web-AXS3EMZ3.js → web-JBDK5WWW.js} +396 -206
  138. package/dist/web-JBDK5WWW.js.map +1 -0
  139. package/npm-shrinkwrap.json +2 -2
  140. package/package.json +1 -1
  141. package/dist/chunk-6UTH3A76.js.map +0 -1
  142. package/dist/chunk-B2K2I2PQ.js.map +0 -1
  143. package/dist/chunk-DROLR3NJ.js.map +0 -1
  144. package/dist/chunk-DTFACBDD.js.map +0 -1
  145. package/dist/chunk-FC7RECDP.js +0 -9
  146. package/dist/chunk-IUWMT6PF.js.map +0 -1
  147. package/dist/chunk-NOB3VR5I.js.map +0 -1
  148. package/dist/chunk-RUYTU2WJ.js.map +0 -1
  149. package/dist/review-36OJ5EES.js.map +0 -1
  150. package/dist/web/assets/index-Beb-xh6z.js +0 -126
  151. package/dist/web/assets/index-Beb-xh6z.js.map +0 -1
  152. package/dist/web-AXS3EMZ3.js.map +0 -1
  153. /package/dist/{account-EAVYWOKR.js.map → account-V6GS7DII.js.map} +0 -0
  154. /package/dist/{add-repo-3THEK6UG.js.map → add-repo-HG24PKHR.js.map} +0 -0
  155. /package/dist/{answer-3CJQWBGY.js.map → answer-S3VZFV4N.js.map} +0 -0
  156. /package/dist/{attach-FQSBZXI7.js.map → attach-RKIACTP2.js.map} +0 -0
  157. /package/dist/{block-NGD2KNTU.js.map → block-UUK564QX.js.map} +0 -0
  158. /package/dist/{broadcast-NLASZGWR.js.map → broadcast-73JJELJF.js.map} +0 -0
  159. /package/dist/{catchup-WJPWOGVI.js.map → catchup-JUEBM3QQ.js.map} +0 -0
  160. /package/dist/{chunk-I7AEQDG7.js.map → chunk-2KW4TFVP.js.map} +0 -0
  161. /package/dist/{chunk-33XSEAHO.js.map → chunk-2Y2ARDXI.js.map} +0 -0
  162. /package/dist/{chunk-TMAQASMH.js.map → chunk-2YTCAJT5.js.map} +0 -0
  163. /package/dist/{chunk-KCWU6HNJ.js.map → chunk-3GCD3DAB.js.map} +0 -0
  164. /package/dist/{chunk-FM6VLU4T.js.map → chunk-4F2AH2LC.js.map} +0 -0
  165. /package/dist/{chunk-DS2CKYQ4.js.map → chunk-4GNX6CQ2.js.map} +0 -0
  166. /package/dist/{chunk-JIWPC53O.js.map → chunk-52KXG5D3.js.map} +0 -0
  167. /package/dist/{chunk-H4TMS567.js.map → chunk-552RUECR.js.map} +0 -0
  168. /package/dist/{chunk-VPFAXLSX.js.map → chunk-5VV5IQC6.js.map} +0 -0
  169. /package/dist/{chunk-I3FLUAK7.js.map → chunk-6Q4PTZ3J.js.map} +0 -0
  170. /package/dist/{chunk-C7ZKDWPI.js.map → chunk-6RVZYOED.js.map} +0 -0
  171. /package/dist/{chunk-IREGW23T.js.map → chunk-6SRDHIAK.js.map} +0 -0
  172. /package/dist/{chunk-5LUXNIPA.js.map → chunk-7LQTBAYP.js.map} +0 -0
  173. /package/dist/{chunk-TSFNTMMY.js.map → chunk-7XT5MRJ2.js.map} +0 -0
  174. /package/dist/{chunk-ACNCTLFO.js.map → chunk-AMEJQT64.js.map} +0 -0
  175. /package/dist/{chunk-3257QPVM.js.map → chunk-AORYYUMW.js.map} +0 -0
  176. /package/dist/{chunk-RPWEOEA3.js.map → chunk-BMNH6B5U.js.map} +0 -0
  177. /package/dist/{chunk-5RAAS4II.js.map → chunk-CLPCEQA2.js.map} +0 -0
  178. /package/dist/{chunk-TFNDOWYP.js.map → chunk-CS5VPO7A.js.map} +0 -0
  179. /package/dist/{chunk-OIVEYULL.js.map → chunk-D7ZQNQOJ.js.map} +0 -0
  180. /package/dist/{chunk-EYDGX32Q.js.map → chunk-FFYYODXG.js.map} +0 -0
  181. /package/dist/{chunk-N5PQHNYK.js.map → chunk-G6JZ3ZQI.js.map} +0 -0
  182. /package/dist/{chunk-FC7RECDP.js.map → chunk-G7OFGBLT.js.map} +0 -0
  183. /package/dist/{chunk-45MDVVW7.js.map → chunk-GGYXNTEB.js.map} +0 -0
  184. /package/dist/{chunk-JNAYPBAB.js.map → chunk-HUX6XT2P.js.map} +0 -0
  185. /package/dist/{chunk-CS2EINZJ.js.map → chunk-HXQYGI3R.js.map} +0 -0
  186. /package/dist/{chunk-7OFVXQSM.js.map → chunk-JQ42ERH3.js.map} +0 -0
  187. /package/dist/{chunk-ANS6OH55.js.map → chunk-JVG4U3LK.js.map} +0 -0
  188. /package/dist/{chunk-DHOC2S2L.js.map → chunk-KX75V4AT.js.map} +0 -0
  189. /package/dist/{chunk-TL7K3XUY.js.map → chunk-LN2DDJGG.js.map} +0 -0
  190. /package/dist/{chunk-3O6QFWZ6.js.map → chunk-LNRODEIP.js.map} +0 -0
  191. /package/dist/{chunk-NUPLJJOS.js.map → chunk-LYZQ6IKY.js.map} +0 -0
  192. /package/dist/{chunk-S36RENUJ.js.map → chunk-M4NZ4UJA.js.map} +0 -0
  193. /package/dist/{chunk-DGVCN7HB.js.map → chunk-MOTKVMGL.js.map} +0 -0
  194. /package/dist/{chunk-RSCRZGUW.js.map → chunk-MX3JVY64.js.map} +0 -0
  195. /package/dist/{chunk-JVRS73M6.js.map → chunk-NDIAONVE.js.map} +0 -0
  196. /package/dist/{chunk-UQJQZ526.js.map → chunk-NGHIFLCM.js.map} +0 -0
  197. /package/dist/{chunk-EJSGPLXO.js.map → chunk-NLSFJYU6.js.map} +0 -0
  198. /package/dist/{chunk-PGGNMC34.js.map → chunk-P6LDKZEY.js.map} +0 -0
  199. /package/dist/{chunk-HORDAO4Z.js.map → chunk-QJZCTK25.js.map} +0 -0
  200. /package/dist/{chunk-7FNJ6A2U.js.map → chunk-QULZNML4.js.map} +0 -0
  201. /package/dist/{chunk-7DUGVGUZ.js.map → chunk-RVSRZ57P.js.map} +0 -0
  202. /package/dist/{chunk-CVMO75V5.js.map → chunk-S4L6BURS.js.map} +0 -0
  203. /package/dist/{chunk-SPVVXKDV.js.map → chunk-SNUAISLX.js.map} +0 -0
  204. /package/dist/{chunk-C72Y42VC.js.map → chunk-SOOPR7HU.js.map} +0 -0
  205. /package/dist/{chunk-3KVOYBM4.js.map → chunk-SQI5NYRZ.js.map} +0 -0
  206. /package/dist/{chunk-ZQJKAZRD.js.map → chunk-TW57JSKU.js.map} +0 -0
  207. /package/dist/{chunk-JVHHSKBJ.js.map → chunk-UH72CZAX.js.map} +0 -0
  208. /package/dist/{chunk-64M7W2OQ.js.map → chunk-UXL75FQC.js.map} +0 -0
  209. /package/dist/{chunk-BW5U6ENJ.js.map → chunk-WIJO2LYS.js.map} +0 -0
  210. /package/dist/{chunk-VVRSPS67.js.map → chunk-XTRC6IOA.js.map} +0 -0
  211. /package/dist/{chunk-7IZVI76D.js.map → chunk-XXKEL6JG.js.map} +0 -0
  212. /package/dist/{chunk-SQACJQUY.js.map → chunk-Y2RCCYRA.js.map} +0 -0
  213. /package/dist/{chunk-OTKWVUGB.js.map → chunk-YWB42FW6.js.map} +0 -0
  214. /package/dist/{chunk-GG4VKPAX.js.map → chunk-ZLQGKBBE.js.map} +0 -0
  215. /package/dist/{chunk-BHJ73OPQ.js.map → chunk-ZRY7AOET.js.map} +0 -0
  216. /package/dist/{cleanup-GFYEKCJS.js.map → cleanup-5DPCUQJQ.js.map} +0 -0
  217. /package/dist/{cli-QP3BQXVW.js.map → cli-IELHMGEY.js.map} +0 -0
  218. /package/dist/{config-W3AEOOUK.js.map → config-E6ORLTCE.js.map} +0 -0
  219. /package/dist/{diff-G53V34KI.js.map → diff-DQFERMIX.js.map} +0 -0
  220. /package/dist/{digest-W4425I4J.js.map → digest-ALSU7EYK.js.map} +0 -0
  221. /package/dist/{fork-HTPJML6G.js.map → fork-NY4QWSPG.js.map} +0 -0
  222. /package/dist/{history-TYKH3SKB.js.map → history-JY54YEZX.js.map} +0 -0
  223. /package/dist/{hook-F7WR5UIQ.js.map → hook-7Q53RMB2.js.map} +0 -0
  224. /package/dist/{hydrate-HDZ62YMD.js.map → hydrate-PV3F3QEI.js.map} +0 -0
  225. /package/dist/{init-Q5KJ666H.js.map → init-OH6UWFOJ.js.map} +0 -0
  226. /package/dist/{install-skills-C46BIZ5O.js.map → install-skills-7DE3ADWA.js.map} +0 -0
  227. /package/dist/{keep-MYHUCQWD.js.map → keep-H5VWXD2E.js.map} +0 -0
  228. /package/dist/{list-BGHRHYV6.js.map → list-7OTXLACR.js.map} +0 -0
  229. /package/dist/{move-OHV2DC4V.js.map → move-UOKARORU.js.map} +0 -0
  230. /package/dist/{note-2I5WTKED.js.map → note-2BW5MIC6.js.map} +0 -0
  231. /package/dist/{overlaps-PX4BD23H.js.map → overlaps-UHF6XJML.js.map} +0 -0
  232. /package/dist/{pin-UTMH2XUZ.js.map → pin-GP6BZYYM.js.map} +0 -0
  233. /package/dist/{pr-PZCO36TY.js.map → pr-F5PWLPUU.js.map} +0 -0
  234. /package/dist/{prune-APCNVQKK.js.map → prune-ISXTZRRM.js.map} +0 -0
  235. /package/dist/{pty-host-Q5VNQKP2.js.map → pty-host-IKZRLX3W.js.map} +0 -0
  236. /package/dist/{read-HSQNG4CA.js.map → read-ARVCB7A2.js.map} +0 -0
  237. /package/dist/{recent-SNDWYLUH.js.map → recent-NZMHV2NQ.js.map} +0 -0
  238. /package/dist/{remove-5F5SP5TM.js.map → remove-NCWMZUDU.js.map} +0 -0
  239. /package/dist/{restart-HWSAV22N.js.map → restart-QQEWWBSM.js.map} +0 -0
  240. /package/dist/{resume-DBO7FTEQ.js.map → resume-V4P7XAT2.js.map} +0 -0
  241. /package/dist/{review-now-CZPT7X4K.js.map → review-now-NXMBEJ5R.js.map} +0 -0
  242. /package/dist/{run-QQARI2AH.js.map → run-M4RWGT2R.js.map} +0 -0
  243. /package/dist/{screen-SXJEHTUY.js.map → screen-KCVCST6K.js.map} +0 -0
  244. /package/dist/{search-U25QWSX4.js.map → search-BRKX3NF5.js.map} +0 -0
  245. /package/dist/{section-TCH4DXE7.js.map → section-272JIEIG.js.map} +0 -0
  246. /package/dist/{send-ZCKMC65W.js.map → send-4LFQLZR3.js.map} +0 -0
  247. /package/dist/{sessions-7PKZZ4NG.js.map → sessions-Y7JJHAVI.js.map} +0 -0
  248. /package/dist/{snooze-JBPRRYAF.js.map → snooze-LJ3INJ47.js.map} +0 -0
  249. /package/dist/{start-L6AWLRVP.js.map → start-MULJ7JIP.js.map} +0 -0
  250. /package/dist/{status-WWRZLDGT.js.map → status-Q4ZX37RP.js.map} +0 -0
  251. /package/dist/{stop-WHUBU5JZ.js.map → stop-CBCMLFNH.js.map} +0 -0
  252. /package/dist/{sync-AVDUHYPQ.js.map → sync-IYFBEFQX.js.map} +0 -0
  253. /package/dist/{time-MIJM6SM6.js.map → time-WSCPEGQC.js.map} +0 -0
  254. /package/dist/{time-actions-Y5USDGSE.js.map → time-actions-KYFYV7F2.js.map} +0 -0
  255. /package/dist/{timesheet-AVRH56TG.js.map → timesheet-6W6OPPVP.js.map} +0 -0
  256. /package/dist/{todo-O6Y5MEQR.js.map → todo-54OJY5VV.js.map} +0 -0
  257. /package/dist/{tree-7YD6DL3H.js.map → tree-32OEZDDU.js.map} +0 -0
  258. /package/dist/{update-XGT2DFTT.js.map → update-JQSKHI47.js.map} +0 -0
  259. /package/dist/{usage-7NM6L2MR.js.map → usage-5BOIIANY.js.map} +0 -0
  260. /package/dist/{version-V7IM2UL4.js.map → version-4S7I7GHM.js.map} +0 -0
  261. /package/dist/{wait-HCIFDLNX.js.map → wait-I3I35CV6.js.map} +0 -0
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  ensureAgentPath,
4
4
  restartHost
5
- } from "./chunk-45MDVVW7.js";
5
+ } from "./chunk-GGYXNTEB.js";
6
6
  import {
7
7
  createMonthGather,
8
8
  defaultTimeDeps,
@@ -16,7 +16,7 @@ import {
16
16
  graphProblem,
17
17
  signOutGraph,
18
18
  startDeviceLogin
19
- } from "./chunk-DHOC2S2L.js";
19
+ } from "./chunk-KX75V4AT.js";
20
20
  import {
21
21
  addTask,
22
22
  completeTask,
@@ -24,7 +24,7 @@ import {
24
24
  getTasks,
25
25
  removeTask,
26
26
  uncompleteTask
27
- } from "./chunk-7OFVXQSM.js";
27
+ } from "./chunk-JQ42ERH3.js";
28
28
  import {
29
29
  commentInputSchema,
30
30
  detectParentBranch,
@@ -38,7 +38,7 @@ import {
38
38
  serveSpa,
39
39
  sessionBaseForPath,
40
40
  submitReviewSchema
41
- } from "./chunk-FM6VLU4T.js";
41
+ } from "./chunk-4F2AH2LC.js";
42
42
  import {
43
43
  announceChange,
44
44
  createArchivedRows,
@@ -53,31 +53,31 @@ import {
53
53
  stageSeenKey,
54
54
  storeHolding,
55
55
  withRestoring
56
- } from "./chunk-7IZVI76D.js";
56
+ } from "./chunk-XXKEL6JG.js";
57
57
  import {
58
58
  createDigestSource
59
- } from "./chunk-C7ZKDWPI.js";
59
+ } from "./chunk-6RVZYOED.js";
60
60
  import {
61
61
  createBuildFoldersJob,
62
62
  defaultBranchTidyDeps,
63
63
  defaultBuildFoldersDeps,
64
64
  deleteMergedBranches,
65
65
  findMergedBranches
66
- } from "./chunk-JIWPC53O.js";
66
+ } from "./chunk-52KXG5D3.js";
67
67
  import {
68
68
  defaultCleanupDeps
69
- } from "./chunk-KCWU6HNJ.js";
69
+ } from "./chunk-3GCD3DAB.js";
70
70
  import {
71
71
  DiffStatCache,
72
72
  findOverlaps,
73
73
  wantsDiffStat
74
- } from "./chunk-I3FLUAK7.js";
74
+ } from "./chunk-6Q4PTZ3J.js";
75
75
  import {
76
76
  MAX_NOTE_CHARS,
77
77
  readNote,
78
78
  saveNote,
79
79
  sessionsWithNotes
80
- } from "./chunk-33XSEAHO.js";
80
+ } from "./chunk-2Y2ARDXI.js";
81
81
  import {
82
82
  addBlocker,
83
83
  allBlocks,
@@ -89,13 +89,13 @@ import {
89
89
  removeBlocker,
90
90
  sweepBlocks,
91
91
  unblockedPrompt
92
- } from "./chunk-TSFNTMMY.js";
92
+ } from "./chunk-7XT5MRJ2.js";
93
93
  import {
94
94
  jiraWorklogPoster,
95
95
  logWorkDay,
96
96
  loggedDays,
97
97
  worklogSettings
98
- } from "./chunk-GG4VKPAX.js";
98
+ } from "./chunk-ZLQGKBBE.js";
99
99
  import {
100
100
  accountOverview,
101
101
  accountSkillsNote,
@@ -107,16 +107,16 @@ import {
107
107
  removeAgentAccount,
108
108
  setDefaultAgentAccount,
109
109
  switchRefusal
110
- } from "./chunk-H4TMS567.js";
110
+ } from "./chunk-552RUECR.js";
111
111
  import {
112
112
  buildUsage,
113
113
  realUsageDeps,
114
114
  setupAgentUsage
115
- } from "./chunk-BHJ73OPQ.js";
115
+ } from "./chunk-ZRY7AOET.js";
116
116
  import {
117
117
  sessionWorkTime
118
- } from "./chunk-OTKWVUGB.js";
119
- import "./chunk-6UTH3A76.js";
118
+ } from "./chunk-YWB42FW6.js";
119
+ import "./chunk-UVZITL47.js";
120
120
  import {
121
121
  sendToSession
122
122
  } from "./chunk-KWHHB737.js";
@@ -124,11 +124,11 @@ import {
124
124
  defaultForkDeps,
125
125
  forkSession,
126
126
  startSessionWithPrompt
127
- } from "./chunk-VPFAXLSX.js";
127
+ } from "./chunk-5VV5IQC6.js";
128
128
  import {
129
129
  addRepoRefusal,
130
130
  addedRepoNote
131
- } from "./chunk-5LUXNIPA.js";
131
+ } from "./chunk-7LQTBAYP.js";
132
132
  import {
133
133
  BehindCache,
134
134
  behindMain,
@@ -144,14 +144,14 @@ import {
144
144
  stackedOn,
145
145
  updateFromBase,
146
146
  updateFromMain
147
- } from "./chunk-OIVEYULL.js";
147
+ } from "./chunk-D7ZQNQOJ.js";
148
148
  import {
149
149
  askCatchUp,
150
150
  cachedCatchUp,
151
151
  catchUp,
152
152
  catchUpFacts,
153
153
  forgetCatchUp
154
- } from "./chunk-TFNDOWYP.js";
154
+ } from "./chunk-CS5VPO7A.js";
155
155
  import {
156
156
  applyPlacePatch,
157
157
  applySectionOp,
@@ -160,7 +160,7 @@ import {
160
160
  cleanSectionOp,
161
161
  placeSession,
162
162
  readRailLayout
163
- } from "./chunk-DGVCN7HB.js";
163
+ } from "./chunk-MOTKVMGL.js";
164
164
  import {
165
165
  DEFAULT_CATCH_UP_DAYS,
166
166
  addDays,
@@ -185,7 +185,7 @@ import {
185
185
  tempoSetup,
186
186
  timeRange,
187
187
  updateDay
188
- } from "./chunk-VVRSPS67.js";
188
+ } from "./chunk-XTRC6IOA.js";
189
189
  import {
190
190
  DISCUSSION_OPEN_MIN_MS,
191
191
  LEFT_OVER_SUBMIT,
@@ -227,7 +227,7 @@ import {
227
227
  withClaim,
228
228
  withFixClaim,
229
229
  withoutFixClaim
230
- } from "./chunk-IUWMT6PF.js";
230
+ } from "./chunk-HUD4JLK3.js";
231
231
  import {
232
232
  asData,
233
233
  asDataBlock
@@ -248,7 +248,7 @@ import {
248
248
  checkTools,
249
249
  saveFolders,
250
250
  setupState
251
- } from "./chunk-UQJQZ526.js";
251
+ } from "./chunk-NGHIFLCM.js";
252
252
  import {
253
253
  RepoAdminError,
254
254
  deleteGroup,
@@ -260,7 +260,7 @@ import {
260
260
  setRepoIgnored,
261
261
  setReviewMode,
262
262
  setScanRoot
263
- } from "./chunk-BW5U6ENJ.js";
263
+ } from "./chunk-WIJO2LYS.js";
264
264
  import {
265
265
  freeLeftovers,
266
266
  leftoversOf,
@@ -269,14 +269,14 @@ import {
269
269
  parsePrRef,
270
270
  resolvePrToStart,
271
271
  workOnPrPrompt
272
- } from "./chunk-JNAYPBAB.js";
272
+ } from "./chunk-HUX6XT2P.js";
273
273
  import {
274
274
  legacyUnsafeCheck
275
- } from "./chunk-C72Y42VC.js";
275
+ } from "./chunk-SOOPR7HU.js";
276
276
  import {
277
277
  agentsBySession,
278
278
  summarizeAgents
279
- } from "./chunk-IREGW23T.js";
279
+ } from "./chunk-6SRDHIAK.js";
280
280
  import {
281
281
  howToLift
282
282
  } from "./chunk-FZHFD2AY.js";
@@ -286,15 +286,15 @@ import {
286
286
  import {
287
287
  editorArgs,
288
288
  openUrl
289
- } from "./chunk-3KVOYBM4.js";
289
+ } from "./chunk-SQI5NYRZ.js";
290
290
  import {
291
291
  removeWorktreeInChild
292
- } from "./chunk-SQACJQUY.js";
292
+ } from "./chunk-Y2RCCYRA.js";
293
293
  import {
294
294
  archiveMergedSession,
295
295
  archiveWaiting,
296
296
  defaultArchiveDeps
297
- } from "./chunk-NUPLJJOS.js";
297
+ } from "./chunk-LYZQ6IKY.js";
298
298
  import {
299
299
  cleanupVerdict,
300
300
  createCleanupJob
@@ -314,7 +314,7 @@ import {
314
314
  retireResolvedReplies,
315
315
  sessionRepoRefs,
316
316
  withThreadContext
317
- } from "./chunk-5RAAS4II.js";
317
+ } from "./chunk-CLPCEQA2.js";
318
318
  import {
319
319
  DEFAULT_TRUSTED_BOTS,
320
320
  createCiStore,
@@ -324,23 +324,23 @@ import {
324
324
  openThreadsOf,
325
325
  reviewMessage,
326
326
  subAgentHint
327
- } from "./chunk-ANS6OH55.js";
327
+ } from "./chunk-JVG4U3LK.js";
328
328
  import {
329
329
  sessionStatusView,
330
330
  shownState
331
- } from "./chunk-ACNCTLFO.js";
331
+ } from "./chunk-AMEJQT64.js";
332
332
  import {
333
333
  internalReadOnly,
334
334
  runInternal,
335
335
  runInternalReadOnly,
336
336
  summarizeCheckpoint,
337
337
  throttleTrailing
338
- } from "./chunk-B2K2I2PQ.js";
338
+ } from "./chunk-4GPKT5A2.js";
339
339
  import {
340
340
  computeDiff,
341
341
  computeRangeDiff,
342
342
  parseGitDiff
343
- } from "./chunk-CVMO75V5.js";
343
+ } from "./chunk-S4L6BURS.js";
344
344
  import {
345
345
  commandWords,
346
346
  describeProcess,
@@ -357,7 +357,7 @@ import {
357
357
  keyedQueue,
358
358
  oneAtATime,
359
359
  runWorkChild
360
- } from "./chunk-RPWEOEA3.js";
360
+ } from "./chunk-BMNH6B5U.js";
361
361
  import {
362
362
  configurePtyPool,
363
363
  detachPtyPool,
@@ -381,22 +381,22 @@ import {
381
381
  syncPtyPool,
382
382
  terminalTicketUrl,
383
383
  writeToPty
384
- } from "./chunk-ZQJKAZRD.js";
385
- import "./chunk-7FNJ6A2U.js";
384
+ } from "./chunk-TW57JSKU.js";
385
+ import "./chunk-QULZNML4.js";
386
386
  import {
387
387
  disposeAllWatchers,
388
388
  disposeSessionWatcher,
389
389
  findSession as findSession2,
390
390
  subscribeSession
391
- } from "./chunk-3O6QFWZ6.js";
392
- import "./chunk-DS2CKYQ4.js";
393
- import "./chunk-EYDGX32Q.js";
391
+ } from "./chunk-LNRODEIP.js";
392
+ import "./chunk-4GNX6CQ2.js";
393
+ import "./chunk-FFYYODXG.js";
394
394
  import {
395
395
  teardownWorktree,
396
396
  toBaseSpec,
397
397
  wouldRefuseRemoval
398
- } from "./chunk-TMAQASMH.js";
399
- import "./chunk-JVHHSKBJ.js";
398
+ } from "./chunk-2YTCAJT5.js";
399
+ import "./chunk-UH72CZAX.js";
400
400
  import {
401
401
  isWorktreeFolder
402
402
  } from "./chunk-LSZ6HI3U.js";
@@ -405,18 +405,18 @@ import {
405
405
  assistantDir,
406
406
  describeView,
407
407
  writeAssistantContext
408
- } from "./chunk-SPVVXKDV.js";
408
+ } from "./chunk-SNUAISLX.js";
409
409
  import "./chunk-7E5XPDKX.js";
410
- import "./chunk-RSCRZGUW.js";
410
+ import "./chunk-MX3JVY64.js";
411
411
  import {
412
412
  NOTE_NUDGE,
413
413
  findSessionForCwd,
414
414
  readPendingForSession,
415
415
  readPendingForWorktree
416
- } from "./chunk-PGGNMC34.js";
416
+ } from "./chunk-P6LDKZEY.js";
417
417
  import {
418
418
  getCommentFileStore
419
- } from "./chunk-7DUGVGUZ.js";
419
+ } from "./chunk-RVSRZ57P.js";
420
420
  import "./chunk-ZSHWP2VS.js";
421
421
  import {
422
422
  createCommentStore
@@ -433,17 +433,17 @@ import {
433
433
  stageInputOf,
434
434
  withRequiredChecks,
435
435
  workElsewhere
436
- } from "./chunk-TL7K3XUY.js";
436
+ } from "./chunk-LN2DDJGG.js";
437
437
  import {
438
438
  createSessionBranches
439
- } from "./chunk-EJSGPLXO.js";
439
+ } from "./chunk-NLSFJYU6.js";
440
440
  import {
441
441
  defaultHost,
442
442
  hostById,
443
443
  hostForRepo,
444
444
  hostOfPrUrl,
445
445
  originHostname
446
- } from "./chunk-JVRS73M6.js";
446
+ } from "./chunk-NDIAONVE.js";
447
447
  import {
448
448
  MAX_THREAD_BODY
449
449
  } from "./chunk-FGPXMAYU.js";
@@ -456,7 +456,7 @@ import {
456
456
  readSessionBranches,
457
457
  repoNameOf,
458
458
  wasPushed
459
- } from "./chunk-64M7W2OQ.js";
459
+ } from "./chunk-UXL75FQC.js";
460
460
  import {
461
461
  enrollProblem,
462
462
  groupProblem,
@@ -557,7 +557,7 @@ import {
557
557
  updateCheckpoint,
558
558
  whileRestoring,
559
559
  writeArchiveRecord
560
- } from "./chunk-NOB3VR5I.js";
560
+ } from "./chunk-KHGP6MS2.js";
561
561
  import {
562
562
  dayKey
563
563
  } from "./chunk-NEJVK5CF.js";
@@ -568,7 +568,7 @@ import {
568
568
  sessionIdFor,
569
569
  tx,
570
570
  withDb
571
- } from "./chunk-RUYTU2WJ.js";
571
+ } from "./chunk-RRNIJ7YO.js";
572
572
  import {
573
573
  packageRoot
574
574
  } from "./chunk-LNHSBM4L.js";
@@ -589,10 +589,10 @@ import {
589
589
  readJsonlSince,
590
590
  refShaFromFiles,
591
591
  workingBranch
592
- } from "./chunk-DTFACBDD.js";
592
+ } from "./chunk-Z6B4ICOI.js";
593
593
  import {
594
594
  VERSION
595
- } from "./chunk-FC7RECDP.js";
595
+ } from "./chunk-G7OFGBLT.js";
596
596
  import {
597
597
  resolveProjectTarget
598
598
  } from "./chunk-7UXV4X2Y.js";
@@ -617,7 +617,7 @@ import {
617
617
  accountOfLoginId
618
618
  } from "./chunk-SJBEIYLK.js";
619
619
  import "./chunk-AYHDJMMJ.js";
620
- import "./chunk-DROLR3NJ.js";
620
+ import "./chunk-42MD5W5R.js";
621
621
  import {
622
622
  DEFAULT_ACCOUNT_NAME,
623
623
  accountNameProblem
@@ -1347,18 +1347,24 @@ function withFocusNotes(main, passes, paths) {
1347
1347
  }
1348
1348
  return added ? JSON.stringify({ ...o, notes }) : main;
1349
1349
  }
1350
+ function pickChanges(diff, repo) {
1351
+ const changed = diff.repos.filter((r) => r.files.length > 0);
1352
+ const picked = repo === void 0 ? changed : changed.filter((r) => r.name === repo);
1353
+ const together = picked.length > 1;
1354
+ const all = together ? picked.flatMap((r) => r.files.map((f) => inRepo(r.name, f))) : picked[0]?.files ?? [];
1355
+ return { repos: changed.map((r) => r.name), picked, together, all };
1356
+ }
1357
+ function localSignature(diff, repo) {
1358
+ return diffSignature(pickChanges(diff, repo).all);
1359
+ }
1350
1360
  async function prepareLocalReview(session, repo, deps) {
1351
1361
  const diff = deps.diff(session);
1352
- const changed = diff.repos.filter((r) => r.files.length > 0);
1353
- const repos = changed.map((r) => r.name);
1354
1362
  if (repo !== void 0 && !diff.repos.some((r) => r.name === repo)) throw new Error(`${repo} is not one of this session's repos`);
1355
- const picked = repo === void 0 ? changed : changed.filter((r) => r.name === repo);
1363
+ const { repos, picked, together, all } = pickChanges(diff, repo);
1356
1364
  if (picked.length === 0)
1357
1365
  throw new Error(
1358
1366
  repo ? `Nothing has changed in ${repo} since ${diff.resolvedBase}.` : `Nothing has changed on this branch since ${diff.resolvedBase}.`
1359
1367
  );
1360
- const together = picked.length > 1;
1361
- const all = together ? picked.flatMap((r) => r.files.map((f) => inRepo(r.name, f))) : picked[0].files;
1362
1368
  const { files, ignored } = splitIgnored(all);
1363
1369
  const extras = { whitespaceOnly: /* @__PURE__ */ new Set(), generated: /* @__PURE__ */ new Set() };
1364
1370
  const rules = deps.rules?.();
@@ -1366,15 +1372,28 @@ async function prepareLocalReview(session, repo, deps) {
1366
1372
  const kinds = kindsOf(files, extras, rules);
1367
1373
  const agent = deps.agent;
1368
1374
  const prompt = agent ? reviewPrompt(meta, files, kinds) : null;
1369
- const ask = (p) => p && agent ? agent(p).catch(() => null) : Promise.resolve(null);
1375
+ const tree = prompt && agent && deps.inTree ? await deps.inTree(
1376
+ session,
1377
+ picked.map((r) => r.name)
1378
+ ).catch((err) => ({ why: err.message })) : null;
1379
+ const inTree = tree && "ask" in tree ? tree : null;
1380
+ let fellBack = 0;
1381
+ let passesAsked = 0;
1382
+ const ask = async (opts = {}) => {
1383
+ if (!agent) return null;
1384
+ passesAsked++;
1385
+ if (inTree) {
1386
+ const there = reviewPrompt(meta, files, kinds, { ...opts, checkout: inTree.lines });
1387
+ const answer2 = there ? await inTree.ask(there).catch(() => null) : null;
1388
+ if (answer2) return answer2;
1389
+ fellBack++;
1390
+ }
1391
+ const plain = reviewPrompt(meta, files, kinds, opts);
1392
+ return plain ? agent(plain).catch(() => null) : null;
1393
+ };
1370
1394
  const asked = promptPaths(kinds);
1371
1395
  const focused = together && prompt ? picked.map((r) => r.name).filter((name) => asked.some((p) => p.startsWith(`${name}/`))) : [];
1372
- const [main, ...passes] = prompt && agent ? await Promise.all([
1373
- ask(prompt),
1374
- ...focused.map(
1375
- (name) => ask(reviewPrompt(meta, files, kinds, { focus: focusLines(name), first: (p) => p.startsWith(`${name}/`) }))
1376
- )
1377
- ]) : [void 0];
1396
+ const [main, ...passes] = prompt && agent ? await Promise.all([ask(), ...focused.map((name) => ask({ focus: focusLines(name), first: (p) => p.startsWith(`${name}/`) }))]) : [void 0];
1378
1397
  const answer = main === void 0 ? void 0 : withFocusNotes(
1379
1398
  main,
1380
1399
  focused.map((name, i) => ({ repo: name, answer: passes[i] ?? null })),
@@ -1386,45 +1405,106 @@ async function prepareLocalReview(session, repo, deps) {
1386
1405
  ...deps.agent ? {} : { notAskedWhy: "no agent for the AI step: stories are by folder" },
1387
1406
  ignored
1388
1407
  });
1389
- return { review, repo: together ? null : picked[0].name, files, repos };
1408
+ const how = !prompt ? void 0 : inTree ? fellBack === 0 ? "read in its folder" : fellBack === passesAsked ? "read from the diff alone (the run in its folder gave no answer)" : `read in its folder (${fellBack} of ${passesAsked} passes from the diff alone: the run in its folder gave no answer)` : tree && "why" in tree ? `read from the diff alone (${tree.why})` : "read from the diff alone";
1409
+ return { review, repo: together ? null : picked[0].name, files, repos, ...how ? { how } : {} };
1390
1410
  }
1391
1411
  function createLocalReviews(deps) {
1392
1412
  const kept = /* @__PURE__ */ new Map();
1393
1413
  const now = () => (deps.now?.() ?? /* @__PURE__ */ new Date()).toISOString();
1414
+ const of = (sessionId) => {
1415
+ const k = kept.get(sessionId);
1416
+ if (k) return k;
1417
+ const s = deps.store?.read(sessionId);
1418
+ if (!s) return void 0;
1419
+ const back = {
1420
+ status: "ready",
1421
+ repo: s.repo,
1422
+ repos: s.repos,
1423
+ prepared: s.prepared,
1424
+ at: s.at,
1425
+ sent: s.sent,
1426
+ dismissed: s.dismissed
1427
+ };
1428
+ kept.set(sessionId, back);
1429
+ return back;
1430
+ };
1431
+ const persist = (sessionId, k) => {
1432
+ if (k.status !== "ready" || !k.prepared) return;
1433
+ deps.store?.save(sessionId, { repo: k.repo, repos: k.repos, prepared: k.prepared, at: k.at, sent: k.sent, dismissed: k.dismissed });
1434
+ };
1394
1435
  const wire = (k) => !k ? { status: "none", repo: null, repos: [] } : {
1395
1436
  status: k.status,
1396
1437
  repo: k.repo,
1397
1438
  repos: k.repos,
1398
1439
  at: k.at,
1399
- ...k.prepared ? { review: k.prepared.review } : {},
1440
+ ...k.prepared ? { review: k.prepared.review, sent: k.sent, dismissed: k.dismissed } : {},
1441
+ ...k.prepared?.how ? { how: k.prepared.how } : {},
1400
1442
  ...k.error ? { error: k.error } : {}
1401
1443
  };
1444
+ const mark = (sessionId, change) => {
1445
+ const k = of(sessionId);
1446
+ if (!k?.prepared) return false;
1447
+ change(k, new Set(k.prepared.review.drafts.map((d) => d.id)));
1448
+ persist(sessionId, k);
1449
+ return true;
1450
+ };
1402
1451
  return {
1403
- state: (sessionId) => wire(kept.get(sessionId)),
1452
+ state: (sessionId) => wire(of(sessionId)),
1404
1453
  /** The diff the kept review was made of; null when none is ready. */
1405
- files: (sessionId) => kept.get(sessionId)?.prepared?.files ?? null,
1454
+ files: (sessionId) => of(sessionId)?.prepared?.files ?? null,
1406
1455
  start(sessionId, session, repo) {
1407
- const was = kept.get(sessionId);
1456
+ const was = of(sessionId);
1408
1457
  if (was?.status === "running") return wire(was);
1409
1458
  const running = {
1410
1459
  status: "running",
1411
1460
  repo: repo ?? null,
1412
1461
  repos: was?.repos ?? [],
1413
1462
  at: now(),
1463
+ sent: was?.prepared ? was.sent : [],
1464
+ dismissed: was?.prepared ? was.dismissed : [],
1414
1465
  ...was?.prepared ? { prepared: was.prepared } : {}
1415
1466
  };
1416
1467
  kept.set(sessionId, running);
1417
1468
  void deps.prepare(session, repo).then(
1418
- (p) => ({ status: "ready", repo: p.repo, repos: p.repos, prepared: p, at: now() }),
1419
- (err) => ({ status: "failed", repo: repo ?? null, repos: running.repos, error: err.message, at: now() })
1469
+ // Another review: none of its notes is sent or dismissed yet.
1470
+ (p) => ({ status: "ready", repo: p.repo, repos: p.repos, prepared: p, at: now(), sent: [], dismissed: [] }),
1471
+ // The one from before stays the kept one (and the stored one): only this try failed.
1472
+ (err) => ({
1473
+ status: "failed",
1474
+ repo: repo ?? null,
1475
+ repos: running.repos,
1476
+ error: err.message,
1477
+ at: now(),
1478
+ sent: running.sent,
1479
+ dismissed: running.dismissed,
1480
+ ...running.prepared ? { prepared: running.prepared } : {}
1481
+ })
1420
1482
  ).then((next) => {
1421
1483
  if (kept.get(sessionId) !== running) return;
1422
1484
  kept.set(sessionId, next);
1485
+ persist(sessionId, next);
1423
1486
  deps.onChange(sessionId);
1424
1487
  });
1425
1488
  return wire(running);
1426
1489
  },
1427
- drop: (sessionId) => void kept.delete(sessionId)
1490
+ /** These notes were handed to the agent (only ones the review has). */
1491
+ markSent: (sessionId, ids) => mark(sessionId, (k, known) => {
1492
+ k.sent = [.../* @__PURE__ */ new Set([...k.sent, ...ids.filter((x) => known.has(x))])];
1493
+ }),
1494
+ /** Dismiss a note (`on` false: bring it back). False when no review is ready, or it has no such note. */
1495
+ dismiss(sessionId, noteId, on = true) {
1496
+ let found = false;
1497
+ const ok = mark(sessionId, (k, known) => {
1498
+ found = known.has(noteId);
1499
+ if (!found) return;
1500
+ k.dismissed = on ? [.../* @__PURE__ */ new Set([...k.dismissed, noteId])] : k.dismissed.filter((x) => x !== noteId);
1501
+ });
1502
+ return ok && found;
1503
+ },
1504
+ drop: (sessionId) => {
1505
+ kept.delete(sessionId);
1506
+ deps.store?.drop(sessionId);
1507
+ }
1428
1508
  };
1429
1509
  }
1430
1510
  var MAX_NOTE = 1500;
@@ -1444,7 +1524,8 @@ function localReviewNote(review, ids) {
1444
1524
  function mountSessionReviewRoutes(app, deps) {
1445
1525
  const reviews = createLocalReviews({
1446
1526
  prepare: deps.prepare,
1447
- onChange: (sessionId) => deps.broadcast("session-review-changed", { sessionId })
1527
+ onChange: (sessionId) => deps.broadcast("session-review-changed", { sessionId }),
1528
+ ...deps.store ? { store: deps.store } : {}
1448
1529
  });
1449
1530
  app.get("/api/sessions/:id/review", (c) => {
1450
1531
  const id = c.req.param("id");
@@ -1466,32 +1547,114 @@ function mountSessionReviewRoutes(app, deps) {
1466
1547
  const files = reviews.files(id);
1467
1548
  return files ? c.json({ files }) : c.json({ error: "no review of it is prepared" }, 404);
1468
1549
  });
1550
+ app.get("/api/sessions/:id/review/current", (c) => {
1551
+ const id = c.req.param("id");
1552
+ const session = findSession2(id);
1553
+ if (!session) return c.json({ error: "unknown session" }, 404);
1554
+ const kept = reviews.state(id);
1555
+ if (!kept.review) return c.json({ error: "no review of it is prepared" }, 404);
1556
+ if (session.archivedAt) return c.json({ current: true });
1557
+ let now;
1558
+ try {
1559
+ now = deps.signature(session, kept.repo);
1560
+ } catch (err) {
1561
+ return c.json({ error: err.message }, 502);
1562
+ }
1563
+ return c.json({ current: now === kept.review.headSha });
1564
+ });
1469
1565
  app.post("/api/sessions/:id/review/send", async (c) => {
1470
1566
  const id = c.req.param("id");
1471
1567
  if (!findSession2(id)) return c.json({ error: "unknown session" }, 404);
1472
1568
  const body = await c.req.json().catch(() => ({}));
1473
1569
  const ids = body.ids === void 0 ? void 0 : Array.isArray(body.ids) ? body.ids.filter((x) => typeof x === "string") : null;
1474
1570
  if (ids === null) return c.json({ error: "ids: string[]" }, 400);
1475
- const review = reviews.state(id).review;
1571
+ const kept = reviews.state(id);
1572
+ const review = kept.review;
1476
1573
  if (!review) return c.json({ error: "no review of it is prepared" }, 409);
1477
- const note = localReviewNote(review, ids);
1574
+ const gone = new Set(kept.dismissed ?? []);
1575
+ const wanted = ids ?? review.drafts.filter((d) => d.state === "draft" && !gone.has(d.id)).map((d) => d.id);
1576
+ const note = localReviewNote(review, wanted);
1478
1577
  if (!note) return c.json({ error: "It has no notes to hand over." }, 409);
1479
1578
  try {
1480
1579
  await deps.tell(id, note);
1481
1580
  } catch (err) {
1482
1581
  return c.json({ error: err.message }, 502);
1483
1582
  }
1484
- return c.json({
1485
- ok: true,
1486
- sent: ids ? ids.filter((x) => review.drafts.some((d) => d.id === x && d.state === "draft")).length : review.drafts.filter((d) => d.state === "draft").length
1487
- });
1583
+ const went = wanted.filter((x) => review.drafts.some((d) => d.id === x && d.state === "draft"));
1584
+ reviews.markSent(id, went);
1585
+ deps.broadcast("session-review-changed", { sessionId: id });
1586
+ return c.json({ ok: true, sent: went.length });
1587
+ });
1588
+ app.post("/api/sessions/:id/review/dismiss", async (c) => {
1589
+ const id = c.req.param("id");
1590
+ if (!findSession2(id)) return c.json({ error: "unknown session" }, 404);
1591
+ const body = await c.req.json().catch(() => ({}));
1592
+ if (typeof body.id !== "string" || !body.id) return c.json({ error: "id: string" }, 400);
1593
+ if (!reviews.dismiss(id, body.id, body.undo !== true)) return c.json({ error: "no such note in the review prepared for it" }, 404);
1594
+ deps.broadcast("session-review-changed", { sessionId: id });
1595
+ return c.json(reviews.state(id));
1488
1596
  });
1489
1597
  return { drop: reviews.drop };
1490
1598
  }
1491
1599
 
1600
+ // src/core/review/local-review-store.ts
1601
+ var strings2 = (v) => Array.isArray(v) && v.every((x) => typeof x === "string");
1602
+ function isStoredLocalReview(v) {
1603
+ const o = v;
1604
+ if (!o || typeof o !== "object") return false;
1605
+ const p = o.prepared;
1606
+ return (o.repo === null || typeof o.repo === "string") && strings2(o.repos) && typeof o.at === "string" && strings2(o.sent) && strings2(o.dismissed) && !!p && typeof p === "object" && Array.isArray(p.files) && strings2(p.repos) && !!p.review && typeof p.review === "object" && typeof p.review.headSha === "string" && Array.isArray(p.review.drafts) && Array.isArray(p.review.stories) && Array.isArray(p.review.files);
1607
+ }
1608
+ function readLocalReview(sessionId) {
1609
+ const row = withDb(
1610
+ (d) => d.prepare("SELECT data FROM session_reviews WHERE session_id = ?").get(sessionId)
1611
+ );
1612
+ const v = row ? json.parse(row.data) : null;
1613
+ return isStoredLocalReview(v) ? v : null;
1614
+ }
1615
+ function saveLocalReview(sessionId, review) {
1616
+ withDb(
1617
+ (d) => d.prepare("INSERT OR REPLACE INTO session_reviews (session_id, data) VALUES (?, ?)").run(sessionId, JSON.stringify(review))
1618
+ );
1619
+ }
1620
+ function dropLocalReview(sessionId) {
1621
+ withDb((d) => d.prepare("DELETE FROM session_reviews WHERE session_id = ?").run(sessionId));
1622
+ }
1623
+
1624
+ // src/core/review/local-review-tree.ts
1625
+ import path2 from "path";
1626
+ var norm = (p) => path2.resolve(p).replace(/\\/g, "/").replace(/\/+$/, "");
1627
+ function sessionTree(paths, names) {
1628
+ const byName = /* @__PURE__ */ new Map();
1629
+ for (const p of paths) byName.set(path2.basename(norm(p)), [...byName.get(path2.basename(norm(p))) ?? [], norm(p)]);
1630
+ const dirs = names.map((n) => byName.get(n));
1631
+ if (names.length === 0 || dirs.some((d) => !d || d.length !== 1)) return null;
1632
+ const found = dirs.map((d) => d[0]);
1633
+ if (names.length === 1) return { cwd: found[0], repos: [{ dir: found[0], sub: null }] };
1634
+ const parent = path2.posix.dirname(found[0]);
1635
+ if (found.some((d) => path2.posix.dirname(d) !== parent)) return null;
1636
+ return { cwd: parent, repos: found.map((dir, i) => ({ dir, sub: names[i] })) };
1637
+ }
1638
+ var LOCAL_TREE_TIMEOUT_MS = 42e4;
1639
+ var SEVERAL_REPOS_LINE = "The folder holds several repos, each in the folder its paths start with: a file's path as listed is its path from where you are.";
1640
+ async function localTreeRun(paths, names, deps) {
1641
+ const mode = deps.readOnly();
1642
+ if (!mode?.localLines) return { why: "the agent has no read-only mode" };
1643
+ const tree = sessionTree(paths, names);
1644
+ if (!tree) return { why: "its repos are not in one folder" };
1645
+ if (!deps.exists(tree.cwd) || tree.repos.some((r) => !deps.exists(r.dir))) return { why: "its folder is not there" };
1646
+ const can = await (mode.available?.() ?? Promise.resolve({ ok: true }));
1647
+ if (!can.ok) return { why: can.why ?? "the read-only mode is not available" };
1648
+ const deny = mode.denyRules?.(tree.repos) ?? [];
1649
+ return {
1650
+ lines: [...mode.localLines, ...tree.repos.length > 1 ? [SEVERAL_REPOS_LINE] : []],
1651
+ ask: (prompt) => deps.run(prompt, tree.cwd, deny)
1652
+ };
1653
+ }
1654
+
1492
1655
  // src/core/platform/process-usage.ts
1493
1656
  import { execFile } from "child_process";
1494
- import path2 from "path";
1657
+ import path3 from "path";
1495
1658
  var num = (v) => typeof v === "number" && Number.isFinite(v) && v >= 0 ? v : null;
1496
1659
  function parseCimUsage(json2) {
1497
1660
  let data;
@@ -1537,7 +1700,7 @@ function parsePsUsage(stdout, now) {
1537
1700
  out.push({
1538
1701
  pid: Number(m[1]),
1539
1702
  ppid: Number(m[2]),
1540
- name: path2.posix.basename(first),
1703
+ name: path3.posix.basename(first),
1541
1704
  exe: first.startsWith("/") ? first : null,
1542
1705
  command,
1543
1706
  memBytes: Number(m[3]) * 1024,
@@ -1590,16 +1753,16 @@ function leftoverSummary(found) {
1590
1753
 
1591
1754
  // src/core/worktree/code-browse.ts
1592
1755
  import fs3 from "fs";
1593
- import path3 from "path";
1756
+ import path4 from "path";
1594
1757
  var MAX_CODE_FILES = 5e4;
1595
1758
  var MAX_CODE_FILE_BYTES = 2 * 1024 * 1024;
1596
1759
  var LIST_TTL_MS = 3e3;
1597
1760
  function codeRoots(s) {
1598
- return s.paths.map((p) => ({ name: path3.basename(p), root: p }));
1761
+ return s.paths.map((p) => ({ name: path4.basename(p), root: p }));
1599
1762
  }
1600
1763
  function groupRoot(s) {
1601
1764
  if (!s.isGroup || s.paths.length === 0) return null;
1602
- const parents = [...new Set(s.paths.map((p) => path3.dirname(p)))];
1765
+ const parents = [...new Set(s.paths.map((p) => path4.dirname(p)))];
1603
1766
  return parents.length === 1 ? parents[0] : null;
1604
1767
  }
1605
1768
  var realIo = {
@@ -1708,11 +1871,11 @@ async function codeFilePath(s, repo, rel, io = realIo) {
1708
1871
  if (!root) return { error: "unknown repo" };
1709
1872
  if (!allowed) return { error: "not listed" };
1710
1873
  try {
1711
- const full = path3.resolve(root, rel);
1874
+ const full = path4.resolve(root, rel);
1712
1875
  const realRoot = fs3.realpathSync.native(root);
1713
1876
  const real = fs3.realpathSync.native(full);
1714
- const inside2 = path3.relative(realRoot, real);
1715
- if (!inside2 || inside2.startsWith("..") || path3.isAbsolute(inside2)) return { error: "not listed" };
1877
+ const inside2 = path4.relative(realRoot, real);
1878
+ if (!inside2 || inside2.startsWith("..") || path4.isAbsolute(inside2)) return { error: "not listed" };
1716
1879
  const st = fs3.statSync(real);
1717
1880
  if (!st.isFile()) return { error: "unreadable" };
1718
1881
  return { real, size: st.size };
@@ -1806,9 +1969,9 @@ var NOT_NAMES = /* @__PURE__ */ new Set([
1806
1969
  "typeof",
1807
1970
  "await"
1808
1971
  ]);
1809
- function declarationOf(path21, text) {
1972
+ function declarationOf(path22, text) {
1810
1973
  for (const r of RULES) {
1811
- if (!r.ext.test(path21)) continue;
1974
+ if (!r.ext.test(path22)) continue;
1812
1975
  const m = r.re.exec(text);
1813
1976
  if (!m) continue;
1814
1977
  const name = r.name(m);
@@ -2166,7 +2329,7 @@ function mountSetupRoutes(app, opts) {
2166
2329
 
2167
2330
  // src/core/updates/update-source.ts
2168
2331
  import fs4 from "fs";
2169
- import path4 from "path";
2332
+ import path5 from "path";
2170
2333
 
2171
2334
  // src/core/updates/updates.ts
2172
2335
  function parseVersion(v) {
@@ -2223,8 +2386,8 @@ function whatsNewFor(i) {
2223
2386
  }
2224
2387
  function installKindOf(packageRoot2, configDir, hasGit) {
2225
2388
  if (!packageRoot2) return "npm";
2226
- const norm2 = (p) => p.replace(/\\/g, "/").replace(/\/+$/, "").toLowerCase();
2227
- if (norm2(packageRoot2).startsWith(`${norm2(configDir)}/runtime/`)) return "desktop";
2389
+ const norm3 = (p) => p.replace(/\\/g, "/").replace(/\/+$/, "").toLowerCase();
2390
+ if (norm3(packageRoot2).startsWith(`${norm3(configDir)}/runtime/`)) return "desktop";
2228
2391
  return hasGit ? "dev" : "npm";
2229
2392
  }
2230
2393
  function parseDesktopUpdate(text) {
@@ -2251,8 +2414,8 @@ function parseDesktopUpdate(text) {
2251
2414
  var RELEASES_REPO = "moberghr/cli-work-tree-manager";
2252
2415
  var RELEASES_URL = `https://api.github.com/repos/${RELEASES_REPO}/releases?per_page=30`;
2253
2416
  var SEEN_KEY = "ui:seen-version";
2254
- var desktopUpdatePath = () => path4.join(getConfigDir(), "desktop-update.json");
2255
- var desktopRequestPath = () => path4.join(getConfigDir(), "desktop-request.json");
2417
+ var desktopUpdatePath = () => path5.join(getConfigDir(), "desktop-update.json");
2418
+ var desktopRequestPath = () => path5.join(getConfigDir(), "desktop-request.json");
2256
2419
  async function fetchReleases(get = (url) => fetch(url, { headers: { "User-Agent": "work", Accept: "application/vnd.github+json" }, signal: AbortSignal.timeout(15e3) }), run2 = defaultRunner) {
2257
2420
  const why = await get(RELEASES_URL).then(
2258
2421
  async (res) => res.ok ? parseReleases(await res.json()) : res.status === 403 ? "GitHub's limit for this address is spent" : `GitHub answered ${res.status}`,
@@ -2314,7 +2477,7 @@ function markSeenVersion(version) {
2314
2477
  }
2315
2478
  function installKind() {
2316
2479
  const root = packageRoot();
2317
- return installKindOf(root, getConfigDir(), !!root && fs4.existsSync(path4.join(root, ".git")));
2480
+ return installKindOf(root, getConfigDir(), !!root && fs4.existsSync(path5.join(root, ".git")));
2318
2481
  }
2319
2482
  var defaultDeps = () => ({
2320
2483
  fetchReleases: () => fetchReleases(),
@@ -2579,8 +2742,8 @@ var SETTING_PATTERNS = {
2579
2742
  agentId: "^[\\w.-]+$",
2580
2743
  envName: "^[A-Za-z_][A-Za-z0-9_]*$"
2581
2744
  };
2582
- var bool = (path21, section, label, help, def, when) => ({
2583
- path: path21,
2745
+ var bool = (path22, section, label, help, def, when) => ({
2746
+ path: path22,
2584
2747
  section,
2585
2748
  label,
2586
2749
  help,
@@ -2946,7 +3109,7 @@ var SETTINGS = [
2946
3109
  "at the next work web start"
2947
3110
  )
2948
3111
  ];
2949
- var settingAt = (path21) => SETTINGS.find((f) => f.path === path21);
3112
+ var settingAt = (path22) => SETTINGS.find((f) => f.path === path22);
2950
3113
  function checkSetting(field, raw) {
2951
3114
  const checked = checkValue(field, raw);
2952
3115
  if (checked.ok && checked.value === null && field.required) return { ok: false, error: "it can\u2019t be left empty" };
@@ -2992,16 +3155,16 @@ function checkValue(field, raw) {
2992
3155
  return typeof raw === "string" && k.options.some((o) => o.value === raw) ? { ok: true, value: raw } : { ok: false, error: `one of ${k.options.map((o) => o.value).join(", ")}` };
2993
3156
  }
2994
3157
  }
2995
- function valueAt(obj, path21) {
3158
+ function valueAt(obj, path22) {
2996
3159
  let cur = obj;
2997
- for (const key of path21.split(".")) {
3160
+ for (const key of path22.split(".")) {
2998
3161
  if (!cur || typeof cur !== "object" || Array.isArray(cur)) return void 0;
2999
3162
  cur = cur[key];
3000
3163
  }
3001
3164
  return cur;
3002
3165
  }
3003
- function setValueAt(obj, path21, value) {
3004
- const keys = path21.split(".");
3166
+ function setValueAt(obj, path22, value) {
3167
+ const keys = path22.split(".");
3005
3168
  const chain = [obj];
3006
3169
  let cur = obj;
3007
3170
  for (const key of keys.slice(0, -1)) {
@@ -3038,8 +3201,8 @@ function checkRepoSetting(key, raw) {
3038
3201
  return raw === "all" || raw === "asked" || raw === "off" ? { ok: true, value: raw } : { ok: false, error: "all, asked or off" };
3039
3202
  }
3040
3203
  function repoSettingsOf(raw, alias) {
3041
- const map = (path21) => {
3042
- const m = valueAt(raw, path21);
3204
+ const map = (path22) => {
3205
+ const m = valueAt(raw, path22);
3043
3206
  return m && typeof m === "object" && !Array.isArray(m) ? m : {};
3044
3207
  };
3045
3208
  const checks = map(REPO_SETTING_PATH.requiredChecks)[alias];
@@ -3095,7 +3258,7 @@ function mountSettingsRoutes(app, opts) {
3095
3258
 
3096
3259
  // src/core/settings/settings-admin.ts
3097
3260
  import fs6 from "fs";
3098
- import path5 from "path";
3261
+ import path6 from "path";
3099
3262
  function rawConfig(file = getConfigPath()) {
3100
3263
  try {
3101
3264
  const raw = JSON.parse(fs6.readFileSync(file, "utf-8"));
@@ -3113,13 +3276,13 @@ function readSettings() {
3113
3276
  }
3114
3277
  return { values, configPath: getConfigPath() };
3115
3278
  }
3116
- async function writeSetting(path21, value) {
3117
- const field = settingAt(path21);
3118
- if (!field) throw new SettingsError(`no setting ${path21}`, 404);
3279
+ async function writeSetting(path22, value) {
3280
+ const field = settingAt(path22);
3281
+ if (!field) throw new SettingsError(`no setting ${path22}`, 404);
3119
3282
  const checked = checkSetting(field, value);
3120
3283
  if (!checked.ok) throw new SettingsError(`${field.label}: ${checked.error}`);
3121
- const toWrite = checkedFolders(path21, checked.value);
3122
- await editConfig((raw) => setValueAt(raw, path21, toWrite)).catch((err) => {
3284
+ const toWrite = checkedFolders(path22, checked.value);
3285
+ await editConfig((raw) => setValueAt(raw, path22, toWrite)).catch((err) => {
3123
3286
  throw err instanceof RepoAdminError ? new SettingsError(err.message) : err;
3124
3287
  });
3125
3288
  return readSettings();
@@ -3133,9 +3296,9 @@ function checkedFolders(at, value) {
3133
3296
  if (at === "scanRoots" && Array.isArray(value))
3134
3297
  return value.map((v) => {
3135
3298
  const p = expandHome(v);
3136
- if (!path5.isAbsolute(p))
3299
+ if (!path6.isAbsolute(p))
3137
3300
  throw new SettingsError(`Folders scanned for repos: ${v} isn't a full path (start it from the drive, / or ~)`);
3138
- const full = path5.resolve(p);
3301
+ const full = path6.resolve(p);
3139
3302
  if (!fs6.statSync(full, { throwIfNoEntry: false })?.isDirectory())
3140
3303
  throw new SettingsError(`Folders scanned for repos: ${full} isn't a folder`);
3141
3304
  return full;
@@ -3186,7 +3349,7 @@ var configSettings = {
3186
3349
  };
3187
3350
 
3188
3351
  // src/core/conversations/timeline-source.ts
3189
- import path6 from "path";
3352
+ import path7 from "path";
3190
3353
 
3191
3354
  // src/core/conversations/timeline.ts
3192
3355
  var SIZE_LABEL = /^(\d+ files? · \+\d+ −\d+|no changes)$/;
@@ -3235,7 +3398,7 @@ async function commitsOf(repo, since, run2) {
3235
3398
  if (log.code !== 0) return [];
3236
3399
  return log.stdout.split("\n").filter(Boolean).map((line) => {
3237
3400
  const [sha, at, ...subject] = line.split(" ");
3238
- return { repo: path6.basename(repo), sha, at, subject: subject.join(" ") };
3401
+ return { repo: path7.basename(repo), sha, at, subject: subject.join(" ") };
3239
3402
  });
3240
3403
  }
3241
3404
  async function sessionTimeline(s, deps = {}) {
@@ -3303,7 +3466,7 @@ function mountBlockRoutes(app, opts) {
3303
3466
 
3304
3467
  // src/server/routes/jira-watch-routes.ts
3305
3468
  import fs7 from "fs";
3306
- import path7 from "path";
3469
+ import path8 from "path";
3307
3470
 
3308
3471
  // src/core/jira/jira-prompt.ts
3309
3472
  var branchFor = (issue) => `feat/${issue.key}`;
@@ -3524,14 +3687,14 @@ async function sweepJira(deps) {
3524
3687
  var EVERY_MS = 5 * 6e4;
3525
3688
  function aboutRepo(dir) {
3526
3689
  try {
3527
- const readme = ["README.md", "readme.md", "README"].map((n) => path7.join(dir, n)).find((f) => fs7.existsSync(f));
3690
+ const readme = ["README.md", "readme.md", "README"].map((n) => path8.join(dir, n)).find((f) => fs7.existsSync(f));
3528
3691
  if (readme) {
3529
3692
  const line = fs7.readFileSync(readme, "utf8").split(/\r?\n/).map(
3530
3693
  (l) => l.replace(/^[#>*\-\s]+/, "").replace(/[`*_[\]]/g, "").trim()
3531
3694
  ).find((l) => l.length > 20 && !/^(!|<|http)/.test(l));
3532
3695
  if (line) return line.slice(0, 160);
3533
3696
  }
3534
- const pkg = path7.join(dir, "package.json");
3697
+ const pkg = path8.join(dir, "package.json");
3535
3698
  if (fs7.existsSync(pkg)) {
3536
3699
  const d = JSON.parse(fs7.readFileSync(pkg, "utf8")).description;
3537
3700
  if (typeof d === "string" && d.trim()) return d.trim().slice(0, 160);
@@ -3545,7 +3708,7 @@ function watchTargets(cfg = loadConfig()) {
3545
3708
  const repos = Object.entries(cfg.repos).map(([alias, dir]) => ({
3546
3709
  name: alias,
3547
3710
  kind: "repo",
3548
- members: [path7.basename(dir)],
3711
+ members: [path8.basename(dir)],
3549
3712
  about: aboutRepo(dir)
3550
3713
  }));
3551
3714
  const groups = Object.entries(cfg.groups).map(([name, aliases]) => ({ name, kind: "group", members: aliases }));
@@ -3721,7 +3884,7 @@ function describeStall(s) {
3721
3884
  }
3722
3885
 
3723
3886
  // src/server/web-server.ts
3724
- import path18 from "path";
3887
+ import path19 from "path";
3725
3888
  import { Hono } from "hono";
3726
3889
  import { streamSSE as streamSSE2 } from "hono/streaming";
3727
3890
 
@@ -4060,7 +4223,7 @@ function mountPanesRoutes(app, opts) {
4060
4223
 
4061
4224
  // src/server/routes/worktree-routes.ts
4062
4225
  import fs8 from "fs";
4063
- import path8 from "path";
4226
+ import path9 from "path";
4064
4227
  import { spawn } from "child_process";
4065
4228
 
4066
4229
  // src/core/platform/started.ts
@@ -4246,7 +4409,7 @@ function mountWorktreeRoutes(app, opts) {
4246
4409
  const wantsFile = !!body && typeof body === "object" && "path" in body;
4247
4410
  const asked = wantsFile ? openFileSchema.safeParse(body) : null;
4248
4411
  if (asked && !asked.success) return c.json({ error: "repo and path required" }, 400);
4249
- const folder = session.isGroup ? path8.dirname(session.paths[0]) : session.paths[0];
4412
+ const folder = session.isGroup ? path9.dirname(session.paths[0]) : session.paths[0];
4250
4413
  let file;
4251
4414
  if (asked?.success) {
4252
4415
  const at = await codeFilePath(session, asked.data.repo, asked.data.path);
@@ -4315,7 +4478,7 @@ function mountWorktreeRoutes(app, opts) {
4315
4478
  import { zValidator as zValidator6 } from "@hono/zod-validator";
4316
4479
  import { z as z5 } from "zod";
4317
4480
  import { EventEmitter } from "events";
4318
- import path9 from "path";
4481
+ import path10 from "path";
4319
4482
  import { streamSSE } from "hono/streaming";
4320
4483
  function mountScopeRoutes(app, opts) {
4321
4484
  const background = /* @__PURE__ */ new Set();
@@ -4562,7 +4725,7 @@ function mountScopeRoutes(app, opts) {
4562
4725
  const fromSha = fromEntry.repos[p] ?? "HEAD";
4563
4726
  const toSha = toEntry === void 0 ? "working" : toEntry.repos[p] ?? "HEAD";
4564
4727
  return {
4565
- name: path9.basename(p),
4728
+ name: path10.basename(p),
4566
4729
  root: p,
4567
4730
  files: computeRangeDiff({ root: p, fromRef: fromSha, toRef: toSha })
4568
4731
  };
@@ -4579,7 +4742,7 @@ function mountScopeRoutes(app, opts) {
4579
4742
  }
4580
4743
  const resolved = scope.paths.map((p) => resolveRepoDiff(p, base, sessionBaseForPath(p)));
4581
4744
  const repos = scope.paths.map((p, i) => ({
4582
- name: path9.basename(p),
4745
+ name: path10.basename(p),
4583
4746
  root: p,
4584
4747
  resolvedBase: resolved[i].resolvedBase,
4585
4748
  files: computeDiff({ root: p, diffArg: resolved[i].diffArg })
@@ -4610,7 +4773,7 @@ function mountScopeRoutes(app, opts) {
4610
4773
  if (!relPath || !Number.isInteger(start) || !Number.isInteger(end)) {
4611
4774
  return c.json({ error: "bad path/start/end" }, 400);
4612
4775
  }
4613
- const root = scope.paths.length === 1 ? scope.paths[0] : scope.paths.find((p) => path9.basename(p) === repoName);
4776
+ const root = scope.paths.length === 1 ? scope.paths[0] : scope.paths.find((p) => path10.basename(p) === repoName);
4614
4777
  if (!root) return c.json({ error: "unknown repo" }, 404);
4615
4778
  const result = readContextLines({ root, relPath, start, end, ref });
4616
4779
  if (!result) return c.json({ error: "cannot read file" }, 400);
@@ -4868,7 +5031,7 @@ function mountTerminalRoutes(app, opts) {
4868
5031
  }
4869
5032
 
4870
5033
  // src/server/routes/status-routes.ts
4871
- import path10 from "path";
5034
+ import path11 from "path";
4872
5035
 
4873
5036
  // src/core/status/notifier.ts
4874
5037
  var MESSAGES = {
@@ -5016,7 +5179,7 @@ function mountStatusRoutes(app, opts) {
5016
5179
  const kind = notifyKindForTransition(status.prevState ? { state: status.prevState } : null, status);
5017
5180
  if (kind) {
5018
5181
  const config = loadConfig();
5019
- const launchDir = session.isGroup && session.paths[0] ? path10.dirname(session.paths[0]) : session.paths[0] ?? body.cwd;
5182
+ const launchDir = session.isGroup && session.paths[0] ? path11.dirname(session.paths[0]) : session.paths[0] ?? body.cwd;
5020
5183
  const name = `${session.target} \xB7 ${session.branch}`;
5021
5184
  const snooze = readSnooze(id);
5022
5185
  const route = snooze?.until && snoozeActive(snooze, { attention: status }) ? "none" : presence.route(id);
@@ -6046,13 +6209,13 @@ function mountRailRoutes(app, opts) {
6046
6209
 
6047
6210
  // src/core/worktree/shared-folders.ts
6048
6211
  import fs9 from "fs";
6049
- import path11 from "path";
6050
- var norm = (p) => path11.resolve(p).replace(/\\/g, "/").toLowerCase();
6212
+ import path12 from "path";
6213
+ var norm2 = (p) => path12.resolve(p).replace(/\\/g, "/").toLowerCase();
6051
6214
  function shadowedSessions(sessions, branchCheckedOut2) {
6052
6215
  const byFolder = /* @__PURE__ */ new Map();
6053
6216
  for (const s of sessions) {
6054
6217
  if (s.isGroup || s.paths.length !== 1) continue;
6055
- const key = norm(s.paths[0]);
6218
+ const key = norm2(s.paths[0]);
6056
6219
  byFolder.set(key, [...byFolder.get(key) ?? [], s]);
6057
6220
  }
6058
6221
  const shadowed = /* @__PURE__ */ new Set();
@@ -6066,14 +6229,14 @@ function shadowedSessions(sessions, branchCheckedOut2) {
6066
6229
  }
6067
6230
  function branchCheckedOut(dir) {
6068
6231
  try {
6069
- const dotGit = path11.join(dir, ".git");
6232
+ const dotGit = path12.join(dir, ".git");
6070
6233
  let gitDir = dotGit;
6071
6234
  if (fs9.statSync(dotGit).isFile()) {
6072
6235
  const m = /^gitdir:\s*(.+)$/m.exec(fs9.readFileSync(dotGit, "utf8"));
6073
6236
  if (!m) return null;
6074
- gitDir = path11.resolve(dir, m[1].trim());
6237
+ gitDir = path12.resolve(dir, m[1].trim());
6075
6238
  }
6076
- const head = fs9.readFileSync(path11.join(gitDir, "HEAD"), "utf8");
6239
+ const head = fs9.readFileSync(path12.join(gitDir, "HEAD"), "utf8");
6077
6240
  const ref = /^ref:\s*refs\/heads\/(.+)$/m.exec(head);
6078
6241
  return ref ? ref[1].trim() : null;
6079
6242
  } catch {
@@ -6401,7 +6564,7 @@ function mountPrReplyRoutes(app, opts) {
6401
6564
 
6402
6565
  // src/core/archive/archive-retention.ts
6403
6566
  import fs11 from "fs";
6404
- import path12 from "path";
6567
+ import path13 from "path";
6405
6568
  import zlib from "zlib";
6406
6569
  var DEFAULT_COMPRESS_AFTER_DAYS = 30;
6407
6570
  var DAY_MS = 24 * 36e5;
@@ -6422,14 +6585,14 @@ function applyArchiveRetention(opts) {
6422
6585
  if (!rec) continue;
6423
6586
  const age = now - Date.parse(rec.archivedAt);
6424
6587
  if (!Number.isFinite(age)) continue;
6425
- const ignored = path12.join(archiveDirFor(id, root), "ignored");
6588
+ const ignored = path13.join(archiveDirFor(id, root), "ignored");
6426
6589
  if (compressAfter > 0 && age >= compressAfter * DAY_MS && !rec.ignoredDroppedAt && fs11.existsSync(ignored)) {
6427
6590
  fs11.rmSync(ignored, { recursive: true, force: true });
6428
6591
  rec.ignoredDroppedAt = new Date(now).toISOString();
6429
6592
  writeArchiveRecord(rec, root);
6430
6593
  }
6431
6594
  if (rec.transcriptsDroppedAt) continue;
6432
- const dir = path12.join(archiveDirFor(id, root), "transcripts");
6595
+ const dir = path13.join(archiveDirFor(id, root), "transcripts");
6433
6596
  if (dropAfter > 0 && age >= dropAfter * DAY_MS) {
6434
6597
  out.bytesSaved += dirBytes(dir);
6435
6598
  fs11.rmSync(dir, { recursive: true, force: true });
@@ -6440,7 +6603,7 @@ function applyArchiveRetention(opts) {
6440
6603
  }
6441
6604
  if (compressAfter <= 0 || rec.compressedAt || age < compressAfter * DAY_MS) continue;
6442
6605
  for (const t of rec.transcripts) {
6443
- const plain = path12.join(dir, t.file);
6606
+ const plain = path13.join(dir, t.file);
6444
6607
  if (!fs11.existsSync(plain)) continue;
6445
6608
  const data = fs11.readFileSync(plain);
6446
6609
  const gz = zlib.gzipSync(data);
@@ -6461,7 +6624,7 @@ function applyArchiveRetention(opts) {
6461
6624
  function dirBytes(dir) {
6462
6625
  let n = 0;
6463
6626
  try {
6464
- for (const f of fs11.readdirSync(dir)) n += fs11.statSync(path12.join(dir, f)).size;
6627
+ for (const f of fs11.readdirSync(dir)) n += fs11.statSync(path13.join(dir, f)).size;
6465
6628
  } catch {
6466
6629
  }
6467
6630
  return n;
@@ -6939,7 +7102,7 @@ function reviewModeOf(alias, config) {
6939
7102
  return { mode: "all", from: "default" };
6940
7103
  }
6941
7104
  function reviewProjects(config) {
6942
- return Object.entries(config.repos).map(([alias, path21]) => ({ alias, path: path21, mode: reviewModeOf(alias, config).mode }));
7105
+ return Object.entries(config.repos).map(([alias, path22]) => ({ alias, path: path22, mode: reviewModeOf(alias, config).mode }));
6943
7106
  }
6944
7107
  function reviewLimits(config) {
6945
7108
  return {
@@ -7087,7 +7250,7 @@ function mountReviewRoutes(app, deps) {
7087
7250
  // src/core/review/review-tree.ts
7088
7251
  import { randomBytes } from "crypto";
7089
7252
  import fs12 from "fs";
7090
- import path13 from "path";
7253
+ import path14 from "path";
7091
7254
 
7092
7255
  // src/core/review/review-source.ts
7093
7256
  var reviewRef = (number) => `refs/work/review/${number}`;
@@ -7143,7 +7306,7 @@ async function dropReviewRef(run2, repoPath, number) {
7143
7306
  }
7144
7307
 
7145
7308
  // src/core/review/review-tree.ts
7146
- var reviewTreesDir = () => path13.join(getConfigDir(), "review-trees");
7309
+ var reviewTreesDir = () => path14.join(getConfigDir(), "review-trees");
7147
7310
  var NO_HOOKS = ".no-hooks";
7148
7311
  var NO_LFS = ["-c", "filter.lfs.smudge=", "-c", "filter.lfs.process=", "-c", "filter.lfs.required=false"];
7149
7312
  var NO_LFS_ENV = { GIT_LFS_SKIP_SMUDGE: "1" };
@@ -7163,8 +7326,8 @@ function rmTree(dir) {
7163
7326
  }
7164
7327
  async function createReviewTree(run2, at, opts) {
7165
7328
  const root = opts.root ?? reviewTreesDir();
7166
- const dir = path13.join(root, reviewTreeName(at.alias, at.number, at.headSha, opts.run ?? runSuffix()));
7167
- const noHooks = path13.join(root, NO_HOOKS);
7329
+ const dir = path14.join(root, reviewTreeName(at.alias, at.number, at.headSha, opts.run ?? runSuffix()));
7330
+ const noHooks = path14.join(root, NO_HOOKS);
7168
7331
  fs12.mkdirSync(noHooks, { recursive: true });
7169
7332
  if (fs12.existsSync(dir)) await removeReviewTree(run2, at.repoPath, dir);
7170
7333
  const added = await run2(
@@ -7201,7 +7364,7 @@ async function createReviewTree(run2, at, opts) {
7201
7364
  }
7202
7365
  const removed = [];
7203
7366
  for (const rel of listed.stdout.split("\0").filter((rel2) => opts.strip(rel2))) {
7204
- const file = path13.join(dir, rel);
7367
+ const file = path14.join(dir, rel);
7205
7368
  fs12.rmSync(file, { recursive: true, force: true });
7206
7369
  if (fs12.existsSync(file)) {
7207
7370
  await removeReviewTree(run2, at.repoPath, dir);
@@ -7231,8 +7394,8 @@ async function withReviewTree(run2, at, use, opts) {
7231
7394
  }
7232
7395
  function gitDirOf(dir) {
7233
7396
  try {
7234
- const m = /^gitdir:\s*(.+)$/m.exec(fs12.readFileSync(path13.join(dir, ".git"), "utf8"));
7235
- return m ? path13.resolve(dir, m[1].trim(), "..", "..") : null;
7397
+ const m = /^gitdir:\s*(.+)$/m.exec(fs12.readFileSync(path14.join(dir, ".git"), "utf8"));
7398
+ return m ? path14.resolve(dir, m[1].trim(), "..", "..") : null;
7236
7399
  } catch {
7237
7400
  return null;
7238
7401
  }
@@ -7249,7 +7412,7 @@ async function sweepReviewTrees(run2, opts = {}) {
7249
7412
  return { swept, failed };
7250
7413
  }
7251
7414
  for (const name of names) {
7252
- const dir = path13.join(root, name);
7415
+ const dir = path14.join(root, name);
7253
7416
  try {
7254
7417
  if (opts.olderThanMs && now - fs12.statSync(dir).mtimeMs < opts.olderThanMs) continue;
7255
7418
  } catch {
@@ -7730,7 +7893,7 @@ function startReviewSweeps(opts) {
7730
7893
  }
7731
7894
 
7732
7895
  // src/core/diff/session-history.ts
7733
- import path14 from "path";
7896
+ import path15 from "path";
7734
7897
 
7735
7898
  // src/core/diff/diff-points.ts
7736
7899
  var SHA = /^[0-9a-f]{7,40}$/;
@@ -7826,12 +7989,12 @@ async function sessionHistory(session, others = []) {
7826
7989
  });
7827
7990
  if (diffArg === "HEAD") continue;
7828
7991
  const log = await g(["log", `-n${MAX_COMMITS2}`, "--format=%H%x1f%cI%x1f%s", `${diffArg}..HEAD`, "--"], root);
7829
- if (log.ok && log.out) commits.push(...parseLog(log.out, path14.basename(root)));
7992
+ if (log.ok && log.out) commits.push(...parseLog(log.out, path15.basename(root)));
7830
7993
  }
7831
7994
  for (const b of others) {
7832
7995
  const tip = await tipOf(b);
7833
7996
  if (!tip) continue;
7834
- const repo = path14.basename(b.path);
7997
+ const repo = path15.basename(b.path);
7835
7998
  const start = liveStart(b) ?? b.start;
7836
7999
  let list = [];
7837
8000
  let base;
@@ -7892,7 +8055,7 @@ function parseLog(stdout, repo) {
7892
8055
  return out;
7893
8056
  }
7894
8057
  function computeSessionRange(session, from, to) {
7895
- const paths = session.paths.map((p) => path14.resolve(p));
8058
+ const paths = session.paths.map((p) => path15.resolve(p));
7896
8059
  const refs = rangeRefs(paths, loadManifest(scopeHashForPaths(paths)).entries, from, to);
7897
8060
  if ("error" in refs) return refs;
7898
8061
  return { repos: refs.map((r) => ({ name: r.name, root: r.root, files: computeRangeDiff(r) })) };
@@ -7911,17 +8074,17 @@ async function sessionHistoryWire(session) {
7911
8074
  }
7912
8075
 
7913
8076
  // src/server/routes/revert-routes.ts
7914
- import path16 from "path";
8077
+ import path17 from "path";
7915
8078
  import { zValidator as zValidator7 } from "@hono/zod-validator";
7916
8079
  import { z as z6 } from "zod";
7917
8080
 
7918
8081
  // src/core/diff/revert.ts
7919
8082
  import fs14 from "fs";
7920
- import path15 from "path";
8083
+ import path16 from "path";
7921
8084
  function inside(root, rel) {
7922
- const abs = path15.resolve(root, rel);
7923
- const back = path15.relative(path15.resolve(root), abs);
7924
- if (!back || back.startsWith("..") || path15.isAbsolute(back)) return null;
8085
+ const abs = path16.resolve(root, rel);
8086
+ const back = path16.relative(path16.resolve(root), abs);
8087
+ if (!back || back.startsWith("..") || path16.isAbsolute(back)) return null;
7925
8088
  return abs;
7926
8089
  }
7927
8090
  function inHead(root, rel) {
@@ -8034,8 +8197,8 @@ function mountRevertRoutes(app, opts) {
8034
8197
  if (!session) return c.json({ error: "unknown session" }, 404);
8035
8198
  const body = c.req.valid("json");
8036
8199
  const repo = opts.uncommitted(session).find((r) => r.name === body.repo);
8037
- const allowed = new Set(session.paths.map((p) => path16.resolve(p).toLowerCase()));
8038
- if (!repo || !allowed.has(path16.resolve(repo.root).toLowerCase())) {
8200
+ const allowed = new Set(session.paths.map((p) => path17.resolve(p).toLowerCase()));
8201
+ if (!repo || !allowed.has(path17.resolve(repo.root).toLowerCase())) {
8039
8202
  return c.json({ error: `unknown repo: ${body.repo}` }, 404);
8040
8203
  }
8041
8204
  const file = repo.files.find((f) => f.path === body.path);
@@ -8193,10 +8356,10 @@ function mountCiRoutes(app, opts) {
8193
8356
 
8194
8357
  // src/core/diff/diffs-sweep.ts
8195
8358
  import fs16 from "fs";
8196
- import path17 from "path";
8359
+ import path18 from "path";
8197
8360
  var SWEEP_AFTER_DAYS = 30;
8198
8361
  var DISPOSABLE = /\.(html|log)$/i;
8199
- function sweepOldDiffArtifacts(now = Date.now(), maxAgeDays = SWEEP_AFTER_DAYS, dir = path17.join(getConfigDir(), "diffs")) {
8362
+ function sweepOldDiffArtifacts(now = Date.now(), maxAgeDays = SWEEP_AFTER_DAYS, dir = path18.join(getConfigDir(), "diffs")) {
8200
8363
  const cutoff = now - maxAgeDays * 24 * 60 * 60 * 1e3;
8201
8364
  let removed = 0;
8202
8365
  let bytes = 0;
@@ -8208,7 +8371,7 @@ function sweepOldDiffArtifacts(now = Date.now(), maxAgeDays = SWEEP_AFTER_DAYS,
8208
8371
  }
8209
8372
  for (const name of names) {
8210
8373
  if (!DISPOSABLE.test(name)) continue;
8211
- const file = path17.join(dir, name);
8374
+ const file = path18.join(dir, name);
8212
8375
  try {
8213
8376
  const st = fs16.statSync(file);
8214
8377
  if (!st.isFile() || st.mtimeMs >= cutoff) continue;
@@ -8768,7 +8931,7 @@ var LEFTOVERS_EVERY_MS = 60 * 6e4;
8768
8931
  function computeSessionDiff(s, base) {
8769
8932
  const resolved = s.paths.map((p) => resolveRepoDiff(p, base, s.baseBranches?.[p] ?? s.baseBranch));
8770
8933
  const repos = s.paths.map((p, i) => ({
8771
- name: path18.basename(p),
8934
+ name: path19.basename(p),
8772
8935
  root: p,
8773
8936
  resolvedBase: resolved[i].resolvedBase,
8774
8937
  files: computeDiff({ root: p, diffArg: resolved[i].diffArg })
@@ -8872,7 +9035,7 @@ async function startWebServer(opts = {}) {
8872
9035
  }, 500);
8873
9036
  }
8874
9037
  });
8875
- const repoNames = (s) => s.isGroup ? s.paths.map((p) => path18.basename(p)) : [s.target];
9038
+ const repoNames = (s) => s.isGroup ? s.paths.map((p) => path19.basename(p)) : [s.target];
8876
9039
  const diffStatFor = (id, s, hasStatus) => wantsDiffStat(s, hasStatus) ? diffStats.get(id, s.paths, repoNames(s)) : null;
8877
9040
  const archivedRow = createArchivedRows();
8878
9041
  app.get("/api/sessions", (c) => {
@@ -9427,8 +9590,16 @@ async function startWebServer(opts = {}) {
9427
9590
  prepare: (session, repo) => prepareLocalReview(session, repo, {
9428
9591
  diff: (s) => computeSessionDiff(s, "branch"),
9429
9592
  agent: (prompt) => runInternal(prompt, 24e4, { lane: "localReviews" }),
9593
+ // Read-only in the session's own folder when the agent can: it then answers what the diff leaves open.
9594
+ inTree: (s, names) => localTreeRun(s.paths, names, {
9595
+ readOnly: internalReadOnly,
9596
+ run: (prompt, cwd, deny) => runInternalReadOnly(prompt, cwd, LOCAL_TREE_TIMEOUT_MS, { lane: "localReviews", deny }),
9597
+ exists: (dir) => fs17.existsSync(dir)
9598
+ }),
9430
9599
  rules: () => rulesWith(loadConfig()?.reviews?.rules)
9431
9600
  }),
9601
+ signature: (s, repo) => localSignature(computeSessionDiff(s, "branch"), repo ?? void 0),
9602
+ store: { read: readLocalReview, save: saveLocalReview, drop: dropLocalReview },
9432
9603
  tell: noteThroughComments(app),
9433
9604
  broadcast
9434
9605
  });
@@ -9592,10 +9763,10 @@ function startAccountSync(deps) {
9592
9763
 
9593
9764
  // src/core/platform/autostart.ts
9594
9765
  import fs18 from "fs";
9595
- import path19 from "path";
9766
+ import path20 from "path";
9596
9767
  function startupScriptPath() {
9597
9768
  if (process.platform !== "win32" || !process.env.APPDATA) return null;
9598
- return path19.join(process.env.APPDATA, "Microsoft", "Windows", "Start Menu", "Programs", "Startup", "work-web.vbs");
9769
+ return path20.join(process.env.APPDATA, "Microsoft", "Windows", "Start Menu", "Programs", "Startup", "work-web.vbs");
9599
9770
  }
9600
9771
  function vbsQuote(s) {
9601
9772
  return '"' + s.replace(/"/g, '""') + '"';
@@ -9613,7 +9784,7 @@ function setAutostart(enabled, workBin) {
9613
9784
  const file = startupScriptPath();
9614
9785
  if (!file) throw new Error("Autostart is only supported on Windows so far.");
9615
9786
  if (enabled) {
9616
- fs18.mkdirSync(path19.dirname(file), { recursive: true });
9787
+ fs18.mkdirSync(path20.dirname(file), { recursive: true });
9617
9788
  fs18.writeFileSync(file, buildStartupScript(process.execPath, workBin), "utf-8");
9618
9789
  } else {
9619
9790
  try {
@@ -9634,14 +9805,14 @@ async function demoHostSubmit(url, review) {
9634
9805
  };
9635
9806
  return { ok: true, url: `${url}#pullrequestreview-1` };
9636
9807
  }
9637
- var hunk = (path21, lines, status = "modified") => {
9808
+ var hunk = (path22, lines, status = "modified") => {
9638
9809
  const added = lines.filter((l) => l.startsWith("+")).length;
9639
9810
  const deleted = lines.filter((l) => l.startsWith("-")).length;
9640
9811
  const context = lines.length - added - deleted;
9641
9812
  return [
9642
- `diff --git a/${path21} b/${path21}`,
9643
- ...status === "added" ? ["new file mode 100644", "index 0000000..1111111", "--- /dev/null"] : ["index 1111111..2222222 100644", `--- a/${path21}`],
9644
- `+++ b/${path21}`,
9813
+ `diff --git a/${path22} b/${path22}`,
9814
+ ...status === "added" ? ["new file mode 100644", "index 0000000..1111111", "--- /dev/null"] : ["index 1111111..2222222 100644", `--- a/${path22}`],
9815
+ `+++ b/${path22}`,
9645
9816
  `@@ -${status === "added" ? 0 : 1},${status === "added" ? 0 : context + deleted} +1,${context + added} @@`,
9646
9817
  ...lines
9647
9818
  ].join("\n");
@@ -10139,7 +10310,7 @@ function createDemoRepos(liveTargets) {
10139
10310
  /** GET /api/projects: what New worktree offers, as the real one reads config. */
10140
10311
  projects() {
10141
10312
  return {
10142
- singles: Object.entries(repos).map(([name, path21]) => ({ name, kind: "single", path: path21 })),
10313
+ singles: Object.entries(repos).map(([name, path22]) => ({ name, kind: "single", path: path22 })),
10143
10314
  groups: Object.entries(groups).map(([name, members]) => ({ name, kind: "group", members }))
10144
10315
  };
10145
10316
  },
@@ -10181,12 +10352,12 @@ function createDemoRepos(liveTargets) {
10181
10352
  }));
10182
10353
  return { roots: [root], repos: rows, groups: groupRows };
10183
10354
  },
10184
- enroll(alias, path21) {
10185
- if (!found.some((f) => f.path === path21)) throw new DemoRepoError(`${path21} is not the top folder of a git repository`);
10186
- const problem = enrollProblem(alias, path21, config());
10355
+ enroll(alias, path22) {
10356
+ if (!found.some((f) => f.path === path22)) throw new DemoRepoError(`${path22} is not the top folder of a git repository`);
10357
+ const problem = enrollProblem(alias, path22, config());
10187
10358
  if (problem) throw new DemoRepoError(problem);
10188
- repos[alias] = path21;
10189
- ignored.delete(path21);
10359
+ repos[alias] = path22;
10360
+ ignored.delete(path22);
10190
10361
  },
10191
10362
  remove(alias, force) {
10192
10363
  if (!(alias in repos)) throw new DemoRepoError(`no repo \u201C${alias}\u201D`);
@@ -10195,9 +10366,9 @@ function createDemoRepos(liveTargets) {
10195
10366
  delete repos[alias];
10196
10367
  for (const g2 of Object.keys(groups)) groups[g2] = groups[g2].filter((m) => m !== alias);
10197
10368
  },
10198
- ignore(path21, on) {
10199
- if (on) ignored.add(path21);
10200
- else ignored.delete(path21);
10369
+ ignore(path22, on) {
10370
+ if (on) ignored.add(path22);
10371
+ else ignored.delete(path22);
10201
10372
  },
10202
10373
  saveGroup(name, members, creating) {
10203
10374
  const problem = groupProblem(name, members, config(), { creating });
@@ -11437,15 +11608,15 @@ ${reply}\r
11437
11608
  if (refusal || !s) return { ok: false, status: refusal?.status ?? 404, error: refusal?.error ?? "unknown session" };
11438
11609
  s.repos.push({ name: alias, uncommitted: "", sinceBranch: "", published: false, pr: null });
11439
11610
  const from = base || "main";
11440
- const path21 = this.wire(s).paths[s.repos.length - 1];
11611
+ const path22 = this.wire(s).paths[s.repos.length - 1];
11441
11612
  s.comments.post({
11442
11613
  side: "general",
11443
11614
  status: "published",
11444
- body: addedRepoNote({ alias, path: path21, branch: s.branch, from, imported: true })
11615
+ body: addedRepoNote({ alias, path: path22, branch: s.branch, from, imported: true })
11445
11616
  });
11446
11617
  this.emit("comments-changed", { sessionId: id });
11447
11618
  this.changed();
11448
- return { ok: true, wire: { ok: true, path: path21, branch: s.branch, created: true, from, imported: true, warnings: [] } };
11619
+ return { ok: true, wire: { ok: true, path: path22, branch: s.branch, created: true, from, imported: true, warnings: [] } };
11449
11620
  }
11450
11621
  // -- CI (the PR watch, simulated) ------------------------------------------
11451
11622
  /** The Today digest, through the same builder as work web: the demo's
@@ -12023,20 +12194,20 @@ function demoCodeFiles(repos, group) {
12023
12194
  })
12024
12195
  };
12025
12196
  }
12026
- function demoCodeFile(repos, group, repo, path21) {
12197
+ function demoCodeFile(repos, group, repo, path22) {
12027
12198
  if (repo === "") {
12028
- if (!group || path21 !== "CLAUDE.md") return null;
12199
+ if (!group || path22 !== "CLAUDE.md") return null;
12029
12200
  const text2 = `# Group instructions
12030
12201
 
12031
12202
  Repos: ${repos.map((r2) => r2.name).join(", ")}.
12032
12203
  `;
12033
- return { repo, path: path21, size: text2.length, text: text2 };
12204
+ return { repo, path: path22, size: text2.length, text: text2 };
12034
12205
  }
12035
12206
  const r = repos.find((x) => x.name === repo);
12036
12207
  if (!r) return null;
12037
- const changed = r.changed.find((f) => f.path === path21 && f.status !== "deleted");
12038
- const text = changed ? newSide(changed) : COMMON[path21]?.replace(/\{repo\}/g, repo);
12039
- return text === void 0 ? null : { repo, path: path21, size: text.length, text };
12208
+ const changed = r.changed.find((f) => f.path === path22 && f.status !== "deleted");
12209
+ const text = changed ? newSide(changed) : COMMON[path22]?.replace(/\{repo\}/g, repo);
12210
+ return text === void 0 ? null : { repo, path: path22, size: text.length, text };
12040
12211
  }
12041
12212
  function demoCodeSearch(repos, group, query) {
12042
12213
  const q = query.trim();
@@ -12045,12 +12216,12 @@ function demoCodeSearch(repos, group, query) {
12045
12216
  const text = [];
12046
12217
  const fold = (x) => ignoresCase(q) ? x.toLowerCase() : x;
12047
12218
  for (const r of demoCodeFiles(repos, group).repos) {
12048
- for (const path21 of r.files) {
12049
- const lines = (demoCodeFile(repos, group, r.name, path21)?.text ?? "").split("\n");
12219
+ for (const path22 of r.files) {
12220
+ const lines = (demoCodeFile(repos, group, r.name, path22)?.text ?? "").split("\n");
12050
12221
  lines.forEach((line, i) => {
12051
- const d = declarationOf(path21, line);
12052
- if (d) symbols.push({ ...d, repo: r.name, path: path21, line: i + 1, text: line.trim() });
12053
- if (fold(line).includes(fold(q))) text.push({ repo: r.name, path: path21, line: i + 1, text: line });
12222
+ const d = declarationOf(path22, line);
12223
+ if (d) symbols.push({ ...d, repo: r.name, path: path22, line: i + 1, text: line.trim() });
12224
+ if (fold(line).includes(fold(q))) text.push({ repo: r.name, path: path22, line: i + 1, text: line });
12054
12225
  });
12055
12226
  }
12056
12227
  }
@@ -12321,13 +12492,13 @@ function createDemoSettings(repoPathOf) {
12321
12492
  };
12322
12493
  return {
12323
12494
  read,
12324
- async write(path21, value) {
12325
- const f = settingAt(path21);
12326
- if (!f) throw new SettingsError(`no setting ${path21}`, 404);
12495
+ async write(path22, value) {
12496
+ const f = settingAt(path22);
12497
+ if (!f) throw new SettingsError(`no setting ${path22}`, 404);
12327
12498
  const r = checkSetting(f, value);
12328
12499
  if (!r.ok) throw new SettingsError(`${f.label}: ${r.error}`);
12329
- if (r.value === null) delete values[path21];
12330
- else values[path21] = r.value;
12500
+ if (r.value === null) delete values[path22];
12501
+ else values[path22] = r.value;
12331
12502
  return read();
12332
12503
  },
12333
12504
  readRepo,
@@ -12533,6 +12704,25 @@ async function startDemoServer(opts) {
12533
12704
  broadcast({ event: "session-review-changed", data: { sessionId: w.id } });
12534
12705
  return c.json(demoLocalReview(w));
12535
12706
  });
12707
+ const demoDismissed = /* @__PURE__ */ new Map();
12708
+ app.post("/api/sessions/:id/review/dismiss", async (c) => {
12709
+ const w = scenario.list().find((x) => x.id === c.req.param("id"));
12710
+ if (!w) return notFound(c);
12711
+ const body = await json2(c);
12712
+ const review = demoLocalReview(w).review;
12713
+ if (typeof body.id !== "string" || !review?.drafts.some((d) => d.id === body.id))
12714
+ return c.json({ error: "no such note in the review prepared for it" }, 404);
12715
+ const set = demoDismissed.get(w.id) ?? /* @__PURE__ */ new Set();
12716
+ if (body.undo === true) set.delete(body.id);
12717
+ else set.add(body.id);
12718
+ demoDismissed.set(w.id, set);
12719
+ return c.json({ ...demoLocalReview(w), sent: [], dismissed: [...set] });
12720
+ });
12721
+ app.get("/api/sessions/:id/review/current", (c) => {
12722
+ const w = scenario.list().find((x) => x.id === c.req.param("id"));
12723
+ if (!w) return notFound(c);
12724
+ return localReviews.has(w.id) ? c.json({ current: true }) : c.json({ error: "no review of it is prepared" }, 404);
12725
+ });
12536
12726
  app.get("/api/sessions/:id/review/diff", (c) => {
12537
12727
  const w = scenario.list().find((x) => x.id === c.req.param("id"));
12538
12728
  if (!w) return notFound(c);
@@ -13439,8 +13629,8 @@ async function startDemoServer(opts) {
13439
13629
 
13440
13630
  // src/core/platform/web-life.ts
13441
13631
  import fs19 from "fs";
13442
- import path20 from "path";
13443
- var lifePath = () => path20.join(getConfigDir(), "web-life.json");
13632
+ import path21 from "path";
13633
+ var lifePath = () => path21.join(getConfigDir(), "web-life.json");
13444
13634
  function isLife(v) {
13445
13635
  const l = v;
13446
13636
  return !!l && typeof l === "object" && typeof l.pid === "number" && typeof l.version === "string" && typeof l.startedAt === "string" && typeof l.lastSeen === "string" && (l.ended === void 0 || typeof l.ended?.at === "string" && typeof l.ended?.how === "string");
@@ -13830,4 +14020,4 @@ export {
13830
14020
  stopExisting,
13831
14021
  webCommand
13832
14022
  };
13833
- //# sourceMappingURL=web-AXS3EMZ3.js.map
14023
+ //# sourceMappingURL=web-JBDK5WWW.js.map