@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
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../../cli/commands/deps.ts"],
|
|
4
4
|
"sourcesContent": ["/**\n * @module cli/commands/deps\n *\n * Implements the pm deps command surface and its agent-facing runtime behavior.\n */\nimport { getActiveExtensionRegistrations } from \"../../core/extensions/index.js\";\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.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 { listAllFrontMatterLight } from \"../../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport type { Dependency, ItemFrontMatter, ItemStatus, ItemType } from \"../../types/index.js\";\n\nexport const DEPS_FORMAT_VALUES = [\"tree\", \"graph\"] as const;\n/**\n * Restricts deps format values accepted by command, SDK, and storage contracts.\n */\nexport type DepsFormat = (typeof DEPS_FORMAT_VALUES)[number];\nexport const DEPS_COLLAPSE_VALUES = [\"none\", \"repeated\"] as const;\n/**\n * Restricts deps collapse mode values accepted by command, SDK, and storage contracts.\n */\nexport type DepsCollapseMode = (typeof DEPS_COLLAPSE_VALUES)[number];\n\n/**\n * Documents the deps command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface DepsCommandOptions {\n format?: string;\n maxDepth?: string | number;\n collapse?: string;\n summary?: boolean;\n}\n\ninterface IndexedItem {\n id: string;\n title: string;\n type: ItemType;\n status: ItemStatus;\n dependencies: Dependency[];\n}\n\n/**\n * Documents the deps tree node payload exchanged by command, SDK, and package integrations.\n */\nexport interface DepsTreeNode {\n id: string;\n title?: string;\n type?: ItemType;\n status?: ItemStatus;\n via?: string;\n missing: boolean;\n cycle: boolean;\n truncated?: boolean;\n collapsed?: boolean;\n dependencies: DepsTreeNode[];\n}\n\n/**\n * Documents the deps graph node payload exchanged by command, SDK, and package integrations.\n */\nexport interface DepsGraphNode {\n id: string;\n title?: string;\n type?: ItemType;\n status?: ItemStatus;\n missing: boolean;\n}\n\n/**\n * Documents the deps graph edge payload exchanged by command, SDK, and package integrations.\n */\nexport interface DepsGraphEdge {\n from: string;\n to: string;\n kind: string;\n}\n\n/**\n * Documents the deps graph result payload exchanged by command, SDK, and package integrations.\n */\nexport interface DepsGraphResult {\n root_id: string;\n nodes: DepsGraphNode[];\n edges: DepsGraphEdge[];\n missing_ids: string[];\n}\n\n/**\n * Documents the deps result payload exchanged by command, SDK, and package integrations.\n */\nexport interface DepsResult {\n id: string;\n format: DepsFormat;\n node_count: number;\n edge_count: number;\n missing_count: number;\n tree?: DepsTreeNode;\n graph?: DepsGraphResult;\n}\n\nfunction parseFormat(raw: string | undefined): DepsFormat {\n const candidate = raw?.trim().toLowerCase() ?? \"tree\";\n if ((DEPS_FORMAT_VALUES as readonly string[]).includes(candidate)) {\n return candidate as DepsFormat;\n }\n throw new PmCliError(`Invalid --format value \"${raw}\". Use \"tree\" or \"graph\".`, EXIT_CODE.USAGE);\n}\n\nfunction parseMaxDepth(raw: string | number | undefined): number | undefined {\n if (raw === undefined) {\n return undefined;\n }\n const normalized = typeof raw === \"number\" ? raw : Number(raw.trim());\n if (!Number.isInteger(normalized) || normalized < 0) {\n throw new PmCliError(`Invalid --max-depth value \"${raw}\". Use a non-negative integer.`, EXIT_CODE.USAGE);\n }\n return normalized;\n}\n\nfunction parseCollapse(raw: string | undefined): DepsCollapseMode {\n const candidate = raw?.trim().toLowerCase() ?? \"none\";\n if ((DEPS_COLLAPSE_VALUES as readonly string[]).includes(candidate)) {\n return candidate as DepsCollapseMode;\n }\n throw new PmCliError(`Invalid --collapse value \"${raw}\". Use \"none\" or \"repeated\".`, EXIT_CODE.USAGE);\n}\n\nfunction normalizeDependencies(dependencies: Dependency[] | undefined): Dependency[] {\n if (!dependencies || dependencies.length === 0) {\n return [];\n }\n const sorted = [...dependencies].sort((left, right) => {\n const byKind = left.kind.localeCompare(right.kind);\n if (byKind !== 0) return byKind;\n const byId = left.id.localeCompare(right.id);\n if (byId !== 0) return byId;\n return left.created_at.localeCompare(right.created_at);\n });\n const deduped = new Map<string, Dependency>();\n for (const dependency of sorted) {\n const key = `${dependency.kind}::${dependency.id}`;\n if (!deduped.has(key)) {\n deduped.set(key, dependency);\n }\n }\n return [...deduped.values()];\n}\n\nfunction toIndexedItem(item: ItemFrontMatter): IndexedItem {\n return {\n id: item.id,\n title: item.title,\n type: item.type,\n status: item.status,\n dependencies: normalizeDependencies(item.dependencies),\n };\n}\n\nfunction toTreeNode(\n id: string,\n index: Map<string, IndexedItem>,\n lineage: Set<string>,\n maxDepth: number | undefined,\n collapse: DepsCollapseMode,\n expanded: Set<string>,\n depth = 0,\n via?: string,\n): DepsTreeNode {\n const item = index.get(id);\n const baseNode: DepsTreeNode = {\n id,\n title: item?.title,\n type: item?.type,\n status: item?.status,\n via,\n missing: !item,\n cycle: lineage.has(id),\n dependencies: [],\n };\n if (!item || baseNode.cycle) {\n return baseNode;\n }\n if (maxDepth !== undefined && depth >= maxDepth) {\n if (item.dependencies.length > 0) {\n baseNode.truncated = true;\n }\n return baseNode;\n }\n if (collapse === \"repeated\" && expanded.has(id)) {\n baseNode.collapsed = true;\n return baseNode;\n }\n if (collapse === \"repeated\") {\n expanded.add(id);\n }\n const nextLineage = new Set(lineage);\n nextLineage.add(id);\n baseNode.dependencies = item.dependencies.map((dependency) =>\n toTreeNode(dependency.id, index, nextLineage, maxDepth, collapse, expanded, depth + 1, dependency.kind),\n );\n return baseNode;\n}\n\nfunction mergeGraphNode(existing: DepsGraphNode | undefined, candidate: DepsGraphNode): DepsGraphNode {\n if (!existing) {\n return candidate;\n }\n /* c8 ignore start -- defensive: mixed missing/non-missing duplicates only occur in malformed synthetic trees. */\n if (existing.missing && !candidate.missing) return candidate;\n /* c8 ignore stop */\n return {\n ...existing,\n title: existing.title ?? candidate.title,\n type: existing.type ?? candidate.type,\n status: existing.status ?? candidate.status,\n };\n}\n\nfunction toGraph(root: DepsTreeNode): DepsGraphResult {\n const nodesById = new Map<string, DepsGraphNode>();\n const edgesByKey = new Map<string, DepsGraphEdge>();\n\n const visit = (node: DepsTreeNode): void => {\n nodesById.set(\n node.id,\n mergeGraphNode(nodesById.get(node.id), {\n id: node.id,\n title: node.title,\n type: node.type,\n status: node.status,\n missing: node.missing,\n }),\n );\n for (const child of node.dependencies) {\n nodesById.set(\n child.id,\n mergeGraphNode(nodesById.get(child.id), {\n id: child.id,\n title: child.title,\n type: child.type,\n status: child.status,\n missing: child.missing,\n }),\n );\n /* c8 ignore start -- legacy malformed dependency payloads may omit kind/via. */\n const relationKind = child.via ?? \"related\";\n const edgeKey = `${node.id}::${child.id}::${relationKind}`;\n if (!edgesByKey.has(edgeKey)) {\n edgesByKey.set(edgeKey, {\n from: node.id,\n to: child.id,\n kind: relationKind,\n });\n }\n /* c8 ignore stop */\n if (!child.cycle) {\n visit(child);\n }\n }\n };\n\n visit(root);\n\n const nodes = [...nodesById.values()].sort((left, right) => left.id.localeCompare(right.id));\n const edges = [...edgesByKey.values()].sort((left, right) => {\n const byFrom = left.from.localeCompare(right.from);\n if (byFrom !== 0) return byFrom;\n const byTo = left.to.localeCompare(right.to);\n if (byTo !== 0) return byTo;\n return left.kind.localeCompare(right.kind);\n });\n const missingIds = nodes.filter((node) => node.missing).map((node) => node.id);\n return {\n root_id: root.id,\n nodes,\n edges,\n missing_ids: missingIds,\n };\n}\n\n/**\n * Implements run deps for the public runtime surface of this module.\n */\nexport async function runDeps(id: string, options: DepsCommandOptions, global: GlobalOptions): Promise<DepsResult> {\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 const format = parseFormat(options.format);\n const maxDepth = parseMaxDepth(options.maxDepth);\n const collapse = parseCollapse(options.collapse);\n const summaryOnly = options.summary === true;\n const settings = await readSettings(pmRoot);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const items = await listAllFrontMatterLight(pmRoot, settings.item_format, typeRegistry.type_to_folder, undefined, settings.schema);\n const index = new Map(items.map((item) => [item.id, toIndexedItem(item)]));\n if (!index.has(id)) {\n throw new PmCliError(`Item ${id} not found`, EXIT_CODE.NOT_FOUND);\n }\n\n const tree = toTreeNode(id, index, new Set<string>(), maxDepth, collapse, new Set<string>());\n const graph = toGraph(tree);\n const baseResult = {\n id,\n format,\n node_count: graph.nodes.length,\n edge_count: graph.edges.length,\n missing_count: graph.missing_ids.length,\n };\n if (summaryOnly) {\n return baseResult;\n }\n if (format === \"tree\") {\n return {\n ...baseResult,\n tree,\n };\n }\n return {\n ...baseResult,\n graph,\n };\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;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;AACA,SAAO;IACL,GAAG;IACH;;AAEJ;",
|
|
6
6
|
"names": ["global"]
|
|
7
7
|
}
|
|
@@ -1,17 +1,19 @@
|
|
|
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]="d2fd9ecd-74cf-57cf-93ca-7a3198814768")}catch(e){}}();
|
|
3
3
|
import {
|
|
4
4
|
renameArtifactsResultKey,
|
|
5
5
|
runLinkedArtifacts
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YPPVU5GX.js";
|
|
7
7
|
import "./chunk-IBMFIKVS.js";
|
|
8
8
|
import "./chunk-T5RRNDA7.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-7WYXBPYQ.js";
|
|
10
10
|
import "./chunk-P4SESZGT.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-57C2RLW5.js";
|
|
12
|
+
import "./chunk-HK72NWAD.js";
|
|
13
|
+
import "./chunk-FJRKQREY.js";
|
|
14
|
+
import "./chunk-US3T3W5J.js";
|
|
15
|
+
import "./chunk-NNHHXJB2.js";
|
|
16
|
+
import "./chunk-YD5FML7K.js";
|
|
15
17
|
|
|
16
18
|
// dist/cli/commands/docs.js
|
|
17
19
|
async function runDocs(id, options, global) {
|
|
@@ -26,6 +28,6 @@ async function runDocs(id, options, global) {
|
|
|
26
28
|
export {
|
|
27
29
|
runDocs
|
|
28
30
|
};
|
|
29
|
-
//# sourceMappingURL=docs-
|
|
31
|
+
//# sourceMappingURL=docs-6CRCSVKK.js.map
|
|
30
32
|
|
|
31
|
-
//# debugId=
|
|
33
|
+
//# debugId=d2fd9ecd-74cf-57cf-93ca-7a3198814768
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../cli/commands/docs.ts"],"sourcesContent":["/**\n * @module cli/commands/docs\n *\n * Implements the pm docs command surface and its agent-facing runtime behavior.\n */\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport type { LinkedDoc } from \"../../types/index.js\";\nimport {\n renameArtifactsResultKey,\n runLinkedArtifacts,\n type LinkedArtifactResult,\n type LinkedPathAuditEntry,\n type LinkedPathValidation,\n} from \"./linked-artifacts.js\";\n\n/**\n * Documents the docs command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface DocsCommandOptions {\n add?: string[];\n addGlob?: string[];\n remove?: string[];\n migrate?: string[];\n /** GH-170 (pm-pfnx): standalone note applied to every --add/--add-glob link in this invocation. */\n note?: string;\n list?: boolean;\n validatePaths?: boolean;\n audit?: boolean;\n author?: string;\n message?: string;\n force?: boolean;\n}\n\n/**\n * Documents the docs result payload exchanged by command, SDK, and package integrations.\n */\nexport interface DocsResult {\n id: string;\n docs: LinkedDoc[];\n changed: boolean;\n count: number;\n migrations_applied?: number;\n validation?: LinkedPathValidation;\n audit?: LinkedPathAuditEntry[];\n}\n\n/**\n * Implements run docs for the public runtime surface of this module.\n */\nexport async function runDocs(id: string, options: DocsCommandOptions, global: GlobalOptions): Promise<DocsResult> {\n const result: LinkedArtifactResult = await runLinkedArtifacts(id, options, global, {\n metadataKey: \"docs\",\n op: \"docs_add\",\n bareNoun: \"doc\",\n supportsAppendStable: false,\n });\n return renameArtifactsResultKey(result, \"docs\") as unknown as DocsResult;\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../cli/commands/docs.ts"],"sourcesContent":["/**\n * @module cli/commands/docs\n *\n * Implements the pm docs command surface and its agent-facing runtime behavior.\n */\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport type { LinkedDoc } from \"../../types/index.js\";\nimport {\n renameArtifactsResultKey,\n runLinkedArtifacts,\n type LinkedArtifactResult,\n type LinkedPathAuditEntry,\n type LinkedPathValidation,\n} from \"./linked-artifacts.js\";\n\n/**\n * Documents the docs command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface DocsCommandOptions {\n add?: string[];\n addGlob?: string[];\n remove?: string[];\n migrate?: string[];\n /** GH-170 (pm-pfnx): standalone note applied to every --add/--add-glob link in this invocation. */\n note?: string;\n list?: boolean;\n validatePaths?: boolean;\n audit?: boolean;\n author?: string;\n message?: string;\n force?: boolean;\n}\n\n/**\n * Documents the docs result payload exchanged by command, SDK, and package integrations.\n */\nexport interface DocsResult {\n id: string;\n docs: LinkedDoc[];\n changed: boolean;\n count: number;\n migrations_applied?: number;\n validation?: LinkedPathValidation;\n audit?: LinkedPathAuditEntry[];\n}\n\n/**\n * Implements run docs for the public runtime surface of this module.\n */\nexport async function runDocs(id: string, options: DocsCommandOptions, global: GlobalOptions): Promise<DocsResult> {\n const result: LinkedArtifactResult = await runLinkedArtifacts(id, options, global, {\n metadataKey: \"docs\",\n op: \"docs_add\",\n bareNoun: \"doc\",\n supportsAppendStable: false,\n });\n return renameArtifactsResultKey(result, \"docs\") as unknown as DocsResult;\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAiDA,eAAsB,QAAQ,IAAY,SAA6B,QAAqB;AAC1F,QAAM,SAA+B,MAAM,mBAAmB,IAAI,SAAS,QAAQ;IACjF,aAAa;IACb,IAAI;IACJ,UAAU;IACV,sBAAsB;GACvB;AACD,SAAO,yBAAyB,QAAQ,MAAM;AAChD","debugId":"d2fd9ecd-74cf-57cf-93ca-7a3198814768"}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
renameArtifactsResultKey,
|
|
3
3
|
runLinkedArtifacts
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WISPVC2E.js";
|
|
5
5
|
import "./chunk-7M2HAZEB.js";
|
|
6
6
|
import "./chunk-WW4E2DC3.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-T3ABIMGW.js";
|
|
8
8
|
import "./chunk-5HIZDR5A.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-3U3VEWK6.js";
|
|
10
|
+
import "./chunk-EZFKWSC7.js";
|
|
11
|
+
import "./chunk-DRBV5UC2.js";
|
|
12
|
+
import "./chunk-P5YORJRH.js";
|
|
13
|
+
import "./chunk-7C2O74AE.js";
|
|
14
|
+
import "./chunk-5VVUKE3U.js";
|
|
13
15
|
|
|
14
16
|
// dist/cli/commands/docs.js
|
|
15
17
|
!(function() {
|
|
@@ -31,4 +33,4 @@ async function runDocs(id, options, global2) {
|
|
|
31
33
|
export {
|
|
32
34
|
runDocs
|
|
33
35
|
};
|
|
34
|
-
//# sourceMappingURL=docs-
|
|
36
|
+
//# sourceMappingURL=docs-S6UTOTO5.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../../cli/commands/docs.ts"],
|
|
4
4
|
"sourcesContent": ["/**\n * @module cli/commands/docs\n *\n * Implements the pm docs command surface and its agent-facing runtime behavior.\n */\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport type { LinkedDoc } from \"../../types/index.js\";\nimport {\n renameArtifactsResultKey,\n runLinkedArtifacts,\n type LinkedArtifactResult,\n type LinkedPathAuditEntry,\n type LinkedPathValidation,\n} from \"./linked-artifacts.js\";\n\n/**\n * Documents the docs command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface DocsCommandOptions {\n add?: string[];\n addGlob?: string[];\n remove?: string[];\n migrate?: string[];\n /** GH-170 (pm-pfnx): standalone note applied to every --add/--add-glob link in this invocation. */\n note?: string;\n list?: boolean;\n validatePaths?: boolean;\n audit?: boolean;\n author?: string;\n message?: string;\n force?: boolean;\n}\n\n/**\n * Documents the docs result payload exchanged by command, SDK, and package integrations.\n */\nexport interface DocsResult {\n id: string;\n docs: LinkedDoc[];\n changed: boolean;\n count: number;\n migrations_applied?: number;\n validation?: LinkedPathValidation;\n audit?: LinkedPathAuditEntry[];\n}\n\n/**\n * Implements run docs for the public runtime surface of this module.\n */\nexport async function runDocs(id: string, options: DocsCommandOptions, global: GlobalOptions): Promise<DocsResult> {\n const result: LinkedArtifactResult = await runLinkedArtifacts(id, options, global, {\n metadataKey: \"docs\",\n op: \"docs_add\",\n bareNoun: \"doc\",\n supportsAppendStable: false,\n });\n return renameArtifactsResultKey(result, \"docs\") as unknown as DocsResult;\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAiDA,eAAsB,QAAQ,IAAY,SAA6BA,SAAqB;AAC1F,QAAM,SAA+B,MAAM,mBAAmB,IAAI,SAASA,SAAQ;IACjF,aAAa;IACb,IAAI;IACJ,UAAU;IACV,sBAAsB;GACvB;AACD,SAAO,yBAAyB,QAAQ,MAAM;AAChD;",
|
|
6
6
|
"names": ["global"]
|
|
7
7
|
}
|
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runSearch
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5B3X4Y22.js";
|
|
4
4
|
import "./chunk-VPLDQMW2.js";
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-ZFTKYWIF.js";
|
|
5
|
+
import "./chunk-7EQNAZX2.js";
|
|
7
6
|
import "./chunk-R23CSHGI.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-RX3HQSYG.js";
|
|
8
|
+
import "./chunk-EEY54JMF.js";
|
|
9
|
+
import "./chunk-LEKT4K7I.js";
|
|
10
|
+
import "./chunk-B5KXLBSJ.js";
|
|
11
|
+
import "./chunk-3U3VEWK6.js";
|
|
12
|
+
import "./chunk-EZFKWSC7.js";
|
|
13
|
+
import "./chunk-DRBV5UC2.js";
|
|
14
|
+
import {
|
|
15
|
+
PmCliError
|
|
16
|
+
} from "./chunk-P5YORJRH.js";
|
|
17
|
+
import "./chunk-7C2O74AE.js";
|
|
13
18
|
import {
|
|
14
19
|
EXIT_CODE,
|
|
15
|
-
PmCliError,
|
|
16
20
|
coercePositiveInteger,
|
|
17
21
|
getSettingsPath,
|
|
18
22
|
pathExists,
|
|
19
23
|
resolvePmRoot
|
|
20
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-5VVUKE3U.js";
|
|
21
25
|
|
|
22
26
|
// dist/cli/commands/eval.js
|
|
23
27
|
import fs from "node:fs/promises";
|
|
@@ -281,4 +285,4 @@ export {
|
|
|
281
285
|
DEFAULT_EVAL_QUERIES_RELATIVE_PATH,
|
|
282
286
|
runEval
|
|
283
287
|
};
|
|
284
|
-
//# sourceMappingURL=eval-
|
|
288
|
+
//# sourceMappingURL=eval-N6UHFWVO.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../../cli/commands/eval.ts", "../../../../../../../../core/search/eval.ts"],
|
|
4
4
|
"sourcesContent": ["/**\n * @module cli/commands/eval\n *\n * Implements the `pm eval` command surface (pm-u8n5): a search-relevance\n * evaluation runner that scores a human-curated golden-query set against the\n * live retrieval path and reports nDCG@k, MRR@k, precision@k, and recall@k per\n * query plus the macro average. With `--fail-under` it doubles as a CI gate so\n * relevance regressions — from corpus changes, hybrid-weight changes, or\n * provider swaps (including the offline BM25 provider, pm-75k9) — fail the build\n * instead of silently degrading retrieval quality.\n */\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport {\n aggregateEvalMetrics,\n DEFAULT_EVAL_K,\n evaluateRanking,\n parseEvalQuerySet,\n type EvalSearchMode,\n type QueryEvalMetrics,\n} from \"../../core/search/eval.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 { coercePositiveInteger } from \"../../core/shared/primitives.js\";\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { runSearch } from \"./search.js\";\n\n/**\n * Relative location (under the pm root) of the default golden-query set. A\n * git-tracked, human-curated file so relevance ground truth lives alongside the\n * tracker it evaluates.\n */\nexport const DEFAULT_EVAL_QUERIES_RELATIVE_PATH = path.join(\"search\", \"eval-queries.json\");\n\n/**\n * Documents the eval command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface EvalOptions {\n /** Default retrieval mode for queries that do not set their own (keyword|semantic|hybrid). */\n mode?: string;\n /** Metric cutoff (`@k`); positive integer, defaults to {@link DEFAULT_EVAL_K}. */\n k?: string | number;\n /** Gate threshold: exit non-zero when the aggregate nDCG@k falls below this `[0,1]` value. */\n failUnder?: string | number;\n /** Override path to the golden-query JSON file (defaults to `<pmRoot>/search/eval-queries.json`). */\n queries?: string;\n /** Output format override: json|toon. */\n format?: string;\n}\n\n/** Per-query relevance report row emitted by {@link runEval}. */\nexport interface EvalQueryReport {\n query: string;\n mode: EvalSearchMode;\n relevant_total: number;\n retrieved_relevant: number;\n ndcg: number;\n mrr: number;\n precision: number;\n recall: number;\n}\n\n/**\n * Documents the eval result payload exchanged by command, SDK, and package integrations.\n */\nexport interface EvalResult {\n k: number;\n query_count: number;\n aggregate: {\n ndcg: number;\n mrr: number;\n precision: number;\n recall: number;\n };\n queries: EvalQueryReport[];\n /** Present only when `--fail-under` was supplied. */\n fail_under?: number;\n /** Whether the aggregate nDCG met the gate (always true when no gate is set). */\n passed: boolean;\n}\n\nconst VALID_EVAL_MODES: ReadonlySet<string> = new Set<EvalSearchMode>([\"keyword\", \"semantic\", \"hybrid\"]);\n\nfunction parseEvalMode(raw: string | undefined): EvalSearchMode {\n if (raw === undefined) {\n return \"keyword\";\n }\n const normalized = raw.trim().toLowerCase();\n if (!VALID_EVAL_MODES.has(normalized)) {\n throw new PmCliError(\"Eval --mode must be one of keyword|semantic|hybrid\", EXIT_CODE.USAGE);\n }\n return normalized as EvalSearchMode;\n}\n\nfunction parseEvalK(raw: string | number | undefined): number {\n if (raw === undefined || raw === \"\") {\n return DEFAULT_EVAL_K;\n }\n const parsed = coercePositiveInteger(raw);\n if (parsed === null) {\n throw new PmCliError(\"Eval --k must be a positive integer\", EXIT_CODE.USAGE);\n }\n return parsed;\n}\n\nfunction parseFailUnder(raw: string | number | undefined): number | undefined {\n if (raw === undefined || raw === \"\") {\n return undefined;\n }\n const parsed = typeof raw === \"number\" ? raw : Number(String(raw).trim());\n if (!Number.isFinite(parsed) || parsed < 0 || parsed > 1) {\n throw new PmCliError(\"Eval --fail-under must be a number in the range [0, 1]\", EXIT_CODE.USAGE);\n }\n return parsed;\n}\n\n/** Round a metric to four decimals to keep the JSON output compact and stable. */\nfunction roundMetric(value: number): number {\n return Math.round(value * 10_000) / 10_000;\n}\n\nasync function loadEvalQuerySet(queriesPath: string): Promise<ReturnType<typeof parseEvalQuerySet>> {\n let raw: string;\n try {\n raw = await fs.readFile(queriesPath, \"utf8\");\n } catch {\n throw new PmCliError(`Eval query set not found at ${queriesPath}`, EXIT_CODE.NOT_FOUND, {\n examples: [\n 'echo \\'[{\"query\":\"offline search\",\"relevant_ids\":[\"pm-75k9\"]}]\\' > ' + queriesPath,\n \"pm eval --queries ./my-eval.json\",\n ],\n nextSteps: [\n \"Create a git-tracked golden-query JSON file (an array of {query, relevant_ids, mode?} objects), then re-run pm eval.\",\n ],\n });\n }\n let parsed: unknown;\n try {\n parsed = JSON.parse(raw);\n } catch (error: unknown) {\n // JSON.parse only ever throws a SyntaxError (an Error subclass).\n throw new PmCliError(\n `Eval query set at ${queriesPath} is not valid JSON: ${(error as Error).message}`,\n EXIT_CODE.USAGE,\n );\n }\n try {\n return parseEvalQuerySet(parsed);\n } catch (error: unknown) {\n // parseEvalQuerySet only ever throws EvalQuerySetError (an Error subclass\n // with a precise, author-actionable message) — surface it as a usage error.\n throw new PmCliError((error as Error).message, EXIT_CODE.USAGE);\n }\n}\n\n/**\n * Run the search-relevance evaluation (pm-u8n5). Loads the golden-query set\n * (default `<pmRoot>/search/eval-queries.json`, overridable via `--queries`),\n * runs each query through {@link runSearch} at the resolved mode, scores the\n * returned ranking with the nDCG/MRR/precision/recall metrics, and macro-averages\n * across queries. When `--fail-under` is supplied, `passed` reflects whether the\n * aggregate nDCG@k cleared the threshold; the CLI layer maps a failed gate to a\n * non-zero exit code.\n */\nexport async function runEval(options: EvalOptions, global: GlobalOptions): Promise<EvalResult> {\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 const k = parseEvalK(options.k);\n const defaultMode = parseEvalMode(options.mode);\n const failUnder = parseFailUnder(options.failUnder);\n const queriesPath = options.queries\n ? path.resolve(process.cwd(), options.queries)\n : path.join(pmRoot, DEFAULT_EVAL_QUERIES_RELATIVE_PATH);\n const querySet = await loadEvalQuerySet(queriesPath);\n\n const reports: EvalQueryReport[] = [];\n // Aggregate and gate on the UNROUNDED metrics; rounding is applied only to the\n // emitted report values so display precision never flips a --fail-under decision.\n const rawMetrics: QueryEvalMetrics[] = [];\n for (const evalQuery of querySet.queries) {\n const mode = evalQuery.mode ?? defaultMode;\n const searchResult = await runSearch(\n evalQuery.query,\n { mode, limit: String(k), fields: \"id\" },\n global,\n );\n const rankedIds = searchResult.items\n .map((item) => (item as { id?: unknown }).id)\n .filter((id): id is string => typeof id === \"string\");\n const metrics = evaluateRanking(rankedIds, new Set(evalQuery.relevant_ids), k);\n rawMetrics.push(metrics);\n reports.push({\n query: evalQuery.query,\n mode,\n relevant_total: metrics.relevant_total,\n retrieved_relevant: metrics.retrieved_relevant,\n ndcg: roundMetric(metrics.ndcg),\n mrr: roundMetric(metrics.mrr),\n precision: roundMetric(metrics.precision),\n recall: roundMetric(metrics.recall),\n });\n }\n\n const aggregate = aggregateEvalMetrics(rawMetrics);\n const passed = failUnder === undefined || aggregate.ndcg >= failUnder;\n return {\n k,\n query_count: querySet.queries.length,\n aggregate: {\n ndcg: roundMetric(aggregate.ndcg),\n mrr: roundMetric(aggregate.mrr),\n precision: roundMetric(aggregate.precision),\n recall: roundMetric(aggregate.recall),\n },\n queries: reports,\n ...(failUnder !== undefined ? { fail_under: failUnder } : {}),\n passed,\n };\n}\n", "/**\n * @module core/search/eval\n *\n * Search relevance evaluation primitives (pm-u8n5). Implements the standard\n * offline ranking metrics — nDCG@k, MRR@k, precision@k, recall@k — over a\n * human-curated golden-query set, plus the loader/validator for that set. The\n * `pm eval` command (src/cli/commands/eval.ts) runs each golden query through\n * the live retrieval path and feeds the ranked ids here, so relevance\n * regressions from corpus changes, hybrid-weight changes, or provider swaps are\n * measurable and gateable in CI.\n *\n * Relevance is binary: an id is either in a query's `relevant_ids` set or it is\n * not. This keeps the golden set cheap to curate while still supporting the\n * graded-discount behavior of DCG (earlier hits are worth more).\n */\n\n/**\n * Retrieval mode a golden query is evaluated under. Mirrors the `pm search`\n * mode surface; omitting it on a query defers to the eval run's default mode.\n */\nexport type EvalSearchMode = \"keyword\" | \"semantic\" | \"hybrid\";\n\n/** Default cutoff (`@k`) used for every metric when the caller does not override it. */\nexport const DEFAULT_EVAL_K = 10;\n\n/**\n * One curated golden query: the query text, the set of item ids considered\n * relevant, an optional per-query retrieval mode override, and an optional\n * human-readable description of the relevance intent.\n */\nexport interface EvalQuery {\n query: string;\n relevant_ids: string[];\n mode?: EvalSearchMode;\n description?: string;\n}\n\n/** A parsed, validated golden-query set. */\nexport interface EvalQuerySet {\n queries: EvalQuery[];\n}\n\n/**\n * Thrown by {@link parseEvalQuerySet} when the raw golden-query payload is\n * structurally invalid. Carries a precise, human-actionable message naming the\n * offending query index/field so an author can fix the JSON directly.\n */\nexport class EvalQuerySetError extends Error {\n /** Construct an error describing why a golden-query set failed validation. */\n constructor(message: string) {\n super(message);\n this.name = \"EvalQuerySetError\";\n }\n}\n\nconst VALID_EVAL_MODES: ReadonlySet<string> = new Set<EvalSearchMode>([\"keyword\", \"semantic\", \"hybrid\"]);\n\n/**\n * Compute Discounted Cumulative Gain at cutoff `k` for an ordered list of binary\n * relevance gains (`1` relevant, `0` not). Position `i` (1-based) contributes\n * `gain / log2(i + 1)`, so a relevant hit ranked first is worth `1` and later\n * hits are progressively discounted. Gains beyond `k` are ignored.\n */\nexport function dcgAtK(relevanceGains: number[], k: number): number {\n let dcg = 0;\n const limit = Math.min(k, relevanceGains.length);\n for (let index = 0; index < limit; index += 1) {\n dcg += relevanceGains[index] / Math.log2(index + 2);\n }\n return dcg;\n}\n\n/**\n * Normalized DCG at cutoff `k`: the ranking's DCG divided by the DCG of the\n * ideal ranking (all relevant ids first). Returns `0` when the query has no\n * relevant ids (the ideal DCG is `0` and the score is undefined), giving a\n * stable lower bound for aggregation. Result is in `[0, 1]`.\n */\nexport function ndcgAtK(rankedIds: string[], relevantIds: ReadonlySet<string>, k: number): number {\n if (relevantIds.size === 0) {\n return 0;\n }\n const gains = rankedIds.map((id) => (relevantIds.has(id) ? 1 : 0));\n const dcg = dcgAtK(gains, k);\n const idealGains = Array.from({ length: relevantIds.size }, () => 1);\n const idealDcg = dcgAtK(idealGains, k);\n return idealDcg === 0 ? 0 : dcg / idealDcg;\n}\n\n/**\n * Reciprocal rank of the first relevant id within the top `k` results: `1/rank`\n * (rank is 1-based), or `0` when no relevant id appears in the cutoff. Averaged\n * across queries this is Mean Reciprocal Rank (MRR@k).\n */\nexport function reciprocalRankAtK(rankedIds: string[], relevantIds: ReadonlySet<string>, k: number): number {\n const limit = Math.min(k, rankedIds.length);\n for (let index = 0; index < limit; index += 1) {\n if (relevantIds.has(rankedIds[index])) {\n return 1 / (index + 1);\n }\n }\n return 0;\n}\n\n/**\n * Count relevant ids within the top `k` results (shared by precision and\n * recall).\n */\nfunction countRelevantInTopK(rankedIds: string[], relevantIds: ReadonlySet<string>, k: number): number {\n const limit = Math.min(k, rankedIds.length);\n let hits = 0;\n for (let index = 0; index < limit; index += 1) {\n if (relevantIds.has(rankedIds[index])) {\n hits += 1;\n }\n }\n return hits;\n}\n\n/**\n * Precision at cutoff `k`: relevant ids retrieved in the top `k` divided by `k`.\n * Returns `0` for a non-positive `k`.\n */\nexport function precisionAtK(rankedIds: string[], relevantIds: ReadonlySet<string>, k: number): number {\n if (k <= 0) {\n return 0;\n }\n return countRelevantInTopK(rankedIds, relevantIds, k) / k;\n}\n\n/**\n * Recall at cutoff `k`: relevant ids retrieved in the top `k` divided by the\n * total number of relevant ids. Returns `0` when the query has no relevant ids.\n */\nexport function recallAtK(rankedIds: string[], relevantIds: ReadonlySet<string>, k: number): number {\n if (relevantIds.size === 0) {\n return 0;\n }\n return countRelevantInTopK(rankedIds, relevantIds, k) / relevantIds.size;\n}\n\n/** The four ranking metrics computed for a single query, plus match counts. */\nexport interface QueryEvalMetrics {\n ndcg: number;\n mrr: number;\n precision: number;\n recall: number;\n relevant_total: number;\n retrieved_relevant: number;\n}\n\n/**\n * Evaluate one ranking against its relevant-id set at cutoff `k`, returning all\n * four metrics together so callers compute the document ranking once and read\n * every score off the result.\n */\nexport function evaluateRanking(rankedIds: string[], relevantIds: ReadonlySet<string>, k: number): QueryEvalMetrics {\n return {\n ndcg: ndcgAtK(rankedIds, relevantIds, k),\n mrr: reciprocalRankAtK(rankedIds, relevantIds, k),\n precision: precisionAtK(rankedIds, relevantIds, k),\n recall: recallAtK(rankedIds, relevantIds, k),\n relevant_total: relevantIds.size,\n retrieved_relevant: countRelevantInTopK(rankedIds, relevantIds, k),\n };\n}\n\n/** Macro-averaged metrics across all evaluated queries. */\nexport interface AggregateEvalMetrics {\n ndcg: number;\n mrr: number;\n precision: number;\n recall: number;\n query_count: number;\n}\n\n/**\n * Macro-average per-query metrics (each query weighted equally). Returns all\n * zeros with `query_count: 0` for an empty input so the gate path has a stable\n * shape to compare against.\n */\nexport function aggregateEvalMetrics(perQuery: QueryEvalMetrics[]): AggregateEvalMetrics {\n const queryCount = perQuery.length;\n if (queryCount === 0) {\n return { ndcg: 0, mrr: 0, precision: 0, recall: 0, query_count: 0 };\n }\n const sum = perQuery.reduce(\n (accumulator, metrics) => ({\n ndcg: accumulator.ndcg + metrics.ndcg,\n mrr: accumulator.mrr + metrics.mrr,\n precision: accumulator.precision + metrics.precision,\n recall: accumulator.recall + metrics.recall,\n }),\n { ndcg: 0, mrr: 0, precision: 0, recall: 0 },\n );\n return {\n ndcg: sum.ndcg / queryCount,\n mrr: sum.mrr / queryCount,\n precision: sum.precision / queryCount,\n recall: sum.recall / queryCount,\n query_count: queryCount,\n };\n}\n\n/**\n * Validate one raw golden-query entry, returning a typed {@link EvalQuery}.\n * Throws {@link EvalQuerySetError} (with the entry index) for a missing/empty\n * `query`, a `relevant_ids` that is not a non-empty string array, or an invalid\n * `mode`. `relevant_ids` are trimmed and de-duplicated; `description` is kept\n * only when it is a non-empty string.\n */\nfunction parseEvalQueryEntry(raw: unknown, index: number): EvalQuery {\n if (typeof raw !== \"object\" || raw === null) {\n throw new EvalQuerySetError(`Eval query at index ${index} must be an object`);\n }\n const entry = raw as { query?: unknown; relevant_ids?: unknown; mode?: unknown; description?: unknown };\n const query = typeof entry.query === \"string\" ? entry.query.trim() : \"\";\n if (query.length === 0) {\n throw new EvalQuerySetError(`Eval query at index ${index} must have a non-empty \"query\" string`);\n }\n if (!Array.isArray(entry.relevant_ids)) {\n throw new EvalQuerySetError(`Eval query at index ${index} must have a \"relevant_ids\" array`);\n }\n if (entry.relevant_ids.some((value) => typeof value !== \"string\")) {\n // Reject (rather than silently drop) non-string members: malformed golden\n // data must fail loudly so it can never quietly change relevance judgments.\n throw new EvalQuerySetError(`Eval query at index ${index} must have a \"relevant_ids\" array of strings`);\n }\n const relevantIds = [\n ...new Set((entry.relevant_ids as string[]).map((value) => value.trim()).filter((value) => value.length > 0)),\n ];\n if (relevantIds.length === 0) {\n throw new EvalQuerySetError(`Eval query at index ${index} must list at least one relevant id`);\n }\n if (entry.mode !== undefined && (typeof entry.mode !== \"string\" || !VALID_EVAL_MODES.has(entry.mode))) {\n throw new EvalQuerySetError(`Eval query at index ${index} has an invalid mode (expected keyword|semantic|hybrid)`);\n }\n return {\n query,\n relevant_ids: relevantIds,\n ...(entry.mode !== undefined ? { mode: entry.mode as EvalSearchMode } : {}),\n ...(typeof entry.description === \"string\" && entry.description.trim().length > 0\n ? { description: entry.description.trim() }\n : {}),\n };\n}\n\n/**\n * Parse and validate a raw golden-query payload (typically `JSON.parse` of\n * `.agents/pm/search/eval-queries.json`). Accepts either a bare array of query\n * entries or an object with a `queries` array. Throws {@link EvalQuerySetError}\n * with a precise message when the payload is not an array/object, when\n * `queries` is missing/not an array, when the set is empty, or when any entry\n * fails {@link parseEvalQueryEntry}.\n */\nexport function parseEvalQuerySet(raw: unknown): EvalQuerySet {\n const rawQueries = Array.isArray(raw)\n ? raw\n : typeof raw === \"object\" && raw !== null\n ? (raw as { queries?: unknown }).queries\n : undefined;\n if (!Array.isArray(rawQueries)) {\n throw new EvalQuerySetError('Eval query set must be an array of queries or an object with a \"queries\" array');\n }\n if (rawQueries.length === 0) {\n throw new EvalQuerySetError(\"Eval query set must contain at least one query\");\n }\n return {\n queries: rawQueries.map((entry, index) => parseEvalQueryEntry(entry, index)),\n };\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,OAAO,QAAQ;AACf,OAAO,UAAU;;;;;;;;;;ACWV,IAAM,iBAAiB;AAwBxB,IAAO,oBAAP,cAA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AgB,QAAQ;MACxB,oBAAoB,QAAQ;MAC5B,MAAM,YAAY,QAAQ,IAAI;MAC9B,KAAK,YAAY,QAAQ,GAAG;MAC5B,WAAW,YAAY,QAAQ,SAAS;MACxC,QAAQ,YAAY,QAAQ,MAAM;KACnC;EACH;AAEA,QAAM,YAAY,qBAAqB,UAAU;AACjD,QAAM,SAAS,cAAc,UAAa,UAAU,QAAQ;AAC5D,SAAO;IACL;IACA,aAAa,SAAS,QAAQ;IAC9B,WAAW;MACT,MAAM,YAAY,UAAU,IAAI;MAChC,KAAK,YAAY,UAAU,GAAG;MAC9B,WAAW,YAAY,UAAU,SAAS;MAC1C,QAAQ,YAAY,UAAU,MAAM;;IAEtC,SAAS;IACT,GAAI,cAAc,SAAY,EAAE,YAAY,UAAS,IAAK,CAAA;IAC1D;;AAEJ;",
|
|
6
6
|
"names": ["VALID_EVAL_MODES", "global"]
|
|
7
7
|
}
|
|
@@ -1,25 +1,29 @@
|
|
|
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]="2c8d5c7c-cb86-5093-b2d7-5ea51af4a122")}catch(e){}}();
|
|
3
3
|
import {
|
|
4
4
|
runSearch
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ZJB3UV5U.js";
|
|
6
6
|
import "./chunk-ROGZTCCB.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-AIKU3IIL.js";
|
|
7
|
+
import "./chunk-YSAH5FY5.js";
|
|
9
8
|
import "./chunk-QB7XMHJW.js";
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-5JE6SMYS.js";
|
|
10
|
+
import "./chunk-YFIE7YK6.js";
|
|
11
|
+
import "./chunk-7QH7DHUB.js";
|
|
12
|
+
import "./chunk-KGHH652T.js";
|
|
13
|
+
import "./chunk-57C2RLW5.js";
|
|
14
|
+
import "./chunk-HK72NWAD.js";
|
|
15
|
+
import "./chunk-FJRKQREY.js";
|
|
16
|
+
import {
|
|
17
|
+
PmCliError
|
|
18
|
+
} from "./chunk-US3T3W5J.js";
|
|
19
|
+
import "./chunk-NNHHXJB2.js";
|
|
15
20
|
import {
|
|
16
21
|
EXIT_CODE,
|
|
17
|
-
PmCliError,
|
|
18
22
|
coercePositiveInteger,
|
|
19
23
|
getSettingsPath,
|
|
20
24
|
pathExists,
|
|
21
25
|
resolvePmRoot
|
|
22
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-YD5FML7K.js";
|
|
23
27
|
|
|
24
28
|
// dist/cli/commands/eval.js
|
|
25
29
|
import fs from "node:fs/promises";
|
|
@@ -269,6 +273,6 @@ export {
|
|
|
269
273
|
DEFAULT_EVAL_QUERIES_RELATIVE_PATH,
|
|
270
274
|
runEval
|
|
271
275
|
};
|
|
272
|
-
//# sourceMappingURL=eval-
|
|
276
|
+
//# sourceMappingURL=eval-PHOTWYHI.js.map
|
|
273
277
|
|
|
274
|
-
//# debugId=
|
|
278
|
+
//# debugId=2c8d5c7c-cb86-5093-b2d7-5ea51af4a122
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../cli/commands/eval.ts","../../../../../../../../core/search/eval.ts"],"sourcesContent":["/**\n * @module cli/commands/eval\n *\n * Implements the `pm eval` command surface (pm-u8n5): a search-relevance\n * evaluation runner that scores a human-curated golden-query set against the\n * live retrieval path and reports nDCG@k, MRR@k, precision@k, and recall@k per\n * query plus the macro average. With `--fail-under` it doubles as a CI gate so\n * relevance regressions — from corpus changes, hybrid-weight changes, or\n * provider swaps (including the offline BM25 provider, pm-75k9) — fail the build\n * instead of silently degrading retrieval quality.\n */\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport {\n aggregateEvalMetrics,\n DEFAULT_EVAL_K,\n evaluateRanking,\n parseEvalQuerySet,\n type EvalSearchMode,\n type QueryEvalMetrics,\n} from \"../../core/search/eval.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 { coercePositiveInteger } from \"../../core/shared/primitives.js\";\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { runSearch } from \"./search.js\";\n\n/**\n * Relative location (under the pm root) of the default golden-query set. A\n * git-tracked, human-curated file so relevance ground truth lives alongside the\n * tracker it evaluates.\n */\nexport const DEFAULT_EVAL_QUERIES_RELATIVE_PATH = path.join(\"search\", \"eval-queries.json\");\n\n/**\n * Documents the eval command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface EvalOptions {\n /** Default retrieval mode for queries that do not set their own (keyword|semantic|hybrid). */\n mode?: string;\n /** Metric cutoff (`@k`); positive integer, defaults to {@link DEFAULT_EVAL_K}. */\n k?: string | number;\n /** Gate threshold: exit non-zero when the aggregate nDCG@k falls below this `[0,1]` value. */\n failUnder?: string | number;\n /** Override path to the golden-query JSON file (defaults to `<pmRoot>/search/eval-queries.json`). */\n queries?: string;\n /** Output format override: json|toon. */\n format?: string;\n}\n\n/** Per-query relevance report row emitted by {@link runEval}. */\nexport interface EvalQueryReport {\n query: string;\n mode: EvalSearchMode;\n relevant_total: number;\n retrieved_relevant: number;\n ndcg: number;\n mrr: number;\n precision: number;\n recall: number;\n}\n\n/**\n * Documents the eval result payload exchanged by command, SDK, and package integrations.\n */\nexport interface EvalResult {\n k: number;\n query_count: number;\n aggregate: {\n ndcg: number;\n mrr: number;\n precision: number;\n recall: number;\n };\n queries: EvalQueryReport[];\n /** Present only when `--fail-under` was supplied. */\n fail_under?: number;\n /** Whether the aggregate nDCG met the gate (always true when no gate is set). */\n passed: boolean;\n}\n\nconst VALID_EVAL_MODES: ReadonlySet<string> = new Set<EvalSearchMode>([\"keyword\", \"semantic\", \"hybrid\"]);\n\nfunction parseEvalMode(raw: string | undefined): EvalSearchMode {\n if (raw === undefined) {\n return \"keyword\";\n }\n const normalized = raw.trim().toLowerCase();\n if (!VALID_EVAL_MODES.has(normalized)) {\n throw new PmCliError(\"Eval --mode must be one of keyword|semantic|hybrid\", EXIT_CODE.USAGE);\n }\n return normalized as EvalSearchMode;\n}\n\nfunction parseEvalK(raw: string | number | undefined): number {\n if (raw === undefined || raw === \"\") {\n return DEFAULT_EVAL_K;\n }\n const parsed = coercePositiveInteger(raw);\n if (parsed === null) {\n throw new PmCliError(\"Eval --k must be a positive integer\", EXIT_CODE.USAGE);\n }\n return parsed;\n}\n\nfunction parseFailUnder(raw: string | number | undefined): number | undefined {\n if (raw === undefined || raw === \"\") {\n return undefined;\n }\n const parsed = typeof raw === \"number\" ? raw : Number(String(raw).trim());\n if (!Number.isFinite(parsed) || parsed < 0 || parsed > 1) {\n throw new PmCliError(\"Eval --fail-under must be a number in the range [0, 1]\", EXIT_CODE.USAGE);\n }\n return parsed;\n}\n\n/** Round a metric to four decimals to keep the JSON output compact and stable. */\nfunction roundMetric(value: number): number {\n return Math.round(value * 10_000) / 10_000;\n}\n\nasync function loadEvalQuerySet(queriesPath: string): Promise<ReturnType<typeof parseEvalQuerySet>> {\n let raw: string;\n try {\n raw = await fs.readFile(queriesPath, \"utf8\");\n } catch {\n throw new PmCliError(`Eval query set not found at ${queriesPath}`, EXIT_CODE.NOT_FOUND, {\n examples: [\n 'echo \\'[{\"query\":\"offline search\",\"relevant_ids\":[\"pm-75k9\"]}]\\' > ' + queriesPath,\n \"pm eval --queries ./my-eval.json\",\n ],\n nextSteps: [\n \"Create a git-tracked golden-query JSON file (an array of {query, relevant_ids, mode?} objects), then re-run pm eval.\",\n ],\n });\n }\n let parsed: unknown;\n try {\n parsed = JSON.parse(raw);\n } catch (error: unknown) {\n // JSON.parse only ever throws a SyntaxError (an Error subclass).\n throw new PmCliError(\n `Eval query set at ${queriesPath} is not valid JSON: ${(error as Error).message}`,\n EXIT_CODE.USAGE,\n );\n }\n try {\n return parseEvalQuerySet(parsed);\n } catch (error: unknown) {\n // parseEvalQuerySet only ever throws EvalQuerySetError (an Error subclass\n // with a precise, author-actionable message) — surface it as a usage error.\n throw new PmCliError((error as Error).message, EXIT_CODE.USAGE);\n }\n}\n\n/**\n * Run the search-relevance evaluation (pm-u8n5). Loads the golden-query set\n * (default `<pmRoot>/search/eval-queries.json`, overridable via `--queries`),\n * runs each query through {@link runSearch} at the resolved mode, scores the\n * returned ranking with the nDCG/MRR/precision/recall metrics, and macro-averages\n * across queries. When `--fail-under` is supplied, `passed` reflects whether the\n * aggregate nDCG@k cleared the threshold; the CLI layer maps a failed gate to a\n * non-zero exit code.\n */\nexport async function runEval(options: EvalOptions, global: GlobalOptions): Promise<EvalResult> {\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 const k = parseEvalK(options.k);\n const defaultMode = parseEvalMode(options.mode);\n const failUnder = parseFailUnder(options.failUnder);\n const queriesPath = options.queries\n ? path.resolve(process.cwd(), options.queries)\n : path.join(pmRoot, DEFAULT_EVAL_QUERIES_RELATIVE_PATH);\n const querySet = await loadEvalQuerySet(queriesPath);\n\n const reports: EvalQueryReport[] = [];\n // Aggregate and gate on the UNROUNDED metrics; rounding is applied only to the\n // emitted report values so display precision never flips a --fail-under decision.\n const rawMetrics: QueryEvalMetrics[] = [];\n for (const evalQuery of querySet.queries) {\n const mode = evalQuery.mode ?? defaultMode;\n const searchResult = await runSearch(\n evalQuery.query,\n { mode, limit: String(k), fields: \"id\" },\n global,\n );\n const rankedIds = searchResult.items\n .map((item) => (item as { id?: unknown }).id)\n .filter((id): id is string => typeof id === \"string\");\n const metrics = evaluateRanking(rankedIds, new Set(evalQuery.relevant_ids), k);\n rawMetrics.push(metrics);\n reports.push({\n query: evalQuery.query,\n mode,\n relevant_total: metrics.relevant_total,\n retrieved_relevant: metrics.retrieved_relevant,\n ndcg: roundMetric(metrics.ndcg),\n mrr: roundMetric(metrics.mrr),\n precision: roundMetric(metrics.precision),\n recall: roundMetric(metrics.recall),\n });\n }\n\n const aggregate = aggregateEvalMetrics(rawMetrics);\n const passed = failUnder === undefined || aggregate.ndcg >= failUnder;\n return {\n k,\n query_count: querySet.queries.length,\n aggregate: {\n ndcg: roundMetric(aggregate.ndcg),\n mrr: roundMetric(aggregate.mrr),\n precision: roundMetric(aggregate.precision),\n recall: roundMetric(aggregate.recall),\n },\n queries: reports,\n ...(failUnder !== undefined ? { fail_under: failUnder } : {}),\n passed,\n };\n}\n","/**\n * @module core/search/eval\n *\n * Search relevance evaluation primitives (pm-u8n5). Implements the standard\n * offline ranking metrics — nDCG@k, MRR@k, precision@k, recall@k — over a\n * human-curated golden-query set, plus the loader/validator for that set. The\n * `pm eval` command (src/cli/commands/eval.ts) runs each golden query through\n * the live retrieval path and feeds the ranked ids here, so relevance\n * regressions from corpus changes, hybrid-weight changes, or provider swaps are\n * measurable and gateable in CI.\n *\n * Relevance is binary: an id is either in a query's `relevant_ids` set or it is\n * not. This keeps the golden set cheap to curate while still supporting the\n * graded-discount behavior of DCG (earlier hits are worth more).\n */\n\n/**\n * Retrieval mode a golden query is evaluated under. Mirrors the `pm search`\n * mode surface; omitting it on a query defers to the eval run's default mode.\n */\nexport type EvalSearchMode = \"keyword\" | \"semantic\" | \"hybrid\";\n\n/** Default cutoff (`@k`) used for every metric when the caller does not override it. */\nexport const DEFAULT_EVAL_K = 10;\n\n/**\n * One curated golden query: the query text, the set of item ids considered\n * relevant, an optional per-query retrieval mode override, and an optional\n * human-readable description of the relevance intent.\n */\nexport interface EvalQuery {\n query: string;\n relevant_ids: string[];\n mode?: EvalSearchMode;\n description?: string;\n}\n\n/** A parsed, validated golden-query set. */\nexport interface EvalQuerySet {\n queries: EvalQuery[];\n}\n\n/**\n * Thrown by {@link parseEvalQuerySet} when the raw golden-query payload is\n * structurally invalid. Carries a precise, human-actionable message naming the\n * offending query index/field so an author can fix the JSON directly.\n */\nexport class EvalQuerySetError extends Error {\n /** Construct an error describing why a golden-query set failed validation. */\n constructor(message: string) {\n super(message);\n this.name = \"EvalQuerySetError\";\n }\n}\n\nconst VALID_EVAL_MODES: ReadonlySet<string> = new Set<EvalSearchMode>([\"keyword\", \"semantic\", \"hybrid\"]);\n\n/**\n * Compute Discounted Cumulative Gain at cutoff `k` for an ordered list of binary\n * relevance gains (`1` relevant, `0` not). Position `i` (1-based) contributes\n * `gain / log2(i + 1)`, so a relevant hit ranked first is worth `1` and later\n * hits are progressively discounted. Gains beyond `k` are ignored.\n */\nexport function dcgAtK(relevanceGains: number[], k: number): number {\n let dcg = 0;\n const limit = Math.min(k, relevanceGains.length);\n for (let index = 0; index < limit; index += 1) {\n dcg += relevanceGains[index] / Math.log2(index + 2);\n }\n return dcg;\n}\n\n/**\n * Normalized DCG at cutoff `k`: the ranking's DCG divided by the DCG of the\n * ideal ranking (all relevant ids first). Returns `0` when the query has no\n * relevant ids (the ideal DCG is `0` and the score is undefined), giving a\n * stable lower bound for aggregation. Result is in `[0, 1]`.\n */\nexport function ndcgAtK(rankedIds: string[], relevantIds: ReadonlySet<string>, k: number): number {\n if (relevantIds.size === 0) {\n return 0;\n }\n const gains = rankedIds.map((id) => (relevantIds.has(id) ? 1 : 0));\n const dcg = dcgAtK(gains, k);\n const idealGains = Array.from({ length: relevantIds.size }, () => 1);\n const idealDcg = dcgAtK(idealGains, k);\n return idealDcg === 0 ? 0 : dcg / idealDcg;\n}\n\n/**\n * Reciprocal rank of the first relevant id within the top `k` results: `1/rank`\n * (rank is 1-based), or `0` when no relevant id appears in the cutoff. Averaged\n * across queries this is Mean Reciprocal Rank (MRR@k).\n */\nexport function reciprocalRankAtK(rankedIds: string[], relevantIds: ReadonlySet<string>, k: number): number {\n const limit = Math.min(k, rankedIds.length);\n for (let index = 0; index < limit; index += 1) {\n if (relevantIds.has(rankedIds[index])) {\n return 1 / (index + 1);\n }\n }\n return 0;\n}\n\n/**\n * Count relevant ids within the top `k` results (shared by precision and\n * recall).\n */\nfunction countRelevantInTopK(rankedIds: string[], relevantIds: ReadonlySet<string>, k: number): number {\n const limit = Math.min(k, rankedIds.length);\n let hits = 0;\n for (let index = 0; index < limit; index += 1) {\n if (relevantIds.has(rankedIds[index])) {\n hits += 1;\n }\n }\n return hits;\n}\n\n/**\n * Precision at cutoff `k`: relevant ids retrieved in the top `k` divided by `k`.\n * Returns `0` for a non-positive `k`.\n */\nexport function precisionAtK(rankedIds: string[], relevantIds: ReadonlySet<string>, k: number): number {\n if (k <= 0) {\n return 0;\n }\n return countRelevantInTopK(rankedIds, relevantIds, k) / k;\n}\n\n/**\n * Recall at cutoff `k`: relevant ids retrieved in the top `k` divided by the\n * total number of relevant ids. Returns `0` when the query has no relevant ids.\n */\nexport function recallAtK(rankedIds: string[], relevantIds: ReadonlySet<string>, k: number): number {\n if (relevantIds.size === 0) {\n return 0;\n }\n return countRelevantInTopK(rankedIds, relevantIds, k) / relevantIds.size;\n}\n\n/** The four ranking metrics computed for a single query, plus match counts. */\nexport interface QueryEvalMetrics {\n ndcg: number;\n mrr: number;\n precision: number;\n recall: number;\n relevant_total: number;\n retrieved_relevant: number;\n}\n\n/**\n * Evaluate one ranking against its relevant-id set at cutoff `k`, returning all\n * four metrics together so callers compute the document ranking once and read\n * every score off the result.\n */\nexport function evaluateRanking(rankedIds: string[], relevantIds: ReadonlySet<string>, k: number): QueryEvalMetrics {\n return {\n ndcg: ndcgAtK(rankedIds, relevantIds, k),\n mrr: reciprocalRankAtK(rankedIds, relevantIds, k),\n precision: precisionAtK(rankedIds, relevantIds, k),\n recall: recallAtK(rankedIds, relevantIds, k),\n relevant_total: relevantIds.size,\n retrieved_relevant: countRelevantInTopK(rankedIds, relevantIds, k),\n };\n}\n\n/** Macro-averaged metrics across all evaluated queries. */\nexport interface AggregateEvalMetrics {\n ndcg: number;\n mrr: number;\n precision: number;\n recall: number;\n query_count: number;\n}\n\n/**\n * Macro-average per-query metrics (each query weighted equally). Returns all\n * zeros with `query_count: 0` for an empty input so the gate path has a stable\n * shape to compare against.\n */\nexport function aggregateEvalMetrics(perQuery: QueryEvalMetrics[]): AggregateEvalMetrics {\n const queryCount = perQuery.length;\n if (queryCount === 0) {\n return { ndcg: 0, mrr: 0, precision: 0, recall: 0, query_count: 0 };\n }\n const sum = perQuery.reduce(\n (accumulator, metrics) => ({\n ndcg: accumulator.ndcg + metrics.ndcg,\n mrr: accumulator.mrr + metrics.mrr,\n precision: accumulator.precision + metrics.precision,\n recall: accumulator.recall + metrics.recall,\n }),\n { ndcg: 0, mrr: 0, precision: 0, recall: 0 },\n );\n return {\n ndcg: sum.ndcg / queryCount,\n mrr: sum.mrr / queryCount,\n precision: sum.precision / queryCount,\n recall: sum.recall / queryCount,\n query_count: queryCount,\n };\n}\n\n/**\n * Validate one raw golden-query entry, returning a typed {@link EvalQuery}.\n * Throws {@link EvalQuerySetError} (with the entry index) for a missing/empty\n * `query`, a `relevant_ids` that is not a non-empty string array, or an invalid\n * `mode`. `relevant_ids` are trimmed and de-duplicated; `description` is kept\n * only when it is a non-empty string.\n */\nfunction parseEvalQueryEntry(raw: unknown, index: number): EvalQuery {\n if (typeof raw !== \"object\" || raw === null) {\n throw new EvalQuerySetError(`Eval query at index ${index} must be an object`);\n }\n const entry = raw as { query?: unknown; relevant_ids?: unknown; mode?: unknown; description?: unknown };\n const query = typeof entry.query === \"string\" ? entry.query.trim() : \"\";\n if (query.length === 0) {\n throw new EvalQuerySetError(`Eval query at index ${index} must have a non-empty \"query\" string`);\n }\n if (!Array.isArray(entry.relevant_ids)) {\n throw new EvalQuerySetError(`Eval query at index ${index} must have a \"relevant_ids\" array`);\n }\n if (entry.relevant_ids.some((value) => typeof value !== \"string\")) {\n // Reject (rather than silently drop) non-string members: malformed golden\n // data must fail loudly so it can never quietly change relevance judgments.\n throw new EvalQuerySetError(`Eval query at index ${index} must have a \"relevant_ids\" array of strings`);\n }\n const relevantIds = [\n ...new Set((entry.relevant_ids as string[]).map((value) => value.trim()).filter((value) => value.length > 0)),\n ];\n if (relevantIds.length === 0) {\n throw new EvalQuerySetError(`Eval query at index ${index} must list at least one relevant id`);\n }\n if (entry.mode !== undefined && (typeof entry.mode !== \"string\" || !VALID_EVAL_MODES.has(entry.mode))) {\n throw new EvalQuerySetError(`Eval query at index ${index} has an invalid mode (expected keyword|semantic|hybrid)`);\n }\n return {\n query,\n relevant_ids: relevantIds,\n ...(entry.mode !== undefined ? { mode: entry.mode as EvalSearchMode } : {}),\n ...(typeof entry.description === \"string\" && entry.description.trim().length > 0\n ? { description: entry.description.trim() }\n : {}),\n };\n}\n\n/**\n * Parse and validate a raw golden-query payload (typically `JSON.parse` of\n * `.agents/pm/search/eval-queries.json`). Accepts either a bare array of query\n * entries or an object with a `queries` array. Throws {@link EvalQuerySetError}\n * with a precise message when the payload is not an array/object, when\n * `queries` is missing/not an array, when the set is empty, or when any entry\n * fails {@link parseEvalQueryEntry}.\n */\nexport function parseEvalQuerySet(raw: unknown): EvalQuerySet {\n const rawQueries = Array.isArray(raw)\n ? raw\n : typeof raw === \"object\" && raw !== null\n ? (raw as { queries?: unknown }).queries\n : undefined;\n if (!Array.isArray(rawQueries)) {\n throw new EvalQuerySetError('Eval query set must be an array of queries or an object with a \"queries\" array');\n }\n if (rawQueries.length === 0) {\n throw new EvalQuerySetError(\"Eval query set must contain at least one query\");\n }\n return {\n queries: rawQueries.map((entry, index) => parseEvalQueryEntry(entry, index)),\n };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AAM,UAAU,gBAAgB,WAAW,IAAI,IAAI,UAAU,YAAY,GAAG,CAAC;AAC7E,eAAW,KAAK,OAAO;AACvB,YAAQ,KAAK;MACX,OAAO,UAAU;MACjB;MACA,gBAAgB,QAAQ;MACxB,oBAAoB,QAAQ;MAC5B,MAAM,YAAY,QAAQ,IAAI;MAC9B,KAAK,YAAY,QAAQ,GAAG;MAC5B,WAAW,YAAY,QAAQ,SAAS;MACxC,QAAQ,YAAY,QAAQ,MAAM;KACnC;EACH;AAEA,QAAM,YAAY,qBAAqB,UAAU;AACjD,QAAM,SAAS,cAAc,UAAa,UAAU,QAAQ;AAC5D,SAAO;IACL;IACA,aAAa,SAAS,QAAQ;IAC9B,WAAW;MACT,MAAM,YAAY,UAAU,IAAI;MAChC,KAAK,YAAY,UAAU,GAAG;MAC9B,WAAW,YAAY,UAAU,SAAS;MAC1C,QAAQ,YAAY,UAAU,MAAM;;IAEtC,SAAS;IACT,GAAI,cAAc,SAAY,EAAE,YAAY,UAAS,IAAK,CAAA;IAC1D;;AAEJ","debugId":"1bf1a409-5b60-5bd6-b175-193e4e6ffb19"}
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../cli/commands/eval.ts","../../../../../../../../core/search/eval.ts"],"sourcesContent":["/**\n * @module cli/commands/eval\n *\n * Implements the `pm eval` command surface (pm-u8n5): a search-relevance\n * evaluation runner that scores a human-curated golden-query set against the\n * live retrieval path and reports nDCG@k, MRR@k, precision@k, and recall@k per\n * query plus the macro average. With `--fail-under` it doubles as a CI gate so\n * relevance regressions — from corpus changes, hybrid-weight changes, or\n * provider swaps (including the offline BM25 provider, pm-75k9) — fail the build\n * instead of silently degrading retrieval quality.\n */\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport {\n aggregateEvalMetrics,\n DEFAULT_EVAL_K,\n evaluateRanking,\n parseEvalQuerySet,\n type EvalSearchMode,\n type QueryEvalMetrics,\n} from \"../../core/search/eval.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 { coercePositiveInteger } from \"../../core/shared/primitives.js\";\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { runSearch } from \"./search.js\";\n\n/**\n * Relative location (under the pm root) of the default golden-query set. A\n * git-tracked, human-curated file so relevance ground truth lives alongside the\n * tracker it evaluates.\n */\nexport const DEFAULT_EVAL_QUERIES_RELATIVE_PATH = path.join(\"search\", \"eval-queries.json\");\n\n/**\n * Documents the eval command options payload exchanged by command, SDK, and package integrations.\n */\nexport interface EvalOptions {\n /** Default retrieval mode for queries that do not set their own (keyword|semantic|hybrid). */\n mode?: string;\n /** Metric cutoff (`@k`); positive integer, defaults to {@link DEFAULT_EVAL_K}. */\n k?: string | number;\n /** Gate threshold: exit non-zero when the aggregate nDCG@k falls below this `[0,1]` value. */\n failUnder?: string | number;\n /** Override path to the golden-query JSON file (defaults to `<pmRoot>/search/eval-queries.json`). */\n queries?: string;\n /** Output format override: json|toon. */\n format?: string;\n}\n\n/** Per-query relevance report row emitted by {@link runEval}. */\nexport interface EvalQueryReport {\n query: string;\n mode: EvalSearchMode;\n relevant_total: number;\n retrieved_relevant: number;\n ndcg: number;\n mrr: number;\n precision: number;\n recall: number;\n}\n\n/**\n * Documents the eval result payload exchanged by command, SDK, and package integrations.\n */\nexport interface EvalResult {\n k: number;\n query_count: number;\n aggregate: {\n ndcg: number;\n mrr: number;\n precision: number;\n recall: number;\n };\n queries: EvalQueryReport[];\n /** Present only when `--fail-under` was supplied. */\n fail_under?: number;\n /** Whether the aggregate nDCG met the gate (always true when no gate is set). */\n passed: boolean;\n}\n\nconst VALID_EVAL_MODES: ReadonlySet<string> = new Set<EvalSearchMode>([\"keyword\", \"semantic\", \"hybrid\"]);\n\nfunction parseEvalMode(raw: string | undefined): EvalSearchMode {\n if (raw === undefined) {\n return \"keyword\";\n }\n const normalized = raw.trim().toLowerCase();\n if (!VALID_EVAL_MODES.has(normalized)) {\n throw new PmCliError(\"Eval --mode must be one of keyword|semantic|hybrid\", EXIT_CODE.USAGE);\n }\n return normalized as EvalSearchMode;\n}\n\nfunction parseEvalK(raw: string | number | undefined): number {\n if (raw === undefined || raw === \"\") {\n return DEFAULT_EVAL_K;\n }\n const parsed = coercePositiveInteger(raw);\n if (parsed === null) {\n throw new PmCliError(\"Eval --k must be a positive integer\", EXIT_CODE.USAGE);\n }\n return parsed;\n}\n\nfunction parseFailUnder(raw: string | number | undefined): number | undefined {\n if (raw === undefined || raw === \"\") {\n return undefined;\n }\n const parsed = typeof raw === \"number\" ? raw : Number(String(raw).trim());\n if (!Number.isFinite(parsed) || parsed < 0 || parsed > 1) {\n throw new PmCliError(\"Eval --fail-under must be a number in the range [0, 1]\", EXIT_CODE.USAGE);\n }\n return parsed;\n}\n\n/** Round a metric to four decimals to keep the JSON output compact and stable. */\nfunction roundMetric(value: number): number {\n return Math.round(value * 10_000) / 10_000;\n}\n\nasync function loadEvalQuerySet(queriesPath: string): Promise<ReturnType<typeof parseEvalQuerySet>> {\n let raw: string;\n try {\n raw = await fs.readFile(queriesPath, \"utf8\");\n } catch {\n throw new PmCliError(`Eval query set not found at ${queriesPath}`, EXIT_CODE.NOT_FOUND, {\n examples: [\n 'echo \\'[{\"query\":\"offline search\",\"relevant_ids\":[\"pm-75k9\"]}]\\' > ' + queriesPath,\n \"pm eval --queries ./my-eval.json\",\n ],\n nextSteps: [\n \"Create a git-tracked golden-query JSON file (an array of {query, relevant_ids, mode?} objects), then re-run pm eval.\",\n ],\n });\n }\n let parsed: unknown;\n try {\n parsed = JSON.parse(raw);\n } catch (error: unknown) {\n // JSON.parse only ever throws a SyntaxError (an Error subclass).\n throw new PmCliError(\n `Eval query set at ${queriesPath} is not valid JSON: ${(error as Error).message}`,\n EXIT_CODE.USAGE,\n );\n }\n try {\n return parseEvalQuerySet(parsed);\n } catch (error: unknown) {\n // parseEvalQuerySet only ever throws EvalQuerySetError (an Error subclass\n // with a precise, author-actionable message) — surface it as a usage error.\n throw new PmCliError((error as Error).message, EXIT_CODE.USAGE);\n }\n}\n\n/**\n * Run the search-relevance evaluation (pm-u8n5). Loads the golden-query set\n * (default `<pmRoot>/search/eval-queries.json`, overridable via `--queries`),\n * runs each query through {@link runSearch} at the resolved mode, scores the\n * returned ranking with the nDCG/MRR/precision/recall metrics, and macro-averages\n * across queries. When `--fail-under` is supplied, `passed` reflects whether the\n * aggregate nDCG@k cleared the threshold; the CLI layer maps a failed gate to a\n * non-zero exit code.\n */\nexport async function runEval(options: EvalOptions, global: GlobalOptions): Promise<EvalResult> {\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 const k = parseEvalK(options.k);\n const defaultMode = parseEvalMode(options.mode);\n const failUnder = parseFailUnder(options.failUnder);\n const queriesPath = options.queries\n ? path.resolve(process.cwd(), options.queries)\n : path.join(pmRoot, DEFAULT_EVAL_QUERIES_RELATIVE_PATH);\n const querySet = await loadEvalQuerySet(queriesPath);\n\n const reports: EvalQueryReport[] = [];\n // Aggregate and gate on the UNROUNDED metrics; rounding is applied only to the\n // emitted report values so display precision never flips a --fail-under decision.\n const rawMetrics: QueryEvalMetrics[] = [];\n for (const evalQuery of querySet.queries) {\n const mode = evalQuery.mode ?? defaultMode;\n const searchResult = await runSearch(\n evalQuery.query,\n { mode, limit: String(k), fields: \"id\" },\n global,\n );\n const rankedIds = searchResult.items\n .map((item) => (item as { id?: unknown }).id)\n .filter((id): id is string => typeof id === \"string\");\n const metrics = evaluateRanking(rankedIds, new Set(evalQuery.relevant_ids), k);\n rawMetrics.push(metrics);\n reports.push({\n query: evalQuery.query,\n mode,\n relevant_total: metrics.relevant_total,\n retrieved_relevant: metrics.retrieved_relevant,\n ndcg: roundMetric(metrics.ndcg),\n mrr: roundMetric(metrics.mrr),\n precision: roundMetric(metrics.precision),\n recall: roundMetric(metrics.recall),\n });\n }\n\n const aggregate = aggregateEvalMetrics(rawMetrics);\n const passed = failUnder === undefined || aggregate.ndcg >= failUnder;\n return {\n k,\n query_count: querySet.queries.length,\n aggregate: {\n ndcg: roundMetric(aggregate.ndcg),\n mrr: roundMetric(aggregate.mrr),\n precision: roundMetric(aggregate.precision),\n recall: roundMetric(aggregate.recall),\n },\n queries: reports,\n ...(failUnder !== undefined ? { fail_under: failUnder } : {}),\n passed,\n };\n}\n","/**\n * @module core/search/eval\n *\n * Search relevance evaluation primitives (pm-u8n5). Implements the standard\n * offline ranking metrics — nDCG@k, MRR@k, precision@k, recall@k — over a\n * human-curated golden-query set, plus the loader/validator for that set. The\n * `pm eval` command (src/cli/commands/eval.ts) runs each golden query through\n * the live retrieval path and feeds the ranked ids here, so relevance\n * regressions from corpus changes, hybrid-weight changes, or provider swaps are\n * measurable and gateable in CI.\n *\n * Relevance is binary: an id is either in a query's `relevant_ids` set or it is\n * not. This keeps the golden set cheap to curate while still supporting the\n * graded-discount behavior of DCG (earlier hits are worth more).\n */\n\n/**\n * Retrieval mode a golden query is evaluated under. Mirrors the `pm search`\n * mode surface; omitting it on a query defers to the eval run's default mode.\n */\nexport type EvalSearchMode = \"keyword\" | \"semantic\" | \"hybrid\";\n\n/** Default cutoff (`@k`) used for every metric when the caller does not override it. */\nexport const DEFAULT_EVAL_K = 10;\n\n/**\n * One curated golden query: the query text, the set of item ids considered\n * relevant, an optional per-query retrieval mode override, and an optional\n * human-readable description of the relevance intent.\n */\nexport interface EvalQuery {\n query: string;\n relevant_ids: string[];\n mode?: EvalSearchMode;\n description?: string;\n}\n\n/** A parsed, validated golden-query set. */\nexport interface EvalQuerySet {\n queries: EvalQuery[];\n}\n\n/**\n * Thrown by {@link parseEvalQuerySet} when the raw golden-query payload is\n * structurally invalid. Carries a precise, human-actionable message naming the\n * offending query index/field so an author can fix the JSON directly.\n */\nexport class EvalQuerySetError extends Error {\n /** Construct an error describing why a golden-query set failed validation. */\n constructor(message: string) {\n super(message);\n this.name = \"EvalQuerySetError\";\n }\n}\n\nconst VALID_EVAL_MODES: ReadonlySet<string> = new Set<EvalSearchMode>([\"keyword\", \"semantic\", \"hybrid\"]);\n\n/**\n * Compute Discounted Cumulative Gain at cutoff `k` for an ordered list of binary\n * relevance gains (`1` relevant, `0` not). Position `i` (1-based) contributes\n * `gain / log2(i + 1)`, so a relevant hit ranked first is worth `1` and later\n * hits are progressively discounted. Gains beyond `k` are ignored.\n */\nexport function dcgAtK(relevanceGains: number[], k: number): number {\n let dcg = 0;\n const limit = Math.min(k, relevanceGains.length);\n for (let index = 0; index < limit; index += 1) {\n dcg += relevanceGains[index] / Math.log2(index + 2);\n }\n return dcg;\n}\n\n/**\n * Normalized DCG at cutoff `k`: the ranking's DCG divided by the DCG of the\n * ideal ranking (all relevant ids first). Returns `0` when the query has no\n * relevant ids (the ideal DCG is `0` and the score is undefined), giving a\n * stable lower bound for aggregation. Result is in `[0, 1]`.\n */\nexport function ndcgAtK(rankedIds: string[], relevantIds: ReadonlySet<string>, k: number): number {\n if (relevantIds.size === 0) {\n return 0;\n }\n const gains = rankedIds.map((id) => (relevantIds.has(id) ? 1 : 0));\n const dcg = dcgAtK(gains, k);\n const idealGains = Array.from({ length: relevantIds.size }, () => 1);\n const idealDcg = dcgAtK(idealGains, k);\n return idealDcg === 0 ? 0 : dcg / idealDcg;\n}\n\n/**\n * Reciprocal rank of the first relevant id within the top `k` results: `1/rank`\n * (rank is 1-based), or `0` when no relevant id appears in the cutoff. Averaged\n * across queries this is Mean Reciprocal Rank (MRR@k).\n */\nexport function reciprocalRankAtK(rankedIds: string[], relevantIds: ReadonlySet<string>, k: number): number {\n const limit = Math.min(k, rankedIds.length);\n for (let index = 0; index < limit; index += 1) {\n if (relevantIds.has(rankedIds[index])) {\n return 1 / (index + 1);\n }\n }\n return 0;\n}\n\n/**\n * Count relevant ids within the top `k` results (shared by precision and\n * recall).\n */\nfunction countRelevantInTopK(rankedIds: string[], relevantIds: ReadonlySet<string>, k: number): number {\n const limit = Math.min(k, rankedIds.length);\n let hits = 0;\n for (let index = 0; index < limit; index += 1) {\n if (relevantIds.has(rankedIds[index])) {\n hits += 1;\n }\n }\n return hits;\n}\n\n/**\n * Precision at cutoff `k`: relevant ids retrieved in the top `k` divided by `k`.\n * Returns `0` for a non-positive `k`.\n */\nexport function precisionAtK(rankedIds: string[], relevantIds: ReadonlySet<string>, k: number): number {\n if (k <= 0) {\n return 0;\n }\n return countRelevantInTopK(rankedIds, relevantIds, k) / k;\n}\n\n/**\n * Recall at cutoff `k`: relevant ids retrieved in the top `k` divided by the\n * total number of relevant ids. Returns `0` when the query has no relevant ids.\n */\nexport function recallAtK(rankedIds: string[], relevantIds: ReadonlySet<string>, k: number): number {\n if (relevantIds.size === 0) {\n return 0;\n }\n return countRelevantInTopK(rankedIds, relevantIds, k) / relevantIds.size;\n}\n\n/** The four ranking metrics computed for a single query, plus match counts. */\nexport interface QueryEvalMetrics {\n ndcg: number;\n mrr: number;\n precision: number;\n recall: number;\n relevant_total: number;\n retrieved_relevant: number;\n}\n\n/**\n * Evaluate one ranking against its relevant-id set at cutoff `k`, returning all\n * four metrics together so callers compute the document ranking once and read\n * every score off the result.\n */\nexport function evaluateRanking(rankedIds: string[], relevantIds: ReadonlySet<string>, k: number): QueryEvalMetrics {\n return {\n ndcg: ndcgAtK(rankedIds, relevantIds, k),\n mrr: reciprocalRankAtK(rankedIds, relevantIds, k),\n precision: precisionAtK(rankedIds, relevantIds, k),\n recall: recallAtK(rankedIds, relevantIds, k),\n relevant_total: relevantIds.size,\n retrieved_relevant: countRelevantInTopK(rankedIds, relevantIds, k),\n };\n}\n\n/** Macro-averaged metrics across all evaluated queries. */\nexport interface AggregateEvalMetrics {\n ndcg: number;\n mrr: number;\n precision: number;\n recall: number;\n query_count: number;\n}\n\n/**\n * Macro-average per-query metrics (each query weighted equally). Returns all\n * zeros with `query_count: 0` for an empty input so the gate path has a stable\n * shape to compare against.\n */\nexport function aggregateEvalMetrics(perQuery: QueryEvalMetrics[]): AggregateEvalMetrics {\n const queryCount = perQuery.length;\n if (queryCount === 0) {\n return { ndcg: 0, mrr: 0, precision: 0, recall: 0, query_count: 0 };\n }\n const sum = perQuery.reduce(\n (accumulator, metrics) => ({\n ndcg: accumulator.ndcg + metrics.ndcg,\n mrr: accumulator.mrr + metrics.mrr,\n precision: accumulator.precision + metrics.precision,\n recall: accumulator.recall + metrics.recall,\n }),\n { ndcg: 0, mrr: 0, precision: 0, recall: 0 },\n );\n return {\n ndcg: sum.ndcg / queryCount,\n mrr: sum.mrr / queryCount,\n precision: sum.precision / queryCount,\n recall: sum.recall / queryCount,\n query_count: queryCount,\n };\n}\n\n/**\n * Validate one raw golden-query entry, returning a typed {@link EvalQuery}.\n * Throws {@link EvalQuerySetError} (with the entry index) for a missing/empty\n * `query`, a `relevant_ids` that is not a non-empty string array, or an invalid\n * `mode`. `relevant_ids` are trimmed and de-duplicated; `description` is kept\n * only when it is a non-empty string.\n */\nfunction parseEvalQueryEntry(raw: unknown, index: number): EvalQuery {\n if (typeof raw !== \"object\" || raw === null) {\n throw new EvalQuerySetError(`Eval query at index ${index} must be an object`);\n }\n const entry = raw as { query?: unknown; relevant_ids?: unknown; mode?: unknown; description?: unknown };\n const query = typeof entry.query === \"string\" ? entry.query.trim() : \"\";\n if (query.length === 0) {\n throw new EvalQuerySetError(`Eval query at index ${index} must have a non-empty \"query\" string`);\n }\n if (!Array.isArray(entry.relevant_ids)) {\n throw new EvalQuerySetError(`Eval query at index ${index} must have a \"relevant_ids\" array`);\n }\n if (entry.relevant_ids.some((value) => typeof value !== \"string\")) {\n // Reject (rather than silently drop) non-string members: malformed golden\n // data must fail loudly so it can never quietly change relevance judgments.\n throw new EvalQuerySetError(`Eval query at index ${index} must have a \"relevant_ids\" array of strings`);\n }\n const relevantIds = [\n ...new Set((entry.relevant_ids as string[]).map((value) => value.trim()).filter((value) => value.length > 0)),\n ];\n if (relevantIds.length === 0) {\n throw new EvalQuerySetError(`Eval query at index ${index} must list at least one relevant id`);\n }\n if (entry.mode !== undefined && (typeof entry.mode !== \"string\" || !VALID_EVAL_MODES.has(entry.mode))) {\n throw new EvalQuerySetError(`Eval query at index ${index} has an invalid mode (expected keyword|semantic|hybrid)`);\n }\n return {\n query,\n relevant_ids: relevantIds,\n ...(entry.mode !== undefined ? { mode: entry.mode as EvalSearchMode } : {}),\n ...(typeof entry.description === \"string\" && entry.description.trim().length > 0\n ? { description: entry.description.trim() }\n : {}),\n };\n}\n\n/**\n * Parse and validate a raw golden-query payload (typically `JSON.parse` of\n * `.agents/pm/search/eval-queries.json`). Accepts either a bare array of query\n * entries or an object with a `queries` array. Throws {@link EvalQuerySetError}\n * with a precise message when the payload is not an array/object, when\n * `queries` is missing/not an array, when the set is empty, or when any entry\n * fails {@link parseEvalQueryEntry}.\n */\nexport function parseEvalQuerySet(raw: unknown): EvalQuerySet {\n const rawQueries = Array.isArray(raw)\n ? raw\n : typeof raw === \"object\" && raw !== null\n ? (raw as { queries?: unknown }).queries\n : undefined;\n if (!Array.isArray(rawQueries)) {\n throw new EvalQuerySetError('Eval query set must be an array of queries or an object with a \"queries\" array');\n }\n if (rawQueries.length === 0) {\n throw new EvalQuerySetError(\"Eval query set must contain at least one query\");\n }\n return {\n queries: rawQueries.map((entry, index) => parseEvalQueryEntry(entry, index)),\n };\n}\n"],"names":["VALID_EVAL_MODES"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,OAAO,QAAQ;AACf,OAAO,UAAU;;;ACWV,IAAM,iBAAiB;AAwBxB,IAAO,oBAAP,cAAiC,MAAK;;EAE1C,YAAY,SAAe;AACzB,UAAM,OAAO;AACb,SAAK,OAAO;EACd;;AAGF,IAAM,mBAAwC,oBAAI,IAAoB,CAAC,WAAW,YAAY,QAAQ,CAAC;AAQjG,SAAU,OAAO,gBAA0B,GAAS;AACxD,MAAI,M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AqB,UAAU;AACjD,QAAM,SAAS,cAAc,UAAa,UAAU,QAAQ;AAC5D,SAAO;IACL;IACA,aAAa,SAAS,QAAQ;IAC9B,WAAW;MACT,MAAM,YAAY,UAAU,IAAI;MAChC,KAAK,YAAY,UAAU,GAAG;MAC9B,WAAW,YAAY,UAAU,SAAS;MAC1C,QAAQ,YAAY,UAAU,MAAM;;IAEtC,SAAS;IACT,GAAI,cAAc,SAAY,EAAE,YAAY,UAAS,IAAK,CAAA;IAC1D;;AAEJ","debugId":"2c8d5c7c-cb86-5093-b2d7-5ea51af4a122"}
|
|
@@ -6,20 +6,26 @@ import {
|
|
|
6
6
|
resolveManagedExtensionStatePath,
|
|
7
7
|
runExtension,
|
|
8
8
|
writeManagedExtensionState
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-GIWXVMZ3.js";
|
|
10
|
+
import "./chunk-KDZ6K25I.js";
|
|
11
|
+
import "./chunk-ZVDL32GJ.js";
|
|
12
|
+
import "./chunk-E2FUG6GD.js";
|
|
10
13
|
import "./chunk-5HIZDR5A.js";
|
|
11
|
-
import "./chunk-JPATY4SE.js";
|
|
12
|
-
import "./chunk-6NYJGMTY.js";
|
|
13
|
-
import "./chunk-NZ7QIUP5.js";
|
|
14
14
|
import {
|
|
15
15
|
parseExtensionManifest,
|
|
16
16
|
validateExtensionDirectory
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-R3ZBLGTC.js";
|
|
18
|
+
import "./chunk-UI5BJ6DO.js";
|
|
19
|
+
import "./chunk-C3PMDWGX.js";
|
|
20
|
+
import "./chunk-4QQ6PM7M.js";
|
|
21
|
+
import "./chunk-3U3VEWK6.js";
|
|
22
|
+
import "./chunk-Y76TWC45.js";
|
|
23
|
+
import "./chunk-EZFKWSC7.js";
|
|
24
|
+
import "./chunk-DRBV5UC2.js";
|
|
25
|
+
import "./chunk-P5YORJRH.js";
|
|
26
|
+
import "./chunk-T35XLYZF.js";
|
|
27
|
+
import "./chunk-7C2O74AE.js";
|
|
28
|
+
import "./chunk-5VVUKE3U.js";
|
|
23
29
|
export {
|
|
24
30
|
_testOnly,
|
|
25
31
|
copyExtensionDirectoryForInstall,
|
|
@@ -31,4 +37,4 @@ export {
|
|
|
31
37
|
validateExtensionDirectory,
|
|
32
38
|
writeManagedExtensionState
|
|
33
39
|
};
|
|
34
|
-
//# sourceMappingURL=extension-
|
|
40
|
+
//# sourceMappingURL=extension-NBAH62ML.js.map
|
|
@@ -8,20 +8,26 @@ import {
|
|
|
8
8
|
resolveManagedExtensionStatePath,
|
|
9
9
|
runExtension,
|
|
10
10
|
writeManagedExtensionState
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-JFCVQXZX.js";
|
|
12
|
+
import "./chunk-K32L7HZO.js";
|
|
13
|
+
import "./chunk-OK5NXCZB.js";
|
|
14
|
+
import "./chunk-53BTLLAF.js";
|
|
12
15
|
import "./chunk-P4SESZGT.js";
|
|
13
|
-
import "./chunk-EJ2OCBHF.js";
|
|
14
|
-
import "./chunk-GVJE5T7Q.js";
|
|
15
|
-
import "./chunk-6CDCWKSX.js";
|
|
16
16
|
import {
|
|
17
17
|
parseExtensionManifest,
|
|
18
18
|
validateExtensionDirectory
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
19
|
+
} from "./chunk-FUM6UMY4.js";
|
|
20
|
+
import "./chunk-PPE4YUQM.js";
|
|
21
|
+
import "./chunk-AAEQMOC6.js";
|
|
22
|
+
import "./chunk-PJ3A56YF.js";
|
|
23
|
+
import "./chunk-57C2RLW5.js";
|
|
24
|
+
import "./chunk-ZAHXPXVY.js";
|
|
25
|
+
import "./chunk-HK72NWAD.js";
|
|
26
|
+
import "./chunk-FJRKQREY.js";
|
|
27
|
+
import "./chunk-US3T3W5J.js";
|
|
28
|
+
import "./chunk-NER3KUUS.js";
|
|
29
|
+
import "./chunk-NNHHXJB2.js";
|
|
30
|
+
import "./chunk-YD5FML7K.js";
|
|
25
31
|
export {
|
|
26
32
|
_testOnly,
|
|
27
33
|
copyExtensionDirectoryForInstall,
|
|
@@ -33,6 +39,6 @@ export {
|
|
|
33
39
|
validateExtensionDirectory,
|
|
34
40
|
writeManagedExtensionState
|
|
35
41
|
};
|
|
36
|
-
//# sourceMappingURL=extension-
|
|
42
|
+
//# sourceMappingURL=extension-ZF6ZZPOU.js.map
|
|
37
43
|
|
|
38
44
|
//# debugId=45eac7fa-f181-5cca-93b7-cfb58909dbb3
|
|
@@ -4,31 +4,34 @@ import {
|
|
|
4
4
|
renameArtifactsResultKey,
|
|
5
5
|
runLinkedArtifacts,
|
|
6
6
|
sortLinkedArtifacts
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WISPVC2E.js";
|
|
8
8
|
import "./chunk-7M2HAZEB.js";
|
|
9
9
|
import {
|
|
10
10
|
resolveAuthor
|
|
11
11
|
} from "./chunk-WW4E2DC3.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-T3ABIMGW.js";
|
|
13
13
|
import "./chunk-5HIZDR5A.js";
|
|
14
14
|
import {
|
|
15
15
|
locateItem,
|
|
16
16
|
mutateItem,
|
|
17
17
|
readLocatedItem
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-3U3VEWK6.js";
|
|
19
|
+
import "./chunk-EZFKWSC7.js";
|
|
20
|
+
import "./chunk-DRBV5UC2.js";
|
|
21
21
|
import {
|
|
22
|
-
EXIT_CODE,
|
|
23
22
|
PmCliError,
|
|
24
23
|
getActiveExtensionRegistrations,
|
|
24
|
+
readSettings
|
|
25
|
+
} from "./chunk-P5YORJRH.js";
|
|
26
|
+
import "./chunk-7C2O74AE.js";
|
|
27
|
+
import {
|
|
28
|
+
EXIT_CODE,
|
|
25
29
|
getSettingsPath,
|
|
26
30
|
isPathWithinDirectory,
|
|
27
31
|
pathExists,
|
|
28
|
-
readSettings,
|
|
29
32
|
resolveItemTypeRegistry,
|
|
30
33
|
resolvePmRoot
|
|
31
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-5VVUKE3U.js";
|
|
32
35
|
|
|
33
36
|
// dist/cli/commands/files.js
|
|
34
37
|
import fs from "node:fs/promises";
|
|
@@ -36,7 +39,7 @@ import path from "node:path";
|
|
|
36
39
|
!(function() {
|
|
37
40
|
try {
|
|
38
41
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
39
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
42
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "108c994a-b1a2-5092-a4fa-04e0aaf4012d");
|
|
40
43
|
} catch (e2) {
|
|
41
44
|
}
|
|
42
45
|
})();
|
|
@@ -89,7 +92,7 @@ function cleanupPathToken(value) {
|
|
|
89
92
|
}
|
|
90
93
|
function extractRawPathReferences(references) {
|
|
91
94
|
const rawReferences = [];
|
|
92
|
-
const absolutePattern = /(?:[A-Za-z]:[\\/]|\/)[^\s"'`<>()
|
|
95
|
+
const absolutePattern = /(?:[A-Za-z]:[\\/]|\/)[^\s"'`<>()[\]{},;]+/gu;
|
|
93
96
|
const relativePattern = /(?:\.{1,2}[\\/])?(?:(?:[A-Za-z0-9_.@-]+[\\/])+[A-Za-z0-9_.@-]+|[A-Za-z0-9_.@-]+\.[A-Za-z0-9][A-Za-z0-9._-]*)/gu;
|
|
94
97
|
for (const reference of references) {
|
|
95
98
|
const seenInField = /* @__PURE__ */ new Set();
|
|
@@ -295,4 +298,4 @@ export {
|
|
|
295
298
|
runFiles,
|
|
296
299
|
runFilesDiscover
|
|
297
300
|
};
|
|
298
|
-
//# sourceMappingURL=files-
|
|
301
|
+
//# sourceMappingURL=files-6P57MRKL.js.map
|