@moberg_hr/work-tree 2.17.2 → 2.18.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-H2PGGR3Q.js → account-TT5TOV7Y.js} +25 -22
- package/dist/{account-H2PGGR3Q.js.map → account-TT5TOV7Y.js.map} +1 -1
- package/dist/{add-repo-6OLFENCR.js → add-repo-LM5M2TW4.js} +20 -17
- package/dist/{add-repo-6OLFENCR.js.map → add-repo-LM5M2TW4.js.map} +1 -1
- package/dist/{answer-AAWIGGVF.js → answer-Q47UH37K.js} +12 -9
- package/dist/{answer-AAWIGGVF.js.map → answer-Q47UH37K.js.map} +1 -1
- package/dist/{attach-3CLKNIHR.js → attach-JMA4XCEB.js} +20 -17
- package/dist/{attach-3CLKNIHR.js.map → attach-JMA4XCEB.js.map} +1 -1
- package/dist/bin.js +3 -3
- package/dist/{block-CCHW2U25.js → block-TTMTQ5WO.js} +13 -10
- package/dist/{block-CCHW2U25.js.map → block-TTMTQ5WO.js.map} +1 -1
- package/dist/{broadcast-RWGJLRU7.js → broadcast-MQL3PHVK.js} +9 -6
- package/dist/{broadcast-RWGJLRU7.js.map → broadcast-MQL3PHVK.js.map} +1 -1
- package/dist/{catchup-CWPIE6X3.js → catchup-DKD3BGTG.js} +14 -11
- package/dist/{catchup-CWPIE6X3.js.map → catchup-DKD3BGTG.js.map} +1 -1
- package/dist/{chunk-6FD52UQ6.js → chunk-3OUUWNK2.js} +6 -6
- package/dist/{chunk-UKEI5DJS.js → chunk-4J2F6OWM.js} +2 -2
- package/dist/{chunk-2I3HHZMS.js → chunk-5JRO64D4.js} +2 -2
- package/dist/{chunk-DAVDKNRH.js → chunk-63RNLC25.js} +2 -2
- package/dist/{chunk-V2TTONXR.js → chunk-7PKIZVR7.js} +5 -5
- package/dist/{chunk-3E3WHGSI.js → chunk-AQKPXFC2.js} +3 -3
- package/dist/{chunk-RYFHY3JQ.js → chunk-ARQSFOYE.js} +3 -3
- package/dist/chunk-BR6OWWAA.js +64 -0
- package/dist/chunk-BR6OWWAA.js.map +1 -0
- package/dist/{chunk-GUHRMQNP.js → chunk-C2BFHQHX.js} +4 -4
- package/dist/{chunk-XT2ZKXMT.js → chunk-CZWZMRQ3.js} +17 -5
- package/dist/chunk-CZWZMRQ3.js.map +1 -0
- package/dist/{chunk-VS6DDWIX.js → chunk-D77U5ELL.js} +2 -2
- package/dist/{chunk-A5OQHOEV.js → chunk-DA2KILWV.js} +2 -2
- package/dist/{chunk-63HMFHNG.js → chunk-DLV7TRON.js} +2 -2
- package/dist/{chunk-ZFFWFVER.js → chunk-E25DJVBD.js} +2 -2
- package/dist/{chunk-Q6RMN7PX.js → chunk-EP7LCLHB.js} +5 -5
- package/dist/{chunk-E2PKPMWC.js → chunk-ESEIPUMT.js} +2 -2
- package/dist/{chunk-ZWFNIN6O.js → chunk-FAGTMW6W.js} +2 -2
- package/dist/{chunk-D4V5W6IC.js → chunk-FJADRDML.js} +4 -4
- package/dist/{chunk-IWMODEU4.js → chunk-GR4LV3ZS.js} +4 -4
- package/dist/{chunk-REPFZIPP.js → chunk-HGB7BITW.js} +16 -70
- package/dist/chunk-HGB7BITW.js.map +1 -0
- package/dist/{chunk-4GUB7MQG.js → chunk-HREHEBL2.js} +9 -9
- package/dist/{chunk-RFNMR7M4.js → chunk-IALCEDTH.js} +13 -13
- package/dist/{chunk-DOOT25BN.js → chunk-JEH4X76F.js} +2 -2
- package/dist/{chunk-JTQBQEL4.js → chunk-JIK4FY3E.js} +3 -3
- package/dist/{chunk-SNQVTLBX.js → chunk-JPXEX3XW.js} +2 -2
- package/dist/{chunk-DOYJR2HF.js → chunk-JUGF3YE7.js} +5 -4
- package/dist/chunk-JUGF3YE7.js.map +1 -0
- package/dist/chunk-KGHWHAVF.js +24 -0
- package/dist/chunk-KGHWHAVF.js.map +1 -0
- package/dist/{chunk-T3HVNKHI.js → chunk-KQ7QLBY2.js} +3 -3
- package/dist/{chunk-WC23KWN4.js → chunk-KX6KZYU4.js} +3 -3
- package/dist/{chunk-UVZITL47.js → chunk-LK7HJGUC.js} +1 -1
- package/dist/chunk-LK7HJGUC.js.map +1 -0
- package/dist/{chunk-LHUSNLSJ.js → chunk-LVNRPAQK.js} +9 -9
- package/dist/{chunk-YJVBX3HU.js → chunk-NBLF2SNP.js} +4 -4
- package/dist/{chunk-YXDWREKR.js → chunk-NGB2K7HX.js} +2 -2
- package/dist/{chunk-OHMLCXRW.js → chunk-O22DNTKU.js} +21 -26
- package/dist/chunk-O22DNTKU.js.map +1 -0
- package/dist/{chunk-33SBTWZW.js → chunk-OEQASHE3.js} +54 -54
- package/dist/{chunk-INQVYKB4.js → chunk-PLTFWTIE.js} +3 -3
- package/dist/{chunk-CHSKQHYY.js → chunk-QEZGXU5Q.js} +5 -5
- package/dist/{chunk-3A3HSUBD.js → chunk-QHFUCX2J.js} +2 -2
- package/dist/{chunk-NKKISMHV.js → chunk-RNEN6NUX.js} +3 -3
- package/dist/{chunk-WK5ZIO6B.js → chunk-SFFAPGA5.js} +2 -2
- package/dist/{chunk-6T5JRU75.js → chunk-T3KZSJHU.js} +5 -5
- package/dist/{chunk-ZED6QQJ5.js → chunk-TI2CNJLD.js} +4 -4
- package/dist/{chunk-FDTBJW7M.js → chunk-U4INTLIY.js} +5 -5
- package/dist/chunk-UKPZXS5B.js +9 -0
- package/dist/{chunk-2AENPORN.js → chunk-V6KHER6C.js} +5 -5
- package/dist/{chunk-TMRRQ6TT.js → chunk-VEERK6HO.js} +2 -2
- package/dist/{chunk-UM4R6YIC.js → chunk-VFRJO737.js} +8 -8
- package/dist/{chunk-3HWQYW6S.js → chunk-VFZI4SAH.js} +2 -2
- package/dist/{chunk-4TTIEI7I.js → chunk-VRMALBZK.js} +2 -2
- package/dist/{chunk-JHCR7H4Y.js → chunk-WIYDT3PY.js} +5 -29
- package/dist/chunk-WIYDT3PY.js.map +1 -0
- package/dist/{chunk-QAY2Q2JC.js → chunk-WVZG5Q4L.js} +2 -2
- package/dist/{chunk-DZACN5FM.js → chunk-XFWO5FYK.js} +3 -3
- package/dist/{chunk-RF6DCSJM.js → chunk-XPX5AAYH.js} +3 -3
- package/dist/{chunk-WJGSOT6H.js → chunk-XUO5F4JU.js} +3 -3
- package/dist/{chunk-S6V3G3J5.js → chunk-YCCZKF4F.js} +3 -3
- package/dist/chunk-YQSWVHKK.js +33 -0
- package/dist/chunk-YQSWVHKK.js.map +1 -0
- package/dist/{chunk-OUPQW7WQ.js → chunk-Z4MI3HBV.js} +5 -5
- package/dist/{chunk-UBGKHTXX.js → chunk-Z5TRUCIA.js} +9 -9
- package/dist/{chunk-HX7B4PI2.js → chunk-ZKSITAVC.js} +4 -4
- package/dist/{cleanup-6QC2ISW2.js → cleanup-MW27IU2D.js} +31 -28
- package/dist/{cleanup-6QC2ISW2.js.map → cleanup-MW27IU2D.js.map} +1 -1
- package/dist/{cli-7RMR5D5O.js → cli-QVGLGPQB.js} +3 -3
- package/dist/{color-CRVXKHMC.js → color-RGMFJAHN.js} +11 -8
- package/dist/{color-CRVXKHMC.js.map → color-RGMFJAHN.js.map} +1 -1
- package/dist/{config-4EZIXQDV.js → config-AWVOZGZR.js} +11 -8
- package/dist/{config-4EZIXQDV.js.map → config-AWVOZGZR.js.map} +1 -1
- package/dist/{diff-PU2AYXR7.js → diff-WJKZRFRM.js} +12 -9
- package/dist/{diff-PU2AYXR7.js.map → diff-WJKZRFRM.js.map} +1 -1
- package/dist/{digest-NRVPOSQO.js → digest-OX5NEL2K.js} +11 -8
- package/dist/{digest-NRVPOSQO.js.map → digest-OX5NEL2K.js.map} +1 -1
- package/dist/{fork-AHV22A2S.js → fork-4AAA7GAX.js} +32 -29
- package/dist/{fork-AHV22A2S.js.map → fork-4AAA7GAX.js.map} +1 -1
- package/dist/{history-II3FYVXY.js → history-MMA6YXFH.js} +9 -6
- package/dist/{hook-CSOXC4SP.js → hook-MOC7MYLG.js} +16 -13
- package/dist/{hook-CSOXC4SP.js.map → hook-MOC7MYLG.js.map} +1 -1
- package/dist/{hydrate-MMQX5KGM.js → hydrate-EGS47UUM.js} +9 -6
- package/dist/{hydrate-MMQX5KGM.js.map → hydrate-EGS47UUM.js.map} +1 -1
- package/dist/{init-2GUP4SBN.js → init-QOFM5BTW.js} +14 -11
- package/dist/{init-2GUP4SBN.js.map → init-QOFM5BTW.js.map} +1 -1
- package/dist/{install-skills-LAFRMJ7N.js → install-skills-E24KULUM.js} +9 -6
- package/dist/install-skills-bin.js +8 -5
- package/dist/install-skills-bin.js.map +1 -1
- package/dist/{keep-HD6TXD65.js → keep-WLDMR63Z.js} +11 -8
- package/dist/{keep-HD6TXD65.js.map → keep-WLDMR63Z.js.map} +1 -1
- package/dist/{list-7HHYTAIA.js → list-YJ6BSG2M.js} +9 -6
- package/dist/{list-7HHYTAIA.js.map → list-YJ6BSG2M.js.map} +1 -1
- package/dist/{move-AJTGIGJR.js → move-AGSZHGWY.js} +21 -18
- package/dist/{move-AJTGIGJR.js.map → move-AGSZHGWY.js.map} +1 -1
- package/dist/{note-5H5CDNXB.js → note-GCNBL5A2.js} +11 -8
- package/dist/{note-5H5CDNXB.js.map → note-GCNBL5A2.js.map} +1 -1
- package/dist/{overlaps-YB2S7TEC.js → overlaps-X3YDTLTV.js} +15 -12
- package/dist/{overlaps-YB2S7TEC.js.map → overlaps-X3YDTLTV.js.map} +1 -1
- package/dist/{pin-4IHOP6F6.js → pin-22MYV72V.js} +11 -8
- package/dist/{pin-4IHOP6F6.js.map → pin-22MYV72V.js.map} +1 -1
- package/dist/{pr-RTFRPS5N.js → pr-YRQYEWL7.js} +27 -24
- package/dist/{pr-RTFRPS5N.js.map → pr-YRQYEWL7.js.map} +1 -1
- package/dist/{prune-P3Y6HAGE.js → prune-7RV6GMHU.js} +29 -26
- package/dist/{prune-P3Y6HAGE.js.map → prune-7RV6GMHU.js.map} +1 -1
- package/dist/{pty-host-CXWNRSC6.js → pty-host-PUVNAZ3F.js} +16 -13
- package/dist/{pty-host-CXWNRSC6.js.map → pty-host-PUVNAZ3F.js.map} +1 -1
- package/dist/{read-FAAEZAAH.js → read-BOB63DIH.js} +11 -8
- package/dist/{read-FAAEZAAH.js.map → read-BOB63DIH.js.map} +1 -1
- package/dist/{recent-4A7ROGTU.js → recent-S2JIDTHB.js} +16 -13
- package/dist/{recent-4A7ROGTU.js.map → recent-S2JIDTHB.js.map} +1 -1
- package/dist/{remove-4HT5JHPR.js → remove-EKBQROBE.js} +30 -27
- package/dist/{remove-4HT5JHPR.js.map → remove-EKBQROBE.js.map} +1 -1
- package/dist/{restart-X4VCGVVD.js → restart-UM7XOGDO.js} +11 -8
- package/dist/{restart-X4VCGVVD.js.map → restart-UM7XOGDO.js.map} +1 -1
- package/dist/{resume-CIYUYUGR.js → resume-BFE6ETTN.js} +16 -13
- package/dist/{resume-CIYUYUGR.js.map → resume-BFE6ETTN.js.map} +1 -1
- package/dist/{review-WTNHUBNY.js → review-XQG3AEMG.js} +10 -7
- package/dist/{review-WTNHUBNY.js.map → review-XQG3AEMG.js.map} +1 -1
- package/dist/{run-VYG6IYO4.js → run-KFICX2JE.js} +9 -6
- package/dist/{run-VYG6IYO4.js.map → run-KFICX2JE.js.map} +1 -1
- package/dist/{screen-LPWYIT4D.js → screen-2B66BGKO.js} +11 -8
- package/dist/{screen-LPWYIT4D.js.map → screen-2B66BGKO.js.map} +1 -1
- package/dist/{search-T3GQMWFL.js → search-3MXCGLOL.js} +9 -6
- package/dist/{search-T3GQMWFL.js.map → search-3MXCGLOL.js.map} +1 -1
- package/dist/{section-Y6LOV4R5.js → section-QJV7ENVX.js} +11 -8
- package/dist/{section-Y6LOV4R5.js.map → section-QJV7ENVX.js.map} +1 -1
- package/dist/{send-HSDMFC6W.js → send-LAAEMPZQ.js} +13 -10
- package/dist/{send-HSDMFC6W.js.map → send-LAAEMPZQ.js.map} +1 -1
- package/dist/{sessions-WLYINQDP.js → sessions-TWN3F43J.js} +29 -26
- package/dist/{sessions-WLYINQDP.js.map → sessions-TWN3F43J.js.map} +1 -1
- package/dist/{show-CRU7ZNCF.js → show-JFRJVS3G.js} +10 -7
- package/dist/{show-CRU7ZNCF.js.map → show-JFRJVS3G.js.map} +1 -1
- package/dist/{snooze-YQFTGZL5.js → snooze-RRPHFFMD.js} +11 -8
- package/dist/{snooze-YQFTGZL5.js.map → snooze-RRPHFFMD.js.map} +1 -1
- package/dist/{start-EYFMHXJ6.js → start-XTEZKSA3.js} +11 -8
- package/dist/{start-EYFMHXJ6.js.map → start-XTEZKSA3.js.map} +1 -1
- package/dist/{status-PFGSYLDB.js → status-2BFFMHO2.js} +13 -10
- package/dist/{status-PFGSYLDB.js.map → status-2BFFMHO2.js.map} +1 -1
- package/dist/{statusline-NEVXTHUY.js → statusline-B6U3ANSM.js} +3 -2
- package/dist/{statusline-NEVXTHUY.js.map → statusline-B6U3ANSM.js.map} +1 -1
- package/dist/{statusline-hook-H5MM2PA2.js → statusline-hook-SYRLMSDL.js} +7 -5
- package/dist/{statusline-hook-H5MM2PA2.js.map → statusline-hook-SYRLMSDL.js.map} +1 -1
- package/dist/{stop-AV7NEC7U.js → stop-I6WWTUFP.js} +11 -8
- package/dist/{stop-AV7NEC7U.js.map → stop-I6WWTUFP.js.map} +1 -1
- package/dist/{sync-2M5O3NX7.js → sync-SB5JN2EN.js} +29 -26
- package/dist/{sync-2M5O3NX7.js.map → sync-SB5JN2EN.js.map} +1 -1
- package/dist/{time-E7FJHTKI.js → time-IEFF5FEV.js} +12 -9
- package/dist/{time-E7FJHTKI.js.map → time-IEFF5FEV.js.map} +1 -1
- package/dist/{timesheet-LTC7EXNJ.js → timesheet-RRK4ENUU.js} +14 -11
- package/dist/{timesheet-LTC7EXNJ.js.map → timesheet-RRK4ENUU.js.map} +1 -1
- package/dist/{tree-CQT5LU62.js → tree-G4ATBUTH.js} +28 -25
- package/dist/{tree-CQT5LU62.js.map → tree-G4ATBUTH.js.map} +1 -1
- package/dist/{update-BZOZCI7G.js → update-LSDD3ZDO.js} +17 -14
- package/dist/{update-BZOZCI7G.js.map → update-LSDD3ZDO.js.map} +1 -1
- package/dist/{usage-IOCB7U4W.js → usage-CTT5CMQK.js} +15 -10
- package/dist/usage-CTT5CMQK.js.map +1 -0
- package/dist/usage-ask-YJNTOGXY.js +176 -0
- package/dist/usage-ask-YJNTOGXY.js.map +1 -0
- package/dist/{version-U2QIALPO.js → version-6UJN2CCE.js} +3 -2
- package/dist/{version-U2QIALPO.js.map → version-6UJN2CCE.js.map} +1 -1
- package/dist/{wait-J5BM6222.js → wait-2L67BLEO.js} +13 -10
- package/dist/{wait-J5BM6222.js.map → wait-2L67BLEO.js.map} +1 -1
- package/dist/wd-bin.js +2 -2
- package/dist/web/assets/{PtyView-DiTbw6LM.js → PtyView-DhDNPvL9.js} +2 -2
- package/dist/web/assets/{PtyView-DiTbw6LM.js.map → PtyView-DhDNPvL9.js.map} +1 -1
- package/dist/web/assets/{index-Du3J-M5I.js → index-CfBb7suR.js} +4 -4
- package/dist/web/assets/index-CfBb7suR.js.map +1 -0
- package/dist/web/index.html +1 -1
- package/dist/{web-52FISJAC.js → web-MUO46QAX.js} +175 -158
- package/dist/web-MUO46QAX.js.map +1 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/dist/chunk-DOYJR2HF.js.map +0 -1
- package/dist/chunk-JHCR7H4Y.js.map +0 -1
- package/dist/chunk-M7CC2GUA.js +0 -9
- package/dist/chunk-OHMLCXRW.js.map +0 -1
- package/dist/chunk-REPFZIPP.js.map +0 -1
- package/dist/chunk-UVZITL47.js.map +0 -1
- package/dist/chunk-XT2ZKXMT.js.map +0 -1
- package/dist/usage-IOCB7U4W.js.map +0 -1
- package/dist/web/assets/index-Du3J-M5I.js.map +0 -1
- package/dist/web-52FISJAC.js.map +0 -1
- /package/dist/{chunk-6FD52UQ6.js.map → chunk-3OUUWNK2.js.map} +0 -0
- /package/dist/{chunk-UKEI5DJS.js.map → chunk-4J2F6OWM.js.map} +0 -0
- /package/dist/{chunk-2I3HHZMS.js.map → chunk-5JRO64D4.js.map} +0 -0
- /package/dist/{chunk-DAVDKNRH.js.map → chunk-63RNLC25.js.map} +0 -0
- /package/dist/{chunk-V2TTONXR.js.map → chunk-7PKIZVR7.js.map} +0 -0
- /package/dist/{chunk-3E3WHGSI.js.map → chunk-AQKPXFC2.js.map} +0 -0
- /package/dist/{chunk-RYFHY3JQ.js.map → chunk-ARQSFOYE.js.map} +0 -0
- /package/dist/{chunk-GUHRMQNP.js.map → chunk-C2BFHQHX.js.map} +0 -0
- /package/dist/{chunk-VS6DDWIX.js.map → chunk-D77U5ELL.js.map} +0 -0
- /package/dist/{chunk-A5OQHOEV.js.map → chunk-DA2KILWV.js.map} +0 -0
- /package/dist/{chunk-63HMFHNG.js.map → chunk-DLV7TRON.js.map} +0 -0
- /package/dist/{chunk-ZFFWFVER.js.map → chunk-E25DJVBD.js.map} +0 -0
- /package/dist/{chunk-Q6RMN7PX.js.map → chunk-EP7LCLHB.js.map} +0 -0
- /package/dist/{chunk-E2PKPMWC.js.map → chunk-ESEIPUMT.js.map} +0 -0
- /package/dist/{chunk-ZWFNIN6O.js.map → chunk-FAGTMW6W.js.map} +0 -0
- /package/dist/{chunk-D4V5W6IC.js.map → chunk-FJADRDML.js.map} +0 -0
- /package/dist/{chunk-IWMODEU4.js.map → chunk-GR4LV3ZS.js.map} +0 -0
- /package/dist/{chunk-4GUB7MQG.js.map → chunk-HREHEBL2.js.map} +0 -0
- /package/dist/{chunk-RFNMR7M4.js.map → chunk-IALCEDTH.js.map} +0 -0
- /package/dist/{chunk-DOOT25BN.js.map → chunk-JEH4X76F.js.map} +0 -0
- /package/dist/{chunk-JTQBQEL4.js.map → chunk-JIK4FY3E.js.map} +0 -0
- /package/dist/{chunk-SNQVTLBX.js.map → chunk-JPXEX3XW.js.map} +0 -0
- /package/dist/{chunk-T3HVNKHI.js.map → chunk-KQ7QLBY2.js.map} +0 -0
- /package/dist/{chunk-WC23KWN4.js.map → chunk-KX6KZYU4.js.map} +0 -0
- /package/dist/{chunk-LHUSNLSJ.js.map → chunk-LVNRPAQK.js.map} +0 -0
- /package/dist/{chunk-YJVBX3HU.js.map → chunk-NBLF2SNP.js.map} +0 -0
- /package/dist/{chunk-YXDWREKR.js.map → chunk-NGB2K7HX.js.map} +0 -0
- /package/dist/{chunk-33SBTWZW.js.map → chunk-OEQASHE3.js.map} +0 -0
- /package/dist/{chunk-INQVYKB4.js.map → chunk-PLTFWTIE.js.map} +0 -0
- /package/dist/{chunk-CHSKQHYY.js.map → chunk-QEZGXU5Q.js.map} +0 -0
- /package/dist/{chunk-3A3HSUBD.js.map → chunk-QHFUCX2J.js.map} +0 -0
- /package/dist/{chunk-NKKISMHV.js.map → chunk-RNEN6NUX.js.map} +0 -0
- /package/dist/{chunk-WK5ZIO6B.js.map → chunk-SFFAPGA5.js.map} +0 -0
- /package/dist/{chunk-6T5JRU75.js.map → chunk-T3KZSJHU.js.map} +0 -0
- /package/dist/{chunk-ZED6QQJ5.js.map → chunk-TI2CNJLD.js.map} +0 -0
- /package/dist/{chunk-FDTBJW7M.js.map → chunk-U4INTLIY.js.map} +0 -0
- /package/dist/{chunk-M7CC2GUA.js.map → chunk-UKPZXS5B.js.map} +0 -0
- /package/dist/{chunk-2AENPORN.js.map → chunk-V6KHER6C.js.map} +0 -0
- /package/dist/{chunk-TMRRQ6TT.js.map → chunk-VEERK6HO.js.map} +0 -0
- /package/dist/{chunk-UM4R6YIC.js.map → chunk-VFRJO737.js.map} +0 -0
- /package/dist/{chunk-3HWQYW6S.js.map → chunk-VFZI4SAH.js.map} +0 -0
- /package/dist/{chunk-4TTIEI7I.js.map → chunk-VRMALBZK.js.map} +0 -0
- /package/dist/{chunk-QAY2Q2JC.js.map → chunk-WVZG5Q4L.js.map} +0 -0
- /package/dist/{chunk-DZACN5FM.js.map → chunk-XFWO5FYK.js.map} +0 -0
- /package/dist/{chunk-RF6DCSJM.js.map → chunk-XPX5AAYH.js.map} +0 -0
- /package/dist/{chunk-WJGSOT6H.js.map → chunk-XUO5F4JU.js.map} +0 -0
- /package/dist/{chunk-S6V3G3J5.js.map → chunk-YCCZKF4F.js.map} +0 -0
- /package/dist/{chunk-OUPQW7WQ.js.map → chunk-Z4MI3HBV.js.map} +0 -0
- /package/dist/{chunk-UBGKHTXX.js.map → chunk-Z5TRUCIA.js.map} +0 -0
- /package/dist/{chunk-HX7B4PI2.js.map → chunk-ZKSITAVC.js.map} +0 -0
- /package/dist/{cli-7RMR5D5O.js.map → cli-QVGLGPQB.js.map} +0 -0
- /package/dist/{history-II3FYVXY.js.map → history-MMA6YXFH.js.map} +0 -0
- /package/dist/{install-skills-LAFRMJ7N.js.map → install-skills-E24KULUM.js.map} +0 -0
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
import {
|
|
3
3
|
branchFacts,
|
|
4
4
|
repoBase
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-TI2CNJLD.js";
|
|
6
6
|
import {
|
|
7
7
|
hostForRepo
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-JPXEX3XW.js";
|
|
9
9
|
import {
|
|
10
10
|
BRANCH_WATCH_MS,
|
|
11
11
|
otherBranchesToWatch,
|
|
12
12
|
readSessionBranches,
|
|
13
13
|
wasPushed
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-QHFUCX2J.js";
|
|
15
15
|
import {
|
|
16
16
|
defaultRunner
|
|
17
17
|
} from "./chunk-XBWS77S2.js";
|
|
18
18
|
import {
|
|
19
19
|
DEFAULT_HOST,
|
|
20
20
|
sessionRepos
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-D77U5ELL.js";
|
|
22
22
|
import {
|
|
23
23
|
sessionIdFor
|
|
24
24
|
} from "./chunk-ALBTIOP3.js";
|
|
@@ -412,4 +412,4 @@ export {
|
|
|
412
412
|
runShipAction,
|
|
413
413
|
mergeSelected
|
|
414
414
|
};
|
|
415
|
-
//# sourceMappingURL=chunk-
|
|
415
|
+
//# sourceMappingURL=chunk-EP7LCLHB.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
isFolderSession,
|
|
4
4
|
sessionRepos
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-D77U5ELL.js";
|
|
6
6
|
|
|
7
7
|
// src/core/worktree/add-repo-rules.ts
|
|
8
8
|
import path from "path";
|
|
@@ -36,4 +36,4 @@ export {
|
|
|
36
36
|
addRepoRefusal,
|
|
37
37
|
addedRepoNote
|
|
38
38
|
};
|
|
39
|
-
//# sourceMappingURL=chunk-
|
|
39
|
+
//# sourceMappingURL=chunk-ESEIPUMT.js.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
DISPLAY_LABEL,
|
|
7
7
|
displayStatus
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-63RNLC25.js";
|
|
9
9
|
import {
|
|
10
10
|
workCommand
|
|
11
11
|
} from "./chunk-HK6AZQ5Z.js";
|
|
@@ -167,4 +167,4 @@ export {
|
|
|
167
167
|
assistantContextReview,
|
|
168
168
|
readAssistantContext
|
|
169
169
|
};
|
|
170
|
-
//# sourceMappingURL=chunk-
|
|
170
|
+
//# sourceMappingURL=chunk-FAGTMW6W.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
isEmptyBaseSpec,
|
|
4
4
|
openBaseCheckout,
|
|
5
5
|
setupWorktree
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-C2BFHQHX.js";
|
|
7
7
|
import {
|
|
8
8
|
defaultRunner
|
|
9
9
|
} from "./chunk-XBWS77S2.js";
|
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
findSession,
|
|
12
12
|
loadHistory,
|
|
13
13
|
sessionAliases
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-D77U5ELL.js";
|
|
15
15
|
import {
|
|
16
16
|
ownsBranch
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-O22DNTKU.js";
|
|
18
18
|
import {
|
|
19
19
|
resolveProjectTarget
|
|
20
20
|
} from "./chunk-IPHADNF5.js";
|
|
@@ -204,4 +204,4 @@ export {
|
|
|
204
204
|
createInChild,
|
|
205
205
|
createInProcess
|
|
206
206
|
};
|
|
207
|
-
//# sourceMappingURL=chunk-
|
|
207
|
+
//# sourceMappingURL=chunk-FJADRDML.js.map
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
import {
|
|
3
3
|
ensureHost,
|
|
4
4
|
probeHostDetailed
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VRMALBZK.js";
|
|
6
6
|
import {
|
|
7
7
|
hostInfoPath,
|
|
8
8
|
readHostInfo
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DLV7TRON.js";
|
|
10
10
|
import {
|
|
11
11
|
agentFor,
|
|
12
12
|
agentSettings,
|
|
13
13
|
assistantAgent,
|
|
14
14
|
internalAgent
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-O22DNTKU.js";
|
|
16
16
|
import {
|
|
17
17
|
detachHere,
|
|
18
18
|
isPidAlive,
|
|
@@ -169,4 +169,4 @@ export {
|
|
|
169
169
|
restartHost,
|
|
170
170
|
ensureAgentPath
|
|
171
171
|
};
|
|
172
|
-
//# sourceMappingURL=chunk-
|
|
172
|
+
//# sourceMappingURL=chunk-GR4LV3ZS.js.map
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
accountOf
|
|
4
|
+
} from "./chunk-BR6OWWAA.js";
|
|
2
5
|
import {
|
|
3
6
|
detachHere,
|
|
4
7
|
killTree
|
|
@@ -10,72 +13,17 @@ import {
|
|
|
10
13
|
getConfigDir
|
|
11
14
|
} from "./chunk-F2ECTTSY.js";
|
|
12
15
|
|
|
13
|
-
// src/core/agents/claude/rate-limits.ts
|
|
14
|
-
import os from "os";
|
|
15
|
-
import path from "path";
|
|
16
|
-
import { createHash } from "crypto";
|
|
17
|
-
var isRecord = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
|
|
18
|
-
var clampPercent = (n) => Math.round(Math.min(100, Math.max(0, n)) * 10) / 10;
|
|
19
|
-
function resetIso(v) {
|
|
20
|
-
let ms;
|
|
21
|
-
if (typeof v === "number" && Number.isFinite(v)) ms = v < 1e12 ? v * 1e3 : v;
|
|
22
|
-
else if (typeof v === "string" && v.trim() !== "") ms = Date.parse(v);
|
|
23
|
-
else return null;
|
|
24
|
-
return Number.isFinite(ms) ? new Date(ms).toISOString() : null;
|
|
25
|
-
}
|
|
26
|
-
var capitalise = (s) => s.charAt(0).toUpperCase() + s.slice(1);
|
|
27
|
-
function labelOf(key) {
|
|
28
|
-
if (key === "five_hour") return "5-hour limit";
|
|
29
|
-
if (key === "seven_day") return "Weekly limit";
|
|
30
|
-
const named = /^seven_day_(.+)$/.exec(key);
|
|
31
|
-
if (named) return `Weekly ${capitalise(named[1].replace(/_/g, " "))} limit`;
|
|
32
|
-
const span = /^(\d+)_(hour|day)$/.exec(key);
|
|
33
|
-
if (span) return `${span[1]}-${span[2]} limit`;
|
|
34
|
-
return `${capitalise(key.replace(/_/g, " "))} limit`;
|
|
35
|
-
}
|
|
36
|
-
var rank = (key) => key === "five_hour" ? 0 : key === "seven_day" ? 1 : 2;
|
|
37
|
-
function parseClaudeRateLimits(raw) {
|
|
38
|
-
if (!isRecord(raw)) return [];
|
|
39
|
-
const windows = [];
|
|
40
|
-
const keys = Object.keys(raw).filter((k) => k !== "spend_limit").sort((a, b) => rank(a) - rank(b) || a.localeCompare(b));
|
|
41
|
-
for (const key of keys) {
|
|
42
|
-
const w = raw[key];
|
|
43
|
-
if (!isRecord(w) || typeof w.used_percentage !== "number" || !Number.isFinite(w.used_percentage)) continue;
|
|
44
|
-
windows.push({ id: key, label: labelOf(key), usedPercent: clampPercent(w.used_percentage), resetsAt: resetIso(w.resets_at) });
|
|
45
|
-
}
|
|
46
|
-
const spend = raw.spend_limit;
|
|
47
|
-
if (isRecord(spend)) {
|
|
48
|
-
const { used_percentage: pct, used_usd: used, limit_usd: limit } = spend;
|
|
49
|
-
let percent = null;
|
|
50
|
-
if (typeof pct === "number" && Number.isFinite(pct)) percent = pct;
|
|
51
|
-
else if (typeof used === "number" && typeof limit === "number" && Number.isFinite(used) && Number.isFinite(limit) && limit > 0)
|
|
52
|
-
percent = used / limit * 100;
|
|
53
|
-
if (percent !== null) {
|
|
54
|
-
windows.push({ id: "spend_limit", label: "Spend limit", usedPercent: clampPercent(percent), resetsAt: resetIso(spend.resets_at) });
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
return windows;
|
|
58
|
-
}
|
|
59
|
-
function accountOf(configDir) {
|
|
60
|
-
if (!configDir) return "default";
|
|
61
|
-
const norm = (p) => process.platform === "win32" ? path.resolve(p).toLowerCase() : path.resolve(p);
|
|
62
|
-
const resolved = norm(configDir);
|
|
63
|
-
if (resolved === norm(path.join(os.homedir(), ".claude"))) return "default";
|
|
64
|
-
const hash = createHash("sha1").update(resolved).digest("hex");
|
|
65
|
-
return `cfg-${hash.slice(0, 8)}`;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
16
|
// src/core/agents/claude/statusline-run.ts
|
|
69
17
|
import fs from "fs";
|
|
70
|
-
import
|
|
71
|
-
import
|
|
18
|
+
import os from "os";
|
|
19
|
+
import path from "path";
|
|
72
20
|
var NESTED_ENV = "WORK_STATUSLINE_NESTED";
|
|
73
|
-
var
|
|
21
|
+
var isRecord = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
|
|
74
22
|
var savedPath = (configDir) => {
|
|
75
23
|
const account = accountOf(configDir);
|
|
76
|
-
return
|
|
24
|
+
return path.join(getConfigDir(), account === "default" ? "statusline.json" : `statusline-${account}.json`);
|
|
77
25
|
};
|
|
78
|
-
var isOurs = (v) =>
|
|
26
|
+
var isOurs = (v) => isRecord(v) && typeof v.command === "string" && /\bhook\s+statusline\b/.test(v.command);
|
|
79
27
|
function readSaved(configDir) {
|
|
80
28
|
let text;
|
|
81
29
|
try {
|
|
@@ -90,9 +38,9 @@ function readSaved(configDir) {
|
|
|
90
38
|
} catch (e) {
|
|
91
39
|
return { kind: "unreadable", why: e instanceof Error ? e.message : String(e) };
|
|
92
40
|
}
|
|
93
|
-
if (!
|
|
41
|
+
if (!isRecord(v) || !("original" in v)) return { kind: "unreadable", why: "no original in it" };
|
|
94
42
|
if (v.original === null) return { kind: "ok", original: null };
|
|
95
|
-
return
|
|
43
|
+
return isRecord(v.original) ? { kind: "ok", original: v.original } : { kind: "unreadable", why: "original is not an object" };
|
|
96
44
|
}
|
|
97
45
|
function originalStatusLine(onDamage, configDir) {
|
|
98
46
|
let saved = readSaved(configDir);
|
|
@@ -104,15 +52,15 @@ function originalStatusLine(onDamage, configDir) {
|
|
|
104
52
|
function statusLineIn(file) {
|
|
105
53
|
try {
|
|
106
54
|
const v = JSON.parse(fs.readFileSync(file, "utf-8"));
|
|
107
|
-
return
|
|
55
|
+
return isRecord(v) && isRecord(v.statusLine) ? v.statusLine : null;
|
|
108
56
|
} catch {
|
|
109
57
|
return null;
|
|
110
58
|
}
|
|
111
59
|
}
|
|
112
60
|
function userStatusLine(o = {}) {
|
|
113
61
|
const files = [
|
|
114
|
-
...o.projectDir ? [
|
|
115
|
-
|
|
62
|
+
...o.projectDir ? [path.join(o.projectDir, ".claude", "settings.local.json"), path.join(o.projectDir, ".claude", "settings.json")] : [],
|
|
63
|
+
path.join(o.configDir || path.join(o.home ?? os.homedir(), ".claude"), "settings.json")
|
|
116
64
|
];
|
|
117
65
|
for (const file of files) {
|
|
118
66
|
const line = statusLineIn(file);
|
|
@@ -128,8 +76,8 @@ function shellFor(platform = process.platform, env = process.env, exists = fs.ex
|
|
|
128
76
|
const configured = env.CLAUDE_CODE_GIT_BASH_PATH;
|
|
129
77
|
if (configured && exists(configured)) return { file: configured, args };
|
|
130
78
|
for (const dir of (env.PATH ?? env.Path ?? "").split(";").filter(Boolean)) {
|
|
131
|
-
if (!exists(
|
|
132
|
-
for (const bash of [
|
|
79
|
+
if (!exists(path.win32.join(dir, "git.exe"))) continue;
|
|
80
|
+
for (const bash of [path.win32.join(dir, "..", "bin", "bash.exe"), path.win32.join(dir, "bash.exe")])
|
|
133
81
|
if (exists(bash)) return { file: bash, args };
|
|
134
82
|
}
|
|
135
83
|
const standard = "C:\\Program Files\\Git\\bin\\bash.exe";
|
|
@@ -202,8 +150,6 @@ function runStatusLineCommand(cmd, stdin, o = {}) {
|
|
|
202
150
|
}
|
|
203
151
|
|
|
204
152
|
export {
|
|
205
|
-
parseClaudeRateLimits,
|
|
206
|
-
accountOf,
|
|
207
153
|
NESTED_ENV,
|
|
208
154
|
savedPath,
|
|
209
155
|
isOurs,
|
|
@@ -211,4 +157,4 @@ export {
|
|
|
211
157
|
userStatusLine,
|
|
212
158
|
runStatusLineCommand
|
|
213
159
|
};
|
|
214
|
-
//# sourceMappingURL=chunk-
|
|
160
|
+
//# sourceMappingURL=chunk-HGB7BITW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/agents/claude/statusline-run.ts"],"sourcesContent":["import fs from 'node:fs';\nimport os from 'node:os';\nimport path from 'node:path';\nimport { getConfigDir } from '../../platform/config-dir.js';\nimport { detachHere, killTree } from '../../platform/process.js';\nimport spawn from '../../platform/spawn.js';\nimport { accountOf } from './rate-limits.js';\n\n// The status-line hook's half: what runs on every refresh of every Claude work started. Light on purpose — no\n// settings editor, no locks, no registry; giving back the wrapper older builds put in the user's settings is statusline.ts.\n\n/** Set on the user's own command: a status line that runs work's hook again (it called `work hook statusline` itself) records, and runs nothing more. */\nexport const NESTED_ENV = 'WORK_STATUSLINE_NESTED';\n\nexport type StatusLine = Record<string, unknown>;\n\nexport const isRecord = (v: unknown): v is Record<string, unknown> => typeof v === 'object' && v !== null && !Array.isArray(v);\n/**\n * Where the user's own status line is saved: `statusline.json` for the default account, `statusline-<account>.json` for\n * another — named by `accountOf(CLAUDE_CONFIG_DIR)`, a short hash of the folder, the same name the hook computes from its\n * environment (it knows the folder, not the registry's name for it, and loads no config to find out; a renamed account\n * keeps its saved line).\n */\nexport const savedPath = (configDir?: string) => {\n const account = accountOf(configDir);\n return path.join(getConfigDir(), account === 'default' ? 'statusline.json' : `statusline-${account}.json`);\n};\n\n/**\n * work's hook under any path (`/usr/bin/work hook statusline`, `node …/bin.js hook statusline`), with or without the\n * user's line after `||` as its fallback: saved as \"the original\", it would run itself.\n */\nexport const isOurs = (v: unknown) => isRecord(v) && typeof v.command === 'string' && /\\bhook\\s+statusline\\b/.test(v.command);\n\n/** What ~/.work/statusline.json says: an original (null: there was none), nothing saved, or a file that can't be read. */\nexport type Saved = { kind: 'ok'; original: StatusLine | null } | { kind: 'missing' } | { kind: 'unreadable'; why: string };\n\nexport function readSaved(configDir?: string): Saved {\n let text: string;\n try {\n text = fs.readFileSync(savedPath(configDir), 'utf-8');\n } catch (e) {\n const code = (e as NodeJS.ErrnoException).code;\n return code === 'ENOENT' ? { kind: 'missing' } : { kind: 'unreadable', why: code ?? String(e) };\n }\n let v: unknown;\n try {\n v = JSON.parse(text);\n } catch (e) {\n return { kind: 'unreadable', why: e instanceof Error ? e.message : String(e) };\n }\n if (!isRecord(v) || !('original' in v)) return { kind: 'unreadable', why: 'no original in it' };\n if (v.original === null) return { kind: 'ok', original: null };\n return isRecord(v.original) ? { kind: 'ok', original: v.original } : { kind: 'unreadable', why: 'original is not an object' };\n}\n\n/**\n * The user's own status line command, when they had one — the one saved for the account of the Claude that runs it\n * (`configDir`: its `CLAUDE_CONFIG_DIR`). `onDamage` hears why a saved file couldn't be read.\n *\n * An account with nothing saved whose settings run work's line anyway — a settings.json copied from the default\n * account's, or a folder shared with it — falls back to the default account's saved original: that is the line its\n * settings came with, and without it the user's own line would show nowhere on that account.\n */\nexport function originalStatusLine(onDamage?: (why: string) => void, configDir?: string): { command: string } | null {\n let saved = readSaved(configDir);\n if (saved.kind === 'missing' && accountOf(configDir) !== 'default') saved = readSaved();\n if (saved.kind === 'unreadable') onDamage?.(saved.why);\n const o = saved.kind === 'ok' ? saved.original : null;\n return o && typeof o.command === 'string' && o.command ? { command: o.command } : null;\n}\n\n/** A settings file's statusLine entry; null when it has none or can't be read. */\nfunction statusLineIn(file: string): StatusLine | null {\n try {\n const v: unknown = JSON.parse(fs.readFileSync(file, 'utf-8'));\n return isRecord(v) && isRecord(v.statusLine) ? v.statusLine : null;\n } catch {\n return null;\n }\n}\n\n/**\n * The status line the Claude running work's hook would show without it. work gives its Claudes its own line with\n * `--settings` (session-settings.ts), which takes the place of the user's; the user's is what Claude Code would read\n * otherwise — the project's local settings, the project's, then the account's own (`configDir`: its\n * `CLAUDE_CONFIG_DIR`, else ~/.claude). One that is work's (an older work web wrapped the user's settings and it is\n * not yet given back) is the saved original's (originalStatusLine). `onDamage` hears why a saved file couldn't be read.\n */\nexport function userStatusLine(\n o: { configDir?: string; projectDir?: string; home?: string; onDamage?: (why: string) => void } = {},\n): { command: string } | null {\n const files = [\n ...(o.projectDir\n ? [path.join(o.projectDir, '.claude', 'settings.local.json'), path.join(o.projectDir, '.claude', 'settings.json')]\n : []),\n path.join(o.configDir || path.join(o.home ?? os.homedir(), '.claude'), 'settings.json'),\n ];\n for (const file of files) {\n const line = statusLineIn(file);\n if (!line) continue;\n if (isOurs(line)) return originalStatusLine(o.onDamage, o.configDir);\n return typeof line.command === 'string' && line.command ? { command: line.command } : null;\n }\n return null;\n}\n\n/** The shell Claude Code runs a status line in: sh on POSIX, Git Bash on Windows. */\nexport function shellFor(\n platform: NodeJS.Platform = process.platform,\n env: NodeJS.ProcessEnv = process.env,\n exists: (p: string) => boolean = fs.existsSync,\n): { file: string; args: (cmd: string) => string[] } {\n const args = (cmd: string) => ['-c', cmd];\n if (platform !== 'win32') return { file: '/bin/sh', args };\n const configured = env.CLAUDE_CODE_GIT_BASH_PATH;\n if (configured && exists(configured)) return { file: configured, args };\n for (const dir of (env.PATH ?? env.Path ?? '').split(';').filter(Boolean)) {\n if (!exists(path.win32.join(dir, 'git.exe'))) continue;\n for (const bash of [path.win32.join(dir, '..', 'bin', 'bash.exe'), path.win32.join(dir, 'bash.exe')])\n if (exists(bash)) return { file: bash, args };\n }\n const standard = 'C:\\\\Program Files\\\\Git\\\\bin\\\\bash.exe';\n return { file: exists(standard) ? standard : 'bash', args };\n}\n\nconst OUTPUT_CAP = 64 * 1024;\n/** After the command exits, how long what it printed may still be on its way: its stdout can stay open past its exit. */\nconst EXIT_GRACE_MS = 100;\n\n/** Stop the command and whatever it started: its process group on POSIX (a `cmd &` holding stdout keeps no hook alive), taskkill /T on Windows. */\nfunction killCommand(pid: number): void {\n if (detachHere()) {\n try {\n process.kill(-pid, 'SIGKILL');\n return;\n } catch {\n /* no group (it wasn't detached, or has gone): the process alone */\n }\n }\n killTree(pid);\n}\n\n/** Run the user's own status line with Claude's JSON on stdin. Its output, or '' when it fails or takes too long: never rejects. */\nexport function runStatusLineCommand(cmd: string, stdin: string, o: { timeoutMs?: number; cwd?: string } = {}): Promise<string> {\n return new Promise((resolve) => {\n let done = false;\n const out: Buffer[] = [];\n let outBytes = 0;\n let timer: NodeJS.Timeout | undefined;\n let grace: NodeJS.Timeout | undefined;\n let child: ReturnType<typeof spawn> | undefined;\n const finish = (ok: boolean) => {\n if (done) return;\n done = true;\n clearTimeout(timer);\n clearTimeout(grace);\n // Let go of it: a pipe still held by something it started would keep this process (Claude's hook) alive past its cap.\n child?.stdout?.destroy();\n child?.stdin?.destroy();\n child?.unref();\n resolve(ok ? Buffer.concat(out).subarray(0, OUTPUT_CAP).toString('utf-8') : '');\n };\n try {\n const sh = shellFor();\n child = spawn(sh.file, sh.args(cmd), {\n stdio: ['pipe', 'pipe', 'ignore'],\n windowsHide: true,\n cwd: o.cwd,\n // Its own process group on POSIX, so a timeout stops what it started too.\n detached: detachHere(),\n // Marked, so a command that runs work's hook again doesn't run itself (runStatusLineHook).\n env: { ...process.env, [NESTED_ENV]: '1' },\n });\n const c = child;\n timer = setTimeout(() => {\n if (c.pid) killCommand(c.pid);\n finish(false);\n }, o.timeoutMs ?? 5000);\n c.on('error', () => finish(false));\n c.stdout?.on('data', (d: Buffer) => {\n if (outBytes >= OUTPUT_CAP) return;\n out.push(d);\n outBytes += d.length;\n });\n // 'close' waits for stdout to end, and something the command left running (`cmd &`) holds it: the line would wait\n // for the cap, and be lost. Its exit decides; what it printed is read until stdout ends, or a moment more.\n c.on('exit', (code) => {\n if (code !== 0) finish(false);\n else grace ??= setTimeout(() => finish(true), EXIT_GRACE_MS);\n });\n c.on('close', (code) => finish(code === 0));\n c.stdin?.on('error', () => {\n /* it exited before reading: its exit code decides */\n });\n c.stdin?.end(stdin);\n } catch {\n finish(false);\n }\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ;AACf,OAAO,QAAQ;AACf,OAAO,UAAU;AAUV,IAAM,aAAa;AAInB,IAAM,WAAW,CAAC,MAA6C,OAAO,MAAM,YAAY,MAAM,QAAQ,CAAC,MAAM,QAAQ,CAAC;AAOtH,IAAM,YAAY,CAAC,cAAuB;AAC/C,QAAM,UAAU,UAAU,SAAS;AACnC,SAAO,KAAK,KAAK,aAAa,GAAG,YAAY,YAAY,oBAAoB,cAAc,OAAO,OAAO;AAC3G;AAMO,IAAM,SAAS,CAAC,MAAe,SAAS,CAAC,KAAK,OAAO,EAAE,YAAY,YAAY,wBAAwB,KAAK,EAAE,OAAO;AAKrH,SAAS,UAAU,WAA2B;AACnD,MAAI;AACJ,MAAI;AACF,WAAO,GAAG,aAAa,UAAU,SAAS,GAAG,OAAO;AAAA,EACtD,SAAS,GAAG;AACV,UAAM,OAAQ,EAA4B;AAC1C,WAAO,SAAS,WAAW,EAAE,MAAM,UAAU,IAAI,EAAE,MAAM,cAAc,KAAK,QAAQ,OAAO,CAAC,EAAE;AAAA,EAChG;AACA,MAAI;AACJ,MAAI;AACF,QAAI,KAAK,MAAM,IAAI;AAAA,EACrB,SAA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,CAAC;AACD,QAAE,OAAO,IAAI,KAAK;AAAA,IACpB,QAAQ;AACN,aAAO,KAAK;AAAA,IACd;AAAA,EACF,CAAC;AACH;","names":[]}
|
|
@@ -6,17 +6,17 @@ import {
|
|
|
6
6
|
ensureHost,
|
|
7
7
|
findHost,
|
|
8
8
|
findHostPatient
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-VRMALBZK.js";
|
|
10
10
|
import {
|
|
11
11
|
findSession
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-WVZG5Q4L.js";
|
|
13
13
|
import {
|
|
14
14
|
dbPtySessions,
|
|
15
15
|
forgetPersistedSession
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-4J2F6OWM.js";
|
|
17
17
|
import {
|
|
18
18
|
hostStartLockPath
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-DLV7TRON.js";
|
|
20
20
|
import {
|
|
21
21
|
accountLoginId,
|
|
22
22
|
accountOfLoginId
|
|
@@ -24,10 +24,10 @@ import {
|
|
|
24
24
|
import {
|
|
25
25
|
ASSISTANT_ID,
|
|
26
26
|
prepareAssistantDir
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-FAGTMW6W.js";
|
|
28
28
|
import {
|
|
29
29
|
noClaudeBecause
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-D77U5ELL.js";
|
|
31
31
|
import {
|
|
32
32
|
sessionIdFor
|
|
33
33
|
} from "./chunk-ALBTIOP3.js";
|
|
@@ -39,10 +39,10 @@ import {
|
|
|
39
39
|
logSwallowed,
|
|
40
40
|
sessionToolFor,
|
|
41
41
|
swallow
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-O22DNTKU.js";
|
|
43
43
|
import {
|
|
44
44
|
hasEnvDelta
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-YQSWVHKK.js";
|
|
46
46
|
import {
|
|
47
47
|
loadConfig
|
|
48
48
|
} from "./chunk-MWIPHUAE.js";
|
|
@@ -426,4 +426,4 @@ export {
|
|
|
426
426
|
stopSessionPty,
|
|
427
427
|
detachPtyPool
|
|
428
428
|
};
|
|
429
|
-
//# sourceMappingURL=chunk-
|
|
429
|
+
//# sourceMappingURL=chunk-HREHEBL2.js.map
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
listReplies
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-T3KZSJHU.js";
|
|
5
5
|
import {
|
|
6
6
|
examineWorktree,
|
|
7
7
|
normPath
|
|
8
8
|
} from "./chunk-AKMPF72Y.js";
|
|
9
|
-
import {
|
|
10
|
-
shownState
|
|
11
|
-
} from "./chunk-DZACN5FM.js";
|
|
12
|
-
import {
|
|
13
|
-
runInternal
|
|
14
|
-
} from "./chunk-2AENPORN.js";
|
|
15
9
|
import {
|
|
16
10
|
runningFromNames,
|
|
17
11
|
stopRunningFrom
|
|
18
12
|
} from "./chunk-ICEP4WAK.js";
|
|
19
13
|
import {
|
|
20
14
|
disposePty
|
|
21
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-HREHEBL2.js";
|
|
22
16
|
import {
|
|
23
17
|
saveIgnored,
|
|
24
18
|
teardownWorktree,
|
|
25
19
|
worktreeFor
|
|
26
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-C2BFHQHX.js";
|
|
27
21
|
import {
|
|
28
22
|
isLeftover
|
|
29
23
|
} from "./chunk-EORL2V7P.js";
|
|
24
|
+
import {
|
|
25
|
+
shownState
|
|
26
|
+
} from "./chunk-XFWO5FYK.js";
|
|
27
|
+
import {
|
|
28
|
+
runInternal
|
|
29
|
+
} from "./chunk-V6KHER6C.js";
|
|
30
30
|
import {
|
|
31
31
|
readPendingForSession
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-XPX5AAYH.js";
|
|
33
33
|
import {
|
|
34
34
|
buildFoldersOf,
|
|
35
35
|
clearBuildFolders
|
|
@@ -49,14 +49,14 @@ import {
|
|
|
49
49
|
setSessionArchived,
|
|
50
50
|
stopDev,
|
|
51
51
|
turnInProgress
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-D77U5ELL.js";
|
|
53
53
|
import {
|
|
54
54
|
sessionIdFor
|
|
55
55
|
} from "./chunk-ALBTIOP3.js";
|
|
56
56
|
import {
|
|
57
57
|
agentOf,
|
|
58
58
|
checkedOutBranch
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-O22DNTKU.js";
|
|
60
60
|
import {
|
|
61
61
|
loadConfig
|
|
62
62
|
} from "./chunk-MWIPHUAE.js";
|
|
@@ -288,4 +288,4 @@ export {
|
|
|
288
288
|
archiveMergedSession,
|
|
289
289
|
defaultArchiveDeps
|
|
290
290
|
};
|
|
291
|
-
//# sourceMappingURL=chunk-
|
|
291
|
+
//# sourceMappingURL=chunk-IALCEDTH.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
childText,
|
|
4
4
|
runWorkChild
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FJADRDML.js";
|
|
6
6
|
import {
|
|
7
7
|
report
|
|
8
8
|
} from "./chunk-5ZCCUM75.js";
|
|
@@ -34,4 +34,4 @@ export {
|
|
|
34
34
|
WORKTREE_REMOVED,
|
|
35
35
|
removeWorktreeInChild
|
|
36
36
|
};
|
|
37
|
-
//# sourceMappingURL=chunk-
|
|
37
|
+
//# sourceMappingURL=chunk-JEH4X76F.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
spawnSpecFor
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-HREHEBL2.js";
|
|
5
5
|
import {
|
|
6
6
|
PtyHostClient,
|
|
7
7
|
ensureHost
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-VRMALBZK.js";
|
|
9
9
|
import {
|
|
10
10
|
sessionIdFor
|
|
11
11
|
} from "./chunk-ALBTIOP3.js";
|
|
@@ -116,4 +116,4 @@ async function attachSession(session, launch = {}) {
|
|
|
116
116
|
export {
|
|
117
117
|
attachSession
|
|
118
118
|
};
|
|
119
|
-
//# sourceMappingURL=chunk-
|
|
119
|
+
//# sourceMappingURL=chunk-JIK4FY3E.js.map
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
parseAzurePrUrl,
|
|
29
29
|
parseAzureThreadId,
|
|
30
30
|
parseGithubPrUrl
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-D77U5ELL.js";
|
|
32
32
|
import {
|
|
33
33
|
json
|
|
34
34
|
} from "./chunk-ALBTIOP3.js";
|
|
@@ -1575,4 +1575,4 @@ export {
|
|
|
1575
1575
|
hostOfThread,
|
|
1576
1576
|
hostOfPrUrl
|
|
1577
1577
|
};
|
|
1578
|
-
//# sourceMappingURL=chunk-
|
|
1578
|
+
//# sourceMappingURL=chunk-JPXEX3XW.js.map
|
|
@@ -16,7 +16,7 @@ var REFRESH_MS = 6e4;
|
|
|
16
16
|
var usageDir = () => path.join(getConfigDir(), "usage");
|
|
17
17
|
var isRecord = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
|
|
18
18
|
function isWindow(v) {
|
|
19
|
-
return isRecord(v) && typeof v.id === "string" && typeof v.label === "string" && typeof v.usedPercent === "number" && (v.resetsAt === null || typeof v.resetsAt === "string") && (v.reset === void 0 || v.reset === true);
|
|
19
|
+
return isRecord(v) && typeof v.id === "string" && typeof v.label === "string" && typeof v.usedPercent === "number" && (v.resetsAt === null || typeof v.resetsAt === "string") && (v.reset === void 0 || v.reset === true) && (v.asked === void 0 || v.asked === true);
|
|
20
20
|
}
|
|
21
21
|
function parseStored(text) {
|
|
22
22
|
let v;
|
|
@@ -35,7 +35,7 @@ function keepHigher(stored, fresh) {
|
|
|
35
35
|
return was && was.usedPercent > w.usedPercent ? { ...w, usedPercent: was.usedPercent } : w;
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
|
-
function recordReading(agent, account, windows, now = Date.now()) {
|
|
38
|
+
function recordReading(agent, account, windows, now = Date.now(), opts = {}) {
|
|
39
39
|
if (windows.length === 0) return false;
|
|
40
40
|
try {
|
|
41
41
|
const file = fileFor(agent, account);
|
|
@@ -44,7 +44,8 @@ function recordReading(agent, account, windows, now = Date.now()) {
|
|
|
44
44
|
stored = parseStored(fs.readFileSync(file, "utf-8"));
|
|
45
45
|
} catch {
|
|
46
46
|
}
|
|
47
|
-
const
|
|
47
|
+
const carried = stored && !opts.full ? stored.windows.filter((w) => w.asked && !windows.some((f) => f.id === w.id)) : [];
|
|
48
|
+
const kept = [...stored ? keepHigher(stored.windows, windows) : windows, ...carried];
|
|
48
49
|
if (stored && JSON.stringify(stored.windows) === JSON.stringify(kept) && now - Date.parse(stored.at) < REFRESH_MS) return false;
|
|
49
50
|
fs.mkdirSync(usageDir(), { recursive: true });
|
|
50
51
|
atomicWriteFile(file, JSON.stringify({ at: new Date(now).toISOString(), windows: kept }));
|
|
@@ -80,4 +81,4 @@ export {
|
|
|
80
81
|
recordReading,
|
|
81
82
|
readReadings
|
|
82
83
|
};
|
|
83
|
-
//# sourceMappingURL=chunk-
|
|
84
|
+
//# sourceMappingURL=chunk-JUGF3YE7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/usage/usage-store.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\nimport { getConfigDir } from '../platform/config-dir.js';\nimport { atomicWriteFile } from '../platform/fs-safe.js';\nimport { debugLog } from '../platform/logger.js';\nimport type { UsageAccount, UsageWindow } from './usage.js';\n\n// Readings the agents' hooks leave behind, one file per agent and account. The status-line hook calls recordReading on every refresh, so it stays cheap.\n\n/** A reading that hasn't changed is rewritten only when its time is this old: the age stays honest without a write per refresh. */\nconst REFRESH_MS = 60_000;\n\ntype Stored = Omit<UsageAccount, 'account'>;\n\nexport const usageDir = () => path.join(getConfigDir(), 'usage');\n\nconst isRecord = (v: unknown): v is Record<string, unknown> => typeof v === 'object' && v !== null && !Array.isArray(v);\n\nfunction isWindow(v: unknown): v is UsageWindow {\n return (\n isRecord(v) &&\n typeof v.id === 'string' &&\n typeof v.label === 'string' &&\n typeof v.usedPercent === 'number' &&\n (v.resetsAt === null || typeof v.resetsAt === 'string') &&\n (v.reset === undefined || v.reset === true) &&\n (v.asked === undefined || v.asked === true)\n );\n}\n\nfunction parseStored(text: string): Stored | null {\n let v: unknown;\n try {\n v = JSON.parse(text);\n } catch {\n return null;\n }\n if (!isRecord(v) || typeof v.at !== 'string' || !Array.isArray(v.windows) || !v.windows.every(isWindow)) return null;\n return { at: v.at, windows: v.windows };\n}\n\nconst fileFor = (agent: string, account: string) => path.join(usageDir(), `${agent}-${account}.json`);\n\n/**\n * Within one window (same id, same known reset) usage only grows: an idle agent's redraw can carry an older, lower figure\n * than another session just reported, and it mustn't win.\n */\nfunction keepHigher(stored: UsageWindow[], fresh: UsageWindow[]): UsageWindow[] {\n return fresh.map((w) => {\n const was = w.resetsAt === null ? undefined : stored.find((s) => s.id === w.id && s.resetsAt === w.resetsAt);\n return was && was.usedPercent > w.usedPercent ? { ...w, usedPercent: was.usedPercent } : w;\n });\n}\n\n/**\n * Keep a reading. Writes only when it changed (or the stored time is over a minute old); returns whether it wrote. Never throws.\n * `full`: the reading is the agent's whole answer when asked (every window it has, `asked` ones included), so it replaces\n * the stored one; otherwise (a status line) the stored `asked` windows it doesn't carry are kept.\n */\nexport function recordReading(\n agent: string,\n account: string,\n windows: UsageWindow[],\n now = Date.now(),\n opts: { full?: boolean } = {},\n): boolean {\n if (windows.length === 0) return false;\n try {\n const file = fileFor(agent, account);\n let stored: Stored | null = null;\n try {\n stored = parseStored(fs.readFileSync(file, 'utf-8'));\n } catch {\n /* nothing stored yet */\n }\n const carried = stored && !opts.full ? stored.windows.filter((w) => w.asked && !windows.some((f) => f.id === w.id)) : [];\n const kept = [...(stored ? keepHigher(stored.windows, windows) : windows), ...carried];\n if (stored && JSON.stringify(stored.windows) === JSON.stringify(kept) && now - Date.parse(stored.at) < REFRESH_MS) return false;\n fs.mkdirSync(usageDir(), { recursive: true });\n atomicWriteFile(file, JSON.stringify({ at: new Date(now).toISOString(), windows: kept }));\n return true;\n } catch (e) {\n // Only the log: this runs in an agent's hook (Claude's status line), which shows nothing of ours.\n const err = e as NodeJS.ErrnoException;\n debugLog('WARN', `[usage] reading not kept: ${err.code ? `${err.code} ` : ''}${err.message ?? String(e)}`);\n return false;\n }\n}\n\n/** Every account's last reading for an agent, by account name. A file that isn't a reading is skipped. */\nexport function readReadings(agent: string): UsageAccount[] {\n let names: string[];\n try {\n names = fs.readdirSync(usageDir());\n } catch {\n return [];\n }\n const prefix = `${agent}-`;\n const out: UsageAccount[] = [];\n for (const name of names) {\n if (!name.startsWith(prefix) || !name.endsWith('.json')) continue;\n try {\n const stored = parseStored(fs.readFileSync(path.join(usageDir(), name), 'utf-8'));\n if (stored) out.push({ account: name.slice(prefix.length, -'.json'.length), ...stored });\n } catch {\n /* unreadable: skipped */\n }\n }\n return out.sort((a, b) => a.account.localeCompare(b.account));\n}\n"],"mappings":";;;;;;;;;;;;AAAA,OAAO,QAAQ;AACf,OAAO,UAAU;AASjB,IAAM,aAAa;AAIZ,IAAM,WAAW,MAAM,KAAK,KAAK,aAAa,GAAG,OAAO;AAE/D,IAAM,WAAW,CAAC,MAA6C,OAAO,MAAM,YAAY,MAAM,QAAQ,CAAC,MAAM,QAAQ,CAAC;AAEtH,SAAS,SAAS,GAA8B;AAC9C,SACE,SAAS,CAAC,KACV,OAAO,EAAE,OAAO,YAChB,OAAO,EAAE,UAAU,YACnB,OAAO,EAAE,gBAAgB,aACxB,EAAE,aAAa,QAAQ,OAAO,EAAE,aAAa,cAC7C,EAAE,UAAU,UAAa,EAAE,UAAU,UACrC,EAAE,UAAU,UAAa,EAAE,UAAU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|
+
"CLAUDECODE",
|
|
6
|
+
"CLAUDE_CODE_CHILD_SESSION",
|
|
7
|
+
"CLAUDE_CODE_SESSION_ID",
|
|
8
|
+
"CLAUDE_CODE_SESSION_ATTENDED",
|
|
9
|
+
"CLAUDE_CODE_BRIDGE_SESSION_ID",
|
|
10
|
+
"CLAUDE_CODE_MESSAGING_SOCKET",
|
|
11
|
+
"CLAUDE_CODE_MESSAGING_TOKEN",
|
|
12
|
+
"CLAUDE_CODE_ENTRYPOINT",
|
|
13
|
+
"CLAUDE_CODE_EXECPATH",
|
|
14
|
+
"CLAUDE_PID"
|
|
15
|
+
];
|
|
16
|
+
function withoutParentSession(env) {
|
|
17
|
+
const drop = new Set(PARENT_SESSION_VARS);
|
|
18
|
+
return Object.fromEntries(Object.entries(env).filter(([k]) => !drop.has(k.toUpperCase())));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export {
|
|
22
|
+
withoutParentSession
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=chunk-KGHWHAVF.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/agents/claude/env.ts"],"sourcesContent":["/**\n * Claude Code marks the processes it runs with its own session: whether\n * it's a child session, its session id, pid, messaging socket and token.\n * A Claude that `work` starts is a session of its own, but it inherits\n * these whenever `work` itself was started from inside a Claude — `work\n * tree` typed in Claude's shell, or the PTY host restarted by one. Then it\n * believes it's a child session and doesn't save its transcript (\"Transcript\n * saving is off — inherited CLAUDE_CODE_CHILD_SESSION marker\"), and carries\n * another session's messaging token.\n *\n * Only the session's identity goes; user settings (CLAUDE_CONFIG_DIR,\n * CLAUDE_CODE_USE_BEDROCK, API keys, …) are kept.\n */\nexport const PARENT_SESSION_VARS = [\n 'CLAUDECODE',\n 'CLAUDE_CODE_CHILD_SESSION',\n 'CLAUDE_CODE_SESSION_ID',\n 'CLAUDE_CODE_SESSION_ATTENDED',\n 'CLAUDE_CODE_BRIDGE_SESSION_ID',\n 'CLAUDE_CODE_MESSAGING_SOCKET',\n 'CLAUDE_CODE_MESSAGING_TOKEN',\n 'CLAUDE_CODE_ENTRYPOINT',\n 'CLAUDE_CODE_EXECPATH',\n 'CLAUDE_PID',\n] as const;\n\n/** `env` without the parent Claude session's markers (case-insensitive, for Windows). */\nexport function withoutParentSession<T extends Record<string, string | undefined>>(env: T): T {\n const drop = new Set<string>(PARENT_SESSION_VARS);\n return Object.fromEntries(Object.entries(env).filter(([k]) => !drop.has(k.toUpperCase()))) as T;\n}\n"],"mappings":";;;AAaO,IAAM,sBAAsB;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAGO,SAAS,qBAAmE,KAAW;AAC5F,QAAM,OAAO,IAAI,IAAY,mBAAmB;AAChD,SAAO,OAAO,YAAY,OAAO,QAAQ,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC;AAC3F;","names":[]}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
CONTEXT_WARN
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-63RNLC25.js";
|
|
5
5
|
import {
|
|
6
6
|
MAX_THREAD_BODY,
|
|
7
7
|
isThreadCode
|
|
8
8
|
} from "./chunk-FGPXMAYU.js";
|
|
9
9
|
import {
|
|
10
10
|
commandsFor
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-D77U5ELL.js";
|
|
12
12
|
import {
|
|
13
13
|
json,
|
|
14
14
|
withDb
|
|
@@ -184,4 +184,4 @@ export {
|
|
|
184
184
|
isSessionCi,
|
|
185
185
|
createCiStore
|
|
186
186
|
};
|
|
187
|
-
//# sourceMappingURL=chunk-
|
|
187
|
+
//# sourceMappingURL=chunk-KQ7QLBY2.js.map
|
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
hostForRepo,
|
|
7
7
|
knownHosts
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-JPXEX3XW.js";
|
|
9
9
|
import {
|
|
10
10
|
defaultRunner
|
|
11
11
|
} from "./chunk-XBWS77S2.js";
|
|
12
12
|
import {
|
|
13
13
|
DEFAULT_HOST,
|
|
14
14
|
loadHistory
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-D77U5ELL.js";
|
|
16
16
|
import {
|
|
17
17
|
getConfigPath,
|
|
18
18
|
loadConfig
|
|
@@ -138,4 +138,4 @@ export {
|
|
|
138
138
|
checkTools,
|
|
139
139
|
setupState
|
|
140
140
|
};
|
|
141
|
-
//# sourceMappingURL=chunk-
|
|
141
|
+
//# sourceMappingURL=chunk-KX6KZYU4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/usage/usage.ts"],"sourcesContent":["// What an agent's plan limits look like (5-hour, weekly, spend) and how work shows them. Pure and agent-neutral: the SPA and the demo import it (each agent parses its own, e.g. agents/claude/rate-limits.ts).\n\nexport interface UsageWindow {\n id: string;\n label: string;\n usedPercent: number;\n /** ISO time the window resets; null when the agent didn't say. */\n resetsAt: string | null;\n /** Set when the reset time has passed since the reading: the percent is shown as 0. */\n reset?: true;\n /**\n * Only asking the agent gives it (Claude Code's `get_usage`: a model's own weekly window, as Fable's), not its status\n * line: a status-line reading keeps it as last asked rather than dropping it (usage-store.ts).\n */\n asked?: true;\n}\n\n/** One account's last reading of an agent's plan limits (each config folder an agent runs with is an account). */\nexport interface UsageAccount {\n /** The account's name (the agent's own, e.g. a Claude account in config `claudeAccounts`; `default`), or the key a reading was kept under when it names none. */\n account: string;\n /** The account new sessions use (set on the one only). */\n isDefault?: true;\n at: string;\n windows: UsageWindow[];\n}\n\n/** An agent's readings, one per account: what the meter picks from. */\nexport interface AgentUsage {\n agent: string;\n name: string;\n accounts: UsageAccount[];\n}\n\n/** A window whose reset has passed since it was read starts over at 0. */\nexport function agedWindow(w: UsageWindow, now: number): UsageWindow {\n if (w.resetsAt === null) return w;\n const at = Date.parse(w.resetsAt);\n if (!Number.isFinite(at) || at > now) return w;\n return { ...w, usedPercent: 0, reset: true };\n}\n\n/**\n * The window closest to its limit, for the top bar: of each agent's account in use — the one new sessions start on\n * (`isDefault`) — and of every account while none is marked (reported: after moving every session to a second\n * account and making it the default, the bar still showed the old account's 98%). The panel lists them all. Ties go\n * to the one resetting later.\n */\nexport function meterWindow(\n agents: AgentUsage[],\n now: number,\n): { agent: string; name: string; account: string; window: UsageWindow } | null {\n let best: { agent: string; name: string; account: string; window: UsageWindow } | null = null;\n const resetMs = (w: UsageWindow) => (w.resetsAt === null ? -Infinity : Date.parse(w.resetsAt) || -Infinity);\n for (const a of agents) {\n const inUse = a.accounts.filter((x) => x.isDefault);\n for (const acc of inUse.length ? inUse : a.accounts) {\n for (const raw of acc.windows) {\n const window = agedWindow(raw, now);\n if (\n !best ||\n window.usedPercent > best.window.usedPercent ||\n (window.usedPercent === best.window.usedPercent && resetMs(window) > resetMs(best.window))\n ) {\n best = { agent: a.agent, name: a.name, account: acc.account, window };\n }\n }\n }\n }\n return best;\n}\n\n/** 273, 1.7k, 48k, 1.6M, 48M, 1.2B: the size of a token count, short enough for a panel row. */\nexport function formatTokens(n: number): string {\n const one = (v: number) => String(Math.round(v * 10) / 10);\n const x = Math.max(0, Math.round(n));\n if (x < 1e3) return String(x);\n if (x < 1e4) return `${one(x / 1e3)}k`;\n if (Math.round(x / 1e3) < 1e3) return `${Math.round(x / 1e3)}k`;\n if (x < 1e7) return `${one(x / 1e6)}M`;\n if (Math.round(x / 1e6) < 1e3) return `${Math.round(x / 1e6)}M`;\n return `${one(x / 1e9)}B`;\n}\n\nconst WEEKDAYS = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];\nconst clock = (d: Date) => `${String(d.getHours()).padStart(2, '0')}:${String(d.getMinutes()).padStart(2, '0')}`;\n\n/** \"resets 15:10\" within a day, \"resets Mon 09:00\" after that (local time); '' when there is no valid time. */\nexport function resetPhrase(resetsAt: string | null, now: number): string {\n const at = resetsAt ? Date.parse(resetsAt) : NaN;\n if (!Number.isFinite(at)) return '';\n const d = new Date(at);\n return at - now < 24 * 3_600_000 ? `resets ${clock(d)}` : `resets ${WEEKDAYS[d.getDay()]} ${clock(d)}`;\n}\n\n/** How long ago, in a few words (\"3 min ago\"). */\nexport function ageText(ms: number): string {\n const min = Math.round(ms / 60_000);\n if (min < 1) return 'just now';\n if (min < 60) return `${min} min ago`;\n const h = Math.round(min / 60);\n if (h < 48) return `${h} h ago`;\n return `${Math.round(h / 24)} days ago`;\n}\n\n/** An account's last reading in a line (\"5-hour limit 42% · Weekly limit 18% · read 3 min ago\"); a window past its reset reads 0. */\nexport function usageText(reading: Pick<UsageAccount, 'at' | 'windows'> | null | undefined, now: number): string {\n if (!reading || reading.windows.length === 0) return 'no usage reading yet';\n const windows = reading.windows.map((w) => `${w.label} ${Math.round(agedWindow(w, now).usedPercent)}%`);\n const at = Date.parse(reading.at);\n return [...windows, Number.isFinite(at) ? `read ${ageText(now - at)}` : ''].filter(Boolean).join(' · ');\n}\n"],"mappings":";;;AAmCO,SAAS,WAAW,GAAgB,KAA0B;AACnE,MAAI,EAAE,aAAa,KAAM,QAAO;AAChC,QAAM,KAAK,KAAK,MAAM,EAAE,QAAQ;AAChC,MAAI,CAAC,OAAO,SAAS,EAAE,KAAK,KAAK,IAAK,QAAO;AAC7C,SAAO,EAAE,GAAG,GAAG,aAAa,GAAG,OAAO,KAAK;AAC7C;AAiCO,SAAS,aAAa,GAAmB;AAC9C,QAAM,MAAM,CAAC,MAAc,OAAO,KAAK,MAAM,IAAI,EAAE,IAAI,EAAE;AACzD,QAAM,IAAI,KAAK,IAAI,GAAG,KAAK,MAAM,CAAC,CAAC;AACnC,MAAI,IAAI,IAAK,QAAO,OAAO,CAA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