@moberg_hr/work-tree 2.11.2 → 2.11.4
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-TEV24OIT.js → account-JOKEFQ46.js} +19 -18
- package/dist/{account-TEV24OIT.js.map → account-JOKEFQ46.js.map} +1 -1
- package/dist/{add-repo-RTWDVZLS.js → add-repo-JKVHNRWU.js} +20 -19
- package/dist/{add-repo-RTWDVZLS.js.map → add-repo-JKVHNRWU.js.map} +1 -1
- package/dist/{answer-Z73ZUV4U.js → answer-PDCLL5Z2.js} +11 -10
- package/dist/{answer-Z73ZUV4U.js.map → answer-PDCLL5Z2.js.map} +1 -1
- package/dist/{attach-46EMF36G.js → attach-BIFQP5OY.js} +15 -14
- package/dist/{attach-46EMF36G.js.map → attach-BIFQP5OY.js.map} +1 -1
- package/dist/bin.js +3 -3
- package/dist/{block-YZUWOE32.js → block-EI3OQVDM.js} +16 -15
- package/dist/{block-YZUWOE32.js.map → block-EI3OQVDM.js.map} +1 -1
- package/dist/{broadcast-WKG6KOY4.js → broadcast-ZSA3L5FY.js} +7 -6
- package/dist/{broadcast-WKG6KOY4.js.map → broadcast-ZSA3L5FY.js.map} +1 -1
- package/dist/{catchup-QSE2VRQI.js → catchup-SNMGWNRX.js} +14 -13
- package/dist/{catchup-QSE2VRQI.js.map → catchup-SNMGWNRX.js.map} +1 -1
- package/dist/{chunk-KSVYR4G2.js → chunk-253Q6TOC.js} +3 -3
- package/dist/{chunk-323URLMS.js → chunk-2R6EHVZG.js} +3 -3
- package/dist/{chunk-2FEJ66UR.js → chunk-2VYWTBC6.js} +3 -3
- package/dist/{chunk-ZNH72CNE.js → chunk-2YKV6MNQ.js} +3 -3
- package/dist/{chunk-52WAQNW2.js → chunk-3LDQPUJ6.js} +6 -6
- package/dist/{chunk-BVTV67Y2.js → chunk-3PXA5RJ2.js} +32 -5
- package/dist/chunk-3PXA5RJ2.js.map +1 -0
- package/dist/{chunk-TQEG7UWB.js → chunk-3QEDOZMA.js} +3 -3
- package/dist/{chunk-EL3XL2OC.js → chunk-3QKH7JNR.js} +2 -64
- package/dist/chunk-3QKH7JNR.js.map +1 -0
- package/dist/{chunk-MSJWQC7H.js → chunk-3UI35AFZ.js} +2 -2
- package/dist/{chunk-VPTHUGPB.js → chunk-3XU7Y2MV.js} +2 -2
- package/dist/{chunk-JNBMANFM.js → chunk-5DUKO7WC.js} +3 -3
- package/dist/{chunk-I6MILNM5.js → chunk-5ZU6H62F.js} +2 -2
- package/dist/{chunk-RGLIW45S.js → chunk-6C7CR2W2.js} +2 -2
- package/dist/{chunk-ZGUMZJLW.js → chunk-6MMXVHPL.js} +7 -7
- package/dist/{chunk-XU7TWI23.js → chunk-73MGZAGV.js} +2 -2
- package/dist/{chunk-PPZP7CA7.js → chunk-7HQM5NYN.js} +3 -3
- package/dist/{chunk-4DKXJGZU.js → chunk-7OZZUQDW.js} +4 -4
- package/dist/{chunk-O36SFV5G.js → chunk-AU7XGTJZ.js} +2 -2
- package/dist/chunk-AWY2HWAQ.js +9 -0
- package/dist/{chunk-OXKUVNQL.js → chunk-BENY64FW.js} +3 -3
- package/dist/{chunk-MQCDFSVF.js → chunk-BLOV7ECI.js} +2 -2
- package/dist/{chunk-QZU6TQM7.js → chunk-BTR2E5WD.js} +13 -13
- package/dist/{chunk-CGXZSYY3.js → chunk-CJ2QTQHG.js} +3 -2
- package/dist/chunk-CJ2QTQHG.js.map +1 -0
- package/dist/{chunk-3XKGKOVC.js → chunk-CL3SSNBC.js} +3 -3
- package/dist/{chunk-3XKGKOVC.js.map → chunk-CL3SSNBC.js.map} +1 -1
- package/dist/{chunk-DCCC7LEP.js → chunk-CSTPOCV2.js} +5 -3
- package/dist/{chunk-DCCC7LEP.js.map → chunk-CSTPOCV2.js.map} +1 -1
- package/dist/{chunk-O4V7K5HL.js → chunk-DMA3XCMF.js} +6 -6
- package/dist/{chunk-H3VAWTA4.js → chunk-E6WVQXF4.js} +3 -3
- package/dist/{chunk-U4CIMKG2.js → chunk-F7IOGLKV.js} +6 -6
- package/dist/{chunk-UQJUIOGU.js → chunk-FFL7ETBY.js} +5 -5
- package/dist/{chunk-WW2FT2L3.js → chunk-GAE3NB3G.js} +8 -8
- package/dist/{chunk-WZSKGVOQ.js → chunk-GV3KXHF3.js} +3 -3
- package/dist/{chunk-HPCGWSTO.js → chunk-HECIDNBU.js} +8 -8
- package/dist/{chunk-EUY7ZOAM.js → chunk-HJ2RKMBI.js} +2 -2
- package/dist/{chunk-DAKJTB6N.js → chunk-HRUKMBF3.js} +2 -2
- package/dist/{chunk-26YZYL77.js → chunk-IYWNDEXA.js} +5 -5
- package/dist/{chunk-MAMO57YN.js → chunk-K7Y7YTN3.js} +2 -2
- package/dist/{chunk-N4W34U3I.js → chunk-KCDHOW22.js} +42 -18
- package/dist/chunk-KCDHOW22.js.map +1 -0
- package/dist/{chunk-AHYCZUPI.js → chunk-KKVWDMSM.js} +2 -2
- package/dist/{chunk-I2ZBOLXK.js → chunk-KP2CI5QU.js} +4 -4
- package/dist/{chunk-FCGFXV6C.js → chunk-LPHYUNMD.js} +5 -5
- package/dist/{chunk-UNKJVL2C.js → chunk-M7FX37Z2.js} +5 -5
- package/dist/{chunk-7QNVFVG6.js → chunk-MBSCZQ2C.js} +2 -2
- package/dist/chunk-MBSCZQ2C.js.map +1 -0
- package/dist/{chunk-GZYXCMJH.js → chunk-MGNJPBZU.js} +5 -5
- package/dist/{chunk-I4YAFPYP.js → chunk-N75AJ3ZR.js} +3 -3
- package/dist/{chunk-S3QXYWKF.js → chunk-PHHBZDO2.js} +55 -53
- package/dist/chunk-PHHBZDO2.js.map +1 -0
- package/dist/{chunk-4K4S53KX.js → chunk-PMEOGFGV.js} +2 -2
- package/dist/{chunk-562VO6OV.js → chunk-QRYZAY7R.js} +6 -6
- package/dist/{chunk-B5GJNQFD.js → chunk-RH4BGTER.js} +3 -3
- package/dist/{chunk-4CNBSPNL.js → chunk-RIEBQWQC.js} +2 -2
- package/dist/{chunk-ODCAGWB7.js → chunk-RUUEZSQY.js} +6 -6
- package/dist/{chunk-7HNGU6VR.js → chunk-RXZKYHSW.js} +4 -4
- package/dist/{chunk-VHYTF5Z3.js → chunk-SC2FQ6BR.js} +5 -5
- package/dist/{chunk-NUMRRBHL.js → chunk-SMXRY653.js} +6 -6
- package/dist/{chunk-3JJLUNPD.js → chunk-SQ4ZGEZY.js} +6 -3
- package/dist/chunk-SQ4ZGEZY.js.map +1 -0
- package/dist/{chunk-PMR5TOBL.js → chunk-TW44C7CG.js} +5 -5
- package/dist/{chunk-SO3GLVKM.js → chunk-U3RRXU6W.js} +7 -7
- package/dist/{chunk-QHXMVK75.js → chunk-VADGWMXL.js} +5 -5
- package/dist/chunk-VQACXAFX.js +69 -0
- package/dist/chunk-VQACXAFX.js.map +1 -0
- package/dist/{chunk-6OG7ERB5.js → chunk-WQN7HJK6.js} +15 -9
- package/dist/chunk-WQN7HJK6.js.map +1 -0
- package/dist/{chunk-CD6I23QB.js → chunk-WV5U4S5N.js} +7 -7
- package/dist/{chunk-63ZLPXRL.js → chunk-WYQD44Y4.js} +2 -2
- package/dist/{chunk-FJTMZB4E.js → chunk-XZKQHQBB.js} +4 -4
- package/dist/{chunk-GYWLYPXX.js → chunk-ZJBVZ4OJ.js} +4 -4
- package/dist/{chunk-EXNL7TI7.js → chunk-ZX2VBM2F.js} +4 -4
- package/dist/{cleanup-4SBO55WC.js → cleanup-5CPX253G.js} +36 -35
- package/dist/{cleanup-4SBO55WC.js.map → cleanup-5CPX253G.js.map} +1 -1
- package/dist/cli-D2RPZWWM.js +20 -0
- package/dist/{completion-IAH7WRKJ.js → completion-QCB7PKKT.js} +4 -3
- package/dist/{completion-IAH7WRKJ.js.map → completion-QCB7PKKT.js.map} +1 -1
- package/dist/{config-TPMJCP5K.js → config-EQFAXBMQ.js} +13 -12
- package/dist/{config-TPMJCP5K.js.map → config-EQFAXBMQ.js.map} +1 -1
- package/dist/{diff-BW6BSFQS.js → diff-MLCUMIYC.js} +13 -12
- package/dist/{diff-BW6BSFQS.js.map → diff-MLCUMIYC.js.map} +1 -1
- package/dist/{digest-I53EQ6FM.js → digest-KSAGLQND.js} +10 -9
- package/dist/{digest-I53EQ6FM.js.map → digest-KSAGLQND.js.map} +1 -1
- package/dist/{fork-GORLJ5D7.js → fork-RCTVMUYI.js} +32 -31
- package/dist/{fork-GORLJ5D7.js.map → fork-RCTVMUYI.js.map} +1 -1
- package/dist/{history-QQ72P3PD.js → history-N4ZURR4F.js} +9 -6
- package/dist/{hook-PSCHP6OD.js → hook-DRZVYLJB.js} +13 -12
- package/dist/{hook-PSCHP6OD.js.map → hook-DRZVYLJB.js.map} +1 -1
- package/dist/{hydrate-JWUZUKQR.js → hydrate-NVJZZAFT.js} +8 -7
- package/dist/{hydrate-JWUZUKQR.js.map → hydrate-NVJZZAFT.js.map} +1 -1
- package/dist/{init-C6CCVCZ3.js → init-RF6YC4BQ.js} +18 -17
- package/dist/{init-C6CCVCZ3.js.map → init-RF6YC4BQ.js.map} +1 -1
- package/dist/{install-skills-KS6N4U6L.js → install-skills-DV7JBW56.js} +7 -6
- package/dist/install-skills-bin.js +6 -5
- package/dist/install-skills-bin.js.map +1 -1
- package/dist/keep-7Q3B6QT5.js +53 -0
- package/dist/keep-7Q3B6QT5.js.map +1 -0
- package/dist/{list-LLB6KAFP.js → list-PIJ4ROHR.js} +9 -8
- package/dist/{list-LLB6KAFP.js.map → list-PIJ4ROHR.js.map} +1 -1
- package/dist/{move-IU6BI3JN.js → move-XAZG3MJT.js} +22 -21
- package/dist/{move-IU6BI3JN.js.map → move-XAZG3MJT.js.map} +1 -1
- package/dist/{note-7USST5R5.js → note-JJXIQ4QK.js} +10 -9
- package/dist/{note-7USST5R5.js.map → note-JJXIQ4QK.js.map} +1 -1
- package/dist/{overlaps-YCKUSS6F.js → overlaps-3YN4UQWC.js} +17 -16
- package/dist/{overlaps-YCKUSS6F.js.map → overlaps-3YN4UQWC.js.map} +1 -1
- package/dist/{pin-OVQLMH5R.js → pin-OOCB6DFR.js} +10 -9
- package/dist/{pin-OVQLMH5R.js.map → pin-OOCB6DFR.js.map} +1 -1
- package/dist/{pr-CEH64GGM.js → pr-LCG4W65A.js} +24 -23
- package/dist/{pr-CEH64GGM.js.map → pr-LCG4W65A.js.map} +1 -1
- package/dist/{prune-D2GPBZZ4.js → prune-2NGAUOPI.js} +34 -33
- package/dist/{prune-D2GPBZZ4.js.map → prune-2NGAUOPI.js.map} +1 -1
- package/dist/{pty-host-TNIVMCBV.js → pty-host-XRXRI6UL.js} +13 -12
- package/dist/{pty-host-TNIVMCBV.js.map → pty-host-XRXRI6UL.js.map} +1 -1
- package/dist/{read-Q47ZI64J.js → read-FJDDCX4D.js} +10 -9
- package/dist/{read-Q47ZI64J.js.map → read-FJDDCX4D.js.map} +1 -1
- package/dist/{recent-YRCOQC4A.js → recent-AAXLCQUF.js} +14 -13
- package/dist/{recent-YRCOQC4A.js.map → recent-AAXLCQUF.js.map} +1 -1
- package/dist/{remove-EEQHU53O.js → remove-VO5V45IJ.js} +33 -32
- package/dist/{remove-EEQHU53O.js.map → remove-VO5V45IJ.js.map} +1 -1
- package/dist/{restart-RVRLKW2Q.js → restart-AP763LE2.js} +11 -10
- package/dist/{restart-RVRLKW2Q.js.map → restart-AP763LE2.js.map} +1 -1
- package/dist/{resume-2ZAGQMV7.js → resume-SPO5XNDT.js} +14 -13
- package/dist/{resume-2ZAGQMV7.js.map → resume-SPO5XNDT.js.map} +1 -1
- package/dist/review-5IGFQF2T.js +120 -0
- package/dist/review-5IGFQF2T.js.map +1 -0
- package/dist/{run-MEL42R3A.js → run-JZWZHJOE.js} +7 -6
- package/dist/{run-MEL42R3A.js.map → run-JZWZHJOE.js.map} +1 -1
- package/dist/{screen-JNHBNT3Z.js → screen-JRMMYVHB.js} +11 -10
- package/dist/{screen-JNHBNT3Z.js.map → screen-JRMMYVHB.js.map} +1 -1
- package/dist/{search-55ZJKEHN.js → search-XOWMVFP2.js} +7 -6
- package/dist/{search-55ZJKEHN.js.map → search-XOWMVFP2.js.map} +1 -1
- package/dist/{section-KTIOZ67K.js → section-7WO7IHG6.js} +10 -9
- package/dist/{section-KTIOZ67K.js.map → section-7WO7IHG6.js.map} +1 -1
- package/dist/{send-NTTZ5K6N.js → send-OCSMOCUE.js} +16 -15
- package/dist/{send-NTTZ5K6N.js.map → send-OCSMOCUE.js.map} +1 -1
- package/dist/{sessions-7PSFS7KI.js → sessions-UAZALGGH.js} +28 -27
- package/dist/{sessions-7PSFS7KI.js.map → sessions-UAZALGGH.js.map} +1 -1
- package/dist/{snooze-IVWKZMOD.js → snooze-UDJ5UDCS.js} +10 -9
- package/dist/{snooze-IVWKZMOD.js.map → snooze-UDJ5UDCS.js.map} +1 -1
- package/dist/{start-3TQXW22D.js → start-OEG3T2SW.js} +11 -10
- package/dist/{start-3TQXW22D.js.map → start-OEG3T2SW.js.map} +1 -1
- package/dist/{status-LNDJJARR.js → status-R4T2EHG5.js} +14 -13
- package/dist/{status-LNDJJARR.js.map → status-R4T2EHG5.js.map} +1 -1
- package/dist/{statusline-WKKYCH7O.js → statusline-3H3HAPCZ.js} +5 -4
- package/dist/{statusline-WKKYCH7O.js.map → statusline-3H3HAPCZ.js.map} +1 -1
- package/dist/{statusline-hook-K7KPN2H6.js → statusline-hook-FILOARNM.js} +5 -4
- package/dist/{statusline-hook-K7KPN2H6.js.map → statusline-hook-FILOARNM.js.map} +1 -1
- package/dist/{stop-DZJDYVUY.js → stop-D3LRCCJS.js} +11 -10
- package/dist/{stop-DZJDYVUY.js.map → stop-D3LRCCJS.js.map} +1 -1
- package/dist/{sync-TZYDXWA6.js → sync-FWC2EWLW.js} +34 -33
- package/dist/{sync-TZYDXWA6.js.map → sync-FWC2EWLW.js.map} +1 -1
- package/dist/{time-NZG6C7OX.js → time-AMAMIDWD.js} +11 -10
- package/dist/{time-NZG6C7OX.js.map → time-AMAMIDWD.js.map} +1 -1
- package/dist/{timesheet-6U35X2KH.js → timesheet-QFBA2Z2A.js} +18 -17
- package/dist/{timesheet-6U35X2KH.js.map → timesheet-QFBA2Z2A.js.map} +1 -1
- package/dist/{tree-P27UZCXD.js → tree-PJM2R2VA.js} +35 -34
- package/dist/{tree-P27UZCXD.js.map → tree-PJM2R2VA.js.map} +1 -1
- package/dist/{update-5UQBKLML.js → update-RVZMM54Z.js} +20 -19
- package/dist/{update-5UQBKLML.js.map → update-RVZMM54Z.js.map} +1 -1
- package/dist/{usage-OZNRH45Z.js → usage-W4UXQUPD.js} +9 -8
- package/dist/{usage-OZNRH45Z.js.map → usage-W4UXQUPD.js.map} +1 -1
- package/dist/{version-TVT6GSRF.js → version-WPF664CL.js} +8 -6
- package/dist/{version-TVT6GSRF.js.map → version-WPF664CL.js.map} +1 -1
- package/dist/{wait-MAEZJP4D.js → wait-C3S7Q6FA.js} +11 -10
- package/dist/{wait-MAEZJP4D.js.map → wait-C3S7Q6FA.js.map} +1 -1
- package/dist/wd-bin.js +8 -7
- package/dist/wd-bin.js.map +1 -1
- package/dist/web/assets/{PtyView-CKn5mESo.js → PtyView-Bq8MHIjd.js} +2 -2
- package/dist/web/assets/{PtyView-CKn5mESo.js.map → PtyView-Bq8MHIjd.js.map} +1 -1
- package/dist/web/assets/index-DkVQmwkZ.js +126 -0
- package/dist/web/assets/{index-DYhzy-XC.js.map → index-DkVQmwkZ.js.map} +1 -1
- package/dist/web/assets/index-vHIk7hQs.css +1 -0
- package/dist/web/index.html +2 -2
- package/dist/{web-7T6QQSJV.js → web-MPSYOYQ2.js} +113 -83
- package/dist/web-MPSYOYQ2.js.map +1 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/dist/chunk-3JJLUNPD.js.map +0 -1
- package/dist/chunk-6OG7ERB5.js.map +0 -1
- package/dist/chunk-7QNVFVG6.js.map +0 -1
- package/dist/chunk-BVTV67Y2.js.map +0 -1
- package/dist/chunk-CGXZSYY3.js.map +0 -1
- package/dist/chunk-EL3XL2OC.js.map +0 -1
- package/dist/chunk-FL44GFZZ.js +0 -9
- package/dist/chunk-N4W34U3I.js.map +0 -1
- package/dist/chunk-S3QXYWKF.js.map +0 -1
- package/dist/cli-73SMUICE.js +0 -19
- package/dist/web/assets/index-CpqiTeqj.css +0 -1
- package/dist/web/assets/index-DYhzy-XC.js +0 -126
- package/dist/web-7T6QQSJV.js.map +0 -1
- /package/dist/{chunk-KSVYR4G2.js.map → chunk-253Q6TOC.js.map} +0 -0
- /package/dist/{chunk-323URLMS.js.map → chunk-2R6EHVZG.js.map} +0 -0
- /package/dist/{chunk-2FEJ66UR.js.map → chunk-2VYWTBC6.js.map} +0 -0
- /package/dist/{chunk-ZNH72CNE.js.map → chunk-2YKV6MNQ.js.map} +0 -0
- /package/dist/{chunk-52WAQNW2.js.map → chunk-3LDQPUJ6.js.map} +0 -0
- /package/dist/{chunk-TQEG7UWB.js.map → chunk-3QEDOZMA.js.map} +0 -0
- /package/dist/{chunk-MSJWQC7H.js.map → chunk-3UI35AFZ.js.map} +0 -0
- /package/dist/{chunk-VPTHUGPB.js.map → chunk-3XU7Y2MV.js.map} +0 -0
- /package/dist/{chunk-JNBMANFM.js.map → chunk-5DUKO7WC.js.map} +0 -0
- /package/dist/{chunk-I6MILNM5.js.map → chunk-5ZU6H62F.js.map} +0 -0
- /package/dist/{chunk-RGLIW45S.js.map → chunk-6C7CR2W2.js.map} +0 -0
- /package/dist/{chunk-ZGUMZJLW.js.map → chunk-6MMXVHPL.js.map} +0 -0
- /package/dist/{chunk-XU7TWI23.js.map → chunk-73MGZAGV.js.map} +0 -0
- /package/dist/{chunk-PPZP7CA7.js.map → chunk-7HQM5NYN.js.map} +0 -0
- /package/dist/{chunk-4DKXJGZU.js.map → chunk-7OZZUQDW.js.map} +0 -0
- /package/dist/{chunk-O36SFV5G.js.map → chunk-AU7XGTJZ.js.map} +0 -0
- /package/dist/{chunk-FL44GFZZ.js.map → chunk-AWY2HWAQ.js.map} +0 -0
- /package/dist/{chunk-OXKUVNQL.js.map → chunk-BENY64FW.js.map} +0 -0
- /package/dist/{chunk-MQCDFSVF.js.map → chunk-BLOV7ECI.js.map} +0 -0
- /package/dist/{chunk-QZU6TQM7.js.map → chunk-BTR2E5WD.js.map} +0 -0
- /package/dist/{chunk-O4V7K5HL.js.map → chunk-DMA3XCMF.js.map} +0 -0
- /package/dist/{chunk-H3VAWTA4.js.map → chunk-E6WVQXF4.js.map} +0 -0
- /package/dist/{chunk-U4CIMKG2.js.map → chunk-F7IOGLKV.js.map} +0 -0
- /package/dist/{chunk-UQJUIOGU.js.map → chunk-FFL7ETBY.js.map} +0 -0
- /package/dist/{chunk-WW2FT2L3.js.map → chunk-GAE3NB3G.js.map} +0 -0
- /package/dist/{chunk-WZSKGVOQ.js.map → chunk-GV3KXHF3.js.map} +0 -0
- /package/dist/{chunk-HPCGWSTO.js.map → chunk-HECIDNBU.js.map} +0 -0
- /package/dist/{chunk-EUY7ZOAM.js.map → chunk-HJ2RKMBI.js.map} +0 -0
- /package/dist/{chunk-DAKJTB6N.js.map → chunk-HRUKMBF3.js.map} +0 -0
- /package/dist/{chunk-26YZYL77.js.map → chunk-IYWNDEXA.js.map} +0 -0
- /package/dist/{chunk-MAMO57YN.js.map → chunk-K7Y7YTN3.js.map} +0 -0
- /package/dist/{chunk-AHYCZUPI.js.map → chunk-KKVWDMSM.js.map} +0 -0
- /package/dist/{chunk-I2ZBOLXK.js.map → chunk-KP2CI5QU.js.map} +0 -0
- /package/dist/{chunk-FCGFXV6C.js.map → chunk-LPHYUNMD.js.map} +0 -0
- /package/dist/{chunk-UNKJVL2C.js.map → chunk-M7FX37Z2.js.map} +0 -0
- /package/dist/{chunk-GZYXCMJH.js.map → chunk-MGNJPBZU.js.map} +0 -0
- /package/dist/{chunk-I4YAFPYP.js.map → chunk-N75AJ3ZR.js.map} +0 -0
- /package/dist/{chunk-4K4S53KX.js.map → chunk-PMEOGFGV.js.map} +0 -0
- /package/dist/{chunk-562VO6OV.js.map → chunk-QRYZAY7R.js.map} +0 -0
- /package/dist/{chunk-B5GJNQFD.js.map → chunk-RH4BGTER.js.map} +0 -0
- /package/dist/{chunk-4CNBSPNL.js.map → chunk-RIEBQWQC.js.map} +0 -0
- /package/dist/{chunk-ODCAGWB7.js.map → chunk-RUUEZSQY.js.map} +0 -0
- /package/dist/{chunk-7HNGU6VR.js.map → chunk-RXZKYHSW.js.map} +0 -0
- /package/dist/{chunk-VHYTF5Z3.js.map → chunk-SC2FQ6BR.js.map} +0 -0
- /package/dist/{chunk-NUMRRBHL.js.map → chunk-SMXRY653.js.map} +0 -0
- /package/dist/{chunk-PMR5TOBL.js.map → chunk-TW44C7CG.js.map} +0 -0
- /package/dist/{chunk-SO3GLVKM.js.map → chunk-U3RRXU6W.js.map} +0 -0
- /package/dist/{chunk-QHXMVK75.js.map → chunk-VADGWMXL.js.map} +0 -0
- /package/dist/{chunk-CD6I23QB.js.map → chunk-WV5U4S5N.js.map} +0 -0
- /package/dist/{chunk-63ZLPXRL.js.map → chunk-WYQD44Y4.js.map} +0 -0
- /package/dist/{chunk-FJTMZB4E.js.map → chunk-XZKQHQBB.js.map} +0 -0
- /package/dist/{chunk-GYWLYPXX.js.map → chunk-ZJBVZ4OJ.js.map} +0 -0
- /package/dist/{chunk-EXNL7TI7.js.map → chunk-ZX2VBM2F.js.map} +0 -0
- /package/dist/{cli-73SMUICE.js.map → cli-D2RPZWWM.js.map} +0 -0
- /package/dist/{history-QQ72P3PD.js.map → history-N4ZURR4F.js.map} +0 -0
- /package/dist/{install-skills-KS6N4U6L.js.map → install-skills-DV7JBW56.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/core/git/git.ts"],"sourcesContent":["import spawn from '../platform/spawn.js';\nimport { execFile } from 'node:child_process';\nimport { programPath } from '../platform/program-path.js';\nimport fs from 'node:fs';\nimport path from 'node:path';\nimport { debug } from '../platform/logger.js';\n\nexport interface GitResult {\n stdout: string;\n stderr: string;\n exitCode: number;\n}\n\n/** Run a git command synchronously in the given cwd. */\nexport function git(args: string[], cwd: string): GitResult {\n debug('git', args.join(' '), `cwd=${cwd}`);\n const result = spawn.sync('git', args, {\n cwd,\n encoding: 'utf-8',\n stdio: ['pipe', 'pipe', 'pipe'],\n // Avoid flashing a console window on Windows for every git call —\n // matters most when this runs inside the detached `wd --watch` daemon.\n windowsHide: true,\n });\n\n const r = {\n stdout: (result.stdout ?? '').toString().trim(),\n stderr: (result.stderr ?? '').toString().trim(),\n exitCode: result.status ?? 1,\n };\n if (r.exitCode !== 0) {\n debug('git failed', { args, exitCode: r.exitCode, stderr: r.stderr });\n }\n return r;\n}\n\nexport interface WorktreeEntry {\n path: string;\n branch: string;\n head: string;\n}\n\n/** Parse `git worktree list --porcelain` output into structured entries. */\nexport function parseWorktreeList(cwd: string): WorktreeEntry[] {\n const result = git(['worktree', 'list', '--porcelain'], cwd);\n if (result.exitCode !== 0) return [];\n\n const entries: WorktreeEntry[] = [];\n let current: Partial<WorktreeEntry> = {};\n\n for (const line of result.stdout.split('\\n')) {\n const worktreeMatch = line.match(/^worktree (.+)$/);\n if (worktreeMatch) {\n if (current.path) {\n entries.push({\n path: current.path,\n branch: current.branch ?? '',\n head: current.head ?? '',\n });\n }\n current = { path: worktreeMatch[1] };\n continue;\n }\n\n const headMatch = line.match(/^HEAD (.+)$/);\n if (headMatch) {\n current.head = headMatch[1].substring(0, 7);\n continue;\n }\n\n const branchMatch = line.match(/^branch (.+)$/);\n if (branchMatch) {\n current.branch = branchMatch[1].replace(/^refs\\/heads\\//, '');\n }\n }\n\n // Push last entry\n if (current.path) {\n entries.push({\n path: current.path,\n branch: current.branch ?? '',\n head: current.head ?? '',\n });\n }\n\n return entries;\n}\n\n/** Check if a local branch exists. */\nexport function localBranchExists(branch: string, cwd: string): boolean {\n const result = git(['rev-parse', '--verify', branch], cwd);\n return result.exitCode === 0;\n}\n\n/** Check if a remote tracking branch exists. */\nexport function remoteBranchExists(branch: string, cwd: string): boolean {\n const result = git(['rev-parse', '--verify', `origin/${branch}`], cwd);\n return result.exitCode === 0;\n}\n\n/** Check if path is a valid git worktree/repo. */\nexport function isGitRepo(cwd: string): boolean {\n const result = git(['rev-parse', '--is-inside-work-tree'], cwd);\n return result.exitCode === 0 && result.stdout === 'true';\n}\n\n/** Get the absolute toplevel of the worktree containing cwd, or null if not a repo. */\nexport function getWorktreeRoot(cwd: string): string | null {\n const result = git(['rev-parse', '--show-toplevel'], cwd);\n if (result.exitCode !== 0 || !result.stdout) return null;\n return result.stdout;\n}\n\n/**\n * Get the MAIN repo working directory for a (possibly linked) worktree.\n * `--git-common-dir` points at the main repo's `.git` dir; the main repo root\n * is its parent when the basename is `.git`, otherwise the path itself.\n * Returns null on failure.\n */\nexport function getMainRepoRoot(cwd: string): string | null {\n const result = git(['rev-parse', '--path-format=absolute', '--git-common-dir'], cwd);\n if (result.exitCode !== 0 || !result.stdout) return null;\n const commonDir = result.stdout;\n if (path.basename(commonDir) === '.git') {\n return path.dirname(commonDir);\n }\n return commonDir;\n}\n\n/** Get current branch name. */\nexport function getCurrentBranch(cwd: string): string {\n const result = git(['branch', '--show-current'], cwd);\n return result.stdout;\n}\n\n/** Check for uncommitted changes (returns porcelain status). */\nexport function getStatus(cwd: string): string {\n const result = git(['status', '--porcelain'], cwd);\n return result.stdout;\n}\n\n/**\n * Porcelain status, or null when git could not tell (it errored). Anything\n * deciding whether work may be deleted must use this and treat null as\n * \"maybe dirty\": an empty string from a FAILED `git status` is not clean.\n */\nexport function getStatusChecked(cwd: string): string | null {\n const result = git(['status', '--porcelain'], cwd);\n return result.exitCode === 0 ? result.stdout : null;\n}\n\nexport type RepoState = 'repo' | 'not-a-repo' | 'unknown';\n\n/**\n * Whether a directory is a git checkout — with \"can't tell\" kept apart\n * from \"no\". A failing git (dubious ownership on a network share, git\n * missing from a detached process's PATH, a worktree whose main repo was\n * moved) is NOT proof the folder is disposable: 'not-a-repo' needs git to\n * say so AND no `.git` entry in the folder.\n */\nexport function repoState(cwd: string): RepoState {\n const result = git(['rev-parse', '--is-inside-work-tree'], cwd);\n if (result.exitCode === 0 && result.stdout === 'true') return 'repo';\n if (fs.existsSync(path.join(cwd, '.git'))) return 'unknown';\n return /not a git repository/i.test(result.stderr) ? 'not-a-repo' : 'unknown';\n}\n\n/** Get the default branch from origin/HEAD (e.g. \"main\" or \"master\"). */\nexport function getDefaultBranch(cwd: string): string | null {\n const result = git(['symbolic-ref', 'refs/remotes/origin/HEAD'], cwd);\n if (result.exitCode === 0 && result.stdout) {\n // Output is like \"refs/remotes/origin/main\"\n return result.stdout.replace(/^refs\\/remotes\\/origin\\//, '');\n }\n return null;\n}\n\n/**\n * Result of checking a branch against a single base ref.\n *\n * 'merged' is a high-confidence true merge (the branch tip is reachable from\n * base via a merge/fast-forward). 'squash-merged' is the lower-confidence\n * heuristic match from {@link checkSquashMerged} — the branch's squashed patch\n * already appears in base, but there is no real merge commit linking the two.\n * Callers that prune unattended should treat 'squash-merged' as opt-in only.\n */\ntype MergeCheck = 'merged' | 'squash-merged' | 'stale' | 'unrelated';\n\n/**\n * Check if a branch is truly merged into a base ref (not just a stale branch\n * sitting behind base with no unique commits).\n *\n * Returns 'stale' if the branch tip is on the base's first-parent chain\n * (no unique work). Returns 'merged' if the branch has unique commits that\n * are all reachable from base. Returns 'squash-merged' if only the squash\n * heuristic matched. Returns 'unrelated' otherwise.\n */\nfunction checkMergeStatus(branch: string, baseRef: string, cwd: string): MergeCheck {\n // 1. Branch must be an ancestor of base (all its commits are in base)\n const branchInBase = git(['merge-base', '--is-ancestor', branch, baseRef], cwd);\n if (branchInBase.exitCode !== 0) {\n // Not a regular merge — check for squash merge (low-confidence heuristic).\n if (checkSquashMerged(branch, baseRef, cwd)) return 'squash-merged';\n return 'unrelated';\n }\n\n // 2. If base is also ancestor of branch, they're at the same commit\n // (fast-forward merge or empty branch) — nothing left to merge.\n const baseInBranch = git(['merge-base', '--is-ancestor', baseRef, branch], cwd);\n if (baseInBranch.exitCode === 0) return 'merged';\n\n // 3. Branch is ancestor of base — but is it on the main line (stale) or\n // only reachable via a merge commit (truly merged)?\n // A stale branch's tip sits directly on the first-parent chain.\n const tip = git(['rev-parse', branch], cwd);\n if (tip.exitCode !== 0) return 'unrelated';\n const mainLine = git(['rev-list', '--first-parent', '-n', '500', baseRef], cwd);\n if (mainLine.exitCode === 0 && mainLine.stdout.includes(tip.stdout)) {\n return 'stale';\n }\n\n return 'merged';\n}\n\n/**\n * Detect squash merges by creating a temporary dangling commit that represents\n * the branch's tree squashed onto the merge-base, then checking if that patch\n * is already present in the base ref via `git cherry`.\n */\nfunction checkSquashMerged(branch: string, baseRef: string, cwd: string): boolean {\n const mb = git(['merge-base', baseRef, branch], cwd);\n if (mb.exitCode !== 0) return false;\n\n const tree = git(['rev-parse', `${branch}^{tree}`], cwd);\n if (tree.exitCode !== 0) return false;\n\n const dangling = git(['commit-tree', tree.stdout, '-p', mb.stdout, '-m', ''], cwd);\n if (dangling.exitCode !== 0) return false;\n\n const cherry = git(['cherry', baseRef, dangling.stdout], cwd);\n if (cherry.exitCode !== 0) return false;\n\n // If the output starts with \"-\", the patch is already in baseRef (squash-merged)\n return cherry.stdout.startsWith('-');\n}\n\n/** Confidence level for a positive merge result. */\nexport type MergeConfidence = 'merged' | 'squash-merged';\n\nexport interface MergeCheckResult {\n merged: boolean;\n /** The base ref it matched against (e.g. \"origin/main\"), or null if not merged. */\n into: string | null;\n /**\n * How the match was determined when `merged` is true: 'merged' is a\n * high-confidence true merge; 'squash-merged' is the lower-confidence\n * squash heuristic. Null when not merged.\n */\n confidence: MergeConfidence | null;\n}\n\nexport function isBranchMerged(branch: string, cwd: string, baseBranch?: string): MergeCheckResult {\n const defaultBranch = getDefaultBranch(cwd);\n const bases = baseBranch ? [baseBranch] : [defaultBranch, 'main', 'master'].filter((b): b is string => b !== null);\n\n // Deduplicate (e.g. default branch is \"main\" which is already in the list)\n const uniqueBases = [...new Set(bases)];\n\n for (const base of uniqueBases) {\n // Check remote base branch first (most up-to-date after fetch)\n if (remoteBranchExists(base, cwd)) {\n const baseRef = `origin/${base}`;\n const status = checkMergeStatus(branch, baseRef, cwd);\n if (status === 'merged') return { merged: true, into: baseRef, confidence: 'merged' };\n if (status === 'squash-merged') return { merged: true, into: baseRef, confidence: 'squash-merged' };\n if (status === 'stale') return { merged: false, into: null, confidence: null };\n }\n\n // Fall back to local base branch\n if (localBranchExists(base, cwd)) {\n const status = checkMergeStatus(branch, base, cwd);\n if (status === 'merged') return { merged: true, into: base, confidence: 'merged' };\n if (status === 'squash-merged') return { merged: true, into: base, confidence: 'squash-merged' };\n if (status === 'stale') return { merged: false, into: null, confidence: null };\n }\n }\n\n return { merged: false, into: null, confidence: null };\n}\n\n/** Fetch latest remote refs for a repo and ensure origin/HEAD is set. */\nexport function fetchRemote(cwd: string): void {\n git(['fetch', '--quiet'], cwd);\n\n // Ensure origin/HEAD is set so getDefaultBranch works\n if (!getDefaultBranch(cwd)) {\n git(['remote', 'set-head', 'origin', '--auto'], cwd);\n }\n}\n\n/** Async version of fetchRemote — non-blocking. */\nexport async function fetchRemoteAsync(cwd: string): Promise<void> {\n await new Promise<void>((resolve, reject) => {\n execFile(programPath('git'), ['fetch', '--quiet'], { cwd, timeout: 30000, windowsHide: true }, (err) => {\n if (err) reject(err);\n else resolve();\n });\n });\n if (!getDefaultBranch(cwd)) {\n git(['remote', 'set-head', 'origin', '--auto'], cwd);\n }\n}\n\n/** Rebase a branch onto the default branch. Returns error message or null on success. */\nexport function rebaseOntoMain(branch: string, cwd: string): string | null {\n const defaultBranch = getDefaultBranch(cwd) ?? 'main';\n // Fetch latest first\n git(['fetch', '--quiet'], cwd);\n const base = remoteBranchExists(defaultBranch, cwd) ? `origin/${defaultBranch}` : defaultBranch;\n const result = git(['rebase', base, branch], cwd);\n if (result.exitCode !== 0) {\n // Abort the failed rebase\n git(['rebase', '--abort'], cwd);\n return result.stderr || 'Rebase failed';\n }\n return null;\n}\n\n/** Count merge conflicts between a branch and the default branch. Returns 0 if clean. */\nexport function countConflicts(branch: string, cwd: string): number {\n const defaultBranch = getDefaultBranch(cwd) ?? 'main';\n const base = remoteBranchExists(defaultBranch, cwd) ? `origin/${defaultBranch}` : defaultBranch;\n\n // Use merge-tree to simulate merge without changing worktree\n const mergeBase = git(['merge-base', base, branch], cwd);\n if (mergeBase.exitCode !== 0) return 0;\n\n const result = git(['merge-tree', mergeBase.stdout, base, branch], cwd);\n // Count conflict markers in merge-tree output\n const conflicts = (result.stdout.match(/^<<<<<<< /gm) || []).length;\n return conflicts;\n}\n\n/** Check for unpushed commits. Returns the log output or empty string. */\nexport function getUnpushedCommits(cwd: string): string {\n const branch = getCurrentBranch(cwd);\n if (!branch) return '';\n\n const upstreamResult = git(['rev-parse', '--abbrev-ref', `${branch}@{upstream}`], cwd);\n if (upstreamResult.exitCode !== 0) return '';\n\n const upstream = upstreamResult.stdout;\n const logResult = git(['log', '--oneline', `${upstream}..HEAD`], cwd);\n return logResult.stdout;\n}\n"],"mappings":";;;;;;;;;;AACA,SAAS,gBAAgB;AAEzB,OAAO,QAAQ;AACf,OAAO,UAAU;AAUV,SAAS,IAAI,MAAgB,KAAwB;AAC1D,QAAM,OAAO,KAAK,KAAK,GAAG,GAAG,OAAO,GAAG,EAAE;AACzC,QAAM,SAAS,cAAM,KAAK,OAAO,MAAM;AAAA,IACrC;AAAA,IACA,UAAU;AAAA,IACV,OAAO,CAAC,QAAQ,QAAQ,MAAM;AAAA;AAAA;AAAA,IAG9B,aAAa;AAAA,EACf,CAAC;AAED,QAAM,IAAI;AAAA,IACR,SAAS,OAAO,UAAU,IAAI,SAAS,EAAE,KAAK;AAAA,IAC9C,SAAS,OAAO,UAAU,IAAI,SAAS,EAAE,KAAK;AAAA,IAC9C,UAAU,OAAO,UAAU;AAAA,EAC7B;AACA,MAAI,EAAE,aAAa,GAAG;AACpB,UAAM,cAAc,EAAE,MAAM,UAAU,EAAE,UAAU,QAAQ,EAAE,OAAO,CAAC;AAAA,EACtE;AACA,SAAO;AACT;AASO,SAAS,kBAAkB,KAA8B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O,GAAG;AAAA,UACd,SAAQ;AAAA,IACf,CAAC;AAAA,EACH,CAAC;AACD,MAAI,CAAC,iBAAiB,GAAG,GAAG;AAC1B,QAAI,CAAC,UAAU,YAAY,UAAU,QAAQ,GAAG,GAAG;AAAA,EACrD;AACF;AAiCO,SAAS,mBAAmB,KAAqB;AACtD,QAAM,SAAS,iBAAiB,GAAG;AACnC,MAAI,CAAC,OAAQ,QAAO;AAEpB,QAAM,iBAAiB,IAAI,CAAC,aAAa,gBAAgB,GAAG,MAAM,aAAa,GAAG,GAAG;AACrF,MAAI,eAAe,aAAa,EAAG,QAAO;AAE1C,QAAM,WAAW,eAAe;AAChC,QAAM,YAAY,IAAI,CAAC,OAAO,aAAa,GAAG,QAAQ,QAAQ,GAAG,GAAG;AACpE,SAAO,UAAU;AACnB;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/core/git/git.ts"],"sourcesContent":["import spawn from '../platform/spawn.js';\nimport { execFile } from 'node:child_process';\nimport { programPath } from '../platform/program-path.js';\nimport fs from 'node:fs';\nimport path from 'node:path';\nimport { debug } from '../platform/logger.js';\n\nexport interface GitResult {\n stdout: string;\n stderr: string;\n exitCode: number;\n}\n\n/** Run a git command synchronously in the given cwd. */\nexport function git(args: string[], cwd: string): GitResult {\n debug('git', args.join(' '), `cwd=${cwd}`);\n const result = spawn.sync('git', args, {\n cwd,\n encoding: 'utf-8',\n stdio: ['pipe', 'pipe', 'pipe'],\n // Avoid flashing a console window on Windows for every git call —\n // matters most when this runs inside the detached `wd --watch` daemon.\n windowsHide: true,\n });\n\n const r = {\n stdout: (result.stdout ?? '').toString().trim(),\n stderr: (result.stderr ?? '').toString().trim(),\n exitCode: result.status ?? 1,\n };\n if (r.exitCode !== 0) {\n debug('git failed', { args, exitCode: r.exitCode, stderr: r.stderr });\n }\n return r;\n}\n\nexport interface WorktreeEntry {\n path: string;\n branch: string;\n head: string;\n}\n\n/** Parse `git worktree list --porcelain` output into structured entries. */\nexport function parseWorktreeList(cwd: string): WorktreeEntry[] {\n const result = git(['worktree', 'list', '--porcelain'], cwd);\n if (result.exitCode !== 0) return [];\n\n const entries: WorktreeEntry[] = [];\n let current: Partial<WorktreeEntry> = {};\n\n for (const line of result.stdout.split('\\n')) {\n const worktreeMatch = line.match(/^worktree (.+)$/);\n if (worktreeMatch) {\n if (current.path) {\n entries.push({\n path: current.path,\n branch: current.branch ?? '',\n head: current.head ?? '',\n });\n }\n current = { path: worktreeMatch[1] };\n continue;\n }\n\n const headMatch = line.match(/^HEAD (.+)$/);\n if (headMatch) {\n current.head = headMatch[1].substring(0, 7);\n continue;\n }\n\n const branchMatch = line.match(/^branch (.+)$/);\n if (branchMatch) {\n current.branch = branchMatch[1].replace(/^refs\\/heads\\//, '');\n }\n }\n\n // Push last entry\n if (current.path) {\n entries.push({\n path: current.path,\n branch: current.branch ?? '',\n head: current.head ?? '',\n });\n }\n\n return entries;\n}\n\n/** Check if a local branch exists. */\nexport function localBranchExists(branch: string, cwd: string): boolean {\n const result = git(['rev-parse', '--verify', branch], cwd);\n return result.exitCode === 0;\n}\n\n/** Check if a remote tracking branch exists. */\nexport function remoteBranchExists(branch: string, cwd: string): boolean {\n const result = git(['rev-parse', '--verify', `origin/${branch}`], cwd);\n return result.exitCode === 0;\n}\n\n/** Check if path is a valid git worktree/repo. */\nexport function isGitRepo(cwd: string): boolean {\n const result = git(['rev-parse', '--is-inside-work-tree'], cwd);\n return result.exitCode === 0 && result.stdout === 'true';\n}\n\n/** Get the absolute toplevel of the worktree containing cwd, or null if not a repo. */\nexport function getWorktreeRoot(cwd: string): string | null {\n const result = git(['rev-parse', '--show-toplevel'], cwd);\n if (result.exitCode !== 0 || !result.stdout) return null;\n return result.stdout;\n}\n\n/**\n * Get the MAIN repo working directory for a (possibly linked) worktree.\n * `--git-common-dir` points at the main repo's `.git` dir; the main repo root\n * is its parent when the basename is `.git`, otherwise the path itself.\n * Returns null on failure.\n */\nexport function getMainRepoRoot(cwd: string): string | null {\n const result = git(['rev-parse', '--path-format=absolute', '--git-common-dir'], cwd);\n if (result.exitCode !== 0 || !result.stdout) return null;\n const commonDir = result.stdout;\n if (path.basename(commonDir) === '.git') {\n return path.dirname(commonDir);\n }\n return commonDir;\n}\n\n/** Get current branch name. */\nexport function getCurrentBranch(cwd: string): string {\n const result = git(['branch', '--show-current'], cwd);\n return result.stdout;\n}\n\n/** Check for uncommitted changes (returns porcelain status). */\nexport function getStatus(cwd: string): string {\n const result = git(['status', '--porcelain'], cwd);\n return result.stdout;\n}\n\n/**\n * Porcelain status, or null when git could not tell (it errored). Anything\n * deciding whether work may be deleted must use this and treat null as\n * \"maybe dirty\": an empty string from a FAILED `git status` is not clean.\n */\nexport function getStatusChecked(cwd: string): string | null {\n const result = git(['status', '--porcelain'], cwd);\n return result.exitCode === 0 ? result.stdout : null;\n}\n\nexport type RepoState = 'repo' | 'not-a-repo' | 'unknown';\n\n/**\n * Whether a directory is a git checkout — with \"can't tell\" kept apart\n * from \"no\". A failing git (dubious ownership on a network share, git\n * missing from a detached process's PATH, a worktree whose main repo was\n * moved) is NOT proof the folder is disposable: 'not-a-repo' needs git to\n * say so AND no `.git` entry in the folder.\n */\nexport function repoState(cwd: string): RepoState {\n const result = git(['rev-parse', '--is-inside-work-tree'], cwd);\n if (result.exitCode === 0 && result.stdout === 'true') return 'repo';\n if (fs.existsSync(path.join(cwd, '.git'))) return 'unknown';\n return /not a git repository/i.test(result.stderr) ? 'not-a-repo' : 'unknown';\n}\n\n/** Get the default branch from origin/HEAD (e.g. \"main\" or \"master\"). */\nexport function getDefaultBranch(cwd: string): string | null {\n const result = git(['symbolic-ref', 'refs/remotes/origin/HEAD'], cwd);\n if (result.exitCode === 0 && result.stdout) {\n // Output is like \"refs/remotes/origin/main\"\n return result.stdout.replace(/^refs\\/remotes\\/origin\\//, '');\n }\n return null;\n}\n\n/**\n * Result of checking a branch against a single base ref.\n *\n * 'merged' is a high-confidence true merge (the branch tip is reachable from\n * base via a merge/fast-forward). 'squash-merged' is the lower-confidence\n * heuristic match from {@link checkSquashMerged} — the branch's squashed patch\n * already appears in base, but there is no real merge commit linking the two.\n * Callers that prune unattended should treat 'squash-merged' as opt-in only.\n */\ntype MergeCheck = 'merged' | 'squash-merged' | 'stale' | 'unrelated';\n\n/**\n * Check if a branch is truly merged into a base ref (not just a stale branch\n * sitting behind base with no unique commits).\n *\n * Returns 'stale' if the branch tip is on the base's first-parent chain\n * (no unique work). Returns 'merged' if the branch has unique commits that\n * are all reachable from base. Returns 'squash-merged' if only the squash\n * heuristic matched. Returns 'unrelated' otherwise.\n */\nfunction checkMergeStatus(branch: string, baseRef: string, cwd: string): MergeCheck {\n // 1. Branch must be an ancestor of base (all its commits are in base)\n const branchInBase = git(['merge-base', '--is-ancestor', branch, baseRef], cwd);\n if (branchInBase.exitCode !== 0) {\n // Not a regular merge — check for squash merge (low-confidence heuristic).\n if (checkSquashMerged(branch, baseRef, cwd)) return 'squash-merged';\n return 'unrelated';\n }\n\n // 2. If base is also ancestor of branch, they're at the same commit\n // (fast-forward merge or empty branch) — nothing left to merge.\n const baseInBranch = git(['merge-base', '--is-ancestor', baseRef, branch], cwd);\n if (baseInBranch.exitCode === 0) return 'merged';\n\n // 3. Branch is ancestor of base — but is it on the main line (stale) or\n // only reachable via a merge commit (truly merged)?\n // A stale branch's tip sits directly on the first-parent chain.\n const tip = git(['rev-parse', branch], cwd);\n if (tip.exitCode !== 0) return 'unrelated';\n const mainLine = git(['rev-list', '--first-parent', '-n', '500', baseRef], cwd);\n if (mainLine.exitCode === 0 && mainLine.stdout.includes(tip.stdout)) {\n return 'stale';\n }\n\n return 'merged';\n}\n\n/**\n * Detect squash merges by creating a temporary dangling commit that represents\n * the branch's tree squashed onto the merge-base, then checking if that patch\n * is already present in the base ref via `git cherry`.\n */\nfunction checkSquashMerged(branch: string, baseRef: string, cwd: string): boolean {\n const mb = git(['merge-base', baseRef, branch], cwd);\n if (mb.exitCode !== 0) return false;\n\n const tree = git(['rev-parse', `${branch}^{tree}`], cwd);\n if (tree.exitCode !== 0) return false;\n\n const dangling = git(['commit-tree', tree.stdout, '-p', mb.stdout, '-m', ''], cwd);\n if (dangling.exitCode !== 0) return false;\n\n const cherry = git(['cherry', baseRef, dangling.stdout], cwd);\n if (cherry.exitCode !== 0) return false;\n\n // If the output starts with \"-\", the patch is already in baseRef (squash-merged)\n return cherry.stdout.startsWith('-');\n}\n\n/** Confidence level for a positive merge result. */\nexport type MergeConfidence = 'merged' | 'squash-merged';\n\nexport interface MergeCheckResult {\n merged: boolean;\n /** The base ref it matched against (e.g. \"origin/main\"), or null if not merged. */\n into: string | null;\n /**\n * How the match was determined when `merged` is true: 'merged' is a\n * high-confidence true merge; 'squash-merged' is the lower-confidence\n * squash heuristic. Null when not merged.\n */\n confidence: MergeConfidence | null;\n}\n\nexport function isBranchMerged(branch: string, cwd: string, baseBranch?: string): MergeCheckResult {\n const defaultBranch = getDefaultBranch(cwd);\n const bases = baseBranch ? [baseBranch] : [defaultBranch, 'main', 'master'].filter((b): b is string => b !== null);\n\n // Deduplicate (e.g. default branch is \"main\" which is already in the list)\n const uniqueBases = [...new Set(bases)];\n\n for (const base of uniqueBases) {\n // Check remote base branch first (most up-to-date after fetch)\n if (remoteBranchExists(base, cwd)) {\n const baseRef = `origin/${base}`;\n const status = checkMergeStatus(branch, baseRef, cwd);\n if (status === 'merged') return { merged: true, into: baseRef, confidence: 'merged' };\n if (status === 'squash-merged') return { merged: true, into: baseRef, confidence: 'squash-merged' };\n if (status === 'stale') return { merged: false, into: null, confidence: null };\n }\n\n // Fall back to local base branch\n if (localBranchExists(base, cwd)) {\n const status = checkMergeStatus(branch, base, cwd);\n if (status === 'merged') return { merged: true, into: base, confidence: 'merged' };\n if (status === 'squash-merged') return { merged: true, into: base, confidence: 'squash-merged' };\n if (status === 'stale') return { merged: false, into: null, confidence: null };\n }\n }\n\n return { merged: false, into: null, confidence: null };\n}\n\n/** Fetch latest remote refs for a repo and ensure origin/HEAD is set. */\nexport function fetchRemote(cwd: string): void {\n git(['fetch', '--quiet'], cwd);\n\n // Ensure origin/HEAD is set so getDefaultBranch works\n if (!getDefaultBranch(cwd)) {\n git(['remote', 'set-head', 'origin', '--auto'], cwd);\n }\n}\n\n/** Async version of fetchRemote — non-blocking. */\nexport async function fetchRemoteAsync(cwd: string): Promise<void> {\n await new Promise<void>((resolve, reject) => {\n execFile(programPath('git'), ['fetch', '--quiet'], { cwd, timeout: 30000, windowsHide: true }, (err) => {\n if (err) reject(err);\n else resolve();\n });\n });\n if (!getDefaultBranch(cwd)) {\n git(['remote', 'set-head', 'origin', '--auto'], cwd);\n }\n}\n\n/** Rebase a branch onto the default branch. Returns error message or null on success. */\nexport function rebaseOntoMain(branch: string, cwd: string): string | null {\n const defaultBranch = getDefaultBranch(cwd) ?? 'main';\n // Fetch latest first\n git(['fetch', '--quiet'], cwd);\n const base = remoteBranchExists(defaultBranch, cwd) ? `origin/${defaultBranch}` : defaultBranch;\n const result = git(['rebase', base, branch], cwd);\n if (result.exitCode !== 0) {\n // Abort the failed rebase\n git(['rebase', '--abort'], cwd);\n return result.stderr || 'Rebase failed';\n }\n return null;\n}\n\n/** Count merge conflicts between a branch and the default branch. Returns 0 if clean. */\nexport function countConflicts(branch: string, cwd: string): number {\n const defaultBranch = getDefaultBranch(cwd) ?? 'main';\n const base = remoteBranchExists(defaultBranch, cwd) ? `origin/${defaultBranch}` : defaultBranch;\n\n // Use merge-tree to simulate merge without changing worktree\n const mergeBase = git(['merge-base', base, branch], cwd);\n if (mergeBase.exitCode !== 0) return 0;\n\n const result = git(['merge-tree', mergeBase.stdout, base, branch], cwd);\n // Count conflict markers in merge-tree output\n const conflicts = (result.stdout.match(/^<<<<<<< /gm) || []).length;\n return conflicts;\n}\n\n/** Check for unpushed commits. Returns the log output or empty string. */\nexport function getUnpushedCommits(cwd: string): string {\n const branch = getCurrentBranch(cwd);\n if (!branch) return '';\n\n const upstreamResult = git(['rev-parse', '--abbrev-ref', `${branch}@{upstream}`], cwd);\n if (upstreamResult.exitCode !== 0) return '';\n\n const upstream = upstreamResult.stdout;\n const logResult = git(['log', '--oneline', `${upstream}..HEAD`], cwd);\n return logResult.stdout;\n}\n"],"mappings":";;;;;;;;;;;;AACA,SAAS,gBAAgB;AAEzB,OAAO,QAAQ;AACf,OAAO,UAAU;AAUV,SAAS,IAAI,MAAgB,KAAwB;AAC1D,QAAM,OAAO,KAAK,KAAK,GAAG,GAAG,OAAO,GAAG,EAAE;AACzC,QAAM,SAAS,cAAM,KAAK,OAAO,MAAM;AAAA,IACrC;AAAA,IACA,UAAU;AAAA,IACV,OAAO,CAAC,QAAQ,QAAQ,MAAM;AAAA;AAAA;AAAA,IAG9B,aAAa;AAAA,EACf,CAAC;AAED,QAAM,IAAI;AAAA,IACR,SAAS,OAAO,UAAU,IAAI,SAAS,EAAE,KAAK;AAAA,IAC9C,SAAS,OAAO,UAAU,IAAI,SAAS,EAAE,KAAK;AAAA,IAC9C,UAAU,OAAO,UAAU;AAAA,EAC7B;AACA,MAAI,EAAE,aAAa,GAAG;AACpB,UAAM,cAAc,EAAE,MAAM,UAAU,EAAE,UAAU,QAAQ,EAAE,OAAO,CAAC;AAAA,EACtE;AACA,SAAO;AACT;AASO,SAAS,kBAAkB,KAA8B;AAC9D,QAAM,SAAS,IAAI,CAAC,YAAY,QAAQ,aAAa,GAAG,GAAG;AAC3D,MAAI,OAAO,aAAa,EAAG,QAAO,CAAC;AAEnC,QAAM,UAA2B,CAAC;AAClC,MAAI,UAAkC,CAAC;AAEvC,aAAW,QAAQ,OAAO,OAAO,MAAM,IAAI,GAAG;AAC5C,UAAM,gBAAgB,KAAK,MAAM,iBAAiB;AAClD,QAAI,eAAe;AACjB,UAAI,QAAQ,MAAM;AAChB,gBAAQ,KAAK;AAAA,UACX,MAAM,QAAQ;AAAA,UACd,QAAQ,QAAQ,UAAU;AAAA,UAC1B,MAAM,QAAQ,QAAQ;AAAA,QACxB,CAAC;AAAA,MACH;AACA,gBAAU,EAAE,MAAM,cAAc,CAAC,EAA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AAG;AACpE,SAAO,UAAU;AACnB;","names":[]}
|
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
import {
|
|
3
3
|
openBaseCheckout,
|
|
4
4
|
setupWorktree
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-HECIDNBU.js";
|
|
6
6
|
import {
|
|
7
7
|
defaultRunner
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-253Q6TOC.js";
|
|
9
9
|
import {
|
|
10
10
|
findSession,
|
|
11
11
|
loadHistory,
|
|
12
12
|
sessionAliases
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-3PXA5RJ2.js";
|
|
14
14
|
import {
|
|
15
15
|
resolveProjectTarget
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-PMEOGFGV.js";
|
|
17
17
|
import {
|
|
18
18
|
spawn_default
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-VQACXAFX.js";
|
|
20
20
|
import {
|
|
21
21
|
collectingReporter,
|
|
22
22
|
withReporter
|
|
@@ -200,4 +200,4 @@ export {
|
|
|
200
200
|
createInChild,
|
|
201
201
|
createInProcess
|
|
202
202
|
};
|
|
203
|
-
//# sourceMappingURL=chunk-
|
|
203
|
+
//# sourceMappingURL=chunk-DMA3XCMF.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
defaultRunner
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-253Q6TOC.js";
|
|
5
5
|
import {
|
|
6
6
|
logSwallowed
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-3PXA5RJ2.js";
|
|
8
8
|
|
|
9
9
|
// src/core/diff/diff-stat.ts
|
|
10
10
|
import fs from "fs";
|
|
@@ -207,4 +207,4 @@ export {
|
|
|
207
207
|
wantsDiffStat,
|
|
208
208
|
findOverlaps
|
|
209
209
|
};
|
|
210
|
-
//# sourceMappingURL=chunk-
|
|
210
|
+
//# sourceMappingURL=chunk-E6WVQXF4.js.map
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
computeRangeDiff
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ZX2VBM2F.js";
|
|
5
5
|
import {
|
|
6
6
|
loadManifest
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-3PXA5RJ2.js";
|
|
8
8
|
import {
|
|
9
9
|
agentSettings,
|
|
10
10
|
internalAgent
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-KCDHOW22.js";
|
|
12
12
|
import {
|
|
13
13
|
internalRunEnv
|
|
14
14
|
} from "./chunk-DMGNJ73M.js";
|
|
15
15
|
import {
|
|
16
16
|
killTree
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-WYQD44Y4.js";
|
|
18
18
|
import {
|
|
19
19
|
spawn_default
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-VQACXAFX.js";
|
|
21
21
|
|
|
22
22
|
// src/core/platform/throttle.ts
|
|
23
23
|
function throttleTrailing(fn, ms, clock = {
|
|
@@ -212,4 +212,4 @@ export {
|
|
|
212
212
|
runInternalReadOnly,
|
|
213
213
|
summarizeCheckpoint
|
|
214
214
|
};
|
|
215
|
-
//# sourceMappingURL=chunk-
|
|
215
|
+
//# sourceMappingURL=chunk-F7IOGLKV.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
shownState
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RH4BGTER.js";
|
|
5
5
|
import {
|
|
6
6
|
recordCheckedOutBranches
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-73MGZAGV.js";
|
|
8
8
|
import {
|
|
9
9
|
defaultRunner
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-253Q6TOC.js";
|
|
11
11
|
import {
|
|
12
12
|
archiveDirFor,
|
|
13
13
|
bestEffort,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
readArchive,
|
|
17
17
|
sessionAliases,
|
|
18
18
|
setSessionBase
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-3PXA5RJ2.js";
|
|
20
20
|
import {
|
|
21
21
|
sessionIdFor
|
|
22
22
|
} from "./chunk-RUYTU2WJ.js";
|
|
@@ -426,4 +426,4 @@ export {
|
|
|
426
426
|
moveOntoMain,
|
|
427
427
|
updateSession
|
|
428
428
|
};
|
|
429
|
-
//# sourceMappingURL=chunk-
|
|
429
|
+
//# sourceMappingURL=chunk-FFL7ETBY.js.map
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
defaultCleanupDeps
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WV5U4S5N.js";
|
|
5
5
|
import {
|
|
6
6
|
agentsBySession
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CL3SSNBC.js";
|
|
8
8
|
import {
|
|
9
9
|
normPath
|
|
10
10
|
} from "./chunk-AKMPF72Y.js";
|
|
11
11
|
import {
|
|
12
12
|
hostForRepo
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-TW44C7CG.js";
|
|
14
14
|
import {
|
|
15
15
|
buildFoldersOf,
|
|
16
16
|
clearBuildFolders
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-5ZU6H62F.js";
|
|
18
18
|
import {
|
|
19
19
|
defaultRunner
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-253Q6TOC.js";
|
|
21
21
|
import {
|
|
22
22
|
loadHistory,
|
|
23
23
|
sessionAliases
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-3PXA5RJ2.js";
|
|
25
25
|
import {
|
|
26
26
|
sessionIdFor
|
|
27
27
|
} from "./chunk-RUYTU2WJ.js";
|
|
28
28
|
import {
|
|
29
29
|
liveAgents
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-KCDHOW22.js";
|
|
31
31
|
import {
|
|
32
32
|
loadConfig
|
|
33
33
|
} from "./chunk-O5ZJY5BT.js";
|
|
@@ -253,4 +253,4 @@ export {
|
|
|
253
253
|
deleteMergedBranches,
|
|
254
254
|
defaultBranchTidyDeps
|
|
255
255
|
};
|
|
256
|
-
//# sourceMappingURL=chunk-
|
|
256
|
+
//# sourceMappingURL=chunk-GAE3NB3G.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
hostOfPrUrl
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TW44C7CG.js";
|
|
5
5
|
import {
|
|
6
6
|
loadHistory,
|
|
7
7
|
parsePrLink
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-3PXA5RJ2.js";
|
|
9
9
|
import {
|
|
10
10
|
json,
|
|
11
11
|
sessionIdFor,
|
|
@@ -164,4 +164,4 @@ export {
|
|
|
164
164
|
blockRefFrom,
|
|
165
165
|
blockedPrState
|
|
166
166
|
};
|
|
167
|
-
//# sourceMappingURL=chunk-
|
|
167
|
+
//# sourceMappingURL=chunk-GV3KXHF3.js.map
|
|
@@ -7,17 +7,17 @@ import {
|
|
|
7
7
|
putLeftoverBack,
|
|
8
8
|
setLeftoverAside,
|
|
9
9
|
takeLeftover
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-KKVWDMSM.js";
|
|
11
11
|
import {
|
|
12
12
|
makeFolder,
|
|
13
13
|
worktreeFolderMessage
|
|
14
14
|
} from "./chunk-LM2T5OR3.js";
|
|
15
15
|
import {
|
|
16
16
|
recordCheckedOutBranches
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-73MGZAGV.js";
|
|
18
18
|
import {
|
|
19
19
|
isBuildOutputPath
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-5ZU6H62F.js";
|
|
21
21
|
import {
|
|
22
22
|
archiveDirFor,
|
|
23
23
|
archiveRoot,
|
|
@@ -36,16 +36,16 @@ import {
|
|
|
36
36
|
upsertSession,
|
|
37
37
|
upsertSessionWithPort,
|
|
38
38
|
writeArchiveRecord
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-3PXA5RJ2.js";
|
|
40
40
|
import {
|
|
41
41
|
sessionIdFor
|
|
42
42
|
} from "./chunk-RUYTU2WJ.js";
|
|
43
43
|
import {
|
|
44
44
|
agentFor
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-KCDHOW22.js";
|
|
46
46
|
import {
|
|
47
47
|
resolveProjectTarget
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-PMEOGFGV.js";
|
|
49
49
|
import {
|
|
50
50
|
fetchRemoteAsync,
|
|
51
51
|
getCurrentBranch,
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
parseWorktreeList,
|
|
58
58
|
remoteBranchExists,
|
|
59
59
|
repoState
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-CSTPOCV2.js";
|
|
61
61
|
import {
|
|
62
62
|
DEFAULT_ACCOUNT
|
|
63
63
|
} from "./chunk-O5ZJY5BT.js";
|
|
@@ -1100,4 +1100,4 @@ export {
|
|
|
1100
1100
|
teardownWorktree,
|
|
1101
1101
|
openBaseCheckout
|
|
1102
1102
|
};
|
|
1103
|
-
//# sourceMappingURL=chunk-
|
|
1103
|
+
//# sourceMappingURL=chunk-HECIDNBU.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
createFsWatcher,
|
|
4
4
|
findSessionById
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-3PXA5RJ2.js";
|
|
6
6
|
|
|
7
7
|
// src/core/sessions/web-state.ts
|
|
8
8
|
function findSession(sessionId) {
|
|
@@ -68,4 +68,4 @@ export {
|
|
|
68
68
|
disposeSessionWatcher,
|
|
69
69
|
disposeAllWatchers
|
|
70
70
|
};
|
|
71
|
-
//# sourceMappingURL=chunk-
|
|
71
|
+
//# sourceMappingURL=chunk-HJ2RKMBI.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
notOnPath,
|
|
4
4
|
whereOnPath
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-3QKH7JNR.js";
|
|
6
6
|
|
|
7
7
|
// src/core/platform/batch-launch.ts
|
|
8
8
|
import fs from "fs";
|
|
@@ -73,4 +73,4 @@ export {
|
|
|
73
73
|
programFor,
|
|
74
74
|
launchFor
|
|
75
75
|
};
|
|
76
|
-
//# sourceMappingURL=chunk-
|
|
76
|
+
//# sourceMappingURL=chunk-HRUKMBF3.js.map
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
buildAiLaunchArgs
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KCDHOW22.js";
|
|
5
5
|
import {
|
|
6
6
|
launchFor
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-HRUKMBF3.js";
|
|
8
8
|
import {
|
|
9
9
|
applyEnvDelta,
|
|
10
10
|
hasEnvDelta
|
|
11
11
|
} from "./chunk-DMGNJ73M.js";
|
|
12
12
|
import {
|
|
13
13
|
detachHere
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-WYQD44Y4.js";
|
|
15
15
|
import {
|
|
16
16
|
spawn_default
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-VQACXAFX.js";
|
|
18
18
|
|
|
19
19
|
// src/core/platform/launch.ts
|
|
20
20
|
function getEditor() {
|
|
@@ -63,4 +63,4 @@ export {
|
|
|
63
63
|
openVSCode,
|
|
64
64
|
launchAi
|
|
65
65
|
};
|
|
66
|
-
//# sourceMappingURL=chunk-
|
|
66
|
+
//# sourceMappingURL=chunk-IYWNDEXA.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
isFolderSession,
|
|
4
4
|
sessionRepos
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-3PXA5RJ2.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-K7Y7YTN3.js.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
accountOf,
|
|
7
7
|
savedPath
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-7HQM5NYN.js";
|
|
9
9
|
import {
|
|
10
10
|
CLAUDE_READ_ONLY_LINES,
|
|
11
11
|
applyEnvDelta,
|
|
@@ -37,10 +37,10 @@ import {
|
|
|
37
37
|
import {
|
|
38
38
|
bootTime,
|
|
39
39
|
processTable
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-WYQD44Y4.js";
|
|
41
41
|
import {
|
|
42
42
|
spawn_default
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-VQACXAFX.js";
|
|
44
44
|
import {
|
|
45
45
|
atomicWriteFile,
|
|
46
46
|
withFileLock
|
|
@@ -276,8 +276,8 @@ var ANSWER_FOR_MS = 2e3;
|
|
|
276
276
|
var answers = /* @__PURE__ */ new Map();
|
|
277
277
|
function backgroundWorkSince(session, sinceMs, now = Date.now()) {
|
|
278
278
|
const key2 = `${session.paths.join("|")}|${sinceMs}`;
|
|
279
|
-
const
|
|
280
|
-
if (
|
|
279
|
+
const kept2 = answers.get(key2);
|
|
280
|
+
if (kept2 && now - kept2.at >= 0 && now - kept2.at < ANSWER_FOR_MS) return kept2.work;
|
|
281
281
|
const work = lookForBackgroundWork(session, sinceMs, Math.max(sinceMs, now - AGENT_QUIET_MS), now - AGENT_QUIET_MS);
|
|
282
282
|
if (answers.size > 200) answers.clear();
|
|
283
283
|
answers.set(key2, { at: now, work });
|
|
@@ -396,8 +396,15 @@ function readTranscriptTail(transcriptPath, bytes = TAIL_BYTES) {
|
|
|
396
396
|
}
|
|
397
397
|
|
|
398
398
|
// src/core/agents/claude/background-commands.ts
|
|
399
|
-
function
|
|
399
|
+
function whatOf2(input) {
|
|
400
|
+
const pick = [input.description, input.command].find((v) => typeof v === "string" && !!v.trim());
|
|
401
|
+
if (!pick) return null;
|
|
402
|
+
const line = pick.trim().split(/\r?\n/)[0].replace(/\s+/g, " ");
|
|
403
|
+
return line.length > 100 ? `${line.slice(0, 99)}\u2026` : line;
|
|
404
|
+
}
|
|
405
|
+
function openBackgroundCommandInfo(lines, sinceMs = 0) {
|
|
400
406
|
const started = /* @__PURE__ */ new Map();
|
|
407
|
+
const whats = /* @__PURE__ */ new Map();
|
|
401
408
|
const ended = /* @__PURE__ */ new Set();
|
|
402
409
|
const endedTasks = /* @__PURE__ */ new Set();
|
|
403
410
|
for (const line of lines) {
|
|
@@ -418,7 +425,10 @@ function openBackgroundCommands(lines, sinceMs = 0) {
|
|
|
418
425
|
const input = block.input ?? {};
|
|
419
426
|
if (block.type === "tool_use" && typeof block.id === "string") {
|
|
420
427
|
const bg = input.run_in_background;
|
|
421
|
-
if ((bg === true || bg === "true") && !(at < sinceMs) && !started.has(block.id))
|
|
428
|
+
if ((bg === true || bg === "true") && !(at < sinceMs) && !started.has(block.id)) {
|
|
429
|
+
started.set(block.id, null);
|
|
430
|
+
whats.set(block.id, whatOf2(input));
|
|
431
|
+
}
|
|
422
432
|
if (block.name === "TaskStop" || block.name === "KillShell" || block.name === "KillBash") {
|
|
423
433
|
for (const k of ["task_id", "shell_id", "bash_id"]) if (typeof input[k] === "string") endedTasks.add(input[k]);
|
|
424
434
|
}
|
|
@@ -431,13 +441,25 @@ function openBackgroundCommands(lines, sinceMs = 0) {
|
|
|
431
441
|
}
|
|
432
442
|
}
|
|
433
443
|
}
|
|
434
|
-
return [...started].filter(([use, task]) => !ended.has(use) && !(task && endedTasks.has(task))).map(([use]) => use);
|
|
444
|
+
return [...started].filter(([use, task]) => !ended.has(use) && !(task && endedTasks.has(task))).map(([use]) => ({ id: use, what: whats.get(use) ?? null }));
|
|
435
445
|
}
|
|
436
446
|
var TAIL_BYTES2 = 4 * 1024 * 1024;
|
|
437
447
|
function backgroundCommandsRunning(session, sinceMs) {
|
|
448
|
+
return openIn(session, sinceMs).length;
|
|
449
|
+
}
|
|
450
|
+
function backgroundCommandNames(session, sinceMs) {
|
|
451
|
+
return openIn(session, sinceMs).map((c) => c.what).filter((w) => !!w).reverse();
|
|
452
|
+
}
|
|
453
|
+
var kept = /* @__PURE__ */ new Map();
|
|
454
|
+
function openIn(session, sinceMs) {
|
|
438
455
|
const newest = listTranscripts(session).sort((a, b) => b.mtimeMs - a.mtimeMs)[0];
|
|
439
|
-
if (!newest || newest.mtimeMs < sinceMs) return
|
|
440
|
-
|
|
456
|
+
if (!newest || newest.mtimeMs < sinceMs) return [];
|
|
457
|
+
const had = kept.get(newest.file);
|
|
458
|
+
if (had && had.size === newest.size && had.mtimeMs === newest.mtimeMs && had.sinceMs === sinceMs) return had.open;
|
|
459
|
+
const open = openBackgroundCommandInfo(readTranscriptTail(newest.file, TAIL_BYTES2), sinceMs);
|
|
460
|
+
if (kept.size > 200) kept.clear();
|
|
461
|
+
kept.set(newest.file, { size: newest.size, mtimeMs: newest.mtimeMs, sinceMs, open });
|
|
462
|
+
return open;
|
|
441
463
|
}
|
|
442
464
|
|
|
443
465
|
// src/core/agents/claude/pr-links.ts
|
|
@@ -683,7 +705,8 @@ function parseLiveClaude(raw) {
|
|
|
683
705
|
conversationId: sessionId,
|
|
684
706
|
cwd,
|
|
685
707
|
busy: status === "busy",
|
|
686
|
-
|
|
708
|
+
// `shell`: its prompt is free while a background command it started (a build, tests, a dev server) still runs.
|
|
709
|
+
state: status === "busy" || status === "idle" || status === "waiting" || status === "shell" ? status : null,
|
|
687
710
|
stateAt: typeof statusUpdatedAt === "number" ? statusUpdatedAt : null,
|
|
688
711
|
waitingFor: typeof waitingFor === "string" && waitingFor ? waitingFor : null,
|
|
689
712
|
startedAt: typeof startedAt === "number" ? startedAt : null
|
|
@@ -829,7 +852,7 @@ function installClaudeSkillsFor(dir, run = runClaude) {
|
|
|
829
852
|
|
|
830
853
|
// src/core/agents/claude/usage.ts
|
|
831
854
|
var installer2;
|
|
832
|
-
var loadInstaller2 = async () => installer2 ??= await import("./statusline-
|
|
855
|
+
var loadInstaller2 = async () => installer2 ??= await import("./statusline-3H3HAPCZ.js");
|
|
833
856
|
function restoreMessage(o, saved = "~/.work/statusline.json") {
|
|
834
857
|
switch (o) {
|
|
835
858
|
case "restored":
|
|
@@ -1043,10 +1066,10 @@ function mergeInto(src, dst, tag, steps, moved) {
|
|
|
1043
1066
|
return;
|
|
1044
1067
|
}
|
|
1045
1068
|
if (mtime(dst) >= mtime(src)) {
|
|
1046
|
-
const
|
|
1047
|
-
moveEntry(src,
|
|
1048
|
-
steps.push({ from: src, to:
|
|
1049
|
-
moved.push(
|
|
1069
|
+
const kept2 = suffixed(dst, tag);
|
|
1070
|
+
moveEntry(src, kept2);
|
|
1071
|
+
steps.push({ from: src, to: kept2 });
|
|
1072
|
+
moved.push(kept2);
|
|
1050
1073
|
} else {
|
|
1051
1074
|
const older = suffixed(dst, `${tag}-older`);
|
|
1052
1075
|
moveEntry(dst, older);
|
|
@@ -1176,6 +1199,7 @@ var claudeAgent = {
|
|
|
1176
1199
|
lastWriteMs: (cwd) => getClaudeActivityMs(cwd),
|
|
1177
1200
|
backgroundWorkSince,
|
|
1178
1201
|
backgroundCommands: backgroundCommandsRunning,
|
|
1202
|
+
backgroundCommandNames,
|
|
1179
1203
|
prLinks: claudePrLinks,
|
|
1180
1204
|
// In the session's own account's projects folder: that is where its `--continue` looks.
|
|
1181
1205
|
restoreDir: (s) => {
|
|
@@ -1205,7 +1229,7 @@ var claudeAgent = {
|
|
|
1205
1229
|
promptLines: CLAUDE_READ_ONLY_LINES,
|
|
1206
1230
|
// Its flags were measured on one Claude Code (READ_ONLY_MIN_VERSION): an older one gets no checkout run.
|
|
1207
1231
|
// Loaded when a review asks: the hook processes load this adapter on every turn edge.
|
|
1208
|
-
available: async () => (await import("./version-
|
|
1232
|
+
available: async () => (await import("./version-WPF664CL.js")).claudeReadOnlyAvailable()
|
|
1209
1233
|
}
|
|
1210
1234
|
},
|
|
1211
1235
|
instructionsFile: "CLAUDE.md",
|
|
@@ -1327,4 +1351,4 @@ export {
|
|
|
1327
1351
|
agentToRecord,
|
|
1328
1352
|
agentFor
|
|
1329
1353
|
};
|
|
1330
|
-
//# sourceMappingURL=chunk-
|
|
1354
|
+
//# sourceMappingURL=chunk-KCDHOW22.js.map
|