@moberg_hr/work-tree 2.12.3 → 2.14.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 (250) hide show
  1. package/dist/{account-PE4R56QL.js → account-TNPXQ3BO.js} +17 -17
  2. package/dist/{add-repo-AWETXFQI.js → add-repo-YJQ65OV4.js} +11 -11
  3. package/dist/{answer-LVALFOZK.js → answer-BGZIWFVB.js} +8 -8
  4. package/dist/{attach-BSNR3XMY.js → attach-E2OJC7ST.js} +15 -15
  5. package/dist/bin.js +3 -3
  6. package/dist/{block-MEE2T22H.js → block-44POA6KR.js} +10 -10
  7. package/dist/{broadcast-JBNGNKQ4.js → broadcast-E7357IWA.js} +6 -6
  8. package/dist/{catchup-HQ3EOMAE.js → catchup-KAB23EFN.js} +11 -11
  9. package/dist/{chunk-FJJDZ7TA.js → chunk-4D52OAAP.js} +5 -5
  10. package/dist/{chunk-HUD4JLK3.js → chunk-4YJQZE7D.js} +39 -6
  11. package/dist/chunk-4YJQZE7D.js.map +1 -0
  12. package/dist/{chunk-IYIVSXTI.js → chunk-6NTMQ7XI.js} +3 -3
  13. package/dist/{chunk-TEB3INZR.js → chunk-7JEMR4RU.js} +3 -3
  14. package/dist/{chunk-E3XUCHIY.js → chunk-7VAKNNLB.js} +10 -10
  15. package/dist/{chunk-RIKAEVFL.js → chunk-7XKIRMS4.js} +2 -2
  16. package/dist/{chunk-PDOG3O4N.js → chunk-7ZL3GJGY.js} +2 -2
  17. package/dist/{chunk-UAOVWCJD.js → chunk-B4G5QHTU.js} +2 -2
  18. package/dist/{chunk-3FP7S6ZA.js → chunk-B7BNMPY3.js} +2 -2
  19. package/dist/{chunk-HQY7TLIK.js → chunk-BB44TXV4.js} +4 -4
  20. package/dist/{chunk-QOBQ27VG.js → chunk-BD26XB2E.js} +8 -8
  21. package/dist/{chunk-57ONODV4.js → chunk-BHYTCA55.js} +3 -3
  22. package/dist/{chunk-EJ4GGY7P.js → chunk-CF6Y2RZJ.js} +10 -10
  23. package/dist/{chunk-M225TR5L.js → chunk-CO6BX4RN.js} +6 -6
  24. package/dist/{chunk-ITZBHSTZ.js → chunk-D4ZDTXFV.js} +2 -2
  25. package/dist/{chunk-JLRX3QN4.js → chunk-DBWVWWUO.js} +2 -2
  26. package/dist/{chunk-65AEMPEA.js → chunk-ESZ52W6E.js} +6 -6
  27. package/dist/{chunk-DVHRE4AY.js → chunk-ESZXUBYI.js} +3 -3
  28. package/dist/{chunk-INI6TEYT.js → chunk-FLY3VR6B.js} +8 -2
  29. package/dist/chunk-FLY3VR6B.js.map +1 -0
  30. package/dist/{chunk-PUE2ZM4A.js → chunk-G6K5U3KW.js} +4 -4
  31. package/dist/{chunk-MSZN3BC5.js → chunk-GWANOCQ4.js} +8 -8
  32. package/dist/{chunk-NS57XEVZ.js → chunk-IJEAHNJZ.js} +6 -6
  33. package/dist/{chunk-RECQAHC5.js → chunk-JNKFPFH6.js} +2 -2
  34. package/dist/{chunk-YWDUEGXD.js → chunk-L5OZXDTB.js} +2 -2
  35. package/dist/{chunk-7NL3E27M.js → chunk-LEDE3P4Q.js} +4 -4
  36. package/dist/{chunk-3VRNXFIZ.js → chunk-LK2ZVCKH.js} +2 -2
  37. package/dist/{chunk-OIC2PWUH.js → chunk-LKJLUSYR.js} +2 -2
  38. package/dist/{chunk-GXJ37PQY.js → chunk-LQ4BEHS4.js} +4 -4
  39. package/dist/{chunk-QOCCG4DW.js → chunk-M3RDUGQV.js} +4 -4
  40. package/dist/{chunk-MWDDSULR.js → chunk-M5YM3CQY.js} +7 -7
  41. package/dist/{chunk-VTRDEXTJ.js → chunk-OGGGOFCZ.js} +3 -3
  42. package/dist/chunk-OGGGOFCZ.js.map +1 -0
  43. package/dist/{chunk-5JIP2OR3.js → chunk-OMY7MGNN.js} +6 -6
  44. package/dist/{chunk-JK3YCAP7.js → chunk-PAEWU7UC.js} +4 -4
  45. package/dist/{chunk-QIIZPLOL.js → chunk-PBJVVXG7.js} +3 -3
  46. package/dist/{chunk-WZKO4WQI.js → chunk-POHAQY4D.js} +7 -7
  47. package/dist/{chunk-LAKPOS5Z.js → chunk-PR3BA5BP.js} +4 -4
  48. package/dist/{chunk-JMLRBCYG.js → chunk-Q5WOXF2D.js} +6 -6
  49. package/dist/chunk-QXDSIIID.js +9 -0
  50. package/dist/{chunk-XTRC6IOA.js → chunk-RUIBZ6DI.js} +2 -2
  51. package/dist/{chunk-3GI5PO57.js → chunk-S43GVNRB.js} +3 -3
  52. package/dist/{chunk-ZJGHHHTW.js → chunk-TJAF3K5D.js} +56 -55
  53. package/dist/chunk-TJAF3K5D.js.map +1 -0
  54. package/dist/{chunk-XDNYUZZN.js → chunk-TYZSHKFP.js} +4 -4
  55. package/dist/{chunk-Y5GP7O4Q.js → chunk-UY77MGXI.js} +2 -2
  56. package/dist/{chunk-3IGVY5S5.js → chunk-V3MRBAZU.js} +2 -2
  57. package/dist/{chunk-G5AAYK56.js → chunk-VLUME72O.js} +2 -2
  58. package/dist/{chunk-KXGLGXAE.js → chunk-VQTPBS63.js} +3 -3
  59. package/dist/{chunk-L6XZYMOS.js → chunk-W7KGS2OH.js} +3 -3
  60. package/dist/{chunk-IIIAV6OD.js → chunk-WAZCBD7Y.js} +2 -2
  61. package/dist/{chunk-GY5FELHG.js → chunk-WI5WFJJW.js} +3 -3
  62. package/dist/{chunk-6C4WLRND.js → chunk-WOD7XSNC.js} +5 -5
  63. package/dist/{chunk-KCXJ3NKO.js → chunk-XGOSOA7U.js} +3 -3
  64. package/dist/{chunk-P4N5VKEZ.js → chunk-XGZB2DOA.js} +2 -2
  65. package/dist/{chunk-4FU4VGPY.js → chunk-XWFL5U4X.js} +2 -2
  66. package/dist/{chunk-AQHGYLVN.js → chunk-Y2DBNXZH.js} +6 -6
  67. package/dist/{chunk-DQWZDA2E.js → chunk-Z3T5FWM6.js} +2 -2
  68. package/dist/{chunk-2MPLY2Z2.js → chunk-ZH5M36JU.js} +5 -5
  69. package/dist/{chunk-MHGY2TTW.js → chunk-ZKGCL4HY.js} +3 -3
  70. package/dist/{cleanup-ABHJOT4X.js → cleanup-5QEBRJHT.js} +28 -28
  71. package/dist/{cli-QXBRNVPR.js → cli-7RDR5XZ5.js} +4 -4
  72. package/dist/{config-JBSRQRET.js → config-4QLJCSBD.js} +8 -8
  73. package/dist/{diff-CYBDUDUD.js → diff-TXIFHZ4Q.js} +9 -9
  74. package/dist/{digest-B3ZJCZW4.js → digest-QJCR5LY7.js} +8 -8
  75. package/dist/{fork-RGXYHVOE.js → fork-NUAOPRCN.js} +25 -25
  76. package/dist/{history-UA5ALWRQ.js → history-C4RXAT65.js} +6 -6
  77. package/dist/{hook-DKGO437N.js → hook-S3IBPKGS.js} +13 -13
  78. package/dist/{hydrate-7Q4MCUPI.js → hydrate-B54DIUGL.js} +6 -6
  79. package/dist/{init-RAQTTWR6.js → init-F2MYX6MQ.js} +11 -11
  80. package/dist/{install-skills-LQO7EHL7.js → install-skills-QX4OATOS.js} +6 -6
  81. package/dist/install-skills-bin.js +5 -5
  82. package/dist/{keep-XD3JM6BW.js → keep-NE6TML4Z.js} +8 -8
  83. package/dist/{list-65UEHVZH.js → list-MW6QCFUB.js} +6 -6
  84. package/dist/{move-GCBXY5II.js → move-33T6LDPZ.js} +14 -14
  85. package/dist/{note-4QTSIAKO.js → note-BPDRSGX2.js} +8 -8
  86. package/dist/{overlaps-5X4DZJ6A.js → overlaps-6VZ5MP5T.js} +12 -12
  87. package/dist/{pin-N643KWEK.js → pin-CDRRJE6B.js} +8 -8
  88. package/dist/{pr-ZAOZHNIY.js → pr-HLIRK7AT.js} +19 -19
  89. package/dist/{prune-W2FANCA6.js → prune-UMGF6EES.js} +26 -26
  90. package/dist/{pty-host-R6P2I7C2.js → pty-host-JB3RIUDL.js} +13 -13
  91. package/dist/{read-U7RSNVKQ.js → read-HDFVXH6H.js} +8 -8
  92. package/dist/{recent-PEGDUXGK.js → recent-NKWAXBYW.js} +13 -13
  93. package/dist/{remove-4Z3L6UZE.js → remove-ELVCCF4J.js} +27 -27
  94. package/dist/{restart-4JAHJRJP.js → restart-PJIRMPK2.js} +8 -8
  95. package/dist/{resume-MOPF6Q47.js → resume-3R6FOHL7.js} +13 -13
  96. package/dist/{review-VCMEMSGB.js → review-AOSPR5KG.js} +3 -3
  97. package/dist/{review-now-NXMBEJ5R.js → review-now-X34EXZ5U.js} +3 -3
  98. package/dist/{run-N6EFNZ2H.js → run-MV2LFD4H.js} +6 -6
  99. package/dist/{screen-S7JYKVCD.js → screen-I4PKJUDE.js} +8 -8
  100. package/dist/{search-JO7EIO2E.js → search-S7O4M35Q.js} +6 -6
  101. package/dist/{section-PFOG3MWL.js → section-BCBQOMG5.js} +8 -8
  102. package/dist/{send-P5SLG4OQ.js → send-JMKAMSUB.js} +9 -9
  103. package/dist/{sessions-6FXLLEFC.js → sessions-DNZPSWOU.js} +23 -23
  104. package/dist/show-UAOY55EY.js +63 -0
  105. package/dist/show-UAOY55EY.js.map +1 -0
  106. package/dist/{snooze-PJTGJDFI.js → snooze-CLKJDZAJ.js} +8 -8
  107. package/dist/{start-BKBV7FI2.js → start-KJODTJXK.js} +8 -8
  108. package/dist/{state-LDDRQFWX.js → state-GPEV4FHA.js} +2 -2
  109. package/dist/{status-6LE2QFF3.js → status-PPXTDG43.js} +10 -10
  110. package/dist/{statusline-OU4LKQQD.js → statusline-QN4AERZC.js} +3 -3
  111. package/dist/{stop-JNCT233L.js → stop-YFCYGC6D.js} +8 -8
  112. package/dist/{sync-SRTMLWJT.js → sync-QACKQ2X2.js} +26 -26
  113. package/dist/{time-L6RBKV3P.js → time-LPNBJFCY.js} +9 -9
  114. package/dist/{time-actions-KYFYV7F2.js → time-actions-B7YKVDVE.js} +3 -3
  115. package/dist/{timesheet-DL2VWJ2V.js → timesheet-SSDDOKBL.js} +12 -12
  116. package/dist/{todo-54OJY5VV.js → todo-VBWHS2HU.js} +2 -2
  117. package/dist/{tree-RCBXUIIK.js → tree-26MFCA27.js} +25 -25
  118. package/dist/{update-VFLAO2DP.js → update-DMPTLZFM.js} +14 -14
  119. package/dist/{usage-ME3G6HA2.js → usage-4UULCJXY.js} +8 -8
  120. package/dist/{version-B5PGYRJS.js → version-VXE4NJRN.js} +4 -4
  121. package/dist/{wait-EJ3NSO3I.js → wait-6UPWZO3M.js} +9 -9
  122. package/dist/wd-bin.js +5 -5
  123. package/dist/web/assets/{PtyView-CQ28dTBZ.js → PtyView-D2PAxKJT.js} +2 -2
  124. package/dist/web/assets/{PtyView-CQ28dTBZ.js.map → PtyView-D2PAxKJT.js.map} +1 -1
  125. package/dist/web/assets/{index-BGsdgBN7.css → index-BNHgDFNt.css} +1 -1
  126. package/dist/web/assets/index-BnoJcoyB.js +126 -0
  127. package/dist/web/assets/index-BnoJcoyB.js.map +1 -0
  128. package/dist/web/index.html +2 -2
  129. package/dist/{web-VVKBEQTY.js → web-6FWX5663.js} +586 -397
  130. package/dist/web-6FWX5663.js.map +1 -0
  131. package/npm-shrinkwrap.json +2 -2
  132. package/package.json +1 -1
  133. package/plugins/work-tree/skills/work-sessions/SKILL.md +2 -0
  134. package/dist/chunk-EYRMS43Y.js +0 -9
  135. package/dist/chunk-HUD4JLK3.js.map +0 -1
  136. package/dist/chunk-INI6TEYT.js.map +0 -1
  137. package/dist/chunk-VTRDEXTJ.js.map +0 -1
  138. package/dist/chunk-ZJGHHHTW.js.map +0 -1
  139. package/dist/web/assets/index-BVsqk63T.js +0 -126
  140. package/dist/web/assets/index-BVsqk63T.js.map +0 -1
  141. package/dist/web-VVKBEQTY.js.map +0 -1
  142. /package/dist/{account-PE4R56QL.js.map → account-TNPXQ3BO.js.map} +0 -0
  143. /package/dist/{add-repo-AWETXFQI.js.map → add-repo-YJQ65OV4.js.map} +0 -0
  144. /package/dist/{answer-LVALFOZK.js.map → answer-BGZIWFVB.js.map} +0 -0
  145. /package/dist/{attach-BSNR3XMY.js.map → attach-E2OJC7ST.js.map} +0 -0
  146. /package/dist/{block-MEE2T22H.js.map → block-44POA6KR.js.map} +0 -0
  147. /package/dist/{broadcast-JBNGNKQ4.js.map → broadcast-E7357IWA.js.map} +0 -0
  148. /package/dist/{catchup-HQ3EOMAE.js.map → catchup-KAB23EFN.js.map} +0 -0
  149. /package/dist/{chunk-FJJDZ7TA.js.map → chunk-4D52OAAP.js.map} +0 -0
  150. /package/dist/{chunk-IYIVSXTI.js.map → chunk-6NTMQ7XI.js.map} +0 -0
  151. /package/dist/{chunk-TEB3INZR.js.map → chunk-7JEMR4RU.js.map} +0 -0
  152. /package/dist/{chunk-E3XUCHIY.js.map → chunk-7VAKNNLB.js.map} +0 -0
  153. /package/dist/{chunk-RIKAEVFL.js.map → chunk-7XKIRMS4.js.map} +0 -0
  154. /package/dist/{chunk-PDOG3O4N.js.map → chunk-7ZL3GJGY.js.map} +0 -0
  155. /package/dist/{chunk-UAOVWCJD.js.map → chunk-B4G5QHTU.js.map} +0 -0
  156. /package/dist/{chunk-3FP7S6ZA.js.map → chunk-B7BNMPY3.js.map} +0 -0
  157. /package/dist/{chunk-HQY7TLIK.js.map → chunk-BB44TXV4.js.map} +0 -0
  158. /package/dist/{chunk-QOBQ27VG.js.map → chunk-BD26XB2E.js.map} +0 -0
  159. /package/dist/{chunk-57ONODV4.js.map → chunk-BHYTCA55.js.map} +0 -0
  160. /package/dist/{chunk-EJ4GGY7P.js.map → chunk-CF6Y2RZJ.js.map} +0 -0
  161. /package/dist/{chunk-M225TR5L.js.map → chunk-CO6BX4RN.js.map} +0 -0
  162. /package/dist/{chunk-ITZBHSTZ.js.map → chunk-D4ZDTXFV.js.map} +0 -0
  163. /package/dist/{chunk-JLRX3QN4.js.map → chunk-DBWVWWUO.js.map} +0 -0
  164. /package/dist/{chunk-65AEMPEA.js.map → chunk-ESZ52W6E.js.map} +0 -0
  165. /package/dist/{chunk-DVHRE4AY.js.map → chunk-ESZXUBYI.js.map} +0 -0
  166. /package/dist/{chunk-PUE2ZM4A.js.map → chunk-G6K5U3KW.js.map} +0 -0
  167. /package/dist/{chunk-MSZN3BC5.js.map → chunk-GWANOCQ4.js.map} +0 -0
  168. /package/dist/{chunk-NS57XEVZ.js.map → chunk-IJEAHNJZ.js.map} +0 -0
  169. /package/dist/{chunk-RECQAHC5.js.map → chunk-JNKFPFH6.js.map} +0 -0
  170. /package/dist/{chunk-YWDUEGXD.js.map → chunk-L5OZXDTB.js.map} +0 -0
  171. /package/dist/{chunk-7NL3E27M.js.map → chunk-LEDE3P4Q.js.map} +0 -0
  172. /package/dist/{chunk-3VRNXFIZ.js.map → chunk-LK2ZVCKH.js.map} +0 -0
  173. /package/dist/{chunk-OIC2PWUH.js.map → chunk-LKJLUSYR.js.map} +0 -0
  174. /package/dist/{chunk-GXJ37PQY.js.map → chunk-LQ4BEHS4.js.map} +0 -0
  175. /package/dist/{chunk-QOCCG4DW.js.map → chunk-M3RDUGQV.js.map} +0 -0
  176. /package/dist/{chunk-MWDDSULR.js.map → chunk-M5YM3CQY.js.map} +0 -0
  177. /package/dist/{chunk-5JIP2OR3.js.map → chunk-OMY7MGNN.js.map} +0 -0
  178. /package/dist/{chunk-JK3YCAP7.js.map → chunk-PAEWU7UC.js.map} +0 -0
  179. /package/dist/{chunk-QIIZPLOL.js.map → chunk-PBJVVXG7.js.map} +0 -0
  180. /package/dist/{chunk-WZKO4WQI.js.map → chunk-POHAQY4D.js.map} +0 -0
  181. /package/dist/{chunk-LAKPOS5Z.js.map → chunk-PR3BA5BP.js.map} +0 -0
  182. /package/dist/{chunk-JMLRBCYG.js.map → chunk-Q5WOXF2D.js.map} +0 -0
  183. /package/dist/{chunk-EYRMS43Y.js.map → chunk-QXDSIIID.js.map} +0 -0
  184. /package/dist/{chunk-XTRC6IOA.js.map → chunk-RUIBZ6DI.js.map} +0 -0
  185. /package/dist/{chunk-3GI5PO57.js.map → chunk-S43GVNRB.js.map} +0 -0
  186. /package/dist/{chunk-XDNYUZZN.js.map → chunk-TYZSHKFP.js.map} +0 -0
  187. /package/dist/{chunk-Y5GP7O4Q.js.map → chunk-UY77MGXI.js.map} +0 -0
  188. /package/dist/{chunk-3IGVY5S5.js.map → chunk-V3MRBAZU.js.map} +0 -0
  189. /package/dist/{chunk-G5AAYK56.js.map → chunk-VLUME72O.js.map} +0 -0
  190. /package/dist/{chunk-KXGLGXAE.js.map → chunk-VQTPBS63.js.map} +0 -0
  191. /package/dist/{chunk-L6XZYMOS.js.map → chunk-W7KGS2OH.js.map} +0 -0
  192. /package/dist/{chunk-IIIAV6OD.js.map → chunk-WAZCBD7Y.js.map} +0 -0
  193. /package/dist/{chunk-GY5FELHG.js.map → chunk-WI5WFJJW.js.map} +0 -0
  194. /package/dist/{chunk-6C4WLRND.js.map → chunk-WOD7XSNC.js.map} +0 -0
  195. /package/dist/{chunk-KCXJ3NKO.js.map → chunk-XGOSOA7U.js.map} +0 -0
  196. /package/dist/{chunk-P4N5VKEZ.js.map → chunk-XGZB2DOA.js.map} +0 -0
  197. /package/dist/{chunk-4FU4VGPY.js.map → chunk-XWFL5U4X.js.map} +0 -0
  198. /package/dist/{chunk-AQHGYLVN.js.map → chunk-Y2DBNXZH.js.map} +0 -0
  199. /package/dist/{chunk-DQWZDA2E.js.map → chunk-Z3T5FWM6.js.map} +0 -0
  200. /package/dist/{chunk-2MPLY2Z2.js.map → chunk-ZH5M36JU.js.map} +0 -0
  201. /package/dist/{chunk-MHGY2TTW.js.map → chunk-ZKGCL4HY.js.map} +0 -0
  202. /package/dist/{cleanup-ABHJOT4X.js.map → cleanup-5QEBRJHT.js.map} +0 -0
  203. /package/dist/{cli-QXBRNVPR.js.map → cli-7RDR5XZ5.js.map} +0 -0
  204. /package/dist/{config-JBSRQRET.js.map → config-4QLJCSBD.js.map} +0 -0
  205. /package/dist/{diff-CYBDUDUD.js.map → diff-TXIFHZ4Q.js.map} +0 -0
  206. /package/dist/{digest-B3ZJCZW4.js.map → digest-QJCR5LY7.js.map} +0 -0
  207. /package/dist/{fork-RGXYHVOE.js.map → fork-NUAOPRCN.js.map} +0 -0
  208. /package/dist/{history-UA5ALWRQ.js.map → history-C4RXAT65.js.map} +0 -0
  209. /package/dist/{hook-DKGO437N.js.map → hook-S3IBPKGS.js.map} +0 -0
  210. /package/dist/{hydrate-7Q4MCUPI.js.map → hydrate-B54DIUGL.js.map} +0 -0
  211. /package/dist/{init-RAQTTWR6.js.map → init-F2MYX6MQ.js.map} +0 -0
  212. /package/dist/{install-skills-LQO7EHL7.js.map → install-skills-QX4OATOS.js.map} +0 -0
  213. /package/dist/{keep-XD3JM6BW.js.map → keep-NE6TML4Z.js.map} +0 -0
  214. /package/dist/{list-65UEHVZH.js.map → list-MW6QCFUB.js.map} +0 -0
  215. /package/dist/{move-GCBXY5II.js.map → move-33T6LDPZ.js.map} +0 -0
  216. /package/dist/{note-4QTSIAKO.js.map → note-BPDRSGX2.js.map} +0 -0
  217. /package/dist/{overlaps-5X4DZJ6A.js.map → overlaps-6VZ5MP5T.js.map} +0 -0
  218. /package/dist/{pin-N643KWEK.js.map → pin-CDRRJE6B.js.map} +0 -0
  219. /package/dist/{pr-ZAOZHNIY.js.map → pr-HLIRK7AT.js.map} +0 -0
  220. /package/dist/{prune-W2FANCA6.js.map → prune-UMGF6EES.js.map} +0 -0
  221. /package/dist/{pty-host-R6P2I7C2.js.map → pty-host-JB3RIUDL.js.map} +0 -0
  222. /package/dist/{read-U7RSNVKQ.js.map → read-HDFVXH6H.js.map} +0 -0
  223. /package/dist/{recent-PEGDUXGK.js.map → recent-NKWAXBYW.js.map} +0 -0
  224. /package/dist/{remove-4Z3L6UZE.js.map → remove-ELVCCF4J.js.map} +0 -0
  225. /package/dist/{restart-4JAHJRJP.js.map → restart-PJIRMPK2.js.map} +0 -0
  226. /package/dist/{resume-MOPF6Q47.js.map → resume-3R6FOHL7.js.map} +0 -0
  227. /package/dist/{review-VCMEMSGB.js.map → review-AOSPR5KG.js.map} +0 -0
  228. /package/dist/{review-now-NXMBEJ5R.js.map → review-now-X34EXZ5U.js.map} +0 -0
  229. /package/dist/{run-N6EFNZ2H.js.map → run-MV2LFD4H.js.map} +0 -0
  230. /package/dist/{screen-S7JYKVCD.js.map → screen-I4PKJUDE.js.map} +0 -0
  231. /package/dist/{search-JO7EIO2E.js.map → search-S7O4M35Q.js.map} +0 -0
  232. /package/dist/{section-PFOG3MWL.js.map → section-BCBQOMG5.js.map} +0 -0
  233. /package/dist/{send-P5SLG4OQ.js.map → send-JMKAMSUB.js.map} +0 -0
  234. /package/dist/{sessions-6FXLLEFC.js.map → sessions-DNZPSWOU.js.map} +0 -0
  235. /package/dist/{snooze-PJTGJDFI.js.map → snooze-CLKJDZAJ.js.map} +0 -0
  236. /package/dist/{start-BKBV7FI2.js.map → start-KJODTJXK.js.map} +0 -0
  237. /package/dist/{state-LDDRQFWX.js.map → state-GPEV4FHA.js.map} +0 -0
  238. /package/dist/{status-6LE2QFF3.js.map → status-PPXTDG43.js.map} +0 -0
  239. /package/dist/{statusline-OU4LKQQD.js.map → statusline-QN4AERZC.js.map} +0 -0
  240. /package/dist/{stop-JNCT233L.js.map → stop-YFCYGC6D.js.map} +0 -0
  241. /package/dist/{sync-SRTMLWJT.js.map → sync-QACKQ2X2.js.map} +0 -0
  242. /package/dist/{time-L6RBKV3P.js.map → time-LPNBJFCY.js.map} +0 -0
  243. /package/dist/{time-actions-KYFYV7F2.js.map → time-actions-B7YKVDVE.js.map} +0 -0
  244. /package/dist/{timesheet-DL2VWJ2V.js.map → timesheet-SSDDOKBL.js.map} +0 -0
  245. /package/dist/{todo-54OJY5VV.js.map → todo-VBWHS2HU.js.map} +0 -0
  246. /package/dist/{tree-RCBXUIIK.js.map → tree-26MFCA27.js.map} +0 -0
  247. /package/dist/{update-VFLAO2DP.js.map → update-DMPTLZFM.js.map} +0 -0
  248. /package/dist/{usage-ME3G6HA2.js.map → usage-4UULCJXY.js.map} +0 -0
  249. /package/dist/{version-B5PGYRJS.js.map → version-VXE4NJRN.js.map} +0 -0
  250. /package/dist/{wait-EJ3NSO3I.js.map → wait-6UPWZO3M.js.map} +0 -0
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  ensureAgentPath,
4
4
  restartHost
5
- } from "./chunk-JK3YCAP7.js";
5
+ } from "./chunk-PAEWU7UC.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-MWDDSULR.js";
19
+ } from "./chunk-M5YM3CQY.js";
20
20
  import {
21
21
  addTask,
22
22
  completeTask,
@@ -38,7 +38,7 @@ import {
38
38
  serveSpa,
39
39
  sessionBaseForPath,
40
40
  submitReviewSchema
41
- } from "./chunk-L6XZYMOS.js";
41
+ } from "./chunk-W7KGS2OH.js";
42
42
  import {
43
43
  announceChange,
44
44
  createArchivedRows,
@@ -53,25 +53,28 @@ import {
53
53
  stageSeenKey,
54
54
  storeHolding,
55
55
  withRestoring
56
- } from "./chunk-QOBQ27VG.js";
56
+ } from "./chunk-BD26XB2E.js";
57
57
  import {
58
58
  createDigestSource
59
- } from "./chunk-GXJ37PQY.js";
59
+ } from "./chunk-LQ4BEHS4.js";
60
60
  import {
61
61
  createBuildFoldersJob,
62
62
  defaultBranchTidyDeps,
63
63
  defaultBuildFoldersDeps,
64
64
  deleteMergedBranches,
65
65
  findMergedBranches
66
- } from "./chunk-WZKO4WQI.js";
66
+ } from "./chunk-POHAQY4D.js";
67
67
  import {
68
68
  defaultCleanupDeps
69
- } from "./chunk-5JIP2OR3.js";
69
+ } from "./chunk-OMY7MGNN.js";
70
70
  import {
71
71
  DiffStatCache,
72
72
  findOverlaps,
73
73
  wantsDiffStat
74
- } from "./chunk-YWDUEGXD.js";
74
+ } from "./chunk-L5OZXDTB.js";
75
+ import {
76
+ sendToSession
77
+ } from "./chunk-KWHHB737.js";
75
78
  import {
76
79
  MAX_NOTE_CHARS,
77
80
  readNote,
@@ -89,7 +92,7 @@ import {
89
92
  removeBlocker,
90
93
  sweepBlocks,
91
94
  unblockedPrompt
92
- } from "./chunk-GY5FELHG.js";
95
+ } from "./chunk-WI5WFJJW.js";
93
96
  import {
94
97
  jiraWorklogPoster,
95
98
  logWorkDay,
@@ -107,28 +110,25 @@ import {
107
110
  removeAgentAccount,
108
111
  setDefaultAgentAccount,
109
112
  switchRefusal
110
- } from "./chunk-NS57XEVZ.js";
113
+ } from "./chunk-IJEAHNJZ.js";
111
114
  import {
112
115
  buildUsage,
113
116
  realUsageDeps,
114
117
  setupAgentUsage
115
- } from "./chunk-QOCCG4DW.js";
118
+ } from "./chunk-M3RDUGQV.js";
116
119
  import {
117
120
  sessionWorkTime
118
- } from "./chunk-KCXJ3NKO.js";
121
+ } from "./chunk-XGOSOA7U.js";
119
122
  import "./chunk-UVZITL47.js";
120
- import {
121
- sendToSession
122
- } from "./chunk-KWHHB737.js";
123
123
  import {
124
124
  defaultForkDeps,
125
125
  forkSession,
126
126
  startSessionWithPrompt
127
- } from "./chunk-M225TR5L.js";
127
+ } from "./chunk-CO6BX4RN.js";
128
128
  import {
129
129
  addRepoRefusal,
130
130
  addedRepoNote
131
- } from "./chunk-3IGVY5S5.js";
131
+ } from "./chunk-V3MRBAZU.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-6C4WLRND.js";
147
+ } from "./chunk-WOD7XSNC.js";
148
148
  import {
149
149
  askCatchUp,
150
150
  cachedCatchUp,
151
151
  catchUp,
152
152
  catchUpFacts,
153
153
  forgetCatchUp
154
- } from "./chunk-PUE2ZM4A.js";
154
+ } from "./chunk-G6K5U3KW.js";
155
155
  import {
156
156
  applyPlacePatch,
157
157
  applySectionOp,
@@ -185,7 +185,7 @@ import {
185
185
  tempoSetup,
186
186
  timeRange,
187
187
  updateDay
188
- } from "./chunk-XTRC6IOA.js";
188
+ } from "./chunk-RUIBZ6DI.js";
189
189
  import {
190
190
  DISCUSSION_OPEN_MIN_MS,
191
191
  LEFT_OVER_SUBMIT,
@@ -193,6 +193,7 @@ import {
193
193
  afterFailedSubmit,
194
194
  afterSubmit,
195
195
  allReviews,
196
+ attentionItems,
196
197
  buildReview,
197
198
  carryForward,
198
199
  claimStale,
@@ -227,7 +228,7 @@ import {
227
228
  withClaim,
228
229
  withFixClaim,
229
230
  withoutFixClaim
230
- } from "./chunk-HUD4JLK3.js";
231
+ } from "./chunk-4YJQZE7D.js";
231
232
  import {
232
233
  asData,
233
234
  asDataBlock
@@ -248,7 +249,7 @@ import {
248
249
  checkTools,
249
250
  saveFolders,
250
251
  setupState
251
- } from "./chunk-HQY7TLIK.js";
252
+ } from "./chunk-BB44TXV4.js";
252
253
  import {
253
254
  RepoAdminError,
254
255
  deleteGroup,
@@ -260,7 +261,7 @@ import {
260
261
  setRepoIgnored,
261
262
  setReviewMode,
262
263
  setScanRoot
263
- } from "./chunk-IYIVSXTI.js";
264
+ } from "./chunk-6NTMQ7XI.js";
264
265
  import {
265
266
  freeLeftovers,
266
267
  leftoversOf,
@@ -269,32 +270,32 @@ import {
269
270
  parsePrRef,
270
271
  resolvePrToStart,
271
272
  workOnPrPrompt
272
- } from "./chunk-TEB3INZR.js";
273
+ } from "./chunk-7JEMR4RU.js";
273
274
  import {
274
275
  legacyUnsafeCheck
275
- } from "./chunk-MSZN3BC5.js";
276
- import {
277
- agentsBySession,
278
- summarizeAgents
279
- } from "./chunk-JLRX3QN4.js";
276
+ } from "./chunk-GWANOCQ4.js";
280
277
  import {
281
278
  howToLift
282
279
  } from "./chunk-FZHFD2AY.js";
280
+ import {
281
+ agentsBySession,
282
+ summarizeAgents
283
+ } from "./chunk-DBWVWWUO.js";
283
284
  import {
284
285
  resolveWorkBinPath
285
286
  } from "./chunk-AH5TM3NB.js";
286
287
  import {
287
288
  editorArgs,
288
289
  openUrl
289
- } from "./chunk-3GI5PO57.js";
290
+ } from "./chunk-S43GVNRB.js";
290
291
  import {
291
292
  removeWorktreeInChild
292
- } from "./chunk-UAOVWCJD.js";
293
+ } from "./chunk-B4G5QHTU.js";
293
294
  import {
294
295
  archiveMergedSession,
295
296
  archiveWaiting,
296
297
  defaultArchiveDeps
297
- } from "./chunk-E3XUCHIY.js";
298
+ } from "./chunk-7VAKNNLB.js";
298
299
  import {
299
300
  cleanupVerdict,
300
301
  createCleanupJob
@@ -314,7 +315,7 @@ import {
314
315
  retireResolvedReplies,
315
316
  sessionRepoRefs,
316
317
  withThreadContext
317
- } from "./chunk-65AEMPEA.js";
318
+ } from "./chunk-ESZ52W6E.js";
318
319
  import {
319
320
  DEFAULT_TRUSTED_BOTS,
320
321
  createCiStore,
@@ -324,23 +325,23 @@ import {
324
325
  openThreadsOf,
325
326
  reviewMessage,
326
327
  subAgentHint
327
- } from "./chunk-KXGLGXAE.js";
328
+ } from "./chunk-VQTPBS63.js";
328
329
  import {
329
330
  sessionStatusView,
330
331
  shownState
331
- } from "./chunk-DVHRE4AY.js";
332
+ } from "./chunk-ESZXUBYI.js";
332
333
  import {
333
334
  internalReadOnly,
334
335
  runInternal,
335
336
  runInternalReadOnly,
336
337
  summarizeCheckpoint,
337
338
  throttleTrailing
338
- } from "./chunk-FJJDZ7TA.js";
339
+ } from "./chunk-4D52OAAP.js";
339
340
  import {
340
341
  computeDiff,
341
342
  computeRangeDiff,
342
343
  parseGitDiff
343
- } from "./chunk-P4N5VKEZ.js";
344
+ } from "./chunk-XGZB2DOA.js";
344
345
  import {
345
346
  commandWords,
346
347
  describeProcess,
@@ -357,7 +358,7 @@ import {
357
358
  keyedQueue,
358
359
  oneAtATime,
359
360
  runWorkChild
360
- } from "./chunk-7NL3E27M.js";
361
+ } from "./chunk-LEDE3P4Q.js";
361
362
  import {
362
363
  configurePtyPool,
363
364
  detachPtyPool,
@@ -381,21 +382,21 @@ import {
381
382
  syncPtyPool,
382
383
  terminalTicketUrl,
383
384
  writeToPty
384
- } from "./chunk-EJ4GGY7P.js";
385
- import "./chunk-G5AAYK56.js";
385
+ } from "./chunk-CF6Y2RZJ.js";
386
+ import "./chunk-VLUME72O.js";
386
387
  import {
387
388
  disposeAllWatchers,
388
389
  disposeSessionWatcher,
389
390
  findSession as findSession2,
390
391
  subscribeSession
391
- } from "./chunk-Y5GP7O4Q.js";
392
- import "./chunk-IIIAV6OD.js";
393
- import "./chunk-RECQAHC5.js";
392
+ } from "./chunk-UY77MGXI.js";
393
+ import "./chunk-WAZCBD7Y.js";
394
+ import "./chunk-JNKFPFH6.js";
394
395
  import {
395
396
  teardownWorktree,
396
397
  toBaseSpec,
397
398
  wouldRefuseRemoval
398
- } from "./chunk-2MPLY2Z2.js";
399
+ } from "./chunk-ZH5M36JU.js";
399
400
  import "./chunk-UH72CZAX.js";
400
401
  import {
401
402
  isWorktreeFolder
@@ -405,15 +406,15 @@ import {
405
406
  assistantDir,
406
407
  describeView,
407
408
  writeAssistantContext
408
- } from "./chunk-ITZBHSTZ.js";
409
+ } from "./chunk-D4ZDTXFV.js";
409
410
  import "./chunk-7E5XPDKX.js";
410
- import "./chunk-4FU4VGPY.js";
411
+ import "./chunk-XWFL5U4X.js";
411
412
  import {
412
413
  NOTE_NUDGE,
413
414
  findSessionForCwd,
414
415
  readPendingForSession,
415
416
  readPendingForWorktree
416
- } from "./chunk-MHGY2TTW.js";
417
+ } from "./chunk-ZKGCL4HY.js";
417
418
  import {
418
419
  getCommentFileStore
419
420
  } from "./chunk-RVSRZ57P.js";
@@ -433,17 +434,17 @@ import {
433
434
  stageInputOf,
434
435
  withRequiredChecks,
435
436
  workElsewhere
436
- } from "./chunk-JMLRBCYG.js";
437
+ } from "./chunk-Q5WOXF2D.js";
437
438
  import {
438
439
  createSessionBranches
439
- } from "./chunk-LAKPOS5Z.js";
440
+ } from "./chunk-PR3BA5BP.js";
440
441
  import {
441
442
  defaultHost,
442
443
  hostById,
443
444
  hostForRepo,
444
445
  hostOfPrUrl,
445
446
  originHostname
446
- } from "./chunk-QIIZPLOL.js";
447
+ } from "./chunk-PBJVVXG7.js";
447
448
  import {
448
449
  MAX_THREAD_BODY
449
450
  } from "./chunk-FGPXMAYU.js";
@@ -456,7 +457,7 @@ import {
456
457
  readSessionBranches,
457
458
  repoNameOf,
458
459
  wasPushed
459
- } from "./chunk-OIC2PWUH.js";
460
+ } from "./chunk-LKJLUSYR.js";
460
461
  import {
461
462
  enrollProblem,
462
463
  groupProblem,
@@ -557,7 +558,7 @@ import {
557
558
  updateCheckpoint,
558
559
  whileRestoring,
559
560
  writeArchiveRecord
560
- } from "./chunk-VTRDEXTJ.js";
561
+ } from "./chunk-OGGGOFCZ.js";
561
562
  import {
562
563
  dayKey
563
564
  } from "./chunk-NEJVK5CF.js";
@@ -590,10 +591,10 @@ import {
590
591
  readJsonlSince,
591
592
  refShaFromFiles,
592
593
  workingBranch
593
- } from "./chunk-AQHGYLVN.js";
594
+ } from "./chunk-Y2DBNXZH.js";
594
595
  import {
595
596
  VERSION
596
- } from "./chunk-EYRMS43Y.js";
597
+ } from "./chunk-QXDSIIID.js";
597
598
  import {
598
599
  resolveProjectTarget
599
600
  } from "./chunk-7UXV4X2Y.js";
@@ -618,11 +619,11 @@ import {
618
619
  accountOfLoginId
619
620
  } from "./chunk-SJBEIYLK.js";
620
621
  import "./chunk-AYHDJMMJ.js";
621
- import "./chunk-DQWZDA2E.js";
622
+ import "./chunk-Z3T5FWM6.js";
622
623
  import {
623
624
  DEFAULT_ACCOUNT_NAME,
624
625
  accountNameProblem
625
- } from "./chunk-PDOG3O4N.js";
626
+ } from "./chunk-7ZL3GJGY.js";
626
627
  import {
627
628
  DEFAULT_ACCOUNT,
628
629
  DEFAULT_PROMPTS,
@@ -630,7 +631,7 @@ import {
630
631
  getConfigPath,
631
632
  isWorkday,
632
633
  loadConfig
633
- } from "./chunk-INI6TEYT.js";
634
+ } from "./chunk-FLY3VR6B.js";
634
635
  import {
635
636
  bootTime,
636
637
  detachHere,
@@ -659,11 +660,11 @@ import {
659
660
  } from "./chunk-6THUVP6T.js";
660
661
 
661
662
  // src/commands/web.ts
662
- import fs20 from "fs";
663
+ import fs21 from "fs";
663
664
  import chalk from "chalk";
664
665
 
665
666
  // src/server/web-server.ts
666
- import fs17 from "fs";
667
+ import fs18 from "fs";
667
668
 
668
669
  // src/core/conversations/last-reply.ts
669
670
  function lastReplyOf(entries) {
@@ -1372,7 +1373,9 @@ async function prepareLocalReview(session, repo, deps) {
1372
1373
  const meta = localMeta(session, picked.map((r) => r.name).join(REPOS_JOIN), diff.resolvedBase, diffSignature(all));
1373
1374
  const kinds = kindsOf(files, extras, rules);
1374
1375
  const agent = deps.agent;
1375
- const prompt = agent ? reviewPrompt(meta, files, kinds) : null;
1376
+ const attention = deps.attention?.(session) ?? [];
1377
+ const told = attention.length ? { attention } : {};
1378
+ const prompt = agent ? reviewPrompt(meta, files, kinds, told) : null;
1376
1379
  const tree = prompt && agent && deps.inTree ? await deps.inTree(
1377
1380
  session,
1378
1381
  picked.map((r) => r.name)
@@ -1384,12 +1387,12 @@ async function prepareLocalReview(session, repo, deps) {
1384
1387
  if (!agent) return null;
1385
1388
  passesAsked++;
1386
1389
  if (inTree) {
1387
- const there = reviewPrompt(meta, files, kinds, { ...opts, checkout: inTree.lines });
1390
+ const there = reviewPrompt(meta, files, kinds, { ...opts, ...told, checkout: inTree.lines });
1388
1391
  const answer2 = there ? await inTree.ask(there).catch(() => null) : null;
1389
1392
  if (answer2) return answer2;
1390
1393
  fellBack++;
1391
1394
  }
1392
- const plain = reviewPrompt(meta, files, kinds, opts);
1395
+ const plain = reviewPrompt(meta, files, kinds, { ...opts, ...told });
1393
1396
  return plain ? agent(plain).catch(() => null) : null;
1394
1397
  };
1395
1398
  const asked = promptPaths(kinds);
@@ -1404,6 +1407,7 @@ async function prepareLocalReview(session, repo, deps) {
1404
1407
  ...rules ? { rules } : {},
1405
1408
  ...deps.now ? { now: deps.now() } : {},
1406
1409
  ...deps.agent ? {} : { notAskedWhy: "no agent for the AI step: stories are by folder" },
1410
+ ...attention.length ? { attention } : {},
1407
1411
  ignored
1408
1412
  });
1409
1413
  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";
@@ -1598,6 +1602,280 @@ function mountSessionReviewRoutes(app, deps) {
1598
1602
  return { drop: reviews.drop };
1599
1603
  }
1600
1604
 
1605
+ // src/server/routes/session-show-routes.ts
1606
+ import fs4 from "fs";
1607
+
1608
+ // src/core/sessions/shown-file.ts
1609
+ import path2 from "path";
1610
+ function shownKind(file) {
1611
+ const ext = file.slice(file.lastIndexOf(".") + 1).toLowerCase();
1612
+ if (ext === "md" || ext === "markdown" || ext === "mdx") return "markdown";
1613
+ if (["png", "jpg", "jpeg", "gif", "webp", "bmp", "avif"].includes(ext)) return "image";
1614
+ return "text";
1615
+ }
1616
+ function imageType(file) {
1617
+ const ext = file.slice(file.lastIndexOf(".") + 1).toLowerCase();
1618
+ const types = {
1619
+ png: "image/png",
1620
+ jpg: "image/jpeg",
1621
+ jpeg: "image/jpeg",
1622
+ gif: "image/gif",
1623
+ webp: "image/webp",
1624
+ bmp: "image/bmp",
1625
+ avif: "image/avif"
1626
+ };
1627
+ return types[ext] ?? null;
1628
+ }
1629
+ var norm = (p) => path2.resolve(p).replace(/\\/g, "/").replace(/\/+$/, "");
1630
+ var sameStart = (a, b) => process.platform === "win32" ? a.toLowerCase() === b.toLowerCase() : a === b;
1631
+ function locateInSession(s, file) {
1632
+ const target = norm(file);
1633
+ const roots = s.paths.map((p) => ({ repo: path2.basename(norm(p)), root: norm(p) }));
1634
+ if (s.isGroup && roots.length) {
1635
+ const parents = [...new Set(roots.map((r) => path2.posix.dirname(r.root)))];
1636
+ if (parents.length === 1) roots.push({ repo: "", root: parents[0] });
1637
+ }
1638
+ const holding = roots.filter((r) => target.length > r.root.length + 1 && sameStart(target.slice(0, r.root.length + 1), `${r.root}/`)).sort((a, b) => b.root.length - a.root.length)[0];
1639
+ if (!holding) return null;
1640
+ const rel = target.slice(holding.root.length + 1);
1641
+ if (holding.repo === "" && rel.includes("/")) return null;
1642
+ return { repo: holding.repo, path: rel };
1643
+ }
1644
+ function createShownFiles(deps) {
1645
+ const shown = /* @__PURE__ */ new Map();
1646
+ return {
1647
+ get: (sessionId) => shown.get(sessionId) ?? null,
1648
+ show(sessionId, file) {
1649
+ const next = { repo: file.repo, path: file.path, at: (deps.now?.() ?? /* @__PURE__ */ new Date()).toISOString() };
1650
+ shown.set(sessionId, next);
1651
+ deps.onChange(sessionId);
1652
+ return next;
1653
+ },
1654
+ /** False when it showed nothing. */
1655
+ close(sessionId) {
1656
+ if (!shown.delete(sessionId)) return false;
1657
+ deps.onChange(sessionId);
1658
+ return true;
1659
+ }
1660
+ };
1661
+ }
1662
+
1663
+ // src/core/worktree/code-browse.ts
1664
+ import fs3 from "fs";
1665
+ import path3 from "path";
1666
+ var MAX_CODE_FILES = 5e4;
1667
+ var MAX_CODE_FILE_BYTES = 2 * 1024 * 1024;
1668
+ var LIST_TTL_MS = 3e3;
1669
+ function codeRoots(s) {
1670
+ return s.paths.map((p) => ({ name: path3.basename(p), root: p }));
1671
+ }
1672
+ function groupRoot(s) {
1673
+ if (!s.isGroup || s.paths.length === 0) return null;
1674
+ const parents = [...new Set(s.paths.map((p) => path3.dirname(p)))];
1675
+ return parents.length === 1 ? parents[0] : null;
1676
+ }
1677
+ var realIo = {
1678
+ git: (cwd, args) => runGitAsync(cwd, { args })
1679
+ };
1680
+ var nul = (out) => out.split("\0").filter(Boolean);
1681
+ var fwd = (p) => p.replace(/\\/g, "/");
1682
+ var listCache = /* @__PURE__ */ new Map();
1683
+ var MAX_LISTS = 12;
1684
+ var sets = /* @__PURE__ */ new WeakMap();
1685
+ function setOf(files) {
1686
+ let set = sets.get(files);
1687
+ if (!set) sets.set(files, set = new Set(files));
1688
+ return set;
1689
+ }
1690
+ async function isListed(root, rel, io = realIo, now = Date.now()) {
1691
+ const hit = listCache.get(root);
1692
+ if (hit && now - hit.at < LIST_TTL_MS) return setOf(await hit.files).has(rel);
1693
+ const r = await io.git(root, ["ls-files", "-c", "-o", "--exclude-standard", "-z", "--", `:(literal)${rel}`]);
1694
+ return r.status === 0 && nul(r.stdout).some((f) => fwd(f) === rel);
1695
+ }
1696
+ function listRepoFiles(root, io = realIo, now = Date.now()) {
1697
+ const hit = listCache.get(root);
1698
+ if (hit && now - hit.at < LIST_TTL_MS) return hit.files;
1699
+ const files = io.git(root, ["ls-files", "-t", "-c", "-o", "-d", "--exclude-standard", "-z"]).then((r) => {
1700
+ if (r.status !== 0) return [];
1701
+ const listed = /* @__PURE__ */ new Set();
1702
+ const gone = /* @__PURE__ */ new Set();
1703
+ for (const e of nul(r.stdout)) {
1704
+ const p = fwd(e.slice(2));
1705
+ if (e[0] === "R") gone.add(p);
1706
+ else listed.add(p);
1707
+ }
1708
+ return [...listed].filter((f) => !gone.has(f)).sort();
1709
+ });
1710
+ listCache.delete(root);
1711
+ listCache.set(root, { at: now, files });
1712
+ while (listCache.size > MAX_LISTS) listCache.delete(listCache.keys().next().value);
1713
+ return files;
1714
+ }
1715
+ async function changedFiles(root, base, io = realIo) {
1716
+ const out = /* @__PURE__ */ new Set();
1717
+ const status = await io.git(root, ["status", "--porcelain=v1", "-z", "--untracked-files=all"]);
1718
+ if (status.status === 0) {
1719
+ const entries = nul(status.stdout);
1720
+ for (let i = 0; i < entries.length; i++) {
1721
+ const e = entries[i];
1722
+ const code = e.slice(0, 2);
1723
+ out.add(fwd(e.slice(3)));
1724
+ if (code.includes("R") || code.includes("C")) i++;
1725
+ }
1726
+ }
1727
+ let from = null;
1728
+ for (const ref of base ? base.startsWith("origin/") ? [base] : [base, `origin/${base}`] : ["origin/HEAD"]) {
1729
+ const mb = await io.git(root, ["merge-base", ref, "HEAD"]);
1730
+ const sha = mb.stdout.trim();
1731
+ if (mb.status !== 0 || !sha || sha === from) continue;
1732
+ if (!from || (await io.git(root, ["merge-base", "--is-ancestor", from, sha])).status === 0) from = sha;
1733
+ }
1734
+ if (!from && base) {
1735
+ const mb = await io.git(root, ["merge-base", "origin/HEAD", "HEAD"]);
1736
+ if (mb.status === 0 && mb.stdout.trim()) from = mb.stdout.trim();
1737
+ }
1738
+ if (from) {
1739
+ const diff = await io.git(root, ["diff", "--name-only", "-z", `${from}...HEAD`]);
1740
+ if (diff.status === 0) for (const f of nul(diff.stdout)) out.add(fwd(f));
1741
+ }
1742
+ return [...out].sort();
1743
+ }
1744
+ async function listCodeFiles(s, io = realIo) {
1745
+ const repos = await Promise.all(
1746
+ codeRoots(s).map(async ({ name, root }) => {
1747
+ if (!fs3.existsSync(root)) return { name, files: [], changed: [], truncated: false };
1748
+ const [all, changed] = await Promise.all([listRepoFiles(root, io), changedFiles(root, s.baseBranches?.[root] ?? s.baseBranch, io)]);
1749
+ const listed = new Set(all);
1750
+ return {
1751
+ name,
1752
+ files: all.slice(0, MAX_CODE_FILES),
1753
+ changed: changed.filter((f) => listed.has(f)),
1754
+ truncated: all.length > MAX_CODE_FILES
1755
+ };
1756
+ })
1757
+ );
1758
+ return { group: !!s.isGroup, rootFiles: groupRootFiles(s), repos };
1759
+ }
1760
+ function groupRootFiles(s) {
1761
+ const dir = groupRoot(s);
1762
+ if (!dir) return [];
1763
+ try {
1764
+ return fs3.readdirSync(dir, { withFileTypes: true }).filter((e) => e.isFile() && isGroupNote(e.name)).map((e) => e.name).sort();
1765
+ } catch {
1766
+ return [];
1767
+ }
1768
+ }
1769
+ var isGroupNote = (name) => !name.startsWith(".") && /\.md$/i.test(name);
1770
+ async function codeFilePath(s, repo, rel, io = realIo) {
1771
+ let root;
1772
+ let allowed;
1773
+ if (repo === "") {
1774
+ root = groupRoot(s);
1775
+ allowed = !!root && groupRootFiles(s).includes(rel);
1776
+ } else {
1777
+ root = codeRoots(s).find((r) => r.name === repo)?.root ?? null;
1778
+ allowed = !!root && await isListed(root, rel, io);
1779
+ }
1780
+ if (!root) return { error: "unknown repo" };
1781
+ if (!allowed) return { error: "not listed" };
1782
+ try {
1783
+ const full = path3.resolve(root, rel);
1784
+ const realRoot = fs3.realpathSync.native(root);
1785
+ const real = fs3.realpathSync.native(full);
1786
+ const inside2 = path3.relative(realRoot, real);
1787
+ if (!inside2 || inside2.startsWith("..") || path3.isAbsolute(inside2)) return { error: "not listed" };
1788
+ const st = fs3.statSync(real);
1789
+ if (!st.isFile()) return { error: "unreadable" };
1790
+ return { real, size: st.size };
1791
+ } catch (err) {
1792
+ return { error: err.code === "ENOENT" ? "not listed" : "unreadable" };
1793
+ }
1794
+ }
1795
+ async function readCodeFile(s, repo, rel, io = realIo) {
1796
+ const at = await codeFilePath(s, repo, rel, io);
1797
+ if ("error" in at) return at;
1798
+ if (at.size > MAX_CODE_FILE_BYTES) return { repo, path: rel, size: at.size, text: null, reason: "too-large" };
1799
+ try {
1800
+ const buf = await fs3.promises.readFile(at.real);
1801
+ if (buf.subarray(0, 8e3).includes(0)) return { repo, path: rel, size: at.size, text: null, reason: "binary" };
1802
+ return { repo, path: rel, size: at.size, text: buf.toString("utf-8") };
1803
+ } catch (err) {
1804
+ return { error: err.code === "ENOENT" ? "not listed" : "unreadable" };
1805
+ }
1806
+ }
1807
+
1808
+ // src/server/routes/session-show-routes.ts
1809
+ var MAX_SHOWN_IMAGE_BYTES = 20 * 1024 * 1024;
1810
+ function mountSessionShowRoutes(app, deps) {
1811
+ const shown = createShownFiles({ onChange: (sessionId) => deps.broadcast("session-show-changed", { sessionId }) });
1812
+ const locate = deps.locate ?? ((s, repo, rel) => codeFilePath(s, repo, rel));
1813
+ const wire = (id) => {
1814
+ const f = shown.get(id);
1815
+ return { shown: f ? { ...f, kind: shownKind(f.path) } : null };
1816
+ };
1817
+ app.get("/api/sessions/:id/show", (c) => {
1818
+ const id = c.req.param("id");
1819
+ if (!findSession2(id)) return c.json({ error: "unknown session" }, 404);
1820
+ return c.json(wire(id));
1821
+ });
1822
+ app.post("/api/sessions/:id/show", async (c) => {
1823
+ const id = c.req.param("id");
1824
+ const session = findSession2(id);
1825
+ if (!session) return c.json({ error: "unknown session" }, 404);
1826
+ if (session.archivedAt) return c.json({ error: "It is archived: restore it first." }, 409);
1827
+ const body = await c.req.json().catch(() => ({}));
1828
+ if (body.close === true) {
1829
+ shown.close(id);
1830
+ return c.json(wire(id));
1831
+ }
1832
+ const at = typeof body.file === "string" && body.file ? locateInSession(session, body.file) : typeof body.repo === "string" && typeof body.path === "string" && body.path ? { repo: body.repo, path: body.path.replace(/\\/g, "/") } : void 0;
1833
+ if (at === void 0) return c.json({ error: "file (an absolute path), or repo and path" }, 400);
1834
+ if (!at) return c.json({ error: "That file is not in one of this session\u2019s folders." }, 404);
1835
+ const found = await locate(session, at.repo, at.path);
1836
+ if ("error" in found)
1837
+ return c.json(
1838
+ {
1839
+ error: found.error === "not listed" ? "That file isn\u2019t one this session can show: it doesn\u2019t exist, or git ignores it." : `It can\u2019t be shown: ${found.error}.`
1840
+ },
1841
+ 404
1842
+ );
1843
+ shown.show(id, at);
1844
+ return c.json(wire(id));
1845
+ });
1846
+ app.delete("/api/sessions/:id/show", (c) => {
1847
+ const id = c.req.param("id");
1848
+ if (!findSession2(id)) return c.json({ error: "unknown session" }, 404);
1849
+ shown.close(id);
1850
+ return c.json(wire(id));
1851
+ });
1852
+ app.get("/api/sessions/:id/show/image", async (c) => {
1853
+ const id = c.req.param("id");
1854
+ const session = findSession2(id);
1855
+ const f = shown.get(id);
1856
+ const type = f ? imageType(f.path) : null;
1857
+ if (!session || !f || !type) return c.json({ error: "it shows no image" }, 404);
1858
+ const found = await locate(session, f.repo, f.path);
1859
+ if ("error" in found) return c.json({ error: "not there any more" }, 404);
1860
+ if (found.size > MAX_SHOWN_IMAGE_BYTES) return c.json({ error: "too large to show" }, 413);
1861
+ let bytes;
1862
+ try {
1863
+ bytes = await fs4.promises.readFile(found.real);
1864
+ } catch {
1865
+ return c.json({ error: "not there any more" }, 404);
1866
+ }
1867
+ return new Response(new Uint8Array(bytes), {
1868
+ headers: {
1869
+ "Content-Type": type,
1870
+ "X-Content-Type-Options": "nosniff",
1871
+ "Content-Security-Policy": "default-src 'none'; sandbox",
1872
+ "Cache-Control": "no-store"
1873
+ }
1874
+ });
1875
+ });
1876
+ return { drop: (sessionId) => void shown.close(sessionId) };
1877
+ }
1878
+
1601
1879
  // src/core/review/local-review-store.ts
1602
1880
  var strings2 = (v) => Array.isArray(v) && v.every((x) => typeof x === "string");
1603
1881
  function isStoredLocalReview(v) {
@@ -1623,17 +1901,17 @@ function dropLocalReview(sessionId) {
1623
1901
  }
1624
1902
 
1625
1903
  // src/core/review/local-review-tree.ts
1626
- import path2 from "path";
1627
- var norm = (p) => path2.resolve(p).replace(/\\/g, "/").replace(/\/+$/, "");
1904
+ import path4 from "path";
1905
+ var norm2 = (p) => path4.resolve(p).replace(/\\/g, "/").replace(/\/+$/, "");
1628
1906
  function sessionTree(paths, names) {
1629
1907
  const byName = /* @__PURE__ */ new Map();
1630
- for (const p of paths) byName.set(path2.basename(norm(p)), [...byName.get(path2.basename(norm(p))) ?? [], norm(p)]);
1908
+ for (const p of paths) byName.set(path4.basename(norm2(p)), [...byName.get(path4.basename(norm2(p))) ?? [], norm2(p)]);
1631
1909
  const dirs = names.map((n) => byName.get(n));
1632
1910
  if (names.length === 0 || dirs.some((d) => !d || d.length !== 1)) return null;
1633
1911
  const found = dirs.map((d) => d[0]);
1634
1912
  if (names.length === 1) return { cwd: found[0], repos: [{ dir: found[0], sub: null }] };
1635
- const parent = path2.posix.dirname(found[0]);
1636
- if (found.some((d) => path2.posix.dirname(d) !== parent)) return null;
1913
+ const parent = path4.posix.dirname(found[0]);
1914
+ if (found.some((d) => path4.posix.dirname(d) !== parent)) return null;
1637
1915
  return { cwd: parent, repos: found.map((dir, i) => ({ dir, sub: names[i] })) };
1638
1916
  }
1639
1917
  var LOCAL_TREE_TIMEOUT_MS = 42e4;
@@ -1653,9 +1931,15 @@ async function localTreeRun(paths, names, deps) {
1653
1931
  };
1654
1932
  }
1655
1933
 
1934
+ // src/core/review/review-focus.ts
1935
+ function reviewFocus(config, aliases) {
1936
+ const r = config?.reviews;
1937
+ return attentionItems(r?.focus, ...[...new Set(aliases)].map((a) => r?.focusFor?.[a]));
1938
+ }
1939
+
1656
1940
  // src/core/platform/process-usage.ts
1657
1941
  import { execFile } from "child_process";
1658
- import path3 from "path";
1942
+ import path5 from "path";
1659
1943
  var num = (v) => typeof v === "number" && Number.isFinite(v) && v >= 0 ? v : null;
1660
1944
  function parseCimUsage(json2) {
1661
1945
  let data;
@@ -1701,7 +1985,7 @@ function parsePsUsage(stdout, now) {
1701
1985
  out.push({
1702
1986
  pid: Number(m[1]),
1703
1987
  ppid: Number(m[2]),
1704
- name: path3.posix.basename(first),
1988
+ name: path5.posix.basename(first),
1705
1989
  exe: first.startsWith("/") ? first : null,
1706
1990
  command,
1707
1991
  memBytes: Number(m[3]) * 1024,
@@ -1752,151 +2036,6 @@ function leftoverSummary(found) {
1752
2036
  return `${found.processes} process${found.processes === 1 ? "" : "es"} left running for over a day in ${found.sessions} session${found.sessions === 1 ? "" : "s"} (${formatBytes(found.bytes)})`;
1753
2037
  }
1754
2038
 
1755
- // src/core/worktree/code-browse.ts
1756
- import fs3 from "fs";
1757
- import path4 from "path";
1758
- var MAX_CODE_FILES = 5e4;
1759
- var MAX_CODE_FILE_BYTES = 2 * 1024 * 1024;
1760
- var LIST_TTL_MS = 3e3;
1761
- function codeRoots(s) {
1762
- return s.paths.map((p) => ({ name: path4.basename(p), root: p }));
1763
- }
1764
- function groupRoot(s) {
1765
- if (!s.isGroup || s.paths.length === 0) return null;
1766
- const parents = [...new Set(s.paths.map((p) => path4.dirname(p)))];
1767
- return parents.length === 1 ? parents[0] : null;
1768
- }
1769
- var realIo = {
1770
- git: (cwd, args) => runGitAsync(cwd, { args })
1771
- };
1772
- var nul = (out) => out.split("\0").filter(Boolean);
1773
- var fwd = (p) => p.replace(/\\/g, "/");
1774
- var listCache = /* @__PURE__ */ new Map();
1775
- var MAX_LISTS = 12;
1776
- var sets = /* @__PURE__ */ new WeakMap();
1777
- function setOf(files) {
1778
- let set = sets.get(files);
1779
- if (!set) sets.set(files, set = new Set(files));
1780
- return set;
1781
- }
1782
- async function isListed(root, rel, io = realIo, now = Date.now()) {
1783
- const hit = listCache.get(root);
1784
- if (hit && now - hit.at < LIST_TTL_MS) return setOf(await hit.files).has(rel);
1785
- const r = await io.git(root, ["ls-files", "-c", "-o", "--exclude-standard", "-z", "--", `:(literal)${rel}`]);
1786
- return r.status === 0 && nul(r.stdout).some((f) => fwd(f) === rel);
1787
- }
1788
- function listRepoFiles(root, io = realIo, now = Date.now()) {
1789
- const hit = listCache.get(root);
1790
- if (hit && now - hit.at < LIST_TTL_MS) return hit.files;
1791
- const files = io.git(root, ["ls-files", "-t", "-c", "-o", "-d", "--exclude-standard", "-z"]).then((r) => {
1792
- if (r.status !== 0) return [];
1793
- const listed = /* @__PURE__ */ new Set();
1794
- const gone = /* @__PURE__ */ new Set();
1795
- for (const e of nul(r.stdout)) {
1796
- const p = fwd(e.slice(2));
1797
- if (e[0] === "R") gone.add(p);
1798
- else listed.add(p);
1799
- }
1800
- return [...listed].filter((f) => !gone.has(f)).sort();
1801
- });
1802
- listCache.delete(root);
1803
- listCache.set(root, { at: now, files });
1804
- while (listCache.size > MAX_LISTS) listCache.delete(listCache.keys().next().value);
1805
- return files;
1806
- }
1807
- async function changedFiles(root, base, io = realIo) {
1808
- const out = /* @__PURE__ */ new Set();
1809
- const status = await io.git(root, ["status", "--porcelain=v1", "-z", "--untracked-files=all"]);
1810
- if (status.status === 0) {
1811
- const entries = nul(status.stdout);
1812
- for (let i = 0; i < entries.length; i++) {
1813
- const e = entries[i];
1814
- const code = e.slice(0, 2);
1815
- out.add(fwd(e.slice(3)));
1816
- if (code.includes("R") || code.includes("C")) i++;
1817
- }
1818
- }
1819
- let from = null;
1820
- for (const ref of base ? base.startsWith("origin/") ? [base] : [base, `origin/${base}`] : ["origin/HEAD"]) {
1821
- const mb = await io.git(root, ["merge-base", ref, "HEAD"]);
1822
- const sha = mb.stdout.trim();
1823
- if (mb.status !== 0 || !sha || sha === from) continue;
1824
- if (!from || (await io.git(root, ["merge-base", "--is-ancestor", from, sha])).status === 0) from = sha;
1825
- }
1826
- if (!from && base) {
1827
- const mb = await io.git(root, ["merge-base", "origin/HEAD", "HEAD"]);
1828
- if (mb.status === 0 && mb.stdout.trim()) from = mb.stdout.trim();
1829
- }
1830
- if (from) {
1831
- const diff = await io.git(root, ["diff", "--name-only", "-z", `${from}...HEAD`]);
1832
- if (diff.status === 0) for (const f of nul(diff.stdout)) out.add(fwd(f));
1833
- }
1834
- return [...out].sort();
1835
- }
1836
- async function listCodeFiles(s, io = realIo) {
1837
- const repos = await Promise.all(
1838
- codeRoots(s).map(async ({ name, root }) => {
1839
- if (!fs3.existsSync(root)) return { name, files: [], changed: [], truncated: false };
1840
- const [all, changed] = await Promise.all([listRepoFiles(root, io), changedFiles(root, s.baseBranches?.[root] ?? s.baseBranch, io)]);
1841
- const listed = new Set(all);
1842
- return {
1843
- name,
1844
- files: all.slice(0, MAX_CODE_FILES),
1845
- changed: changed.filter((f) => listed.has(f)),
1846
- truncated: all.length > MAX_CODE_FILES
1847
- };
1848
- })
1849
- );
1850
- return { group: !!s.isGroup, rootFiles: groupRootFiles(s), repos };
1851
- }
1852
- function groupRootFiles(s) {
1853
- const dir = groupRoot(s);
1854
- if (!dir) return [];
1855
- try {
1856
- return fs3.readdirSync(dir, { withFileTypes: true }).filter((e) => e.isFile() && isGroupNote(e.name)).map((e) => e.name).sort();
1857
- } catch {
1858
- return [];
1859
- }
1860
- }
1861
- var isGroupNote = (name) => !name.startsWith(".") && /\.md$/i.test(name);
1862
- async function codeFilePath(s, repo, rel, io = realIo) {
1863
- let root;
1864
- let allowed;
1865
- if (repo === "") {
1866
- root = groupRoot(s);
1867
- allowed = !!root && groupRootFiles(s).includes(rel);
1868
- } else {
1869
- root = codeRoots(s).find((r) => r.name === repo)?.root ?? null;
1870
- allowed = !!root && await isListed(root, rel, io);
1871
- }
1872
- if (!root) return { error: "unknown repo" };
1873
- if (!allowed) return { error: "not listed" };
1874
- try {
1875
- const full = path4.resolve(root, rel);
1876
- const realRoot = fs3.realpathSync.native(root);
1877
- const real = fs3.realpathSync.native(full);
1878
- const inside2 = path4.relative(realRoot, real);
1879
- if (!inside2 || inside2.startsWith("..") || path4.isAbsolute(inside2)) return { error: "not listed" };
1880
- const st = fs3.statSync(real);
1881
- if (!st.isFile()) return { error: "unreadable" };
1882
- return { real, size: st.size };
1883
- } catch (err) {
1884
- return { error: err.code === "ENOENT" ? "not listed" : "unreadable" };
1885
- }
1886
- }
1887
- async function readCodeFile(s, repo, rel, io = realIo) {
1888
- const at = await codeFilePath(s, repo, rel, io);
1889
- if ("error" in at) return at;
1890
- if (at.size > MAX_CODE_FILE_BYTES) return { repo, path: rel, size: at.size, text: null, reason: "too-large" };
1891
- try {
1892
- const buf = await fs3.promises.readFile(at.real);
1893
- if (buf.subarray(0, 8e3).includes(0)) return { repo, path: rel, size: at.size, text: null, reason: "binary" };
1894
- return { repo, path: rel, size: at.size, text: buf.toString("utf-8") };
1895
- } catch (err) {
1896
- return { error: err.code === "ENOENT" ? "not listed" : "unreadable" };
1897
- }
1898
- }
1899
-
1900
2039
  // src/core/worktree/code-symbols.ts
1901
2040
  var MAX_LINE_CHARS = 240;
1902
2041
  function parseGrepLine(line) {
@@ -1970,9 +2109,9 @@ var NOT_NAMES = /* @__PURE__ */ new Set([
1970
2109
  "typeof",
1971
2110
  "await"
1972
2111
  ]);
1973
- function declarationOf(path22, text) {
2112
+ function declarationOf(path23, text) {
1974
2113
  for (const r of RULES) {
1975
- if (!r.ext.test(path22)) continue;
2114
+ if (!r.ext.test(path23)) continue;
1976
2115
  const m = r.re.exec(text);
1977
2116
  if (!m) continue;
1978
2117
  const name = r.name(m);
@@ -2329,8 +2468,8 @@ function mountSetupRoutes(app, opts) {
2329
2468
  }
2330
2469
 
2331
2470
  // src/core/updates/update-source.ts
2332
- import fs4 from "fs";
2333
- import path5 from "path";
2471
+ import fs5 from "fs";
2472
+ import path6 from "path";
2334
2473
 
2335
2474
  // src/core/updates/updates.ts
2336
2475
  function parseVersion(v) {
@@ -2387,8 +2526,8 @@ function whatsNewFor(i) {
2387
2526
  }
2388
2527
  function installKindOf(packageRoot2, configDir, hasGit) {
2389
2528
  if (!packageRoot2) return "npm";
2390
- const norm3 = (p) => p.replace(/\\/g, "/").replace(/\/+$/, "").toLowerCase();
2391
- if (norm3(packageRoot2).startsWith(`${norm3(configDir)}/runtime/`)) return "desktop";
2529
+ const norm4 = (p) => p.replace(/\\/g, "/").replace(/\/+$/, "").toLowerCase();
2530
+ if (norm4(packageRoot2).startsWith(`${norm4(configDir)}/runtime/`)) return "desktop";
2392
2531
  return hasGit ? "dev" : "npm";
2393
2532
  }
2394
2533
  function parseDesktopUpdate(text) {
@@ -2415,8 +2554,8 @@ function parseDesktopUpdate(text) {
2415
2554
  var RELEASES_REPO = "moberghr/cli-work-tree-manager";
2416
2555
  var RELEASES_URL = `https://api.github.com/repos/${RELEASES_REPO}/releases?per_page=30`;
2417
2556
  var SEEN_KEY = "ui:seen-version";
2418
- var desktopUpdatePath = () => path5.join(getConfigDir(), "desktop-update.json");
2419
- var desktopRequestPath = () => path5.join(getConfigDir(), "desktop-request.json");
2557
+ var desktopUpdatePath = () => path6.join(getConfigDir(), "desktop-update.json");
2558
+ var desktopRequestPath = () => path6.join(getConfigDir(), "desktop-request.json");
2420
2559
  async function fetchReleases(get = (url) => fetch(url, { headers: { "User-Agent": "work", Accept: "application/vnd.github+json" }, signal: AbortSignal.timeout(15e3) }), run2 = defaultRunner) {
2421
2560
  const why = await get(RELEASES_URL).then(
2422
2561
  async (res) => res.ok ? parseReleases(await res.json()) : res.status === 403 ? "GitHub's limit for this address is spent" : `GitHub answered ${res.status}`,
@@ -2456,7 +2595,7 @@ function networkFailure(err) {
2456
2595
  function readDesktopUpdate(file = desktopUpdatePath()) {
2457
2596
  let text;
2458
2597
  try {
2459
- text = fs4.readFileSync(file, "utf-8");
2598
+ text = fs5.readFileSync(file, "utf-8");
2460
2599
  } catch {
2461
2600
  return null;
2462
2601
  }
@@ -2478,7 +2617,7 @@ function markSeenVersion(version) {
2478
2617
  }
2479
2618
  function installKind() {
2480
2619
  const root = packageRoot();
2481
- return installKindOf(root, getConfigDir(), !!root && fs4.existsSync(path5.join(root, ".git")));
2620
+ return installKindOf(root, getConfigDir(), !!root && fs5.existsSync(path6.join(root, ".git")));
2482
2621
  }
2483
2622
  var defaultDeps = () => ({
2484
2623
  fetchReleases: () => fetchReleases(),
@@ -2571,7 +2710,7 @@ function mountAppUpdateRoutes(app, opts) {
2571
2710
  }
2572
2711
 
2573
2712
  // src/server/routes/usage-routes.ts
2574
- import fs5 from "fs";
2713
+ import fs6 from "fs";
2575
2714
  var FRESH_MS = 5e3;
2576
2715
  function createUsageCache(build, ttlMs = FRESH_MS, now = Date.now) {
2577
2716
  let last = null;
@@ -2633,7 +2772,7 @@ function watchUsage(opts) {
2633
2772
  };
2634
2773
  let watcher = null;
2635
2774
  try {
2636
- fs5.mkdirSync(dir, { recursive: true });
2775
+ fs6.mkdirSync(dir, { recursive: true });
2637
2776
  watcher = createFsWatcher({ roots: [dir], onChange });
2638
2777
  } catch (e) {
2639
2778
  report("warn", `[usage] not watching ${dir}: ${e instanceof Error ? e.message : String(e)}`);
@@ -2743,8 +2882,8 @@ var SETTING_PATTERNS = {
2743
2882
  agentId: "^[\\w.-]+$",
2744
2883
  envName: "^[A-Za-z_][A-Za-z0-9_]*$"
2745
2884
  };
2746
- var bool = (path22, section, label, help, def, when) => ({
2747
- path: path22,
2885
+ var bool = (path23, section, label, help, def, when) => ({
2886
+ path: path23,
2748
2887
  section,
2749
2888
  label,
2750
2889
  help,
@@ -2917,6 +3056,15 @@ var SETTINGS = [
2917
3056
  true
2918
3057
  ),
2919
3058
  // ---- Reviews
3059
+ {
3060
+ path: "reviews.focus",
3061
+ section: "Reviews",
3062
+ label: "Reviews pay attention to",
3063
+ help: 'Things every review should look for, one a line: "card data is never logged", "a migration has a way back". The AI step applies them in its notes, in each story\u2019s verdict and in its recommendation, and the review says it was asked. A repo can have its own besides (Repos \u2192 its Settings).',
3064
+ kind: { type: "list", placeholder: "e.g. every new endpoint checks permissions" },
3065
+ default: [],
3066
+ when: "the next review prepared"
3067
+ },
2920
3068
  {
2921
3069
  path: "reviews.maxPerDay",
2922
3070
  section: "Reviews",
@@ -3110,7 +3258,7 @@ var SETTINGS = [
3110
3258
  "at the next work web start"
3111
3259
  )
3112
3260
  ];
3113
- var settingAt = (path22) => SETTINGS.find((f) => f.path === path22);
3261
+ var settingAt = (path23) => SETTINGS.find((f) => f.path === path23);
3114
3262
  function checkSetting(field, raw) {
3115
3263
  const checked = checkValue(field, raw);
3116
3264
  if (checked.ok && checked.value === null && field.required) return { ok: false, error: "it can\u2019t be left empty" };
@@ -3156,16 +3304,16 @@ function checkValue(field, raw) {
3156
3304
  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(", ")}` };
3157
3305
  }
3158
3306
  }
3159
- function valueAt(obj, path22) {
3307
+ function valueAt(obj, path23) {
3160
3308
  let cur = obj;
3161
- for (const key of path22.split(".")) {
3309
+ for (const key of path23.split(".")) {
3162
3310
  if (!cur || typeof cur !== "object" || Array.isArray(cur)) return void 0;
3163
3311
  cur = cur[key];
3164
3312
  }
3165
3313
  return cur;
3166
3314
  }
3167
- function setValueAt(obj, path22, value) {
3168
- const keys = path22.split(".");
3315
+ function setValueAt(obj, path23, value) {
3316
+ const keys = path23.split(".");
3169
3317
  const chain = [obj];
3170
3318
  let cur = obj;
3171
3319
  for (const key of keys.slice(0, -1)) {
@@ -3189,11 +3337,12 @@ function setValueAt(obj, path22, value) {
3189
3337
  var REPO_SETTING_PATH = {
3190
3338
  requiredChecks: "prWatch.requiredChecks",
3191
3339
  devCommand: "devCommands",
3192
- reviews: "reviews.projects"
3340
+ reviews: "reviews.projects",
3341
+ reviewFocus: "reviews.focusFor"
3193
3342
  };
3194
3343
  function checkRepoSetting(key, raw) {
3195
3344
  if (raw === null) return { ok: true, value: null };
3196
- if (key === "requiredChecks") {
3345
+ if (key === "requiredChecks" || key === "reviewFocus") {
3197
3346
  const r = checkSetting({ ...SETTINGS[0], kind: { type: "list" } }, raw);
3198
3347
  if (!r.ok) return r;
3199
3348
  return r.value.length ? r : { ok: true, value: null };
@@ -3202,17 +3351,19 @@ function checkRepoSetting(key, raw) {
3202
3351
  return raw === "all" || raw === "asked" || raw === "off" ? { ok: true, value: raw } : { ok: false, error: "all, asked or off" };
3203
3352
  }
3204
3353
  function repoSettingsOf(raw, alias) {
3205
- const map = (path22) => {
3206
- const m = valueAt(raw, path22);
3354
+ const map = (path23) => {
3355
+ const m = valueAt(raw, path23);
3207
3356
  return m && typeof m === "object" && !Array.isArray(m) ? m : {};
3208
3357
  };
3209
3358
  const checks = map(REPO_SETTING_PATH.requiredChecks)[alias];
3210
3359
  const dev = map(REPO_SETTING_PATH.devCommand)[alias];
3211
3360
  const review = map(REPO_SETTING_PATH.reviews)[alias];
3361
+ const focus = map(REPO_SETTING_PATH.reviewFocus)[alias];
3212
3362
  return {
3213
3363
  requiredChecks: Array.isArray(checks) ? checks.filter((c) => typeof c === "string") : null,
3214
3364
  devCommand: typeof dev === "string" && dev ? dev : null,
3215
- reviews: review === "all" || review === "asked" || review === "off" ? review : null
3365
+ reviews: review === "all" || review === "asked" || review === "off" ? review : null,
3366
+ reviewFocus: Array.isArray(focus) && focus.some((c) => typeof c === "string") ? focus.filter((c) => typeof c === "string") : null
3216
3367
  };
3217
3368
  }
3218
3369
 
@@ -3258,11 +3409,11 @@ function mountSettingsRoutes(app, opts) {
3258
3409
  }
3259
3410
 
3260
3411
  // src/core/settings/settings-admin.ts
3261
- import fs6 from "fs";
3262
- import path6 from "path";
3412
+ import fs7 from "fs";
3413
+ import path7 from "path";
3263
3414
  function rawConfig(file = getConfigPath()) {
3264
3415
  try {
3265
- const raw = JSON.parse(fs6.readFileSync(file, "utf-8"));
3416
+ const raw = JSON.parse(fs7.readFileSync(file, "utf-8"));
3266
3417
  return raw && typeof raw === "object" && !Array.isArray(raw) ? raw : {};
3267
3418
  } catch {
3268
3419
  return {};
@@ -3277,13 +3428,13 @@ function readSettings() {
3277
3428
  }
3278
3429
  return { values, configPath: getConfigPath() };
3279
3430
  }
3280
- async function writeSetting(path22, value) {
3281
- const field = settingAt(path22);
3282
- if (!field) throw new SettingsError(`no setting ${path22}`, 404);
3431
+ async function writeSetting(path23, value) {
3432
+ const field = settingAt(path23);
3433
+ if (!field) throw new SettingsError(`no setting ${path23}`, 404);
3283
3434
  const checked = checkSetting(field, value);
3284
3435
  if (!checked.ok) throw new SettingsError(`${field.label}: ${checked.error}`);
3285
- const toWrite = checkedFolders(path22, checked.value);
3286
- await editConfig((raw) => setValueAt(raw, path22, toWrite)).catch((err) => {
3436
+ const toWrite = checkedFolders(path23, checked.value);
3437
+ await editConfig((raw) => setValueAt(raw, path23, toWrite)).catch((err) => {
3287
3438
  throw err instanceof RepoAdminError ? new SettingsError(err.message) : err;
3288
3439
  });
3289
3440
  return readSettings();
@@ -3297,10 +3448,10 @@ function checkedFolders(at, value) {
3297
3448
  if (at === "scanRoots" && Array.isArray(value))
3298
3449
  return value.map((v) => {
3299
3450
  const p = expandHome(v);
3300
- if (!path6.isAbsolute(p))
3451
+ if (!path7.isAbsolute(p))
3301
3452
  throw new SettingsError(`Folders scanned for repos: ${v} isn't a full path (start it from the drive, / or ~)`);
3302
- const full = path6.resolve(p);
3303
- if (!fs6.statSync(full, { throwIfNoEntry: false })?.isDirectory())
3453
+ const full = path7.resolve(p);
3454
+ if (!fs7.statSync(full, { throwIfNoEntry: false })?.isDirectory())
3304
3455
  throw new SettingsError(`Folders scanned for repos: ${full} isn't a folder`);
3305
3456
  return full;
3306
3457
  });
@@ -3350,7 +3501,7 @@ var configSettings = {
3350
3501
  };
3351
3502
 
3352
3503
  // src/core/conversations/timeline-source.ts
3353
- import path7 from "path";
3504
+ import path8 from "path";
3354
3505
 
3355
3506
  // src/core/conversations/timeline.ts
3356
3507
  var SIZE_LABEL = /^(\d+ files? · \+\d+ −\d+|no changes)$/;
@@ -3399,7 +3550,7 @@ async function commitsOf(repo, since, run2) {
3399
3550
  if (log.code !== 0) return [];
3400
3551
  return log.stdout.split("\n").filter(Boolean).map((line) => {
3401
3552
  const [sha, at, ...subject] = line.split(" ");
3402
- return { repo: path7.basename(repo), sha, at, subject: subject.join(" ") };
3553
+ return { repo: path8.basename(repo), sha, at, subject: subject.join(" ") };
3403
3554
  });
3404
3555
  }
3405
3556
  async function sessionTimeline(s, deps = {}) {
@@ -3466,8 +3617,8 @@ function mountBlockRoutes(app, opts) {
3466
3617
  }
3467
3618
 
3468
3619
  // src/server/routes/jira-watch-routes.ts
3469
- import fs7 from "fs";
3470
- import path8 from "path";
3620
+ import fs8 from "fs";
3621
+ import path9 from "path";
3471
3622
 
3472
3623
  // src/core/jira/jira-prompt.ts
3473
3624
  var branchFor = (issue) => `feat/${issue.key}`;
@@ -3688,16 +3839,16 @@ async function sweepJira(deps) {
3688
3839
  var EVERY_MS = 5 * 6e4;
3689
3840
  function aboutRepo(dir) {
3690
3841
  try {
3691
- const readme = ["README.md", "readme.md", "README"].map((n) => path8.join(dir, n)).find((f) => fs7.existsSync(f));
3842
+ const readme = ["README.md", "readme.md", "README"].map((n) => path9.join(dir, n)).find((f) => fs8.existsSync(f));
3692
3843
  if (readme) {
3693
- const line = fs7.readFileSync(readme, "utf8").split(/\r?\n/).map(
3844
+ const line = fs8.readFileSync(readme, "utf8").split(/\r?\n/).map(
3694
3845
  (l) => l.replace(/^[#>*\-\s]+/, "").replace(/[`*_[\]]/g, "").trim()
3695
3846
  ).find((l) => l.length > 20 && !/^(!|<|http)/.test(l));
3696
3847
  if (line) return line.slice(0, 160);
3697
3848
  }
3698
- const pkg = path8.join(dir, "package.json");
3699
- if (fs7.existsSync(pkg)) {
3700
- const d = JSON.parse(fs7.readFileSync(pkg, "utf8")).description;
3849
+ const pkg = path9.join(dir, "package.json");
3850
+ if (fs8.existsSync(pkg)) {
3851
+ const d = JSON.parse(fs8.readFileSync(pkg, "utf8")).description;
3701
3852
  if (typeof d === "string" && d.trim()) return d.trim().slice(0, 160);
3702
3853
  }
3703
3854
  } catch {
@@ -3709,7 +3860,7 @@ function watchTargets(cfg = loadConfig()) {
3709
3860
  const repos = Object.entries(cfg.repos).map(([alias, dir]) => ({
3710
3861
  name: alias,
3711
3862
  kind: "repo",
3712
- members: [path8.basename(dir)],
3863
+ members: [path9.basename(dir)],
3713
3864
  about: aboutRepo(dir)
3714
3865
  }));
3715
3866
  const groups = Object.entries(cfg.groups).map(([name, aliases]) => ({ name, kind: "group", members: aliases }));
@@ -3885,7 +4036,7 @@ function describeStall(s) {
3885
4036
  }
3886
4037
 
3887
4038
  // src/server/web-server.ts
3888
- import path19 from "path";
4039
+ import path20 from "path";
3889
4040
  import { Hono } from "hono";
3890
4041
  import { streamSSE as streamSSE2 } from "hono/streaming";
3891
4042
 
@@ -4213,8 +4364,8 @@ function mountPanesRoutes(app, opts) {
4213
4364
  }
4214
4365
 
4215
4366
  // src/server/routes/worktree-routes.ts
4216
- import fs8 from "fs";
4217
- import path9 from "path";
4367
+ import fs9 from "fs";
4368
+ import path10 from "path";
4218
4369
  import { spawn } from "child_process";
4219
4370
 
4220
4371
  // src/core/platform/started.ts
@@ -4329,7 +4480,7 @@ function mountWorktreeRoutes(app, opts) {
4329
4480
  if (waiting.length) return { body: { error: `Not deleted: ${waiting.join("; ")}.`, blocked: waiting }, status: 409 };
4330
4481
  }
4331
4482
  try {
4332
- const onDisk = session.paths.some((p) => fs8.existsSync(p));
4483
+ const onDisk = session.paths.some((p) => fs9.existsSync(p));
4333
4484
  if (!sessionOnly && onDisk && session.paths.some((p) => wouldRefuseRemoval(p, force ?? false))) {
4334
4485
  return { body: { error: REFUSED }, status: 409 };
4335
4486
  }
@@ -4400,7 +4551,7 @@ function mountWorktreeRoutes(app, opts) {
4400
4551
  const wantsFile = !!body && typeof body === "object" && "path" in body;
4401
4552
  const asked = wantsFile ? openFileSchema.safeParse(body) : null;
4402
4553
  if (asked && !asked.success) return c.json({ error: "repo and path required" }, 400);
4403
- const folder = session.isGroup ? path9.dirname(session.paths[0]) : session.paths[0];
4554
+ const folder = session.isGroup ? path10.dirname(session.paths[0]) : session.paths[0];
4404
4555
  let file;
4405
4556
  if (asked?.success) {
4406
4557
  const at = await codeFilePath(session, asked.data.repo, asked.data.path);
@@ -4469,7 +4620,7 @@ function mountWorktreeRoutes(app, opts) {
4469
4620
  import { zValidator as zValidator6 } from "@hono/zod-validator";
4470
4621
  import { z as z5 } from "zod";
4471
4622
  import { EventEmitter } from "events";
4472
- import path10 from "path";
4623
+ import path11 from "path";
4473
4624
  import { streamSSE } from "hono/streaming";
4474
4625
  function mountScopeRoutes(app, opts) {
4475
4626
  const background = /* @__PURE__ */ new Set();
@@ -4716,7 +4867,7 @@ function mountScopeRoutes(app, opts) {
4716
4867
  const fromSha = fromEntry.repos[p] ?? "HEAD";
4717
4868
  const toSha = toEntry === void 0 ? "working" : toEntry.repos[p] ?? "HEAD";
4718
4869
  return {
4719
- name: path10.basename(p),
4870
+ name: path11.basename(p),
4720
4871
  root: p,
4721
4872
  files: computeRangeDiff({ root: p, fromRef: fromSha, toRef: toSha })
4722
4873
  };
@@ -4733,7 +4884,7 @@ function mountScopeRoutes(app, opts) {
4733
4884
  }
4734
4885
  const resolved = scope.paths.map((p) => resolveRepoDiff(p, base, sessionBaseForPath(p)));
4735
4886
  const repos = scope.paths.map((p, i) => ({
4736
- name: path10.basename(p),
4887
+ name: path11.basename(p),
4737
4888
  root: p,
4738
4889
  resolvedBase: resolved[i].resolvedBase,
4739
4890
  files: computeDiff({ root: p, diffArg: resolved[i].diffArg })
@@ -4764,7 +4915,7 @@ function mountScopeRoutes(app, opts) {
4764
4915
  if (!relPath || !Number.isInteger(start) || !Number.isInteger(end)) {
4765
4916
  return c.json({ error: "bad path/start/end" }, 400);
4766
4917
  }
4767
- const root = scope.paths.length === 1 ? scope.paths[0] : scope.paths.find((p) => path10.basename(p) === repoName);
4918
+ const root = scope.paths.length === 1 ? scope.paths[0] : scope.paths.find((p) => path11.basename(p) === repoName);
4768
4919
  if (!root) return c.json({ error: "unknown repo" }, 404);
4769
4920
  const result = readContextLines({ root, relPath, start, end, ref });
4770
4921
  if (!result) return c.json({ error: "cannot read file" }, 400);
@@ -5022,7 +5173,7 @@ function mountTerminalRoutes(app, opts) {
5022
5173
  }
5023
5174
 
5024
5175
  // src/server/routes/status-routes.ts
5025
- import path11 from "path";
5176
+ import path12 from "path";
5026
5177
 
5027
5178
  // src/core/status/notifier.ts
5028
5179
  var MESSAGES = {
@@ -5170,7 +5321,7 @@ function mountStatusRoutes(app, opts) {
5170
5321
  const kind = notifyKindForTransition(status.prevState ? { state: status.prevState } : null, status);
5171
5322
  if (kind) {
5172
5323
  const config = loadConfig();
5173
- const launchDir = session.isGroup && session.paths[0] ? path11.dirname(session.paths[0]) : session.paths[0] ?? body.cwd;
5324
+ const launchDir = session.isGroup && session.paths[0] ? path12.dirname(session.paths[0]) : session.paths[0] ?? body.cwd;
5174
5325
  const name = `${session.target} \xB7 ${session.branch}`;
5175
5326
  const snooze = readSnooze(id);
5176
5327
  const route = snooze?.until && snoozeActive(snooze, { attention: status }) ? "none" : presence.route(id);
@@ -6199,14 +6350,14 @@ function mountRailRoutes(app, opts) {
6199
6350
  }
6200
6351
 
6201
6352
  // src/core/worktree/shared-folders.ts
6202
- import fs9 from "fs";
6203
- import path12 from "path";
6204
- var norm2 = (p) => path12.resolve(p).replace(/\\/g, "/").toLowerCase();
6353
+ import fs10 from "fs";
6354
+ import path13 from "path";
6355
+ var norm3 = (p) => path13.resolve(p).replace(/\\/g, "/").toLowerCase();
6205
6356
  function shadowedSessions(sessions, branchCheckedOut2) {
6206
6357
  const byFolder = /* @__PURE__ */ new Map();
6207
6358
  for (const s of sessions) {
6208
6359
  if (s.isGroup || s.paths.length !== 1) continue;
6209
- const key = norm2(s.paths[0]);
6360
+ const key = norm3(s.paths[0]);
6210
6361
  byFolder.set(key, [...byFolder.get(key) ?? [], s]);
6211
6362
  }
6212
6363
  const shadowed = /* @__PURE__ */ new Set();
@@ -6220,14 +6371,14 @@ function shadowedSessions(sessions, branchCheckedOut2) {
6220
6371
  }
6221
6372
  function branchCheckedOut(dir) {
6222
6373
  try {
6223
- const dotGit = path12.join(dir, ".git");
6374
+ const dotGit = path13.join(dir, ".git");
6224
6375
  let gitDir = dotGit;
6225
- if (fs9.statSync(dotGit).isFile()) {
6226
- const m = /^gitdir:\s*(.+)$/m.exec(fs9.readFileSync(dotGit, "utf8"));
6376
+ if (fs10.statSync(dotGit).isFile()) {
6377
+ const m = /^gitdir:\s*(.+)$/m.exec(fs10.readFileSync(dotGit, "utf8"));
6227
6378
  if (!m) return null;
6228
- gitDir = path12.resolve(dir, m[1].trim());
6379
+ gitDir = path13.resolve(dir, m[1].trim());
6229
6380
  }
6230
- const head = fs9.readFileSync(path12.join(gitDir, "HEAD"), "utf8");
6381
+ const head = fs10.readFileSync(path13.join(gitDir, "HEAD"), "utf8");
6231
6382
  const ref = /^ref:\s*refs\/heads\/(.+)$/m.exec(head);
6232
6383
  return ref ? ref[1].trim() : null;
6233
6384
  } catch {
@@ -6236,14 +6387,14 @@ function branchCheckedOut(dir) {
6236
6387
  }
6237
6388
 
6238
6389
  // src/core/platform/build-stamp.ts
6239
- import fs10 from "fs";
6390
+ import fs11 from "fs";
6240
6391
  var cached = null;
6241
6392
  function buildStamp() {
6242
6393
  if (cached) return cached;
6243
6394
  const forced = process.env.WORK_BUILD_STAMP;
6244
6395
  if (forced) return cached = forced;
6245
6396
  try {
6246
- cached = String(Math.floor(fs10.statSync(process.argv[1]).mtimeMs));
6397
+ cached = String(Math.floor(fs11.statSync(process.argv[1]).mtimeMs));
6247
6398
  } catch {
6248
6399
  cached = "unknown";
6249
6400
  }
@@ -6554,8 +6705,8 @@ function mountPrReplyRoutes(app, opts) {
6554
6705
  }
6555
6706
 
6556
6707
  // src/core/archive/archive-retention.ts
6557
- import fs11 from "fs";
6558
- import path13 from "path";
6708
+ import fs12 from "fs";
6709
+ import path14 from "path";
6559
6710
  import zlib from "zlib";
6560
6711
  var DEFAULT_COMPRESS_AFTER_DAYS = 30;
6561
6712
  var DAY_MS = 24 * 36e5;
@@ -6567,7 +6718,7 @@ function applyArchiveRetention(opts) {
6567
6718
  const out = { compressed: [], dropped: [], bytesSaved: 0 };
6568
6719
  let ids;
6569
6720
  try {
6570
- ids = fs11.readdirSync(root, { withFileTypes: true }).filter((d) => d.isDirectory()).map((d) => d.name);
6721
+ ids = fs12.readdirSync(root, { withFileTypes: true }).filter((d) => d.isDirectory()).map((d) => d.name);
6571
6722
  } catch {
6572
6723
  return out;
6573
6724
  }
@@ -6576,17 +6727,17 @@ function applyArchiveRetention(opts) {
6576
6727
  if (!rec) continue;
6577
6728
  const age = now - Date.parse(rec.archivedAt);
6578
6729
  if (!Number.isFinite(age)) continue;
6579
- const ignored = path13.join(archiveDirFor(id, root), "ignored");
6580
- if (compressAfter > 0 && age >= compressAfter * DAY_MS && !rec.ignoredDroppedAt && fs11.existsSync(ignored)) {
6581
- fs11.rmSync(ignored, { recursive: true, force: true });
6730
+ const ignored = path14.join(archiveDirFor(id, root), "ignored");
6731
+ if (compressAfter > 0 && age >= compressAfter * DAY_MS && !rec.ignoredDroppedAt && fs12.existsSync(ignored)) {
6732
+ fs12.rmSync(ignored, { recursive: true, force: true });
6582
6733
  rec.ignoredDroppedAt = new Date(now).toISOString();
6583
6734
  writeArchiveRecord(rec, root);
6584
6735
  }
6585
6736
  if (rec.transcriptsDroppedAt) continue;
6586
- const dir = path13.join(archiveDirFor(id, root), "transcripts");
6737
+ const dir = path14.join(archiveDirFor(id, root), "transcripts");
6587
6738
  if (dropAfter > 0 && age >= dropAfter * DAY_MS) {
6588
6739
  out.bytesSaved += dirBytes(dir);
6589
- fs11.rmSync(dir, { recursive: true, force: true });
6740
+ fs12.rmSync(dir, { recursive: true, force: true });
6590
6741
  rec.transcriptsDroppedAt = new Date(now).toISOString();
6591
6742
  writeArchiveRecord(rec, root);
6592
6743
  out.dropped.push(id);
@@ -6594,16 +6745,16 @@ function applyArchiveRetention(opts) {
6594
6745
  }
6595
6746
  if (compressAfter <= 0 || rec.compressedAt || age < compressAfter * DAY_MS) continue;
6596
6747
  for (const t of rec.transcripts) {
6597
- const plain = path13.join(dir, t.file);
6598
- if (!fs11.existsSync(plain)) continue;
6599
- const data = fs11.readFileSync(plain);
6748
+ const plain = path14.join(dir, t.file);
6749
+ if (!fs12.existsSync(plain)) continue;
6750
+ const data = fs12.readFileSync(plain);
6600
6751
  const gz = zlib.gzipSync(data);
6601
- fs11.writeFileSync(`${plain}.gz`, gz);
6602
- if (!zlib.gunzipSync(fs11.readFileSync(`${plain}.gz`)).equals(data)) {
6603
- fs11.rmSync(`${plain}.gz`, { force: true });
6752
+ fs12.writeFileSync(`${plain}.gz`, gz);
6753
+ if (!zlib.gunzipSync(fs12.readFileSync(`${plain}.gz`)).equals(data)) {
6754
+ fs12.rmSync(`${plain}.gz`, { force: true });
6604
6755
  continue;
6605
6756
  }
6606
- fs11.rmSync(plain, { force: true });
6757
+ fs12.rmSync(plain, { force: true });
6607
6758
  out.bytesSaved += data.length - gz.length;
6608
6759
  }
6609
6760
  rec.compressedAt = new Date(now).toISOString();
@@ -6615,7 +6766,7 @@ function applyArchiveRetention(opts) {
6615
6766
  function dirBytes(dir) {
6616
6767
  let n = 0;
6617
6768
  try {
6618
- for (const f of fs11.readdirSync(dir)) n += fs11.statSync(path13.join(dir, f)).size;
6769
+ for (const f of fs12.readdirSync(dir)) n += fs12.statSync(path14.join(dir, f)).size;
6619
6770
  } catch {
6620
6771
  }
6621
6772
  return n;
@@ -7093,7 +7244,7 @@ function reviewModeOf(alias, config) {
7093
7244
  return { mode: "all", from: "default" };
7094
7245
  }
7095
7246
  function reviewProjects(config) {
7096
- return Object.entries(config.repos).map(([alias, path22]) => ({ alias, path: path22, mode: reviewModeOf(alias, config).mode }));
7247
+ return Object.entries(config.repos).map(([alias, path23]) => ({ alias, path: path23, mode: reviewModeOf(alias, config).mode }));
7097
7248
  }
7098
7249
  function reviewLimits(config) {
7099
7250
  return {
@@ -7240,8 +7391,8 @@ function mountReviewRoutes(app, deps) {
7240
7391
 
7241
7392
  // src/core/review/review-tree.ts
7242
7393
  import { randomBytes } from "crypto";
7243
- import fs12 from "fs";
7244
- import path14 from "path";
7394
+ import fs13 from "fs";
7395
+ import path15 from "path";
7245
7396
 
7246
7397
  // src/core/review/review-source.ts
7247
7398
  var reviewRef = (number) => `refs/work/review/${number}`;
@@ -7297,7 +7448,7 @@ async function dropReviewRef(run2, repoPath, number) {
7297
7448
  }
7298
7449
 
7299
7450
  // src/core/review/review-tree.ts
7300
- var reviewTreesDir = () => path14.join(getConfigDir(), "review-trees");
7451
+ var reviewTreesDir = () => path15.join(getConfigDir(), "review-trees");
7301
7452
  var NO_HOOKS = ".no-hooks";
7302
7453
  var NO_LFS = ["-c", "filter.lfs.smudge=", "-c", "filter.lfs.process=", "-c", "filter.lfs.required=false"];
7303
7454
  var NO_LFS_ENV = { GIT_LFS_SKIP_SMUDGE: "1" };
@@ -7310,17 +7461,17 @@ var runSuffix = () => `${process.pid.toString(36)}${randomBytes(3).toString("hex
7310
7461
  var firstLine = (s) => s.trim().split(/\r?\n/)[0] ?? "";
7311
7462
  function rmTree(dir) {
7312
7463
  try {
7313
- fs12.rmSync(dir, { recursive: true, force: true, maxRetries: 5, retryDelay: 200 });
7464
+ fs13.rmSync(dir, { recursive: true, force: true, maxRetries: 5, retryDelay: 200 });
7314
7465
  } catch {
7315
7466
  }
7316
- return !fs12.existsSync(dir);
7467
+ return !fs13.existsSync(dir);
7317
7468
  }
7318
7469
  async function createReviewTree(run2, at, opts) {
7319
7470
  const root = opts.root ?? reviewTreesDir();
7320
- const dir = path14.join(root, reviewTreeName(at.alias, at.number, at.headSha, opts.run ?? runSuffix()));
7321
- const noHooks = path14.join(root, NO_HOOKS);
7322
- fs12.mkdirSync(noHooks, { recursive: true });
7323
- if (fs12.existsSync(dir)) await removeReviewTree(run2, at.repoPath, dir);
7471
+ const dir = path15.join(root, reviewTreeName(at.alias, at.number, at.headSha, opts.run ?? runSuffix()));
7472
+ const noHooks = path15.join(root, NO_HOOKS);
7473
+ fs13.mkdirSync(noHooks, { recursive: true });
7474
+ if (fs13.existsSync(dir)) await removeReviewTree(run2, at.repoPath, dir);
7324
7475
  const added = await run2(
7325
7476
  "git",
7326
7477
  [
@@ -7355,9 +7506,9 @@ async function createReviewTree(run2, at, opts) {
7355
7506
  }
7356
7507
  const removed = [];
7357
7508
  for (const rel of listed.stdout.split("\0").filter((rel2) => opts.strip(rel2))) {
7358
- const file = path14.join(dir, rel);
7359
- fs12.rmSync(file, { recursive: true, force: true });
7360
- if (fs12.existsSync(file)) {
7509
+ const file = path15.join(dir, rel);
7510
+ fs13.rmSync(file, { recursive: true, force: true });
7511
+ if (fs13.existsSync(file)) {
7361
7512
  await removeReviewTree(run2, at.repoPath, dir);
7362
7513
  return { ok: false, error: `couldn't remove ${rel} from the checkout` };
7363
7514
  }
@@ -7366,7 +7517,7 @@ async function createReviewTree(run2, at, opts) {
7366
7517
  return { ok: true, dir, removed };
7367
7518
  }
7368
7519
  async function removeReviewTree(run2, repoPath, dir) {
7369
- if (fs12.existsSync(dir)) await run2("git", ["worktree", "remove", "--force", "--force", dir], repoPath);
7520
+ if (fs13.existsSync(dir)) await run2("git", ["worktree", "remove", "--force", "--force", dir], repoPath);
7370
7521
  const gone = rmTree(dir);
7371
7522
  await run2("git", ["worktree", "prune"], repoPath);
7372
7523
  return gone;
@@ -7385,8 +7536,8 @@ async function withReviewTree(run2, at, use, opts) {
7385
7536
  }
7386
7537
  function gitDirOf(dir) {
7387
7538
  try {
7388
- const m = /^gitdir:\s*(.+)$/m.exec(fs12.readFileSync(path14.join(dir, ".git"), "utf8"));
7389
- return m ? path14.resolve(dir, m[1].trim(), "..", "..") : null;
7539
+ const m = /^gitdir:\s*(.+)$/m.exec(fs13.readFileSync(path15.join(dir, ".git"), "utf8"));
7540
+ return m ? path15.resolve(dir, m[1].trim(), "..", "..") : null;
7390
7541
  } catch {
7391
7542
  return null;
7392
7543
  }
@@ -7398,19 +7549,19 @@ async function sweepReviewTrees(run2, opts = {}) {
7398
7549
  const failed = [];
7399
7550
  let names;
7400
7551
  try {
7401
- names = fs12.readdirSync(root, { withFileTypes: true }).filter((e) => e.isDirectory() && e.name !== NO_HOOKS).map((e) => e.name);
7552
+ names = fs13.readdirSync(root, { withFileTypes: true }).filter((e) => e.isDirectory() && e.name !== NO_HOOKS).map((e) => e.name);
7402
7553
  } catch {
7403
7554
  return { swept, failed };
7404
7555
  }
7405
7556
  for (const name of names) {
7406
- const dir = path14.join(root, name);
7557
+ const dir = path15.join(root, name);
7407
7558
  try {
7408
- if (opts.olderThanMs && now - fs12.statSync(dir).mtimeMs < opts.olderThanMs) continue;
7559
+ if (opts.olderThanMs && now - fs13.statSync(dir).mtimeMs < opts.olderThanMs) continue;
7409
7560
  } catch {
7410
7561
  continue;
7411
7562
  }
7412
7563
  const gitDir = gitDirOf(dir);
7413
- const gone = gitDir && fs12.existsSync(gitDir) ? await removeReviewTree(run2, gitDir, dir) : rmTree(dir);
7564
+ const gone = gitDir && fs13.existsSync(gitDir) ? await removeReviewTree(run2, gitDir, dir) : rmTree(dir);
7414
7565
  (gone ? swept : failed).push(name);
7415
7566
  }
7416
7567
  return { swept, failed };
@@ -7528,7 +7679,8 @@ function createReviewQueue(deps) {
7528
7679
  async function aiStep(project, at, prepared, rules, discussion) {
7529
7680
  if (!deps.agent) return { answer: void 0 };
7530
7681
  const kinds = kindsOf(prepared.files, prepared.extras, rules);
7531
- const said = discussion ? { discussion } : {};
7682
+ const attention = deps.attention?.(project.alias) ?? [];
7683
+ const said = { ...discussion ? { discussion } : {}, ...attention.length ? { attention } : {} };
7532
7684
  const prompt = reviewPrompt(at, prepared.files, kinds, said);
7533
7685
  if (!prompt) return { answer: void 0 };
7534
7686
  let fellBack = "the agent has no read-only mode";
@@ -7747,7 +7899,7 @@ function createReviewQueue(deps) {
7747
7899
  }
7748
7900
 
7749
7901
  // src/core/review/review-deps.ts
7750
- import fs13 from "fs";
7902
+ import fs14 from "fs";
7751
7903
  var AGENT_TIMEOUT_MS = 18e4;
7752
7904
  var CHECKOUT_AGENT_TIMEOUT_MS = 3e5;
7753
7905
  var TREE_SWEEP_MIN_AGE_MS = CHECKOUT_AGENT_TIMEOUT_MS + 5 * 6e4;
@@ -7783,6 +7935,7 @@ function realReviewQueueDeps(opts) {
7783
7935
  }),
7784
7936
  sweepTrees: () => sweepReviewTrees(defaultRunner, { olderThanMs: TREE_SWEEP_MIN_AGE_MS }),
7785
7937
  rules: () => rulesWith(config().reviews?.rules),
7938
+ attention: (alias) => reviewFocus(config(), [alias]),
7786
7939
  store: { read: readReview, update: updateReview, upsert: upsertReview, all: allReviews, keepOnly },
7787
7940
  limits: () => reviewLimits(config()),
7788
7941
  changed: opts.changed,
@@ -7829,7 +7982,7 @@ function realReviewRouteIo() {
7829
7982
  function realFixIo(opts) {
7830
7983
  return {
7831
7984
  lookUp: (r) => resolvePrToStart(r.url, loadConfig() ?? { repos: {}, groups: {} }, r.repo),
7832
- liveSessionOn: (alias, branch) => sessionOnBranch(loadHistory(), loadConfig(), alias, branch, { branchOf: checkedOutBranch, exists: (p) => fs13.existsSync(p) }),
7985
+ liveSessionOn: (alias, branch) => sessionOnBranch(loadHistory(), loadConfig(), alias, branch, { branchOf: checkedOutBranch, exists: (p) => fs14.existsSync(p) }),
7833
7986
  create: async (alias, branch, name) => {
7834
7987
  const config = loadConfig();
7835
7988
  if (!config) return { ok: false, error: "no config" };
@@ -7884,7 +8037,7 @@ function startReviewSweeps(opts) {
7884
8037
  }
7885
8038
 
7886
8039
  // src/core/diff/session-history.ts
7887
- import path15 from "path";
8040
+ import path16 from "path";
7888
8041
 
7889
8042
  // src/core/diff/diff-points.ts
7890
8043
  var SHA = /^[0-9a-f]{7,40}$/;
@@ -7980,12 +8133,12 @@ async function sessionHistory(session, others = []) {
7980
8133
  });
7981
8134
  if (diffArg === "HEAD") continue;
7982
8135
  const log = await g(["log", `-n${MAX_COMMITS2}`, "--format=%H%x1f%cI%x1f%s", `${diffArg}..HEAD`, "--"], root);
7983
- if (log.ok && log.out) commits.push(...parseLog(log.out, path15.basename(root)));
8136
+ if (log.ok && log.out) commits.push(...parseLog(log.out, path16.basename(root)));
7984
8137
  }
7985
8138
  for (const b of others) {
7986
8139
  const tip = await tipOf(b);
7987
8140
  if (!tip) continue;
7988
- const repo = path15.basename(b.path);
8141
+ const repo = path16.basename(b.path);
7989
8142
  const start = liveStart(b) ?? b.start;
7990
8143
  let list = [];
7991
8144
  let base;
@@ -8046,7 +8199,7 @@ function parseLog(stdout, repo) {
8046
8199
  return out;
8047
8200
  }
8048
8201
  function computeSessionRange(session, from, to) {
8049
- const paths = session.paths.map((p) => path15.resolve(p));
8202
+ const paths = session.paths.map((p) => path16.resolve(p));
8050
8203
  const refs = rangeRefs(paths, loadManifest(scopeHashForPaths(paths)).entries, from, to);
8051
8204
  if ("error" in refs) return refs;
8052
8205
  return { repos: refs.map((r) => ({ name: r.name, root: r.root, files: computeRangeDiff(r) })) };
@@ -8065,17 +8218,17 @@ async function sessionHistoryWire(session) {
8065
8218
  }
8066
8219
 
8067
8220
  // src/server/routes/revert-routes.ts
8068
- import path17 from "path";
8221
+ import path18 from "path";
8069
8222
  import { zValidator as zValidator7 } from "@hono/zod-validator";
8070
8223
  import { z as z6 } from "zod";
8071
8224
 
8072
8225
  // src/core/diff/revert.ts
8073
- import fs14 from "fs";
8074
- import path16 from "path";
8226
+ import fs15 from "fs";
8227
+ import path17 from "path";
8075
8228
  function inside(root, rel) {
8076
- const abs = path16.resolve(root, rel);
8077
- const back = path16.relative(path16.resolve(root), abs);
8078
- if (!back || back.startsWith("..") || path16.isAbsolute(back)) return null;
8229
+ const abs = path17.resolve(root, rel);
8230
+ const back = path17.relative(path17.resolve(root), abs);
8231
+ if (!back || back.startsWith("..") || path17.isAbsolute(back)) return null;
8079
8232
  return abs;
8080
8233
  }
8081
8234
  function inHead(root, rel) {
@@ -8085,7 +8238,7 @@ function removeNew(root, rel) {
8085
8238
  const abs = inside(root, rel);
8086
8239
  if (!abs) return { ok: false, status: 400, error: `path escapes the worktree: ${rel}` };
8087
8240
  git(["rm", "--cached", "-q", "--ignore-unmatch", "--", rel], root);
8088
- fs14.rmSync(abs, { force: true });
8241
+ fs15.rmSync(abs, { force: true });
8089
8242
  return null;
8090
8243
  }
8091
8244
  function revertFile(root, file) {
@@ -8188,8 +8341,8 @@ function mountRevertRoutes(app, opts) {
8188
8341
  if (!session) return c.json({ error: "unknown session" }, 404);
8189
8342
  const body = c.req.valid("json");
8190
8343
  const repo = opts.uncommitted(session).find((r) => r.name === body.repo);
8191
- const allowed = new Set(session.paths.map((p) => path17.resolve(p).toLowerCase()));
8192
- if (!repo || !allowed.has(path17.resolve(repo.root).toLowerCase())) {
8344
+ const allowed = new Set(session.paths.map((p) => path18.resolve(p).toLowerCase()));
8345
+ if (!repo || !allowed.has(path18.resolve(repo.root).toLowerCase())) {
8193
8346
  return c.json({ error: `unknown repo: ${body.repo}` }, 404);
8194
8347
  }
8195
8348
  const file = repo.files.find((f) => f.path === body.path);
@@ -8246,7 +8399,7 @@ function mountDevRoutes(app, opts) {
8246
8399
  }
8247
8400
 
8248
8401
  // src/server/routes/ci-routes.ts
8249
- import fs15 from "fs";
8402
+ import fs16 from "fs";
8250
8403
  var WAKE_PROMPT = NOTE_NUDGE;
8251
8404
  async function wakeForNote(id) {
8252
8405
  if (loadConfig()?.prWatch?.wakeClaude === false) return "off";
@@ -8267,7 +8420,7 @@ function mountCiRoutes(app, opts) {
8267
8420
  lookOnly: opts.lookOnly,
8268
8421
  sessions: () => {
8269
8422
  const now = Date.now();
8270
- return loadHistory().filter((s) => watchable(s, now, { exists: (p) => fs15.existsSync(p), lastWriteMs: lastConversationWriteMs })).map((session) => ({ id: sessionIdFor(session), session }));
8423
+ return loadHistory().filter((s) => watchable(s, now, { exists: (p) => fs16.existsSync(p), lastWriteMs: lastConversationWriteMs })).map((session) => ({ id: sessionIdFor(session), session }));
8271
8424
  },
8272
8425
  // Never-pushed branches can't have a PR: don't ask GitHub about them,
8273
8426
  // unless the watch already knows one (a merged PR whose branch is gone).
@@ -8346,27 +8499,27 @@ function mountCiRoutes(app, opts) {
8346
8499
  }
8347
8500
 
8348
8501
  // src/core/diff/diffs-sweep.ts
8349
- import fs16 from "fs";
8350
- import path18 from "path";
8502
+ import fs17 from "fs";
8503
+ import path19 from "path";
8351
8504
  var SWEEP_AFTER_DAYS = 30;
8352
8505
  var DISPOSABLE = /\.(html|log)$/i;
8353
- function sweepOldDiffArtifacts(now = Date.now(), maxAgeDays = SWEEP_AFTER_DAYS, dir = path18.join(getConfigDir(), "diffs")) {
8506
+ function sweepOldDiffArtifacts(now = Date.now(), maxAgeDays = SWEEP_AFTER_DAYS, dir = path19.join(getConfigDir(), "diffs")) {
8354
8507
  const cutoff = now - maxAgeDays * 24 * 60 * 60 * 1e3;
8355
8508
  let removed = 0;
8356
8509
  let bytes = 0;
8357
8510
  let names;
8358
8511
  try {
8359
- names = fs16.readdirSync(dir);
8512
+ names = fs17.readdirSync(dir);
8360
8513
  } catch {
8361
8514
  return { removed, bytes };
8362
8515
  }
8363
8516
  for (const name of names) {
8364
8517
  if (!DISPOSABLE.test(name)) continue;
8365
- const file = path18.join(dir, name);
8518
+ const file = path19.join(dir, name);
8366
8519
  try {
8367
- const st = fs16.statSync(file);
8520
+ const st = fs17.statSync(file);
8368
8521
  if (!st.isFile() || st.mtimeMs >= cutoff) continue;
8369
- fs16.rmSync(file, { force: true });
8522
+ fs17.rmSync(file, { force: true });
8370
8523
  removed++;
8371
8524
  bytes += st.size;
8372
8525
  } catch {
@@ -8895,6 +9048,7 @@ function sleepCandidates(ptys, now, afterMs, busy, keep = /* @__PURE__ */ new Se
8895
9048
  return !busy(p.id);
8896
9049
  }).map((p) => p.id);
8897
9050
  }
9051
+ var NOT_RESUMABLE = "it has no conversation to resume yet: stopping it would lose what it was started with (it may be at a first-run question, such as whether you trust its folder)";
8898
9052
  async function stillAtWork(p, c) {
8899
9053
  try {
8900
9054
  const shown = c.shown(p.id);
@@ -8904,6 +9058,7 @@ async function stillAtWork(p, c) {
8904
9058
  if (live === "busy") return "Claude Code says it is busy (a background agent it started, perhaps)";
8905
9059
  if (live === "waiting") return "Claude Code says it is waiting at a dialog";
8906
9060
  if (live === "shell") return "Claude Code says a background command it started is still running";
9061
+ if (!c.resumable(p.id)) return NOT_RESUMABLE;
8907
9062
  const open = c.backgroundCommands(p.id, Date.parse(p.startedAt) || 0);
8908
9063
  if (open > 0) return `${open} background command${open === 1 ? "" : "s"} it started ${open === 1 ? "is" : "are"} still running`;
8909
9064
  const running = await c.runningFrom(p.id);
@@ -8944,6 +9099,12 @@ function sleepChecks() {
8944
9099
  const s = sessionOf(id);
8945
9100
  return agentOf(s).conversation?.backgroundCommands?.(s, sinceMs) ?? 0;
8946
9101
  },
9102
+ // The assistant is started afresh each time by design: it sleeps by the other rules alone.
9103
+ resumable: (id) => {
9104
+ if (id === ASSISTANT_ID) return true;
9105
+ const s = sessionOf(id);
9106
+ return agentOf(s).launch.resumeLaunch(s).hasConversation;
9107
+ },
8947
9108
  runningFrom: (id) => {
8948
9109
  procs ??= listProcesses();
8949
9110
  const list = procs;
@@ -8957,7 +9118,7 @@ var LEFTOVERS_EVERY_MS = 60 * 6e4;
8957
9118
  function computeSessionDiff(s, base) {
8958
9119
  const resolved = s.paths.map((p) => resolveRepoDiff(p, base, s.baseBranches?.[p] ?? s.baseBranch));
8959
9120
  const repos = s.paths.map((p, i) => ({
8960
- name: path19.basename(p),
9121
+ name: path20.basename(p),
8961
9122
  root: p,
8962
9123
  resolvedBase: resolved[i].resolvedBase,
8963
9124
  files: computeDiff({ root: p, diffArg: resolved[i].diffArg })
@@ -9008,7 +9169,7 @@ async function startWebServer(opts = {}) {
9008
9169
  let activityWatcher = null;
9009
9170
  if (!lean) {
9010
9171
  try {
9011
- const roots = activityRoots().filter((r) => fs17.existsSync(r));
9172
+ const roots = activityRoots().filter((r) => fs18.existsSync(r));
9012
9173
  if (roots.length > 0) {
9013
9174
  activityWatcher = createFsWatcher({
9014
9175
  roots,
@@ -9061,7 +9222,7 @@ async function startWebServer(opts = {}) {
9061
9222
  }, 500);
9062
9223
  }
9063
9224
  });
9064
- const repoNames = (s) => s.isGroup ? s.paths.map((p) => path19.basename(p)) : [s.target];
9225
+ const repoNames = (s) => s.isGroup ? s.paths.map((p) => path20.basename(p)) : [s.target];
9065
9226
  const diffStatFor = (id, s, hasStatus) => wantsDiffStat(s, hasStatus) ? diffStats.get(id, s.paths, repoNames(s)) : null;
9066
9227
  const archivedRow = createArchivedRows();
9067
9228
  app.get("/api/sessions", (c) => {
@@ -9612,6 +9773,7 @@ async function startWebServer(opts = {}) {
9612
9773
  mountSessionOrderRoutes(app, { broadcast });
9613
9774
  mountRailRoutes(app, { broadcast });
9614
9775
  mountNoteRoutes(app, { broadcast });
9776
+ mountSessionShowRoutes(app, { broadcast });
9615
9777
  mountSessionReviewRoutes(app, {
9616
9778
  prepare: (session, repo) => prepareLocalReview(session, repo, {
9617
9779
  diff: (s) => computeSessionDiff(s, "branch"),
@@ -9620,9 +9782,11 @@ async function startWebServer(opts = {}) {
9620
9782
  inTree: (s, names) => localTreeRun(s.paths, names, {
9621
9783
  readOnly: internalReadOnly,
9622
9784
  run: (prompt, cwd, deny) => runInternalReadOnly(prompt, cwd, LOCAL_TREE_TIMEOUT_MS, { lane: "localReviews", deny }),
9623
- exists: (dir) => fs17.existsSync(dir)
9785
+ exists: (dir) => fs18.existsSync(dir)
9624
9786
  }),
9625
- rules: () => rulesWith(loadConfig()?.reviews?.rules)
9787
+ rules: () => rulesWith(loadConfig()?.reviews?.rules),
9788
+ // Its project's and each of its repos' own points, with the ones for every review.
9789
+ attention: (s) => reviewFocus(loadConfig(), [s.target, ...s.repos ?? []])
9626
9790
  }),
9627
9791
  signature: (s, repo) => localSignature(computeSessionDiff(s, "branch"), repo ?? void 0),
9628
9792
  store: { read: readLocalReview, save: saveLocalReview, drop: dropLocalReview },
@@ -9655,7 +9819,7 @@ async function startWebServer(opts = {}) {
9655
9819
  updatesTimer?.unref?.();
9656
9820
  const desktopFile = desktopUpdatePath();
9657
9821
  const onDesktopUpdate = () => broadcast("updates-changed", { ts: Date.now() });
9658
- if (jobs) fs17.watchFile(desktopFile, { interval: 3e3 }, onDesktopUpdate);
9822
+ if (jobs) fs18.watchFile(desktopFile, { interval: 3e3 }, onDesktopUpdate);
9659
9823
  const usageWatcher = wireUsage(app, { broadcast, build: () => buildUsage(realUsageDeps()) });
9660
9824
  mountPtyHostRoutes(app, {
9661
9825
  dev: !!dev,
@@ -9731,7 +9895,7 @@ async function startWebServer(opts = {}) {
9731
9895
  if (timeFirst) clearTimeout(timeFirst);
9732
9896
  if (timeTimer) clearInterval(timeTimer);
9733
9897
  timeKeeper?.stop();
9734
- fs17.unwatchFile(desktopFile, onDesktopUpdate);
9898
+ fs18.unwatchFile(desktopFile, onDesktopUpdate);
9735
9899
  usageWatcher.stop();
9736
9900
  for (const t of conversationSyncs.values()) clearTimeout(t);
9737
9901
  clearTimeout(sweepTimer);
@@ -9788,11 +9952,11 @@ function startAccountSync(deps) {
9788
9952
  }
9789
9953
 
9790
9954
  // src/core/platform/autostart.ts
9791
- import fs18 from "fs";
9792
- import path20 from "path";
9955
+ import fs19 from "fs";
9956
+ import path21 from "path";
9793
9957
  function startupScriptPath() {
9794
9958
  if (process.platform !== "win32" || !process.env.APPDATA) return null;
9795
- return path20.join(process.env.APPDATA, "Microsoft", "Windows", "Start Menu", "Programs", "Startup", "work-web.vbs");
9959
+ return path21.join(process.env.APPDATA, "Microsoft", "Windows", "Start Menu", "Programs", "Startup", "work-web.vbs");
9796
9960
  }
9797
9961
  function vbsQuote(s) {
9798
9962
  return '"' + s.replace(/"/g, '""') + '"';
@@ -9810,11 +9974,11 @@ function setAutostart(enabled, workBin) {
9810
9974
  const file = startupScriptPath();
9811
9975
  if (!file) throw new Error("Autostart is only supported on Windows so far.");
9812
9976
  if (enabled) {
9813
- fs18.mkdirSync(path20.dirname(file), { recursive: true });
9814
- fs18.writeFileSync(file, buildStartupScript(process.execPath, workBin), "utf-8");
9977
+ fs19.mkdirSync(path21.dirname(file), { recursive: true });
9978
+ fs19.writeFileSync(file, buildStartupScript(process.execPath, workBin), "utf-8");
9815
9979
  } else {
9816
9980
  try {
9817
- fs18.unlinkSync(file);
9981
+ fs19.unlinkSync(file);
9818
9982
  } catch {
9819
9983
  }
9820
9984
  }
@@ -9831,14 +9995,14 @@ async function demoHostSubmit(url, review) {
9831
9995
  };
9832
9996
  return { ok: true, url: `${url}#pullrequestreview-1` };
9833
9997
  }
9834
- var hunk = (path22, lines, status = "modified") => {
9998
+ var hunk = (path23, lines, status = "modified") => {
9835
9999
  const added = lines.filter((l) => l.startsWith("+")).length;
9836
10000
  const deleted = lines.filter((l) => l.startsWith("-")).length;
9837
10001
  const context = lines.length - added - deleted;
9838
10002
  return [
9839
- `diff --git a/${path22} b/${path22}`,
9840
- ...status === "added" ? ["new file mode 100644", "index 0000000..1111111", "--- /dev/null"] : ["index 1111111..2222222 100644", `--- a/${path22}`],
9841
- `+++ b/${path22}`,
10003
+ `diff --git a/${path23} b/${path23}`,
10004
+ ...status === "added" ? ["new file mode 100644", "index 0000000..1111111", "--- /dev/null"] : ["index 1111111..2222222 100644", `--- a/${path23}`],
10005
+ `+++ b/${path23}`,
9842
10006
  `@@ -${status === "added" ? 0 : 1},${status === "added" ? 0 : context + deleted} +1,${context + added} @@`,
9843
10007
  ...lines
9844
10008
  ].join("\n");
@@ -9971,6 +10135,8 @@ var DEMO_ANSWER = JSON.stringify({
9971
10135
  why: "The handler moves the money and the validator decides which requests reach it: one cannot be reviewed without the other.",
9972
10136
  risk: "It moves real money through the payment provider. Two refunds of the same order at once both read the old Refunded total, and nothing stops a refund larger than what was paid.",
9973
10137
  riskLevel: 5,
10138
+ verdict: "fix-first",
10139
+ verdictWhy: "Cap a refund at what the customer paid before this goes in.",
9974
10140
  flags: ["data-loss", "concurrency"],
9975
10141
  files: ["src/Shop.Orders/Refunds/RefundHandler.cs", "src/Shop.Orders/Refunds/RefundValidator.cs"]
9976
10142
  },
@@ -9980,6 +10146,8 @@ var DEMO_ANSWER = JSON.stringify({
9980
10146
  why: "It is a one-line change on its own, but every amount the shop computes passes through it.",
9981
10147
  risk: "A one-cent difference on .5 amounts shows up everywhere at once, including in totals other systems compare against.",
9982
10148
  riskLevel: 3,
10149
+ verdict: "ready",
10150
+ verdictWhy: "The change is one line and its test pins the new rounding.",
9983
10151
  flags: ["public-contract"],
9984
10152
  files: ["src/Shop.Orders/Pricing/Rounding.cs"]
9985
10153
  }
@@ -10336,7 +10504,7 @@ function createDemoRepos(liveTargets) {
10336
10504
  /** GET /api/projects: what New worktree offers, as the real one reads config. */
10337
10505
  projects() {
10338
10506
  return {
10339
- singles: Object.entries(repos).map(([name, path22]) => ({ name, kind: "single", path: path22 })),
10507
+ singles: Object.entries(repos).map(([name, path23]) => ({ name, kind: "single", path: path23 })),
10340
10508
  groups: Object.entries(groups).map(([name, members]) => ({ name, kind: "group", members }))
10341
10509
  };
10342
10510
  },
@@ -10378,12 +10546,12 @@ function createDemoRepos(liveTargets) {
10378
10546
  }));
10379
10547
  return { roots: [root], repos: rows, groups: groupRows };
10380
10548
  },
10381
- enroll(alias, path22) {
10382
- if (!found.some((f) => f.path === path22)) throw new DemoRepoError(`${path22} is not the top folder of a git repository`);
10383
- const problem = enrollProblem(alias, path22, config());
10549
+ enroll(alias, path23) {
10550
+ if (!found.some((f) => f.path === path23)) throw new DemoRepoError(`${path23} is not the top folder of a git repository`);
10551
+ const problem = enrollProblem(alias, path23, config());
10384
10552
  if (problem) throw new DemoRepoError(problem);
10385
- repos[alias] = path22;
10386
- ignored.delete(path22);
10553
+ repos[alias] = path23;
10554
+ ignored.delete(path23);
10387
10555
  },
10388
10556
  remove(alias, force) {
10389
10557
  if (!(alias in repos)) throw new DemoRepoError(`no repo \u201C${alias}\u201D`);
@@ -10392,9 +10560,9 @@ function createDemoRepos(liveTargets) {
10392
10560
  delete repos[alias];
10393
10561
  for (const g2 of Object.keys(groups)) groups[g2] = groups[g2].filter((m) => m !== alias);
10394
10562
  },
10395
- ignore(path22, on) {
10396
- if (on) ignored.add(path22);
10397
- else ignored.delete(path22);
10563
+ ignore(path23, on) {
10564
+ if (on) ignored.add(path23);
10565
+ else ignored.delete(path23);
10398
10566
  },
10399
10567
  saveGroup(name, members, creating) {
10400
10568
  const problem = groupProblem(name, members, config(), { creating });
@@ -11634,15 +11802,15 @@ ${reply}\r
11634
11802
  if (refusal || !s) return { ok: false, status: refusal?.status ?? 404, error: refusal?.error ?? "unknown session" };
11635
11803
  s.repos.push({ name: alias, uncommitted: "", sinceBranch: "", published: false, pr: null });
11636
11804
  const from = base || "main";
11637
- const path22 = this.wire(s).paths[s.repos.length - 1];
11805
+ const path23 = this.wire(s).paths[s.repos.length - 1];
11638
11806
  s.comments.post({
11639
11807
  side: "general",
11640
11808
  status: "published",
11641
- body: addedRepoNote({ alias, path: path22, branch: s.branch, from, imported: true })
11809
+ body: addedRepoNote({ alias, path: path23, branch: s.branch, from, imported: true })
11642
11810
  });
11643
11811
  this.emit("comments-changed", { sessionId: id });
11644
11812
  this.changed();
11645
- return { ok: true, wire: { ok: true, path: path22, branch: s.branch, created: true, from, imported: true, warnings: [] } };
11813
+ return { ok: true, wire: { ok: true, path: path23, branch: s.branch, created: true, from, imported: true, warnings: [] } };
11646
11814
  }
11647
11815
  // -- CI (the PR watch, simulated) ------------------------------------------
11648
11816
  /** The Today digest, through the same builder as work web: the demo's
@@ -12220,20 +12388,20 @@ function demoCodeFiles(repos, group) {
12220
12388
  })
12221
12389
  };
12222
12390
  }
12223
- function demoCodeFile(repos, group, repo, path22) {
12391
+ function demoCodeFile(repos, group, repo, path23) {
12224
12392
  if (repo === "") {
12225
- if (!group || path22 !== "CLAUDE.md") return null;
12393
+ if (!group || path23 !== "CLAUDE.md") return null;
12226
12394
  const text2 = `# Group instructions
12227
12395
 
12228
12396
  Repos: ${repos.map((r2) => r2.name).join(", ")}.
12229
12397
  `;
12230
- return { repo, path: path22, size: text2.length, text: text2 };
12398
+ return { repo, path: path23, size: text2.length, text: text2 };
12231
12399
  }
12232
12400
  const r = repos.find((x) => x.name === repo);
12233
12401
  if (!r) return null;
12234
- const changed = r.changed.find((f) => f.path === path22 && f.status !== "deleted");
12235
- const text = changed ? newSide(changed) : COMMON[path22]?.replace(/\{repo\}/g, repo);
12236
- return text === void 0 ? null : { repo, path: path22, size: text.length, text };
12402
+ const changed = r.changed.find((f) => f.path === path23 && f.status !== "deleted");
12403
+ const text = changed ? newSide(changed) : COMMON[path23]?.replace(/\{repo\}/g, repo);
12404
+ return text === void 0 ? null : { repo, path: path23, size: text.length, text };
12237
12405
  }
12238
12406
  function demoCodeSearch(repos, group, query) {
12239
12407
  const q = query.trim();
@@ -12242,12 +12410,12 @@ function demoCodeSearch(repos, group, query) {
12242
12410
  const text = [];
12243
12411
  const fold = (x) => ignoresCase(q) ? x.toLowerCase() : x;
12244
12412
  for (const r of demoCodeFiles(repos, group).repos) {
12245
- for (const path22 of r.files) {
12246
- const lines = (demoCodeFile(repos, group, r.name, path22)?.text ?? "").split("\n");
12413
+ for (const path23 of r.files) {
12414
+ const lines = (demoCodeFile(repos, group, r.name, path23)?.text ?? "").split("\n");
12247
12415
  lines.forEach((line, i) => {
12248
- const d = declarationOf(path22, line);
12249
- if (d) symbols.push({ ...d, repo: r.name, path: path22, line: i + 1, text: line.trim() });
12250
- if (fold(line).includes(fold(q))) text.push({ repo: r.name, path: path22, line: i + 1, text: line });
12416
+ const d = declarationOf(path23, line);
12417
+ if (d) symbols.push({ ...d, repo: r.name, path: path23, line: i + 1, text: line.trim() });
12418
+ if (fold(line).includes(fold(q))) text.push({ repo: r.name, path: path23, line: i + 1, text: line });
12251
12419
  });
12252
12420
  }
12253
12421
  }
@@ -12502,7 +12670,15 @@ function createDemoSettings(repoPathOf) {
12502
12670
  "time.gapTicket": "OPS-1"
12503
12671
  };
12504
12672
  const repos = /* @__PURE__ */ new Map([
12505
- ["api", { requiredChecks: ["build", "test"], devCommand: "npm run dev", reviews: "all" }]
12673
+ [
12674
+ "api",
12675
+ {
12676
+ requiredChecks: ["build", "test"],
12677
+ devCommand: "npm run dev",
12678
+ reviews: "all",
12679
+ reviewFocus: ["A refund never exceeds what was paid"]
12680
+ }
12681
+ ]
12506
12682
  ]);
12507
12683
  const read = () => ({ values: { ...values }, configPath: "~/.work/config.json (demo: kept in memory)" });
12508
12684
  const readRepo = (alias) => {
@@ -12513,27 +12689,27 @@ function createDemoSettings(repoPathOf) {
12513
12689
  path: p,
12514
12690
  origin: `https://github.com/acme/${alias}`,
12515
12691
  host: alias === "payments" ? "Azure DevOps" : "GitHub",
12516
- ...repos.get(alias) ?? { requiredChecks: null, devCommand: null, reviews: null }
12692
+ ...repos.get(alias) ?? { requiredChecks: null, devCommand: null, reviews: null, reviewFocus: null }
12517
12693
  };
12518
12694
  };
12519
12695
  return {
12520
12696
  read,
12521
- async write(path22, value) {
12522
- const f = settingAt(path22);
12523
- if (!f) throw new SettingsError(`no setting ${path22}`, 404);
12697
+ async write(path23, value) {
12698
+ const f = settingAt(path23);
12699
+ if (!f) throw new SettingsError(`no setting ${path23}`, 404);
12524
12700
  const r = checkSetting(f, value);
12525
12701
  if (!r.ok) throw new SettingsError(`${f.label}: ${r.error}`);
12526
- if (r.value === null) delete values[path22];
12527
- else values[path22] = r.value;
12702
+ if (r.value === null) delete values[path23];
12703
+ else values[path23] = r.value;
12528
12704
  return read();
12529
12705
  },
12530
12706
  readRepo,
12531
12707
  async writeRepo(alias, key, value) {
12532
12708
  readRepo(alias);
12533
- if (!["requiredChecks", "devCommand", "reviews"].includes(key)) throw new SettingsError(`no repo setting ${key}`, 404);
12709
+ if (!["requiredChecks", "devCommand", "reviews", "reviewFocus"].includes(key)) throw new SettingsError(`no repo setting ${key}`, 404);
12534
12710
  const r = checkRepoSetting(key, value);
12535
12711
  if (!r.ok) throw new SettingsError(r.error);
12536
- const now = repos.get(alias) ?? { requiredChecks: null, devCommand: null, reviews: null };
12712
+ const now = repos.get(alias) ?? { requiredChecks: null, devCommand: null, reviews: null, reviewFocus: null };
12537
12713
  repos.set(alias, { ...now, [key]: r.value });
12538
12714
  return readRepo(alias);
12539
12715
  }
@@ -12706,6 +12882,19 @@ async function startDemoServer(opts) {
12706
12882
  });
12707
12883
  return c.json({ events });
12708
12884
  });
12885
+ app.get(
12886
+ "/api/sessions/:id/show",
12887
+ (c) => scenario.list().some((x) => x.id === c.req.param("id")) ? c.json({ shown: null }) : notFound(c)
12888
+ );
12889
+ app.post(
12890
+ "/api/sessions/:id/show",
12891
+ (c) => scenario.list().some((x) => x.id === c.req.param("id")) ? c.json({ error: "The demo has no files to show." }, 404) : notFound(c)
12892
+ );
12893
+ app.delete(
12894
+ "/api/sessions/:id/show",
12895
+ (c) => scenario.list().some((x) => x.id === c.req.param("id")) ? c.json({ shown: null }) : notFound(c)
12896
+ );
12897
+ app.get("/api/sessions/:id/show/image", (c) => c.json({ error: "it shows no image" }, 404));
12709
12898
  const localReviews = /* @__PURE__ */ new Set();
12710
12899
  const demoLocalReview = (w) => {
12711
12900
  if (!localReviews.has(w.id)) return { status: "none", repo: null, repos: [] };
@@ -13684,16 +13873,16 @@ async function startDemoServer(opts) {
13684
13873
  }
13685
13874
 
13686
13875
  // src/core/platform/web-life.ts
13687
- import fs19 from "fs";
13688
- import path21 from "path";
13689
- var lifePath = () => path21.join(getConfigDir(), "web-life.json");
13876
+ import fs20 from "fs";
13877
+ import path22 from "path";
13878
+ var lifePath = () => path22.join(getConfigDir(), "web-life.json");
13690
13879
  function isLife(v) {
13691
13880
  const l = v;
13692
13881
  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");
13693
13882
  }
13694
13883
  function readWebLife() {
13695
13884
  try {
13696
- const v = JSON.parse(fs19.readFileSync(lifePath(), "utf-8"));
13885
+ const v = JSON.parse(fs20.readFileSync(lifePath(), "utf-8"));
13697
13886
  return isLife(v) ? v : null;
13698
13887
  } catch {
13699
13888
  return null;
@@ -13772,7 +13961,7 @@ async function reinstallAgentSetup(lean) {
13772
13961
  }
13773
13962
  function startAccountSetupSync(lean, o = {}) {
13774
13963
  return startAccountSync({
13775
- folders: () => (o.folders ?? agentAccountFolders)().filter((dir) => fs20.existsSync(dir)),
13964
+ folders: () => (o.folders ?? agentAccountFolders)().filter((dir) => fs21.existsSync(dir)),
13776
13965
  apply: o.apply ?? (() => reinstallAgentSetup(lean)),
13777
13966
  onError: swallow("set up a changed Claude account"),
13778
13967
  ...o.everyMs !== void 0 ? { everyMs: o.everyMs } : {}
@@ -14076,4 +14265,4 @@ export {
14076
14265
  stopExisting,
14077
14266
  webCommand
14078
14267
  };
14079
- //# sourceMappingURL=web-VVKBEQTY.js.map
14268
+ //# sourceMappingURL=web-6FWX5663.js.map