@moberg_hr/work-tree 2.18.1 → 2.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{account-B3HHUCH6.js → account-LUWE75BA.js} +16 -15
- package/dist/{account-B3HHUCH6.js.map → account-LUWE75BA.js.map} +1 -1
- package/dist/{add-repo-2U2FLGJQ.js → add-repo-6CPMNL7A.js} +13 -12
- package/dist/{add-repo-2U2FLGJQ.js.map → add-repo-6CPMNL7A.js.map} +1 -1
- package/dist/{answer-HHCSBUQE.js → answer-4MK7ABHK.js} +10 -9
- package/dist/{answer-HHCSBUQE.js.map → answer-4MK7ABHK.js.map} +1 -1
- package/dist/{attach-RNWANIFC.js → attach-BISNHO3P.js} +14 -13
- package/dist/{attach-RNWANIFC.js.map → attach-BISNHO3P.js.map} +1 -1
- package/dist/bin.js +4 -4
- package/dist/{block-FSGNBJSN.js → block-R724RFRJ.js} +12 -11
- package/dist/{block-FSGNBJSN.js.map → block-R724RFRJ.js.map} +1 -1
- package/dist/{broadcast-5WAUMYVO.js → broadcast-Z3ODUBQL.js} +8 -7
- package/dist/{broadcast-5WAUMYVO.js.map → broadcast-Z3ODUBQL.js.map} +1 -1
- package/dist/{catchup-T5SOCXHV.js → catchup-OXUEJN2I.js} +13 -12
- package/dist/{catchup-T5SOCXHV.js.map → catchup-OXUEJN2I.js.map} +1 -1
- package/dist/{chunk-VBB3E37Z.js → chunk-2ALX552Z.js} +6 -6
- package/dist/{chunk-3JLMVWRO.js → chunk-2SHSB7JN.js} +2 -2
- package/dist/{chunk-7334DEPX.js → chunk-2YGVF224.js} +2 -2
- package/dist/{chunk-ADVMIHTB.js → chunk-3MPFCM5W.js} +2 -2
- package/dist/{chunk-BGPCIL4U.js → chunk-3ZB3TXPT.js} +4 -4
- package/dist/{chunk-LBJHFVH3.js → chunk-4KETMLQJ.js} +6 -6
- package/dist/{chunk-PZGLIYMD.js → chunk-6CG7TAPE.js} +57 -57
- package/dist/{chunk-GUEJVX2X.js → chunk-7L4L4Q73.js} +2 -2
- package/dist/{chunk-LVNPLXUO.js → chunk-7LU3LKHV.js} +7 -7
- package/dist/{chunk-DAQJZE3B.js → chunk-BKW6R2II.js} +13 -11
- package/dist/{chunk-DAQJZE3B.js.map → chunk-BKW6R2II.js.map} +1 -1
- package/dist/{chunk-2SLALFWA.js → chunk-BOVPARRB.js} +15 -4
- package/dist/chunk-BOVPARRB.js.map +1 -0
- package/dist/{chunk-XKPF4MD2.js → chunk-BZ2FD3F7.js} +3 -3
- package/dist/{chunk-ITNSUPVJ.js → chunk-C7QOPDZL.js} +5 -5
- package/dist/{chunk-26DBVWJC.js → chunk-CDO7AFTJ.js} +4 -4
- package/dist/{chunk-J5B2Z7SO.js → chunk-CNJZONIK.js} +3 -3
- package/dist/{chunk-H4TNGZKT.js → chunk-DDGTJVLP.js} +8 -8
- package/dist/{chunk-FJYM2JQN.js → chunk-DJDI5OPO.js} +141 -216
- package/dist/chunk-DJDI5OPO.js.map +1 -0
- package/dist/{chunk-55T4LC2P.js → chunk-DKQU6K4S.js} +3 -3
- package/dist/{chunk-BMLV63AW.js → chunk-EHX5MGDJ.js} +2 -2
- package/dist/{chunk-AMKLWFT3.js → chunk-HACRL36E.js} +2 -2
- package/dist/{chunk-WKHP3AXS.js → chunk-HJZ65BMV.js} +3 -3
- package/dist/{chunk-A72CRTFG.js → chunk-HN6ZSSPR.js} +6 -4
- package/dist/chunk-HN6ZSSPR.js.map +1 -0
- package/dist/{chunk-WVDIS22N.js → chunk-HV5TXLMN.js} +3 -3
- package/dist/{chunk-ATBSACIU.js → chunk-I3JB5UGN.js} +2 -2
- package/dist/{chunk-KK5RCNDL.js → chunk-IGMXR7S4.js} +7 -7
- package/dist/{chunk-VG5WQPQB.js → chunk-IHYPHX2Z.js} +4 -4
- package/dist/{chunk-QO4QWQUO.js → chunk-JMILQI5Y.js} +2 -2
- package/dist/{chunk-PYHYZGY4.js → chunk-K5U6EWIN.js} +3 -3
- package/dist/{chunk-MWIPHUAE.js → chunk-LXBHVWOY.js} +2 -1
- package/dist/chunk-LXBHVWOY.js.map +1 -0
- package/dist/{chunk-WIYDT3PY.js → chunk-NFM4NGTI.js} +2 -2
- package/dist/{chunk-S7OCHVVD.js → chunk-NJXYDMNQ.js} +6 -6
- package/dist/{chunk-6EW27TKI.js → chunk-OB5NKZYF.js} +11 -9
- package/dist/{chunk-6EW27TKI.js.map → chunk-OB5NKZYF.js.map} +1 -1
- package/dist/{chunk-H5JNYD63.js → chunk-PV7IOR7X.js} +2 -2
- package/dist/{chunk-V76KARDB.js → chunk-PVBWN4LV.js} +2 -2
- package/dist/{chunk-G7VLIMOH.js → chunk-S4OLDCTC.js} +4 -4
- package/dist/{chunk-IVH5T4U2.js → chunk-S5EJTSD2.js} +2 -2
- package/dist/{chunk-WXYUABCL.js → chunk-SMTNDZX5.js} +5 -5
- package/dist/{chunk-2YRR5Q3C.js → chunk-T5SDU4UP.js} +2 -2
- package/dist/{chunk-CIUTNNF4.js → chunk-TFENIQUQ.js} +4 -4
- package/dist/{chunk-IBTA4DSY.js → chunk-ULN7Z5VB.js} +6 -6
- package/dist/{chunk-56D4WJ2S.js → chunk-UNYCEMG4.js} +2 -2
- package/dist/{chunk-PJ7ZKAZF.js → chunk-V5VG3V6R.js} +2 -2
- package/dist/chunk-VJZGPYJT.js +9 -0
- package/dist/{chunk-HGB7BITW.js → chunk-W4GDPHIF.js} +3 -2
- package/dist/chunk-W4GDPHIF.js.map +1 -0
- package/dist/{chunk-374HKMSE.js → chunk-WPFDHBQZ.js} +2 -2
- package/dist/{chunk-AC7FECH5.js → chunk-WSDAXREI.js} +6 -6
- package/dist/{chunk-XQEP3QYX.js → chunk-WUUZF4MY.js} +7 -5
- package/dist/{chunk-XQEP3QYX.js.map → chunk-WUUZF4MY.js.map} +1 -1
- package/dist/{chunk-QDNNFL56.js → chunk-XCDIMZD3.js} +3 -3
- package/dist/{chunk-N2IDEZGB.js → chunk-YCNIIE7Q.js} +4 -4
- package/dist/{chunk-AWP2MCMN.js → chunk-YOBBM2DF.js} +3 -3
- package/dist/{chunk-BGS5M542.js → chunk-YRSFUGS5.js} +2 -2
- package/dist/{chunk-2LUTV7UB.js → chunk-YSUASP3E.js} +2 -2
- package/dist/chunk-Z6ACV5ZQ.js +86 -0
- package/dist/chunk-Z6ACV5ZQ.js.map +1 -0
- package/dist/{chunk-F5RPC3LT.js → chunk-ZAGEDMIK.js} +3 -3
- package/dist/{chunk-QTENJUM3.js → chunk-ZERN5OBM.js} +6 -6
- package/dist/{chunk-AT4EPCOV.js → chunk-ZL6IYEDM.js} +2 -2
- package/dist/{cleanup-LJHC5O6U.js → cleanup-EHZ552FT.js} +27 -26
- package/dist/{cleanup-LJHC5O6U.js.map → cleanup-EHZ552FT.js.map} +1 -1
- package/dist/{cli-K6T6AJHP.js → cli-KIBE6YOF.js} +4 -4
- package/dist/{color-7PZNDE4R.js → color-GPOUDNDD.js} +11 -10
- package/dist/{color-7PZNDE4R.js.map → color-GPOUDNDD.js.map} +1 -1
- package/dist/{config-TM37HUBM.js → config-V4SDLGYF.js} +10 -9
- package/dist/{config-TM37HUBM.js.map → config-V4SDLGYF.js.map} +1 -1
- package/dist/{diff-RSSLOKE7.js → diff-K7UDI3G4.js} +11 -10
- package/dist/{diff-RSSLOKE7.js.map → diff-K7UDI3G4.js.map} +1 -1
- package/dist/{digest-LCHLLJ4M.js → digest-I7XDH3F6.js} +10 -9
- package/dist/{digest-LCHLLJ4M.js.map → digest-I7XDH3F6.js.map} +1 -1
- package/dist/{fork-XVNZMWCA.js → fork-6VEB7OAL.js} +24 -23
- package/dist/{fork-XVNZMWCA.js.map → fork-6VEB7OAL.js.map} +1 -1
- package/dist/{history-CRUFLMA2.js → history-XK2XDAKU.js} +8 -7
- package/dist/{hook-U4WCMGD6.js → hook-R7S37FCU.js} +15 -14
- package/dist/{hook-U4WCMGD6.js.map → hook-R7S37FCU.js.map} +1 -1
- package/dist/{hydrate-BYXK4W6T.js → hydrate-RIG5OW5L.js} +8 -7
- package/dist/{hydrate-BYXK4W6T.js.map → hydrate-RIG5OW5L.js.map} +1 -1
- package/dist/{init-JWBB4HBE.js → init-HU2YAHSK.js} +13 -12
- package/dist/{init-JWBB4HBE.js.map → init-HU2YAHSK.js.map} +1 -1
- package/dist/{install-skills-M2Y6ZGQC.js → install-skills-DIL6HTHB.js} +8 -7
- package/dist/install-skills-bin.js +7 -6
- package/dist/install-skills-bin.js.map +1 -1
- package/dist/{keep-OZJ2XXKF.js → keep-TXA5UIHC.js} +10 -9
- package/dist/{keep-OZJ2XXKF.js.map → keep-TXA5UIHC.js.map} +1 -1
- package/dist/{list-YVZSGKT4.js → list-WKAOUGRK.js} +8 -7
- package/dist/{list-YVZSGKT4.js.map → list-WKAOUGRK.js.map} +1 -1
- package/dist/{move-7TAU3LI3.js → move-2O552OT6.js} +14 -13
- package/dist/{move-7TAU3LI3.js.map → move-2O552OT6.js.map} +1 -1
- package/dist/{note-ESLGTIYH.js → note-C2UZCLIE.js} +10 -9
- package/dist/{note-ESLGTIYH.js.map → note-C2UZCLIE.js.map} +1 -1
- package/dist/{overlaps-FYXO3OL2.js → overlaps-VXR54C3B.js} +14 -13
- package/dist/{overlaps-FYXO3OL2.js.map → overlaps-VXR54C3B.js.map} +1 -1
- package/dist/{pin-AAMXBCV3.js → pin-UGP5FOKU.js} +11 -10
- package/dist/{pin-AAMXBCV3.js.map → pin-UGP5FOKU.js.map} +1 -1
- package/dist/{pr-42UBVLUT.js → pr-U3VONCMS.js} +19 -18
- package/dist/{pr-42UBVLUT.js.map → pr-U3VONCMS.js.map} +1 -1
- package/dist/{prune-B72T33B6.js → prune-PJAF4RAB.js} +25 -24
- package/dist/{prune-B72T33B6.js.map → prune-PJAF4RAB.js.map} +1 -1
- package/dist/{pty-host-72L4DQL5.js → pty-host-7S5LN5PE.js} +12 -11
- package/dist/{pty-host-72L4DQL5.js.map → pty-host-7S5LN5PE.js.map} +1 -1
- package/dist/{read-75KS2EXO.js → read-KVRJKWHY.js} +10 -9
- package/dist/{read-75KS2EXO.js.map → read-KVRJKWHY.js.map} +1 -1
- package/dist/{recent-H665DNCJ.js → recent-D756QKIV.js} +13 -12
- package/dist/{recent-H665DNCJ.js.map → recent-D756QKIV.js.map} +1 -1
- package/dist/{remove-ZZBCNASU.js → remove-VJSJGTH3.js} +26 -25
- package/dist/{remove-ZZBCNASU.js.map → remove-VJSJGTH3.js.map} +1 -1
- package/dist/{restart-WFMCSOPB.js → restart-WQ2JNXBK.js} +10 -9
- package/dist/{restart-WFMCSOPB.js.map → restart-WQ2JNXBK.js.map} +1 -1
- package/dist/{resume-GICIEI2I.js → resume-VWNVLBDY.js} +13 -12
- package/dist/{resume-GICIEI2I.js.map → resume-VWNVLBDY.js.map} +1 -1
- package/dist/{review-TZUVYEAL.js → review-KQV2VC44.js} +9 -8
- package/dist/{review-TZUVYEAL.js.map → review-KQV2VC44.js.map} +1 -1
- package/dist/{review-now-LYGJDHDE.js → review-now-S6HC7QUZ.js} +2 -2
- package/dist/{run-SVJLTKSR.js → run-ZQDZM2F7.js} +8 -7
- package/dist/{run-SVJLTKSR.js.map → run-ZQDZM2F7.js.map} +1 -1
- package/dist/{screen-JC6L6MT5.js → screen-TFIGUHCM.js} +10 -9
- package/dist/{screen-JC6L6MT5.js.map → screen-TFIGUHCM.js.map} +1 -1
- package/dist/{search-3BZMJM3P.js → search-OF3OQCOL.js} +8 -7
- package/dist/{search-3BZMJM3P.js.map → search-OF3OQCOL.js.map} +1 -1
- package/dist/{section-GNYPAEQC.js → section-RXBFBJH3.js} +11 -10
- package/dist/{section-GNYPAEQC.js.map → section-RXBFBJH3.js.map} +1 -1
- package/dist/{send-KVUFOWCP.js → send-SKMM6PMF.js} +11 -10
- package/dist/{send-KVUFOWCP.js.map → send-SKMM6PMF.js.map} +1 -1
- package/dist/{sessions-W36QTHAD.js → sessions-CHINYTLG.js} +22 -21
- package/dist/{sessions-W36QTHAD.js.map → sessions-CHINYTLG.js.map} +1 -1
- package/dist/{show-FQPMGZO3.js → show-YAMZLP4E.js} +9 -8
- package/dist/{show-FQPMGZO3.js.map → show-YAMZLP4E.js.map} +1 -1
- package/dist/{snooze-HGO3W2OF.js → snooze-3OHKZEBQ.js} +10 -9
- package/dist/{snooze-HGO3W2OF.js.map → snooze-3OHKZEBQ.js.map} +1 -1
- package/dist/{start-UQSJGUMJ.js → start-AFBN5IZM.js} +10 -9
- package/dist/{start-UQSJGUMJ.js.map → start-AFBN5IZM.js.map} +1 -1
- package/dist/{state-24H5QRPO.js → state-NBSMRUXX.js} +2 -2
- package/dist/{status-MGTUAZTA.js → status-S2WZCF4J.js} +12 -11
- package/dist/{status-MGTUAZTA.js.map → status-S2WZCF4J.js.map} +1 -1
- package/dist/{statusline-B6U3ANSM.js → statusline-QZKHVDHR.js} +4 -4
- package/dist/statusline-hook-Q645N4XF.js +162 -0
- package/dist/statusline-hook-Q645N4XF.js.map +1 -0
- package/dist/{stop-JBUL4WY3.js → stop-KSOAPWKH.js} +10 -9
- package/dist/{stop-JBUL4WY3.js.map → stop-KSOAPWKH.js.map} +1 -1
- package/dist/{sync-ILYA3AHS.js → sync-S2BNPQXB.js} +25 -24
- package/dist/{sync-ILYA3AHS.js.map → sync-S2BNPQXB.js.map} +1 -1
- package/dist/{time-ZOJD7HFL.js → time-2QQXML2K.js} +11 -10
- package/dist/{time-ZOJD7HFL.js.map → time-2QQXML2K.js.map} +1 -1
- package/dist/{time-actions-AIKJ7ENX.js → time-actions-VKQQ64BR.js} +3 -3
- package/dist/{timesheet-WT7QUB7M.js → timesheet-MZNTOM6T.js} +14 -13
- package/dist/{timesheet-WT7QUB7M.js.map → timesheet-MZNTOM6T.js.map} +1 -1
- package/dist/{todo-GB7X6KWW.js → todo-ADHVKSVA.js} +2 -2
- package/dist/{tree-M6YEJCXF.js → tree-S2PPLSQB.js} +24 -23
- package/dist/{tree-M6YEJCXF.js.map → tree-S2PPLSQB.js.map} +1 -1
- package/dist/{update-47FZ6YO5.js → update-5K5Y5PB3.js} +16 -15
- package/dist/{update-47FZ6YO5.js.map → update-5K5Y5PB3.js.map} +1 -1
- package/dist/{usage-PTD3C34L.js → usage-O2POSOEE.js} +10 -9
- package/dist/{usage-PTD3C34L.js.map → usage-O2POSOEE.js.map} +1 -1
- package/dist/{usage-ask-BULFMCUZ.js → usage-ask-C3QLGFC5.js} +3 -3
- package/dist/{version-6UJN2CCE.js → version-3UR4YFMC.js} +4 -4
- package/dist/{wait-JHFM3MA7.js → wait-TXEVJCYX.js} +11 -10
- package/dist/{wait-JHFM3MA7.js.map → wait-TXEVJCYX.js.map} +1 -1
- package/dist/wd-bin.js +3 -3
- package/dist/web/assets/{PtyView-DpIVcrTI.js → PtyView-DsQS5QEM.js} +2 -2
- package/dist/web/assets/{PtyView-DpIVcrTI.js.map → PtyView-DsQS5QEM.js.map} +1 -1
- package/dist/web/assets/{index-DhXqtaRc.js → index-ppylqAa_.js} +56 -56
- package/dist/web/assets/index-ppylqAa_.js.map +1 -0
- package/dist/web/index.html +1 -1
- package/dist/{web-HRGWOUDV.js → web-I7Q4ZMJX.js} +79 -56
- package/dist/web-I7Q4ZMJX.js.map +1 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/dist/chunk-2SLALFWA.js.map +0 -1
- package/dist/chunk-4YG55UQ6.js +0 -9
- package/dist/chunk-A72CRTFG.js.map +0 -1
- package/dist/chunk-FJYM2JQN.js.map +0 -1
- package/dist/chunk-HGB7BITW.js.map +0 -1
- package/dist/chunk-MWIPHUAE.js.map +0 -1
- package/dist/statusline-hook-SYRLMSDL.js +0 -72
- package/dist/statusline-hook-SYRLMSDL.js.map +0 -1
- package/dist/web/assets/index-DhXqtaRc.js.map +0 -1
- package/dist/web-HRGWOUDV.js.map +0 -1
- /package/dist/{chunk-VBB3E37Z.js.map → chunk-2ALX552Z.js.map} +0 -0
- /package/dist/{chunk-3JLMVWRO.js.map → chunk-2SHSB7JN.js.map} +0 -0
- /package/dist/{chunk-7334DEPX.js.map → chunk-2YGVF224.js.map} +0 -0
- /package/dist/{chunk-ADVMIHTB.js.map → chunk-3MPFCM5W.js.map} +0 -0
- /package/dist/{chunk-BGPCIL4U.js.map → chunk-3ZB3TXPT.js.map} +0 -0
- /package/dist/{chunk-LBJHFVH3.js.map → chunk-4KETMLQJ.js.map} +0 -0
- /package/dist/{chunk-PZGLIYMD.js.map → chunk-6CG7TAPE.js.map} +0 -0
- /package/dist/{chunk-GUEJVX2X.js.map → chunk-7L4L4Q73.js.map} +0 -0
- /package/dist/{chunk-LVNPLXUO.js.map → chunk-7LU3LKHV.js.map} +0 -0
- /package/dist/{chunk-XKPF4MD2.js.map → chunk-BZ2FD3F7.js.map} +0 -0
- /package/dist/{chunk-ITNSUPVJ.js.map → chunk-C7QOPDZL.js.map} +0 -0
- /package/dist/{chunk-26DBVWJC.js.map → chunk-CDO7AFTJ.js.map} +0 -0
- /package/dist/{chunk-J5B2Z7SO.js.map → chunk-CNJZONIK.js.map} +0 -0
- /package/dist/{chunk-H4TNGZKT.js.map → chunk-DDGTJVLP.js.map} +0 -0
- /package/dist/{chunk-55T4LC2P.js.map → chunk-DKQU6K4S.js.map} +0 -0
- /package/dist/{chunk-BMLV63AW.js.map → chunk-EHX5MGDJ.js.map} +0 -0
- /package/dist/{chunk-AMKLWFT3.js.map → chunk-HACRL36E.js.map} +0 -0
- /package/dist/{chunk-WKHP3AXS.js.map → chunk-HJZ65BMV.js.map} +0 -0
- /package/dist/{chunk-WVDIS22N.js.map → chunk-HV5TXLMN.js.map} +0 -0
- /package/dist/{chunk-ATBSACIU.js.map → chunk-I3JB5UGN.js.map} +0 -0
- /package/dist/{chunk-KK5RCNDL.js.map → chunk-IGMXR7S4.js.map} +0 -0
- /package/dist/{chunk-VG5WQPQB.js.map → chunk-IHYPHX2Z.js.map} +0 -0
- /package/dist/{chunk-QO4QWQUO.js.map → chunk-JMILQI5Y.js.map} +0 -0
- /package/dist/{chunk-PYHYZGY4.js.map → chunk-K5U6EWIN.js.map} +0 -0
- /package/dist/{chunk-WIYDT3PY.js.map → chunk-NFM4NGTI.js.map} +0 -0
- /package/dist/{chunk-S7OCHVVD.js.map → chunk-NJXYDMNQ.js.map} +0 -0
- /package/dist/{chunk-H5JNYD63.js.map → chunk-PV7IOR7X.js.map} +0 -0
- /package/dist/{chunk-V76KARDB.js.map → chunk-PVBWN4LV.js.map} +0 -0
- /package/dist/{chunk-G7VLIMOH.js.map → chunk-S4OLDCTC.js.map} +0 -0
- /package/dist/{chunk-IVH5T4U2.js.map → chunk-S5EJTSD2.js.map} +0 -0
- /package/dist/{chunk-WXYUABCL.js.map → chunk-SMTNDZX5.js.map} +0 -0
- /package/dist/{chunk-2YRR5Q3C.js.map → chunk-T5SDU4UP.js.map} +0 -0
- /package/dist/{chunk-CIUTNNF4.js.map → chunk-TFENIQUQ.js.map} +0 -0
- /package/dist/{chunk-IBTA4DSY.js.map → chunk-ULN7Z5VB.js.map} +0 -0
- /package/dist/{chunk-56D4WJ2S.js.map → chunk-UNYCEMG4.js.map} +0 -0
- /package/dist/{chunk-PJ7ZKAZF.js.map → chunk-V5VG3V6R.js.map} +0 -0
- /package/dist/{chunk-4YG55UQ6.js.map → chunk-VJZGPYJT.js.map} +0 -0
- /package/dist/{chunk-374HKMSE.js.map → chunk-WPFDHBQZ.js.map} +0 -0
- /package/dist/{chunk-AC7FECH5.js.map → chunk-WSDAXREI.js.map} +0 -0
- /package/dist/{chunk-QDNNFL56.js.map → chunk-XCDIMZD3.js.map} +0 -0
- /package/dist/{chunk-N2IDEZGB.js.map → chunk-YCNIIE7Q.js.map} +0 -0
- /package/dist/{chunk-AWP2MCMN.js.map → chunk-YOBBM2DF.js.map} +0 -0
- /package/dist/{chunk-BGS5M542.js.map → chunk-YRSFUGS5.js.map} +0 -0
- /package/dist/{chunk-2LUTV7UB.js.map → chunk-YSUASP3E.js.map} +0 -0
- /package/dist/{chunk-F5RPC3LT.js.map → chunk-ZAGEDMIK.js.map} +0 -0
- /package/dist/{chunk-QTENJUM3.js.map → chunk-ZERN5OBM.js.map} +0 -0
- /package/dist/{chunk-AT4EPCOV.js.map → chunk-ZL6IYEDM.js.map} +0 -0
- /package/dist/{cli-K6T6AJHP.js.map → cli-KIBE6YOF.js.map} +0 -0
- /package/dist/{history-CRUFLMA2.js.map → history-XK2XDAKU.js.map} +0 -0
- /package/dist/{install-skills-M2Y6ZGQC.js.map → install-skills-DIL6HTHB.js.map} +0 -0
- /package/dist/{review-now-LYGJDHDE.js.map → review-now-S6HC7QUZ.js.map} +0 -0
- /package/dist/{state-24H5QRPO.js.map → state-NBSMRUXX.js.map} +0 -0
- /package/dist/{statusline-B6U3ANSM.js.map → statusline-QZKHVDHR.js.map} +0 -0
- /package/dist/{time-actions-AIKJ7ENX.js.map → time-actions-VKQQ64BR.js.map} +0 -0
- /package/dist/{todo-GB7X6KWW.js.map → todo-ADHVKSVA.js.map} +0 -0
- /package/dist/{usage-ask-BULFMCUZ.js.map → usage-ask-C3QLGFC5.js.map} +0 -0
- /package/dist/{version-6UJN2CCE.js.map → version-3UR4YFMC.js.map} +0 -0
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import {
|
|
3
3
|
sessionFromArgs,
|
|
4
4
|
sessionPositionals
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-IHYPHX2Z.js";
|
|
6
6
|
import "./chunk-6AQRYLOB.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-YOBBM2DF.js";
|
|
8
8
|
import "./chunk-ZSHWP2VS.js";
|
|
9
9
|
import "./chunk-CNZV3UCM.js";
|
|
10
10
|
import "./chunk-HUXS3VAI.js";
|
|
@@ -13,20 +13,21 @@ import {
|
|
|
13
13
|
parseWhen,
|
|
14
14
|
requestSnooze,
|
|
15
15
|
snoozeLabel
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-HN6ZSSPR.js";
|
|
17
17
|
import "./chunk-NEJVK5CF.js";
|
|
18
18
|
import {
|
|
19
19
|
sessionIdFor
|
|
20
20
|
} from "./chunk-ALBTIOP3.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-DJDI5OPO.js";
|
|
22
22
|
import "./chunk-KGHWHAVF.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-NFM4NGTI.js";
|
|
24
24
|
import "./chunk-YQSWVHKK.js";
|
|
25
|
+
import "./chunk-Z6ACV5ZQ.js";
|
|
25
26
|
import "./chunk-JUGF3YE7.js";
|
|
26
27
|
import "./chunk-HK6AZQ5Z.js";
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-2YGVF224.js";
|
|
29
|
+
import "./chunk-LXBHVWOY.js";
|
|
30
|
+
import "./chunk-W4GDPHIF.js";
|
|
30
31
|
import "./chunk-BR6OWWAA.js";
|
|
31
32
|
import "./chunk-VHENFC2S.js";
|
|
32
33
|
import "./chunk-QOSAWNOU.js";
|
|
@@ -74,4 +75,4 @@ var snoozeCommand = {
|
|
|
74
75
|
export {
|
|
75
76
|
snoozeCommand
|
|
76
77
|
};
|
|
77
|
-
//# sourceMappingURL=snooze-
|
|
78
|
+
//# sourceMappingURL=snooze-3OHKZEBQ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/snooze.ts"],"sourcesContent":["import chalk from 'chalk';\nimport type { CommandModule } from 'yargs';\nimport { parseWhen, snoozeLabel } from '../core/rail/snooze.js';\nimport { clearSnooze, requestSnooze, type SnoozeRequest } from '../core/rail/snooze-store.js';\nimport { sessionIdFor } from '../core/sessions/session-id.js';\nimport { sessionFromArgs, sessionPositionals } from './shared/session-arg.js';\n\n/** `work snooze` — the dashboard's Snooze (snooze.ts): out of the Inbox for a while, until a time, or until it changes. */\nexport const snoozeCommand: CommandModule = {\n command: 'snooze [target] [branch]',\n describe: 'Snooze a session out of the Inbox (default: the session for this folder)',\n builder: (yargs) =>\n sessionPositionals(yargs)\n .option('for', {\n choices: ['2h', 'tomorrow', 'change'] as const,\n describe: 'Two hours, tomorrow 9:00, or until its status changes (default: 2h)',\n })\n .option('until', { type: 'string', describe: 'Until a time: 14:00, fri, \"fri 14:00\", +3h, 2026-10-03 14:00' })\n .option('off', { type: 'boolean', describe: 'Unsnooze it' })\n .conflicts('until', 'for')\n .conflicts('off', ['for', 'until']),\n handler: (argv) => {\n const s = sessionFromArgs(argv);\n if (!s) return;\n const id = sessionIdFor(s);\n if (argv.off) {\n console.log(clearSnooze(id) ? chalk.green(`Unsnoozed ${s.target} · ${s.branch}.`) : chalk.gray('It was not snoozed.'));\n return;\n }\n let req: SnoozeRequest;\n if (typeof argv.until === 'string') {\n const at = parseWhen(argv.until);\n if (!at) {\n console.error(chalk.red(`Not a time: ${argv.until} (try 14:00, fri, \"fri 14:00\", +3h, 2026-10-03 14:00).`));\n process.exitCode = 1;\n return;\n }\n req = { until: at.toISOString() };\n } else req = { for: (argv.for as '2h' | 'tomorrow' | 'change' | undefined) ?? '2h' };\n const r = requestSnooze(id, req);\n if (!r.ok) {\n console.error(chalk.red(r.error));\n process.exitCode = 1;\n return;\n }\n console.log(chalk.green(`Snoozed ${s.target} · ${s.branch} ${snoozeLabel(r.snooze)}.`));\n },\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/snooze.ts"],"sourcesContent":["import chalk from 'chalk';\nimport type { CommandModule } from 'yargs';\nimport { parseWhen, snoozeLabel } from '../core/rail/snooze.js';\nimport { clearSnooze, requestSnooze, type SnoozeRequest } from '../core/rail/snooze-store.js';\nimport { sessionIdFor } from '../core/sessions/session-id.js';\nimport { sessionFromArgs, sessionPositionals } from './shared/session-arg.js';\n\n/** `work snooze` — the dashboard's Snooze (snooze.ts): out of the Inbox for a while, until a time, or until it changes. */\nexport const snoozeCommand: CommandModule = {\n command: 'snooze [target] [branch]',\n describe: 'Snooze a session out of the Inbox (default: the session for this folder)',\n builder: (yargs) =>\n sessionPositionals(yargs)\n .option('for', {\n choices: ['2h', 'tomorrow', 'change'] as const,\n describe: 'Two hours, tomorrow 9:00, or until its status changes (default: 2h)',\n })\n .option('until', { type: 'string', describe: 'Until a time: 14:00, fri, \"fri 14:00\", +3h, 2026-10-03 14:00' })\n .option('off', { type: 'boolean', describe: 'Unsnooze it' })\n .conflicts('until', 'for')\n .conflicts('off', ['for', 'until']),\n handler: (argv) => {\n const s = sessionFromArgs(argv);\n if (!s) return;\n const id = sessionIdFor(s);\n if (argv.off) {\n console.log(clearSnooze(id) ? chalk.green(`Unsnoozed ${s.target} · ${s.branch}.`) : chalk.gray('It was not snoozed.'));\n return;\n }\n let req: SnoozeRequest;\n if (typeof argv.until === 'string') {\n const at = parseWhen(argv.until);\n if (!at) {\n console.error(chalk.red(`Not a time: ${argv.until} (try 14:00, fri, \"fri 14:00\", +3h, 2026-10-03 14:00).`));\n process.exitCode = 1;\n return;\n }\n req = { until: at.toISOString() };\n } else req = { for: (argv.for as '2h' | 'tomorrow' | 'change' | undefined) ?? '2h' };\n const r = requestSnooze(id, req);\n if (!r.ok) {\n console.error(chalk.red(r.error));\n process.exitCode = 1;\n return;\n }\n console.log(chalk.green(`Snoozed ${s.target} · ${s.branch} ${snoozeLabel(r.snooze)}.`));\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,WAAW;AAQX,IAAM,gBAA+B;AAAA,EAC1C,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS,CAAC,UACR,mBAAmB,KAAK,EACrB,OAAO,OAAO;AAAA,IACb,SAAS,CAAC,MAAM,YAAY,QAAQ;AAAA,IACpC,UAAU;AAAA,EACZ,CAAC,EACA,OAAO,SAAS,EAAE,MAAM,UAAU,UAAU,+DAA+D,CAAC,EAC5G,OAAO,OAAO,EAAE,MAAM,WAAW,UAAU,cAAc,CAAC,EAC1D,UAAU,SAAS,KAAK,EACxB,UAAU,OAAO,CAAC,OAAO,OAAO,CAAC;AAAA,EACtC,SAAS,CAAC,SAAS;AACjB,UAAM,IAAI,gBAAgB,IAAI;AAC9B,QAAI,CAAC,EAAG;AACR,UAAM,KAAK,aAAa,CAAC;AACzB,QAAI,KAAK,KAAK;AACZ,cAAQ,IAAI,YAAY,EAAE,IAAI,MAAM,MAAM,aAAa,EAAE,MAAM,SAAM,EAAE,MAAM,GAAG,IAAI,MAAM,KAAK,qBAAqB,CAAC;AACrH;AAAA,IACF;AACA,QAAI;AACJ,QAAI,OAAO,KAAK,UAAU,UAAU;AAClC,YAAM,KAAK,UAAU,KAAK,KAAK;AAC/B,UAAI,CAAC,IAAI;AACP,gBAAQ,MAAM,MAAM,IAAI,eAAe,KAAK,KAAK,wDAAwD,CAAC;AAC1G,gBAAQ,WAAW;AACnB;AAAA,MACF;AACA,YAAM,EAAE,OAAO,GAAG,YAAY,EAAE;AAAA,IAClC,MAAO,OAAM,EAAE,KAAM,KAAK,OAAoD,KAAK;AACnF,UAAM,IAAI,cAAc,IAAI,GAAG;AAC/B,QAAI,CAAC,EAAE,IAAI;AACT,cAAQ,MAAM,MAAM,IAAI,EAAE,KAAK,CAAC;AAChC,cAAQ,WAAW;AACnB;AAAA,IACF;AACA,YAAQ,IAAI,MAAM,MAAM,WAAW,EAAE,MAAM,SAAM,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,CAAC,GAAG,CAAC;AAAA,EACxF;AACF;","names":[]}
|
|
@@ -2,29 +2,30 @@
|
|
|
2
2
|
import {
|
|
3
3
|
sessionFromArgs,
|
|
4
4
|
sessionPositionals
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-IHYPHX2Z.js";
|
|
6
6
|
import "./chunk-6AQRYLOB.js";
|
|
7
7
|
import {
|
|
8
8
|
callWorkWeb
|
|
9
9
|
} from "./chunk-SZAD5U3J.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-YOBBM2DF.js";
|
|
11
11
|
import "./chunk-ZSHWP2VS.js";
|
|
12
12
|
import "./chunk-CNZV3UCM.js";
|
|
13
13
|
import "./chunk-HUXS3VAI.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-HN6ZSSPR.js";
|
|
15
15
|
import "./chunk-NEJVK5CF.js";
|
|
16
16
|
import {
|
|
17
17
|
sessionIdFor
|
|
18
18
|
} from "./chunk-ALBTIOP3.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-DJDI5OPO.js";
|
|
20
20
|
import "./chunk-KGHWHAVF.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-NFM4NGTI.js";
|
|
22
22
|
import "./chunk-YQSWVHKK.js";
|
|
23
|
+
import "./chunk-Z6ACV5ZQ.js";
|
|
23
24
|
import "./chunk-JUGF3YE7.js";
|
|
24
25
|
import "./chunk-HK6AZQ5Z.js";
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-2YGVF224.js";
|
|
27
|
+
import "./chunk-LXBHVWOY.js";
|
|
28
|
+
import "./chunk-W4GDPHIF.js";
|
|
28
29
|
import "./chunk-BR6OWWAA.js";
|
|
29
30
|
import "./chunk-VHENFC2S.js";
|
|
30
31
|
import "./chunk-QOSAWNOU.js";
|
|
@@ -65,4 +66,4 @@ var startCommand = {
|
|
|
65
66
|
export {
|
|
66
67
|
startCommand
|
|
67
68
|
};
|
|
68
|
-
//# sourceMappingURL=start-
|
|
69
|
+
//# sourceMappingURL=start-AFBN5IZM.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/start.ts"],"sourcesContent":["import chalk from 'chalk';\nimport type { CommandModule } from 'yargs';\nimport { callWorkWeb } from '../core/platform/web-discovery.js';\nimport { sessionIdFor } from '../core/sessions/session-id.js';\nimport type { AgentControlWire } from '../core/api-types.js';\nimport { sessionFromArgs, sessionPositionals } from './shared/session-arg.js';\n\n/** `work start` — start a session's agent in the PTY host, resuming its conversation (work web's POST …/agent/start). */\nexport const startCommand: CommandModule = {\n command: 'start [target] [branch]',\n describe: \"Start a session's agent in the background, resuming its conversation (default: the session for this folder)\",\n builder: (yargs) =>\n sessionPositionals(yargs).option('force', {\n type: 'boolean',\n default: false,\n describe: 'Start one even though it runs in a terminal outside work (two would share one conversation)',\n }),\n handler: async (argv) => {\n const s = sessionFromArgs(argv);\n if (!s) return;\n const r = await callWorkWeb<AgentControlWire>(\n 'POST',\n `/api/sessions/${sessionIdFor(s)}/agent/start`,\n { force: argv.force === true },\n 60_000,\n );\n if (!r.ok) {\n console.error(chalk.red(r.error));\n process.exitCode = 1;\n return;\n }\n console.log(\n r.body.how === 'running'\n ? `${s.target} · ${s.branch}: already running`\n : `${s.target} · ${s.branch}: started (\\`work attach\\` to watch it)`,\n );\n },\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/start.ts"],"sourcesContent":["import chalk from 'chalk';\nimport type { CommandModule } from 'yargs';\nimport { callWorkWeb } from '../core/platform/web-discovery.js';\nimport { sessionIdFor } from '../core/sessions/session-id.js';\nimport type { AgentControlWire } from '../core/api-types.js';\nimport { sessionFromArgs, sessionPositionals } from './shared/session-arg.js';\n\n/** `work start` — start a session's agent in the PTY host, resuming its conversation (work web's POST …/agent/start). */\nexport const startCommand: CommandModule = {\n command: 'start [target] [branch]',\n describe: \"Start a session's agent in the background, resuming its conversation (default: the session for this folder)\",\n builder: (yargs) =>\n sessionPositionals(yargs).option('force', {\n type: 'boolean',\n default: false,\n describe: 'Start one even though it runs in a terminal outside work (two would share one conversation)',\n }),\n handler: async (argv) => {\n const s = sessionFromArgs(argv);\n if (!s) return;\n const r = await callWorkWeb<AgentControlWire>(\n 'POST',\n `/api/sessions/${sessionIdFor(s)}/agent/start`,\n { force: argv.force === true },\n 60_000,\n );\n if (!r.ok) {\n console.error(chalk.red(r.error));\n process.exitCode = 1;\n return;\n }\n console.log(\n r.body.how === 'running'\n ? `${s.target} · ${s.branch}: already running`\n : `${s.target} · ${s.branch}: started (\\`work attach\\` to watch it)`,\n );\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,WAAW;AAQX,IAAM,eAA8B;AAAA,EACzC,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS,CAAC,UACR,mBAAmB,KAAK,EAAE,OAAO,SAAS;AAAA,IACxC,MAAM;AAAA,IACN,SAAS;AAAA,IACT,UAAU;AAAA,EACZ,CAAC;AAAA,EACH,SAAS,OAAO,SAAS;AACvB,UAAM,IAAI,gBAAgB,IAAI;AAC9B,QAAI,CAAC,EAAG;AACR,UAAM,IAAI,MAAM;AAAA,MACd;AAAA,MACA,iBAAiB,aAAa,CAAC,CAAC;AAAA,MAChC,EAAE,OAAO,KAAK,UAAU,KAAK;AAAA,MAC7B;AAAA,IACF;AACA,QAAI,CAAC,EAAE,IAAI;AACT,cAAQ,MAAM,MAAM,IAAI,EAAE,KAAK,CAAC;AAChC,cAAQ,WAAW;AACnB;AAAA,IACF;AACA,YAAQ;AAAA,MACN,EAAE,KAAK,QAAQ,YACX,GAAG,EAAE,MAAM,SAAM,EAAE,MAAM,sBACzB,GAAG,EAAE,MAAM,SAAM,EAAE,MAAM;AAAA,IAC/B;AAAA,EACF;AACF;","names":[]}
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
dbPath,
|
|
4
4
|
withDb
|
|
5
5
|
} from "./chunk-ALBTIOP3.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-LXBHVWOY.js";
|
|
7
7
|
import "./chunk-D2J3AD6L.js";
|
|
8
8
|
import "./chunk-5ZCCUM75.js";
|
|
9
9
|
import "./chunk-IAKOKZYW.js";
|
|
@@ -163,4 +163,4 @@ var stateCommand = {
|
|
|
163
163
|
export {
|
|
164
164
|
stateCommand
|
|
165
165
|
};
|
|
166
|
-
//# sourceMappingURL=state-
|
|
166
|
+
//# sourceMappingURL=state-NBSMRUXX.js.map
|
|
@@ -5,16 +5,16 @@ import {
|
|
|
5
5
|
} from "./chunk-UQ35KLHH.js";
|
|
6
6
|
import {
|
|
7
7
|
createCiStore
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-K5U6EWIN.js";
|
|
9
9
|
import {
|
|
10
10
|
branchLine
|
|
11
11
|
} from "./chunk-7E5XPDKX.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-7L4L4Q73.js";
|
|
13
13
|
import {
|
|
14
14
|
sessionBranchesNow
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-WUUZF4MY.js";
|
|
16
16
|
import "./chunk-FGPXMAYU.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-2SHSB7JN.js";
|
|
18
18
|
import "./chunk-XBWS77S2.js";
|
|
19
19
|
import "./chunk-4CXUVBOD.js";
|
|
20
20
|
import {
|
|
@@ -22,14 +22,14 @@ import {
|
|
|
22
22
|
getSessionsForTarget,
|
|
23
23
|
loadHistory,
|
|
24
24
|
prunePersistedStaleEntries
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-HN6ZSSPR.js";
|
|
26
26
|
import "./chunk-NEJVK5CF.js";
|
|
27
27
|
import {
|
|
28
28
|
sessionIdFor
|
|
29
29
|
} from "./chunk-ALBTIOP3.js";
|
|
30
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-DJDI5OPO.js";
|
|
31
31
|
import "./chunk-KGHWHAVF.js";
|
|
32
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-NFM4NGTI.js";
|
|
33
33
|
import "./chunk-YQSWVHKK.js";
|
|
34
34
|
import {
|
|
35
35
|
getCurrentBranch,
|
|
@@ -37,13 +37,14 @@ import {
|
|
|
37
37
|
getUnpushedCommits,
|
|
38
38
|
isBranchMerged
|
|
39
39
|
} from "./chunk-JYWX2N5W.js";
|
|
40
|
+
import "./chunk-Z6ACV5ZQ.js";
|
|
40
41
|
import "./chunk-JUGF3YE7.js";
|
|
41
42
|
import "./chunk-HK6AZQ5Z.js";
|
|
42
|
-
import "./chunk-
|
|
43
|
+
import "./chunk-2YGVF224.js";
|
|
43
44
|
import {
|
|
44
45
|
ensureConfig
|
|
45
|
-
} from "./chunk-
|
|
46
|
-
import "./chunk-
|
|
46
|
+
} from "./chunk-LXBHVWOY.js";
|
|
47
|
+
import "./chunk-W4GDPHIF.js";
|
|
47
48
|
import "./chunk-BR6OWWAA.js";
|
|
48
49
|
import "./chunk-VHENFC2S.js";
|
|
49
50
|
import "./chunk-QOSAWNOU.js";
|
|
@@ -150,4 +151,4 @@ function printSessionStatus(session) {
|
|
|
150
151
|
export {
|
|
151
152
|
statusCommand
|
|
152
153
|
};
|
|
153
|
-
//# sourceMappingURL=status-
|
|
154
|
+
//# sourceMappingURL=status-S2WZCF4J.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/status.ts"],"sourcesContent":["import fs from 'node:fs';\nimport chalk from 'chalk';\nimport type { CommandModule } from 'yargs';\nimport { ensureConfig } from '../core/platform/config.js';\nimport { loadHistory, getSessionsForTarget, prunePersistedStaleEntries, type WorktreeSession } from '../core/sessions/history.js';\nimport { effectiveLastAccessedAt } from '../core/sessions/session-activity.js';\nimport { getStatus, getUnpushedCommits, isBranchMerged, getCurrentBranch } from '../core/git/git.js';\nimport { timeAgo, shortDateTime } from '../core/platform/format.js';\nimport { sessionBranchesNow } from '../core/stacks/branch-facts.js';\nimport { createCiStore } from '../core/pr/pr-watch-store.js';\nimport { sessionIdFor } from '../core/sessions/session-id.js';\nimport { branchLine } from '../core/sessions/branch-view.js';\n\nexport const statusCommand: CommandModule = {\n command: 'status [target] [branch]',\n describe: 'Show status of tracked worktrees',\n builder: (yargs) =>\n yargs\n .positional('target', {\n describe: 'Filter by project alias or group name',\n type: 'string',\n })\n .positional('branch', {\n describe: 'Filter by branch name',\n type: 'string',\n })\n .option('prune', {\n describe: 'Remove entries whose worktree paths no longer exist',\n type: 'boolean',\n default: false,\n }),\n handler: async (argv) => {\n const target = argv.target as string | undefined;\n const branch = argv.branch as string | undefined;\n const prune = argv.prune as boolean;\n\n ensureConfig();\n\n if (prune) {\n const { pruned } = await prunePersistedStaleEntries();\n if (pruned > 0) {\n console.log(chalk.green(`Pruned ${pruned} stale session(s).`));\n } else {\n console.log('No stale sessions to prune.');\n }\n }\n\n let sessions = loadHistory();\n\n if (target) {\n sessions = getSessionsForTarget(sessions, target);\n }\n if (branch) {\n sessions = sessions.filter((s) => s.branch === branch);\n }\n\n if (sessions.length === 0) {\n console.log(chalk.yellow('No tracked worktree sessions found.'));\n return;\n }\n\n console.log('');\n console.log(chalk.cyan('Worktree Status'));\n console.log(chalk.cyan('==============='));\n console.log('');\n\n const checks = new Map(createCiStore().load());\n for (const session of sessions) {\n printSessionStatus(session);\n // Every branch it worked on, when more than one (session-branches.ts).\n const branches = await sessionBranchesNow(session, checks.get(sessionIdFor(session))).catch(() => null);\n if (branches?.length) {\n console.log(chalk.gray(' Branches:'));\n for (const b of branches) console.log(` ${b.repo === session.target ? '' : `${b.repo}: `}${branchLine(b)}`);\n console.log('');\n }\n }\n },\n};\n\nfunction printSessionStatus(session: WorktreeSession): void {\n const typeLabel = session.isGroup ? chalk.magenta('[group]') : chalk.blue('[repo]');\n console.log(`${typeLabel} ${chalk.green(session.target)} ${chalk.white(session.branch)}`);\n\n // Check if paths exist\n const existingPaths = session.paths.filter((p) => fs.existsSync(p));\n if (existingPaths.length === 0) {\n console.log(chalk.red(' Path(s) no longer exist on disk'));\n console.log(chalk.gray(` Created: ${shortDateTime(session.createdAt)} Last used: ${timeAgo(effectiveLastAccessedAt(session))}`));\n console.log('');\n return;\n }\n\n // For each existing path, gather git info\n for (const wtPath of existingPaths) {\n const branch = getCurrentBranch(wtPath);\n if (!branch) continue;\n\n const { merged } = isBranchMerged(branch, wtPath);\n const changes = getStatus(wtPath);\n const unpushed = getUnpushedCommits(wtPath);\n\n const changeCount = changes ? changes.split('\\n').filter((l) => l.trim()).length : 0;\n const unpushedCount = unpushed ? unpushed.split('\\n').filter((l) => l.trim()).length : 0;\n\n const mergedTag = merged ? chalk.green(' [merged]') : '';\n\n const parts: string[] = [];\n if (changeCount > 0) {\n parts.push(chalk.yellow(`${changeCount} uncommitted`));\n }\n if (unpushedCount > 0) {\n parts.push(chalk.yellow(`${unpushedCount} unpushed`));\n }\n\n const statusLine = parts.length > 0 ? parts.join(', ') : chalk.green('clean');\n\n if (existingPaths.length > 1) {\n console.log(chalk.gray(` ${wtPath}`));\n console.log(` ${statusLine}${mergedTag}`);\n } else {\n console.log(` ${statusLine}${mergedTag}`);\n console.log(chalk.gray(` ${wtPath}`));\n }\n }\n\n console.log(chalk.gray(` Created: ${shortDateTime(session.createdAt)} Last used: ${timeAgo(effectiveLastAccessedAt(session))}`));\n console.log('');\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/status.ts"],"sourcesContent":["import fs from 'node:fs';\nimport chalk from 'chalk';\nimport type { CommandModule } from 'yargs';\nimport { ensureConfig } from '../core/platform/config.js';\nimport { loadHistory, getSessionsForTarget, prunePersistedStaleEntries, type WorktreeSession } from '../core/sessions/history.js';\nimport { effectiveLastAccessedAt } from '../core/sessions/session-activity.js';\nimport { getStatus, getUnpushedCommits, isBranchMerged, getCurrentBranch } from '../core/git/git.js';\nimport { timeAgo, shortDateTime } from '../core/platform/format.js';\nimport { sessionBranchesNow } from '../core/stacks/branch-facts.js';\nimport { createCiStore } from '../core/pr/pr-watch-store.js';\nimport { sessionIdFor } from '../core/sessions/session-id.js';\nimport { branchLine } from '../core/sessions/branch-view.js';\n\nexport const statusCommand: CommandModule = {\n command: 'status [target] [branch]',\n describe: 'Show status of tracked worktrees',\n builder: (yargs) =>\n yargs\n .positional('target', {\n describe: 'Filter by project alias or group name',\n type: 'string',\n })\n .positional('branch', {\n describe: 'Filter by branch name',\n type: 'string',\n })\n .option('prune', {\n describe: 'Remove entries whose worktree paths no longer exist',\n type: 'boolean',\n default: false,\n }),\n handler: async (argv) => {\n const target = argv.target as string | undefined;\n const branch = argv.branch as string | undefined;\n const prune = argv.prune as boolean;\n\n ensureConfig();\n\n if (prune) {\n const { pruned } = await prunePersistedStaleEntries();\n if (pruned > 0) {\n console.log(chalk.green(`Pruned ${pruned} stale session(s).`));\n } else {\n console.log('No stale sessions to prune.');\n }\n }\n\n let sessions = loadHistory();\n\n if (target) {\n sessions = getSessionsForTarget(sessions, target);\n }\n if (branch) {\n sessions = sessions.filter((s) => s.branch === branch);\n }\n\n if (sessions.length === 0) {\n console.log(chalk.yellow('No tracked worktree sessions found.'));\n return;\n }\n\n console.log('');\n console.log(chalk.cyan('Worktree Status'));\n console.log(chalk.cyan('==============='));\n console.log('');\n\n const checks = new Map(createCiStore().load());\n for (const session of sessions) {\n printSessionStatus(session);\n // Every branch it worked on, when more than one (session-branches.ts).\n const branches = await sessionBranchesNow(session, checks.get(sessionIdFor(session))).catch(() => null);\n if (branches?.length) {\n console.log(chalk.gray(' Branches:'));\n for (const b of branches) console.log(` ${b.repo === session.target ? '' : `${b.repo}: `}${branchLine(b)}`);\n console.log('');\n }\n }\n },\n};\n\nfunction printSessionStatus(session: WorktreeSession): void {\n const typeLabel = session.isGroup ? chalk.magenta('[group]') : chalk.blue('[repo]');\n console.log(`${typeLabel} ${chalk.green(session.target)} ${chalk.white(session.branch)}`);\n\n // Check if paths exist\n const existingPaths = session.paths.filter((p) => fs.existsSync(p));\n if (existingPaths.length === 0) {\n console.log(chalk.red(' Path(s) no longer exist on disk'));\n console.log(chalk.gray(` Created: ${shortDateTime(session.createdAt)} Last used: ${timeAgo(effectiveLastAccessedAt(session))}`));\n console.log('');\n return;\n }\n\n // For each existing path, gather git info\n for (const wtPath of existingPaths) {\n const branch = getCurrentBranch(wtPath);\n if (!branch) continue;\n\n const { merged } = isBranchMerged(branch, wtPath);\n const changes = getStatus(wtPath);\n const unpushed = getUnpushedCommits(wtPath);\n\n const changeCount = changes ? changes.split('\\n').filter((l) => l.trim()).length : 0;\n const unpushedCount = unpushed ? unpushed.split('\\n').filter((l) => l.trim()).length : 0;\n\n const mergedTag = merged ? chalk.green(' [merged]') : '';\n\n const parts: string[] = [];\n if (changeCount > 0) {\n parts.push(chalk.yellow(`${changeCount} uncommitted`));\n }\n if (unpushedCount > 0) {\n parts.push(chalk.yellow(`${unpushedCount} unpushed`));\n }\n\n const statusLine = parts.length > 0 ? parts.join(', ') : chalk.green('clean');\n\n if (existingPaths.length > 1) {\n console.log(chalk.gray(` ${wtPath}`));\n console.log(` ${statusLine}${mergedTag}`);\n } else {\n console.log(` ${statusLine}${mergedTag}`);\n console.log(chalk.gray(` ${wtPath}`));\n }\n }\n\n console.log(chalk.gray(` Created: ${shortDateTime(session.createdAt)} Last used: ${timeAgo(effectiveLastAccessedAt(session))}`));\n console.log('');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ;AACf,OAAO,WAAW;AAYX,IAAM,gBAA+B;AAAA,EAC1C,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS,CAAC,UACR,MACG,WAAW,UAAU;AAAA,IACpB,UAAU;AAAA,IACV,MAAM;AAAA,EACR,CAAC,EACA,WAAW,UAAU;AAAA,IACpB,UAAU;AAAA,IACV,MAAM;AAAA,EACR,CAAC,EACA,OAAO,SAAS;AAAA,IACf,UAAU;AAAA,IACV,MAAM;AAAA,IACN,SAAS;AAAA,EACX,CAAC;AAAA,EACL,SAAS,OAAO,SAAS;AACvB,UAAM,SAAS,KAAK;AACpB,UAAM,SAAS,KAAK;AACpB,UAAM,QAAQ,KAAK;AAEnB,iBAAa;AAEb,QAAI,OAAO;AACT,YAAM,EAAE,OAAO,IAAI,MAAM,2BAA2B;AACpD,UAAI,SAAS,GAAG;AACd,gBAAQ,IAAI,MAAM,MAAM,UAAU,MAAM,oBAAoB,CAAC;AAAA,MAC/D,OAAO;AACL,gBAAQ,IAAI,6BA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AM,KAAK,cAAc,cAAc,QAAQ,SAAS,CAAC,gBAAgB,QAAQ,wBAAwB,OAAO,CAAC,CAAC,EAAE,CAAC;AACjI,UAAQ,IAAI,EAAE;AAChB;","names":[]}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
setUpAccounts
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-2YGVF224.js";
|
|
5
|
+
import "./chunk-LXBHVWOY.js";
|
|
6
6
|
import {
|
|
7
7
|
isOurs,
|
|
8
8
|
readSaved,
|
|
9
9
|
savedPath
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-W4GDPHIF.js";
|
|
11
11
|
import "./chunk-BR6OWWAA.js";
|
|
12
12
|
import "./chunk-VHENFC2S.js";
|
|
13
13
|
import "./chunk-QOSAWNOU.js";
|
|
@@ -65,4 +65,4 @@ export {
|
|
|
65
65
|
unwrapAllStatusLines,
|
|
66
66
|
unwrapStatusLine
|
|
67
67
|
};
|
|
68
|
-
//# sourceMappingURL=statusline-
|
|
68
|
+
//# sourceMappingURL=statusline-QZKHVDHR.js.map
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
branchFromHead,
|
|
4
|
+
gitDirs
|
|
5
|
+
} from "./chunk-Z6ACV5ZQ.js";
|
|
6
|
+
import {
|
|
7
|
+
recordReading
|
|
8
|
+
} from "./chunk-JUGF3YE7.js";
|
|
9
|
+
import {
|
|
10
|
+
NESTED_ENV,
|
|
11
|
+
runStatusLineCommand,
|
|
12
|
+
userStatusLine
|
|
13
|
+
} from "./chunk-W4GDPHIF.js";
|
|
14
|
+
import {
|
|
15
|
+
accountOf,
|
|
16
|
+
parseClaudeRateLimits
|
|
17
|
+
} from "./chunk-BR6OWWAA.js";
|
|
18
|
+
import "./chunk-VHENFC2S.js";
|
|
19
|
+
import "./chunk-QOSAWNOU.js";
|
|
20
|
+
import "./chunk-D2J3AD6L.js";
|
|
21
|
+
import {
|
|
22
|
+
debugLog
|
|
23
|
+
} from "./chunk-IAKOKZYW.js";
|
|
24
|
+
import {
|
|
25
|
+
configDirPath
|
|
26
|
+
} from "./chunk-F2ECTTSY.js";
|
|
27
|
+
|
|
28
|
+
// src/core/agents/claude/statusline-hook.ts
|
|
29
|
+
import fs2 from "fs";
|
|
30
|
+
|
|
31
|
+
// src/core/agents/claude/work-line.ts
|
|
32
|
+
import fs from "fs";
|
|
33
|
+
import os from "os";
|
|
34
|
+
import path from "path";
|
|
35
|
+
function readLineConfig(file = path.join(configDirPath(), "config.json")) {
|
|
36
|
+
try {
|
|
37
|
+
const v = JSON.parse(fs.readFileSync(file, "utf-8"));
|
|
38
|
+
if (typeof v !== "object" || v === null || Array.isArray(v)) return { choice: null, accounts: {} };
|
|
39
|
+
const raw = v;
|
|
40
|
+
const choice = raw.claudeStatusLine === "work" || raw.claudeStatusLine === "own" ? raw.claudeStatusLine : null;
|
|
41
|
+
const accounts = {};
|
|
42
|
+
const given = raw.claudeAccounts;
|
|
43
|
+
if (typeof given === "object" && given !== null && !Array.isArray(given)) {
|
|
44
|
+
for (const [name, dir] of Object.entries(given)) if (typeof dir === "string" && dir) accounts[name] = dir;
|
|
45
|
+
}
|
|
46
|
+
return { choice, accounts };
|
|
47
|
+
} catch {
|
|
48
|
+
return { choice: null, accounts: {} };
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
var samePath = (a, b, platform) => {
|
|
52
|
+
const norm = (p) => {
|
|
53
|
+
const r = path.resolve(p);
|
|
54
|
+
return platform === "win32" ? r.toLowerCase() : r;
|
|
55
|
+
};
|
|
56
|
+
return norm(a) === norm(b);
|
|
57
|
+
};
|
|
58
|
+
function accountLabel(configDir, accounts, home = os.homedir(), platform = process.platform) {
|
|
59
|
+
const several = Object.keys(accounts).length > 0;
|
|
60
|
+
if (!configDir || samePath(configDir, path.join(home, ".claude"), platform)) return several || configDir ? "default" : null;
|
|
61
|
+
const named = Object.entries(accounts).find(([, dir]) => samePath(dir.replace(/^~(?=$|[\\/])/, home), configDir, platform));
|
|
62
|
+
if (named) return named[0];
|
|
63
|
+
return path.basename(path.resolve(configDir)).replace(/^\.claude-/, "") || "default";
|
|
64
|
+
}
|
|
65
|
+
function branchLabel(dir) {
|
|
66
|
+
for (let at = path.resolve(dir); ; ) {
|
|
67
|
+
const dirs = gitDirs(at);
|
|
68
|
+
if (dirs) {
|
|
69
|
+
try {
|
|
70
|
+
const head = fs.readFileSync(path.join(dirs.gitDir, "HEAD"), "utf8");
|
|
71
|
+
return branchFromHead(head) ?? (/^[0-9a-f]{7,}/.exec(head.trim())?.[0].slice(0, 7) || null);
|
|
72
|
+
} catch {
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
const up = path.dirname(at);
|
|
77
|
+
if (up === at) return null;
|
|
78
|
+
at = up;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
function folderLabel(dir, home = os.homedir()) {
|
|
82
|
+
const rel = path.relative(home, dir);
|
|
83
|
+
if (rel.startsWith("..") || path.isAbsolute(rel)) return dir;
|
|
84
|
+
return rel === "" ? "~" : `~/${rel.split(path.sep).join("/")}`;
|
|
85
|
+
}
|
|
86
|
+
var color = (code, text) => `\x1B[${code}m${text}\x1B[0m`;
|
|
87
|
+
function workStatusLine(input, o = {}) {
|
|
88
|
+
const home = o.home ?? os.homedir();
|
|
89
|
+
const platform = o.platform ?? process.platform;
|
|
90
|
+
const model = input?.model;
|
|
91
|
+
const ws = input?.workspace;
|
|
92
|
+
const ctx = input?.context_window;
|
|
93
|
+
const name = typeof model?.display_name === "string" && model.display_name.trim() ? model.display_name.trim() : null;
|
|
94
|
+
const dir = [ws?.current_dir, input?.cwd].find((d) => typeof d === "string" && d.length > 0) ?? null;
|
|
95
|
+
const used = typeof ctx?.used_percentage === "number" && Number.isFinite(ctx.used_percentage) ? Math.round(ctx.used_percentage) : null;
|
|
96
|
+
const parts = [];
|
|
97
|
+
if (name) parts.push(used === null ? color("0;36", name) : `${color("0;36", name)} ${color("0;32", `(${used}%)`)}`);
|
|
98
|
+
const account = accountLabel(o.configDir, o.accounts ?? {}, home, platform);
|
|
99
|
+
if (account) parts.push(color("0;34", account));
|
|
100
|
+
if (dir) {
|
|
101
|
+
parts.push(color("0;33", folderLabel(dir, home)));
|
|
102
|
+
const branch = branchLabel(dir);
|
|
103
|
+
if (branch) parts.push(color("0;35", branch));
|
|
104
|
+
}
|
|
105
|
+
return parts.join(" ");
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// src/core/agents/claude/statusline-hook.ts
|
|
109
|
+
var INPUT_CAP = 1e6;
|
|
110
|
+
async function runStatusLineHook(o = {}) {
|
|
111
|
+
const stdin = o.stdin ?? process.stdin;
|
|
112
|
+
const stdout = o.stdout ?? process.stdout;
|
|
113
|
+
const env = o.env ?? process.env;
|
|
114
|
+
stdout.on("error", () => {
|
|
115
|
+
});
|
|
116
|
+
try {
|
|
117
|
+
const chunks = [];
|
|
118
|
+
let size = 0;
|
|
119
|
+
for await (const chunk of stdin) {
|
|
120
|
+
const b = typeof chunk === "string" ? Buffer.from(chunk) : Buffer.from(chunk);
|
|
121
|
+
chunks.push(b);
|
|
122
|
+
size += b.length;
|
|
123
|
+
if (size > INPUT_CAP) break;
|
|
124
|
+
}
|
|
125
|
+
const raw = Buffer.concat(chunks).toString("utf-8");
|
|
126
|
+
let input = null;
|
|
127
|
+
try {
|
|
128
|
+
const v = JSON.parse(raw);
|
|
129
|
+
if (typeof v === "object" && v !== null && !Array.isArray(v)) input = v;
|
|
130
|
+
} catch {
|
|
131
|
+
}
|
|
132
|
+
if (input) {
|
|
133
|
+
const limits = parseClaudeRateLimits(input.rate_limits);
|
|
134
|
+
const given = input.rate_limits;
|
|
135
|
+
if (limits.length === 0 && typeof given === "object" && given !== null && Object.keys(given).length > 0)
|
|
136
|
+
debugLog("WARN", `[statusline] rate_limits not understood; keys: ${Object.keys(given).join(", ")}`);
|
|
137
|
+
recordReading("claude", accountOf(env.CLAUDE_CONFIG_DIR), limits);
|
|
138
|
+
}
|
|
139
|
+
if (env[NESTED_ENV]) return;
|
|
140
|
+
const line = readLineConfig(o.configFile);
|
|
141
|
+
if (line.choice === "work") {
|
|
142
|
+
stdout.write(workStatusLine(input, { configDir: env.CLAUDE_CONFIG_DIR, accounts: line.accounts }));
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
const ws = input?.workspace;
|
|
146
|
+
const dir = [input?.cwd, ws?.current_dir].find((d) => typeof d === "string" && fs2.existsSync(d));
|
|
147
|
+
const projectDir = [ws?.project_dir, dir].find((d) => typeof d === "string" && d.length > 0);
|
|
148
|
+
const orig = userStatusLine({
|
|
149
|
+
configDir: env.CLAUDE_CONFIG_DIR,
|
|
150
|
+
...projectDir ? { projectDir } : {},
|
|
151
|
+
onDamage: (why) => debugLog("WARN", `[statusline] saved status line unreadable: ${why}`)
|
|
152
|
+
});
|
|
153
|
+
if (!orig) return;
|
|
154
|
+
stdout.write(await runStatusLineCommand(orig.command, raw, { cwd: dir }));
|
|
155
|
+
} catch (e) {
|
|
156
|
+
debugLog("WARN", `[statusline] ${e instanceof Error ? e.message : String(e)}`);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
export {
|
|
160
|
+
runStatusLineHook
|
|
161
|
+
};
|
|
162
|
+
//# sourceMappingURL=statusline-hook-Q645N4XF.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/agents/claude/statusline-hook.ts","../src/core/agents/claude/work-line.ts"],"sourcesContent":["import fs from 'node:fs';\nimport { recordReading } from '../../usage/usage-store.js';\nimport { debugLog } from '../../platform/logger.js';\nimport { accountOf, parseClaudeRateLimits } from './rate-limits.js';\nimport { NESTED_ENV, runStatusLineCommand, userStatusLine } from './statusline-run.js';\nimport { readLineConfig, workStatusLine } from './work-line.js';\n\n/** More than any status-line input: the rest is not read. */\nconst INPUT_CAP = 1_000_000;\n\n/**\n * Claude's status line command, `work hook statusline` (bin.ts loads this module and nothing else of the CLI;\n * session-settings.ts gives it to the Claudes work starts): keep the rate limits it sends, then show what the user's own status line prints.\n * It is Claude's screen, so nothing else is ever written — not even an error (those go to the debug log).\n */\nexport async function runStatusLineHook(\n o: { stdin?: NodeJS.ReadableStream; stdout?: NodeJS.WritableStream; env?: NodeJS.ProcessEnv; configFile?: string } = {},\n): Promise<void> {\n const stdin = o.stdin ?? process.stdin;\n const stdout = o.stdout ?? process.stdout;\n const env = o.env ?? process.env;\n // Claude may close the pipe before we write (a refresh replaced this one): EPIPE is nothing to report.\n stdout.on('error', () => {});\n try {\n // Bytes, decoded once: a character can be cut in two between chunks.\n const chunks: Buffer[] = [];\n let size = 0;\n for await (const chunk of stdin) {\n const b = typeof chunk === 'string' ? Buffer.from(chunk) : Buffer.from(chunk as Uint8Array);\n chunks.push(b);\n size += b.length;\n if (size > INPUT_CAP) break;\n }\n const raw = Buffer.concat(chunks).toString('utf-8');\n let input: Record<string, unknown> | null = null;\n try {\n const v: unknown = JSON.parse(raw);\n if (typeof v === 'object' && v !== null && !Array.isArray(v)) input = v as Record<string, unknown>;\n } catch {\n /* not JSON: nothing to record, the user's own line still runs */\n }\n if (input) {\n const limits = parseClaudeRateLimits(input.rate_limits);\n const given = input.rate_limits;\n // Limits given in a shape the parser doesn't know (a Claude Code update): say so in the log, once per refresh.\n if (limits.length === 0 && typeof given === 'object' && given !== null && Object.keys(given).length > 0)\n debugLog('WARN', `[statusline] rate_limits not understood; keys: ${Object.keys(given).join(', ')}`);\n recordReading('claude', accountOf(env.CLAUDE_CONFIG_DIR), limits);\n }\n // Run by the user's own command (it calls work's hook itself): running it again would never end.\n if (env[NESTED_ENV]) return;\n // work's own line, when chosen over the user's: drawn here, nothing started.\n const line = readLineConfig(o.configFile);\n if (line.choice === 'work') {\n stdout.write(workStatusLine(input, { configDir: env.CLAUDE_CONFIG_DIR, accounts: line.accounts }));\n return;\n }\n const ws = input?.workspace as { current_dir?: unknown; project_dir?: unknown } | undefined;\n const dir = [input?.cwd, ws?.current_dir].find((d): d is string => typeof d === 'string' && fs.existsSync(d));\n const projectDir = [ws?.project_dir, dir].find((d): d is string => typeof d === 'string' && d.length > 0);\n // The user's own line, as Claude Code would show it without work's (its environment names the account's folder).\n const orig = userStatusLine({\n configDir: env.CLAUDE_CONFIG_DIR,\n ...(projectDir ? { projectDir } : {}),\n onDamage: (why) => debugLog('WARN', `[statusline] saved status line unreadable: ${why}`),\n });\n if (!orig) return;\n stdout.write(await runStatusLineCommand(orig.command, raw, { cwd: dir }));\n } catch (e) {\n debugLog('WARN', `[statusline] ${e instanceof Error ? e.message : String(e)}`);\n }\n}\n","import fs from 'node:fs';\nimport os from 'node:os';\nimport path from 'node:path';\nimport { configDirPath } from '../../platform/config-dir.js';\nimport { gitDirs, branchFromHead } from '../../git/git-head.js';\n\n/**\n * work's own status line, for whoever chose it over theirs (config `claudeStatusLine: \"work\"`; the Settings page and\n * the dashboard's one-time question): the model with how full its context is, the Claude account, the folder and the\n * branch. Drawn inside the status-line hook (statusline-hook.ts) from what Claude Code gives it and from files: no\n * shell, no `jq`, no `git` — each program started costs up to a second on a busy Windows machine, every refresh of\n * every Claude. It loads only what the hook may (tests/architecture/hook-imports.test.ts): never config.ts, so\n * config.json is read here as plain JSON.\n */\n\n/** What the line needs from config.json. `choice` null: never asked (the user's own line shows, as before). */\nexport interface LineConfig {\n choice: 'work' | 'own' | null;\n /** `claudeAccounts`: name → folder. */\n accounts: Record<string, string>;\n}\n\n/** `claudeStatusLine` and `claudeAccounts`, read plainly; a missing or broken file reads as nothing chosen. */\nexport function readLineConfig(file: string = path.join(configDirPath(), 'config.json')): LineConfig {\n try {\n const v: unknown = JSON.parse(fs.readFileSync(file, 'utf-8'));\n if (typeof v !== 'object' || v === null || Array.isArray(v)) return { choice: null, accounts: {} };\n const raw = v as Record<string, unknown>;\n const choice = raw.claudeStatusLine === 'work' || raw.claudeStatusLine === 'own' ? raw.claudeStatusLine : null;\n const accounts: Record<string, string> = {};\n const given = raw.claudeAccounts;\n if (typeof given === 'object' && given !== null && !Array.isArray(given))\n for (const [name, dir] of Object.entries(given)) if (typeof dir === 'string' && dir) accounts[name] = dir;\n return { choice, accounts };\n } catch {\n return { choice: null, accounts: {} };\n }\n}\n\nconst samePath = (a: string, b: string, platform: NodeJS.Platform) => {\n const norm = (p: string) => {\n const r = path.resolve(p);\n return platform === 'win32' ? r.toLowerCase() : r;\n };\n return norm(a) === norm(b);\n};\n\n/**\n * The account's name: `default` for ~/.claude, its name in `claudeAccounts`, else its folder's name (`.claude-x` → `x`).\n * Null when there is only the one account (no `claudeAccounts`, no CLAUDE_CONFIG_DIR): nothing to tell apart.\n */\nexport function accountLabel(\n configDir: string | undefined,\n accounts: Record<string, string>,\n home: string = os.homedir(),\n platform: NodeJS.Platform = process.platform,\n): string | null {\n const several = Object.keys(accounts).length > 0;\n if (!configDir || samePath(configDir, path.join(home, '.claude'), platform)) return several || configDir ? 'default' : null;\n const named = Object.entries(accounts).find(([, dir]) => samePath(dir.replace(/^~(?=$|[\\\\/])/, home), configDir, platform));\n if (named) return named[0];\n return path.basename(path.resolve(configDir)).replace(/^\\.claude-/, '') || 'default';\n}\n\n/** The branch of the checkout `dir` is in (its nearest folder with a `.git`), or the short commit when detached; null outside one. */\nexport function branchLabel(dir: string): string | null {\n for (let at = path.resolve(dir); ;) {\n const dirs = gitDirs(at);\n if (dirs) {\n try {\n const head = fs.readFileSync(path.join(dirs.gitDir, 'HEAD'), 'utf8');\n return branchFromHead(head) ?? (/^[0-9a-f]{7,}/.exec(head.trim())?.[0].slice(0, 7) || null);\n } catch {\n return null;\n }\n }\n const up = path.dirname(at);\n if (up === at) return null;\n at = up;\n }\n}\n\n/** The folder as the line shows it: under home as `~/…`. */\nexport function folderLabel(dir: string, home: string = os.homedir()): string {\n // Another drive comes back absolute; a folder beside home starts with `..`.\n const rel = path.relative(home, dir);\n if (rel.startsWith('..') || path.isAbsolute(rel)) return dir;\n return rel === '' ? '~' : `~/${rel.split(path.sep).join('/')}`;\n}\n\nconst color = (code: string, text: string) => `\\x1b[${code}m${text}\\x1b[0m`;\n\n/** The line for Claude's status-line input: `Opus (42%) admin ~/source/repos/x main`, each part in its colour. */\nexport function workStatusLine(\n input: Record<string, unknown> | null,\n o: { configDir?: string; accounts?: Record<string, string>; home?: string; platform?: NodeJS.Platform } = {},\n): string {\n const home = o.home ?? os.homedir();\n const platform = o.platform ?? process.platform;\n const model = input?.model as { display_name?: unknown } | undefined;\n const ws = input?.workspace as { current_dir?: unknown } | undefined;\n const ctx = input?.context_window as { used_percentage?: unknown } | undefined;\n const name = typeof model?.display_name === 'string' && model.display_name.trim() ? model.display_name.trim() : null;\n const dir = [ws?.current_dir, input?.cwd].find((d): d is string => typeof d === 'string' && d.length > 0) ?? null;\n const used = typeof ctx?.used_percentage === 'number' && Number.isFinite(ctx.used_percentage) ? Math.round(ctx.used_percentage) : null;\n\n const parts: string[] = [];\n if (name) parts.push(used === null ? color('0;36', name) : `${color('0;36', name)} ${color('0;32', `(${used}%)`)}`);\n const account = accountLabel(o.configDir, o.accounts ?? {}, home, platform);\n if (account) parts.push(color('0;34', account));\n if (dir) {\n parts.push(color('0;33', folderLabel(dir, home)));\n const branch = branchLabel(dir);\n if (branch) parts.push(color('0;35', branch));\n }\n return parts.join(' ');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAOA,SAAQ;;;ACAf,OAAO,QAAQ;AACf,OAAO,QAAQ;AACf,OAAO,UAAU;AAqBV,SAAS,eAAe,OAAe,KAAK,KAAK,cAAc,GAAG,aAAa,GAAe;AACnG,MAAI;AACF,UAAM,IAAa,KAAK,MAAM,GAAG,aAAa,MAAM,OAAO,CAAC;AAC5D,QAAI,OAAO,MAAM,YAAY,MAAM,QAAQ,MAAM,QAAQ,CAAC,EAAG,QAAO,EAAE,QAAQ,MAAM,UAAU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|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-IHYPHX2Z.js";
|
|
6
6
|
import "./chunk-6AQRYLOB.js";
|
|
7
7
|
import {
|
|
8
8
|
callWorkWeb
|
|
9
9
|
} from "./chunk-SZAD5U3J.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-YOBBM2DF.js";
|
|
11
11
|
import "./chunk-ZSHWP2VS.js";
|
|
12
12
|
import "./chunk-CNZV3UCM.js";
|
|
13
13
|
import "./chunk-HUXS3VAI.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-HN6ZSSPR.js";
|
|
15
15
|
import "./chunk-NEJVK5CF.js";
|
|
16
16
|
import {
|
|
17
17
|
sessionIdFor
|
|
18
18
|
} from "./chunk-ALBTIOP3.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-DJDI5OPO.js";
|
|
20
20
|
import "./chunk-KGHWHAVF.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-NFM4NGTI.js";
|
|
22
22
|
import "./chunk-YQSWVHKK.js";
|
|
23
|
+
import "./chunk-Z6ACV5ZQ.js";
|
|
23
24
|
import "./chunk-JUGF3YE7.js";
|
|
24
25
|
import "./chunk-HK6AZQ5Z.js";
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-2YGVF224.js";
|
|
27
|
+
import "./chunk-LXBHVWOY.js";
|
|
28
|
+
import "./chunk-W4GDPHIF.js";
|
|
28
29
|
import "./chunk-BR6OWWAA.js";
|
|
29
30
|
import "./chunk-VHENFC2S.js";
|
|
30
31
|
import "./chunk-QOSAWNOU.js";
|
|
@@ -54,4 +55,4 @@ var stopCommand = {
|
|
|
54
55
|
export {
|
|
55
56
|
stopCommand
|
|
56
57
|
};
|
|
57
|
-
//# sourceMappingURL=stop-
|
|
58
|
+
//# sourceMappingURL=stop-KSOAPWKH.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/stop.ts"],"sourcesContent":["import chalk from 'chalk';\nimport type { CommandModule } from 'yargs';\nimport { callWorkWeb } from '../core/platform/web-discovery.js';\nimport { sessionIdFor } from '../core/sessions/session-id.js';\nimport type { AgentControlWire } from '../core/api-types.js';\nimport { sessionFromArgs, sessionPositionals } from './shared/session-arg.js';\n\n/** `work stop` — stop a session's agent in the PTY host; its conversation is kept, and opening the session resumes it (POST …/agent/stop). */\nexport const stopCommand: CommandModule = {\n command: 'stop [target] [branch]',\n describe: \"Stop a session's agent (its conversation is kept; opening the session resumes it)\",\n builder: (yargs) => sessionPositionals(yargs),\n handler: async (argv) => {\n const s = sessionFromArgs(argv);\n if (!s) return;\n const r = await callWorkWeb<AgentControlWire>('POST', `/api/sessions/${sessionIdFor(s)}/agent/stop`, {});\n if (!r.ok) {\n console.error(chalk.red(r.error));\n process.exitCode = 1;\n return;\n }\n console.log(r.body.how === 'not-running' ? `${s.target} · ${s.branch}: not running` : `${s.target} · ${s.branch}: stopped`);\n },\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/stop.ts"],"sourcesContent":["import chalk from 'chalk';\nimport type { CommandModule } from 'yargs';\nimport { callWorkWeb } from '../core/platform/web-discovery.js';\nimport { sessionIdFor } from '../core/sessions/session-id.js';\nimport type { AgentControlWire } from '../core/api-types.js';\nimport { sessionFromArgs, sessionPositionals } from './shared/session-arg.js';\n\n/** `work stop` — stop a session's agent in the PTY host; its conversation is kept, and opening the session resumes it (POST …/agent/stop). */\nexport const stopCommand: CommandModule = {\n command: 'stop [target] [branch]',\n describe: \"Stop a session's agent (its conversation is kept; opening the session resumes it)\",\n builder: (yargs) => sessionPositionals(yargs),\n handler: async (argv) => {\n const s = sessionFromArgs(argv);\n if (!s) return;\n const r = await callWorkWeb<AgentControlWire>('POST', `/api/sessions/${sessionIdFor(s)}/agent/stop`, {});\n if (!r.ok) {\n console.error(chalk.red(r.error));\n process.exitCode = 1;\n return;\n }\n console.log(r.body.how === 'not-running' ? `${s.target} · ${s.branch}: not running` : `${s.target} · ${s.branch}: stopped`);\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,WAAW;AAQX,IAAM,cAA6B;AAAA,EACxC,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS,CAAC,UAAU,mBAAmB,KAAK;AAAA,EAC5C,SAAS,OAAO,SAAS;AACvB,UAAM,IAAI,gBAAgB,IAAI;AAC9B,QAAI,CAAC,EAAG;AACR,UAAM,IAAI,MAAM,YAA8B,QAAQ,iBAAiB,aAAa,CAAC,CAAC,eAAe,CAAC,CAAC;AACvG,QAAI,CAAC,EAAE,IAAI;AACT,cAAQ,MAAM,MAAM,IAAI,EAAE,KAAK,CAAC;AAChC,cAAQ,WAAW;AACnB;AAAA,IACF;AACA,YAAQ,IAAI,EAAE,KAAK,QAAQ,gBAAgB,GAAG,EAAE,MAAM,SAAM,EAAE,MAAM,kBAAkB,GAAG,EAAE,MAAM,SAAM,EAAE,MAAM,WAAW;AAAA,EAC5H;AACF;","names":[]}
|
|
@@ -5,61 +5,62 @@ import {
|
|
|
5
5
|
} from "./chunk-ABQYKTG4.js";
|
|
6
6
|
import {
|
|
7
7
|
defaultCleanupDeps
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-ZERN5OBM.js";
|
|
9
|
+
import "./chunk-BKW6R2II.js";
|
|
10
|
+
import "./chunk-WSDAXREI.js";
|
|
11
11
|
import {
|
|
12
12
|
applyCleanup,
|
|
13
13
|
scanCleanup
|
|
14
14
|
} from "./chunk-AKMPF72Y.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-K5U6EWIN.js";
|
|
16
16
|
import "./chunk-ICEP4WAK.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-NJXYDMNQ.js";
|
|
18
18
|
import "./chunk-VRMALBZK.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-WPFDHBQZ.js";
|
|
20
20
|
import "./chunk-4J2F6OWM.js";
|
|
21
21
|
import "./chunk-DLV7TRON.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-C7QOPDZL.js";
|
|
23
23
|
import "./chunk-PZ7WTBSI.js";
|
|
24
24
|
import "./chunk-EORL2V7P.js";
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-XCDIMZD3.js";
|
|
26
|
+
import "./chunk-3ZB3TXPT.js";
|
|
27
|
+
import "./chunk-JMILQI5Y.js";
|
|
28
28
|
import "./chunk-SJBEIYLK.js";
|
|
29
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-HACRL36E.js";
|
|
30
30
|
import "./chunk-7E5XPDKX.js";
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-7L4L4Q73.js";
|
|
32
|
+
import "./chunk-YOBBM2DF.js";
|
|
33
33
|
import "./chunk-ZSHWP2VS.js";
|
|
34
34
|
import "./chunk-CNZV3UCM.js";
|
|
35
35
|
import "./chunk-HUXS3VAI.js";
|
|
36
36
|
import "./chunk-LM2T5OR3.js";
|
|
37
|
-
import "./chunk-
|
|
38
|
-
import "./chunk-
|
|
39
|
-
import "./chunk-
|
|
37
|
+
import "./chunk-2ALX552Z.js";
|
|
38
|
+
import "./chunk-WUUZF4MY.js";
|
|
39
|
+
import "./chunk-HJZ65BMV.js";
|
|
40
40
|
import "./chunk-FGPXMAYU.js";
|
|
41
|
-
import "./chunk-
|
|
41
|
+
import "./chunk-2SHSB7JN.js";
|
|
42
42
|
import "./chunk-GNIYYXQX.js";
|
|
43
43
|
import "./chunk-T5GJVUSL.js";
|
|
44
44
|
import "./chunk-XBWS77S2.js";
|
|
45
45
|
import "./chunk-4CXUVBOD.js";
|
|
46
|
-
import "./chunk-
|
|
46
|
+
import "./chunk-HN6ZSSPR.js";
|
|
47
47
|
import "./chunk-NEJVK5CF.js";
|
|
48
48
|
import "./chunk-ALBTIOP3.js";
|
|
49
49
|
import "./chunk-LNHSBM4L.js";
|
|
50
|
-
import "./chunk-
|
|
50
|
+
import "./chunk-DJDI5OPO.js";
|
|
51
51
|
import "./chunk-KGHWHAVF.js";
|
|
52
|
-
import "./chunk-
|
|
52
|
+
import "./chunk-NFM4NGTI.js";
|
|
53
53
|
import "./chunk-YQSWVHKK.js";
|
|
54
54
|
import "./chunk-IPHADNF5.js";
|
|
55
55
|
import "./chunk-JYWX2N5W.js";
|
|
56
|
+
import "./chunk-Z6ACV5ZQ.js";
|
|
56
57
|
import "./chunk-JUGF3YE7.js";
|
|
57
58
|
import "./chunk-HK6AZQ5Z.js";
|
|
58
|
-
import "./chunk-
|
|
59
|
+
import "./chunk-2YGVF224.js";
|
|
59
60
|
import {
|
|
60
61
|
ensureConfig
|
|
61
|
-
} from "./chunk-
|
|
62
|
-
import "./chunk-
|
|
62
|
+
} from "./chunk-LXBHVWOY.js";
|
|
63
|
+
import "./chunk-W4GDPHIF.js";
|
|
63
64
|
import "./chunk-BR6OWWAA.js";
|
|
64
65
|
import "./chunk-VHENFC2S.js";
|
|
65
66
|
import "./chunk-QOSAWNOU.js";
|
|
@@ -123,4 +124,4 @@ var syncCommand = {
|
|
|
123
124
|
export {
|
|
124
125
|
syncCommand
|
|
125
126
|
};
|
|
126
|
-
//# sourceMappingURL=sync-
|
|
127
|
+
//# sourceMappingURL=sync-S2BNPQXB.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/sync.ts"],"sourcesContent":["import chalk from 'chalk';\nimport type { CommandModule } from 'yargs';\nimport { ensureConfig } from '../core/platform/config.js';\nimport { applyCleanup, scanCleanup } from '../core/cleanup/cleanup.js';\nimport { defaultCleanupDeps } from '../core/cleanup/cleanup-deps.js';\nimport { printCleanupResults, removable } from './shared/cleanup-print.js';\n\nexport const syncCommand: CommandModule = {\n command: 'sync',\n describe: 'Fetch all repos and remove merged worktrees (non-interactive)',\n builder: (yargs) =>\n yargs\n .option('dry-run', {\n describe: 'Show what would be removed without removing anything',\n type: 'boolean',\n default: false,\n })\n .option('force', {\n describe:\n 'Also remove merged worktrees that have uncommitted changes (those changes are lost). ' +\n 'A worktree with commits the main branch lacks is never removed.',\n type: 'boolean',\n default: false,\n })\n .option('include-squash', {\n describe: 'Also remove branches detected as squash-merged ' + '(default: false — unattended sync requires a true merge)',\n type: 'boolean',\n default: false,\n }),\n handler: async (argv) => {\n const dryRun = argv['dryRun'] as boolean;\n const force = argv['force'] as boolean;\n const includeSquash = argv['includeSquash'] as boolean;\n ensureConfig();\n const deps = defaultCleanupDeps();\n\n console.log(chalk.gray('Fetching all repos and checking worktrees…\\n'));\n const scan = await scanCleanup(deps);\n // A repo whose fetch failed has stale refs: its worktrees were not judged.\n for (const f of scan.fetchFailed)\n console.log(chalk.yellow(` Warning: fetch failed for ${f.alias} — skipping it (refs may be stale): ${f.error}`));\n\n const chosen = removable(scan.candidates, { includeSquash, dirtyToo: force });\n const skippedDirty = removable(scan.candidates, { includeSquash, dirtyToo: true }).length - chosen.length;\n if (chosen.length === 0) {\n console.log(chalk.green('No merged worktrees to remove. Everything is in sync.'));\n if (skippedDirty > 0) console.log(chalk.yellow(`Skipped ${skippedDirty} merged worktree(s) with local changes (use --force).`));\n return;\n }\n console.log(chalk.cyan(`${dryRun ? 'Would remove' : 'Removing'} ${chosen.length} merged worktree(s):`));\n for (const c of chosen) console.log(` ${c.target}: ${c.branch}${c.isGroup ? ' [group]' : ''} — ${c.reason}`);\n console.log('');\n if (dryRun) {\n console.log(chalk.yellow(`Dry run: nothing removed.`));\n return;\n }\n const results = await applyCleanup(\n deps,\n chosen.map((c) => ({ sessionId: c.sessionId, action: c.verdict === 'gone' ? ('forget' as const) : ('delete' as const) })),\n { force },\n );\n printCleanupResults(chosen, results);\n if (skippedDirty > 0) console.log(chalk.yellow(`Skipped ${skippedDirty} merged worktree(s) with local changes (use --force).`));\n // A removal that git refused is a failure for scripts; \"changed since the\n // scan\" is a safe skip, counted in the summary above.\n if (results.some((r) => !r.ok && r.message.startsWith('git refused'))) process.exitCode = 1;\n },\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/sync.ts"],"sourcesContent":["import chalk from 'chalk';\nimport type { CommandModule } from 'yargs';\nimport { ensureConfig } from '../core/platform/config.js';\nimport { applyCleanup, scanCleanup } from '../core/cleanup/cleanup.js';\nimport { defaultCleanupDeps } from '../core/cleanup/cleanup-deps.js';\nimport { printCleanupResults, removable } from './shared/cleanup-print.js';\n\nexport const syncCommand: CommandModule = {\n command: 'sync',\n describe: 'Fetch all repos and remove merged worktrees (non-interactive)',\n builder: (yargs) =>\n yargs\n .option('dry-run', {\n describe: 'Show what would be removed without removing anything',\n type: 'boolean',\n default: false,\n })\n .option('force', {\n describe:\n 'Also remove merged worktrees that have uncommitted changes (those changes are lost). ' +\n 'A worktree with commits the main branch lacks is never removed.',\n type: 'boolean',\n default: false,\n })\n .option('include-squash', {\n describe: 'Also remove branches detected as squash-merged ' + '(default: false — unattended sync requires a true merge)',\n type: 'boolean',\n default: false,\n }),\n handler: async (argv) => {\n const dryRun = argv['dryRun'] as boolean;\n const force = argv['force'] as boolean;\n const includeSquash = argv['includeSquash'] as boolean;\n ensureConfig();\n const deps = defaultCleanupDeps();\n\n console.log(chalk.gray('Fetching all repos and checking worktrees…\\n'));\n const scan = await scanCleanup(deps);\n // A repo whose fetch failed has stale refs: its worktrees were not judged.\n for (const f of scan.fetchFailed)\n console.log(chalk.yellow(` Warning: fetch failed for ${f.alias} — skipping it (refs may be stale): ${f.error}`));\n\n const chosen = removable(scan.candidates, { includeSquash, dirtyToo: force });\n const skippedDirty = removable(scan.candidates, { includeSquash, dirtyToo: true }).length - chosen.length;\n if (chosen.length === 0) {\n console.log(chalk.green('No merged worktrees to remove. Everything is in sync.'));\n if (skippedDirty > 0) console.log(chalk.yellow(`Skipped ${skippedDirty} merged worktree(s) with local changes (use --force).`));\n return;\n }\n console.log(chalk.cyan(`${dryRun ? 'Would remove' : 'Removing'} ${chosen.length} merged worktree(s):`));\n for (const c of chosen) console.log(` ${c.target}: ${c.branch}${c.isGroup ? ' [group]' : ''} — ${c.reason}`);\n console.log('');\n if (dryRun) {\n console.log(chalk.yellow(`Dry run: nothing removed.`));\n return;\n }\n const results = await applyCleanup(\n deps,\n chosen.map((c) => ({ sessionId: c.sessionId, action: c.verdict === 'gone' ? ('forget' as const) : ('delete' as const) })),\n { force },\n );\n printCleanupResults(chosen, results);\n if (skippedDirty > 0) console.log(chalk.yellow(`Skipped ${skippedDirty} merged worktree(s) with local changes (use --force).`));\n // A removal that git refused is a failure for scripts; \"changed since the\n // scan\" is a safe skip, counted in the summary above.\n if (results.some((r) => !r.ok && r.message.startsWith('git refused'))) process.exitCode = 1;\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,WAAW;AAOX,IAAM,cAA6B;AAAA,EACxC,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS,CAAC,UACR,MACG,OAAO,WAAW;AAAA,IACjB,UAAU;AAAA,IACV,MAAM;AAAA,IACN,SAAS;AAAA,EACX,CAAC,EACA,OAAO,SAAS;AAAA,IACf,UACE;AAAA,IAEF,MAAM;AAAA,IACN,SAAS;AAAA,EACX,CAAC,EACA,OAAO,kBAAkB;AAAA,IACxB,UAAU;AAAA,IACV,MAAM;AAAA,IACN,SAAS;AAAA,EACX,CAAC;AAAA,EACL,SAAS,OAAO,SAAS;AACvB,UAAM,SAAS,KAAK,QAAQ;AAC5B,UAAM,QAAQ,KAAK,OAAO;AAC1B,UAAM,gBAAgB,KAAK,eAAe;AAC1C,iBAAa;AACb,UAAM,OAAO,mBAAmB;AAEhC,YAAQ,IAA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