@unbrained/pm-cli 2026.7.3 → 2026.7.5
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/CHANGELOG.md +36 -0
- package/CONTRIBUTING.md +36 -7
- package/README.md +1 -9
- package/dist/cli/commands/calendar.d.ts +3 -2
- package/dist/cli/commands/calendar.js +5 -5
- package/dist/cli/commands/calendar.js.map +1 -1
- package/dist/cli/commands/claim.js +17 -3
- package/dist/cli/commands/claim.js.map +1 -1
- package/dist/cli/commands/close.js +34 -16
- package/dist/cli/commands/close.js.map +1 -1
- package/dist/cli/commands/completion.js +231 -345
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/copy.js +3 -3
- package/dist/cli/commands/copy.js.map +1 -1
- package/dist/cli/commands/create.d.ts +9 -59
- package/dist/cli/commands/create.js +162 -132
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/extension/bundled-catalog.d.ts +6 -0
- package/dist/cli/commands/extension/bundled-catalog.js +15 -2
- package/dist/cli/commands/extension/bundled-catalog.js.map +1 -1
- package/dist/cli/commands/extension/describe.d.ts +6 -3
- package/dist/cli/commands/extension/describe.js +21 -9
- package/dist/cli/commands/extension/describe.js.map +1 -1
- package/dist/cli/commands/extension/doctor.d.ts +0 -4
- package/dist/cli/commands/extension/doctor.js +3 -3
- package/dist/cli/commands/extension/doctor.js.map +1 -1
- package/dist/cli/commands/extension/scaffold.js +59 -133
- package/dist/cli/commands/extension/scaffold.js.map +1 -1
- package/dist/cli/commands/extension/shared.d.ts +2 -7
- package/dist/cli/commands/extension/shared.js +4 -10
- package/dist/cli/commands/extension/shared.js.map +1 -1
- package/dist/cli/commands/extension.js +33 -8
- package/dist/cli/commands/extension.js.map +1 -1
- package/dist/cli/commands/files.js +3 -3
- package/dist/cli/commands/files.js.map +1 -1
- package/dist/cli/commands/history-compact.js +9 -18
- package/dist/cli/commands/history-compact.js.map +1 -1
- package/dist/cli/commands/history-repair.js +9 -19
- package/dist/cli/commands/history-repair.js.map +1 -1
- package/dist/cli/commands/init-agent-guidance.js +133 -97
- package/dist/cli/commands/init-agent-guidance.js.map +1 -1
- package/dist/cli/commands/init.js +3 -3
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/item-filter-options.d.ts +2 -0
- package/dist/cli/commands/item-filter-options.js +2 -2
- package/dist/cli/commands/item-filter-options.js.map +1 -1
- package/dist/cli/commands/mutation-command-options.d.ts +78 -0
- package/dist/cli/commands/mutation-command-options.js +10 -0
- package/dist/cli/commands/mutation-command-options.js.map +1 -0
- package/dist/cli/commands/profile.js +3 -3
- package/dist/cli/commands/profile.js.map +1 -1
- package/dist/cli/commands/reindex.js +4 -4
- package/dist/cli/commands/reindex.js.map +1 -1
- package/dist/cli/commands/restore.js +3 -3
- package/dist/cli/commands/restore.js.map +1 -1
- package/dist/cli/commands/schema.js +10 -10
- package/dist/cli/commands/schema.js.map +1 -1
- package/dist/cli/commands/shared-unset-fields.d.ts +19 -0
- package/dist/cli/commands/shared-unset-fields.js +31 -2
- package/dist/cli/commands/shared-unset-fields.js.map +1 -1
- package/dist/cli/commands/update.d.ts +2 -59
- package/dist/cli/commands/update.js +29 -98
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/commands/validate.js +4 -4
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/error-guidance.js +107 -7
- package/dist/cli/error-guidance.js.map +1 -1
- package/dist/cli/main.d.ts +6 -2
- package/dist/cli/main.js +33 -12
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/register-list-query.js +4 -2
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/registration-helpers.js +12 -6
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli-bundle/chunks/activity-4XQIDNM5.js +18 -0
- package/dist/cli-bundle/chunks/{activity-5YWLSPGE.js → activity-YKAKZTZ4.js} +11 -9
- package/dist/cli-bundle/chunks/{aggregate-2V2M3JZU.js → aggregate-EQX2RGB7.js} +16 -13
- package/dist/cli-bundle/chunks/{aggregate-2V2M3JZU.js.map → aggregate-EQX2RGB7.js.map} +1 -1
- package/dist/cli-bundle/chunks/{aggregate-EK7DXML7.js → aggregate-PEGZGJXD.js} +18 -15
- package/dist/cli-bundle/chunks/{aggregate-EK7DXML7.js.map → aggregate-PEGZGJXD.js.map} +1 -1
- package/dist/cli-bundle/chunks/{append-EZESUVJT.js → append-CZGUZ45Q.js} +11 -8
- package/dist/cli-bundle/chunks/{append-EZESUVJT.js.map → append-CZGUZ45Q.js.map} +1 -1
- package/dist/cli-bundle/chunks/{append-JFG4WQMG.js → append-NSQBCXZJ.js} +13 -10
- package/dist/cli-bundle/chunks/{append-JFG4WQMG.js.map → append-NSQBCXZJ.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-3JZNEQBA.js +1413 -0
- package/dist/cli-bundle/chunks/chunk-3JZNEQBA.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-NOIEVOK5.js → chunk-3PL6LEKP.js} +16 -14
- package/dist/cli-bundle/chunks/{chunk-NOIEVOK5.js.map → chunk-3PL6LEKP.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-6KRFL33E.js → chunk-3U3VEWK6.js} +277 -119
- package/dist/cli-bundle/chunks/chunk-3U3VEWK6.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-Z5F6XZXE.js → chunk-3Y4OESPP.js} +14 -12
- package/dist/cli-bundle/chunks/{chunk-Z5F6XZXE.js.map → chunk-3Y4OESPP.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-HB4FAT3O.js → chunk-4LRVSBO6.js} +21 -15
- package/dist/cli-bundle/chunks/chunk-4LRVSBO6.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-T3P7PMZP.js → chunk-4OFLJHX6.js} +7 -5
- package/dist/cli-bundle/chunks/{chunk-T3P7PMZP.js.map → chunk-4OFLJHX6.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-JPATY4SE.js → chunk-4QQ6PM7M.js} +45 -557
- package/dist/cli-bundle/chunks/chunk-4QQ6PM7M.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-6CDCWKSX.js → chunk-53BTLLAF.js} +68 -331
- package/dist/cli-bundle/chunks/chunk-53BTLLAF.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-4WB6S4YX.js → chunk-57C2RLW5.js} +277 -112
- package/dist/cli-bundle/chunks/chunk-57C2RLW5.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-PULUSQAV.js → chunk-5B3X4Y22.js} +52 -63
- package/dist/cli-bundle/chunks/{chunk-PULUSQAV.js.map → chunk-5B3X4Y22.js.map} +3 -3
- package/dist/cli-bundle/chunks/{chunk-7LYO6S5A.js → chunk-5J2XPTAD.js} +10 -8
- package/dist/cli-bundle/chunks/{chunk-7LYO6S5A.js.map → chunk-5J2XPTAD.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-QCDTQCMW.js → chunk-5JE6SMYS.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-MHRS5FUX.js → chunk-5JZ7APJU.js} +153 -108
- package/dist/cli-bundle/chunks/chunk-5JZ7APJU.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-KHVGM5CS.js → chunk-5VVUKE3U.js} +544 -2368
- package/dist/cli-bundle/chunks/chunk-5VVUKE3U.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-RJH5VQHW.js → chunk-75U6M5ZD.js} +22 -16
- package/dist/cli-bundle/chunks/chunk-75U6M5ZD.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-7C2O74AE.js +23 -0
- package/dist/cli-bundle/chunks/chunk-7C2O74AE.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-ZFTKYWIF.js → chunk-7EQNAZX2.js} +14 -12
- package/dist/cli-bundle/chunks/{chunk-ZFTKYWIF.js.map → chunk-7EQNAZX2.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-Z4DGFQDH.js → chunk-7LQKVMPA.js} +14 -4
- package/dist/cli-bundle/chunks/chunk-7LQKVMPA.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ERG65A2L.js → chunk-7MDXZAZS.js} +29 -7
- package/dist/cli-bundle/chunks/chunk-7MDXZAZS.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-OGLGI22K.js → chunk-7QH7DHUB.js} +74 -8
- package/dist/cli-bundle/chunks/chunk-7QH7DHUB.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-JBZ2NTKX.js → chunk-7WYXBPYQ.js} +7 -5
- package/dist/cli-bundle/chunks/{chunk-JBZ2NTKX.js.map → chunk-7WYXBPYQ.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-AAEQMOC6.js +150 -0
- package/dist/cli-bundle/chunks/chunk-AAEQMOC6.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-K5DT2YKM.js → chunk-ABRA3BHY.js} +18 -16
- package/dist/cli-bundle/chunks/{chunk-K5DT2YKM.js.map → chunk-ABRA3BHY.js.map} +2 -2
- package/dist/cli-bundle/chunks/chunk-B5KXLBSJ.js +47 -0
- package/dist/cli-bundle/chunks/chunk-B5KXLBSJ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-7CLLC75T.js → chunk-BFVHCAOO.js} +9 -7
- package/dist/cli-bundle/chunks/{chunk-7CLLC75T.js.map → chunk-BFVHCAOO.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-MDHWWBNZ.js → chunk-BVEUCSH2.js} +6 -4
- package/dist/cli-bundle/chunks/{chunk-MDHWWBNZ.js.map → chunk-BVEUCSH2.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-C3PMDWGX.js +160 -0
- package/dist/cli-bundle/chunks/chunk-C3PMDWGX.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-T4XBKJ3F.js → chunk-D3UCE7RW.js} +7 -5
- package/dist/cli-bundle/chunks/{chunk-T4XBKJ3F.js.map → chunk-D3UCE7RW.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-DC3QJQWI.js +275 -0
- package/dist/cli-bundle/chunks/chunk-DC3QJQWI.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-DLQ4ZTCU.js +634 -0
- package/dist/cli-bundle/chunks/chunk-DLQ4ZTCU.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-AJHYQCBJ.js → chunk-DRBV5UC2.js} +8 -23
- package/dist/cli-bundle/chunks/chunk-DRBV5UC2.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-NZ7QIUP5.js → chunk-E2FUG6GD.js} +67 -351
- package/dist/cli-bundle/chunks/chunk-E2FUG6GD.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-4PFVUUYV.js → chunk-EEY54JMF.js} +5 -3
- package/dist/cli-bundle/chunks/{chunk-4PFVUUYV.js.map → chunk-EEY54JMF.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-3W2HJKJX.js → chunk-EZFKWSC7.js} +94 -16
- package/dist/cli-bundle/chunks/{chunk-3W2HJKJX.js.map → chunk-EZFKWSC7.js.map} +4 -4
- package/dist/cli-bundle/chunks/{chunk-F6WNBITZ.js → chunk-FDBARR33.js} +40 -19
- package/dist/cli-bundle/chunks/{chunk-F6WNBITZ.js.map → chunk-FDBARR33.js.map} +3 -3
- package/dist/cli-bundle/chunks/{chunk-WRYERRZX.js → chunk-FGQKEDE4.js} +36 -12
- package/dist/cli-bundle/chunks/chunk-FGQKEDE4.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-CXR3CMBQ.js → chunk-FJRKQREY.js} +10 -18
- package/dist/cli-bundle/chunks/chunk-FJRKQREY.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-QNNQAAZ5.js → chunk-FUM6UMY4.js} +10 -11
- package/dist/cli-bundle/chunks/{chunk-QNNQAAZ5.js.map → chunk-FUM6UMY4.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-TQ6AX5SQ.js → chunk-GIWXVMZ3.js} +140 -334
- package/dist/cli-bundle/chunks/chunk-GIWXVMZ3.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-FZJM2TXF.js → chunk-HBYZDSK5.js} +19 -17
- package/dist/cli-bundle/chunks/{chunk-FZJM2TXF.js.map → chunk-HBYZDSK5.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-5IZUBZBR.js → chunk-HJE4JTKQ.js} +6 -4
- package/dist/cli-bundle/chunks/{chunk-5IZUBZBR.js.map → chunk-HJE4JTKQ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-YSDFIY7N.js → chunk-HK72NWAD.js} +89 -18
- package/dist/cli-bundle/chunks/chunk-HK72NWAD.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-LBE5QFMZ.js → chunk-IJ6CO3JV.js} +41 -20
- package/dist/cli-bundle/chunks/{chunk-LBE5QFMZ.js.map → chunk-IJ6CO3JV.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-YF746GTH.js → chunk-JFCVQXZX.js} +139 -326
- package/dist/cli-bundle/chunks/chunk-JFCVQXZX.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-A3OQ7TFW.js → chunk-JLA7EVYV.js} +12 -10
- package/dist/cli-bundle/chunks/{chunk-A3OQ7TFW.js.map → chunk-JLA7EVYV.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-K32L7HZO.js +76 -0
- package/dist/cli-bundle/chunks/chunk-K32L7HZO.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-32IUNTG4.js → chunk-K3AGVXSF.js} +37 -13
- package/dist/cli-bundle/chunks/chunk-K3AGVXSF.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-KDZ6K25I.js +79 -0
- package/dist/cli-bundle/chunks/chunk-KDZ6K25I.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-KGHH652T.js +44 -0
- package/dist/cli-bundle/chunks/chunk-KGHH652T.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-KL22PY6L.js +915 -0
- package/dist/cli-bundle/chunks/chunk-KL22PY6L.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-BI4R7HI2.js → chunk-KLG4ZULO.js} +12 -10
- package/dist/cli-bundle/chunks/{chunk-BI4R7HI2.js.map → chunk-KLG4ZULO.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-XRYSCRZR.js → chunk-LEKT4K7I.js} +74 -8
- package/dist/cli-bundle/chunks/chunk-LEKT4K7I.js.map +7 -0
- package/dist/cli-bundle/chunks/{contracts-X74F2GSM.js → chunk-MNZ7DRNC.js} +13 -10
- package/dist/cli-bundle/chunks/{contracts-X74F2GSM.js.map → chunk-MNZ7DRNC.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-4EXFFP7T.js → chunk-MTTXDAK4.js} +206 -147
- package/dist/cli-bundle/chunks/chunk-MTTXDAK4.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-KEZOIPCR.js → chunk-MZ7VNEVY.js} +8 -6
- package/dist/cli-bundle/chunks/{chunk-KEZOIPCR.js.map → chunk-MZ7VNEVY.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-5JIWFWOZ.js → chunk-N6DNM2FA.js} +2 -2
- package/dist/cli-bundle/chunks/{test-runs-QIR5MJPL.js → chunk-N7X4WP6L.js} +11 -8
- package/dist/cli-bundle/chunks/{test-runs-QIR5MJPL.js.map → chunk-N7X4WP6L.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-U3S2B7TA.js → chunk-NBFCNJ7Q.js} +206 -147
- package/dist/cli-bundle/chunks/chunk-NBFCNJ7Q.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-GVJE5T7Q.js → chunk-NER3KUUS.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-NNHHXJB2.js +20 -0
- package/dist/cli-bundle/chunks/chunk-NNHHXJB2.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-OBA2WH65.js +918 -0
- package/dist/cli-bundle/chunks/chunk-OBA2WH65.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-YPWUSH72.js → chunk-OESSOFJ4.js} +14 -12
- package/dist/cli-bundle/chunks/{chunk-YPWUSH72.js.map → chunk-OESSOFJ4.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-OK5NXCZB.js +238 -0
- package/dist/cli-bundle/chunks/chunk-OK5NXCZB.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-FUFFPIYA.js → chunk-OWTIRHX4.js} +28 -6
- package/dist/cli-bundle/chunks/chunk-OWTIRHX4.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-Z7RPDF2Y.js → chunk-P3VRG72Q.js} +10 -8
- package/dist/cli-bundle/chunks/{chunk-Z7RPDF2Y.js.map → chunk-P3VRG72Q.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-P5TFTLWW.js +1423 -0
- package/dist/cli-bundle/chunks/chunk-P5TFTLWW.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-P5YORJRH.js +1977 -0
- package/dist/cli-bundle/chunks/chunk-P5YORJRH.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-MEZZZBYX.js → chunk-PDXT6Q55.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-EJ2OCBHF.js → chunk-PJ3A56YF.js} +46 -537
- package/dist/cli-bundle/chunks/chunk-PJ3A56YF.js.map +1 -0
- package/dist/cli-bundle/chunks/{test-runs-MG5VIGSK.js → chunk-PPAJG4GB.js} +13 -10
- package/dist/cli-bundle/chunks/{test-runs-MG5VIGSK.js.map → chunk-PPAJG4GB.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-572FKBRL.js → chunk-PPE4YUQM.js} +1725 -1663
- package/dist/cli-bundle/chunks/chunk-PPE4YUQM.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ER4ME5U2.js → chunk-QHZO65XW.js} +8 -6
- package/dist/cli-bundle/chunks/{chunk-ER4ME5U2.js.map → chunk-QHZO65XW.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-T6AXEBOP.js → chunk-R3ZBLGTC.js} +9 -10
- package/dist/cli-bundle/chunks/{chunk-T6AXEBOP.js.map → chunk-R3ZBLGTC.js.map} +2 -2
- package/dist/cli-bundle/chunks/chunk-RCT3YJOK.js +624 -0
- package/dist/cli-bundle/chunks/chunk-RCT3YJOK.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-YVKZ3ANP.js → chunk-RX3HQSYG.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-LOWVNZBZ.js → chunk-S4APD35C.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-FH2H3CBD.js → chunk-S5AYOUT5.js} +8 -6
- package/dist/cli-bundle/chunks/{chunk-FH2H3CBD.js.map → chunk-S5AYOUT5.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-SYE6WMV6.js → chunk-STPSZ2XY.js} +19 -744
- package/dist/cli-bundle/chunks/chunk-STPSZ2XY.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-6NYJGMTY.js → chunk-T35XLYZF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-P5L7Z2O6.js → chunk-T3ABIMGW.js} +5 -3
- package/dist/cli-bundle/chunks/{chunk-P5L7Z2O6.js.map → chunk-T3ABIMGW.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-SU2E4AWU.js → chunk-T3F4DF23.js} +16 -14
- package/dist/cli-bundle/chunks/{chunk-SU2E4AWU.js.map → chunk-T3F4DF23.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-T4MX77AK.js +272 -0
- package/dist/cli-bundle/chunks/chunk-T4MX77AK.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-T5Y3QSNF.js +5354 -0
- package/dist/cli-bundle/chunks/chunk-T5Y3QSNF.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ECU6MMTQ.js → chunk-TSPKZRRW.js} +50 -116
- package/dist/cli-bundle/chunks/chunk-TSPKZRRW.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-BE2SR6QL.js → chunk-TT42JUMF.js} +4 -4
- package/dist/cli-bundle/chunks/chunk-UHKX7I75.js +165 -0
- package/dist/cli-bundle/chunks/chunk-UHKX7I75.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-RAHINBVP.js → chunk-UI5BJ6DO.js} +1339 -1277
- package/dist/cli-bundle/chunks/chunk-UI5BJ6DO.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-US3T3W5J.js +1932 -0
- package/dist/cli-bundle/chunks/chunk-US3T3W5J.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-UZRDBL6W.js +175 -0
- package/dist/cli-bundle/chunks/chunk-UZRDBL6W.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-B4O5S7I3.js → chunk-VUHVWI4C.js} +13 -3
- package/dist/cli-bundle/chunks/chunk-VUHVWI4C.js.map +7 -0
- package/dist/cli-bundle/chunks/{contracts-L6ODXNUM.js → chunk-VZIYHZDX.js} +11 -8
- package/dist/cli-bundle/chunks/{contracts-L6ODXNUM.js.map → chunk-VZIYHZDX.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-U5TR4N7J.js → chunk-WISPVC2E.js} +9 -7
- package/dist/cli-bundle/chunks/{chunk-U5TR4N7J.js.map → chunk-WISPVC2E.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-WVSGSZ6J.js +5434 -0
- package/dist/cli-bundle/chunks/chunk-WVSGSZ6J.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-HQAF23Q2.js → chunk-XQCG2JGW.js} +17 -749
- package/dist/cli-bundle/chunks/chunk-XQCG2JGW.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-Y76TWC45.js +550 -0
- package/dist/cli-bundle/chunks/chunk-Y76TWC45.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-L4SLHV6G.js → chunk-YD5FML7K.js} +464 -2239
- package/dist/cli-bundle/chunks/chunk-YD5FML7K.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-YSGTMDWC.js → chunk-YFIE7YK6.js} +7 -5
- package/dist/cli-bundle/chunks/{chunk-YSGTMDWC.js.map → chunk-YFIE7YK6.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-WYOIIFSE.js → chunk-YMABYTNG.js} +49 -115
- package/dist/cli-bundle/chunks/chunk-YMABYTNG.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-SU3TB4NS.js → chunk-YOF5VPKM.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WJA3PXW7.js → chunk-YPPVU5GX.js} +11 -9
- package/dist/cli-bundle/chunks/{chunk-WJA3PXW7.js.map → chunk-YPPVU5GX.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-GUYNUXQT.js → chunk-YQMMMONE.js} +6 -4
- package/dist/cli-bundle/chunks/{chunk-GUYNUXQT.js.map → chunk-YQMMMONE.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-AIKU3IIL.js → chunk-YSAH5FY5.js} +16 -14
- package/dist/cli-bundle/chunks/{chunk-AIKU3IIL.js.map → chunk-YSAH5FY5.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-KS6ATO47.js → chunk-YZIR4R3U.js} +153 -108
- package/dist/cli-bundle/chunks/chunk-YZIR4R3U.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-LCWQP6NM.js → chunk-Z2CRRZYF.js} +14 -12
- package/dist/cli-bundle/chunks/{chunk-LCWQP6NM.js.map → chunk-Z2CRRZYF.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-ZAHXPXVY.js +533 -0
- package/dist/cli-bundle/chunks/chunk-ZAHXPXVY.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-UMNQZS4H.js → chunk-ZCJAA3JK.js} +8 -6
- package/dist/cli-bundle/chunks/{chunk-UMNQZS4H.js.map → chunk-ZCJAA3JK.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-EQURFOMH.js → chunk-ZD34OFFQ.js} +5 -3
- package/dist/cli-bundle/chunks/{chunk-EQURFOMH.js.map → chunk-ZD34OFFQ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-67LARBDL.js → chunk-ZJB3UV5U.js} +54 -58
- package/dist/cli-bundle/chunks/chunk-ZJB3UV5U.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-5E7N4T2Z.js → chunk-ZMD35NYG.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-ZVDL32GJ.js +241 -0
- package/dist/cli-bundle/chunks/chunk-ZVDL32GJ.js.map +7 -0
- package/dist/cli-bundle/chunks/{claim-5GU7OE67.js → claim-4DROPSIS.js} +30 -13
- package/dist/cli-bundle/chunks/claim-4DROPSIS.js.map +1 -0
- package/dist/cli-bundle/chunks/{claim-2BGBGSVI.js → claim-VX54TV5U.js} +29 -12
- package/dist/cli-bundle/chunks/claim-VX54TV5U.js.map +7 -0
- package/dist/cli-bundle/chunks/{close-AFVKPR57.js → close-3YRR3XY6.js} +9 -7
- package/dist/cli-bundle/chunks/close-OB2Y4QP5.js +16 -0
- package/dist/cli-bundle/chunks/{close-many-JKUJMHLG.js → close-many-AP4MWU36.js} +21 -18
- package/dist/cli-bundle/chunks/{close-many-JKUJMHLG.js.map → close-many-AP4MWU36.js.map} +1 -1
- package/dist/cli-bundle/chunks/{close-many-7KLOSYLP.js → close-many-OMZIGZB4.js} +19 -16
- package/dist/cli-bundle/chunks/{close-many-7KLOSYLP.js.map → close-many-OMZIGZB4.js.map} +1 -1
- package/dist/cli-bundle/chunks/{comments-DNWHEBOS.js → comments-MIW5MZOX.js} +12 -9
- package/dist/cli-bundle/chunks/{comments-DNWHEBOS.js.map → comments-MIW5MZOX.js.map} +1 -1
- package/dist/cli-bundle/chunks/{comments-RW23R3VE.js → comments-SAG5LSKL.js} +14 -11
- package/dist/cli-bundle/chunks/{comments-RW23R3VE.js.map → comments-SAG5LSKL.js.map} +1 -1
- package/dist/cli-bundle/chunks/{config-AUM5WBYA.js → config-DJJKZB5R.js} +20 -17
- package/dist/cli-bundle/chunks/{config-AUM5WBYA.js.map → config-DJJKZB5R.js.map} +1 -1
- package/dist/cli-bundle/chunks/{config-OZWSA2NP.js → config-V57QD47V.js} +22 -19
- package/dist/cli-bundle/chunks/{config-OZWSA2NP.js.map → config-V57QD47V.js.map} +1 -1
- package/dist/cli-bundle/chunks/{context-PKCEHQY3.js → context-4OQGIPSO.js} +15 -12
- package/dist/cli-bundle/chunks/{context-OYXRGY7S.js → context-WLA6IAWE.js} +15 -12
- package/dist/cli-bundle/chunks/contracts-HXJLKCRI.js +12 -0
- package/dist/cli-bundle/chunks/contracts-OJEXMKVW.js +16 -0
- package/dist/cli-bundle/chunks/{copy-I4NCLBR4.js → copy-LEE6P6EM.js} +17 -14
- package/dist/cli-bundle/chunks/{copy-I4NCLBR4.js.map → copy-LEE6P6EM.js.map} +2 -2
- package/dist/cli-bundle/chunks/{copy-6XOR3HKN.js → copy-OTJOWFL6.js} +18 -15
- package/dist/cli-bundle/chunks/{copy-6XOR3HKN.js.map → copy-OTJOWFL6.js.map} +1 -1
- package/dist/cli-bundle/chunks/create-WKOZKPQR.js +30 -0
- package/dist/cli-bundle/chunks/{create-PM45M6PE.js → create-XWWQFQ6S.js} +14 -12
- package/dist/cli-bundle/chunks/{delete-7YXHYG67.js → delete-62JQTYT4.js} +10 -7
- package/dist/cli-bundle/chunks/{delete-7YXHYG67.js.map → delete-62JQTYT4.js.map} +1 -1
- package/dist/cli-bundle/chunks/{delete-LPISP43T.js → delete-HQKGRNRZ.js} +12 -9
- package/dist/cli-bundle/chunks/{delete-LPISP43T.js.map → delete-HQKGRNRZ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{deps-WATKQDE3.js → deps-55FTG6Z5.js} +12 -9
- package/dist/cli-bundle/chunks/{deps-WATKQDE3.js.map → deps-55FTG6Z5.js.map} +1 -1
- package/dist/cli-bundle/chunks/{deps-N2T26FME.js → deps-L2FPIAD3.js} +10 -7
- package/dist/cli-bundle/chunks/{deps-N2T26FME.js.map → deps-L2FPIAD3.js.map} +1 -1
- package/dist/cli-bundle/chunks/{docs-6LQ3GLM7.js → docs-6CRCSVKK.js} +11 -9
- package/dist/cli-bundle/chunks/{docs-6LQ3GLM7.js.map → docs-6CRCSVKK.js.map} +1 -1
- package/dist/cli-bundle/chunks/{docs-Z3X6JZLT.js → docs-S6UTOTO5.js} +9 -7
- package/dist/cli-bundle/chunks/{docs-Z3X6JZLT.js.map → docs-S6UTOTO5.js.map} +1 -1
- package/dist/cli-bundle/chunks/{eval-6DCLG52D.js → eval-N6UHFWVO.js} +15 -11
- package/dist/cli-bundle/chunks/{eval-6DCLG52D.js.map → eval-N6UHFWVO.js.map} +1 -1
- package/dist/cli-bundle/chunks/{eval-Y3ZCUTHK.js → eval-PHOTWYHI.js} +17 -13
- package/dist/cli-bundle/chunks/{eval-Y3ZCUTHK.js.map → eval-PHOTWYHI.js.map} +1 -1
- package/dist/cli-bundle/chunks/{extension-BNINIMT7.js → extension-NBAH62ML.js} +17 -11
- package/dist/cli-bundle/chunks/{extension-QWE4YYK5.js → extension-ZF6ZZPOU.js} +17 -11
- package/dist/cli-bundle/chunks/{files-FUYPSOFJ.js → files-6P57MRKL.js} +14 -11
- package/dist/cli-bundle/chunks/files-6P57MRKL.js.map +7 -0
- package/dist/cli-bundle/chunks/{files-6SGKHS6O.js → files-JPU3FNJ7.js} +15 -12
- package/dist/cli-bundle/chunks/files-JPU3FNJ7.js.map +1 -0
- package/dist/cli-bundle/chunks/{focus-2Q3K76G2.js → focus-LFZ6IDBR.js} +15 -11
- package/dist/cli-bundle/chunks/{focus-2Q3K76G2.js.map → focus-LFZ6IDBR.js.map} +1 -1
- package/dist/cli-bundle/chunks/{focus-ATLBWXXD.js → focus-WNMYCVYA.js} +13 -9
- package/dist/cli-bundle/chunks/{focus-ATLBWXXD.js.map → focus-WNMYCVYA.js.map} +1 -1
- package/dist/cli-bundle/chunks/{gc-RUYEMNRF.js → gc-AETFKZ44.js} +10 -7
- package/dist/cli-bundle/chunks/{gc-RUYEMNRF.js.map → gc-AETFKZ44.js.map} +1 -1
- package/dist/cli-bundle/chunks/{gc-TDWSDR66.js → gc-RLBP4QVN.js} +12 -9
- package/dist/cli-bundle/chunks/{gc-TDWSDR66.js.map → gc-RLBP4QVN.js.map} +1 -1
- package/dist/cli-bundle/chunks/{get-LY6M2JIM.js → get-NH2MPBCI.js} +18 -15
- package/dist/cli-bundle/chunks/{get-LY6M2JIM.js.map → get-NH2MPBCI.js.map} +1 -1
- package/dist/cli-bundle/chunks/{get-2WGLX74N.js → get-P4ZQXCPZ.js} +16 -13
- package/dist/cli-bundle/chunks/{get-2WGLX74N.js.map → get-P4ZQXCPZ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{health-4RKHYS3T.js → health-3GVPMQBL.js} +36 -29
- package/dist/cli-bundle/chunks/{health-4RKHYS3T.js.map → health-3GVPMQBL.js.map} +1 -1
- package/dist/cli-bundle/chunks/{health-TMFVNYRA.js → health-DNTM72GJ.js} +34 -27
- package/dist/cli-bundle/chunks/{health-TMFVNYRA.js.map → health-DNTM72GJ.js.map} +1 -1
- package/dist/cli-bundle/chunks/history-RYKLC72X.js +20 -0
- package/dist/cli-bundle/chunks/{history-SGRRS72R.js → history-SGPYRAFT.js} +10 -8
- package/dist/cli-bundle/chunks/{history-compact-LOED43R3.js → history-compact-3F6VELO7.js} +26 -30
- package/dist/cli-bundle/chunks/history-compact-3F6VELO7.js.map +7 -0
- package/dist/cli-bundle/chunks/{history-compact-V5DNAQHH.js → history-compact-656Y2TN4.js} +27 -31
- package/dist/cli-bundle/chunks/history-compact-656Y2TN4.js.map +1 -0
- package/dist/cli-bundle/chunks/history-redact-4H3FCKF3.js +21 -0
- package/dist/cli-bundle/chunks/{history-redact-IRL7WJ3E.js → history-redact-54ICFKXM.js} +11 -9
- package/dist/cli-bundle/chunks/{history-repair-PGYQJMGD.js → history-repair-4N6SDVHK.js} +25 -30
- package/dist/cli-bundle/chunks/history-repair-4N6SDVHK.js.map +7 -0
- package/dist/cli-bundle/chunks/{history-repair-4WVBVHFR.js → history-repair-EVTO6LIH.js} +26 -31
- package/dist/cli-bundle/chunks/history-repair-EVTO6LIH.js.map +1 -0
- package/dist/cli-bundle/chunks/init-RPIPQUNV.js +32 -0
- package/dist/cli-bundle/chunks/init-SKQAESQS.js +28 -0
- package/dist/cli-bundle/chunks/{learnings-4FJY7WIW.js → learnings-2HTPZNGZ.js} +10 -8
- package/dist/cli-bundle/chunks/{learnings-4FJY7WIW.js.map → learnings-2HTPZNGZ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{learnings-4BHWFFUV.js → learnings-YBIHY3D6.js} +12 -10
- package/dist/cli-bundle/chunks/{learnings-4BHWFFUV.js.map → learnings-YBIHY3D6.js.map} +1 -1
- package/dist/cli-bundle/chunks/{list-472TIOVK.js → list-64LHZ3HM.js} +10 -8
- package/dist/cli-bundle/chunks/{list-D7BF5CL2.js → list-7LXBTEKI.js} +10 -8
- package/dist/cli-bundle/chunks/{next-SFQZVX2B.js → next-7ODPAQ4U.js} +22 -18
- package/dist/cli-bundle/chunks/{next-SFQZVX2B.js.map → next-7ODPAQ4U.js.map} +1 -1
- package/dist/cli-bundle/chunks/{next-D5STGWI2.js → next-ODJUM4ZM.js} +24 -20
- package/dist/cli-bundle/chunks/{next-D5STGWI2.js.map → next-ODJUM4ZM.js.map} +1 -1
- package/dist/cli-bundle/chunks/{notes-6KNOSLIT.js → notes-72YXN5JX.js} +10 -8
- package/dist/cli-bundle/chunks/{notes-6KNOSLIT.js.map → notes-72YXN5JX.js.map} +1 -1
- package/dist/cli-bundle/chunks/{notes-W4UEICGF.js → notes-NJ7IQJX4.js} +12 -10
- package/dist/cli-bundle/chunks/{notes-W4UEICGF.js.map → notes-NJ7IQJX4.js.map} +1 -1
- package/dist/cli-bundle/chunks/{plan-MJQW5XK3.js → plan-R4NDQ27E.js} +18 -15
- package/dist/cli-bundle/chunks/{plan-MJQW5XK3.js.map → plan-R4NDQ27E.js.map} +1 -1
- package/dist/cli-bundle/chunks/{plan-JO6V7BXO.js → plan-XWY5T67S.js} +20 -17
- package/dist/cli-bundle/chunks/{plan-JO6V7BXO.js.map → plan-XWY5T67S.js.map} +1 -1
- package/dist/cli-bundle/chunks/profile-XQWEQKS3.js +397 -0
- package/dist/cli-bundle/chunks/profile-XQWEQKS3.js.map +1 -0
- package/dist/cli-bundle/chunks/profile-YRDHLMRO.js +400 -0
- package/dist/cli-bundle/chunks/profile-YRDHLMRO.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-list-query-ELBHCCFI.js → register-list-query-5H66WFYF.js} +24 -21
- package/dist/cli-bundle/chunks/register-list-query-5H66WFYF.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-list-query-GAPQ6DM3.js → register-list-query-FB3FNDLZ.js} +25 -22
- package/dist/cli-bundle/chunks/{register-list-query-ELBHCCFI.js.map → register-list-query-FB3FNDLZ.js.map} +1 -7
- package/dist/cli-bundle/chunks/{register-mutation-SJWMVIJ2.js → register-mutation-UJO23C7R.js} +42 -39
- package/dist/cli-bundle/chunks/{register-mutation-SJWMVIJ2.js.map → register-mutation-UJO23C7R.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-mutation-ROFE2YPC.js → register-mutation-Z2ETYHKS.js} +40 -37
- package/dist/cli-bundle/chunks/{register-mutation-ROFE2YPC.js.map → register-mutation-Z2ETYHKS.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-operations-MEKU3AKC.js → register-operations-A3XAM5J7.js} +39 -36
- package/dist/cli-bundle/chunks/{register-operations-MEKU3AKC.js.map → register-operations-A3XAM5J7.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-operations-IADFVH53.js → register-operations-SG7HBSUP.js} +37 -34
- package/dist/cli-bundle/chunks/{register-operations-IADFVH53.js.map → register-operations-SG7HBSUP.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-setup-AJWUSSQX.js → register-setup-I45OGJUV.js} +25 -19
- package/dist/cli-bundle/chunks/{register-setup-AJWUSSQX.js.map → register-setup-I45OGJUV.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-setup-3QJY43CY.js → register-setup-K6U3NVY5.js} +23 -17
- package/dist/cli-bundle/chunks/{register-setup-3QJY43CY.js.map → register-setup-K6U3NVY5.js.map} +1 -1
- package/dist/cli-bundle/chunks/restore-PXOFL6AM.js +19 -0
- package/dist/cli-bundle/chunks/{restore-44IHMMZZ.js → restore-YJ2ET6AT.js} +11 -9
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-TSBK4AY5.js → scheduling-shortcuts-SSC4MYWQ.js} +14 -12
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-TSBK4AY5.js.map → scheduling-shortcuts-SSC4MYWQ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-OLHNLAZY.js → scheduling-shortcuts-ULRG7MNP.js} +16 -14
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-OLHNLAZY.js.map → scheduling-shortcuts-ULRG7MNP.js.map} +1 -1
- package/dist/cli-bundle/chunks/{schema-VBCELP5G.js → schema-2PUXCZ25.js} +10 -7
- package/dist/cli-bundle/chunks/{schema-IB2NZZWD.js → schema-Y6DXXK2F.js} +10 -7
- package/dist/cli-bundle/chunks/{search-7UBETML4.js → search-3S72CTD6.js} +13 -10
- package/dist/cli-bundle/chunks/{search-R227JOL6.js → search-WNUNBQXO.js} +13 -10
- package/dist/cli-bundle/chunks/{stats-FAG7COEH.js → stats-IJYTRQGV.js} +13 -10
- package/dist/cli-bundle/chunks/{stats-FAG7COEH.js.map → stats-IJYTRQGV.js.map} +1 -1
- package/dist/cli-bundle/chunks/{stats-MCK7PLYS.js → stats-L2D5Y2O5.js} +15 -12
- package/dist/cli-bundle/chunks/{stats-MCK7PLYS.js.map → stats-L2D5Y2O5.js.map} +1 -1
- package/dist/cli-bundle/chunks/{telemetry-DRPDZMAO.js → telemetry-L2CVOKVN.js} +11 -8
- package/dist/cli-bundle/chunks/{telemetry-DRPDZMAO.js.map → telemetry-L2CVOKVN.js.map} +1 -1
- package/dist/cli-bundle/chunks/{telemetry-GVVUQSJQ.js → telemetry-QBYWQA76.js} +13 -10
- package/dist/cli-bundle/chunks/{telemetry-GVVUQSJQ.js.map → telemetry-QBYWQA76.js.map} +1 -1
- package/dist/cli-bundle/chunks/{test-QY44WAMR.js → test-DQ2QFJ7W.js} +21 -15
- package/dist/cli-bundle/chunks/test-W7QBLVJS.js +41 -0
- package/dist/cli-bundle/chunks/{test-all-USPJHXFR.js → test-all-636NTRTT.js} +26 -19
- package/dist/cli-bundle/chunks/{test-all-USPJHXFR.js.map → test-all-636NTRTT.js.map} +1 -1
- package/dist/cli-bundle/chunks/{test-all-QD6QAEG7.js → test-all-DWYK3RG6.js} +24 -17
- package/dist/cli-bundle/chunks/{test-all-QD6QAEG7.js.map → test-all-DWYK3RG6.js.map} +1 -1
- package/dist/cli-bundle/chunks/test-runs-245OINZR.js +28 -0
- package/dist/cli-bundle/chunks/test-runs-245OINZR.js.map +1 -0
- package/dist/cli-bundle/chunks/test-runs-ZRD4GCTT.js +24 -0
- package/dist/cli-bundle/chunks/test-runs-ZRD4GCTT.js.map +7 -0
- package/dist/cli-bundle/chunks/update-SFLZPJXX.js +30 -0
- package/dist/cli-bundle/chunks/update-SFLZPJXX.js.map +1 -0
- package/dist/cli-bundle/chunks/update-SJZ6S77U.js +26 -0
- package/dist/cli-bundle/chunks/update-SJZ6S77U.js.map +7 -0
- package/dist/cli-bundle/chunks/{update-many-RATAARHU.js → update-many-DC7X3EWM.js} +32 -29
- package/dist/cli-bundle/chunks/{update-many-RATAARHU.js.map → update-many-DC7X3EWM.js.map} +1 -1
- package/dist/cli-bundle/chunks/{update-many-BEMTDA2X.js → update-many-SLLAMHT7.js} +34 -31
- package/dist/cli-bundle/chunks/{update-many-BEMTDA2X.js.map → update-many-SLLAMHT7.js.map} +1 -1
- package/dist/cli-bundle/chunks/{upgrade-VU46BLJZ.js → upgrade-HFFXLZJA.js} +19 -12
- package/dist/cli-bundle/chunks/{upgrade-VU46BLJZ.js.map → upgrade-HFFXLZJA.js.map} +1 -1
- package/dist/cli-bundle/chunks/{upgrade-NWMR3VQL.js → upgrade-UYQKM7RF.js} +21 -14
- package/dist/cli-bundle/chunks/{upgrade-NWMR3VQL.js.map → upgrade-UYQKM7RF.js.map} +1 -1
- package/dist/cli-bundle/chunks/{validate-NRY6MFXN.js → validate-PA4FDTOV.js} +35 -28
- package/dist/cli-bundle/chunks/validate-PA4FDTOV.js.map +7 -0
- package/dist/cli-bundle/chunks/{validate-GAJ6FUSI.js → validate-Z7L75YEJ.js} +35 -28
- package/dist/cli-bundle/chunks/validate-Z7L75YEJ.js.map +1 -0
- package/dist/cli-bundle/main.js +173 -57
- package/dist/cli-bundle/main.js.map +2 -2
- package/dist/cli-bundle/sdk-runtime.js +247 -0
- package/dist/cli-bundle/sdk-runtime.js.map +7 -0
- package/dist/cli-bundle/sdk-testing.js +101 -0
- package/dist/cli-bundle/sdk-testing.js.map +7 -0
- package/dist/cli-bundle/sdk.js +787 -0
- package/dist/cli-bundle/sdk.js.map +7 -0
- package/dist/core/config/nested-settings.d.ts +4 -3
- package/dist/core/config/nested-settings.js +17 -6
- package/dist/core/config/nested-settings.js.map +1 -1
- package/dist/core/extensions/activation-summary.d.ts +6 -0
- package/dist/core/extensions/activation-summary.js +10 -4
- package/dist/core/extensions/activation-summary.js.map +1 -1
- package/dist/core/extensions/capability-usage.d.ts +6 -0
- package/dist/core/extensions/capability-usage.js +10 -4
- package/dist/core/extensions/capability-usage.js.map +1 -1
- package/dist/core/extensions/extension-types.d.ts +6 -2
- package/dist/core/extensions/extension-types.js +2 -2
- package/dist/core/extensions/extension-types.js.map +1 -1
- package/dist/core/extensions/loader.d.ts +3 -0
- package/dist/core/extensions/loader.js +11 -19
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/history/history-rewrite.d.ts +10 -0
- package/dist/core/history/history-rewrite.js +28 -4
- package/dist/core/history/history-rewrite.js.map +1 -1
- package/dist/core/item/parent-reference-policy.d.ts +9 -1
- package/dist/core/item/parent-reference-policy.js +28 -4
- package/dist/core/item/parent-reference-policy.js.map +1 -1
- package/dist/core/item/type-registry.d.ts +1 -0
- package/dist/core/item/type-registry.js +153 -177
- package/dist/core/item/type-registry.js.map +1 -1
- package/dist/core/lock/lock.d.ts +28 -1
- package/dist/core/lock/lock.js +254 -20
- package/dist/core/lock/lock.js.map +1 -1
- package/dist/core/search/background-refresh.js +7 -19
- package/dist/core/search/background-refresh.js.map +1 -1
- package/dist/core/search/http-client.d.ts +0 -1
- package/dist/core/search/http-client.js +3 -3
- package/dist/core/search/http-client.js.map +1 -1
- package/dist/core/shared/constants.js +3 -2
- package/dist/core/shared/constants.js.map +1 -1
- package/dist/core/shared/errors.d.ts +1 -0
- package/dist/core/shared/errors.js +2 -2
- package/dist/core/shared/errors.js.map +1 -1
- package/dist/core/shared/primitives.d.ts +12 -0
- package/dist/core/shared/primitives.js +29 -2
- package/dist/core/shared/primitives.js.map +1 -1
- package/dist/core/store/item-store.js +3 -3
- package/dist/core/store/item-store.js.map +1 -1
- package/dist/core/store/settings-validator.d.ts +1 -0
- package/dist/core/store/settings-validator.js +6 -3
- package/dist/core/store/settings-validator.js.map +1 -1
- package/dist/core/store/settings.js +3 -3
- package/dist/core/store/settings.js.map +1 -1
- package/dist/core/validate/fix-planning.d.ts +0 -2
- package/dist/core/validate/fix-planning.js +3 -3
- package/dist/core/validate/fix-planning.js.map +1 -1
- package/dist/sdk/cli-contracts/commander-mutation-options.js +3 -2
- package/dist/sdk/cli-contracts/commander-mutation-options.js.map +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.js +5 -2
- package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.js +4 -2
- package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-schema.js +55 -94
- package/dist/sdk/cli-contracts/tool-schema.js.map +1 -1
- package/dist/sdk/errors.d.ts +21 -2
- package/dist/sdk/errors.js +8 -2
- package/dist/sdk/errors.js.map +1 -1
- package/dist/sdk/package-import-adapters.d.ts +90 -2
- package/dist/sdk/package-import-adapters.js +275 -3
- package/dist/sdk/package-import-adapters.js.map +1 -1
- package/dist/sdk/runtime.d.ts +1 -1
- package/dist/sdk/runtime.js +3 -3
- package/dist/sdk/runtime.js.map +1 -1
- package/dist/sdk/testing.js +41 -19
- package/dist/sdk/testing.js.map +1 -1
- package/dist/types.d.ts +6 -0
- package/dist/types.js +2 -2
- package/dist/types.js.map +1 -1
- package/docs/ARCHITECTURE.md +27 -0
- package/docs/CONFIGURATION.md +3 -0
- package/docs/README.md +1 -0
- package/docs/SDK_PRIMITIVE_INVENTORY.md +55 -0
- package/docs/TESTING.md +5 -1
- package/docs/examples/ci/github-actions-pm-extension-gate.yml +5 -5
- package/docs/examples/ci/gitlab-ci-pm-extension-gate.yml +1 -1
- package/docs/examples/ci/jenkins-pm-extension-gate.Jenkinsfile +1 -1
- package/package.json +14 -26
- package/packages/pm-beads/extensions/beads/package.json +3 -0
- package/packages/pm-beads/extensions/beads/runtime-loader.ts +50 -41
- package/packages/pm-beads/extensions/beads/runtime.ts +106 -223
- package/packages/pm-calendar/extensions/calendar/package.json +3 -0
- package/packages/pm-calendar/extensions/calendar/runtime.ts +21 -18
- package/packages/pm-command-kit/extensions/command-kit/package.json +3 -0
- package/packages/pm-governance-audit/extensions/governance-audit/package.json +3 -0
- package/packages/pm-guide-shell/extensions/guide-shell/package.json +3 -0
- package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +9 -11
- package/packages/pm-kanban/extensions/kanban/package.json +3 -0
- package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/package.json +3 -0
- package/packages/pm-search-advanced/extensions/search-advanced/package.json +3 -0
- package/packages/pm-templates/extensions/templates/package.json +3 -0
- package/packages/pm-todos/extensions/todos/package.json +3 -0
- package/packages/pm-todos/extensions/todos/runtime-loader.ts +62 -72
- package/packages/pm-todos/extensions/todos/runtime.ts +61 -257
- package/plugins/pm-claude/scripts/pm-mcp-server.mjs +73 -31
- package/plugins/pm-codex/scripts/pm-mcp-server.mjs +80 -34
- package/scripts/bundle-cli.mjs +12 -2
- package/scripts/install.ps1 +7 -7
- package/dist/cli-bundle/chunks/activity-BIML7K2D.js +0 -16
- package/dist/cli-bundle/chunks/chunk-32IUNTG4.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-4EXFFP7T.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4WB6S4YX.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-572FKBRL.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-67LARBDL.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-6CDCWKSX.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-6KRFL33E.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-AJHYQCBJ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-B4O5S7I3.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-CXR3CMBQ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ECU6MMTQ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-EJ2OCBHF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ERG65A2L.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-FUFFPIYA.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-HB4FAT3O.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-HQAF23Q2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-JPATY4SE.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-KHVGM5CS.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-KS6ATO47.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-L4SLHV6G.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-MHRS5FUX.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-NZ7QIUP5.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-OGLGI22K.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RAHINBVP.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-RJH5VQHW.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-SYE6WMV6.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-TQ6AX5SQ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-U3S2B7TA.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-WRYERRZX.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-WYOIIFSE.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-XRYSCRZR.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-YF746GTH.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-YSDFIY7N.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-Z4DGFQDH.js.map +0 -1
- package/dist/cli-bundle/chunks/claim-2BGBGSVI.js.map +0 -7
- package/dist/cli-bundle/chunks/claim-5GU7OE67.js.map +0 -1
- package/dist/cli-bundle/chunks/close-6YODBUIV.js +0 -14
- package/dist/cli-bundle/chunks/create-Z7YCH3BE.js +0 -28
- package/dist/cli-bundle/chunks/files-6SGKHS6O.js.map +0 -1
- package/dist/cli-bundle/chunks/files-FUYPSOFJ.js.map +0 -7
- package/dist/cli-bundle/chunks/history-CGNQJXFE.js +0 -18
- package/dist/cli-bundle/chunks/history-compact-LOED43R3.js.map +0 -7
- package/dist/cli-bundle/chunks/history-compact-V5DNAQHH.js.map +0 -1
- package/dist/cli-bundle/chunks/history-redact-N3JK7VBW.js +0 -19
- package/dist/cli-bundle/chunks/history-repair-4WVBVHFR.js.map +0 -1
- package/dist/cli-bundle/chunks/history-repair-PGYQJMGD.js.map +0 -7
- package/dist/cli-bundle/chunks/init-4GESW7RM.js +0 -26
- package/dist/cli-bundle/chunks/init-XIDPABA4.js +0 -22
- package/dist/cli-bundle/chunks/profile-3TOTMUR4.js +0 -1243
- package/dist/cli-bundle/chunks/profile-3TOTMUR4.js.map +0 -7
- package/dist/cli-bundle/chunks/profile-WIQY2KCV.js +0 -1205
- package/dist/cli-bundle/chunks/profile-WIQY2KCV.js.map +0 -1
- package/dist/cli-bundle/chunks/register-list-query-GAPQ6DM3.js.map +0 -1
- package/dist/cli-bundle/chunks/restore-EXHU34EU.js +0 -17
- package/dist/cli-bundle/chunks/test-SY76DZTO.js +0 -35
- package/dist/cli-bundle/chunks/update-A7EICML6.js +0 -24
- package/dist/cli-bundle/chunks/update-IKJZWLQC.js +0 -28
- package/dist/cli-bundle/chunks/validate-GAJ6FUSI.js.map +0 -1
- package/dist/cli-bundle/chunks/validate-NRY6MFXN.js.map +0 -7
- /package/dist/cli-bundle/chunks/{activity-BIML7K2D.js.map → activity-4XQIDNM5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-5YWLSPGE.js.map → activity-YKAKZTZ4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QCDTQCMW.js.map → chunk-5JE6SMYS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5JIWFWOZ.js.map → chunk-N6DNM2FA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GVJE5T7Q.js.map → chunk-NER3KUUS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MEZZZBYX.js.map → chunk-PDXT6Q55.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YVKZ3ANP.js.map → chunk-RX3HQSYG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LOWVNZBZ.js.map → chunk-S4APD35C.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6NYJGMTY.js.map → chunk-T35XLYZF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BE2SR6QL.js.map → chunk-TT42JUMF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SU3TB4NS.js.map → chunk-YOF5VPKM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5E7N4T2Z.js.map → chunk-ZMD35NYG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-AFVKPR57.js.map → close-3YRR3XY6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-6YODBUIV.js.map → close-OB2Y4QP5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-PKCEHQY3.js.map → context-4OQGIPSO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-OYXRGY7S.js.map → context-WLA6IAWE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-Z7YCH3BE.js.map → contracts-HXJLKCRI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-PM45M6PE.js.map → contracts-OJEXMKVW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-BNINIMT7.js.map → create-WKOZKPQR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-QWE4YYK5.js.map → create-XWWQFQ6S.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-CGNQJXFE.js.map → extension-NBAH62ML.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-SGRRS72R.js.map → extension-ZF6ZZPOU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-N3JK7VBW.js.map → history-RYKLC72X.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-IRL7WJ3E.js.map → history-SGPYRAFT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-XIDPABA4.js.map → history-redact-4H3FCKF3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-4GESW7RM.js.map → history-redact-54ICFKXM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-D7BF5CL2.js.map → init-RPIPQUNV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-472TIOVK.js.map → init-SKQAESQS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-EXHU34EU.js.map → list-64LHZ3HM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-44IHMMZZ.js.map → list-7LXBTEKI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-VBCELP5G.js.map → restore-PXOFL6AM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-IB2NZZWD.js.map → restore-YJ2ET6AT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-R227JOL6.js.map → schema-2PUXCZ25.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-7UBETML4.js.map → schema-Y6DXXK2F.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-QY44WAMR.js.map → search-3S72CTD6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-SY76DZTO.js.map → search-WNUNBQXO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-IKJZWLQC.js.map → test-DQ2QFJ7W.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-A7EICML6.js.map → test-W7QBLVJS.js.map} +0 -0
package/dist/cli-bundle/chunks/{scheduling-shortcuts-OLHNLAZY.js → scheduling-shortcuts-ULRG7MNP.js}
RENAMED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b0405b47-9ba9-57b1-91cc-c5565c218c44")}catch(e){}}();
|
|
3
3
|
import {
|
|
4
4
|
runCreate
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-NBFCNJ7Q.js";
|
|
6
|
+
import "./chunk-MZ7VNEVY.js";
|
|
7
|
+
import "./chunk-7WYXBPYQ.js";
|
|
8
|
+
import "./chunk-PDXT6Q55.js";
|
|
9
|
+
import "./chunk-4OFLJHX6.js";
|
|
10
10
|
import "./chunk-P4SESZGT.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-57C2RLW5.js";
|
|
12
|
+
import "./chunk-7MDXZAZS.js";
|
|
13
|
+
import "./chunk-HK72NWAD.js";
|
|
14
|
+
import "./chunk-FJRKQREY.js";
|
|
15
|
+
import "./chunk-US3T3W5J.js";
|
|
16
|
+
import "./chunk-NER3KUUS.js";
|
|
17
|
+
import "./chunk-NNHHXJB2.js";
|
|
18
|
+
import "./chunk-YD5FML7K.js";
|
|
17
19
|
|
|
18
20
|
// dist/cli/commands/scheduling-shortcuts.js
|
|
19
21
|
var DEFAULT_DURATION = "1h";
|
|
@@ -81,6 +83,6 @@ export {
|
|
|
81
83
|
runMeet,
|
|
82
84
|
runRemind
|
|
83
85
|
};
|
|
84
|
-
//# sourceMappingURL=scheduling-shortcuts-
|
|
86
|
+
//# sourceMappingURL=scheduling-shortcuts-ULRG7MNP.js.map
|
|
85
87
|
|
|
86
|
-
//# debugId=
|
|
88
|
+
//# debugId=b0405b47-9ba9-57b1-91cc-c5565c218c44
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../cli/commands/scheduling-shortcuts.ts"],"sourcesContent":["/**\n * @module cli/commands/scheduling-shortcuts\n *\n * Implements the pm scheduling shortcuts command surface and its agent-facing runtime behavior.\n */\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { runCreate, type CreateCommandOptions, type CreateResult } from \"./create.js\";\n\n/**\n * GH-217: low-friction creation shortcuts for the scheduling item types\n * (Meeting/Event/Reminder), which sit unused because `pm create --type Event`\n * demands structured `--event`/`--reminder` CSV entries. These commands accept\n * friendly time flags (`--start`, `--duration`, `--end`, `--at`) and translate\n * them into the canonical scheduling fields, then delegate to `runCreate` so the\n * full create pipeline (parent/focus inheritance, governance, hooks, validation)\n * applies unchanged. The `lightweight` schedule preset is applied so progressive\n * scheduling fields are not demanded up front.\n */\n\n/** Options shared by every scheduling shortcut, forwarded to `runCreate`. */\nexport interface SchedulingShortcutCommonOptions {\n parent?: string;\n allowMissingParent?: boolean;\n tags?: string;\n priority?: string;\n body?: string;\n description?: string;\n author?: string;\n message?: string;\n}\n\n/** Options for `pm meet` and `pm event` (a start time plus a span). */\nexport interface MeetingEventShortcutOptions extends SchedulingShortcutCommonOptions {\n start?: string;\n duration?: string;\n end?: string;\n location?: string;\n timezone?: string;\n allDay?: boolean;\n}\n\n/** Options for `pm remind` (a single point in time). */\nexport interface ReminderShortcutOptions extends SchedulingShortcutCommonOptions {\n at?: string;\n text?: string;\n}\n\n/** Default span applied when neither `--end` nor `--duration` is given. */\nconst DEFAULT_DURATION = \"1h\";\n/** Default start applied when `--start` is omitted (keeps the item calendar-visible). */\nconst DEFAULT_START = \"now\";\n/** Default reminder time applied when `--at` is omitted. */\nconst DEFAULT_REMINDER_AT = \"+1d\";\n\n/**\n * Wrap a free-text value (reminder text, event location) in double quotes so\n * commas and colons survive the CSV round-trip into `--reminder`/`--event`.\n * Backslashes are escaped first, then embedded quotes — escaping quotes alone\n * would let a trailing backslash escape the closing quote and break out of the\n * quoted field (CSV injection). The parser's `unquoteValue` strips the wrapping\n * quotes and unescapes `\\\"` back to `\"`.\n */\nfunction quoteCsvValue(value: string): string {\n return `\"${value.replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g, \"\\\\\\\"\")}\"`;\n}\n\n/**\n * Append a `key=\"value\"` pair. EVERY value is double-quoted (not just free-text\n * fields) so a comma or `=` in any token — `start`, `duration`, `at`, etc. —\n * cannot inject extra CSV key/value pairs into the `--event`/`--reminder`\n * entry. The parser's `parseCsvKv` unquotes every value before use, so quoting\n * is transparent to ISO/relative/timezone tokens.\n */\nfunction appendPair(pairs: string[], key: string, value: string | undefined): void {\n if (value !== undefined) {\n pairs.push(`${key}=${quoteCsvValue(value)}`);\n }\n}\n\nfunction buildCommonOptions(\n type: string,\n title: string,\n options: SchedulingShortcutCommonOptions,\n): CreateCommandOptions {\n return {\n type,\n title,\n schedulePreset: \"lightweight\",\n parent: options.parent,\n allowMissingParent: options.allowMissingParent,\n tags: options.tags,\n priority: options.priority,\n body: options.body,\n description: options.description,\n author: options.author,\n message: options.message,\n };\n}\n\nfunction buildEventEntry(options: MeetingEventShortcutOptions): string {\n const pairs: string[] = [];\n appendPair(pairs, \"start\", options.start ?? DEFAULT_START);\n if (options.end !== undefined) {\n appendPair(pairs, \"end\", options.end);\n } else {\n appendPair(pairs, \"duration\", options.duration ?? DEFAULT_DURATION);\n }\n appendPair(pairs, \"location\", options.location);\n appendPair(pairs, \"timezone\", options.timezone);\n if (options.allDay === true) {\n appendPair(pairs, \"all_day\", \"true\");\n }\n return pairs.join(\",\");\n}\n\nasync function createScheduled(\n type: string,\n title: string,\n options: MeetingEventShortcutOptions,\n global: GlobalOptions,\n): Promise<CreateResult> {\n const createOptions = buildCommonOptions(type, title, options);\n createOptions.event = [buildEventEntry(options)];\n return runCreate(createOptions, global);\n}\n\n/** `pm meet \"<title>\"` — create a Meeting with sensible scheduling defaults. */\nexport function runMeet(\n title: string,\n options: MeetingEventShortcutOptions,\n global: GlobalOptions,\n): Promise<CreateResult> {\n return createScheduled(\"Meeting\", title, options, global);\n}\n\n/** `pm event \"<title>\"` — create an Event with sensible scheduling defaults. */\nexport function runEvent(\n title: string,\n options: MeetingEventShortcutOptions,\n global: GlobalOptions,\n): Promise<CreateResult> {\n return createScheduled(\"Event\", title, options, global);\n}\n\n/** `pm remind \"<title>\"` — create a Reminder from a single point in time. */\nexport function runRemind(\n title: string,\n options: ReminderShortcutOptions,\n global: GlobalOptions,\n): Promise<CreateResult> {\n const createOptions = buildCommonOptions(\"Reminder\", title, options);\n const pairs: string[] = [];\n appendPair(pairs, \"at\", options.at ?? DEFAULT_REMINDER_AT);\n appendPair(pairs, \"text\", options.text ?? title);\n createOptions.reminder = [pairs.join(\",\")];\n return runCreate(createOptions, global);\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../cli/commands/scheduling-shortcuts.ts"],"sourcesContent":["/**\n * @module cli/commands/scheduling-shortcuts\n *\n * Implements the pm scheduling shortcuts command surface and its agent-facing runtime behavior.\n */\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { runCreate, type CreateCommandOptions, type CreateResult } from \"./create.js\";\n\n/**\n * GH-217: low-friction creation shortcuts for the scheduling item types\n * (Meeting/Event/Reminder), which sit unused because `pm create --type Event`\n * demands structured `--event`/`--reminder` CSV entries. These commands accept\n * friendly time flags (`--start`, `--duration`, `--end`, `--at`) and translate\n * them into the canonical scheduling fields, then delegate to `runCreate` so the\n * full create pipeline (parent/focus inheritance, governance, hooks, validation)\n * applies unchanged. The `lightweight` schedule preset is applied so progressive\n * scheduling fields are not demanded up front.\n */\n\n/** Options shared by every scheduling shortcut, forwarded to `runCreate`. */\nexport interface SchedulingShortcutCommonOptions {\n parent?: string;\n allowMissingParent?: boolean;\n tags?: string;\n priority?: string;\n body?: string;\n description?: string;\n author?: string;\n message?: string;\n}\n\n/** Options for `pm meet` and `pm event` (a start time plus a span). */\nexport interface MeetingEventShortcutOptions extends SchedulingShortcutCommonOptions {\n start?: string;\n duration?: string;\n end?: string;\n location?: string;\n timezone?: string;\n allDay?: boolean;\n}\n\n/** Options for `pm remind` (a single point in time). */\nexport interface ReminderShortcutOptions extends SchedulingShortcutCommonOptions {\n at?: string;\n text?: string;\n}\n\n/** Default span applied when neither `--end` nor `--duration` is given. */\nconst DEFAULT_DURATION = \"1h\";\n/** Default start applied when `--start` is omitted (keeps the item calendar-visible). */\nconst DEFAULT_START = \"now\";\n/** Default reminder time applied when `--at` is omitted. */\nconst DEFAULT_REMINDER_AT = \"+1d\";\n\n/**\n * Wrap a free-text value (reminder text, event location) in double quotes so\n * commas and colons survive the CSV round-trip into `--reminder`/`--event`.\n * Backslashes are escaped first, then embedded quotes — escaping quotes alone\n * would let a trailing backslash escape the closing quote and break out of the\n * quoted field (CSV injection). The parser's `unquoteValue` strips the wrapping\n * quotes and unescapes `\\\"` back to `\"`.\n */\nfunction quoteCsvValue(value: string): string {\n return `\"${value.replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g, \"\\\\\\\"\")}\"`;\n}\n\n/**\n * Append a `key=\"value\"` pair. EVERY value is double-quoted (not just free-text\n * fields) so a comma or `=` in any token — `start`, `duration`, `at`, etc. —\n * cannot inject extra CSV key/value pairs into the `--event`/`--reminder`\n * entry. The parser's `parseCsvKv` unquotes every value before use, so quoting\n * is transparent to ISO/relative/timezone tokens.\n */\nfunction appendPair(pairs: string[], key: string, value: string | undefined): void {\n if (value !== undefined) {\n pairs.push(`${key}=${quoteCsvValue(value)}`);\n }\n}\n\nfunction buildCommonOptions(\n type: string,\n title: string,\n options: SchedulingShortcutCommonOptions,\n): CreateCommandOptions {\n return {\n type,\n title,\n schedulePreset: \"lightweight\",\n parent: options.parent,\n allowMissingParent: options.allowMissingParent,\n tags: options.tags,\n priority: options.priority,\n body: options.body,\n description: options.description,\n author: options.author,\n message: options.message,\n };\n}\n\nfunction buildEventEntry(options: MeetingEventShortcutOptions): string {\n const pairs: string[] = [];\n appendPair(pairs, \"start\", options.start ?? DEFAULT_START);\n if (options.end !== undefined) {\n appendPair(pairs, \"end\", options.end);\n } else {\n appendPair(pairs, \"duration\", options.duration ?? DEFAULT_DURATION);\n }\n appendPair(pairs, \"location\", options.location);\n appendPair(pairs, \"timezone\", options.timezone);\n if (options.allDay === true) {\n appendPair(pairs, \"all_day\", \"true\");\n }\n return pairs.join(\",\");\n}\n\nasync function createScheduled(\n type: string,\n title: string,\n options: MeetingEventShortcutOptions,\n global: GlobalOptions,\n): Promise<CreateResult> {\n const createOptions = buildCommonOptions(type, title, options);\n createOptions.event = [buildEventEntry(options)];\n return runCreate(createOptions, global);\n}\n\n/** `pm meet \"<title>\"` — create a Meeting with sensible scheduling defaults. */\nexport function runMeet(\n title: string,\n options: MeetingEventShortcutOptions,\n global: GlobalOptions,\n): Promise<CreateResult> {\n return createScheduled(\"Meeting\", title, options, global);\n}\n\n/** `pm event \"<title>\"` — create an Event with sensible scheduling defaults. */\nexport function runEvent(\n title: string,\n options: MeetingEventShortcutOptions,\n global: GlobalOptions,\n): Promise<CreateResult> {\n return createScheduled(\"Event\", title, options, global);\n}\n\n/** `pm remind \"<title>\"` — create a Reminder from a single point in time. */\nexport function runRemind(\n title: string,\n options: ReminderShortcutOptions,\n global: GlobalOptions,\n): Promise<CreateResult> {\n const createOptions = buildCommonOptions(\"Reminder\", title, options);\n const pairs: string[] = [];\n appendPair(pairs, \"at\", options.at ?? DEFAULT_REMINDER_AT);\n appendPair(pairs, \"text\", options.text ?? title);\n createOptions.reminder = [pairs.join(\",\")];\n return runCreate(createOptions, global);\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAgDA,IAAM,mBAAmB;AAEzB,IAAM,gBAAgB;AAEtB,IAAM,sBAAsB;AAU5B,SAAS,cAAc,OAAa;AAClC,SAAO,IAAI,MAAM,QAAQ,OAAO,MAAM,EAAE,QAAQ,MAAM,KAAM,CAAC;AAC/D;AASA,SAAS,WAAW,OAAiB,KAAa,OAAyB;AACzE,MAAI,UAAU,QAAW;AACvB,UAAM,KAAK,GAAG,GAAG,IAAI,cAAc,KAAK,CAAC,EAAE;EAC7C;AACF;AAEA,SAAS,mBACP,MACA,OACA,SAAwC;AAExC,SAAO;IACL;IACA;IACA,gBAAgB;IAChB,QAAQ,QAAQ;IAChB,oBAAoB,QAAQ;IAC5B,MAAM,QA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emaShow,
|
|
29
29
|
runSchemaShowField,
|
|
30
30
|
runSchemaShowStatus
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-4QQ6PM7M.js";
|
|
32
|
+
import "./chunk-3U3VEWK6.js";
|
|
33
|
+
import "./chunk-Y76TWC45.js";
|
|
34
|
+
import "./chunk-EZFKWSC7.js";
|
|
35
|
+
import "./chunk-DRBV5UC2.js";
|
|
36
|
+
import "./chunk-P5YORJRH.js";
|
|
32
37
|
import {
|
|
33
38
|
buildInvalidTypeHint
|
|
34
|
-
} from "./chunk-
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
37
|
-
import "./chunk-AJHYQCBJ.js";
|
|
38
|
-
import "./chunk-KHVGM5CS.js";
|
|
39
|
+
} from "./chunk-T35XLYZF.js";
|
|
40
|
+
import "./chunk-7C2O74AE.js";
|
|
41
|
+
import "./chunk-5VVUKE3U.js";
|
|
39
42
|
export {
|
|
40
43
|
SCHEMA_SUBCOMMANDS,
|
|
41
44
|
_testOnlySchemaCommand,
|
|
@@ -68,4 +71,4 @@ export {
|
|
|
68
71
|
runSchemaShowField,
|
|
69
72
|
runSchemaShowStatus
|
|
70
73
|
};
|
|
71
|
-
//# sourceMappingURL=schema-
|
|
74
|
+
//# sourceMappingURL=schema-2PUXCZ25.js.map
|
|
@@ -30,14 +30,17 @@ import {
|
|
|
30
30
|
runSchemaShow,
|
|
31
31
|
runSchemaShowField,
|
|
32
32
|
runSchemaShowStatus
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-PJ3A56YF.js";
|
|
34
|
+
import "./chunk-57C2RLW5.js";
|
|
35
|
+
import "./chunk-ZAHXPXVY.js";
|
|
36
|
+
import "./chunk-HK72NWAD.js";
|
|
37
|
+
import "./chunk-FJRKQREY.js";
|
|
38
|
+
import "./chunk-US3T3W5J.js";
|
|
34
39
|
import {
|
|
35
40
|
buildInvalidTypeHint
|
|
36
|
-
} from "./chunk-
|
|
37
|
-
import "./chunk-
|
|
38
|
-
import "./chunk-
|
|
39
|
-
import "./chunk-CXR3CMBQ.js";
|
|
40
|
-
import "./chunk-L4SLHV6G.js";
|
|
41
|
+
} from "./chunk-NER3KUUS.js";
|
|
42
|
+
import "./chunk-NNHHXJB2.js";
|
|
43
|
+
import "./chunk-YD5FML7K.js";
|
|
41
44
|
export {
|
|
42
45
|
SCHEMA_SUBCOMMANDS,
|
|
43
46
|
_testOnlySchemaCommand,
|
|
@@ -70,6 +73,6 @@ export {
|
|
|
70
73
|
runSchemaShowField,
|
|
71
74
|
runSchemaShowStatus
|
|
72
75
|
};
|
|
73
|
-
//# sourceMappingURL=schema-
|
|
76
|
+
//# sourceMappingURL=schema-Y6DXXK2F.js.map
|
|
74
77
|
|
|
75
78
|
//# debugId=45eac7fa-f181-5cca-93b7-cfb58909dbb3
|
|
@@ -9,17 +9,20 @@ import {
|
|
|
9
9
|
resolveSearchScoreThreshold,
|
|
10
10
|
resolveSearchTuning,
|
|
11
11
|
runSearch
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ZJB3UV5U.js";
|
|
13
13
|
import "./chunk-ROGZTCCB.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-AIKU3IIL.js";
|
|
14
|
+
import "./chunk-YSAH5FY5.js";
|
|
16
15
|
import "./chunk-QB7XMHJW.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-5JE6SMYS.js";
|
|
17
|
+
import "./chunk-YFIE7YK6.js";
|
|
18
|
+
import "./chunk-7QH7DHUB.js";
|
|
19
|
+
import "./chunk-KGHH652T.js";
|
|
20
|
+
import "./chunk-57C2RLW5.js";
|
|
21
|
+
import "./chunk-HK72NWAD.js";
|
|
22
|
+
import "./chunk-FJRKQREY.js";
|
|
23
|
+
import "./chunk-US3T3W5J.js";
|
|
24
|
+
import "./chunk-NNHHXJB2.js";
|
|
25
|
+
import "./chunk-YD5FML7K.js";
|
|
23
26
|
export {
|
|
24
27
|
_testOnlySearchCommand,
|
|
25
28
|
classifyImplicitSemanticFallbackReason,
|
|
@@ -30,6 +33,6 @@ export {
|
|
|
30
33
|
resolveSearchTuning,
|
|
31
34
|
runSearch
|
|
32
35
|
};
|
|
33
|
-
//# sourceMappingURL=search-
|
|
36
|
+
//# sourceMappingURL=search-3S72CTD6.js.map
|
|
34
37
|
|
|
35
38
|
//# debugId=45eac7fa-f181-5cca-93b7-cfb58909dbb3
|
|
@@ -7,17 +7,20 @@ import {
|
|
|
7
7
|
resolveSearchScoreThreshold,
|
|
8
8
|
resolveSearchTuning,
|
|
9
9
|
runSearch
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-5B3X4Y22.js";
|
|
11
11
|
import "./chunk-VPLDQMW2.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-ZFTKYWIF.js";
|
|
12
|
+
import "./chunk-7EQNAZX2.js";
|
|
14
13
|
import "./chunk-R23CSHGI.js";
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-RX3HQSYG.js";
|
|
15
|
+
import "./chunk-EEY54JMF.js";
|
|
16
|
+
import "./chunk-LEKT4K7I.js";
|
|
17
|
+
import "./chunk-B5KXLBSJ.js";
|
|
18
|
+
import "./chunk-3U3VEWK6.js";
|
|
19
|
+
import "./chunk-EZFKWSC7.js";
|
|
20
|
+
import "./chunk-DRBV5UC2.js";
|
|
21
|
+
import "./chunk-P5YORJRH.js";
|
|
22
|
+
import "./chunk-7C2O74AE.js";
|
|
23
|
+
import "./chunk-5VVUKE3U.js";
|
|
21
24
|
export {
|
|
22
25
|
_testOnlySearchCommand,
|
|
23
26
|
classifyImplicitSemanticFallbackReason,
|
|
@@ -28,4 +31,4 @@ export {
|
|
|
28
31
|
resolveSearchTuning,
|
|
29
32
|
runSearch
|
|
30
33
|
};
|
|
31
|
-
//# sourceMappingURL=search-
|
|
34
|
+
//# sourceMappingURL=search-WNUNBQXO.js.map
|
|
@@ -5,28 +5,31 @@ import {
|
|
|
5
5
|
computeMetadataCoverage,
|
|
6
6
|
groupItemsByDimension,
|
|
7
7
|
lifecycleClassifierFromStatusRegistry
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-RX3HQSYG.js";
|
|
9
9
|
import {
|
|
10
10
|
enforceHistoryStreamPolicyForItems,
|
|
11
11
|
listAllFrontMatterLight,
|
|
12
12
|
listAllFrontMatterWithBody
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-3U3VEWK6.js";
|
|
14
|
+
import "./chunk-EZFKWSC7.js";
|
|
15
15
|
import {
|
|
16
16
|
nowIso
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-DRBV5UC2.js";
|
|
18
18
|
import {
|
|
19
|
-
EXIT_CODE,
|
|
20
19
|
PmCliError,
|
|
21
20
|
getActiveExtensionRegistrations,
|
|
21
|
+
readSettings,
|
|
22
|
+
runActiveOnReadHooks
|
|
23
|
+
} from "./chunk-P5YORJRH.js";
|
|
24
|
+
import "./chunk-7C2O74AE.js";
|
|
25
|
+
import {
|
|
26
|
+
EXIT_CODE,
|
|
22
27
|
getSettingsPath,
|
|
23
28
|
pathExists,
|
|
24
|
-
readSettings,
|
|
25
29
|
resolveItemTypeRegistry,
|
|
26
30
|
resolvePmRoot,
|
|
27
|
-
resolveRuntimeStatusRegistry
|
|
28
|
-
|
|
29
|
-
} from "./chunk-KHVGM5CS.js";
|
|
31
|
+
resolveRuntimeStatusRegistry
|
|
32
|
+
} from "./chunk-5VVUKE3U.js";
|
|
30
33
|
|
|
31
34
|
// dist/cli/commands/stats.js
|
|
32
35
|
import fs from "node:fs/promises";
|
|
@@ -244,4 +247,4 @@ export {
|
|
|
244
247
|
_testOnly,
|
|
245
248
|
runStats
|
|
246
249
|
};
|
|
247
|
-
//# sourceMappingURL=stats-
|
|
250
|
+
//# sourceMappingURL=stats-IJYTRQGV.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../../cli/commands/stats.ts", "../../../../../../../../core/history/history-storage-stats.ts"],
|
|
4
4
|
"sourcesContent": ["/**\n * @module cli/commands/stats\n *\n * Implements the pm stats command surface and its agent-facing runtime behavior.\n */\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { getActiveExtensionRegistrations, runActiveOnReadHooks } from \"../../core/extensions/index.js\";\nimport {\n computeContentFieldUtilization,\n type ContentFieldUtilizationReport,\n} from \"../../core/governance/content-fields.js\";\nimport {\n computeMetadataCoverage,\n groupItemsByDimension,\n lifecycleClassifierFromStatusRegistry,\n type GroupedBreakdown,\n type MetadataCoverageReport,\n} from \"../../core/governance/metadata-coverage.js\";\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { enforceHistoryStreamPolicyForItems } from \"../../core/history/history-stream-policy.js\";\nimport { computeHistoryStorageStats, type HistoryStorageStats } from \"../../core/history/history-storage-stats.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.js\";\nimport { resolveRuntimeStatusRegistry } from \"../../core/schema/runtime-schema.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { nowIso } from \"../../core/shared/time.js\";\nimport { listAllFrontMatterLight, listAllFrontMatterWithBody } from \"../../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport type { ItemStatus, ItemType } from \"../../types/index.js\";\n\n/**\n * Documents the stats command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface StatsCommandOptions {\n /** Include aggregate per-stream history storage metrics (sizes, depth, oldest/newest). */\n storage?: boolean;\n /** Include metadata coverage percentages (AC, estimates, resolution, tags, parent) overall and by type. */\n metadataCoverage?: boolean;\n /** Include a lifecycle-bucketed breakdown grouped by assignee. */\n byAssignee?: boolean;\n /** Include a lifecycle-bucketed breakdown grouped by tag (optionally filtered by --tag-prefix). */\n byTag?: boolean;\n /** Include a lifecycle-bucketed breakdown grouped by priority. */\n byPriority?: boolean;\n /** With --by-tag: only consider tags starting with this prefix (e.g. \"domain:\"). */\n tagPrefix?: string;\n /** Include a content-field utilization breakdown (notes/learnings/files/docs/tests/comments/deps/body usage rates). */\n fieldUtilization?: boolean;\n}\n\n/**\n * Documents the stats result payload exchanged by command, SDK, and package integrations.\n */\nexport interface StatsResult {\n totals: {\n items: number;\n history_streams: number;\n history_entries: number;\n };\n by_type: Record<ItemType, number>;\n by_status: Record<ItemStatus, number>;\n /** Present only with --metadata-coverage: per-field coverage overall and by type. */\n metadata_coverage?: MetadataCoverageReport;\n /** Present only with --by-assignee/--by-tag/--by-priority: lifecycle-bucketed group breakdowns. */\n breakdowns?: {\n assignee?: GroupedBreakdown;\n tag?: GroupedBreakdown;\n priority?: GroupedBreakdown;\n };\n /** Present only with --storage: aggregate history-stream metrics for compaction/planning. */\n storage?: HistoryStorageStats;\n /** Present only with --field-utilization: content-field utilization rates across all items. */\n field_utilization?: ContentFieldUtilizationReport;\n generated_at: string;\n}\n\nfunction zeroByType(itemTypes: string[]): Record<ItemType, number> {\n return itemTypes.reduce(\n (acc, value) => {\n acc[value] = 0;\n return acc;\n },\n {} as Record<ItemType, number>,\n );\n}\n\nfunction zeroByStatus(statuses: string[]): Record<ItemStatus, number> {\n return statuses.reduce(\n (acc, value) => {\n acc[value] = 0;\n return acc;\n },\n {} as Record<ItemStatus, number>,\n );\n}\n\nfunction countNonEmptyLines(raw: string): number {\n if (raw.trim().length === 0) {\n return 0;\n }\n return raw\n .split(/\\r?\\n/u)\n .filter((line) => line.trim().length > 0)\n .length;\n}\n\nfunction isNotFoundError(error: unknown): boolean {\n return typeof error === \"object\" && error !== null && \"code\" in error && (error as { code?: unknown }).code === \"ENOENT\";\n}\n\nasync function readHistoryStreamContents(pmRoot: string): Promise<Array<{ id: string; raw: string }>> {\n const historyDir = path.join(pmRoot, \"history\");\n if (!(await pathExists(historyDir))) {\n return [];\n }\n\n await runActiveOnReadHooks({\n path: historyDir,\n scope: \"project\",\n });\n const historyFiles = (await fs.readdir(historyDir))\n .filter((entry) => entry.endsWith(\".jsonl\"))\n .sort((a, b) => a.localeCompare(b));\n\n const streams: Array<{ id: string; raw: string }> = [];\n for (const file of historyFiles) {\n const historyPath = path.join(historyDir, file);\n let raw: string;\n try {\n raw = await fs.readFile(historyPath, \"utf8\");\n } catch (error) {\n if (isNotFoundError(error)) {\n continue;\n }\n throw error;\n }\n await runActiveOnReadHooks({\n path: historyPath,\n scope: \"project\",\n });\n streams.push({ id: file.slice(0, -\".jsonl\".length), raw });\n }\n\n return streams;\n}\n\nexport const _testOnly = {\n zeroByType,\n zeroByStatus,\n countNonEmptyLines,\n readHistoryStreamContents,\n};\n\n/**\n * Implements run stats for the public runtime surface of this module.\n */\nexport async function runStats(global: GlobalOptions, options: StatsCommandOptions = {}): Promise<StatsResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n\n const settings = await readSettings(pmRoot);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n // Field utilization needs the heavy collections (notes/learnings/files/docs/\n // tests/comments/deps) AND the body, which the light reader drops — so when it\n // is requested we read the WithBody rows and use them for every section.\n const items = options.fieldUtilization\n ? await listAllFrontMatterWithBody(pmRoot, settings.item_format, typeRegistry.type_to_folder, undefined, settings.schema)\n : await listAllFrontMatterLight(pmRoot, settings.item_format, typeRegistry.type_to_folder, undefined, settings.schema);\n await enforceHistoryStreamPolicyForItems({\n pmRoot,\n settings,\n itemIds: items.map((item) => item.id),\n commandLabel: \"stats\",\n });\n\n const byType = zeroByType(typeRegistry.types);\n const byStatus = zeroByStatus(statusRegistry.definitions.map((definition) => definition.id));\n // zeroByType/zeroByStatus pre-seed a bucket for every registry type/status, and\n // the light front-matter reader drops any item whose type/status falls outside\n // the active registry (parse rejects them) — so every item's bucket is already\n // present here and no on-the-fly initialization is reachable.\n for (const item of items) {\n byType[item.type] += 1;\n byStatus[item.status] += 1;\n }\n\n const streams = await readHistoryStreamContents(pmRoot);\n let historyEntries = 0;\n for (const stream of streams) {\n historyEntries += countNonEmptyLines(stream.raw);\n }\n const storage = options.storage ? computeHistoryStorageStats(streams) : undefined;\n\n const classifier = lifecycleClassifierFromStatusRegistry(statusRegistry);\n const metadataCoverage = options.metadataCoverage ? computeMetadataCoverage(items, classifier) : undefined;\n const breakdowns: NonNullable<StatsResult[\"breakdowns\"]> = {};\n if (options.byAssignee) {\n breakdowns.assignee = groupItemsByDimension(items, \"assignee\", classifier);\n }\n if (options.byTag) {\n breakdowns.tag = groupItemsByDimension(items, \"tag\", classifier, { tagPrefix: options.tagPrefix });\n }\n if (options.byPriority) {\n breakdowns.priority = groupItemsByDimension(items, \"priority\", classifier);\n }\n const hasBreakdowns = Object.keys(breakdowns).length > 0;\n const fieldUtilization = options.fieldUtilization ? computeContentFieldUtilization(items) : undefined;\n\n return {\n totals: {\n items: items.length,\n history_streams: streams.length,\n history_entries: historyEntries,\n },\n by_type: byType,\n by_status: byStatus,\n ...(metadataCoverage ? { metadata_coverage: metadataCoverage } : {}),\n ...(hasBreakdowns ? { breakdowns } : {}),\n ...(storage ? { storage } : {}),\n ...(fieldUtilization ? { field_utilization: fieldUtilization } : {}),\n generated_at: nowIso(),\n };\n}\n", "/**\n * Pure aggregate metrics for history streams (JSONL files).\n * No filesystem access — callers read raw stream contents and pass them in.\n * This module has no Node imports; Buffer is available as a global.\n */\n\n/** Per-history-stream size and timestamp summary used by storage diagnostics. */\nexport interface HistoryStreamStat {\n id: string;\n bytes: number;\n lines: number; // non-empty JSONL entry count\n oldest_ts: string | null; // min parseable ts in this stream, else null\n newest_ts: string | null; // max parseable ts in this stream, else null\n}\n\n/**\n * Documents the history storage entry ref payload exchanged by command, SDK, and package integrations.\n */\nexport interface HistoryStorageEntryRef {\n id: string;\n ts: string;\n}\n\n/**\n * Documents the history storage stats payload exchanged by command, SDK, and package integrations.\n */\nexport interface HistoryStorageStats {\n total_streams: number;\n total_lines: number;\n total_bytes: number;\n largest_by_bytes: HistoryStreamStat[]; // top-N desc by bytes, tie-break id asc\n deepest_by_lines: HistoryStreamStat[]; // top-N desc by lines, tie-break id asc\n oldest_entry: HistoryStorageEntryRef | null; // global min ts across all streams\n newest_entry: HistoryStorageEntryRef | null; // global max ts across all streams\n}\n\nfunction parseStreamStat(id: string, raw: string): HistoryStreamStat {\n const bytes = Buffer.byteLength(raw, \"utf8\");\n\n let lines = 0;\n let oldestTs: string | null = null;\n let newestTs: string | null = null;\n let oldestMs = Number.POSITIVE_INFINITY;\n let newestMs = Number.NEGATIVE_INFINITY;\n\n for (const rawLine of raw.split(/\\r?\\n/)) {\n const trimmed = rawLine.trim();\n if (trimmed === \"\") {\n continue;\n }\n lines += 1;\n\n let parsed: unknown;\n try {\n parsed = JSON.parse(trimmed);\n } catch {\n continue;\n }\n\n if (\n parsed === null ||\n typeof parsed !== \"object\" ||\n !(\"ts\" in (parsed as object)) ||\n typeof (parsed as Record<string, unknown>)[\"ts\"] !== \"string\"\n ) {\n continue;\n }\n\n const ts = (parsed as Record<string, unknown>)[\"ts\"] as string;\n const ms = Date.parse(ts);\n if (Number.isNaN(ms)) {\n continue;\n }\n\n if (ms < oldestMs || (ms === oldestMs && oldestTs !== null && ts < oldestTs)) {\n oldestMs = ms;\n oldestTs = ts;\n }\n if (ms > newestMs || (ms === newestMs && newestTs !== null && ts > newestTs)) {\n newestMs = ms;\n newestTs = ts;\n }\n }\n\n return { id, bytes, lines, oldest_ts: oldestTs, newest_ts: newestTs };\n}\n\n/**\n * Implements compute history storage stats for the public runtime surface of this module.\n */\nexport function computeHistoryStorageStats(\n streams: Array<{ id: string; raw: string }>,\n options?: { topN?: number },\n): HistoryStorageStats {\n const rawTopN = options?.topN ?? 5;\n const topN = Math.max(0, Math.floor(rawTopN));\n\n const stats: HistoryStreamStat[] = streams.map(({ id, raw }) => parseStreamStat(id, raw));\n\n let totalLines = 0;\n let totalBytes = 0;\n let oldestEntry: HistoryStorageEntryRef | null = null;\n let newestEntry: HistoryStorageEntryRef | null = null;\n let globalOldestMs = Number.POSITIVE_INFINITY;\n let globalNewestMs = Number.NEGATIVE_INFINITY;\n\n for (const stat of stats) {\n totalLines += stat.lines;\n totalBytes += stat.bytes;\n\n if (stat.oldest_ts !== null) {\n const ms = Date.parse(stat.oldest_ts);\n if (\n ms < globalOldestMs ||\n (ms === globalOldestMs && oldestEntry !== null && stat.id < oldestEntry.id)\n ) {\n globalOldestMs = ms;\n oldestEntry = { id: stat.id, ts: stat.oldest_ts };\n }\n }\n\n if (stat.newest_ts !== null) {\n const ms = Date.parse(stat.newest_ts);\n if (\n ms > globalNewestMs ||\n (ms === globalNewestMs && newestEntry !== null && stat.id < newestEntry.id)\n ) {\n globalNewestMs = ms;\n newestEntry = { id: stat.id, ts: stat.newest_ts };\n }\n }\n }\n\n const largestByBytes =\n topN === 0\n ? []\n : [...stats]\n .sort((a, b) => b.bytes - a.bytes || a.id.localeCompare(b.id))\n .slice(0, topN);\n\n const deepestByLines =\n topN === 0\n ? []\n : [...stats]\n .sort((a, b) => b.lines - a.lines || a.id.localeCompare(b.id))\n .slice(0, topN);\n\n return {\n total_streams: streams.length,\n total_lines: totalLines,\n total_bytes: totalBytes,\n largest_by_bytes: largestByBytes,\n deepest_by_lines: deepestByLines,\n oldest_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AO,OAAO,YAAY,EAAE,WAAW,QAAQ,UAAS,CAAE;EACnG;AACA,MAAI,QAAQ,YAAY;AACtB,eAAW,WAAW,sBAAsB,OAAO,YAAY,UAAU;EAC3E;AACA,QAAM,gBAAgB,OAAO,KAAK,UAAU,EAAE,SAAS;AACvD,QAAM,mBAAmB,QAAQ,mBAAmB,+BAA+B,KAAK,IAAI;AAE5F,SAAO;IACL,QAAQ;MACN,OAAO,MAAM;MACb,iBAAiB,QAAQ;MACzB,iBAAiB;;IAEnB,SAAS;IACT,WAAW;IACX,GAAI,mBAAmB,EAAE,mBAAmB,iBAAgB,IAAK,CAAA;IACjE,GAAI,gBAAgB,EAAE,WAAU,IAAK,CAAA;IACrC,GAAI,UAAU,EAAE,QAAO,IAAK,CAAA;IAC5B,GAAI,mBAAmB,EAAE,mBAAmB,iBAAgB,IAAK,CAAA;IACjE,cAAc,OAAM;;AAExB;",
|
|
6
6
|
"names": ["global"]
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="fb69c821-7bb6-5b15-8cd2-319f496f077e")}catch(e){}}();
|
|
3
3
|
import {
|
|
4
4
|
computeContentFieldUtilization
|
|
5
5
|
} from "./chunk-QB7XMHJW.js";
|
|
@@ -7,28 +7,31 @@ import {
|
|
|
7
7
|
computeMetadataCoverage,
|
|
8
8
|
groupItemsByDimension,
|
|
9
9
|
lifecycleClassifierFromStatusRegistry
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-5JE6SMYS.js";
|
|
11
11
|
import {
|
|
12
12
|
enforceHistoryStreamPolicyForItems,
|
|
13
13
|
listAllFrontMatterLight,
|
|
14
14
|
listAllFrontMatterWithBody
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-57C2RLW5.js";
|
|
16
|
+
import "./chunk-HK72NWAD.js";
|
|
17
17
|
import {
|
|
18
18
|
nowIso
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-FJRKQREY.js";
|
|
20
20
|
import {
|
|
21
|
-
EXIT_CODE,
|
|
22
21
|
PmCliError,
|
|
23
22
|
getActiveExtensionRegistrations,
|
|
23
|
+
readSettings,
|
|
24
|
+
runActiveOnReadHooks
|
|
25
|
+
} from "./chunk-US3T3W5J.js";
|
|
26
|
+
import "./chunk-NNHHXJB2.js";
|
|
27
|
+
import {
|
|
28
|
+
EXIT_CODE,
|
|
24
29
|
getSettingsPath,
|
|
25
30
|
pathExists,
|
|
26
|
-
readSettings,
|
|
27
31
|
resolveItemTypeRegistry,
|
|
28
32
|
resolvePmRoot,
|
|
29
|
-
resolveRuntimeStatusRegistry
|
|
30
|
-
|
|
31
|
-
} from "./chunk-L4SLHV6G.js";
|
|
33
|
+
resolveRuntimeStatusRegistry
|
|
34
|
+
} from "./chunk-YD5FML7K.js";
|
|
32
35
|
|
|
33
36
|
// dist/cli/commands/stats.js
|
|
34
37
|
import fs from "node:fs/promises";
|
|
@@ -232,6 +235,6 @@ export {
|
|
|
232
235
|
_testOnly,
|
|
233
236
|
runStats
|
|
234
237
|
};
|
|
235
|
-
//# sourceMappingURL=stats-
|
|
238
|
+
//# sourceMappingURL=stats-L2D5Y2O5.js.map
|
|
236
239
|
|
|
237
|
-
//# debugId=
|
|
240
|
+
//# debugId=fb69c821-7bb6-5b15-8cd2-319f496f077e
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../cli/commands/stats.ts","../../../../../../../../core/history/history-storage-stats.ts"],"sourcesContent":["/**\n * @module cli/commands/stats\n *\n * Implements the pm stats command surface and its agent-facing runtime behavior.\n */\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { getActiveExtensionRegistrations, runActiveOnReadHooks } from \"../../core/extensions/index.js\";\nimport {\n computeContentFieldUtilization,\n type ContentFieldUtilizationReport,\n} from \"../../core/governance/content-fields.js\";\nimport {\n computeMetadataCoverage,\n groupItemsByDimension,\n lifecycleClassifierFromStatusRegistry,\n type GroupedBreakdown,\n type MetadataCoverageReport,\n} from \"../../core/governance/metadata-coverage.js\";\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { enforceHistoryStreamPolicyForItems } from \"../../core/history/history-stream-policy.js\";\nimport { computeHistoryStorageStats, type HistoryStorageStats } from \"../../core/history/history-storage-stats.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.js\";\nimport { resolveRuntimeStatusRegistry } from \"../../core/schema/runtime-schema.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { nowIso } from \"../../core/shared/time.js\";\nimport { listAllFrontMatterLight, listAllFrontMatterWithBody } from \"../../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport type { ItemStatus, ItemType } from \"../../types/index.js\";\n\n/**\n * Documents the stats command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface StatsCommandOptions {\n /** Include aggregate per-stream history storage metrics (sizes, depth, oldest/newest). */\n storage?: boolean;\n /** Include metadata coverage percentages (AC, estimates, resolution, tags, parent) overall and by type. */\n metadataCoverage?: boolean;\n /** Include a lifecycle-bucketed breakdown grouped by assignee. */\n byAssignee?: boolean;\n /** Include a lifecycle-bucketed breakdown grouped by tag (optionally filtered by --tag-prefix). */\n byTag?: boolean;\n /** Include a lifecycle-bucketed breakdown grouped by priority. */\n byPriority?: boolean;\n /** With --by-tag: only consider tags starting with this prefix (e.g. \"domain:\"). */\n tagPrefix?: string;\n /** Include a content-field utilization breakdown (notes/learnings/files/docs/tests/comments/deps/body usage rates). */\n fieldUtilization?: boolean;\n}\n\n/**\n * Documents the stats result payload exchanged by command, SDK, and package integrations.\n */\nexport interface StatsResult {\n totals: {\n items: number;\n history_streams: number;\n history_entries: number;\n };\n by_type: Record<ItemType, number>;\n by_status: Record<ItemStatus, number>;\n /** Present only with --metadata-coverage: per-field coverage overall and by type. */\n metadata_coverage?: MetadataCoverageReport;\n /** Present only with --by-assignee/--by-tag/--by-priority: lifecycle-bucketed group breakdowns. */\n breakdowns?: {\n assignee?: GroupedBreakdown;\n tag?: GroupedBreakdown;\n priority?: GroupedBreakdown;\n };\n /** Present only with --storage: aggregate history-stream metrics for compaction/planning. */\n storage?: HistoryStorageStats;\n /** Present only with --field-utilization: content-field utilization rates across all items. */\n field_utilization?: ContentFieldUtilizationReport;\n generated_at: string;\n}\n\nfunction zeroByType(itemTypes: string[]): Record<ItemType, number> {\n return itemTypes.reduce(\n (acc, value) => {\n acc[value] = 0;\n return acc;\n },\n {} as Record<ItemType, number>,\n );\n}\n\nfunction zeroByStatus(statuses: string[]): Record<ItemStatus, number> {\n return statuses.reduce(\n (acc, value) => {\n acc[value] = 0;\n return acc;\n },\n {} as Record<ItemStatus, number>,\n );\n}\n\nfunction countNonEmptyLines(raw: string): number {\n if (raw.trim().length === 0) {\n return 0;\n }\n return raw\n .split(/\\r?\\n/u)\n .filter((line) => line.trim().length > 0)\n .length;\n}\n\nfunction isNotFoundError(error: unknown): boolean {\n return typeof error === \"object\" && error !== null && \"code\" in error && (error as { code?: unknown }).code === \"ENOENT\";\n}\n\nasync function readHistoryStreamContents(pmRoot: string): Promise<Array<{ id: string; raw: string }>> {\n const historyDir = path.join(pmRoot, \"history\");\n if (!(await pathExists(historyDir))) {\n return [];\n }\n\n await runActiveOnReadHooks({\n path: historyDir,\n scope: \"project\",\n });\n const historyFiles = (await fs.readdir(historyDir))\n .filter((entry) => entry.endsWith(\".jsonl\"))\n .sort((a, b) => a.localeCompare(b));\n\n const streams: Array<{ id: string; raw: string }> = [];\n for (const file of historyFiles) {\n const historyPath = path.join(historyDir, file);\n let raw: string;\n try {\n raw = await fs.readFile(historyPath, \"utf8\");\n } catch (error) {\n if (isNotFoundError(error)) {\n continue;\n }\n throw error;\n }\n await runActiveOnReadHooks({\n path: historyPath,\n scope: \"project\",\n });\n streams.push({ id: file.slice(0, -\".jsonl\".length), raw });\n }\n\n return streams;\n}\n\nexport const _testOnly = {\n zeroByType,\n zeroByStatus,\n countNonEmptyLines,\n readHistoryStreamContents,\n};\n\n/**\n * Implements run stats for the public runtime surface of this module.\n */\nexport async function runStats(global: GlobalOptions, options: StatsCommandOptions = {}): Promise<StatsResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n\n const settings = await readSettings(pmRoot);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n // Field utilization needs the heavy collections (notes/learnings/files/docs/\n // tests/comments/deps) AND the body, which the light reader drops — so when it\n // is requested we read the WithBody rows and use them for every section.\n const items = options.fieldUtilization\n ? await listAllFrontMatterWithBody(pmRoot, settings.item_format, typeRegistry.type_to_folder, undefined, settings.schema)\n : await listAllFrontMatterLight(pmRoot, settings.item_format, typeRegistry.type_to_folder, undefined, settings.schema);\n await enforceHistoryStreamPolicyForItems({\n pmRoot,\n settings,\n itemIds: items.map((item) => item.id),\n commandLabel: \"stats\",\n });\n\n const byType = zeroByType(typeRegistry.types);\n const byStatus = zeroByStatus(statusRegistry.definitions.map((definition) => definition.id));\n // zeroByType/zeroByStatus pre-seed a bucket for every registry type/status, and\n // the light front-matter reader drops any item whose type/status falls outside\n // the active registry (parse rejects them) — so every item's bucket is already\n // present here and no on-the-fly initialization is reachable.\n for (const item of items) {\n byType[item.type] += 1;\n byStatus[item.status] += 1;\n }\n\n const streams = await readHistoryStreamContents(pmRoot);\n let historyEntries = 0;\n for (const stream of streams) {\n historyEntries += countNonEmptyLines(stream.raw);\n }\n const storage = options.storage ? computeHistoryStorageStats(streams) : undefined;\n\n const classifier = lifecycleClassifierFromStatusRegistry(statusRegistry);\n const metadataCoverage = options.metadataCoverage ? computeMetadataCoverage(items, classifier) : undefined;\n const breakdowns: NonNullable<StatsResult[\"breakdowns\"]> = {};\n if (options.byAssignee) {\n breakdowns.assignee = groupItemsByDimension(items, \"assignee\", classifier);\n }\n if (options.byTag) {\n breakdowns.tag = groupItemsByDimension(items, \"tag\", classifier, { tagPrefix: options.tagPrefix });\n }\n if (options.byPriority) {\n breakdowns.priority = groupItemsByDimension(items, \"priority\", classifier);\n }\n const hasBreakdowns = Object.keys(breakdowns).length > 0;\n const fieldUtilization = options.fieldUtilization ? computeContentFieldUtilization(items) : undefined;\n\n return {\n totals: {\n items: items.length,\n history_streams: streams.length,\n history_entries: historyEntries,\n },\n by_type: byType,\n by_status: byStatus,\n ...(metadataCoverage ? { metadata_coverage: metadataCoverage } : {}),\n ...(hasBreakdowns ? { breakdowns } : {}),\n ...(storage ? { storage } : {}),\n ...(fieldUtilization ? { field_utilization: fieldUtilization } : {}),\n generated_at: nowIso(),\n };\n}\n","/**\n * Pure aggregate metrics for history streams (JSONL files).\n * No filesystem access — callers read raw stream contents and pass them in.\n * This module has no Node imports; Buffer is available as a global.\n */\n\n/** Per-history-stream size and timestamp summary used by storage diagnostics. */\nexport interface HistoryStreamStat {\n id: string;\n bytes: number;\n lines: number; // non-empty JSONL entry count\n oldest_ts: string | null; // min parseable ts in this stream, else null\n newest_ts: string | null; // max parseable ts in this stream, else null\n}\n\n/**\n * Documents the history storage entry ref payload exchanged by command, SDK, and package integrations.\n */\nexport interface HistoryStorageEntryRef {\n id: string;\n ts: string;\n}\n\n/**\n * Documents the history storage stats payload exchanged by command, SDK, and package integrations.\n */\nexport interface HistoryStorageStats {\n total_streams: number;\n total_lines: number;\n total_bytes: number;\n largest_by_bytes: HistoryStreamStat[]; // top-N desc by bytes, tie-break id asc\n deepest_by_lines: HistoryStreamStat[]; // top-N desc by lines, tie-break id asc\n oldest_entry: HistoryStorageEntryRef | null; // global min ts across all streams\n newest_entry: HistoryStorageEntryRef | null; // global max ts across all streams\n}\n\nfunction parseStreamStat(id: string, raw: string): HistoryStreamStat {\n const bytes = Buffer.byteLength(raw, \"utf8\");\n\n let lines = 0;\n let oldestTs: string | null = null;\n let newestTs: string | null = null;\n let oldestMs = Number.POSITIVE_INFINITY;\n let newestMs = Number.NEGATIVE_INFINITY;\n\n for (const rawLine of raw.split(/\\r?\\n/)) {\n const trimmed = rawLine.trim();\n if (trimmed === \"\") {\n continue;\n }\n lines += 1;\n\n let parsed: unknown;\n try {\n parsed = JSON.parse(trimmed);\n } catch {\n continue;\n }\n\n if (\n parsed === null ||\n typeof parsed !== \"object\" ||\n !(\"ts\" in (parsed as object)) ||\n typeof (parsed as Record<string, unknown>)[\"ts\"] !== \"string\"\n ) {\n continue;\n }\n\n const ts = (parsed as Record<string, unknown>)[\"ts\"] as string;\n const ms = Date.parse(ts);\n if (Number.isNaN(ms)) {\n continue;\n }\n\n if (ms < oldestMs || (ms === oldestMs && oldestTs !== null && ts < oldestTs)) {\n oldestMs = ms;\n oldestTs = ts;\n }\n if (ms > newestMs || (ms === newestMs && newestTs !== null && ts > newestTs)) {\n newestMs = ms;\n newestTs = ts;\n }\n }\n\n return { id, bytes, lines, oldest_ts: oldestTs, newest_ts: newestTs };\n}\n\n/**\n * Implements compute history storage stats for the public runtime surface of this module.\n */\nexport function computeHistoryStorageStats(\n streams: Array<{ id: string; raw: string }>,\n options?: { topN?: number },\n): HistoryStorageStats {\n const rawTopN = options?.topN ?? 5;\n const topN = Math.max(0, Math.floor(rawTopN));\n\n const stats: HistoryStreamStat[] = streams.map(({ id, raw }) => parseStreamStat(id, raw));\n\n let totalLines = 0;\n let totalBytes = 0;\n let oldestEntry: HistoryStorageEntryRef | null = null;\n let newestEntry: HistoryStorageEntryRef | null = null;\n let globalOldestMs = Number.POSITIVE_INFINITY;\n let globalNewestMs = Number.NEGATIVE_INFINITY;\n\n for (const stat of stats) {\n totalLines += stat.lines;\n totalBytes += stat.bytes;\n\n if (stat.oldest_ts !== null) {\n const ms = Date.parse(stat.oldest_ts);\n if (\n ms < globalOldestMs ||\n (ms === globalOldestMs && oldestEntry !== null && stat.id < oldestEntry.id)\n ) {\n globalOldestMs = ms;\n oldestEntry = { id: stat.id, ts: stat.oldest_ts };\n }\n }\n\n if (stat.newest_ts !== null) {\n const ms = Date.parse(stat.newest_ts);\n if (\n ms > globalNewestMs ||\n (ms === globalNewestMs && newestEntry !== null && stat.id < newestEntry.id)\n ) {\n globalNewestMs = ms;\n newestEntry = { id: stat.id, ts: stat.newest_ts };\n }\n }\n }\n\n const largestByBytes =\n topN === 0\n ? []\n : [...stats]\n .sort((a, b) => b.bytes - a.bytes || a.id.localeCompare(b.id))\n .slice(0, topN);\n\n const deepestByLines =\n topN === 0\n ? []\n : [...stats]\n .sort((a, b) => b.lines - a.lines || a.id.localeCompare(b.id))\n .slice(0, topN);\n\n return {\n total_streams: streams.length,\n total_lines: totalLines,\n total_bytes: totalBytes,\n largest_by_bytes: largestByBytes,\n deepest_by_lines: deepestByLines,\n oldest_entry: oldestEntry,\n newest_entry: newestEntry,\n };\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,OAAO,QAAQ;AACf,OAAO,UAAU;;;AC8BjB,SAAS,gBAAgB,IAAY,KAAW;AAC9C,QAAM,QAAQ,OAAO,WAAW,KAAK,MAAM;AAE3C,MAAI,QAAQ;AACZ,MAAI,WAA0B;AAC9B,MAAI,WAA0B;AAC9B,MAAI,W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AW;IACX,GAAI,mBAAmB,EAAE,mBAAmB,iBAAgB,IAAK,CAAA;IACjE,GAAI,gBAAgB,EAAE,WAAU,IAAK,CAAA;IACrC,GAAI,UAAU,EAAE,QAAO,IAAK,CAAA;IAC5B,GAAI,mBAAmB,EAAE,mBAAmB,iBAAgB,IAAK,CAAA;IACjE,cAAc,OAAM;;AAExB","debugId":"67063306-59b8-53f5-8715-fd2e7f8705dd"}
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../cli/commands/stats.ts","../../../../../../../../core/history/history-storage-stats.ts"],"sourcesContent":["/**\n * @module cli/commands/stats\n *\n * Implements the pm stats command surface and its agent-facing runtime behavior.\n */\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { getActiveExtensionRegistrations, runActiveOnReadHooks } from \"../../core/extensions/index.js\";\nimport {\n computeContentFieldUtilization,\n type ContentFieldUtilizationReport,\n} from \"../../core/governance/content-fields.js\";\nimport {\n computeMetadataCoverage,\n groupItemsByDimension,\n lifecycleClassifierFromStatusRegistry,\n type GroupedBreakdown,\n type MetadataCoverageReport,\n} from \"../../core/governance/metadata-coverage.js\";\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { enforceHistoryStreamPolicyForItems } from \"../../core/history/history-stream-policy.js\";\nimport { computeHistoryStorageStats, type HistoryStorageStats } from \"../../core/history/history-storage-stats.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.js\";\nimport { resolveRuntimeStatusRegistry } from \"../../core/schema/runtime-schema.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { nowIso } from \"../../core/shared/time.js\";\nimport { listAllFrontMatterLight, listAllFrontMatterWithBody } from \"../../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport type { ItemStatus, ItemType } from \"../../types/index.js\";\n\n/**\n * Documents the stats command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface StatsCommandOptions {\n /** Include aggregate per-stream history storage metrics (sizes, depth, oldest/newest). */\n storage?: boolean;\n /** Include metadata coverage percentages (AC, estimates, resolution, tags, parent) overall and by type. */\n metadataCoverage?: boolean;\n /** Include a lifecycle-bucketed breakdown grouped by assignee. */\n byAssignee?: boolean;\n /** Include a lifecycle-bucketed breakdown grouped by tag (optionally filtered by --tag-prefix). */\n byTag?: boolean;\n /** Include a lifecycle-bucketed breakdown grouped by priority. */\n byPriority?: boolean;\n /** With --by-tag: only consider tags starting with this prefix (e.g. \"domain:\"). */\n tagPrefix?: string;\n /** Include a content-field utilization breakdown (notes/learnings/files/docs/tests/comments/deps/body usage rates). */\n fieldUtilization?: boolean;\n}\n\n/**\n * Documents the stats result payload exchanged by command, SDK, and package integrations.\n */\nexport interface StatsResult {\n totals: {\n items: number;\n history_streams: number;\n history_entries: number;\n };\n by_type: Record<ItemType, number>;\n by_status: Record<ItemStatus, number>;\n /** Present only with --metadata-coverage: per-field coverage overall and by type. */\n metadata_coverage?: MetadataCoverageReport;\n /** Present only with --by-assignee/--by-tag/--by-priority: lifecycle-bucketed group breakdowns. */\n breakdowns?: {\n assignee?: GroupedBreakdown;\n tag?: GroupedBreakdown;\n priority?: GroupedBreakdown;\n };\n /** Present only with --storage: aggregate history-stream metrics for compaction/planning. */\n storage?: HistoryStorageStats;\n /** Present only with --field-utilization: content-field utilization rates across all items. */\n field_utilization?: ContentFieldUtilizationReport;\n generated_at: string;\n}\n\nfunction zeroByType(itemTypes: string[]): Record<ItemType, number> {\n return itemTypes.reduce(\n (acc, value) => {\n acc[value] = 0;\n return acc;\n },\n {} as Record<ItemType, number>,\n );\n}\n\nfunction zeroByStatus(statuses: string[]): Record<ItemStatus, number> {\n return statuses.reduce(\n (acc, value) => {\n acc[value] = 0;\n return acc;\n },\n {} as Record<ItemStatus, number>,\n );\n}\n\nfunction countNonEmptyLines(raw: string): number {\n if (raw.trim().length === 0) {\n return 0;\n }\n return raw\n .split(/\\r?\\n/u)\n .filter((line) => line.trim().length > 0)\n .length;\n}\n\nfunction isNotFoundError(error: unknown): boolean {\n return typeof error === \"object\" && error !== null && \"code\" in error && (error as { code?: unknown }).code === \"ENOENT\";\n}\n\nasync function readHistoryStreamContents(pmRoot: string): Promise<Array<{ id: string; raw: string }>> {\n const historyDir = path.join(pmRoot, \"history\");\n if (!(await pathExists(historyDir))) {\n return [];\n }\n\n await runActiveOnReadHooks({\n path: historyDir,\n scope: \"project\",\n });\n const historyFiles = (await fs.readdir(historyDir))\n .filter((entry) => entry.endsWith(\".jsonl\"))\n .sort((a, b) => a.localeCompare(b));\n\n const streams: Array<{ id: string; raw: string }> = [];\n for (const file of historyFiles) {\n const historyPath = path.join(historyDir, file);\n let raw: string;\n try {\n raw = await fs.readFile(historyPath, \"utf8\");\n } catch (error) {\n if (isNotFoundError(error)) {\n continue;\n }\n throw error;\n }\n await runActiveOnReadHooks({\n path: historyPath,\n scope: \"project\",\n });\n streams.push({ id: file.slice(0, -\".jsonl\".length), raw });\n }\n\n return streams;\n}\n\nexport const _testOnly = {\n zeroByType,\n zeroByStatus,\n countNonEmptyLines,\n readHistoryStreamContents,\n};\n\n/**\n * Implements run stats for the public runtime surface of this module.\n */\nexport async function runStats(global: GlobalOptions, options: StatsCommandOptions = {}): Promise<StatsResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n\n const settings = await readSettings(pmRoot);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n // Field utilization needs the heavy collections (notes/learnings/files/docs/\n // tests/comments/deps) AND the body, which the light reader drops — so when it\n // is requested we read the WithBody rows and use them for every section.\n const items = options.fieldUtilization\n ? await listAllFrontMatterWithBody(pmRoot, settings.item_format, typeRegistry.type_to_folder, undefined, settings.schema)\n : await listAllFrontMatterLight(pmRoot, settings.item_format, typeRegistry.type_to_folder, undefined, settings.schema);\n await enforceHistoryStreamPolicyForItems({\n pmRoot,\n settings,\n itemIds: items.map((item) => item.id),\n commandLabel: \"stats\",\n });\n\n const byType = zeroByType(typeRegistry.types);\n const byStatus = zeroByStatus(statusRegistry.definitions.map((definition) => definition.id));\n // zeroByType/zeroByStatus pre-seed a bucket for every registry type/status, and\n // the light front-matter reader drops any item whose type/status falls outside\n // the active registry (parse rejects them) — so every item's bucket is already\n // present here and no on-the-fly initialization is reachable.\n for (const item of items) {\n byType[item.type] += 1;\n byStatus[item.status] += 1;\n }\n\n const streams = await readHistoryStreamContents(pmRoot);\n let historyEntries = 0;\n for (const stream of streams) {\n historyEntries += countNonEmptyLines(stream.raw);\n }\n const storage = options.storage ? computeHistoryStorageStats(streams) : undefined;\n\n const classifier = lifecycleClassifierFromStatusRegistry(statusRegistry);\n const metadataCoverage = options.metadataCoverage ? computeMetadataCoverage(items, classifier) : undefined;\n const breakdowns: NonNullable<StatsResult[\"breakdowns\"]> = {};\n if (options.byAssignee) {\n breakdowns.assignee = groupItemsByDimension(items, \"assignee\", classifier);\n }\n if (options.byTag) {\n breakdowns.tag = groupItemsByDimension(items, \"tag\", classifier, { tagPrefix: options.tagPrefix });\n }\n if (options.byPriority) {\n breakdowns.priority = groupItemsByDimension(items, \"priority\", classifier);\n }\n const hasBreakdowns = Object.keys(breakdowns).length > 0;\n const fieldUtilization = options.fieldUtilization ? computeContentFieldUtilization(items) : undefined;\n\n return {\n totals: {\n items: items.length,\n history_streams: streams.length,\n history_entries: historyEntries,\n },\n by_type: byType,\n by_status: byStatus,\n ...(metadataCoverage ? { metadata_coverage: metadataCoverage } : {}),\n ...(hasBreakdowns ? { breakdowns } : {}),\n ...(storage ? { storage } : {}),\n ...(fieldUtilization ? { field_utilization: fieldUtilization } : {}),\n generated_at: nowIso(),\n };\n}\n","/**\n * Pure aggregate metrics for history streams (JSONL files).\n * No filesystem access — callers read raw stream contents and pass them in.\n * This module has no Node imports; Buffer is available as a global.\n */\n\n/** Per-history-stream size and timestamp summary used by storage diagnostics. */\nexport interface HistoryStreamStat {\n id: string;\n bytes: number;\n lines: number; // non-empty JSONL entry count\n oldest_ts: string | null; // min parseable ts in this stream, else null\n newest_ts: string | null; // max parseable ts in this stream, else null\n}\n\n/**\n * Documents the history storage entry ref payload exchanged by command, SDK, and package integrations.\n */\nexport interface HistoryStorageEntryRef {\n id: string;\n ts: string;\n}\n\n/**\n * Documents the history storage stats payload exchanged by command, SDK, and package integrations.\n */\nexport interface HistoryStorageStats {\n total_streams: number;\n total_lines: number;\n total_bytes: number;\n largest_by_bytes: HistoryStreamStat[]; // top-N desc by bytes, tie-break id asc\n deepest_by_lines: HistoryStreamStat[]; // top-N desc by lines, tie-break id asc\n oldest_entry: HistoryStorageEntryRef | null; // global min ts across all streams\n newest_entry: HistoryStorageEntryRef | null; // global max ts across all streams\n}\n\nfunction parseStreamStat(id: string, raw: string): HistoryStreamStat {\n const bytes = Buffer.byteLength(raw, \"utf8\");\n\n let lines = 0;\n let oldestTs: string | null = null;\n let newestTs: string | null = null;\n let oldestMs = Number.POSITIVE_INFINITY;\n let newestMs = Number.NEGATIVE_INFINITY;\n\n for (const rawLine of raw.split(/\\r?\\n/)) {\n const trimmed = rawLine.trim();\n if (trimmed === \"\") {\n continue;\n }\n lines += 1;\n\n let parsed: unknown;\n try {\n parsed = JSON.parse(trimmed);\n } catch {\n continue;\n }\n\n if (\n parsed === null ||\n typeof parsed !== \"object\" ||\n !(\"ts\" in (parsed as object)) ||\n typeof (parsed as Record<string, unknown>)[\"ts\"] !== \"string\"\n ) {\n continue;\n }\n\n const ts = (parsed as Record<string, unknown>)[\"ts\"] as string;\n const ms = Date.parse(ts);\n if (Number.isNaN(ms)) {\n continue;\n }\n\n if (ms < oldestMs || (ms === oldestMs && oldestTs !== null && ts < oldestTs)) {\n oldestMs = ms;\n oldestTs = ts;\n }\n if (ms > newestMs || (ms === newestMs && newestTs !== null && ts > newestTs)) {\n newestMs = ms;\n newestTs = ts;\n }\n }\n\n return { id, bytes, lines, oldest_ts: oldestTs, newest_ts: newestTs };\n}\n\n/**\n * Implements compute history storage stats for the public runtime surface of this module.\n */\nexport function computeHistoryStorageStats(\n streams: Array<{ id: string; raw: string }>,\n options?: { topN?: number },\n): HistoryStorageStats {\n const rawTopN = options?.topN ?? 5;\n const topN = Math.max(0, Math.floor(rawTopN));\n\n const stats: HistoryStreamStat[] = streams.map(({ id, raw }) => parseStreamStat(id, raw));\n\n let totalLines = 0;\n let totalBytes = 0;\n let oldestEntry: HistoryStorageEntryRef | null = null;\n let newestEntry: HistoryStorageEntryRef | null = null;\n let globalOldestMs = Number.POSITIVE_INFINITY;\n let globalNewestMs = Number.NEGATIVE_INFINITY;\n\n for (const stat of stats) {\n totalLines += stat.lines;\n totalBytes += stat.bytes;\n\n if (stat.oldest_ts !== null) {\n const ms = Date.parse(stat.oldest_ts);\n if (\n ms < globalOldestMs ||\n (ms === globalOldestMs && oldestEntry !== null && stat.id < oldestEntry.id)\n ) {\n globalOldestMs = ms;\n oldestEntry = { id: stat.id, ts: stat.oldest_ts };\n }\n }\n\n if (stat.newest_ts !== null) {\n const ms = Date.parse(stat.newest_ts);\n if (\n ms > globalNewestMs ||\n (ms === globalNewestMs && newestEntry !== null && stat.id < newestEntry.id)\n ) {\n globalNewestMs = ms;\n newestEntry = { id: stat.id, ts: stat.newest_ts };\n }\n }\n }\n\n const largestByBytes =\n topN === 0\n ? []\n : [...stats]\n .sort((a, b) => b.bytes - a.bytes || a.id.localeCompare(b.id))\n .slice(0, topN);\n\n const deepestByLines =\n topN === 0\n ? []\n : [...stats]\n .sort((a, b) => b.lines - a.lines || a.id.localeCompare(b.id))\n .slice(0, topN);\n\n return {\n total_streams: streams.length,\n total_lines: totalLines,\n total_bytes: totalBytes,\n largest_by_bytes: largestByBytes,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EAAE,WAAW,QAAQ,UAAS,CAAE;EACnG;AACA,MAAI,QAAQ,YAAY;AACtB,eAAW,WAAW,sBAAsB,OAAO,YAAY,UAAU;EAC3E;AACA,QAAM,gBAAgB,OAAO,KAAK,UAAU,EAAE,SAAS;AACvD,QAAM,mBAAmB,QAAQ,mBAAmB,+BAA+B,KAAK,IAAI;AAE5F,SAAO;IACL,QAAQ;MACN,OAAO,MAAM;MACb,iBAAiB,QAAQ;MACzB,iBAAiB;;IAEnB,SAAS;IACT,WAAW;IACX,GAAI,mBAAmB,EAAE,mBAAmB,iBAAgB,IAAK,CAAA;IACjE,GAAI,gBAAgB,EAAE,WAAU,IAAK,CAAA;IACrC,GAAI,UAAU,EAAE,QAAO,IAAK,CAAA;IAC5B,GAAI,mBAAmB,EAAE,mBAAmB,iBAAgB,IAAK,CAAA;IACjE,cAAc,OAAM;;AAExB","debugId":"fb69c821-7bb6-5b15-8cd2-319f496f077e"}
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
flushTelemetryQueueNow
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QHZO65XW.js";
|
|
4
4
|
import {
|
|
5
5
|
nowIso
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-DRBV5UC2.js";
|
|
7
7
|
import {
|
|
8
|
-
EXIT_CODE,
|
|
9
8
|
PmCliError,
|
|
10
|
-
pathExists,
|
|
11
|
-
readFileIfExists,
|
|
12
9
|
readSettings,
|
|
13
|
-
resolveGlobalPmRoot,
|
|
14
10
|
writeSettings
|
|
15
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-P5YORJRH.js";
|
|
12
|
+
import "./chunk-7C2O74AE.js";
|
|
13
|
+
import {
|
|
14
|
+
EXIT_CODE,
|
|
15
|
+
pathExists,
|
|
16
|
+
readFileIfExists,
|
|
17
|
+
resolveGlobalPmRoot
|
|
18
|
+
} from "./chunk-5VVUKE3U.js";
|
|
16
19
|
|
|
17
20
|
// dist/cli/commands/telemetry.js
|
|
18
21
|
import fs from "node:fs/promises";
|
|
@@ -303,4 +306,4 @@ export {
|
|
|
303
306
|
TELEMETRY_SUBCOMMANDS,
|
|
304
307
|
runTelemetry
|
|
305
308
|
};
|
|
306
|
-
//# sourceMappingURL=telemetry-
|
|
309
|
+
//# sourceMappingURL=telemetry-L2CVOKVN.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../../cli/commands/telemetry.ts"],
|
|
4
4
|
"sourcesContent": ["/**\n * @module cli/commands/telemetry\n *\n * Implements the pm telemetry command surface and its agent-facing runtime behavior.\n */\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { pathExists, readFileIfExists } from \"../../core/fs/fs-utils.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { nowIso } from \"../../core/shared/time.js\";\nimport { resolveGlobalPmRoot } from \"../../core/store/paths.js\";\nimport { readSettings, writeSettings } from \"../../core/store/settings.js\";\nimport { flushTelemetryQueueNow } from \"../../core/telemetry/runtime.js\";\n\nconst TELEMETRY_QUEUE_RELATIVE_PATH = path.join(\"runtime\", \"telemetry\", \"events.jsonl\");\nconst TELEMETRY_STATE_RELATIVE_PATH = path.join(\"runtime\", \"telemetry\", \"state.json\");\nconst TELEMETRY_RUNTIME_RELATIVE_PATH = path.join(\"runtime\", \"telemetry\");\nconst DEFAULT_STATS_LIMIT = 20;\n\nexport const TELEMETRY_SUBCOMMANDS = [\"status\", \"flush\", \"stats\", \"clear\"] as const;\n/**\n * Restricts telemetry subcommand values accepted by command, SDK, and storage contracts.\n */\nexport type TelemetrySubcommand = (typeof TELEMETRY_SUBCOMMANDS)[number];\n\ninterface TelemetryRuntimeStateRecord {\n endpoint?: string;\n queue_entries?: number;\n last_attempted_flush_at?: string;\n last_successful_flush_at?: string;\n last_failed_flush_at?: string;\n last_failed_flush_error?: string;\n}\n\ninterface QueuedTelemetryEventRecord {\n attempts: number;\n client_schema_version?: number;\n event: {\n event_id?: string;\n event_type?: string;\n schema_version?: number;\n command?: string;\n payload?: Record<string, unknown>;\n };\n}\n\ninterface ParsedTelemetryQueue {\n rows_total: number;\n valid_entries: number;\n invalid_rows: number;\n entries: QueuedTelemetryEventRecord[];\n}\n\ninterface TelemetryStatusSummary {\n enabled: boolean;\n endpoint: string;\n queue_path: string;\n state_path: string;\n queue_rows_total: number;\n queue_entries: number;\n queue_invalid_rows: number;\n queue_size_bytes: number;\n last_attempted_flush_at: string | null;\n last_successful_flush_at: string | null;\n last_failed_flush_at: string | null;\n last_failed_flush_error: string | null;\n}\n\n/**\n * Documents the telemetry command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface TelemetryCommandOptions {\n subcommand?: string;\n limit?: string | number;\n}\n\ninterface TelemetryStatsBucket {\n command: string;\n count: number;\n event_type_counts: Record<string, number>;\n max_attempts: number;\n event_schema_versions: number[];\n client_schema_versions: number[];\n /**\n * Latency percentiles (nearest-rank) over `duration_ms` from the bucket's\n * `command_finish` events. Present only when at least one finish event carries\n * a finite `duration_ms`; `command_start`/`command_error` events are excluded.\n */\n duration_p50_ms?: number;\n duration_p95_ms?: number;\n duration_max_ms?: number;\n /**\n * Success/failure tally derived from `command_finish` payload `ok`. A finish\n * event whose `ok` is missing or not strictly `true` is counted as an error\n * (conservative). Present only when the bucket has at least one finish event;\n * `ok_count + error_count` equals that finish-event count.\n */\n ok_count?: number;\n error_count?: number;\n error_rate?: number;\n /** Distribution of `command_resolution` over `command_finish` events; present only when non-empty. */\n command_resolution_counts?: Record<string, number>;\n}\n\ninterface TelemetryStatsBucketAccumulator {\n count: number;\n max_attempts: number;\n event_type_counts: Record<string, number>;\n event_schema_versions: Set<number>;\n client_schema_versions: Set<number>;\n finish_durations_ms: number[];\n ok_count: number;\n error_count: number;\n resolution_counts: Record<string, number>;\n}\n\ninterface NormalizedTelemetryQueueEntry {\n command: string;\n eventType: string;\n eventSchemaVersion: number | undefined;\n clientSchemaVersion: number | undefined;\n}\n\n/**\n * Returns the nearest-rank percentile of an ascending-sorted, non-empty array.\n *\n * Uses the nearest-rank method (rank = ceil(fraction × n), 1-based, clamped into\n * range) so the result is always an observed sample value with no interpolation.\n */\nfunction nearestRankPercentile(sortedAscending: number[], fraction: number): number {\n const rank = Math.ceil(fraction * sortedAscending.length);\n const index = Math.min(sortedAscending.length - 1, Math.max(0, rank - 1));\n return sortedAscending[index];\n}\n\nfunction normalizeTelemetryQueueEntry(entry: QueuedTelemetryEventRecord): NormalizedTelemetryQueueEntry {\n const command = typeof entry.event.command === \"string\" && entry.event.command.trim().length > 0\n ? entry.event.command\n : \"<unknown>\";\n const eventType = typeof entry.event.event_type === \"string\" && entry.event.event_type.trim().length > 0\n ? entry.event.event_type\n : \"unknown\";\n const eventSchemaVersion = typeof entry.event.schema_version === \"number\" && Number.isFinite(entry.event.schema_version)\n ? Math.trunc(entry.event.schema_version)\n : undefined;\n const clientSchemaVersion =\n typeof entry.client_schema_version === \"number\" && Number.isFinite(entry.client_schema_version)\n ? Math.trunc(entry.client_schema_version)\n : undefined;\n return { command, eventType, eventSchemaVersion, clientSchemaVersion };\n}\n\nfunction createTelemetryStatsAccumulator(): TelemetryStatsBucketAccumulator {\n return {\n count: 0,\n max_attempts: 0,\n event_type_counts: {},\n event_schema_versions: new Set<number>(),\n client_schema_versions: new Set<number>(),\n finish_durations_ms: [],\n ok_count: 0,\n error_count: 0,\n resolution_counts: {},\n };\n}\n\nfunction recordTelemetryFinishPayload(current: TelemetryStatsBucketAccumulator, payload: Record<string, unknown> | undefined): void {\n const durationMs = typeof payload?.duration_ms === \"number\" && Number.isFinite(payload.duration_ms)\n ? payload.duration_ms\n : undefined;\n if (durationMs !== undefined) {\n current.finish_durations_ms.push(durationMs);\n }\n if (payload?.ok === true) {\n current.ok_count += 1;\n } else {\n current.error_count += 1;\n }\n const resolution = typeof payload?.command_resolution === \"string\" && payload.command_resolution.trim().length > 0\n ? payload.command_resolution\n : undefined;\n if (resolution !== undefined) {\n current.resolution_counts[resolution] = (current.resolution_counts[resolution] ?? 0) + 1;\n }\n}\n\nfunction recordTelemetryQueueEntry(\n grouped: Map<string, TelemetryStatsBucketAccumulator>,\n entry: QueuedTelemetryEventRecord,\n): void {\n const normalized = normalizeTelemetryQueueEntry(entry);\n const current = grouped.get(normalized.command) ?? createTelemetryStatsAccumulator();\n const attempts = Number.isFinite(entry.attempts) ? Math.max(0, Math.trunc(entry.attempts)) : 0;\n current.count += 1;\n current.max_attempts = Math.max(current.max_attempts, attempts);\n current.event_type_counts[normalized.eventType] = (current.event_type_counts[normalized.eventType] ?? 0) + 1;\n if (normalized.eventSchemaVersion !== undefined) {\n current.event_schema_versions.add(normalized.eventSchemaVersion);\n }\n if (normalized.clientSchemaVersion !== undefined) {\n current.client_schema_versions.add(normalized.clientSchemaVersion);\n }\n if (normalized.eventType === \"command_finish\") {\n recordTelemetryFinishPayload(current, entry.event.payload);\n }\n grouped.set(normalized.command, current);\n}\n\nfunction buildTelemetryStatsBucket(command: string, value: TelemetryStatsBucketAccumulator): TelemetryStatsBucket {\n const finishCount = value.ok_count + value.error_count;\n const sortedDurations = [...value.finish_durations_ms].sort((left, right) => left - right);\n const resolutionEntries = Object.entries(value.resolution_counts).sort((left, right) => left[0].localeCompare(right[0]));\n return {\n command,\n count: value.count,\n event_type_counts: Object.fromEntries(\n Object.entries(value.event_type_counts).sort((left, right) => left[0].localeCompare(right[0])),\n ),\n max_attempts: value.max_attempts,\n event_schema_versions: [...value.event_schema_versions].sort((left, right) => left - right),\n client_schema_versions: [...value.client_schema_versions].sort((left, right) => left - right),\n ...(sortedDurations.length > 0\n ? {\n duration_p50_ms: nearestRankPercentile(sortedDurations, 0.5),\n duration_p95_ms: nearestRankPercentile(sortedDurations, 0.95),\n duration_max_ms: sortedDurations[sortedDurations.length - 1],\n }\n : {}),\n ...(finishCount > 0\n ? {\n ok_count: value.ok_count,\n error_count: value.error_count,\n error_rate: value.error_count / finishCount,\n }\n : {}),\n ...(resolutionEntries.length > 0 ? { command_resolution_counts: Object.fromEntries(resolutionEntries) } : {}),\n };\n}\n\nfunction normalizeTelemetrySubcommand(value: string | undefined): TelemetrySubcommand {\n const normalized = (value ?? \"status\").trim().toLowerCase();\n if ((TELEMETRY_SUBCOMMANDS as readonly string[]).includes(normalized)) {\n return normalized as TelemetrySubcommand;\n }\n // `value` is always a defined string here: an undefined subcommand normalizes\n // to \"status\" above (a valid value) and never reaches this throw.\n throw new PmCliError(\n `Unknown pm telemetry subcommand \"${value}\". Allowed: ${TELEMETRY_SUBCOMMANDS.join(\", \")}`,\n EXIT_CODE.USAGE,\n {\n code: \"unknown_subcommand\",\n examples: [\n \"pm telemetry status\",\n \"pm telemetry flush\",\n \"pm telemetry stats --limit 10\",\n \"pm telemetry clear\",\n ],\n },\n );\n}\n\nfunction parseTelemetryStatsLimit(raw: string | number | undefined): number {\n if (raw === undefined) {\n return DEFAULT_STATS_LIMIT;\n }\n if (typeof raw === \"number\") {\n if (!Number.isFinite(raw) || !Number.isInteger(raw) || raw <= 0) {\n throw new PmCliError(\"--limit must be a positive integer\", EXIT_CODE.USAGE);\n }\n return raw;\n }\n const trimmed = raw.trim();\n if (trimmed.length === 0 || !/^\\d+$/.test(trimmed)) {\n throw new PmCliError(\"--limit must be a positive integer\", EXIT_CODE.USAGE);\n }\n const parsed = Number.parseInt(trimmed, 10);\n if (!Number.isFinite(parsed) || parsed <= 0) {\n throw new PmCliError(\"--limit must be a positive integer\", EXIT_CODE.USAGE);\n }\n return parsed;\n}\n\nfunction parseTelemetryQueue(raw: string | null): ParsedTelemetryQueue {\n if (raw === null || raw.trim().length === 0) {\n return {\n rows_total: 0,\n valid_entries: 0,\n invalid_rows: 0,\n entries: [],\n };\n }\n const entries: QueuedTelemetryEventRecord[] = [];\n let rowsTotal = 0;\n let invalidRows = 0;\n for (const line of raw.split(\"\\n\")) {\n const trimmed = line.trim();\n if (trimmed.length === 0) {\n continue;\n }\n rowsTotal += 1;\n try {\n const parsed = JSON.parse(trimmed) as QueuedTelemetryEventRecord;\n if (\n typeof parsed === \"object\" &&\n parsed !== null &&\n typeof parsed.attempts === \"number\" &&\n typeof parsed.event === \"object\" &&\n parsed.event !== null\n ) {\n entries.push(parsed);\n } else {\n invalidRows += 1;\n }\n } catch {\n invalidRows += 1;\n }\n }\n return {\n rows_total: rowsTotal,\n valid_entries: entries.length,\n invalid_rows: invalidRows,\n entries,\n };\n}\n\nasync function readTelemetryRuntimeState(statePath: string): Promise<TelemetryRuntimeStateRecord> {\n const stateRaw = await readFileIfExists(statePath);\n if (stateRaw === null || stateRaw.trim().length === 0) {\n return {};\n }\n try {\n const parsed = JSON.parse(stateRaw) as TelemetryRuntimeStateRecord;\n if (typeof parsed === \"object\" && parsed !== null && !Array.isArray(parsed)) {\n return parsed;\n }\n } catch {\n // Ignore malformed state files; status command is observational.\n }\n return {};\n}\n\nasync function buildTelemetryStatusSummary(globalPmRoot: string): Promise<TelemetryStatusSummary> {\n const settings = await readSettings(globalPmRoot);\n const queuePath = path.join(globalPmRoot, TELEMETRY_QUEUE_RELATIVE_PATH);\n const statePath = path.join(globalPmRoot, TELEMETRY_STATE_RELATIVE_PATH);\n const queueRaw = await readFileIfExists(queuePath);\n const queue = parseTelemetryQueue(queueRaw);\n const runtimeState = await readTelemetryRuntimeState(statePath);\n return {\n enabled: settings.telemetry.enabled,\n endpoint: settings.telemetry.endpoint,\n queue_path: queuePath,\n state_path: statePath,\n queue_rows_total: queue.rows_total,\n queue_entries: queue.valid_entries,\n queue_invalid_rows: queue.invalid_rows,\n queue_size_bytes: queueRaw === null ? 0 : Buffer.byteLength(queueRaw, \"utf8\"),\n last_attempted_flush_at: runtimeState.last_attempted_flush_at ?? null,\n last_successful_flush_at: runtimeState.last_successful_flush_at ?? null,\n last_failed_flush_at: runtimeState.last_failed_flush_at ?? null,\n last_failed_flush_error: runtimeState.last_failed_flush_error ?? null,\n };\n}\n\nfunction buildTelemetryStatsBuckets(entries: QueuedTelemetryEventRecord[]): TelemetryStatsBucket[] {\n const grouped = new Map<string, TelemetryStatsBucketAccumulator>();\n for (const entry of entries) {\n // Latency + outcome distribution come from command_finish payloads only:\n // command_finish always carries duration_ms/ok/command_resolution at every\n // capture level, while start/error events do not.\n recordTelemetryQueueEntry(grouped, entry);\n }\n return [...grouped.entries()]\n .map(([command, value]) => buildTelemetryStatsBucket(command, value))\n .sort((left, right) => right.count - left.count || left.command.localeCompare(right.command));\n}\n\n/**\n * Implements run telemetry for the public runtime surface of this module.\n */\nexport async function runTelemetry(options: TelemetryCommandOptions, _global: GlobalOptions): Promise<Record<string, unknown>> {\n void _global;\n const subcommand = normalizeTelemetrySubcommand(options.subcommand);\n const globalPmRoot = resolveGlobalPmRoot(process.cwd());\n const queuePath = path.join(globalPmRoot, TELEMETRY_QUEUE_RELATIVE_PATH);\n const statePath = path.join(globalPmRoot, TELEMETRY_STATE_RELATIVE_PATH);\n if (subcommand === \"status\") {\n return {\n action: \"telemetry\",\n subcommand,\n status: await buildTelemetryStatusSummary(globalPmRoot),\n generated_at: nowIso(),\n };\n }\n\n if (subcommand === \"flush\") {\n const before = await buildTelemetryStatusSummary(globalPmRoot);\n await flushTelemetryQueueNow(globalPmRoot);\n const after = await buildTelemetryStatusSummary(globalPmRoot);\n return {\n action: \"telemetry\",\n subcommand,\n queue_entries_before: before.queue_entries,\n queue_entries_after: after.queue_entries,\n queue_drained: after.queue_entries < before.queue_entries,\n status: after,\n generated_at: nowIso(),\n };\n }\n\n if (subcommand === \"stats\") {\n const limit = parseTelemetryStatsLimit(options.limit);\n const queueRaw = await readFileIfExists(queuePath);\n const queue = parseTelemetryQueue(queueRaw);\n const buckets = buildTelemetryStatsBuckets(queue.entries);\n const selected = buckets.slice(0, limit);\n return {\n action: \"telemetry\",\n subcommand,\n limit,\n total_commands: buckets.length,\n queue_entries: queue.valid_entries,\n queue_invalid_rows: queue.invalid_rows,\n queue_rows_total: queue.rows_total,\n truncated: buckets.length > selected.length,\n stats: selected,\n generated_at: nowIso(),\n };\n }\n\n const settings = await readSettings(globalPmRoot);\n const previousEnabled = settings.telemetry.enabled;\n const previousInstallationId = settings.telemetry.installation_id;\n const previousFirstRunPromptCompleted = settings.telemetry.first_run_prompt_completed;\n settings.telemetry.enabled = false;\n settings.telemetry.first_run_prompt_completed = true;\n settings.telemetry.installation_id = \"\";\n const settingsChanged =\n previousEnabled !== settings.telemetry.enabled ||\n previousInstallationId !== settings.telemetry.installation_id ||\n previousFirstRunPromptCompleted !== settings.telemetry.first_run_prompt_completed;\n if (settingsChanged) {\n await writeSettings(globalPmRoot, settings, \"telemetry:clear\");\n }\n\n const telemetryRuntimePath = path.join(globalPmRoot, TELEMETRY_RUNTIME_RELATIVE_PATH);\n const existed = await pathExists(telemetryRuntimePath);\n await fs.rm(telemetryRuntimePath, { recursive: true, force: true });\n const queueExistsAfter = await pathExists(queuePath);\n const stateExistsAfter = await pathExists(statePath);\n return {\n action: \"telemetry\",\n subcommand,\n settings_changed: settingsChanged,\n runtime_dir_removed: existed && !(await pathExists(telemetryRuntimePath)),\n queue_exists_after: queueExistsAfter,\n state_exists_after: stateExistsAfter,\n status: await buildTelemetryStatusSummary(globalPmRoot),\n generated_at: nowIso(),\n };\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAKA,OAAO,QAAQ;AACf,OAAO,UAAU;;;;;;;;AAUjB,IAAM,gCAAgC,KAAK,KAAK,WAAW,aAAa,cAAc;AACtF,IAAM,gCAAgC,KAAK,KAAK,WAAW,aAAa,YAAY;AACpF,IAAM,kCAAkC,KAAK,KAAK,WAAW,WAAW;AACxE,IAAM,sBAAsB;AAErB,IAAM,wBAAwB,CAAC,UAAU,SAAS,SAAS,OAAO;AA8GzE,SAAS,sBAAsB,iBAA2B,UAAgB;AACxE,QAAM,OAAO,KAAK,KAAK,WAAW,gBAA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