@moberg_hr/work-tree 2.11.3 → 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-2JVKRIAM.js → account-JOKEFQ46.js} +19 -18
- package/dist/{account-2JVKRIAM.js.map → account-JOKEFQ46.js.map} +1 -1
- package/dist/{add-repo-7Y2GWYJX.js → add-repo-JKVHNRWU.js} +20 -19
- package/dist/{add-repo-7Y2GWYJX.js.map → add-repo-JKVHNRWU.js.map} +1 -1
- package/dist/{answer-QYFUON2W.js → answer-PDCLL5Z2.js} +11 -10
- package/dist/{answer-QYFUON2W.js.map → answer-PDCLL5Z2.js.map} +1 -1
- package/dist/{attach-42GWPK2B.js → attach-BIFQP5OY.js} +15 -14
- package/dist/{attach-42GWPK2B.js.map → attach-BIFQP5OY.js.map} +1 -1
- package/dist/bin.js +3 -3
- package/dist/{block-H23F7WOT.js → block-EI3OQVDM.js} +16 -15
- package/dist/{block-H23F7WOT.js.map → block-EI3OQVDM.js.map} +1 -1
- package/dist/{broadcast-SVEHWJEJ.js → broadcast-ZSA3L5FY.js} +7 -6
- package/dist/{broadcast-SVEHWJEJ.js.map → broadcast-ZSA3L5FY.js.map} +1 -1
- package/dist/{catchup-IPIOOOFW.js → catchup-SNMGWNRX.js} +14 -13
- package/dist/{catchup-IPIOOOFW.js.map → catchup-SNMGWNRX.js.map} +1 -1
- package/dist/{chunk-KSVYR4G2.js → chunk-253Q6TOC.js} +3 -3
- package/dist/{chunk-PVTTWADL.js → chunk-2R6EHVZG.js} +3 -3
- package/dist/{chunk-T5SHUOWM.js → chunk-2VYWTBC6.js} +3 -3
- package/dist/{chunk-MESE7KI5.js → chunk-2YKV6MNQ.js} +3 -3
- package/dist/{chunk-EWTW53YY.js → chunk-3LDQPUJ6.js} +6 -6
- package/dist/{chunk-NXUBAXXP.js → chunk-3PXA5RJ2.js} +24 -5
- package/dist/chunk-3PXA5RJ2.js.map +1 -0
- package/dist/{chunk-7YEACWWO.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-RY6ZLC76.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-VKJ7XFH2.js → chunk-6MMXVHPL.js} +7 -7
- package/dist/{chunk-V3AS6S7C.js → chunk-73MGZAGV.js} +2 -2
- package/dist/{chunk-PPZP7CA7.js → chunk-7HQM5NYN.js} +3 -3
- package/dist/{chunk-SK7MB54C.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-KMAA4PTG.js → chunk-BENY64FW.js} +3 -3
- package/dist/{chunk-MQCDFSVF.js → chunk-BLOV7ECI.js} +2 -2
- package/dist/{chunk-AZPE2HLY.js → chunk-BTR2E5WD.js} +13 -13
- package/dist/{chunk-IV7YIC55.js → chunk-CJ2QTQHG.js} +2 -2
- package/dist/{chunk-FFTMMZM7.js → chunk-CL3SSNBC.js} +2 -2
- 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-WH2CGK2A.js → chunk-DMA3XCMF.js} +6 -6
- package/dist/{chunk-C72H5FHW.js → chunk-E6WVQXF4.js} +3 -3
- package/dist/{chunk-GKZHWV2R.js → chunk-F7IOGLKV.js} +6 -6
- package/dist/{chunk-E4O7OZ5G.js → chunk-FFL7ETBY.js} +5 -5
- package/dist/{chunk-KEOIM36N.js → chunk-GAE3NB3G.js} +8 -8
- package/dist/{chunk-HIVX3POL.js → chunk-GV3KXHF3.js} +3 -3
- package/dist/{chunk-3MXZNRVH.js → chunk-HECIDNBU.js} +8 -8
- package/dist/{chunk-XEEF2V22.js → chunk-HJ2RKMBI.js} +2 -2
- package/dist/{chunk-DAKJTB6N.js → chunk-HRUKMBF3.js} +2 -2
- package/dist/{chunk-FVENEUOL.js → chunk-IYWNDEXA.js} +5 -5
- package/dist/{chunk-JAC6X4XN.js → chunk-K7Y7YTN3.js} +2 -2
- package/dist/{chunk-E3VBI6BJ.js → chunk-KCDHOW22.js} +6 -6
- package/dist/{chunk-AHYCZUPI.js → chunk-KKVWDMSM.js} +2 -2
- package/dist/{chunk-3ZV77FBH.js → chunk-KP2CI5QU.js} +4 -4
- package/dist/{chunk-4XLB3ARR.js → chunk-LPHYUNMD.js} +5 -5
- package/dist/{chunk-43EUE5L5.js → chunk-M7FX37Z2.js} +5 -5
- package/dist/{chunk-ILACZ77E.js → chunk-MBSCZQ2C.js} +2 -2
- package/dist/{chunk-P5YSGQBS.js → chunk-MGNJPBZU.js} +5 -5
- package/dist/{chunk-Q5DGDBZL.js → chunk-N75AJ3ZR.js} +3 -3
- package/dist/{chunk-OTDYHKRZ.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-BAYVM33J.js → chunk-QRYZAY7R.js} +6 -6
- package/dist/{chunk-PEGZW3TZ.js → chunk-RH4BGTER.js} +3 -3
- package/dist/{chunk-4ZNSMFXT.js → chunk-RIEBQWQC.js} +2 -2
- package/dist/{chunk-S5YGRCGU.js → chunk-RUUEZSQY.js} +6 -6
- package/dist/{chunk-J6T75IWG.js → chunk-RXZKYHSW.js} +4 -4
- package/dist/{chunk-NSG3W5ZE.js → chunk-SC2FQ6BR.js} +5 -5
- package/dist/{chunk-GT4JUJ76.js → chunk-SMXRY653.js} +6 -6
- package/dist/{chunk-ZBNRIPLQ.js → chunk-SQ4ZGEZY.js} +6 -3
- package/dist/chunk-SQ4ZGEZY.js.map +1 -0
- package/dist/{chunk-IWK733M6.js → chunk-TW44C7CG.js} +5 -5
- package/dist/{chunk-UJJDDB6D.js → chunk-U3RRXU6W.js} +7 -7
- package/dist/{chunk-7HFSM4SJ.js → chunk-VADGWMXL.js} +5 -5
- package/dist/chunk-VQACXAFX.js +69 -0
- package/dist/chunk-VQACXAFX.js.map +1 -0
- package/dist/{chunk-WN623NAR.js → chunk-WQN7HJK6.js} +9 -8
- package/dist/chunk-WQN7HJK6.js.map +1 -0
- package/dist/{chunk-6GBM4B5N.js → chunk-WV5U4S5N.js} +7 -7
- package/dist/{chunk-63ZLPXRL.js → chunk-WYQD44Y4.js} +2 -2
- package/dist/{chunk-KXNYMDIJ.js → chunk-XZKQHQBB.js} +4 -4
- package/dist/{chunk-DHNW25TR.js → chunk-ZJBVZ4OJ.js} +4 -4
- package/dist/{chunk-W6SKLTNO.js → chunk-ZX2VBM2F.js} +4 -4
- package/dist/{cleanup-BOCBMMWE.js → cleanup-5CPX253G.js} +36 -35
- package/dist/{cleanup-BOCBMMWE.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-77SIIJCR.js → config-EQFAXBMQ.js} +13 -12
- package/dist/{config-77SIIJCR.js.map → config-EQFAXBMQ.js.map} +1 -1
- package/dist/{diff-5ASU7NDE.js → diff-MLCUMIYC.js} +13 -12
- package/dist/{diff-5ASU7NDE.js.map → diff-MLCUMIYC.js.map} +1 -1
- package/dist/{digest-4AYCHWBQ.js → digest-KSAGLQND.js} +10 -9
- package/dist/{digest-4AYCHWBQ.js.map → digest-KSAGLQND.js.map} +1 -1
- package/dist/{fork-Q2FO4545.js → fork-RCTVMUYI.js} +32 -31
- package/dist/{fork-Q2FO4545.js.map → fork-RCTVMUYI.js.map} +1 -1
- package/dist/{history-XWBADBLU.js → history-N4ZURR4F.js} +9 -6
- package/dist/{hook-FX44WIXE.js → hook-DRZVYLJB.js} +13 -12
- package/dist/{hook-FX44WIXE.js.map → hook-DRZVYLJB.js.map} +1 -1
- package/dist/{hydrate-OO3AOQGU.js → hydrate-NVJZZAFT.js} +8 -7
- package/dist/{hydrate-OO3AOQGU.js.map → hydrate-NVJZZAFT.js.map} +1 -1
- package/dist/{init-DVP2F374.js → init-RF6YC4BQ.js} +18 -17
- package/dist/{init-DVP2F374.js.map → init-RF6YC4BQ.js.map} +1 -1
- package/dist/{install-skills-AKKAAIAK.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-2Y6FB37X.js → list-PIJ4ROHR.js} +9 -8
- package/dist/{list-2Y6FB37X.js.map → list-PIJ4ROHR.js.map} +1 -1
- package/dist/{move-2ICBEGSP.js → move-XAZG3MJT.js} +22 -21
- package/dist/{move-2ICBEGSP.js.map → move-XAZG3MJT.js.map} +1 -1
- package/dist/{note-ADRHPCW3.js → note-JJXIQ4QK.js} +10 -9
- package/dist/{note-ADRHPCW3.js.map → note-JJXIQ4QK.js.map} +1 -1
- package/dist/{overlaps-K4FAJZAY.js → overlaps-3YN4UQWC.js} +17 -16
- package/dist/{overlaps-K4FAJZAY.js.map → overlaps-3YN4UQWC.js.map} +1 -1
- package/dist/{pin-FECMJAW3.js → pin-OOCB6DFR.js} +10 -9
- package/dist/{pin-FECMJAW3.js.map → pin-OOCB6DFR.js.map} +1 -1
- package/dist/{pr-PAOI4S4B.js → pr-LCG4W65A.js} +24 -23
- package/dist/{pr-PAOI4S4B.js.map → pr-LCG4W65A.js.map} +1 -1
- package/dist/{prune-6CGA3L5M.js → prune-2NGAUOPI.js} +34 -33
- package/dist/{prune-6CGA3L5M.js.map → prune-2NGAUOPI.js.map} +1 -1
- package/dist/{pty-host-6OG45QCE.js → pty-host-XRXRI6UL.js} +13 -12
- package/dist/{pty-host-6OG45QCE.js.map → pty-host-XRXRI6UL.js.map} +1 -1
- package/dist/{read-GOC77JDO.js → read-FJDDCX4D.js} +10 -9
- package/dist/{read-GOC77JDO.js.map → read-FJDDCX4D.js.map} +1 -1
- package/dist/{recent-YPW7VBOP.js → recent-AAXLCQUF.js} +14 -13
- package/dist/{recent-YPW7VBOP.js.map → recent-AAXLCQUF.js.map} +1 -1
- package/dist/{remove-24MVWSEL.js → remove-VO5V45IJ.js} +33 -32
- package/dist/{remove-24MVWSEL.js.map → remove-VO5V45IJ.js.map} +1 -1
- package/dist/{restart-AG3WNQG5.js → restart-AP763LE2.js} +11 -10
- package/dist/{restart-AG3WNQG5.js.map → restart-AP763LE2.js.map} +1 -1
- package/dist/{resume-H5JKES3P.js → resume-SPO5XNDT.js} +14 -13
- package/dist/{resume-H5JKES3P.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-IIYIZNQV.js → run-JZWZHJOE.js} +7 -6
- package/dist/{run-IIYIZNQV.js.map → run-JZWZHJOE.js.map} +1 -1
- package/dist/{screen-5DDNVXPL.js → screen-JRMMYVHB.js} +11 -10
- package/dist/{screen-5DDNVXPL.js.map → screen-JRMMYVHB.js.map} +1 -1
- package/dist/{search-JYRJVY4T.js → search-XOWMVFP2.js} +7 -6
- package/dist/{search-JYRJVY4T.js.map → search-XOWMVFP2.js.map} +1 -1
- package/dist/{section-KQBSB6LP.js → section-7WO7IHG6.js} +10 -9
- package/dist/{section-KQBSB6LP.js.map → section-7WO7IHG6.js.map} +1 -1
- package/dist/{send-DHHXAA23.js → send-OCSMOCUE.js} +16 -15
- package/dist/{send-DHHXAA23.js.map → send-OCSMOCUE.js.map} +1 -1
- package/dist/{sessions-HMXB33GI.js → sessions-UAZALGGH.js} +28 -27
- package/dist/{sessions-HMXB33GI.js.map → sessions-UAZALGGH.js.map} +1 -1
- package/dist/{snooze-VGROZWYG.js → snooze-UDJ5UDCS.js} +10 -9
- package/dist/{snooze-VGROZWYG.js.map → snooze-UDJ5UDCS.js.map} +1 -1
- package/dist/{start-QKIVUFKV.js → start-OEG3T2SW.js} +11 -10
- package/dist/{start-QKIVUFKV.js.map → start-OEG3T2SW.js.map} +1 -1
- package/dist/{status-YD74D27O.js → status-R4T2EHG5.js} +14 -13
- package/dist/{status-YD74D27O.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-R2LFFUXE.js → stop-D3LRCCJS.js} +11 -10
- package/dist/{stop-R2LFFUXE.js.map → stop-D3LRCCJS.js.map} +1 -1
- package/dist/{sync-FX5C3PVX.js → sync-FWC2EWLW.js} +34 -33
- package/dist/{sync-FX5C3PVX.js.map → sync-FWC2EWLW.js.map} +1 -1
- package/dist/{time-TX7MBFXX.js → time-AMAMIDWD.js} +11 -10
- package/dist/{time-TX7MBFXX.js.map → time-AMAMIDWD.js.map} +1 -1
- package/dist/{timesheet-QBLPQSVX.js → timesheet-QFBA2Z2A.js} +18 -17
- package/dist/{timesheet-QBLPQSVX.js.map → timesheet-QFBA2Z2A.js.map} +1 -1
- package/dist/{tree-2PSHOP5B.js → tree-PJM2R2VA.js} +35 -34
- package/dist/{tree-2PSHOP5B.js.map → tree-PJM2R2VA.js.map} +1 -1
- package/dist/{update-4T7FDYHF.js → update-RVZMM54Z.js} +20 -19
- package/dist/{update-4T7FDYHF.js.map → update-RVZMM54Z.js.map} +1 -1
- package/dist/{usage-QL4CDVAM.js → usage-W4UXQUPD.js} +9 -8
- package/dist/{usage-QL4CDVAM.js.map → usage-W4UXQUPD.js.map} +1 -1
- package/dist/{version-SW4YGEIY.js → version-WPF664CL.js} +8 -6
- package/dist/{version-SW4YGEIY.js.map → version-WPF664CL.js.map} +1 -1
- package/dist/{wait-TDQ4R2P3.js → wait-C3S7Q6FA.js} +11 -10
- package/dist/{wait-TDQ4R2P3.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-DyDsqsKc.js → PtyView-Bq8MHIjd.js} +2 -2
- package/dist/web/assets/{PtyView-DyDsqsKc.js.map → PtyView-Bq8MHIjd.js.map} +1 -1
- package/dist/web/assets/index-DkVQmwkZ.js +126 -0
- package/dist/web/assets/index-DkVQmwkZ.js.map +1 -0
- package/dist/web/assets/index-vHIk7hQs.css +1 -0
- package/dist/web/index.html +2 -2
- package/dist/{web-7FRKYLDS.js → web-MPSYOYQ2.js} +112 -83
- package/dist/web-MPSYOYQ2.js.map +1 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/dist/chunk-EL3XL2OC.js.map +0 -1
- package/dist/chunk-NXUBAXXP.js.map +0 -1
- package/dist/chunk-OTDYHKRZ.js.map +0 -1
- package/dist/chunk-P6XBAGSF.js +0 -9
- package/dist/chunk-WN623NAR.js.map +0 -1
- package/dist/chunk-ZBNRIPLQ.js.map +0 -1
- package/dist/cli-X3A7KF2M.js +0 -19
- package/dist/web/assets/index-BjNPYCVy.js +0 -126
- package/dist/web/assets/index-BjNPYCVy.js.map +0 -1
- package/dist/web/assets/index-CpqiTeqj.css +0 -1
- package/dist/web-7FRKYLDS.js.map +0 -1
- /package/dist/{chunk-KSVYR4G2.js.map → chunk-253Q6TOC.js.map} +0 -0
- /package/dist/{chunk-PVTTWADL.js.map → chunk-2R6EHVZG.js.map} +0 -0
- /package/dist/{chunk-T5SHUOWM.js.map → chunk-2VYWTBC6.js.map} +0 -0
- /package/dist/{chunk-MESE7KI5.js.map → chunk-2YKV6MNQ.js.map} +0 -0
- /package/dist/{chunk-EWTW53YY.js.map → chunk-3LDQPUJ6.js.map} +0 -0
- /package/dist/{chunk-7YEACWWO.js.map → chunk-3QEDOZMA.js.map} +0 -0
- /package/dist/{chunk-MSJWQC7H.js.map → chunk-3UI35AFZ.js.map} +0 -0
- /package/dist/{chunk-RY6ZLC76.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-VKJ7XFH2.js.map → chunk-6MMXVHPL.js.map} +0 -0
- /package/dist/{chunk-V3AS6S7C.js.map → chunk-73MGZAGV.js.map} +0 -0
- /package/dist/{chunk-PPZP7CA7.js.map → chunk-7HQM5NYN.js.map} +0 -0
- /package/dist/{chunk-SK7MB54C.js.map → chunk-7OZZUQDW.js.map} +0 -0
- /package/dist/{chunk-O36SFV5G.js.map → chunk-AU7XGTJZ.js.map} +0 -0
- /package/dist/{chunk-P6XBAGSF.js.map → chunk-AWY2HWAQ.js.map} +0 -0
- /package/dist/{chunk-KMAA4PTG.js.map → chunk-BENY64FW.js.map} +0 -0
- /package/dist/{chunk-MQCDFSVF.js.map → chunk-BLOV7ECI.js.map} +0 -0
- /package/dist/{chunk-AZPE2HLY.js.map → chunk-BTR2E5WD.js.map} +0 -0
- /package/dist/{chunk-IV7YIC55.js.map → chunk-CJ2QTQHG.js.map} +0 -0
- /package/dist/{chunk-FFTMMZM7.js.map → chunk-CL3SSNBC.js.map} +0 -0
- /package/dist/{chunk-WH2CGK2A.js.map → chunk-DMA3XCMF.js.map} +0 -0
- /package/dist/{chunk-C72H5FHW.js.map → chunk-E6WVQXF4.js.map} +0 -0
- /package/dist/{chunk-GKZHWV2R.js.map → chunk-F7IOGLKV.js.map} +0 -0
- /package/dist/{chunk-E4O7OZ5G.js.map → chunk-FFL7ETBY.js.map} +0 -0
- /package/dist/{chunk-KEOIM36N.js.map → chunk-GAE3NB3G.js.map} +0 -0
- /package/dist/{chunk-HIVX3POL.js.map → chunk-GV3KXHF3.js.map} +0 -0
- /package/dist/{chunk-3MXZNRVH.js.map → chunk-HECIDNBU.js.map} +0 -0
- /package/dist/{chunk-XEEF2V22.js.map → chunk-HJ2RKMBI.js.map} +0 -0
- /package/dist/{chunk-DAKJTB6N.js.map → chunk-HRUKMBF3.js.map} +0 -0
- /package/dist/{chunk-FVENEUOL.js.map → chunk-IYWNDEXA.js.map} +0 -0
- /package/dist/{chunk-JAC6X4XN.js.map → chunk-K7Y7YTN3.js.map} +0 -0
- /package/dist/{chunk-E3VBI6BJ.js.map → chunk-KCDHOW22.js.map} +0 -0
- /package/dist/{chunk-AHYCZUPI.js.map → chunk-KKVWDMSM.js.map} +0 -0
- /package/dist/{chunk-3ZV77FBH.js.map → chunk-KP2CI5QU.js.map} +0 -0
- /package/dist/{chunk-4XLB3ARR.js.map → chunk-LPHYUNMD.js.map} +0 -0
- /package/dist/{chunk-43EUE5L5.js.map → chunk-M7FX37Z2.js.map} +0 -0
- /package/dist/{chunk-ILACZ77E.js.map → chunk-MBSCZQ2C.js.map} +0 -0
- /package/dist/{chunk-P5YSGQBS.js.map → chunk-MGNJPBZU.js.map} +0 -0
- /package/dist/{chunk-Q5DGDBZL.js.map → chunk-N75AJ3ZR.js.map} +0 -0
- /package/dist/{chunk-4K4S53KX.js.map → chunk-PMEOGFGV.js.map} +0 -0
- /package/dist/{chunk-BAYVM33J.js.map → chunk-QRYZAY7R.js.map} +0 -0
- /package/dist/{chunk-PEGZW3TZ.js.map → chunk-RH4BGTER.js.map} +0 -0
- /package/dist/{chunk-4ZNSMFXT.js.map → chunk-RIEBQWQC.js.map} +0 -0
- /package/dist/{chunk-S5YGRCGU.js.map → chunk-RUUEZSQY.js.map} +0 -0
- /package/dist/{chunk-J6T75IWG.js.map → chunk-RXZKYHSW.js.map} +0 -0
- /package/dist/{chunk-NSG3W5ZE.js.map → chunk-SC2FQ6BR.js.map} +0 -0
- /package/dist/{chunk-GT4JUJ76.js.map → chunk-SMXRY653.js.map} +0 -0
- /package/dist/{chunk-IWK733M6.js.map → chunk-TW44C7CG.js.map} +0 -0
- /package/dist/{chunk-UJJDDB6D.js.map → chunk-U3RRXU6W.js.map} +0 -0
- /package/dist/{chunk-7HFSM4SJ.js.map → chunk-VADGWMXL.js.map} +0 -0
- /package/dist/{chunk-6GBM4B5N.js.map → chunk-WV5U4S5N.js.map} +0 -0
- /package/dist/{chunk-63ZLPXRL.js.map → chunk-WYQD44Y4.js.map} +0 -0
- /package/dist/{chunk-KXNYMDIJ.js.map → chunk-XZKQHQBB.js.map} +0 -0
- /package/dist/{chunk-DHNW25TR.js.map → chunk-ZJBVZ4OJ.js.map} +0 -0
- /package/dist/{chunk-W6SKLTNO.js.map → chunk-ZX2VBM2F.js.map} +0 -0
- /package/dist/{cli-X3A7KF2M.js.map → cli-D2RPZWWM.js.map} +0 -0
- /package/dist/{history-XWBADBLU.js.map → history-N4ZURR4F.js.map} +0 -0
- /package/dist/{install-skills-AKKAAIAK.js.map → install-skills-DV7JBW56.js.map} +0 -0
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
} from "./chunk-6AQRYLOB.js";
|
|
5
5
|
import {
|
|
6
6
|
findSessionForCwd
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-LPHYUNMD.js";
|
|
8
8
|
import {
|
|
9
9
|
findSession,
|
|
10
10
|
loadHistory
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-3PXA5RJ2.js";
|
|
12
12
|
import {
|
|
13
13
|
loadConfig
|
|
14
14
|
} from "./chunk-O5ZJY5BT.js";
|
|
@@ -38,4 +38,4 @@ export {
|
|
|
38
38
|
sessionPositionals,
|
|
39
39
|
sessionFromArgs
|
|
40
40
|
};
|
|
41
|
-
//# sourceMappingURL=chunk-
|
|
41
|
+
//# sourceMappingURL=chunk-3QEDOZMA.js.map
|
|
@@ -35,19 +35,6 @@ function findOnPath(cmd, env = process.env, platform = process.platform) {
|
|
|
35
35
|
return null;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
// src/core/platform/shell-env.ts
|
|
39
|
-
var NO_CWD_LOOKUP = "NoDefaultCurrentDirectoryInExePath";
|
|
40
|
-
function shellEnv(env = process.env, platform = process.platform) {
|
|
41
|
-
if (platform !== "win32") return env;
|
|
42
|
-
const out = {};
|
|
43
|
-
for (const [k, v] of Object.entries(env)) if (k.toLowerCase() !== NO_CWD_LOOKUP.toLowerCase()) out[k] = v;
|
|
44
|
-
out[NO_CWD_LOOKUP] = "1";
|
|
45
|
-
return out;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// src/core/platform/spawn.ts
|
|
49
|
-
import { createRequire } from "module";
|
|
50
|
-
|
|
51
38
|
// src/core/platform/program-path.ts
|
|
52
39
|
import path2 from "path";
|
|
53
40
|
var hits = /* @__PURE__ */ new Map();
|
|
@@ -91,60 +78,11 @@ function programPath(cmd, env = process.env, platform = process.platform, cwd) {
|
|
|
91
78
|
return whereOnPath(cmd, env, platform, cwd) ?? notOnPath(cmd, env);
|
|
92
79
|
}
|
|
93
80
|
|
|
94
|
-
// src/core/platform/spawn.ts
|
|
95
|
-
var loaded = null;
|
|
96
|
-
var load = () => loaded ??= createRequire(import.meta.url)("cross-spawn");
|
|
97
|
-
var BATCH_FILE = /\.(cmd|bat)$/i;
|
|
98
|
-
function onPathOnly(args, platform = process.platform) {
|
|
99
|
-
const [cmd, second, third] = args;
|
|
100
|
-
const at = Array.isArray(second) ? 2 : 1;
|
|
101
|
-
const given = at === 2 ? third : second;
|
|
102
|
-
if (given && "keepCwdLookup" in given) {
|
|
103
|
-
const { keepCwdLookup, ...rest } = given;
|
|
104
|
-
args = [...args];
|
|
105
|
-
args[at] = rest;
|
|
106
|
-
if (keepCwdLookup === true) {
|
|
107
|
-
if (platform !== "win32" || typeof cmd !== "string") return args;
|
|
108
|
-
const cwd2 = typeof rest.cwd === "string" ? rest.cwd : void 0;
|
|
109
|
-
return [programPath(cmd, rest.env ?? process.env, platform, cwd2), ...args.slice(1)];
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
if (platform !== "win32" || typeof cmd !== "string") return args;
|
|
113
|
-
const options = at === 2 ? args[2] : args[1];
|
|
114
|
-
if (options?.shell) {
|
|
115
|
-
const out2 = [...args];
|
|
116
|
-
out2[at] = { ...options, env: shellEnv(options.env ?? process.env, platform) };
|
|
117
|
-
return out2;
|
|
118
|
-
}
|
|
119
|
-
const cwd = typeof options?.cwd === "string" ? options.cwd : void 0;
|
|
120
|
-
const file = programPath(cmd, options?.env ?? process.env, platform, cwd);
|
|
121
|
-
const out = [file, ...args.slice(1)];
|
|
122
|
-
if (BATCH_FILE.test(file)) out[at] = { ...options ?? {}, env: shellEnv(options?.env ?? process.env, platform) };
|
|
123
|
-
return out;
|
|
124
|
-
}
|
|
125
|
-
var spawn = Object.assign(
|
|
126
|
-
(...args) => {
|
|
127
|
-
const child = load()(...onPathOnly(args));
|
|
128
|
-
child.prependListener?.("error", (err) => explainNotOnPath(err));
|
|
129
|
-
return child;
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
sync: (...args) => {
|
|
133
|
-
const r = load().sync(...onPathOnly(args));
|
|
134
|
-
if (r?.error) explainNotOnPath(r.error);
|
|
135
|
-
return r;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
);
|
|
139
|
-
var spawn_default = spawn;
|
|
140
|
-
|
|
141
81
|
export {
|
|
142
82
|
findOnPath,
|
|
143
83
|
whereOnPath,
|
|
144
84
|
notOnPath,
|
|
145
85
|
explainNotOnPath,
|
|
146
|
-
programPath
|
|
147
|
-
shellEnv,
|
|
148
|
-
spawn_default
|
|
86
|
+
programPath
|
|
149
87
|
};
|
|
150
|
-
//# sourceMappingURL=chunk-
|
|
88
|
+
//# sourceMappingURL=chunk-3QKH7JNR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/platform/find-on-path.ts","../src/core/platform/program-path.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\n\n/**\n * Whether `p` is a program file. Elsewhere than Windows: a file with an executable bit. On Windows: a file — or\n * an App Execution Alias, which `stat` can't read: the stubs in `%LOCALAPPDATA%\\Microsoft\\WindowsApps` (`wt.exe`,\n * `winget.exe`, the Store's `python.exe` and `pwsh.exe`) are reparse points that `stat` answers EACCES for, while\n * `lstat` sees them (as a link). Windows starts them; counting them missing made Windows Terminal look not\n * installed. So on Windows a hit whose `stat` fails but whose `lstat` is there and not a folder counts.\n */\nexport function isProgramFile(p: string, platform: NodeJS.Platform = process.platform): boolean {\n const win = platform === 'win32';\n try {\n const st = fs.statSync(p);\n return st.isFile() && (win || (st.mode & 0o111) !== 0);\n } catch {\n if (!win) return false;\n try {\n return !fs.lstatSync(p).isDirectory();\n } catch {\n return false;\n }\n }\n}\n\n/** PATHEXT's extensions, lower-cased (Windows' default when unset). */\nexport function pathExtOf(env: NodeJS.ProcessEnv): string[] {\n return (env.PATHEXT ?? env.Pathext ?? '.COM;.EXE;.BAT;.CMD')\n .split(';')\n .filter(Boolean)\n .map((e) => e.toLowerCase());\n}\n\n/**\n * The file a command name runs, as a shell finds it: a path is itself, else the\n * first match in PATH. On Windows a name without one of PATHEXT's extensions is\n * tried with each (`claude` is `claude.exe` or `claude.cmd`; npm's extension-less\n * `claude` sh shim beside them is never run) — a path too (`C:\\npm\\claude` starts\n * `C:\\npm\\claude.cmd`, as Windows and cross-spawn would); elsewhere only an\n * executable file counts. Null when there's none.\n */\nexport function findOnPath(cmd: string, env: NodeJS.ProcessEnv = process.env, platform: NodeJS.Platform = process.platform): string | null {\n const win = platform === 'win32';\n const isFile = (p: string) => isProgramFile(p, platform);\n const pathExt = pathExtOf(env);\n const hasExt = pathExt.includes(path.extname(cmd).toLowerCase());\n const candidates = (base: string) => (!win || hasExt ? [base] : pathExt.map((e) => base + e));\n if (cmd.includes('/') || (win && cmd.includes('\\\\'))) return candidates(cmd).find(isFile) ?? null;\n const dirs = (env.PATH ?? env.Path ?? '').split(win ? ';' : path.delimiter).filter(Boolean);\n for (const dir of dirs) {\n const hit = candidates(path.join(dir, cmd)).find(isFile);\n if (hit) return hit;\n }\n return null;\n}\n","import path from 'node:path';\nimport { findOnPath, isProgramFile } from './find-on-path.js';\n\n/**\n * The program a bare command name starts, from PATH only — never the working folder.\n *\n * On Windows every way of starting a program by its bare name looks in the working folder first:\n * cross-spawn's lookup (node-which \"always checks the cwd first\", after a `chdir` into the spawn's\n * cwd), libuv's own (`execFile('git', …, {cwd})`) and cmd.exe's. work runs git, gh, az and acli with\n * the cwd in a worktree — someone else's branch too (Review, Work on it) — so a `git.cmd`, `gh.cmd` or\n * `git.exe` committed at its root ran in place of the real tool (measured with an echo-only file).\n * So on Windows a bare name is resolved here to the absolute file on PATH (absolute PATH entries\n * only: a relative one is the working folder again) and that path is what's started. App Execution\n * Aliases (`wt.exe`, `winget`, the Store's `python`) count: `stat` can't read them, Windows starts\n * them (`isProgramFile`). Not found: a path that doesn't exist, so the start fails as \"not installed\"\n * (ENOENT, said as \"<name> not found on PATH\": `explainNotOnPath`) and nothing from the working folder\n * runs. A name with a path in it (`./x`, `C:\\npm\\claude`) is resolved as Windows itself would — against\n * the start's working folder, with PATHEXT's extensions when it has none (`C:\\npm\\claude` is\n * `claude.cmd` beside it) — so what is judged (a batch file or not) is the file that really starts.\n * Off Windows everything is left as given (a POSIX lookup never takes the working folder unless PATH\n * says so).\n */\n\n/** Hits per name + PATH + PATHEXT, checked to still be there on use; a miss is never kept (a tool installed later is found). */\nconst hits = new Map<string, string>();\n\n/** Whether `cmd` names a path rather than a program to look up. */\nconst isPathLike = (cmd: string) => /[\\\\/]/.test(cmd) || path.win32.isAbsolute(cmd) || /^[A-Za-z]:/.test(cmd);\n\n/**\n * The absolute file PATH gives `cmd` on Windows (absolute PATH entries only), or null; `cmd` as given anywhere else.\n * A path is resolved against `cwd` (the start's working folder; this process's when not given) with PATHEXT's\n * extensions; one that doesn't resolve is returned as given (its start fails as not found by itself).\n */\nexport function whereOnPath(\n cmd: string,\n env: NodeJS.ProcessEnv = process.env,\n platform: NodeJS.Platform = process.platform,\n cwd?: string,\n): string | null {\n if (platform !== 'win32') return cmd;\n const pathExt = env.PATHEXT ?? env.Pathext;\n const extEnv = pathExt !== undefined ? { PATHEXT: pathExt } : {};\n if (isPathLike(cmd)) {\n const full = path.win32.resolve(cwd ?? process.cwd(), cmd);\n return findOnPath(full, extEnv, 'win32') ?? cmd;\n }\n const rawPath = env.PATH ?? env.Path ?? '';\n const key = `${cmd.toLowerCase()}\\0${rawPath}\\0${pathExt ?? ''}`;\n const cached = hits.get(key);\n if (cached && isProgramFile(cached, 'win32')) return cached;\n hits.delete(key);\n const absolute = rawPath\n .split(';')\n .map((d) => d.trim().replace(/^\"(.*)\"$/, '$1'))\n .filter((d) => d && path.win32.isAbsolute(d) && !/^[\\\\/](?![\\\\/])/.test(d))\n .join(';');\n const found = findOnPath(cmd, { PATH: absolute, ...extEnv }, 'win32');\n if (found) hits.set(key, found);\n return found;\n}\n\n/** The folder the stand-in for a program that isn't on PATH is in (never created). */\nconst STAND_IN_DIR = 'work-not-on-path';\n\n/** Where a program that isn't on PATH is \"started\" from: a folder that isn't there, so the start fails as not found. */\nexport function notOnPath(cmd: string, env: NodeJS.ProcessEnv = process.env): string {\n return path.win32.join(env.SystemRoot ?? env.SYSTEMROOT ?? 'C:\\\\Windows', STAND_IN_DIR, cmd);\n}\n\n/** The program name a `notOnPath` stand-in stands for, or null when `file` isn't one. */\nexport function standInFor(file: string): string | null {\n const m = /[\\\\/]work-not-on-path[\\\\/]([^\\\\/]+)$/i.exec(file);\n return m ? m[1] : null;\n}\n\n/**\n * A start's error that came from a `notOnPath` stand-in, said in the program's own name: \"winget not found on PATH\"\n * rather than \"spawn C:\\Windows\\work-not-on-path\\winget ENOENT\" (the stand-in is work's device, not a place to\n * look). The code stays ENOENT, so callers that tell \"not installed\" by it still do. Changes the error in place;\n * returns it.\n */\nexport function explainNotOnPath<T>(err: T): T {\n if (!(err instanceof Error)) return err;\n const e = err as NodeJS.ErrnoException;\n const name = (typeof e.path === 'string' ? standInFor(e.path) : null) ?? /[\\\\/]work-not-on-path[\\\\/]([^\\s\\\\/]+)/i.exec(e.message)?.[1];\n if (!name) return err;\n e.message = `${name} not found on PATH`;\n e.path = name;\n return err;\n}\n\n/** What to start for `cmd`: its absolute file on PATH (Windows), a path that fails as not found when it isn't there, `cmd` elsewhere. */\nexport function programPath(\n cmd: string,\n env: NodeJS.ProcessEnv = process.env,\n platform: NodeJS.Platform = process.platform,\n cwd?: string,\n): string {\n return whereOnPath(cmd, env, platform, cwd) ?? notOnPath(cmd, env);\n}\n"],"mappings":";;;AAAA,OAAO,QAAQ;AACf,OAAO,UAAU;AASV,SAAS,cAAc,GAAW,WAA4B,QAAQ,UAAmB;AAC9F,QAAM,MAAM,aAAa;AACzB,MAAI;AACF,UAAM,KAAK,GAAG,SAAS,CAAC;AACxB,WAAO,GAAG,OAAO,MAAM,QAAQ,GAAG,OAAO,QAAW;AAAA,EACtD,QAAQ;AACN,QAAI,CAAC,IAAK,QAAO;AACjB,QAAI;AACF,aAAO,CAAC,GAAG,UAAU,CAAC,EAAE,YAAY;AAAA,IACtC,QAAQ;AACN,aAAO;AAAA,IACT;AAAA,EACF;AACF;AAGO,SAAS,UAAU,KAAkC;AAC1D,UAAQ,IAAI,WAAW,IAAI,WAAW,uBACnC,MAAM,GAAG,EACT,OAAO,OAAO,EACd,IAAI,CAAC,MAAM,EAAE,YAAY,CA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,KAAK,GAAG;AACnE;","names":["path","path"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
spawn_default
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VQACXAFX.js";
|
|
5
5
|
|
|
6
6
|
// src/commands/shared/setup-completions.ts
|
|
7
7
|
import fs from "fs";
|
|
@@ -176,4 +176,4 @@ export {
|
|
|
176
176
|
printCompletionResults,
|
|
177
177
|
printManualInstructions
|
|
178
178
|
};
|
|
179
|
-
//# sourceMappingURL=chunk-
|
|
179
|
+
//# sourceMappingURL=chunk-3UI35AFZ.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
readStatus
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-3PXA5RJ2.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-3XU7Y2MV.js.map
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
isPidAlive,
|
|
7
7
|
killTreeAsync
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-WYQD44Y4.js";
|
|
9
9
|
import {
|
|
10
10
|
programPath
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-3QKH7JNR.js";
|
|
12
12
|
import {
|
|
13
13
|
getConfigDir
|
|
14
14
|
} from "./chunk-6THUVP6T.js";
|
|
@@ -250,4 +250,4 @@ export {
|
|
|
250
250
|
runningFromNames,
|
|
251
251
|
stopRunningFrom
|
|
252
252
|
};
|
|
253
|
-
//# sourceMappingURL=chunk-
|
|
253
|
+
//# sourceMappingURL=chunk-5DUKO7WC.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
defaultRunner
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-253Q6TOC.js";
|
|
5
5
|
|
|
6
6
|
// src/core/cleanup/build-folders.ts
|
|
7
7
|
import fs from "fs";
|
|
@@ -113,4 +113,4 @@ export {
|
|
|
113
113
|
buildFoldersOf,
|
|
114
114
|
clearBuildFolders
|
|
115
115
|
};
|
|
116
|
-
//# sourceMappingURL=chunk-
|
|
116
|
+
//# sourceMappingURL=chunk-5ZU6H62F.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
isPidAlive
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WYQD44Y4.js";
|
|
5
5
|
|
|
6
6
|
// src/core/platform/web-discovery.ts
|
|
7
7
|
import fs from "fs";
|
|
@@ -158,4 +158,4 @@ export {
|
|
|
158
158
|
askWorkWeb,
|
|
159
159
|
callWorkWeb
|
|
160
160
|
};
|
|
161
|
-
//# sourceMappingURL=chunk-
|
|
161
|
+
//# sourceMappingURL=chunk-6C7CR2W2.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
agentsBySession
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-CL3SSNBC.js";
|
|
5
5
|
import {
|
|
6
6
|
accountSwitchRefusal,
|
|
7
7
|
haltPty,
|
|
@@ -9,23 +9,23 @@ import {
|
|
|
9
9
|
ptyPid,
|
|
10
10
|
ptyPids,
|
|
11
11
|
resumePtyOnAccount
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-3LDQPUJ6.js";
|
|
13
13
|
import {
|
|
14
14
|
findSession
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-HJ2RKMBI.js";
|
|
16
16
|
import {
|
|
17
17
|
isArchiving,
|
|
18
18
|
loadHistory,
|
|
19
19
|
setSessionAccount
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-3PXA5RJ2.js";
|
|
21
21
|
import {
|
|
22
22
|
AccountAdminError,
|
|
23
23
|
agentOf,
|
|
24
24
|
liveAgents
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-KCDHOW22.js";
|
|
26
26
|
import {
|
|
27
27
|
createRestarter
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-MBSCZQ2C.js";
|
|
29
29
|
|
|
30
30
|
// src/core/sessions/account-switch-rules.ts
|
|
31
31
|
function switchRefusal(to, f) {
|
|
@@ -336,4 +336,4 @@ export {
|
|
|
336
336
|
createAccountLogins,
|
|
337
337
|
accountSkillsNote
|
|
338
338
|
};
|
|
339
|
-
//# sourceMappingURL=chunk-
|
|
339
|
+
//# sourceMappingURL=chunk-6MMXVHPL.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
checkedOutBranch,
|
|
4
4
|
gitDirs
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-3PXA5RJ2.js";
|
|
6
6
|
import {
|
|
7
7
|
json,
|
|
8
8
|
sessionIdFor,
|
|
@@ -375,4 +375,4 @@ export {
|
|
|
375
375
|
MAX_WATCHED_BRANCHES,
|
|
376
376
|
otherBranchesToWatch
|
|
377
377
|
};
|
|
378
|
-
//# sourceMappingURL=chunk-
|
|
378
|
+
//# sourceMappingURL=chunk-73MGZAGV.js.map
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
detachHere,
|
|
4
4
|
killTree
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-WYQD44Y4.js";
|
|
6
6
|
import {
|
|
7
7
|
spawn_default
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-VQACXAFX.js";
|
|
9
9
|
import {
|
|
10
10
|
getConfigDir
|
|
11
11
|
} from "./chunk-6THUVP6T.js";
|
|
@@ -192,4 +192,4 @@ export {
|
|
|
192
192
|
originalStatusLine,
|
|
193
193
|
runStatusLineCommand
|
|
194
194
|
};
|
|
195
|
-
//# sourceMappingURL=chunk-
|
|
195
|
+
//# sourceMappingURL=chunk-7HQM5NYN.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
sessionStatusView
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RH4BGTER.js";
|
|
5
5
|
import {
|
|
6
6
|
buildDigest,
|
|
7
7
|
loadHistory,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
readStatus,
|
|
12
12
|
scopeHashForPaths,
|
|
13
13
|
workSteps
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-3PXA5RJ2.js";
|
|
15
15
|
import {
|
|
16
16
|
sessionIdFor
|
|
17
17
|
} from "./chunk-RUYTU2WJ.js";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
agentOf,
|
|
20
20
|
lineTimeOf,
|
|
21
21
|
readJsonlSince
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-KCDHOW22.js";
|
|
23
23
|
|
|
24
24
|
// src/core/conversations/digest-source.ts
|
|
25
25
|
function digestWindow(sinceMs, now = Date.now()) {
|
|
@@ -99,4 +99,4 @@ function createDigestSource(deps = {}) {
|
|
|
99
99
|
export {
|
|
100
100
|
createDigestSource
|
|
101
101
|
};
|
|
102
|
-
//# sourceMappingURL=chunk-
|
|
102
|
+
//# sourceMappingURL=chunk-7OZZUQDW.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
isPidAlive,
|
|
8
8
|
spawnDetachedWork
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WYQD44Y4.js";
|
|
10
10
|
import {
|
|
11
11
|
ensureFile,
|
|
12
12
|
withFileLock
|
|
@@ -280,4 +280,4 @@ export {
|
|
|
280
280
|
ensureHost,
|
|
281
281
|
PtyHostClient
|
|
282
282
|
};
|
|
283
|
-
//# sourceMappingURL=chunk-
|
|
283
|
+
//# sourceMappingURL=chunk-AU7XGTJZ.js.map
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
samePathKey,
|
|
6
6
|
scanForRepos,
|
|
7
7
|
suggestAlias
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-BLOV7ECI.js";
|
|
9
9
|
import {
|
|
10
10
|
recordedRepos
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-3PXA5RJ2.js";
|
|
12
12
|
import {
|
|
13
13
|
getConfigPath
|
|
14
14
|
} from "./chunk-O5ZJY5BT.js";
|
|
@@ -180,4 +180,4 @@ export {
|
|
|
180
180
|
deleteGroup,
|
|
181
181
|
setReviewMode
|
|
182
182
|
};
|
|
183
|
-
//# sourceMappingURL=chunk-
|
|
183
|
+
//# sourceMappingURL=chunk-BENY64FW.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
BUILD_DIR_NAMES
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-5ZU6H62F.js";
|
|
5
5
|
|
|
6
6
|
// src/core/worktree/repo-rules.ts
|
|
7
7
|
var baseName = (p) => p.replace(/[\\/]+$/, "").split(/[\\/]/).pop() ?? p;
|
|
@@ -143,4 +143,4 @@ export {
|
|
|
143
143
|
readGitConfig,
|
|
144
144
|
scanForRepos
|
|
145
145
|
};
|
|
146
|
-
//# sourceMappingURL=chunk-
|
|
146
|
+
//# sourceMappingURL=chunk-BLOV7ECI.js.map
|
|
@@ -5,38 +5,38 @@ import {
|
|
|
5
5
|
} from "./chunk-AKMPF72Y.js";
|
|
6
6
|
import {
|
|
7
7
|
listReplies
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-M7FX37Z2.js";
|
|
9
9
|
import {
|
|
10
10
|
shownState
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-RH4BGTER.js";
|
|
12
12
|
import {
|
|
13
13
|
runInternal
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-F7IOGLKV.js";
|
|
15
15
|
import {
|
|
16
16
|
runningFromNames,
|
|
17
17
|
stopRunningFrom
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-5DUKO7WC.js";
|
|
19
19
|
import {
|
|
20
20
|
disposePty
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-3LDQPUJ6.js";
|
|
22
22
|
import {
|
|
23
23
|
saveIgnored,
|
|
24
24
|
teardownWorktree,
|
|
25
25
|
worktreeFor
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-HECIDNBU.js";
|
|
27
27
|
import {
|
|
28
28
|
isLeftover
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-KKVWDMSM.js";
|
|
30
30
|
import {
|
|
31
31
|
readPendingForSession
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-LPHYUNMD.js";
|
|
33
33
|
import {
|
|
34
34
|
buildFoldersOf,
|
|
35
35
|
clearBuildFolders
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-5ZU6H62F.js";
|
|
37
37
|
import {
|
|
38
38
|
defaultRunner
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-253Q6TOC.js";
|
|
40
40
|
import {
|
|
41
41
|
archiveRefFor,
|
|
42
42
|
archiveSession,
|
|
@@ -50,13 +50,13 @@ import {
|
|
|
50
50
|
setSessionArchived,
|
|
51
51
|
stopDev,
|
|
52
52
|
turnInProgress
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-3PXA5RJ2.js";
|
|
54
54
|
import {
|
|
55
55
|
sessionIdFor
|
|
56
56
|
} from "./chunk-RUYTU2WJ.js";
|
|
57
57
|
import {
|
|
58
58
|
agentOf
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-KCDHOW22.js";
|
|
60
60
|
import {
|
|
61
61
|
loadConfig
|
|
62
62
|
} from "./chunk-O5ZJY5BT.js";
|
|
@@ -282,4 +282,4 @@ export {
|
|
|
282
282
|
archiveMergedSession,
|
|
283
283
|
defaultArchiveDeps
|
|
284
284
|
};
|
|
285
|
-
//# sourceMappingURL=chunk-
|
|
285
|
+
//# sourceMappingURL=chunk-BTR2E5WD.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
owedToYou,
|
|
4
4
|
stageWaiting
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-3PXA5RJ2.js";
|
|
6
6
|
|
|
7
7
|
// src/core/sessions/session-view.ts
|
|
8
8
|
var RECENT_MS = 24 * 36e5;
|
|
@@ -76,4 +76,4 @@ export {
|
|
|
76
76
|
OWED_LONG,
|
|
77
77
|
waitingOnOthers
|
|
78
78
|
};
|
|
79
|
-
//# sourceMappingURL=chunk-
|
|
79
|
+
//# sourceMappingURL=chunk-CJ2QTQHG.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
findSessionForCwd
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-LPHYUNMD.js";
|
|
5
5
|
import {
|
|
6
6
|
sessionIdFor
|
|
7
7
|
} from "./chunk-RUYTU2WJ.js";
|
|
@@ -40,4 +40,4 @@ export {
|
|
|
40
40
|
agentsBySession,
|
|
41
41
|
summarizeAgents
|
|
42
42
|
};
|
|
43
|
-
//# sourceMappingURL=chunk-
|
|
43
|
+
//# sourceMappingURL=chunk-CL3SSNBC.js.map
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
-
programPath,
|
|
4
3
|
spawn_default
|
|
5
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VQACXAFX.js";
|
|
5
|
+
import {
|
|
6
|
+
programPath
|
|
7
|
+
} from "./chunk-3QKH7JNR.js";
|
|
6
8
|
import {
|
|
7
9
|
debug
|
|
8
10
|
} from "./chunk-6THUVP6T.js";
|
|
@@ -204,4 +206,4 @@ export {
|
|
|
204
206
|
fetchRemoteAsync,
|
|
205
207
|
getUnpushedCommits
|
|
206
208
|
};
|
|
207
|
-
//# sourceMappingURL=chunk-
|
|
209
|
+
//# sourceMappingURL=chunk-CSTPOCV2.js.map
|
|
@@ -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', '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,"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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AM,MAAM,YAAY,KAAK;AACvD;AAaA,eAAsB,iBAAiB,KAA4B;AACjE,QAAM,IAAI,QAAc,CAAC,SAAS,WAAW;AAC3C,aAAS,YAAY,KAAK,GAAG,CAAC,SAAS,SAAS,GAAG,EAAE,KAAK,SAAS,KAAO,aAAa,KAAK,GAAG,CAAC,QAAQ;AACtG,UAAI,IAAK,QAAO,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":[]}
|
|
@@ -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
|