@moberg_hr/work-tree 2.3.1 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -1
- package/dist/add-repo-5SYBDVG2.js +384 -0
- package/dist/add-repo-5SYBDVG2.js.map +1 -0
- package/dist/{answer-UWI22VOE.js → answer-OA2WTJCZ.js} +11 -11
- package/dist/{attach-HYHEXW5J.js → attach-5GXPA7BV.js} +14 -14
- package/dist/bin.js +5 -5
- package/dist/{block-A25XE7HC.js → block-VINEC2MW.js} +11 -11
- package/dist/{broadcast-AG7P5BKQ.js → broadcast-ENAJDNVU.js} +8 -8
- package/dist/{catchup-VTGG7BAR.js → catchup-NC4WHSBF.js} +14 -14
- package/dist/{chunk-XDBMLTFY.js → chunk-3HBHM2VX.js} +4 -4
- package/dist/chunk-3IOIY4W6.js +39 -0
- package/dist/chunk-3IOIY4W6.js.map +1 -0
- package/dist/{chunk-7OBX4MJY.js → chunk-3KOYICWB.js} +4 -4
- package/dist/{chunk-HWIRY3WO.js → chunk-3NISM3OI.js} +7 -6
- package/dist/chunk-3NISM3OI.js.map +1 -0
- package/dist/{chunk-ZSXMIPU4.js → chunk-3Q6S6TRY.js} +3 -3
- package/dist/{chunk-MEK7BIVS.js → chunk-45X4QO4V.js} +37 -17
- package/dist/chunk-45X4QO4V.js.map +1 -0
- package/dist/{chunk-3D63HGOG.js → chunk-4ETSGWB2.js} +3 -3
- package/dist/{chunk-IVPV6VPW.js → chunk-4VNUU6S6.js} +3 -3
- package/dist/{chunk-7W6I4VXA.js → chunk-65YMLGQB.js} +7 -7
- package/dist/{chunk-C3E7XETB.js → chunk-6KM2C2UO.js} +7 -7
- package/dist/{chunk-R5QLAXNJ.js → chunk-6SJOM62D.js} +2 -2
- package/dist/{chunk-ROLNJOSE.js → chunk-A53IRCOO.js} +2 -1
- package/dist/chunk-A53IRCOO.js.map +1 -0
- package/dist/{chunk-QQNPAZNP.js → chunk-AC6N2EIN.js} +12 -11
- package/dist/{chunk-QQNPAZNP.js.map → chunk-AC6N2EIN.js.map} +1 -1
- package/dist/{chunk-YIODX4PM.js → chunk-AKGDIBSE.js} +2 -2
- package/dist/{chunk-HWP4NEYL.js → chunk-BCPH3SZM.js} +2 -2
- package/dist/{chunk-4P533364.js → chunk-BO3BNBBE.js} +7 -7
- package/dist/{chunk-KNYEQLIF.js → chunk-BURVDS7U.js} +2 -2
- package/dist/{chunk-MF6LDFDW.js → chunk-C224P3D3.js} +2 -2
- package/dist/{chunk-B3HIALTV.js → chunk-CGJGWALF.js} +2 -2
- package/dist/{chunk-CALBDLDJ.js → chunk-DHBKD2TG.js} +3 -3
- package/dist/{chunk-PIEYQBWL.js → chunk-EASMYJG3.js} +13 -12
- package/dist/chunk-EASMYJG3.js.map +1 -0
- package/dist/{chunk-EOETYHTD.js → chunk-FRCV6NWT.js} +2 -2
- package/dist/{chunk-GOHSGTR5.js → chunk-FXHTSSV2.js} +3 -3
- package/dist/{chunk-NER44YB7.js → chunk-FXIEYT6L.js} +8 -8
- package/dist/{chunk-WRUQPVTS.js → chunk-GDCTRDUY.js} +4 -4
- package/dist/{chunk-DRYY4BPY.js → chunk-I2TUJLI4.js} +5 -5
- package/dist/{chunk-IJ6YYFXY.js → chunk-IOSB2HMV.js} +3 -3
- package/dist/{chunk-S5RS4YZT.js → chunk-IZSMQ6X2.js} +67 -56
- package/dist/chunk-IZSMQ6X2.js.map +1 -0
- package/dist/{chunk-5EGGS6Y6.js → chunk-JCCGLFMU.js} +94 -56
- package/dist/chunk-JCCGLFMU.js.map +1 -0
- package/dist/{chunk-Y2HNFNCS.js → chunk-JCMGIW7G.js} +5 -3
- package/dist/chunk-JCMGIW7G.js.map +1 -0
- package/dist/{chunk-YV2MPIFG.js → chunk-JDW4GXEA.js} +4 -4
- package/dist/chunk-JUGSJ37Z.js +9 -0
- package/dist/{chunk-LMLVJEY7.js → chunk-L3JK6V5I.js} +2 -2
- package/dist/{chunk-T6YP6GPK.js → chunk-L7OQ7O4K.js} +3 -3
- package/dist/{chunk-WMOXIFBF.js → chunk-LYKWTHOD.js} +38 -10
- package/dist/chunk-LYKWTHOD.js.map +1 -0
- package/dist/{chunk-KPGO5VFR.js → chunk-M2TQNGMD.js} +5 -5
- package/dist/{chunk-Y33WKESH.js → chunk-MAFJE26N.js} +2 -2
- package/dist/{chunk-CIAXJC5H.js → chunk-MM32YZT6.js} +4 -4
- package/dist/{chunk-OB63GDEC.js → chunk-OESAI3XS.js} +2 -2
- package/dist/{chunk-722K7XWW.js → chunk-PLOO7NQU.js} +4 -4
- package/dist/{chunk-DMUZIBPM.js → chunk-R2SR3PER.js} +10 -4
- package/dist/chunk-R2SR3PER.js.map +1 -0
- package/dist/{chunk-B2Q5BYOD.js → chunk-R7334LAS.js} +5 -5
- package/dist/{chunk-NM4SABMQ.js → chunk-RFQRVXFQ.js} +529 -424
- package/dist/chunk-RFQRVXFQ.js.map +1 -0
- package/dist/{chunk-U3NYRIFH.js → chunk-S4ILKUFN.js} +13 -3
- package/dist/{chunk-U3NYRIFH.js.map → chunk-S4ILKUFN.js.map} +1 -1
- package/dist/{chunk-H7KH5CDM.js → chunk-SBRHGEFP.js} +3 -3
- package/dist/{chunk-CGMFZOS5.js → chunk-VES42DOD.js} +236 -81
- package/dist/chunk-VES42DOD.js.map +1 -0
- package/dist/chunk-VGQV4LX7.js +33 -0
- package/dist/chunk-VGQV4LX7.js.map +1 -0
- package/dist/{chunk-OBFHGN7Q.js → chunk-WOAFMVKW.js} +2 -2
- package/dist/{chunk-TKL4B2OI.js → chunk-WUJJ2FTK.js} +8 -4
- package/dist/chunk-WUJJ2FTK.js.map +1 -0
- package/dist/{chunk-CFO2JMKW.js → chunk-XEIREYW6.js} +29 -25
- package/dist/chunk-XEIREYW6.js.map +1 -0
- package/dist/{chunk-QDKLIYGR.js → chunk-XZ5DA5X4.js} +14 -3
- package/dist/{chunk-QDKLIYGR.js.map → chunk-XZ5DA5X4.js.map} +1 -1
- package/dist/{chunk-TBOE7DG5.js → chunk-YDYHURVA.js} +2 -2
- package/dist/{chunk-75I3DHVU.js → chunk-ZFSV65M5.js} +3 -3
- package/dist/{chunk-RFE4EBUP.js → chunk-ZHKE637Q.js} +3 -3
- package/dist/{cleanup-Q6AQXSRS.js → cleanup-7VJ4KUMR.js} +28 -27
- package/dist/{cleanup-Q6AQXSRS.js.map → cleanup-7VJ4KUMR.js.map} +1 -1
- package/dist/cli-RFG23HUW.js +18 -0
- package/dist/{command-hook-installer-2ZFJJGKY.js → command-hook-installer-PTTVCWH7.js} +4 -4
- package/dist/{config-DOPH6NOU.js → config-CREG6OI3.js} +9 -9
- package/dist/{diff-DZJLSTRO.js → diff-UYXZID2B.js} +12 -12
- package/dist/{digest-QTNPN2E6.js → digest-I5Z6W2EP.js} +10 -10
- package/dist/{fork-HDJ54HH2.js → fork-5AOB45N2.js} +26 -25
- package/dist/{fork-HDJ54HH2.js.map → fork-5AOB45N2.js.map} +1 -1
- package/dist/history-3LFLB4FO.js +55 -0
- package/dist/{hook-V7JNOY2E.js → hook-SJOCXGLD.js} +14 -14
- package/dist/{hydrate-NGZ26R2Y.js → hydrate-YEJCVZZ7.js} +29 -12
- package/dist/hydrate-YEJCVZZ7.js.map +1 -0
- package/dist/{init-BQIBLPP5.js → init-6F67TVM7.js} +9 -9
- package/dist/{install-skills-LCXJIHK4.js → install-skills-ESCNSPBY.js} +4 -4
- package/dist/install-skills-bin.js +3 -3
- package/dist/{list-4KATUVO3.js → list-NHZUEVTA.js} +32 -12
- package/dist/list-NHZUEVTA.js.map +1 -0
- package/dist/{move-LYO5J2ZH.js → move-JICK4XA5.js} +25 -23
- package/dist/{move-LYO5J2ZH.js.map → move-JICK4XA5.js.map} +1 -1
- package/dist/{note-7XR4YA6R.js → note-KZMWEGZP.js} +11 -11
- package/dist/{overlaps-5WKQT3LX.js → overlaps-O353DOQI.js} +9 -9
- package/dist/{pin-GJM3KSG7.js → pin-7CON36HF.js} +11 -11
- package/dist/{pr-YO7XSYUA.js → pr-4KUGJDZ2.js} +14 -14
- package/dist/{prune-BUGPJLLO.js → prune-KQ77276H.js} +27 -26
- package/dist/{prune-BUGPJLLO.js.map → prune-KQ77276H.js.map} +1 -1
- package/dist/{pty-host-O5H4FKWF.js → pty-host-MSCJGN5G.js} +10 -10
- package/dist/{read-XMU63E3F.js → read-J42H6OVE.js} +10 -10
- package/dist/{recent-73SHXIFU.js → recent-BZQP3RKA.js} +10 -10
- package/dist/recent-BZQP3RKA.js.map +1 -0
- package/dist/{remove-ZXDVVOHF.js → remove-GRRKSGS7.js} +28 -27
- package/dist/{remove-ZXDVVOHF.js.map → remove-GRRKSGS7.js.map} +1 -1
- package/dist/report-BSETCIYQ.js +18 -0
- package/dist/{restart-S4D7LD3A.js → restart-REFEZGH2.js} +11 -11
- package/dist/{resume-YIIQIJCS.js → resume-RGP2BCKL.js} +10 -10
- package/dist/resume-RGP2BCKL.js.map +1 -0
- package/dist/{run-WN2O7EX7.js → run-WYDFP6EL.js} +7 -7
- package/dist/{screen-LX6XHNYN.js → screen-YWJLDINC.js} +11 -11
- package/dist/{search-DCDJVBKW.js → search-M4DU4GUB.js} +7 -7
- package/dist/{section-XD46IHMW.js → section-AYN6EHPO.js} +11 -11
- package/dist/{send-P4NILVGL.js → send-O3SI53O7.js} +16 -16
- package/dist/{sessions-POSS5NRV.js → sessions-4BASM7AC.js} +20 -20
- package/dist/{snooze-ONAR2WNP.js → snooze-F3NT7PZO.js} +10 -10
- package/dist/{start-6YKHYYX5.js → start-7OQNLGDU.js} +11 -11
- package/dist/{state-NV4FQNMT.js → state-NRK5CBXZ.js} +5 -5
- package/dist/{status-KYRZRITO.js → status-HLOEWXJ3.js} +8 -8
- package/dist/{stop-QU372WAY.js → stop-YRGANOU7.js} +11 -11
- package/dist/{sync-JR24WVJ7.js → sync-YDK5R7XQ.js} +27 -26
- package/dist/{sync-JR24WVJ7.js.map → sync-YDK5R7XQ.js.map} +1 -1
- package/dist/{time-FYXXC5XC.js → time-T5RBWMDN.js} +12 -12
- package/dist/time-actions-FLLFYEVY.js +15 -0
- package/dist/time-actions-FLLFYEVY.js.map +1 -0
- package/dist/{timesheet-57EG6ABE.js → timesheet-UB6OASXF.js} +14 -14
- package/dist/{todo-UDYY4QTY.js → todo-OE62TNES.js} +6 -6
- package/dist/{tree-RDPJOIDT.js → tree-DRDDTXQ2.js} +42 -24
- package/dist/tree-DRDDTXQ2.js.map +1 -0
- package/dist/{update-OZXFQMYI.js → update-S57YQGPG.js} +13 -13
- package/dist/{wait-3MQST3FP.js → wait-2CRY7XQ5.js} +11 -11
- package/dist/wd-bin.js +9 -9
- package/dist/web/assets/{PtyView-CVskPWtH.js → PtyView-BZ57sEm1.js} +2 -2
- package/dist/web/assets/{PtyView-CVskPWtH.js.map → PtyView-BZ57sEm1.js.map} +1 -1
- package/dist/web/assets/index-CDYWfNo_.css +1 -0
- package/dist/web/assets/index-CqTf1VAm.js +119 -0
- package/dist/web/assets/index-CqTf1VAm.js.map +1 -0
- package/dist/web/index.html +2 -2
- package/dist/{web-GYU324DV.js → web-A3VW2IYG.js} +471 -298
- package/dist/web-A3VW2IYG.js.map +1 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/dist/chunk-5EGGS6Y6.js.map +0 -1
- package/dist/chunk-72IRO7WA.js +0 -9
- package/dist/chunk-CFO2JMKW.js.map +0 -1
- package/dist/chunk-CGMFZOS5.js.map +0 -1
- package/dist/chunk-DMUZIBPM.js.map +0 -1
- package/dist/chunk-HWIRY3WO.js.map +0 -1
- package/dist/chunk-MEK7BIVS.js.map +0 -1
- package/dist/chunk-NM4SABMQ.js.map +0 -1
- package/dist/chunk-PIEYQBWL.js.map +0 -1
- package/dist/chunk-ROLNJOSE.js.map +0 -1
- package/dist/chunk-S5RS4YZT.js.map +0 -1
- package/dist/chunk-TKL4B2OI.js.map +0 -1
- package/dist/chunk-WMOXIFBF.js.map +0 -1
- package/dist/chunk-Y2HNFNCS.js.map +0 -1
- package/dist/cli-5PNLG3YH.js +0 -18
- package/dist/hydrate-NGZ26R2Y.js.map +0 -1
- package/dist/list-4KATUVO3.js.map +0 -1
- package/dist/recent-73SHXIFU.js.map +0 -1
- package/dist/report-TEIRRYH4.js +0 -16
- package/dist/resume-YIIQIJCS.js.map +0 -1
- package/dist/time-actions-L3OWQHEX.js +0 -15
- package/dist/tree-RDPJOIDT.js.map +0 -1
- package/dist/web/assets/index-CqY-C3y-.js +0 -119
- package/dist/web/assets/index-CqY-C3y-.js.map +0 -1
- package/dist/web/assets/index-YbJdcXjZ.css +0 -1
- package/dist/web-GYU324DV.js.map +0 -1
- /package/dist/{answer-UWI22VOE.js.map → answer-OA2WTJCZ.js.map} +0 -0
- /package/dist/{attach-HYHEXW5J.js.map → attach-5GXPA7BV.js.map} +0 -0
- /package/dist/{block-A25XE7HC.js.map → block-VINEC2MW.js.map} +0 -0
- /package/dist/{broadcast-AG7P5BKQ.js.map → broadcast-ENAJDNVU.js.map} +0 -0
- /package/dist/{catchup-VTGG7BAR.js.map → catchup-NC4WHSBF.js.map} +0 -0
- /package/dist/{chunk-XDBMLTFY.js.map → chunk-3HBHM2VX.js.map} +0 -0
- /package/dist/{chunk-7OBX4MJY.js.map → chunk-3KOYICWB.js.map} +0 -0
- /package/dist/{chunk-ZSXMIPU4.js.map → chunk-3Q6S6TRY.js.map} +0 -0
- /package/dist/{chunk-3D63HGOG.js.map → chunk-4ETSGWB2.js.map} +0 -0
- /package/dist/{chunk-IVPV6VPW.js.map → chunk-4VNUU6S6.js.map} +0 -0
- /package/dist/{chunk-7W6I4VXA.js.map → chunk-65YMLGQB.js.map} +0 -0
- /package/dist/{chunk-C3E7XETB.js.map → chunk-6KM2C2UO.js.map} +0 -0
- /package/dist/{chunk-R5QLAXNJ.js.map → chunk-6SJOM62D.js.map} +0 -0
- /package/dist/{chunk-YIODX4PM.js.map → chunk-AKGDIBSE.js.map} +0 -0
- /package/dist/{chunk-HWP4NEYL.js.map → chunk-BCPH3SZM.js.map} +0 -0
- /package/dist/{chunk-4P533364.js.map → chunk-BO3BNBBE.js.map} +0 -0
- /package/dist/{chunk-KNYEQLIF.js.map → chunk-BURVDS7U.js.map} +0 -0
- /package/dist/{chunk-MF6LDFDW.js.map → chunk-C224P3D3.js.map} +0 -0
- /package/dist/{chunk-B3HIALTV.js.map → chunk-CGJGWALF.js.map} +0 -0
- /package/dist/{chunk-CALBDLDJ.js.map → chunk-DHBKD2TG.js.map} +0 -0
- /package/dist/{chunk-EOETYHTD.js.map → chunk-FRCV6NWT.js.map} +0 -0
- /package/dist/{chunk-GOHSGTR5.js.map → chunk-FXHTSSV2.js.map} +0 -0
- /package/dist/{chunk-NER44YB7.js.map → chunk-FXIEYT6L.js.map} +0 -0
- /package/dist/{chunk-WRUQPVTS.js.map → chunk-GDCTRDUY.js.map} +0 -0
- /package/dist/{chunk-DRYY4BPY.js.map → chunk-I2TUJLI4.js.map} +0 -0
- /package/dist/{chunk-IJ6YYFXY.js.map → chunk-IOSB2HMV.js.map} +0 -0
- /package/dist/{chunk-YV2MPIFG.js.map → chunk-JDW4GXEA.js.map} +0 -0
- /package/dist/{chunk-72IRO7WA.js.map → chunk-JUGSJ37Z.js.map} +0 -0
- /package/dist/{chunk-LMLVJEY7.js.map → chunk-L3JK6V5I.js.map} +0 -0
- /package/dist/{chunk-T6YP6GPK.js.map → chunk-L7OQ7O4K.js.map} +0 -0
- /package/dist/{chunk-KPGO5VFR.js.map → chunk-M2TQNGMD.js.map} +0 -0
- /package/dist/{chunk-Y33WKESH.js.map → chunk-MAFJE26N.js.map} +0 -0
- /package/dist/{chunk-CIAXJC5H.js.map → chunk-MM32YZT6.js.map} +0 -0
- /package/dist/{chunk-OB63GDEC.js.map → chunk-OESAI3XS.js.map} +0 -0
- /package/dist/{chunk-722K7XWW.js.map → chunk-PLOO7NQU.js.map} +0 -0
- /package/dist/{chunk-B2Q5BYOD.js.map → chunk-R7334LAS.js.map} +0 -0
- /package/dist/{chunk-H7KH5CDM.js.map → chunk-SBRHGEFP.js.map} +0 -0
- /package/dist/{chunk-OBFHGN7Q.js.map → chunk-WOAFMVKW.js.map} +0 -0
- /package/dist/{chunk-TBOE7DG5.js.map → chunk-YDYHURVA.js.map} +0 -0
- /package/dist/{chunk-75I3DHVU.js.map → chunk-ZFSV65M5.js.map} +0 -0
- /package/dist/{chunk-RFE4EBUP.js.map → chunk-ZHKE637Q.js.map} +0 -0
- /package/dist/{cli-5PNLG3YH.js.map → cli-RFG23HUW.js.map} +0 -0
- /package/dist/{command-hook-installer-2ZFJJGKY.js.map → command-hook-installer-PTTVCWH7.js.map} +0 -0
- /package/dist/{config-DOPH6NOU.js.map → config-CREG6OI3.js.map} +0 -0
- /package/dist/{diff-DZJLSTRO.js.map → diff-UYXZID2B.js.map} +0 -0
- /package/dist/{digest-QTNPN2E6.js.map → digest-I5Z6W2EP.js.map} +0 -0
- /package/dist/{install-skills-LCXJIHK4.js.map → history-3LFLB4FO.js.map} +0 -0
- /package/dist/{hook-V7JNOY2E.js.map → hook-SJOCXGLD.js.map} +0 -0
- /package/dist/{init-BQIBLPP5.js.map → init-6F67TVM7.js.map} +0 -0
- /package/dist/{report-TEIRRYH4.js.map → install-skills-ESCNSPBY.js.map} +0 -0
- /package/dist/{note-7XR4YA6R.js.map → note-KZMWEGZP.js.map} +0 -0
- /package/dist/{overlaps-5WKQT3LX.js.map → overlaps-O353DOQI.js.map} +0 -0
- /package/dist/{pin-GJM3KSG7.js.map → pin-7CON36HF.js.map} +0 -0
- /package/dist/{pr-YO7XSYUA.js.map → pr-4KUGJDZ2.js.map} +0 -0
- /package/dist/{pty-host-O5H4FKWF.js.map → pty-host-MSCJGN5G.js.map} +0 -0
- /package/dist/{read-XMU63E3F.js.map → read-J42H6OVE.js.map} +0 -0
- /package/dist/{time-actions-L3OWQHEX.js.map → report-BSETCIYQ.js.map} +0 -0
- /package/dist/{restart-S4D7LD3A.js.map → restart-REFEZGH2.js.map} +0 -0
- /package/dist/{run-WN2O7EX7.js.map → run-WYDFP6EL.js.map} +0 -0
- /package/dist/{screen-LX6XHNYN.js.map → screen-YWJLDINC.js.map} +0 -0
- /package/dist/{search-DCDJVBKW.js.map → search-M4DU4GUB.js.map} +0 -0
- /package/dist/{section-XD46IHMW.js.map → section-AYN6EHPO.js.map} +0 -0
- /package/dist/{send-P4NILVGL.js.map → send-O3SI53O7.js.map} +0 -0
- /package/dist/{sessions-POSS5NRV.js.map → sessions-4BASM7AC.js.map} +0 -0
- /package/dist/{snooze-ONAR2WNP.js.map → snooze-F3NT7PZO.js.map} +0 -0
- /package/dist/{start-6YKHYYX5.js.map → start-7OQNLGDU.js.map} +0 -0
- /package/dist/{state-NV4FQNMT.js.map → state-NRK5CBXZ.js.map} +0 -0
- /package/dist/{status-KYRZRITO.js.map → status-HLOEWXJ3.js.map} +0 -0
- /package/dist/{stop-QU372WAY.js.map → stop-YRGANOU7.js.map} +0 -0
- /package/dist/{time-FYXXC5XC.js.map → time-T5RBWMDN.js.map} +0 -0
- /package/dist/{timesheet-57EG6ABE.js.map → timesheet-UB6OASXF.js.map} +0 -0
- /package/dist/{todo-UDYY4QTY.js.map → todo-OE62TNES.js.map} +0 -0
- /package/dist/{update-OZXFQMYI.js.map → update-S57YQGPG.js.map} +0 -0
- /package/dist/{wait-3MQST3FP.js.map → wait-2CRY7XQ5.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/core/comments/comment-file-store.ts"],"sourcesContent":["import { createCommentStore, type CommentInput, type CommentStore } from './comment-store.js';\nimport { json, tx, withDb, type Db } from '../platform/db.js';\nimport type { Comment } from './comment-types.js';\n\n/**\n * Persistent comment store: the pure in-memory model (comment-store.ts)\n * over state.db's `comments` table, one \"store\" per session id (or\n * `scope-<hash>` for a `wd` review). Every mutation runs in a write\n * transaction that first reloads the store from the database, so\n * concurrent writers in other processes (`work broadcast`, the hook, a\n * second work web tab) are never lost.\n *\n * (The name is historical: this used to be one JSON file per store.)\n */\nexport interface CommentFileStore extends CommentStore {\n /** Drop the cached in-memory store and reload from disk. */\n reload(): void;\n /** Remove every comment (memory + disk). Returns how many were removed.\n * Used when a finished scope review is re-registered — the new run\n * starts from a clean slate instead of replaying the old comments. */\n clearAll(): number;\n}\n\nfunction isComment(x: unknown): x is Comment {\n const c = x as Comment | null;\n return !!c && typeof c === 'object' && typeof c.id === 'string' && typeof c.body === 'string';\n}\n\nfunction readRows(d: Db, store: string): Comment[] {\n return (d.prepare('SELECT data FROM comments WHERE store = ? ORDER BY rowid').all(store) as Array<{ data: string }>)\n .map((r) => json.parse(r.data))\n .filter(isComment);\n}\n\n/** Replace a store's rows with `comments` (in their order). */\nfunction writeRows(d: Db, store: string, comments: Comment[]): void {\n d.prepare('DELETE FROM comments WHERE store = ?').run(store);\n const ins = d.prepare('INSERT OR REPLACE INTO comments (store, id, data) VALUES (?, ?, ?)');\n for (const c of comments) ins.run(store, c.id, JSON.stringify(c));\n}\n\n/** A store's comments straight from the database: current even when\n * another process wrote since this process cached the store. */\nexport function readStoreComments(store: string): Comment[] {\n return withDb((d) => readRows(d, store));\n}\n\n/** Several stores' comments in one query, each in its order; a store with none isn't in the map. Caches nothing\n * (getCommentFileStore keeps every store it's asked for). */\nexport function readStoresComments(stores: string[]): Map<string, Comment[]> {\n const out = new Map<string, Comment[]>();\n if (stores.length === 0) return out;\n const marks = stores.map(() => '?').join(', ');\n const rows = withDb(\n (d) =>\n d.prepare(`SELECT store, data FROM comments WHERE store IN (${marks}) ORDER BY rowid`).all(...stores) as Array<{\n store: string;\n data: string;\n }>,\n );\n for (const r of rows) {\n const c = json.parse(r.data);\n if (!isComment(c)) continue;\n const list = out.get(r.store) ?? [];\n list.push(c);\n out.set(r.store, list);\n }\n return out;\n}\n\nconst cache = new Map<string, CommentFileStore>();\n\nexport function getCommentFileStore(sessionId: string): CommentFileStore {\n const existing = cache.get(sessionId);\n if (existing) return existing;\n\n const inner = createCommentStore();\n\n /** Replace the in-memory contents with the current on-disk contents.\n * Used to reconcile before a mutation so concurrent writers (e.g. a\n * `work broadcast` process appending under the same lock) aren't lost. */\n function reloadFrom(rows: Comment[]): void {\n const list = inner.list() as Comment[];\n list.length = 0;\n for (const c of rows) list.push(c);\n }\n function reloadInner(): void {\n reloadFrom(withDb((d) => readRows(d, sessionId)));\n }\n\n // Seed from the database.\n reloadInner();\n\n /**\n * A read-modify-write of this store in one write transaction: reload the\n * in-memory model from the database (so it reflects other processes'\n * writes), apply `mutate`, persist. `persisted` reports whether anything\n * changed, so a no-op (e.g. removing a missing id) skips the write.\n */\n function lockedMutate<T>(mutate: () => { value: T; persisted: boolean }): T {\n return tx((d) => {\n reloadFrom(readRows(d, sessionId));\n const { value, persisted } = mutate();\n if (persisted) writeRows(d, sessionId, inner.snapshot());\n return value;\n });\n }\n\n const store: CommentFileStore = {\n // Reads reload first (one indexed query): `work broadcast` and the\n // hooks write to the same store from other processes, and a list\n // served from this process's memory didn't show them until something\n // here mutated. The in-memory model is for mutations, not a cache.\n list: () => {\n reloadInner();\n return inner.list();\n },\n snapshot: () => {\n reloadInner();\n return inner.snapshot();\n },\n post(input: CommentInput) {\n return lockedMutate(() => {\n const c = inner.post(input);\n return { value: c, persisted: true };\n });\n },\n remove(id: string) {\n return lockedMutate(() => {\n const r = inner.remove(id);\n return { value: r, persisted: r };\n });\n },\n setResolved(id: string, resolved: boolean) {\n return lockedMutate(() => {\n const c = inner.setResolved(id, resolved);\n return { value: c, persisted: c !== null };\n });\n },\n submit(summary: string | undefined) {\n return lockedMutate(() => {\n const result = inner.submit(summary);\n return { value: result, persisted: true };\n });\n },\n discardDrafts() {\n return lockedMutate(() => {\n const n = inner.discardDrafts();\n return { value: n, persisted: n > 0 };\n });\n },\n reload() {\n reloadInner();\n },\n clearAll() {\n return lockedMutate(() => {\n const list = inner.list() as Comment[];\n const n = list.length;\n list.length = 0;\n return { value: n, persisted: n > 0 };\n });\n },\n };\n cache.set(sessionId, store);\n return store;\n}\n\n/** Clear the in-memory cache. Test/server-shutdown hook. */\nexport function cl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IACA,OAAO,SAA6B;AAClC,aAAO,aAAa,MAAM;AACxB,cAAM,SAAS,MAAM,OAAO,OAAO;AACnC,eAAO,EAAE,OAAO,QAAQ,WAAW,KAAK;AAAA,MAC1C,CAAC;AAAA,IACH;AAAA,IACA,gBAAgB;AACd,aAAO,aAAa,MAAM;AACxB,cAAM,IAAI,MAAM,cAAc;AAC9B,eAAO,EAAE,OAAO,GAAG,WAAW,IAAI,EAAE;AAAA,MACtC,CAAC;AAAA,IACH;AAAA,IACA,SAAS;AACP,kBAAY;AAAA,IACd;AAAA,IACA,WAAW;AACT,aAAO,aAAa,MAAM;AACxB,cAAM,OAAO,MAAM,KAAK;AACxB,cAAM,IAAI,KAAK;AACf,aAAK,SAAS;AACd,eAAO,EAAE,OAAO,GAAG,WAAW,IAAI,EAAE;AAAA,MACtC,CAAC;AAAA,IACH;AAAA,EACF;AACA,QAAM,IAAI,WAAW,KAAK;AAC1B,SAAO;AACT;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/core/comments/comment-file-store.ts"],"sourcesContent":["import { createCommentStore, type CommentInput, type CommentStore } from './comment-store.js';\nimport { json, tx, withDb, type Db } from '../platform/db.js';\nimport type { Comment } from './comment-types.js';\n\n/**\n * Persistent comment store: the pure in-memory model (comment-store.ts)\n * over state.db's `comments` table, one \"store\" per session id (or\n * `scope-<hash>` for a `wd` review). Every mutation runs in a write\n * transaction that first reloads the store from the database, so\n * concurrent writers in other processes (`work broadcast`, the hook, a\n * second work web tab) are never lost.\n *\n * (The name is historical: this used to be one JSON file per store.)\n */\nexport interface CommentFileStore extends CommentStore {\n /** Drop the cached in-memory store and reload from disk. */\n reload(): void;\n /** Remove every comment (memory + disk). Returns how many were removed.\n * Used when a finished scope review is re-registered — the new run\n * starts from a clean slate instead of replaying the old comments. */\n clearAll(): number;\n}\n\nfunction isComment(x: unknown): x is Comment {\n const c = x as Comment | null;\n return !!c && typeof c === 'object' && typeof c.id === 'string' && typeof c.body === 'string';\n}\n\nfunction readRows(d: Db, store: string): Comment[] {\n return (d.prepare('SELECT data FROM comments WHERE store = ? ORDER BY rowid').all(store) as Array<{ data: string }>)\n .map((r) => json.parse(r.data))\n .filter(isComment);\n}\n\n/** Replace a store's rows with `comments` (in their order). */\nfunction writeRows(d: Db, store: string, comments: Comment[]): void {\n d.prepare('DELETE FROM comments WHERE store = ?').run(store);\n const ins = d.prepare('INSERT OR REPLACE INTO comments (store, id, data) VALUES (?, ?, ?)');\n for (const c of comments) ins.run(store, c.id, JSON.stringify(c));\n}\n\n/** A store's comments straight from the database: current even when\n * another process wrote since this process cached the store. */\nexport function readStoreComments(store: string): Comment[] {\n return withDb((d) => readRows(d, store));\n}\n\n/** Several stores' comments in one query, each in its order; a store with none isn't in the map. Caches nothing\n * (getCommentFileStore keeps every store it's asked for). */\nexport function readStoresComments(stores: string[]): Map<string, Comment[]> {\n const out = new Map<string, Comment[]>();\n if (stores.length === 0) return out;\n const marks = stores.map(() => '?').join(', ');\n const rows = withDb(\n (d) =>\n d.prepare(`SELECT store, data FROM comments WHERE store IN (${marks}) ORDER BY rowid`).all(...stores) as Array<{\n store: string;\n data: string;\n }>,\n );\n for (const r of rows) {\n const c = json.parse(r.data);\n if (!isComment(c)) continue;\n const list = out.get(r.store) ?? [];\n list.push(c);\n out.set(r.store, list);\n }\n return out;\n}\n\nconst cache = new Map<string, CommentFileStore>();\n\nexport function getCommentFileStore(sessionId: string): CommentFileStore {\n const existing = cache.get(sessionId);\n if (existing) return existing;\n\n const inner = createCommentStore();\n\n /** Replace the in-memory contents with the current on-disk contents.\n * Used to reconcile before a mutation so concurrent writers (e.g. a\n * `work broadcast` process appending under the same lock) aren't lost. */\n function reloadFrom(rows: Comment[]): void {\n const list = inner.list() as Comment[];\n list.length = 0;\n for (const c of rows) list.push(c);\n }\n function reloadInner(): void {\n reloadFrom(withDb((d) => readRows(d, sessionId)));\n }\n\n // Seed from the database.\n reloadInner();\n\n /**\n * A read-modify-write of this store in one write transaction: reload the\n * in-memory model from the database (so it reflects other processes'\n * writes), apply `mutate`, persist. `persisted` reports whether anything\n * changed, so a no-op (e.g. removing a missing id) skips the write.\n */\n function lockedMutate<T>(mutate: () => { value: T; persisted: boolean }): T {\n return tx((d) => {\n reloadFrom(readRows(d, sessionId));\n const { value, persisted } = mutate();\n if (persisted) writeRows(d, sessionId, inner.snapshot());\n return value;\n });\n }\n\n const store: CommentFileStore = {\n // Reads reload first (one indexed query): `work broadcast` and the\n // hooks write to the same store from other processes, and a list\n // served from this process's memory didn't show them until something\n // here mutated. The in-memory model is for mutations, not a cache.\n list: () => {\n reloadInner();\n return inner.list();\n },\n snapshot: () => {\n reloadInner();\n return inner.snapshot();\n },\n post(input: CommentInput) {\n return lockedMutate(() => {\n const c = inner.post(input);\n return { value: c, persisted: true };\n });\n },\n remove(id: string) {\n return lockedMutate(() => {\n const r = inner.remove(id);\n return { value: r, persisted: r };\n });\n },\n setResolved(id: string, resolved: boolean) {\n return lockedMutate(() => {\n const c = inner.setResolved(id, resolved);\n return { value: c, persisted: c !== null };\n });\n },\n submit(summary: string | undefined) {\n return lockedMutate(() => {\n const result = inner.submit(summary);\n return { value: result, persisted: true };\n });\n },\n discardDrafts() {\n return lockedMutate(() => {\n const n = inner.discardDrafts();\n return { value: n, persisted: n > 0 };\n });\n },\n reload() {\n reloadInner();\n },\n clearAll() {\n return lockedMutate(() => {\n const list = inner.list() as Comment[];\n const n = list.length;\n list.length = 0;\n return { value: n, persisted: n > 0 };\n });\n },\n };\n cache.set(sessionId, store);\n return store;\n}\n\n/** Clear the in-memory cache. Test/server-shutdown hook. */\nexport function clearCommentStoreCache(): void {\n cache.clear();\n}\n\n/**\n * Every comment of one store moved to another (a scope whose paths changed:\n * scope-migrate.ts), in one transaction — ids, and so their deliveries,\n * unchanged. One whose id the other store has already stays where it was and\n * is counted in `kept`, never dropped. Both stores' cached copies here are let go.\n */\nexport function moveStoreComments(from: string, to: string): { moved: number; kept: number } {\n const out = tx((d) => {\n const moved = d.prepare('UPDATE OR IGNORE comments SET store = ? WHERE store = ?').run(to, from).changes;\n const kept = (d.prepare('SELECT COUNT(*) AS n FROM comments WHERE store = ?').get(from) as { n: number }).n;\n return { moved, kept };\n });\n cache.delete(from);\n cache.delete(to);\n return out;\n}\n"],"mappings":";;;;;;;;;;;AAuBA,SAAS,UAAU,GAA0B;AAC3C,QAAM,IAAI;AACV,SAAO,CAAC,CAAC,KAAK,OAAO,MAAM,YAAY,OAAO,EAAE,OAAO,YAAY,OAAO,EAAE,SAAS;AACvF;AAEA,SAAS,SAAS,GAAO,OAA0B;AACjD,SAAQ,EAAE,QAAQ,0DAA0D,EAAE,IAAI,KAAK,EACpF,IAAI,CAAC,MAAM,KAAK,MAAM,EAAE,IAAI,CAAC,EAC7B,OAAO,SAAS;AACrB;AAGA,SAAS,UAAU,GAAO,OAAe,UAA2B;AAClE,IAAE,QAAQ,sCAAsC,EAAE,IAAI,KAAK;AAC3D,QAAM,MAAM,EAAE,QAAQ,oEAAoE;AAC1F,aAAW,KAAK,SAAU,KAAI,IAAI,OAAO,EAAE,IAAI,KAAK,UAAU,CAAC,CAAC;AAClE;AAIO,SAAS,kBAAkB,OAA0B;AAC1D,SAAO,OAAO,CAAC,MAAM,SAAS,GAAG,KAAK,CAAC;AACzC;AAIO,SAAS,mBAAmB,QAA0C;AAC3E,QAAM,MAAM,oBAAI,IAAuB;AACvC,MAAI,OAAO,WAAW,EAAG,QAAO;AAChC,QAAM,QAAQ,OAAO,IAAI,MAAM,GAAG,EAAE,KAAK,IAAI;AAC7C,QAAM,OAAO;AAAA,IACX,CAAC,MACC,EAAE,QAAQ,oDAAoD,KAAK,kBAAkB,EAAE,IAAI,GAAG,MAAM;AAAA,EAIxG;AACA,aAAW,KAAK,MAAM;AACpB,UAAM,IAAI,KAAK,MAAM,EAAE,IAAI;AAC3B,QAAI,CAAC,UAAU,CAAC,EAAG;AACnB,UAAM,OAAO,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC;AAClC,SAAK,KAAK,CAAC;AAC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./chunk-RCYI7SRA.js";
|
|
@@ -51,4 +51,4 @@ export {
|
|
|
51
51
|
openVSCode,
|
|
52
52
|
launchAi
|
|
53
53
|
};
|
|
54
|
-
//# sourceMappingURL=chunk-
|
|
54
|
+
//# sourceMappingURL=chunk-YDYHURVA.js.map
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
isPidAlive,
|
|
7
7
|
killTreeAsync
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-JCMGIW7G.js";
|
|
9
9
|
import {
|
|
10
10
|
getConfigDir
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-A53IRCOO.js";
|
|
12
12
|
|
|
13
13
|
// src/core/platform/running-from.ts
|
|
14
14
|
import fs from "fs";
|
|
@@ -246,4 +246,4 @@ export {
|
|
|
246
246
|
runningFromNames,
|
|
247
247
|
stopRunningFrom
|
|
248
248
|
};
|
|
249
|
-
//# sourceMappingURL=chunk-
|
|
249
|
+
//# sourceMappingURL=chunk-ZFSV65M5.js.map
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import {
|
|
3
3
|
stageWaiting,
|
|
4
4
|
stageWantsYou
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-RFQRVXFQ.js";
|
|
6
6
|
import {
|
|
7
7
|
atomicWriteFile,
|
|
8
8
|
getConfigDir
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-A53IRCOO.js";
|
|
10
10
|
|
|
11
11
|
// src/core/sessions/session-view.ts
|
|
12
12
|
var RECENT_MS = 24 * 36e5;
|
|
@@ -191,4 +191,4 @@ export {
|
|
|
191
191
|
assistantContextDay,
|
|
192
192
|
readAssistantContext
|
|
193
193
|
};
|
|
194
|
-
//# sourceMappingURL=chunk-
|
|
194
|
+
//# sourceMappingURL=chunk-ZHKE637Q.js.map
|
|
@@ -6,49 +6,50 @@ import {
|
|
|
6
6
|
deleteMergedBranches,
|
|
7
7
|
findMergedBranches,
|
|
8
8
|
scanBuildFolders
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-AC6N2EIN.js";
|
|
10
10
|
import {
|
|
11
11
|
defaultCleanupDeps
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-EASMYJG3.js";
|
|
13
13
|
import {
|
|
14
14
|
timeAgo
|
|
15
15
|
} from "./chunk-UQ35KLHH.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-XEIREYW6.js";
|
|
17
17
|
import {
|
|
18
18
|
applyCleanup,
|
|
19
19
|
scanCleanup
|
|
20
20
|
} from "./chunk-AKMPF72Y.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-C224P3D3.js";
|
|
22
|
+
import "./chunk-ZFSV65M5.js";
|
|
23
|
+
import "./chunk-FXIEYT6L.js";
|
|
24
|
+
import "./chunk-4ETSGWB2.js";
|
|
25
|
+
import "./chunk-DHBKD2TG.js";
|
|
26
|
+
import "./chunk-VES42DOD.js";
|
|
27
|
+
import "./chunk-VGQV4LX7.js";
|
|
24
28
|
import "./chunk-KUCMJHQW.js";
|
|
25
|
-
import "./chunk-NER44YB7.js";
|
|
26
|
-
import "./chunk-3D63HGOG.js";
|
|
27
|
-
import "./chunk-CALBDLDJ.js";
|
|
28
|
-
import "./chunk-7OBX4MJY.js";
|
|
29
|
-
import "./chunk-722K7XWW.js";
|
|
30
|
-
import "./chunk-XDBMLTFY.js";
|
|
31
|
-
import "./chunk-LNHSBM4L.js";
|
|
32
|
-
import "./chunk-DMUZIBPM.js";
|
|
33
|
-
import "./chunk-RFE4EBUP.js";
|
|
34
|
-
import "./chunk-4P533364.js";
|
|
35
|
-
import "./chunk-ZSHWP2VS.js";
|
|
36
|
-
import "./chunk-QDKLIYGR.js";
|
|
37
|
-
import "./chunk-HUXS3VAI.js";
|
|
38
29
|
import "./chunk-PSUJZUYX.js";
|
|
39
30
|
import "./chunk-5WM24P5N.js";
|
|
31
|
+
import "./chunk-3KOYICWB.js";
|
|
40
32
|
import "./chunk-3GIH4WTA.js";
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
43
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-PLOO7NQU.js";
|
|
34
|
+
import "./chunk-3HBHM2VX.js";
|
|
35
|
+
import "./chunk-LNHSBM4L.js";
|
|
36
|
+
import "./chunk-R2SR3PER.js";
|
|
37
|
+
import "./chunk-AKGDIBSE.js";
|
|
38
|
+
import "./chunk-ZHKE637Q.js";
|
|
39
|
+
import "./chunk-BO3BNBBE.js";
|
|
40
|
+
import "./chunk-XZ5DA5X4.js";
|
|
41
|
+
import "./chunk-ZSHWP2VS.js";
|
|
42
|
+
import "./chunk-HUXS3VAI.js";
|
|
43
|
+
import "./chunk-RFQRVXFQ.js";
|
|
44
|
+
import "./chunk-JCMGIW7G.js";
|
|
44
45
|
import "./chunk-RCYI7SRA.js";
|
|
45
46
|
import "./chunk-NEJVK5CF.js";
|
|
46
|
-
import "./chunk-
|
|
47
|
-
import "./chunk-
|
|
48
|
-
import "./chunk-
|
|
47
|
+
import "./chunk-FXHTSSV2.js";
|
|
48
|
+
import "./chunk-S4ILKUFN.js";
|
|
49
|
+
import "./chunk-FRCV6NWT.js";
|
|
49
50
|
import {
|
|
50
51
|
ensureConfig
|
|
51
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-A53IRCOO.js";
|
|
52
53
|
|
|
53
54
|
// src/commands/cleanup.ts
|
|
54
55
|
import fs from "fs";
|
|
@@ -194,4 +195,4 @@ var cleanupCommand = {
|
|
|
194
195
|
export {
|
|
195
196
|
cleanupCommand
|
|
196
197
|
};
|
|
197
|
-
//# sourceMappingURL=cleanup-
|
|
198
|
+
//# sourceMappingURL=cleanup-7VJ4KUMR.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/cleanup.ts"],"sourcesContent":["import fs from 'node:fs';\nimport chalk from 'chalk';\nimport type { CommandModule } from 'yargs';\nimport { ensureConfig } from '../core/platform/config.js';\nimport { applyCleanup, scanCleanup } from '../core/cleanup/cleanup.js';\nimport { defaultCleanupDeps } from '../core/cleanup/cleanup-deps.js';\nimport { createBuildFoldersJob, scanBuildFolders } from '../core/cleanup/build-folders-scan.js';\nimport { defaultBuildFoldersDeps } from '../core/cleanup/build-folders-deps.js';\nimport { deleteMergedBranches, findMergedBranches } from '../core/cleanup/branch-tidy.js';\nimport { defaultBranchTidyDeps } from '../core/cleanup/branch-tidy-deps.js';\nimport type { CleanupAction, CleanupCandidate } from '../core/api-types.js';\nimport { timeAgo } from '../core/platform/format.js';\n\nconst ACTIONS: CleanupAction[] = ['delete', 'archive', 'forget'];\n\nfunction printCandidates(list: CleanupCandidate[]): void {\n const sections: Array<[string, CleanupCandidate[]]> = [\n ['Safe to remove', list.filter((c) => c.verdict === 'merged' || c.verdict === 'gone')],\n ['Has work of its own (never removed; archive after a week quiet)', list.filter((c) => c.verdict === 'work' || c.verdict === 'dirty')],\n ];\n for (const [title, items] of sections) {\n if (items.length === 0) continue;\n console.log(chalk.bold(`${title} (${items.length})`));\n for (const c of items) {\n const act = c.suggested ? chalk.cyan(c.suggested.padEnd(7)) : chalk.gray('—'.padEnd(7));\n console.log(` ${act} ${chalk.gray(c.target)} ${c.branch} ${chalk.gray(timeAgo(c.lastActive))} ${c.reason}`);\n console.log(chalk.gray(` ${c.sessionId}`));\n }\n console.log('');\n }\n}\n\n/** `work cleanup --build-folders [--apply [ids…]] [--json]` */\nasync function buildFoldersCommand(apply: boolean, ids: string[], json: boolean): Promise<void> {\n const deps = defaultBuildFoldersDeps();\n const list = await scanBuildFolders(deps);\n if (!apply) {\n if (json) {\n process.stdout.write(JSON.stringify(list, null, 2) + '\\n');\n return;\n }\n const total = list.reduce((n, c) => n + c.bytes, 0);\n console.log(\n chalk.gray(`Build folders git ignores, in worktrees idle a week or more: ${(total / 1e9).toFixed(1)} GB in ${list.length}\\n`),\n );\n for (const c of list) {\n const top =\n c.folders\n .slice(0, 3)\n .map((f) => f.path)\n .join(', ') + (c.folders.length > 3 ? ` +${c.folders.length - 3} more` : '');\n console.log(\n ` ${c.sessionId} ${(c.bytes / 1e9).toFixed(2).padStart(6)} GB ${c.target} ${c.branch}${c.baseCheckout ? chalk.cyan(' (repo checkout)') : ''} ${chalk.gray(top)}`,\n );\n }\n if (list.length) console.log(chalk.gray('\\nClear them: work cleanup --build-folders --apply [<id>…]'));\n return;\n }\n const chosen = ids.length ? ids : list.map((c) => c.sessionId);\n const results = await createBuildFoldersJob(deps).apply(chosen);\n if (json) process.stdout.write(JSON.stringify(results, null, 2) + '\\n');\n else\n for (const r of results)\n console.log(r.ok ? chalk.green(` ✓ ${r.sessionId} — ${r.message}`) : chalk.yellow(` ✗ ${r.sessionId} — ${r.message}`));\n if (results.some((r) => !r.ok)) process.exitCode = 1;\n}\n\nexport const cleanupCommand: CommandModule = {\n command: 'cleanup [ids..]',\n describe: 'Which worktrees can go, and why (--json); --apply <ids> removes, archives or forgets them after a fresh check',\n builder: (yargs) =>\n yargs\n .positional('ids', { type: 'string', array: true, describe: 'With --apply: the ids to act on (from the list)' })\n .option('json', { type: 'boolean', default: false, describe: 'The candidates as JSON' })\n .option('fetch', { type: 'boolean', default: true, describe: 'Fetch the repos first (--no-fetch to skip)' })\n .option('apply', { type: 'boolean', default: false, describe: 'Act on the given ids' })\n .option('action', {\n type: 'string',\n choices: ACTIONS,\n default: 'delete',\n describe: 'With --apply: what to do (a gone folder is always forgotten)',\n })\n .option('force', {\n type: 'boolean',\n default: false,\n describe: 'With --apply delete: also remove merged worktrees with uncommitted changes (lost)',\n })\n .option('branches', {\n type: 'boolean',\n default: false,\n describe:\n 'Instead: local branches already merged (or squash-merged: a merged PR whose head is the tip); with --apply, delete them (checked again)',\n })\n .option('build-folders', {\n type: 'boolean',\n default: false,\n describe: 'Instead: build output (node_modules, bin/obj, .next, …) git ignores, in worktrees idle a week+; with --apply, clear it',\n }),\n handler: async (argv) => {\n ensureConfig();\n if (argv.branches) {\n const deps = defaultBranchTidyDeps();\n const list = await findMergedBranches(deps);\n if (!argv.apply) {\n if (argv.json) process.stdout.write(JSON.stringify(list, null, 2) + '\\n');\n else {\n for (const b of list)\n console.log(\n ` ${b.repo.padEnd(18)} ${b.branch} ${chalk.gray(b.reason === 'merged' ? 'merged' : `squash-merged${b.prNumber ? ` #${b.prNumber}` : ''}`)}${b.archivedSession ? chalk.yellow(' (an archived session uses it)') : ''}`,\n );\n if (list.length) console.log(chalk.gray('\\nDelete them: work cleanup --branches --apply'));\n else console.log(chalk.gray('No merged local branches.'));\n }\n return;\n }\n const results = await deleteMergedBranches(\n list.filter((b) => !b.archivedSession).map(({ repo, branch, tip }) => ({ repo, branch, tip })),\n deps,\n );\n if (argv.json) process.stdout.write(JSON.stringify(results, null, 2) + '\\n');\n else\n for (const r of results)\n console.log(\n r.ok ? chalk.green(` ✓ ${r.repo} ${r.branch} — ${r.message}`) : chalk.yellow(` ✗ ${r.repo} ${r.branch} — ${r.message}`),\n );\n if (results.some((r) => !r.ok)) process.exitCode = 1;\n return;\n }\n if (argv['build-folders']) {\n await buildFoldersCommand(argv.apply as boolean, (argv.ids as string[] | undefined) ?? [], argv.json as boolean);\n return;\n }\n const deps = defaultCleanupDeps();\n if (argv.apply) {\n const ids = (argv.ids as string[] | undefined) ?? [];\n if (ids.length === 0) throw new Error('--apply needs the ids to act on (see `work cleanup`).');\n const byId = new Map((await deps.sessions()).map((s) => [s.id, s]));\n const action = argv.action as CleanupAction;\n const items = ids.map((id) => {\n const s = byId.get(id);\n const gone = !!s && s.paths.every((p) => !fs.existsSync(p));\n return { sessionId: id, action: action === 'delete' && gone ? ('forget' as const) : action };\n });\n const results = await applyCleanup(deps, items, { force: argv.force as boolean });\n if (argv.json) {\n process.stdout.write(JSON.stringify(results, null, 2) + '\\n');\n } else {\n for (const r of results)\n console.log(r.ok ? chalk.green(` ✓ ${r.sessionId} — ${r.message}`) : chalk.yellow(` ✗ ${r.sessionId} — ${r.message}`));\n }\n if (results.some((r) => !r.ok)) process.exitCode = 1;\n return;\n }\n if (!argv.json) console.log(chalk.gray(argv.fetch ? 'Fetching and checking worktrees…\\n' : 'Checking worktrees…\\n'));\n const scan = await scanCleanup(deps, { fetch: argv.fetch as boolean });\n if (argv.json) {\n process.stdout.write(JSON.stringify(scan, null, 2) + '\\n');\n return;\n }\n for (const f of scan.fetchFailed) console.log(chalk.yellow(`Could not fetch ${f.alias}; its worktrees were not checked: ${f.error}`));\n if (scan.candidates.length === 0) {\n console.log(chalk.green(`Nothing to clean up (${scan.checked} checked).`));\n return;\n }\n printCandidates(scan.candidates);\n console.log(chalk.gray('Act on some: work cleanup --apply <id> [<id>…] [--action delete|archive|forget]'));\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ;AACf,OAAO,WAAW;AAYlB,IAAM,UAA2B,CAAC,UAAU,WAAW,QAAQ;AAE/D,SAAS,gBAAgB,MAAgC;AACvD,QAAM,WAAgD;AAAA,IACpD,CAAC,kBAAkB,KAAK,OAAO,CAAC,MAAM,EAAE,YAAY,YAAY,EAAE,YAAY,MAAM,CAAC;AAAA,IACrF,CAAC,mEAAmE,KAAK,OAAO,CAAC,MAAM,EAAE,YAAY,UAAU,EAAE,YAAY,OAAO,CAAC;AAAA,EACvI;AACA,aAAW,CAAC,OAAO,KAAK,KAAK,UAAU;AACrC,QAAI,MAAM,WAAW,EAAG;AACxB,YAAQ,IAAI,MAAM,KAAK,GAAG,KAAK,KAAK,MAAM,MAAM,GAAG,CAAC;AACpD,eAAW,KAAK,OAAO;AACrB,YAAM,MAAM,EAAE,YAAY,MAAM,KAAK,EAAE,UAAU,OAAO,CAAC,CAAC,IAAI,MAAM,KAAK,SAAI,OAAO,CAAC,CAAC;AACtF,cAAQ,IAAI,KAAK,GAAG,IAAI,MAAM,KAAK,EA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,MAAM,KAAK,UAAU,MAAM,MAAM,CAAC,IAAI,IAAI;AACzD;AAAA,IACF;AACA,eAAW,KAAK,KAAK,YAAa,SAAQ,IAAI,MAAM,OAAO,mBAAmB,EAAE,KAAK,qCAAqC,EAAE,KAAK,EAAE,CAAC;AACpI,QAAI,KAAK,WAAW,WAAW,GAAG;AAChC,cAAQ,IAAI,MAAM,MAAM,wBAAwB,KAAK,OAAO,YAAY,CAAC;AACzE;AAAA,IACF;AACA,oBAAgB,KAAK,UAAU;AAC/B,YAAQ,IAAI,MAAM,KAAK,sFAAiF,CAAC;AAAA,EAC3G;AACF;","names":["deps"]}
|
|
1
|
+
{"version":3,"sources":["../src/commands/cleanup.ts"],"sourcesContent":["import fs from 'node:fs';\nimport chalk from 'chalk';\nimport type { CommandModule } from 'yargs';\nimport { ensureConfig } from '../core/platform/config.js';\nimport { applyCleanup, scanCleanup } from '../core/cleanup/cleanup.js';\nimport { defaultCleanupDeps } from '../core/cleanup/cleanup-deps.js';\nimport { createBuildFoldersJob, scanBuildFolders } from '../core/cleanup/build-folders-scan.js';\nimport { defaultBuildFoldersDeps } from '../core/cleanup/build-folders-deps.js';\nimport { deleteMergedBranches, findMergedBranches } from '../core/cleanup/branch-tidy.js';\nimport { defaultBranchTidyDeps } from '../core/cleanup/branch-tidy-deps.js';\nimport type { CleanupAction, CleanupCandidate } from '../core/api-types.js';\nimport { timeAgo } from '../core/platform/format.js';\n\nconst ACTIONS: CleanupAction[] = ['delete', 'archive', 'forget'];\n\nfunction printCandidates(list: CleanupCandidate[]): void {\n const sections: Array<[string, CleanupCandidate[]]> = [\n ['Safe to remove', list.filter((c) => c.verdict === 'merged' || c.verdict === 'gone')],\n ['Has work of its own (never removed; archive after a week quiet)', list.filter((c) => c.verdict === 'work' || c.verdict === 'dirty')],\n ];\n for (const [title, items] of sections) {\n if (items.length === 0) continue;\n console.log(chalk.bold(`${title} (${items.length})`));\n for (const c of items) {\n const act = c.suggested ? chalk.cyan(c.suggested.padEnd(7)) : chalk.gray('—'.padEnd(7));\n console.log(` ${act} ${chalk.gray(c.target)} ${c.branch} ${chalk.gray(timeAgo(c.lastActive))} ${c.reason}`);\n console.log(chalk.gray(` ${c.sessionId}`));\n }\n console.log('');\n }\n}\n\n/** `work cleanup --build-folders [--apply [ids…]] [--json]` */\nasync function buildFoldersCommand(apply: boolean, ids: string[], json: boolean): Promise<void> {\n const deps = defaultBuildFoldersDeps();\n const list = await scanBuildFolders(deps);\n if (!apply) {\n if (json) {\n process.stdout.write(JSON.stringify(list, null, 2) + '\\n');\n return;\n }\n const total = list.reduce((n, c) => n + c.bytes, 0);\n console.log(\n chalk.gray(`Build folders git ignores, in worktrees idle a week or more: ${(total / 1e9).toFixed(1)} GB in ${list.length}\\n`),\n );\n for (const c of list) {\n const top =\n c.folders\n .slice(0, 3)\n .map((f) => f.path)\n .join(', ') + (c.folders.length > 3 ? ` +${c.folders.length - 3} more` : '');\n console.log(\n ` ${c.sessionId} ${(c.bytes / 1e9).toFixed(2).padStart(6)} GB ${c.target} ${c.branch}${c.baseCheckout ? chalk.cyan(' (repo checkout)') : ''} ${chalk.gray(top)}`,\n );\n }\n if (list.length) console.log(chalk.gray('\\nClear them: work cleanup --build-folders --apply [<id>…]'));\n return;\n }\n const chosen = ids.length ? ids : list.map((c) => c.sessionId);\n const results = await createBuildFoldersJob(deps).apply(chosen);\n if (json) process.stdout.write(JSON.stringify(results, null, 2) + '\\n');\n else\n for (const r of results)\n console.log(r.ok ? chalk.green(` ✓ ${r.sessionId} — ${r.message}`) : chalk.yellow(` ✗ ${r.sessionId} — ${r.message}`));\n if (results.some((r) => !r.ok)) process.exitCode = 1;\n}\n\nexport const cleanupCommand: CommandModule = {\n command: 'cleanup [ids..]',\n describe: 'Which worktrees can go, and why (--json); --apply <ids> removes, archives or forgets them after a fresh check',\n builder: (yargs) =>\n yargs\n .positional('ids', { type: 'string', array: true, describe: 'With --apply: the ids to act on (from the list)' })\n .option('json', { type: 'boolean', default: false, describe: 'The candidates as JSON' })\n .option('fetch', { type: 'boolean', default: true, describe: 'Fetch the repos first (--no-fetch to skip)' })\n .option('apply', { type: 'boolean', default: false, describe: 'Act on the given ids' })\n .option('action', {\n type: 'string',\n choices: ACTIONS,\n default: 'delete',\n describe: 'With --apply: what to do (a gone folder is always forgotten)',\n })\n .option('force', {\n type: 'boolean',\n default: false,\n describe: 'With --apply delete: also remove merged worktrees with uncommitted changes (lost)',\n })\n .option('branches', {\n type: 'boolean',\n default: false,\n describe:\n 'Instead: local branches already merged (or squash-merged: a merged PR whose head is the tip); with --apply, delete them (checked again)',\n })\n .option('build-folders', {\n type: 'boolean',\n default: false,\n describe: 'Instead: build output (node_modules, bin/obj, .next, …) git ignores, in worktrees idle a week+; with --apply, clear it',\n }),\n handler: async (argv) => {\n ensureConfig();\n if (argv.branches) {\n const deps = defaultBranchTidyDeps();\n const list = await findMergedBranches(deps);\n if (!argv.apply) {\n if (argv.json) process.stdout.write(JSON.stringify(list, null, 2) + '\\n');\n else {\n for (const b of list)\n console.log(\n ` ${b.repo.padEnd(18)} ${b.branch} ${chalk.gray(b.reason === 'merged' ? 'merged' : `squash-merged${b.prNumber ? ` #${b.prNumber}` : ''}`)}${b.archivedSession ? chalk.yellow(' (an archived session uses it)') : ''}`,\n );\n if (list.length) console.log(chalk.gray('\\nDelete them: work cleanup --branches --apply'));\n else console.log(chalk.gray('No merged local branches.'));\n }\n return;\n }\n const results = await deleteMergedBranches(\n list.filter((b) => !b.archivedSession).map(({ repo, branch, tip }) => ({ repo, branch, tip })),\n deps,\n );\n if (argv.json) process.stdout.write(JSON.stringify(results, null, 2) + '\\n');\n else\n for (const r of results)\n console.log(\n r.ok ? chalk.green(` ✓ ${r.repo} ${r.branch} — ${r.message}`) : chalk.yellow(` ✗ ${r.repo} ${r.branch} — ${r.message}`),\n );\n if (results.some((r) => !r.ok)) process.exitCode = 1;\n return;\n }\n if (argv['build-folders']) {\n await buildFoldersCommand(argv.apply as boolean, (argv.ids as string[] | undefined) ?? [], argv.json as boolean);\n return;\n }\n const deps = defaultCleanupDeps();\n if (argv.apply) {\n const ids = (argv.ids as string[] | undefined) ?? [];\n if (ids.length === 0) throw new Error('--apply needs the ids to act on (see `work cleanup`).');\n const byId = new Map((await deps.sessions()).map((s) => [s.id, s]));\n const action = argv.action as CleanupAction;\n const items = ids.map((id) => {\n const s = byId.get(id);\n const gone = !!s && s.paths.every((p) => !fs.existsSync(p));\n return { sessionId: id, action: action === 'delete' && gone ? ('forget' as const) : action };\n });\n const results = await applyCleanup(deps, items, { force: argv.force as boolean });\n if (argv.json) {\n process.stdout.write(JSON.stringify(results, null, 2) + '\\n');\n } else {\n for (const r of results)\n console.log(r.ok ? chalk.green(` ✓ ${r.sessionId} — ${r.message}`) : chalk.yellow(` ✗ ${r.sessionId} — ${r.message}`));\n }\n if (results.some((r) => !r.ok)) process.exitCode = 1;\n return;\n }\n if (!argv.json) console.log(chalk.gray(argv.fetch ? 'Fetching and checking worktrees…\\n' : 'Checking worktrees…\\n'));\n const scan = await scanCleanup(deps, { fetch: argv.fetch as boolean });\n if (argv.json) {\n process.stdout.write(JSON.stringify(scan, null, 2) + '\\n');\n return;\n }\n for (const f of scan.fetchFailed) console.log(chalk.yellow(`Could not fetch ${f.alias}; its worktrees were not checked: ${f.error}`));\n if (scan.candidates.length === 0) {\n console.log(chalk.green(`Nothing to clean up (${scan.checked} checked).`));\n return;\n }\n printCandidates(scan.candidates);\n console.log(chalk.gray('Act on some: work cleanup --apply <id> [<id>…] [--action delete|archive|forget]'));\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ;AACf,OAAO,WAAW;AAYlB,IAAM,UAA2B,CAAC,UAAU,WAAW,QAAQ;AAE/D,SAAS,gBAAgB,MAAgC;AACvD,QAAM,WAAgD;AAAA,IACpD,CAAC,kBAAkB,KAAK,OAAO,CAAC,MAAM,EAAE,YAAY,YAAY,EAAE,YAA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AACd,kBAAQ,IAAI,EAAE,KAAK,MAAM,MAAM,YAAO,EAAE,SAAS,WAAM,EAAE,OAAO,EAAE,IAAI,MAAM,OAAO,YAAO,EAAE,SAAS,WAAM,EAAE,OAAO,EAAE,CAAC;AAAA,MAC3H;AACA,UAAI,QAAQ,KAAK,CAAC,MAAM,CAAC,EAAE,EAAE,EAAG,SAAQ,WAAW;AACnD;AAAA,IACF;AACA,QAAI,CAAC,KAAK,KAAM,SAAQ,IAAI,MAAM,KAAK,KAAK,QAAQ,4CAAuC,4BAAuB,CAAC;AACnH,UAAM,OAAO,MAAM,YAAY,MAAM,EAAE,OAAO,KAAK,MAAiB,CAAC;AACrE,QAAI,KAAK,MAAM;AACb,cAAQ,OAAO,MAAM,KAAK,UAAU,MAAM,MAAM,CAAC,IAAI,IAAI;AACzD;AAAA,IACF;AACA,eAAW,KAAK,KAAK,YAAa,SAAQ,IAAI,MAAM,OAAO,mBAAmB,EAAE,KAAK,qCAAqC,EAAE,KAAK,EAAE,CAAC;AACpI,QAAI,KAAK,WAAW,WAAW,GAAG;AAChC,cAAQ,IAAI,MAAM,MAAM,wBAAwB,KAAK,OAAO,YAAY,CAAC;AACzE;AAAA,IACF;AACA,oBAAgB,KAAK,UAAU;AAC/B,YAAQ,IAAI,MAAM,KAAK,sFAAiF,CAAC;AAAA,EAC3G;AACF;","names":["deps"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
COMMANDS,
|
|
4
|
+
commandsFor,
|
|
5
|
+
run
|
|
6
|
+
} from "./chunk-IZSMQ6X2.js";
|
|
7
|
+
import "./chunk-JUGSJ37Z.js";
|
|
8
|
+
import "./chunk-R2SR3PER.js";
|
|
9
|
+
import "./chunk-AKGDIBSE.js";
|
|
10
|
+
import "./chunk-RCYI7SRA.js";
|
|
11
|
+
import "./chunk-FRCV6NWT.js";
|
|
12
|
+
import "./chunk-A53IRCOO.js";
|
|
13
|
+
export {
|
|
14
|
+
COMMANDS,
|
|
15
|
+
commandsFor,
|
|
16
|
+
run
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=cli-RFG23HUW.js.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
report
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-S4ILKUFN.js";
|
|
5
|
+
import "./chunk-FRCV6NWT.js";
|
|
6
6
|
import {
|
|
7
7
|
atomicWriteFile,
|
|
8
8
|
ensureFile,
|
|
9
9
|
resolveLinkTarget,
|
|
10
10
|
withFileLock,
|
|
11
11
|
withFileLockSync
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-A53IRCOO.js";
|
|
13
13
|
|
|
14
14
|
// src/core/platform/settings-editor.ts
|
|
15
15
|
import fs from "fs";
|
|
@@ -201,4 +201,4 @@ export {
|
|
|
201
201
|
removeCommandHooksSync,
|
|
202
202
|
syncCommandHooks
|
|
203
203
|
};
|
|
204
|
-
//# sourceMappingURL=command-hook-installer-
|
|
204
|
+
//# sourceMappingURL=command-hook-installer-PTTVCWH7.js.map
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
RepoAdminError,
|
|
4
4
|
enrollRepo,
|
|
5
5
|
repoInventory
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-WUJJ2FTK.js";
|
|
7
7
|
import {
|
|
8
8
|
openInEditor
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-YDYHURVA.js";
|
|
10
10
|
import {
|
|
11
11
|
scanForRepos
|
|
12
12
|
} from "./chunk-HMK3INUS.js";
|
|
@@ -14,27 +14,27 @@ import "./chunk-5WM24P5N.js";
|
|
|
14
14
|
import "./chunk-3GIH4WTA.js";
|
|
15
15
|
import {
|
|
16
16
|
loadHistory
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-RFQRVXFQ.js";
|
|
18
18
|
import {
|
|
19
19
|
agentFor,
|
|
20
20
|
internalAgent
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-JCMGIW7G.js";
|
|
22
22
|
import {
|
|
23
23
|
spawn_default
|
|
24
24
|
} from "./chunk-RCYI7SRA.js";
|
|
25
25
|
import "./chunk-NEJVK5CF.js";
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-FXHTSSV2.js";
|
|
27
27
|
import {
|
|
28
28
|
report
|
|
29
|
-
} from "./chunk-
|
|
30
|
-
import "./chunk-
|
|
29
|
+
} from "./chunk-S4ILKUFN.js";
|
|
30
|
+
import "./chunk-FRCV6NWT.js";
|
|
31
31
|
import {
|
|
32
32
|
ensureConfig,
|
|
33
33
|
getConfigDir,
|
|
34
34
|
getConfigPath,
|
|
35
35
|
loadConfig,
|
|
36
36
|
saveConfig
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-A53IRCOO.js";
|
|
38
38
|
|
|
39
39
|
// src/commands/config.ts
|
|
40
40
|
import fs2 from "fs";
|
|
@@ -408,4 +408,4 @@ function showGroupHelp() {
|
|
|
408
408
|
export {
|
|
409
409
|
configCommand
|
|
410
410
|
};
|
|
411
|
-
//# sourceMappingURL=config-
|
|
411
|
+
//# sourceMappingURL=config-CREG6OI3.js.map
|
|
@@ -9,40 +9,40 @@ import {
|
|
|
9
9
|
resolveWebRoot,
|
|
10
10
|
startDiffServer,
|
|
11
11
|
submitReviewSchema
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-R7334LAS.js";
|
|
13
13
|
import {
|
|
14
14
|
openUrl
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-YDYHURVA.js";
|
|
16
16
|
import {
|
|
17
17
|
resolveWorkBinPath
|
|
18
18
|
} from "./chunk-AH5TM3NB.js";
|
|
19
19
|
import {
|
|
20
20
|
computeDiff
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-3HBHM2VX.js";
|
|
22
22
|
import "./chunk-LNHSBM4L.js";
|
|
23
|
+
import "./chunk-AKGDIBSE.js";
|
|
23
24
|
import {
|
|
24
25
|
existingWebDecision,
|
|
25
26
|
readWebUrl,
|
|
26
27
|
webServerResponds,
|
|
27
28
|
webUrlPath
|
|
28
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-MAFJE26N.js";
|
|
29
30
|
import {
|
|
30
31
|
stableDiffPath
|
|
31
32
|
} from "./chunk-ZSHWP2VS.js";
|
|
32
33
|
import {
|
|
33
34
|
createCommentStore
|
|
34
35
|
} from "./chunk-HUXS3VAI.js";
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-NM4SABMQ.js";
|
|
36
|
+
import "./chunk-RFQRVXFQ.js";
|
|
37
37
|
import {
|
|
38
38
|
spawnDetachedWork
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-JCMGIW7G.js";
|
|
40
40
|
import "./chunk-RCYI7SRA.js";
|
|
41
41
|
import "./chunk-NEJVK5CF.js";
|
|
42
|
-
import "./chunk-
|
|
43
|
-
import "./chunk-
|
|
44
|
-
import "./chunk-
|
|
45
|
-
import "./chunk-
|
|
42
|
+
import "./chunk-FXHTSSV2.js";
|
|
43
|
+
import "./chunk-S4ILKUFN.js";
|
|
44
|
+
import "./chunk-FRCV6NWT.js";
|
|
45
|
+
import "./chunk-A53IRCOO.js";
|
|
46
46
|
|
|
47
47
|
// src/commands/diff.ts
|
|
48
48
|
import fs2 from "fs";
|
|
@@ -580,4 +580,4 @@ export {
|
|
|
580
580
|
resolveWorkBinPath,
|
|
581
581
|
webServerResponds
|
|
582
582
|
};
|
|
583
|
-
//# sourceMappingURL=diff-
|
|
583
|
+
//# sourceMappingURL=diff-UYXZID2B.js.map
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
createDigestSource
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-I2TUJLI4.js";
|
|
5
|
+
import "./chunk-3KOYICWB.js";
|
|
6
6
|
import {
|
|
7
7
|
askWorkWeb
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-MAFJE26N.js";
|
|
9
|
+
import "./chunk-RFQRVXFQ.js";
|
|
10
|
+
import "./chunk-JCMGIW7G.js";
|
|
11
11
|
import "./chunk-RCYI7SRA.js";
|
|
12
12
|
import {
|
|
13
13
|
formatWorked
|
|
14
14
|
} from "./chunk-NEJVK5CF.js";
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-FXHTSSV2.js";
|
|
16
|
+
import "./chunk-S4ILKUFN.js";
|
|
17
|
+
import "./chunk-FRCV6NWT.js";
|
|
18
|
+
import "./chunk-A53IRCOO.js";
|
|
19
19
|
|
|
20
20
|
// src/core/conversations/digest-view.ts
|
|
21
21
|
var WINDOW_LABEL = {
|
|
@@ -98,4 +98,4 @@ export {
|
|
|
98
98
|
digestCommand,
|
|
99
99
|
parseSince
|
|
100
100
|
};
|
|
101
|
-
//# sourceMappingURL=digest-
|
|
101
|
+
//# sourceMappingURL=digest-I5Z6W2EP.js.map
|
|
@@ -4,49 +4,50 @@ import {
|
|
|
4
4
|
forkSession,
|
|
5
5
|
startSessionWithPrompt,
|
|
6
6
|
uncommittedFiles
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-5EGGS6Y6.js";
|
|
7
|
+
} from "./chunk-45X4QO4V.js";
|
|
9
8
|
import {
|
|
10
9
|
attachSession
|
|
11
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-MM32YZT6.js";
|
|
11
|
+
import "./chunk-JCCGLFMU.js";
|
|
12
12
|
import "./chunk-AH5TM3NB.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-FXIEYT6L.js";
|
|
14
|
+
import "./chunk-4ETSGWB2.js";
|
|
15
|
+
import "./chunk-DHBKD2TG.js";
|
|
16
|
+
import "./chunk-VES42DOD.js";
|
|
17
|
+
import "./chunk-VGQV4LX7.js";
|
|
14
18
|
import "./chunk-KUCMJHQW.js";
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-PSUJZUYX.js";
|
|
20
|
+
import "./chunk-5WM24P5N.js";
|
|
21
|
+
import "./chunk-3GIH4WTA.js";
|
|
18
22
|
import {
|
|
19
23
|
askCatchUp,
|
|
20
24
|
catchUp,
|
|
21
25
|
catchUpFacts
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
26
|
+
} from "./chunk-M2TQNGMD.js";
|
|
27
|
+
import "./chunk-PLOO7NQU.js";
|
|
28
|
+
import "./chunk-3HBHM2VX.js";
|
|
29
|
+
import "./chunk-R2SR3PER.js";
|
|
30
|
+
import "./chunk-AKGDIBSE.js";
|
|
31
|
+
import "./chunk-ZHKE637Q.js";
|
|
27
32
|
import {
|
|
28
33
|
findSessionForCwd
|
|
29
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-BO3BNBBE.js";
|
|
35
|
+
import "./chunk-XZ5DA5X4.js";
|
|
30
36
|
import "./chunk-ZSHWP2VS.js";
|
|
31
|
-
import "./chunk-QDKLIYGR.js";
|
|
32
37
|
import "./chunk-HUXS3VAI.js";
|
|
33
|
-
import "./chunk-PSUJZUYX.js";
|
|
34
|
-
import "./chunk-5WM24P5N.js";
|
|
35
|
-
import "./chunk-3GIH4WTA.js";
|
|
36
|
-
import "./chunk-YIODX4PM.js";
|
|
37
38
|
import {
|
|
38
39
|
findSession,
|
|
39
40
|
loadHistory
|
|
40
|
-
} from "./chunk-
|
|
41
|
-
import "./chunk-
|
|
41
|
+
} from "./chunk-RFQRVXFQ.js";
|
|
42
|
+
import "./chunk-JCMGIW7G.js";
|
|
42
43
|
import "./chunk-RCYI7SRA.js";
|
|
43
44
|
import "./chunk-NEJVK5CF.js";
|
|
44
45
|
import {
|
|
45
46
|
sessionIdFor
|
|
46
|
-
} from "./chunk-
|
|
47
|
-
import "./chunk-
|
|
48
|
-
import "./chunk-
|
|
49
|
-
import "./chunk-
|
|
47
|
+
} from "./chunk-FXHTSSV2.js";
|
|
48
|
+
import "./chunk-S4ILKUFN.js";
|
|
49
|
+
import "./chunk-FRCV6NWT.js";
|
|
50
|
+
import "./chunk-A53IRCOO.js";
|
|
50
51
|
|
|
51
52
|
// src/commands/fork.ts
|
|
52
53
|
import chalk from "chalk";
|
|
@@ -121,4 +122,4 @@ var forkCommand = {
|
|
|
121
122
|
export {
|
|
122
123
|
forkCommand
|
|
123
124
|
};
|
|
124
|
-
//# sourceMappingURL=fork-
|
|
125
|
+
//# sourceMappingURL=fork-5AOB45N2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/fork.ts"],"sourcesContent":["import chalk from 'chalk';\nimport type { CommandModule } from 'yargs';\nimport { askCatchUp, catchUpFacts } from '../core/conversations/catch-up-deps.js';\nimport { catchUp } from '../core/conversations/catch-up.js';\nimport { forkSession } from '../core/sessions/fork.js';\nimport { defaultForkDeps, uncommittedFiles } from '../core/sessions/fork-deps.js';\nimport { findSession, loadHistory } from '../core/sessions/history.js';\nimport { findSessionForCwd } from '../core/comments/pending-delivery.js';\nimport { sessionIdFor } from '../core/sessions/session-id.js';\nimport { startSessionWithPrompt } from '../core/sessions/session-start.js';\nimport { attachSession } from './shared/attach-session.js';\n\n/**\n * `work fork <new-branch>` — the dashboard's Fork… (core/fork.ts) from a\n * terminal: a new branch and worktree from where this session is, its Claude\n * started with a summary of this conversation; then this terminal is\n * attached to it, as `work tree` does (`--no-attach`: start it and leave it).\n */\nexport const forkCommand: CommandModule = {\n command: 'fork <branch>',\n describe: 'Fork the current session: a new branch from where it is, its Claude given a summary of this conversation',\n builder: (yargs) =>\n yargs\n .positional('branch', { type: 'string', demandOption: true, describe: 'The new branch' })\n .option('target', { type: 'string', describe: 'The session to fork: its repo or group (default: the session for this folder)' })\n .option('from', { type: 'string', describe: \"With --target: the session's branch\" })\n .option('prompt', { type: 'string', describe: 'What to try in the fork (default: read the summary and wait)' })\n .option('name', { type: 'string', describe: 'A name for the new session' })\n .option('attach', {\n type: 'boolean',\n default: true,\n describe: 'Attach this terminal to the new Claude (--no-attach: start it in the PTY host and return)',\n }),\n handler: async (argv) => {\n const history = loadHistory();\n const target = argv.target as string | undefined;\n const from = argv.from as string | undefined;\n if (!!target !== !!from) {\n console.error(chalk.red('Give both --target and --from, or neither (the session for this folder).'));\n process.exitCode = 1;\n return;\n }\n const parent = target && from ? findSession(history, target, from) : findSessionForCwd(process.cwd(), history);\n if (!parent) {\n console.error(\n chalk.red(target ? `No session for ${target} ${from}.` : 'This folder is not inside a work session: pass --target and --from.'),\n );\n process.exitCode = 1;\n return;\n }\n const branch = argv.branch as string;\n const attach = argv.attach !== false;\n let firstPrompt: string | null = null;\n console.log(chalk.cyan(`Forking ${parent.target} · ${parent.branch} into ${branch}…`));\n const r = await forkSession(\n parent,\n { branch, prompt: argv.prompt as string | undefined, name: argv.name as string | undefined },\n defaultForkDeps({\n summarize: async (s) => {\n console.log(chalk.gray('Writing a summary of the conversation…'));\n return (await catchUp(s, askCatchUp, catchUpFacts(sessionIdFor(s))))?.text ?? null;\n },\n uncommitted: uncommittedFiles,\n // Attaching starts it with the prompt (below); otherwise the host starts it now.\n start: async (id, prompt) => {\n firstPrompt = prompt;\n if (!attach) await startSessionWithPrompt(id, prompt);\n },\n }),\n );\n if (!r.ok) {\n console.error(chalk.red(`Not forked: ${r.error}`));\n process.exitCode = 1;\n return;\n }\n console.log(\n chalk.green(`Forked into ${r.paths.join(', ')}`) +\n chalk.gray(r.summarized ? ' — its Claude gets a summary of this conversation.' : ' — no recent conversation to summarize.'),\n );\n const fork = findSession(loadHistory(), parent.target, branch);\n if (r.startError || !fork) {\n console.error(\n chalk.yellow(`Its Claude didn't start: ${r.startError ?? 'session not found'}. Run \\`work tree ${parent.target} ${branch}\\`.`),\n );\n process.exitCode = 1;\n return;\n }\n if (!attach) {\n console.log(chalk.gray(`Running in the PTY host: \\`work attach ${parent.target} ${branch}\\` to see it.`));\n return;\n }\n process.exitCode = await attachSession(fork, { initialPrompt: firstPrompt ?? undefined, forwardEnv: true });\n },\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/fork.ts"],"sourcesContent":["import chalk from 'chalk';\nimport type { CommandModule } from 'yargs';\nimport { askCatchUp, catchUpFacts } from '../core/conversations/catch-up-deps.js';\nimport { catchUp } from '../core/conversations/catch-up.js';\nimport { forkSession } from '../core/sessions/fork.js';\nimport { defaultForkDeps, uncommittedFiles } from '../core/sessions/fork-deps.js';\nimport { findSession, loadHistory } from '../core/sessions/history.js';\nimport { findSessionForCwd } from '../core/comments/pending-delivery.js';\nimport { sessionIdFor } from '../core/sessions/session-id.js';\nimport { startSessionWithPrompt } from '../core/sessions/session-start.js';\nimport { attachSession } from './shared/attach-session.js';\n\n/**\n * `work fork <new-branch>` — the dashboard's Fork… (core/fork.ts) from a\n * terminal: a new branch and worktree from where this session is, its Claude\n * started with a summary of this conversation; then this terminal is\n * attached to it, as `work tree` does (`--no-attach`: start it and leave it).\n */\nexport const forkCommand: CommandModule = {\n command: 'fork <branch>',\n describe: 'Fork the current session: a new branch from where it is, its Claude given a summary of this conversation',\n builder: (yargs) =>\n yargs\n .positional('branch', { type: 'string', demandOption: true, describe: 'The new branch' })\n .option('target', { type: 'string', describe: 'The session to fork: its repo or group (default: the session for this folder)' })\n .option('from', { type: 'string', describe: \"With --target: the session's branch\" })\n .option('prompt', { type: 'string', describe: 'What to try in the fork (default: read the summary and wait)' })\n .option('name', { type: 'string', describe: 'A name for the new session' })\n .option('attach', {\n type: 'boolean',\n default: true,\n describe: 'Attach this terminal to the new Claude (--no-attach: start it in the PTY host and return)',\n }),\n handler: async (argv) => {\n const history = loadHistory();\n const target = argv.target as string | undefined;\n const from = argv.from as string | undefined;\n if (!!target !== !!from) {\n console.error(chalk.red('Give both --target and --from, or neither (the session for this folder).'));\n process.exitCode = 1;\n return;\n }\n const parent = target && from ? findSession(history, target, from) : findSessionForCwd(process.cwd(), history);\n if (!parent) {\n console.error(\n chalk.red(target ? `No session for ${target} ${from}.` : 'This folder is not inside a work session: pass --target and --from.'),\n );\n process.exitCode = 1;\n return;\n }\n const branch = argv.branch as string;\n const attach = argv.attach !== false;\n let firstPrompt: string | null = null;\n console.log(chalk.cyan(`Forking ${parent.target} · ${parent.branch} into ${branch}…`));\n const r = await forkSession(\n parent,\n { branch, prompt: argv.prompt as string | undefined, name: argv.name as string | undefined },\n defaultForkDeps({\n summarize: async (s) => {\n console.log(chalk.gray('Writing a summary of the conversation…'));\n return (await catchUp(s, askCatchUp, catchUpFacts(sessionIdFor(s))))?.text ?? null;\n },\n uncommitted: uncommittedFiles,\n // Attaching starts it with the prompt (below); otherwise the host starts it now.\n start: async (id, prompt) => {\n firstPrompt = prompt;\n if (!attach) await startSessionWithPrompt(id, prompt);\n },\n }),\n );\n if (!r.ok) {\n console.error(chalk.red(`Not forked: ${r.error}`));\n process.exitCode = 1;\n return;\n }\n console.log(\n chalk.green(`Forked into ${r.paths.join(', ')}`) +\n chalk.gray(r.summarized ? ' — its Claude gets a summary of this conversation.' : ' — no recent conversation to summarize.'),\n );\n const fork = findSession(loadHistory(), parent.target, branch);\n if (r.startError || !fork) {\n console.error(\n chalk.yellow(`Its Claude didn't start: ${r.startError ?? 'session not found'}. Run \\`work tree ${parent.target} ${branch}\\`.`),\n );\n process.exitCode = 1;\n return;\n }\n if (!attach) {\n console.log(chalk.gray(`Running in the PTY host: \\`work attach ${parent.target} ${branch}\\` to see it.`));\n return;\n }\n process.exitCode = await attachSession(fork, { initialP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
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
appendSessionRepo,
|
|
4
|
+
findSession,
|
|
5
|
+
findSessionById,
|
|
6
|
+
forgetOtherBaseCheckoutEntries,
|
|
7
|
+
getHistoryPath,
|
|
8
|
+
getRecentSessions,
|
|
9
|
+
getSessionsForTarget,
|
|
10
|
+
loadHistory,
|
|
11
|
+
mergeHydratedSessions,
|
|
12
|
+
prunePersistedStaleEntries,
|
|
13
|
+
pruneStaleEntries,
|
|
14
|
+
recordLaunch,
|
|
15
|
+
removeSession,
|
|
16
|
+
saveHistory,
|
|
17
|
+
setOwnRepos,
|
|
18
|
+
setSessionArchived,
|
|
19
|
+
setSessionBase,
|
|
20
|
+
setSessionTitle,
|
|
21
|
+
touchSession,
|
|
22
|
+
upsertSession,
|
|
23
|
+
upsertSessionWithPort
|
|
24
|
+
} from "./chunk-RFQRVXFQ.js";
|
|
25
|
+
import "./chunk-JCMGIW7G.js";
|
|
26
|
+
import "./chunk-RCYI7SRA.js";
|
|
27
|
+
import "./chunk-NEJVK5CF.js";
|
|
28
|
+
import "./chunk-FXHTSSV2.js";
|
|
29
|
+
import "./chunk-S4ILKUFN.js";
|
|
30
|
+
import "./chunk-FRCV6NWT.js";
|
|
31
|
+
import "./chunk-A53IRCOO.js";
|
|
32
|
+
export {
|
|
33
|
+
appendSessionRepo,
|
|
34
|
+
findSession,
|
|
35
|
+
findSessionById,
|
|
36
|
+
forgetOtherBaseCheckoutEntries,
|
|
37
|
+
getHistoryPath,
|
|
38
|
+
getRecentSessions,
|
|
39
|
+
getSessionsForTarget,
|
|
40
|
+
loadHistory,
|
|
41
|
+
mergeHydratedSessions,
|
|
42
|
+
prunePersistedStaleEntries,
|
|
43
|
+
pruneStaleEntries,
|
|
44
|
+
recordLaunch,
|
|
45
|
+
removeSession,
|
|
46
|
+
saveHistory,
|
|
47
|
+
setOwnRepos,
|
|
48
|
+
setSessionArchived,
|
|
49
|
+
setSessionBase,
|
|
50
|
+
setSessionTitle,
|
|
51
|
+
touchSession,
|
|
52
|
+
upsertSession,
|
|
53
|
+
upsertSessionWithPort
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=history-3LFLB4FO.js.map
|