@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
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../sdk/define.ts", "../../../../../../../sdk/index.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * @module sdk/define\n *\n * Authoring-time typed builders for every extension registration surface.\n *\n * These `define*` helpers are the third leg of the SDK ergonomics tripod:\n * {@link ../core/extensions/loader.js#ExtensionApi | `api.register*`} registers\n * a definition at activation, the `assert*`/`run*` testing helpers verify and\n * invoke it, and these builders let authors *write* the definition with full\n * type-checking and editor inference before it ever reaches `activate`.\n *\n * Every builder is a zero-cost identity function that returns its argument\n * unchanged — exactly like the SDK's {@link ./index.js#defineExtension} and the\n * wider `defineConfig`/`defineComponent` ecosystem convention. Extensions are\n * authored fully in TypeScript (ADR pm-2c28); these builders are where that type\n * safety is anchored at the definition site. Their value is entirely at the type\n * level:\n *\n * - A bare `const cmd = { ... }` satisfies the registration type only\n * structurally and widens its literals; `const cmd = defineCommand({ ... })`\n * checks the object against the contract *and* preserves the narrow literal\n * type, while inferring the nested handler's `context` parameter from the\n * builder signature.\n * - Definitions can be colocated, exported, reused, and unit-tested apart from\n * the `activate` call instead of being trapped as inline literals.\n *\n * Object-definition builders use a generic constraint (`<T extends Def>`) so the\n * narrow literal type survives the round-trip, mirroring `defineExtension`.\n * Function-definition builders are intentionally non-generic: a generic\n * constrained to a whole function type suppresses contextual typing of a bare\n * arrow's parameter (it would fall back to implicit `any`), whereas the\n * non-generic signature lets TypeScript type the handler parameter from the\n * declared function type.\n */\nimport type {\n AfterCommandHook,\n BeforeCommandHook,\n CommandDefinition,\n CommandOverride,\n Exporter,\n ExtensionManifest,\n FlagDefinition,\n Importer,\n OnIndexHook,\n OnReadHook,\n OnWriteHook,\n ParserOverride,\n PreflightOverride,\n RendererOverride,\n SchemaFieldDefinition,\n SchemaItemTypeDefinition,\n SchemaMigrationDefinition,\n SearchProviderDefinition,\n ServiceOverride,\n VectorStoreAdapterDefinition,\n} from \"../core/extensions/loader.js\";\nimport type { ProjectProfileDefinition } from \"../core/profile/profile-presets.js\";\n\n/**\n * Type an extension's in-module manifest mirror (the `manifest` export / field).\n *\n * Completes the `define*` family: the manifest is the one authoring surface that\n * otherwise had no builder. Contract-checks the object against\n * {@link ExtensionManifest} where it is authored, catching a missing required\n * field or a mistyped key at edit time instead of at load time. Pair with\n * {@link ./compose.js#deriveExtensionCapabilities | `deriveExtensionCapabilities`}\n * to keep `capabilities` matched to the surfaces the extension actually registers.\n */\nexport function defineExtensionManifest<TManifest extends ExtensionManifest>(manifest: TManifest): TManifest {\n return manifest;\n}\n\n/**\n * Type a project-profile definition for the profile registry.\n *\n * A profile bundles item types, statuses, fields, per-type workflows, config\n * knobs, create templates, and package recommendations into one declarative\n * archetype that `pm profile apply` stages idempotently. This builder checks the\n * object against {@link ProjectProfileDefinition} where it is authored — catching\n * an invalid field type or a malformed workflow at edit time — while preserving\n * the literal `name`/`types`/`statuses` so a package's archetype stays strongly\n * typed at the definition site, mirroring {@link defineItemType}. It is the\n * authoring anchor a first-party or third-party profile package builds on.\n */\nexport function defineProjectProfile<TProfile extends ProjectProfileDefinition>(profile: TProfile): TProfile {\n return profile;\n}\n\n/**\n * Type a command definition for `api.registerCommand(definition)`.\n *\n * Checks the object against {@link CommandDefinition} and infers the `run`\n * handler's `context` parameter while preserving the literal `name`/`action`\n * types. Pass the result straight to `registerCommand`, or export it so the\n * command can be invoked in tests via `runRegisteredCommandForTest`.\n */\nexport function defineCommand<TDefinition extends CommandDefinition>(definition: TDefinition): TDefinition {\n return definition;\n}\n\n/**\n * Type a single flag definition for a `api.registerFlags(command, flags)` array.\n *\n * Authors compose builders into the array\n * (`api.registerFlags(\"list\", [defineFlag({ long: \"--mine\" })])`) to get\n * per-flag contract checking — `value_type`, `list`, and `default` included —\n * instead of validating a loosely-typed literal array all at once.\n */\nexport function defineFlag<TFlag extends FlagDefinition>(flag: TFlag): TFlag {\n return flag;\n}\n\n/**\n * Type a custom item-type definition for `api.registerItemTypes([...])`.\n *\n * Preserves the literal `name`/`folder`/`aliases` so a project archetype's\n * domain types stay strongly typed where the definition is declared and reused.\n */\nexport function defineItemType<TType extends SchemaItemTypeDefinition>(type: TType): TType {\n return type;\n}\n\n/**\n * Type a custom front-matter field definition for `api.registerItemFields([...])`.\n *\n * Checks `name`/`type`/`optional` against {@link SchemaFieldDefinition} while\n * keeping the field's extra metadata (the contract carries an index signature)\n * intact.\n */\nexport function defineItemField<TField extends SchemaFieldDefinition>(field: TField): TField {\n return field;\n}\n\n/**\n * Type a schema migration definition for `api.registerMigration(definition)`.\n *\n * Preserves the literal `id` and, when `run` is provided, infers the migration\n * runner's context, so the same definition can be registered and later exercised\n * through `runRegisteredMigrationForTest`.\n */\nexport function defineMigration<TMigration extends SchemaMigrationDefinition>(migration: TMigration): TMigration {\n return migration;\n}\n\n/**\n * Type a search-provider definition for `api.registerSearchProvider(provider)`.\n *\n * Infers the `query`/`embed`/`embedBatch` operation contexts and result shapes\n * so a custom retrieval backend is type-checked at the definition site and\n * reusable in `runRegisteredSearchProviderForTest`.\n */\nexport function defineSearchProvider<TProvider extends SearchProviderDefinition>(provider: TProvider): TProvider {\n return provider;\n}\n\n/**\n * Type a vector-store adapter definition for `api.registerVectorStoreAdapter(adapter)`.\n *\n * Infers the `query`/`upsert`/`delete` operation contexts so a package that owns\n * its own semantic index storage gets contract checking before activation and a\n * definition it can drive through `runRegisteredVectorStoreAdapterForTest`.\n */\nexport function defineVectorStoreAdapter<TAdapter extends VectorStoreAdapterDefinition>(adapter: TAdapter): TAdapter {\n return adapter;\n}\n\n/**\n * Type a command-override handler for `api.registerCommand(command, override)`.\n *\n * The non-generic signature lets TypeScript contextually type the override's\n * `context` parameter from {@link CommandOverride}, so a bare arrow authored in\n * a `.js` package still gets a fully-typed argument.\n */\nexport function defineCommandOverride(override: CommandOverride): CommandOverride {\n return override;\n}\n\n/**\n * Type a parser-override handler for `api.registerParser(command, override)`.\n *\n * Contextually types the `context` parameter and the returned\n * {@link ParserOverride} delta so an argument-rewriting override is checked\n * where it is written.\n */\nexport function defineParserOverride(override: ParserOverride): ParserOverride {\n return override;\n}\n\n/**\n * Type a preflight-override handler for `api.registerPreflight(override)`.\n *\n * Contextually types the `context` parameter and the returned gate decision so a\n * package's pre-run validation override is checked at the definition site.\n */\nexport function definePreflightOverride(override: PreflightOverride): PreflightOverride {\n return override;\n}\n\n/**\n * Type a service-override handler for `api.registerService(service, override)`.\n *\n * Contextually types the `context` parameter from {@link ServiceOverride} so a\n * package overriding a built-in service (output formatting, embeddings, and the\n * like) keeps its handler argument typed without an explicit annotation.\n */\nexport function defineServiceOverride(override: ServiceOverride): ServiceOverride {\n return override;\n}\n\n/**\n * Type a renderer-override handler for `api.registerRenderer(format, renderer)`.\n *\n * Contextually types the `context` parameter and the `string | null | undefined`\n * return contract so a custom output renderer is checked where it is authored.\n */\nexport function defineRendererOverride(renderer: RendererOverride): RendererOverride {\n return renderer;\n}\n\n/**\n * Type an importer handler for `api.registerImporter(name, importer, options)`.\n *\n * Contextually types the {@link Importer} `context` (registration, args,\n * options, pm root) so the bridge from an external system into the pm context\n * graph is type-checked and reusable in `runRegisteredImporterForTest`.\n */\nexport function defineImporter(importer: Importer): Importer {\n return importer;\n}\n\n/**\n * Type an exporter handler for `api.registerExporter(name, exporter, options)`.\n *\n * Contextually types the {@link Exporter} `context` so the bridge from the pm\n * context graph out to an external system is checked at the definition site and\n * reusable in `runRegisteredExporterForTest`.\n */\nexport function defineExporter(exporter: Exporter): Exporter {\n return exporter;\n}\n\n/**\n * Type a `before_command` hook for `api.hooks.beforeCommand(hook)`.\n *\n * Contextually types the {@link BeforeCommandHook} `context` so a hook that\n * inspects or annotates a command before it runs keeps its argument typed when\n * authored as a standalone, exportable, testable value.\n */\nexport function defineBeforeCommandHook(hook: BeforeCommandHook): BeforeCommandHook {\n return hook;\n}\n\n/**\n * Type an `after_command` hook for `api.hooks.afterCommand(hook)`.\n *\n * Contextually types the {@link AfterCommandHook} `context` — including the\n * `affected` items pm mutated — so the natural place to react to every change\n * (\"project management = context management\") is checked where it is written.\n */\nexport function defineAfterCommandHook(hook: AfterCommandHook): AfterCommandHook {\n return hook;\n}\n\n/**\n * Type an `on_write` hook for `api.hooks.onWrite(hook)`.\n *\n * Contextually types the {@link OnWriteHook} `context` so a hook reacting to\n * item persistence keeps its argument typed without an explicit annotation.\n */\nexport function defineOnWriteHook(hook: OnWriteHook): OnWriteHook {\n return hook;\n}\n\n/**\n * Type an `on_read` hook for `api.hooks.onRead(hook)`.\n *\n * Contextually types the {@link OnReadHook} `context` so a hook augmenting items\n * as they are read is type-checked at the definition site.\n */\nexport function defineOnReadHook(hook: OnReadHook): OnReadHook {\n return hook;\n}\n\n/**\n * Type an `on_index` hook for `api.hooks.onIndex(hook)`.\n *\n * Contextually types the {@link OnIndexHook} `context` so a hook participating\n * in index/search refresh keeps its argument typed even without TypeScript\n * annotations.\n */\nexport function defineOnIndexHook(hook: OnIndexHook): OnIndexHook {\n return hook;\n}\n", "/**\n * @module sdk/index\n *\n * Defines public SDK APIs and package-author helpers for Index.\n */\nimport {\n EXTENSION_CAPABILITY_CONTRACT,\n EXTENSION_CAPABILITY_CONTRACT_VERSION,\n EXTENSION_CAPABILITY_LEGACY_ALIASES,\n KNOWN_EXTENSION_CAPABILITIES,\n KNOWN_EXTENSION_POLICY_MODES,\n KNOWN_EXTENSION_POLICY_SURFACES,\n KNOWN_EXTENSION_SANDBOX_PROFILES,\n KNOWN_EXTENSION_TRUST_MODES,\n} from \"../core/extensions/loader.js\";\nexport {\n PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS,\n PM_PACKAGE_RESOURCE_KINDS,\n collectPackageExtensionDirectories,\n readPmPackageManifest,\n type PmPackageCatalogLinkMap,\n type PmPackageCatalogMediaMap,\n type PmPackageCatalogMetadata,\n type PmPackageManifest,\n type PmPackageResourceKind,\n type PmPackageResourceMap,\n} from \"../core/packages/manifest.js\";\nexport * from \"./cli-contracts.js\";\nexport * from \"./compose.js\";\nexport * from \"./define.js\";\nexport * from \"./runtime.js\";\nexport {\n BUILTIN_PROFILES,\n listProfiles,\n normalizeProfileName,\n PROFILE_NAMES,\n resolveProfile,\n type ProfileConfigEntry,\n type ProfileName,\n type ProfilePackageRecommendation,\n type ProfileTemplateEntry,\n type ProfileTemplateOptions,\n type ProjectProfileDefinition,\n type ProjectProfileRegistrationInput,\n} from \"../core/profile/profile-presets.js\";\nexport {\n planProfileApplication,\n type ProfileApplicationPlan,\n type ProfileChangeStatus,\n type ProfileComponentChange,\n type ProfileConfigChange,\n type ProfileConfigPlan,\n type ProfileCurrentState,\n type ProfilePackagePlan,\n type ProfileSchemaPlan,\n type ProfileTemplateChange,\n type ProfileTemplatePlan,\n type ProfileWorkflowChange,\n type ProfileWorkflowPlan,\n} from \"../core/profile/profile-plan.js\";\nexport {\n describeProfileComposition,\n describeProjectProfile,\n type ProjectProfileComposition,\n type ProjectProfileDescription,\n type ProjectProfilePackageSummary,\n} from \"../core/profile/profile-describe.js\";\nexport {\n lintProjectProfile,\n PROFILE_LINT_CODES,\n PROFILE_LINT_DIMENSIONS,\n type ProfileLintCode,\n type ProfileLintDimension,\n type ProfileLintSeverity,\n type ProjectProfileLintFinding,\n type ProjectProfileLintReport,\n} from \"../core/profile/profile-lint.js\";\nexport {\n assertExtensionBlueprint,\n assertExtensionCapabilityUsage,\n assertExtensionDeactivated,\n assertExtensionManifestCompatible,\n assertExtensionManifestMatchesBlueprint,\n assertExtensionPreflight,\n assertPackageManifest,\n assertProjectProfile,\n assertRegisteredCommandContract,\n assertRegisteredCommandOverride,\n assertRegisteredExporter,\n assertRegisteredFlags,\n assertRegisteredHook,\n assertRegisteredImporter,\n assertRegisteredItemField,\n assertRegisteredItemType,\n assertRegisteredMigration,\n assertRegisteredParserOverride,\n assertRegisteredPreflightOverride,\n assertRegisteredProfile,\n assertRegisteredRendererOverride,\n assertRegisteredSearchProvider,\n assertRegisteredServiceOverride,\n assertRegisteredVectorStoreAdapter,\n activateExtensionForTest,\n createExtensionTestHarness,\n deactivateExtensionForTest,\n describeExtensionActivation,\n runRegisteredCommandForTest,\n runRegisteredCommandOverrideForTest,\n runRegisteredExporterForTest,\n runRegisteredHookForTest,\n runRegisteredImporterForTest,\n runRegisteredMigrationForTest,\n runRegisteredParserOverrideForTest,\n runRegisteredPreflightOverrideForTest,\n runRegisteredRendererOverrideForTest,\n runRegisteredSearchProviderForTest,\n runRegisteredServiceOverrideForTest,\n runRegisteredVectorStoreAdapterForTest,\n type ActivateExtensionForTestOptions,\n type AssertProjectProfileOptions,\n type DeactivateExtensionForTestOptions,\n type DescribeExtensionActivationOptions,\n type ExtensionActivationSummary,\n type RenderExtensionHarnessMarkdownOptions,\n type RunRegisteredCommandForTestOptions,\n type RunRegisteredExporterForTestOptions,\n type RunRegisteredHookForTestOptions,\n type RunRegisteredImporterForTestOptions,\n type RunRegisteredMigrationForTestOptions,\n type RunRegisteredSearchProviderForTestOptions,\n type RunRegisteredVectorStoreAdapterForTestOptions,\n type SearchProviderOperationContexts,\n type SearchProviderOperationResults,\n type VectorStoreAdapterOperationContexts,\n type VectorStoreAdapterOperationResults,\n type ExtensionCapabilityUsageAssertion,\n type ExtensionCapabilityUsageExpectation,\n type ExtensionDeactivationExpectation,\n type ExtensionManifestBlueprintMatch,\n type ExtensionTestHarness,\n type PackageManifestExpectation,\n type PackageManifestResourceExpectation,\n type RegisteredCommandContractAssertion,\n type RegisteredCommandContractExpectation,\n type RegisteredCommandOverrideExpectation,\n type RegisteredExporterExpectation,\n type RegisteredFlagsExpectation,\n type RegisteredHookExpectation,\n type RegisteredHookKind,\n type RegisteredImporterExpectation,\n type RegisteredItemFieldAssertion,\n type RegisteredItemFieldExpectation,\n type RegisteredItemTypeAssertion,\n type RegisteredItemTypeExpectation,\n type RegisteredMigrationExpectation,\n type RegisteredParserOverrideExpectation,\n type RegisteredPreflightOverrideExpectation,\n type RegisteredProfileAssertion,\n type RegisteredProfileExpectation,\n type RegisteredRendererOverrideExpectation,\n type RegisteredSearchProviderExpectation,\n type RegisteredServiceOverrideExpectation,\n type RegisteredVectorStoreAdapterExpectation,\n} from \"./testing.js\";\n\n/**\n * Canonical extension capability names accepted by pm.\n *\n * Extension manifests should declare one or more of these values in\n * `capabilities`.\n */\nexport const EXTENSION_CAPABILITIES = KNOWN_EXTENSION_CAPABILITIES;\n/**\n * Restricts extension capability values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionCapability = (typeof EXTENSION_CAPABILITIES)[number];\n\n/**\n * Canonical extension governance policy modes and registration surfaces.\n */\nexport const EXTENSION_POLICY_MODES = KNOWN_EXTENSION_POLICY_MODES;\nexport const EXTENSION_POLICY_SURFACES = KNOWN_EXTENSION_POLICY_SURFACES;\nexport const EXTENSION_TRUST_MODES = KNOWN_EXTENSION_TRUST_MODES;\nexport const EXTENSION_SANDBOX_PROFILES = KNOWN_EXTENSION_SANDBOX_PROFILES;\n/**\n * Restricts extension policy mode values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionPolicyMode = (typeof EXTENSION_POLICY_MODES)[number];\n/**\n * Restricts extension policy surface values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionPolicySurface = (typeof EXTENSION_POLICY_SURFACES)[number];\n/**\n * Restricts extension trust mode values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionTrustMode = (typeof EXTENSION_TRUST_MODES)[number];\n/**\n * Restricts extension sandbox profile values accepted by command, SDK, and storage contracts.\n */\nexport type ExtensionSandboxProfile = (typeof EXTENSION_SANDBOX_PROFILES)[number];\n\n/**\n * Versioned capability contract metadata emitted by runtime diagnostics.\n */\nexport { EXTENSION_CAPABILITY_CONTRACT, EXTENSION_CAPABILITY_CONTRACT_VERSION, EXTENSION_CAPABILITY_LEGACY_ALIASES };\n\n/**\n * Least-privilege capability reconciliation helpers: map declared capabilities\n * against the registration surfaces a package actually exercises at activation.\n */\nexport {\n EXTENSION_CAPABILITY_REGISTRATION_SURFACES,\n collectUsedExtensionCapabilities,\n reconcileExtensionCapabilityUsage,\n type CollectUsedExtensionCapabilitiesOptions,\n type ExtensionCapabilityUsageReconciliation,\n} from \"../core/extensions/capability-usage.js\";\n\n/**\n * Render an extension/package activation summary\n * ({@link describeExtensionActivation} / {@link describeExtensionBlueprint}) to a\n * deterministic Markdown reference document — the author-facing *render* leg of\n * the describe verb, for drift-free package READMEs.\n */\nexport {\n renderExtensionSurfaceMarkdown,\n type ExtensionSurfaceMarkdownOptions,\n} from \"../core/extensions/activation-summary-markdown.js\";\n\nexport type {\n AfterCommandAffectedItem,\n AfterCommandHook,\n AfterCommandHookContext,\n BeforeCommandHook,\n BeforeCommandHookContext,\n CommandDefinition,\n ExtensionCommandArgumentDefinition,\n CommandHandler,\n CommandHandlerContext,\n CommandHandlerResult,\n CommandOverride,\n CommandOverrideContext,\n ExtensionServiceName,\n Exporter,\n ExtensionActivationResult,\n ExtensionApi,\n ExtensionCommandRegistry,\n ExtensionDeactivationFailure,\n ExtensionDeactivationOptions,\n ExtensionDeactivationResult,\n ExtensionDiagnostic,\n ExtensionDiscoveryResult,\n ExtensionHookRegistry,\n ExtensionSelfIdentity,\n ExtensionLoadResult,\n ExtensionManifest,\n ExtensionManifestEngines,\n ExtensionGovernancePolicy,\n ExtensionPolicyOverride,\n ExtensionProvenanceMetadata,\n ExtensionRuntimePermissionDeclaration,\n ExtensionSearchMode,\n ExtensionParserRegistry,\n ExtensionPreflightRegistry,\n ExtensionRegistrationRegistry,\n ExtensionRendererRegistry,\n ExtensionServiceRegistry,\n FlagValueType,\n FlagDefinition,\n ImportExportContext,\n ImportExportRegistrationOptions,\n Importer,\n OnIndexHook,\n OnIndexHookContext,\n OnReadHook,\n OnReadHookContext,\n OnWriteHook,\n OnWriteHookContext,\n OutputRendererFormat,\n ParserOverride,\n ParserOverrideContext,\n ParserOverrideDelta,\n PreflightOverride,\n PreflightOverrideContext,\n PreflightOverrideDelta,\n PreflightRuntimeDecision,\n RegisteredExtensionExporter,\n RegisteredExtensionFlagDefinitions,\n RegisteredExtensionHook,\n RegisteredExtensionImporter,\n RegisteredExtensionProjectProfile,\n RegisteredExtensionSchemaMigrationDefinition,\n RegisteredExtensionSearchProvider,\n RegisteredExtensionServiceOverride,\n RegisteredExtensionVectorStoreAdapter,\n RendererOverride,\n RendererOverrideContext,\n SchemaFieldDefinition,\n SchemaItemTypeCommandOptionPolicyDefinition,\n SchemaItemTypeOptionDefinition,\n SchemaItemTypeDefinition,\n SchemaMigrationDefinition,\n SchemaMigrationRunContext,\n SchemaMigrationRunner,\n SearchProviderEmbedBatchContext,\n SearchProviderEmbedContext,\n SearchProviderDefinition,\n SearchProviderHit,\n SearchProviderQueryContext,\n SearchProviderQueryResult,\n ServiceOverride,\n ServiceOverrideContext,\n VectorStoreAdapterDefinition,\n VectorStoreDeleteContext,\n VectorStoreQueryContext,\n VectorStoreQueryHit,\n VectorStoreUpsertContext,\n VectorStoreUpsertPoint,\n} from \"../core/extensions/loader.js\";\n\nexport type { GlobalOptions } from \"../core/shared/command-types.js\";\nexport type { ItemDocument, ItemFrontMatter, ItemStatus, ItemType, PmSettings } from \"../types/index.js\";\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoEM,SAAU,wBAA6D,UAAmB;AAC9F,SAAO;AACT;AAcM,SAAU,qBAAgE,SAAiB;AAC/F,SAAO;AACT;AAUM,SAAU,cAAqD,YAAuB;AAC1F,SAAO;AACT;AAUM,SAAU,WAAyC,MAAW;AAClE,SAAO;AACT;AAQM,SAAU,eAAuD,MAAW;AAChF,SAAO;AACT;AASM,SAAU,gBAAsD,OAAa;AACjF,SAAO;AACT;AASM,SAAU,gBAA8D,WAAqB;AACjG,SAAO;AACT;AASM,SAAU,qBAAiE,UAAmB;AAClG,SAAO;AACT;AASM,SAAU,yBAAwE,SAAiB;AACvG,SAAO;AACT;AASM,SAAU,sBAAsB,UAAyB;AAC7D,SAAO;AACT;AASM,SAAU,qBAAqB,UAAwB;AAC3D,SAAO;AACT;AAQM,SAAU,wBAAwB,UAA2B;AACjE,SAAO;AACT;AASM,SAAU,sBAAsB,UAAyB;AAC7D,SAAO;AACT;AAQM,SAAU,uBAAuB,UAA0B;AAC/D,SAAO;AACT;AASM,SAAU,eAAe,UAAkB;AAC/C,SAAO;AACT;AASM,SAAU,eAAe,UAAkB;AAC/C,SAAO;AACT;AASM,SAAU,wBAAwB,MAAuB;AAC7D,SAAO;AACT;AASM,SAAU,uBAAuB,MAAsB;AAC3D,SAAO;AACT;AAQM,SAAU,kBAAkB,MAAiB;AACjD,SAAO;AACT;AAQM,SAAU,iBAAiB,MAAgB;AAC/C,SAAO;AACT;AASM,SAAU,kBAAkB,MAAiB;AACjD,SAAO;AACT;;;;;;;;;;ACzHO,IAAM,yBAAyB;AAS/B,IAAM,yBAAyB;AAC/B,IAAM,4BAA4B;AAClC,IAAM,wBAAwB;AAC9B,IAAM,6BAA6B;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -54,9 +54,10 @@ export interface NestedSettingDescriptor {
|
|
|
54
54
|
*/
|
|
55
55
|
export declare const NESTED_SETTING_DESCRIPTORS: readonly NestedSettingDescriptor[];
|
|
56
56
|
/**
|
|
57
|
-
* Map a raw user-supplied key (kebab
|
|
58
|
-
*
|
|
59
|
-
*
|
|
57
|
+
* Map a raw user-supplied key (kebab case, snake case, or the dotted settings
|
|
58
|
+
* path surfaced by `pm config list`) onto a known nested-leaf descriptor.
|
|
59
|
+
* Returns `undefined` when the key is not a nested leaf, letting callers fall
|
|
60
|
+
* back to the regular ConfigKey path.
|
|
60
61
|
*/
|
|
61
62
|
export declare function resolveNestedSettingDescriptor(raw: string | undefined): NestedSettingDescriptor | undefined;
|
|
62
63
|
/** Recoverable parsed value with the descriptor it satisfied. */
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
* `pm config list` and in error hints.
|
|
28
28
|
*/
|
|
29
29
|
|
|
30
|
-
!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]="
|
|
30
|
+
!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]="410dca04-d154-56b7-b8d1-d12215736f4f")}catch(e){}}();
|
|
31
31
|
export const NESTED_SETTING_DESCRIPTORS = [
|
|
32
32
|
{
|
|
33
33
|
key: "search_provider",
|
|
@@ -224,6 +224,13 @@ export const NESTED_SETTING_DESCRIPTORS = [
|
|
|
224
224
|
min: 1,
|
|
225
225
|
summary: "Claim/lock time-to-live in seconds before a stale lock can be reclaimed.",
|
|
226
226
|
},
|
|
227
|
+
{
|
|
228
|
+
key: "locks_wait_ms",
|
|
229
|
+
path: "locks.wait_ms",
|
|
230
|
+
kind: "integer",
|
|
231
|
+
min: 0,
|
|
232
|
+
summary: "Bounded jittered wait in milliseconds before a contended item mutation fails with lock_conflict; 0 fails fast. PM_LOCK_WAIT_MS overrides per invocation.",
|
|
233
|
+
},
|
|
227
234
|
{
|
|
228
235
|
key: "checkpoints_retention_days",
|
|
229
236
|
path: "checkpoints.retention_days",
|
|
@@ -262,11 +269,15 @@ export const NESTED_SETTING_DESCRIPTORS = [
|
|
|
262
269
|
summary: "History-compaction policy intent: health_warn (advisory only) or auto (scheduled sweeps expected).",
|
|
263
270
|
},
|
|
264
271
|
];
|
|
265
|
-
const DESCRIPTOR_BY_KEY = new Map(NESTED_SETTING_DESCRIPTORS.
|
|
272
|
+
const DESCRIPTOR_BY_KEY = new Map(NESTED_SETTING_DESCRIPTORS.flatMap((descriptor) => [
|
|
273
|
+
[descriptor.key, descriptor],
|
|
274
|
+
[descriptor.path.toLowerCase().replaceAll("-", "_"), descriptor],
|
|
275
|
+
]));
|
|
266
276
|
/**
|
|
267
|
-
* Map a raw user-supplied key (kebab
|
|
268
|
-
*
|
|
269
|
-
*
|
|
277
|
+
* Map a raw user-supplied key (kebab case, snake case, or the dotted settings
|
|
278
|
+
* path surfaced by `pm config list`) onto a known nested-leaf descriptor.
|
|
279
|
+
* Returns `undefined` when the key is not a nested leaf, letting callers fall
|
|
280
|
+
* back to the regular ConfigKey path.
|
|
270
281
|
*/
|
|
271
282
|
export function resolveNestedSettingDescriptor(raw) {
|
|
272
283
|
if (typeof raw !== "string") {
|
|
@@ -437,4 +448,4 @@ export function writeNestedSettingValue(settings, descriptor, value) {
|
|
|
437
448
|
return true;
|
|
438
449
|
}
|
|
439
450
|
//# sourceMappingURL=nested-settings.js.map
|
|
440
|
-
//# debugId=
|
|
451
|
+
//# debugId=410dca04-d154-56b7-b8d1-d12215736f4f
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nested-settings.js","sources":["core/config/nested-settings.ts"],"sourceRoot":"/","sourcesContent":["/**\n * Nested leaf settings exposed via `pm config <scope> set/get <key> <value>`.\n *\n * These are simple string/number leaves of {@link PmSettings} (provider URLs,\n * vector-store adapter, search tuning) that previously required hand-editing\n * `.agents/pm/settings.json`. They live here so the same dotted path is\n * documented in one place and surfaced both to the config dispatcher and to\n * `pm config list` (so `pm config list --json` is discoverable).\n *\n * Shape conventions:\n * - `path` is the dotted JSON path in {@link PmSettings} (e.g. `search.provider`).\n * - `kind` is the value shape: \"string\" | \"boolean\" | \"integer\" | \"number\" | \"ratio\"\n * - \"ratio\" must be a finite number in [0, 1].\n * - \"integer\" must be a finite non-negative integer. Set `min: 1` for keys\n * where the runtime silently falls back when 0 is supplied (e.g. batch\n * size, timeout, max-results limits).\n * - \"number\" must be a finite number — negatives ARE allowed (e.g. score\n * thresholds may legitimately be negative when a provider normalizes\n * scores into a signed range).\n *\n * Adding a key here makes it acceptable to `pm config <scope> set <key> <value>`\n * with no other code changes — the dispatcher walks the dotted path on the\n * already-validated PmSettings shape.\n */\n\n/** Supported coercion shapes for nested settings exposed through `pm config`. */\nexport type NestedSettingKind = \"string\" | \"boolean\" | \"integer\" | \"number\" | \"ratio\";\n\n/**\n * Documents the nested setting descriptor payload exchanged by command, SDK, and package integrations.\n */\nexport interface NestedSettingDescriptor {\n /** CLI key (snake_case). Kebab-case form is accepted by normalizing `-` → `_`. */\n key: string;\n /** Dotted JSON path in PmSettings. */\n path: string;\n /** Value shape. */\n kind: NestedSettingKind;\n /** Short human-facing summary for `pm config list`. */\n summary: string;\n /** Optional accepted values for string settings. */\n choices?: readonly string[];\n /** Require a non-empty trimmed string value for string settings. */\n non_empty?: boolean;\n /**\n * Optional minimum value for `integer` / `number` kinds. When set,\n * `parseNestedSettingValue` rejects values strictly below `min`. Useful for\n * settings where 0 would be silently ignored by the runtime (batch sizes,\n * timeouts, max-results limits).\n */\n min?: number;\n}\n\n/**\n * Search/provider/vector-store leaves. Order is the display order in\n * `pm config list` and in error hints.\n */\nexport const NESTED_SETTING_DESCRIPTORS: readonly NestedSettingDescriptor[] = [\n {\n key: \"search_provider\",\n path: \"search.provider\",\n kind: \"string\",\n summary: \"Search embedding provider name (e.g. openai, ollama, or an extension provider).\",\n },\n {\n key: \"search_mutation_refresh_policy\",\n path: \"search.mutation_refresh_policy\",\n kind: \"string\",\n choices: [\"cache_only\", \"semantic_configured\", \"semantic_auto\"],\n summary: \"Mutation-time search refresh policy: cache_only, semantic_configured, or semantic_auto.\",\n },\n {\n key: \"search_query_expansion_enabled\",\n path: \"search.query_expansion.enabled\",\n kind: \"boolean\",\n summary: \"Enable or disable query expansion for semantic/hybrid search.\",\n },\n {\n key: \"search_query_expansion_provider\",\n path: \"search.query_expansion.provider\",\n kind: \"string\",\n summary: \"Query expansion provider name (built-in openai/ollama or extension provider).\",\n },\n {\n key: \"search_rerank_enabled\",\n path: \"search.rerank.enabled\",\n kind: \"boolean\",\n summary: \"Enable or disable post-retrieval reranking for hybrid search.\",\n },\n {\n key: \"search_rerank_model\",\n path: \"search.rerank.model\",\n kind: \"string\",\n summary: \"Rerank model name override used by built-in providers.\",\n },\n {\n key: \"search_rerank_top_k\",\n path: \"search.rerank.top_k\",\n kind: \"integer\",\n min: 1,\n summary: \"Number of top hybrid candidates to rerank when rerank is enabled.\",\n },\n {\n key: \"search_embedding_model\",\n path: \"search.embedding_model\",\n kind: \"string\",\n summary: \"Default embedding model name (overrides provider-specific model when set).\",\n },\n {\n key: \"search_embedding_corpus_max_characters\",\n path: \"search.embedding_corpus_max_characters\",\n kind: \"integer\",\n min: 1,\n summary: \"Maximum semantic corpus characters per item before truncation.\",\n },\n {\n key: \"search_embedding_batch_size\",\n path: \"search.embedding_batch_size\",\n kind: \"integer\",\n min: 1,\n summary: \"Number of items embedded per request batch.\",\n },\n {\n key: \"search_embedding_timeout_ms\",\n path: \"search.embedding_timeout_ms\",\n kind: \"integer\",\n min: 1,\n summary: \"Per-request embedding timeout in milliseconds.\",\n },\n {\n key: \"search_score_threshold\",\n path: \"search.score_threshold\",\n kind: \"number\",\n summary: \"Minimum score for a hit to be returned (0 keeps all matches).\",\n },\n {\n key: \"search_hybrid_semantic_weight\",\n path: \"search.hybrid_semantic_weight\",\n kind: \"ratio\",\n summary: \"Hybrid mode semantic weight in [0, 1] (1-weight goes to keyword).\",\n },\n {\n key: \"search_max_results\",\n path: \"search.max_results\",\n kind: \"integer\",\n min: 1,\n summary: \"Default upper bound on search hits when --limit is not supplied.\",\n },\n {\n key: \"search_bm25_k1\",\n path: \"search.bm25.k1\",\n kind: \"number\",\n min: 0,\n summary: \"Offline BM25 term-frequency saturation (k1); higher saturates repeated terms slower (default 1.2).\",\n },\n {\n key: \"search_bm25_b\",\n path: \"search.bm25.b\",\n kind: \"ratio\",\n summary: \"Offline BM25 document-length normalization (b) in [0, 1]; 0 disables, 1 fully normalizes (default 0.75).\",\n },\n {\n key: \"openai_base_url\",\n path: \"providers.openai.base_url\",\n kind: \"string\",\n summary: \"OpenAI-compatible API base URL (LM Studio/vLLM also use this).\",\n },\n {\n key: \"openai_api_key\",\n path: \"providers.openai.api_key\",\n kind: \"string\",\n summary: \"OpenAI-compatible API key.\",\n },\n {\n key: \"openai_model\",\n path: \"providers.openai.model\",\n kind: \"string\",\n summary: \"OpenAI-compatible embedding model name.\",\n },\n {\n key: \"ollama_base_url\",\n path: \"providers.ollama.base_url\",\n kind: \"string\",\n summary: \"Ollama API base URL (typically http://localhost:11434).\",\n },\n {\n key: \"ollama_model\",\n path: \"providers.ollama.model\",\n kind: \"string\",\n summary: \"Ollama embedding model name (e.g. nomic-embed-text).\",\n },\n {\n key: \"vector_store_adapter\",\n path: \"vector_store.adapter\",\n kind: \"string\",\n summary: \"Vector store adapter name (lancedb, qdrant, or an extension adapter).\",\n },\n {\n key: \"vector_store_collection_name\",\n path: \"vector_store.collection_name\",\n kind: \"string\",\n non_empty: true,\n summary: \"Vector collection/table name shared by Qdrant and LanceDB adapters.\",\n },\n {\n key: \"qdrant_url\",\n path: \"vector_store.qdrant.url\",\n kind: \"string\",\n summary: \"Qdrant HTTP API URL.\",\n },\n {\n key: \"qdrant_api_key\",\n path: \"vector_store.qdrant.api_key\",\n kind: \"string\",\n summary: \"Qdrant API key (empty if running unauthenticated).\",\n },\n {\n key: \"lancedb_path\",\n path: \"vector_store.lancedb.path\",\n kind: \"string\",\n summary: \"LanceDB storage path (relative to pm root or absolute).\",\n },\n // General workspace leaves (id/author/output/locks/schema governance). These\n // are documented user-facing settings in CONFIGURATION.md that previously\n // required hand-editing settings.json.\n {\n key: \"id_prefix\",\n path: \"id_prefix\",\n kind: \"string\",\n non_empty: true,\n summary: \"Prefix for generated item IDs (e.g. \\\"pm\\\" produces pm-xxxx).\",\n },\n {\n key: \"author_default\",\n path: \"author_default\",\n kind: \"string\",\n non_empty: true,\n summary: \"Default author recorded on mutations when --author is not supplied.\",\n },\n {\n key: \"output_default_format\",\n path: \"output.default_format\",\n kind: \"string\",\n choices: [\"toon\", \"json\"],\n summary: \"Default output format for commands that support it: toon or json.\",\n },\n {\n key: \"locks_ttl_seconds\",\n path: \"locks.ttl_seconds\",\n kind: \"integer\",\n min: 1,\n summary: \"Claim/lock time-to-live in seconds before a stale lock can be reclaimed.\",\n },\n {\n key: \"checkpoints_retention_days\",\n path: \"checkpoints.retention_days\",\n kind: \"integer\",\n min: 1,\n summary: \"Age in days above which pm gc --scope checkpoints prunes bulk-mutation rollback checkpoints.\",\n },\n {\n key: \"schema_unknown_field_policy\",\n path: \"schema.unknown_field_policy\",\n kind: \"string\",\n choices: [\"allow\", \"warn\", \"reject\"],\n summary: \"How item I/O handles metadata keys not in the field registry: allow, warn, or reject.\",\n },\n // History compaction policy leaves (pm health advisory + pm history-compact\n // bulk-sweep default threshold). Disabled by default; enabling makes large\n // streams discoverable without a manual stats pass.\n {\n key: \"history_compact_policy_enabled\",\n path: \"history.compact_policy.enabled\",\n kind: \"boolean\",\n summary: \"Enable the history-compaction advisory: pm health warns on over-threshold streams.\",\n },\n {\n key: \"history_compact_policy_max_entries\",\n path: \"history.compact_policy.max_entries\",\n kind: \"integer\",\n min: 1,\n summary: \"Entry count above which a history stream is flagged (and the default pm history-compact --all-over threshold).\",\n },\n {\n key: \"history_compact_policy_trigger\",\n path: \"history.compact_policy.trigger\",\n kind: \"string\",\n choices: [\"health_warn\", \"auto\"],\n summary: \"History-compaction policy intent: health_warn (advisory only) or auto (scheduled sweeps expected).\",\n },\n];\n\nconst DESCRIPTOR_BY_KEY: ReadonlyMap<string, NestedSettingDescriptor> = new Map(\n NESTED_SETTING_DESCRIPTORS.map((descriptor) => [descriptor.key, descriptor]),\n);\n\n/**\n * Map a raw user-supplied key (kebab or snake case, any casing) onto a known\n * nested-leaf descriptor. Returns `undefined` when the key is not a nested\n * leaf (callers can then fall back to the regular ConfigKey path).\n */\nexport function resolveNestedSettingDescriptor(raw: string | undefined): NestedSettingDescriptor | undefined {\n if (typeof raw !== \"string\") {\n return undefined;\n }\n const normalized = raw.trim().toLowerCase().replaceAll(\"-\", \"_\");\n if (normalized.length === 0) {\n return undefined;\n }\n return DESCRIPTOR_BY_KEY.get(normalized);\n}\n\n/** Recoverable parsed value with the descriptor it satisfied. */\nexport interface NestedSettingParsedValue {\n descriptor: NestedSettingDescriptor;\n value: string | number | boolean;\n}\n\n/** Throwable validation error returned as a structured result. */\nexport interface NestedSettingParseError {\n message: string;\n}\n\n/**\n * Restricts nested setting parse result values accepted by command, SDK, and storage contracts.\n */\nexport type NestedSettingParseResult =\n | { ok: true; parsed: NestedSettingParsedValue }\n | { ok: false; error: NestedSettingParseError };\n\nfunction parseNestedBooleanValue(descriptor: NestedSettingDescriptor, rawValue: string): NestedSettingParseResult {\n const normalized = rawValue.trim().toLowerCase();\n if (normalized === \"true\" || normalized === \"1\" || normalized === \"yes\" || normalized === \"on\") {\n return { ok: true, parsed: { descriptor, value: true } };\n }\n if (normalized === \"false\" || normalized === \"0\" || normalized === \"no\" || normalized === \"off\") {\n return { ok: true, parsed: { descriptor, value: false } };\n }\n return {\n ok: false,\n error: {\n message: `Config set ${descriptor.key} requires a boolean value (true|false), got \"${rawValue}\"`,\n },\n };\n}\n\nfunction parseNestedStringValue(\n descriptor: NestedSettingDescriptor,\n rawValue: string,\n trimmed: string,\n): NestedSettingParseResult {\n if (descriptor.non_empty === true && trimmed.length === 0) {\n return {\n ok: false,\n error: { message: `Config set ${descriptor.key} requires a non-empty value` },\n };\n }\n if (descriptor.choices && !descriptor.choices.includes(trimmed)) {\n return {\n ok: false,\n error: {\n message: `Config set ${descriptor.key} must be one of ${descriptor.choices.join(\"|\")}, got \"${rawValue}\"`,\n },\n };\n }\n return { ok: true, parsed: { descriptor, value: trimmed } };\n}\n\nfunction parseFiniteNestedNumber(\n descriptor: NestedSettingDescriptor,\n rawValue: string,\n trimmed: string,\n): { ok: true; value: number } | { ok: false; error: NestedSettingParseError } {\n if (trimmed.length === 0) {\n return {\n ok: false,\n error: { message: `Config set ${descriptor.key} requires a non-empty value` },\n };\n }\n const parsed = Number(trimmed);\n if (!Number.isFinite(parsed)) {\n return {\n ok: false,\n error: { message: `Config set ${descriptor.key} requires a finite number, got \"${rawValue}\"` },\n };\n }\n return { ok: true, value: parsed };\n}\n\nfunction parseNestedIntegerValue(\n descriptor: NestedSettingDescriptor,\n rawValue: string,\n value: number,\n): NestedSettingParseResult {\n if (!Number.isInteger(value) || value < 0) {\n return {\n ok: false,\n error: { message: `Config set ${descriptor.key} requires a non-negative integer, got \"${rawValue}\"` },\n };\n }\n if (descriptor.min !== undefined && value < descriptor.min) {\n return {\n ok: false,\n error: {\n message: `Config set ${descriptor.key} requires an integer >= ${descriptor.min}, got \"${rawValue}\" (the runtime silently ignores 0 here and falls back to the default)`,\n },\n };\n }\n return { ok: true, parsed: { descriptor, value } };\n}\n\nfunction parseNestedRatioValue(\n descriptor: NestedSettingDescriptor,\n rawValue: string,\n value: number,\n): NestedSettingParseResult {\n if (value < 0 || value > 1) {\n return {\n ok: false,\n error: { message: `Config set ${descriptor.key} requires a number in [0, 1], got \"${rawValue}\"` },\n };\n }\n return { ok: true, parsed: { descriptor, value } };\n}\n\nfunction parseNestedNumberValue(\n descriptor: NestedSettingDescriptor,\n rawValue: string,\n value: number,\n): NestedSettingParseResult {\n if (descriptor.min !== undefined && value < descriptor.min) {\n return {\n ok: false,\n error: { message: `Config set ${descriptor.key} requires a number >= ${descriptor.min}, got \"${rawValue}\"` },\n };\n }\n return { ok: true, parsed: { descriptor, value } };\n}\n\n/**\n * Validate and coerce a raw string value for a nested-leaf setting. The\n * returned value is the typed leaf that should be written into PmSettings.\n *\n * Empty strings are allowed for \"string\" leaves unless `non_empty` is set.\n */\nexport function parseNestedSettingValue(\n descriptor: NestedSettingDescriptor,\n rawValue: string,\n): NestedSettingParseResult {\n if (typeof rawValue !== \"string\") {\n return { ok: false, error: { message: `Config set ${descriptor.key} requires a string value` } };\n }\n const trimmed = rawValue.trim();\n if (descriptor.kind === \"boolean\") {\n return parseNestedBooleanValue(descriptor, rawValue);\n }\n if (descriptor.kind === \"string\") {\n return parseNestedStringValue(descriptor, rawValue, trimmed);\n }\n\n // Number(\"\") === 0, which would silently accept empty / whitespace-only input\n // as a valid zero. Reject explicitly so misconfigurations don't slip through.\n const parsed = parseFiniteNestedNumber(descriptor, rawValue, trimmed);\n if (!parsed.ok) {\n return { ok: false, error: parsed.error };\n }\n if (descriptor.kind === \"integer\") {\n return parseNestedIntegerValue(descriptor, rawValue, parsed.value);\n }\n if (descriptor.kind === \"ratio\") {\n return parseNestedRatioValue(descriptor, rawValue, parsed.value);\n }\n // kind === \"number\" — negatives are allowed; only apply an explicit `min`.\n return parseNestedNumberValue(descriptor, rawValue, parsed.value);\n}\n\n/** Walk a dotted path on an arbitrary record (best-effort, returns null on miss). */\nexport function readNestedSettingValue(\n settings: unknown,\n descriptor: NestedSettingDescriptor,\n): string | number | boolean | null {\n const segments = descriptor.path.split(\".\");\n let cursor: unknown = settings;\n for (const segment of segments) {\n if (typeof cursor !== \"object\" || cursor === null) {\n return null;\n }\n cursor = (cursor as Record<string, unknown>)[segment];\n }\n if (typeof cursor === \"string\" || typeof cursor === \"number\" || typeof cursor === \"boolean\") {\n return cursor;\n }\n return null;\n}\n\n/**\n * Set a leaf value on a settings object by walking the descriptor's dotted\n * path. Missing intermediate objects are created. Returns `true` when the\n * value actually changed.\n */\nexport function writeNestedSettingValue(\n settings: Record<string, unknown>,\n descriptor: NestedSettingDescriptor,\n value: string | number | boolean,\n): boolean {\n const segments = descriptor.path.split(\".\");\n let cursor: Record<string, unknown> = settings;\n for (let index = 0; index < segments.length - 1; index += 1) {\n const segment = segments[index];\n const existing = cursor[segment];\n if (typeof existing !== \"object\" || existing === null || Array.isArray(existing)) {\n const next: Record<string, unknown> = {};\n cursor[segment] = next;\n cursor = next;\n } else {\n cursor = existing as Record<string, unknown>;\n }\n }\n const leafKey = segments[segments.length - 1];\n const previous = cursor[leafKey];\n if (previous === value) {\n return false;\n }\n cursor[leafKey] = value;\n return true;\n}\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AA8BH;;;GAGG;;;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAuC;IAC5E;QACE,GAAG,EAAE,iBAAiB;QACtB,IAAI,EAAE,iBAAiB;QACvB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,iFAAiF;KAC3F;IACD;QACE,GAAG,E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,MAAM,OAAO,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC9C,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;IACjC,IAAI,QAAQ,KAAK,KAAK,EAAE,CAAC;QACvB,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC;IACxB,OAAO,IAAI,CAAC;AACd,CAAC","debugId":"b0ddd8ee-f289-5872-bce9-00b573abca7e"}
|
|
1
|
+
{"version":3,"file":"nested-settings.js","sources":["core/config/nested-settings.ts"],"sourceRoot":"/","sourcesContent":["/**\n * Nested leaf settings exposed via `pm config <scope> set/get <key> <value>`.\n *\n * These are simple string/number leaves of {@link PmSettings} (provider URLs,\n * vector-store adapter, search tuning) that previously required hand-editing\n * `.agents/pm/settings.json`. They live here so the same dotted path is\n * documented in one place and surfaced both to the config dispatcher and to\n * `pm config list` (so `pm config list --json` is discoverable).\n *\n * Shape conventions:\n * - `path` is the dotted JSON path in {@link PmSettings} (e.g. `search.provider`).\n * - `kind` is the value shape: \"string\" | \"boolean\" | \"integer\" | \"number\" | \"ratio\"\n * - \"ratio\" must be a finite number in [0, 1].\n * - \"integer\" must be a finite non-negative integer. Set `min: 1` for keys\n * where the runtime silently falls back when 0 is supplied (e.g. batch\n * size, timeout, max-results limits).\n * - \"number\" must be a finite number — negatives ARE allowed (e.g. score\n * thresholds may legitimately be negative when a provider normalizes\n * scores into a signed range).\n *\n * Adding a key here makes it acceptable to `pm config <scope> set <key> <value>`\n * with no other code changes — the dispatcher walks the dotted path on the\n * already-validated PmSettings shape.\n */\n\n/** Supported coercion shapes for nested settings exposed through `pm config`. */\nexport type NestedSettingKind = \"string\" | \"boolean\" | \"integer\" | \"number\" | \"ratio\";\n\n/**\n * Documents the nested setting descriptor payload exchanged by command, SDK, and package integrations.\n */\nexport interface NestedSettingDescriptor {\n /** CLI key (snake_case). Kebab-case form is accepted by normalizing `-` → `_`. */\n key: string;\n /** Dotted JSON path in PmSettings. */\n path: string;\n /** Value shape. */\n kind: NestedSettingKind;\n /** Short human-facing summary for `pm config list`. */\n summary: string;\n /** Optional accepted values for string settings. */\n choices?: readonly string[];\n /** Require a non-empty trimmed string value for string settings. */\n non_empty?: boolean;\n /**\n * Optional minimum value for `integer` / `number` kinds. When set,\n * `parseNestedSettingValue` rejects values strictly below `min`. Useful for\n * settings where 0 would be silently ignored by the runtime (batch sizes,\n * timeouts, max-results limits).\n */\n min?: number;\n}\n\n/**\n * Search/provider/vector-store leaves. Order is the display order in\n * `pm config list` and in error hints.\n */\nexport const NESTED_SETTING_DESCRIPTORS: readonly NestedSettingDescriptor[] = [\n {\n key: \"search_provider\",\n path: \"search.provider\",\n kind: \"string\",\n summary: \"Search embedding provider name (e.g. openai, ollama, or an extension provider).\",\n },\n {\n key: \"search_mutation_refresh_policy\",\n path: \"search.mutation_refresh_policy\",\n kind: \"string\",\n choices: [\"cache_only\", \"semantic_configured\", \"semantic_auto\"],\n summary: \"Mutation-time search refresh policy: cache_only, semantic_configured, or semantic_auto.\",\n },\n {\n key: \"search_query_expansion_enabled\",\n path: \"search.query_expansion.enabled\",\n kind: \"boolean\",\n summary: \"Enable or disable query expansion for semantic/hybrid search.\",\n },\n {\n key: \"search_query_expansion_provider\",\n path: \"search.query_expansion.provider\",\n kind: \"string\",\n summary: \"Query expansion provider name (built-in openai/ollama or extension provider).\",\n },\n {\n key: \"search_rerank_enabled\",\n path: \"search.rerank.enabled\",\n kind: \"boolean\",\n summary: \"Enable or disable post-retrieval reranking for hybrid search.\",\n },\n {\n key: \"search_rerank_model\",\n path: \"search.rerank.model\",\n kind: \"string\",\n summary: \"Rerank model name override used by built-in providers.\",\n },\n {\n key: \"search_rerank_top_k\",\n path: \"search.rerank.top_k\",\n kind: \"integer\",\n min: 1,\n summary: \"Number of top hybrid candidates to rerank when rerank is enabled.\",\n },\n {\n key: \"search_embedding_model\",\n path: \"search.embedding_model\",\n kind: \"string\",\n summary: \"Default embedding model name (overrides provider-specific model when set).\",\n },\n {\n key: \"search_embedding_corpus_max_characters\",\n path: \"search.embedding_corpus_max_characters\",\n kind: \"integer\",\n min: 1,\n summary: \"Maximum semantic corpus characters per item before truncation.\",\n },\n {\n key: \"search_embedding_batch_size\",\n path: \"search.embedding_batch_size\",\n kind: \"integer\",\n min: 1,\n summary: \"Number of items embedded per request batch.\",\n },\n {\n key: \"search_embedding_timeout_ms\",\n path: \"search.embedding_timeout_ms\",\n kind: \"integer\",\n min: 1,\n summary: \"Per-request embedding timeout in milliseconds.\",\n },\n {\n key: \"search_score_threshold\",\n path: \"search.score_threshold\",\n kind: \"number\",\n summary: \"Minimum score for a hit to be returned (0 keeps all matches).\",\n },\n {\n key: \"search_hybrid_semantic_weight\",\n path: \"search.hybrid_semantic_weight\",\n kind: \"ratio\",\n summary: \"Hybrid mode semantic weight in [0, 1] (1-weight goes to keyword).\",\n },\n {\n key: \"search_max_results\",\n path: \"search.max_results\",\n kind: \"integer\",\n min: 1,\n summary: \"Default upper bound on search hits when --limit is not supplied.\",\n },\n {\n key: \"search_bm25_k1\",\n path: \"search.bm25.k1\",\n kind: \"number\",\n min: 0,\n summary: \"Offline BM25 term-frequency saturation (k1); higher saturates repeated terms slower (default 1.2).\",\n },\n {\n key: \"search_bm25_b\",\n path: \"search.bm25.b\",\n kind: \"ratio\",\n summary: \"Offline BM25 document-length normalization (b) in [0, 1]; 0 disables, 1 fully normalizes (default 0.75).\",\n },\n {\n key: \"openai_base_url\",\n path: \"providers.openai.base_url\",\n kind: \"string\",\n summary: \"OpenAI-compatible API base URL (LM Studio/vLLM also use this).\",\n },\n {\n key: \"openai_api_key\",\n path: \"providers.openai.api_key\",\n kind: \"string\",\n summary: \"OpenAI-compatible API key.\",\n },\n {\n key: \"openai_model\",\n path: \"providers.openai.model\",\n kind: \"string\",\n summary: \"OpenAI-compatible embedding model name.\",\n },\n {\n key: \"ollama_base_url\",\n path: \"providers.ollama.base_url\",\n kind: \"string\",\n summary: \"Ollama API base URL (typically http://localhost:11434).\",\n },\n {\n key: \"ollama_model\",\n path: \"providers.ollama.model\",\n kind: \"string\",\n summary: \"Ollama embedding model name (e.g. nomic-embed-text).\",\n },\n {\n key: \"vector_store_adapter\",\n path: \"vector_store.adapter\",\n kind: \"string\",\n summary: \"Vector store adapter name (lancedb, qdrant, or an extension adapter).\",\n },\n {\n key: \"vector_store_collection_name\",\n path: \"vector_store.collection_name\",\n kind: \"string\",\n non_empty: true,\n summary: \"Vector collection/table name shared by Qdrant and LanceDB adapters.\",\n },\n {\n key: \"qdrant_url\",\n path: \"vector_store.qdrant.url\",\n kind: \"string\",\n summary: \"Qdrant HTTP API URL.\",\n },\n {\n key: \"qdrant_api_key\",\n path: \"vector_store.qdrant.api_key\",\n kind: \"string\",\n summary: \"Qdrant API key (empty if running unauthenticated).\",\n },\n {\n key: \"lancedb_path\",\n path: \"vector_store.lancedb.path\",\n kind: \"string\",\n summary: \"LanceDB storage path (relative to pm root or absolute).\",\n },\n // General workspace leaves (id/author/output/locks/schema governance). These\n // are documented user-facing settings in CONFIGURATION.md that previously\n // required hand-editing settings.json.\n {\n key: \"id_prefix\",\n path: \"id_prefix\",\n kind: \"string\",\n non_empty: true,\n summary: \"Prefix for generated item IDs (e.g. \\\"pm\\\" produces pm-xxxx).\",\n },\n {\n key: \"author_default\",\n path: \"author_default\",\n kind: \"string\",\n non_empty: true,\n summary: \"Default author recorded on mutations when --author is not supplied.\",\n },\n {\n key: \"output_default_format\",\n path: \"output.default_format\",\n kind: \"string\",\n choices: [\"toon\", \"json\"],\n summary: \"Default output format for commands that support it: toon or json.\",\n },\n {\n key: \"locks_ttl_seconds\",\n path: \"locks.ttl_seconds\",\n kind: \"integer\",\n min: 1,\n summary: \"Claim/lock time-to-live in seconds before a stale lock can be reclaimed.\",\n },\n {\n key: \"locks_wait_ms\",\n path: \"locks.wait_ms\",\n kind: \"integer\",\n min: 0,\n summary:\n \"Bounded jittered wait in milliseconds before a contended item mutation fails with lock_conflict; 0 fails fast. PM_LOCK_WAIT_MS overrides per invocation.\",\n },\n {\n key: \"checkpoints_retention_days\",\n path: \"checkpoints.retention_days\",\n kind: \"integer\",\n min: 1,\n summary: \"Age in days above which pm gc --scope checkpoints prunes bulk-mutation rollback checkpoints.\",\n },\n {\n key: \"schema_unknown_field_policy\",\n path: \"schema.unknown_field_policy\",\n kind: \"string\",\n choices: [\"allow\", \"warn\", \"reject\"],\n summary: \"How item I/O handles metadata keys not in the field registry: allow, warn, or reject.\",\n },\n // History compaction policy leaves (pm health advisory + pm history-compact\n // bulk-sweep default threshold). Disabled by default; enabling makes large\n // streams discoverable without a manual stats pass.\n {\n key: \"history_compact_policy_enabled\",\n path: \"history.compact_policy.enabled\",\n kind: \"boolean\",\n summary: \"Enable the history-compaction advisory: pm health warns on over-threshold streams.\",\n },\n {\n key: \"history_compact_policy_max_entries\",\n path: \"history.compact_policy.max_entries\",\n kind: \"integer\",\n min: 1,\n summary: \"Entry count above which a history stream is flagged (and the default pm history-compact --all-over threshold).\",\n },\n {\n key: \"history_compact_policy_trigger\",\n path: \"history.compact_policy.trigger\",\n kind: \"string\",\n choices: [\"health_warn\", \"auto\"],\n summary: \"History-compaction policy intent: health_warn (advisory only) or auto (scheduled sweeps expected).\",\n },\n];\n\nconst DESCRIPTOR_BY_KEY: ReadonlyMap<string, NestedSettingDescriptor> = new Map(\n NESTED_SETTING_DESCRIPTORS.flatMap((descriptor) => [\n [descriptor.key, descriptor],\n [descriptor.path.toLowerCase().replaceAll(\"-\", \"_\"), descriptor],\n ]),\n);\n\n/**\n * Map a raw user-supplied key (kebab case, snake case, or the dotted settings\n * path surfaced by `pm config list`) onto a known nested-leaf descriptor.\n * Returns `undefined` when the key is not a nested leaf, letting callers fall\n * back to the regular ConfigKey path.\n */\nexport function resolveNestedSettingDescriptor(raw: string | undefined): NestedSettingDescriptor | undefined {\n if (typeof raw !== \"string\") {\n return undefined;\n }\n const normalized = raw.trim().toLowerCase().replaceAll(\"-\", \"_\");\n if (normalized.length === 0) {\n return undefined;\n }\n return DESCRIPTOR_BY_KEY.get(normalized);\n}\n\n/** Recoverable parsed value with the descriptor it satisfied. */\nexport interface NestedSettingParsedValue {\n descriptor: NestedSettingDescriptor;\n value: string | number | boolean;\n}\n\n/** Throwable validation error returned as a structured result. */\nexport interface NestedSettingParseError {\n message: string;\n}\n\n/**\n * Restricts nested setting parse result values accepted by command, SDK, and storage contracts.\n */\nexport type NestedSettingParseResult =\n | { ok: true; parsed: NestedSettingParsedValue }\n | { ok: false; error: NestedSettingParseError };\n\nfunction parseNestedBooleanValue(descriptor: NestedSettingDescriptor, rawValue: string): NestedSettingParseResult {\n const normalized = rawValue.trim().toLowerCase();\n if (normalized === \"true\" || normalized === \"1\" || normalized === \"yes\" || normalized === \"on\") {\n return { ok: true, parsed: { descriptor, value: true } };\n }\n if (normalized === \"false\" || normalized === \"0\" || normalized === \"no\" || normalized === \"off\") {\n return { ok: true, parsed: { descriptor, value: false } };\n }\n return {\n ok: false,\n error: {\n message: `Config set ${descriptor.key} requires a boolean value (true|false), got \"${rawValue}\"`,\n },\n };\n}\n\nfunction parseNestedStringValue(\n descriptor: NestedSettingDescriptor,\n rawValue: string,\n trimmed: string,\n): NestedSettingParseResult {\n if (descriptor.non_empty === true && trimmed.length === 0) {\n return {\n ok: false,\n error: { message: `Config set ${descriptor.key} requires a non-empty value` },\n };\n }\n if (descriptor.choices && !descriptor.choices.includes(trimmed)) {\n return {\n ok: false,\n error: {\n message: `Config set ${descriptor.key} must be one of ${descriptor.choices.join(\"|\")}, got \"${rawValue}\"`,\n },\n };\n }\n return { ok: true, parsed: { descriptor, value: trimmed } };\n}\n\nfunction parseFiniteNestedNumber(\n descriptor: NestedSettingDescriptor,\n rawValue: string,\n trimmed: string,\n): { ok: true; value: number } | { ok: false; error: NestedSettingParseError } {\n if (trimmed.length === 0) {\n return {\n ok: false,\n error: { message: `Config set ${descriptor.key} requires a non-empty value` },\n };\n }\n const parsed = Number(trimmed);\n if (!Number.isFinite(parsed)) {\n return {\n ok: false,\n error: { message: `Config set ${descriptor.key} requires a finite number, got \"${rawValue}\"` },\n };\n }\n return { ok: true, value: parsed };\n}\n\nfunction parseNestedIntegerValue(\n descriptor: NestedSettingDescriptor,\n rawValue: string,\n value: number,\n): NestedSettingParseResult {\n if (!Number.isInteger(value) || value < 0) {\n return {\n ok: false,\n error: { message: `Config set ${descriptor.key} requires a non-negative integer, got \"${rawValue}\"` },\n };\n }\n if (descriptor.min !== undefined && value < descriptor.min) {\n return {\n ok: false,\n error: {\n message: `Config set ${descriptor.key} requires an integer >= ${descriptor.min}, got \"${rawValue}\" (the runtime silently ignores 0 here and falls back to the default)`,\n },\n };\n }\n return { ok: true, parsed: { descriptor, value } };\n}\n\nfunction parseNestedRatioValue(\n descriptor: NestedSettingDescriptor,\n rawValue: string,\n value: number,\n): NestedSettingParseResult {\n if (value < 0 || value > 1) {\n return {\n ok: false,\n error: { message: `Config set ${descriptor.key} requires a number in [0, 1], got \"${rawValue}\"` },\n };\n }\n return { ok: true, parsed: { descriptor, value } };\n}\n\nfunction parseNestedNumberValue(\n descriptor: NestedSettingDescriptor,\n rawValue: string,\n value: number,\n): NestedSettingParseResult {\n if (descriptor.min !== undefined && value < descriptor.min) {\n return {\n ok: false,\n error: { message: `Config set ${descriptor.key} requires a number >= ${descriptor.min}, got \"${rawValue}\"` },\n };\n }\n return { ok: true, parsed: { descriptor, value } };\n}\n\n/**\n * Validate and coerce a raw string value for a nested-leaf setting. The\n * returned value is the typed leaf that should be written into PmSettings.\n *\n * Empty strings are allowed for \"string\" leaves unless `non_empty` is set.\n */\nexport function parseNestedSettingValue(\n descriptor: NestedSettingDescriptor,\n rawValue: string,\n): NestedSettingParseResult {\n if (typeof rawValue !== \"string\") {\n return { ok: false, error: { message: `Config set ${descriptor.key} requires a string value` } };\n }\n const trimmed = rawValue.trim();\n if (descriptor.kind === \"boolean\") {\n return parseNestedBooleanValue(descriptor, rawValue);\n }\n if (descriptor.kind === \"string\") {\n return parseNestedStringValue(descriptor, rawValue, trimmed);\n }\n\n // Number(\"\") === 0, which would silently accept empty / whitespace-only input\n // as a valid zero. Reject explicitly so misconfigurations don't slip through.\n const parsed = parseFiniteNestedNumber(descriptor, rawValue, trimmed);\n if (!parsed.ok) {\n return { ok: false, error: parsed.error };\n }\n if (descriptor.kind === \"integer\") {\n return parseNestedIntegerValue(descriptor, rawValue, parsed.value);\n }\n if (descriptor.kind === \"ratio\") {\n return parseNestedRatioValue(descriptor, rawValue, parsed.value);\n }\n // kind === \"number\" — negatives are allowed; only apply an explicit `min`.\n return parseNestedNumberValue(descriptor, rawValue, parsed.value);\n}\n\n/** Walk a dotted path on an arbitrary record (best-effort, returns null on miss). */\nexport function readNestedSettingValue(\n settings: unknown,\n descriptor: NestedSettingDescriptor,\n): string | number | boolean | null {\n const segments = descriptor.path.split(\".\");\n let cursor: unknown = settings;\n for (const segment of segments) {\n if (typeof cursor !== \"object\" || cursor === null) {\n return null;\n }\n cursor = (cursor as Record<string, unknown>)[segment];\n }\n if (typeof cursor === \"string\" || typeof cursor === \"number\" || typeof cursor === \"boolean\") {\n return cursor;\n }\n return null;\n}\n\n/**\n * Set a leaf value on a settings object by walking the descriptor's dotted\n * path. Missing intermediate objects are created. Returns `true` when the\n * value actually changed.\n */\nexport function writeNestedSettingValue(\n settings: Record<string, unknown>,\n descriptor: NestedSettingDescriptor,\n value: string | number | boolean,\n): boolean {\n const segments = descriptor.path.split(\".\");\n let cursor: Record<string, unknown> = settings;\n for (let index = 0; index < segments.length - 1; index += 1) {\n const segment = segments[index];\n const existing = cursor[segment];\n if (typeof existing !== \"object\" || existing === null || Array.isArray(existing)) {\n const next: Record<string, unknown> = {};\n cursor[segment] = next;\n cursor = next;\n } else {\n cursor = existing as Record<string, unknown>;\n }\n }\n const leafKey = segments[segments.length - 1];\n const previous = cursor[leafKey];\n if (previous === value) {\n return false;\n }\n cursor[leafKey] = value;\n return true;\n}\n"],"names":[],"mappings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MAAM,GAAG,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QAC5D,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QAChC,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;QACjC,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;YACjF,MAAM,IAAI,GAA4B,EAAE,CAAC;YACzC,MAAM,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;YACvB,MAAM,GAAG,IAAI,CAAC;QAChB,CAAC;aAAM,CAAC;YACN,MAAM,GAAG,QAAmC,CAAC;QAC/C,CAAC;IACH,CAAC;IACD,MAAM,OAAO,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC9C,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;IACjC,IAAI,QAAQ,KAAK,KAAK,EAAE,CAAC;QACvB,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC;IACxB,OAAO,IAAI,CAAC;AACd,CAAC","debugId":"410dca04-d154-56b7-b8d1-d12215736f4f"}
|
|
@@ -96,6 +96,12 @@ export interface DescribeExtensionActivationOptions {
|
|
|
96
96
|
* union across every extension in the activation result.
|
|
97
97
|
*/
|
|
98
98
|
extensionName?: string;
|
|
99
|
+
/**
|
|
100
|
+
* Restrict the summary to a set of extension names. This supports package
|
|
101
|
+
* aliases that resolve to multiple extensions while keeping the historical
|
|
102
|
+
* single-name option intact.
|
|
103
|
+
*/
|
|
104
|
+
extensionNames?: readonly string[];
|
|
99
105
|
}
|
|
100
106
|
/**
|
|
101
107
|
* Summarize, by name, every registration surface an activation exercised.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="1c4b6114-ebdc-5cd5-8d51-5992b820af47")}catch(e){}}();
|
|
3
3
|
import { collectUsedExtensionCapabilities, normalizeExtensionName } from "./capability-usage.js";
|
|
4
4
|
/**
|
|
5
5
|
* Canonical lifecycle hook kinds paired with their {@link ExtensionHookRegistry}
|
|
@@ -28,8 +28,14 @@ export function describeExtensionActivation(activation, options = {}) {
|
|
|
28
28
|
// Match both sides with the same normalizer collectUsedExtensionCapabilities
|
|
29
29
|
// uses for the `capabilities` field below, so a filtered summary's named
|
|
30
30
|
// surfaces and capabilities never disagree for a stored name with whitespace.
|
|
31
|
-
const
|
|
32
|
-
|
|
31
|
+
const filters = new Set();
|
|
32
|
+
if (options.extensionName !== undefined) {
|
|
33
|
+
filters.add(normalizeExtensionName(options.extensionName));
|
|
34
|
+
}
|
|
35
|
+
for (const name of options.extensionNames ?? []) {
|
|
36
|
+
filters.add(normalizeExtensionName(name));
|
|
37
|
+
}
|
|
38
|
+
const matches = (name) => filters.size === 0 || filters.has(normalizeExtensionName(name));
|
|
33
39
|
const collect = (entries, identify) => sortUnique(entries.filter((entry) => matches(entry.name)).map(identify));
|
|
34
40
|
const collectFlat = (entries, expand) => sortUnique(entries.filter((entry) => matches(entry.name)).flatMap(expand));
|
|
35
41
|
const { registrations, commands, parsers, preflight, services, renderers, hooks } = activation;
|
|
@@ -58,4 +64,4 @@ function sortUnique(values) {
|
|
|
58
64
|
return [...new Set(values)].sort((left, right) => left.localeCompare(right));
|
|
59
65
|
}
|
|
60
66
|
//# sourceMappingURL=activation-summary.js.map
|
|
61
|
-
//# debugId=
|
|
67
|
+
//# debugId=1c4b6114-ebdc-5cd5-8d51-5992b820af47
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activation-summary.js","sources":["core/extensions/activation-summary.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module core/extensions/activation-summary\n *\n * Enumerates *what* an extension activation registered, by name, in one pass.\n *\n * {@link ./extension-types.js#ExtensionActivationResult | `ExtensionActivationResult`}\n * already carries per-surface *counts* (`hook_counts`, `registration_counts`,\n * the various `*_count` fields), but answering \"what does this extension\n * register?\" otherwise means walking fifteen-plus sub-registries by hand\n * (`registrations.commands`/`flags`/`item_types`/`item_fields`/`migrations`/\n * `importers`/`exporters`/`search_providers`/`vector_store_adapters`,\n * `commands.overrides`/`handlers`, the `parsers`/`preflight`/`services`/\n * `renderers` override registries, and the five `hooks.*` arrays).\n *\n * {@link describeExtensionActivation} flattens all of them into one sorted,\n * deterministic {@link ExtensionActivationSummary} of identifiers — the\n * `describe` (enumerate-all) verb that complements the SDK's `assert*`\n * (verify-one) and `run*` (invoke-one) testing helpers. It serves two callers:\n *\n * - **Agents** get a single token-efficient view of an activation instead of\n * traversing every registry (\"project management = context management\").\n * - **Package authors** can assert their *entire* registration surface in one\n * `deepEqual` — a least-privilege \"I register exactly these surfaces and\n * nothing more\" check, the positive counterpart to\n * {@link ./capability-usage.js#reconcileExtensionCapabilityUsage}.\n */\nimport type {\n ExtensionActivationResult,\n ExtensionCapability,\n ExtensionHookRegistry,\n ExtensionServiceName,\n OutputRendererFormat,\n} from \"./extension-types.js\";\nimport { collectUsedExtensionCapabilities, normalizeExtensionName } from \"./capability-usage.js\";\n\n/**\n * Canonical lifecycle hook kinds paired with their {@link ExtensionHookRegistry}\n * field, ordered to match `ExtensionActivationResult.hook_counts` so a summary's\n * `hooks` list reads in the same stable order the runtime reports counts in.\n */\nconst HOOK_REGISTRY_FIELD_TO_KIND = [\n [\"beforeCommand\", \"before_command\"],\n [\"afterCommand\", \"after_command\"],\n [\"onWrite\", \"on_write\"],\n [\"onRead\", \"on_read\"],\n [\"onIndex\", \"on_index\"],\n] as const satisfies ReadonlyArray<readonly [keyof ExtensionHookRegistry, string]>;\n\n/**\n * Flat, name-level enumeration of every surface an activation registered.\n *\n * Arrays are de-duplicated for deterministic equality. Most are locale-sorted;\n * {@link ExtensionActivationSummary.hooks} is the exception — it is emitted in\n * canonical lifecycle order to mirror `ExtensionActivationResult.hook_counts`,\n * not alphabetically. The three command fields capture distinct dimensions and\n * can overlap: a command\n * registered via `api.registerCommand(definition)` appears in both\n * {@link ExtensionActivationSummary.commands} (its declared definition) and\n * {@link ExtensionActivationSummary.command_handlers} (its executable handler),\n * whereas a built-in command replaced via `api.registerCommand(name, override)`\n * appears only in {@link ExtensionActivationSummary.command_overrides}.\n */\nexport interface ExtensionActivationSummary {\n /** Known capabilities the registered surfaces exercise (sorted, de-duplicated). */\n capabilities: ExtensionCapability[];\n /** Full command paths declared via `registerCommand`'s definition form. */\n commands: string[];\n /** Built-in command paths replaced by an `registerCommand(name, override)` handler. */\n command_overrides: string[];\n /**\n * Full command paths backed by an extension-provided handler. A superset of\n * {@link ExtensionActivationSummary.commands} that also includes the\n * `<name> import`/`<name> export` paths synthesized for importers/exporters.\n */\n command_handlers: string[];\n /** Lifecycle hook kinds with at least one registered hook (canonical order). */\n hooks: string[];\n /** Command paths that received extension-registered flags. */\n flag_commands: string[];\n /** Custom item-type names registered via `registerItemTypes`. */\n item_types: string[];\n /** Custom front-matter field names registered via `registerItemFields`. */\n item_fields: string[];\n /** Schema migration ids registered via `registerMigration` (id-less migrations are omitted — they carry no identifier). */\n migrations: string[];\n /** Project profile names registered via `registerProfile`. */\n profiles: string[];\n /** Importer names registered via `registerImporter`. */\n importers: string[];\n /** Exporter names registered via `registerExporter`. */\n exporters: string[];\n /** Search-provider names registered via `registerSearchProvider`. */\n search_providers: string[];\n /** Vector-store adapter names registered via `registerVectorStoreAdapter`. */\n vector_store_adapters: string[];\n /** Command paths with a parser override registered via `registerParser`. */\n parser_overrides: string[];\n /** Built-in service names overridden via `registerService`. */\n service_overrides: ExtensionServiceName[];\n /** Output formats with a renderer override registered via `registerRenderer`. */\n renderer_overrides: OutputRendererFormat[];\n /**\n * Count of registered preflight overrides. The surface carries no per-entry\n * identifier, so this is a `number` rather than `string[]` — the only numeric\n * field in the summary.\n */\n preflight_overrides: number;\n}\n\n/**\n * Options for {@link describeExtensionActivation}.\n */\nexport interface DescribeExtensionActivationOptions {\n /**\n * Restrict the summary to a single extension by name. Names are matched\n * case-insensitively after trimming, mirroring\n * {@link ./capability-usage.js#collectUsedExtensionCapabilities}. Omit to\n * union across every extension in the activation result.\n */\n extensionName?: string;\n}\n\n/**\n * Summarize, by name, every registration surface an activation exercised.\n *\n * Walks the same sub-registries the loader populates and the capability\n * reconciler attributes, returning a flat {@link ExtensionActivationSummary}\n * whose arrays are sorted and de-duplicated. With\n * {@link DescribeExtensionActivationOptions.extensionName} only the matching\n * extension's registrations contribute (across both layers); without it the\n * summary unions every extension in the activation. Failed activations register\n * nothing, so they contribute only an empty summary.\n */\nexport function describeExtensionActivation(\n activation: ExtensionActivationResult,\n options: DescribeExtensionActivationOptions = {},\n): ExtensionActivationSummary {\n // Match both sides with the same normalizer collectUsedExtensionCapabilities\n // uses for the `capabilities` field below, so a filtered summary's named\n // surfaces and capabilities never disagree for a stored name with whitespace.\n const filter = options.extensionName !== undefined ? normalizeExtensionName(options.extensionName) : null;\n const matches = (name: string): boolean => filter === null || normalizeExtensionName(name) === filter;\n const collect = <TEntry extends { name: string }, TValue extends string>(\n entries: readonly TEntry[],\n identify: (entry: TEntry) => TValue,\n ): TValue[] => sortUnique(entries.filter((entry) => matches(entry.name)).map(identify));\n const collectFlat = <TEntry extends { name: string }>(\n entries: readonly TEntry[],\n expand: (entry: TEntry) => readonly string[],\n ): string[] => sortUnique(entries.filter((entry) => matches(entry.name)).flatMap(expand));\n const { registrations, commands, parsers, preflight, services, renderers, hooks } = activation;\n return {\n capabilities: collectUsedExtensionCapabilities(activation, options),\n commands: collect(registrations.commands, (entry) => entry.command),\n command_overrides: collect(commands.overrides, (entry) => entry.command),\n command_handlers: collect(commands.handlers, (entry) => entry.command),\n hooks: HOOK_REGISTRY_FIELD_TO_KIND.filter(([field]) => hooks[field].some((entry) => matches(entry.name))).map(\n ([, kind]) => kind,\n ),\n flag_commands: collect(registrations.flags, (entry) => entry.target_command),\n item_types: collectFlat(registrations.item_types, (entry) => entry.types.map((type) => type.name)),\n item_fields: collectFlat(registrations.item_fields, (entry) => entry.fields.map((field) => field.name)),\n migrations: collectFlat(registrations.migrations, (entry) =>\n typeof entry.definition.id === \"string\" ? [entry.definition.id] : [],\n ),\n profiles: collect(registrations.profiles, (entry) => entry.profile.name),\n importers: collect(registrations.importers, (entry) => entry.importer),\n exporters: collect(registrations.exporters, (entry) => entry.exporter),\n search_providers: collect(registrations.search_providers, (entry) => entry.definition.name),\n vector_store_adapters: collect(registrations.vector_store_adapters, (entry) => entry.definition.name),\n parser_overrides: collect(parsers.overrides, (entry) => entry.command),\n service_overrides: collect(services.overrides, (entry) => entry.service),\n renderer_overrides: collect(renderers.overrides, (entry) => entry.format),\n preflight_overrides: preflight.overrides.filter((entry) => matches(entry.name)).length,\n };\n}\n\nfunction sortUnique<TValue extends string>(values: readonly TValue[]): TValue[] {\n return [...new Set(values)].sort((left, right) => left.localeCompare(right));\n}\n"],"names":[],"mappings":";;AAiCA,OAAO,EAAE,gCAAgC,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAEjG;;;;GAIG;AACH,MAAM,2BAA2B,GAAG;IAClC,CAAC,eAAe,EAAE,gBAAgB,CAAC;IACnC,CAAC,cAAc,EAAE,eAAe,CAAC;IACjC,CAAC,SAAS,EAAE,UAAU,CAAC;IACvB,CAAC,QAAQ,EAAE,SAAS,CAAC;IACrB,CAAC,SAAS,EAAE,UAAU,CAAC;CACyD,CAAC;AA4EnF;;;;;;;;;;GAUG;AACH,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["core/extensions/activation-summary.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module core/extensions/activation-summary\n *\n * Enumerates *what* an extension activation registered, by name, in one pass.\n *\n * {@link ./extension-types.js#ExtensionActivationResult | `ExtensionActivationResult`}\n * already carries per-surface *counts* (`hook_counts`, `registration_counts`,\n * the various `*_count` fields), but answering \"what does this extension\n * register?\" otherwise means walking fifteen-plus sub-registries by hand\n * (`registrations.commands`/`flags`/`item_types`/`item_fields`/`migrations`/\n * `importers`/`exporters`/`search_providers`/`vector_store_adapters`,\n * `commands.overrides`/`handlers`, the `parsers`/`preflight`/`services`/\n * `renderers` override registries, and the five `hooks.*` arrays).\n *\n * {@link describeExtensionActivation} flattens all of them into one sorted,\n * deterministic {@link ExtensionActivationSummary} of identifiers — the\n * `describe` (enumerate-all) verb that complements the SDK's `assert*`\n * (verify-one) and `run*` (invoke-one) testing helpers. It serves two callers:\n *\n * - **Agents** get a single token-efficient view of an activation instead of\n * traversing every registry (\"project management = context management\").\n * - **Package authors** can assert their *entire* registration surface in one\n * `deepEqual` — a least-privilege \"I register exactly these surfaces and\n * nothing more\" check, the positive counterpart to\n * {@link ./capability-usage.js#reconcileExtensionCapabilityUsage}.\n */\nimport type {\n ExtensionActivationResult,\n ExtensionCapability,\n ExtensionHookRegistry,\n ExtensionServiceName,\n OutputRendererFormat,\n} from \"./extension-types.js\";\nimport { collectUsedExtensionCapabilities, normalizeExtensionName } from \"./capability-usage.js\";\n\n/**\n * Canonical lifecycle hook kinds paired with their {@link ExtensionHookRegistry}\n * field, ordered to match `ExtensionActivationResult.hook_counts` so a summary's\n * `hooks` list reads in the same stable order the runtime reports counts in.\n */\nconst HOOK_REGISTRY_FIELD_TO_KIND = [\n [\"beforeCommand\", \"before_command\"],\n [\"afterCommand\", \"after_command\"],\n [\"onWrite\", \"on_write\"],\n [\"onRead\", \"on_read\"],\n [\"onIndex\", \"on_index\"],\n] as const satisfies ReadonlyArray<readonly [keyof ExtensionHookRegistry, string]>;\n\n/**\n * Flat, name-level enumeration of every surface an activation registered.\n *\n * Arrays are de-duplicated for deterministic equality. Most are locale-sorted;\n * {@link ExtensionActivationSummary.hooks} is the exception — it is emitted in\n * canonical lifecycle order to mirror `ExtensionActivationResult.hook_counts`,\n * not alphabetically. The three command fields capture distinct dimensions and\n * can overlap: a command\n * registered via `api.registerCommand(definition)` appears in both\n * {@link ExtensionActivationSummary.commands} (its declared definition) and\n * {@link ExtensionActivationSummary.command_handlers} (its executable handler),\n * whereas a built-in command replaced via `api.registerCommand(name, override)`\n * appears only in {@link ExtensionActivationSummary.command_overrides}.\n */\nexport interface ExtensionActivationSummary {\n /** Known capabilities the registered surfaces exercise (sorted, de-duplicated). */\n capabilities: ExtensionCapability[];\n /** Full command paths declared via `registerCommand`'s definition form. */\n commands: string[];\n /** Built-in command paths replaced by an `registerCommand(name, override)` handler. */\n command_overrides: string[];\n /**\n * Full command paths backed by an extension-provided handler. A superset of\n * {@link ExtensionActivationSummary.commands} that also includes the\n * `<name> import`/`<name> export` paths synthesized for importers/exporters.\n */\n command_handlers: string[];\n /** Lifecycle hook kinds with at least one registered hook (canonical order). */\n hooks: string[];\n /** Command paths that received extension-registered flags. */\n flag_commands: string[];\n /** Custom item-type names registered via `registerItemTypes`. */\n item_types: string[];\n /** Custom front-matter field names registered via `registerItemFields`. */\n item_fields: string[];\n /** Schema migration ids registered via `registerMigration` (id-less migrations are omitted — they carry no identifier). */\n migrations: string[];\n /** Project profile names registered via `registerProfile`. */\n profiles: string[];\n /** Importer names registered via `registerImporter`. */\n importers: string[];\n /** Exporter names registered via `registerExporter`. */\n exporters: string[];\n /** Search-provider names registered via `registerSearchProvider`. */\n search_providers: string[];\n /** Vector-store adapter names registered via `registerVectorStoreAdapter`. */\n vector_store_adapters: string[];\n /** Command paths with a parser override registered via `registerParser`. */\n parser_overrides: string[];\n /** Built-in service names overridden via `registerService`. */\n service_overrides: ExtensionServiceName[];\n /** Output formats with a renderer override registered via `registerRenderer`. */\n renderer_overrides: OutputRendererFormat[];\n /**\n * Count of registered preflight overrides. The surface carries no per-entry\n * identifier, so this is a `number` rather than `string[]` — the only numeric\n * field in the summary.\n */\n preflight_overrides: number;\n}\n\n/**\n * Options for {@link describeExtensionActivation}.\n */\nexport interface DescribeExtensionActivationOptions {\n /**\n * Restrict the summary to a single extension by name. Names are matched\n * case-insensitively after trimming, mirroring\n * {@link ./capability-usage.js#collectUsedExtensionCapabilities}. Omit to\n * union across every extension in the activation result.\n */\n extensionName?: string;\n /**\n * Restrict the summary to a set of extension names. This supports package\n * aliases that resolve to multiple extensions while keeping the historical\n * single-name option intact.\n */\n extensionNames?: readonly string[];\n}\n\n/**\n * Summarize, by name, every registration surface an activation exercised.\n *\n * Walks the same sub-registries the loader populates and the capability\n * reconciler attributes, returning a flat {@link ExtensionActivationSummary}\n * whose arrays are sorted and de-duplicated. With\n * {@link DescribeExtensionActivationOptions.extensionName} only the matching\n * extension's registrations contribute (across both layers); without it the\n * summary unions every extension in the activation. Failed activations register\n * nothing, so they contribute only an empty summary.\n */\nexport function describeExtensionActivation(\n activation: ExtensionActivationResult,\n options: DescribeExtensionActivationOptions = {},\n): ExtensionActivationSummary {\n // Match both sides with the same normalizer collectUsedExtensionCapabilities\n // uses for the `capabilities` field below, so a filtered summary's named\n // surfaces and capabilities never disagree for a stored name with whitespace.\n const filters = new Set<string>();\n if (options.extensionName !== undefined) {\n filters.add(normalizeExtensionName(options.extensionName));\n }\n for (const name of options.extensionNames ?? []) {\n filters.add(normalizeExtensionName(name));\n }\n const matches = (name: string): boolean => filters.size === 0 || filters.has(normalizeExtensionName(name));\n const collect = <TEntry extends { name: string }, TValue extends string>(\n entries: readonly TEntry[],\n identify: (entry: TEntry) => TValue,\n ): TValue[] => sortUnique(entries.filter((entry) => matches(entry.name)).map(identify));\n const collectFlat = <TEntry extends { name: string }>(\n entries: readonly TEntry[],\n expand: (entry: TEntry) => readonly string[],\n ): string[] => sortUnique(entries.filter((entry) => matches(entry.name)).flatMap(expand));\n const { registrations, commands, parsers, preflight, services, renderers, hooks } = activation;\n return {\n capabilities: collectUsedExtensionCapabilities(activation, options),\n commands: collect(registrations.commands, (entry) => entry.command),\n command_overrides: collect(commands.overrides, (entry) => entry.command),\n command_handlers: collect(commands.handlers, (entry) => entry.command),\n hooks: HOOK_REGISTRY_FIELD_TO_KIND.filter(([field]) => hooks[field].some((entry) => matches(entry.name))).map(\n ([, kind]) => kind,\n ),\n flag_commands: collect(registrations.flags, (entry) => entry.target_command),\n item_types: collectFlat(registrations.item_types, (entry) => entry.types.map((type) => type.name)),\n item_fields: collectFlat(registrations.item_fields, (entry) => entry.fields.map((field) => field.name)),\n migrations: collectFlat(registrations.migrations, (entry) =>\n typeof entry.definition.id === \"string\" ? [entry.definition.id] : [],\n ),\n profiles: collect(registrations.profiles, (entry) => entry.profile.name),\n importers: collect(registrations.importers, (entry) => entry.importer),\n exporters: collect(registrations.exporters, (entry) => entry.exporter),\n search_providers: collect(registrations.search_providers, (entry) => entry.definition.name),\n vector_store_adapters: collect(registrations.vector_store_adapters, (entry) => entry.definition.name),\n parser_overrides: collect(parsers.overrides, (entry) => entry.command),\n service_overrides: collect(services.overrides, (entry) => entry.service),\n renderer_overrides: collect(renderers.overrides, (entry) => entry.format),\n preflight_overrides: preflight.overrides.filter((entry) => matches(entry.name)).length,\n };\n}\n\nfunction sortUnique<TValue extends string>(values: readonly TValue[]): TValue[] {\n return [...new Set(values)].sort((left, right) => left.localeCompare(right));\n}\n"],"names":[],"mappings":";;AAiCA,OAAO,EAAE,gCAAgC,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAEjG;;;;GAIG;AACH,MAAM,2BAA2B,GAAG;IAClC,CAAC,eAAe,EAAE,gBAAgB,CAAC;IACnC,CAAC,cAAc,EAAE,eAAe,CAAC;IACjC,CAAC,SAAS,EAAE,UAAU,CAAC;IACvB,CAAC,QAAQ,EAAE,SAAS,CAAC;IACrB,CAAC,SAAS,EAAE,UAAU,CAAC;CACyD,CAAC;AAk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B;IAClE,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;AAC/E,CAAC","debugId":"1c4b6114-ebdc-5cd5-8d51-5992b820af47"}
|
|
@@ -58,6 +58,12 @@ export interface CollectUsedExtensionCapabilitiesOptions {
|
|
|
58
58
|
* the activation result.
|
|
59
59
|
*/
|
|
60
60
|
extensionName?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Restrict the result to a set of extension names. This preserves the
|
|
63
|
+
* single-name option while allowing package aliases that activate multiple
|
|
64
|
+
* extensions to summarize their combined capability surface.
|
|
65
|
+
*/
|
|
66
|
+
extensionNames?: readonly string[];
|
|
61
67
|
}
|
|
62
68
|
/**
|
|
63
69
|
* Canonical extension-name normalization (trim + lowercase) used to match an
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="4e149e81-498e-561d-8c32-c3f3aec2e2d2")}catch(e){}}();
|
|
3
3
|
import { normalizeKnownExtensionCapability } from "./extension-capability-aliases.js";
|
|
4
4
|
/**
|
|
5
5
|
* Canonical map from each known extension capability to the human-readable
|
|
@@ -104,10 +104,16 @@ function attributeCapabilityUsage(activation) {
|
|
|
104
104
|
*/
|
|
105
105
|
export function collectUsedExtensionCapabilities(activation, options = {}) {
|
|
106
106
|
const usage = attributeCapabilityUsage(activation);
|
|
107
|
-
const
|
|
107
|
+
const filters = new Set();
|
|
108
|
+
if (options.extensionName !== undefined) {
|
|
109
|
+
filters.add(normalizeExtensionName(options.extensionName));
|
|
110
|
+
}
|
|
111
|
+
for (const name of options.extensionNames ?? []) {
|
|
112
|
+
filters.add(normalizeExtensionName(name));
|
|
113
|
+
}
|
|
108
114
|
const used = new Set();
|
|
109
115
|
for (const [key, capabilities] of usage) {
|
|
110
|
-
if (
|
|
116
|
+
if (filters.size > 0 && !filters.has(usageKeyName(key))) {
|
|
111
117
|
continue;
|
|
112
118
|
}
|
|
113
119
|
for (const capability of capabilities) {
|
|
@@ -140,4 +146,4 @@ export function reconcileExtensionCapabilityUsage(loaded, activation) {
|
|
|
140
146
|
return reconciliations;
|
|
141
147
|
}
|
|
142
148
|
//# sourceMappingURL=capability-usage.js.map
|
|
143
|
-
//# debugId=
|
|
149
|
+
//# debugId=4e149e81-498e-561d-8c32-c3f3aec2e2d2
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capability-usage.js","sources":["core/extensions/capability-usage.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module core/extensions/capability-usage\n *\n * Reconciles the capabilities an extension manifest *declares* against the\n * capabilities it actually *exercises* during activation.\n *\n * The loader already enforces the opposite direction — registering a surface\n * whose capability is absent from `manifest.capabilities` throws an\n * `extension_capability_missing` activation failure. This module closes the\n * least-privilege loop by detecting capabilities a manifest declares but never\n * registers against, so package authors can trim manifests to the minimum\n * grant. Every declared-but-unused capability is an over-broad permission a\n * reviewer would otherwise have to catch by hand.\n */\nimport type { ExtensionActivationResult, ExtensionCapability, ExtensionLayer } from \"./extension-types.js\";\nimport { normalizeKnownExtensionCapability } from \"./extension-capability-aliases.js\";\n\n/**\n * Canonical map from each known extension capability to the human-readable\n * registration surfaces that exercise it.\n *\n * The `satisfies Record<ExtensionCapability, ...>` guard makes this exhaustive\n * at compile time: adding a capability to `KNOWN_EXTENSION_CAPABILITIES`\n * without giving it a registration surface here fails the build, which prevents\n * a capability that has *no* surface from being perpetually flagged as unused.\n */\nexport const EXTENSION_CAPABILITY_REGISTRATION_SURFACES = {\n commands: [\"registerCommand\", \"command override\", \"command handler\"],\n renderers: [\"registerRenderer\"],\n hooks: [\"hooks.beforeCommand\", \"hooks.afterCommand\", \"hooks.onWrite\", \"hooks.onRead\", \"hooks.onIndex\"],\n schema: [\"registerFlags\", \"registerItemFields\", \"registerItemTypes\", \"registerMigration\", \"registerProfile\"],\n importers: [\"registerImporter\", \"registerExporter\"],\n search: [\"registerSearchProvider\", \"registerVectorStoreAdapter\"],\n parser: [\"registerParser\"],\n preflight: [\"registerPreflight\"],\n services: [\"registerService\"],\n} as const satisfies Record<ExtensionCapability, readonly string[]>;\n\n/**\n * Per-extension reconciliation of declared versus exercised capabilities.\n */\nexport interface ExtensionCapabilityUsageReconciliation {\n /** Layer the extension was loaded from (`global` or `project`). */\n layer: ExtensionLayer;\n /** Extension name as it appears in the manifest. */\n name: string;\n /** Known capabilities declared in the manifest, sorted and de-duplicated. */\n declared: ExtensionCapability[];\n /** Known capabilities the extension actually registered against, sorted. */\n used: ExtensionCapability[];\n /** Declared capabilities with no matching registration (least-privilege gap). */\n unused: ExtensionCapability[];\n}\n\n/**\n * Options for {@link collectUsedExtensionCapabilities}.\n */\nexport interface CollectUsedExtensionCapabilitiesOptions {\n /**\n * Restrict the result to a single extension by name. Names are matched\n * case-insensitively after trimming. Omit to union across every extension in\n * the activation result.\n */\n extensionName?: string;\n}\n\n// `layer` is a closed enum (`\"global\" | \"project\"`) that never contains a\n// colon, so the first colon always separates the layer from the (possibly\n// colon-bearing) name — making the key collision-proof without serialization.\nconst USAGE_KEY_SEPARATOR = \":\";\n\nfunction usageKey(layer: ExtensionLayer, name: string): string {\n return `${layer}${USAGE_KEY_SEPARATOR}${normalizeExtensionName(name)}`;\n}\n\nfunction usageKeyName(key: string): string {\n return key.slice(key.indexOf(USAGE_KEY_SEPARATOR) + 1);\n}\n\n/**\n * Canonical extension-name normalization (trim + lowercase) used to match an\n * `extensionName` filter against a registration's stored `name`.\n *\n * Activation stores `extension.name` verbatim — the synthetic test-activation\n * path (`activateExtensionForTest`) never trims it — so any helper that filters\n * by extension name must normalize both sides with this function to stay\n * consistent, including {@link ../extensions/activation-summary.js#describeExtensionActivation}.\n */\nexport function normalizeExtensionName(name: string): string {\n return name.trim().toLowerCase();\n}\n\nfunction normalizeDeclaredCapabilities(capabilities: readonly string[] | undefined): ExtensionCapability[] {\n if (!Array.isArray(capabilities)) {\n return [];\n }\n const known = new Set<ExtensionCapability>();\n for (const capability of capabilities) {\n // Unknown capabilities are reported by the separate unknown-capability\n // diagnostic; reconciling them here would double-report a typo as \"unused\".\n const normalized = normalizeKnownExtensionCapability(capability);\n if (normalized !== null) {\n known.add(normalized);\n }\n }\n return [...known].sort((left, right) => left.localeCompare(right));\n}\n\nfunction attributeCapabilityUsage(activation: ExtensionActivationResult): Map<string, Set<ExtensionCapability>> {\n const usage = new Map<string, Set<ExtensionCapability>>();\n const record = (\n entries: ReadonlyArray<{ layer: ExtensionLayer; name: string }>,\n capability: ExtensionCapability,\n ): void => {\n for (const entry of entries) {\n const key = usageKey(entry.layer, entry.name);\n let exercised = usage.get(key);\n if (exercised === undefined) {\n exercised = new Set<ExtensionCapability>();\n usage.set(key, exercised);\n }\n exercised.add(capability);\n }\n };\n const { registrations, commands, parsers, preflight, services, renderers, hooks } = activation;\n record(registrations.commands, \"commands\");\n record(commands.overrides, \"commands\");\n record(commands.handlers, \"commands\");\n record(registrations.flags, \"schema\");\n record(registrations.item_fields, \"schema\");\n record(registrations.item_types, \"schema\");\n record(registrations.migrations, \"schema\");\n record(registrations.profiles, \"schema\");\n record(registrations.importers, \"importers\");\n record(registrations.exporters, \"importers\");\n record(registrations.search_providers, \"search\");\n record(registrations.vector_store_adapters, \"search\");\n record(parsers.overrides, \"parser\");\n record(preflight.overrides, \"preflight\");\n record(services.overrides, \"services\");\n record(renderers.overrides, \"renderers\");\n record(hooks.beforeCommand, \"hooks\");\n record(hooks.afterCommand, \"hooks\");\n record(hooks.onWrite, \"hooks\");\n record(hooks.onRead, \"hooks\");\n record(hooks.onIndex, \"hooks\");\n return usage;\n}\n\n/**\n * Collect the known capabilities exercised across an activation result.\n *\n * Without {@link CollectUsedExtensionCapabilitiesOptions.extensionName} the\n * result unions every extension in the activation; with it, only the matching\n * extension's registrations contribute (across both layers).\n */\nexport function collectUsedExtensionCapabilities(\n activation: ExtensionActivationResult,\n options: CollectUsedExtensionCapabilitiesOptions = {},\n): ExtensionCapability[] {\n const usage = attributeCapabilityUsage(activation);\n const filter = options.extensionName !== undefined ? normalizeExtensionName(options.extensionName) : null;\n const used = new Set<ExtensionCapability>();\n for (const [key, capabilities] of usage) {\n if (filter !== null && usageKeyName(key) !== filter) {\n continue;\n }\n for (const capability of capabilities) {\n used.add(capability);\n }\n }\n return [...used].sort((left, right) => left.localeCompare(right));\n}\n\n/**\n * Reconcile each loaded extension's declared capabilities against what it\n * exercised during activation.\n *\n * Extensions with no known declared capabilities are skipped — there is nothing\n * to reconcile. The returned entries preserve every reconcilable extension even\n * when `unused` is empty so callers can report fully-minimal manifests too.\n */\nexport function reconcileExtensionCapabilityUsage(\n loaded: ReadonlyArray<{ layer: ExtensionLayer; name: string; capabilities?: readonly string[] }>,\n activation: ExtensionActivationResult,\n): ExtensionCapabilityUsageReconciliation[] {\n const usage = attributeCapabilityUsage(activation);\n const reconciliations: ExtensionCapabilityUsageReconciliation[] = [];\n for (const extension of loaded) {\n const declared = normalizeDeclaredCapabilities(extension.capabilities);\n if (declared.length === 0) {\n continue;\n }\n const exercised = usage.get(usageKey(extension.layer, extension.name)) ?? new Set<ExtensionCapability>();\n const used = [...exercised].sort((left, right) => left.localeCompare(right));\n const unused = declared.filter((capability) => !exercised.has(capability));\n reconciliations.push({ layer: extension.layer, name: extension.name, declared, used, unused });\n }\n return reconciliations;\n}\n"],"names":[],"mappings":";;AAeA,OAAO,EAAE,iCAAiC,EAAE,MAA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Q,CAAC,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,GAAG,EAAuB,CAAC;QACzG,MAAM,IAAI,GAAG,CAAC,GAAG,SAAS,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;QAC7E,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC;QAC3E,eAAe,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;IACjG,CAAC;IACD,OAAO,eAAe,CAAC;AACzB,CAAC","debugId":"7cc05bac-f673-59a1-9d51-64361cf5a939"}
|
|
1
|
+
{"version":3,"file":"capability-usage.js","sources":["core/extensions/capability-usage.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module core/extensions/capability-usage\n *\n * Reconciles the capabilities an extension manifest *declares* against the\n * capabilities it actually *exercises* during activation.\n *\n * The loader already enforces the opposite direction — registering a surface\n * whose capability is absent from `manifest.capabilities` throws an\n * `extension_capability_missing` activation failure. This module closes the\n * least-privilege loop by detecting capabilities a manifest declares but never\n * registers against, so package authors can trim manifests to the minimum\n * grant. Every declared-but-unused capability is an over-broad permission a\n * reviewer would otherwise have to catch by hand.\n */\nimport type { ExtensionActivationResult, ExtensionCapability, ExtensionLayer } from \"./extension-types.js\";\nimport { normalizeKnownExtensionCapability } from \"./extension-capability-aliases.js\";\n\n/**\n * Canonical map from each known extension capability to the human-readable\n * registration surfaces that exercise it.\n *\n * The `satisfies Record<ExtensionCapability, ...>` guard makes this exhaustive\n * at compile time: adding a capability to `KNOWN_EXTENSION_CAPABILITIES`\n * without giving it a registration surface here fails the build, which prevents\n * a capability that has *no* surface from being perpetually flagged as unused.\n */\nexport const EXTENSION_CAPABILITY_REGISTRATION_SURFACES = {\n commands: [\"registerCommand\", \"command override\", \"command handler\"],\n renderers: [\"registerRenderer\"],\n hooks: [\"hooks.beforeCommand\", \"hooks.afterCommand\", \"hooks.onWrite\", \"hooks.onRead\", \"hooks.onIndex\"],\n schema: [\"registerFlags\", \"registerItemFields\", \"registerItemTypes\", \"registerMigration\", \"registerProfile\"],\n importers: [\"registerImporter\", \"registerExporter\"],\n search: [\"registerSearchProvider\", \"registerVectorStoreAdapter\"],\n parser: [\"registerParser\"],\n preflight: [\"registerPreflight\"],\n services: [\"registerService\"],\n} as const satisfies Record<ExtensionCapability, readonly string[]>;\n\n/**\n * Per-extension reconciliation of declared versus exercised capabilities.\n */\nexport interface ExtensionCapabilityUsageReconciliation {\n /** Layer the extension was loaded from (`global` or `project`). */\n layer: ExtensionLayer;\n /** Extension name as it appears in the manifest. */\n name: string;\n /** Known capabilities declared in the manifest, sorted and de-duplicated. */\n declared: ExtensionCapability[];\n /** Known capabilities the extension actually registered against, sorted. */\n used: ExtensionCapability[];\n /** Declared capabilities with no matching registration (least-privilege gap). */\n unused: ExtensionCapability[];\n}\n\n/**\n * Options for {@link collectUsedExtensionCapabilities}.\n */\nexport interface CollectUsedExtensionCapabilitiesOptions {\n /**\n * Restrict the result to a single extension by name. Names are matched\n * case-insensitively after trimming. Omit to union across every extension in\n * the activation result.\n */\n extensionName?: string;\n /**\n * Restrict the result to a set of extension names. This preserves the\n * single-name option while allowing package aliases that activate multiple\n * extensions to summarize their combined capability surface.\n */\n extensionNames?: readonly string[];\n}\n\n// `layer` is a closed enum (`\"global\" | \"project\"`) that never contains a\n// colon, so the first colon always separates the layer from the (possibly\n// colon-bearing) name — making the key collision-proof without serialization.\nconst USAGE_KEY_SEPARATOR = \":\";\n\nfunction usageKey(layer: ExtensionLayer, name: string): string {\n return `${layer}${USAGE_KEY_SEPARATOR}${normalizeExtensionName(name)}`;\n}\n\nfunction usageKeyName(key: string): string {\n return key.slice(key.indexOf(USAGE_KEY_SEPARATOR) + 1);\n}\n\n/**\n * Canonical extension-name normalization (trim + lowercase) used to match an\n * `extensionName` filter against a registration's stored `name`.\n *\n * Activation stores `extension.name` verbatim — the synthetic test-activation\n * path (`activateExtensionForTest`) never trims it — so any helper that filters\n * by extension name must normalize both sides with this function to stay\n * consistent, including {@link ../extensions/activation-summary.js#describeExtensionActivation}.\n */\nexport function normalizeExtensionName(name: string): string {\n return name.trim().toLowerCase();\n}\n\nfunction normalizeDeclaredCapabilities(capabilities: readonly string[] | undefined): ExtensionCapability[] {\n if (!Array.isArray(capabilities)) {\n return [];\n }\n const known = new Set<ExtensionCapability>();\n for (const capability of capabilities) {\n // Unknown capabilities are reported by the separate unknown-capability\n // diagnostic; reconciling them here would double-report a typo as \"unused\".\n const normalized = normalizeKnownExtensionCapability(capability);\n if (normalized !== null) {\n known.add(normalized);\n }\n }\n return [...known].sort((left, right) => left.localeCompare(right));\n}\n\nfunction attributeCapabilityUsage(activation: ExtensionActivationResult): Map<string, Set<ExtensionCapability>> {\n const usage = new Map<string, Set<ExtensionCapability>>();\n const record = (\n entries: ReadonlyArray<{ layer: ExtensionLayer; name: string }>,\n capability: ExtensionCapability,\n ): void => {\n for (const entry of entries) {\n const key = usageKey(entry.layer, entry.name);\n let exercised = usage.get(key);\n if (exercised === undefined) {\n exercised = new Set<ExtensionCapability>();\n usage.set(key, exercised);\n }\n exercised.add(capability);\n }\n };\n const { registrations, commands, parsers, preflight, services, renderers, hooks } = activation;\n record(registrations.commands, \"commands\");\n record(commands.overrides, \"commands\");\n record(commands.handlers, \"commands\");\n record(registrations.flags, \"schema\");\n record(registrations.item_fields, \"schema\");\n record(registrations.item_types, \"schema\");\n record(registrations.migrations, \"schema\");\n record(registrations.profiles, \"schema\");\n record(registrations.importers, \"importers\");\n record(registrations.exporters, \"importers\");\n record(registrations.search_providers, \"search\");\n record(registrations.vector_store_adapters, \"search\");\n record(parsers.overrides, \"parser\");\n record(preflight.overrides, \"preflight\");\n record(services.overrides, \"services\");\n record(renderers.overrides, \"renderers\");\n record(hooks.beforeCommand, \"hooks\");\n record(hooks.afterCommand, \"hooks\");\n record(hooks.onWrite, \"hooks\");\n record(hooks.onRead, \"hooks\");\n record(hooks.onIndex, \"hooks\");\n return usage;\n}\n\n/**\n * Collect the known capabilities exercised across an activation result.\n *\n * Without {@link CollectUsedExtensionCapabilitiesOptions.extensionName} the\n * result unions every extension in the activation; with it, only the matching\n * extension's registrations contribute (across both layers).\n */\nexport function collectUsedExtensionCapabilities(\n activation: ExtensionActivationResult,\n options: CollectUsedExtensionCapabilitiesOptions = {},\n): ExtensionCapability[] {\n const usage = attributeCapabilityUsage(activation);\n const filters = new Set<string>();\n if (options.extensionName !== undefined) {\n filters.add(normalizeExtensionName(options.extensionName));\n }\n for (const name of options.extensionNames ?? []) {\n filters.add(normalizeExtensionName(name));\n }\n const used = new Set<ExtensionCapability>();\n for (const [key, capabilities] of usage) {\n if (filters.size > 0 && !filters.has(usageKeyName(key))) {\n continue;\n }\n for (const capability of capabilities) {\n used.add(capability);\n }\n }\n return [...used].sort((left, right) => left.localeCompare(right));\n}\n\n/**\n * Reconcile each loaded extension's declared capabilities against what it\n * exercised during activation.\n *\n * Extensions with no known declared capabilities are skipped — there is nothing\n * to reconcile. The returned entries preserve every reconcilable extension even\n * when `unused` is empty so callers can report fully-minimal manifests too.\n */\nexport function reconcileExtensionCapabilityUsage(\n loaded: ReadonlyArray<{ layer: ExtensionLayer; name: string; capabilities?: readonly string[] }>,\n activation: ExtensionActivationResult,\n): ExtensionCapabilityUsageReconciliation[] {\n const usage = attributeCapabilityUsage(activation);\n const reconciliations: ExtensionCapabilityUsageReconciliation[] = [];\n for (const extension of loaded) {\n const declared = normalizeDeclaredCapabilities(extension.capabilities);\n if (declared.length === 0) {\n continue;\n }\n const exercised = usage.get(usageKey(extension.layer, extension.name)) ?? new Set<ExtensionCapability>();\n const used = [...exercised].sort((left, right) => left.localeCompare(right));\n const unused = declared.filter((capability) => !exercised.has(capability));\n reconciliations.push({ layer: extension.layer, name: extension.name, declared, used, unused });\n }\n return reconciliations;\n}\n"],"names":[],"mappings":";;AAeA,OAAO,EAAE,iCAAiC,EAAE,MAAM,mCAAmC,CAAC;AAEtF;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,0CAA0C,GAAG;IACxD,QAAQ,EAAE,CAAC,iBAAiB,EAAE,kBAAkB,EAAE,iBAAiB,CAAC;IACpE,SAAS,EAAE,CAAC,kBAAkB,CAAC;IAC/B,KAAK,EAAE,CAAC,qBAAqB,EAAE,oBAAoB,EAAE,eAAe,EAAE,cAAc,EAAE,eAAe,CAAC;IACtG,MAAM,EAAE,CAAC,eAAe,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,iBAAiB,CAAC;IAC5G,SAAS,EAAE,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IACnD,MAAM,EAAE,CAAC,wBAAwB,EAAE,4BAA4B,CAAC;IAChE,MAAM,EAAE,CAAC,gBAAgB,CAAC;IAC1B,SAAS,EAAE,CAAC,mBAAmB,CAAC;IAChC,QAAQ,EAAE,CAAC,iBAAiB,CAAC;CACoC,CAAC;AAoCpE,0EAA0E;AAC1E,0EAA0E;AAC1E,8EAA8E;AAC9E,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEhC,SAAS,QAAQ,CAAC,KAAqB,EAAE,IAAY;IACnD,OAAO,GAAG,KAAK,GAAG,mBAAmB,GAAG,sBAAsB,CAAC,IAAI,CAAC,EAAE,CAAC;AACzE,CAAC;AAED,SAAS,YAAY,CAAC,GAAW;IAC/B,OAAO,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC,CAAC;AACzD,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,sBAAsB,CAAC,IAAY;IACjD,OAAO,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CAAC;AACpE,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,iCAAiC,CAC/C,MAAgG,EAChG,UAAqC;IAErC,MAAM,KAAK,GAAG,wBAAwB,CAAC,UAAU,CAAC,CAAC;IACnD,MAAM,eAAe,GAA6C,EAAE,CAAC;IACrE,KAAK,MAAM,SAAS,IAAI,MAAM,EAAE,CAAC;QAC/B,MAAM,QAAQ,GAAG,6BAA6B,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;QACvE,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC1B,SAAS;QACX,CAAC;QACD,MAAM,SAAS,GAAG,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,GAAG,EAAuB,CAAC;QACzG,MAAM,IAAI,GAAG,CAAC,GAAG,SAAS,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;QAC7E,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC;QAC3E,eAAe,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;IACjG,CAAC;IACD,OAAO,eAAe,CAAC;AACzB,CAAC","debugId":"4e149e81-498e-561d-8c32-c3f3aec2e2d2"}
|
|
@@ -376,8 +376,7 @@ export interface CommandHandlerContext {
|
|
|
376
376
|
/**
|
|
377
377
|
* Documents the parser override context payload exchanged by command, SDK, and package integrations.
|
|
378
378
|
*/
|
|
379
|
-
export
|
|
380
|
-
}
|
|
379
|
+
export type ParserOverrideContext = CommandHandlerContext;
|
|
381
380
|
/**
|
|
382
381
|
* Documents the parser override delta payload exchanged by command, SDK, and package integrations.
|
|
383
382
|
*/
|
|
@@ -1117,6 +1116,11 @@ export interface DiscoverExtensionsOptions {
|
|
|
1117
1116
|
noExtensions?: boolean;
|
|
1118
1117
|
reload_token?: string;
|
|
1119
1118
|
cache_bust?: boolean;
|
|
1119
|
+
/**
|
|
1120
|
+
* Optional import-stage filter. Discovery still reports the full effective set,
|
|
1121
|
+
* but `loadExtensions` imports only entries accepted by this predicate.
|
|
1122
|
+
*/
|
|
1123
|
+
extensionFilter?: (extension: EffectiveExtension) => boolean;
|
|
1120
1124
|
}
|
|
1121
1125
|
/**
|
|
1122
1126
|
* Documents the activatable extension payload exchanged by command, SDK, and package integrations.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="0fdb02e4-60e7-5f4c-9f06-d2ec2f03f792")}catch(e){}}();
|
|
3
3
|
export const KNOWN_EXTENSION_CAPABILITIES = [
|
|
4
4
|
"commands",
|
|
5
5
|
"renderers",
|
|
@@ -83,4 +83,4 @@ export function createDefaultExtensionGovernancePolicy() {
|
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
85
|
//# sourceMappingURL=extension-types.js.map
|
|
86
|
-
//# debugId=
|
|
86
|
+
//# debugId=0fdb02e4-60e7-5f4c-9f06-d2ec2f03f792
|