@moberg_hr/work-tree 2.11.5 → 2.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{account-EAVYWOKR.js → account-H25RWDLL.js} +58 -22
- package/dist/account-H25RWDLL.js.map +1 -0
- package/dist/{add-repo-3THEK6UG.js → add-repo-6JP5XWPF.js} +13 -13
- package/dist/{answer-3CJQWBGY.js → answer-H3PTZZAX.js} +9 -9
- package/dist/{attach-FQSBZXI7.js → attach-STMGUOI5.js} +16 -16
- package/dist/bin.js +2 -2
- package/dist/{block-NGD2KNTU.js → block-XJKNFMLV.js} +11 -11
- package/dist/{broadcast-NLASZGWR.js → broadcast-RTFVOYTS.js} +7 -7
- package/dist/{catchup-WJPWOGVI.js → catchup-4ANFB24Y.js} +12 -12
- package/dist/{chunk-TFNDOWYP.js → chunk-2KGZRG43.js} +5 -5
- package/dist/{chunk-H4TMS567.js → chunk-2KL5MJIJ.js} +6 -6
- package/dist/{chunk-I7AEQDG7.js → chunk-2QIX5XDL.js} +2 -2
- package/dist/{chunk-33XSEAHO.js → chunk-2Y2ARDXI.js} +2 -2
- package/dist/{chunk-JNAYPBAB.js → chunk-34DFG4E5.js} +3 -3
- package/dist/{chunk-UQJQZ526.js → chunk-3DZR5LFG.js} +3 -3
- package/dist/{chunk-TL7K3XUY.js → chunk-3H5ZMSJT.js} +6 -6
- package/dist/{chunk-NUPLJJOS.js → chunk-4IUSJXOY.js} +10 -10
- package/dist/{chunk-CVMO75V5.js → chunk-5DY4YW36.js} +2 -2
- package/dist/{chunk-3O6QFWZ6.js → chunk-6GNGPYL6.js} +2 -2
- package/dist/{chunk-HORDAO4Z.js → chunk-7JNYJ6RL.js} +3 -3
- package/dist/{chunk-3257QPVM.js → chunk-B7Q6K5EM.js} +3 -3
- package/dist/{chunk-45MDVVW7.js → chunk-BLNWKPL7.js} +4 -4
- package/dist/{chunk-CS2EINZJ.js → chunk-BVBGCCXD.js} +54 -54
- package/dist/{chunk-IREGW23T.js → chunk-CP6W4MTM.js} +3 -3
- package/dist/{chunk-RPWEOEA3.js → chunk-CWQQCJKO.js} +4 -4
- package/dist/{chunk-DHOC2S2L.js → chunk-D4FYTREI.js} +7 -7
- package/dist/{chunk-DROLR3NJ.js → chunk-DQWZDA2E.js} +49 -4
- package/dist/chunk-DQWZDA2E.js.map +1 -0
- package/dist/{chunk-3KVOYBM4.js → chunk-EL7CYYJF.js} +3 -3
- package/dist/{chunk-BHJ73OPQ.js → chunk-FVGDOG5T.js} +6 -6
- package/dist/{chunk-7FNJ6A2U.js → chunk-G5AAYK56.js} +2 -2
- package/dist/{chunk-C72Y42VC.js → chunk-GBNEIQLL.js} +7 -7
- package/dist/{chunk-N5PQHNYK.js → chunk-GYR7P3V2.js} +2 -2
- package/dist/{chunk-IUWMT6PF.js → chunk-HUD4JLK3.js} +14 -6
- package/dist/chunk-HUD4JLK3.js.map +1 -0
- package/dist/{chunk-FM6VLU4T.js → chunk-HVZAGQUV.js} +3 -3
- package/dist/{chunk-DS2CKYQ4.js → chunk-IIIAV6OD.js} +3 -3
- package/dist/{chunk-PGGNMC34.js → chunk-ILF3BNIX.js} +5 -5
- package/dist/{chunk-EJSGPLXO.js → chunk-J4JORJBH.js} +5 -5
- package/dist/{chunk-B2K2I2PQ.js → chunk-JJTEW3LB.js} +8 -6
- package/dist/chunk-JJTEW3LB.js.map +1 -0
- package/dist/{chunk-7OFVXQSM.js → chunk-JQ42ERH3.js} +2 -2
- package/dist/{chunk-SQACJQUY.js → chunk-KMED3WHH.js} +2 -2
- package/dist/{chunk-JIWPC53O.js → chunk-KX4WF3XR.js} +7 -7
- package/dist/{chunk-TMAQASMH.js → chunk-LFA2ACWM.js} +6 -6
- package/dist/{chunk-DTFACBDD.js → chunk-LQWNWPEO.js} +266 -40
- package/dist/chunk-LQWNWPEO.js.map +1 -0
- package/dist/{chunk-5LUXNIPA.js → chunk-MKHZFXGX.js} +2 -2
- package/dist/{chunk-NOB3VR5I.js → chunk-MOSPIQZF.js} +3 -3
- package/dist/chunk-MOSPIQZF.js.map +1 -0
- package/dist/{chunk-DGVCN7HB.js → chunk-MOTKVMGL.js} +2 -2
- package/dist/{chunk-5RAAS4II.js → chunk-MRE4WOHB.js} +6 -6
- package/dist/{chunk-SPVVXKDV.js → chunk-MZFSW3VF.js} +2 -2
- package/dist/{chunk-S36RENUJ.js → chunk-N6QKAQ4V.js} +4 -4
- package/dist/{chunk-ZQJKAZRD.js → chunk-ONWG3PI5.js} +10 -10
- package/dist/{chunk-HHXVHUGP.js → chunk-PDOG3O4N.js} +3 -1
- package/dist/{chunk-VPFAXLSX.js → chunk-PUDJV2PE.js} +7 -7
- package/dist/{chunk-EYDGX32Q.js → chunk-RECQAHC5.js} +2 -2
- package/dist/{chunk-ACNCTLFO.js → chunk-RHQ5DWJQ.js} +4 -4
- package/dist/{chunk-RUYTU2WJ.js → chunk-RRNIJ7YO.js} +7 -3
- package/dist/chunk-RRNIJ7YO.js.map +1 -0
- package/dist/{chunk-RSCRZGUW.js → chunk-RUN6ISZA.js} +2 -2
- package/dist/{chunk-7DUGVGUZ.js → chunk-RVSRZ57P.js} +2 -2
- package/dist/{chunk-64M7W2OQ.js → chunk-T7RSU35I.js} +3 -3
- package/dist/{chunk-JVRS73M6.js → chunk-U55AFVHY.js} +4 -4
- package/dist/{chunk-JVHHSKBJ.js → chunk-UH72CZAX.js} +2 -2
- package/dist/{chunk-6UTH3A76.js → chunk-UVZITL47.js} +1 -1
- package/dist/chunk-UVZITL47.js.map +1 -0
- package/dist/{chunk-C7ZKDWPI.js → chunk-VHPMBDOM.js} +5 -5
- package/dist/{chunk-TSFNTMMY.js → chunk-VIBM55WP.js} +4 -4
- package/dist/{chunk-OIVEYULL.js → chunk-VR53YKEJ.js} +5 -5
- package/dist/{chunk-KCWU6HNJ.js → chunk-X3SDPWEE.js} +6 -6
- package/dist/{chunk-7IZVI76D.js → chunk-XHIL6L5U.js} +9 -9
- package/dist/{chunk-BW5U6ENJ.js → chunk-XQ2CNRYH.js} +2 -2
- package/dist/{chunk-I3FLUAK7.js → chunk-XT2VC2OW.js} +2 -2
- package/dist/{chunk-VVRSPS67.js → chunk-XTRC6IOA.js} +2 -2
- package/dist/{chunk-ANS6OH55.js → chunk-YDXRZ5SD.js} +4 -4
- package/dist/{chunk-OTKWVUGB.js → chunk-YF4MPWTZ.js} +3 -3
- package/dist/chunk-ZG5B4RRH.js +9 -0
- package/dist/{chunk-GG4VKPAX.js → chunk-ZLQGKBBE.js} +2 -2
- package/dist/{cleanup-GFYEKCJS.js → cleanup-K2QJM4DG.js} +30 -30
- package/dist/{cli-QP3BQXVW.js → cli-PDSM3JJN.js} +3 -3
- package/dist/{config-W3AEOOUK.js → config-KXMYBBR2.js} +8 -8
- package/dist/{diff-G53V34KI.js → diff-YE4NJ3ZF.js} +9 -9
- package/dist/{digest-W4425I4J.js → digest-HHN5ZHPV.js} +8 -8
- package/dist/{fork-HTPJML6G.js → fork-WBVQ64NR.js} +27 -27
- package/dist/{history-TYKH3SKB.js → history-HDGGYOZK.js} +6 -6
- package/dist/{hook-F7WR5UIQ.js → hook-6QS5OPM6.js} +14 -14
- package/dist/{hydrate-HDZ62YMD.js → hydrate-LNFOMIY4.js} +7 -7
- package/dist/{init-Q5KJ666H.js → init-YKVXA7HB.js} +11 -11
- package/dist/{install-skills-C46BIZ5O.js → install-skills-O3X5SQP7.js} +5 -5
- package/dist/install-skills-bin.js +4 -4
- package/dist/{keep-MYHUCQWD.js → keep-IWCSOV3Y.js} +9 -9
- package/dist/{list-BGHRHYV6.js → list-6WP3AWGR.js} +6 -6
- package/dist/{move-OHV2DC4V.js → move-YD6J4BEI.js} +15 -15
- package/dist/{note-2I5WTKED.js → note-X2FOVB5E.js} +10 -10
- package/dist/{overlaps-PX4BD23H.js → overlaps-EXDYGDL6.js} +12 -12
- package/dist/{pin-UTMH2XUZ.js → pin-IOV7TXP2.js} +10 -10
- package/dist/{pr-PZCO36TY.js → pr-J6MQ37D2.js} +20 -20
- package/dist/{prune-APCNVQKK.js → prune-B47MCBAQ.js} +28 -28
- package/dist/{pty-host-Q5VNQKP2.js → pty-host-4YJMGVXO.js} +13 -13
- package/dist/{read-HSQNG4CA.js → read-JAIM2DYY.js} +9 -9
- package/dist/{recent-SNDWYLUH.js → recent-XNVY5UVF.js} +14 -14
- package/dist/{remove-5F5SP5TM.js → remove-SBTYBMEX.js} +29 -29
- package/dist/{restart-HWSAV22N.js → restart-QO7UT3BS.js} +9 -9
- package/dist/{resume-DBO7FTEQ.js → resume-SEN6WIHS.js} +14 -14
- package/dist/{review-36OJ5EES.js → review-VCMEMSGB.js} +5 -4
- package/dist/review-VCMEMSGB.js.map +1 -0
- package/dist/{review-now-CZPT7X4K.js → review-now-NXMBEJ5R.js} +3 -3
- package/dist/{run-QQARI2AH.js → run-RTYE6K3I.js} +6 -6
- package/dist/{screen-SXJEHTUY.js → screen-N2TLCEUU.js} +9 -9
- package/dist/{search-U25QWSX4.js → search-D5ECXHUE.js} +6 -6
- package/dist/{section-TCH4DXE7.js → section-4L3EIRIA.js} +10 -10
- package/dist/{send-ZCKMC65W.js → send-MGIL5V3H.js} +10 -10
- package/dist/{sessions-7PKZZ4NG.js → sessions-2OK2D7NT.js} +24 -24
- package/dist/{snooze-JBPRRYAF.js → snooze-IYRTDL3T.js} +9 -9
- package/dist/{start-L6AWLRVP.js → start-5LZ7YZGK.js} +9 -9
- package/dist/{state-JHCC5CAR.js → state-LDDRQFWX.js} +6 -4
- package/dist/{state-JHCC5CAR.js.map → state-LDDRQFWX.js.map} +1 -1
- package/dist/{status-WWRZLDGT.js → status-AXM4QWC5.js} +10 -10
- package/dist/{statusline-MIFW47UA.js → statusline-OU4LKQQD.js} +2 -2
- package/dist/{stop-WHUBU5JZ.js → stop-RB5PF5I6.js} +9 -9
- package/dist/{sync-AVDUHYPQ.js → sync-RRDTJ7S6.js} +28 -28
- package/dist/{time-MIJM6SM6.js → time-INJY7DSM.js} +11 -11
- package/dist/{time-actions-Y5USDGSE.js → time-actions-KYFYV7F2.js} +3 -3
- package/dist/{timesheet-AVRH56TG.js → timesheet-TPXVMNSL.js} +12 -12
- package/dist/{todo-O6Y5MEQR.js → todo-54OJY5VV.js} +3 -3
- package/dist/{tree-7YD6DL3H.js → tree-6OE7SYA2.js} +27 -27
- package/dist/{update-XGT2DFTT.js → update-YMDG7O3M.js} +15 -15
- package/dist/{usage-7NM6L2MR.js → usage-U3VFDLZD.js} +9 -9
- package/dist/{version-V7IM2UL4.js → version-B5PGYRJS.js} +3 -3
- package/dist/{wait-HCIFDLNX.js → wait-G7OYEH7U.js} +10 -10
- package/dist/wd-bin.js +2 -2
- package/dist/web/assets/{PtyView-R0tQXVW8.js → PtyView-DC7FyzKJ.js} +2 -2
- package/dist/web/assets/{PtyView-R0tQXVW8.js.map → PtyView-DC7FyzKJ.js.map} +1 -1
- package/dist/web/assets/{index-QlOaahcZ.css → index-BGsdgBN7.css} +1 -1
- package/dist/web/assets/index-qy9AXQPg.js +126 -0
- package/dist/web/assets/index-qy9AXQPg.js.map +1 -0
- package/dist/web/index.html +2 -2
- package/dist/{web-AXS3EMZ3.js → web-E657YMOA.js} +464 -218
- package/dist/web-E657YMOA.js.map +1 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/dist/account-EAVYWOKR.js.map +0 -1
- package/dist/chunk-6UTH3A76.js.map +0 -1
- package/dist/chunk-B2K2I2PQ.js.map +0 -1
- package/dist/chunk-DROLR3NJ.js.map +0 -1
- package/dist/chunk-DTFACBDD.js.map +0 -1
- package/dist/chunk-FC7RECDP.js +0 -9
- package/dist/chunk-IUWMT6PF.js.map +0 -1
- package/dist/chunk-NOB3VR5I.js.map +0 -1
- package/dist/chunk-RUYTU2WJ.js.map +0 -1
- package/dist/review-36OJ5EES.js.map +0 -1
- package/dist/web/assets/index-Beb-xh6z.js +0 -126
- package/dist/web/assets/index-Beb-xh6z.js.map +0 -1
- package/dist/web-AXS3EMZ3.js.map +0 -1
- /package/dist/{add-repo-3THEK6UG.js.map → add-repo-6JP5XWPF.js.map} +0 -0
- /package/dist/{answer-3CJQWBGY.js.map → answer-H3PTZZAX.js.map} +0 -0
- /package/dist/{attach-FQSBZXI7.js.map → attach-STMGUOI5.js.map} +0 -0
- /package/dist/{block-NGD2KNTU.js.map → block-XJKNFMLV.js.map} +0 -0
- /package/dist/{broadcast-NLASZGWR.js.map → broadcast-RTFVOYTS.js.map} +0 -0
- /package/dist/{catchup-WJPWOGVI.js.map → catchup-4ANFB24Y.js.map} +0 -0
- /package/dist/{chunk-TFNDOWYP.js.map → chunk-2KGZRG43.js.map} +0 -0
- /package/dist/{chunk-H4TMS567.js.map → chunk-2KL5MJIJ.js.map} +0 -0
- /package/dist/{chunk-I7AEQDG7.js.map → chunk-2QIX5XDL.js.map} +0 -0
- /package/dist/{chunk-33XSEAHO.js.map → chunk-2Y2ARDXI.js.map} +0 -0
- /package/dist/{chunk-JNAYPBAB.js.map → chunk-34DFG4E5.js.map} +0 -0
- /package/dist/{chunk-UQJQZ526.js.map → chunk-3DZR5LFG.js.map} +0 -0
- /package/dist/{chunk-TL7K3XUY.js.map → chunk-3H5ZMSJT.js.map} +0 -0
- /package/dist/{chunk-NUPLJJOS.js.map → chunk-4IUSJXOY.js.map} +0 -0
- /package/dist/{chunk-CVMO75V5.js.map → chunk-5DY4YW36.js.map} +0 -0
- /package/dist/{chunk-3O6QFWZ6.js.map → chunk-6GNGPYL6.js.map} +0 -0
- /package/dist/{chunk-HORDAO4Z.js.map → chunk-7JNYJ6RL.js.map} +0 -0
- /package/dist/{chunk-3257QPVM.js.map → chunk-B7Q6K5EM.js.map} +0 -0
- /package/dist/{chunk-45MDVVW7.js.map → chunk-BLNWKPL7.js.map} +0 -0
- /package/dist/{chunk-CS2EINZJ.js.map → chunk-BVBGCCXD.js.map} +0 -0
- /package/dist/{chunk-IREGW23T.js.map → chunk-CP6W4MTM.js.map} +0 -0
- /package/dist/{chunk-RPWEOEA3.js.map → chunk-CWQQCJKO.js.map} +0 -0
- /package/dist/{chunk-DHOC2S2L.js.map → chunk-D4FYTREI.js.map} +0 -0
- /package/dist/{chunk-3KVOYBM4.js.map → chunk-EL7CYYJF.js.map} +0 -0
- /package/dist/{chunk-BHJ73OPQ.js.map → chunk-FVGDOG5T.js.map} +0 -0
- /package/dist/{chunk-7FNJ6A2U.js.map → chunk-G5AAYK56.js.map} +0 -0
- /package/dist/{chunk-C72Y42VC.js.map → chunk-GBNEIQLL.js.map} +0 -0
- /package/dist/{chunk-N5PQHNYK.js.map → chunk-GYR7P3V2.js.map} +0 -0
- /package/dist/{chunk-FM6VLU4T.js.map → chunk-HVZAGQUV.js.map} +0 -0
- /package/dist/{chunk-DS2CKYQ4.js.map → chunk-IIIAV6OD.js.map} +0 -0
- /package/dist/{chunk-PGGNMC34.js.map → chunk-ILF3BNIX.js.map} +0 -0
- /package/dist/{chunk-EJSGPLXO.js.map → chunk-J4JORJBH.js.map} +0 -0
- /package/dist/{chunk-7OFVXQSM.js.map → chunk-JQ42ERH3.js.map} +0 -0
- /package/dist/{chunk-SQACJQUY.js.map → chunk-KMED3WHH.js.map} +0 -0
- /package/dist/{chunk-JIWPC53O.js.map → chunk-KX4WF3XR.js.map} +0 -0
- /package/dist/{chunk-TMAQASMH.js.map → chunk-LFA2ACWM.js.map} +0 -0
- /package/dist/{chunk-5LUXNIPA.js.map → chunk-MKHZFXGX.js.map} +0 -0
- /package/dist/{chunk-DGVCN7HB.js.map → chunk-MOTKVMGL.js.map} +0 -0
- /package/dist/{chunk-5RAAS4II.js.map → chunk-MRE4WOHB.js.map} +0 -0
- /package/dist/{chunk-SPVVXKDV.js.map → chunk-MZFSW3VF.js.map} +0 -0
- /package/dist/{chunk-S36RENUJ.js.map → chunk-N6QKAQ4V.js.map} +0 -0
- /package/dist/{chunk-ZQJKAZRD.js.map → chunk-ONWG3PI5.js.map} +0 -0
- /package/dist/{chunk-HHXVHUGP.js.map → chunk-PDOG3O4N.js.map} +0 -0
- /package/dist/{chunk-VPFAXLSX.js.map → chunk-PUDJV2PE.js.map} +0 -0
- /package/dist/{chunk-EYDGX32Q.js.map → chunk-RECQAHC5.js.map} +0 -0
- /package/dist/{chunk-ACNCTLFO.js.map → chunk-RHQ5DWJQ.js.map} +0 -0
- /package/dist/{chunk-RSCRZGUW.js.map → chunk-RUN6ISZA.js.map} +0 -0
- /package/dist/{chunk-7DUGVGUZ.js.map → chunk-RVSRZ57P.js.map} +0 -0
- /package/dist/{chunk-64M7W2OQ.js.map → chunk-T7RSU35I.js.map} +0 -0
- /package/dist/{chunk-JVRS73M6.js.map → chunk-U55AFVHY.js.map} +0 -0
- /package/dist/{chunk-JVHHSKBJ.js.map → chunk-UH72CZAX.js.map} +0 -0
- /package/dist/{chunk-C7ZKDWPI.js.map → chunk-VHPMBDOM.js.map} +0 -0
- /package/dist/{chunk-TSFNTMMY.js.map → chunk-VIBM55WP.js.map} +0 -0
- /package/dist/{chunk-OIVEYULL.js.map → chunk-VR53YKEJ.js.map} +0 -0
- /package/dist/{chunk-KCWU6HNJ.js.map → chunk-X3SDPWEE.js.map} +0 -0
- /package/dist/{chunk-7IZVI76D.js.map → chunk-XHIL6L5U.js.map} +0 -0
- /package/dist/{chunk-BW5U6ENJ.js.map → chunk-XQ2CNRYH.js.map} +0 -0
- /package/dist/{chunk-I3FLUAK7.js.map → chunk-XT2VC2OW.js.map} +0 -0
- /package/dist/{chunk-VVRSPS67.js.map → chunk-XTRC6IOA.js.map} +0 -0
- /package/dist/{chunk-ANS6OH55.js.map → chunk-YDXRZ5SD.js.map} +0 -0
- /package/dist/{chunk-OTKWVUGB.js.map → chunk-YF4MPWTZ.js.map} +0 -0
- /package/dist/{chunk-FC7RECDP.js.map → chunk-ZG5B4RRH.js.map} +0 -0
- /package/dist/{chunk-GG4VKPAX.js.map → chunk-ZLQGKBBE.js.map} +0 -0
- /package/dist/{cleanup-GFYEKCJS.js.map → cleanup-K2QJM4DG.js.map} +0 -0
- /package/dist/{cli-QP3BQXVW.js.map → cli-PDSM3JJN.js.map} +0 -0
- /package/dist/{config-W3AEOOUK.js.map → config-KXMYBBR2.js.map} +0 -0
- /package/dist/{diff-G53V34KI.js.map → diff-YE4NJ3ZF.js.map} +0 -0
- /package/dist/{digest-W4425I4J.js.map → digest-HHN5ZHPV.js.map} +0 -0
- /package/dist/{fork-HTPJML6G.js.map → fork-WBVQ64NR.js.map} +0 -0
- /package/dist/{history-TYKH3SKB.js.map → history-HDGGYOZK.js.map} +0 -0
- /package/dist/{hook-F7WR5UIQ.js.map → hook-6QS5OPM6.js.map} +0 -0
- /package/dist/{hydrate-HDZ62YMD.js.map → hydrate-LNFOMIY4.js.map} +0 -0
- /package/dist/{init-Q5KJ666H.js.map → init-YKVXA7HB.js.map} +0 -0
- /package/dist/{install-skills-C46BIZ5O.js.map → install-skills-O3X5SQP7.js.map} +0 -0
- /package/dist/{keep-MYHUCQWD.js.map → keep-IWCSOV3Y.js.map} +0 -0
- /package/dist/{list-BGHRHYV6.js.map → list-6WP3AWGR.js.map} +0 -0
- /package/dist/{move-OHV2DC4V.js.map → move-YD6J4BEI.js.map} +0 -0
- /package/dist/{note-2I5WTKED.js.map → note-X2FOVB5E.js.map} +0 -0
- /package/dist/{overlaps-PX4BD23H.js.map → overlaps-EXDYGDL6.js.map} +0 -0
- /package/dist/{pin-UTMH2XUZ.js.map → pin-IOV7TXP2.js.map} +0 -0
- /package/dist/{pr-PZCO36TY.js.map → pr-J6MQ37D2.js.map} +0 -0
- /package/dist/{prune-APCNVQKK.js.map → prune-B47MCBAQ.js.map} +0 -0
- /package/dist/{pty-host-Q5VNQKP2.js.map → pty-host-4YJMGVXO.js.map} +0 -0
- /package/dist/{read-HSQNG4CA.js.map → read-JAIM2DYY.js.map} +0 -0
- /package/dist/{recent-SNDWYLUH.js.map → recent-XNVY5UVF.js.map} +0 -0
- /package/dist/{remove-5F5SP5TM.js.map → remove-SBTYBMEX.js.map} +0 -0
- /package/dist/{restart-HWSAV22N.js.map → restart-QO7UT3BS.js.map} +0 -0
- /package/dist/{resume-DBO7FTEQ.js.map → resume-SEN6WIHS.js.map} +0 -0
- /package/dist/{review-now-CZPT7X4K.js.map → review-now-NXMBEJ5R.js.map} +0 -0
- /package/dist/{run-QQARI2AH.js.map → run-RTYE6K3I.js.map} +0 -0
- /package/dist/{screen-SXJEHTUY.js.map → screen-N2TLCEUU.js.map} +0 -0
- /package/dist/{search-U25QWSX4.js.map → search-D5ECXHUE.js.map} +0 -0
- /package/dist/{section-TCH4DXE7.js.map → section-4L3EIRIA.js.map} +0 -0
- /package/dist/{send-ZCKMC65W.js.map → send-MGIL5V3H.js.map} +0 -0
- /package/dist/{sessions-7PKZZ4NG.js.map → sessions-2OK2D7NT.js.map} +0 -0
- /package/dist/{snooze-JBPRRYAF.js.map → snooze-IYRTDL3T.js.map} +0 -0
- /package/dist/{start-L6AWLRVP.js.map → start-5LZ7YZGK.js.map} +0 -0
- /package/dist/{status-WWRZLDGT.js.map → status-AXM4QWC5.js.map} +0 -0
- /package/dist/{statusline-MIFW47UA.js.map → statusline-OU4LKQQD.js.map} +0 -0
- /package/dist/{stop-WHUBU5JZ.js.map → stop-RB5PF5I6.js.map} +0 -0
- /package/dist/{sync-AVDUHYPQ.js.map → sync-RRDTJ7S6.js.map} +0 -0
- /package/dist/{time-MIJM6SM6.js.map → time-INJY7DSM.js.map} +0 -0
- /package/dist/{time-actions-Y5USDGSE.js.map → time-actions-KYFYV7F2.js.map} +0 -0
- /package/dist/{timesheet-AVRH56TG.js.map → timesheet-TPXVMNSL.js.map} +0 -0
- /package/dist/{todo-O6Y5MEQR.js.map → todo-54OJY5VV.js.map} +0 -0
- /package/dist/{tree-7YD6DL3H.js.map → tree-6OE7SYA2.js.map} +0 -0
- /package/dist/{update-XGT2DFTT.js.map → update-YMDG7O3M.js.map} +0 -0
- /package/dist/{usage-7NM6L2MR.js.map → usage-U3VFDLZD.js.map} +0 -0
- /package/dist/{version-V7IM2UL4.js.map → version-B5PGYRJS.js.map} +0 -0
- /package/dist/{wait-HCIFDLNX.js.map → wait-G7OYEH7U.js.map} +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
ensureAgentPath,
|
|
4
4
|
restartHost
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-BLNWKPL7.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-
|
|
19
|
+
} from "./chunk-D4FYTREI.js";
|
|
20
20
|
import {
|
|
21
21
|
addTask,
|
|
22
22
|
completeTask,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
getTasks,
|
|
25
25
|
removeTask,
|
|
26
26
|
uncompleteTask
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-JQ42ERH3.js";
|
|
28
28
|
import {
|
|
29
29
|
commentInputSchema,
|
|
30
30
|
detectParentBranch,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
serveSpa,
|
|
39
39
|
sessionBaseForPath,
|
|
40
40
|
submitReviewSchema
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-HVZAGQUV.js";
|
|
42
42
|
import {
|
|
43
43
|
announceChange,
|
|
44
44
|
createArchivedRows,
|
|
@@ -53,31 +53,31 @@ import {
|
|
|
53
53
|
stageSeenKey,
|
|
54
54
|
storeHolding,
|
|
55
55
|
withRestoring
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-XHIL6L5U.js";
|
|
57
57
|
import {
|
|
58
58
|
createDigestSource
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-VHPMBDOM.js";
|
|
60
60
|
import {
|
|
61
61
|
createBuildFoldersJob,
|
|
62
62
|
defaultBranchTidyDeps,
|
|
63
63
|
defaultBuildFoldersDeps,
|
|
64
64
|
deleteMergedBranches,
|
|
65
65
|
findMergedBranches
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-KX4WF3XR.js";
|
|
67
67
|
import {
|
|
68
68
|
defaultCleanupDeps
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-X3SDPWEE.js";
|
|
70
70
|
import {
|
|
71
71
|
DiffStatCache,
|
|
72
72
|
findOverlaps,
|
|
73
73
|
wantsDiffStat
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-XT2VC2OW.js";
|
|
75
75
|
import {
|
|
76
76
|
MAX_NOTE_CHARS,
|
|
77
77
|
readNote,
|
|
78
78
|
saveNote,
|
|
79
79
|
sessionsWithNotes
|
|
80
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-2Y2ARDXI.js";
|
|
81
81
|
import {
|
|
82
82
|
addBlocker,
|
|
83
83
|
allBlocks,
|
|
@@ -89,13 +89,13 @@ import {
|
|
|
89
89
|
removeBlocker,
|
|
90
90
|
sweepBlocks,
|
|
91
91
|
unblockedPrompt
|
|
92
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-VIBM55WP.js";
|
|
93
93
|
import {
|
|
94
94
|
jiraWorklogPoster,
|
|
95
95
|
logWorkDay,
|
|
96
96
|
loggedDays,
|
|
97
97
|
worklogSettings
|
|
98
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-ZLQGKBBE.js";
|
|
99
99
|
import {
|
|
100
100
|
accountOverview,
|
|
101
101
|
accountSkillsNote,
|
|
@@ -107,16 +107,16 @@ import {
|
|
|
107
107
|
removeAgentAccount,
|
|
108
108
|
setDefaultAgentAccount,
|
|
109
109
|
switchRefusal
|
|
110
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-2KL5MJIJ.js";
|
|
111
111
|
import {
|
|
112
112
|
buildUsage,
|
|
113
113
|
realUsageDeps,
|
|
114
114
|
setupAgentUsage
|
|
115
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-FVGDOG5T.js";
|
|
116
116
|
import {
|
|
117
117
|
sessionWorkTime
|
|
118
|
-
} from "./chunk-
|
|
119
|
-
import "./chunk-
|
|
118
|
+
} from "./chunk-YF4MPWTZ.js";
|
|
119
|
+
import "./chunk-UVZITL47.js";
|
|
120
120
|
import {
|
|
121
121
|
sendToSession
|
|
122
122
|
} from "./chunk-KWHHB737.js";
|
|
@@ -124,11 +124,11 @@ import {
|
|
|
124
124
|
defaultForkDeps,
|
|
125
125
|
forkSession,
|
|
126
126
|
startSessionWithPrompt
|
|
127
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-PUDJV2PE.js";
|
|
128
128
|
import {
|
|
129
129
|
addRepoRefusal,
|
|
130
130
|
addedRepoNote
|
|
131
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-MKHZFXGX.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-
|
|
147
|
+
} from "./chunk-VR53YKEJ.js";
|
|
148
148
|
import {
|
|
149
149
|
askCatchUp,
|
|
150
150
|
cachedCatchUp,
|
|
151
151
|
catchUp,
|
|
152
152
|
catchUpFacts,
|
|
153
153
|
forgetCatchUp
|
|
154
|
-
} from "./chunk-
|
|
154
|
+
} from "./chunk-2KGZRG43.js";
|
|
155
155
|
import {
|
|
156
156
|
applyPlacePatch,
|
|
157
157
|
applySectionOp,
|
|
@@ -160,7 +160,7 @@ import {
|
|
|
160
160
|
cleanSectionOp,
|
|
161
161
|
placeSession,
|
|
162
162
|
readRailLayout
|
|
163
|
-
} from "./chunk-
|
|
163
|
+
} from "./chunk-MOTKVMGL.js";
|
|
164
164
|
import {
|
|
165
165
|
DEFAULT_CATCH_UP_DAYS,
|
|
166
166
|
addDays,
|
|
@@ -185,7 +185,7 @@ import {
|
|
|
185
185
|
tempoSetup,
|
|
186
186
|
timeRange,
|
|
187
187
|
updateDay
|
|
188
|
-
} from "./chunk-
|
|
188
|
+
} from "./chunk-XTRC6IOA.js";
|
|
189
189
|
import {
|
|
190
190
|
DISCUSSION_OPEN_MIN_MS,
|
|
191
191
|
LEFT_OVER_SUBMIT,
|
|
@@ -227,7 +227,7 @@ import {
|
|
|
227
227
|
withClaim,
|
|
228
228
|
withFixClaim,
|
|
229
229
|
withoutFixClaim
|
|
230
|
-
} from "./chunk-
|
|
230
|
+
} from "./chunk-HUD4JLK3.js";
|
|
231
231
|
import {
|
|
232
232
|
asData,
|
|
233
233
|
asDataBlock
|
|
@@ -248,7 +248,7 @@ import {
|
|
|
248
248
|
checkTools,
|
|
249
249
|
saveFolders,
|
|
250
250
|
setupState
|
|
251
|
-
} from "./chunk-
|
|
251
|
+
} from "./chunk-3DZR5LFG.js";
|
|
252
252
|
import {
|
|
253
253
|
RepoAdminError,
|
|
254
254
|
deleteGroup,
|
|
@@ -260,7 +260,7 @@ import {
|
|
|
260
260
|
setRepoIgnored,
|
|
261
261
|
setReviewMode,
|
|
262
262
|
setScanRoot
|
|
263
|
-
} from "./chunk-
|
|
263
|
+
} from "./chunk-XQ2CNRYH.js";
|
|
264
264
|
import {
|
|
265
265
|
freeLeftovers,
|
|
266
266
|
leftoversOf,
|
|
@@ -269,14 +269,14 @@ import {
|
|
|
269
269
|
parsePrRef,
|
|
270
270
|
resolvePrToStart,
|
|
271
271
|
workOnPrPrompt
|
|
272
|
-
} from "./chunk-
|
|
272
|
+
} from "./chunk-34DFG4E5.js";
|
|
273
273
|
import {
|
|
274
274
|
legacyUnsafeCheck
|
|
275
|
-
} from "./chunk-
|
|
275
|
+
} from "./chunk-GBNEIQLL.js";
|
|
276
276
|
import {
|
|
277
277
|
agentsBySession,
|
|
278
278
|
summarizeAgents
|
|
279
|
-
} from "./chunk-
|
|
279
|
+
} from "./chunk-CP6W4MTM.js";
|
|
280
280
|
import {
|
|
281
281
|
howToLift
|
|
282
282
|
} from "./chunk-FZHFD2AY.js";
|
|
@@ -286,15 +286,15 @@ import {
|
|
|
286
286
|
import {
|
|
287
287
|
editorArgs,
|
|
288
288
|
openUrl
|
|
289
|
-
} from "./chunk-
|
|
289
|
+
} from "./chunk-EL7CYYJF.js";
|
|
290
290
|
import {
|
|
291
291
|
removeWorktreeInChild
|
|
292
|
-
} from "./chunk-
|
|
292
|
+
} from "./chunk-KMED3WHH.js";
|
|
293
293
|
import {
|
|
294
294
|
archiveMergedSession,
|
|
295
295
|
archiveWaiting,
|
|
296
296
|
defaultArchiveDeps
|
|
297
|
-
} from "./chunk-
|
|
297
|
+
} from "./chunk-4IUSJXOY.js";
|
|
298
298
|
import {
|
|
299
299
|
cleanupVerdict,
|
|
300
300
|
createCleanupJob
|
|
@@ -314,7 +314,7 @@ import {
|
|
|
314
314
|
retireResolvedReplies,
|
|
315
315
|
sessionRepoRefs,
|
|
316
316
|
withThreadContext
|
|
317
|
-
} from "./chunk-
|
|
317
|
+
} from "./chunk-MRE4WOHB.js";
|
|
318
318
|
import {
|
|
319
319
|
DEFAULT_TRUSTED_BOTS,
|
|
320
320
|
createCiStore,
|
|
@@ -324,23 +324,23 @@ import {
|
|
|
324
324
|
openThreadsOf,
|
|
325
325
|
reviewMessage,
|
|
326
326
|
subAgentHint
|
|
327
|
-
} from "./chunk-
|
|
327
|
+
} from "./chunk-YDXRZ5SD.js";
|
|
328
328
|
import {
|
|
329
329
|
sessionStatusView,
|
|
330
330
|
shownState
|
|
331
|
-
} from "./chunk-
|
|
331
|
+
} from "./chunk-RHQ5DWJQ.js";
|
|
332
332
|
import {
|
|
333
333
|
internalReadOnly,
|
|
334
334
|
runInternal,
|
|
335
335
|
runInternalReadOnly,
|
|
336
336
|
summarizeCheckpoint,
|
|
337
337
|
throttleTrailing
|
|
338
|
-
} from "./chunk-
|
|
338
|
+
} from "./chunk-JJTEW3LB.js";
|
|
339
339
|
import {
|
|
340
340
|
computeDiff,
|
|
341
341
|
computeRangeDiff,
|
|
342
342
|
parseGitDiff
|
|
343
|
-
} from "./chunk-
|
|
343
|
+
} from "./chunk-5DY4YW36.js";
|
|
344
344
|
import {
|
|
345
345
|
commandWords,
|
|
346
346
|
describeProcess,
|
|
@@ -357,7 +357,7 @@ import {
|
|
|
357
357
|
keyedQueue,
|
|
358
358
|
oneAtATime,
|
|
359
359
|
runWorkChild
|
|
360
|
-
} from "./chunk-
|
|
360
|
+
} from "./chunk-CWQQCJKO.js";
|
|
361
361
|
import {
|
|
362
362
|
configurePtyPool,
|
|
363
363
|
detachPtyPool,
|
|
@@ -381,22 +381,22 @@ import {
|
|
|
381
381
|
syncPtyPool,
|
|
382
382
|
terminalTicketUrl,
|
|
383
383
|
writeToPty
|
|
384
|
-
} from "./chunk-
|
|
385
|
-
import "./chunk-
|
|
384
|
+
} from "./chunk-ONWG3PI5.js";
|
|
385
|
+
import "./chunk-G5AAYK56.js";
|
|
386
386
|
import {
|
|
387
387
|
disposeAllWatchers,
|
|
388
388
|
disposeSessionWatcher,
|
|
389
389
|
findSession as findSession2,
|
|
390
390
|
subscribeSession
|
|
391
|
-
} from "./chunk-
|
|
392
|
-
import "./chunk-
|
|
393
|
-
import "./chunk-
|
|
391
|
+
} from "./chunk-6GNGPYL6.js";
|
|
392
|
+
import "./chunk-IIIAV6OD.js";
|
|
393
|
+
import "./chunk-RECQAHC5.js";
|
|
394
394
|
import {
|
|
395
395
|
teardownWorktree,
|
|
396
396
|
toBaseSpec,
|
|
397
397
|
wouldRefuseRemoval
|
|
398
|
-
} from "./chunk-
|
|
399
|
-
import "./chunk-
|
|
398
|
+
} from "./chunk-LFA2ACWM.js";
|
|
399
|
+
import "./chunk-UH72CZAX.js";
|
|
400
400
|
import {
|
|
401
401
|
isWorktreeFolder
|
|
402
402
|
} from "./chunk-LSZ6HI3U.js";
|
|
@@ -405,18 +405,18 @@ import {
|
|
|
405
405
|
assistantDir,
|
|
406
406
|
describeView,
|
|
407
407
|
writeAssistantContext
|
|
408
|
-
} from "./chunk-
|
|
408
|
+
} from "./chunk-MZFSW3VF.js";
|
|
409
409
|
import "./chunk-7E5XPDKX.js";
|
|
410
|
-
import "./chunk-
|
|
410
|
+
import "./chunk-RUN6ISZA.js";
|
|
411
411
|
import {
|
|
412
412
|
NOTE_NUDGE,
|
|
413
413
|
findSessionForCwd,
|
|
414
414
|
readPendingForSession,
|
|
415
415
|
readPendingForWorktree
|
|
416
|
-
} from "./chunk-
|
|
416
|
+
} from "./chunk-ILF3BNIX.js";
|
|
417
417
|
import {
|
|
418
418
|
getCommentFileStore
|
|
419
|
-
} from "./chunk-
|
|
419
|
+
} from "./chunk-RVSRZ57P.js";
|
|
420
420
|
import "./chunk-ZSHWP2VS.js";
|
|
421
421
|
import {
|
|
422
422
|
createCommentStore
|
|
@@ -433,17 +433,17 @@ import {
|
|
|
433
433
|
stageInputOf,
|
|
434
434
|
withRequiredChecks,
|
|
435
435
|
workElsewhere
|
|
436
|
-
} from "./chunk-
|
|
436
|
+
} from "./chunk-3H5ZMSJT.js";
|
|
437
437
|
import {
|
|
438
438
|
createSessionBranches
|
|
439
|
-
} from "./chunk-
|
|
439
|
+
} from "./chunk-J4JORJBH.js";
|
|
440
440
|
import {
|
|
441
441
|
defaultHost,
|
|
442
442
|
hostById,
|
|
443
443
|
hostForRepo,
|
|
444
444
|
hostOfPrUrl,
|
|
445
445
|
originHostname
|
|
446
|
-
} from "./chunk-
|
|
446
|
+
} from "./chunk-U55AFVHY.js";
|
|
447
447
|
import {
|
|
448
448
|
MAX_THREAD_BODY
|
|
449
449
|
} from "./chunk-FGPXMAYU.js";
|
|
@@ -456,7 +456,7 @@ import {
|
|
|
456
456
|
readSessionBranches,
|
|
457
457
|
repoNameOf,
|
|
458
458
|
wasPushed
|
|
459
|
-
} from "./chunk-
|
|
459
|
+
} from "./chunk-T7RSU35I.js";
|
|
460
460
|
import {
|
|
461
461
|
enrollProblem,
|
|
462
462
|
groupProblem,
|
|
@@ -557,7 +557,7 @@ import {
|
|
|
557
557
|
updateCheckpoint,
|
|
558
558
|
whileRestoring,
|
|
559
559
|
writeArchiveRecord
|
|
560
|
-
} from "./chunk-
|
|
560
|
+
} from "./chunk-MOSPIQZF.js";
|
|
561
561
|
import {
|
|
562
562
|
dayKey
|
|
563
563
|
} from "./chunk-NEJVK5CF.js";
|
|
@@ -568,7 +568,7 @@ import {
|
|
|
568
568
|
sessionIdFor,
|
|
569
569
|
tx,
|
|
570
570
|
withDb
|
|
571
|
-
} from "./chunk-
|
|
571
|
+
} from "./chunk-RRNIJ7YO.js";
|
|
572
572
|
import {
|
|
573
573
|
packageRoot
|
|
574
574
|
} from "./chunk-LNHSBM4L.js";
|
|
@@ -586,13 +586,14 @@ import {
|
|
|
586
586
|
lineTimeOf,
|
|
587
587
|
liveAgents,
|
|
588
588
|
ownsBranch,
|
|
589
|
+
projectList,
|
|
589
590
|
readJsonlSince,
|
|
590
591
|
refShaFromFiles,
|
|
591
592
|
workingBranch
|
|
592
|
-
} from "./chunk-
|
|
593
|
+
} from "./chunk-LQWNWPEO.js";
|
|
593
594
|
import {
|
|
594
595
|
VERSION
|
|
595
|
-
} from "./chunk-
|
|
596
|
+
} from "./chunk-ZG5B4RRH.js";
|
|
596
597
|
import {
|
|
597
598
|
resolveProjectTarget
|
|
598
599
|
} from "./chunk-7UXV4X2Y.js";
|
|
@@ -617,11 +618,11 @@ import {
|
|
|
617
618
|
accountOfLoginId
|
|
618
619
|
} from "./chunk-SJBEIYLK.js";
|
|
619
620
|
import "./chunk-AYHDJMMJ.js";
|
|
620
|
-
import "./chunk-
|
|
621
|
+
import "./chunk-DQWZDA2E.js";
|
|
621
622
|
import {
|
|
622
623
|
DEFAULT_ACCOUNT_NAME,
|
|
623
624
|
accountNameProblem
|
|
624
|
-
} from "./chunk-
|
|
625
|
+
} from "./chunk-PDOG3O4N.js";
|
|
625
626
|
import {
|
|
626
627
|
DEFAULT_ACCOUNT,
|
|
627
628
|
DEFAULT_PROMPTS,
|
|
@@ -1347,18 +1348,24 @@ function withFocusNotes(main, passes, paths) {
|
|
|
1347
1348
|
}
|
|
1348
1349
|
return added ? JSON.stringify({ ...o, notes }) : main;
|
|
1349
1350
|
}
|
|
1351
|
+
function pickChanges(diff, repo) {
|
|
1352
|
+
const changed = diff.repos.filter((r) => r.files.length > 0);
|
|
1353
|
+
const picked = repo === void 0 ? changed : changed.filter((r) => r.name === repo);
|
|
1354
|
+
const together = picked.length > 1;
|
|
1355
|
+
const all = together ? picked.flatMap((r) => r.files.map((f) => inRepo(r.name, f))) : picked[0]?.files ?? [];
|
|
1356
|
+
return { repos: changed.map((r) => r.name), picked, together, all };
|
|
1357
|
+
}
|
|
1358
|
+
function localSignature(diff, repo) {
|
|
1359
|
+
return diffSignature(pickChanges(diff, repo).all);
|
|
1360
|
+
}
|
|
1350
1361
|
async function prepareLocalReview(session, repo, deps) {
|
|
1351
1362
|
const diff = deps.diff(session);
|
|
1352
|
-
const changed = diff.repos.filter((r) => r.files.length > 0);
|
|
1353
|
-
const repos = changed.map((r) => r.name);
|
|
1354
1363
|
if (repo !== void 0 && !diff.repos.some((r) => r.name === repo)) throw new Error(`${repo} is not one of this session's repos`);
|
|
1355
|
-
const
|
|
1364
|
+
const { repos, picked, together, all } = pickChanges(diff, repo);
|
|
1356
1365
|
if (picked.length === 0)
|
|
1357
1366
|
throw new Error(
|
|
1358
1367
|
repo ? `Nothing has changed in ${repo} since ${diff.resolvedBase}.` : `Nothing has changed on this branch since ${diff.resolvedBase}.`
|
|
1359
1368
|
);
|
|
1360
|
-
const together = picked.length > 1;
|
|
1361
|
-
const all = together ? picked.flatMap((r) => r.files.map((f) => inRepo(r.name, f))) : picked[0].files;
|
|
1362
1369
|
const { files, ignored } = splitIgnored(all);
|
|
1363
1370
|
const extras = { whitespaceOnly: /* @__PURE__ */ new Set(), generated: /* @__PURE__ */ new Set() };
|
|
1364
1371
|
const rules = deps.rules?.();
|
|
@@ -1366,15 +1373,28 @@ async function prepareLocalReview(session, repo, deps) {
|
|
|
1366
1373
|
const kinds = kindsOf(files, extras, rules);
|
|
1367
1374
|
const agent = deps.agent;
|
|
1368
1375
|
const prompt = agent ? reviewPrompt(meta, files, kinds) : null;
|
|
1369
|
-
const
|
|
1376
|
+
const tree = prompt && agent && deps.inTree ? await deps.inTree(
|
|
1377
|
+
session,
|
|
1378
|
+
picked.map((r) => r.name)
|
|
1379
|
+
).catch((err) => ({ why: err.message })) : null;
|
|
1380
|
+
const inTree = tree && "ask" in tree ? tree : null;
|
|
1381
|
+
let fellBack = 0;
|
|
1382
|
+
let passesAsked = 0;
|
|
1383
|
+
const ask = async (opts = {}) => {
|
|
1384
|
+
if (!agent) return null;
|
|
1385
|
+
passesAsked++;
|
|
1386
|
+
if (inTree) {
|
|
1387
|
+
const there = reviewPrompt(meta, files, kinds, { ...opts, checkout: inTree.lines });
|
|
1388
|
+
const answer2 = there ? await inTree.ask(there).catch(() => null) : null;
|
|
1389
|
+
if (answer2) return answer2;
|
|
1390
|
+
fellBack++;
|
|
1391
|
+
}
|
|
1392
|
+
const plain = reviewPrompt(meta, files, kinds, opts);
|
|
1393
|
+
return plain ? agent(plain).catch(() => null) : null;
|
|
1394
|
+
};
|
|
1370
1395
|
const asked = promptPaths(kinds);
|
|
1371
1396
|
const focused = together && prompt ? picked.map((r) => r.name).filter((name) => asked.some((p) => p.startsWith(`${name}/`))) : [];
|
|
1372
|
-
const [main, ...passes] = prompt && agent ? await Promise.all([
|
|
1373
|
-
ask(prompt),
|
|
1374
|
-
...focused.map(
|
|
1375
|
-
(name) => ask(reviewPrompt(meta, files, kinds, { focus: focusLines(name), first: (p) => p.startsWith(`${name}/`) }))
|
|
1376
|
-
)
|
|
1377
|
-
]) : [void 0];
|
|
1397
|
+
const [main, ...passes] = prompt && agent ? await Promise.all([ask(), ...focused.map((name) => ask({ focus: focusLines(name), first: (p) => p.startsWith(`${name}/`) }))]) : [void 0];
|
|
1378
1398
|
const answer = main === void 0 ? void 0 : withFocusNotes(
|
|
1379
1399
|
main,
|
|
1380
1400
|
focused.map((name, i) => ({ repo: name, answer: passes[i] ?? null })),
|
|
@@ -1386,45 +1406,106 @@ async function prepareLocalReview(session, repo, deps) {
|
|
|
1386
1406
|
...deps.agent ? {} : { notAskedWhy: "no agent for the AI step: stories are by folder" },
|
|
1387
1407
|
ignored
|
|
1388
1408
|
});
|
|
1389
|
-
|
|
1409
|
+
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";
|
|
1410
|
+
return { review, repo: together ? null : picked[0].name, files, repos, ...how ? { how } : {} };
|
|
1390
1411
|
}
|
|
1391
1412
|
function createLocalReviews(deps) {
|
|
1392
1413
|
const kept = /* @__PURE__ */ new Map();
|
|
1393
1414
|
const now = () => (deps.now?.() ?? /* @__PURE__ */ new Date()).toISOString();
|
|
1415
|
+
const of = (sessionId) => {
|
|
1416
|
+
const k = kept.get(sessionId);
|
|
1417
|
+
if (k) return k;
|
|
1418
|
+
const s = deps.store?.read(sessionId);
|
|
1419
|
+
if (!s) return void 0;
|
|
1420
|
+
const back = {
|
|
1421
|
+
status: "ready",
|
|
1422
|
+
repo: s.repo,
|
|
1423
|
+
repos: s.repos,
|
|
1424
|
+
prepared: s.prepared,
|
|
1425
|
+
at: s.at,
|
|
1426
|
+
sent: s.sent,
|
|
1427
|
+
dismissed: s.dismissed
|
|
1428
|
+
};
|
|
1429
|
+
kept.set(sessionId, back);
|
|
1430
|
+
return back;
|
|
1431
|
+
};
|
|
1432
|
+
const persist = (sessionId, k) => {
|
|
1433
|
+
if (k.status !== "ready" || !k.prepared) return;
|
|
1434
|
+
deps.store?.save(sessionId, { repo: k.repo, repos: k.repos, prepared: k.prepared, at: k.at, sent: k.sent, dismissed: k.dismissed });
|
|
1435
|
+
};
|
|
1394
1436
|
const wire = (k) => !k ? { status: "none", repo: null, repos: [] } : {
|
|
1395
1437
|
status: k.status,
|
|
1396
1438
|
repo: k.repo,
|
|
1397
1439
|
repos: k.repos,
|
|
1398
1440
|
at: k.at,
|
|
1399
|
-
...k.prepared ? { review: k.prepared.review } : {},
|
|
1441
|
+
...k.prepared ? { review: k.prepared.review, sent: k.sent, dismissed: k.dismissed } : {},
|
|
1442
|
+
...k.prepared?.how ? { how: k.prepared.how } : {},
|
|
1400
1443
|
...k.error ? { error: k.error } : {}
|
|
1401
1444
|
};
|
|
1445
|
+
const mark = (sessionId, change) => {
|
|
1446
|
+
const k = of(sessionId);
|
|
1447
|
+
if (!k?.prepared) return false;
|
|
1448
|
+
change(k, new Set(k.prepared.review.drafts.map((d) => d.id)));
|
|
1449
|
+
persist(sessionId, k);
|
|
1450
|
+
return true;
|
|
1451
|
+
};
|
|
1402
1452
|
return {
|
|
1403
|
-
state: (sessionId) => wire(
|
|
1453
|
+
state: (sessionId) => wire(of(sessionId)),
|
|
1404
1454
|
/** The diff the kept review was made of; null when none is ready. */
|
|
1405
|
-
files: (sessionId) =>
|
|
1455
|
+
files: (sessionId) => of(sessionId)?.prepared?.files ?? null,
|
|
1406
1456
|
start(sessionId, session, repo) {
|
|
1407
|
-
const was =
|
|
1457
|
+
const was = of(sessionId);
|
|
1408
1458
|
if (was?.status === "running") return wire(was);
|
|
1409
1459
|
const running = {
|
|
1410
1460
|
status: "running",
|
|
1411
1461
|
repo: repo ?? null,
|
|
1412
1462
|
repos: was?.repos ?? [],
|
|
1413
1463
|
at: now(),
|
|
1464
|
+
sent: was?.prepared ? was.sent : [],
|
|
1465
|
+
dismissed: was?.prepared ? was.dismissed : [],
|
|
1414
1466
|
...was?.prepared ? { prepared: was.prepared } : {}
|
|
1415
1467
|
};
|
|
1416
1468
|
kept.set(sessionId, running);
|
|
1417
1469
|
void deps.prepare(session, repo).then(
|
|
1418
|
-
|
|
1419
|
-
(
|
|
1470
|
+
// Another review: none of its notes is sent or dismissed yet.
|
|
1471
|
+
(p) => ({ status: "ready", repo: p.repo, repos: p.repos, prepared: p, at: now(), sent: [], dismissed: [] }),
|
|
1472
|
+
// The one from before stays the kept one (and the stored one): only this try failed.
|
|
1473
|
+
(err) => ({
|
|
1474
|
+
status: "failed",
|
|
1475
|
+
repo: repo ?? null,
|
|
1476
|
+
repos: running.repos,
|
|
1477
|
+
error: err.message,
|
|
1478
|
+
at: now(),
|
|
1479
|
+
sent: running.sent,
|
|
1480
|
+
dismissed: running.dismissed,
|
|
1481
|
+
...running.prepared ? { prepared: running.prepared } : {}
|
|
1482
|
+
})
|
|
1420
1483
|
).then((next) => {
|
|
1421
1484
|
if (kept.get(sessionId) !== running) return;
|
|
1422
1485
|
kept.set(sessionId, next);
|
|
1486
|
+
persist(sessionId, next);
|
|
1423
1487
|
deps.onChange(sessionId);
|
|
1424
1488
|
});
|
|
1425
1489
|
return wire(running);
|
|
1426
1490
|
},
|
|
1427
|
-
|
|
1491
|
+
/** These notes were handed to the agent (only ones the review has). */
|
|
1492
|
+
markSent: (sessionId, ids) => mark(sessionId, (k, known) => {
|
|
1493
|
+
k.sent = [.../* @__PURE__ */ new Set([...k.sent, ...ids.filter((x) => known.has(x))])];
|
|
1494
|
+
}),
|
|
1495
|
+
/** Dismiss a note (`on` false: bring it back). False when no review is ready, or it has no such note. */
|
|
1496
|
+
dismiss(sessionId, noteId, on = true) {
|
|
1497
|
+
let found = false;
|
|
1498
|
+
const ok = mark(sessionId, (k, known) => {
|
|
1499
|
+
found = known.has(noteId);
|
|
1500
|
+
if (!found) return;
|
|
1501
|
+
k.dismissed = on ? [.../* @__PURE__ */ new Set([...k.dismissed, noteId])] : k.dismissed.filter((x) => x !== noteId);
|
|
1502
|
+
});
|
|
1503
|
+
return ok && found;
|
|
1504
|
+
},
|
|
1505
|
+
drop: (sessionId) => {
|
|
1506
|
+
kept.delete(sessionId);
|
|
1507
|
+
deps.store?.drop(sessionId);
|
|
1508
|
+
}
|
|
1428
1509
|
};
|
|
1429
1510
|
}
|
|
1430
1511
|
var MAX_NOTE = 1500;
|
|
@@ -1444,7 +1525,8 @@ function localReviewNote(review, ids) {
|
|
|
1444
1525
|
function mountSessionReviewRoutes(app, deps) {
|
|
1445
1526
|
const reviews = createLocalReviews({
|
|
1446
1527
|
prepare: deps.prepare,
|
|
1447
|
-
onChange: (sessionId) => deps.broadcast("session-review-changed", { sessionId })
|
|
1528
|
+
onChange: (sessionId) => deps.broadcast("session-review-changed", { sessionId }),
|
|
1529
|
+
...deps.store ? { store: deps.store } : {}
|
|
1448
1530
|
});
|
|
1449
1531
|
app.get("/api/sessions/:id/review", (c) => {
|
|
1450
1532
|
const id = c.req.param("id");
|
|
@@ -1466,32 +1548,114 @@ function mountSessionReviewRoutes(app, deps) {
|
|
|
1466
1548
|
const files = reviews.files(id);
|
|
1467
1549
|
return files ? c.json({ files }) : c.json({ error: "no review of it is prepared" }, 404);
|
|
1468
1550
|
});
|
|
1551
|
+
app.get("/api/sessions/:id/review/current", (c) => {
|
|
1552
|
+
const id = c.req.param("id");
|
|
1553
|
+
const session = findSession2(id);
|
|
1554
|
+
if (!session) return c.json({ error: "unknown session" }, 404);
|
|
1555
|
+
const kept = reviews.state(id);
|
|
1556
|
+
if (!kept.review) return c.json({ error: "no review of it is prepared" }, 404);
|
|
1557
|
+
if (session.archivedAt) return c.json({ current: true });
|
|
1558
|
+
let now;
|
|
1559
|
+
try {
|
|
1560
|
+
now = deps.signature(session, kept.repo);
|
|
1561
|
+
} catch (err) {
|
|
1562
|
+
return c.json({ error: err.message }, 502);
|
|
1563
|
+
}
|
|
1564
|
+
return c.json({ current: now === kept.review.headSha });
|
|
1565
|
+
});
|
|
1469
1566
|
app.post("/api/sessions/:id/review/send", async (c) => {
|
|
1470
1567
|
const id = c.req.param("id");
|
|
1471
1568
|
if (!findSession2(id)) return c.json({ error: "unknown session" }, 404);
|
|
1472
1569
|
const body = await c.req.json().catch(() => ({}));
|
|
1473
1570
|
const ids = body.ids === void 0 ? void 0 : Array.isArray(body.ids) ? body.ids.filter((x) => typeof x === "string") : null;
|
|
1474
1571
|
if (ids === null) return c.json({ error: "ids: string[]" }, 400);
|
|
1475
|
-
const
|
|
1572
|
+
const kept = reviews.state(id);
|
|
1573
|
+
const review = kept.review;
|
|
1476
1574
|
if (!review) return c.json({ error: "no review of it is prepared" }, 409);
|
|
1477
|
-
const
|
|
1575
|
+
const gone = new Set(kept.dismissed ?? []);
|
|
1576
|
+
const wanted = ids ?? review.drafts.filter((d) => d.state === "draft" && !gone.has(d.id)).map((d) => d.id);
|
|
1577
|
+
const note = localReviewNote(review, wanted);
|
|
1478
1578
|
if (!note) return c.json({ error: "It has no notes to hand over." }, 409);
|
|
1479
1579
|
try {
|
|
1480
1580
|
await deps.tell(id, note);
|
|
1481
1581
|
} catch (err) {
|
|
1482
1582
|
return c.json({ error: err.message }, 502);
|
|
1483
1583
|
}
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
});
|
|
1584
|
+
const went = wanted.filter((x) => review.drafts.some((d) => d.id === x && d.state === "draft"));
|
|
1585
|
+
reviews.markSent(id, went);
|
|
1586
|
+
deps.broadcast("session-review-changed", { sessionId: id });
|
|
1587
|
+
return c.json({ ok: true, sent: went.length });
|
|
1588
|
+
});
|
|
1589
|
+
app.post("/api/sessions/:id/review/dismiss", async (c) => {
|
|
1590
|
+
const id = c.req.param("id");
|
|
1591
|
+
if (!findSession2(id)) return c.json({ error: "unknown session" }, 404);
|
|
1592
|
+
const body = await c.req.json().catch(() => ({}));
|
|
1593
|
+
if (typeof body.id !== "string" || !body.id) return c.json({ error: "id: string" }, 400);
|
|
1594
|
+
if (!reviews.dismiss(id, body.id, body.undo !== true)) return c.json({ error: "no such note in the review prepared for it" }, 404);
|
|
1595
|
+
deps.broadcast("session-review-changed", { sessionId: id });
|
|
1596
|
+
return c.json(reviews.state(id));
|
|
1488
1597
|
});
|
|
1489
1598
|
return { drop: reviews.drop };
|
|
1490
1599
|
}
|
|
1491
1600
|
|
|
1601
|
+
// src/core/review/local-review-store.ts
|
|
1602
|
+
var strings2 = (v) => Array.isArray(v) && v.every((x) => typeof x === "string");
|
|
1603
|
+
function isStoredLocalReview(v) {
|
|
1604
|
+
const o = v;
|
|
1605
|
+
if (!o || typeof o !== "object") return false;
|
|
1606
|
+
const p = o.prepared;
|
|
1607
|
+
return (o.repo === null || typeof o.repo === "string") && strings2(o.repos) && typeof o.at === "string" && strings2(o.sent) && strings2(o.dismissed) && !!p && typeof p === "object" && Array.isArray(p.files) && strings2(p.repos) && !!p.review && typeof p.review === "object" && typeof p.review.headSha === "string" && Array.isArray(p.review.drafts) && Array.isArray(p.review.stories) && Array.isArray(p.review.files);
|
|
1608
|
+
}
|
|
1609
|
+
function readLocalReview(sessionId) {
|
|
1610
|
+
const row = withDb(
|
|
1611
|
+
(d) => d.prepare("SELECT data FROM session_reviews WHERE session_id = ?").get(sessionId)
|
|
1612
|
+
);
|
|
1613
|
+
const v = row ? json.parse(row.data) : null;
|
|
1614
|
+
return isStoredLocalReview(v) ? v : null;
|
|
1615
|
+
}
|
|
1616
|
+
function saveLocalReview(sessionId, review) {
|
|
1617
|
+
withDb(
|
|
1618
|
+
(d) => d.prepare("INSERT OR REPLACE INTO session_reviews (session_id, data) VALUES (?, ?)").run(sessionId, JSON.stringify(review))
|
|
1619
|
+
);
|
|
1620
|
+
}
|
|
1621
|
+
function dropLocalReview(sessionId) {
|
|
1622
|
+
withDb((d) => d.prepare("DELETE FROM session_reviews WHERE session_id = ?").run(sessionId));
|
|
1623
|
+
}
|
|
1624
|
+
|
|
1625
|
+
// src/core/review/local-review-tree.ts
|
|
1626
|
+
import path2 from "path";
|
|
1627
|
+
var norm = (p) => path2.resolve(p).replace(/\\/g, "/").replace(/\/+$/, "");
|
|
1628
|
+
function sessionTree(paths, names) {
|
|
1629
|
+
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)]);
|
|
1631
|
+
const dirs = names.map((n) => byName.get(n));
|
|
1632
|
+
if (names.length === 0 || dirs.some((d) => !d || d.length !== 1)) return null;
|
|
1633
|
+
const found = dirs.map((d) => d[0]);
|
|
1634
|
+
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;
|
|
1637
|
+
return { cwd: parent, repos: found.map((dir, i) => ({ dir, sub: names[i] })) };
|
|
1638
|
+
}
|
|
1639
|
+
var LOCAL_TREE_TIMEOUT_MS = 42e4;
|
|
1640
|
+
var SEVERAL_REPOS_LINE = "The folder holds several repos, each in the folder its paths start with: a file's path as listed is its path from where you are.";
|
|
1641
|
+
async function localTreeRun(paths, names, deps) {
|
|
1642
|
+
const mode = deps.readOnly();
|
|
1643
|
+
if (!mode?.localLines) return { why: "the agent has no read-only mode" };
|
|
1644
|
+
const tree = sessionTree(paths, names);
|
|
1645
|
+
if (!tree) return { why: "its repos are not in one folder" };
|
|
1646
|
+
if (!deps.exists(tree.cwd) || tree.repos.some((r) => !deps.exists(r.dir))) return { why: "its folder is not there" };
|
|
1647
|
+
const can = await (mode.available?.() ?? Promise.resolve({ ok: true }));
|
|
1648
|
+
if (!can.ok) return { why: can.why ?? "the read-only mode is not available" };
|
|
1649
|
+
const deny = mode.denyRules?.(tree.repos) ?? [];
|
|
1650
|
+
return {
|
|
1651
|
+
lines: [...mode.localLines, ...tree.repos.length > 1 ? [SEVERAL_REPOS_LINE] : []],
|
|
1652
|
+
ask: (prompt) => deps.run(prompt, tree.cwd, deny)
|
|
1653
|
+
};
|
|
1654
|
+
}
|
|
1655
|
+
|
|
1492
1656
|
// src/core/platform/process-usage.ts
|
|
1493
1657
|
import { execFile } from "child_process";
|
|
1494
|
-
import
|
|
1658
|
+
import path3 from "path";
|
|
1495
1659
|
var num = (v) => typeof v === "number" && Number.isFinite(v) && v >= 0 ? v : null;
|
|
1496
1660
|
function parseCimUsage(json2) {
|
|
1497
1661
|
let data;
|
|
@@ -1537,7 +1701,7 @@ function parsePsUsage(stdout, now) {
|
|
|
1537
1701
|
out.push({
|
|
1538
1702
|
pid: Number(m[1]),
|
|
1539
1703
|
ppid: Number(m[2]),
|
|
1540
|
-
name:
|
|
1704
|
+
name: path3.posix.basename(first),
|
|
1541
1705
|
exe: first.startsWith("/") ? first : null,
|
|
1542
1706
|
command,
|
|
1543
1707
|
memBytes: Number(m[3]) * 1024,
|
|
@@ -1590,16 +1754,16 @@ function leftoverSummary(found) {
|
|
|
1590
1754
|
|
|
1591
1755
|
// src/core/worktree/code-browse.ts
|
|
1592
1756
|
import fs3 from "fs";
|
|
1593
|
-
import
|
|
1757
|
+
import path4 from "path";
|
|
1594
1758
|
var MAX_CODE_FILES = 5e4;
|
|
1595
1759
|
var MAX_CODE_FILE_BYTES = 2 * 1024 * 1024;
|
|
1596
1760
|
var LIST_TTL_MS = 3e3;
|
|
1597
1761
|
function codeRoots(s) {
|
|
1598
|
-
return s.paths.map((p) => ({ name:
|
|
1762
|
+
return s.paths.map((p) => ({ name: path4.basename(p), root: p }));
|
|
1599
1763
|
}
|
|
1600
1764
|
function groupRoot(s) {
|
|
1601
1765
|
if (!s.isGroup || s.paths.length === 0) return null;
|
|
1602
|
-
const parents = [...new Set(s.paths.map((p) =>
|
|
1766
|
+
const parents = [...new Set(s.paths.map((p) => path4.dirname(p)))];
|
|
1603
1767
|
return parents.length === 1 ? parents[0] : null;
|
|
1604
1768
|
}
|
|
1605
1769
|
var realIo = {
|
|
@@ -1708,11 +1872,11 @@ async function codeFilePath(s, repo, rel, io = realIo) {
|
|
|
1708
1872
|
if (!root) return { error: "unknown repo" };
|
|
1709
1873
|
if (!allowed) return { error: "not listed" };
|
|
1710
1874
|
try {
|
|
1711
|
-
const full =
|
|
1875
|
+
const full = path4.resolve(root, rel);
|
|
1712
1876
|
const realRoot = fs3.realpathSync.native(root);
|
|
1713
1877
|
const real = fs3.realpathSync.native(full);
|
|
1714
|
-
const inside2 =
|
|
1715
|
-
if (!inside2 || inside2.startsWith("..") ||
|
|
1878
|
+
const inside2 = path4.relative(realRoot, real);
|
|
1879
|
+
if (!inside2 || inside2.startsWith("..") || path4.isAbsolute(inside2)) return { error: "not listed" };
|
|
1716
1880
|
const st = fs3.statSync(real);
|
|
1717
1881
|
if (!st.isFile()) return { error: "unreadable" };
|
|
1718
1882
|
return { real, size: st.size };
|
|
@@ -1806,9 +1970,9 @@ var NOT_NAMES = /* @__PURE__ */ new Set([
|
|
|
1806
1970
|
"typeof",
|
|
1807
1971
|
"await"
|
|
1808
1972
|
]);
|
|
1809
|
-
function declarationOf(
|
|
1973
|
+
function declarationOf(path22, text) {
|
|
1810
1974
|
for (const r of RULES) {
|
|
1811
|
-
if (!r.ext.test(
|
|
1975
|
+
if (!r.ext.test(path22)) continue;
|
|
1812
1976
|
const m = r.re.exec(text);
|
|
1813
1977
|
if (!m) continue;
|
|
1814
1978
|
const name = r.name(m);
|
|
@@ -2166,7 +2330,7 @@ function mountSetupRoutes(app, opts) {
|
|
|
2166
2330
|
|
|
2167
2331
|
// src/core/updates/update-source.ts
|
|
2168
2332
|
import fs4 from "fs";
|
|
2169
|
-
import
|
|
2333
|
+
import path5 from "path";
|
|
2170
2334
|
|
|
2171
2335
|
// src/core/updates/updates.ts
|
|
2172
2336
|
function parseVersion(v) {
|
|
@@ -2223,8 +2387,8 @@ function whatsNewFor(i) {
|
|
|
2223
2387
|
}
|
|
2224
2388
|
function installKindOf(packageRoot2, configDir, hasGit) {
|
|
2225
2389
|
if (!packageRoot2) return "npm";
|
|
2226
|
-
const
|
|
2227
|
-
if (
|
|
2390
|
+
const norm3 = (p) => p.replace(/\\/g, "/").replace(/\/+$/, "").toLowerCase();
|
|
2391
|
+
if (norm3(packageRoot2).startsWith(`${norm3(configDir)}/runtime/`)) return "desktop";
|
|
2228
2392
|
return hasGit ? "dev" : "npm";
|
|
2229
2393
|
}
|
|
2230
2394
|
function parseDesktopUpdate(text) {
|
|
@@ -2251,8 +2415,8 @@ function parseDesktopUpdate(text) {
|
|
|
2251
2415
|
var RELEASES_REPO = "moberghr/cli-work-tree-manager";
|
|
2252
2416
|
var RELEASES_URL = `https://api.github.com/repos/${RELEASES_REPO}/releases?per_page=30`;
|
|
2253
2417
|
var SEEN_KEY = "ui:seen-version";
|
|
2254
|
-
var desktopUpdatePath = () =>
|
|
2255
|
-
var desktopRequestPath = () =>
|
|
2418
|
+
var desktopUpdatePath = () => path5.join(getConfigDir(), "desktop-update.json");
|
|
2419
|
+
var desktopRequestPath = () => path5.join(getConfigDir(), "desktop-request.json");
|
|
2256
2420
|
async function fetchReleases(get = (url) => fetch(url, { headers: { "User-Agent": "work", Accept: "application/vnd.github+json" }, signal: AbortSignal.timeout(15e3) }), run2 = defaultRunner) {
|
|
2257
2421
|
const why = await get(RELEASES_URL).then(
|
|
2258
2422
|
async (res) => res.ok ? parseReleases(await res.json()) : res.status === 403 ? "GitHub's limit for this address is spent" : `GitHub answered ${res.status}`,
|
|
@@ -2314,7 +2478,7 @@ function markSeenVersion(version) {
|
|
|
2314
2478
|
}
|
|
2315
2479
|
function installKind() {
|
|
2316
2480
|
const root = packageRoot();
|
|
2317
|
-
return installKindOf(root, getConfigDir(), !!root && fs4.existsSync(
|
|
2481
|
+
return installKindOf(root, getConfigDir(), !!root && fs4.existsSync(path5.join(root, ".git")));
|
|
2318
2482
|
}
|
|
2319
2483
|
var defaultDeps = () => ({
|
|
2320
2484
|
fetchReleases: () => fetchReleases(),
|
|
@@ -2579,8 +2743,8 @@ var SETTING_PATTERNS = {
|
|
|
2579
2743
|
agentId: "^[\\w.-]+$",
|
|
2580
2744
|
envName: "^[A-Za-z_][A-Za-z0-9_]*$"
|
|
2581
2745
|
};
|
|
2582
|
-
var bool = (
|
|
2583
|
-
path:
|
|
2746
|
+
var bool = (path22, section, label, help, def, when) => ({
|
|
2747
|
+
path: path22,
|
|
2584
2748
|
section,
|
|
2585
2749
|
label,
|
|
2586
2750
|
help,
|
|
@@ -2946,7 +3110,7 @@ var SETTINGS = [
|
|
|
2946
3110
|
"at the next work web start"
|
|
2947
3111
|
)
|
|
2948
3112
|
];
|
|
2949
|
-
var settingAt = (
|
|
3113
|
+
var settingAt = (path22) => SETTINGS.find((f) => f.path === path22);
|
|
2950
3114
|
function checkSetting(field, raw) {
|
|
2951
3115
|
const checked = checkValue(field, raw);
|
|
2952
3116
|
if (checked.ok && checked.value === null && field.required) return { ok: false, error: "it can\u2019t be left empty" };
|
|
@@ -2992,16 +3156,16 @@ function checkValue(field, raw) {
|
|
|
2992
3156
|
return typeof raw === "string" && k.options.some((o) => o.value === raw) ? { ok: true, value: raw } : { ok: false, error: `one of ${k.options.map((o) => o.value).join(", ")}` };
|
|
2993
3157
|
}
|
|
2994
3158
|
}
|
|
2995
|
-
function valueAt(obj,
|
|
3159
|
+
function valueAt(obj, path22) {
|
|
2996
3160
|
let cur = obj;
|
|
2997
|
-
for (const key of
|
|
3161
|
+
for (const key of path22.split(".")) {
|
|
2998
3162
|
if (!cur || typeof cur !== "object" || Array.isArray(cur)) return void 0;
|
|
2999
3163
|
cur = cur[key];
|
|
3000
3164
|
}
|
|
3001
3165
|
return cur;
|
|
3002
3166
|
}
|
|
3003
|
-
function setValueAt(obj,
|
|
3004
|
-
const keys =
|
|
3167
|
+
function setValueAt(obj, path22, value) {
|
|
3168
|
+
const keys = path22.split(".");
|
|
3005
3169
|
const chain = [obj];
|
|
3006
3170
|
let cur = obj;
|
|
3007
3171
|
for (const key of keys.slice(0, -1)) {
|
|
@@ -3038,8 +3202,8 @@ function checkRepoSetting(key, raw) {
|
|
|
3038
3202
|
return raw === "all" || raw === "asked" || raw === "off" ? { ok: true, value: raw } : { ok: false, error: "all, asked or off" };
|
|
3039
3203
|
}
|
|
3040
3204
|
function repoSettingsOf(raw, alias) {
|
|
3041
|
-
const map = (
|
|
3042
|
-
const m = valueAt(raw,
|
|
3205
|
+
const map = (path22) => {
|
|
3206
|
+
const m = valueAt(raw, path22);
|
|
3043
3207
|
return m && typeof m === "object" && !Array.isArray(m) ? m : {};
|
|
3044
3208
|
};
|
|
3045
3209
|
const checks = map(REPO_SETTING_PATH.requiredChecks)[alias];
|
|
@@ -3095,7 +3259,7 @@ function mountSettingsRoutes(app, opts) {
|
|
|
3095
3259
|
|
|
3096
3260
|
// src/core/settings/settings-admin.ts
|
|
3097
3261
|
import fs6 from "fs";
|
|
3098
|
-
import
|
|
3262
|
+
import path6 from "path";
|
|
3099
3263
|
function rawConfig(file = getConfigPath()) {
|
|
3100
3264
|
try {
|
|
3101
3265
|
const raw = JSON.parse(fs6.readFileSync(file, "utf-8"));
|
|
@@ -3113,13 +3277,13 @@ function readSettings() {
|
|
|
3113
3277
|
}
|
|
3114
3278
|
return { values, configPath: getConfigPath() };
|
|
3115
3279
|
}
|
|
3116
|
-
async function writeSetting(
|
|
3117
|
-
const field = settingAt(
|
|
3118
|
-
if (!field) throw new SettingsError(`no setting ${
|
|
3280
|
+
async function writeSetting(path22, value) {
|
|
3281
|
+
const field = settingAt(path22);
|
|
3282
|
+
if (!field) throw new SettingsError(`no setting ${path22}`, 404);
|
|
3119
3283
|
const checked = checkSetting(field, value);
|
|
3120
3284
|
if (!checked.ok) throw new SettingsError(`${field.label}: ${checked.error}`);
|
|
3121
|
-
const toWrite = checkedFolders(
|
|
3122
|
-
await editConfig((raw) => setValueAt(raw,
|
|
3285
|
+
const toWrite = checkedFolders(path22, checked.value);
|
|
3286
|
+
await editConfig((raw) => setValueAt(raw, path22, toWrite)).catch((err) => {
|
|
3123
3287
|
throw err instanceof RepoAdminError ? new SettingsError(err.message) : err;
|
|
3124
3288
|
});
|
|
3125
3289
|
return readSettings();
|
|
@@ -3133,9 +3297,9 @@ function checkedFolders(at, value) {
|
|
|
3133
3297
|
if (at === "scanRoots" && Array.isArray(value))
|
|
3134
3298
|
return value.map((v) => {
|
|
3135
3299
|
const p = expandHome(v);
|
|
3136
|
-
if (!
|
|
3300
|
+
if (!path6.isAbsolute(p))
|
|
3137
3301
|
throw new SettingsError(`Folders scanned for repos: ${v} isn't a full path (start it from the drive, / or ~)`);
|
|
3138
|
-
const full =
|
|
3302
|
+
const full = path6.resolve(p);
|
|
3139
3303
|
if (!fs6.statSync(full, { throwIfNoEntry: false })?.isDirectory())
|
|
3140
3304
|
throw new SettingsError(`Folders scanned for repos: ${full} isn't a folder`);
|
|
3141
3305
|
return full;
|
|
@@ -3186,7 +3350,7 @@ var configSettings = {
|
|
|
3186
3350
|
};
|
|
3187
3351
|
|
|
3188
3352
|
// src/core/conversations/timeline-source.ts
|
|
3189
|
-
import
|
|
3353
|
+
import path7 from "path";
|
|
3190
3354
|
|
|
3191
3355
|
// src/core/conversations/timeline.ts
|
|
3192
3356
|
var SIZE_LABEL = /^(\d+ files? · \+\d+ −\d+|no changes)$/;
|
|
@@ -3235,7 +3399,7 @@ async function commitsOf(repo, since, run2) {
|
|
|
3235
3399
|
if (log.code !== 0) return [];
|
|
3236
3400
|
return log.stdout.split("\n").filter(Boolean).map((line) => {
|
|
3237
3401
|
const [sha, at, ...subject] = line.split(" ");
|
|
3238
|
-
return { repo:
|
|
3402
|
+
return { repo: path7.basename(repo), sha, at, subject: subject.join(" ") };
|
|
3239
3403
|
});
|
|
3240
3404
|
}
|
|
3241
3405
|
async function sessionTimeline(s, deps = {}) {
|
|
@@ -3303,7 +3467,7 @@ function mountBlockRoutes(app, opts) {
|
|
|
3303
3467
|
|
|
3304
3468
|
// src/server/routes/jira-watch-routes.ts
|
|
3305
3469
|
import fs7 from "fs";
|
|
3306
|
-
import
|
|
3470
|
+
import path8 from "path";
|
|
3307
3471
|
|
|
3308
3472
|
// src/core/jira/jira-prompt.ts
|
|
3309
3473
|
var branchFor = (issue) => `feat/${issue.key}`;
|
|
@@ -3524,14 +3688,14 @@ async function sweepJira(deps) {
|
|
|
3524
3688
|
var EVERY_MS = 5 * 6e4;
|
|
3525
3689
|
function aboutRepo(dir) {
|
|
3526
3690
|
try {
|
|
3527
|
-
const readme = ["README.md", "readme.md", "README"].map((n) =>
|
|
3691
|
+
const readme = ["README.md", "readme.md", "README"].map((n) => path8.join(dir, n)).find((f) => fs7.existsSync(f));
|
|
3528
3692
|
if (readme) {
|
|
3529
3693
|
const line = fs7.readFileSync(readme, "utf8").split(/\r?\n/).map(
|
|
3530
3694
|
(l) => l.replace(/^[#>*\-\s]+/, "").replace(/[`*_[\]]/g, "").trim()
|
|
3531
3695
|
).find((l) => l.length > 20 && !/^(!|<|http)/.test(l));
|
|
3532
3696
|
if (line) return line.slice(0, 160);
|
|
3533
3697
|
}
|
|
3534
|
-
const pkg =
|
|
3698
|
+
const pkg = path8.join(dir, "package.json");
|
|
3535
3699
|
if (fs7.existsSync(pkg)) {
|
|
3536
3700
|
const d = JSON.parse(fs7.readFileSync(pkg, "utf8")).description;
|
|
3537
3701
|
if (typeof d === "string" && d.trim()) return d.trim().slice(0, 160);
|
|
@@ -3545,7 +3709,7 @@ function watchTargets(cfg = loadConfig()) {
|
|
|
3545
3709
|
const repos = Object.entries(cfg.repos).map(([alias, dir]) => ({
|
|
3546
3710
|
name: alias,
|
|
3547
3711
|
kind: "repo",
|
|
3548
|
-
members: [
|
|
3712
|
+
members: [path8.basename(dir)],
|
|
3549
3713
|
about: aboutRepo(dir)
|
|
3550
3714
|
}));
|
|
3551
3715
|
const groups = Object.entries(cfg.groups).map(([name, aliases]) => ({ name, kind: "group", members: aliases }));
|
|
@@ -3721,7 +3885,7 @@ function describeStall(s) {
|
|
|
3721
3885
|
}
|
|
3722
3886
|
|
|
3723
3887
|
// src/server/web-server.ts
|
|
3724
|
-
import
|
|
3888
|
+
import path19 from "path";
|
|
3725
3889
|
import { Hono } from "hono";
|
|
3726
3890
|
import { streamSSE as streamSSE2 } from "hono/streaming";
|
|
3727
3891
|
|
|
@@ -3936,17 +4100,7 @@ function mountPanesRoutes(app, opts) {
|
|
|
3936
4100
|
if (!config) {
|
|
3937
4101
|
return c.json({ singles: [], groups: [] });
|
|
3938
4102
|
}
|
|
3939
|
-
|
|
3940
|
-
name: alias,
|
|
3941
|
-
kind: "single",
|
|
3942
|
-
path: config.repos[alias]
|
|
3943
|
-
}));
|
|
3944
|
-
const groups = Object.entries(config.groups).map(([name, aliases]) => ({
|
|
3945
|
-
name,
|
|
3946
|
-
kind: "group",
|
|
3947
|
-
members: aliases
|
|
3948
|
-
}));
|
|
3949
|
-
return c.json({ singles, groups });
|
|
4103
|
+
return c.json(projectList(config));
|
|
3950
4104
|
});
|
|
3951
4105
|
app.get("/api/branch-check", (c) => {
|
|
3952
4106
|
const target = c.req.query("target") ?? "";
|
|
@@ -4060,7 +4214,7 @@ function mountPanesRoutes(app, opts) {
|
|
|
4060
4214
|
|
|
4061
4215
|
// src/server/routes/worktree-routes.ts
|
|
4062
4216
|
import fs8 from "fs";
|
|
4063
|
-
import
|
|
4217
|
+
import path9 from "path";
|
|
4064
4218
|
import { spawn } from "child_process";
|
|
4065
4219
|
|
|
4066
4220
|
// src/core/platform/started.ts
|
|
@@ -4246,7 +4400,7 @@ function mountWorktreeRoutes(app, opts) {
|
|
|
4246
4400
|
const wantsFile = !!body && typeof body === "object" && "path" in body;
|
|
4247
4401
|
const asked = wantsFile ? openFileSchema.safeParse(body) : null;
|
|
4248
4402
|
if (asked && !asked.success) return c.json({ error: "repo and path required" }, 400);
|
|
4249
|
-
const folder = session.isGroup ?
|
|
4403
|
+
const folder = session.isGroup ? path9.dirname(session.paths[0]) : session.paths[0];
|
|
4250
4404
|
let file;
|
|
4251
4405
|
if (asked?.success) {
|
|
4252
4406
|
const at = await codeFilePath(session, asked.data.repo, asked.data.path);
|
|
@@ -4315,7 +4469,7 @@ function mountWorktreeRoutes(app, opts) {
|
|
|
4315
4469
|
import { zValidator as zValidator6 } from "@hono/zod-validator";
|
|
4316
4470
|
import { z as z5 } from "zod";
|
|
4317
4471
|
import { EventEmitter } from "events";
|
|
4318
|
-
import
|
|
4472
|
+
import path10 from "path";
|
|
4319
4473
|
import { streamSSE } from "hono/streaming";
|
|
4320
4474
|
function mountScopeRoutes(app, opts) {
|
|
4321
4475
|
const background = /* @__PURE__ */ new Set();
|
|
@@ -4562,7 +4716,7 @@ function mountScopeRoutes(app, opts) {
|
|
|
4562
4716
|
const fromSha = fromEntry.repos[p] ?? "HEAD";
|
|
4563
4717
|
const toSha = toEntry === void 0 ? "working" : toEntry.repos[p] ?? "HEAD";
|
|
4564
4718
|
return {
|
|
4565
|
-
name:
|
|
4719
|
+
name: path10.basename(p),
|
|
4566
4720
|
root: p,
|
|
4567
4721
|
files: computeRangeDiff({ root: p, fromRef: fromSha, toRef: toSha })
|
|
4568
4722
|
};
|
|
@@ -4579,7 +4733,7 @@ function mountScopeRoutes(app, opts) {
|
|
|
4579
4733
|
}
|
|
4580
4734
|
const resolved = scope.paths.map((p) => resolveRepoDiff(p, base, sessionBaseForPath(p)));
|
|
4581
4735
|
const repos = scope.paths.map((p, i) => ({
|
|
4582
|
-
name:
|
|
4736
|
+
name: path10.basename(p),
|
|
4583
4737
|
root: p,
|
|
4584
4738
|
resolvedBase: resolved[i].resolvedBase,
|
|
4585
4739
|
files: computeDiff({ root: p, diffArg: resolved[i].diffArg })
|
|
@@ -4610,7 +4764,7 @@ function mountScopeRoutes(app, opts) {
|
|
|
4610
4764
|
if (!relPath || !Number.isInteger(start) || !Number.isInteger(end)) {
|
|
4611
4765
|
return c.json({ error: "bad path/start/end" }, 400);
|
|
4612
4766
|
}
|
|
4613
|
-
const root = scope.paths.length === 1 ? scope.paths[0] : scope.paths.find((p) =>
|
|
4767
|
+
const root = scope.paths.length === 1 ? scope.paths[0] : scope.paths.find((p) => path10.basename(p) === repoName);
|
|
4614
4768
|
if (!root) return c.json({ error: "unknown repo" }, 404);
|
|
4615
4769
|
const result = readContextLines({ root, relPath, start, end, ref });
|
|
4616
4770
|
if (!result) return c.json({ error: "cannot read file" }, 400);
|
|
@@ -4868,7 +5022,7 @@ function mountTerminalRoutes(app, opts) {
|
|
|
4868
5022
|
}
|
|
4869
5023
|
|
|
4870
5024
|
// src/server/routes/status-routes.ts
|
|
4871
|
-
import
|
|
5025
|
+
import path11 from "path";
|
|
4872
5026
|
|
|
4873
5027
|
// src/core/status/notifier.ts
|
|
4874
5028
|
var MESSAGES = {
|
|
@@ -5016,7 +5170,7 @@ function mountStatusRoutes(app, opts) {
|
|
|
5016
5170
|
const kind = notifyKindForTransition(status.prevState ? { state: status.prevState } : null, status);
|
|
5017
5171
|
if (kind) {
|
|
5018
5172
|
const config = loadConfig();
|
|
5019
|
-
const launchDir = session.isGroup && session.paths[0] ?
|
|
5173
|
+
const launchDir = session.isGroup && session.paths[0] ? path11.dirname(session.paths[0]) : session.paths[0] ?? body.cwd;
|
|
5020
5174
|
const name = `${session.target} \xB7 ${session.branch}`;
|
|
5021
5175
|
const snooze = readSnooze(id);
|
|
5022
5176
|
const route = snooze?.until && snoozeActive(snooze, { attention: status }) ? "none" : presence.route(id);
|
|
@@ -6046,13 +6200,13 @@ function mountRailRoutes(app, opts) {
|
|
|
6046
6200
|
|
|
6047
6201
|
// src/core/worktree/shared-folders.ts
|
|
6048
6202
|
import fs9 from "fs";
|
|
6049
|
-
import
|
|
6050
|
-
var
|
|
6203
|
+
import path12 from "path";
|
|
6204
|
+
var norm2 = (p) => path12.resolve(p).replace(/\\/g, "/").toLowerCase();
|
|
6051
6205
|
function shadowedSessions(sessions, branchCheckedOut2) {
|
|
6052
6206
|
const byFolder = /* @__PURE__ */ new Map();
|
|
6053
6207
|
for (const s of sessions) {
|
|
6054
6208
|
if (s.isGroup || s.paths.length !== 1) continue;
|
|
6055
|
-
const key =
|
|
6209
|
+
const key = norm2(s.paths[0]);
|
|
6056
6210
|
byFolder.set(key, [...byFolder.get(key) ?? [], s]);
|
|
6057
6211
|
}
|
|
6058
6212
|
const shadowed = /* @__PURE__ */ new Set();
|
|
@@ -6066,14 +6220,14 @@ function shadowedSessions(sessions, branchCheckedOut2) {
|
|
|
6066
6220
|
}
|
|
6067
6221
|
function branchCheckedOut(dir) {
|
|
6068
6222
|
try {
|
|
6069
|
-
const dotGit =
|
|
6223
|
+
const dotGit = path12.join(dir, ".git");
|
|
6070
6224
|
let gitDir = dotGit;
|
|
6071
6225
|
if (fs9.statSync(dotGit).isFile()) {
|
|
6072
6226
|
const m = /^gitdir:\s*(.+)$/m.exec(fs9.readFileSync(dotGit, "utf8"));
|
|
6073
6227
|
if (!m) return null;
|
|
6074
|
-
gitDir =
|
|
6228
|
+
gitDir = path12.resolve(dir, m[1].trim());
|
|
6075
6229
|
}
|
|
6076
|
-
const head = fs9.readFileSync(
|
|
6230
|
+
const head = fs9.readFileSync(path12.join(gitDir, "HEAD"), "utf8");
|
|
6077
6231
|
const ref = /^ref:\s*refs\/heads\/(.+)$/m.exec(head);
|
|
6078
6232
|
return ref ? ref[1].trim() : null;
|
|
6079
6233
|
} catch {
|
|
@@ -6401,7 +6555,7 @@ function mountPrReplyRoutes(app, opts) {
|
|
|
6401
6555
|
|
|
6402
6556
|
// src/core/archive/archive-retention.ts
|
|
6403
6557
|
import fs11 from "fs";
|
|
6404
|
-
import
|
|
6558
|
+
import path13 from "path";
|
|
6405
6559
|
import zlib from "zlib";
|
|
6406
6560
|
var DEFAULT_COMPRESS_AFTER_DAYS = 30;
|
|
6407
6561
|
var DAY_MS = 24 * 36e5;
|
|
@@ -6422,14 +6576,14 @@ function applyArchiveRetention(opts) {
|
|
|
6422
6576
|
if (!rec) continue;
|
|
6423
6577
|
const age = now - Date.parse(rec.archivedAt);
|
|
6424
6578
|
if (!Number.isFinite(age)) continue;
|
|
6425
|
-
const ignored =
|
|
6579
|
+
const ignored = path13.join(archiveDirFor(id, root), "ignored");
|
|
6426
6580
|
if (compressAfter > 0 && age >= compressAfter * DAY_MS && !rec.ignoredDroppedAt && fs11.existsSync(ignored)) {
|
|
6427
6581
|
fs11.rmSync(ignored, { recursive: true, force: true });
|
|
6428
6582
|
rec.ignoredDroppedAt = new Date(now).toISOString();
|
|
6429
6583
|
writeArchiveRecord(rec, root);
|
|
6430
6584
|
}
|
|
6431
6585
|
if (rec.transcriptsDroppedAt) continue;
|
|
6432
|
-
const dir =
|
|
6586
|
+
const dir = path13.join(archiveDirFor(id, root), "transcripts");
|
|
6433
6587
|
if (dropAfter > 0 && age >= dropAfter * DAY_MS) {
|
|
6434
6588
|
out.bytesSaved += dirBytes(dir);
|
|
6435
6589
|
fs11.rmSync(dir, { recursive: true, force: true });
|
|
@@ -6440,7 +6594,7 @@ function applyArchiveRetention(opts) {
|
|
|
6440
6594
|
}
|
|
6441
6595
|
if (compressAfter <= 0 || rec.compressedAt || age < compressAfter * DAY_MS) continue;
|
|
6442
6596
|
for (const t of rec.transcripts) {
|
|
6443
|
-
const plain =
|
|
6597
|
+
const plain = path13.join(dir, t.file);
|
|
6444
6598
|
if (!fs11.existsSync(plain)) continue;
|
|
6445
6599
|
const data = fs11.readFileSync(plain);
|
|
6446
6600
|
const gz = zlib.gzipSync(data);
|
|
@@ -6461,7 +6615,7 @@ function applyArchiveRetention(opts) {
|
|
|
6461
6615
|
function dirBytes(dir) {
|
|
6462
6616
|
let n = 0;
|
|
6463
6617
|
try {
|
|
6464
|
-
for (const f of fs11.readdirSync(dir)) n += fs11.statSync(
|
|
6618
|
+
for (const f of fs11.readdirSync(dir)) n += fs11.statSync(path13.join(dir, f)).size;
|
|
6465
6619
|
} catch {
|
|
6466
6620
|
}
|
|
6467
6621
|
return n;
|
|
@@ -6939,7 +7093,7 @@ function reviewModeOf(alias, config) {
|
|
|
6939
7093
|
return { mode: "all", from: "default" };
|
|
6940
7094
|
}
|
|
6941
7095
|
function reviewProjects(config) {
|
|
6942
|
-
return Object.entries(config.repos).map(([alias,
|
|
7096
|
+
return Object.entries(config.repos).map(([alias, path22]) => ({ alias, path: path22, mode: reviewModeOf(alias, config).mode }));
|
|
6943
7097
|
}
|
|
6944
7098
|
function reviewLimits(config) {
|
|
6945
7099
|
return {
|
|
@@ -7087,7 +7241,7 @@ function mountReviewRoutes(app, deps) {
|
|
|
7087
7241
|
// src/core/review/review-tree.ts
|
|
7088
7242
|
import { randomBytes } from "crypto";
|
|
7089
7243
|
import fs12 from "fs";
|
|
7090
|
-
import
|
|
7244
|
+
import path14 from "path";
|
|
7091
7245
|
|
|
7092
7246
|
// src/core/review/review-source.ts
|
|
7093
7247
|
var reviewRef = (number) => `refs/work/review/${number}`;
|
|
@@ -7143,7 +7297,7 @@ async function dropReviewRef(run2, repoPath, number) {
|
|
|
7143
7297
|
}
|
|
7144
7298
|
|
|
7145
7299
|
// src/core/review/review-tree.ts
|
|
7146
|
-
var reviewTreesDir = () =>
|
|
7300
|
+
var reviewTreesDir = () => path14.join(getConfigDir(), "review-trees");
|
|
7147
7301
|
var NO_HOOKS = ".no-hooks";
|
|
7148
7302
|
var NO_LFS = ["-c", "filter.lfs.smudge=", "-c", "filter.lfs.process=", "-c", "filter.lfs.required=false"];
|
|
7149
7303
|
var NO_LFS_ENV = { GIT_LFS_SKIP_SMUDGE: "1" };
|
|
@@ -7163,8 +7317,8 @@ function rmTree(dir) {
|
|
|
7163
7317
|
}
|
|
7164
7318
|
async function createReviewTree(run2, at, opts) {
|
|
7165
7319
|
const root = opts.root ?? reviewTreesDir();
|
|
7166
|
-
const dir =
|
|
7167
|
-
const noHooks =
|
|
7320
|
+
const dir = path14.join(root, reviewTreeName(at.alias, at.number, at.headSha, opts.run ?? runSuffix()));
|
|
7321
|
+
const noHooks = path14.join(root, NO_HOOKS);
|
|
7168
7322
|
fs12.mkdirSync(noHooks, { recursive: true });
|
|
7169
7323
|
if (fs12.existsSync(dir)) await removeReviewTree(run2, at.repoPath, dir);
|
|
7170
7324
|
const added = await run2(
|
|
@@ -7201,7 +7355,7 @@ async function createReviewTree(run2, at, opts) {
|
|
|
7201
7355
|
}
|
|
7202
7356
|
const removed = [];
|
|
7203
7357
|
for (const rel of listed.stdout.split("\0").filter((rel2) => opts.strip(rel2))) {
|
|
7204
|
-
const file =
|
|
7358
|
+
const file = path14.join(dir, rel);
|
|
7205
7359
|
fs12.rmSync(file, { recursive: true, force: true });
|
|
7206
7360
|
if (fs12.existsSync(file)) {
|
|
7207
7361
|
await removeReviewTree(run2, at.repoPath, dir);
|
|
@@ -7231,8 +7385,8 @@ async function withReviewTree(run2, at, use, opts) {
|
|
|
7231
7385
|
}
|
|
7232
7386
|
function gitDirOf(dir) {
|
|
7233
7387
|
try {
|
|
7234
|
-
const m = /^gitdir:\s*(.+)$/m.exec(fs12.readFileSync(
|
|
7235
|
-
return m ?
|
|
7388
|
+
const m = /^gitdir:\s*(.+)$/m.exec(fs12.readFileSync(path14.join(dir, ".git"), "utf8"));
|
|
7389
|
+
return m ? path14.resolve(dir, m[1].trim(), "..", "..") : null;
|
|
7236
7390
|
} catch {
|
|
7237
7391
|
return null;
|
|
7238
7392
|
}
|
|
@@ -7249,7 +7403,7 @@ async function sweepReviewTrees(run2, opts = {}) {
|
|
|
7249
7403
|
return { swept, failed };
|
|
7250
7404
|
}
|
|
7251
7405
|
for (const name of names) {
|
|
7252
|
-
const dir =
|
|
7406
|
+
const dir = path14.join(root, name);
|
|
7253
7407
|
try {
|
|
7254
7408
|
if (opts.olderThanMs && now - fs12.statSync(dir).mtimeMs < opts.olderThanMs) continue;
|
|
7255
7409
|
} catch {
|
|
@@ -7730,7 +7884,7 @@ function startReviewSweeps(opts) {
|
|
|
7730
7884
|
}
|
|
7731
7885
|
|
|
7732
7886
|
// src/core/diff/session-history.ts
|
|
7733
|
-
import
|
|
7887
|
+
import path15 from "path";
|
|
7734
7888
|
|
|
7735
7889
|
// src/core/diff/diff-points.ts
|
|
7736
7890
|
var SHA = /^[0-9a-f]{7,40}$/;
|
|
@@ -7826,12 +7980,12 @@ async function sessionHistory(session, others = []) {
|
|
|
7826
7980
|
});
|
|
7827
7981
|
if (diffArg === "HEAD") continue;
|
|
7828
7982
|
const log = await g(["log", `-n${MAX_COMMITS2}`, "--format=%H%x1f%cI%x1f%s", `${diffArg}..HEAD`, "--"], root);
|
|
7829
|
-
if (log.ok && log.out) commits.push(...parseLog(log.out,
|
|
7983
|
+
if (log.ok && log.out) commits.push(...parseLog(log.out, path15.basename(root)));
|
|
7830
7984
|
}
|
|
7831
7985
|
for (const b of others) {
|
|
7832
7986
|
const tip = await tipOf(b);
|
|
7833
7987
|
if (!tip) continue;
|
|
7834
|
-
const repo =
|
|
7988
|
+
const repo = path15.basename(b.path);
|
|
7835
7989
|
const start = liveStart(b) ?? b.start;
|
|
7836
7990
|
let list = [];
|
|
7837
7991
|
let base;
|
|
@@ -7892,7 +8046,7 @@ function parseLog(stdout, repo) {
|
|
|
7892
8046
|
return out;
|
|
7893
8047
|
}
|
|
7894
8048
|
function computeSessionRange(session, from, to) {
|
|
7895
|
-
const paths = session.paths.map((p) =>
|
|
8049
|
+
const paths = session.paths.map((p) => path15.resolve(p));
|
|
7896
8050
|
const refs = rangeRefs(paths, loadManifest(scopeHashForPaths(paths)).entries, from, to);
|
|
7897
8051
|
if ("error" in refs) return refs;
|
|
7898
8052
|
return { repos: refs.map((r) => ({ name: r.name, root: r.root, files: computeRangeDiff(r) })) };
|
|
@@ -7911,17 +8065,17 @@ async function sessionHistoryWire(session) {
|
|
|
7911
8065
|
}
|
|
7912
8066
|
|
|
7913
8067
|
// src/server/routes/revert-routes.ts
|
|
7914
|
-
import
|
|
8068
|
+
import path17 from "path";
|
|
7915
8069
|
import { zValidator as zValidator7 } from "@hono/zod-validator";
|
|
7916
8070
|
import { z as z6 } from "zod";
|
|
7917
8071
|
|
|
7918
8072
|
// src/core/diff/revert.ts
|
|
7919
8073
|
import fs14 from "fs";
|
|
7920
|
-
import
|
|
8074
|
+
import path16 from "path";
|
|
7921
8075
|
function inside(root, rel) {
|
|
7922
|
-
const abs =
|
|
7923
|
-
const back =
|
|
7924
|
-
if (!back || back.startsWith("..") ||
|
|
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;
|
|
7925
8079
|
return abs;
|
|
7926
8080
|
}
|
|
7927
8081
|
function inHead(root, rel) {
|
|
@@ -8034,8 +8188,8 @@ function mountRevertRoutes(app, opts) {
|
|
|
8034
8188
|
if (!session) return c.json({ error: "unknown session" }, 404);
|
|
8035
8189
|
const body = c.req.valid("json");
|
|
8036
8190
|
const repo = opts.uncommitted(session).find((r) => r.name === body.repo);
|
|
8037
|
-
const allowed = new Set(session.paths.map((p) =>
|
|
8038
|
-
if (!repo || !allowed.has(
|
|
8191
|
+
const allowed = new Set(session.paths.map((p) => path17.resolve(p).toLowerCase()));
|
|
8192
|
+
if (!repo || !allowed.has(path17.resolve(repo.root).toLowerCase())) {
|
|
8039
8193
|
return c.json({ error: `unknown repo: ${body.repo}` }, 404);
|
|
8040
8194
|
}
|
|
8041
8195
|
const file = repo.files.find((f) => f.path === body.path);
|
|
@@ -8193,10 +8347,10 @@ function mountCiRoutes(app, opts) {
|
|
|
8193
8347
|
|
|
8194
8348
|
// src/core/diff/diffs-sweep.ts
|
|
8195
8349
|
import fs16 from "fs";
|
|
8196
|
-
import
|
|
8350
|
+
import path18 from "path";
|
|
8197
8351
|
var SWEEP_AFTER_DAYS = 30;
|
|
8198
8352
|
var DISPOSABLE = /\.(html|log)$/i;
|
|
8199
|
-
function sweepOldDiffArtifacts(now = Date.now(), maxAgeDays = SWEEP_AFTER_DAYS, dir =
|
|
8353
|
+
function sweepOldDiffArtifacts(now = Date.now(), maxAgeDays = SWEEP_AFTER_DAYS, dir = path18.join(getConfigDir(), "diffs")) {
|
|
8200
8354
|
const cutoff = now - maxAgeDays * 24 * 60 * 60 * 1e3;
|
|
8201
8355
|
let removed = 0;
|
|
8202
8356
|
let bytes = 0;
|
|
@@ -8208,7 +8362,7 @@ function sweepOldDiffArtifacts(now = Date.now(), maxAgeDays = SWEEP_AFTER_DAYS,
|
|
|
8208
8362
|
}
|
|
8209
8363
|
for (const name of names) {
|
|
8210
8364
|
if (!DISPOSABLE.test(name)) continue;
|
|
8211
|
-
const file =
|
|
8365
|
+
const file = path18.join(dir, name);
|
|
8212
8366
|
try {
|
|
8213
8367
|
const st = fs16.statSync(file);
|
|
8214
8368
|
if (!st.isFile() || st.mtimeMs >= cutoff) continue;
|
|
@@ -8559,6 +8713,41 @@ function mountAccountRoutes(app, opts) {
|
|
|
8559
8713
|
return c.json({ error: e instanceof Error ? e.message : String(e) }, 502);
|
|
8560
8714
|
}
|
|
8561
8715
|
});
|
|
8716
|
+
const planSummary = (n, from, to) => n === 0 ? `${to} already has ${from}'s setup: nothing to copy.` : `${n} thing${n === 1 ? "" : "s"} to copy from ${from} to ${to}.`;
|
|
8717
|
+
app.get("/api/accounts/:name/setup", (c) => {
|
|
8718
|
+
const accounts = accountsNow();
|
|
8719
|
+
const from = c.req.query("from") ?? "";
|
|
8720
|
+
const to = c.req.param("name");
|
|
8721
|
+
if (!accounts?.admin?.setupPlan) return c.json({ error: "its accounts have no setup to copy" }, 409);
|
|
8722
|
+
if (!from) return c.json({ error: "from is required" }, 400);
|
|
8723
|
+
try {
|
|
8724
|
+
const items = accounts.admin.setupPlan(from, to);
|
|
8725
|
+
return c.json({ from, to, summary: planSummary(items.length, from, to), items });
|
|
8726
|
+
} catch (e) {
|
|
8727
|
+
return refused(c, e);
|
|
8728
|
+
}
|
|
8729
|
+
});
|
|
8730
|
+
app.post("/api/accounts/:name/setup", zValidator8("json", z7.object({ from: z7.string().min(1).max(64) })), async (c) => {
|
|
8731
|
+
const accounts = accountsNow();
|
|
8732
|
+
const no = cantManage(accounts);
|
|
8733
|
+
if (no) return c.json({ error: no }, 409);
|
|
8734
|
+
if (!accounts?.admin?.copySetup) return c.json({ error: "its accounts have no setup to copy" }, 409);
|
|
8735
|
+
const { from } = c.req.valid("json");
|
|
8736
|
+
const to = c.req.param("name");
|
|
8737
|
+
try {
|
|
8738
|
+
const items = await accounts.admin.copySetup(from, to);
|
|
8739
|
+
const ok = items.filter((i) => i.ok).length;
|
|
8740
|
+
changed();
|
|
8741
|
+
return c.json({
|
|
8742
|
+
from,
|
|
8743
|
+
to,
|
|
8744
|
+
summary: items.length === 0 ? planSummary(0, from, to) : `Copied ${ok} of ${items.length} thing${items.length === 1 ? "" : "s"} from ${from} to ${to}${ok < items.length ? `; ${items.length - ok} failed` : ""}. Restart a session's Claude for it to see them.`,
|
|
8745
|
+
items
|
|
8746
|
+
});
|
|
8747
|
+
} catch (e) {
|
|
8748
|
+
return refused(c, e);
|
|
8749
|
+
}
|
|
8750
|
+
});
|
|
8562
8751
|
app.post("/api/accounts/:name/sessions", zValidator8("json", z7.object({ from: z7.string().min(1).max(64).optional() })), async (c) => {
|
|
8563
8752
|
if (opts.lookOnly) return c.json({ error: opts.lookOnly }, 409);
|
|
8564
8753
|
const to = c.req.param("name");
|
|
@@ -8768,7 +8957,7 @@ var LEFTOVERS_EVERY_MS = 60 * 6e4;
|
|
|
8768
8957
|
function computeSessionDiff(s, base) {
|
|
8769
8958
|
const resolved = s.paths.map((p) => resolveRepoDiff(p, base, s.baseBranches?.[p] ?? s.baseBranch));
|
|
8770
8959
|
const repos = s.paths.map((p, i) => ({
|
|
8771
|
-
name:
|
|
8960
|
+
name: path19.basename(p),
|
|
8772
8961
|
root: p,
|
|
8773
8962
|
resolvedBase: resolved[i].resolvedBase,
|
|
8774
8963
|
files: computeDiff({ root: p, diffArg: resolved[i].diffArg })
|
|
@@ -8872,7 +9061,7 @@ async function startWebServer(opts = {}) {
|
|
|
8872
9061
|
}, 500);
|
|
8873
9062
|
}
|
|
8874
9063
|
});
|
|
8875
|
-
const repoNames = (s) => s.isGroup ? s.paths.map((p) =>
|
|
9064
|
+
const repoNames = (s) => s.isGroup ? s.paths.map((p) => path19.basename(p)) : [s.target];
|
|
8876
9065
|
const diffStatFor = (id, s, hasStatus) => wantsDiffStat(s, hasStatus) ? diffStats.get(id, s.paths, repoNames(s)) : null;
|
|
8877
9066
|
const archivedRow = createArchivedRows();
|
|
8878
9067
|
app.get("/api/sessions", (c) => {
|
|
@@ -9427,8 +9616,16 @@ async function startWebServer(opts = {}) {
|
|
|
9427
9616
|
prepare: (session, repo) => prepareLocalReview(session, repo, {
|
|
9428
9617
|
diff: (s) => computeSessionDiff(s, "branch"),
|
|
9429
9618
|
agent: (prompt) => runInternal(prompt, 24e4, { lane: "localReviews" }),
|
|
9619
|
+
// Read-only in the session's own folder when the agent can: it then answers what the diff leaves open.
|
|
9620
|
+
inTree: (s, names) => localTreeRun(s.paths, names, {
|
|
9621
|
+
readOnly: internalReadOnly,
|
|
9622
|
+
run: (prompt, cwd, deny) => runInternalReadOnly(prompt, cwd, LOCAL_TREE_TIMEOUT_MS, { lane: "localReviews", deny }),
|
|
9623
|
+
exists: (dir) => fs17.existsSync(dir)
|
|
9624
|
+
}),
|
|
9430
9625
|
rules: () => rulesWith(loadConfig()?.reviews?.rules)
|
|
9431
9626
|
}),
|
|
9627
|
+
signature: (s, repo) => localSignature(computeSessionDiff(s, "branch"), repo ?? void 0),
|
|
9628
|
+
store: { read: readLocalReview, save: saveLocalReview, drop: dropLocalReview },
|
|
9432
9629
|
tell: noteThroughComments(app),
|
|
9433
9630
|
broadcast
|
|
9434
9631
|
});
|
|
@@ -9592,10 +9789,10 @@ function startAccountSync(deps) {
|
|
|
9592
9789
|
|
|
9593
9790
|
// src/core/platform/autostart.ts
|
|
9594
9791
|
import fs18 from "fs";
|
|
9595
|
-
import
|
|
9792
|
+
import path20 from "path";
|
|
9596
9793
|
function startupScriptPath() {
|
|
9597
9794
|
if (process.platform !== "win32" || !process.env.APPDATA) return null;
|
|
9598
|
-
return
|
|
9795
|
+
return path20.join(process.env.APPDATA, "Microsoft", "Windows", "Start Menu", "Programs", "Startup", "work-web.vbs");
|
|
9599
9796
|
}
|
|
9600
9797
|
function vbsQuote(s) {
|
|
9601
9798
|
return '"' + s.replace(/"/g, '""') + '"';
|
|
@@ -9613,7 +9810,7 @@ function setAutostart(enabled, workBin) {
|
|
|
9613
9810
|
const file = startupScriptPath();
|
|
9614
9811
|
if (!file) throw new Error("Autostart is only supported on Windows so far.");
|
|
9615
9812
|
if (enabled) {
|
|
9616
|
-
fs18.mkdirSync(
|
|
9813
|
+
fs18.mkdirSync(path20.dirname(file), { recursive: true });
|
|
9617
9814
|
fs18.writeFileSync(file, buildStartupScript(process.execPath, workBin), "utf-8");
|
|
9618
9815
|
} else {
|
|
9619
9816
|
try {
|
|
@@ -9634,14 +9831,14 @@ async function demoHostSubmit(url, review) {
|
|
|
9634
9831
|
};
|
|
9635
9832
|
return { ok: true, url: `${url}#pullrequestreview-1` };
|
|
9636
9833
|
}
|
|
9637
|
-
var hunk = (
|
|
9834
|
+
var hunk = (path22, lines, status = "modified") => {
|
|
9638
9835
|
const added = lines.filter((l) => l.startsWith("+")).length;
|
|
9639
9836
|
const deleted = lines.filter((l) => l.startsWith("-")).length;
|
|
9640
9837
|
const context = lines.length - added - deleted;
|
|
9641
9838
|
return [
|
|
9642
|
-
`diff --git a/${
|
|
9643
|
-
...status === "added" ? ["new file mode 100644", "index 0000000..1111111", "--- /dev/null"] : ["index 1111111..2222222 100644", `--- a/${
|
|
9644
|
-
`+++ b/${
|
|
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}`,
|
|
9645
9842
|
`@@ -${status === "added" ? 0 : 1},${status === "added" ? 0 : context + deleted} +1,${context + added} @@`,
|
|
9646
9843
|
...lines
|
|
9647
9844
|
].join("\n");
|
|
@@ -10139,7 +10336,7 @@ function createDemoRepos(liveTargets) {
|
|
|
10139
10336
|
/** GET /api/projects: what New worktree offers, as the real one reads config. */
|
|
10140
10337
|
projects() {
|
|
10141
10338
|
return {
|
|
10142
|
-
singles: Object.entries(repos).map(([name,
|
|
10339
|
+
singles: Object.entries(repos).map(([name, path22]) => ({ name, kind: "single", path: path22 })),
|
|
10143
10340
|
groups: Object.entries(groups).map(([name, members]) => ({ name, kind: "group", members }))
|
|
10144
10341
|
};
|
|
10145
10342
|
},
|
|
@@ -10181,12 +10378,12 @@ function createDemoRepos(liveTargets) {
|
|
|
10181
10378
|
}));
|
|
10182
10379
|
return { roots: [root], repos: rows, groups: groupRows };
|
|
10183
10380
|
},
|
|
10184
|
-
enroll(alias,
|
|
10185
|
-
if (!found.some((f) => f.path ===
|
|
10186
|
-
const problem = enrollProblem(alias,
|
|
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());
|
|
10187
10384
|
if (problem) throw new DemoRepoError(problem);
|
|
10188
|
-
repos[alias] =
|
|
10189
|
-
ignored.delete(
|
|
10385
|
+
repos[alias] = path22;
|
|
10386
|
+
ignored.delete(path22);
|
|
10190
10387
|
},
|
|
10191
10388
|
remove(alias, force) {
|
|
10192
10389
|
if (!(alias in repos)) throw new DemoRepoError(`no repo \u201C${alias}\u201D`);
|
|
@@ -10195,9 +10392,9 @@ function createDemoRepos(liveTargets) {
|
|
|
10195
10392
|
delete repos[alias];
|
|
10196
10393
|
for (const g2 of Object.keys(groups)) groups[g2] = groups[g2].filter((m) => m !== alias);
|
|
10197
10394
|
},
|
|
10198
|
-
ignore(
|
|
10199
|
-
if (on) ignored.add(
|
|
10200
|
-
else ignored.delete(
|
|
10395
|
+
ignore(path22, on) {
|
|
10396
|
+
if (on) ignored.add(path22);
|
|
10397
|
+
else ignored.delete(path22);
|
|
10201
10398
|
},
|
|
10202
10399
|
saveGroup(name, members, creating) {
|
|
10203
10400
|
const problem = groupProblem(name, members, config(), { creating });
|
|
@@ -11437,15 +11634,15 @@ ${reply}\r
|
|
|
11437
11634
|
if (refusal || !s) return { ok: false, status: refusal?.status ?? 404, error: refusal?.error ?? "unknown session" };
|
|
11438
11635
|
s.repos.push({ name: alias, uncommitted: "", sinceBranch: "", published: false, pr: null });
|
|
11439
11636
|
const from = base || "main";
|
|
11440
|
-
const
|
|
11637
|
+
const path22 = this.wire(s).paths[s.repos.length - 1];
|
|
11441
11638
|
s.comments.post({
|
|
11442
11639
|
side: "general",
|
|
11443
11640
|
status: "published",
|
|
11444
|
-
body: addedRepoNote({ alias, path:
|
|
11641
|
+
body: addedRepoNote({ alias, path: path22, branch: s.branch, from, imported: true })
|
|
11445
11642
|
});
|
|
11446
11643
|
this.emit("comments-changed", { sessionId: id });
|
|
11447
11644
|
this.changed();
|
|
11448
|
-
return { ok: true, wire: { ok: true, path:
|
|
11645
|
+
return { ok: true, wire: { ok: true, path: path22, branch: s.branch, created: true, from, imported: true, warnings: [] } };
|
|
11449
11646
|
}
|
|
11450
11647
|
// -- CI (the PR watch, simulated) ------------------------------------------
|
|
11451
11648
|
/** The Today digest, through the same builder as work web: the demo's
|
|
@@ -12023,20 +12220,20 @@ function demoCodeFiles(repos, group) {
|
|
|
12023
12220
|
})
|
|
12024
12221
|
};
|
|
12025
12222
|
}
|
|
12026
|
-
function demoCodeFile(repos, group, repo,
|
|
12223
|
+
function demoCodeFile(repos, group, repo, path22) {
|
|
12027
12224
|
if (repo === "") {
|
|
12028
|
-
if (!group ||
|
|
12225
|
+
if (!group || path22 !== "CLAUDE.md") return null;
|
|
12029
12226
|
const text2 = `# Group instructions
|
|
12030
12227
|
|
|
12031
12228
|
Repos: ${repos.map((r2) => r2.name).join(", ")}.
|
|
12032
12229
|
`;
|
|
12033
|
-
return { repo, path:
|
|
12230
|
+
return { repo, path: path22, size: text2.length, text: text2 };
|
|
12034
12231
|
}
|
|
12035
12232
|
const r = repos.find((x) => x.name === repo);
|
|
12036
12233
|
if (!r) return null;
|
|
12037
|
-
const changed = r.changed.find((f) => f.path ===
|
|
12038
|
-
const text = changed ? newSide(changed) : COMMON[
|
|
12039
|
-
return text === void 0 ? null : { repo, path:
|
|
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 };
|
|
12040
12237
|
}
|
|
12041
12238
|
function demoCodeSearch(repos, group, query) {
|
|
12042
12239
|
const q = query.trim();
|
|
@@ -12045,12 +12242,12 @@ function demoCodeSearch(repos, group, query) {
|
|
|
12045
12242
|
const text = [];
|
|
12046
12243
|
const fold = (x) => ignoresCase(q) ? x.toLowerCase() : x;
|
|
12047
12244
|
for (const r of demoCodeFiles(repos, group).repos) {
|
|
12048
|
-
for (const
|
|
12049
|
-
const lines = (demoCodeFile(repos, group, r.name,
|
|
12245
|
+
for (const path22 of r.files) {
|
|
12246
|
+
const lines = (demoCodeFile(repos, group, r.name, path22)?.text ?? "").split("\n");
|
|
12050
12247
|
lines.forEach((line, i) => {
|
|
12051
|
-
const d = declarationOf(
|
|
12052
|
-
if (d) symbols.push({ ...d, repo: r.name, path:
|
|
12053
|
-
if (fold(line).includes(fold(q))) text.push({ repo: r.name, path:
|
|
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 });
|
|
12054
12251
|
});
|
|
12055
12252
|
}
|
|
12056
12253
|
}
|
|
@@ -12321,13 +12518,13 @@ function createDemoSettings(repoPathOf) {
|
|
|
12321
12518
|
};
|
|
12322
12519
|
return {
|
|
12323
12520
|
read,
|
|
12324
|
-
async write(
|
|
12325
|
-
const f = settingAt(
|
|
12326
|
-
if (!f) throw new SettingsError(`no setting ${
|
|
12521
|
+
async write(path22, value) {
|
|
12522
|
+
const f = settingAt(path22);
|
|
12523
|
+
if (!f) throw new SettingsError(`no setting ${path22}`, 404);
|
|
12327
12524
|
const r = checkSetting(f, value);
|
|
12328
12525
|
if (!r.ok) throw new SettingsError(`${f.label}: ${r.error}`);
|
|
12329
|
-
if (r.value === null) delete values[
|
|
12330
|
-
else values[
|
|
12526
|
+
if (r.value === null) delete values[path22];
|
|
12527
|
+
else values[path22] = r.value;
|
|
12331
12528
|
return read();
|
|
12332
12529
|
},
|
|
12333
12530
|
readRepo,
|
|
@@ -12533,6 +12730,25 @@ async function startDemoServer(opts) {
|
|
|
12533
12730
|
broadcast({ event: "session-review-changed", data: { sessionId: w.id } });
|
|
12534
12731
|
return c.json(demoLocalReview(w));
|
|
12535
12732
|
});
|
|
12733
|
+
const demoDismissed = /* @__PURE__ */ new Map();
|
|
12734
|
+
app.post("/api/sessions/:id/review/dismiss", async (c) => {
|
|
12735
|
+
const w = scenario.list().find((x) => x.id === c.req.param("id"));
|
|
12736
|
+
if (!w) return notFound(c);
|
|
12737
|
+
const body = await json2(c);
|
|
12738
|
+
const review = demoLocalReview(w).review;
|
|
12739
|
+
if (typeof body.id !== "string" || !review?.drafts.some((d) => d.id === body.id))
|
|
12740
|
+
return c.json({ error: "no such note in the review prepared for it" }, 404);
|
|
12741
|
+
const set = demoDismissed.get(w.id) ?? /* @__PURE__ */ new Set();
|
|
12742
|
+
if (body.undo === true) set.delete(body.id);
|
|
12743
|
+
else set.add(body.id);
|
|
12744
|
+
demoDismissed.set(w.id, set);
|
|
12745
|
+
return c.json({ ...demoLocalReview(w), sent: [], dismissed: [...set] });
|
|
12746
|
+
});
|
|
12747
|
+
app.get("/api/sessions/:id/review/current", (c) => {
|
|
12748
|
+
const w = scenario.list().find((x) => x.id === c.req.param("id"));
|
|
12749
|
+
if (!w) return notFound(c);
|
|
12750
|
+
return localReviews.has(w.id) ? c.json({ current: true }) : c.json({ error: "no review of it is prepared" }, 404);
|
|
12751
|
+
});
|
|
12536
12752
|
app.get("/api/sessions/:id/review/diff", (c) => {
|
|
12537
12753
|
const w = scenario.list().find((x) => x.id === c.req.param("id"));
|
|
12538
12754
|
if (!w) return notFound(c);
|
|
@@ -13225,6 +13441,36 @@ async function startDemoServer(opts) {
|
|
|
13225
13441
|
scenario.accountsChanged();
|
|
13226
13442
|
return c.json({ ok: true, installingSkills: false });
|
|
13227
13443
|
});
|
|
13444
|
+
const demoSetup = (from, to, done) => ({
|
|
13445
|
+
from,
|
|
13446
|
+
to,
|
|
13447
|
+
summary: done ? `Copied 3 of 3 things from ${from} to ${to}. Restart a session's Claude for it to see them.` : `3 things to copy from ${from} to ${to}.`,
|
|
13448
|
+
items: [
|
|
13449
|
+
{ kind: "file", name: "CLAUDE.md", does: "adds", ...done ? { ok: true } : {} },
|
|
13450
|
+
{
|
|
13451
|
+
kind: "mcp",
|
|
13452
|
+
name: "atlassian",
|
|
13453
|
+
does: "adds",
|
|
13454
|
+
note: `needs its own sign-in on ${to}: /mcp \u2192 atlassian \u2192 Authenticate`,
|
|
13455
|
+
...done ? { ok: true } : {}
|
|
13456
|
+
},
|
|
13457
|
+
{
|
|
13458
|
+
kind: "plugin",
|
|
13459
|
+
name: "typescript-lsp@claude-plugins-official",
|
|
13460
|
+
does: "adds",
|
|
13461
|
+
note: "installed from its marketplace",
|
|
13462
|
+
...done ? { ok: true } : {}
|
|
13463
|
+
}
|
|
13464
|
+
]
|
|
13465
|
+
});
|
|
13466
|
+
app.get("/api/accounts/:name/setup", (c) => {
|
|
13467
|
+
const from = c.req.query("from") ?? "";
|
|
13468
|
+
return from ? c.json(demoSetup(from, c.req.param("name"), false)) : c.json({ error: "from is required" }, 400);
|
|
13469
|
+
});
|
|
13470
|
+
app.post("/api/accounts/:name/setup", async (c) => {
|
|
13471
|
+
const from = (await json2(c)).from;
|
|
13472
|
+
return typeof from === "string" && from ? c.json(demoSetup(from, c.req.param("name"), true)) : c.json({ error: "from is required" }, 400);
|
|
13473
|
+
});
|
|
13228
13474
|
app.post("/api/accounts/:name/sessions", async (c) => {
|
|
13229
13475
|
const to = c.req.param("name");
|
|
13230
13476
|
const from = (await json2(c)).from;
|
|
@@ -13439,8 +13685,8 @@ async function startDemoServer(opts) {
|
|
|
13439
13685
|
|
|
13440
13686
|
// src/core/platform/web-life.ts
|
|
13441
13687
|
import fs19 from "fs";
|
|
13442
|
-
import
|
|
13443
|
-
var lifePath = () =>
|
|
13688
|
+
import path21 from "path";
|
|
13689
|
+
var lifePath = () => path21.join(getConfigDir(), "web-life.json");
|
|
13444
13690
|
function isLife(v) {
|
|
13445
13691
|
const l = v;
|
|
13446
13692
|
return !!l && typeof l === "object" && typeof l.pid === "number" && typeof l.version === "string" && typeof l.startedAt === "string" && typeof l.lastSeen === "string" && (l.ended === void 0 || typeof l.ended?.at === "string" && typeof l.ended?.how === "string");
|
|
@@ -13830,4 +14076,4 @@ export {
|
|
|
13830
14076
|
stopExisting,
|
|
13831
14077
|
webCommand
|
|
13832
14078
|
};
|
|
13833
|
-
//# sourceMappingURL=web-
|
|
14079
|
+
//# sourceMappingURL=web-E657YMOA.js.map
|