@unbrained/pm-cli 2026.5.31 → 2026.6.6
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 +167 -0
- package/CONTRIBUTING.md +1 -0
- package/README.md +12 -4
- package/dist/cli/argv-utils.js +7 -3
- package/dist/cli/argv-utils.js.map +1 -1
- package/dist/cli/bootstrap-args.d.ts +1 -0
- package/dist/cli/bootstrap-args.js +23 -3
- package/dist/cli/bootstrap-args.js.map +1 -1
- package/dist/cli/commands/calendar.js +17 -3
- package/dist/cli/commands/calendar.js.map +1 -1
- package/dist/cli/commands/close-many.d.ts +63 -0
- package/dist/cli/commands/close-many.js +302 -0
- package/dist/cli/commands/close-many.js.map +1 -0
- package/dist/cli/commands/completion.d.ts +1 -0
- package/dist/cli/commands/completion.js +260 -32
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/config.d.ts +4 -4
- package/dist/cli/commands/config.js +115 -3
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/contracts.js +193 -162
- package/dist/cli/commands/contracts.js.map +1 -1
- package/dist/cli/commands/create.d.ts +1 -0
- package/dist/cli/commands/create.js +77 -114
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/extension/doctor.d.ts +12 -0
- package/dist/cli/commands/extension/doctor.js +97 -2
- package/dist/cli/commands/extension/doctor.js.map +1 -1
- package/dist/cli/commands/extension/scaffold.js +49 -48
- package/dist/cli/commands/extension/scaffold.js.map +1 -1
- package/dist/cli/commands/extension.js +51 -23
- package/dist/cli/commands/extension.js.map +1 -1
- package/dist/cli/commands/gc.d.ts +8 -1
- package/dist/cli/commands/gc.js +26 -3
- package/dist/cli/commands/gc.js.map +1 -1
- package/dist/cli/commands/get.js +7 -7
- package/dist/cli/commands/get.js.map +1 -1
- package/dist/cli/commands/health.js +51 -3
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/history.d.ts +4 -1
- package/dist/cli/commands/history.js +12 -24
- package/dist/cli/commands/history.js.map +1 -1
- package/dist/cli/commands/index.d.ts +3 -1
- package/dist/cli/commands/index.js +5 -3
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/init.d.ts +10 -0
- package/dist/cli/commands/init.js +107 -4
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/list.d.ts +5 -0
- package/dist/cli/commands/list.js +58 -26
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/cli/commands/reindex.js +163 -47
- package/dist/cli/commands/reindex.js.map +1 -1
- package/dist/cli/commands/repeatable-metadata-parsers.d.ts +15 -0
- package/dist/cli/commands/repeatable-metadata-parsers.js +120 -0
- package/dist/cli/commands/repeatable-metadata-parsers.js.map +1 -0
- package/dist/cli/commands/restore.js +25 -4
- package/dist/cli/commands/restore.js.map +1 -1
- package/dist/cli/commands/schema.d.ts +122 -1
- package/dist/cli/commands/schema.js +536 -6
- package/dist/cli/commands/schema.js.map +1 -1
- package/dist/cli/commands/search.d.ts +1 -0
- package/dist/cli/commands/search.js +18 -4
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/stats.d.ts +8 -1
- package/dist/cli/commands/stats.js +18 -17
- package/dist/cli/commands/stats.js.map +1 -1
- package/dist/cli/commands/telemetry.d.ts +8 -0
- package/dist/cli/commands/telemetry.js +253 -0
- package/dist/cli/commands/telemetry.js.map +1 -0
- package/dist/cli/commands/test.js +4 -3
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/commands/update-many.js +69 -140
- package/dist/cli/commands/update-many.js.map +1 -1
- package/dist/cli/commands/update.d.ts +2 -0
- package/dist/cli/commands/update.js +138 -119
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/commands/validate.d.ts +1 -0
- package/dist/cli/commands/validate.js +63 -33
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/error-guidance.js +26 -3
- package/dist/cli/error-guidance.js.map +1 -1
- package/dist/cli/help-content.js +91 -3
- package/dist/cli/help-content.js.map +1 -1
- package/dist/cli/main.js +377 -23
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/register-list-query.js +14 -5
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +200 -28
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-operations.js +31 -6
- package/dist/cli/register-operations.js.map +1 -1
- package/dist/cli/register-setup.js +4 -2
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli/registration-helpers.js +31 -4
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli-bundle/chunks/activity-CVXTCHYY.js +16 -0
- package/dist/cli-bundle/chunks/activity-JM6DTDND.js +20 -0
- package/dist/cli-bundle/chunks/activity-JM6DTDND.js.map +1 -0
- package/dist/cli-bundle/chunks/aggregate-GI7WSZPH.js +206 -0
- package/dist/cli-bundle/chunks/aggregate-GI7WSZPH.js.map +1 -0
- package/dist/cli-bundle/chunks/{aggregate-ADUOSFRO.js → aggregate-VNAHUNNF.js} +11 -11
- package/dist/cli-bundle/chunks/{append-JD2DETU7.js → append-7H5N64R2.js} +8 -9
- package/dist/cli-bundle/chunks/{append-JD2DETU7.js.map → append-7H5N64R2.js.map} +1 -1
- package/dist/cli-bundle/chunks/append-WMKRXKCE.js +69 -0
- package/dist/cli-bundle/chunks/append-WMKRXKCE.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-3M73P3G6.js → chunk-23YFZ3IG.js} +210 -132
- package/dist/cli-bundle/chunks/chunk-23YFZ3IG.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-2HVRUSQA.js +128 -0
- package/dist/cli-bundle/chunks/chunk-2HVRUSQA.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-2RSPZI5H.js +266 -0
- package/dist/cli-bundle/chunks/chunk-2RSPZI5H.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-2VBQ6ZXS.js +631 -0
- package/dist/cli-bundle/chunks/chunk-2VBQ6ZXS.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-2VVCGBNV.js +380 -0
- package/dist/cli-bundle/chunks/chunk-2VVCGBNV.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-3BWOVLTH.js +1664 -0
- package/dist/cli-bundle/chunks/chunk-3BWOVLTH.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-6HT2F4TK.js → chunk-3FI4SEFT.js} +175 -54
- package/dist/cli-bundle/chunks/chunk-3FI4SEFT.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-JULRTHJQ.js → chunk-3LB74A67.js} +119 -6
- package/dist/cli-bundle/chunks/chunk-3LB74A67.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-3VAM3NNM.js +57 -0
- package/dist/cli-bundle/chunks/chunk-3VAM3NNM.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-4LL6TK5B.js +1832 -0
- package/dist/cli-bundle/chunks/chunk-4LL6TK5B.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-52MAOQ6J.js +422 -0
- package/dist/cli-bundle/chunks/chunk-52MAOQ6J.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-5FDATVEZ.js +412 -0
- package/dist/cli-bundle/chunks/chunk-5FDATVEZ.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-5SFCOO6B.js +5622 -0
- package/dist/cli-bundle/chunks/chunk-5SFCOO6B.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-U7FMKRXH.js → chunk-6ER6DXH5.js} +37 -16
- package/dist/cli-bundle/chunks/chunk-6ER6DXH5.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-6P6GGMOG.js +218 -0
- package/dist/cli-bundle/chunks/chunk-6P6GGMOG.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-77GFDHGF.js +80 -0
- package/dist/cli-bundle/chunks/chunk-77GFDHGF.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-MD7K4JYF.js → chunk-AO442XLN.js} +26 -15
- package/dist/cli-bundle/chunks/chunk-AO442XLN.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-AY43SBIN.js +751 -0
- package/dist/cli-bundle/chunks/chunk-AY43SBIN.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-D7AOMPRH.js → chunk-BQHUILZS.js} +5 -5
- package/dist/cli-bundle/chunks/chunk-E5FJNAZA.js +242 -0
- package/dist/cli-bundle/chunks/chunk-E5FJNAZA.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-OGZEG5TT.js → chunk-ECCMVXGM.js} +164 -53
- package/dist/cli-bundle/chunks/chunk-ECCMVXGM.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-FRAUKRU2.js +182 -0
- package/dist/cli-bundle/chunks/chunk-FRAUKRU2.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-GCOQW437.js +130 -0
- package/dist/cli-bundle/chunks/chunk-GCOQW437.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-GGYWB3Y2.js +1340 -0
- package/dist/cli-bundle/chunks/chunk-GGYWB3Y2.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-G57E5D7T.js → chunk-GU2ZJ2VV.js} +5 -5
- package/dist/cli-bundle/chunks/chunk-GXSUPCBV.js +231 -0
- package/dist/cli-bundle/chunks/chunk-GXSUPCBV.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-HZGUAH22.js +76 -0
- package/dist/cli-bundle/chunks/chunk-HZGUAH22.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-I2HSTRJF.js +346 -0
- package/dist/cli-bundle/chunks/chunk-I2HSTRJF.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-I6BNFU5X.js +140 -0
- package/dist/cli-bundle/chunks/chunk-I6BNFU5X.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-JTWRXG4B.js → chunk-IJGCZSIQ.js} +251 -251
- package/dist/cli-bundle/chunks/chunk-IJGCZSIQ.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-IOR7LGF4.js +1491 -0
- package/dist/cli-bundle/chunks/chunk-IOR7LGF4.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-IUV734HF.js +17 -0
- package/dist/cli-bundle/chunks/chunk-IUV734HF.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-J27KIHTG.js +15 -0
- package/dist/cli-bundle/chunks/chunk-J27KIHTG.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-AKOOMO3T.js → chunk-KAG77BY3.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KBQY3YG5.js → chunk-KJ33AOCY.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-WDPXDQFG.js → chunk-KJE2FOS4.js} +6 -4
- package/dist/cli-bundle/chunks/chunk-KJE2FOS4.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-KWU6HG75.js +3883 -0
- package/dist/cli-bundle/chunks/chunk-KWU6HG75.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-LB3RUL2N.js +1325 -0
- package/dist/cli-bundle/chunks/chunk-LB3RUL2N.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-5HSEP75M.js → chunk-LCM63IXU.js} +18 -6
- package/dist/cli-bundle/chunks/chunk-LCM63IXU.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-LXYVKYMQ.js +24 -0
- package/dist/cli-bundle/chunks/chunk-LXYVKYMQ.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-ME2YH6FN.js +182 -0
- package/dist/cli-bundle/chunks/chunk-ME2YH6FN.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-MITFDD35.js +1809 -0
- package/dist/cli-bundle/chunks/chunk-MITFDD35.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-WJ2NAC37.js → chunk-N7ACFE26.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-NUZ5HKR4.js +332 -0
- package/dist/cli-bundle/chunks/chunk-NUZ5HKR4.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-7Y53ZJIQ.js → chunk-OVQCEJPG.js} +22 -3
- package/dist/cli-bundle/chunks/chunk-OVQCEJPG.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-PXUAZUUY.js → chunk-OZ7NSQHL.js} +12 -11
- package/dist/cli-bundle/chunks/chunk-OZ7NSQHL.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-P53TN6IA.js → chunk-PDDFYW4X.js} +35 -8
- package/dist/cli-bundle/chunks/chunk-PDDFYW4X.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-6YCV7WSL.js → chunk-PIU6RSL3.js} +10 -12
- package/dist/cli-bundle/chunks/{chunk-6YCV7WSL.js.map → chunk-PIU6RSL3.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-PO3GSVFV.js +338 -0
- package/dist/cli-bundle/chunks/chunk-PO3GSVFV.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-LRBOHPUE.js → chunk-PRJCELV4.js} +108 -21
- package/dist/cli-bundle/chunks/chunk-PRJCELV4.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-GN7IJPCD.js → chunk-PROOHX4K.js} +332 -32
- package/dist/cli-bundle/chunks/chunk-PROOHX4K.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-FQE6XZDB.js → chunk-Q7SPNHLW.js} +54 -32
- package/dist/cli-bundle/chunks/chunk-Q7SPNHLW.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-PVNQLCIS.js → chunk-QO7EBBOM.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-A7E7PUVX.js → chunk-R6UFP2GE.js} +7 -7
- package/dist/cli-bundle/chunks/chunk-RWPSOIEE.js +154 -0
- package/dist/cli-bundle/chunks/chunk-RWPSOIEE.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-RZN6VURO.js +119 -0
- package/dist/cli-bundle/chunks/chunk-RZN6VURO.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-SKJWX3QB.js +1501 -0
- package/dist/cli-bundle/chunks/chunk-SKJWX3QB.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-CEFIVZPG.js → chunk-T3LC5LKB.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-TCD3R2PF.js +173 -0
- package/dist/cli-bundle/chunks/chunk-TCD3R2PF.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-TPH5XEVD.js +2988 -0
- package/dist/cli-bundle/chunks/chunk-TPH5XEVD.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-LSXGH6NE.js → chunk-U5SXYXSY.js} +821 -200
- package/dist/cli-bundle/chunks/chunk-U5SXYXSY.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-UBOPJT3S.js +540 -0
- package/dist/cli-bundle/chunks/chunk-UBOPJT3S.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-JFWUHHS2.js → chunk-UM2GBHS4.js} +5 -4
- package/dist/cli-bundle/chunks/chunk-W7XABV4H.js +454 -0
- package/dist/cli-bundle/chunks/chunk-W7XABV4H.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-SEXQN4KL.js → chunk-WKY2IBOQ.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-WOPXVEZP.js +698 -0
- package/dist/cli-bundle/chunks/chunk-WOPXVEZP.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-WSMOSYRD.js +1704 -0
- package/dist/cli-bundle/chunks/chunk-WSMOSYRD.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-NGN7UV5K.js → chunk-XLTD2HN3.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-XSJCLN2R.js +131 -0
- package/dist/cli-bundle/chunks/chunk-XSJCLN2R.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-XSLQSXAH.js +53 -0
- package/dist/cli-bundle/chunks/chunk-XSLQSXAH.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-BUPWJ3IJ.js → chunk-XTGLRY2Y.js} +484 -49
- package/dist/cli-bundle/chunks/chunk-XTGLRY2Y.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-L2FXEKDB.js → chunk-YL2DJGYS.js} +7 -7
- package/dist/cli-bundle/chunks/{claim-EE4TKKCV.js → claim-4DBF6RVG.js} +10 -11
- package/dist/cli-bundle/chunks/{claim-EE4TKKCV.js.map → claim-4DBF6RVG.js.map} +1 -1
- package/dist/cli-bundle/chunks/claim-X2P4IB7J.js +129 -0
- package/dist/cli-bundle/chunks/claim-X2P4IB7J.js.map +1 -0
- package/dist/cli-bundle/chunks/close-3HDWDA3L.js +13 -0
- package/dist/cli-bundle/chunks/close-PTYFA45H.js +17 -0
- package/dist/cli-bundle/chunks/close-PTYFA45H.js.map +1 -0
- package/dist/cli-bundle/chunks/close-many-7CGIDPTJ.js +314 -0
- package/dist/cli-bundle/chunks/close-many-7CGIDPTJ.js.map +7 -0
- package/dist/cli-bundle/chunks/close-many-ERFO6LHR.js +311 -0
- package/dist/cli-bundle/chunks/close-many-ERFO6LHR.js.map +1 -0
- package/dist/cli-bundle/chunks/comments-OONGABK5.js +100 -0
- package/dist/cli-bundle/chunks/comments-OONGABK5.js.map +1 -0
- package/dist/cli-bundle/chunks/{comments-AAKJQ6LW.js → comments-QKBYCWKD.js} +10 -11
- package/dist/cli-bundle/chunks/{comments-AAKJQ6LW.js.map → comments-QKBYCWKD.js.map} +1 -1
- package/dist/cli-bundle/chunks/config-6FXCQKIF.js +1671 -0
- package/dist/cli-bundle/chunks/config-6FXCQKIF.js.map +1 -0
- package/dist/cli-bundle/chunks/{config-V3FZOKLI.js → config-U4RZ4CQB.js} +121 -10
- package/dist/cli-bundle/chunks/config-U4RZ4CQB.js.map +7 -0
- package/dist/cli-bundle/chunks/{context-RZ5QPNJB.js → context-FYYJGFWS.js} +32 -19
- package/dist/cli-bundle/chunks/{context-RZ5QPNJB.js.map → context-FYYJGFWS.js.map} +2 -2
- package/dist/cli-bundle/chunks/context-YMJ3Z2HQ.js +1461 -0
- package/dist/cli-bundle/chunks/context-YMJ3Z2HQ.js.map +1 -0
- package/dist/cli-bundle/chunks/contracts-QDB6OMLQ.js +1278 -0
- package/dist/cli-bundle/chunks/contracts-QDB6OMLQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{contracts-YLMH33VU.js → contracts-RFSPGVVJ.js} +198 -162
- package/dist/cli-bundle/chunks/contracts-RFSPGVVJ.js.map +7 -0
- package/dist/cli-bundle/chunks/create-I5L4EYYZ.js +31 -0
- package/dist/cli-bundle/chunks/create-I5L4EYYZ.js.map +1 -0
- package/dist/cli-bundle/chunks/create-JTZNCTQC.js +27 -0
- package/dist/cli-bundle/chunks/delete-7HPGI4GZ.js +55 -0
- package/dist/cli-bundle/chunks/delete-7HPGI4GZ.js.map +1 -0
- package/dist/cli-bundle/chunks/{delete-RHCTEORS.js → delete-VXUPH5RS.js} +7 -8
- package/dist/cli-bundle/chunks/{delete-RHCTEORS.js.map → delete-VXUPH5RS.js.map} +1 -1
- package/dist/cli-bundle/chunks/{deps-MZYCMLAO.js → deps-JSRRWC3Z.js} +7 -8
- package/dist/cli-bundle/chunks/{deps-MZYCMLAO.js.map → deps-JSRRWC3Z.js.map} +1 -1
- package/dist/cli-bundle/chunks/deps-SCZIFK2Z.js +225 -0
- package/dist/cli-bundle/chunks/deps-SCZIFK2Z.js.map +1 -0
- package/dist/cli-bundle/chunks/docs-GJK6K4VP.js +31 -0
- package/dist/cli-bundle/chunks/docs-GJK6K4VP.js.map +1 -0
- package/dist/cli-bundle/chunks/{docs-FXXUCZYU.js → docs-WW4N3MBM.js} +9 -10
- package/dist/cli-bundle/chunks/{docs-FXXUCZYU.js.map → docs-WW4N3MBM.js.map} +1 -1
- package/dist/cli-bundle/chunks/{extension-B4WL7BQU.js → extension-J7IBMFTD.js} +4 -5
- package/dist/cli-bundle/chunks/extension-VDY2U33M.js +28 -0
- package/dist/cli-bundle/chunks/extension-VDY2U33M.js.map +1 -0
- package/dist/cli-bundle/chunks/files-ISZJGILQ.js +282 -0
- package/dist/cli-bundle/chunks/files-ISZJGILQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{files-WVOX67PE.js → files-WKOD326U.js} +9 -10
- package/dist/cli-bundle/chunks/{files-WVOX67PE.js.map → files-WKOD326U.js.map} +1 -1
- package/dist/cli-bundle/chunks/gc-JDVJ6OQ2.js +362 -0
- package/dist/cli-bundle/chunks/gc-JDVJ6OQ2.js.map +1 -0
- package/dist/cli-bundle/chunks/gc-ULPVWMTN.js +372 -0
- package/dist/cli-bundle/chunks/gc-ULPVWMTN.js.map +7 -0
- package/dist/cli-bundle/chunks/get-RV37HT3G.js +194 -0
- package/dist/cli-bundle/chunks/get-RV37HT3G.js.map +1 -0
- package/dist/cli-bundle/chunks/{get-LTK3HOCQ.js → get-WXU6WI5P.js} +16 -17
- package/dist/cli-bundle/chunks/get-WXU6WI5P.js.map +7 -0
- package/dist/cli-bundle/chunks/{health-TCWL55KM.js → health-6L6EH4WR.js} +57 -16
- package/dist/cli-bundle/chunks/health-6L6EH4WR.js.map +7 -0
- package/dist/cli-bundle/chunks/health-LOI2HHKB.js +1271 -0
- package/dist/cli-bundle/chunks/health-LOI2HHKB.js.map +1 -0
- package/dist/cli-bundle/chunks/history-2BA3T5AE.js +20 -0
- package/dist/cli-bundle/chunks/history-PKN67D5O.js +24 -0
- package/dist/cli-bundle/chunks/history-PKN67D5O.js.map +1 -0
- package/dist/cli-bundle/chunks/history-redact-JBZNXHGR.js +19 -0
- package/dist/cli-bundle/chunks/history-redact-V4FOJGS7.js +23 -0
- package/dist/cli-bundle/chunks/history-redact-V4FOJGS7.js.map +1 -0
- package/dist/cli-bundle/chunks/{history-repair-ZWSTDRH2.js → history-repair-HIBCBIKK.js} +12 -14
- package/dist/cli-bundle/chunks/{history-repair-ZWSTDRH2.js.map → history-repair-HIBCBIKK.js.map} +1 -1
- package/dist/cli-bundle/chunks/history-repair-SDMHR7JT.js +193 -0
- package/dist/cli-bundle/chunks/history-repair-SDMHR7JT.js.map +1 -0
- package/dist/cli-bundle/chunks/init-HIVSNX3O.js +16 -0
- package/dist/cli-bundle/chunks/init-P56QYWJF.js +20 -0
- package/dist/cli-bundle/chunks/init-P56QYWJF.js.map +1 -0
- package/dist/cli-bundle/chunks/learnings-GDFRG5J7.js +44 -0
- package/dist/cli-bundle/chunks/learnings-GDFRG5J7.js.map +1 -0
- package/dist/cli-bundle/chunks/{learnings-NXTWE3FR.js → learnings-MIXSESLK.js} +10 -11
- package/dist/cli-bundle/chunks/{learnings-NXTWE3FR.js.map → learnings-MIXSESLK.js.map} +1 -1
- package/dist/cli-bundle/chunks/list-FGOWQMSM.js +24 -0
- package/dist/cli-bundle/chunks/list-FGOWQMSM.js.map +1 -0
- package/dist/cli-bundle/chunks/list-MUSQNMTD.js +20 -0
- package/dist/cli-bundle/chunks/{notes-DFS5ZGOO.js → notes-4XVSH2AZ.js} +10 -11
- package/dist/cli-bundle/chunks/{notes-DFS5ZGOO.js.map → notes-4XVSH2AZ.js.map} +1 -1
- package/dist/cli-bundle/chunks/notes-5UK3GEH2.js +44 -0
- package/dist/cli-bundle/chunks/notes-5UK3GEH2.js.map +1 -0
- package/dist/cli-bundle/chunks/plan-DUMBV3QB.js +1171 -0
- package/dist/cli-bundle/chunks/plan-DUMBV3QB.js.map +1 -0
- package/dist/cli-bundle/chunks/{plan-67AB2PLM.js → plan-SLMODHWX.js} +13 -14
- package/dist/cli-bundle/chunks/{plan-67AB2PLM.js.map → plan-SLMODHWX.js.map} +1 -1
- package/dist/cli-bundle/chunks/register-list-query-POCFZ5JW.js +229 -0
- package/dist/cli-bundle/chunks/register-list-query-POCFZ5JW.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-list-query-UP3VRUFS.js → register-list-query-WST76HSQ.js} +26 -26
- package/dist/cli-bundle/chunks/register-list-query-WST76HSQ.js.map +7 -0
- package/dist/cli-bundle/chunks/register-mutation-N5GSUZJV.js +813 -0
- package/dist/cli-bundle/chunks/register-mutation-N5GSUZJV.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-YWSBF545.js → register-mutation-OA675SOU.js} +154 -43
- package/dist/cli-bundle/chunks/register-mutation-OA675SOU.js.map +7 -0
- package/dist/cli-bundle/chunks/register-operations-GNHBE5I3.js +383 -0
- package/dist/cli-bundle/chunks/register-operations-GNHBE5I3.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-operations-3BDTGSDH.js → register-operations-N3PMHXH5.js} +49 -37
- package/dist/cli-bundle/chunks/register-operations-N3PMHXH5.js.map +7 -0
- package/dist/cli-bundle/chunks/register-setup-JIMPKJKV.js +242 -0
- package/dist/cli-bundle/chunks/register-setup-JIMPKJKV.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-setup-V56GDRUS.js → register-setup-ZHJI2DI3.js} +18 -19
- package/dist/cli-bundle/chunks/{register-setup-V56GDRUS.js.map → register-setup-ZHJI2DI3.js.map} +2 -2
- package/dist/cli-bundle/chunks/restore-D4RGNX33.js +17 -0
- package/dist/cli-bundle/chunks/restore-PBL6T5TW.js +21 -0
- package/dist/cli-bundle/chunks/restore-PBL6T5TW.js.map +1 -0
- package/dist/cli-bundle/chunks/schema-2NOO6NGB.js +780 -0
- package/dist/cli-bundle/chunks/schema-2NOO6NGB.js.map +7 -0
- package/dist/cli-bundle/chunks/schema-EBI4NLUO.js +770 -0
- package/dist/cli-bundle/chunks/schema-EBI4NLUO.js.map +1 -0
- package/dist/cli-bundle/chunks/search-JPUQTVCY.js +1127 -0
- package/dist/cli-bundle/chunks/search-JPUQTVCY.js.map +1 -0
- package/dist/cli-bundle/chunks/{search-HENBL456.js → search-OA6JX27A.js} +25 -16
- package/dist/cli-bundle/chunks/search-OA6JX27A.js.map +7 -0
- package/dist/cli-bundle/chunks/stats-CV54BAWY.js +202 -0
- package/dist/cli-bundle/chunks/stats-CV54BAWY.js.map +1 -0
- package/dist/cli-bundle/chunks/stats-XYB6KTFG.js +212 -0
- package/dist/cli-bundle/chunks/stats-XYB6KTFG.js.map +7 -0
- package/dist/cli-bundle/chunks/telemetry-LMJ7PFUO.js +251 -0
- package/dist/cli-bundle/chunks/telemetry-LMJ7PFUO.js.map +7 -0
- package/dist/cli-bundle/chunks/telemetry-NCMEPJNR.js +248 -0
- package/dist/cli-bundle/chunks/telemetry-NCMEPJNR.js.map +1 -0
- package/dist/cli-bundle/chunks/test-MXX3E5JL.js +31 -0
- package/dist/cli-bundle/chunks/test-WBROAJIE.js +35 -0
- package/dist/cli-bundle/chunks/test-WBROAJIE.js.map +1 -0
- package/dist/cli-bundle/chunks/test-all-N6NSRDTV.js +328 -0
- package/dist/cli-bundle/chunks/test-all-N6NSRDTV.js.map +1 -0
- package/dist/cli-bundle/chunks/{test-all-G2AZOHXI.js → test-all-NTOZ7C3M.js} +13 -14
- package/dist/cli-bundle/chunks/{test-all-G2AZOHXI.js.map → test-all-NTOZ7C3M.js.map} +1 -1
- package/dist/cli-bundle/chunks/test-runs-V6A7LPWZ.js +929 -0
- package/dist/cli-bundle/chunks/test-runs-V6A7LPWZ.js.map +1 -0
- package/dist/cli-bundle/chunks/{test-runs-GX5HTPSF.js → test-runs-WMVTQU3Y.js} +5 -5
- package/dist/cli-bundle/chunks/update-OSV3NAQB.js +25 -0
- package/dist/cli-bundle/chunks/update-OSV3NAQB.js.map +1 -0
- package/dist/cli-bundle/chunks/update-YRXSUGYQ.js +21 -0
- package/dist/cli-bundle/chunks/update-many-EM6OXYGO.js +605 -0
- package/dist/cli-bundle/chunks/update-many-EM6OXYGO.js.map +1 -0
- package/dist/cli-bundle/chunks/{update-many-46HRSP2Q.js → update-many-KGGEYABR.js} +78 -146
- package/dist/cli-bundle/chunks/update-many-KGGEYABR.js.map +7 -0
- package/dist/cli-bundle/chunks/{upgrade-H5HHM5UV.js → upgrade-BLI7XBAJ.js} +5 -7
- package/dist/cli-bundle/chunks/{upgrade-H5HHM5UV.js.map → upgrade-BLI7XBAJ.js.map} +1 -1
- package/dist/cli-bundle/chunks/upgrade-LXPOQKFV.js +266 -0
- package/dist/cli-bundle/chunks/upgrade-LXPOQKFV.js.map +1 -0
- package/dist/cli-bundle/chunks/{validate-TMCVKIGZ.js → validate-AGOAUOVW.js} +61 -48
- package/dist/cli-bundle/chunks/validate-AGOAUOVW.js.map +7 -0
- package/dist/cli-bundle/chunks/validate-L5J6A7YO.js +1120 -0
- package/dist/cli-bundle/chunks/validate-L5J6A7YO.js.map +1 -0
- package/dist/cli-bundle/main.js +534 -1505
- package/dist/cli-bundle/main.js.map +4 -4
- package/dist/core/checkpoint/mutation-checkpoint.d.ts +44 -0
- package/dist/core/checkpoint/mutation-checkpoint.js +119 -0
- package/dist/core/checkpoint/mutation-checkpoint.js.map +1 -0
- package/dist/core/config/positional-value.js +4 -2
- package/dist/core/config/positional-value.js.map +1 -1
- package/dist/core/diagnostics/remediation.d.ts +73 -0
- package/dist/core/diagnostics/remediation.js +328 -0
- package/dist/core/diagnostics/remediation.js.map +1 -0
- package/dist/core/extensions/extension-hook-runtime.js +9 -2
- package/dist/core/extensions/extension-hook-runtime.js.map +1 -1
- package/dist/core/extensions/extension-types.d.ts +60 -4
- package/dist/core/extensions/extension-types.js +2 -2
- package/dist/core/extensions/extension-types.js.map +1 -1
- package/dist/core/extensions/index.d.ts +5 -1
- package/dist/core/extensions/index.js +61 -2
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/item-fields.d.ts +5 -1
- package/dist/core/extensions/item-fields.js +126 -4
- package/dist/core/extensions/item-fields.js.map +1 -1
- package/dist/core/extensions/loader.js +283 -8
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/history/history-diff.d.ts +47 -0
- package/dist/core/history/history-diff.js +152 -0
- package/dist/core/history/history-diff.js.map +1 -0
- package/dist/core/history/history-storage-stats.d.ts +31 -0
- package/dist/core/history/history-storage-stats.js +101 -0
- package/dist/core/history/history-storage-stats.js.map +1 -0
- package/dist/core/item/item-format.d.ts +3 -2
- package/dist/core/item/item-format.js +15 -10
- package/dist/core/item/item-format.js.map +1 -1
- package/dist/core/item/status-filter.d.ts +29 -0
- package/dist/core/item/status-filter.js +97 -0
- package/dist/core/item/status-filter.js.map +1 -0
- package/dist/core/item/type-registry.js +4 -2
- package/dist/core/item/type-registry.js.map +1 -1
- package/dist/core/lock/lock-gc.d.ts +46 -0
- package/dist/core/lock/lock-gc.js +194 -0
- package/dist/core/lock/lock-gc.js.map +1 -0
- package/dist/core/output/output.js +17 -5
- package/dist/core/output/output.js.map +1 -1
- package/dist/core/schema/item-types-file.d.ts +15 -0
- package/dist/core/schema/item-types-file.js +27 -2
- package/dist/core/schema/item-types-file.js.map +1 -1
- package/dist/core/schema/runtime-field-filters.js +4 -3
- package/dist/core/schema/runtime-field-filters.js.map +1 -1
- package/dist/core/schema/runtime-field-values.d.ts +1 -1
- package/dist/core/schema/runtime-field-values.js +10 -4
- package/dist/core/schema/runtime-field-values.js.map +1 -1
- package/dist/core/schema/runtime-schema.js +75 -2
- package/dist/core/schema/runtime-schema.js.map +1 -1
- package/dist/core/schema/status-defs-file.d.ts +113 -0
- package/dist/core/schema/status-defs-file.js +260 -0
- package/dist/core/schema/status-defs-file.js.map +1 -0
- package/dist/core/schema/type-workflows.d.ts +64 -0
- package/dist/core/schema/type-workflows.js +98 -0
- package/dist/core/schema/type-workflows.js.map +1 -0
- package/dist/core/search/cache.d.ts +3 -1
- package/dist/core/search/cache.js +104 -28
- package/dist/core/search/cache.js.map +1 -1
- package/dist/core/search/http-client.d.ts +2 -2
- package/dist/core/search/http-client.js +2 -2
- package/dist/core/search/http-client.js.map +1 -1
- package/dist/core/search/vector-stores.d.ts +1 -0
- package/dist/core/search/vector-stores.js +64 -14
- package/dist/core/search/vector-stores.js.map +1 -1
- package/dist/core/search/vectorization-metadata.d.ts +13 -0
- package/dist/core/search/vectorization-metadata.js +65 -0
- package/dist/core/search/vectorization-metadata.js.map +1 -0
- package/dist/core/shared/serial-queue.d.ts +12 -0
- package/dist/core/shared/serial-queue.js +43 -0
- package/dist/core/shared/serial-queue.js.map +1 -0
- package/dist/core/shared/serialization.d.ts +1 -0
- package/dist/core/shared/serialization.js +86 -2
- package/dist/core/shared/serialization.js.map +1 -1
- package/dist/core/store/front-matter-cache.js +14 -5
- package/dist/core/store/front-matter-cache.js.map +1 -1
- package/dist/core/store/item-store.d.ts +2 -0
- package/dist/core/store/item-store.js +61 -6
- package/dist/core/store/item-store.js.map +1 -1
- package/dist/core/store/settings-validator.js +18 -2
- package/dist/core/store/settings-validator.js.map +1 -1
- package/dist/core/store/settings.d.ts +19 -1
- package/dist/core/store/settings.js +130 -10
- package/dist/core/store/settings.js.map +1 -1
- package/dist/core/telemetry/consent.js +3 -3
- package/dist/core/telemetry/consent.js.map +1 -1
- package/dist/core/telemetry/observability.js +5 -4
- package/dist/core/telemetry/observability.js.map +1 -1
- package/dist/core/telemetry/runtime.js +16 -4
- package/dist/core/telemetry/runtime.js.map +1 -1
- package/dist/mcp/server.d.ts +1 -0
- package/dist/mcp/server.js +372 -45
- package/dist/mcp/server.js.map +1 -1
- package/dist/sdk/cli-contracts/commander-mutation-options.js +16 -2
- package/dist/sdk/cli-contracts/commander-mutation-options.js.map +1 -1
- package/dist/sdk/cli-contracts/commander-types.js +7 -2
- package/dist/sdk/cli-contracts/commander-types.js.map +1 -1
- package/dist/sdk/cli-contracts/enum-contracts.d.ts +2 -2
- package/dist/sdk/cli-contracts/enum-contracts.js +6 -2
- package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.d.ts +1 -0
- package/dist/sdk/cli-contracts/tool-option-contracts.js +53 -3
- package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +42 -10
- package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
- package/dist/sdk/cli-contracts.d.ts +42 -1
- package/dist/sdk/cli-contracts.js +225 -19
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/sdk/errors.d.ts +22 -0
- package/dist/sdk/errors.js +46 -0
- package/dist/sdk/errors.js.map +1 -0
- package/dist/sdk/index.d.ts +2 -1
- package/dist/sdk/index.js +3 -2
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/package-import-adapters.js +14 -3
- package/dist/sdk/package-import-adapters.js.map +1 -1
- package/dist/sdk/runtime.d.ts +1 -0
- package/dist/sdk/runtime.js +3 -2
- package/dist/sdk/runtime.js.map +1 -1
- package/dist/sdk/testing.d.ts +77 -0
- package/dist/sdk/testing.js +239 -0
- package/dist/sdk/testing.js.map +1 -0
- package/dist/types.d.ts +19 -0
- package/dist/types.js +3 -2
- package/dist/types.js.map +1 -1
- package/docs/AGENT_GUIDE.md +22 -3
- package/docs/ARCHITECTURE.md +11 -1
- package/docs/CLAUDE_CODE_PLUGIN.md +2 -2
- package/docs/COMMANDS.md +118 -7
- package/docs/CONFIGURATION.md +57 -2
- package/docs/EXTENSIONS.md +125 -6
- package/docs/EXTENSION_AUTHOR_CONTRACTS.md +73 -0
- package/docs/ONBOARDING.md +165 -0
- package/docs/QUICKSTART.md +3 -1
- package/docs/README.md +12 -4
- package/docs/RELEASING.md +38 -3
- package/docs/SDK.md +273 -1
- package/docs/TESTING.md +36 -1
- package/docs/examples/policy-restricted-extension/manifest.json +1 -0
- package/docs/examples/starter-extension/index.js +9 -1
- package/docs/examples/starter-extension/manifest.json +1 -0
- package/package.json +16 -7
- package/packages/pm-beads/extensions/beads/index.js +2 -4
- package/packages/pm-beads/extensions/beads/index.ts +43 -33
- package/packages/pm-beads/extensions/beads/manifest.json +12 -1
- package/packages/pm-calendar/README.md +6 -0
- package/packages/pm-calendar/extensions/calendar/index.js +6 -1
- package/packages/pm-calendar/extensions/calendar/index.ts +6 -1
- package/packages/pm-calendar/extensions/calendar/manifest.json +6 -1
- package/packages/pm-governance-audit/extensions/governance-audit/manifest.json +6 -1
- package/packages/pm-guide-shell/README.md +4 -0
- package/packages/pm-guide-shell/extensions/guide-shell/index.js +22 -0
- package/packages/pm-guide-shell/extensions/guide-shell/index.ts +22 -0
- package/packages/pm-guide-shell/extensions/guide-shell/manifest.json +6 -1
- package/packages/pm-guide-shell/extensions/guide-shell/runtime.js +74 -3
- package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +84 -4
- package/packages/pm-lifecycle-hooks/README.md +29 -0
- package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/index.js +18 -0
- package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/index.ts +20 -0
- package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/manifest.json +9 -0
- package/packages/pm-lifecycle-hooks/package.json +52 -0
- package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/manifest.json +13 -1
- package/packages/pm-search-advanced/extensions/search-advanced/index.js +69 -1
- package/packages/pm-search-advanced/extensions/search-advanced/index.ts +91 -2
- package/packages/pm-search-advanced/extensions/search-advanced/manifest.json +13 -1
- package/packages/pm-templates/extensions/templates/manifest.json +6 -1
- package/packages/pm-todos/extensions/todos/index.js +3 -7
- package/packages/pm-todos/extensions/todos/index.ts +55 -42
- package/packages/pm-todos/extensions/todos/manifest.json +13 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-claude/README.md +7 -4
- package/plugins/pm-claude/agents/pm-coordinator.md +1 -1
- package/plugins/pm-claude/commands/pm-init.md +1 -1
- package/scripts/bundle-cli.mjs +121 -17
- package/dist/cli-bundle/chunks/activity-OWYSUZOY.js +0 -17
- package/dist/cli-bundle/chunks/chunk-3M73P3G6.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4AEZR5EJ.js +0 -189
- package/dist/cli-bundle/chunks/chunk-4AEZR5EJ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5HSEP75M.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-6HT2F4TK.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-7Y53ZJIQ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-BUPWJ3IJ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-EGUGFSNX.js +0 -47
- package/dist/cli-bundle/chunks/chunk-EGUGFSNX.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-FM26RGSU.js +0 -56
- package/dist/cli-bundle/chunks/chunk-FM26RGSU.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-FQE6XZDB.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-GN7IJPCD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-JTWRXG4B.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-JULRTHJQ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-LRBOHPUE.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-LSXGH6NE.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-MD7K4JYF.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-OGZEG5TT.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-P53TN6IA.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-PXUAZUUY.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-U7FMKRXH.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-VGICHR7D.js +0 -141
- package/dist/cli-bundle/chunks/chunk-VGICHR7D.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-WDPXDQFG.js.map +0 -7
- package/dist/cli-bundle/chunks/close-XY4CSAYF.js +0 -14
- package/dist/cli-bundle/chunks/config-V3FZOKLI.js.map +0 -7
- package/dist/cli-bundle/chunks/contracts-YLMH33VU.js.map +0 -7
- package/dist/cli-bundle/chunks/create-PZVHRIZQ.js +0 -28
- package/dist/cli-bundle/chunks/gc-JWNF66EC.js +0 -181
- package/dist/cli-bundle/chunks/gc-JWNF66EC.js.map +0 -7
- package/dist/cli-bundle/chunks/get-LTK3HOCQ.js.map +0 -7
- package/dist/cli-bundle/chunks/health-TCWL55KM.js.map +0 -7
- package/dist/cli-bundle/chunks/history-A2JUDXUE.js +0 -21
- package/dist/cli-bundle/chunks/history-redact-ED6RFCPL.js +0 -20
- package/dist/cli-bundle/chunks/init-M2WUB4YH.js +0 -16
- package/dist/cli-bundle/chunks/list-OGWQPC26.js +0 -20
- package/dist/cli-bundle/chunks/register-list-query-UP3VRUFS.js.map +0 -7
- package/dist/cli-bundle/chunks/register-mutation-YWSBF545.js.map +0 -7
- package/dist/cli-bundle/chunks/register-operations-3BDTGSDH.js.map +0 -7
- package/dist/cli-bundle/chunks/restore-MB2ISME7.js +0 -18
- package/dist/cli-bundle/chunks/schema-Q622KC46.js +0 -119
- package/dist/cli-bundle/chunks/schema-Q622KC46.js.map +0 -7
- package/dist/cli-bundle/chunks/search-HENBL456.js.map +0 -7
- package/dist/cli-bundle/chunks/stats-N6H3YP2F.js +0 -124
- package/dist/cli-bundle/chunks/stats-N6H3YP2F.js.map +0 -7
- package/dist/cli-bundle/chunks/test-VNBDRJ4Z.js +0 -32
- package/dist/cli-bundle/chunks/update-H6SCWNMA.js +0 -22
- package/dist/cli-bundle/chunks/update-many-46HRSP2Q.js.map +0 -7
- package/dist/cli-bundle/chunks/validate-TMCVKIGZ.js.map +0 -7
- /package/dist/cli-bundle/chunks/{activity-OWYSUZOY.js.map → activity-CVXTCHYY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{aggregate-ADUOSFRO.js.map → aggregate-VNAHUNNF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-D7AOMPRH.js.map → chunk-BQHUILZS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-G57E5D7T.js.map → chunk-GU2ZJ2VV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AKOOMO3T.js.map → chunk-KAG77BY3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KBQY3YG5.js.map → chunk-KJ33AOCY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WJ2NAC37.js.map → chunk-N7ACFE26.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PVNQLCIS.js.map → chunk-QO7EBBOM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-A7E7PUVX.js.map → chunk-R6UFP2GE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CEFIVZPG.js.map → chunk-T3LC5LKB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JFWUHHS2.js.map → chunk-UM2GBHS4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SEXQN4KL.js.map → chunk-WKY2IBOQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NGN7UV5K.js.map → chunk-XLTD2HN3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-L2FXEKDB.js.map → chunk-YL2DJGYS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-XY4CSAYF.js.map → close-3HDWDA3L.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-PZVHRIZQ.js.map → create-JTZNCTQC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-B4WL7BQU.js.map → extension-J7IBMFTD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-A2JUDXUE.js.map → history-2BA3T5AE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-ED6RFCPL.js.map → history-redact-JBZNXHGR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-M2WUB4YH.js.map → init-HIVSNX3O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-OGWQPC26.js.map → list-MUSQNMTD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-MB2ISME7.js.map → restore-D4RGNX33.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-VNBDRJ4Z.js.map → test-MXX3E5JL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-GX5HTPSF.js.map → test-runs-WMVTQU3Y.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-H6SCWNMA.js.map → update-YRXSUGYQ.js.map} +0 -0
|
@@ -0,0 +1,1278 @@
|
|
|
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]="2bf10312-dfcc-5f58-aca8-f410e10f7126")}catch(e){}}();
|
|
3
|
+
import {
|
|
4
|
+
ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS,
|
|
5
|
+
ACTIVITY_FLAG_CONTRACTS,
|
|
6
|
+
AGGREGATE_FLAG_CONTRACTS,
|
|
7
|
+
APPEND_FLAG_CONTRACTS,
|
|
8
|
+
CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS,
|
|
9
|
+
CALENDAR_FLAG_CONTRACTS,
|
|
10
|
+
CLAIM_FLAG_CONTRACTS,
|
|
11
|
+
CLOSE_FLAG_CONTRACTS,
|
|
12
|
+
CLOSE_MANY_FLAG_CONTRACTS,
|
|
13
|
+
CLOSE_TASK_FLAG_CONTRACTS,
|
|
14
|
+
COMMENTS_AUDIT_FLAG_CONTRACTS,
|
|
15
|
+
COMMENTS_FLAG_CONTRACTS,
|
|
16
|
+
COMPLETION_FLAG_CONTRACTS,
|
|
17
|
+
CONFIG_FLAG_CONTRACTS,
|
|
18
|
+
CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS,
|
|
19
|
+
CONTEXT_FLAG_CONTRACTS,
|
|
20
|
+
CONTRACTS_FLAG_CONTRACTS,
|
|
21
|
+
CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,
|
|
22
|
+
CREATE_COMMANDER_STRING_OPTION_CONTRACTS,
|
|
23
|
+
CREATE_FLAG_CONTRACTS,
|
|
24
|
+
DEDUPE_AUDIT_FLAG_CONTRACTS,
|
|
25
|
+
DELETE_FLAG_CONTRACTS,
|
|
26
|
+
DEPS_FLAG_CONTRACTS,
|
|
27
|
+
DOCS_FLAG_CONTRACTS,
|
|
28
|
+
EXTENSION_ACTIVATE_FLAG_CONTRACTS,
|
|
29
|
+
EXTENSION_ADOPT_ALL_FLAG_CONTRACTS,
|
|
30
|
+
EXTENSION_ADOPT_FLAG_CONTRACTS,
|
|
31
|
+
EXTENSION_CATALOG_FLAG_CONTRACTS,
|
|
32
|
+
EXTENSION_DEACTIVATE_FLAG_CONTRACTS,
|
|
33
|
+
EXTENSION_DOCTOR_FLAG_CONTRACTS,
|
|
34
|
+
EXTENSION_EXPLORE_FLAG_CONTRACTS,
|
|
35
|
+
EXTENSION_FLAG_CONTRACTS,
|
|
36
|
+
EXTENSION_INIT_FLAG_CONTRACTS,
|
|
37
|
+
EXTENSION_INSTALL_FLAG_CONTRACTS,
|
|
38
|
+
EXTENSION_MANAGE_FLAG_CONTRACTS,
|
|
39
|
+
EXTENSION_RELOAD_FLAG_CONTRACTS,
|
|
40
|
+
EXTENSION_UNINSTALL_FLAG_CONTRACTS,
|
|
41
|
+
FILES_FLAG_CONTRACTS,
|
|
42
|
+
GC_FLAG_CONTRACTS,
|
|
43
|
+
GET_FLAG_CONTRACTS,
|
|
44
|
+
GLOBAL_FLAG_CONTRACTS,
|
|
45
|
+
GUIDE_FLAG_CONTRACTS,
|
|
46
|
+
HEALTH_FLAG_CONTRACTS,
|
|
47
|
+
HISTORY_FLAG_CONTRACTS,
|
|
48
|
+
HISTORY_REDACT_FLAG_CONTRACTS,
|
|
49
|
+
HISTORY_REPAIR_FLAG_CONTRACTS,
|
|
50
|
+
INIT_FLAG_CONTRACTS,
|
|
51
|
+
INSTALL_FLAG_CONTRACTS,
|
|
52
|
+
LEARNINGS_FLAG_CONTRACTS,
|
|
53
|
+
LIST_COMMANDER_STRING_OPTION_CONTRACTS,
|
|
54
|
+
LIST_FILTER_FLAG_CONTRACTS,
|
|
55
|
+
NORMALIZE_FLAG_CONTRACTS,
|
|
56
|
+
NOTES_FLAG_CONTRACTS,
|
|
57
|
+
PAUSE_TASK_FLAG_CONTRACTS,
|
|
58
|
+
PLAN_FLAG_CONTRACTS,
|
|
59
|
+
PM_CORE_COMMAND_NAMES,
|
|
60
|
+
PM_EXTENSION_CAPABILITY_CONTRACTS,
|
|
61
|
+
PM_EXTENSION_POLICY_MODE_CONTRACTS,
|
|
62
|
+
PM_EXTENSION_POLICY_SURFACE_CONTRACTS,
|
|
63
|
+
PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS,
|
|
64
|
+
PM_EXTENSION_SERVICE_NAME_CONTRACTS,
|
|
65
|
+
PM_EXTENSION_TRUST_MODE_CONTRACTS,
|
|
66
|
+
PM_TOOL_ACTIONS,
|
|
67
|
+
PM_TOOL_PARAMETERS_SCHEMA,
|
|
68
|
+
REINDEX_FLAG_CONTRACTS,
|
|
69
|
+
RELEASE_FLAG_CONTRACTS,
|
|
70
|
+
RESTORE_FLAG_CONTRACTS,
|
|
71
|
+
SCHEMA_FLAG_CONTRACTS,
|
|
72
|
+
SEARCH_COMMANDER_STRING_OPTION_CONTRACTS,
|
|
73
|
+
SEARCH_FLAG_CONTRACTS,
|
|
74
|
+
START_TASK_FLAG_CONTRACTS,
|
|
75
|
+
STATS_FLAG_CONTRACTS,
|
|
76
|
+
TELEMETRY_FLAG_CONTRACTS,
|
|
77
|
+
TEST_ALL_FLAG_CONTRACTS,
|
|
78
|
+
TEST_FLAG_CONTRACTS,
|
|
79
|
+
TEST_RUNS_FLAG_CONTRACTS,
|
|
80
|
+
UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,
|
|
81
|
+
UPDATE_COMMANDER_STRING_OPTION_CONTRACTS,
|
|
82
|
+
UPDATE_FLAG_CONTRACTS,
|
|
83
|
+
UPDATE_MANY_FLAG_CONTRACTS,
|
|
84
|
+
UPGRADE_FLAG_CONTRACTS,
|
|
85
|
+
VALIDATE_FLAG_CONTRACTS,
|
|
86
|
+
compactFlagAliasContracts
|
|
87
|
+
} from "./chunk-KWU6HG75.js";
|
|
88
|
+
import {
|
|
89
|
+
commandOptionFlagLabel,
|
|
90
|
+
resolveCommandOptionPolicyState,
|
|
91
|
+
resolveItemTypeRegistry
|
|
92
|
+
} from "./chunk-2VBQ6ZXS.js";
|
|
93
|
+
import {
|
|
94
|
+
EXIT_CODE,
|
|
95
|
+
PmCliError,
|
|
96
|
+
SETTINGS_DEFAULTS,
|
|
97
|
+
activateExtensions,
|
|
98
|
+
getActiveExtensionRegistrations,
|
|
99
|
+
getSettingsPath,
|
|
100
|
+
loadExtensions,
|
|
101
|
+
pathExists,
|
|
102
|
+
readSettings,
|
|
103
|
+
resolvePmRoot,
|
|
104
|
+
resolveRuntimeFieldRegistry,
|
|
105
|
+
resolveRuntimeStatusRegistry
|
|
106
|
+
} from "./chunk-5SFCOO6B.js";
|
|
107
|
+
|
|
108
|
+
// dist/cli/commands/contracts.js
|
|
109
|
+
var LIST_COMMAND_NAMES = /* @__PURE__ */ new Set([
|
|
110
|
+
"list",
|
|
111
|
+
"list-all",
|
|
112
|
+
"list-draft",
|
|
113
|
+
"list-open",
|
|
114
|
+
"list-in-progress",
|
|
115
|
+
"list-blocked",
|
|
116
|
+
"list-closed",
|
|
117
|
+
"list-canceled"
|
|
118
|
+
]);
|
|
119
|
+
var PACKAGE_OWNED_ACTIONS = /* @__PURE__ */ new Set([
|
|
120
|
+
"calendar",
|
|
121
|
+
"dedupe-audit",
|
|
122
|
+
"guide",
|
|
123
|
+
"reindex",
|
|
124
|
+
"normalize",
|
|
125
|
+
"comments-audit",
|
|
126
|
+
"completion",
|
|
127
|
+
"test-runs-list",
|
|
128
|
+
"test-runs-status",
|
|
129
|
+
"test-runs-logs",
|
|
130
|
+
"test-runs-stop",
|
|
131
|
+
"test-runs-resume",
|
|
132
|
+
"templates-list",
|
|
133
|
+
"templates-save",
|
|
134
|
+
"templates-show"
|
|
135
|
+
]);
|
|
136
|
+
var PACKAGE_OWNED_COMMANDS = /* @__PURE__ */ new Set([
|
|
137
|
+
"cal",
|
|
138
|
+
"calendar",
|
|
139
|
+
"comments-audit",
|
|
140
|
+
"completion",
|
|
141
|
+
"completion-statuses",
|
|
142
|
+
"completion-tags",
|
|
143
|
+
"completion-types",
|
|
144
|
+
"dedupe-audit",
|
|
145
|
+
"guide",
|
|
146
|
+
"normalize",
|
|
147
|
+
"reindex",
|
|
148
|
+
"templates",
|
|
149
|
+
"templates list",
|
|
150
|
+
"templates save",
|
|
151
|
+
"templates show",
|
|
152
|
+
"test-runs",
|
|
153
|
+
"test-runs list",
|
|
154
|
+
"test-runs status",
|
|
155
|
+
"test-runs logs",
|
|
156
|
+
"test-runs stop",
|
|
157
|
+
"test-runs resume"
|
|
158
|
+
]);
|
|
159
|
+
var PACKAGE_OWNED_COMMAND_INSTALL_HINTS = /* @__PURE__ */ new Map([
|
|
160
|
+
["cal", "calendar"],
|
|
161
|
+
["calendar", "calendar"],
|
|
162
|
+
["comments-audit", "governance-audit"],
|
|
163
|
+
["completion", "guide-shell"],
|
|
164
|
+
["completion-statuses", "guide-shell"],
|
|
165
|
+
["completion-tags", "guide-shell"],
|
|
166
|
+
["completion-types", "guide-shell"],
|
|
167
|
+
["dedupe-audit", "governance-audit"],
|
|
168
|
+
["guide", "guide-shell"],
|
|
169
|
+
["normalize", "governance-audit"],
|
|
170
|
+
["reindex", "search-advanced"],
|
|
171
|
+
["templates", "templates"],
|
|
172
|
+
["templates list", "templates"],
|
|
173
|
+
["templates save", "templates"],
|
|
174
|
+
["templates show", "templates"],
|
|
175
|
+
["test-runs", "linked-test-adapters"],
|
|
176
|
+
["test-runs list", "linked-test-adapters"],
|
|
177
|
+
["test-runs status", "linked-test-adapters"],
|
|
178
|
+
["test-runs logs", "linked-test-adapters"],
|
|
179
|
+
["test-runs stop", "linked-test-adapters"],
|
|
180
|
+
["test-runs resume", "linked-test-adapters"]
|
|
181
|
+
]);
|
|
182
|
+
var PACKAGE_OWNED_ACTION_COMMAND_PATHS = /* @__PURE__ */ new Map([
|
|
183
|
+
["calendar", "calendar|cal"],
|
|
184
|
+
["dedupe-audit", "dedupe-audit"],
|
|
185
|
+
["guide", "guide"],
|
|
186
|
+
["reindex", "reindex"],
|
|
187
|
+
["normalize", "normalize"],
|
|
188
|
+
["comments-audit", "comments-audit"],
|
|
189
|
+
["completion", "completion"],
|
|
190
|
+
["test-runs-list", "test-runs|test-runs list"],
|
|
191
|
+
["test-runs-status", "test-runs status"],
|
|
192
|
+
["test-runs-logs", "test-runs logs"],
|
|
193
|
+
["test-runs-stop", "test-runs stop"],
|
|
194
|
+
["test-runs-resume", "test-runs resume"],
|
|
195
|
+
["templates-list", "templates|templates list"],
|
|
196
|
+
["templates-save", "templates save"],
|
|
197
|
+
["templates-show", "templates show"]
|
|
198
|
+
]);
|
|
199
|
+
var PACKAGE_OWNED_COMMAND_ACTIONS = new Map([...PACKAGE_OWNED_ACTION_COMMAND_PATHS.entries()].flatMap(([action, commandPaths]) => splitCommandPathAliases(commandPaths).map((commandPath) => [commandPath, action])));
|
|
200
|
+
var CANONICAL_COMMAND_ALIASES = [
|
|
201
|
+
{
|
|
202
|
+
canonical: "context",
|
|
203
|
+
aliases: ["ctx"]
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
canonical: "package",
|
|
207
|
+
aliases: ["extension", "packages", "install"]
|
|
208
|
+
}
|
|
209
|
+
];
|
|
210
|
+
var COMMAND_ALIAS_TO_CANONICAL = new Map(CANONICAL_COMMAND_ALIASES.flatMap((entry) => entry.aliases.map((alias) => [alias, entry.canonical])));
|
|
211
|
+
var EXTENSION_PACKAGE_LIFECYCLE_FLAG_CONTRACTS = [
|
|
212
|
+
["init", EXTENSION_INIT_FLAG_CONTRACTS],
|
|
213
|
+
["install", EXTENSION_INSTALL_FLAG_CONTRACTS],
|
|
214
|
+
["uninstall", EXTENSION_UNINSTALL_FLAG_CONTRACTS],
|
|
215
|
+
["explore", EXTENSION_EXPLORE_FLAG_CONTRACTS],
|
|
216
|
+
["manage", EXTENSION_MANAGE_FLAG_CONTRACTS],
|
|
217
|
+
["reload", EXTENSION_RELOAD_FLAG_CONTRACTS],
|
|
218
|
+
["doctor", EXTENSION_DOCTOR_FLAG_CONTRACTS],
|
|
219
|
+
["catalog", EXTENSION_CATALOG_FLAG_CONTRACTS],
|
|
220
|
+
["adopt", EXTENSION_ADOPT_FLAG_CONTRACTS],
|
|
221
|
+
["adopt-all", EXTENSION_ADOPT_ALL_FLAG_CONTRACTS],
|
|
222
|
+
["activate", EXTENSION_ACTIVATE_FLAG_CONTRACTS],
|
|
223
|
+
["deactivate", EXTENSION_DEACTIVATE_FLAG_CONTRACTS]
|
|
224
|
+
];
|
|
225
|
+
var CORE_COMMAND_FLAG_CONTRACT_ENTRIES = [
|
|
226
|
+
...EXTENSION_PACKAGE_LIFECYCLE_FLAG_CONTRACTS.flatMap(([subcommand, flags]) => [
|
|
227
|
+
[`extension ${subcommand}`, flags],
|
|
228
|
+
[`package ${subcommand}`, flags],
|
|
229
|
+
[`packages ${subcommand}`, flags]
|
|
230
|
+
]),
|
|
231
|
+
["init", INIT_FLAG_CONTRACTS],
|
|
232
|
+
["config", CONFIG_FLAG_CONTRACTS],
|
|
233
|
+
["extension", EXTENSION_FLAG_CONTRACTS],
|
|
234
|
+
["package", EXTENSION_FLAG_CONTRACTS],
|
|
235
|
+
["packages", EXTENSION_FLAG_CONTRACTS],
|
|
236
|
+
["install", INSTALL_FLAG_CONTRACTS],
|
|
237
|
+
["create", CREATE_FLAG_CONTRACTS],
|
|
238
|
+
["update", UPDATE_FLAG_CONTRACTS],
|
|
239
|
+
["update-many", UPDATE_MANY_FLAG_CONTRACTS],
|
|
240
|
+
["upgrade", UPGRADE_FLAG_CONTRACTS],
|
|
241
|
+
["normalize", NORMALIZE_FLAG_CONTRACTS],
|
|
242
|
+
["calendar", CALENDAR_FLAG_CONTRACTS],
|
|
243
|
+
["cal", CALENDAR_FLAG_CONTRACTS],
|
|
244
|
+
["context", CONTEXT_FLAG_CONTRACTS],
|
|
245
|
+
["ctx", CONTEXT_FLAG_CONTRACTS],
|
|
246
|
+
["get", GET_FLAG_CONTRACTS],
|
|
247
|
+
["search", SEARCH_FLAG_CONTRACTS],
|
|
248
|
+
["aggregate", AGGREGATE_FLAG_CONTRACTS],
|
|
249
|
+
["dedupe-audit", DEDUPE_AUDIT_FLAG_CONTRACTS],
|
|
250
|
+
["deps", DEPS_FLAG_CONTRACTS],
|
|
251
|
+
["guide", GUIDE_FLAG_CONTRACTS],
|
|
252
|
+
["reindex", REINDEX_FLAG_CONTRACTS],
|
|
253
|
+
["history", HISTORY_FLAG_CONTRACTS],
|
|
254
|
+
["history-redact", HISTORY_REDACT_FLAG_CONTRACTS],
|
|
255
|
+
["history-repair", HISTORY_REPAIR_FLAG_CONTRACTS],
|
|
256
|
+
["schema", SCHEMA_FLAG_CONTRACTS],
|
|
257
|
+
["plan", PLAN_FLAG_CONTRACTS],
|
|
258
|
+
["restore", RESTORE_FLAG_CONTRACTS],
|
|
259
|
+
["delete", DELETE_FLAG_CONTRACTS],
|
|
260
|
+
["close", CLOSE_FLAG_CONTRACTS],
|
|
261
|
+
["close-many", CLOSE_MANY_FLAG_CONTRACTS],
|
|
262
|
+
["append", APPEND_FLAG_CONTRACTS],
|
|
263
|
+
["claim", CLAIM_FLAG_CONTRACTS],
|
|
264
|
+
["release", RELEASE_FLAG_CONTRACTS],
|
|
265
|
+
["start-task", START_TASK_FLAG_CONTRACTS],
|
|
266
|
+
["pause-task", PAUSE_TASK_FLAG_CONTRACTS],
|
|
267
|
+
["close-task", CLOSE_TASK_FLAG_CONTRACTS],
|
|
268
|
+
["comments", COMMENTS_FLAG_CONTRACTS],
|
|
269
|
+
["notes", NOTES_FLAG_CONTRACTS],
|
|
270
|
+
["learnings", LEARNINGS_FLAG_CONTRACTS],
|
|
271
|
+
["files", FILES_FLAG_CONTRACTS],
|
|
272
|
+
["docs", DOCS_FLAG_CONTRACTS],
|
|
273
|
+
["test", TEST_FLAG_CONTRACTS],
|
|
274
|
+
["test-all", TEST_ALL_FLAG_CONTRACTS],
|
|
275
|
+
["telemetry", TELEMETRY_FLAG_CONTRACTS],
|
|
276
|
+
["test-runs", TEST_RUNS_FLAG_CONTRACTS],
|
|
277
|
+
["gc", GC_FLAG_CONTRACTS],
|
|
278
|
+
["stats", STATS_FLAG_CONTRACTS],
|
|
279
|
+
["validate", VALIDATE_FLAG_CONTRACTS],
|
|
280
|
+
["comments-audit", COMMENTS_AUDIT_FLAG_CONTRACTS],
|
|
281
|
+
["health", HEALTH_FLAG_CONTRACTS],
|
|
282
|
+
["contracts", CONTRACTS_FLAG_CONTRACTS],
|
|
283
|
+
["completion", COMPLETION_FLAG_CONTRACTS],
|
|
284
|
+
["activity", ACTIVITY_FLAG_CONTRACTS],
|
|
285
|
+
...[...LIST_COMMAND_NAMES].map((command) => [command, LIST_FILTER_FLAG_CONTRACTS])
|
|
286
|
+
];
|
|
287
|
+
var CORE_COMMAND_FLAG_CONTRACTS_BY_COMMAND = new Map(CORE_COMMAND_FLAG_CONTRACT_ENTRIES);
|
|
288
|
+
function packageOwnedActionForCommand(command) {
|
|
289
|
+
const exactAction = PACKAGE_OWNED_COMMAND_ACTIONS.get(command);
|
|
290
|
+
if (exactAction) {
|
|
291
|
+
return exactAction;
|
|
292
|
+
}
|
|
293
|
+
if (command.startsWith("test-runs ")) {
|
|
294
|
+
return `test-runs-${command.slice("test-runs ".length)}`;
|
|
295
|
+
}
|
|
296
|
+
if (command.startsWith("templates ")) {
|
|
297
|
+
return `templates-${command.slice("templates ".length)}`;
|
|
298
|
+
}
|
|
299
|
+
return command;
|
|
300
|
+
}
|
|
301
|
+
function resolveActionCommandPath(action) {
|
|
302
|
+
if (PM_CORE_COMMAND_NAMES.includes(action)) {
|
|
303
|
+
return normalizeCommandPath(action);
|
|
304
|
+
}
|
|
305
|
+
if (action.startsWith("extension-")) {
|
|
306
|
+
return normalizeCommandPath(`extension ${action.slice("extension-".length)}`);
|
|
307
|
+
}
|
|
308
|
+
if (action.startsWith("package-")) {
|
|
309
|
+
return normalizeCommandPath(`package ${action.slice("package-".length)}`);
|
|
310
|
+
}
|
|
311
|
+
if (action.startsWith("test-runs-")) {
|
|
312
|
+
return normalizeCommandPath(`test-runs ${action.slice("test-runs-".length)}`);
|
|
313
|
+
}
|
|
314
|
+
if (action.startsWith("templates-")) {
|
|
315
|
+
return normalizeCommandPath(`templates ${action.slice("templates-".length)}`);
|
|
316
|
+
}
|
|
317
|
+
if (PACKAGE_OWNED_ACTIONS.has(action)) {
|
|
318
|
+
return PACKAGE_OWNED_ACTION_COMMAND_PATHS.get(action) ?? normalizeCommandPath(action);
|
|
319
|
+
}
|
|
320
|
+
return null;
|
|
321
|
+
}
|
|
322
|
+
function actionDescriptorMatchesSelectedCommand(descriptor, selectedCommand) {
|
|
323
|
+
if (descriptor.command_path === null) {
|
|
324
|
+
return false;
|
|
325
|
+
}
|
|
326
|
+
return splitCommandPathAliases(descriptor.command_path).some((commandPath) => {
|
|
327
|
+
if (commandPath === selectedCommand) {
|
|
328
|
+
return true;
|
|
329
|
+
}
|
|
330
|
+
return commandPath.startsWith(`${selectedCommand} `);
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
function splitCommandPathAliases(commandPath) {
|
|
334
|
+
return commandPath.split("|").map((entry) => normalizeCommandPath(entry)).filter((entry) => entry.length > 0);
|
|
335
|
+
}
|
|
336
|
+
function resolveScopedCommandsFromActionDescriptors(descriptors, commandCatalog) {
|
|
337
|
+
const commandSet = new Set(commandCatalog);
|
|
338
|
+
const scoped = /* @__PURE__ */ new Set();
|
|
339
|
+
for (const descriptor of descriptors) {
|
|
340
|
+
if (!descriptor.command_path) {
|
|
341
|
+
continue;
|
|
342
|
+
}
|
|
343
|
+
for (const commandPath of splitCommandPathAliases(descriptor.command_path)) {
|
|
344
|
+
const tokens = commandPath.split(" ").filter((entry) => entry.length > 0);
|
|
345
|
+
if (tokens.length === 0) {
|
|
346
|
+
continue;
|
|
347
|
+
}
|
|
348
|
+
for (let end = tokens.length; end > 0; end -= 1) {
|
|
349
|
+
const candidate = tokens.slice(0, end).join(" ");
|
|
350
|
+
if (!commandSet.has(candidate)) {
|
|
351
|
+
continue;
|
|
352
|
+
}
|
|
353
|
+
scoped.add(candidate);
|
|
354
|
+
break;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
return [...scoped].sort((left, right) => left.localeCompare(right));
|
|
359
|
+
}
|
|
360
|
+
function normalizeToken(value) {
|
|
361
|
+
if (typeof value !== "string") {
|
|
362
|
+
return void 0;
|
|
363
|
+
}
|
|
364
|
+
const trimmed = value.trim().toLowerCase();
|
|
365
|
+
return trimmed.length > 0 ? trimmed : void 0;
|
|
366
|
+
}
|
|
367
|
+
function extractActionBranches(schema) {
|
|
368
|
+
const oneOf = schema.oneOf;
|
|
369
|
+
if (!Array.isArray(oneOf)) {
|
|
370
|
+
return [];
|
|
371
|
+
}
|
|
372
|
+
return oneOf.filter((entry) => typeof entry === "object" && entry !== null);
|
|
373
|
+
}
|
|
374
|
+
function filterSchemaByAction(schema, action) {
|
|
375
|
+
if (!action) {
|
|
376
|
+
return { ...schema };
|
|
377
|
+
}
|
|
378
|
+
const branches = extractActionBranches(schema);
|
|
379
|
+
const filtered = branches.filter((entry) => {
|
|
380
|
+
const properties = entry.properties;
|
|
381
|
+
if (typeof properties !== "object" || properties === null) {
|
|
382
|
+
return false;
|
|
383
|
+
}
|
|
384
|
+
const actionProperty = properties.action;
|
|
385
|
+
if (typeof actionProperty !== "object" || actionProperty === null) {
|
|
386
|
+
return false;
|
|
387
|
+
}
|
|
388
|
+
return actionProperty.const === action;
|
|
389
|
+
});
|
|
390
|
+
return {
|
|
391
|
+
...schema,
|
|
392
|
+
oneOf: filtered
|
|
393
|
+
};
|
|
394
|
+
}
|
|
395
|
+
function filterSchemaByActions(schema, actions) {
|
|
396
|
+
const branches = extractActionBranches(schema);
|
|
397
|
+
const filtered = branches.filter((entry) => {
|
|
398
|
+
const properties = entry.properties;
|
|
399
|
+
if (typeof properties !== "object" || properties === null) {
|
|
400
|
+
return false;
|
|
401
|
+
}
|
|
402
|
+
const actionProperty = properties.action;
|
|
403
|
+
if (typeof actionProperty !== "object" || actionProperty === null) {
|
|
404
|
+
return false;
|
|
405
|
+
}
|
|
406
|
+
const actionConst = actionProperty.const;
|
|
407
|
+
return typeof actionConst === "string" && actions.has(actionConst);
|
|
408
|
+
});
|
|
409
|
+
return {
|
|
410
|
+
...schema,
|
|
411
|
+
oneOf: filtered
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
function normalizeCommandPath(value) {
|
|
415
|
+
return value.trim().toLowerCase().split(/\s+/).filter((entry) => entry.length > 0).join(" ");
|
|
416
|
+
}
|
|
417
|
+
function normalizeActionNameFromCommand(commandPath) {
|
|
418
|
+
return commandPath.replace(/\s+/g, "-");
|
|
419
|
+
}
|
|
420
|
+
function toOptionalTrimmedString(value) {
|
|
421
|
+
if (typeof value !== "string") {
|
|
422
|
+
return null;
|
|
423
|
+
}
|
|
424
|
+
const trimmed = value.trim();
|
|
425
|
+
return trimmed.length > 0 ? trimmed : null;
|
|
426
|
+
}
|
|
427
|
+
function normalizeStringList(values) {
|
|
428
|
+
if (!Array.isArray(values)) {
|
|
429
|
+
return [];
|
|
430
|
+
}
|
|
431
|
+
const normalized = [];
|
|
432
|
+
const seen = /* @__PURE__ */ new Set();
|
|
433
|
+
for (const value of values) {
|
|
434
|
+
const trimmed = toOptionalTrimmedString(value);
|
|
435
|
+
if (!trimmed || seen.has(trimmed)) {
|
|
436
|
+
continue;
|
|
437
|
+
}
|
|
438
|
+
seen.add(trimmed);
|
|
439
|
+
normalized.push(trimmed);
|
|
440
|
+
}
|
|
441
|
+
return normalized;
|
|
442
|
+
}
|
|
443
|
+
function toExtensionFlagContract(definition) {
|
|
444
|
+
const longName = toOptionalTrimmedString(definition.long);
|
|
445
|
+
const shortName = toOptionalTrimmedString(definition.short);
|
|
446
|
+
const normalizedLong = longName && longName.startsWith("--") && longName.length > 2 ? longName : null;
|
|
447
|
+
const normalizedShort = shortName && shortName.startsWith("-") && !shortName.startsWith("--") ? shortName : null;
|
|
448
|
+
const flag = normalizedLong ?? normalizedShort;
|
|
449
|
+
if (!flag) {
|
|
450
|
+
return null;
|
|
451
|
+
}
|
|
452
|
+
const contract = { flag };
|
|
453
|
+
if (normalizedShort && normalizedLong) {
|
|
454
|
+
contract.short = normalizedShort;
|
|
455
|
+
}
|
|
456
|
+
const description = toOptionalTrimmedString(definition.description);
|
|
457
|
+
if (description) {
|
|
458
|
+
contract.description = description;
|
|
459
|
+
}
|
|
460
|
+
if (definition.required === true) {
|
|
461
|
+
contract.required = true;
|
|
462
|
+
}
|
|
463
|
+
if (definition.repeatable === true) {
|
|
464
|
+
contract.repeatable = true;
|
|
465
|
+
}
|
|
466
|
+
const valueName = toOptionalTrimmedString(definition.value_name);
|
|
467
|
+
if (valueName) {
|
|
468
|
+
contract.value_name = valueName;
|
|
469
|
+
}
|
|
470
|
+
const rawValueType = [
|
|
471
|
+
toOptionalTrimmedString(definition.value_type),
|
|
472
|
+
toOptionalTrimmedString(definition.type),
|
|
473
|
+
valueName ? "string" : null
|
|
474
|
+
].find((candidate) => candidate === "string" || candidate === "number" || candidate === "boolean");
|
|
475
|
+
if (rawValueType) {
|
|
476
|
+
contract.value_type = rawValueType;
|
|
477
|
+
}
|
|
478
|
+
return contract;
|
|
479
|
+
}
|
|
480
|
+
function collectExtensionFlagContractsByCommand(registrations) {
|
|
481
|
+
const grouped = /* @__PURE__ */ new Map();
|
|
482
|
+
for (const registration of registrations) {
|
|
483
|
+
const commandPath = normalizeCommandPath(registration.target_command);
|
|
484
|
+
if (commandPath.length === 0) {
|
|
485
|
+
continue;
|
|
486
|
+
}
|
|
487
|
+
const bucket = grouped.get(commandPath) ?? {
|
|
488
|
+
flags: [],
|
|
489
|
+
sources: [],
|
|
490
|
+
dedupe: /* @__PURE__ */ new Set(),
|
|
491
|
+
sourceDedupe: /* @__PURE__ */ new Set()
|
|
492
|
+
};
|
|
493
|
+
const sourceKey = `${registration.layer}:${registration.name}`;
|
|
494
|
+
if (!bucket.sourceDedupe.has(sourceKey)) {
|
|
495
|
+
bucket.sourceDedupe.add(sourceKey);
|
|
496
|
+
bucket.sources.push({
|
|
497
|
+
layer: registration.layer,
|
|
498
|
+
name: registration.name
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
for (const definition of registration.flags) {
|
|
502
|
+
const contract = toExtensionFlagContract(definition);
|
|
503
|
+
if (!contract) {
|
|
504
|
+
continue;
|
|
505
|
+
}
|
|
506
|
+
const key = `${contract.flag}|${contract.short ?? ""}`;
|
|
507
|
+
if (bucket.dedupe.has(key)) {
|
|
508
|
+
continue;
|
|
509
|
+
}
|
|
510
|
+
bucket.dedupe.add(key);
|
|
511
|
+
bucket.flags.push(contract);
|
|
512
|
+
}
|
|
513
|
+
grouped.set(commandPath, bucket);
|
|
514
|
+
}
|
|
515
|
+
const normalized = /* @__PURE__ */ new Map();
|
|
516
|
+
for (const [commandPath, bucket] of grouped.entries()) {
|
|
517
|
+
normalized.set(commandPath, {
|
|
518
|
+
flags: bucket.flags,
|
|
519
|
+
sources: bucket.sources.sort((left, right) => {
|
|
520
|
+
const layerOrder = left.layer.localeCompare(right.layer);
|
|
521
|
+
if (layerOrder !== 0) {
|
|
522
|
+
return layerOrder;
|
|
523
|
+
}
|
|
524
|
+
return (left.name ?? "").localeCompare(right.name ?? "");
|
|
525
|
+
})
|
|
526
|
+
});
|
|
527
|
+
}
|
|
528
|
+
return normalized;
|
|
529
|
+
}
|
|
530
|
+
function collectExtensionCommandContracts(runtimeProbe) {
|
|
531
|
+
const flagsByCommand = collectExtensionFlagContractsByCommand(runtimeProbe.flagRegistrations);
|
|
532
|
+
const definitionsByCommand = /* @__PURE__ */ new Map();
|
|
533
|
+
for (const definition of runtimeProbe.commandDefinitions) {
|
|
534
|
+
const command = normalizeCommandPath(definition.command);
|
|
535
|
+
if (command.length === 0) {
|
|
536
|
+
continue;
|
|
537
|
+
}
|
|
538
|
+
const action = toOptionalTrimmedString(definition.action) ?? normalizeActionNameFromCommand(command);
|
|
539
|
+
const args = Array.isArray(definition.arguments) ? definition.arguments.map((argument) => {
|
|
540
|
+
const name = toOptionalTrimmedString(argument.name);
|
|
541
|
+
if (!name) {
|
|
542
|
+
return null;
|
|
543
|
+
}
|
|
544
|
+
return {
|
|
545
|
+
name,
|
|
546
|
+
required: argument.required === true,
|
|
547
|
+
variadic: argument.variadic === true,
|
|
548
|
+
description: toOptionalTrimmedString(argument.description)
|
|
549
|
+
};
|
|
550
|
+
}).filter((argument) => argument !== null) : [];
|
|
551
|
+
definitionsByCommand.set(command, {
|
|
552
|
+
command,
|
|
553
|
+
action,
|
|
554
|
+
source: {
|
|
555
|
+
layer: definition.layer,
|
|
556
|
+
name: definition.name
|
|
557
|
+
},
|
|
558
|
+
description: toOptionalTrimmedString(definition.description),
|
|
559
|
+
intent: toOptionalTrimmedString(definition.intent),
|
|
560
|
+
arguments: args,
|
|
561
|
+
flags: flagsByCommand.get(command)?.flags ?? [],
|
|
562
|
+
examples: normalizeStringList(definition.examples),
|
|
563
|
+
failure_hints: normalizeStringList(definition.failure_hints)
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
const extensionCommands = /* @__PURE__ */ new Set();
|
|
567
|
+
for (const command of runtimeProbe.handlers) {
|
|
568
|
+
extensionCommands.add(normalizeCommandPath(command));
|
|
569
|
+
}
|
|
570
|
+
for (const command of definitionsByCommand.keys()) {
|
|
571
|
+
extensionCommands.add(command);
|
|
572
|
+
}
|
|
573
|
+
for (const command of flagsByCommand.keys()) {
|
|
574
|
+
extensionCommands.add(command);
|
|
575
|
+
}
|
|
576
|
+
const contracts = [];
|
|
577
|
+
for (const command of [...extensionCommands].sort((left, right) => left.localeCompare(right))) {
|
|
578
|
+
const definition = definitionsByCommand.get(command);
|
|
579
|
+
if (definition) {
|
|
580
|
+
contracts.push({
|
|
581
|
+
...definition,
|
|
582
|
+
flags: definition.flags.length > 0 ? definition.flags : flagsByCommand.get(command)?.flags ?? []
|
|
583
|
+
});
|
|
584
|
+
continue;
|
|
585
|
+
}
|
|
586
|
+
contracts.push({
|
|
587
|
+
command,
|
|
588
|
+
action: normalizeActionNameFromCommand(command),
|
|
589
|
+
source: null,
|
|
590
|
+
description: null,
|
|
591
|
+
intent: null,
|
|
592
|
+
arguments: [],
|
|
593
|
+
flags: flagsByCommand.get(command)?.flags ?? [],
|
|
594
|
+
examples: [],
|
|
595
|
+
failure_hints: []
|
|
596
|
+
});
|
|
597
|
+
}
|
|
598
|
+
return contracts;
|
|
599
|
+
}
|
|
600
|
+
function extensionSchemaPropertyNameFromFlag(flag) {
|
|
601
|
+
const normalized = flag.flag.replace(/^-+/, "").trim();
|
|
602
|
+
if (normalized.length === 0) {
|
|
603
|
+
return null;
|
|
604
|
+
}
|
|
605
|
+
const camelCased = normalized.replace(/-([a-z0-9])/g, (_match, char) => char.toUpperCase());
|
|
606
|
+
const cleaned = camelCased.replace(/[^a-zA-Z0-9]/g, "");
|
|
607
|
+
return cleaned.length > 0 ? cleaned : null;
|
|
608
|
+
}
|
|
609
|
+
function buildExtensionActionSchemaBranch(contract) {
|
|
610
|
+
const commands = contract.command.split("|").map((command) => command.trim()).filter((command) => command.length > 0);
|
|
611
|
+
const properties = {
|
|
612
|
+
action: {
|
|
613
|
+
type: "string",
|
|
614
|
+
const: contract.action,
|
|
615
|
+
description: contract.intent ?? contract.description ?? `Invoke extension command '${contract.command}'.`
|
|
616
|
+
}
|
|
617
|
+
};
|
|
618
|
+
const required = ["action"];
|
|
619
|
+
for (const argument of contract.arguments) {
|
|
620
|
+
if (argument.variadic) {
|
|
621
|
+
properties[argument.name] = {
|
|
622
|
+
type: "array",
|
|
623
|
+
items: { type: "string" },
|
|
624
|
+
description: argument.description ?? `Variadic argument '${argument.name}' for extension action '${contract.action}'.`
|
|
625
|
+
};
|
|
626
|
+
} else {
|
|
627
|
+
properties[argument.name] = {
|
|
628
|
+
type: "string",
|
|
629
|
+
description: argument.description ?? `Argument '${argument.name}' for extension action '${contract.action}'.`
|
|
630
|
+
};
|
|
631
|
+
}
|
|
632
|
+
if (argument.required) {
|
|
633
|
+
required.push(argument.name);
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
for (const flag of contract.flags) {
|
|
637
|
+
const propertyName = extensionSchemaPropertyNameFromFlag(flag);
|
|
638
|
+
if (!propertyName || properties[propertyName] !== void 0) {
|
|
639
|
+
continue;
|
|
640
|
+
}
|
|
641
|
+
const valueType = flag.value_type ?? "boolean";
|
|
642
|
+
const schemaType = valueType === "boolean" ? "boolean" : valueType === "number" ? ["number", "string"] : "string";
|
|
643
|
+
properties[propertyName] = {
|
|
644
|
+
type: flag.repeatable ? "array" : schemaType,
|
|
645
|
+
...flag.repeatable ? { items: { type: schemaType } } : {},
|
|
646
|
+
description: flag.description ?? `Extension option '${flag.flag}' for action '${contract.action}'.`
|
|
647
|
+
};
|
|
648
|
+
if (flag.required === true) {
|
|
649
|
+
required.push(propertyName);
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
return {
|
|
653
|
+
type: "object",
|
|
654
|
+
properties,
|
|
655
|
+
required,
|
|
656
|
+
additionalProperties: true,
|
|
657
|
+
"x-extension-source": contract.source,
|
|
658
|
+
"x-extension-command": commands[0] ?? contract.command,
|
|
659
|
+
"x-extension-commands": commands
|
|
660
|
+
};
|
|
661
|
+
}
|
|
662
|
+
function mergeExtensionFlagContract(existing, incoming) {
|
|
663
|
+
existing.description ??= incoming.description;
|
|
664
|
+
existing.value_name ??= incoming.value_name;
|
|
665
|
+
existing.value_type ??= incoming.value_type;
|
|
666
|
+
if (incoming.required === true) {
|
|
667
|
+
existing.required = true;
|
|
668
|
+
}
|
|
669
|
+
if (incoming.repeatable === true) {
|
|
670
|
+
existing.repeatable = true;
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
function mergeExtensionContractsByAction(contracts) {
|
|
674
|
+
const byAction = /* @__PURE__ */ new Map();
|
|
675
|
+
for (const contract of contracts) {
|
|
676
|
+
const existing = byAction.get(contract.action);
|
|
677
|
+
if (!existing) {
|
|
678
|
+
byAction.set(contract.action, {
|
|
679
|
+
...contract,
|
|
680
|
+
flags: [...contract.flags],
|
|
681
|
+
examples: [...contract.examples],
|
|
682
|
+
failure_hints: [...contract.failure_hints]
|
|
683
|
+
});
|
|
684
|
+
continue;
|
|
685
|
+
}
|
|
686
|
+
existing.command = [.../* @__PURE__ */ new Set([existing.command, contract.command])].sort((left, right) => left.localeCompare(right)).join("|");
|
|
687
|
+
existing.arguments = existing.arguments.length >= contract.arguments.length ? existing.arguments : contract.arguments;
|
|
688
|
+
const flagKeys = new Set(existing.flags.map((flag) => `${flag.flag}|${flag.short ?? ""}`));
|
|
689
|
+
for (const flag of contract.flags) {
|
|
690
|
+
const key = `${flag.flag}|${flag.short ?? ""}`;
|
|
691
|
+
if (!flagKeys.has(key)) {
|
|
692
|
+
flagKeys.add(key);
|
|
693
|
+
existing.flags.push(flag);
|
|
694
|
+
} else {
|
|
695
|
+
const existingFlag = existing.flags.find((candidate) => `${candidate.flag}|${candidate.short ?? ""}` === key);
|
|
696
|
+
if (existingFlag) {
|
|
697
|
+
mergeExtensionFlagContract(existingFlag, flag);
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
existing.examples = [.../* @__PURE__ */ new Set([...existing.examples, ...contract.examples])];
|
|
702
|
+
existing.failure_hints = [.../* @__PURE__ */ new Set([...existing.failure_hints, ...contract.failure_hints])];
|
|
703
|
+
}
|
|
704
|
+
return [...byAction.values()].sort((left, right) => left.action.localeCompare(right.action));
|
|
705
|
+
}
|
|
706
|
+
async function resolveRuntimeExtensionActionProbe(global) {
|
|
707
|
+
const defaultPolicyState = {
|
|
708
|
+
mode: SETTINGS_DEFAULTS.extensions.policy.mode,
|
|
709
|
+
trust_mode: SETTINGS_DEFAULTS.extensions.policy.trust_mode,
|
|
710
|
+
default_sandbox_profile: SETTINGS_DEFAULTS.extensions.policy.default_sandbox_profile
|
|
711
|
+
};
|
|
712
|
+
if (global.noExtensions) {
|
|
713
|
+
return {
|
|
714
|
+
handlers: /* @__PURE__ */ new Set(),
|
|
715
|
+
disabledReason: "extensions_disabled",
|
|
716
|
+
commandDefinitions: [],
|
|
717
|
+
flagRegistrations: [],
|
|
718
|
+
registrations: null,
|
|
719
|
+
policyState: defaultPolicyState
|
|
720
|
+
};
|
|
721
|
+
}
|
|
722
|
+
const pmRoot = resolvePmRoot(process.cwd(), global.path);
|
|
723
|
+
if (!await pathExists(getSettingsPath(pmRoot))) {
|
|
724
|
+
return {
|
|
725
|
+
handlers: /* @__PURE__ */ new Set(),
|
|
726
|
+
disabledReason: null,
|
|
727
|
+
commandDefinitions: [],
|
|
728
|
+
flagRegistrations: [],
|
|
729
|
+
registrations: null,
|
|
730
|
+
policyState: defaultPolicyState
|
|
731
|
+
};
|
|
732
|
+
}
|
|
733
|
+
try {
|
|
734
|
+
const settings = await readSettings(pmRoot);
|
|
735
|
+
const loadResult = await loadExtensions({
|
|
736
|
+
pmRoot,
|
|
737
|
+
settings,
|
|
738
|
+
cwd: process.cwd(),
|
|
739
|
+
noExtensions: false
|
|
740
|
+
});
|
|
741
|
+
const activationResult = await activateExtensions({
|
|
742
|
+
...loadResult,
|
|
743
|
+
loaded: loadResult.loaded
|
|
744
|
+
});
|
|
745
|
+
const handlers = new Set(activationResult.commands.handlers.map((entry) => normalizeCommandPath(entry.command)));
|
|
746
|
+
return {
|
|
747
|
+
handlers,
|
|
748
|
+
disabledReason: null,
|
|
749
|
+
commandDefinitions: activationResult.registrations.commands,
|
|
750
|
+
flagRegistrations: activationResult.registrations.flags,
|
|
751
|
+
registrations: activationResult.registrations,
|
|
752
|
+
policyState: {
|
|
753
|
+
mode: loadResult.policy.mode,
|
|
754
|
+
trust_mode: loadResult.policy.trust_mode,
|
|
755
|
+
default_sandbox_profile: loadResult.policy.default_sandbox_profile
|
|
756
|
+
}
|
|
757
|
+
};
|
|
758
|
+
} catch {
|
|
759
|
+
return {
|
|
760
|
+
handlers: /* @__PURE__ */ new Set(),
|
|
761
|
+
disabledReason: "extension_runtime_probe_failed",
|
|
762
|
+
commandDefinitions: [],
|
|
763
|
+
flagRegistrations: [],
|
|
764
|
+
registrations: null,
|
|
765
|
+
policyState: defaultPolicyState
|
|
766
|
+
};
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
function collectActionContractDescriptors(extensionContracts, options = {}) {
|
|
770
|
+
const descriptors = /* @__PURE__ */ new Map();
|
|
771
|
+
for (const action of PM_TOOL_ACTIONS) {
|
|
772
|
+
const packageOwned = PACKAGE_OWNED_ACTIONS.has(action);
|
|
773
|
+
if (packageOwned && !options.includePackageOwnedActions) {
|
|
774
|
+
continue;
|
|
775
|
+
}
|
|
776
|
+
const commandPath = resolveActionCommandPath(action);
|
|
777
|
+
descriptors.set(action, {
|
|
778
|
+
action,
|
|
779
|
+
provider: packageOwned ? "extension" : "core",
|
|
780
|
+
requires_extension: packageOwned,
|
|
781
|
+
command_path: commandPath
|
|
782
|
+
});
|
|
783
|
+
}
|
|
784
|
+
if (options.includePackageOwnedActions) {
|
|
785
|
+
for (const action of PACKAGE_OWNED_ACTIONS) {
|
|
786
|
+
if (descriptors.has(action)) {
|
|
787
|
+
continue;
|
|
788
|
+
}
|
|
789
|
+
descriptors.set(action, {
|
|
790
|
+
action,
|
|
791
|
+
provider: "extension",
|
|
792
|
+
requires_extension: true,
|
|
793
|
+
command_path: resolveActionCommandPath(action)
|
|
794
|
+
});
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
for (const contract of extensionContracts) {
|
|
798
|
+
if (descriptors.has(contract.action)) {
|
|
799
|
+
continue;
|
|
800
|
+
}
|
|
801
|
+
descriptors.set(contract.action, {
|
|
802
|
+
action: contract.action,
|
|
803
|
+
provider: "extension",
|
|
804
|
+
requires_extension: true,
|
|
805
|
+
command_path: normalizeCommandPath(contract.command)
|
|
806
|
+
});
|
|
807
|
+
}
|
|
808
|
+
return [...descriptors.values()].sort((left, right) => (left.action ?? "").localeCompare(right.action ?? ""));
|
|
809
|
+
}
|
|
810
|
+
function resolveActionAvailability(descriptor, runtimeProbe) {
|
|
811
|
+
if (descriptor.provider === "core" && !descriptor.requires_extension) {
|
|
812
|
+
return {
|
|
813
|
+
action: descriptor.action,
|
|
814
|
+
invocable: true,
|
|
815
|
+
available: true,
|
|
816
|
+
requires_extension: false,
|
|
817
|
+
provider: "core",
|
|
818
|
+
disabled_reason: null,
|
|
819
|
+
command_path: descriptor.command_path,
|
|
820
|
+
cli_exposed: descriptor.command_path !== null
|
|
821
|
+
};
|
|
822
|
+
}
|
|
823
|
+
const commandPaths = descriptor.command_path ? splitCommandPathAliases(descriptor.command_path) : [];
|
|
824
|
+
const extensionCommandAvailable = commandPaths.some((commandPath) => runtimeProbe.handlers.has(commandPath));
|
|
825
|
+
const optionalPackageHint = commandPaths.map((commandPath) => PACKAGE_OWNED_COMMAND_INSTALL_HINTS.get(commandPath)).find((hint) => typeof hint === "string");
|
|
826
|
+
const invocable = runtimeProbe.disabledReason === null && extensionCommandAvailable;
|
|
827
|
+
return {
|
|
828
|
+
action: descriptor.action,
|
|
829
|
+
invocable,
|
|
830
|
+
available: invocable,
|
|
831
|
+
requires_extension: true,
|
|
832
|
+
provider: "extension",
|
|
833
|
+
disabled_reason: invocable ? null : runtimeProbe.disabledReason ?? (optionalPackageHint ? `optional_package_not_installed:${optionalPackageHint}` : "extension_command_not_registered"),
|
|
834
|
+
command_path: descriptor.command_path,
|
|
835
|
+
cli_exposed: extensionCommandAvailable,
|
|
836
|
+
policy_state: {
|
|
837
|
+
mode: runtimeProbe.policyState.mode,
|
|
838
|
+
trust_mode: runtimeProbe.policyState.trust_mode,
|
|
839
|
+
default_sandbox_profile: runtimeProbe.policyState.default_sandbox_profile
|
|
840
|
+
}
|
|
841
|
+
};
|
|
842
|
+
}
|
|
843
|
+
function resolveCoreCommandFlags(command) {
|
|
844
|
+
return CORE_COMMAND_FLAG_CONTRACTS_BY_COMMAND.get(command) ?? GLOBAL_FLAG_CONTRACTS;
|
|
845
|
+
}
|
|
846
|
+
function isCoreCommandPath(command) {
|
|
847
|
+
if (PACKAGE_OWNED_COMMANDS.has(command)) {
|
|
848
|
+
return false;
|
|
849
|
+
}
|
|
850
|
+
return CORE_COMMAND_FLAG_CONTRACTS_BY_COMMAND.has(command);
|
|
851
|
+
}
|
|
852
|
+
function normalizeCommandForRuntimeFieldFlags(command) {
|
|
853
|
+
if (LIST_COMMAND_NAMES.has(command)) {
|
|
854
|
+
return "list";
|
|
855
|
+
}
|
|
856
|
+
if (command === "cal") {
|
|
857
|
+
return "calendar";
|
|
858
|
+
}
|
|
859
|
+
if (command === "ctx") {
|
|
860
|
+
return "context";
|
|
861
|
+
}
|
|
862
|
+
if (command === "update-many") {
|
|
863
|
+
return "update_many";
|
|
864
|
+
}
|
|
865
|
+
return command;
|
|
866
|
+
}
|
|
867
|
+
function toRuntimeLongFlagToken(token) {
|
|
868
|
+
const trimmed = token.trim();
|
|
869
|
+
if (!trimmed) {
|
|
870
|
+
return null;
|
|
871
|
+
}
|
|
872
|
+
if (trimmed.startsWith("--")) {
|
|
873
|
+
return trimmed;
|
|
874
|
+
}
|
|
875
|
+
if (trimmed.startsWith("-")) {
|
|
876
|
+
return null;
|
|
877
|
+
}
|
|
878
|
+
return `--${trimmed}`;
|
|
879
|
+
}
|
|
880
|
+
function toRuntimeShortFlagToken(token) {
|
|
881
|
+
const trimmed = token.trim();
|
|
882
|
+
if (!trimmed) {
|
|
883
|
+
return null;
|
|
884
|
+
}
|
|
885
|
+
if (trimmed.startsWith("--")) {
|
|
886
|
+
return null;
|
|
887
|
+
}
|
|
888
|
+
if (trimmed.startsWith("-")) {
|
|
889
|
+
return trimmed;
|
|
890
|
+
}
|
|
891
|
+
return null;
|
|
892
|
+
}
|
|
893
|
+
function buildRuntimeFieldFlagContracts(fieldRegistry) {
|
|
894
|
+
const buckets = /* @__PURE__ */ new Map();
|
|
895
|
+
for (const definition of fieldRegistry.definitions) {
|
|
896
|
+
const primaryFlag = toRuntimeLongFlagToken(definition.cli_flag);
|
|
897
|
+
if (!primaryFlag) {
|
|
898
|
+
continue;
|
|
899
|
+
}
|
|
900
|
+
const shortAlias = definition.cli_aliases.map((alias) => toRuntimeShortFlagToken(alias)).find((alias) => alias !== null);
|
|
901
|
+
const longAliases = definition.cli_aliases.map((alias) => toRuntimeLongFlagToken(alias)).filter((alias) => alias !== null && alias !== primaryFlag);
|
|
902
|
+
for (const command of definition.commands) {
|
|
903
|
+
const bucket = buckets.get(command) ?? {
|
|
904
|
+
flags: [],
|
|
905
|
+
seen: /* @__PURE__ */ new Set()
|
|
906
|
+
};
|
|
907
|
+
const primaryContract = shortAlias ? { flag: primaryFlag, short: shortAlias } : { flag: primaryFlag };
|
|
908
|
+
const primaryKey = `${primaryContract.flag}|${primaryContract.short ?? ""}`;
|
|
909
|
+
if (!bucket.seen.has(primaryKey)) {
|
|
910
|
+
bucket.seen.add(primaryKey);
|
|
911
|
+
bucket.flags.push(primaryContract);
|
|
912
|
+
}
|
|
913
|
+
for (const alias of longAliases) {
|
|
914
|
+
const key = `${alias}|`;
|
|
915
|
+
if (bucket.seen.has(key)) {
|
|
916
|
+
continue;
|
|
917
|
+
}
|
|
918
|
+
bucket.seen.add(key);
|
|
919
|
+
bucket.flags.push({ flag: alias });
|
|
920
|
+
}
|
|
921
|
+
buckets.set(command, bucket);
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
const result = /* @__PURE__ */ new Map();
|
|
925
|
+
for (const [command, bucket] of buckets.entries()) {
|
|
926
|
+
result.set(command, compactFlagAliasContracts(bucket.flags));
|
|
927
|
+
}
|
|
928
|
+
return result;
|
|
929
|
+
}
|
|
930
|
+
function mergeFlagContracts(primary, secondary) {
|
|
931
|
+
const merged = [];
|
|
932
|
+
const seen = /* @__PURE__ */ new Set();
|
|
933
|
+
for (const contract of [...primary, ...secondary]) {
|
|
934
|
+
const key = `${contract.flag}|${contract.short ?? ""}`;
|
|
935
|
+
if (seen.has(key)) {
|
|
936
|
+
continue;
|
|
937
|
+
}
|
|
938
|
+
seen.add(key);
|
|
939
|
+
merged.push(contract);
|
|
940
|
+
}
|
|
941
|
+
return compactFlagAliasContracts(merged);
|
|
942
|
+
}
|
|
943
|
+
function buildCommandFlagSurface(commands, extensionFlagMap, runtimeFieldFlagMap) {
|
|
944
|
+
return commands.map((command) => {
|
|
945
|
+
const isCoreCommand = isCoreCommandPath(command);
|
|
946
|
+
const coreFlags = isCoreCommand ? resolveCoreCommandFlags(command) : [];
|
|
947
|
+
const runtimeFlags = runtimeFieldFlagMap.get(normalizeCommandForRuntimeFieldFlags(command)) ?? [];
|
|
948
|
+
const extensionFlags = extensionFlagMap.get(command);
|
|
949
|
+
const coreWithRuntime = mergeFlagContracts(coreFlags, runtimeFlags);
|
|
950
|
+
const flags = mergeFlagContracts(coreWithRuntime, extensionFlags?.flags ?? []);
|
|
951
|
+
const provider = coreFlags.length > 0 && (extensionFlags?.flags.length ?? 0) > 0 ? "mixed" : isCoreCommand ? "core" : "extension";
|
|
952
|
+
return {
|
|
953
|
+
command,
|
|
954
|
+
flags,
|
|
955
|
+
provider,
|
|
956
|
+
extension_sources: extensionFlags?.sources
|
|
957
|
+
};
|
|
958
|
+
}).sort((left, right) => left.command.localeCompare(right.command));
|
|
959
|
+
}
|
|
960
|
+
function compactCommandAliasSurface(commands) {
|
|
961
|
+
const commandSet = new Set(commands);
|
|
962
|
+
const result = [];
|
|
963
|
+
for (const command of commands) {
|
|
964
|
+
const canonical = COMMAND_ALIAS_TO_CANONICAL.get(command);
|
|
965
|
+
if (canonical && commandSet.has(canonical)) {
|
|
966
|
+
continue;
|
|
967
|
+
}
|
|
968
|
+
result.push(command);
|
|
969
|
+
}
|
|
970
|
+
return result;
|
|
971
|
+
}
|
|
972
|
+
function buildCommandAliasSurface(commands) {
|
|
973
|
+
const commandSet = new Set(commands);
|
|
974
|
+
return CANONICAL_COMMAND_ALIASES.map((entry) => ({
|
|
975
|
+
canonical: entry.canonical,
|
|
976
|
+
aliases: entry.aliases.filter((alias) => commandSet.has(alias))
|
|
977
|
+
})).filter((entry) => commandSet.has(entry.canonical) && entry.aliases.length > 0);
|
|
978
|
+
}
|
|
979
|
+
function buildCommanderAliasSurface() {
|
|
980
|
+
return {
|
|
981
|
+
create_string_options: CREATE_COMMANDER_STRING_OPTION_CONTRACTS,
|
|
982
|
+
create_repeatable_options: CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,
|
|
983
|
+
update_string_options: UPDATE_COMMANDER_STRING_OPTION_CONTRACTS,
|
|
984
|
+
update_repeatable_options: UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,
|
|
985
|
+
list_string_options: LIST_COMMANDER_STRING_OPTION_CONTRACTS,
|
|
986
|
+
search_string_options: SEARCH_COMMANDER_STRING_OPTION_CONTRACTS,
|
|
987
|
+
calendar_string_options: CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS,
|
|
988
|
+
context_string_options: CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS,
|
|
989
|
+
activity_string_options: ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS
|
|
990
|
+
};
|
|
991
|
+
}
|
|
992
|
+
function resolveCreateRequiredOptionContract(typeDefinition, createMode) {
|
|
993
|
+
const baseRequiredOptions = /* @__PURE__ */ new Set(["title", "type"]);
|
|
994
|
+
if (createMode === "strict") {
|
|
995
|
+
for (const field of typeDefinition.required_create_fields) {
|
|
996
|
+
baseRequiredOptions.add(field);
|
|
997
|
+
}
|
|
998
|
+
for (const field of typeDefinition.required_create_repeatables) {
|
|
999
|
+
baseRequiredOptions.add(field);
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
const policyState = resolveCommandOptionPolicyState(typeDefinition, "create", baseRequiredOptions);
|
|
1003
|
+
const requiredOptionKeys = [...new Set(policyState.required)].sort((left, right) => left.localeCompare(right));
|
|
1004
|
+
const requiredFlags = [
|
|
1005
|
+
...new Set(requiredOptionKeys.map((option) => commandOptionFlagLabel("create", option)))
|
|
1006
|
+
].sort((left, right) => left.localeCompare(right));
|
|
1007
|
+
const requiredTypeOptions = [
|
|
1008
|
+
...new Set(typeDefinition.options.filter((option) => option.required === true).map((option) => option.key))
|
|
1009
|
+
].sort((left, right) => left.localeCompare(right));
|
|
1010
|
+
return {
|
|
1011
|
+
required_option_keys: requiredOptionKeys,
|
|
1012
|
+
required_flags: requiredFlags,
|
|
1013
|
+
required_type_options: requiredTypeOptions,
|
|
1014
|
+
policy_errors: [...new Set(policyState.errors)].sort((left, right) => left.localeCompare(right))
|
|
1015
|
+
};
|
|
1016
|
+
}
|
|
1017
|
+
function buildCreateRequiredOptionContracts(typeRegistry) {
|
|
1018
|
+
const byTypeStrict = {};
|
|
1019
|
+
const byTypeProgressive = {};
|
|
1020
|
+
for (const typeName of [...typeRegistry.types].sort((left, right) => left.localeCompare(right))) {
|
|
1021
|
+
const typeDefinition = typeRegistry.by_type[typeName];
|
|
1022
|
+
byTypeStrict[typeName] = resolveCreateRequiredOptionContract(typeDefinition, "strict");
|
|
1023
|
+
byTypeProgressive[typeName] = resolveCreateRequiredOptionContract(typeDefinition, "progressive");
|
|
1024
|
+
}
|
|
1025
|
+
return {
|
|
1026
|
+
default_create_mode: "strict",
|
|
1027
|
+
by_create_mode: {
|
|
1028
|
+
strict: {
|
|
1029
|
+
by_type: byTypeStrict
|
|
1030
|
+
},
|
|
1031
|
+
progressive: {
|
|
1032
|
+
by_type: byTypeProgressive
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
};
|
|
1036
|
+
}
|
|
1037
|
+
function attachCreateRequiredOptionContracts(schema, metadata) {
|
|
1038
|
+
const branches = extractActionBranches(schema);
|
|
1039
|
+
if (branches.length === 0) {
|
|
1040
|
+
return schema;
|
|
1041
|
+
}
|
|
1042
|
+
let touched = false;
|
|
1043
|
+
const enrichedBranches = branches.map((branch) => {
|
|
1044
|
+
const properties = branch.properties;
|
|
1045
|
+
if (typeof properties !== "object" || properties === null) {
|
|
1046
|
+
return branch;
|
|
1047
|
+
}
|
|
1048
|
+
const actionProperty = properties.action;
|
|
1049
|
+
if (typeof actionProperty !== "object" || actionProperty === null) {
|
|
1050
|
+
return branch;
|
|
1051
|
+
}
|
|
1052
|
+
if (actionProperty.const !== "create") {
|
|
1053
|
+
return branch;
|
|
1054
|
+
}
|
|
1055
|
+
touched = true;
|
|
1056
|
+
return {
|
|
1057
|
+
...branch,
|
|
1058
|
+
"x-create-required-options": metadata
|
|
1059
|
+
};
|
|
1060
|
+
});
|
|
1061
|
+
if (!touched) {
|
|
1062
|
+
return schema;
|
|
1063
|
+
}
|
|
1064
|
+
return {
|
|
1065
|
+
...schema,
|
|
1066
|
+
oneOf: enrichedBranches
|
|
1067
|
+
};
|
|
1068
|
+
}
|
|
1069
|
+
async function runContracts(options, global) {
|
|
1070
|
+
const selectedAction = normalizeToken(options.action);
|
|
1071
|
+
const selectedCommand = normalizeToken(options.command);
|
|
1072
|
+
const schemaOnly = options.schemaOnly === true;
|
|
1073
|
+
const flagsOnly = options.flagsOnly === true;
|
|
1074
|
+
const availabilityOnly = options.availabilityOnly === true;
|
|
1075
|
+
const runtimeOnly = options.runtimeOnly === true;
|
|
1076
|
+
const fullOutput = options.full === true;
|
|
1077
|
+
const unfilteredDefaultBriefMode = !fullOutput && !schemaOnly && !flagsOnly && !availabilityOnly && !selectedAction && !selectedCommand;
|
|
1078
|
+
const omitUnfilteredSchema = unfilteredDefaultBriefMode;
|
|
1079
|
+
const omitUnfilteredCommandFlags = unfilteredDefaultBriefMode;
|
|
1080
|
+
const omitUnfilteredCommanderAliases = unfilteredDefaultBriefMode;
|
|
1081
|
+
const projectionFlagsEnabled = [
|
|
1082
|
+
schemaOnly,
|
|
1083
|
+
flagsOnly,
|
|
1084
|
+
availabilityOnly
|
|
1085
|
+
].filter((value) => value).length;
|
|
1086
|
+
if (projectionFlagsEnabled > 1) {
|
|
1087
|
+
throw new PmCliError("Choose only one projection flag: --schema-only, --flags-only, or --availability-only.", EXIT_CODE.USAGE);
|
|
1088
|
+
}
|
|
1089
|
+
const pmRoot = resolvePmRoot(process.cwd(), global.path);
|
|
1090
|
+
let settings = structuredClone(SETTINGS_DEFAULTS);
|
|
1091
|
+
try {
|
|
1092
|
+
settings = await readSettings(pmRoot);
|
|
1093
|
+
} catch {
|
|
1094
|
+
settings = structuredClone(SETTINGS_DEFAULTS);
|
|
1095
|
+
}
|
|
1096
|
+
const runtimeProbe = await resolveRuntimeExtensionActionProbe(global);
|
|
1097
|
+
const typeRegistry = resolveItemTypeRegistry(settings, runtimeProbe.registrations ?? getActiveExtensionRegistrations());
|
|
1098
|
+
const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);
|
|
1099
|
+
const runtimeFieldRegistry = resolveRuntimeFieldRegistry(settings.schema);
|
|
1100
|
+
const runtimeFieldFlagMap = buildRuntimeFieldFlagContracts(runtimeFieldRegistry);
|
|
1101
|
+
const createRequiredOptionContracts = buildCreateRequiredOptionContracts(typeRegistry);
|
|
1102
|
+
const extensionContracts = collectExtensionCommandContracts(runtimeProbe);
|
|
1103
|
+
const mergedExtensionContracts = mergeExtensionContractsByAction(extensionContracts);
|
|
1104
|
+
const extensionFlagMap = collectExtensionFlagContractsByCommand(runtimeProbe.flagRegistrations);
|
|
1105
|
+
const includePackageOwnedActions = selectedAction !== void 0 && PACKAGE_OWNED_ACTIONS.has(selectedAction) && availabilityOnly || selectedCommand !== void 0 && PACKAGE_OWNED_COMMANDS.has(selectedCommand) && availabilityOnly;
|
|
1106
|
+
const actionDescriptors = collectActionContractDescriptors(mergedExtensionContracts, { includePackageOwnedActions });
|
|
1107
|
+
if (includePackageOwnedActions && selectedCommand !== void 0 && PACKAGE_OWNED_COMMANDS.has(selectedCommand) && !actionDescriptors.some((entry) => entry.command_path === selectedCommand)) {
|
|
1108
|
+
actionDescriptors.push({
|
|
1109
|
+
action: packageOwnedActionForCommand(selectedCommand),
|
|
1110
|
+
provider: "extension",
|
|
1111
|
+
requires_extension: true,
|
|
1112
|
+
command_path: selectedCommand
|
|
1113
|
+
});
|
|
1114
|
+
}
|
|
1115
|
+
const actionNames = new Set(actionDescriptors.map((entry) => entry.action));
|
|
1116
|
+
if (selectedAction && !actionNames.has(selectedAction)) {
|
|
1117
|
+
throw new PmCliError(`Unknown action: "${options.action}".`, EXIT_CODE.USAGE);
|
|
1118
|
+
}
|
|
1119
|
+
const commandCatalog = [
|
|
1120
|
+
.../* @__PURE__ */ new Set([
|
|
1121
|
+
...PM_CORE_COMMAND_NAMES.filter((entry) => !PACKAGE_OWNED_COMMANDS.has(entry)),
|
|
1122
|
+
...[...CORE_COMMAND_FLAG_CONTRACTS_BY_COMMAND.keys()].filter((entry) => !PACKAGE_OWNED_COMMANDS.has(entry)),
|
|
1123
|
+
...actionDescriptors.flatMap((entry) => entry.command_path ? splitCommandPathAliases(entry.command_path) : []),
|
|
1124
|
+
...mergedExtensionContracts.flatMap((entry) => entry.command.split("|"))
|
|
1125
|
+
])
|
|
1126
|
+
].map((entry) => normalizeCommandPath(entry)).filter((entry) => entry.length > 0).sort((left, right) => left.localeCompare(right));
|
|
1127
|
+
const commandNames = new Set(commandCatalog);
|
|
1128
|
+
if (selectedCommand && !commandNames.has(selectedCommand)) {
|
|
1129
|
+
const packageHint = PACKAGE_OWNED_COMMAND_INSTALL_HINTS.get(selectedCommand);
|
|
1130
|
+
if (packageHint) {
|
|
1131
|
+
throw new PmCliError(`Unknown command: "${options.command}". Command "${selectedCommand}" is provided by the optional "${packageHint}" package. Run "pm install ${packageHint} --project" and retry.`, EXIT_CODE.USAGE, {
|
|
1132
|
+
code: "unknown_command",
|
|
1133
|
+
required: `Install the optional "${packageHint}" package, or choose a command from pm contracts --flags-only --json.`,
|
|
1134
|
+
why: "Command contracts include core commands plus commands registered by active packages and extensions.",
|
|
1135
|
+
examples: [`pm install ${packageHint} --project`, `pm contracts --command ${selectedCommand} --flags-only --json`],
|
|
1136
|
+
nextSteps: [`Install the optional package first: pm install ${packageHint} --project`],
|
|
1137
|
+
recovery: {
|
|
1138
|
+
suggested_retry: `pm install ${packageHint} --project`
|
|
1139
|
+
}
|
|
1140
|
+
});
|
|
1141
|
+
}
|
|
1142
|
+
throw new PmCliError(`Unknown command: "${options.command}".`, EXIT_CODE.USAGE, {
|
|
1143
|
+
code: "unknown_command",
|
|
1144
|
+
required: "Use a command path listed by pm contracts --flags-only --json.",
|
|
1145
|
+
why: "Command contracts are generated from the active core, package, and extension command registry.",
|
|
1146
|
+
examples: ["pm contracts --flags-only --json", "pm --help"],
|
|
1147
|
+
nextSteps: ["Verify spelling and active packages/extensions, then rerun with a known command path."],
|
|
1148
|
+
recovery: {
|
|
1149
|
+
suggested_retry: "pm contracts --flags-only --json"
|
|
1150
|
+
}
|
|
1151
|
+
});
|
|
1152
|
+
}
|
|
1153
|
+
const selectedPackageOwnedAction = selectedCommand ? PACKAGE_OWNED_COMMAND_ACTIONS.get(selectedCommand) : void 0;
|
|
1154
|
+
const commandScopedDescriptors = selectedCommand ? actionDescriptors.filter((descriptor) => selectedPackageOwnedAction ? descriptor.action === selectedPackageOwnedAction : actionDescriptorMatchesSelectedCommand(descriptor, selectedCommand)) : actionDescriptors;
|
|
1155
|
+
if (selectedCommand && selectedAction && !commandScopedDescriptors.some((descriptor) => descriptor.action === selectedAction)) {
|
|
1156
|
+
throw new PmCliError(`Action "${options.action}" is not mapped to command "${options.command}" in contracts output.`, EXIT_CODE.USAGE);
|
|
1157
|
+
}
|
|
1158
|
+
const schema = PM_TOOL_PARAMETERS_SCHEMA;
|
|
1159
|
+
const schemaBranches = extractActionBranches(schema);
|
|
1160
|
+
const schemaActionSet = new Set(schemaBranches.map((entry) => {
|
|
1161
|
+
const properties = entry.properties;
|
|
1162
|
+
if (typeof properties !== "object" || properties === null) {
|
|
1163
|
+
return null;
|
|
1164
|
+
}
|
|
1165
|
+
const actionProperty = properties.action;
|
|
1166
|
+
if (typeof actionProperty !== "object" || actionProperty === null) {
|
|
1167
|
+
return null;
|
|
1168
|
+
}
|
|
1169
|
+
const actionConst = actionProperty.const;
|
|
1170
|
+
return typeof actionConst === "string" ? actionConst : null;
|
|
1171
|
+
}).filter((entry) => entry !== null));
|
|
1172
|
+
const extensionBranches = mergedExtensionContracts.filter((contract) => !schemaActionSet.has(contract.action)).map((contract) => buildExtensionActionSchemaBranch(contract));
|
|
1173
|
+
const mergedSchema = extensionBranches.length > 0 ? {
|
|
1174
|
+
...schema,
|
|
1175
|
+
oneOf: [...schemaBranches, ...extensionBranches]
|
|
1176
|
+
} : schema;
|
|
1177
|
+
const scopedActionDescriptors = selectedAction ? commandScopedDescriptors.filter((descriptor) => descriptor.action === selectedAction) : commandScopedDescriptors;
|
|
1178
|
+
const allActionAvailability = [
|
|
1179
|
+
...new Map(scopedActionDescriptors.map((descriptor) => resolveActionAvailability(descriptor, runtimeProbe)).map((entry) => [
|
|
1180
|
+
selectedPackageOwnedAction ? entry.action : `${entry.action}|${entry.command_path ?? ""}`,
|
|
1181
|
+
entry
|
|
1182
|
+
])).values()
|
|
1183
|
+
];
|
|
1184
|
+
const actionAvailability = runtimeOnly && !selectedAction && !availabilityOnly ? allActionAvailability.filter((entry) => entry.invocable) : allActionAvailability;
|
|
1185
|
+
const actions = [...new Set(actionAvailability.map((entry) => entry.action))];
|
|
1186
|
+
const descriptorActionSet = new Set(actionDescriptors.map((descriptor) => descriptor.action));
|
|
1187
|
+
let filteredSchema = selectedAction ? filterSchemaByAction(mergedSchema, selectedAction) : selectedCommand ? filterSchemaByActions(mergedSchema, new Set(scopedActionDescriptors.map((descriptor) => descriptor.action))) : filterSchemaByActions(mergedSchema, descriptorActionSet);
|
|
1188
|
+
if (runtimeOnly && !selectedAction) {
|
|
1189
|
+
filteredSchema = filterSchemaByActions(filteredSchema, new Set(actions));
|
|
1190
|
+
}
|
|
1191
|
+
const includeSchemaSurface = !flagsOnly && !availabilityOnly;
|
|
1192
|
+
if (includeSchemaSurface) {
|
|
1193
|
+
filteredSchema = attachCreateRequiredOptionContracts(filteredSchema, createRequiredOptionContracts);
|
|
1194
|
+
}
|
|
1195
|
+
const commands = selectedCommand !== void 0 ? [selectedCommand] : selectedAction ? resolveScopedCommandsFromActionDescriptors(scopedActionDescriptors, commandCatalog) : commandCatalog;
|
|
1196
|
+
const outputCommands = flagsOnly && selectedCommand === void 0 && selectedAction === void 0 ? compactCommandAliasSurface(commands) : commands;
|
|
1197
|
+
const commandAliases = buildCommandAliasSurface(commands);
|
|
1198
|
+
const extensionCommandContracts = selectedCommand ? extensionContracts.filter((entry) => entry.command === selectedCommand) : selectedAction ? extensionContracts.filter((entry) => outputCommands.includes(normalizeCommandPath(entry.command))) : extensionContracts;
|
|
1199
|
+
const includeRuntimeContractSections = !(flagsOnly && !fullOutput);
|
|
1200
|
+
const result = {
|
|
1201
|
+
schema_version: typeof mergedSchema["x-schema-version"] === "string" ? mergedSchema["x-schema-version"] : null,
|
|
1202
|
+
schema_id: typeof mergedSchema.$id === "string" ? mergedSchema.$id : null,
|
|
1203
|
+
selected: {
|
|
1204
|
+
action: selectedAction ?? null,
|
|
1205
|
+
command: selectedCommand ?? null,
|
|
1206
|
+
schema_only: schemaOnly,
|
|
1207
|
+
flags_only: flagsOnly,
|
|
1208
|
+
availability_only: availabilityOnly,
|
|
1209
|
+
runtime_only: runtimeOnly,
|
|
1210
|
+
command_scoped: selectedCommand !== void 0
|
|
1211
|
+
},
|
|
1212
|
+
commands: outputCommands
|
|
1213
|
+
};
|
|
1214
|
+
if (includeRuntimeContractSections) {
|
|
1215
|
+
result.runtime_schema = {
|
|
1216
|
+
statuses: statusRegistry.definitions.map((definition) => definition.id),
|
|
1217
|
+
open_status: statusRegistry.open_status,
|
|
1218
|
+
close_status: statusRegistry.close_status,
|
|
1219
|
+
canceled_status: statusRegistry.canceled_status,
|
|
1220
|
+
types: [...typeRegistry.types],
|
|
1221
|
+
fields_by_command: Object.fromEntries([...runtimeFieldRegistry.command_to_fields.entries()].map(([command, definitions]) => [
|
|
1222
|
+
command,
|
|
1223
|
+
[
|
|
1224
|
+
...new Set(definitions.map((definition) => `--${definition.cli_flag}`))
|
|
1225
|
+
].sort((left, right) => left.localeCompare(right))
|
|
1226
|
+
]))
|
|
1227
|
+
};
|
|
1228
|
+
result.extension_contracts = {
|
|
1229
|
+
capabilities: [...PM_EXTENSION_CAPABILITY_CONTRACTS],
|
|
1230
|
+
services: [...PM_EXTENSION_SERVICE_NAME_CONTRACTS],
|
|
1231
|
+
policy_modes: [...PM_EXTENSION_POLICY_MODE_CONTRACTS],
|
|
1232
|
+
policy_surfaces: [...PM_EXTENSION_POLICY_SURFACE_CONTRACTS],
|
|
1233
|
+
trust_modes: [...PM_EXTENSION_TRUST_MODE_CONTRACTS],
|
|
1234
|
+
sandbox_profiles: [...PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS],
|
|
1235
|
+
manifest_versions: [1, 2],
|
|
1236
|
+
compatibility: {
|
|
1237
|
+
current: "v2",
|
|
1238
|
+
previous: ["v1"],
|
|
1239
|
+
breaking_strategy: "versioned_breaking"
|
|
1240
|
+
}
|
|
1241
|
+
};
|
|
1242
|
+
}
|
|
1243
|
+
if (!flagsOnly) {
|
|
1244
|
+
result.actions = actions;
|
|
1245
|
+
result.action_availability = actionAvailability;
|
|
1246
|
+
}
|
|
1247
|
+
if (includeSchemaSurface && !omitUnfilteredSchema) {
|
|
1248
|
+
result.schema = filteredSchema;
|
|
1249
|
+
result.extension_commands = extensionCommandContracts;
|
|
1250
|
+
} else if (includeSchemaSurface && omitUnfilteredSchema) {
|
|
1251
|
+
result.schema_omitted_reason = "unfiltered_default_brief";
|
|
1252
|
+
result.extension_commands = extensionCommandContracts;
|
|
1253
|
+
}
|
|
1254
|
+
if (!schemaOnly && !availabilityOnly) {
|
|
1255
|
+
if (!omitUnfilteredCommandFlags) {
|
|
1256
|
+
result.command_flags = buildCommandFlagSurface(outputCommands, extensionFlagMap, runtimeFieldFlagMap);
|
|
1257
|
+
} else {
|
|
1258
|
+
result.command_flags_omitted_reason = "unfiltered_default_brief";
|
|
1259
|
+
}
|
|
1260
|
+
if (commandAliases.length > 0) {
|
|
1261
|
+
result.command_aliases = commandAliases;
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
if (!schemaOnly && !flagsOnly && !availabilityOnly) {
|
|
1265
|
+
if (!omitUnfilteredCommanderAliases) {
|
|
1266
|
+
result.commander_aliases = buildCommanderAliasSurface();
|
|
1267
|
+
} else {
|
|
1268
|
+
result.commander_aliases_omitted_reason = "unfiltered_default_brief";
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1271
|
+
return result;
|
|
1272
|
+
}
|
|
1273
|
+
export {
|
|
1274
|
+
runContracts
|
|
1275
|
+
};
|
|
1276
|
+
//# sourceMappingURL=contracts-QDB6OMLQ.js.map
|
|
1277
|
+
|
|
1278
|
+
//# debugId=2bf10312-dfcc-5f58-aca8-f410e10f7126
|