@unbrained/pm-cli 2026.5.30 → 2026.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +152 -0
- 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 +96 -10
- 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 +241 -27
- 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 +191 -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 +109 -116
- 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/install-sources.d.ts +2 -0
- package/dist/cli/commands/extension/install-sources.js +11 -4
- package/dist/cli/commands/extension/install-sources.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/get.js +7 -7
- package/dist/cli/commands/get.js.map +1 -1
- package/dist/cli/commands/health.js +38 -3
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/index.d.ts +2 -1
- package/dist/cli/commands/index.js +4 -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 +164 -48
- 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 +18 -0
- package/dist/cli/commands/search.js +56 -12
- package/dist/cli/commands/search.js.map +1 -1
- 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 +82 -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 +16 -12
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +217 -47
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-operations.js +34 -25
- package/dist/cli/register-operations.js.map +1 -1
- package/dist/cli/register-setup.js +8 -8
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli/registration-helpers.js +35 -5
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli/search-refresh.d.ts +2 -0
- package/dist/cli/search-refresh.js +13 -0
- package/dist/cli/search-refresh.js.map +1 -0
- package/dist/cli-bundle/chunks/activity-3RWRRNOW.js +20 -0
- package/dist/cli-bundle/chunks/activity-3RWRRNOW.js.map +1 -0
- package/dist/cli-bundle/chunks/activity-P5BUMWP3.js +16 -0
- package/dist/cli-bundle/chunks/activity-P5BUMWP3.js.map +7 -0
- package/dist/cli-bundle/chunks/aggregate-J35K7WZB.js +206 -0
- package/dist/cli-bundle/chunks/aggregate-J35K7WZB.js.map +1 -0
- package/dist/cli-bundle/chunks/aggregate-OOAGKWRG.js +209 -0
- package/dist/cli-bundle/chunks/aggregate-OOAGKWRG.js.map +7 -0
- package/dist/cli-bundle/chunks/append-5JE3YGXU.js +72 -0
- package/dist/cli-bundle/chunks/append-5JE3YGXU.js.map +7 -0
- package/dist/cli-bundle/chunks/append-PNN6UIBZ.js +69 -0
- package/dist/cli-bundle/chunks/append-PNN6UIBZ.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-26KTVXJW.js +218 -0
- package/dist/cli-bundle/chunks/chunk-26KTVXJW.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-3HUE7XOF.js +27 -0
- package/dist/cli-bundle/chunks/chunk-3HUE7XOF.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-3OH4DAEB.js +761 -0
- package/dist/cli-bundle/chunks/chunk-3OH4DAEB.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-4LTBNUYT.js +5553 -0
- package/dist/cli-bundle/chunks/chunk-4LTBNUYT.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-4PJQSECJ.js +634 -0
- package/dist/cli-bundle/chunks/chunk-4PJQSECJ.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-4QCR4QW3.js +1832 -0
- package/dist/cli-bundle/chunks/chunk-4QCR4QW3.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-5IRA6IYD.js +1891 -0
- package/dist/cli-bundle/chunks/chunk-5IRA6IYD.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-5KB4X7YY.js +412 -0
- package/dist/cli-bundle/chunks/chunk-5KB4X7YY.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-5PAOPUZX.js +182 -0
- package/dist/cli-bundle/chunks/chunk-5PAOPUZX.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-7K24QB23.js +698 -0
- package/dist/cli-bundle/chunks/chunk-7K24QB23.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-A6PEXMYN.js +380 -0
- package/dist/cli-bundle/chunks/chunk-A6PEXMYN.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-ASQM3IF5.js +230 -0
- package/dist/cli-bundle/chunks/chunk-ASQM3IF5.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-ATBVS6WW.js +185 -0
- package/dist/cli-bundle/chunks/chunk-ATBVS6WW.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-AXXKLVTW.js +332 -0
- package/dist/cli-bundle/chunks/chunk-AXXKLVTW.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-B3N4TKNL.js +1681 -0
- package/dist/cli-bundle/chunks/chunk-B3N4TKNL.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-PB2YU2E3.js → chunk-BNL6S7QH.js} +28 -70
- package/dist/cli-bundle/chunks/chunk-BNL6S7QH.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-CCUFLH4J.js +154 -0
- package/dist/cli-bundle/chunks/chunk-CCUFLH4J.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-CJDQB2ED.js +341 -0
- package/dist/cli-bundle/chunks/chunk-CJDQB2ED.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-CWT53EYT.js +1340 -0
- package/dist/cli-bundle/chunks/chunk-CWT53EYT.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-D3WUNETC.js +349 -0
- package/dist/cli-bundle/chunks/chunk-D3WUNETC.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-D5X7N6FI.js +1714 -0
- package/dist/cli-bundle/chunks/chunk-D5X7N6FI.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-DFIZGAI5.js +550 -0
- package/dist/cli-bundle/chunks/chunk-DFIZGAI5.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-DFUSXJDE.js +1704 -0
- package/dist/cli-bundle/chunks/chunk-DFUSXJDE.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-EAOG77HM.js +56 -0
- package/dist/cli-bundle/chunks/chunk-EAOG77HM.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-EHXPIKKP.js +2988 -0
- package/dist/cli-bundle/chunks/chunk-EHXPIKKP.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-FVXM3GKS.js +128 -0
- package/dist/cli-bundle/chunks/chunk-FVXM3GKS.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-G5BACLYH.js +454 -0
- package/dist/cli-bundle/chunks/chunk-G5BACLYH.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-GCAVRLGE.js +383 -0
- package/dist/cli-bundle/chunks/chunk-GCAVRLGE.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-GFWHHMVV.js +57 -0
- package/dist/cli-bundle/chunks/chunk-GFWHHMVV.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-GNHVV4SY.js +3860 -0
- package/dist/cli-bundle/chunks/chunk-GNHVV4SY.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-GPGAYASV.js +346 -0
- package/dist/cli-bundle/chunks/chunk-GPGAYASV.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-HPH6X4ZZ.js +1356 -0
- package/dist/cli-bundle/chunks/chunk-HPH6X4ZZ.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-HZOS2UG5.js +342 -0
- package/dist/cli-bundle/chunks/chunk-HZOS2UG5.js.map +7 -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-JB4RGL4V.js +185 -0
- package/dist/cli-bundle/chunks/chunk-JB4RGL4V.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-JQI2HE55.js +130 -0
- package/dist/cli-bundle/chunks/chunk-JQI2HE55.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-K47WAYQV.js +60 -0
- package/dist/cli-bundle/chunks/chunk-K47WAYQV.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-KA24HME7.js +79 -0
- package/dist/cli-bundle/chunks/chunk-KA24HME7.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-KBG47ZOY.js +1325 -0
- package/dist/cli-bundle/chunks/chunk-KBG47ZOY.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-KCMIYKTA.js +242 -0
- package/dist/cli-bundle/chunks/chunk-KCMIYKTA.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-KK6YPGH3.js +221 -0
- package/dist/cli-bundle/chunks/chunk-KK6YPGH3.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-LDJK7SHN.js +157 -0
- package/dist/cli-bundle/chunks/chunk-LDJK7SHN.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-MISYRLEP.js +80 -0
- package/dist/cli-bundle/chunks/chunk-MISYRLEP.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-N5YF3VFN.js +457 -0
- package/dist/cli-bundle/chunks/chunk-N5YF3VFN.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-NQP3ECKF.js +173 -0
- package/dist/cli-bundle/chunks/chunk-NQP3ECKF.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-O5IBJE6S.js +338 -0
- package/dist/cli-bundle/chunks/chunk-O5IBJE6S.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-O7IWB35H.js +18 -0
- package/dist/cli-bundle/chunks/chunk-O7IWB35H.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-OIQIXTNB.js +3040 -0
- package/dist/cli-bundle/chunks/chunk-OIQIXTNB.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-ORTLYVA4.js +751 -0
- package/dist/cli-bundle/chunks/chunk-ORTLYVA4.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-OUF3ARDX.js +1861 -0
- package/dist/cli-bundle/chunks/chunk-OUF3ARDX.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-QAJBIGRA.js +20 -0
- package/dist/cli-bundle/chunks/chunk-QAJBIGRA.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-RANZIID5.js +176 -0
- package/dist/cli-bundle/chunks/chunk-RANZIID5.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-RQAWLSUU.js +140 -0
- package/dist/cli-bundle/chunks/chunk-RQAWLSUU.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-S3CV7JGJ.js +233 -0
- package/dist/cli-bundle/chunks/chunk-S3CV7JGJ.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-SRVKTWPR.js +5705 -0
- package/dist/cli-bundle/chunks/chunk-SRVKTWPR.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-SSFMJCPF.js +76 -0
- package/dist/cli-bundle/chunks/chunk-SSFMJCPF.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-SZQCER6S.js +631 -0
- package/dist/cli-bundle/chunks/chunk-SZQCER6S.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-T2ORWB6D.js +540 -0
- package/dist/cli-bundle/chunks/chunk-T2ORWB6D.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-TBQVUNVH.js +422 -0
- package/dist/cli-bundle/chunks/chunk-TBQVUNVH.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-RJONRNXN.js → chunk-TK633IVD.js} +51 -32
- package/dist/cli-bundle/chunks/chunk-TK633IVD.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-TQ3ZK6VD.js +131 -0
- package/dist/cli-bundle/chunks/chunk-TQ3ZK6VD.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-UFCG3SWR.js +119 -0
- package/dist/cli-bundle/chunks/chunk-UFCG3SWR.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-UOVLWB47.js +1664 -0
- package/dist/cli-bundle/chunks/chunk-UOVLWB47.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-V3JQ4IPL.js +186 -0
- package/dist/cli-bundle/chunks/chunk-V3JQ4IPL.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-VGO2T3TY.js +182 -0
- package/dist/cli-bundle/chunks/chunk-VGO2T3TY.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-WIKR7KFL.js +189 -0
- package/dist/cli-bundle/chunks/chunk-WIKR7KFL.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-XG7RJYHV.js +1385 -0
- package/dist/cli-bundle/chunks/chunk-XG7RJYHV.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-XX5LRINW.js +90 -0
- package/dist/cli-bundle/chunks/chunk-XX5LRINW.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-Y2AKE2HS.js +252 -0
- package/dist/cli-bundle/chunks/chunk-Y2AKE2HS.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-ZQ4F6EC4.js +3898 -0
- package/dist/cli-bundle/chunks/chunk-ZQ4F6EC4.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-ZRVSMOMR.js +1809 -0
- package/dist/cli-bundle/chunks/chunk-ZRVSMOMR.js.map +1 -0
- package/dist/cli-bundle/chunks/claim-AZLP7YFO.js +132 -0
- package/dist/cli-bundle/chunks/claim-AZLP7YFO.js.map +7 -0
- package/dist/cli-bundle/chunks/claim-ZFA7HKU4.js +129 -0
- package/dist/cli-bundle/chunks/claim-ZFA7HKU4.js.map +1 -0
- package/dist/cli-bundle/chunks/close-65DFYAVS.js +17 -0
- package/dist/cli-bundle/chunks/close-65DFYAVS.js.map +1 -0
- package/dist/cli-bundle/chunks/close-RMHQ3KWH.js +13 -0
- package/dist/cli-bundle/chunks/close-RMHQ3KWH.js.map +7 -0
- package/dist/cli-bundle/chunks/close-many-AKPZNSGI.js +311 -0
- package/dist/cli-bundle/chunks/close-many-AKPZNSGI.js.map +1 -0
- package/dist/cli-bundle/chunks/close-many-UKZSQGM7.js +314 -0
- package/dist/cli-bundle/chunks/close-many-UKZSQGM7.js.map +7 -0
- package/dist/cli-bundle/chunks/comments-AGBNSJJH.js +103 -0
- package/dist/cli-bundle/chunks/comments-AGBNSJJH.js.map +7 -0
- package/dist/cli-bundle/chunks/comments-CJWXQI7X.js +100 -0
- package/dist/cli-bundle/chunks/comments-CJWXQI7X.js.map +1 -0
- package/dist/cli-bundle/chunks/config-5ON3ADRH.js +1688 -0
- package/dist/cli-bundle/chunks/config-5ON3ADRH.js.map +7 -0
- package/dist/cli-bundle/chunks/config-DDPYIA6J.js +1671 -0
- package/dist/cli-bundle/chunks/config-DDPYIA6J.js.map +1 -0
- package/dist/cli-bundle/chunks/context-E6U3DWVM.js +1471 -0
- package/dist/cli-bundle/chunks/context-E6U3DWVM.js.map +7 -0
- package/dist/cli-bundle/chunks/context-ZOJEN5VT.js +1461 -0
- package/dist/cli-bundle/chunks/context-ZOJEN5VT.js.map +1 -0
- package/dist/cli-bundle/chunks/contracts-CXSFM45B.js +1277 -0
- package/dist/cli-bundle/chunks/contracts-CXSFM45B.js.map +7 -0
- package/dist/cli-bundle/chunks/contracts-LCSX5R53.js +1274 -0
- package/dist/cli-bundle/chunks/contracts-LCSX5R53.js.map +1 -0
- package/dist/cli-bundle/chunks/create-ATONSAZW.js +27 -0
- package/dist/cli-bundle/chunks/create-ATONSAZW.js.map +7 -0
- package/dist/cli-bundle/chunks/create-WYFKN2U4.js +31 -0
- package/dist/cli-bundle/chunks/create-WYFKN2U4.js.map +1 -0
- package/dist/cli-bundle/chunks/delete-RONNH4F4.js +58 -0
- package/dist/cli-bundle/chunks/delete-RONNH4F4.js.map +7 -0
- package/dist/cli-bundle/chunks/delete-ZXWC56WO.js +55 -0
- package/dist/cli-bundle/chunks/delete-ZXWC56WO.js.map +1 -0
- package/dist/cli-bundle/chunks/deps-EHXIFOZR.js +225 -0
- package/dist/cli-bundle/chunks/deps-EHXIFOZR.js.map +1 -0
- package/dist/cli-bundle/chunks/deps-WII3O4HB.js +228 -0
- package/dist/cli-bundle/chunks/deps-WII3O4HB.js.map +7 -0
- package/dist/cli-bundle/chunks/docs-JMVCFNHH.js +34 -0
- package/dist/cli-bundle/chunks/docs-JMVCFNHH.js.map +7 -0
- package/dist/cli-bundle/chunks/docs-PDREIMLS.js +31 -0
- package/dist/cli-bundle/chunks/docs-PDREIMLS.js.map +1 -0
- package/dist/cli-bundle/chunks/extension-B4ROVWJD.js +28 -0
- package/dist/cli-bundle/chunks/extension-B4ROVWJD.js.map +1 -0
- package/dist/cli-bundle/chunks/extension-G6UXSM5S.js +24 -0
- package/dist/cli-bundle/chunks/extension-G6UXSM5S.js.map +7 -0
- package/dist/cli-bundle/chunks/files-2PN7UM2D.js +282 -0
- package/dist/cli-bundle/chunks/files-2PN7UM2D.js.map +1 -0
- package/dist/cli-bundle/chunks/files-MXYS5W4M.js +285 -0
- package/dist/cli-bundle/chunks/files-MXYS5W4M.js.map +7 -0
- package/dist/cli-bundle/chunks/gc-GT552UJH.js +178 -0
- package/dist/cli-bundle/chunks/gc-GT552UJH.js.map +1 -0
- package/dist/cli-bundle/chunks/gc-QNBRJG6H.js +181 -0
- package/dist/cli-bundle/chunks/gc-QNBRJG6H.js.map +7 -0
- package/dist/cli-bundle/chunks/get-CINFEUIY.js +197 -0
- package/dist/cli-bundle/chunks/get-CINFEUIY.js.map +7 -0
- package/dist/cli-bundle/chunks/get-WXMLRG7M.js +194 -0
- package/dist/cli-bundle/chunks/get-WXMLRG7M.js.map +1 -0
- package/dist/cli-bundle/chunks/health-5VPOJQ53.js +1258 -0
- package/dist/cli-bundle/chunks/health-5VPOJQ53.js.map +1 -0
- package/dist/cli-bundle/chunks/health-IT5DBPRJ.js +1261 -0
- package/dist/cli-bundle/chunks/health-IT5DBPRJ.js.map +7 -0
- package/dist/cli-bundle/chunks/history-6FC4H6HI.js +20 -0
- package/dist/cli-bundle/chunks/history-6FC4H6HI.js.map +7 -0
- package/dist/cli-bundle/chunks/history-FLZIP7PM.js +24 -0
- package/dist/cli-bundle/chunks/history-FLZIP7PM.js.map +1 -0
- package/dist/cli-bundle/chunks/history-redact-SSZBAD76.js +23 -0
- package/dist/cli-bundle/chunks/history-redact-SSZBAD76.js.map +1 -0
- package/dist/cli-bundle/chunks/history-redact-XKYEZDBL.js +19 -0
- package/dist/cli-bundle/chunks/history-redact-XKYEZDBL.js.map +7 -0
- package/dist/cli-bundle/chunks/history-repair-KC5ZOJRZ.js +196 -0
- package/dist/cli-bundle/chunks/history-repair-KC5ZOJRZ.js.map +7 -0
- package/dist/cli-bundle/chunks/history-repair-X7CO5JJZ.js +193 -0
- package/dist/cli-bundle/chunks/history-repair-X7CO5JJZ.js.map +1 -0
- package/dist/cli-bundle/chunks/init-6MRFVOLH.js +20 -0
- package/dist/cli-bundle/chunks/init-6MRFVOLH.js.map +1 -0
- package/dist/cli-bundle/chunks/init-KHX3FEEM.js +16 -0
- package/dist/cli-bundle/chunks/init-KHX3FEEM.js.map +7 -0
- package/dist/cli-bundle/chunks/learnings-A3CLB5CO.js +47 -0
- package/dist/cli-bundle/chunks/learnings-A3CLB5CO.js.map +7 -0
- package/dist/cli-bundle/chunks/learnings-DCX55BNX.js +44 -0
- package/dist/cli-bundle/chunks/learnings-DCX55BNX.js.map +1 -0
- package/dist/cli-bundle/chunks/list-53LZ2AEO.js +20 -0
- package/dist/cli-bundle/chunks/list-53LZ2AEO.js.map +7 -0
- package/dist/cli-bundle/chunks/list-DBRECOG4.js +24 -0
- package/dist/cli-bundle/chunks/list-DBRECOG4.js.map +1 -0
- package/dist/cli-bundle/chunks/notes-42LIC3UE.js +47 -0
- package/dist/cli-bundle/chunks/notes-42LIC3UE.js.map +7 -0
- package/dist/cli-bundle/chunks/notes-P5O3VMQ3.js +44 -0
- package/dist/cli-bundle/chunks/notes-P5O3VMQ3.js.map +1 -0
- package/dist/cli-bundle/chunks/plan-HDQXEUKD.js +1174 -0
- package/dist/cli-bundle/chunks/plan-HDQXEUKD.js.map +7 -0
- package/dist/cli-bundle/chunks/plan-IGTE3WOJ.js +1171 -0
- package/dist/cli-bundle/chunks/plan-IGTE3WOJ.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-list-query-EIVQ5FMR.js → register-list-query-AG3XKXWL.js} +25 -18
- package/dist/cli-bundle/chunks/register-list-query-AG3XKXWL.js.map +7 -0
- package/dist/cli-bundle/chunks/register-list-query-EMNSIUO4.js +227 -0
- package/dist/cli-bundle/chunks/register-list-query-EMNSIUO4.js.map +1 -0
- package/dist/cli-bundle/chunks/register-mutation-M3YS6XDO.js +813 -0
- package/dist/cli-bundle/chunks/register-mutation-M3YS6XDO.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-RSZNPSGI.js → register-mutation-RSMT6DPK.js} +160 -39
- package/dist/cli-bundle/chunks/register-mutation-RSMT6DPK.js.map +7 -0
- package/dist/cli-bundle/chunks/register-operations-KYUOOOOD.js +370 -0
- package/dist/cli-bundle/chunks/register-operations-KYUOOOOD.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-operations-APUSYDMR.js → register-operations-Q54JQZUN.js} +50 -32
- package/dist/cli-bundle/chunks/register-operations-Q54JQZUN.js.map +7 -0
- package/dist/cli-bundle/chunks/register-setup-DI6P7X75.js +242 -0
- package/dist/cli-bundle/chunks/register-setup-DI6P7X75.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-setup-OZOKSMPJ.js → register-setup-YJKIQRKA.js} +21 -13
- package/dist/cli-bundle/chunks/register-setup-YJKIQRKA.js.map +7 -0
- package/dist/cli-bundle/chunks/restore-2XVTBLKQ.js +21 -0
- package/dist/cli-bundle/chunks/restore-2XVTBLKQ.js.map +1 -0
- package/dist/cli-bundle/chunks/restore-JL5QIH7H.js +17 -0
- package/dist/cli-bundle/chunks/restore-JL5QIH7H.js.map +7 -0
- package/dist/cli-bundle/chunks/schema-LVXZWFGY.js +770 -0
- package/dist/cli-bundle/chunks/schema-LVXZWFGY.js.map +1 -0
- package/dist/cli-bundle/chunks/schema-V6BX65Q2.js +780 -0
- package/dist/cli-bundle/chunks/schema-V6BX65Q2.js.map +7 -0
- package/dist/cli-bundle/chunks/search-5A3BMFA7.js +1144 -0
- package/dist/cli-bundle/chunks/search-5A3BMFA7.js.map +7 -0
- package/dist/cli-bundle/chunks/search-C7NPB7G7.js +1127 -0
- package/dist/cli-bundle/chunks/search-C7NPB7G7.js.map +1 -0
- package/dist/cli-bundle/chunks/stats-FNLYVXTB.js +120 -0
- package/dist/cli-bundle/chunks/stats-FNLYVXTB.js.map +1 -0
- package/dist/cli-bundle/chunks/stats-Y2CBTZSL.js +123 -0
- package/dist/cli-bundle/chunks/stats-Y2CBTZSL.js.map +7 -0
- package/dist/cli-bundle/chunks/test-OFYONO3C.js +35 -0
- package/dist/cli-bundle/chunks/test-OFYONO3C.js.map +1 -0
- package/dist/cli-bundle/chunks/test-RJ4ZF35X.js +31 -0
- package/dist/cli-bundle/chunks/test-RJ4ZF35X.js.map +7 -0
- package/dist/cli-bundle/chunks/test-all-EEMKNTGU.js +331 -0
- package/dist/cli-bundle/chunks/test-all-EEMKNTGU.js.map +7 -0
- package/dist/cli-bundle/chunks/test-all-OJE6CIO7.js +328 -0
- package/dist/cli-bundle/chunks/test-all-OJE6CIO7.js.map +1 -0
- package/dist/cli-bundle/chunks/test-runs-IPOPFOAF.js +929 -0
- package/dist/cli-bundle/chunks/test-runs-IPOPFOAF.js.map +1 -0
- package/dist/cli-bundle/chunks/test-runs-L2M7WKH7.js +939 -0
- package/dist/cli-bundle/chunks/test-runs-L2M7WKH7.js.map +7 -0
- package/dist/cli-bundle/chunks/update-6YEHPVXH.js +25 -0
- package/dist/cli-bundle/chunks/update-6YEHPVXH.js.map +1 -0
- package/dist/cli-bundle/chunks/update-PYLVHMRD.js +21 -0
- package/dist/cli-bundle/chunks/update-PYLVHMRD.js.map +7 -0
- package/dist/cli-bundle/chunks/update-many-322CCH2L.js +608 -0
- package/dist/cli-bundle/chunks/update-many-322CCH2L.js.map +7 -0
- package/dist/cli-bundle/chunks/update-many-DYWGW57M.js +605 -0
- package/dist/cli-bundle/chunks/update-many-DYWGW57M.js.map +1 -0
- package/dist/cli-bundle/chunks/upgrade-2U727SAM.js +269 -0
- package/dist/cli-bundle/chunks/upgrade-2U727SAM.js.map +7 -0
- package/dist/cli-bundle/chunks/upgrade-3W3RVSNM.js +266 -0
- package/dist/cli-bundle/chunks/upgrade-3W3RVSNM.js.map +1 -0
- package/dist/cli-bundle/chunks/validate-GZ24NYHO.js +1120 -0
- package/dist/cli-bundle/chunks/validate-GZ24NYHO.js.map +1 -0
- package/dist/cli-bundle/chunks/validate-ZFVWPEEN.js +1123 -0
- package/dist/cli-bundle/chunks/validate-ZFVWPEEN.js.map +7 -0
- package/dist/cli-bundle/main.js +615 -121
- 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/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/item-type-definition.js +6 -2
- package/dist/core/item/item-type-definition.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.d.ts +4 -0
- package/dist/core/item/type-registry.js +12 -2
- package/dist/core/item/type-registry.js.map +1 -1
- 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/background-refresh.d.ts +53 -0
- package/dist/core/search/background-refresh.js +286 -0
- package/dist/core/search/background-refresh.js.map +1 -0
- package/dist/core/search/cache.d.ts +23 -2
- package/dist/core/search/cache.js +135 -30
- 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 +69 -15
- 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/constants.d.ts +2 -2
- package/dist/core/shared/constants.js +2 -3
- package/dist/core/shared/constants.js.map +1 -1
- 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-format-migration.js +25 -15
- package/dist/core/store/item-format-migration.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 +22 -2
- package/dist/core/store/settings-validator.js.map +1 -1
- package/dist/core/store/settings.js +40 -5
- 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 +4 -3
- package/dist/core/telemetry/observability.js.map +1 -1
- package/dist/core/telemetry/runtime.d.ts +10 -0
- package/dist/core/telemetry/runtime.js +86 -2
- package/dist/core/telemetry/runtime.js.map +1 -1
- package/dist/mcp/server.js +221 -12
- 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 +4 -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 +37 -8
- package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
- package/dist/sdk/cli-contracts.d.ts +19 -1
- package/dist/sdk/cli-contracts.js +211 -18
- 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 +26 -1
- package/dist/types.js +3 -2
- package/dist/types.js.map +1 -1
- package/docs/AGENT_GUIDE.md +21 -2
- package/docs/COMMANDS.md +85 -5
- package/docs/CONFIGURATION.md +49 -2
- package/docs/EXTENSIONS.md +118 -6
- package/docs/QUICKSTART.md +2 -0
- package/docs/RELEASING.md +3 -3
- package/docs/SDK.md +273 -1
- package/docs/TESTING.md +17 -0
- 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 +12 -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/scripts/bundle-cli.mjs +121 -17
- package/dist/cli-bundle/chunks/chunk-PB2YU2E3.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-RJONRNXN.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-SW5BMMCU.js +0 -13864
- package/dist/cli-bundle/chunks/chunk-SW5BMMCU.js.map +0 -7
- package/dist/cli-bundle/chunks/commands-XJ4TJ5UN.js +0 -24225
- package/dist/cli-bundle/chunks/commands-XJ4TJ5UN.js.map +0 -7
- package/dist/cli-bundle/chunks/register-list-query-EIVQ5FMR.js.map +0 -7
- package/dist/cli-bundle/chunks/register-mutation-RSZNPSGI.js.map +0 -7
- package/dist/cli-bundle/chunks/register-operations-APUSYDMR.js.map +0 -7
- package/dist/cli-bundle/chunks/register-setup-OZOKSMPJ.js.map +0 -7
package/dist/cli-bundle/main.js
CHANGED
|
@@ -1,48 +1,66 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
-
migrateItemFilesToFormat
|
|
4
|
-
|
|
5
|
-
} from "./chunks/chunk-PB2YU2E3.js";
|
|
3
|
+
migrateItemFilesToFormat
|
|
4
|
+
} from "./chunks/chunk-BNL6S7QH.js";
|
|
6
5
|
import {
|
|
7
6
|
applyDefaultOutputFormat,
|
|
8
7
|
clearResolvedGlobalOptions,
|
|
9
8
|
collect,
|
|
10
|
-
createLazyModule,
|
|
11
9
|
formatHookWarnings,
|
|
12
10
|
getCommandPath,
|
|
13
11
|
getGlobalOptions,
|
|
14
12
|
invalidateSearchCachesForMutation,
|
|
15
13
|
setResolvedGlobalOptions
|
|
16
|
-
} from "./chunks/chunk-
|
|
14
|
+
} from "./chunks/chunk-TK633IVD.js";
|
|
15
|
+
import {
|
|
16
|
+
PM_CORE_COMMAND_NAMES,
|
|
17
|
+
resolveSubcommandFlagContractsForCommand
|
|
18
|
+
} from "./chunks/chunk-ZQ4F6EC4.js";
|
|
19
|
+
import "./chunks/chunk-5IRA6IYD.js";
|
|
20
|
+
import {
|
|
21
|
+
printError,
|
|
22
|
+
printResult,
|
|
23
|
+
writeStdout
|
|
24
|
+
} from "./chunks/chunk-HZOS2UG5.js";
|
|
25
|
+
import {
|
|
26
|
+
levenshteinDistanceWithinLimit
|
|
27
|
+
} from "./chunks/chunk-EAOG77HM.js";
|
|
28
|
+
import "./chunks/chunk-XG7RJYHV.js";
|
|
29
|
+
import "./chunks/chunk-KA24HME7.js";
|
|
30
|
+
import "./chunks/chunk-HPH6X4ZZ.js";
|
|
31
|
+
import {
|
|
32
|
+
commandOptionFlagLabel,
|
|
33
|
+
resolveCommandOptionPolicyState,
|
|
34
|
+
resolveItemTypeRegistry,
|
|
35
|
+
resolveTypeDefinition
|
|
36
|
+
} from "./chunks/chunk-4PJQSECJ.js";
|
|
37
|
+
import {
|
|
38
|
+
nowIso
|
|
39
|
+
} from "./chunks/chunk-RANZIID5.js";
|
|
17
40
|
import {
|
|
18
41
|
BUILTIN_ITEM_TYPE_VALUES,
|
|
19
42
|
EXIT_CODE,
|
|
20
|
-
PM_CORE_COMMAND_NAMES,
|
|
21
43
|
PmCliError,
|
|
22
44
|
activateExtensions,
|
|
23
45
|
appendLineAtomic,
|
|
24
46
|
asRecordOrNull,
|
|
25
47
|
clearActiveExtensionHooks,
|
|
26
|
-
|
|
48
|
+
consumeAfterCommandAffectedItems,
|
|
49
|
+
createEmptyExtensionRegistrationRegistry,
|
|
50
|
+
discoverExtensions,
|
|
27
51
|
getActiveCommandResult,
|
|
28
52
|
getActiveExtensionRegistrations,
|
|
29
53
|
getSettingsPath,
|
|
30
54
|
loadExtensions,
|
|
31
|
-
nowIso,
|
|
32
55
|
pathExists,
|
|
33
|
-
printError,
|
|
34
|
-
printResult,
|
|
35
56
|
readFileIfExists,
|
|
36
57
|
readSettings,
|
|
37
58
|
readSettingsWithMetadata,
|
|
38
|
-
resolveCommandOptionPolicyState,
|
|
39
59
|
resolveGlobalPmRoot,
|
|
40
|
-
|
|
60
|
+
resolvePmPackageRootFromModule,
|
|
41
61
|
resolvePmRoot,
|
|
42
62
|
resolveRuntimeFieldRegistry,
|
|
43
|
-
resolveSubcommandFlagContractsForCommand,
|
|
44
63
|
resolveTelemetryErrorCategory,
|
|
45
|
-
resolveTypeDefinition,
|
|
46
64
|
runActiveCommandHandler,
|
|
47
65
|
runActiveParserOverride,
|
|
48
66
|
runActivePreflightOverride,
|
|
@@ -60,9 +78,8 @@ import {
|
|
|
60
78
|
setActiveExtensionServices,
|
|
61
79
|
toNonEmptyStringOrUndefined,
|
|
62
80
|
writeFileAtomic,
|
|
63
|
-
writeSettings
|
|
64
|
-
|
|
65
|
-
} from "./chunks/chunk-SW5BMMCU.js";
|
|
81
|
+
writeSettings
|
|
82
|
+
} from "./chunks/chunk-SRVKTWPR.js";
|
|
66
83
|
|
|
67
84
|
// dist/cli/main.js
|
|
68
85
|
import fs2 from "node:fs";
|
|
@@ -75,13 +92,13 @@ import { stdin as input, stdout as output } from "node:process";
|
|
|
75
92
|
!(function() {
|
|
76
93
|
try {
|
|
77
94
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
78
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
95
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "c965da5d-6609-5258-ba49-a57475f7f2ef");
|
|
79
96
|
} catch (e2) {
|
|
80
97
|
}
|
|
81
98
|
})();
|
|
82
99
|
var TELEMETRY_PROMPT_DISABLE_ENV = "PM_TELEMETRY_PROMPT";
|
|
83
100
|
var TELEMETRY_PROMPT_DISABLE_VALUES = /* @__PURE__ */ new Set(["0", "false", "no", "off"]);
|
|
84
|
-
var TELEMETRY_PROMPT_SKIPPED_COMMANDS = /* @__PURE__ */ new Set(["init", "completion", "completion-tags"]);
|
|
101
|
+
var TELEMETRY_PROMPT_SKIPPED_COMMANDS = /* @__PURE__ */ new Set(["init", "completion", "completion-statuses", "completion-tags", "completion-types"]);
|
|
85
102
|
function parseBooleanLike(value) {
|
|
86
103
|
if (typeof value !== "string") {
|
|
87
104
|
return false;
|
|
@@ -154,6 +171,7 @@ async function maybeRunFirstUseTelemetryPrompt(commandPath, globalOptions) {
|
|
|
154
171
|
// dist/core/telemetry/runtime.js
|
|
155
172
|
import crypto from "node:crypto";
|
|
156
173
|
import { spawn } from "node:child_process";
|
|
174
|
+
import { mkdirSync, rmSync, statSync } from "node:fs";
|
|
157
175
|
import { mkdir, readdir, rm, stat } from "node:fs/promises";
|
|
158
176
|
import os from "node:os";
|
|
159
177
|
import path from "node:path";
|
|
@@ -162,11 +180,11 @@ import path from "node:path";
|
|
|
162
180
|
!(function() {
|
|
163
181
|
try {
|
|
164
182
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
165
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
183
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "ad10a6ab-5a76-55e1-9750-1613c8210700");
|
|
166
184
|
} catch (e2) {
|
|
167
185
|
}
|
|
168
186
|
})();
|
|
169
|
-
var SETUP_ROOT_COMMANDS = /* @__PURE__ */ new Set(["init", "config", "completion", "completion-tags"]);
|
|
187
|
+
var SETUP_ROOT_COMMANDS = /* @__PURE__ */ new Set(["init", "config", "completion", "completion-statuses", "completion-tags", "completion-types"]);
|
|
170
188
|
var QUERY_ROOT_COMMANDS = /* @__PURE__ */ new Set([
|
|
171
189
|
"list",
|
|
172
190
|
"list-all",
|
|
@@ -192,6 +210,7 @@ var MUTATION_ROOT_COMMANDS = /* @__PURE__ */ new Set([
|
|
|
192
210
|
"create",
|
|
193
211
|
"update",
|
|
194
212
|
"update-many",
|
|
213
|
+
"close-many",
|
|
195
214
|
"append",
|
|
196
215
|
"close",
|
|
197
216
|
"delete",
|
|
@@ -212,8 +231,8 @@ var DIAGNOSTICS_ROOT_COMMANDS = /* @__PURE__ */ new Set(["health", "validate", "
|
|
|
212
231
|
function normalizeCommandPath(commandPath) {
|
|
213
232
|
return commandPath.trim().replaceAll(/\s+/g, " ").toLowerCase();
|
|
214
233
|
}
|
|
215
|
-
function normalizeErrorCode(
|
|
216
|
-
const normalized =
|
|
234
|
+
function normalizeErrorCode(errorCode2) {
|
|
235
|
+
const normalized = errorCode2?.trim().toLowerCase();
|
|
217
236
|
return normalized && normalized.length > 0 ? normalized : void 0;
|
|
218
237
|
}
|
|
219
238
|
function deriveTelemetryCommandTaxonomy(commandPath) {
|
|
@@ -351,7 +370,7 @@ function deriveTelemetryCommandResolution(params) {
|
|
|
351
370
|
!(function() {
|
|
352
371
|
try {
|
|
353
372
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
354
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
373
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "b2cd9110-8de0-5e79-a029-c0902f862999");
|
|
355
374
|
} catch (e2) {
|
|
356
375
|
}
|
|
357
376
|
})();
|
|
@@ -370,6 +389,8 @@ var TELEMETRY_MAX_QUEUE_ENTRY_ATTEMPTS = 15;
|
|
|
370
389
|
var TELEMETRY_RESULT_PREVIEW_MAX_BYTES = 8192;
|
|
371
390
|
var TELEMETRY_QUEUE_REWRITE_RETRY_DELAYS_MS = [25, 50, 100, 200];
|
|
372
391
|
var TELEMETRY_QUEUE_TMP_ORPHAN_MAX_AGE_MS = 60 * 60 * 1e3;
|
|
392
|
+
var TELEMETRY_FLUSH_LOCK_STALE_MS = 6e4;
|
|
393
|
+
var TELEMETRY_FLUSH_SPAWN_LOCK_STALE_MS = 6e4;
|
|
373
394
|
var OTEL_TRACES_ENDPOINT_ENV = "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT";
|
|
374
395
|
var OTEL_BASE_ENDPOINT_ENV = "OTEL_EXPORTER_OTLP_ENDPOINT";
|
|
375
396
|
var OTEL_SERVICE_NAME_ENV = "OTEL_SERVICE_NAME";
|
|
@@ -416,6 +437,12 @@ function telemetryRuntimeDirectory(globalPmRoot) {
|
|
|
416
437
|
function runtimeStatePath(globalPmRoot) {
|
|
417
438
|
return path.join(globalPmRoot, TELEMETRY_STATE_RELATIVE_PATH);
|
|
418
439
|
}
|
|
440
|
+
function flushLockPath(globalPmRoot) {
|
|
441
|
+
return path.join(globalPmRoot, "runtime", "telemetry", "flush.lock");
|
|
442
|
+
}
|
|
443
|
+
function flushSpawnLockPath(globalPmRoot) {
|
|
444
|
+
return path.join(globalPmRoot, "runtime", "telemetry", "flush.spawn.lock");
|
|
445
|
+
}
|
|
419
446
|
function telemetryFlushRunnerPath() {
|
|
420
447
|
return path.join(resolvePmPackageRootFromModule(import.meta.url, ["../../.."]), "dist", "cli", "telemetry-flush.js");
|
|
421
448
|
}
|
|
@@ -669,9 +696,9 @@ function hashCommandArgs(installationId, args) {
|
|
|
669
696
|
digest: hashWithInstallationId(installationId, args.join("\0"))
|
|
670
697
|
};
|
|
671
698
|
}
|
|
672
|
-
function hashTelemetryErrorFingerprint(installationId, command,
|
|
699
|
+
function hashTelemetryErrorFingerprint(installationId, command, errorCode2, errorMessage) {
|
|
673
700
|
const normalizedMessage = sanitizeString(errorMessage ?? "", "redacted");
|
|
674
|
-
const fingerprintSource = `${command}\0${
|
|
701
|
+
const fingerprintSource = `${command}\0${errorCode2 ?? "unknown_error"}\0${normalizedMessage}`;
|
|
675
702
|
return hashWithInstallationId(installationId, fingerprintSource);
|
|
676
703
|
}
|
|
677
704
|
function telemetryDisabledByEnvironment() {
|
|
@@ -894,8 +921,8 @@ function buildCommandStartPayload(params) {
|
|
|
894
921
|
};
|
|
895
922
|
}
|
|
896
923
|
function buildCommandFinishPayload(params) {
|
|
897
|
-
const { captureLevel, pmVersion, sourceContext, outcome, durationMs, startedAt, command, installationId, commandTaxonomy, exitCode, errorCode, errorCategory, commandResolution, resolutionStage } = params;
|
|
898
|
-
const errorFingerprint = outcome.ok === false ? hashTelemetryErrorFingerprint(installationId, command,
|
|
924
|
+
const { captureLevel, pmVersion, sourceContext, outcome, durationMs, startedAt, command, installationId, commandTaxonomy, exitCode, errorCode: errorCode2, errorCategory, commandResolution, resolutionStage } = params;
|
|
925
|
+
const errorFingerprint = outcome.ok === false ? hashTelemetryErrorFingerprint(installationId, command, errorCode2, outcome.error) : void 0;
|
|
899
926
|
if (captureLevel === "minimal") {
|
|
900
927
|
return {
|
|
901
928
|
capture_level: captureLevel,
|
|
@@ -907,7 +934,7 @@ function buildCommandFinishPayload(params) {
|
|
|
907
934
|
resolution_stage: resolutionStage,
|
|
908
935
|
ok: outcome.ok,
|
|
909
936
|
exit_code: exitCode,
|
|
910
|
-
error_code:
|
|
937
|
+
error_code: errorCode2,
|
|
911
938
|
error_category: errorCategory,
|
|
912
939
|
error: outcome.error ? sanitizeString(outcome.error, "redacted") : void 0,
|
|
913
940
|
error_fingerprint: errorFingerprint,
|
|
@@ -924,7 +951,7 @@ function buildCommandFinishPayload(params) {
|
|
|
924
951
|
resolution_stage: resolutionStage,
|
|
925
952
|
ok: outcome.ok,
|
|
926
953
|
exit_code: exitCode,
|
|
927
|
-
error_code:
|
|
954
|
+
error_code: errorCode2,
|
|
928
955
|
error_category: errorCategory,
|
|
929
956
|
error: outcome.error ? sanitizeString(outcome.error, captureLevel) : void 0,
|
|
930
957
|
error_fingerprint: errorFingerprint,
|
|
@@ -934,11 +961,11 @@ function buildCommandFinishPayload(params) {
|
|
|
934
961
|
};
|
|
935
962
|
}
|
|
936
963
|
function buildCommandErrorPayload(params) {
|
|
937
|
-
const { captureLevel, pmVersion, sourceContext, command, commandTaxonomy, commandResolution, resolutionStage, args, options, pmRootHash, cwdHash, installationId, errorCode, errorMessage, errorCategory, exitCode } = params;
|
|
964
|
+
const { captureLevel, pmVersion, sourceContext, command, commandTaxonomy, commandResolution, resolutionStage, args, options, pmRootHash, cwdHash, installationId, errorCode: errorCode2, errorMessage, errorCategory, exitCode } = params;
|
|
938
965
|
const attemptedArgHashes = hashCommandArgs(installationId, args);
|
|
939
966
|
const attemptedCommandDigest = hashWithInstallationId(installationId, command);
|
|
940
967
|
const attemptedOptionsDigest = hashTelemetryValue(installationId, options);
|
|
941
|
-
const errorFingerprint = hashTelemetryErrorFingerprint(installationId, command,
|
|
968
|
+
const errorFingerprint = hashTelemetryErrorFingerprint(installationId, command, errorCode2, errorMessage);
|
|
942
969
|
if (captureLevel === "minimal") {
|
|
943
970
|
return {
|
|
944
971
|
capture_level: captureLevel,
|
|
@@ -951,7 +978,7 @@ function buildCommandErrorPayload(params) {
|
|
|
951
978
|
attempted_command_digest: attemptedCommandDigest,
|
|
952
979
|
attempted_args_digest: attemptedArgHashes.digest,
|
|
953
980
|
attempted_options_digest: attemptedOptionsDigest,
|
|
954
|
-
error_code:
|
|
981
|
+
error_code: errorCode2,
|
|
955
982
|
error_category: errorCategory,
|
|
956
983
|
exit_code: exitCode,
|
|
957
984
|
error: sanitizeString(errorMessage, "redacted"),
|
|
@@ -973,7 +1000,7 @@ function buildCommandErrorPayload(params) {
|
|
|
973
1000
|
attempted_args_digest: attemptedArgHashes.digest,
|
|
974
1001
|
attempted_options: sanitizeValue(options, void 0, captureLevel),
|
|
975
1002
|
attempted_options_digest: attemptedOptionsDigest,
|
|
976
|
-
error_code:
|
|
1003
|
+
error_code: errorCode2,
|
|
977
1004
|
error_category: errorCategory,
|
|
978
1005
|
exit_code: exitCode,
|
|
979
1006
|
error: sanitizeString(errorMessage, captureLevel),
|
|
@@ -1279,6 +1306,67 @@ async function flushQueue(globalPmRoot, endpoint, retentionDays) {
|
|
|
1279
1306
|
});
|
|
1280
1307
|
}
|
|
1281
1308
|
}
|
|
1309
|
+
function isFreshDirectoryLock(lockPath, staleMs) {
|
|
1310
|
+
try {
|
|
1311
|
+
return Date.now() - statSync(lockPath).mtimeMs < staleMs;
|
|
1312
|
+
} catch {
|
|
1313
|
+
return false;
|
|
1314
|
+
}
|
|
1315
|
+
}
|
|
1316
|
+
function removeDirectoryLockBestEffort(lockPath) {
|
|
1317
|
+
try {
|
|
1318
|
+
rmSync(lockPath, { recursive: true, force: true });
|
|
1319
|
+
} catch {
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
function errorCode(error) {
|
|
1323
|
+
if (typeof error !== "object" || error === null || !("code" in error)) {
|
|
1324
|
+
return void 0;
|
|
1325
|
+
}
|
|
1326
|
+
const code = error.code;
|
|
1327
|
+
return typeof code === "string" ? code : void 0;
|
|
1328
|
+
}
|
|
1329
|
+
function createDirectoryLock(lockPath) {
|
|
1330
|
+
try {
|
|
1331
|
+
mkdirSync(lockPath);
|
|
1332
|
+
return true;
|
|
1333
|
+
} catch (error) {
|
|
1334
|
+
const code = errorCode(error);
|
|
1335
|
+
if (code === "EEXIST") {
|
|
1336
|
+
return false;
|
|
1337
|
+
}
|
|
1338
|
+
if (code !== "ENOENT") {
|
|
1339
|
+
return false;
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
try {
|
|
1343
|
+
mkdirSync(path.dirname(lockPath), { recursive: true });
|
|
1344
|
+
mkdirSync(lockPath);
|
|
1345
|
+
return true;
|
|
1346
|
+
} catch {
|
|
1347
|
+
return false;
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1350
|
+
function acquireTelemetryFlushSpawnGate(globalPmRoot) {
|
|
1351
|
+
if (isFreshDirectoryLock(flushLockPath(globalPmRoot), TELEMETRY_FLUSH_LOCK_STALE_MS)) {
|
|
1352
|
+
return false;
|
|
1353
|
+
}
|
|
1354
|
+
const lockPath = flushSpawnLockPath(globalPmRoot);
|
|
1355
|
+
try {
|
|
1356
|
+
if (Date.now() - statSync(lockPath).mtimeMs < TELEMETRY_FLUSH_SPAWN_LOCK_STALE_MS) {
|
|
1357
|
+
return false;
|
|
1358
|
+
}
|
|
1359
|
+
removeDirectoryLockBestEffort(lockPath);
|
|
1360
|
+
} catch (error) {
|
|
1361
|
+
if (errorCode(error) !== "ENOENT") {
|
|
1362
|
+
return false;
|
|
1363
|
+
}
|
|
1364
|
+
}
|
|
1365
|
+
return createDirectoryLock(lockPath);
|
|
1366
|
+
}
|
|
1367
|
+
function releaseTelemetryFlushSpawnGate(globalPmRoot) {
|
|
1368
|
+
removeDirectoryLockBestEffort(flushSpawnLockPath(globalPmRoot));
|
|
1369
|
+
}
|
|
1282
1370
|
function scheduleTelemetryFlush(globalPmRoot, endpoint, retentionDays) {
|
|
1283
1371
|
if (shouldFlushInline()) {
|
|
1284
1372
|
const previousFlush = _lastFlushPromise;
|
|
@@ -1289,6 +1377,10 @@ function scheduleTelemetryFlush(globalPmRoot, endpoint, retentionDays) {
|
|
|
1289
1377
|
return;
|
|
1290
1378
|
}
|
|
1291
1379
|
try {
|
|
1380
|
+
const acquiredSpawnGate = acquireTelemetryFlushSpawnGate(globalPmRoot);
|
|
1381
|
+
if (!acquiredSpawnGate) {
|
|
1382
|
+
return;
|
|
1383
|
+
}
|
|
1292
1384
|
const child = spawn(process.execPath, [telemetryFlushRunnerPath()], {
|
|
1293
1385
|
detached: true,
|
|
1294
1386
|
stdio: "ignore",
|
|
@@ -1300,6 +1392,7 @@ function scheduleTelemetryFlush(globalPmRoot, endpoint, retentionDays) {
|
|
|
1300
1392
|
});
|
|
1301
1393
|
child.unref();
|
|
1302
1394
|
} catch {
|
|
1395
|
+
releaseTelemetryFlushSpawnGate(globalPmRoot);
|
|
1303
1396
|
}
|
|
1304
1397
|
}
|
|
1305
1398
|
async function startTelemetryCommand(context) {
|
|
@@ -2252,7 +2345,7 @@ function parseLooseCommandOptions(args) {
|
|
|
2252
2345
|
!(function() {
|
|
2253
2346
|
try {
|
|
2254
2347
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
2255
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
2348
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "ed65d7db-f9b0-5c53-ba96-b13eb4d6cd35");
|
|
2256
2349
|
} catch (e2) {
|
|
2257
2350
|
}
|
|
2258
2351
|
})();
|
|
@@ -2396,6 +2489,70 @@ var HELP_BY_COMMAND_PATH = {
|
|
|
2396
2489
|
"Use --dry-run before upgrade when automation needs a deterministic plan."
|
|
2397
2490
|
]
|
|
2398
2491
|
},
|
|
2492
|
+
"package init": {
|
|
2493
|
+
why: "Generates an installable starter pm package with package metadata and a root extension entrypoint.",
|
|
2494
|
+
examples: [
|
|
2495
|
+
"pm package init ./my-package",
|
|
2496
|
+
"pm install ./my-package --project",
|
|
2497
|
+
"pm package doctor --project --detail summary"
|
|
2498
|
+
],
|
|
2499
|
+
tips: [
|
|
2500
|
+
"The generated package is local-install safe; add SDK runtime imports only after declaring dependencies and validating with package doctor.",
|
|
2501
|
+
"Use package doctor after changes to verify activation, policy, and collision diagnostics."
|
|
2502
|
+
]
|
|
2503
|
+
},
|
|
2504
|
+
"package install": {
|
|
2505
|
+
why: "Installs pm packages from local paths, npm sources, GitHub sources, bundled aliases, or wildcard/all aliases.",
|
|
2506
|
+
examples: [
|
|
2507
|
+
"pm package install ./my-package --project",
|
|
2508
|
+
"pm install npm:pm-changelog --project",
|
|
2509
|
+
"pm package install --github org/repo/packages/my-pm-package --ref main"
|
|
2510
|
+
],
|
|
2511
|
+
tips: [
|
|
2512
|
+
"Prefer the top-level pm install alias in scripts when only installation is needed.",
|
|
2513
|
+
"Run pm package manage or pm package doctor after installing external packages."
|
|
2514
|
+
]
|
|
2515
|
+
},
|
|
2516
|
+
"package catalog": {
|
|
2517
|
+
why: "Lists bundled first-party package catalog metadata and compact field projections.",
|
|
2518
|
+
examples: [
|
|
2519
|
+
"pm package catalog --project",
|
|
2520
|
+
"pm package catalog --project --fields alias,installed,install_command",
|
|
2521
|
+
"pm package list --project --fields alias,package_name,category"
|
|
2522
|
+
],
|
|
2523
|
+
tips: [
|
|
2524
|
+
"Use --fields for low-token package discovery in agent loops.",
|
|
2525
|
+
"External npm package discovery still belongs to npm search."
|
|
2526
|
+
]
|
|
2527
|
+
},
|
|
2528
|
+
"extension init": {
|
|
2529
|
+
why: "Generates an installable starter runtime extension with manifest and entrypoint files.",
|
|
2530
|
+
examples: [
|
|
2531
|
+
"pm extension init ./my-extension",
|
|
2532
|
+
"pm extension --install --project ./my-extension",
|
|
2533
|
+
"pm extension --doctor --project --detail summary"
|
|
2534
|
+
],
|
|
2535
|
+
tips: [
|
|
2536
|
+
"Use package init for new distributable package workflows; extension init is the compatibility-level runtime scaffold."
|
|
2537
|
+
]
|
|
2538
|
+
},
|
|
2539
|
+
"extension install": {
|
|
2540
|
+
why: "Installs a compatibility runtime extension from local, npm, GitHub, bundled alias, or wildcard sources.",
|
|
2541
|
+
examples: [
|
|
2542
|
+
"pm extension install ./my-extension --project",
|
|
2543
|
+
"pm extension --install --project ./my-extension",
|
|
2544
|
+
"pm extension doctor --project --detail summary"
|
|
2545
|
+
],
|
|
2546
|
+
tips: ["Prefer pm install or pm package install for new package-first automation."]
|
|
2547
|
+
},
|
|
2548
|
+
"extension catalog": {
|
|
2549
|
+
why: "Compatibility view of bundled package catalog metadata.",
|
|
2550
|
+
examples: [
|
|
2551
|
+
"pm extension catalog --project",
|
|
2552
|
+
"pm extension catalog --project --fields alias,installed,install_command"
|
|
2553
|
+
],
|
|
2554
|
+
tips: ["Prefer pm package catalog in new user-facing workflows."]
|
|
2555
|
+
},
|
|
2399
2556
|
install: {
|
|
2400
2557
|
why: "Installs a pm package into project scope by default, using local, npm, GitHub, or bundled alias sources.",
|
|
2401
2558
|
examples: [
|
|
@@ -2461,6 +2618,21 @@ var HELP_BY_COMMAND_PATH = {
|
|
|
2461
2618
|
"Checkpoints are enabled by default for apply mode and can be restored with --rollback."
|
|
2462
2619
|
]
|
|
2463
2620
|
},
|
|
2621
|
+
"close-many": {
|
|
2622
|
+
why: "Bulk-closes matched items with a shared reason routed through full pm close semantics (close validation, active-child orphan checks, blocked-edge cleanup) plus dry-run previews and rollback checkpoints \u2014 unlike update-many --status closed, which bypasses close validation.",
|
|
2623
|
+
examples: [
|
|
2624
|
+
'pm close-many --filter-sprint S-12 --reason "Sprint S-12 acceptance criteria met" --dry-run',
|
|
2625
|
+
'pm close-many --filter-tag wave:7 --reason "Superseded by redesign" --validate-close warn',
|
|
2626
|
+
'pm close-many --ids pm-a,pm-b,pm-c --reason "Closed in batch" --resolution "Verified by integration suite"',
|
|
2627
|
+
"pm close-many --rollback close-many-20260604-abc123"
|
|
2628
|
+
],
|
|
2629
|
+
tips: [
|
|
2630
|
+
"At least one filter (--filter-* or --ids) is required so close-many never matches every item.",
|
|
2631
|
+
"Already-terminal matches are skipped by default; pass --force to re-close them.",
|
|
2632
|
+
"Use --dry-run to preview matches plus per-item skip reasons and active-child orphan warnings before applying.",
|
|
2633
|
+
"Checkpoints are enabled by default for apply mode; restore with --rollback <checkpoint-id>."
|
|
2634
|
+
]
|
|
2635
|
+
},
|
|
2464
2636
|
normalize: {
|
|
2465
2637
|
why: "Scans items for low-signal lifecycle metadata drift, emits deterministic per-item plans, and optionally applies normalized metadata updates with update-style safety checks.",
|
|
2466
2638
|
examples: [
|
|
@@ -2623,7 +2795,7 @@ var HELP_BY_COMMAND_PATH = {
|
|
|
2623
2795
|
"pm get pm-a1b2 --fields id,title,status,parent,type --json"
|
|
2624
2796
|
],
|
|
2625
2797
|
tips: [
|
|
2626
|
-
"Default depth is
|
|
2798
|
+
"Default depth is standard for body plus linked artifacts without append-only logs; use brief for metadata-only checks or --full for complete history-heavy metadata.",
|
|
2627
2799
|
"Use --fields for the smallest deterministic item metadata payload when an agent only needs specific fields.",
|
|
2628
2800
|
"JSON output shape is { item, body, linked, claim_state }; body is top-level (not item.body)."
|
|
2629
2801
|
]
|
|
@@ -2888,7 +3060,7 @@ function attachRichHelpText(program2, argv = process.argv.slice(2)) {
|
|
|
2888
3060
|
!(function() {
|
|
2889
3061
|
try {
|
|
2890
3062
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
2891
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
3063
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "7f17a5b9-5783-523d-b9cd-61968ddd9ed2");
|
|
2892
3064
|
} catch (e2) {
|
|
2893
3065
|
}
|
|
2894
3066
|
})();
|
|
@@ -2904,13 +3076,17 @@ function normalizeLongOptionFlag(token) {
|
|
|
2904
3076
|
}
|
|
2905
3077
|
function extractProvidedOptionFlags(argv) {
|
|
2906
3078
|
const provided = /* @__PURE__ */ new Set();
|
|
3079
|
+
const ordered = [];
|
|
2907
3080
|
for (const token of argv) {
|
|
2908
3081
|
const normalized = normalizeLongOptionFlag(token);
|
|
2909
3082
|
if (normalized) {
|
|
3083
|
+
if (!provided.has(normalized)) {
|
|
3084
|
+
ordered.push(normalized);
|
|
3085
|
+
}
|
|
2910
3086
|
provided.add(normalized);
|
|
2911
3087
|
}
|
|
2912
3088
|
}
|
|
2913
|
-
return
|
|
3089
|
+
return ordered;
|
|
2914
3090
|
}
|
|
2915
3091
|
function quoteCommandArg(arg) {
|
|
2916
3092
|
if (/^[A-Za-z0-9._:/@=-]+$/.test(arg)) {
|
|
@@ -2926,7 +3102,7 @@ function renderPmCommand(argv) {
|
|
|
2926
3102
|
!(function() {
|
|
2927
3103
|
try {
|
|
2928
3104
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
2929
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
3105
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "883618a4-a53f-5506-ab97-d734647806e7");
|
|
2930
3106
|
} catch (e2) {
|
|
2931
3107
|
}
|
|
2932
3108
|
})();
|
|
@@ -3089,6 +3265,10 @@ function guidanceToClassification(message) {
|
|
|
3089
3265
|
function normalizeMessage(message) {
|
|
3090
3266
|
return message.replace(/\(outputHelp\)/g, "").trim();
|
|
3091
3267
|
}
|
|
3268
|
+
function isModuleResolutionErrorMessage(message) {
|
|
3269
|
+
const normalized = message.toLowerCase();
|
|
3270
|
+
return normalized.includes("cannot find module") || normalized.includes("cannot find package") || normalized.includes("err_module_not_found") || normalized.includes("module_not_found");
|
|
3271
|
+
}
|
|
3092
3272
|
function normalizeContextList(values) {
|
|
3093
3273
|
if (!Array.isArray(values)) {
|
|
3094
3274
|
return void 0;
|
|
@@ -3508,10 +3688,26 @@ function formatUnknownErrorForJson(rawMessage, exitCode) {
|
|
|
3508
3688
|
return guidanceToJsonEnvelope(guidance, exitCode);
|
|
3509
3689
|
}
|
|
3510
3690
|
function buildUnknownErrorGuidance(rawMessage) {
|
|
3691
|
+
const message = normalizeMessage(rawMessage);
|
|
3692
|
+
if (isModuleResolutionErrorMessage(message)) {
|
|
3693
|
+
return makeGuidanceMessage({
|
|
3694
|
+
code: "module_import_failed",
|
|
3695
|
+
title: "Module import failed",
|
|
3696
|
+
happened: message,
|
|
3697
|
+
required: "Ensure the active checkout is built and any package or extension entry file exists before retrying.",
|
|
3698
|
+
why: "Node could not resolve an imported module. In pm this usually means an extension/package entrypoint, build artifact, or dependency is missing from the active runtime.",
|
|
3699
|
+
examples: ["pnpm build", "pm package manage --doctor --project", "pm health --check-only --json"],
|
|
3700
|
+
nextSteps: [
|
|
3701
|
+
"Rebuild the checkout or package that provides the missing module.",
|
|
3702
|
+
"Run package doctor for installed extensions when the failure follows package installation or activation.",
|
|
3703
|
+
"Rerun the original pm command after the runtime files are present."
|
|
3704
|
+
]
|
|
3705
|
+
});
|
|
3706
|
+
}
|
|
3511
3707
|
return makeGuidanceMessage({
|
|
3512
3708
|
code: "unknown_error",
|
|
3513
3709
|
title: "Unhandled error",
|
|
3514
|
-
happened:
|
|
3710
|
+
happened: message,
|
|
3515
3711
|
required: "Inspect command input and runtime state, then retry.",
|
|
3516
3712
|
why: "Unexpected runtime failures can occur from environment or extension-level issues.",
|
|
3517
3713
|
examples: ["pm --help", "pm health --json"]
|
|
@@ -3521,6 +3717,22 @@ function classifyUnknownError(rawMessage) {
|
|
|
3521
3717
|
return guidanceToClassification(buildUnknownErrorGuidance(rawMessage));
|
|
3522
3718
|
}
|
|
3523
3719
|
|
|
3720
|
+
// dist/core/shared/lazy-module.js
|
|
3721
|
+
!(function() {
|
|
3722
|
+
try {
|
|
3723
|
+
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
3724
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "8a197e16-769b-582e-833f-997a66d98407");
|
|
3725
|
+
} catch (e2) {
|
|
3726
|
+
}
|
|
3727
|
+
})();
|
|
3728
|
+
function createLazyModule(importer) {
|
|
3729
|
+
let promise = null;
|
|
3730
|
+
return () => {
|
|
3731
|
+
promise ??= importer();
|
|
3732
|
+
return promise;
|
|
3733
|
+
};
|
|
3734
|
+
}
|
|
3735
|
+
|
|
3524
3736
|
// dist/cli/extension-command-help.js
|
|
3525
3737
|
!(function() {
|
|
3526
3738
|
try {
|
|
@@ -3897,63 +4109,11 @@ function ensureCommandPath(root, pathParts) {
|
|
|
3897
4109
|
return current;
|
|
3898
4110
|
}
|
|
3899
4111
|
|
|
3900
|
-
// dist/core/shared/levenshtein.js
|
|
3901
|
-
!(function() {
|
|
3902
|
-
try {
|
|
3903
|
-
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
3904
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "6f3e0977-8505-552c-b2ff-862f2a5d5a91");
|
|
3905
|
-
} catch (e2) {
|
|
3906
|
-
}
|
|
3907
|
-
})();
|
|
3908
|
-
function levenshteinDistanceWithinLimit(left, right, limit) {
|
|
3909
|
-
if (left === right) {
|
|
3910
|
-
return 0;
|
|
3911
|
-
}
|
|
3912
|
-
if (Math.abs(left.length - right.length) > limit) {
|
|
3913
|
-
return null;
|
|
3914
|
-
}
|
|
3915
|
-
const width = right.length + 1;
|
|
3916
|
-
const beforePrevious = new Array(width);
|
|
3917
|
-
const previous = new Array(width);
|
|
3918
|
-
const current = new Array(width);
|
|
3919
|
-
for (let column = 0; column < width; column += 1) {
|
|
3920
|
-
beforePrevious[column] = 0;
|
|
3921
|
-
previous[column] = column;
|
|
3922
|
-
}
|
|
3923
|
-
for (let row = 1; row <= left.length; row += 1) {
|
|
3924
|
-
current[0] = row;
|
|
3925
|
-
let rowMin = current[0];
|
|
3926
|
-
for (let column = 1; column <= right.length; column += 1) {
|
|
3927
|
-
const cost = left[row - 1] === right[column - 1] ? 0 : 1;
|
|
3928
|
-
const substitution = previous[column - 1] + cost;
|
|
3929
|
-
const insertion = current[column - 1] + 1;
|
|
3930
|
-
const deletion = previous[column] + 1;
|
|
3931
|
-
let candidate = Math.min(substitution, insertion, deletion);
|
|
3932
|
-
if (row > 1 && column > 1 && left[row - 1] === right[column - 2] && left[row - 2] === right[column - 1]) {
|
|
3933
|
-
candidate = Math.min(candidate, beforePrevious[column - 2] + 1);
|
|
3934
|
-
}
|
|
3935
|
-
current[column] = candidate;
|
|
3936
|
-
if (candidate < rowMin) {
|
|
3937
|
-
rowMin = candidate;
|
|
3938
|
-
}
|
|
3939
|
-
}
|
|
3940
|
-
if (rowMin > limit) {
|
|
3941
|
-
return null;
|
|
3942
|
-
}
|
|
3943
|
-
for (let column = 0; column < width; column += 1) {
|
|
3944
|
-
beforePrevious[column] = previous[column];
|
|
3945
|
-
previous[column] = current[column];
|
|
3946
|
-
}
|
|
3947
|
-
}
|
|
3948
|
-
const result = previous[right.length];
|
|
3949
|
-
return result <= limit ? result : null;
|
|
3950
|
-
}
|
|
3951
|
-
|
|
3952
4112
|
// dist/cli/bootstrap-args.js
|
|
3953
4113
|
!(function() {
|
|
3954
4114
|
try {
|
|
3955
4115
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
3956
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
4116
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "abcf109c-c846-5b61-b510-f1ad6ff4f3aa");
|
|
3957
4117
|
} catch (e2) {
|
|
3958
4118
|
}
|
|
3959
4119
|
})();
|
|
@@ -4464,7 +4624,8 @@ function normalizeBootstrapInvocation(argv) {
|
|
|
4464
4624
|
}
|
|
4465
4625
|
const aliasNormalized = rewriteCommandAlias(legacyNormalized, trace);
|
|
4466
4626
|
const commandName = parseBootstrapCommandName(aliasNormalized);
|
|
4467
|
-
const
|
|
4627
|
+
const commandPathName = parseBootstrapCommandPathName(aliasNormalized);
|
|
4628
|
+
const lookup = buildFlagLookup(commandPathName ?? commandName);
|
|
4468
4629
|
const normalizedArgv = [];
|
|
4469
4630
|
for (let index = 0; index < aliasNormalized.length; index += 1) {
|
|
4470
4631
|
const token = aliasNormalized[index];
|
|
@@ -4508,6 +4669,15 @@ function normalizeBootstrapInvocation(argv) {
|
|
|
4508
4669
|
trace
|
|
4509
4670
|
};
|
|
4510
4671
|
}
|
|
4672
|
+
function parseBootstrapCommandPathName(argv) {
|
|
4673
|
+
const stripped = stripGlobalBootstrapTokens(argv);
|
|
4674
|
+
const first = stripped[0]?.trim().toLowerCase();
|
|
4675
|
+
const second = stripped[1]?.trim().toLowerCase();
|
|
4676
|
+
if ((first === "extension" || first === "package" || first === "packages") && typeof second === "string" && second.length > 0 && !second.startsWith("-")) {
|
|
4677
|
+
return `${first} ${second}`;
|
|
4678
|
+
}
|
|
4679
|
+
return first;
|
|
4680
|
+
}
|
|
4511
4681
|
function parseBootstrapTypeValue(argv) {
|
|
4512
4682
|
for (let index = 0; index < argv.length; index += 1) {
|
|
4513
4683
|
const token = argv[index];
|
|
@@ -5371,7 +5541,7 @@ function attachCreateUpdatePolicyHelpText(rootProgram, typeRegistry, argv) {
|
|
|
5371
5541
|
!(function() {
|
|
5372
5542
|
try {
|
|
5373
5543
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
5374
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
5544
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "85d31f87-d392-5da2-9d53-1525fb938ff2");
|
|
5375
5545
|
} catch (e2) {
|
|
5376
5546
|
}
|
|
5377
5547
|
})();
|
|
@@ -5401,6 +5571,7 @@ var TELEMETRY_COMMAND_RESOLUTION_SET = /* @__PURE__ */ new Set([
|
|
|
5401
5571
|
var TELEMETRY_RESOLUTION_STAGE_SET = /* @__PURE__ */ new Set(["parse", "preflight", "execute", "unknown"]);
|
|
5402
5572
|
var TELEMETRY_ERROR_CATEGORY_SET = /* @__PURE__ */ new Set(["usage", "validation", "conflict", "runtime", "unknown"]);
|
|
5403
5573
|
var runtimeExtensionSnapshotCache = null;
|
|
5574
|
+
var runtimeExtensionDiscoverySnapshotCache = null;
|
|
5404
5575
|
var activeRuntimeExtensionCommandDescriptors = /* @__PURE__ */ new Map();
|
|
5405
5576
|
var HANDLED_ERROR_SENTRY_FLUSH_TIMEOUT_MS = 250;
|
|
5406
5577
|
var EXPECTED_HANDLED_ERROR_EXIT_CODES = /* @__PURE__ */ new Set([
|
|
@@ -5409,10 +5580,10 @@ var EXPECTED_HANDLED_ERROR_EXIT_CODES = /* @__PURE__ */ new Set([
|
|
|
5409
5580
|
EXIT_CODE.CONFLICT
|
|
5410
5581
|
]);
|
|
5411
5582
|
var TRUE_LIKE_ENV_VALUES = /* @__PURE__ */ new Set(["1", "true", "yes", "on"]);
|
|
5412
|
-
var loadSetupRegistrationModule = createLazyModule(() => import("./chunks/register-setup-
|
|
5413
|
-
var loadListQueryRegistrationModule = createLazyModule(() => import("./chunks/register-list-query-
|
|
5414
|
-
var loadMutationRegistrationModule = createLazyModule(() => import("./chunks/register-mutation-
|
|
5415
|
-
var loadOperationRegistrationModule = createLazyModule(() => import("./chunks/register-operations-
|
|
5583
|
+
var loadSetupRegistrationModule = createLazyModule(() => import("./chunks/register-setup-YJKIQRKA.js"));
|
|
5584
|
+
var loadListQueryRegistrationModule = createLazyModule(() => import("./chunks/register-list-query-AG3XKXWL.js"));
|
|
5585
|
+
var loadMutationRegistrationModule = createLazyModule(() => import("./chunks/register-mutation-RSMT6DPK.js"));
|
|
5586
|
+
var loadOperationRegistrationModule = createLazyModule(() => import("./chunks/register-operations-Q54JQZUN.js"));
|
|
5416
5587
|
function describeUnknownError(error) {
|
|
5417
5588
|
if (error instanceof PmCliError) {
|
|
5418
5589
|
return error.message;
|
|
@@ -5477,7 +5648,7 @@ function buildPmCliRecoveryContext(context, invocationArgv, rawMessage) {
|
|
|
5477
5648
|
if (!suggestedRetry) {
|
|
5478
5649
|
suggestedRetry = attemptedCommand;
|
|
5479
5650
|
}
|
|
5480
|
-
if (suggestedRetry === attemptedCommand) {
|
|
5651
|
+
if (!existingRecovery?.suggested_retry && suggestedRetry === attemptedCommand) {
|
|
5481
5652
|
suggestedRetry = void 0;
|
|
5482
5653
|
}
|
|
5483
5654
|
const recovery = {
|
|
@@ -5617,12 +5788,12 @@ function buildPostActionTelemetryOutcome() {
|
|
|
5617
5788
|
const resultExitCode = readRecordNumber(result, "exit_code", "exitCode");
|
|
5618
5789
|
const exitCode = processExitCode ?? resultExitCode ?? EXIT_CODE.SUCCESS;
|
|
5619
5790
|
const ok = exitCode === EXIT_CODE.SUCCESS;
|
|
5620
|
-
const
|
|
5621
|
-
const errorCategory = normalizeTelemetryErrorCategory2(readRecordString(result, "error_category", "errorCategory")) ?? (!ok ? resolveTelemetryErrorCategory(
|
|
5791
|
+
const errorCode2 = readRecordString(result, "error_code", "errorCode") ?? inferPostActionErrorCode(ok, exitCode);
|
|
5792
|
+
const errorCategory = normalizeTelemetryErrorCategory2(readRecordString(result, "error_category", "errorCategory")) ?? (!ok ? resolveTelemetryErrorCategory(errorCode2) : void 0);
|
|
5622
5793
|
const errorMessage = !ok ? inferPostActionFailureMessage(result) ?? `command_exit_${exitCode}` : void 0;
|
|
5623
5794
|
const commandResolution = normalizeTelemetryCommandResolution(readRecordString(result, "command_resolution", "commandResolution")) ?? deriveTelemetryCommandResolution({
|
|
5624
5795
|
ok,
|
|
5625
|
-
errorCode,
|
|
5796
|
+
errorCode: errorCode2,
|
|
5626
5797
|
errorCategory
|
|
5627
5798
|
});
|
|
5628
5799
|
const resolutionStage = normalizeTelemetryResolutionStage(readRecordString(result, "resolution_stage", "resolutionStage")) ?? "execute";
|
|
@@ -5630,7 +5801,7 @@ function buildPostActionTelemetryOutcome() {
|
|
|
5630
5801
|
ok,
|
|
5631
5802
|
error: errorMessage,
|
|
5632
5803
|
exit_code: exitCode,
|
|
5633
|
-
error_code:
|
|
5804
|
+
error_code: errorCode2,
|
|
5634
5805
|
error_category: errorCategory,
|
|
5635
5806
|
command_resolution: commandResolution,
|
|
5636
5807
|
resolution_stage: resolutionStage
|
|
@@ -5655,17 +5826,28 @@ async function runAndClearAfterCommandHooks(outcome) {
|
|
|
5655
5826
|
clearActiveExtensionHooks();
|
|
5656
5827
|
return;
|
|
5657
5828
|
}
|
|
5658
|
-
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
|
|
5664
|
-
|
|
5665
|
-
|
|
5666
|
-
|
|
5667
|
-
|
|
5668
|
-
|
|
5829
|
+
let hookWarnings = [];
|
|
5830
|
+
try {
|
|
5831
|
+
hookWarnings = await runAfterCommandHooks(runtime.hooks, {
|
|
5832
|
+
command: runtime.commandName,
|
|
5833
|
+
args: runtime.commandArgs,
|
|
5834
|
+
options: { ...runtime.commandOptions },
|
|
5835
|
+
global: { ...runtime.globalOptions },
|
|
5836
|
+
pm_root: runtime.pmRoot,
|
|
5837
|
+
ok: outcome.ok,
|
|
5838
|
+
error: outcome.error,
|
|
5839
|
+
result: getActiveCommandResult(),
|
|
5840
|
+
affected: consumeAfterCommandAffectedItems()
|
|
5841
|
+
});
|
|
5842
|
+
} catch (error) {
|
|
5843
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
5844
|
+
hookWarnings = [`afterCommand hooks failed: ${message}`];
|
|
5845
|
+
} finally {
|
|
5846
|
+
clearActiveExtensionHooks();
|
|
5847
|
+
}
|
|
5848
|
+
if (!runtime.globalOptions.json && hookWarnings.length > 0) {
|
|
5849
|
+
printError(`[pm] warning: afterCommand hook_warnings=${formatHookWarnings(hookWarnings)}`);
|
|
5850
|
+
}
|
|
5669
5851
|
if (runtime.profileEnabled && hookWarnings.length > 0) {
|
|
5670
5852
|
printError(`profile:extensions hook_warnings=${formatHookWarnings(hookWarnings)}`);
|
|
5671
5853
|
}
|
|
@@ -5864,6 +6046,18 @@ async function registerRuntimeSchemaFieldFlags(rootProgram, invocationArgv) {
|
|
|
5864
6046
|
}
|
|
5865
6047
|
}
|
|
5866
6048
|
}
|
|
6049
|
+
async function maybeAttachCreateUpdatePolicyHelpText(rootProgram, pmRoot, invocationArgv, registrations, settings) {
|
|
6050
|
+
const bootstrapCommand = parseBootstrapCommandName(invocationArgv);
|
|
6051
|
+
if (bootstrapCommand !== "create" && bootstrapCommand !== "update") {
|
|
6052
|
+
return;
|
|
6053
|
+
}
|
|
6054
|
+
try {
|
|
6055
|
+
const resolvedSettings = settings ?? await readSettings(pmRoot);
|
|
6056
|
+
const typeRegistry = resolveItemTypeRegistry(resolvedSettings, registrations);
|
|
6057
|
+
attachCreateUpdatePolicyHelpText(rootProgram, typeRegistry, invocationArgv);
|
|
6058
|
+
} catch {
|
|
6059
|
+
}
|
|
6060
|
+
}
|
|
5867
6061
|
function defaultPreflightDecision() {
|
|
5868
6062
|
return {
|
|
5869
6063
|
enforce_item_format_gate: true,
|
|
@@ -5875,6 +6069,180 @@ function defaultPreflightDecision() {
|
|
|
5875
6069
|
function buildRuntimeExtensionSnapshotCacheKey(pmRoot) {
|
|
5876
6070
|
return `pm-root:${pmRoot}`;
|
|
5877
6071
|
}
|
|
6072
|
+
function bootstrapProfileEnabled(invocationArgv) {
|
|
6073
|
+
return invocationArgv.some((token) => token === "--profile");
|
|
6074
|
+
}
|
|
6075
|
+
function buildRuntimeExtensionDiscoverySnapshotCacheKey(pmRoot) {
|
|
6076
|
+
return `pm-root:${pmRoot}`;
|
|
6077
|
+
}
|
|
6078
|
+
function collectLeadingCommandArgs(commandArgs) {
|
|
6079
|
+
const leading = [];
|
|
6080
|
+
for (const arg of commandArgs ?? []) {
|
|
6081
|
+
if (arg.startsWith("-")) {
|
|
6082
|
+
break;
|
|
6083
|
+
}
|
|
6084
|
+
const normalized = normalizeExtensionCommandPath(arg);
|
|
6085
|
+
if (normalized.length === 0) {
|
|
6086
|
+
continue;
|
|
6087
|
+
}
|
|
6088
|
+
leading.push(normalized);
|
|
6089
|
+
}
|
|
6090
|
+
return leading;
|
|
6091
|
+
}
|
|
6092
|
+
function collectActivationCommandCandidates(probe) {
|
|
6093
|
+
const commandPath = normalizeExtensionCommandPath(probe.commandPath ?? "");
|
|
6094
|
+
if (commandPath.length === 0) {
|
|
6095
|
+
return [];
|
|
6096
|
+
}
|
|
6097
|
+
const candidates = [commandPath];
|
|
6098
|
+
const parts = commandPath.split(" ").filter((part) => part.length > 0);
|
|
6099
|
+
for (const arg of collectLeadingCommandArgs(probe.commandArgs)) {
|
|
6100
|
+
parts.push(...arg.split(" ").filter((part) => part.length > 0));
|
|
6101
|
+
candidates.push(parts.join(" "));
|
|
6102
|
+
}
|
|
6103
|
+
return [...new Set(candidates)];
|
|
6104
|
+
}
|
|
6105
|
+
function activationCommandMatchesProbe(command, probe) {
|
|
6106
|
+
const normalized = normalizeExtensionCommandPath(command);
|
|
6107
|
+
if (normalized.length === 0) {
|
|
6108
|
+
return false;
|
|
6109
|
+
}
|
|
6110
|
+
const candidates = collectActivationCommandCandidates(probe);
|
|
6111
|
+
for (const candidate of candidates) {
|
|
6112
|
+
if (candidate === normalized || candidate.startsWith(`${normalized} `)) {
|
|
6113
|
+
return true;
|
|
6114
|
+
}
|
|
6115
|
+
}
|
|
6116
|
+
if (probe.allowCommandPrefixMatch === true) {
|
|
6117
|
+
return candidates.some((candidate) => normalized.startsWith(`${candidate} `));
|
|
6118
|
+
}
|
|
6119
|
+
return false;
|
|
6120
|
+
}
|
|
6121
|
+
function extensionActivationCommands(extension) {
|
|
6122
|
+
return extension.activation?.commands ?? [];
|
|
6123
|
+
}
|
|
6124
|
+
function extensionCapabilities(extension) {
|
|
6125
|
+
return new Set((extension.capabilities ?? []).map((capability) => capability.trim().toLowerCase()));
|
|
6126
|
+
}
|
|
6127
|
+
var GLOBAL_EXTENSION_ACTIVATION_CAPABILITIES = /* @__PURE__ */ new Set(["hooks", "parser", "preflight", "renderers"]);
|
|
6128
|
+
var CONSERVATIVE_EXTENSION_ACTIVATION_CAPABILITIES = /* @__PURE__ */ new Set(["commands", "schema", "services"]);
|
|
6129
|
+
var SEARCH_EXTENSION_ACTIVATION_COMMANDS = /* @__PURE__ */ new Set(["reindex", "search", "search-advanced"]);
|
|
6130
|
+
var CREATE_TEMPLATE_FLAGS = /* @__PURE__ */ new Set(["--template"]);
|
|
6131
|
+
function hasAnyCapability(capabilities, expected) {
|
|
6132
|
+
for (const capability of expected) {
|
|
6133
|
+
if (capabilities.has(capability)) {
|
|
6134
|
+
return true;
|
|
6135
|
+
}
|
|
6136
|
+
}
|
|
6137
|
+
return false;
|
|
6138
|
+
}
|
|
6139
|
+
function commandPathNeedsSearchExtensions(commandPath) {
|
|
6140
|
+
const normalized = normalizeExtensionCommandPath(commandPath ?? "");
|
|
6141
|
+
if (normalized.length === 0) {
|
|
6142
|
+
return false;
|
|
6143
|
+
}
|
|
6144
|
+
const [topLevel] = normalized.split(" ");
|
|
6145
|
+
return SEARCH_EXTENSION_ACTIVATION_COMMANDS.has(topLevel ?? normalized);
|
|
6146
|
+
}
|
|
6147
|
+
function probeUsesAnyFlag(probe, flags) {
|
|
6148
|
+
for (const arg of probe.commandArgs ?? []) {
|
|
6149
|
+
if (!arg.startsWith("--")) {
|
|
6150
|
+
continue;
|
|
6151
|
+
}
|
|
6152
|
+
const [flagName] = arg.split("=", 1);
|
|
6153
|
+
if (flags.has(flagName)) {
|
|
6154
|
+
return true;
|
|
6155
|
+
}
|
|
6156
|
+
}
|
|
6157
|
+
return false;
|
|
6158
|
+
}
|
|
6159
|
+
function commandPathNeedsTemplateExtensions(probe) {
|
|
6160
|
+
return normalizeExtensionCommandPath(probe.commandPath ?? "") === "create" && probeUsesAnyFlag(probe, CREATE_TEMPLATE_FLAGS);
|
|
6161
|
+
}
|
|
6162
|
+
function extensionProvidesTemplatesRuntime(commands) {
|
|
6163
|
+
return commands.some((command) => {
|
|
6164
|
+
const normalized = normalizeExtensionCommandPath(command);
|
|
6165
|
+
return normalized === "templates" || normalized.startsWith("templates ");
|
|
6166
|
+
});
|
|
6167
|
+
}
|
|
6168
|
+
function extensionNeedsActivationForProbe(extension, probe) {
|
|
6169
|
+
const capabilities = extensionCapabilities(extension);
|
|
6170
|
+
const commands = extensionActivationCommands(extension);
|
|
6171
|
+
if (commands.length > 0 && commands.some((command) => activationCommandMatchesProbe(command, probe))) {
|
|
6172
|
+
return true;
|
|
6173
|
+
}
|
|
6174
|
+
if (hasAnyCapability(capabilities, GLOBAL_EXTENSION_ACTIVATION_CAPABILITIES)) {
|
|
6175
|
+
return true;
|
|
6176
|
+
}
|
|
6177
|
+
if (commandPathNeedsTemplateExtensions(probe) && extensionProvidesTemplatesRuntime(commands)) {
|
|
6178
|
+
return true;
|
|
6179
|
+
}
|
|
6180
|
+
if (capabilities.has("search")) {
|
|
6181
|
+
return commandPathNeedsSearchExtensions(probe.commandPath);
|
|
6182
|
+
}
|
|
6183
|
+
if (commands.length > 0) {
|
|
6184
|
+
return false;
|
|
6185
|
+
}
|
|
6186
|
+
if (hasAnyCapability(capabilities, CONSERVATIVE_EXTENSION_ACTIVATION_CAPABILITIES)) {
|
|
6187
|
+
return true;
|
|
6188
|
+
}
|
|
6189
|
+
if (capabilities.has("importers")) {
|
|
6190
|
+
return probe.allowCommandPrefixMatch === true;
|
|
6191
|
+
}
|
|
6192
|
+
return false;
|
|
6193
|
+
}
|
|
6194
|
+
function discoveryNeedsActivationForProbe(discovery, probe) {
|
|
6195
|
+
if (discovery.effective.length === 0) {
|
|
6196
|
+
return false;
|
|
6197
|
+
}
|
|
6198
|
+
const hasCommandProbe = normalizeExtensionCommandPath(probe.commandPath ?? "").length > 0;
|
|
6199
|
+
if (!hasCommandProbe) {
|
|
6200
|
+
return discovery.effective.some((extension) => {
|
|
6201
|
+
const capabilities = extensionCapabilities(extension);
|
|
6202
|
+
return extensionActivationCommands(extension).length > 0 || hasAnyCapability(capabilities, GLOBAL_EXTENSION_ACTIVATION_CAPABILITIES) || hasAnyCapability(capabilities, CONSERVATIVE_EXTENSION_ACTIVATION_CAPABILITIES) || capabilities.has("importers") || capabilities.has("search");
|
|
6203
|
+
});
|
|
6204
|
+
}
|
|
6205
|
+
return discovery.effective.some((extension) => extensionNeedsActivationForProbe(extension, probe));
|
|
6206
|
+
}
|
|
6207
|
+
function buildBootstrapActivationProbe(invocationArgv) {
|
|
6208
|
+
const helpRequest = parseBootstrapHelpRequest(invocationArgv);
|
|
6209
|
+
if (helpRequest.requested && helpRequest.commandPathTokens.length > 0) {
|
|
6210
|
+
const [commandPath, ...commandArgs] = helpRequest.commandPathTokens;
|
|
6211
|
+
return {
|
|
6212
|
+
commandPath,
|
|
6213
|
+
commandArgs,
|
|
6214
|
+
allowCommandPrefixMatch: true
|
|
6215
|
+
};
|
|
6216
|
+
}
|
|
6217
|
+
const stripped = stripGlobalBootstrapTokens(invocationArgv);
|
|
6218
|
+
const commandIndex = stripped.findIndex((token) => token.trim().length > 0 && !token.startsWith("-"));
|
|
6219
|
+
if (commandIndex < 0) {
|
|
6220
|
+
return {};
|
|
6221
|
+
}
|
|
6222
|
+
return {
|
|
6223
|
+
commandPath: stripped[commandIndex],
|
|
6224
|
+
commandArgs: stripped.slice(commandIndex + 1),
|
|
6225
|
+
allowCommandPrefixMatch: helpRequest.requested
|
|
6226
|
+
};
|
|
6227
|
+
}
|
|
6228
|
+
function collectParsedActivationCommandArgs(command) {
|
|
6229
|
+
const commandArgs = command.args.map(String);
|
|
6230
|
+
const commandPath = normalizeExtensionCommandPath(getCommandPath(command));
|
|
6231
|
+
if (commandPath === "create") {
|
|
6232
|
+
const options = command.optsWithGlobals();
|
|
6233
|
+
if (typeof options.template === "string" && options.template.trim().length > 0) {
|
|
6234
|
+
commandArgs.push("--template");
|
|
6235
|
+
}
|
|
6236
|
+
}
|
|
6237
|
+
return commandArgs;
|
|
6238
|
+
}
|
|
6239
|
+
function emitSettingsReadWarnings(warnings) {
|
|
6240
|
+
for (const warning of warnings) {
|
|
6241
|
+
if (warning.startsWith("settings_read_")) {
|
|
6242
|
+
printError(`[pm] warning: ${warning} \u2014 settings.json could not be loaded and pm fell back to defaults; run pm health for remediation.`);
|
|
6243
|
+
}
|
|
6244
|
+
}
|
|
6245
|
+
}
|
|
5878
6246
|
function emitExtensionProfile(globalOptions, snapshot) {
|
|
5879
6247
|
if (!globalOptions.profile) {
|
|
5880
6248
|
return;
|
|
@@ -5884,6 +6252,55 @@ function emitExtensionProfile(globalOptions, snapshot) {
|
|
|
5884
6252
|
printError(`profile:extensions activation_warnings=${formatHookWarnings(snapshot.activationWarnings)}`);
|
|
5885
6253
|
}
|
|
5886
6254
|
}
|
|
6255
|
+
function emitExtensionSkippedProfile(profileEnabled, snapshot, probe) {
|
|
6256
|
+
if (!profileEnabled) {
|
|
6257
|
+
return;
|
|
6258
|
+
}
|
|
6259
|
+
const command = normalizeExtensionCommandPath(probe.commandPath ?? "") || "<none>";
|
|
6260
|
+
printError(`profile:extensions activation=skipped command=${command} effective=${snapshot.discovery.effective.length} warnings=${snapshot.discovery.warnings.length} discovery_ms=${snapshot.discoveryMs}`);
|
|
6261
|
+
}
|
|
6262
|
+
async function loadRuntimeExtensionDiscoverySnapshot(pmRoot) {
|
|
6263
|
+
const cacheKey = buildRuntimeExtensionDiscoverySnapshotCacheKey(pmRoot);
|
|
6264
|
+
if (runtimeExtensionDiscoverySnapshotCache?.key === cacheKey) {
|
|
6265
|
+
return runtimeExtensionDiscoverySnapshotCache.snapshot;
|
|
6266
|
+
}
|
|
6267
|
+
const settingsPath = getSettingsPath(pmRoot);
|
|
6268
|
+
if (!await pathExists(settingsPath)) {
|
|
6269
|
+
runtimeExtensionDiscoverySnapshotCache = {
|
|
6270
|
+
key: cacheKey,
|
|
6271
|
+
snapshot: null
|
|
6272
|
+
};
|
|
6273
|
+
return null;
|
|
6274
|
+
}
|
|
6275
|
+
try {
|
|
6276
|
+
const startedAt = Date.now();
|
|
6277
|
+
const { settings, warnings: settingsReadWarnings } = await readSettingsWithMetadata(pmRoot);
|
|
6278
|
+
const discovery = await discoverExtensions({
|
|
6279
|
+
pmRoot,
|
|
6280
|
+
settings,
|
|
6281
|
+
cwd: process.cwd(),
|
|
6282
|
+
noExtensions: false
|
|
6283
|
+
});
|
|
6284
|
+
const snapshot = {
|
|
6285
|
+
pmRoot,
|
|
6286
|
+
settings,
|
|
6287
|
+
discovery,
|
|
6288
|
+
discoveryMs: Date.now() - startedAt,
|
|
6289
|
+
settingsReadWarnings: [...settingsReadWarnings]
|
|
6290
|
+
};
|
|
6291
|
+
runtimeExtensionDiscoverySnapshotCache = {
|
|
6292
|
+
key: cacheKey,
|
|
6293
|
+
snapshot
|
|
6294
|
+
};
|
|
6295
|
+
return snapshot;
|
|
6296
|
+
} catch {
|
|
6297
|
+
runtimeExtensionDiscoverySnapshotCache = {
|
|
6298
|
+
key: cacheKey,
|
|
6299
|
+
snapshot: null
|
|
6300
|
+
};
|
|
6301
|
+
return null;
|
|
6302
|
+
}
|
|
6303
|
+
}
|
|
5887
6304
|
async function loadRuntimeExtensionSnapshot(pmRoot) {
|
|
5888
6305
|
const cacheKey = buildRuntimeExtensionSnapshotCacheKey(pmRoot);
|
|
5889
6306
|
if (runtimeExtensionSnapshotCache?.key === cacheKey) {
|
|
@@ -5947,9 +6364,26 @@ async function loadRuntimeExtensionSnapshot(pmRoot) {
|
|
|
5947
6364
|
async function maybeLoadRuntimeExtensions(command) {
|
|
5948
6365
|
const globalOptions = getGlobalOptions(command);
|
|
5949
6366
|
if (globalOptions.noExtensions) {
|
|
6367
|
+
const noExtPmRoot = resolvePmRoot(process.cwd(), globalOptions.path);
|
|
6368
|
+
if (await pathExists(getSettingsPath(noExtPmRoot))) {
|
|
6369
|
+
emitSettingsReadWarnings((await readSettingsWithMetadata(noExtPmRoot)).warnings);
|
|
6370
|
+
}
|
|
5950
6371
|
return null;
|
|
5951
6372
|
}
|
|
5952
6373
|
const pmRoot = resolvePmRoot(process.cwd(), globalOptions.path);
|
|
6374
|
+
const discoverySnapshot = await loadRuntimeExtensionDiscoverySnapshot(pmRoot);
|
|
6375
|
+
if (!discoverySnapshot) {
|
|
6376
|
+
return null;
|
|
6377
|
+
}
|
|
6378
|
+
emitSettingsReadWarnings(discoverySnapshot.settingsReadWarnings);
|
|
6379
|
+
const probe = {
|
|
6380
|
+
commandPath: getCommandPath(command),
|
|
6381
|
+
commandArgs: collectParsedActivationCommandArgs(command)
|
|
6382
|
+
};
|
|
6383
|
+
if (!discoveryNeedsActivationForProbe(discoverySnapshot.discovery, probe)) {
|
|
6384
|
+
emitExtensionSkippedProfile(globalOptions.profile, discoverySnapshot, probe);
|
|
6385
|
+
return null;
|
|
6386
|
+
}
|
|
5953
6387
|
const snapshot = await loadRuntimeExtensionSnapshot(pmRoot);
|
|
5954
6388
|
if (!snapshot) {
|
|
5955
6389
|
return null;
|
|
@@ -6141,22 +6575,37 @@ function wrapProgramActionsForExtensionHandlers(rootProgram) {
|
|
|
6141
6575
|
}
|
|
6142
6576
|
async function registerDynamicExtensionCommandPaths(rootProgram, invocationArgv) {
|
|
6143
6577
|
const bootstrapGlobalOptions = parseBootstrapGlobalOptions(invocationArgv);
|
|
6578
|
+
const pmRoot = resolvePmRoot(process.cwd(), bootstrapGlobalOptions.path);
|
|
6144
6579
|
if (bootstrapGlobalOptions.noExtensions) {
|
|
6145
6580
|
activeRuntimeExtensionCommandDescriptors = /* @__PURE__ */ new Map();
|
|
6146
6581
|
setActiveExtensionServices({ overrides: [] });
|
|
6582
|
+
await maybeAttachCreateUpdatePolicyHelpText(rootProgram, pmRoot, invocationArgv, createEmptyExtensionRegistrationRegistry());
|
|
6583
|
+
return;
|
|
6584
|
+
}
|
|
6585
|
+
const discoverySnapshot = await loadRuntimeExtensionDiscoverySnapshot(pmRoot);
|
|
6586
|
+
const probe = buildBootstrapActivationProbe(invocationArgv);
|
|
6587
|
+
if (!discoverySnapshot) {
|
|
6588
|
+
activeRuntimeExtensionCommandDescriptors = /* @__PURE__ */ new Map();
|
|
6589
|
+
setActiveExtensionServices({ overrides: [] });
|
|
6590
|
+
return;
|
|
6591
|
+
}
|
|
6592
|
+
if (!discoveryNeedsActivationForProbe(discoverySnapshot.discovery, probe)) {
|
|
6593
|
+
activeRuntimeExtensionCommandDescriptors = /* @__PURE__ */ new Map();
|
|
6594
|
+
setActiveExtensionServices({ overrides: [] });
|
|
6595
|
+
await maybeAttachCreateUpdatePolicyHelpText(rootProgram, pmRoot, invocationArgv, createEmptyExtensionRegistrationRegistry(), discoverySnapshot.settings);
|
|
6596
|
+
emitExtensionSkippedProfile(bootstrapProfileEnabled(invocationArgv), discoverySnapshot, probe);
|
|
6147
6597
|
return;
|
|
6148
6598
|
}
|
|
6149
|
-
const pmRoot = resolvePmRoot(process.cwd(), bootstrapGlobalOptions.path);
|
|
6150
6599
|
const snapshot = await loadRuntimeExtensionSnapshot(pmRoot);
|
|
6151
6600
|
if (!snapshot) {
|
|
6152
6601
|
activeRuntimeExtensionCommandDescriptors = /* @__PURE__ */ new Map();
|
|
6153
6602
|
setActiveExtensionServices({ overrides: [] });
|
|
6603
|
+
await maybeAttachCreateUpdatePolicyHelpText(rootProgram, pmRoot, invocationArgv, createEmptyExtensionRegistrationRegistry(), discoverySnapshot.settings);
|
|
6154
6604
|
return;
|
|
6155
6605
|
}
|
|
6156
6606
|
setActiveExtensionServices(snapshot.services);
|
|
6157
6607
|
activeRuntimeExtensionCommandDescriptors = new Map(snapshot.commandDescriptors);
|
|
6158
|
-
|
|
6159
|
-
attachCreateUpdatePolicyHelpText(rootProgram, typeRegistry, invocationArgv);
|
|
6608
|
+
await maybeAttachCreateUpdatePolicyHelpText(rootProgram, pmRoot, invocationArgv, snapshot.registrations, snapshot.settings);
|
|
6160
6609
|
const commandPaths = [.../* @__PURE__ */ new Set([...snapshot.commandHandlers, ...snapshot.commandDescriptors.keys()])].sort((left, right) => left.localeCompare(right));
|
|
6161
6610
|
for (const commandPath of commandPaths) {
|
|
6162
6611
|
const pathParts = commandPath.split(" ").filter((part) => part.length > 0);
|
|
@@ -6394,6 +6843,7 @@ var LIST_QUERY_COMMAND_NAMES = /* @__PURE__ */ new Set([
|
|
|
6394
6843
|
var MUTATION_COMMAND_NAMES = /* @__PURE__ */ new Set([
|
|
6395
6844
|
"append",
|
|
6396
6845
|
"close",
|
|
6846
|
+
"close-many",
|
|
6397
6847
|
"comments",
|
|
6398
6848
|
"delete",
|
|
6399
6849
|
"deps",
|
|
@@ -6424,6 +6874,14 @@ var OPERATION_COMMAND_NAMES = /* @__PURE__ */ new Set([
|
|
|
6424
6874
|
"test-runs-worker",
|
|
6425
6875
|
"validate"
|
|
6426
6876
|
]);
|
|
6877
|
+
var MUTATING_OPERATION_COMMAND_NAMES = /* @__PURE__ */ new Set([
|
|
6878
|
+
"claim",
|
|
6879
|
+
"close-task",
|
|
6880
|
+
"pause-task",
|
|
6881
|
+
"release",
|
|
6882
|
+
"start-task",
|
|
6883
|
+
"test"
|
|
6884
|
+
]);
|
|
6427
6885
|
var REGISTER_ALL_CORE_COMMAND_FAMILIES = {
|
|
6428
6886
|
setup: true,
|
|
6429
6887
|
listQuery: true,
|
|
@@ -6563,12 +7021,37 @@ function shouldRegisterRuntimeSchemaFlags(invocationArgv) {
|
|
|
6563
7021
|
}
|
|
6564
7022
|
return RUNTIME_SCHEMA_FLAG_BOOTSTRAP_COMMANDS.has(commandName);
|
|
6565
7023
|
}
|
|
7024
|
+
function enforceExplicitRetryForFlagTypos(bootstrapInvocation) {
|
|
7025
|
+
const commandName = bootstrapInvocation.commandName;
|
|
7026
|
+
if (!commandName) {
|
|
7027
|
+
return;
|
|
7028
|
+
}
|
|
7029
|
+
const typoEvent = bootstrapInvocation.trace.find((entry) => entry.reason === "flag_typo");
|
|
7030
|
+
if (!typoEvent) {
|
|
7031
|
+
return;
|
|
7032
|
+
}
|
|
7033
|
+
const normalizedTokens = Array.isArray(typoEvent.to) ? typoEvent.to : [String(typoEvent.to ?? "")].filter((entry) => entry.length > 0);
|
|
7034
|
+
const normalizedDisplay = normalizedTokens.length > 0 ? normalizedTokens.join(" ") : "the canonical flag";
|
|
7035
|
+
const mutatingCommand = MUTATION_COMMAND_NAMES.has(commandName) || MUTATING_OPERATION_COMMAND_NAMES.has(commandName);
|
|
7036
|
+
const code = mutatingCommand ? "mutating_flag_typo_requires_retry" : "flag_typo_requires_retry";
|
|
7037
|
+
const commandScope = mutatingCommand ? "mutating option" : "option";
|
|
7038
|
+
throw new PmCliError(`Refusing to auto-correct ${commandScope} ${typoEvent.from} to ${normalizedDisplay}. Retry with the canonical flag so the command is explicit.`, EXIT_CODE.USAGE, {
|
|
7039
|
+
code,
|
|
7040
|
+
examples: [renderPmCommand(bootstrapInvocation.argv)],
|
|
7041
|
+
nextSteps: ["Retry the command with the canonical flag shown in examples."],
|
|
7042
|
+
recovery: {
|
|
7043
|
+
normalized_args: [...bootstrapInvocation.argv],
|
|
7044
|
+
suggested_retry: renderPmCommand(bootstrapInvocation.argv)
|
|
7045
|
+
}
|
|
7046
|
+
});
|
|
7047
|
+
}
|
|
6566
7048
|
async function runPmCli(rawArgv = process.argv.slice(2)) {
|
|
6567
7049
|
const bootstrapInvocation = normalizeBootstrapInvocation(rawArgv);
|
|
6568
7050
|
const invocationArgv = bootstrapInvocation.argv;
|
|
6569
7051
|
const invocationProcessArgv = [process.argv[0], process.argv[1], ...invocationArgv];
|
|
6570
7052
|
const isBareInvocation = invocationArgv.length === 0;
|
|
6571
7053
|
try {
|
|
7054
|
+
enforceExplicitRetryForFlagTypos(bootstrapInvocation);
|
|
6572
7055
|
applyBootstrapPagerPolicy(invocationArgv);
|
|
6573
7056
|
const registrationSelection = resolveCoreCommandRegistrationSelection(invocationArgv);
|
|
6574
7057
|
await registerCoreCommandFamilies(program, registrationSelection);
|
|
@@ -6627,8 +7110,17 @@ async function runPmCli(rawArgv = process.argv.slice(2)) {
|
|
|
6627
7110
|
};
|
|
6628
7111
|
};
|
|
6629
7112
|
if (!bootstrapGlobal.noExtensions) {
|
|
6630
|
-
const
|
|
6631
|
-
|
|
7113
|
+
const bootstrapProbe = buildBootstrapActivationProbe(invocationArgv);
|
|
7114
|
+
const discoverySnapshot = await loadRuntimeExtensionDiscoverySnapshot(bootstrapPmRoot);
|
|
7115
|
+
if (discoverySnapshot && discoveryNeedsActivationForProbe(discoverySnapshot.discovery, bootstrapProbe)) {
|
|
7116
|
+
const bootstrapSnapshot = await loadRuntimeExtensionSnapshot(bootstrapPmRoot);
|
|
7117
|
+
setActiveExtensionServices(bootstrapSnapshot?.services ?? { overrides: [] });
|
|
7118
|
+
} else {
|
|
7119
|
+
if (discoverySnapshot) {
|
|
7120
|
+
emitExtensionSkippedProfile(bootstrapProfileEnabled(invocationArgv), discoverySnapshot, bootstrapProbe);
|
|
7121
|
+
}
|
|
7122
|
+
setActiveExtensionServices({ overrides: [] });
|
|
7123
|
+
}
|
|
6632
7124
|
}
|
|
6633
7125
|
const numericExitCode = readThrownExitCode(error);
|
|
6634
7126
|
if (error instanceof PmCliError || !isCommanderError(error) && typeof numericExitCode === "number" && Number.isFinite(numericExitCode)) {
|
|
@@ -6673,7 +7165,9 @@ async function runPmCli(rawArgv = process.argv.slice(2)) {
|
|
|
6673
7165
|
command_resolution: commandResolution2,
|
|
6674
7166
|
resolution_stage: "execute"
|
|
6675
7167
|
});
|
|
6676
|
-
|
|
7168
|
+
if (loggedHandledErrorToSentry) {
|
|
7169
|
+
sentryCaptureCliError(wrapThrownErrorForSentry(error, errorMessage));
|
|
7170
|
+
}
|
|
6677
7171
|
if (jsonErrors) {
|
|
6678
7172
|
printError(JSON.stringify(formatPmCliErrorForJson(errorMessage, exitCode, enrichedContext), null, 2));
|
|
6679
7173
|
} else {
|