@moberg_hr/work-tree 2.20.1 → 2.21.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-VGJEBBCS.js → account-RCMYHLUP.js} +19 -18
- package/dist/account-RCMYHLUP.js.map +1 -0
- package/dist/{add-repo-VNG3JVRR.js → add-repo-4NQUBY2A.js} +11 -11
- package/dist/{answer-2MLNGB7P.js → answer-PAMFIP4B.js} +8 -8
- package/dist/{attach-4DSUBQBI.js → attach-QX72JAJN.js} +12 -12
- package/dist/bin.js +3 -3
- package/dist/{block-KCHJ4KMQ.js → block-GLMNDZJC.js} +10 -10
- package/dist/{broadcast-XZZ6S6MH.js → broadcast-4AMVPDUV.js} +6 -6
- package/dist/{catchup-IVNPQHRM.js → catchup-AWIE3PVF.js} +11 -11
- package/dist/{child-6ZMI62MQ.js → child-HG4WXOMX.js} +7 -7
- package/dist/{chunk-JO7AJVGA.js → chunk-2EXZ24MI.js} +5 -5
- package/dist/{chunk-UEEZ6DGK.js → chunk-2IK6EQXW.js} +5 -5
- package/dist/{chunk-XVHRBV2I.js → chunk-2MZODCSG.js} +2 -2
- package/dist/{chunk-DDLMX47W.js → chunk-3BXCMTFV.js} +2 -2
- package/dist/{chunk-LXBHVWOY.js → chunk-3ZPVKUYD.js} +4 -1
- package/dist/chunk-3ZPVKUYD.js.map +1 -0
- package/dist/{chunk-QWVY5AUJ.js → chunk-4EPMJVQY.js} +4 -4
- package/dist/{chunk-4EFPHIME.js → chunk-4FQ4QOIF.js} +6 -6
- package/dist/chunk-5GW6OEYN.js +9 -0
- package/dist/{chunk-HNZRVCQF.js → chunk-74FGCQML.js} +3 -3
- package/dist/{chunk-T7GXKT6S.js → chunk-777W7BCX.js} +10 -10
- package/dist/{chunk-JDLRVOX7.js → chunk-A5O3CP37.js} +4 -4
- package/dist/{chunk-UD5CFHUS.js → chunk-BOQJBO4K.js} +2 -2
- package/dist/{chunk-AB3TSGJ4.js → chunk-BQS73CWR.js} +2 -2
- package/dist/{chunk-AFYYUXWA.js → chunk-COBR6DBI.js} +2 -2
- package/dist/{chunk-DCEYDF77.js → chunk-CVN5E4SU.js} +2 -2
- package/dist/{chunk-XEA3XWKW.js → chunk-DDDWQ36P.js} +4 -4
- package/dist/{chunk-UXEFUSJV.js → chunk-E4EQDJD2.js} +3 -3
- package/dist/{chunk-RBBZXZ6I.js → chunk-FGZVHEFP.js} +60 -60
- package/dist/{chunk-B56NMAPD.js → chunk-GFCVBKHL.js} +2 -2
- package/dist/{chunk-NFM4NGTI.js → chunk-HF4VUIGE.js} +2 -2
- package/dist/{chunk-2YGVF224.js → chunk-HI674QZF.js} +2 -2
- package/dist/{chunk-ZKTYHYBU.js → chunk-HNK36GM3.js} +6 -6
- package/dist/{chunk-GROMKF62.js → chunk-I3AO3NVC.js} +2 -2
- package/dist/{chunk-XDKH4X4N.js → chunk-IMO7KKYZ.js} +2 -2
- package/dist/{chunk-YJYYR5RY.js → chunk-IPXOVAEX.js} +4 -4
- package/dist/{chunk-OOQBMWTK.js → chunk-IYJHSMXQ.js} +2 -2
- package/dist/{chunk-F36PSNNL.js → chunk-JKARKFLX.js} +7 -7
- package/dist/{chunk-RQ7W2CVL.js → chunk-JNYXRMZL.js} +2 -2
- package/dist/{chunk-MRTSFVRF.js → chunk-JZZJRVWZ.js} +3 -3
- package/dist/{chunk-75PWH7BG.js → chunk-KLJMHYU7.js} +16 -3
- package/dist/chunk-KLJMHYU7.js.map +1 -0
- package/dist/{chunk-JQO5ANP4.js → chunk-LCKBOPFU.js} +5 -5
- package/dist/{chunk-SM6RE2AH.js → chunk-LYUD6DNS.js} +3 -3
- package/dist/{chunk-WUW6WRKP.js → chunk-MGMRLWJA.js} +28 -63
- package/dist/chunk-MGMRLWJA.js.map +1 -0
- package/dist/{chunk-PORC2R73.js → chunk-MJIYIMPI.js} +20 -8
- package/dist/chunk-MJIYIMPI.js.map +1 -0
- package/dist/{chunk-D7TL6I5A.js → chunk-NISGFF25.js} +4 -4
- package/dist/{chunk-NDXZKB27.js → chunk-NJ7CHZJS.js} +2 -2
- package/dist/{chunk-ZAOX63AG.js → chunk-NS5K4IN5.js} +7 -7
- package/dist/{chunk-FCUVFJSY.js → chunk-OW7YUW4W.js} +2 -2
- package/dist/{chunk-L74WY44N.js → chunk-PKY63672.js} +2 -2
- package/dist/{chunk-EVP5MMA7.js → chunk-POF2FE4S.js} +8 -9
- package/dist/chunk-POF2FE4S.js.map +1 -0
- package/dist/{chunk-NB7IBSKF.js → chunk-PTAG6WIE.js} +2 -2
- package/dist/{chunk-ILLPPOIY.js → chunk-QUOA4RSP.js} +7 -6
- package/dist/chunk-QUOA4RSP.js.map +1 -0
- package/dist/{chunk-WC4IN5MD.js → chunk-U3UPGZGQ.js} +2 -2
- package/dist/{chunk-F2H4FQ62.js → chunk-VAFS24P4.js} +3 -3
- package/dist/{chunk-YVJUALQX.js → chunk-WDGQAGF4.js} +5 -5
- package/dist/{chunk-UNV2YM5V.js → chunk-X3ON5EYW.js} +3 -3
- package/dist/{chunk-ZSDMH3TI.js → chunk-XCQD5XSN.js} +4 -4
- package/dist/{chunk-7ZOWY7GC.js → chunk-XHTBWRXU.js} +4 -4
- package/dist/{chunk-XHDC3IU4.js → chunk-XN77RX4I.js} +6 -6
- package/dist/{chunk-NDSZQKYL.js → chunk-XOEGBVWQ.js} +3 -3
- package/dist/{chunk-FDFFJOV6.js → chunk-YKWDZCUW.js} +13 -10
- package/dist/chunk-YKWDZCUW.js.map +1 -0
- package/dist/{chunk-TNBZUIIP.js → chunk-YM3DJE2Q.js} +6 -6
- package/dist/{chunk-IMTPBX3L.js → chunk-YNPORFRR.js} +3 -3
- package/dist/{chunk-6V6LBFWB.js → chunk-ZBVVI3XT.js} +2 -2
- package/dist/{cleanup-M6V7VOL2.js → cleanup-757RQ5NW.js} +25 -25
- package/dist/{cli-KF7RFZQC.js → cli-RRT5BOWM.js} +4 -4
- package/dist/{color-G7OB6JRX.js → color-SMQZHNFH.js} +9 -9
- package/dist/{config-WLHZ5EOU.js → config-TSNQIWAG.js} +8 -8
- package/dist/{coordinate-YOTO6WGQ.js → coordinate-RJOG5DCS.js} +8 -8
- package/dist/{diff-TKHHSR2G.js → diff-GBVTHXCV.js} +9 -9
- package/dist/{digest-OVUDG6O7.js → digest-UFZSHQCP.js} +8 -8
- package/dist/{fork-7RCD2XI2.js → fork-5ISDLKQF.js} +22 -22
- package/dist/{history-ZT6YAO62.js → history-ZX5COG2M.js} +6 -6
- package/dist/{hook-MDENN4PE.js → hook-3LHEQPBM.js} +49 -14
- package/dist/hook-3LHEQPBM.js.map +1 -0
- package/dist/{hydrate-3KEAOXSE.js → hydrate-N6ZIPOLK.js} +6 -6
- package/dist/{init-UDRGQJWV.js → init-P42G52BR.js} +11 -11
- package/dist/{install-skills-QTNDVA4T.js → install-skills-N63CWTOH.js} +6 -6
- package/dist/install-skills-bin.js +5 -5
- package/dist/{keep-G4Z6EBQM.js → keep-HZC6HIWF.js} +8 -8
- package/dist/{list-DFENHOZN.js → list-UAQKE4BT.js} +6 -6
- package/dist/{move-CV3PGUFM.js → move-TUX7SKKM.js} +12 -12
- package/dist/{note-UIC3ZWUV.js → note-SLVYVDC5.js} +8 -8
- package/dist/{overlaps-SHQUKU7E.js → overlaps-HC7GB3OL.js} +12 -12
- package/dist/{pin-LC33A2NH.js → pin-73FSKVDV.js} +9 -9
- package/dist/{pr-FRW5V6HV.js → pr-FJHTWA6C.js} +17 -17
- package/dist/{prune-REKRGEJU.js → prune-4DG3YNHQ.js} +23 -23
- package/dist/{pty-host-W5NXKWAV.js → pty-host-72PLYNBT.js} +10 -10
- package/dist/{read-NQMJXBGZ.js → read-VFPXCEP6.js} +8 -8
- package/dist/{recent-5POY67P2.js → recent-MT4K3M7A.js} +11 -11
- package/dist/{remove-7RT6QRRH.js → remove-CTXCSMMJ.js} +24 -24
- package/dist/{report-RBBVHVHD.js → report-OZN3UE3W.js} +7 -7
- package/dist/{restart-S3SSGR6A.js → restart-P3HCOUJY.js} +8 -8
- package/dist/{resume-FLLXA3RH.js → resume-IQTLSLS3.js} +11 -11
- package/dist/{review-SFRX7ODW.js → review-RAFSZBOC.js} +7 -7
- package/dist/{review-now-KZDBETZK.js → review-now-K4UWD7A5.js} +2 -2
- package/dist/{run-BMD66HMR.js → run-UYTHFJ7P.js} +6 -6
- package/dist/{screen-MKRRQSIU.js → screen-A33PDNY4.js} +8 -8
- package/dist/{search-2NDA23G4.js → search-RIZJANOI.js} +6 -6
- package/dist/{section-Z5G4B5IO.js → section-XOWMNRLK.js} +9 -9
- package/dist/{send-EVYK2JXH.js → send-DTHWOC4Z.js} +9 -9
- package/dist/{sessions-UD7GC6PL.js → sessions-PP555IEM.js} +20 -20
- package/dist/{show-K4MELKXA.js → show-ZY2X46TS.js} +7 -7
- package/dist/{snooze-457UM2MR.js → snooze-F43627DM.js} +8 -8
- package/dist/{start-CMYT5ELG.js → start-LQP5L2UY.js} +8 -8
- package/dist/{state-TOTGEK7J.js → state-GM22X3RN.js} +2 -2
- package/dist/{status-M5RGLGOI.js → status-U3OJRC4Y.js} +10 -10
- package/dist/{statusline-QZKHVDHR.js → statusline-QJ6CJGHB.js} +3 -3
- package/dist/{stop-QUXZ4KOU.js → stop-EQCUYVUF.js} +8 -8
- package/dist/{sync-K7BZ55SE.js → sync-GQBVRSSD.js} +23 -23
- package/dist/{time-DQ55WLCX.js → time-FOC4HMSX.js} +9 -9
- package/dist/{time-actions-HY3AML3Y.js → time-actions-IXZRVKKQ.js} +3 -3
- package/dist/{timesheet-F4ATWRKK.js → timesheet-YEKW5L2L.js} +12 -12
- package/dist/{todo-QY5ZPN24.js → todo-ZBFRL2A5.js} +2 -2
- package/dist/{tree-APEY56SC.js → tree-2L6ZCDCE.js} +22 -22
- package/dist/{update-A5N2KKOV.js → update-RO7OB54G.js} +14 -14
- package/dist/{usage-ZEZY46OJ.js → usage-2OYLKV6R.js} +8 -8
- package/dist/{usage-ask-C3QLGFC5.js → usage-ask-52X2RMQC.js} +3 -3
- package/dist/{version-3UR4YFMC.js → version-6A3FWFQR.js} +4 -4
- package/dist/{wait-ZOTGREAN.js → wait-4LZJ5WNQ.js} +9 -9
- package/dist/wd-bin.js +3 -3
- package/dist/web/assets/{PtyView-8APZdSre.js → PtyView-B11_5QTN.js} +27 -27
- package/dist/web/assets/PtyView-B11_5QTN.js.map +1 -0
- package/dist/web/assets/index-Cuq2OWKw.css +1 -0
- package/dist/web/assets/index-Rj1VHPO1.js +127 -0
- package/dist/web/assets/index-Rj1VHPO1.js.map +1 -0
- package/dist/web/index.html +13 -7
- package/dist/{web-LACYKYDC.js → web-A6FWH4WT.js} +357 -83
- package/dist/web-A6FWH4WT.js.map +1 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/dist/account-VGJEBBCS.js.map +0 -1
- package/dist/chunk-75PWH7BG.js.map +0 -1
- package/dist/chunk-EVP5MMA7.js.map +0 -1
- package/dist/chunk-FDFFJOV6.js.map +0 -1
- package/dist/chunk-ILLPPOIY.js.map +0 -1
- package/dist/chunk-LXBHVWOY.js.map +0 -1
- package/dist/chunk-PORC2R73.js.map +0 -1
- package/dist/chunk-TO4GKLLT.js +0 -9
- package/dist/chunk-WUW6WRKP.js.map +0 -1
- package/dist/hook-MDENN4PE.js.map +0 -1
- package/dist/web/assets/PtyView-8APZdSre.js.map +0 -1
- package/dist/web/assets/index-Dt4XbNcI.css +0 -1
- package/dist/web/assets/index-zOLWspb1.js +0 -127
- package/dist/web/assets/index-zOLWspb1.js.map +0 -1
- package/dist/web-LACYKYDC.js.map +0 -1
- /package/dist/{add-repo-VNG3JVRR.js.map → add-repo-4NQUBY2A.js.map} +0 -0
- /package/dist/{answer-2MLNGB7P.js.map → answer-PAMFIP4B.js.map} +0 -0
- /package/dist/{attach-4DSUBQBI.js.map → attach-QX72JAJN.js.map} +0 -0
- /package/dist/{block-KCHJ4KMQ.js.map → block-GLMNDZJC.js.map} +0 -0
- /package/dist/{broadcast-XZZ6S6MH.js.map → broadcast-4AMVPDUV.js.map} +0 -0
- /package/dist/{catchup-IVNPQHRM.js.map → catchup-AWIE3PVF.js.map} +0 -0
- /package/dist/{child-6ZMI62MQ.js.map → child-HG4WXOMX.js.map} +0 -0
- /package/dist/{chunk-JO7AJVGA.js.map → chunk-2EXZ24MI.js.map} +0 -0
- /package/dist/{chunk-UEEZ6DGK.js.map → chunk-2IK6EQXW.js.map} +0 -0
- /package/dist/{chunk-XVHRBV2I.js.map → chunk-2MZODCSG.js.map} +0 -0
- /package/dist/{chunk-DDLMX47W.js.map → chunk-3BXCMTFV.js.map} +0 -0
- /package/dist/{chunk-QWVY5AUJ.js.map → chunk-4EPMJVQY.js.map} +0 -0
- /package/dist/{chunk-4EFPHIME.js.map → chunk-4FQ4QOIF.js.map} +0 -0
- /package/dist/{chunk-TO4GKLLT.js.map → chunk-5GW6OEYN.js.map} +0 -0
- /package/dist/{chunk-HNZRVCQF.js.map → chunk-74FGCQML.js.map} +0 -0
- /package/dist/{chunk-T7GXKT6S.js.map → chunk-777W7BCX.js.map} +0 -0
- /package/dist/{chunk-JDLRVOX7.js.map → chunk-A5O3CP37.js.map} +0 -0
- /package/dist/{chunk-UD5CFHUS.js.map → chunk-BOQJBO4K.js.map} +0 -0
- /package/dist/{chunk-AB3TSGJ4.js.map → chunk-BQS73CWR.js.map} +0 -0
- /package/dist/{chunk-AFYYUXWA.js.map → chunk-COBR6DBI.js.map} +0 -0
- /package/dist/{chunk-DCEYDF77.js.map → chunk-CVN5E4SU.js.map} +0 -0
- /package/dist/{chunk-XEA3XWKW.js.map → chunk-DDDWQ36P.js.map} +0 -0
- /package/dist/{chunk-UXEFUSJV.js.map → chunk-E4EQDJD2.js.map} +0 -0
- /package/dist/{chunk-RBBZXZ6I.js.map → chunk-FGZVHEFP.js.map} +0 -0
- /package/dist/{chunk-B56NMAPD.js.map → chunk-GFCVBKHL.js.map} +0 -0
- /package/dist/{chunk-NFM4NGTI.js.map → chunk-HF4VUIGE.js.map} +0 -0
- /package/dist/{chunk-2YGVF224.js.map → chunk-HI674QZF.js.map} +0 -0
- /package/dist/{chunk-ZKTYHYBU.js.map → chunk-HNK36GM3.js.map} +0 -0
- /package/dist/{chunk-GROMKF62.js.map → chunk-I3AO3NVC.js.map} +0 -0
- /package/dist/{chunk-XDKH4X4N.js.map → chunk-IMO7KKYZ.js.map} +0 -0
- /package/dist/{chunk-YJYYR5RY.js.map → chunk-IPXOVAEX.js.map} +0 -0
- /package/dist/{chunk-OOQBMWTK.js.map → chunk-IYJHSMXQ.js.map} +0 -0
- /package/dist/{chunk-F36PSNNL.js.map → chunk-JKARKFLX.js.map} +0 -0
- /package/dist/{chunk-RQ7W2CVL.js.map → chunk-JNYXRMZL.js.map} +0 -0
- /package/dist/{chunk-MRTSFVRF.js.map → chunk-JZZJRVWZ.js.map} +0 -0
- /package/dist/{chunk-JQO5ANP4.js.map → chunk-LCKBOPFU.js.map} +0 -0
- /package/dist/{chunk-SM6RE2AH.js.map → chunk-LYUD6DNS.js.map} +0 -0
- /package/dist/{chunk-D7TL6I5A.js.map → chunk-NISGFF25.js.map} +0 -0
- /package/dist/{chunk-NDXZKB27.js.map → chunk-NJ7CHZJS.js.map} +0 -0
- /package/dist/{chunk-ZAOX63AG.js.map → chunk-NS5K4IN5.js.map} +0 -0
- /package/dist/{chunk-FCUVFJSY.js.map → chunk-OW7YUW4W.js.map} +0 -0
- /package/dist/{chunk-L74WY44N.js.map → chunk-PKY63672.js.map} +0 -0
- /package/dist/{chunk-NB7IBSKF.js.map → chunk-PTAG6WIE.js.map} +0 -0
- /package/dist/{chunk-WC4IN5MD.js.map → chunk-U3UPGZGQ.js.map} +0 -0
- /package/dist/{chunk-F2H4FQ62.js.map → chunk-VAFS24P4.js.map} +0 -0
- /package/dist/{chunk-YVJUALQX.js.map → chunk-WDGQAGF4.js.map} +0 -0
- /package/dist/{chunk-UNV2YM5V.js.map → chunk-X3ON5EYW.js.map} +0 -0
- /package/dist/{chunk-ZSDMH3TI.js.map → chunk-XCQD5XSN.js.map} +0 -0
- /package/dist/{chunk-7ZOWY7GC.js.map → chunk-XHTBWRXU.js.map} +0 -0
- /package/dist/{chunk-XHDC3IU4.js.map → chunk-XN77RX4I.js.map} +0 -0
- /package/dist/{chunk-NDSZQKYL.js.map → chunk-XOEGBVWQ.js.map} +0 -0
- /package/dist/{chunk-TNBZUIIP.js.map → chunk-YM3DJE2Q.js.map} +0 -0
- /package/dist/{chunk-IMTPBX3L.js.map → chunk-YNPORFRR.js.map} +0 -0
- /package/dist/{chunk-6V6LBFWB.js.map → chunk-ZBVVI3XT.js.map} +0 -0
- /package/dist/{cleanup-M6V7VOL2.js.map → cleanup-757RQ5NW.js.map} +0 -0
- /package/dist/{cli-KF7RFZQC.js.map → cli-RRT5BOWM.js.map} +0 -0
- /package/dist/{color-G7OB6JRX.js.map → color-SMQZHNFH.js.map} +0 -0
- /package/dist/{config-WLHZ5EOU.js.map → config-TSNQIWAG.js.map} +0 -0
- /package/dist/{coordinate-YOTO6WGQ.js.map → coordinate-RJOG5DCS.js.map} +0 -0
- /package/dist/{diff-TKHHSR2G.js.map → diff-GBVTHXCV.js.map} +0 -0
- /package/dist/{digest-OVUDG6O7.js.map → digest-UFZSHQCP.js.map} +0 -0
- /package/dist/{fork-7RCD2XI2.js.map → fork-5ISDLKQF.js.map} +0 -0
- /package/dist/{history-ZT6YAO62.js.map → history-ZX5COG2M.js.map} +0 -0
- /package/dist/{hydrate-3KEAOXSE.js.map → hydrate-N6ZIPOLK.js.map} +0 -0
- /package/dist/{init-UDRGQJWV.js.map → init-P42G52BR.js.map} +0 -0
- /package/dist/{install-skills-QTNDVA4T.js.map → install-skills-N63CWTOH.js.map} +0 -0
- /package/dist/{keep-G4Z6EBQM.js.map → keep-HZC6HIWF.js.map} +0 -0
- /package/dist/{list-DFENHOZN.js.map → list-UAQKE4BT.js.map} +0 -0
- /package/dist/{move-CV3PGUFM.js.map → move-TUX7SKKM.js.map} +0 -0
- /package/dist/{note-UIC3ZWUV.js.map → note-SLVYVDC5.js.map} +0 -0
- /package/dist/{overlaps-SHQUKU7E.js.map → overlaps-HC7GB3OL.js.map} +0 -0
- /package/dist/{pin-LC33A2NH.js.map → pin-73FSKVDV.js.map} +0 -0
- /package/dist/{pr-FRW5V6HV.js.map → pr-FJHTWA6C.js.map} +0 -0
- /package/dist/{prune-REKRGEJU.js.map → prune-4DG3YNHQ.js.map} +0 -0
- /package/dist/{pty-host-W5NXKWAV.js.map → pty-host-72PLYNBT.js.map} +0 -0
- /package/dist/{read-NQMJXBGZ.js.map → read-VFPXCEP6.js.map} +0 -0
- /package/dist/{recent-5POY67P2.js.map → recent-MT4K3M7A.js.map} +0 -0
- /package/dist/{remove-7RT6QRRH.js.map → remove-CTXCSMMJ.js.map} +0 -0
- /package/dist/{report-RBBVHVHD.js.map → report-OZN3UE3W.js.map} +0 -0
- /package/dist/{restart-S3SSGR6A.js.map → restart-P3HCOUJY.js.map} +0 -0
- /package/dist/{resume-FLLXA3RH.js.map → resume-IQTLSLS3.js.map} +0 -0
- /package/dist/{review-SFRX7ODW.js.map → review-RAFSZBOC.js.map} +0 -0
- /package/dist/{review-now-KZDBETZK.js.map → review-now-K4UWD7A5.js.map} +0 -0
- /package/dist/{run-BMD66HMR.js.map → run-UYTHFJ7P.js.map} +0 -0
- /package/dist/{screen-MKRRQSIU.js.map → screen-A33PDNY4.js.map} +0 -0
- /package/dist/{search-2NDA23G4.js.map → search-RIZJANOI.js.map} +0 -0
- /package/dist/{section-Z5G4B5IO.js.map → section-XOWMNRLK.js.map} +0 -0
- /package/dist/{send-EVYK2JXH.js.map → send-DTHWOC4Z.js.map} +0 -0
- /package/dist/{sessions-UD7GC6PL.js.map → sessions-PP555IEM.js.map} +0 -0
- /package/dist/{show-K4MELKXA.js.map → show-ZY2X46TS.js.map} +0 -0
- /package/dist/{snooze-457UM2MR.js.map → snooze-F43627DM.js.map} +0 -0
- /package/dist/{start-CMYT5ELG.js.map → start-LQP5L2UY.js.map} +0 -0
- /package/dist/{state-TOTGEK7J.js.map → state-GM22X3RN.js.map} +0 -0
- /package/dist/{status-M5RGLGOI.js.map → status-U3OJRC4Y.js.map} +0 -0
- /package/dist/{statusline-QZKHVDHR.js.map → statusline-QJ6CJGHB.js.map} +0 -0
- /package/dist/{stop-QUXZ4KOU.js.map → stop-EQCUYVUF.js.map} +0 -0
- /package/dist/{sync-K7BZ55SE.js.map → sync-GQBVRSSD.js.map} +0 -0
- /package/dist/{time-DQ55WLCX.js.map → time-FOC4HMSX.js.map} +0 -0
- /package/dist/{time-actions-HY3AML3Y.js.map → time-actions-IXZRVKKQ.js.map} +0 -0
- /package/dist/{timesheet-F4ATWRKK.js.map → timesheet-YEKW5L2L.js.map} +0 -0
- /package/dist/{todo-QY5ZPN24.js.map → todo-ZBFRL2A5.js.map} +0 -0
- /package/dist/{tree-APEY56SC.js.map → tree-2L6ZCDCE.js.map} +0 -0
- /package/dist/{update-A5N2KKOV.js.map → update-RO7OB54G.js.map} +0 -0
- /package/dist/{usage-ZEZY46OJ.js.map → usage-2OYLKV6R.js.map} +0 -0
- /package/dist/{usage-ask-C3QLGFC5.js.map → usage-ask-52X2RMQC.js.map} +0 -0
- /package/dist/{version-3UR4YFMC.js.map → version-6A3FWFQR.js.map} +0 -0
- /package/dist/{wait-ZOTGREAN.js.map → wait-4LZJ5WNQ.js.map} +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
isSessionCi
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VAFS24P4.js";
|
|
5
5
|
import {
|
|
6
6
|
defaultHost,
|
|
7
7
|
hostForOrigin,
|
|
8
8
|
hostOfThread,
|
|
9
9
|
knownHosts
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-YNPORFRR.js";
|
|
11
11
|
import {
|
|
12
12
|
MAX_THREAD_BODY,
|
|
13
13
|
isThreadCode,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
} from "./chunk-GNIYYXQX.js";
|
|
20
20
|
import {
|
|
21
21
|
sessionRepos
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-KLJMHYU7.js";
|
|
23
23
|
import {
|
|
24
24
|
json,
|
|
25
25
|
sessionIdFor,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
} from "./chunk-Z6ACV5ZQ.js";
|
|
32
32
|
import {
|
|
33
33
|
loadConfig
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-3ZPVKUYD.js";
|
|
35
35
|
|
|
36
36
|
// src/core/pr/pr-replies.ts
|
|
37
37
|
import fs from "fs";
|
|
@@ -306,4 +306,4 @@ export {
|
|
|
306
306
|
draftReply,
|
|
307
307
|
retireResolvedReplies
|
|
308
308
|
};
|
|
309
|
-
//# sourceMappingURL=chunk-
|
|
309
|
+
//# sourceMappingURL=chunk-LCKBOPFU.js.map
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import {
|
|
3
3
|
computeDiff,
|
|
4
4
|
isInsideRoot
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-BOQJBO4K.js";
|
|
6
6
|
import {
|
|
7
7
|
createFsWatcher,
|
|
8
8
|
loadHistory
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-KLJMHYU7.js";
|
|
10
10
|
import {
|
|
11
11
|
packageRoot
|
|
12
12
|
} from "./chunk-LNHSBM4L.js";
|
|
@@ -534,4 +534,4 @@ export {
|
|
|
534
534
|
submitReviewSchema,
|
|
535
535
|
resolveSchema
|
|
536
536
|
};
|
|
537
|
-
//# sourceMappingURL=chunk-
|
|
537
|
+
//# sourceMappingURL=chunk-LYUD6DNS.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
agentsBySession
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NJ7CHZJS.js";
|
|
5
5
|
import {
|
|
6
6
|
accountSwitchRefusal,
|
|
7
7
|
haltPty,
|
|
@@ -9,23 +9,20 @@ import {
|
|
|
9
9
|
ptyPid,
|
|
10
10
|
ptyPids,
|
|
11
11
|
resumePtyOnAccount
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-4FQ4QOIF.js";
|
|
13
13
|
import {
|
|
14
14
|
findSession
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import {
|
|
17
|
-
createRestarter
|
|
18
|
-
} from "./chunk-TC3H7I6O.js";
|
|
15
|
+
} from "./chunk-U3UPGZGQ.js";
|
|
19
16
|
import {
|
|
20
17
|
isArchiving,
|
|
21
18
|
loadHistory,
|
|
22
19
|
setSessionAccount
|
|
23
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-KLJMHYU7.js";
|
|
24
21
|
import {
|
|
25
22
|
AccountAdminError,
|
|
26
23
|
agentOf,
|
|
27
24
|
liveAgents
|
|
28
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-YKWDZCUW.js";
|
|
29
26
|
|
|
30
27
|
// src/core/sessions/account-switch-rules.ts
|
|
31
28
|
function switchRefusal(to, f) {
|
|
@@ -35,8 +32,7 @@ function switchRefusal(to, f) {
|
|
|
35
32
|
if (!target) return { status: 400, error: `no account \u201C${to}\u201D (see \`work account list\`)` };
|
|
36
33
|
if (target.loggedIn === false)
|
|
37
34
|
return { status: 409, error: `nobody is logged in on \u201C${to}\u201D: run \`work account add ${to}\` again to log in, or /login on it` };
|
|
38
|
-
if (f.pendingTo !== null)
|
|
39
|
-
return { status: 409, error: `a switch is already waiting for its turn to end (to ${f.pendingTo || "another account"})` };
|
|
35
|
+
if (f.pendingTo !== null) return { status: 409, error: `a switch is already being done (to ${f.pendingTo || "another account"})` };
|
|
40
36
|
if (f.accounts.current === to) return { status: 409, error: `it already runs on \u201C${to}\u201D` };
|
|
41
37
|
if (!f.inHost && f.runningOutside)
|
|
42
38
|
return {
|
|
@@ -47,10 +43,10 @@ function switchRefusal(to, f) {
|
|
|
47
43
|
}
|
|
48
44
|
|
|
49
45
|
// src/core/sessions/account-switch.ts
|
|
46
|
+
var INTERRUPTED = "; it was working or waiting on you, so that turn was interrupted: tell it to continue";
|
|
50
47
|
var msg = (err) => err instanceof Error ? err.message : String(err);
|
|
51
48
|
function createAccountSwitcher(deps) {
|
|
52
49
|
const targets = /* @__PURE__ */ new Map();
|
|
53
|
-
const movedBy = /* @__PURE__ */ new Map();
|
|
54
50
|
const name = (s) => `${s.target} ${s.branch}`;
|
|
55
51
|
const moveAndRecord = async (s, to, from) => {
|
|
56
52
|
const { moved } = await deps.switchFiles(s, to);
|
|
@@ -65,21 +61,22 @@ function createAccountSwitcher(deps) {
|
|
|
65
61
|
}
|
|
66
62
|
return moved.length;
|
|
67
63
|
};
|
|
68
|
-
const perform = async (id) => {
|
|
69
|
-
const to = targets.get(id);
|
|
64
|
+
const perform = async (id, to) => {
|
|
70
65
|
const s = deps.session(id);
|
|
71
66
|
try {
|
|
72
|
-
if (!
|
|
67
|
+
if (!s) throw new Error("the session is gone");
|
|
73
68
|
if (s.archivedAt || deps.beingArchived(id)) throw new Error("it was archived meanwhile");
|
|
74
69
|
const acc = deps.accounts(s);
|
|
75
70
|
if (!acc) throw new Error("its agent has no accounts");
|
|
76
71
|
const from = acc.current;
|
|
77
|
-
if (from === to) return
|
|
72
|
+
if (from === to) return { moved: 0, interrupted: false };
|
|
78
73
|
const before = await refusalBeforeStop(s, id);
|
|
79
74
|
if (before) throw new Error(`stays on ${from}: ${before}`);
|
|
80
75
|
if (deps.cancelRestart?.(id)) deps.note?.(id, "its agent restart that waited for this turn is done by the switch instead", "info");
|
|
81
76
|
let halted = null;
|
|
77
|
+
let interrupted = false;
|
|
82
78
|
if (deps.hostRuns(id)) {
|
|
79
|
+
interrupted = deps.busy(id);
|
|
83
80
|
let h;
|
|
84
81
|
try {
|
|
85
82
|
h = await deps.halt(id);
|
|
@@ -99,15 +96,15 @@ function createAccountSwitcher(deps) {
|
|
|
99
96
|
);
|
|
100
97
|
throw new Error(`stays on ${from}: ${msg(err)}${back}`, { cause: err });
|
|
101
98
|
}
|
|
102
|
-
movedBy.set(id, moved);
|
|
103
99
|
if (!halted) {
|
|
104
100
|
deps.note?.(id, `moved to the ${to} account (${moved} entries moved; its next start uses it)`, "action");
|
|
105
|
-
return
|
|
101
|
+
return { moved, interrupted: false };
|
|
106
102
|
}
|
|
107
103
|
try {
|
|
108
104
|
const how = await resume();
|
|
109
|
-
|
|
110
|
-
|
|
105
|
+
const cut = interrupted ? INTERRUPTED : "";
|
|
106
|
+
deps.note?.(id, `moved to the ${to} account: its Claude restarted on it${how ? ` (${how})` : ""}${cut}`, "action");
|
|
107
|
+
return { moved, interrupted };
|
|
111
108
|
} catch (err) {
|
|
112
109
|
const why = `moved to the ${to} account, but its Claude couldn't be restarted: ${msg(err)} (opening the session starts it on ${to})`;
|
|
113
110
|
deps.note?.(id, why, "warn");
|
|
@@ -116,25 +113,13 @@ function createAccountSwitcher(deps) {
|
|
|
116
113
|
} catch (err) {
|
|
117
114
|
if (s && !String(msg(err)).startsWith("moved to")) deps.note?.(id, `couldn't switch: ${msg(err)}`, "warn");
|
|
118
115
|
throw err;
|
|
119
|
-
} finally {
|
|
120
|
-
targets.delete(id);
|
|
121
116
|
}
|
|
122
117
|
};
|
|
123
|
-
const restarter = createRestarter({
|
|
124
|
-
restart: perform,
|
|
125
|
-
busy: deps.busy,
|
|
126
|
-
// A queued switch is never dropped as "stopped meanwhile": perform handles a Claude no longer running (it records the account).
|
|
127
|
-
running: () => true,
|
|
128
|
-
changed: deps.changed,
|
|
129
|
-
scheduled: deps.scheduled,
|
|
130
|
-
later: deps.later
|
|
131
|
-
});
|
|
132
118
|
const refusalBeforeStop = async (s, id) => {
|
|
133
119
|
const other = deps.othersRunningIn?.(s, id);
|
|
134
120
|
if (other) return `a Claude outside this session runs in ${other}`;
|
|
135
121
|
return deps.hostRuns(id) ? await deps.hostRefusal?.() ?? null : null;
|
|
136
122
|
};
|
|
137
|
-
const pending = (id) => restarter.queued().includes(id) || restarter.restarting().includes(id);
|
|
138
123
|
async function switchAccount(id, to) {
|
|
139
124
|
const s = deps.session(id);
|
|
140
125
|
if (!s) return { ok: false, status: 404, error: "unknown session" };
|
|
@@ -143,7 +128,7 @@ function createAccountSwitcher(deps) {
|
|
|
143
128
|
const refused = switchRefusal(to, {
|
|
144
129
|
archived: !!s.archivedAt || deps.beingArchived(id),
|
|
145
130
|
accounts: acc,
|
|
146
|
-
pendingTo:
|
|
131
|
+
pendingTo: targets.get(id) ?? null,
|
|
147
132
|
inHost,
|
|
148
133
|
runningOutside: !inHost && deps.runningOutside(id)
|
|
149
134
|
});
|
|
@@ -163,40 +148,20 @@ function createAccountSwitcher(deps) {
|
|
|
163
148
|
}
|
|
164
149
|
}
|
|
165
150
|
targets.set(id, to);
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
return { ok:
|
|
151
|
+
try {
|
|
152
|
+
const { moved, interrupted } = await perform(id, to);
|
|
153
|
+
return { ok: true, outcome: "switched", moved, ...interrupted ? { interrupted: true } : {} };
|
|
154
|
+
} catch (err) {
|
|
155
|
+
return { ok: false, status: 502, error: msg(err) };
|
|
156
|
+
} finally {
|
|
157
|
+
targets.delete(id);
|
|
158
|
+
deps.changed?.();
|
|
171
159
|
}
|
|
172
|
-
const failed = r.failed.find((f) => f.id === id);
|
|
173
|
-
if (failed) return { ok: false, status: 502, error: failed.error };
|
|
174
|
-
return { ok: true, outcome: "switched", moved: movedBy.get(id) };
|
|
175
160
|
}
|
|
176
161
|
return {
|
|
177
162
|
switchAccount,
|
|
178
|
-
/**
|
|
179
|
-
|
|
180
|
-
/** Do the waiting switches that can go now (a turn whose end no hook reported). */
|
|
181
|
-
retry: () => restarter.retry(),
|
|
182
|
-
/** Sessions waiting for their turn to end, and where each goes. */
|
|
183
|
-
waiting: () => restarter.queued().map((id) => ({ id, to: targets.get(id) ?? "" })),
|
|
184
|
-
/** The account a switch waiting for its turn, or being done now, moves it to; null: none. Either way its agent restarts. */
|
|
185
|
-
restartsAnyway: (id) => pending(id) ? targets.get(id) ?? "" : null,
|
|
186
|
-
/** The account a session is waiting to move to (its turn first), or null. Kept in memory: a work web restart drops it. */
|
|
187
|
-
pendingFor: (id) => restarter.queued().includes(id) ? targets.get(id) ?? null : null,
|
|
188
|
-
/**
|
|
189
|
-
* Drop the switch waiting for its turn to end. `running`: it is being done right now (too late to cancel); `none`:
|
|
190
|
-
* nothing waits for it.
|
|
191
|
-
*/
|
|
192
|
-
cancel: (id) => {
|
|
193
|
-
if (restarter.restarting().includes(id)) return "running";
|
|
194
|
-
const to = targets.get(id);
|
|
195
|
-
if (!restarter.cancel(id)) return "none";
|
|
196
|
-
targets.delete(id);
|
|
197
|
-
deps.note?.(id, `no longer moves to the ${to ?? "other"} account: the switch was cancelled`, "info");
|
|
198
|
-
return "cancelled";
|
|
199
|
-
}
|
|
163
|
+
/** The account a switch being done now moves it to; null: none. Its agent restarts with it. */
|
|
164
|
+
restartsAnyway: (id) => targets.get(id) ?? null
|
|
200
165
|
};
|
|
201
166
|
}
|
|
202
167
|
function accountSwitchNote(activity, label2) {
|
|
@@ -336,4 +301,4 @@ export {
|
|
|
336
301
|
createAccountLogins,
|
|
337
302
|
accountSkillsNote
|
|
338
303
|
};
|
|
339
|
-
//# sourceMappingURL=chunk-
|
|
304
|
+
//# sourceMappingURL=chunk-MGMRLWJA.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/sessions/account-switch-rules.ts","../src/core/sessions/account-switch.ts","../src/core/sessions/account-switch-deps.ts","../src/core/sessions/account-users.ts","../src/core/sessions/account-admin.ts"],"sourcesContent":["/**\n * When a switch of account is refused before anything is stopped or moved — the rules the real switch\n * (account-switch.ts) and the demo's (server/demo/demo-accounts.ts) share. Pure: no imports.\n */\n\n/** An account as the rules see it (agents/types.ts `AccountInfo`; the wire's `AccountWire`). */\nexport interface SwitchAccountInfo {\n name: string;\n /** Logged in; null: can't tell (macOS keeps Claude's credentials in the keychain) — allowed. */\n loggedIn: boolean | null;\n}\n\nexport interface SwitchFacts {\n /** Archived, or being archived right now. */\n archived: boolean;\n /** Its agent's accounts and the one it is on; null: its agent has none. */\n accounts: { list: readonly SwitchAccountInfo[]; current: string } | null;\n /** Where a switch being done now goes; null: none. */\n pendingTo: string | null;\n /** Its agent runs in the PTY host (a switch can stop and start it there). */\n inHost: boolean;\n /** Its agent runs in a terminal outside work. */\n runningOutside: boolean;\n}\n\nexport type SwitchRefusal = { status: 400 | 409; error: string };\n\n/** Why the session can't be moved to `to` (status and reason), or null. In the order the user is told them. */\nexport function switchRefusal(to: string, f: SwitchFacts): SwitchRefusal | null {\n if (f.archived) return { status: 409, error: 'it is archived: restore it first' };\n if (!f.accounts) return { status: 409, error: \"its agent doesn't have accounts\" };\n const target = f.accounts.list.find((a) => a.name === to);\n if (!target) return { status: 400, error: `no account “${to}” (see \\`work account list\\`)` };\n if (target.loggedIn === false)\n return { status: 409, error: `nobody is logged in on “${to}”: run \\`work account add ${to}\\` again to log in, or /login on it` };\n if (f.pendingTo !== null) return { status: 409, error: `a switch is already being done (to ${f.pendingTo || 'another account'})` };\n if (f.accounts.current === to) return { status: 409, error: `it already runs on “${to}”` };\n if (!f.inHost && f.runningOutside)\n return {\n status: 409,\n error: 'its Claude runs in a terminal outside work: stop it there first (its conversation would be moved from under it)',\n };\n return null;\n}\n","import type { AccountInfo } from '../agents/types.js';\nimport type { WorktreeSession } from './session-types.js';\nimport type { ActivityLog } from '../platform/activity.js';\nimport { switchRefusal } from './account-switch-rules.js';\n\n/**\n * Moving a session to another account of its agent (Claude: another login, for when the first one's limit runs out).\n * The policy is here; I/O is passed in (account-routes.ts and web-server.ts give the real one, tests a fake).\n *\n * Refused: an unknown or archived session, an agent with no accounts, an unknown account, one nobody is logged in to, the\n * account it is on, a Claude running in a terminal outside work (a switch can't stop it), one switch already being done.\n *\n * Not running in the PTY host: its conversations move and the account is recorded — the next start uses it. Running and\n * idle: its Claude is halted in the host (stopped, its terminals kept), the conversations move, the account is recorded, and it\n * is resumed in place on the new account — in that order, so nothing writes into the old folder while it moves. Working, or waiting\n * on you: the same, at once — its turn is interrupted (asked for: a switch that waited for the turn to end kept a session\n * whose limit ran out on the old account), and the answer and Activity say to tell it to continue. An agent restart waiting\n * for that turn is dropped (the switch restarts it), and one asked for meanwhile is folded into it (account-switch-link.ts).\n */\n\nexport interface AccountSwitchDeps {\n session: (id: string) => WorktreeSession | null;\n /** Being archived right now (its Claude was stopped on purpose, and mustn't be started again). */\n beingArchived: (id: string) => boolean;\n /** Its agent's accounts; null: its agent has none. */\n accounts: (session: WorktreeSession) => { list: AccountInfo[]; current: string } | null;\n /** Move its conversations to `to`'s folders (puts back what it moved when it fails, and throws). */\n switchFiles: (session: WorktreeSession, to: string) => Promise<{ moved: string[] }>;\n /** Record the account on the session, in one transaction. */\n record: (session: WorktreeSession, to: string) => Promise<void>;\n /** Its Claude runs in the PTY host. */\n hostRuns: (id: string) => boolean;\n /** Its Claude runs in a terminal outside work. */\n runningOutside: (id: string) => boolean;\n /** A folder whose conversations the switch would move where another agent (of any account, not this session's own in\n * the host) runs now — its files would move from under it; null: none. */\n othersRunningIn?: (session: WorktreeSession, id: string) => string | null;\n /** Why the PTY host can't run it on another account (one from before accounts), or null. Asked before anything stops. */\n hostRefusal?: () => Promise<string | null>;\n /** Working, or waiting on you: a switch doesn't wait for it, but says the turn it interrupted. */\n busy: (id: string, opts?: { turnEnded?: boolean }) => boolean;\n /** Stop its Claude in the host and keep its session (terminals attached) until `resume`: the files move only after it is stopped.\n * `stopped`: an older host stopped it the old way; `gone`: nothing was running. */\n halt: (id: string) => Promise<'halted' | 'stopped' | 'gone'>;\n /** Start it again after `halt`, on the account the session records now (so the old one after a switch that failed): in place\n * when it was `halted` (its terminals carry on), from a fresh spec when `stopped` (an older host). A string: how it went instead. */\n resume: (id: string, how: 'halted' | 'stopped') => Promise<string | void>;\n /** One line of what a switch decided, for the Activity panel. */\n note?: (id: string, text: string, level: 'action' | 'info' | 'warn') => void;\n changed?: () => void;\n /** Drop an agent restart waiting for its turn (agent-restart.ts): the switch restarts it anyway. True when one was waiting. */\n cancelRestart?: (id: string) => boolean;\n}\n\nexport type SwitchOutcome = 'switched' | 'recorded';\n\nexport type SwitchResult =\n { ok: true; outcome: SwitchOutcome; moved?: number; interrupted?: boolean } | { ok: false; status: 400 | 404 | 409 | 502; error: string };\n\n/** Said of a switch that stopped its Claude mid-turn: the conversation is there, the turn's remaining work isn't done. */\nexport const INTERRUPTED = '; it was working or waiting on you, so that turn was interrupted: tell it to continue';\n\nconst msg = (err: unknown) => (err instanceof Error ? err.message : String(err));\n\nexport function createAccountSwitcher(deps: AccountSwitchDeps) {\n /** Where each switch being done goes. */\n const targets = new Map<string, string>();\n\n const name = (s: WorktreeSession) => `${s.target} ${s.branch}`;\n\n /** Move the files and record the account; a failed record puts the files back. Returns how many entries moved. */\n const moveAndRecord = async (s: WorktreeSession, to: string, from: string): Promise<number> => {\n const { moved } = await deps.switchFiles(s, to);\n try {\n await deps.record(s, to);\n } catch (err) {\n // The files are in the new account's folders and the session still says the old one: back, or its --continue finds\n // nothing. A move back that fails is said with the error (its message names what is stuck where).\n const back = await deps.switchFiles({ ...s, account: to }, from).then(\n () => '',\n (e2: unknown) => `; and its conversations couldn't all be moved back: ${msg(e2)}`,\n );\n throw new Error(`${msg(err)}${back}`, { cause: err });\n }\n return moved.length;\n };\n\n /** A switch of a session running in the host: the stop, the move, the record, the start again. */\n const perform = async (id: string, to: string): Promise<{ moved: number; interrupted: boolean }> => {\n const s = deps.session(id);\n try {\n if (!s) throw new Error('the session is gone');\n if (s.archivedAt || deps.beingArchived(id)) throw new Error('it was archived meanwhile');\n const acc = deps.accounts(s);\n if (!acc) throw new Error('its agent has no accounts');\n const from = acc.current;\n if (from === to) return { moved: 0, interrupted: false };\n const before = await refusalBeforeStop(s, id);\n if (before) throw new Error(`stays on ${from}: ${before}`);\n // A restart of its agent that waited for this turn too would stop it a second time: the switch's restart does its job.\n if (deps.cancelRestart?.(id)) deps.note?.(id, 'its agent restart that waited for this turn is done by the switch instead', 'info');\n // Stopped first: a running (or just exiting) Claude writes to its transcript, and on Windows holds the file.\n let halted: 'halted' | 'stopped' | null = null;\n let interrupted = false;\n if (deps.hostRuns(id)) {\n interrupted = deps.busy(id);\n let h: 'halted' | 'stopped' | 'gone';\n try {\n h = await deps.halt(id);\n } catch (err) {\n throw new Error(`stays on ${from}: couldn't stop its Claude: ${msg(err)}`, { cause: err });\n }\n if (h !== 'gone') halted = h;\n }\n /** Start it again on the account the session records (still the old one until the record is made). */\n const resume = async (): Promise<string | void> => (halted ? deps.resume(id, halted) : undefined);\n let moved: number;\n try {\n moved = await moveAndRecord(s, to, from);\n } catch (err) {\n // Put back (the move rolled itself back, a failed record moved the files back): it goes on running on the account it has.\n const back = await resume().then(\n () => '',\n (e2: unknown) => ` (and couldn't start its Claude again: ${msg(e2)}; opening the session starts it)`,\n );\n throw new Error(`stays on ${from}: ${msg(err)}${back}`, { cause: err });\n }\n if (!halted) {\n deps.note?.(id, `moved to the ${to} account (${moved} entries moved; its next start uses it)`, 'action');\n return { moved, interrupted: false };\n }\n try {\n const how = await resume();\n const cut = interrupted ? INTERRUPTED : '';\n deps.note?.(id, `moved to the ${to} account: its Claude restarted on it${how ? ` (${how})` : ''}${cut}`, 'action');\n return { moved, interrupted };\n } catch (err) {\n // The account is recorded and the files are there: opening the session starts it on the new one.\n const why = `moved to the ${to} account, but its Claude couldn't be restarted: ${msg(err)} (opening the session starts it on ${to})`;\n deps.note?.(id, why, 'warn');\n throw new Error(why, { cause: err });\n }\n } catch (err) {\n if (s && !String(msg(err)).startsWith('moved to')) deps.note?.(id, `couldn't switch: ${msg(err)}`, 'warn');\n throw err;\n }\n };\n\n /** What stops a switch before anything is stopped or moved: an older PTY host, another Claude in one of its folders. */\n const refusalBeforeStop = async (s: WorktreeSession, id: string): Promise<string | null> => {\n const other = deps.othersRunningIn?.(s, id);\n if (other) return `a Claude outside this session runs in ${other}`;\n return deps.hostRuns(id) ? ((await deps.hostRefusal?.()) ?? null) : null;\n };\n\n async function switchAccount(id: string, to: string): Promise<SwitchResult> {\n const s = deps.session(id);\n if (!s) return { ok: false, status: 404, error: 'unknown session' };\n const acc = deps.accounts(s);\n const inHost = deps.hostRuns(id);\n const refused = switchRefusal(to, {\n archived: !!s.archivedAt || deps.beingArchived(id),\n accounts: acc,\n pendingTo: targets.get(id) ?? null,\n inHost,\n runningOutside: !inHost && deps.runningOutside(id),\n });\n if (refused) return { ok: false, ...refused };\n if (!acc) return { ok: false, status: 409, error: \"its agent doesn't have accounts\" }; // (refused above: for the type)\n\n const before = await refusalBeforeStop(s, id);\n if (before) return { ok: false, status: 409, error: `stays on ${acc.current}: ${before}` };\n\n if (!inHost) {\n // Nothing to stop: the files move and the account is recorded; the next start uses it.\n try {\n const moved = await moveAndRecord(s, to, acc.current);\n deps.note?.(id, `${name(s)}: moved to the ${to} account (${moved} entries moved; its next start uses it)`, 'action');\n deps.changed?.();\n return { ok: true, outcome: 'recorded', moved };\n } catch (err) {\n deps.note?.(id, `couldn't switch: ${msg(err)}`, 'warn');\n return { ok: false, status: 502, error: `stays on ${acc.current}: ${msg(err)}` };\n }\n }\n\n // At once, working or not: a switch is asked for when the account must change now (its limit ran out).\n targets.set(id, to);\n try {\n const { moved, interrupted } = await perform(id, to);\n return { ok: true, outcome: 'switched', moved, ...(interrupted ? { interrupted: true } : {}) };\n } catch (err) {\n return { ok: false, status: 502, error: msg(err) };\n } finally {\n targets.delete(id);\n deps.changed?.();\n }\n }\n\n return {\n switchAccount,\n /** The account a switch being done now moves it to; null: none. Its agent restarts with it. */\n restartsAnyway: (id: string): string | null => targets.get(id) ?? null,\n };\n}\n\nexport type AccountSwitcher = ReturnType<typeof createAccountSwitcher>;\n\n/** The switcher's `note` as Activity runs: one run per note, a failure (`warn`) failing it, so the Activity dot lights. */\nexport function accountSwitchNote(\n activity: Pick<ActivityLog, 'start'>,\n label: (id: string) => string | null,\n): NonNullable<AccountSwitchDeps['note']> {\n return (id, text, level) => {\n const name = label(id);\n const run = activity.start('accounts', 'Switching a Claude account');\n run.note(`${name ?? id}: ${text}`, { level, sessionId: name ? id : undefined });\n if (level === 'warn') run.fail(text);\n else run.done(text);\n };\n}\n","import path from 'node:path';\nimport { agentOf, liveAgents } from '../agents/index.js';\nimport { isArchiving } from '../archive/archiving.js';\nimport { accountSwitchRefusal, peekPty, ptyPid, ptyPids, haltPty, resumePtyOnAccount } from '../pty/pty-pool.js';\nimport type { AccountSwitchDeps } from './account-switch.js';\nimport { loadHistory, setSessionAccount } from './history.js';\nimport { agentsBySession } from './live-agents.js';\nimport { findSession } from './web-state.js';\n\n/** The real inputs of createAccountSwitcher (account-switch.ts); work web gives `busy`, the Activity notes and the broadcast. */\nexport function defaultAccountSwitchDeps(opts: Pick<AccountSwitchDeps, 'busy'> & Partial<AccountSwitchDeps>): AccountSwitchDeps {\n return {\n session: findSession,\n beingArchived: isArchiving,\n accounts: (s) => {\n const accounts = agentOf(s).accounts;\n return accounts ? { list: accounts.list(), current: accounts.current(s) } : null;\n },\n switchFiles: (s, to) => {\n const accounts = agentOf(s).accounts;\n if (!accounts) throw new Error('its agent has no accounts');\n return accounts.switchFiles(s, to);\n },\n record: async (s, to) => {\n if (!(await setSessionAccount(s.target, s.branch, to))) throw new Error('unknown session');\n },\n hostRuns: peekPty,\n // Claude Code's process files say one runs for it that isn't the host's (terminal-ws.ts, session-control-routes.ts).\n runningOutside: (id) => {\n const hostPids = ptyPids();\n return (agentsBySession(liveAgents(), loadHistory()).get(id) ?? []).some((c) => !hostPids.has(c.pid));\n },\n othersRunningIn: (s, id) => {\n const folders = agentOf(s).accounts?.folders(s) ?? [];\n if (!folders.length) return null;\n const own = ptyPid(id);\n const key = (p: string) => {\n const r = path.resolve(p).replace(/[\\\\/]+$/, '');\n return process.platform === 'win32' ? r.toLowerCase() : r;\n };\n const wanted = new Map(folders.map((f) => [key(f), f]));\n const other = liveAgents().find((a) => a.pid !== own && wanted.has(key(a.cwd)));\n return other ? (wanted.get(key(other.cwd)) ?? other.cwd) : null;\n },\n hostRefusal: accountSwitchRefusal,\n halt: haltPty,\n resume: resumePtyOnAccount,\n ...opts,\n };\n}\n","import { agentOf, AccountAdminError, type AccountUsers, type AgentAccounts } from '../agents/index.js';\nimport { loadHistory } from './history.js';\nimport type { WorktreeSession } from './session-types.js';\n\n/**\n * Which sessions are on an account, and forgetting one (`work account remove`): agent-neutral — a session's account is\n * what its own agent's `accounts` part says (agents/types.ts); a session of an agent without accounts is on none.\n */\n\nconst label = (s: WorktreeSession) => `${s.target} · ${s.branch}`;\n\n/** The sessions on `name` of the agent `accounts` belongs to: live ones, and archived ones (a Restore would start one on it). */\nexport function sessionsOnAccount(\n name: string,\n accounts: Pick<AgentAccounts, 'current'>,\n sessions: readonly WorktreeSession[] = loadHistory(),\n): AccountUsers {\n const on = sessions.filter((s) => agentOf(s).accounts === accounts && accounts.current(s) === name);\n return { live: on.filter((s) => !s.archivedAt).map(label), archived: on.filter((s) => s.archivedAt).map(label) };\n}\n\n/**\n * Forget an account of an agent. Refused while a live session runs on it, and while archived ones use it unless `force`\n * (their Restore would then start on the default account): the sessions are read under the config's lock, right before\n * the write, so one made meanwhile on it still stops it.\n */\nexport async function removeAgentAccount(\n accounts: AgentAccounts,\n name: string,\n opts: { force?: boolean; sessions?: () => readonly WorktreeSession[] } = {},\n): Promise<void> {\n if (!accounts.admin) throw new AccountAdminError('its accounts are not managed by work');\n await accounts.admin.remove(name, () => {\n const users = sessionsOnAccount(name, accounts, opts.sessions ? opts.sessions() : loadHistory());\n return opts.force ? { live: users.live, archived: [] } : users;\n });\n}\n","import { AccountAdminError, type AgentAccountAdmin, type AgentAccounts } from '../agents/index.js';\nimport type { ActivityLog } from '../platform/activity.js';\nimport type { UsageAccount } from '../usage/usage.js';\nimport { sessionsOnAccount } from './account-users.js';\nimport { loadHistory } from './history.js';\nimport type { WorktreeSession } from './session-types.js';\n\n/**\n * The accounts of an agent as `work account` and the dashboard's Accounts page both manage them: one overview (who is\n * logged in, its last usage reading, the sessions on it), adding one and choosing the default through the agent's\n * `accounts.admin`, and the login terminals the page opens (start, stop, and work's skills put into a new account's\n * folder once its first login is over). Agent-neutral: everything of the agent's goes through its adapter.\n */\n\n/** One account, with what the page and `work account list` show of it. */\nexport interface AccountOverview {\n name: string;\n dir: string;\n isDefault: boolean;\n /** Null: can't tell (macOS keeps Claude's credentials in the keychain). */\n loggedIn: boolean | null;\n /** The sessions on it as \"target · branch\": the live ones, and the archived ones (whose Restore needs it). */\n live: string[];\n archived: string[];\n /** Its last usage reading (as recorded: a window past its reset is aged by whoever shows it); null: none yet. */\n usage: UsageAccount | null;\n}\n\nexport function accountOverview(\n accounts: AgentAccounts,\n readings: readonly UsageAccount[],\n sessions: readonly WorktreeSession[] = loadHistory(),\n): AccountOverview[] {\n return accounts.list().map((a) => {\n const users = sessionsOnAccount(a.name, accounts, sessions);\n return {\n name: a.name,\n dir: a.dir,\n isDefault: a.isDefault,\n loggedIn: a.loggedIn,\n live: users.live,\n archived: users.archived,\n usage: readings.find((r) => r.account === a.name) ?? null,\n };\n });\n}\n\n/** The agent's account administration, or the refusal every caller says the same way. */\nfunction adminOf(accounts: AgentAccounts | undefined): AgentAccountAdmin {\n if (!accounts?.admin) throw new AccountAdminError('its accounts are not managed by work');\n return accounts.admin;\n}\n\n/** Record a new account (its folder: `folder`, else the agent's default place, made when missing). Returns the folder. */\nexport async function addAgentAccount(accounts: AgentAccounts | undefined, name: string, folder?: string): Promise<string> {\n return adminOf(accounts).add(name, folder?.trim() || undefined);\n}\n\n/** New sessions use this account. */\nexport async function setDefaultAgentAccount(accounts: AgentAccounts | undefined, name: string): Promise<void> {\n return adminOf(accounts).setDefault(name);\n}\n\nexport interface SkillsOutcome {\n ok: boolean;\n message: string;\n}\n\n/** What the login terminals need: the account lookup, the PTY host, and work's skills install for one account. */\nexport interface AccountLoginDeps {\n has(name: string): boolean;\n /** Start (or find running) the account's login terminal in the PTY host; its id. */\n start(name: string): Promise<string>;\n stop(name: string): Promise<void>;\n /** Put work's skills into the account's folder (slow: the agent's own CLI, several times). */\n installSkills(name: string): Promise<SkillsOutcome>;\n /** How an install went (the Activity panel). */\n note?(name: string, outcome: SkillsOutcome): void;\n}\n\nexport interface AccountLogins {\n /** The login terminal's id. Refused (AccountAdminError) for an account there isn't. */\n start(name: string): Promise<string>;\n /**\n * Stop the login terminal. The first time for an account in this process, work's skills go into its folder after —\n * as `work account add` installs them once the login is over (installing while the agent writes its settings would\n * race it). `skills`: that install, under way (null: none started); nobody need wait for it.\n */\n stop(name: string): Promise<{ skills: Promise<SkillsOutcome> | null }>;\n}\n\nexport function createAccountLogins(deps: AccountLoginDeps): AccountLogins {\n const installed = new Set<string>();\n const installing = new Set<string>();\n return {\n async start(name) {\n if (!deps.has(name)) throw new AccountAdminError(`no account “${name}”`);\n return deps.start(name);\n },\n async stop(name) {\n await deps.stop(name);\n if (!deps.has(name) || installed.has(name) || installing.has(name)) return { skills: null };\n installing.add(name);\n const skills = deps\n .installSkills(name)\n .catch((e: unknown): SkillsOutcome => ({ ok: false, message: e instanceof Error ? e.message : String(e) }))\n .then((r) => {\n installing.delete(name);\n // A failed install is tried again at the next close.\n if (r.ok) installed.add(name);\n deps.note?.(name, r);\n return r;\n });\n return { skills };\n },\n };\n}\n\n/** How a skills install for an account went, as an Activity run (kind `accounts`): a failure lights the Activity dot. */\nexport function accountSkillsNote(activity: Pick<ActivityLog, 'start'>): NonNullable<AccountLoginDeps['note']> {\n return (name, r) => {\n const run = activity.start('accounts', `Work's skills for the ${name} account`);\n if (r.ok) run.done(r.message);\n else {\n run.note(`${r.message} — or run \\`work account skills ${name}\\``, { level: 'warn' });\n run.fail(r.message);\n }\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BO,SAAS,cAAc,IAAY,GAAsC;AAC9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AAClC,QAAM,aAAa,oBAAI,IAAY;AACnC,SAAO;AAAA,IACL,MAAM,MAAM,MAAM;AAChB,UAAI,CAAC,KAAK,IAAI,IAAI,EAAG,OAAM,IAAI,kBAAkB,oBAAe,IAAI,QAAG;AACvE,aAAO,KAAK,MAAM,IAAI;AAAA,IACxB;AAAA,IACA,MAAM,KAAK,MAAM;AACf,YAAM,KAAK,KAAK,IAAI;AACpB,UAAI,CAAC,KAAK,IAAI,IAAI,KAAK,UAAU,IAAI,IAAI,KAAK,WAAW,IAAI,IAAI,EAAG,QAAO,EAAE,QAAQ,KAAK;AAC1F,iBAAW,IAAI,IAAI;AACnB,YAAM,SAAS,KACZ,cAAc,IAAI,EAClB,MAAM,CAAC,OAA+B,EAAE,IAAI,OAAO,SAAS,aAAa,QAAQ,EAAE,UAAU,OAAO,CAAC,EAAE,EAAE,EACzG,KAAK,CAAC,MAAM;AACX,mBAAW,OAAO,IAAI;AAEtB,YAAI,EAAE,GAAI,WAAU,IAAI,IAAI;AAC5B,aAAK,OAAO,MAAM,CAAC;AACnB,eAAO;AAAA,MACT,CAAC;AACH,aAAO,EAAE,OAAO;AAAA,IAClB;AAAA,EACF;AACF;AAGO,SAAS,kBAAkB,UAA6E;AAC7G,SAAO,CAAC,MAAM,MAAM;AAClB,UAAM,MAAM,SAAS,MAAM,YAAY,yBAAyB,IAAI,UAAU;AAC9E,QAAI,EAAE,GAAI,KAAI,KAAK,EAAE,OAAO;AAAA,SACvB;AACH,UAAI,KAAK,GAAG,EAAE,OAAO,wCAAmC,IAAI,MAAM,EAAE,OAAO,OAAO,CAAC;AACnF,UAAI,KAAK,EAAE,OAAO;AAAA,IACpB;AAAA,EACF;AACF;","names":["label"]}
|
|
@@ -34,8 +34,9 @@ function branchesFromReflog(lines, opts = {}) {
|
|
|
34
34
|
const out = /* @__PURE__ */ new Map();
|
|
35
35
|
const firstMove = lines.map((l) => moveOf(l.message)).find((m) => m !== null);
|
|
36
36
|
let on = firstMove?.from ?? opts.start ?? opts.current ?? null;
|
|
37
|
+
const since = opts.since ?? -Infinity;
|
|
37
38
|
const see = (name, at, from) => {
|
|
38
|
-
if (!name || !looksLikeBranch(name)) return;
|
|
39
|
+
if (!name || !looksLikeBranch(name) || at < since) return;
|
|
39
40
|
const b = out.get(name);
|
|
40
41
|
if (b) b.lastSeen = Math.max(b.lastSeen, at);
|
|
41
42
|
else out.set(name, { name, firstSeen: at, lastSeen: at, ...from && looksLikeBranch(from) ? { movedFrom: from } : {} });
|
|
@@ -53,7 +54,7 @@ function branchesFromReflog(lines, opts = {}) {
|
|
|
53
54
|
see(on, l.at);
|
|
54
55
|
}
|
|
55
56
|
if (opts.current && !out.has(opts.current) && looksLikeBranch(opts.current)) {
|
|
56
|
-
const at = lines.length ? lines[lines.length - 1].at : 0;
|
|
57
|
+
const at = Math.max(lines.length ? lines[lines.length - 1].at : 0, opts.since ?? 0);
|
|
57
58
|
out.set(opts.current, { name: opts.current, firstSeen: at, lastSeen: at });
|
|
58
59
|
}
|
|
59
60
|
return [...out.values()];
|
|
@@ -145,11 +146,12 @@ function branchLogChangedSince(commonDir, name, since) {
|
|
|
145
146
|
return true;
|
|
146
147
|
}
|
|
147
148
|
}
|
|
148
|
-
function checkoutBranchHistory(checkout, start) {
|
|
149
|
+
function checkoutBranchHistory(checkout, start, since) {
|
|
149
150
|
const dirs = gitDirs(checkout);
|
|
150
151
|
if (!dirs) return [];
|
|
151
152
|
const lines = readReflog(path.join(dirs.gitDir, "logs", "HEAD"));
|
|
152
|
-
|
|
153
|
+
const opts = { start: start ?? null, current: checkedOutBranch(checkout), ...since !== void 0 ? { since } : {} };
|
|
154
|
+
return branchesFromReflog(lines, opts).map((b) => {
|
|
153
155
|
const from = branchCreatedFrom(dirs.commonDir, b.name, b.movedFrom);
|
|
154
156
|
const at = branchStart(dirs.commonDir, b.name);
|
|
155
157
|
return { ...b, ...from && from !== b.name ? { from } : {}, ...at ? { start: at } : {} };
|
|
@@ -262,7 +264,9 @@ function noteBranches(sessionId, seen, now = /* @__PURE__ */ new Date(), opts =
|
|
|
262
264
|
return tx((d) => {
|
|
263
265
|
const row = d.prepare("SELECT data FROM session_branches WHERE session_id = ?").get(sessionId);
|
|
264
266
|
const old = row ? cleanBranches(json.parse(row.data)) : null;
|
|
265
|
-
const
|
|
267
|
+
const drop = opts.drop;
|
|
268
|
+
const kept = old && drop && old.branches.some(drop) ? { ...old, branches: old.branches.filter((b) => !drop(b)) } : old;
|
|
269
|
+
const next = withSightings(kept, seen, now, opts);
|
|
266
270
|
if (next !== old) write(sessionId, next);
|
|
267
271
|
return next;
|
|
268
272
|
});
|
|
@@ -323,12 +327,19 @@ function recordCheckedOutBranches(s, now = /* @__PURE__ */ new Date()) {
|
|
|
323
327
|
if (known && withSightings(known, seen, now) === known) return known;
|
|
324
328
|
return noteBranches(id, seen, now);
|
|
325
329
|
}
|
|
330
|
+
function branchFromBefore(s, b) {
|
|
331
|
+
return b.name !== s.branch && Date.parse(b.lastSeen) < Date.parse(s.createdAt);
|
|
332
|
+
}
|
|
333
|
+
function needsBackfill(s, rec) {
|
|
334
|
+
return !rec?.backfilled || rec.branches.some((b) => branchFromBefore(s, b));
|
|
335
|
+
}
|
|
326
336
|
function backfillSessionBranches(s, now = /* @__PURE__ */ new Date()) {
|
|
327
337
|
const id = sessionIdFor(s);
|
|
328
338
|
const seen = [];
|
|
339
|
+
const began = Date.parse(s.createdAt);
|
|
329
340
|
for (const p of s.paths) {
|
|
330
341
|
const repo = repoNameOf(s, p);
|
|
331
|
-
const history = checkoutBranchHistory(p, s.branch);
|
|
342
|
+
const history = checkoutBranchHistory(p, s.branch, Number.isFinite(began) ? began : void 0);
|
|
332
343
|
if (!history.some((b) => b.name === s.branch) && s.createdAt) {
|
|
333
344
|
seen.push({ repo, name: s.branch, firstSeen: s.createdAt, lastSeen: s.createdAt });
|
|
334
345
|
}
|
|
@@ -343,7 +354,7 @@ function backfillSessionBranches(s, now = /* @__PURE__ */ new Date()) {
|
|
|
343
354
|
});
|
|
344
355
|
}
|
|
345
356
|
}
|
|
346
|
-
return noteBranches(id, seen, now, { backfilled: true });
|
|
357
|
+
return noteBranches(id, seen, now, { backfilled: true, drop: (b) => branchFromBefore(s, b) });
|
|
347
358
|
}
|
|
348
359
|
function wasPushed(rec, repo, name) {
|
|
349
360
|
return !!rec?.branches.some((b) => b.repo === repo && b.name === name && b.pushed);
|
|
@@ -368,6 +379,7 @@ export {
|
|
|
368
379
|
noteBranchFacts,
|
|
369
380
|
repoNameOf,
|
|
370
381
|
recordCheckedOutBranches,
|
|
382
|
+
needsBackfill,
|
|
371
383
|
backfillSessionBranches,
|
|
372
384
|
wasPushed,
|
|
373
385
|
branchHidden,
|
|
@@ -375,4 +387,4 @@ export {
|
|
|
375
387
|
MAX_WATCHED_BRANCHES,
|
|
376
388
|
otherBranchesToWatch
|
|
377
389
|
};
|
|
378
|
-
//# sourceMappingURL=chunk-
|
|
390
|
+
//# sourceMappingURL=chunk-MJIYIMPI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/sessions/session-branches.ts","../src/core/git/reflog.ts"],"sourcesContent":["import path from 'node:path';\nimport { json, tx, withDb } from '../platform/db.js';\nimport { checkedOutBranch, gitDirs } from '../git/git-head.js';\nimport { branchCreatedFrom, branchLogChangedSince, branchStart, checkoutBranchHistory } from '../git/reflog.js';\nimport type { WorktreeSession } from './session-types.js';\nimport { sessionIdFor } from './session-id.js';\n\n/**\n * Every branch a session's repos have been on, recorded as it goes — so the\n * dashboard shows the work on all of them without asking git each time.\n * Claude often moves on in the same worktree: a PR merges, and the next fix\n * is a new branch made from origin/dev, then another. Only the checked-out\n * branch was ever looked at, so the earlier one's commits and PR (and the\n * first new one's, once a second came) vanished from the session.\n *\n * Per session in state.db `session_branches` (schema v12, gone with the\n * session: purgeSessionRows): each repo's branches with when they were first\n * and last checked out, and where they were made from when the reflog says.\n * Written at each turn's end (the turn-end hook reads HEAD files, no git),\n * when work checks a branch out (setupWorktree, Update), and once from the\n * reflog for a session recorded before (`backfilled`).\n */\n\nexport interface RecordedBranch {\n /** The repo, as the session names it (Ship and the PR watch): a group's folder, else the target. */\n repo: string;\n name: string;\n /** ISO. */\n firstSeen: string;\n lastSeen: string;\n /** The branch or ref it was made from (`origin/dev`), when known. */\n from?: string;\n /** When it was first seen deleted (the branch facts' look): a merged one stops showing after a while. */\n gone?: string;\n /** It was seen merged (its commits in main, or its PR merged): kept so a deleted one still reads merged. */\n merged?: true;\n /** It was seen on origin once: its PR is asked about even after origin's copy was deleted (a merge's tidy-up). */\n pushed?: true;\n /** The commit it was made at (its reflog's first line): its own work is what it has beyond it, merged or not. */\n start?: string;\n /** Its tip when last looked at (the branch facts): what the Diff tab shows of it once it is deleted. */\n tip?: string;\n}\n\nexport interface SessionBranches {\n branches: RecordedBranch[];\n /** When its reflog was read for the branches before the record began (once per session). */\n backfilled?: string;\n}\n\n/** Most branches kept per repo: the ones last seen longest ago go. */\nexport const MAX_BRANCHES_PER_REPO = 30;\n\nconst isIso = (v: unknown): v is string => typeof v === 'string' && Number.isFinite(Date.parse(v));\nconst isSha = (v: unknown): v is string => typeof v === 'string' && /^[0-9a-f]{40,64}$/.test(v);\n\n/** A stored record, shape-checked; entries that don't hold up are dropped, not the record. */\nexport function cleanBranches(raw: unknown): SessionBranches | null {\n const o = raw as { branches?: unknown; backfilled?: unknown } | null;\n if (!o || typeof o !== 'object' || !Array.isArray(o.branches)) return null;\n const branches: RecordedBranch[] = [];\n for (const b of o.branches as unknown[]) {\n const x = b as Partial<Record<keyof RecordedBranch, unknown>> | null;\n if (!x || typeof x !== 'object' || typeof x.repo !== 'string' || !x.repo || typeof x.name !== 'string' || !x.name) continue;\n if (!isIso(x.firstSeen) || !isIso(x.lastSeen)) continue;\n branches.push({\n repo: x.repo,\n name: x.name,\n firstSeen: x.firstSeen,\n lastSeen: x.lastSeen,\n ...(typeof x.from === 'string' && x.from ? { from: x.from } : {}),\n ...(isIso(x.gone) ? { gone: x.gone } : {}),\n ...(x.merged === true ? { merged: true as const } : {}),\n ...(x.pushed === true ? { pushed: true as const } : {}),\n ...(isSha(x.start) ? { start: x.start } : {}),\n ...(isSha(x.tip) ? { tip: x.tip } : {}),\n });\n }\n return { branches, ...(isIso(o.backfilled) ? { backfilled: o.backfilled } : {}) };\n}\n\nexport function readSessionBranches(sessionId: string): SessionBranches | null {\n const row = withDb(\n (d) => d.prepare('SELECT data FROM session_branches WHERE session_id = ?').get(sessionId) as { data: string } | undefined,\n );\n return row ? cleanBranches(json.parse(row.data)) : null;\n}\n\n/** Every session's record, in one query (the sessions list reads them per build). */\nexport function allSessionBranches(): Map<string, SessionBranches> {\n const rows = withDb(\n (d) => d.prepare('SELECT session_id, data FROM session_branches').all() as Array<{ session_id: string; data: string }>,\n );\n const out = new Map<string, SessionBranches>();\n for (const r of rows) {\n const b = cleanBranches(json.parse(r.data));\n if (b) out.set(r.session_id, b);\n }\n return out;\n}\n\n/** A branch seen checked out (or found in the reflog): its repo, name, and when. */\nexport interface BranchSighting {\n repo: string;\n name: string;\n /** ISO; default now. */\n firstSeen?: string;\n lastSeen?: string;\n from?: string;\n /** The commit it was made at, when its reflog says. */\n start?: string;\n}\n\n/** lastSeen is written again only when it moved this much: a turn's end needn't write the row every time. */\nexport const LAST_SEEN_STEP_MS = 10 * 60_000;\n\n/**\n * The record with these sightings: a new branch appended, a known one's first\n * and last sighting widened, its `from` filled in when it had none; a branch\n * seen again un-gone. Returns the record unchanged (the same object) when\n * nothing worth a write moved. Pure.\n */\nexport function withSightings(\n rec: SessionBranches | null,\n seen: BranchSighting[],\n now: Date,\n opts: { backfilled?: boolean } = {},\n): SessionBranches {\n const base: SessionBranches = rec ?? { branches: [] };\n let changed = !rec || (opts.backfilled === true && !base.backfilled);\n const branches = base.branches.map((b) => ({ ...b }));\n const nowIso = now.toISOString();\n for (const s of seen) {\n const first = s.firstSeen ?? nowIso;\n const last = s.lastSeen ?? nowIso;\n const b = branches.find((x) => x.repo === s.repo && x.name === s.name);\n if (!b) {\n branches.push({\n repo: s.repo,\n name: s.name,\n firstSeen: first,\n lastSeen: last,\n ...(s.from ? { from: s.from } : {}),\n ...(s.start ? { start: s.start } : {}),\n });\n changed = true;\n continue;\n }\n if (Date.parse(first) < Date.parse(b.firstSeen)) {\n b.firstSeen = first;\n changed = true;\n }\n if (Date.parse(last) - Date.parse(b.lastSeen) >= LAST_SEEN_STEP_MS) {\n b.lastSeen = last;\n changed = true;\n }\n if (s.from && !b.from) {\n b.from = s.from;\n changed = true;\n }\n // Where its own work begins moves when it is rebased or fast-forwarded: the newest reading wins.\n if (s.start && b.start !== s.start) {\n b.start = s.start;\n changed = true;\n }\n if (b.gone && s.lastSeen === undefined) {\n // Checked out now: it exists again.\n delete b.gone;\n changed = true;\n }\n }\n if (!changed) return base;\n // Per repo, the most recent MAX_BRANCHES_PER_REPO.\n const kept: RecordedBranch[] = [];\n for (const repo of [...new Set(branches.map((b) => b.repo))]) {\n const mine = branches.filter((b) => b.repo === repo);\n const keep = new Set([...mine].sort((a, b) => Date.parse(b.lastSeen) - Date.parse(a.lastSeen)).slice(0, MAX_BRANCHES_PER_REPO));\n kept.push(...mine.filter((b) => keep.has(b)));\n }\n return {\n branches: kept,\n ...(base.backfilled ? { backfilled: base.backfilled } : opts.backfilled ? { backfilled: nowIso } : {}),\n };\n}\n\nfunction write(sessionId: string, rec: SessionBranches): void {\n withDb((d) => d.prepare('INSERT OR REPLACE INTO session_branches (session_id, data) VALUES (?, ?)').run(sessionId, JSON.stringify(rec)));\n}\n\n/**\n * Record sightings, in one transaction over the row as it is now; `drop`: recorded branches to take out first.\n * Returns the record after; writes only when something moved.\n */\nexport function noteBranches(\n sessionId: string,\n seen: BranchSighting[],\n now = new Date(),\n opts: { backfilled?: boolean; drop?: (b: RecordedBranch) => boolean } = {},\n): SessionBranches {\n return tx((d) => {\n const row = d.prepare('SELECT data FROM session_branches WHERE session_id = ?').get(sessionId) as { data: string } | undefined;\n const old = row ? cleanBranches(json.parse(row.data)) : null;\n const drop = opts.drop;\n const kept = old && drop && old.branches.some(drop) ? { ...old, branches: old.branches.filter((b) => !drop(b)) } : old;\n const next = withSightings(kept, seen, now, opts);\n if (next !== old) write(sessionId, next);\n return next;\n });\n}\n\n/**\n * What the branch facts saw of recorded branches: deleted (gone, from when it\n * was first seen so), or merged. One transaction; writes only a change.\n */\nexport function noteBranchFacts(\n sessionId: string,\n facts: Array<{ repo: string; name: string; exists: boolean; merged: boolean; pushed?: boolean; sha?: string | null }>,\n now = new Date(),\n): void {\n tx((d) => {\n const row = d.prepare('SELECT data FROM session_branches WHERE session_id = ?').get(sessionId) as { data: string } | undefined;\n const rec = row ? cleanBranches(json.parse(row.data)) : null;\n if (!rec) return;\n let changed = false;\n for (const f of facts) {\n const b = rec.branches.find((x) => x.repo === f.repo && x.name === f.name);\n if (!b) continue;\n if (!f.exists && !b.gone) {\n b.gone = now.toISOString();\n changed = true;\n } else if (f.exists && b.gone) {\n delete b.gone;\n changed = true;\n }\n if (f.merged && !b.merged) {\n b.merged = true;\n changed = true;\n }\n if (f.pushed && !b.pushed) {\n b.pushed = true;\n changed = true;\n }\n if (f.exists && f.sha && isSha(f.sha) && b.tip !== f.sha) {\n b.tip = f.sha;\n changed = true;\n }\n }\n if (changed) write(sessionId, rec);\n });\n}\n\n/** A session's repo as Ship and the PR watch name it: a group's folder, a single repo's target. */\nexport const repoNameOf = (s: Pick<WorktreeSession, 'isGroup' | 'target'>, checkout: string): string =>\n s.isGroup ? path.basename(checkout) : s.target;\n\n/**\n * The start a turn's sighting carries: only one read now, when the branch's reflog moved (`stale`) — never the\n * record's own, read before the write: carried into it, that would overwrite a newer start another process stored\n * meanwhile (the write is its own transaction, and a sighting with no start keeps the stored one). Pure but for `read`.\n */\nexport function sightingStart(stale: boolean, read: () => string | undefined): string | undefined {\n return stale ? read() : undefined;\n}\n\n/**\n * Record the branch each of the session's repos has checked out now (HEAD\n * files: no git), and for a branch new to the record, where it was made from\n * (its reflog's first line). The turn-end hook's step; cheap. Returns the\n * record after, or null when nothing is checked out on a branch.\n */\nexport function recordCheckedOutBranches(\n s: Pick<WorktreeSession, 'target' | 'branch' | 'isGroup' | 'paths' | 'archivedAt'>,\n now = new Date(),\n): SessionBranches | null {\n if (s.archivedAt) return null;\n const id = sessionIdFor(s);\n const seen: BranchSighting[] = [];\n const known = readSessionBranches(id);\n for (const p of s.paths) {\n const name = checkedOutBranch(p);\n if (!name) continue;\n const repo = repoNameOf(s, p);\n const had = known?.branches.find((b) => b.repo === repo && b.name === name);\n const dirs = gitDirs(p);\n // A new branch: where it came from. Every turn: where its own work begins (a rebase or fast-forward moves it),\n // kept so the Diff tab still has it once the branch — and its reflog — are deleted.\n const from = (!had && dirs && branchCreatedFrom(dirs.commonDir, name)) || undefined;\n // Read only when its reflog was written since the record last saw it (a stat): a repo's own main has a reflog\n // of thousands of lines, and this runs at every turn's end of every Claude.\n const stale = !had?.start || (dirs ? branchLogChangedSince(dirs.commonDir, name, had.lastSeen) : false);\n const start = sightingStart(stale, () => (dirs && branchStart(dirs.commonDir, name)) || undefined);\n seen.push({ repo, name, ...(from && from !== name ? { from } : {}), ...(start ? { start } : {}) });\n }\n if (!seen.length) return null;\n // Nothing moved (the usual turn end): no write transaction at all.\n if (known && withSightings(known, seen, now) === known) return known;\n return noteBranches(id, seen, now);\n}\n\n/**\n * A recorded branch last checked out before the session began: not its work. Only the reflog read before it\n * was bounded (`backfillSessionBranches`) put one there — a session on a repo's own checkout took in every\n * branch that folder had been on for months (reported: \"23 branches\", 12 of them from before the session).\n * The session's own branch excepted: its checkout can have been on it before the session was made. Pure.\n */\nexport function branchFromBefore(s: Pick<WorktreeSession, 'branch' | 'createdAt'>, b: Pick<RecordedBranch, 'name' | 'lastSeen'>): boolean {\n return b.name !== s.branch && Date.parse(b.lastSeen) < Date.parse(s.createdAt);\n}\n\n/** Is the reflog still to be read into the record: never read, or read before it was bounded (`branchFromBefore`)? Pure. */\nexport function needsBackfill(s: Pick<WorktreeSession, 'branch' | 'createdAt'>, rec: SessionBranches | null | undefined): boolean {\n return !rec?.backfilled || rec.branches.some((b) => branchFromBefore(s, b));\n}\n\n/**\n * Once per session recorded before the list began: the branches its repos'\n * reflogs show they were on since the session began (the session's own branch\n * included), merged into the record and marked backfilled; branches recorded\n * from before the session began are taken out (`branchFromBefore`). File\n * reads only; run it in the background, never on a request's path. Returns\n * the record after.\n */\nexport function backfillSessionBranches(\n s: Pick<WorktreeSession, 'target' | 'branch' | 'isGroup' | 'paths' | 'createdAt'>,\n now = new Date(),\n): SessionBranches {\n const id = sessionIdFor(s);\n const seen: BranchSighting[] = [];\n const began = Date.parse(s.createdAt);\n for (const p of s.paths) {\n const repo = repoNameOf(s, p);\n const history = checkoutBranchHistory(p, s.branch, Number.isFinite(began) ? began : undefined);\n if (!history.some((b) => b.name === s.branch) && s.createdAt) {\n // The session's own branch, even when its reflog is gone or cut short.\n seen.push({ repo, name: s.branch, firstSeen: s.createdAt, lastSeen: s.createdAt });\n }\n for (const b of history) {\n seen.push({\n repo,\n name: b.name,\n firstSeen: new Date(b.firstSeen || Date.parse(s.createdAt) || now.getTime()).toISOString(),\n lastSeen: new Date(b.lastSeen || b.firstSeen || now.getTime()).toISOString(),\n ...(b.from ? { from: b.from } : {}),\n ...(b.start ? { start: b.start } : {}),\n });\n }\n }\n return noteBranches(id, seen, now, { backfilled: true, drop: (b) => branchFromBefore(s, b) });\n}\n\n/** A recorded branch that was seen on origin once (its PR is worth asking about even with origin's copy gone). */\nexport function wasPushed(rec: SessionBranches | null | undefined, repo: string, name: string): boolean {\n return !!rec?.branches.some((b) => b.repo === repo && b.name === name && b.pushed);\n}\n\n/** How long a merged branch that was deleted goes on showing. */\nexport const GONE_SHOWN_MS = 3 * 24 * 3600_000;\n\n/** How long a branch merged or deleted, and not checked out since, goes on showing. */\nexport const DONE_SHOWN_MS = 30 * 24 * 3600_000;\n\n/**\n * A recorded branch no longer worth showing (kept in the record): merged and deleted `GONE_SHOWN_MS` ago; or merged\n * or deleted, not checked out now (`current`), and last checked out `DONE_SHOWN_MS` ago (reported: a repo's own\n * checkout on main listed, and showed the PR of, a branch it was on a month before). Pure.\n */\nexport function branchHidden(\n b: Pick<RecordedBranch, 'gone' | 'merged' | 'lastSeen'>,\n now: number,\n prMerged = false,\n current = false,\n): boolean {\n const merged = b.merged || prMerged;\n if (b.gone && merged && now - Date.parse(b.gone) >= GONE_SHOWN_MS) return true;\n return !current && (merged || !!b.gone) && now - Date.parse(b.lastSeen) >= DONE_SHOWN_MS;\n}\n\n/** How long after it was last checked out another branch is still looked at (the PR watch's window). */\nexport const BRANCH_WATCH_MS = 30 * 24 * 3600_000;\n\n/** At most this many other branches per repo are asked about (git facts, the host's PR). */\nexport const MAX_WATCHED_BRANCHES = 5;\n\n/**\n * A repo's recorded branches other than the one checked out that are worth a\n * look: seen within `withinMs`, not hidden, newest first, at most\n * MAX_WATCHED_BRANCHES. Pure.\n */\nexport function otherBranchesToWatch(\n rec: SessionBranches | null | undefined,\n repo: string,\n current: string | null,\n now: number,\n withinMs: number,\n): string[] {\n return (rec?.branches ?? [])\n .filter((b) => b.repo === repo && b.name !== current && now - Date.parse(b.lastSeen) <= withinMs && !branchHidden(b, now))\n .sort((a, b) => Date.parse(b.lastSeen) - Date.parse(a.lastSeen))\n .slice(0, MAX_WATCHED_BRANCHES)\n .map((b) => b.name);\n}\n","import fs from 'node:fs';\nimport path from 'node:path';\nimport { checkedOutBranch, gitDirs } from './git-head.js';\n\n/**\n * Which branches a checkout has been on, read from its reflog files — no\n * `git` process. A checkout's own `logs/HEAD` has a line per move of HEAD\n * (`checkout: moving from feat/x to fix/y`, a commit, a reset…), each with\n * its time; a branch's own reflog in the shared folder\n * (`logs/refs/heads/<name>`) starts with where it was made from\n * (`branch: Created from origin/dev`). The parsing is pure; the reads are\n * small files.\n */\n\nexport interface ReflogLine {\n /** When, in ms. */\n at: number;\n /** What git wrote after the tab: `checkout: moving from a to b`, `commit: …`. */\n message: string;\n /** The commit it moved to (the line's second object name), when the line has one. */\n sha?: string;\n}\n\n/** `<old> <new> Name <email> 1793784300 +0100\\t<message>` → its time and message; null for a line that isn't one. */\nexport function parseReflogLine(line: string): ReflogLine | null {\n const tab = line.indexOf('\\t');\n if (tab < 0) return null;\n const m = /\\s(\\d+)\\s+[+-]\\d{4}\\s*$/.exec(line.slice(0, tab));\n if (!m) return null;\n const sha = /^[0-9a-f]{40,64} ([0-9a-f]{40,64}) /.exec(line)?.[1];\n return { at: Number(m[1]) * 1000, message: line.slice(tab + 1).trim(), ...(sha && !/^0+$/.test(sha) ? { sha } : {}) };\n}\n\n/** A checkout target that names a branch: not a commit (detached), not a remote-tracking ref, not HEAD. */\nexport function looksLikeBranch(name: string): boolean {\n if (!name || name === 'HEAD' || /\\s/.test(name)) return false;\n if (/^[0-9a-f]{7,40}$/.test(name)) return false;\n if (/^(?:origin|upstream)\\//.test(name) || name.startsWith('refs/remotes/')) return false;\n return true;\n}\n\nexport interface ReflogBranch {\n name: string;\n /** When HEAD first came to it (ms): its first sighting in this reflog. */\n firstSeen: number;\n /** When HEAD was last on it (ms): the last line written while it was checked out. */\n lastSeen: number;\n /** The branch HEAD left to come to it, the first time. */\n movedFrom?: string;\n}\n\n/**\n * The branches a checkout's HEAD reflog shows it on, in the order it came to\n * them. `start`: the branch it was on before the first move the reflog shows\n * (the session's own); `current`: what HEAD names now — a reflog cut short\n * still has it; `since` (ms): only what HEAD was on from then — the lines\n * before it are followed (where HEAD was) but nothing in them is seen. A\n * repo's own checkout has a reflog going back long before its session. Pure.\n */\nexport function branchesFromReflog(\n lines: ReflogLine[],\n opts: { start?: string | null; current?: string | null; since?: number } = {},\n): ReflogBranch[] {\n const out = new Map<string, ReflogBranch>();\n const firstMove = lines.map((l) => moveOf(l.message)).find((m) => m !== null);\n // Before the first move HEAD was on the branch it moved from — the start branch, when the reflog has no move.\n let on: string | null = firstMove?.from ?? opts.start ?? opts.current ?? null;\n const since = opts.since ?? -Infinity;\n const see = (name: string | null, at: number, from?: string) => {\n if (!name || !looksLikeBranch(name) || at < since) return;\n const b = out.get(name);\n if (b) b.lastSeen = Math.max(b.lastSeen, at);\n else out.set(name, { name, firstSeen: at, lastSeen: at, ...(from && looksLikeBranch(from) ? { movedFrom: from } : {}) });\n };\n for (const l of lines) {\n const move = moveOf(l.message);\n if (move) {\n see(on, l.at);\n on = move.to;\n see(on, l.at, move.from);\n continue;\n }\n // `rebase (finish): returning to refs/heads/x`: back on x after a rebase's detached steps.\n const back = /returning to refs\\/heads\\/(.+)$/.exec(l.message);\n if (back) on = back[1].trim();\n see(on, l.at);\n }\n if (opts.current && !out.has(opts.current) && looksLikeBranch(opts.current)) {\n const at = Math.max(lines.length ? lines[lines.length - 1].at : 0, opts.since ?? 0);\n out.set(opts.current, { name: opts.current, firstSeen: at, lastSeen: at });\n }\n return [...out.values()];\n}\n\nfunction moveOf(message: string): { from: string; to: string } | null {\n const m = /^checkout: moving from (\\S+) to (\\S+)$/.exec(message);\n return m ? { from: m[1], to: m[2] } : null;\n}\n\n/** `branch: Created from origin/dev` (a branch's own reflog, its first line) → `origin/dev`; null when it says nothing of the kind. */\nexport function createdFromLine(message: string): string | null {\n const m = /^branch: Created from (\\S+)$/.exec(message);\n return m ? m[1] : null;\n}\n\n/** Lines of a reflog file, oldest first; [] when it isn't there. At most the last `max` lines (a reflog grows for good). */\nexport function readReflog(file: string, max = 5000): ReflogLine[] {\n let text: string;\n try {\n text = fs.readFileSync(file, 'utf8');\n } catch {\n return [];\n }\n const lines = text.split(/\\r?\\n/);\n return lines\n .slice(Math.max(0, lines.length - max))\n .map(parseReflogLine)\n .filter((l): l is ReflogLine => l !== null);\n}\n\n/**\n * Where a branch was made from, as its own reflog says (`origin/dev`), or —\n * made from HEAD (`Created from HEAD`) — the branch HEAD left for it\n * (`movedFrom`). Null when neither says. Reads one small file.\n */\nexport function branchCreatedFrom(commonDir: string, name: string, movedFrom?: string): string | null {\n const first = readReflog(path.join(commonDir, 'logs', 'refs', 'heads', ...name.split('/')), 50)[0];\n const from = first ? createdFromLine(first.message) : null;\n if (from && from !== 'HEAD') return from;\n return movedFrom ?? null;\n}\n\n/**\n * Where a branch's own work begins, from its own reflog: the newest point it was put onto from outside — made\n * (`branch: Created from …`), fast-forwarded (`merge origin/dev: Fast-forward`, `pull: Fast-forward`), reset,\n * or rebased (`rebase (finish): … onto <sha>`: what it was replayed on). Its own work is what it has beyond that,\n * along its first parents, even once it is merged into what it was made from; a merge of its base into it isn't\n * a new start (first parents step over it). Null when the reflog says none (cut short, or never made here). Pure.\n *\n * Reported: a branch made from dev, fast-forwarded and rebased onto newer dev before its first commit listed dev's\n * own merges as its work, read from where it was made.\n *\n * Moves within its own work aren't from outside: a reset or rebase onto a commit the branch itself was at since its\n * start (`reset --soft HEAD~1`, `rebase -i HEAD~2`: a squash) keeps the start, or its earlier commits would drop out\n * of its work; and so does a fast-forward from its own copy (`merge origin/<name>`, `pull origin <name>`: a\n * colleague's commits on the same branch are its work too). `name`: the branch's own name; without it every\n * fast-forward moves the start.\n */\nexport function startFromReflog(lines: ReflogLine[], name?: string, upstream?: string | null): string | null {\n let start: string | null = null;\n // The commits the branch itself was at since its start: a move back onto one of them is within its own work.\n let own = new Set<string>();\n const moveTo = (sha: string) => {\n if (own.has(sha)) return;\n start = sha;\n own = new Set([sha]);\n };\n for (const l of lines) {\n const onto = /\\bonto ([0-9a-f]{40,64})\\s*$/.exec(l.message);\n // `rebase (finish)`, `pull --rebase (finish)`, and `pull --quiet (finish)` — a plain pull with pull.rebase set\n // (work's own re-entry pull) — all replay the branch onto what follows `onto`.\n if (onto && /^(?:rebase|pull)\\b[^:]*\\(finish\\)|^rebase finished/.test(l.message)) moveTo(onto[1]);\n else if (l.sha && createdFromLine(l.message) !== null) {\n start = l.sha;\n own = new Set([l.sha]);\n } else if (l.sha && /: Fast-forward\\b/.test(l.message) && !fromItsOwnCopy(l.message, name, upstream)) moveTo(l.sha);\n else if (l.sha && (/^reset: moving to /.test(l.message) || /^branch: Reset to /.test(l.message))) moveTo(l.sha);\n if (l.sha && start) own.add(l.sha);\n }\n return start;\n}\n\n/**\n * `merge origin/fix/x: Fast-forward`, `pull origin fix/x: Fast-forward`: the branch's own copy brought in. A pull\n * that names no ref (`pull: Fast-forward`, `pull --quiet: Fast-forward` — options aren't refs) took its upstream:\n * its own copy when that is the branch of its own name (`upstream`, branch.<name>.merge), not when it tracks\n * origin/main as work's new branches do.\n */\nfunction fromItsOwnCopy(message: string, name: string | undefined, upstream?: string | null): boolean {\n if (!name) return false;\n const m = /^(merge|pull)\\b(.*?):\\s*Fast-forward/.exec(message);\n if (!m) return false;\n const words = m[2]\n .trim()\n .split(/\\s+/)\n .filter((w) => w && !w.startsWith('-'));\n const ref = words[words.length - 1] ?? (m[1] === 'pull' ? (upstream ?? undefined) : undefined);\n return !!ref && (ref === name || ref.endsWith(`/${name}`));\n}\n\n/**\n * The branch a branch pulls from (`branch.<name>.merge`, `refs/heads/` taken off), read from the repo's config\n * file — no git. Null when it has none or the file can't be read.\n */\nexport function branchUpstream(commonDir: string, name: string): string | null {\n let text: string;\n try {\n text = fs.readFileSync(path.join(commonDir, 'config'), 'utf8');\n } catch {\n return null;\n }\n let inIt = false;\n let merge: string | null = null;\n for (const raw of text.split(/\\r?\\n/)) {\n const line = raw.trim();\n const section = /^\\[\\s*([A-Za-z0-9.-]+)(?:\\s+\"((?:[^\"\\\\]|\\\\.)*)\")?\\s*\\]/.exec(line);\n if (section) {\n inIt = section[1].toLowerCase() === 'branch' && section[2]?.replace(/\\\\(.)/g, '$1') === name;\n continue;\n }\n if (!inIt) continue;\n const kv = /^merge\\s*=\\s*(.*?)\\s*$/i.exec(line);\n if (kv) merge = kv[1].replace(/^\"(.*)\"$/, '$1'); // the last one wins, as git reads it\n }\n return merge ? merge.replace(/^refs\\/heads\\//, '') : null;\n}\n\n/** A branch's own reflog file. */\nconst branchLogFile = (commonDir: string, name: string): string => path.join(commonDir, 'logs', 'refs', 'heads', ...name.split('/'));\n\n/** startFromReflog over a branch's reflog file. Reads one small file. */\nexport function branchStart(commonDir: string, name: string): string | null {\n return startFromReflog(readReflog(branchLogFile(commonDir, name)), name, branchUpstream(commonDir, name));\n}\n\n/**\n * Whether a branch's reflog was written after `since` (ISO): what it says may have moved. True when it can't be\n * told (no file, a bad date). A stat, no read: the turn-end hook asks it for every repo of every session.\n */\nexport function branchLogChangedSince(commonDir: string, name: string, since: string): boolean {\n const at = Date.parse(since);\n if (!at) return true;\n try {\n return fs.statSync(branchLogFile(commonDir, name)).mtimeMs > at;\n } catch {\n return true;\n }\n}\n\n/**\n * The branches a checkout has been on (its HEAD reflog), each with where it\n * was made from when its own reflog says, and the commit it was made at. File reads only. `start`: the\n * session's branch; `since` (ms): only from then on (the session began). [] when it isn't a checkout.\n */\nexport function checkoutBranchHistory(\n checkout: string,\n start?: string | null,\n since?: number,\n): Array<ReflogBranch & { from?: string; start?: string }> {\n const dirs = gitDirs(checkout);\n if (!dirs) return [];\n const lines = readReflog(path.join(dirs.gitDir, 'logs', 'HEAD'));\n const opts = { start: start ?? null, current: checkedOutBranch(checkout), ...(since !== undefined ? { since } : {}) };\n return branchesFromReflog(lines, opts).map((b) => {\n const from = branchCreatedFrom(dirs.commonDir, b.name, b.movedFrom);\n const at = branchStart(dirs.commonDir, b.name);\n return { ...b, ...(from && from !== b.name ? { from } : {}), ...(at ? { start: at } : {}) };\n });\n}\n"],"mappings":";;;;;;;;;;;;;AAAA,OAAOA,WAAU;;;ACAjB,OAAO,QAAQ;AACf,OAAO,UAAU;AAuBV,SAAS,gBAAgB,MAAiC;AAC/D,QAAM,MAAM,KAAK,QAAQ,GAAI;AAC7B,MAAI,MAAM,EAAG,QAAO;AACpB,QAAM,IAAI,0BAA0B,KAAK,KAAK,MAAM,GAAG,GAAG,CAAC;AAC3D,MAAI,CAAC,EAAG,QAAO;AACf,QAAM,MAAM,sCAAsC,KAAK,IAAI,IAAI,CAAC;AAChE,SAAO,EAAE,IAAI,OAAO,EAAE,CAAC,CAAC,IAAI,KAAM,S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AAK;AAC7E;AAGO,IAAM,kBAAkB,KAAK,KAAK;AAGlC,IAAM,uBAAuB;AAO7B,SAAS,qBACd,KACA,MACA,SACA,KACA,UACU;AACV,UAAQ,KAAK,YAAY,CAAC,GACvB,OAAO,CAAC,MAAM,EAAE,SAAS,QAAQ,EAAE,SAAS,WAAW,MAAM,KAAK,MAAM,EAAE,QAAQ,KAAK,YAAY,CAAC,aAAa,GAAG,GAAG,CAAC,EACxH,KAAK,CAAC,GAAG,MAAM,KAAK,MAAM,EAAE,QAAQ,IAAI,KAAK,MAAM,EAAE,QAAQ,CAAC,EAC9D,MAAM,GAAG,oBAAoB,EAC7B,IAAI,CAAC,MAAM,EAAE,IAAI;AACtB;","names":["path","path"]}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
computeRangeDiff
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BOQJBO4K.js";
|
|
5
5
|
import {
|
|
6
6
|
loadManifest
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-KLJMHYU7.js";
|
|
8
8
|
import {
|
|
9
9
|
agentSettings,
|
|
10
10
|
internalAgent
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-YKWDZCUW.js";
|
|
12
12
|
import {
|
|
13
13
|
internalRunEnv
|
|
14
14
|
} from "./chunk-YQSWVHKK.js";
|
|
@@ -232,4 +232,4 @@ export {
|
|
|
232
232
|
runInternalReadOnly,
|
|
233
233
|
summarizeCheckpoint
|
|
234
234
|
};
|
|
235
|
-
//# sourceMappingURL=chunk-
|
|
235
|
+
//# sourceMappingURL=chunk-NISGFF25.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
findSessionForCwd
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-OW7YUW4W.js";
|
|
5
5
|
import {
|
|
6
6
|
sessionIdFor
|
|
7
7
|
} from "./chunk-QGUBOOEN.js";
|
|
@@ -40,4 +40,4 @@ export {
|
|
|
40
40
|
agentsBySession,
|
|
41
41
|
summarizeAgents
|
|
42
42
|
};
|
|
43
|
-
//# sourceMappingURL=chunk-
|
|
43
|
+
//# sourceMappingURL=chunk-NJ7CHZJS.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
sessionWorkTime
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-JZZJRVWZ.js";
|
|
5
5
|
import {
|
|
6
6
|
runInternal
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-NISGFF25.js";
|
|
8
8
|
import {
|
|
9
9
|
DEFAULT_CATCH_UP_DAYS,
|
|
10
10
|
MAX_RANGE_DAYS,
|
|
@@ -19,14 +19,14 @@ import {
|
|
|
19
19
|
readIssueIds,
|
|
20
20
|
rememberIssueId,
|
|
21
21
|
timeSettings
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-BQS73CWR.js";
|
|
23
23
|
import {
|
|
24
24
|
knownHosts
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-YNPORFRR.js";
|
|
26
26
|
import {
|
|
27
27
|
loadHistory,
|
|
28
28
|
runGitAsync
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-KLJMHYU7.js";
|
|
30
30
|
import {
|
|
31
31
|
sessionIdFor
|
|
32
32
|
} from "./chunk-QGUBOOEN.js";
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
isIssueKey,
|
|
35
35
|
issueKeys,
|
|
36
36
|
loadConfig
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-3ZPVKUYD.js";
|
|
38
38
|
import {
|
|
39
39
|
explainNotOnPath,
|
|
40
40
|
programPath
|
|
@@ -744,4 +744,4 @@ export {
|
|
|
744
744
|
finishDeviceLogin,
|
|
745
745
|
defaultTimeDeps
|
|
746
746
|
};
|
|
747
|
-
//# sourceMappingURL=chunk-
|
|
747
|
+
//# sourceMappingURL=chunk-NS5K4IN5.js.map
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-UPS7NHKI.js";
|
|
10
10
|
import {
|
|
11
11
|
loadHistory
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-KLJMHYU7.js";
|
|
13
13
|
import {
|
|
14
14
|
sessionIdFor,
|
|
15
15
|
tx,
|
|
@@ -186,4 +186,4 @@ export {
|
|
|
186
186
|
claimForDelivery,
|
|
187
187
|
formatPendingForPrompt
|
|
188
188
|
};
|
|
189
|
-
//# sourceMappingURL=chunk-
|
|
189
|
+
//# sourceMappingURL=chunk-OW7YUW4W.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
readStatus
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KLJMHYU7.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-PKY63672.js.map
|