@moberg_hr/work-tree 2.10.0 → 2.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{account-QSNXX5YV.js → account-QZH4MA42.js} +21 -21
- package/dist/{add-repo-YZ32MLZG.js → add-repo-CAQSJPLG.js} +17 -17
- package/dist/{answer-Y4T5X446.js → answer-3QIKCVON.js} +12 -12
- package/dist/{attach-XPYWYHDP.js → attach-GR3AD4D7.js} +19 -19
- package/dist/bin.js +5 -5
- package/dist/{block-JVAGG5QA.js → block-JFZ5RDO3.js} +15 -16
- package/dist/{block-JVAGG5QA.js.map → block-JFZ5RDO3.js.map} +1 -1
- package/dist/{broadcast-FATIANHX.js → broadcast-WW6DBVZ3.js} +10 -10
- package/dist/{catchup-OTI2KZG5.js → catchup-RMYAFVK3.js} +15 -15
- package/dist/{chunk-VV3NFLLP.js → chunk-26YZYL77.js} +3 -3
- package/dist/{chunk-UP2JTDBI.js → chunk-32VFZGPR.js} +3 -3
- package/dist/{chunk-ZRATYLBB.js → chunk-33XSEAHO.js} +2 -2
- package/dist/{chunk-E67DOUVU.js → chunk-3OAW37JA.js} +107 -18
- package/dist/chunk-3OAW37JA.js.map +1 -0
- package/dist/{chunk-27LWL6QE.js → chunk-3SBQIJQS.js} +468 -14
- package/dist/chunk-3SBQIJQS.js.map +1 -0
- package/dist/{chunk-MM7344RC.js → chunk-4CNBSPNL.js} +2 -2
- package/dist/{chunk-RHDZPV6C.js → chunk-4EL7FVQQ.js} +2 -2
- package/dist/{chunk-FMLE2WSN.js → chunk-4IRPL6XA.js} +2 -2
- package/dist/{chunk-BNKVENDF.js → chunk-4NUWTGAP.js} +5 -5
- package/dist/{chunk-46XSWHCQ.js → chunk-5E44Z6IL.js} +5 -4
- package/dist/chunk-5E44Z6IL.js.map +1 -0
- package/dist/{chunk-KL4YYV37.js → chunk-5FBRQW2F.js} +4 -4
- package/dist/{chunk-TKWUSJNQ.js → chunk-5LW5OJHH.js} +7 -9
- package/dist/{chunk-TKWUSJNQ.js.map → chunk-5LW5OJHH.js.map} +1 -1
- package/dist/{chunk-JNCKZ3OF.js → chunk-63FTAMDO.js} +4 -4
- package/dist/{chunk-WKOJ7NXD.js → chunk-6RMB3I3V.js} +4 -4
- package/dist/{chunk-6J6U7JXN.js → chunk-6YZBMC35.js} +3 -3
- package/dist/{chunk-3BSFVKMK.js → chunk-7DUGVGUZ.js} +2 -2
- package/dist/{chunk-IOHK45WE.js → chunk-7OFVXQSM.js} +2 -2
- package/dist/{chunk-34E2LA3M.js → chunk-A6N4FF4K.js} +5 -5
- package/dist/{chunk-IFQOOCT7.js → chunk-AOWYAOAX.js} +46 -24
- package/dist/chunk-AOWYAOAX.js.map +1 -0
- package/dist/{chunk-V4U5RGEG.js → chunk-BDPRYJL3.js} +3 -3
- package/dist/chunk-BDPRYJL3.js.map +1 -0
- package/dist/{chunk-4TTYEMOY.js → chunk-BM36OYVS.js} +14 -7
- package/dist/chunk-BM36OYVS.js.map +1 -0
- package/dist/{chunk-66VPQOVZ.js → chunk-C7CDET5W.js} +13 -10
- package/dist/chunk-C7CDET5W.js.map +1 -0
- package/dist/{chunk-RCGFHJM7.js → chunk-CBCOVIXZ.js} +2 -2
- package/dist/{chunk-ZXHMC7UO.js → chunk-D2J3AD6L.js} +3 -5
- package/dist/chunk-D2J3AD6L.js.map +1 -0
- package/dist/{chunk-ICXUTMGH.js → chunk-DGVCN7HB.js} +2 -2
- package/dist/{chunk-B5WDN63X.js → chunk-DMGNJ73M.js} +2 -2
- package/dist/{chunk-LZZCJAJQ.js → chunk-DTUKXBAR.js} +7 -7
- package/dist/{chunk-FKM67CZZ.js → chunk-FEL7UMIO.js} +7 -9
- package/dist/{chunk-FKM67CZZ.js.map → chunk-FEL7UMIO.js.map} +1 -1
- package/dist/chunk-FGPXMAYU.js +25 -0
- package/dist/chunk-FGPXMAYU.js.map +1 -0
- package/dist/{chunk-2K5TDJ7M.js → chunk-FI2HURCM.js} +5 -5
- package/dist/{chunk-2HHIDWHH.js → chunk-FJQT7OWV.js} +7 -7
- package/dist/{chunk-LKESANVD.js → chunk-FNA27U2B.js} +2 -2
- package/dist/{chunk-6YMLYU5G.js → chunk-FZJ472VJ.js} +7 -7
- package/dist/{chunk-ADIN3DTD.js → chunk-GG4VKPAX.js} +2 -2
- package/dist/{chunk-V7GCYL6A.js → chunk-GOK6JBB2.js} +6 -6
- package/dist/{chunk-IKX3B26P.js → chunk-GZYXCMJH.js} +4 -4
- package/dist/{chunk-VFH4SU3M.js → chunk-HRBAXQXF.js} +9 -9
- package/dist/{chunk-2VRZVUM7.js → chunk-ISE5VJP2.js} +6 -6
- package/dist/{chunk-OCMNBOPX.js → chunk-JVHHSKBJ.js} +2 -2
- package/dist/{chunk-3S6L437Q.js → chunk-K3H4EQHV.js} +4 -4
- package/dist/{chunk-KDO7D46L.js → chunk-KJRUC2QY.js} +3 -3
- package/dist/{chunk-Z6ZMWFNV.js → chunk-LA3X5A3U.js} +6 -8
- package/dist/{chunk-Z6ZMWFNV.js.map → chunk-LA3X5A3U.js.map} +1 -1
- package/dist/{chunk-PSUJZUYX.js → chunk-LM2T5OR3.js} +3 -2
- package/dist/{chunk-UBOKRHNV.js → chunk-MKJH2D4V.js} +2 -2
- package/dist/{chunk-NWOCQVSL.js → chunk-MR7XFKTK.js} +7 -7
- package/dist/{chunk-Z7I6DQAR.js → chunk-N4W34U3I.js} +42 -9
- package/dist/chunk-N4W34U3I.js.map +1 -0
- package/dist/{chunk-PCNNW63Z.js → chunk-NFWSJFYY.js} +2 -2
- package/dist/{chunk-TIG7NHVO.js → chunk-NKIZLEO2.js} +21 -9
- package/dist/chunk-NKIZLEO2.js.map +1 -0
- package/dist/{chunk-353ZINJ2.js → chunk-NXN7B3BE.js} +3 -3
- package/dist/{chunk-3XG23PLG.js → chunk-O36SFV5G.js} +13 -3
- package/dist/{chunk-3XG23PLG.js.map → chunk-O36SFV5G.js.map} +1 -1
- package/dist/{chunk-2MAZV5KS.js → chunk-O5ZJY5BT.js} +16 -3
- package/dist/chunk-O5ZJY5BT.js.map +1 -0
- package/dist/{chunk-WY7QZ2P7.js → chunk-O6UWELSS.js} +2 -2
- package/dist/{chunk-WVV54JP3.js → chunk-OAP7XYNK.js} +53 -53
- package/dist/{chunk-AHI2WVWP.js → chunk-OYLUYJTY.js} +8 -8
- package/dist/{chunk-PHGVVFTF.js → chunk-PJGAPVK4.js} +108 -133
- package/dist/chunk-PJGAPVK4.js.map +1 -0
- package/dist/{chunk-RJUMLWXP.js → chunk-PTYM27VH.js} +114 -18
- package/dist/chunk-PTYM27VH.js.map +1 -0
- package/dist/{chunk-Y7T73SAP.js → chunk-RUYTU2WJ.js} +7 -3
- package/dist/chunk-RUYTU2WJ.js.map +1 -0
- package/dist/{chunk-5R5JEQW7.js → chunk-SFMIDVB7.js} +17 -12
- package/dist/chunk-SFMIDVB7.js.map +1 -0
- package/dist/{chunk-GZGJQKQT.js → chunk-SKRVI3Z4.js} +2 -2
- package/dist/{chunk-E7WPTSHQ.js → chunk-UJ2GAHAZ.js} +11 -11
- package/dist/{chunk-4O4VQQEA.js → chunk-VJ5XMYXE.js} +3 -3
- package/dist/{chunk-IDQVTWLX.js → chunk-VRTOALU3.js} +5 -5
- package/dist/chunk-WAIFKHD6.js +9 -0
- package/dist/{chunk-LJKF73JB.js → chunk-WDL6ANZ3.js} +3 -3
- package/dist/{chunk-F3PEUOTP.js → chunk-WGKU5PPI.js} +2 -2
- package/dist/{chunk-JVBIWU7S.js → chunk-X5RHYVXY.js} +3 -3
- package/dist/{chunk-RQFHA5BM.js → chunk-YKQLHFY4.js} +43 -8
- package/dist/chunk-YKQLHFY4.js.map +1 -0
- package/dist/{chunk-FSQJOZS4.js → chunk-ZI7XN4VD.js} +9 -9
- package/dist/{cleanup-M5TY4FQS.js → cleanup-OMYTNUP4.js} +35 -35
- package/dist/{cli-446A536X.js → cli-G7EUXIPW.js} +5 -5
- package/dist/{command-hook-installer-7Q7UD7AU.js → command-hook-installer-GMQ4IVDE.js} +3 -3
- package/dist/{config-JLORGUXN.js → config-YO5QGP3B.js} +11 -11
- package/dist/{diff-4O5HXNZ7.js → diff-LIG47TN7.js} +12 -12
- package/dist/{digest-IAAZXJCC.js → digest-FMSWN4A6.js} +11 -11
- package/dist/{fork-ULJYPEKY.js → fork-A7U7AM4M.js} +32 -32
- package/dist/{history-JFZF22M7.js → history-NMHRGJ76.js} +9 -9
- package/dist/{hook-UYOIQVJ7.js → hook-NDETZUEC.js} +17 -17
- package/dist/{hydrate-DROI4RJ7.js → hydrate-ZTKYATH3.js} +10 -10
- package/dist/{init-FF75CQM7.js → init-MMJF5ZVJ.js} +16 -16
- package/dist/{install-skills-XSAHNBYD.js → install-skills-KS6N4U6L.js} +8 -8
- package/dist/install-skills-bin.js +7 -7
- package/dist/{list-5FEHBP6N.js → list-Z77M43EU.js} +9 -9
- package/dist/{move-422L6PPI.js → move-YQIYXSFQ.js} +20 -20
- package/dist/{note-AAXPD5VA.js → note-C5SVIML6.js} +13 -13
- package/dist/{overlaps-WPNUYOFF.js → overlaps-ARNCAXUT.js} +16 -16
- package/dist/{pin-QXPF23BB.js → pin-D4J3XXDU.js} +13 -13
- package/dist/{pr-QLGXPKPQ.js → pr-VMDNT4T7.js} +24 -24
- package/dist/{prune-GRHKRRVT.js → prune-XKMNAY7O.js} +33 -33
- package/dist/{pty-host-XDDXA4SL.js → pty-host-FVXJRFSL.js} +59 -21
- package/dist/pty-host-FVXJRFSL.js.map +1 -0
- package/dist/{read-YWKD2DGP.js → read-PWWKV66E.js} +12 -12
- package/dist/{recent-SI5BDVVH.js → recent-C4ZH75KK.js} +17 -17
- package/dist/{remove-RXXCHY44.js → remove-QFZ4YGVH.js} +32 -32
- package/dist/{restart-CPNDEXU6.js → restart-NZ2QYWA4.js} +12 -12
- package/dist/{resume-BLP4TTJK.js → resume-PRMBJOOG.js} +17 -17
- package/dist/{review-now-ADWZPELT.js → review-now-HHQIBVUS.js} +5 -5
- package/dist/{run-JFCDJ3EV.js → run-LUXAB6F5.js} +9 -9
- package/dist/{screen-LBOPAUXV.js → screen-PJJEEXVP.js} +12 -12
- package/dist/{search-AMEGRH24.js → search-4HW2HAPD.js} +9 -9
- package/dist/{section-73Z34PVE.js → section-PWWC2XPV.js} +13 -13
- package/dist/{send-IZBSEET5.js → send-JZMFXJ2B.js} +13 -13
- package/dist/{sessions-WVQ2U2W4.js → sessions-KQOSJ3OP.js} +28 -28
- package/dist/{snooze-7IBHY5MY.js → snooze-ZMYLNEVQ.js} +12 -12
- package/dist/{start-AU62TW6M.js → start-L2S4FTDD.js} +12 -12
- package/dist/{state-IZV7DAPL.js → state-BR43ONIH.js} +15 -6
- package/dist/state-BR43ONIH.js.map +1 -0
- package/dist/{status-Z7OMNYZX.js → status-N4WDRKZP.js} +14 -14
- package/dist/{statusline-VJFY7ZAB.js → statusline-WKKYCH7O.js} +5 -5
- package/dist/{statusline-hook-JA7MNE5H.js → statusline-hook-K7KPN2H6.js} +3 -3
- package/dist/{stop-PWNXSFBD.js → stop-IMXPEISI.js} +12 -12
- package/dist/{sync-2BTZVDDG.js → sync-5Q5FLL2B.js} +33 -33
- package/dist/{time-CTCIAXIY.js → time-ZK7RLSJI.js} +14 -14
- package/dist/{time-actions-UYBOXET6.js → time-actions-YOXF5WC7.js} +5 -5
- package/dist/{timesheet-BUFQ34FC.js → timesheet-73FNOA42.js} +16 -16
- package/dist/{todo-2R7VID57.js → todo-TALKJYK6.js} +5 -5
- package/dist/{tree-LQDPAXQA.js → tree-S2TMFTUZ.js} +32 -33
- package/dist/{tree-LQDPAXQA.js.map → tree-S2TMFTUZ.js.map} +1 -1
- package/dist/{update-2IYJHY7H.js → update-WZJ7B3QA.js} +19 -19
- package/dist/{usage-IR5GNF4R.js → usage-LQVXS6YO.js} +11 -11
- package/dist/{version-ONEI52TI.js → version-TVT6GSRF.js} +5 -5
- package/dist/{wait-6DH34L53.js → wait-AQGROBL7.js} +13 -13
- package/dist/wd-bin.js +4 -4
- package/dist/web/assets/PtyView-Bx7qpA8Y.js +96 -0
- package/dist/web/assets/PtyView-Bx7qpA8Y.js.map +1 -0
- package/dist/web/assets/index-CpqiTeqj.css +1 -0
- package/dist/web/assets/index-CxSvivCX.js +126 -0
- package/dist/web/assets/index-CxSvivCX.js.map +1 -0
- package/dist/web/index.html +2 -2
- package/dist/{web-RIHGV7YY.js → web-AKDU7HMP.js} +3735 -2713
- package/dist/web-AKDU7HMP.js.map +1 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/dist/chunk-27LWL6QE.js.map +0 -1
- package/dist/chunk-2MAZV5KS.js.map +0 -1
- package/dist/chunk-46XSWHCQ.js.map +0 -1
- package/dist/chunk-4TTYEMOY.js.map +0 -1
- package/dist/chunk-5R5JEQW7.js.map +0 -1
- package/dist/chunk-66VPQOVZ.js.map +0 -1
- package/dist/chunk-7S2NQRWL.js +0 -9
- package/dist/chunk-AQP6SCCJ.js +0 -66
- package/dist/chunk-AQP6SCCJ.js.map +0 -1
- package/dist/chunk-E67DOUVU.js.map +0 -1
- package/dist/chunk-IFQOOCT7.js.map +0 -1
- package/dist/chunk-L22AWXWA.js +0 -29
- package/dist/chunk-L22AWXWA.js.map +0 -1
- package/dist/chunk-PHGVVFTF.js.map +0 -1
- package/dist/chunk-RJUMLWXP.js.map +0 -1
- package/dist/chunk-RQFHA5BM.js.map +0 -1
- package/dist/chunk-TIG7NHVO.js.map +0 -1
- package/dist/chunk-V4U5RGEG.js.map +0 -1
- package/dist/chunk-Y7T73SAP.js.map +0 -1
- package/dist/chunk-Z7I6DQAR.js.map +0 -1
- package/dist/chunk-ZXHMC7UO.js.map +0 -1
- package/dist/pty-host-XDDXA4SL.js.map +0 -1
- package/dist/state-IZV7DAPL.js.map +0 -1
- package/dist/web/assets/PtyView-kBcAOwHr.js +0 -96
- package/dist/web/assets/PtyView-kBcAOwHr.js.map +0 -1
- package/dist/web/assets/index-BgfR3N99.js +0 -124
- package/dist/web/assets/index-BgfR3N99.js.map +0 -1
- package/dist/web/assets/index-CKpHjII8.css +0 -1
- package/dist/web-RIHGV7YY.js.map +0 -1
- /package/dist/{account-QSNXX5YV.js.map → account-QZH4MA42.js.map} +0 -0
- /package/dist/{add-repo-YZ32MLZG.js.map → add-repo-CAQSJPLG.js.map} +0 -0
- /package/dist/{answer-Y4T5X446.js.map → answer-3QIKCVON.js.map} +0 -0
- /package/dist/{attach-XPYWYHDP.js.map → attach-GR3AD4D7.js.map} +0 -0
- /package/dist/{broadcast-FATIANHX.js.map → broadcast-WW6DBVZ3.js.map} +0 -0
- /package/dist/{catchup-OTI2KZG5.js.map → catchup-RMYAFVK3.js.map} +0 -0
- /package/dist/{chunk-VV3NFLLP.js.map → chunk-26YZYL77.js.map} +0 -0
- /package/dist/{chunk-UP2JTDBI.js.map → chunk-32VFZGPR.js.map} +0 -0
- /package/dist/{chunk-ZRATYLBB.js.map → chunk-33XSEAHO.js.map} +0 -0
- /package/dist/{chunk-MM7344RC.js.map → chunk-4CNBSPNL.js.map} +0 -0
- /package/dist/{chunk-RHDZPV6C.js.map → chunk-4EL7FVQQ.js.map} +0 -0
- /package/dist/{chunk-FMLE2WSN.js.map → chunk-4IRPL6XA.js.map} +0 -0
- /package/dist/{chunk-BNKVENDF.js.map → chunk-4NUWTGAP.js.map} +0 -0
- /package/dist/{chunk-KL4YYV37.js.map → chunk-5FBRQW2F.js.map} +0 -0
- /package/dist/{chunk-JNCKZ3OF.js.map → chunk-63FTAMDO.js.map} +0 -0
- /package/dist/{chunk-WKOJ7NXD.js.map → chunk-6RMB3I3V.js.map} +0 -0
- /package/dist/{chunk-6J6U7JXN.js.map → chunk-6YZBMC35.js.map} +0 -0
- /package/dist/{chunk-3BSFVKMK.js.map → chunk-7DUGVGUZ.js.map} +0 -0
- /package/dist/{chunk-IOHK45WE.js.map → chunk-7OFVXQSM.js.map} +0 -0
- /package/dist/{chunk-34E2LA3M.js.map → chunk-A6N4FF4K.js.map} +0 -0
- /package/dist/{chunk-RCGFHJM7.js.map → chunk-CBCOVIXZ.js.map} +0 -0
- /package/dist/{chunk-ICXUTMGH.js.map → chunk-DGVCN7HB.js.map} +0 -0
- /package/dist/{chunk-B5WDN63X.js.map → chunk-DMGNJ73M.js.map} +0 -0
- /package/dist/{chunk-LZZCJAJQ.js.map → chunk-DTUKXBAR.js.map} +0 -0
- /package/dist/{chunk-2K5TDJ7M.js.map → chunk-FI2HURCM.js.map} +0 -0
- /package/dist/{chunk-2HHIDWHH.js.map → chunk-FJQT7OWV.js.map} +0 -0
- /package/dist/{chunk-LKESANVD.js.map → chunk-FNA27U2B.js.map} +0 -0
- /package/dist/{chunk-6YMLYU5G.js.map → chunk-FZJ472VJ.js.map} +0 -0
- /package/dist/{chunk-ADIN3DTD.js.map → chunk-GG4VKPAX.js.map} +0 -0
- /package/dist/{chunk-V7GCYL6A.js.map → chunk-GOK6JBB2.js.map} +0 -0
- /package/dist/{chunk-IKX3B26P.js.map → chunk-GZYXCMJH.js.map} +0 -0
- /package/dist/{chunk-VFH4SU3M.js.map → chunk-HRBAXQXF.js.map} +0 -0
- /package/dist/{chunk-2VRZVUM7.js.map → chunk-ISE5VJP2.js.map} +0 -0
- /package/dist/{chunk-OCMNBOPX.js.map → chunk-JVHHSKBJ.js.map} +0 -0
- /package/dist/{chunk-3S6L437Q.js.map → chunk-K3H4EQHV.js.map} +0 -0
- /package/dist/{chunk-KDO7D46L.js.map → chunk-KJRUC2QY.js.map} +0 -0
- /package/dist/{chunk-PSUJZUYX.js.map → chunk-LM2T5OR3.js.map} +0 -0
- /package/dist/{chunk-UBOKRHNV.js.map → chunk-MKJH2D4V.js.map} +0 -0
- /package/dist/{chunk-NWOCQVSL.js.map → chunk-MR7XFKTK.js.map} +0 -0
- /package/dist/{chunk-PCNNW63Z.js.map → chunk-NFWSJFYY.js.map} +0 -0
- /package/dist/{chunk-353ZINJ2.js.map → chunk-NXN7B3BE.js.map} +0 -0
- /package/dist/{chunk-WY7QZ2P7.js.map → chunk-O6UWELSS.js.map} +0 -0
- /package/dist/{chunk-WVV54JP3.js.map → chunk-OAP7XYNK.js.map} +0 -0
- /package/dist/{chunk-AHI2WVWP.js.map → chunk-OYLUYJTY.js.map} +0 -0
- /package/dist/{chunk-GZGJQKQT.js.map → chunk-SKRVI3Z4.js.map} +0 -0
- /package/dist/{chunk-E7WPTSHQ.js.map → chunk-UJ2GAHAZ.js.map} +0 -0
- /package/dist/{chunk-4O4VQQEA.js.map → chunk-VJ5XMYXE.js.map} +0 -0
- /package/dist/{chunk-IDQVTWLX.js.map → chunk-VRTOALU3.js.map} +0 -0
- /package/dist/{chunk-7S2NQRWL.js.map → chunk-WAIFKHD6.js.map} +0 -0
- /package/dist/{chunk-LJKF73JB.js.map → chunk-WDL6ANZ3.js.map} +0 -0
- /package/dist/{chunk-F3PEUOTP.js.map → chunk-WGKU5PPI.js.map} +0 -0
- /package/dist/{chunk-JVBIWU7S.js.map → chunk-X5RHYVXY.js.map} +0 -0
- /package/dist/{chunk-FSQJOZS4.js.map → chunk-ZI7XN4VD.js.map} +0 -0
- /package/dist/{cleanup-M5TY4FQS.js.map → cleanup-OMYTNUP4.js.map} +0 -0
- /package/dist/{cli-446A536X.js.map → cli-G7EUXIPW.js.map} +0 -0
- /package/dist/{command-hook-installer-7Q7UD7AU.js.map → command-hook-installer-GMQ4IVDE.js.map} +0 -0
- /package/dist/{config-JLORGUXN.js.map → config-YO5QGP3B.js.map} +0 -0
- /package/dist/{diff-4O5HXNZ7.js.map → diff-LIG47TN7.js.map} +0 -0
- /package/dist/{digest-IAAZXJCC.js.map → digest-FMSWN4A6.js.map} +0 -0
- /package/dist/{fork-ULJYPEKY.js.map → fork-A7U7AM4M.js.map} +0 -0
- /package/dist/{history-JFZF22M7.js.map → history-NMHRGJ76.js.map} +0 -0
- /package/dist/{hook-UYOIQVJ7.js.map → hook-NDETZUEC.js.map} +0 -0
- /package/dist/{hydrate-DROI4RJ7.js.map → hydrate-ZTKYATH3.js.map} +0 -0
- /package/dist/{init-FF75CQM7.js.map → init-MMJF5ZVJ.js.map} +0 -0
- /package/dist/{install-skills-XSAHNBYD.js.map → install-skills-KS6N4U6L.js.map} +0 -0
- /package/dist/{list-5FEHBP6N.js.map → list-Z77M43EU.js.map} +0 -0
- /package/dist/{move-422L6PPI.js.map → move-YQIYXSFQ.js.map} +0 -0
- /package/dist/{note-AAXPD5VA.js.map → note-C5SVIML6.js.map} +0 -0
- /package/dist/{overlaps-WPNUYOFF.js.map → overlaps-ARNCAXUT.js.map} +0 -0
- /package/dist/{pin-QXPF23BB.js.map → pin-D4J3XXDU.js.map} +0 -0
- /package/dist/{pr-QLGXPKPQ.js.map → pr-VMDNT4T7.js.map} +0 -0
- /package/dist/{prune-GRHKRRVT.js.map → prune-XKMNAY7O.js.map} +0 -0
- /package/dist/{read-YWKD2DGP.js.map → read-PWWKV66E.js.map} +0 -0
- /package/dist/{recent-SI5BDVVH.js.map → recent-C4ZH75KK.js.map} +0 -0
- /package/dist/{remove-RXXCHY44.js.map → remove-QFZ4YGVH.js.map} +0 -0
- /package/dist/{restart-CPNDEXU6.js.map → restart-NZ2QYWA4.js.map} +0 -0
- /package/dist/{resume-BLP4TTJK.js.map → resume-PRMBJOOG.js.map} +0 -0
- /package/dist/{review-now-ADWZPELT.js.map → review-now-HHQIBVUS.js.map} +0 -0
- /package/dist/{run-JFCDJ3EV.js.map → run-LUXAB6F5.js.map} +0 -0
- /package/dist/{screen-LBOPAUXV.js.map → screen-PJJEEXVP.js.map} +0 -0
- /package/dist/{search-AMEGRH24.js.map → search-4HW2HAPD.js.map} +0 -0
- /package/dist/{section-73Z34PVE.js.map → section-PWWC2XPV.js.map} +0 -0
- /package/dist/{send-IZBSEET5.js.map → send-JZMFXJ2B.js.map} +0 -0
- /package/dist/{sessions-WVQ2U2W4.js.map → sessions-KQOSJ3OP.js.map} +0 -0
- /package/dist/{snooze-7IBHY5MY.js.map → snooze-ZMYLNEVQ.js.map} +0 -0
- /package/dist/{start-AU62TW6M.js.map → start-L2S4FTDD.js.map} +0 -0
- /package/dist/{status-Z7OMNYZX.js.map → status-N4WDRKZP.js.map} +0 -0
- /package/dist/{statusline-VJFY7ZAB.js.map → statusline-WKKYCH7O.js.map} +0 -0
- /package/dist/{statusline-hook-JA7MNE5H.js.map → statusline-hook-K7KPN2H6.js.map} +0 -0
- /package/dist/{stop-PWNXSFBD.js.map → stop-IMXPEISI.js.map} +0 -0
- /package/dist/{sync-2BTZVDDG.js.map → sync-5Q5FLL2B.js.map} +0 -0
- /package/dist/{time-CTCIAXIY.js.map → time-ZK7RLSJI.js.map} +0 -0
- /package/dist/{time-actions-UYBOXET6.js.map → time-actions-YOXF5WC7.js.map} +0 -0
- /package/dist/{timesheet-BUFQ34FC.js.map → timesheet-73FNOA42.js.map} +0 -0
- /package/dist/{todo-2R7VID57.js.map → todo-TALKJYK6.js.map} +0 -0
- /package/dist/{update-2IYJHY7H.js.map → update-WZJ7B3QA.js.map} +0 -0
- /package/dist/{usage-IR5GNF4R.js.map → usage-LQVXS6YO.js.map} +0 -0
- /package/dist/{version-ONEI52TI.js.map → version-TVT6GSRF.js.map} +0 -0
- /package/dist/{wait-6DH34L53.js.map → wait-AQGROBL7.js.map} +0 -0
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-LNHSBM4L.js";
|
|
5
5
|
import {
|
|
6
6
|
knownAgents
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-N4W34U3I.js";
|
|
8
8
|
|
|
9
9
|
// src/commands/install-skills.ts
|
|
10
10
|
import chalk from "chalk";
|
|
@@ -44,4 +44,4 @@ export {
|
|
|
44
44
|
runInstallSkills,
|
|
45
45
|
installSkillsCommand
|
|
46
46
|
};
|
|
47
|
-
//# sourceMappingURL=chunk-
|
|
47
|
+
//# sourceMappingURL=chunk-4CNBSPNL.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
isFolderSession,
|
|
4
4
|
sessionRepos
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-3SBQIJQS.js";
|
|
6
6
|
|
|
7
7
|
// src/core/worktree/add-repo-rules.ts
|
|
8
8
|
import path from "path";
|
|
@@ -36,4 +36,4 @@ export {
|
|
|
36
36
|
addRepoRefusal,
|
|
37
37
|
addedRepoNote
|
|
38
38
|
};
|
|
39
|
-
//# sourceMappingURL=chunk-
|
|
39
|
+
//# sourceMappingURL=chunk-4EL7FVQQ.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
readStatus
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-3SBQIJQS.js";
|
|
5
5
|
|
|
6
6
|
// src/commands/shared/turn-wait.ts
|
|
7
7
|
var cliWaitDeps = {
|
|
@@ -16,4 +16,4 @@ var cliWaitDeps = {
|
|
|
16
16
|
export {
|
|
17
17
|
cliWaitDeps
|
|
18
18
|
};
|
|
19
|
-
//# sourceMappingURL=chunk-
|
|
19
|
+
//# sourceMappingURL=chunk-4IRPL6XA.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
sessionTokens
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NXN7B3BE.js";
|
|
5
5
|
import {
|
|
6
6
|
agedWindow
|
|
7
7
|
} from "./chunk-6UTH3A76.js";
|
|
@@ -9,16 +9,16 @@ import {
|
|
|
9
9
|
lastConversationWriteMs,
|
|
10
10
|
loadHistory,
|
|
11
11
|
logSwallowed
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-3SBQIJQS.js";
|
|
13
13
|
import {
|
|
14
14
|
dayKey
|
|
15
15
|
} from "./chunk-NEJVK5CF.js";
|
|
16
16
|
import {
|
|
17
17
|
sessionIdFor
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-RUYTU2WJ.js";
|
|
19
19
|
import {
|
|
20
20
|
knownAgents
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-N4W34U3I.js";
|
|
22
22
|
|
|
23
23
|
// src/core/usage/usage-source.ts
|
|
24
24
|
var WEEK_DAYS = 7;
|
|
@@ -132,4 +132,4 @@ export {
|
|
|
132
132
|
setupAgentUsage,
|
|
133
133
|
restoreAgentUsage
|
|
134
134
|
};
|
|
135
|
-
//# sourceMappingURL=chunk-
|
|
135
|
+
//# sourceMappingURL=chunk-4NUWTGAP.js.map
|
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
} from "./chunk-MQCDFSVF.js";
|
|
9
9
|
import {
|
|
10
10
|
recordedRepos
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-3SBQIJQS.js";
|
|
12
12
|
import {
|
|
13
13
|
getConfigPath
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-O5ZJY5BT.js";
|
|
15
15
|
import {
|
|
16
16
|
atomicWriteFile,
|
|
17
17
|
withFileLock
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-D2J3AD6L.js";
|
|
19
19
|
import {
|
|
20
20
|
getConfigDir
|
|
21
21
|
} from "./chunk-6THUVP6T.js";
|
|
@@ -171,6 +171,7 @@ async function setReviewMode(project, mode) {
|
|
|
171
171
|
export {
|
|
172
172
|
RepoAdminError,
|
|
173
173
|
repoInventory,
|
|
174
|
+
editConfig,
|
|
174
175
|
enrollRepo,
|
|
175
176
|
removeRepo,
|
|
176
177
|
setRepoIgnored,
|
|
@@ -179,4 +180,4 @@ export {
|
|
|
179
180
|
deleteGroup,
|
|
180
181
|
setReviewMode
|
|
181
182
|
};
|
|
182
|
-
//# sourceMappingURL=chunk-
|
|
183
|
+
//# sourceMappingURL=chunk-5E44Z6IL.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/worktree/repo-admin.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\nimport type { GroupRow, RepoRow, ReposWire } from '../api-types.js';\nimport { getConfigDir, getConfigPath, type WorkConfig } from '../platform/config.js';\nimport { atomicWriteFile, withFileLock } from '../platform/fs-safe.js';\nimport type { WorktreeSession } from '../sessions/session-types.js';\nimport { recordedRepos } from '../sessions/session-repos.js';\nimport { enrollProblem, groupProblem, samePathKey, scanForRepos, suggestAlias, type FoundRepo } from './repo-scan.js';\n\n/**\n * The Repos page's model and its changes (and `work config scan`'s): every\n * repo in the scanned folders — enrolled, new or ignored — plus the groups,\n * each with its live sessions; and enrolling, removing, ignoring, scanned\n * folders, groups. Changes edit config.json as it is on disk (its raw\n * JSON, so no setting this code doesn't know is lost) under the same lock\n * every writer of it takes.\n */\n\n/** A refusal the user can act on (the route answers 400, or 409 when `sessions` could be forced past). */\nexport class RepoAdminError extends Error {\n constructor(\n message: string,\n readonly sessions: string[] = [],\n ) {\n super(message);\n }\n}\n\n/** The folders to scan: config `scanRoots`, else the one the worktrees root sits in. */\nexport function scanRootsOf(config: Pick<WorkConfig, 'scanRoots' | 'worktreesRoot'>): string[] {\n if (config.scanRoots?.length) return config.scanRoots;\n return config.worktreesRoot ? [path.dirname(config.worktreesRoot)] : [];\n}\n\nconst live = (history: WorktreeSession[], target: string) => history.filter((s) => !s.archivedAt && s.target === target);\n/** Live sessions on a repo: its own (target), and any that records it among its repos (a group's, say). */\nconst liveOnRepo = (history: WorktreeSession[], alias: string) =>\n history.filter((s) => !s.archivedAt && (s.target === alias || (recordedRepos(s)?.some((r) => r.alias === alias) ?? false)));\nconst label = (s: WorktreeSession) => `${s.target} · ${s.branch}`;\n\n/**\n * Everything the Repos page shows. `found` defaults to scanning the roots\n * (two levels down, never into the worktrees root). Pure apart from that\n * scan and the existence check of enrolled folders.\n */\nexport function repoInventory(\n config: WorkConfig,\n history: WorktreeSession[],\n found: FoundRepo[] = scanRootsOf(config).flatMap((r) => scanForRepos(r, { skip: [config.worktreesRoot] })),\n exists: (p: string) => boolean = (p) => fs.existsSync(p),\n): ReposWire {\n const byKey = new Map(found.map((f) => [samePathKey(f.path), f]));\n const ignored = new Set((config.ignoredRepos ?? []).map((p) => samePathKey(p)));\n const groupsOf = (alias: string) => Object.entries(config.groups).flatMap(([g, members]) => (members.includes(alias) ? [g] : []));\n const aliasesAt = new Map<string, string[]>();\n for (const [alias, p] of Object.entries(config.repos)) aliasesAt.set(samePathKey(p), [...(aliasesAt.get(samePathKey(p)) ?? []), alias]);\n\n const repos: RepoRow[] = Object.entries(config.repos).map(([alias, p]) => {\n const f = byKey.get(samePathKey(p));\n const others = (aliasesAt.get(samePathKey(p)) ?? []).filter((a) => a !== alias);\n return {\n path: p,\n folder: path.basename(p),\n origin: f?.origin ?? null,\n status: exists(p) ? 'enrolled' : 'missing',\n alias,\n ...(others.length ? { sharedWith: others } : {}),\n groups: groupsOf(alias),\n sessions: liveOnRepo(history, alias).length,\n };\n });\n const taken = (a: string) => a in config.repos || a in config.groups;\n for (const f of found) {\n const key = samePathKey(f.path);\n if (aliasesAt.has(key)) continue;\n if (ignored.has(key)) {\n repos.push({ path: f.path, folder: f.folder, origin: f.origin, status: 'ignored', alias: null, groups: [], sessions: 0 });\n continue;\n }\n const suggested = suggestAlias(f.path, taken);\n repos.push({\n path: f.path,\n folder: f.folder,\n origin: f.origin,\n status: 'new',\n alias: null,\n suggestedAlias: suggested,\n problem: enrollProblem(suggested, f.path, config),\n groups: [],\n sessions: 0,\n });\n }\n repos.sort((a, b) => a.folder.localeCompare(b.folder) || (a.alias ?? '').localeCompare(b.alias ?? ''));\n\n const groups: GroupRow[] = Object.entries(config.groups).map(([name, members]) => {\n const missing = members.filter((m) => !(m in config.repos));\n return {\n name,\n members,\n missing,\n sessions: live(history, name).length,\n problem: missing.length\n ? `not enrolled any more: ${missing.join(', ')}`\n : new Set(members).size < 2\n ? 'a group needs at least two repos'\n : null,\n };\n });\n groups.sort((a, b) => a.name.localeCompare(b.name));\n return { roots: scanRootsOf(config), repos, groups };\n}\n\n/** config.json as JSON, edited under its lock and written atomically; unknown keys kept. */\nexport type RawConfig = Record<string, unknown> & { repos?: Record<string, string>; groups?: Record<string, string[]> };\n\n/** Exported for the settings (core/settings/settings-admin.ts): the same lock and write, one writer of config.json. */\nexport async function editConfig<T>(fn: (raw: RawConfig) => T): Promise<T> {\n const file = getConfigPath();\n if (!fs.existsSync(file)) throw new RepoAdminError('No configuration yet: run `work init` first.');\n return withFileLock(file, () => {\n const raw = JSON.parse(fs.readFileSync(file, 'utf-8')) as RawConfig;\n raw.repos ??= {};\n raw.groups ??= {};\n const out = fn(raw);\n atomicWriteFile(file, JSON.stringify(raw, null, 2));\n return out;\n });\n}\n\nconst view = (raw: RawConfig) => ({ repos: raw.repos ?? {}, groups: raw.groups ?? {} });\n\n/** Enrol a repo under an alias: a git repo's own folder, the alias free, its folder name unshared. */\nexport async function enrollRepo(alias: string, repoPath: string): Promise<void> {\n const p = path.resolve(repoPath);\n if (!fs.existsSync(path.join(p, '.git'))) throw new RepoAdminError(`${p} is not the top folder of a git repository`);\n await editConfig((raw) => {\n const problem = enrollProblem(alias, p, view(raw));\n if (problem) throw new RepoAdminError(problem);\n raw.repos![alias] = p;\n const ignored = Array.isArray(raw.ignoredRepos) ? (raw.ignoredRepos as string[]) : [];\n raw.ignoredRepos = ignored.filter((x) => samePathKey(x) !== samePathKey(p));\n });\n}\n\n/**\n * Stop knowing a repo by this alias (the folder stays). Live sessions on\n * it would lose their project: refused unless `force`, naming them. It\n * also leaves every group it was in.\n */\nexport async function removeRepo(alias: string, history: WorktreeSession[], opts: { force?: boolean } = {}): Promise<void> {\n const sessions = liveOnRepo(history, alias);\n if (sessions.length && !opts.force)\n throw new RepoAdminError(`${sessions.length} live session${sessions.length === 1 ? '' : 's'} on ${alias}`, sessions.map(label));\n await editConfig((raw) => {\n if (!(alias in raw.repos!)) throw new RepoAdminError(`no repo “${alias}”`);\n delete raw.repos![alias];\n for (const [g, members] of Object.entries(raw.groups!)) raw.groups![g] = members.filter((m) => m !== alias);\n });\n}\n\n/** Ignore a found repo (the page stops offering it), or take that back. */\nexport async function setRepoIgnored(repoPath: string, ignored: boolean): Promise<void> {\n await editConfig((raw) => {\n const list = (Array.isArray(raw.ignoredRepos) ? (raw.ignoredRepos as string[]) : []).filter(\n (x) => samePathKey(x) !== samePathKey(repoPath),\n );\n raw.ignoredRepos = ignored ? [...list, path.resolve(repoPath)] : list;\n });\n}\n\n/** Add a folder to scan, or drop one. The first one added replaces the default. */\nexport async function setScanRoot(folder: string, on: boolean, config: Pick<WorkConfig, 'scanRoots' | 'worktreesRoot'>): Promise<void> {\n const p = path.resolve(folder);\n if (on && !fs.statSync(p, { throwIfNoEntry: false })?.isDirectory()) throw new RepoAdminError(`${p} is not a folder`);\n await editConfig((raw) => {\n const current = scanRootsOf({ ...config, scanRoots: Array.isArray(raw.scanRoots) ? (raw.scanRoots as string[]) : config.scanRoots });\n const rest = current.filter((x) => samePathKey(x) !== samePathKey(p));\n raw.scanRoots = on ? [...rest, p] : rest;\n });\n}\n\n/**\n * Make a group, or change an existing one's repos. Its name is final\n * (sessions and worktree folders are named after it). A group's combined\n * instructions are written afterwards, by the caller (`regenerate`).\n */\nexport async function saveGroup(name: string, members: string[], opts: { creating: boolean }): Promise<void> {\n await editConfig((raw) => {\n const problem = groupProblem(name, members, view(raw), opts);\n if (problem) throw new RepoAdminError(problem);\n raw.groups![name] = [...new Set(members)];\n });\n}\n\n/** Delete a group (its repos stay). Live sessions on it are refused unless `force`; its combined instructions file goes. */\nexport async function deleteGroup(name: string, history: WorktreeSession[], opts: { force?: boolean } = {}): Promise<void> {\n const sessions = live(history, name);\n if (sessions.length && !opts.force)\n throw new RepoAdminError(`${sessions.length} live session${sessions.length === 1 ? '' : 's'} on ${name}`, sessions.map(label));\n await editConfig((raw) => {\n if (!(name in raw.groups!)) throw new RepoAdminError(`no group “${name}”`);\n delete raw.groups![name];\n });\n fs.rmSync(path.join(getConfigDir(), `${name}.claude.md`), { force: true });\n}\n\n/** A project's automatic reviews (#64): `all`, `asked` or `off`, for a repo alias or a group name in config. */\nexport async function setReviewMode(project: string, mode: 'all' | 'asked' | 'off'): Promise<void> {\n await editConfig((raw) => {\n if (!raw.repos?.[project] && !raw.groups?.[project]) throw new RepoAdminError(`${project} isn't one of your repos or groups`);\n const reviews = (raw.reviews && typeof raw.reviews === 'object' && !Array.isArray(raw.reviews) ? raw.reviews : {}) as {\n projects?: Record<string, string>;\n };\n reviews.projects = { ...(reviews.projects ?? {}), [project]: mode };\n raw.reviews = reviews;\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ;AACf,OAAO,UAAU;AAkBV,IAAM,iBAAN,cAA6B,MAAM;AAAA,EACxC,YACE,SACS,WAAqB,CAAC,GAC/B;AACA,UAAM,OAAO;AAFJ;AAAA,EAGX;AACF;AAGO,SAAS,YAAY,QAAmE;AAC7F,MAAI,OAAO,WAAW,OAAQ,QAAO,OAAO;AAC5C,SAAO,OAAO,gBAAgB,CAAC,KAAK,QAAQ,OAAO,aAAa,CAAC,IAAI,CAAC;AACxE;AAEA,IAAM,OAAO,CAAC,SAA4B,WAAmB,QAAQ,OAAO,CAAC,MAAM,CAAC,EAAE,cAAc,EAAE,WAAW,MAAM;AAEvH,IAAM,aAAa,CAAC,SAA4B,UAC9C,QAAQ,OAAO,CAAC,MAAM,CAAC,EAAE,eAAe,EAAE,WAAW,UAAU,cAAc,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,UAAU,KAAK,KAAK,OAAO;AAC5H,IAAM,QAAQ,CAAC,MAAuB,GAAG,EAAE,MAAM,SAAM,EAAE,MAAM;AAOxD,SAAS,cACd,QACA,SACA,QAAqB,YAAY,MAAM,EAAE,QAAQ,CAAC,MAAM,aAAa,GAAG,EAAE,MAAM,CAAC,OAAO,aAAa,EAAE,CAAC,CAAC,GACzG,SAAiC,CAAC,MAAM,GAAG,WAAW,CAAC,GAC5C;AACX,QAAM,QAAQ,IAAI,IAAI,MAAM,IAAI,CAAC,MAA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C;AAAA,EAC1C,CAAC;AACH;AAGA,eAAsB,YAAY,MAAc,SAA4B,OAA4B,CAAC,GAAkB;AACzH,QAAM,WAAW,KAAK,SAAS,IAAI;AACnC,MAAI,SAAS,UAAU,CAAC,KAAK;AAC3B,UAAM,IAAI,eAAe,GAAG,SAAS,MAAM,gBAAgB,SAAS,WAAW,IAAI,KAAK,GAAG,OAAO,IAAI,IAAI,SAAS,IAAI,KAAK,CAAC;AAC/H,QAAM,WAAW,CAAC,QAAQ;AACxB,QAAI,EAAE,QAAQ,IAAI,QAAU,OAAM,IAAI,eAAe,kBAAa,IAAI,QAAG;AACzE,WAAO,IAAI,OAAQ,IAAI;AAAA,EACzB,CAAC;AACD,KAAG,OAAO,KAAK,KAAK,aAAa,GAAG,GAAG,IAAI,YAAY,GAAG,EAAE,OAAO,KAAK,CAAC;AAC3E;AAGA,eAAsB,cAAc,SAAiB,MAA8C;AACjG,QAAM,WAAW,CAAC,QAAQ;AACxB,QAAI,CAAC,IAAI,QAAQ,OAAO,KAAK,CAAC,IAAI,SAAS,OAAO,EAAG,OAAM,IAAI,eAAe,GAAG,OAAO,oCAAoC;AAC5H,UAAM,UAAW,IAAI,WAAW,OAAO,IAAI,YAAY,YAAY,CAAC,MAAM,QAAQ,IAAI,OAAO,IAAI,IAAI,UAAU,CAAC;AAGhH,YAAQ,WAAW,EAAE,GAAI,QAAQ,YAAY,CAAC,GAAI,CAAC,OAAO,GAAG,KAAK;AAClE,QAAI,UAAU;AAAA,EAChB,CAAC;AACH;","names":[]}
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
} from "./chunk-6AQRYLOB.js";
|
|
5
5
|
import {
|
|
6
6
|
findSessionForCwd
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-63FTAMDO.js";
|
|
8
8
|
import {
|
|
9
9
|
findSession,
|
|
10
10
|
loadHistory
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-3SBQIJQS.js";
|
|
12
12
|
import {
|
|
13
13
|
loadConfig
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-O5ZJY5BT.js";
|
|
15
15
|
|
|
16
16
|
// src/commands/shared/session-arg.ts
|
|
17
17
|
import chalk from "chalk";
|
|
@@ -38,4 +38,4 @@ export {
|
|
|
38
38
|
sessionPositionals,
|
|
39
39
|
sessionFromArgs
|
|
40
40
|
};
|
|
41
|
-
//# sourceMappingURL=chunk-
|
|
41
|
+
//# sourceMappingURL=chunk-5FBRQW2F.js.map
|
|
@@ -1,28 +1,26 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
makeFolder
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-LM2T5OR3.js";
|
|
5
5
|
import {
|
|
6
6
|
hostForRepo,
|
|
7
7
|
knownHosts
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import {
|
|
10
|
-
DEFAULT_HOST
|
|
11
|
-
} from "./chunk-AQP6SCCJ.js";
|
|
8
|
+
} from "./chunk-PJGAPVK4.js";
|
|
12
9
|
import {
|
|
13
10
|
defaultRunner
|
|
14
11
|
} from "./chunk-KSVYR4G2.js";
|
|
15
12
|
import {
|
|
13
|
+
DEFAULT_HOST,
|
|
16
14
|
loadHistory
|
|
17
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-3SBQIJQS.js";
|
|
18
16
|
import {
|
|
19
17
|
getConfigPath,
|
|
20
18
|
loadConfig
|
|
21
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-O5ZJY5BT.js";
|
|
22
20
|
import {
|
|
23
21
|
atomicWriteFile,
|
|
24
22
|
withFileLock
|
|
25
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-D2J3AD6L.js";
|
|
26
24
|
import {
|
|
27
25
|
getConfigDir
|
|
28
26
|
} from "./chunk-6THUVP6T.js";
|
|
@@ -140,4 +138,4 @@ export {
|
|
|
140
138
|
checkTools,
|
|
141
139
|
setupState
|
|
142
140
|
};
|
|
143
|
-
//# sourceMappingURL=chunk-
|
|
141
|
+
//# sourceMappingURL=chunk-5LW5OJHH.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/core/setup/first-run.ts"],"sourcesContent":["import fs from 'node:fs';\nimport { DEFAULT_HOST, hostForRepo, knownHosts } from '../hosts/index.js';\nimport os from 'node:os';\nimport path from 'node:path';\nimport { getConfigDir, getConfigPath, loadConfig } from '../platform/config.js';\nimport { atomicWriteFile, withFileLock } from '../platform/fs-safe.js';\nimport { loadHistory } from '../sessions/history.js';\nimport { defaultRunner, type CommandRunner } from '../pr/ship.js';\nimport type { SetupWire, ToolCheck } from '../api-types.js';\nimport { makeFolder } from '../worktree/worktrees-root.js';\n\n/**\n * First run (the dashboard's Welcome page, `work init`): where your repos\n * are, where worktrees go, and whether the tools work leans on are there.\n * Nothing here is needed again once the folders are set and a repo is in.\n */\n\n/** Files new worktrees get copied from the repo (local settings git ignores): `work init`'s defaults. */\nexport const DEFAULT_COPY_FILES = ['*.Development.json', '*.Local.json', '.claude/settings.local.json'];\n\n/** Where repos usually live, most likely first. */\nconst REPO_FOLDERS = [['source', 'repos'], ['repos'], ['src'], ['code'], ['projects'], ['dev'], ['git'], ['work']];\n\n/**\n * The folders to suggest: the first usual repos folder that exists under\n * home, and worktrees beside it (`…/source/repos` → `…/source/worktrees`).\n * With none, worktrees go under home and the repos folder is yours to name.\n */\nexport function suggestFolders(\n home: string,\n exists: (p: string) => boolean = fs.existsSync,\n): { reposFolder: string | null; worktreesRoot: string } {\n for (const parts of REPO_FOLDERS) {\n const p = path.join(home, ...parts);\n if (exists(p)) return { reposFolder: p, worktreesRoot: path.join(path.dirname(p), 'worktrees') };\n }\n return { reposFolder: null, worktreesRoot: path.join(home, 'worktrees') };\n}\n\n/** What a folder entered for setup is wrong with, or null. */\nexport function folderProblem(p: unknown, mustExist: boolean): string | null {\n if (typeof p !== 'string' || !p.trim()) return 'give a folder';\n if (!path.isAbsolute(p.trim())) return `${p} isn't a full path (start it from the drive or /)`;\n if (mustExist && !fs.existsSync(p.trim())) return `${p} doesn't exist`;\n return null;\n}\n\n/**\n * Set the folders: config.json made when there is none (with `work init`'s\n * defaults), else its worktrees root and scanned folder changed in place,\n * every other key as it was.\n */\nexport async function saveFolders(req: { worktreesRoot: string; reposFolder: string }): Promise<void> {\n const wt = folderProblem(req.worktreesRoot, false);\n if (wt) throw new Error(`Worktrees folder: ${wt}`);\n const rf = folderProblem(req.reposFolder, true);\n if (rf) throw new Error(`Repos folder: ${rf}`);\n const worktreesRoot = path.resolve(req.worktreesRoot.trim());\n const reposFolder = path.resolve(req.reposFolder.trim());\n const cantMake = makeFolder(worktreesRoot);\n if (cantMake) throw new Error(`Worktrees folder: ${cantMake} — pick a folder you own, e.g. under ${os.homedir()}`);\n getConfigDir();\n const file = getConfigPath();\n if (!fs.existsSync(file)) fs.writeFileSync(file, '{}', { flag: 'wx' });\n await withFileLock(file, () => {\n const raw = JSON.parse(fs.readFileSync(file, 'utf-8') || '{}') as Record<string, unknown>;\n raw.worktreesRoot = worktreesRoot;\n raw.scanRoots = [reposFolder];\n raw.repos ??= {};\n raw.groups ??= {};\n raw.copyFiles ??= DEFAULT_COPY_FILES;\n atomicWriteFile(file, JSON.stringify(raw, null, 2));\n });\n}\n\n/** One tool's check: its command, and what it means when it's missing. */\ninterface ToolSpec {\n id: ToolCheck['id'];\n label: string;\n needed: boolean;\n args: string[];\n cmd: string;\n missing: string;\n /** A failure that isn't \"not installed\" (gh logged out). */\n failing?: string;\n /** Checked first, each with its own line when it fails (az's azure-devops extension). */\n requires?: Array<{ args: string[]; failing: string }>;\n}\n\nconst TOOLS: ToolSpec[] = [\n { id: 'git', label: 'git', needed: true, cmd: 'git', args: ['--version'], missing: 'Install git: worktrees are git’s.' },\n {\n id: 'claude',\n label: 'Claude Code',\n needed: true,\n cmd: 'claude',\n args: ['--version'],\n missing: 'Install Claude Code (npm install -g @anthropic-ai/claude-code) and sign in once in a terminal.',\n },\n {\n id: 'acli',\n label: 'Atlassian CLI',\n needed: false,\n cmd: 'acli',\n args: ['--version'],\n missing: 'Optional: install acli to start sessions from your Jira issues.',\n },\n];\n\n/** Each git host's CLI, after git and Claude Code: optional, it adds that host's pull requests. */\nfunction toolsNow(): ToolSpec[] {\n const repos = Object.values(loadConfig()?.repos ?? {});\n const used = new Set(repos.map((p) => hostForRepo(p).host.id));\n const hosts = knownHosts()\n .filter((h) => h.id === DEFAULT_HOST || used.has(h.id))\n .map((h): ToolSpec => ({\n id: h.cli.cmd,\n label: h.cli.label,\n needed: false,\n cmd: h.cli.cmd,\n args: h.cli.checkArgs,\n missing: h.cli.missing,\n failing: h.cli.failing,\n ...(h.cli.requires ? { requires: h.cli.requires } : {}),\n }));\n return [TOOLS[0], TOOLS[1], ...hosts, ...TOOLS.slice(2)];\n}\n\n/** Whether each tool answers. A command not found is \"missing\"; one that runs and fails says why. */\nexport async function checkTools(run: CommandRunner = defaultRunner): Promise<ToolCheck[]> {\n return Promise.all(\n toolsNow().map(async (t): Promise<ToolCheck> => {\n const ask = (args: string[]) => run(t.cmd, args, os.tmpdir()).catch(() => ({ code: 127, stdout: '', stderr: '' }));\n const notFound = (r: { code: number; stderr: string }) => r.code === 127 || /not (found|recognized)|ENOENT/i.test(r.stderr);\n const result = (ok: boolean, detail: string): ToolCheck => ({ id: t.id, label: t.label, needed: t.needed, ok, detail });\n // What it needs beyond itself first (az's azure-devops extension): `az account show` passes without it.\n for (const pre of t.requires ?? []) {\n const r = await ask(pre.args);\n if (r.code !== 0) return result(false, notFound(r) ? t.missing : pre.failing);\n }\n const r = await ask(t.args);\n const ok = r.code === 0;\n return result(ok, ok ? (r.stdout || r.stderr).split('\\n')[0].trim() : notFound(r) ? t.missing : (t.failing ?? t.missing));\n }),\n );\n}\n\n/** Where setup stands: the folders, how many repos and sessions, the tools. */\nexport async function setupState(tools: () => Promise<ToolCheck[]> = () => checkTools()): Promise<SetupWire> {\n const config = loadConfig();\n const suggested = suggestFolders(os.homedir());\n const sessions = config ? loadHistory().filter((s) => !s.archivedAt).length : 0;\n return {\n configured: !!config && !!config.worktreesRoot,\n worktreesRoot: config?.worktreesRoot || null,\n reposFolder: config?.scanRoots?.[0] ?? (config?.worktreesRoot ? path.dirname(config.worktreesRoot) : null),\n repos: config ? Object.keys(config.repos).length : 0,\n sessions,\n suggested,\n tools: await tools(),\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ;AAEf,OAAO,QAAQ;AACf,OAAO,UAAU;AAeV,IAAM,qBAAqB,CAAC,sBAAsB,gBAAgB,6BAA6B;AAGtG,IAAM,eAAe,CAAC,CAAC,UAAU,OAAO,GAAG,CAAC,OAAO,GAAG,CAAC,KAAK,GAAG,CAAC,MAAM,GAAG,CAAC,UAAU,GAAG,CAAC,KAAK,GAAG,CAAC,KAAK,GAAG,CAAC,MAAM,CAAC;AAO1G,SAAS,eACd,MACA,SAAiC,GAAG,YACmB;AACvD,aAAW,SAAS,cAAc;AAChC,UAAM,IAAI,KAAK,KAAK,MAAM,GAAG,KAAK;AAClC,QAAI,OAAO,CAAC,EAAG,QAAO,EAAE,aAAa,GAAG,eAAe,KAAK,KAAK,KAAK,QAAQ,CAAC,GAAG,WAAW,EAAE;AAAA,EACjG;AACA,SAAO,EAAE,aAAa,MAAM,eAAe,KAAK,KAAK,MAAM,WAAW,EAAE;AAC1E;AAGO,SAAS,cAAc,GAAY,WAAmC;AAC3E,MAAI,OAAO,MAAM,YAAY,CAAC,EAAE,KAAK,EAAG,QAAO;AAC/C,MAAI,CAAC,KAAK,WAAW,EAAE,KAAK,CAAC,EAAG,QAAO,GAAG,CAAC;AAC3C,MAAI,aAAa,CAAC,GAAG,WAAW,EAAE,KAAK,CAAC,EAAG,QAAO,GAAG,CAAC;AACtD,SAAO;AACT;AAOA,eAAsB,YAAY,KAAoE;AACpG,QAAM,KAAK,cAAc,IAAI,eAAe,KAAK;AACjD,MAAI,GAA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,SAASA,EAAC,IAAI,EAAE,UAAU,IAAI,OAAO;AAAA,MAC9E;AACA,YAAM,IAAI,MAAM,IAAI,EAAE,IAAI;AAC1B,YAAM,KAAK,EAAE,SAAS;AACtB,aAAO,OAAO,IAAI,MAAM,EAAE,UAAU,EAAE,QAAQ,MAAM,IAAI,EAAE,CAAC,EAAE,KAAK,IAAI,SAAS,CAAC,IAAI,EAAE,UAAW,EAAE,WAAW,EAAE,OAAQ;AAAA,IAC1H,CAAC;AAAA,EACH;AACF;AAGA,eAAsB,WAAW,QAAoC,MAAM,WAAW,GAAuB;AAC3G,QAAM,SAAS,WAAW;AAC1B,QAAM,YAAY,eAAe,GAAG,QAAQ,CAAC;AAC7C,QAAM,WAAW,SAAS,YAAY,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,SAAS;AAC9E,SAAO;AAAA,IACL,YAAY,CAAC,CAAC,UAAU,CAAC,CAAC,OAAO;AAAA,IACjC,eAAe,QAAQ,iBAAiB;AAAA,IACxC,aAAa,QAAQ,YAAY,CAAC,MAAM,QAAQ,gBAAgB,KAAK,QAAQ,OAAO,aAAa,IAAI;AAAA,IACrG,OAAO,SAAS,OAAO,KAAK,OAAO,KAAK,EAAE,SAAS;AAAA,IACnD;AAAA,IACA;AAAA,IACA,OAAO,MAAM,MAAM;AAAA,EACrB;AACF;","names":["r","ok"]}
|
|
1
|
+
{"version":3,"sources":["../src/core/setup/first-run.ts"],"sourcesContent":["import fs from 'node:fs';\nimport { DEFAULT_HOST, hostForRepo, knownHosts } from '../hosts/index.js';\nimport os from 'node:os';\nimport path from 'node:path';\nimport { getConfigDir, getConfigPath, loadConfig } from '../platform/config.js';\nimport { atomicWriteFile, withFileLock } from '../platform/fs-safe.js';\nimport { loadHistory } from '../sessions/history.js';\nimport { defaultRunner, type CommandRunner } from '../pr/ship.js';\nimport type { SetupWire, ToolCheck } from '../api-types.js';\nimport { makeFolder } from '../worktree/worktrees-root.js';\n\n/**\n * First run (the dashboard's Welcome page, `work init`): where your repos\n * are, where worktrees go, and whether the tools work leans on are there.\n * Nothing here is needed again once the folders are set and a repo is in.\n */\n\n/** Files new worktrees get copied from the repo (local settings git ignores): `work init`'s defaults. */\nexport const DEFAULT_COPY_FILES = ['*.Development.json', '*.Local.json', '.claude/settings.local.json'];\n\n/** Where repos usually live, most likely first. */\nconst REPO_FOLDERS = [['source', 'repos'], ['repos'], ['src'], ['code'], ['projects'], ['dev'], ['git'], ['work']];\n\n/**\n * The folders to suggest: the first usual repos folder that exists under\n * home, and worktrees beside it (`…/source/repos` → `…/source/worktrees`).\n * With none, worktrees go under home and the repos folder is yours to name.\n */\nexport function suggestFolders(\n home: string,\n exists: (p: string) => boolean = fs.existsSync,\n): { reposFolder: string | null; worktreesRoot: string } {\n for (const parts of REPO_FOLDERS) {\n const p = path.join(home, ...parts);\n if (exists(p)) return { reposFolder: p, worktreesRoot: path.join(path.dirname(p), 'worktrees') };\n }\n return { reposFolder: null, worktreesRoot: path.join(home, 'worktrees') };\n}\n\n/** What a folder entered for setup is wrong with, or null. */\nexport function folderProblem(p: unknown, mustExist: boolean): string | null {\n if (typeof p !== 'string' || !p.trim()) return 'give a folder';\n if (!path.isAbsolute(p.trim())) return `${p} isn't a full path (start it from the drive or /)`;\n if (mustExist && !fs.existsSync(p.trim())) return `${p} doesn't exist`;\n return null;\n}\n\n/**\n * Set the folders: config.json made when there is none (with `work init`'s\n * defaults), else its worktrees root and scanned folder changed in place,\n * every other key as it was.\n */\nexport async function saveFolders(req: { worktreesRoot: string; reposFolder: string }): Promise<void> {\n const wt = folderProblem(req.worktreesRoot, false);\n if (wt) throw new Error(`Worktrees folder: ${wt}`);\n const rf = folderProblem(req.reposFolder, true);\n if (rf) throw new Error(`Repos folder: ${rf}`);\n const worktreesRoot = path.resolve(req.worktreesRoot.trim());\n const reposFolder = path.resolve(req.reposFolder.trim());\n const cantMake = makeFolder(worktreesRoot);\n if (cantMake) throw new Error(`Worktrees folder: ${cantMake} — pick a folder you own, e.g. under ${os.homedir()}`);\n getConfigDir();\n const file = getConfigPath();\n if (!fs.existsSync(file)) fs.writeFileSync(file, '{}', { flag: 'wx' });\n await withFileLock(file, () => {\n const raw = JSON.parse(fs.readFileSync(file, 'utf-8') || '{}') as Record<string, unknown>;\n raw.worktreesRoot = worktreesRoot;\n raw.scanRoots = [reposFolder];\n raw.repos ??= {};\n raw.groups ??= {};\n raw.copyFiles ??= DEFAULT_COPY_FILES;\n atomicWriteFile(file, JSON.stringify(raw, null, 2));\n });\n}\n\n/** One tool's check: its command, and what it means when it's missing. */\ninterface ToolSpec {\n id: ToolCheck['id'];\n label: string;\n needed: boolean;\n args: string[];\n cmd: string;\n missing: string;\n /** A failure that isn't \"not installed\" (gh logged out). */\n failing?: string;\n /** Checked first, each with its own line when it fails (az's azure-devops extension). */\n requires?: Array<{ args: string[]; failing: string }>;\n}\n\nconst TOOLS: ToolSpec[] = [\n { id: 'git', label: 'git', needed: true, cmd: 'git', args: ['--version'], missing: 'Install git: worktrees are git’s.' },\n {\n id: 'claude',\n label: 'Claude Code',\n needed: true,\n cmd: 'claude',\n args: ['--version'],\n missing: 'Install Claude Code (npm install -g @anthropic-ai/claude-code) and sign in once in a terminal.',\n },\n {\n id: 'acli',\n label: 'Atlassian CLI',\n needed: false,\n cmd: 'acli',\n args: ['--version'],\n missing: 'Optional: install acli to start sessions from your Jira issues.',\n },\n];\n\n/** Each git host's CLI, after git and Claude Code: optional, it adds that host's pull requests. */\nfunction toolsNow(): ToolSpec[] {\n const repos = Object.values(loadConfig()?.repos ?? {});\n const used = new Set(repos.map((p) => hostForRepo(p).host.id));\n const hosts = knownHosts()\n .filter((h) => h.id === DEFAULT_HOST || used.has(h.id))\n .map((h): ToolSpec => ({\n id: h.cli.cmd,\n label: h.cli.label,\n needed: false,\n cmd: h.cli.cmd,\n args: h.cli.checkArgs,\n missing: h.cli.missing,\n failing: h.cli.failing,\n ...(h.cli.requires ? { requires: h.cli.requires } : {}),\n }));\n return [TOOLS[0], TOOLS[1], ...hosts, ...TOOLS.slice(2)];\n}\n\n/** Whether each tool answers. A command not found is \"missing\"; one that runs and fails says why. */\nexport async function checkTools(run: CommandRunner = defaultRunner): Promise<ToolCheck[]> {\n return Promise.all(\n toolsNow().map(async (t): Promise<ToolCheck> => {\n const ask = (args: string[]) => run(t.cmd, args, os.tmpdir()).catch(() => ({ code: 127, stdout: '', stderr: '' }));\n const notFound = (r: { code: number; stderr: string }) => r.code === 127 || /not (found|recognized)|ENOENT/i.test(r.stderr);\n const result = (ok: boolean, detail: string): ToolCheck => ({ id: t.id, label: t.label, needed: t.needed, ok, detail });\n // What it needs beyond itself first (az's azure-devops extension): `az account show` passes without it.\n for (const pre of t.requires ?? []) {\n const r = await ask(pre.args);\n if (r.code !== 0) return result(false, notFound(r) ? t.missing : pre.failing);\n }\n const r = await ask(t.args);\n const ok = r.code === 0;\n return result(ok, ok ? (r.stdout || r.stderr).split('\\n')[0].trim() : notFound(r) ? t.missing : (t.failing ?? t.missing));\n }),\n );\n}\n\n/** Where setup stands: the folders, how many repos and sessions, the tools. */\nexport async function setupState(tools: () => Promise<ToolCheck[]> = () => checkTools()): Promise<SetupWire> {\n const config = loadConfig();\n const suggested = suggestFolders(os.homedir());\n const sessions = config ? loadHistory().filter((s) => !s.archivedAt).length : 0;\n return {\n configured: !!config && !!config.worktreesRoot,\n worktreesRoot: config?.worktreesRoot || null,\n reposFolder: config?.scanRoots?.[0] ?? (config?.worktreesRoot ? path.dirname(config.worktreesRoot) : null),\n repos: config ? Object.keys(config.repos).length : 0,\n sessions,\n suggested,\n tools: await tools(),\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ;AAEf,OAAO,QAAQ;AACf,OAAO,UAAU;AAeV,IAAM,qBAAqB,CAAC,sBAAsB,gBAAgB,6BAA6B;AAGtG,IAAM,eAAe,CAAC,CAAC,UAAU,OAAO,GAAG,CAAC,OAAO,GAAG,CAAC,KAAK,GAAG,CAA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C,EAAE,UAAU,EAAE,SAAS;AAC9E,SAAO;AAAA,IACL,YAAY,CAAC,CAAC,UAAU,CAAC,CAAC,OAAO;AAAA,IACjC,eAAe,QAAQ,iBAAiB;AAAA,IACxC,aAAa,QAAQ,YAAY,CAAC,MAAM,QAAQ,gBAAgB,KAAK,QAAQ,OAAO,aAAa,IAAI;AAAA,IACrG,OAAO,SAAS,OAAO,KAAK,OAAO,KAAK,EAAE,SAAS;AAAA,IACnD;AAAA,IACA;AAAA,IACA,OAAO,MAAM,MAAM;AAAA,EACrB;AACF;","names":["r","ok"]}
|
|
@@ -6,16 +6,16 @@ import {
|
|
|
6
6
|
getCommentFileStore,
|
|
7
7
|
readStoreComments,
|
|
8
8
|
readStoresComments
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-7DUGVGUZ.js";
|
|
10
10
|
import {
|
|
11
11
|
checkedOutBranch,
|
|
12
12
|
loadHistory
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-3SBQIJQS.js";
|
|
14
14
|
import {
|
|
15
15
|
sessionIdFor,
|
|
16
16
|
tx,
|
|
17
17
|
withDb
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-RUYTU2WJ.js";
|
|
19
19
|
|
|
20
20
|
// src/core/comments/pending-delivery.ts
|
|
21
21
|
import fs from "fs";
|
|
@@ -184,4 +184,4 @@ export {
|
|
|
184
184
|
claimForDelivery,
|
|
185
185
|
formatPendingForPrompt
|
|
186
186
|
};
|
|
187
|
-
//# sourceMappingURL=chunk-
|
|
187
|
+
//# sourceMappingURL=chunk-63FTAMDO.js.map
|
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
lastTurnEntryMs,
|
|
7
7
|
readSessionActivity,
|
|
8
8
|
readStatus
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-3SBQIJQS.js";
|
|
10
10
|
import {
|
|
11
11
|
sessionIdFor
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-RUYTU2WJ.js";
|
|
13
13
|
import {
|
|
14
14
|
agentOf,
|
|
15
15
|
readJsonlTail
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-N4W34U3I.js";
|
|
17
17
|
|
|
18
18
|
// src/core/status/turn-activity.ts
|
|
19
19
|
var cache = /* @__PURE__ */ new Map();
|
|
@@ -45,4 +45,4 @@ export {
|
|
|
45
45
|
sessionStatusView,
|
|
46
46
|
shownState
|
|
47
47
|
};
|
|
48
|
-
//# sourceMappingURL=chunk-
|
|
48
|
+
//# sourceMappingURL=chunk-6RMB3I3V.js.map
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
DISPLAY_LABEL,
|
|
7
7
|
displayStatus
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-SKRVI3Z4.js";
|
|
9
9
|
import {
|
|
10
10
|
atomicWriteFile
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-D2J3AD6L.js";
|
|
12
12
|
import {
|
|
13
13
|
getConfigDir
|
|
14
14
|
} from "./chunk-6THUVP6T.js";
|
|
@@ -161,4 +161,4 @@ export {
|
|
|
161
161
|
assistantContextReview,
|
|
162
162
|
readAssistantContext
|
|
163
163
|
};
|
|
164
|
-
//# sourceMappingURL=chunk-
|
|
164
|
+
//# sourceMappingURL=chunk-6YZBMC35.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
json,
|
|
7
7
|
tx,
|
|
8
8
|
withDb
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-RUYTU2WJ.js";
|
|
10
10
|
|
|
11
11
|
// src/core/comments/comment-file-store.ts
|
|
12
12
|
function isComment(x) {
|
|
@@ -137,4 +137,4 @@ export {
|
|
|
137
137
|
getCommentFileStore,
|
|
138
138
|
moveStoreComments
|
|
139
139
|
};
|
|
140
|
-
//# sourceMappingURL=chunk-
|
|
140
|
+
//# sourceMappingURL=chunk-7DUGVGUZ.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
json,
|
|
4
4
|
tx,
|
|
5
5
|
withDb
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RUYTU2WJ.js";
|
|
7
7
|
|
|
8
8
|
// src/core/tasks.ts
|
|
9
9
|
function isTask(x) {
|
|
@@ -87,4 +87,4 @@ export {
|
|
|
87
87
|
removeTask,
|
|
88
88
|
editTask
|
|
89
89
|
};
|
|
90
|
-
//# sourceMappingURL=chunk-
|
|
90
|
+
//# sourceMappingURL=chunk-7OFVXQSM.js.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
computeRangeDiff
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FNA27U2B.js";
|
|
5
5
|
import {
|
|
6
6
|
loadManifest
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-3SBQIJQS.js";
|
|
8
8
|
import {
|
|
9
9
|
agentSettings,
|
|
10
10
|
internalAgent
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-N4W34U3I.js";
|
|
12
12
|
import {
|
|
13
13
|
internalRunEnv
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-DMGNJ73M.js";
|
|
15
15
|
import {
|
|
16
16
|
killTree
|
|
17
17
|
} from "./chunk-63ZLPXRL.js";
|
|
@@ -212,4 +212,4 @@ export {
|
|
|
212
212
|
runInternalReadOnly,
|
|
213
213
|
summarizeCheckpoint
|
|
214
214
|
};
|
|
215
|
-
//# sourceMappingURL=chunk-
|
|
215
|
+
//# sourceMappingURL=chunk-A6N4FF4K.js.map
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import {
|
|
3
3
|
computeDiff,
|
|
4
4
|
isInsideRoot
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FNA27U2B.js";
|
|
6
6
|
import {
|
|
7
7
|
createFsWatcher,
|
|
8
8
|
loadHistory
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-3SBQIJQS.js";
|
|
10
10
|
import {
|
|
11
11
|
packageRoot
|
|
12
12
|
} from "./chunk-LNHSBM4L.js";
|
|
@@ -84,42 +84,57 @@ function resolveScope(cwd) {
|
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
86
|
function findAnyParentBranch(cwd) {
|
|
87
|
-
return findParent(
|
|
87
|
+
return runSync(findParent(false), cwd);
|
|
88
88
|
}
|
|
89
89
|
function detectParentBranch(cwd) {
|
|
90
|
-
return findParent(
|
|
90
|
+
return runSync(findParent(true), cwd);
|
|
91
91
|
}
|
|
92
92
|
var PARENT_CANDIDATES = ["main", "master", "dev", "develop"].flatMap((name) => [name, `origin/${name}`]);
|
|
93
|
-
function
|
|
94
|
-
|
|
93
|
+
function runSync(steps, cwd) {
|
|
94
|
+
let next = steps.next();
|
|
95
|
+
while (!next.done) {
|
|
96
|
+
const r = git(next.value, cwd);
|
|
97
|
+
next = steps.next({ exitCode: r.exitCode, stdout: r.stdout });
|
|
98
|
+
}
|
|
99
|
+
return next.value;
|
|
100
|
+
}
|
|
101
|
+
async function runAsync(steps, run) {
|
|
102
|
+
let next = steps.next();
|
|
103
|
+
while (!next.done) next = steps.next(await run(next.value));
|
|
104
|
+
return next.value;
|
|
105
|
+
}
|
|
106
|
+
function* findParent(requireAheadOfParent) {
|
|
107
|
+
const currentResult = yield ["rev-parse", "--abbrev-ref", "HEAD"];
|
|
95
108
|
const currentBranch = currentResult.exitCode === 0 ? currentResult.stdout : "";
|
|
96
|
-
const candidates = PARENT_CANDIDATES;
|
|
97
109
|
let best = null;
|
|
98
110
|
let fresh;
|
|
99
|
-
for (const ref of
|
|
111
|
+
for (const ref of PARENT_CANDIDATES) {
|
|
100
112
|
if (ref === currentBranch) continue;
|
|
101
|
-
const exists =
|
|
113
|
+
const exists = yield ["rev-parse", "--verify", "--quiet", ref];
|
|
102
114
|
if (exists.exitCode !== 0 || !exists.stdout) continue;
|
|
103
|
-
const mb =
|
|
115
|
+
const mb = yield ["merge-base", ref, "HEAD"];
|
|
104
116
|
if (mb.exitCode !== 0 || !mb.stdout) continue;
|
|
105
117
|
if (requireAheadOfParent) {
|
|
106
|
-
const headSha =
|
|
107
|
-
if (mb.stdout === headSha
|
|
118
|
+
const headSha = (yield ["rev-parse", "HEAD"]).stdout;
|
|
119
|
+
if (mb.stdout === headSha) {
|
|
120
|
+
fresh ??= yield* stillAtCreation(currentBranch, headSha);
|
|
121
|
+
if (!fresh) continue;
|
|
122
|
+
}
|
|
108
123
|
}
|
|
109
|
-
const timeResult =
|
|
124
|
+
const timeResult = yield ["show", "-s", "--format=%ct", mb.stdout];
|
|
110
125
|
if (timeResult.exitCode !== 0) continue;
|
|
111
126
|
const time = Number(timeResult.stdout);
|
|
112
127
|
if (!Number.isFinite(time)) continue;
|
|
113
|
-
const later = !!best && time === best.time && mb.stdout !== best.sha &&
|
|
128
|
+
const later = !!best && time === best.time && mb.stdout !== best.sha && (yield ["merge-base", "--is-ancestor", best.sha, mb.stdout]).exitCode === 0;
|
|
114
129
|
if (!best || time > best.time || later) {
|
|
115
130
|
best = { ref, sha: mb.stdout, time };
|
|
116
131
|
}
|
|
117
132
|
}
|
|
118
133
|
return best?.ref ?? null;
|
|
119
134
|
}
|
|
120
|
-
function stillAtCreation(
|
|
135
|
+
function* stillAtCreation(branch, headSha) {
|
|
121
136
|
if (!branch || branch === "HEAD") return false;
|
|
122
|
-
const log =
|
|
137
|
+
const log = yield ["reflog", "show", "--format=%H %gs", `refs/heads/${branch}`, "--"];
|
|
123
138
|
if (log.exitCode !== 0 || !log.stdout) return false;
|
|
124
139
|
const lines = log.stdout.split("\n").filter(Boolean);
|
|
125
140
|
const m = /^(\S+) branch: Created from (\S+)$/.exec(lines[lines.length - 1] ?? "");
|
|
@@ -127,14 +142,14 @@ function stillAtCreation(cwd, branch, headSha) {
|
|
|
127
142
|
const from = m[2].replace(/^refs\/(heads|remotes)\//, "");
|
|
128
143
|
return from === "HEAD" || PARENT_CANDIDATES.includes(from);
|
|
129
144
|
}
|
|
130
|
-
function recordedBase(
|
|
145
|
+
function* recordedBase(name) {
|
|
131
146
|
const refs = name.startsWith("origin/") ? [name] : [name, `origin/${name}`];
|
|
132
147
|
let best = null;
|
|
133
148
|
for (const ref of refs) {
|
|
134
|
-
if (
|
|
135
|
-
const mb =
|
|
149
|
+
if ((yield ["rev-parse", "--verify", "--quiet", ref]).exitCode !== 0) continue;
|
|
150
|
+
const mb = yield ["merge-base", ref, "HEAD"];
|
|
136
151
|
if (mb.exitCode !== 0 || !mb.stdout) continue;
|
|
137
|
-
if (!best || mb.stdout !== best.mb &&
|
|
152
|
+
if (!best || mb.stdout !== best.mb && (yield ["merge-base", "--is-ancestor", best.mb, mb.stdout]).exitCode === 0) {
|
|
138
153
|
best = { ref, mb: mb.stdout };
|
|
139
154
|
}
|
|
140
155
|
}
|
|
@@ -167,15 +182,21 @@ function buildRepoSpecs(scope, base, perRepoBase) {
|
|
|
167
182
|
});
|
|
168
183
|
}
|
|
169
184
|
function resolveRepoDiff(root, base, sessionBaseBranch) {
|
|
185
|
+
return runSync(repoDiffSteps(base, sessionBaseBranch), root);
|
|
186
|
+
}
|
|
187
|
+
function resolveRepoDiffAsync(base, sessionBaseBranch, run) {
|
|
188
|
+
return runAsync(repoDiffSteps(base, sessionBaseBranch), run);
|
|
189
|
+
}
|
|
190
|
+
function* repoDiffSteps(base, sessionBaseBranch) {
|
|
170
191
|
if (base === "uncommitted") {
|
|
171
192
|
return { resolvedBase: "HEAD", diffArg: "HEAD" };
|
|
172
193
|
}
|
|
173
|
-
const recorded = sessionBaseBranch ? recordedBase(
|
|
194
|
+
const recorded = sessionBaseBranch ? yield* recordedBase(sessionBaseBranch) : null;
|
|
174
195
|
if (recorded) return { resolvedBase: recorded.ref, diffArg: recorded.mb };
|
|
175
|
-
const parent =
|
|
196
|
+
const parent = (yield* findParent(true)) ?? (yield* findParent(false));
|
|
176
197
|
if (!parent) return { resolvedBase: "HEAD", diffArg: "HEAD" };
|
|
177
198
|
let diffArg = "HEAD";
|
|
178
|
-
const mb =
|
|
199
|
+
const mb = yield ["merge-base", parent, "HEAD"];
|
|
179
200
|
if (mb.exitCode === 0 && mb.stdout) diffArg = mb.stdout;
|
|
180
201
|
return { resolvedBase: parent, diffArg };
|
|
181
202
|
}
|
|
@@ -501,6 +522,7 @@ export {
|
|
|
501
522
|
resolveBase,
|
|
502
523
|
buildRepoSpecs,
|
|
503
524
|
resolveRepoDiff,
|
|
525
|
+
resolveRepoDiffAsync,
|
|
504
526
|
sessionBaseForPath,
|
|
505
527
|
refuseReason,
|
|
506
528
|
launch,
|
|
@@ -512,4 +534,4 @@ export {
|
|
|
512
534
|
submitReviewSchema,
|
|
513
535
|
resolveSchema
|
|
514
536
|
};
|
|
515
|
-
//# sourceMappingURL=chunk-
|
|
537
|
+
//# sourceMappingURL=chunk-AOWYAOAX.js.map
|