@unbrained/pm-cli 2026.6.13 → 2026.6.16
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 +84 -0
- package/README.md +1 -1
- package/dist/cli/bootstrap-args.d.ts +29 -0
- package/dist/cli/bootstrap-args.js +11 -4
- package/dist/cli/bootstrap-args.js.map +1 -1
- package/dist/cli/commander-usage.d.ts +12 -0
- package/dist/cli/commander-usage.js +18 -7
- package/dist/cli/commander-usage.js.map +1 -1
- package/dist/cli/commands/activity.d.ts +19 -0
- package/dist/cli/commands/activity.js +12 -2
- package/dist/cli/commands/activity.js.map +1 -1
- package/dist/cli/commands/aggregate.d.ts +58 -0
- package/dist/cli/commands/aggregate.js +48 -15
- package/dist/cli/commands/aggregate.js.map +1 -1
- package/dist/cli/commands/annotation-command.d.ts +6 -1
- package/dist/cli/commands/annotation-command.js +72 -2
- package/dist/cli/commands/annotation-command.js.map +1 -1
- package/dist/cli/commands/append.js +4 -3
- package/dist/cli/commands/append.js.map +1 -1
- package/dist/cli/commands/close-many.d.ts +20 -0
- package/dist/cli/commands/close-many.js +14 -23
- package/dist/cli/commands/close-many.js.map +1 -1
- package/dist/cli/commands/close.js +37 -4
- package/dist/cli/commands/close.js.map +1 -1
- package/dist/cli/commands/comments-audit.js +3 -2
- package/dist/cli/commands/comments-audit.js.map +1 -1
- package/dist/cli/commands/comments.d.ts +2 -0
- package/dist/cli/commands/comments.js +49 -23
- package/dist/cli/commands/comments.js.map +1 -1
- package/dist/cli/commands/completion.js +269 -8
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/config.d.ts +51 -1
- package/dist/cli/commands/config.js +50 -12
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/context.d.ts +79 -1
- package/dist/cli/commands/context.js +151 -25
- package/dist/cli/commands/context.js.map +1 -1
- package/dist/cli/commands/contracts.d.ts +80 -1
- package/dist/cli/commands/contracts.js +54 -4
- package/dist/cli/commands/contracts.js.map +1 -1
- package/dist/cli/commands/create.d.ts +49 -0
- package/dist/cli/commands/create.js +105 -7
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/dedupe-audit.d.ts +33 -0
- package/dist/cli/commands/dedupe-audit.js +18 -14
- package/dist/cli/commands/dedupe-audit.js.map +1 -1
- package/dist/cli/commands/deps.js +7 -4
- package/dist/cli/commands/deps.js.map +1 -1
- package/dist/cli/commands/event-validation-messages.js +3 -3
- package/dist/cli/commands/event-validation-messages.js.map +1 -1
- package/dist/cli/commands/extension/bundled-catalog.d.ts +7 -0
- package/dist/cli/commands/extension/bundled-catalog.js +19 -15
- package/dist/cli/commands/extension/bundled-catalog.js.map +1 -1
- package/dist/cli/commands/extension/install-sources.d.ts +41 -1
- package/dist/cli/commands/extension/install-sources.js +26 -8
- package/dist/cli/commands/extension/install-sources.js.map +1 -1
- package/dist/cli/commands/extension/shared.d.ts +5 -0
- package/dist/cli/commands/extension/shared.js +9 -3
- package/dist/cli/commands/extension/shared.js.map +1 -1
- package/dist/cli/commands/extension.d.ts +133 -1
- package/dist/cli/commands/extension.js +127 -9
- package/dist/cli/commands/extension.js.map +1 -1
- package/dist/cli/commands/files.d.ts +30 -1
- package/dist/cli/commands/files.js +21 -2
- package/dist/cli/commands/files.js.map +1 -1
- package/dist/cli/commands/focus.d.ts +11 -0
- package/dist/cli/commands/focus.js +86 -0
- package/dist/cli/commands/focus.js.map +1 -0
- package/dist/cli/commands/get.d.ts +9 -2
- package/dist/cli/commands/get.js +34 -6
- package/dist/cli/commands/get.js.map +1 -1
- package/dist/cli/commands/guide.d.ts +5 -0
- package/dist/cli/commands/guide.js +6 -3
- package/dist/cli/commands/guide.js.map +1 -1
- package/dist/cli/commands/health.d.ts +109 -0
- package/dist/cli/commands/health.js +87 -35
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/history-compact.js +27 -36
- package/dist/cli/commands/history-compact.js.map +1 -1
- package/dist/cli/commands/history-redact.d.ts +46 -0
- package/dist/cli/commands/history-redact.js +99 -67
- package/dist/cli/commands/history-redact.js.map +1 -1
- package/dist/cli/commands/history-repair.js +34 -37
- package/dist/cli/commands/history-repair.js.map +1 -1
- package/dist/cli/commands/history.js +6 -2
- package/dist/cli/commands/history.js.map +1 -1
- package/dist/cli/commands/index.d.ts +1 -0
- package/dist/cli/commands/index.js +3 -2
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/init-agent-guidance.d.ts +54 -0
- package/dist/cli/commands/init-agent-guidance.js +31 -4
- package/dist/cli/commands/init-agent-guidance.js.map +1 -1
- package/dist/cli/commands/init.d.ts +36 -1
- package/dist/cli/commands/init.js +38 -5
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/learnings.js +4 -3
- package/dist/cli/commands/learnings.js.map +1 -1
- package/dist/cli/commands/linked-test-parsers.d.ts +5 -0
- package/dist/cli/commands/linked-test-parsers.js +5 -2
- package/dist/cli/commands/linked-test-parsers.js.map +1 -1
- package/dist/cli/commands/list-filter-shared.d.ts +8 -0
- package/dist/cli/commands/list-filter-shared.js +70 -0
- package/dist/cli/commands/list-filter-shared.js.map +1 -0
- package/dist/cli/commands/list.d.ts +116 -0
- package/dist/cli/commands/list.js +194 -6
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/cli/commands/normalize.js +16 -2
- package/dist/cli/commands/normalize.js.map +1 -1
- package/dist/cli/commands/notes.js +4 -3
- package/dist/cli/commands/notes.js.map +1 -1
- package/dist/cli/commands/plan.js +3 -2
- package/dist/cli/commands/plan.js.map +1 -1
- package/dist/cli/commands/reindex.d.ts +83 -0
- package/dist/cli/commands/reindex.js +45 -10
- package/dist/cli/commands/reindex.js.map +1 -1
- package/dist/cli/commands/restore.d.ts +40 -1
- package/dist/cli/commands/restore.js +27 -2
- package/dist/cli/commands/restore.js.map +1 -1
- package/dist/cli/commands/schema.d.ts +18 -0
- package/dist/cli/commands/schema.js +30 -3
- package/dist/cli/commands/schema.js.map +1 -1
- package/dist/cli/commands/search.d.ts +289 -1
- package/dist/cli/commands/search.js +367 -60
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/stats.d.ts +38 -0
- package/dist/cli/commands/stats.js +38 -10
- package/dist/cli/commands/stats.js.map +1 -1
- package/dist/cli/commands/telemetry.js +5 -3
- package/dist/cli/commands/telemetry.js.map +1 -1
- package/dist/cli/commands/templates.d.ts +18 -0
- package/dist/cli/commands/templates.js +9 -2
- package/dist/cli/commands/templates.js.map +1 -1
- package/dist/cli/commands/test-all.d.ts +5 -0
- package/dist/cli/commands/test-all.js +9 -3
- package/dist/cli/commands/test-all.js.map +1 -1
- package/dist/cli/commands/test.d.ts +70 -1
- package/dist/cli/commands/test.js +84 -3
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/commands/update-many.d.ts +34 -1
- package/dist/cli/commands/update-many.js +60 -31
- package/dist/cli/commands/update-many.js.map +1 -1
- package/dist/cli/commands/update.d.ts +71 -0
- package/dist/cli/commands/update.js +74 -8
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/commands/upgrade.d.ts +28 -1
- package/dist/cli/commands/upgrade.js +17 -4
- package/dist/cli/commands/upgrade.js.map +1 -1
- package/dist/cli/commands/validate.d.ts +114 -0
- package/dist/cli/commands/validate.js +153 -8
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/error-guidance.d.ts +30 -0
- package/dist/cli/error-guidance.js +41 -6
- package/dist/cli/error-guidance.js.map +1 -1
- package/dist/cli/extension-command-options.js +9 -7
- package/dist/cli/extension-command-options.js.map +1 -1
- package/dist/cli/help-content.d.ts +8 -0
- package/dist/cli/help-content.js +30 -6
- package/dist/cli/help-content.js.map +1 -1
- package/dist/cli/help-json-payload.d.ts +19 -1
- package/dist/cli/help-json-payload.js +16 -7
- package/dist/cli/help-json-payload.js.map +1 -1
- package/dist/cli/main.d.ts +223 -0
- package/dist/cli/main.js +203 -45
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/register-list-query.js +62 -5
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.d.ts +16 -0
- package/dist/cli/register-mutation.js +210 -40
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-operations.d.ts +8 -0
- package/dist/cli/register-operations.js +33 -11
- package/dist/cli/register-operations.js.map +1 -1
- package/dist/cli/register-setup.js +9 -6
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli/registration-helpers.d.ts +4 -0
- package/dist/cli/registration-helpers.js +124 -38
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli-bundle/chunks/activity-5P2KQCTH.js +18 -0
- package/dist/cli-bundle/chunks/{activity-PPO7QWJF.js → activity-MJGTX4LO.js} +13 -11
- package/dist/cli-bundle/chunks/{aggregate-XEBW22UQ.js → aggregate-MH3GROKB.js} +54 -25
- package/dist/cli-bundle/chunks/aggregate-MH3GROKB.js.map +7 -0
- package/dist/cli-bundle/chunks/{aggregate-IRHJWEKG.js → aggregate-OUGCDFNC.js} +55 -26
- package/dist/cli-bundle/chunks/aggregate-OUGCDFNC.js.map +1 -0
- package/dist/cli-bundle/chunks/{append-N2AWXKZC.js → append-2Q4BPUBW.js} +10 -10
- package/dist/cli-bundle/chunks/{append-N2AWXKZC.js.map → append-2Q4BPUBW.js.map} +2 -2
- package/dist/cli-bundle/chunks/{append-NL67JNJU.js → append-VCRUG2W6.js} +11 -11
- package/dist/cli-bundle/chunks/append-VCRUG2W6.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-GRZGHGRG.js → chunk-2IUJBMKS.js} +10 -9
- package/dist/cli-bundle/chunks/{chunk-GRZGHGRG.js.map → chunk-2IUJBMKS.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-6ZFTM65G.js → chunk-2JEGCDYT.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-3CQPVBK3.js → chunk-3WAULYOY.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-AGG32LKL.js → chunk-3XOXWOGA.js} +359 -19
- package/dist/cli-bundle/chunks/chunk-3XOXWOGA.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-XXLMJDUB.js → chunk-4KBK4BA3.js} +13 -15
- package/dist/cli-bundle/chunks/chunk-4KBK4BA3.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-UCVJP4JL.js → chunk-4VLB4JH2.js} +51 -8
- package/dist/cli-bundle/chunks/chunk-4VLB4JH2.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-BVL5KGVA.js → chunk-656HPQPO.js} +27 -12
- package/dist/cli-bundle/chunks/chunk-656HPQPO.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-LYNQ3NGI.js → chunk-667XI4UJ.js} +309 -20
- package/dist/cli-bundle/chunks/chunk-667XI4UJ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-W6KNFAMZ.js → chunk-6BV7ENQL.js} +9 -8
- package/dist/cli-bundle/chunks/chunk-6BV7ENQL.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-6EFCFPNE.js +35 -0
- package/dist/cli-bundle/chunks/chunk-6EFCFPNE.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-7SM7VA5I.js → chunk-6NQXMGYU.js} +19 -8
- package/dist/cli-bundle/chunks/chunk-6NQXMGYU.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-AAUYXSFF.js → chunk-764O7EUA.js} +223 -50
- package/dist/cli-bundle/chunks/chunk-764O7EUA.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-VYZNX4C5.js → chunk-7AGIXLNK.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-7EILPFMA.js +404 -0
- package/dist/cli-bundle/chunks/chunk-7EILPFMA.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-L6YQONLM.js → chunk-7K2MXFMX.js} +11 -13
- package/dist/cli-bundle/chunks/chunk-7K2MXFMX.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-HZOX5BYD.js → chunk-7L5VOUYP.js} +6 -17
- package/dist/cli-bundle/chunks/chunk-7L5VOUYP.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-7ZGKNHUL.js +61 -0
- package/dist/cli-bundle/chunks/chunk-7ZGKNHUL.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-TOX7YQ7X.js → chunk-A576QZDL.js} +223 -50
- package/dist/cli-bundle/chunks/chunk-A576QZDL.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-RFR2YQGO.js → chunk-AERT7KT3.js} +5 -5
- package/dist/cli-bundle/chunks/chunk-ASM4DVRW.js +58 -0
- package/dist/cli-bundle/chunks/chunk-ASM4DVRW.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-SQDKAEKG.js → chunk-B5Q7XC4K.js} +117 -37
- package/dist/cli-bundle/chunks/chunk-B5Q7XC4K.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-RHYBR6G7.js → chunk-BJWTFOZM.js} +74 -14
- package/dist/cli-bundle/chunks/chunk-BJWTFOZM.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-4ZKKZMLH.js → chunk-CBMETQ2U.js} +104 -30
- package/dist/cli-bundle/chunks/chunk-CBMETQ2U.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-XOYHMHFF.js → chunk-E6J2PEK6.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-IIOIBAQW.js → chunk-F2GC6L3N.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-3VULHQNS.js → chunk-F7WSO5UX.js} +7 -18
- package/dist/cli-bundle/chunks/chunk-F7WSO5UX.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-JCTZV7TO.js → chunk-FTAZLAR7.js} +8 -5
- package/dist/cli-bundle/chunks/{chunk-JCTZV7TO.js.map → chunk-FTAZLAR7.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-AUDDXKNX.js → chunk-FXNT5LPX.js} +77 -9
- package/dist/cli-bundle/chunks/chunk-FXNT5LPX.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-IZHCCG4S.js → chunk-G2YVUY7I.js} +14 -9
- package/dist/cli-bundle/chunks/chunk-G2YVUY7I.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-5HSAHRYA.js → chunk-G3CEIXTV.js} +68 -19
- package/dist/cli-bundle/chunks/chunk-G3CEIXTV.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-QQG4HEX7.js → chunk-GAVE4MYM.js} +37 -63
- package/dist/cli-bundle/chunks/chunk-GAVE4MYM.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-3FMQMHAG.js → chunk-GQ4JKNMV.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-3FMQMHAG.js.map → chunk-GQ4JKNMV.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-MACCNKSZ.js → chunk-GYMG7AG6.js} +36 -62
- package/dist/cli-bundle/chunks/chunk-GYMG7AG6.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-7CRFV6JR.js → chunk-H6EH6ENJ.js} +362 -22
- package/dist/cli-bundle/chunks/chunk-H6EH6ENJ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-2J2AH4V5.js → chunk-HDIDUME4.js} +45 -13
- package/dist/cli-bundle/chunks/chunk-HDIDUME4.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-2ANTZBYF.js → chunk-HPELHUTG.js} +122 -45
- package/dist/cli-bundle/chunks/chunk-HPELHUTG.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-VNC2HBL4.js → chunk-II7OGE3V.js} +20 -9
- package/dist/cli-bundle/chunks/chunk-II7OGE3V.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-CEGUH2E5.js → chunk-ILHLIA47.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-CEGUH2E5.js.map → chunk-ILHLIA47.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-4TPFXE2R.js → chunk-IMQG4VR3.js} +118 -74
- package/dist/cli-bundle/chunks/chunk-IMQG4VR3.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-MGAQ6KZG.js → chunk-IQVB3YDD.js} +82 -21
- package/dist/cli-bundle/chunks/chunk-IQVB3YDD.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-WLH7X4RN.js → chunk-KQ3LAMDO.js} +45 -13
- package/dist/cli-bundle/chunks/chunk-KQ3LAMDO.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-S2CDTRJ6.js → chunk-KTVETP66.js} +379 -271
- package/dist/cli-bundle/chunks/chunk-KTVETP66.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-36BCSMKP.js → chunk-KZYVTOG5.js} +26 -11
- package/dist/cli-bundle/chunks/chunk-KZYVTOG5.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-XWDZVCBJ.js → chunk-L6FJPOT4.js} +11 -10
- package/dist/cli-bundle/chunks/{chunk-XWDZVCBJ.js.map → chunk-L6FJPOT4.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-LFW5NQUP.js → chunk-LV5FFQ7M.js} +405 -290
- package/dist/cli-bundle/chunks/chunk-LV5FFQ7M.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-PNYAAB4S.js → chunk-LWGMDLQ6.js} +8 -3
- package/dist/cli-bundle/chunks/chunk-LWGMDLQ6.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-QU3OPNVV.js → chunk-M23HXJL3.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-LSSTKL3Y.js → chunk-MJZUZ2QE.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-LOAR5TKX.js → chunk-NCIBNERT.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-LOAR5TKX.js.map → chunk-NCIBNERT.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-6TBR5AZ2.js → chunk-NIQHNDBZ.js} +76 -8
- package/dist/cli-bundle/chunks/chunk-NIQHNDBZ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-Z647PYLD.js → chunk-O46LTCXQ.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-GFBEXDCQ.js → chunk-OCTQJP42.js} +19 -8
- package/dist/cli-bundle/chunks/{chunk-GFBEXDCQ.js.map → chunk-OCTQJP42.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HLEGAQXT.js → chunk-OLTYNVJR.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-IXVSSHGV.js → chunk-OY3P2I6B.js} +13 -8
- package/dist/cli-bundle/chunks/chunk-OY3P2I6B.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-KHGTYCJ6.js → chunk-PZD7WPUC.js} +69 -20
- package/dist/cli-bundle/chunks/chunk-PZD7WPUC.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-4FHLNNW7.js → chunk-Q5RLUCP3.js} +74 -14
- package/dist/cli-bundle/chunks/chunk-Q5RLUCP3.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-SOHXUA2Q.js → chunk-RKKIH2ZQ.js} +116 -36
- package/dist/cli-bundle/chunks/chunk-RKKIH2ZQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-O3YCJOVX.js → chunk-SPYPC5CB.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-O3YCJOVX.js.map → chunk-SPYPC5CB.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-SGMGMCIF.js → chunk-SY4GKIWT.js} +82 -21
- package/dist/cli-bundle/chunks/chunk-SY4GKIWT.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-5LMF75Q7.js → chunk-SY4PZWIZ.js} +7 -4
- package/dist/cli-bundle/chunks/{chunk-5LMF75Q7.js.map → chunk-SY4PZWIZ.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HWHONML5.js → chunk-T5VU7ROQ.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-JWXTOYBI.js → chunk-TIRZIQRP.js} +121 -44
- package/dist/cli-bundle/chunks/chunk-TIRZIQRP.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-PEH7SZD2.js → chunk-TUB3DZAZ.js} +105 -31
- package/dist/cli-bundle/chunks/chunk-TUB3DZAZ.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-UAR2VNCK.js +394 -0
- package/dist/cli-bundle/chunks/chunk-UAR2VNCK.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-NN6RKGFW.js → chunk-UBMCSJXX.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-JE5IZXDS.js → chunk-UUKORJSN.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-R4VWYWRN.js → chunk-W3HFLORZ.js} +7 -2
- package/dist/cli-bundle/chunks/chunk-W3HFLORZ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-LGOXXQUW.js → chunk-WZCQVABQ.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-X3W5ESZQ.js +32 -0
- package/dist/cli-bundle/chunks/chunk-X3W5ESZQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-M3SI2REU.js → chunk-XLNNCKTN.js} +322 -19
- package/dist/cli-bundle/chunks/chunk-XLNNCKTN.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-4JHJ7YG2.js → chunk-XNOY7TCB.js} +118 -74
- package/dist/cli-bundle/chunks/chunk-XNOY7TCB.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-DWG4FHPY.js → chunk-YGRPBFMA.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-JW7D6437.js → chunk-YXTLI4XP.js} +20 -9
- package/dist/cli-bundle/chunks/chunk-YXTLI4XP.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-TSXWFN3L.js → chunk-Z3MUNQRV.js} +52 -9
- package/dist/cli-bundle/chunks/chunk-Z3MUNQRV.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-GOO4UXBI.js → chunk-ZJRDVYZI.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-32XSW44C.js → chunk-ZONXMSVB.js} +10 -9
- package/dist/cli-bundle/chunks/chunk-ZONXMSVB.js.map +1 -0
- package/dist/cli-bundle/chunks/{claim-QJOQBH7J.js → claim-4APLUXJW.js} +10 -10
- package/dist/cli-bundle/chunks/{claim-HE6KEGJW.js → claim-NEO7AGWH.js} +10 -10
- package/dist/cli-bundle/chunks/{close-SPUFW5QR.js → close-3QABBNGU.js} +8 -8
- package/dist/cli-bundle/chunks/close-ILMZR3D7.js +13 -0
- package/dist/cli-bundle/chunks/{close-many-GKAJX54X.js → close-many-MIZLTYGL.js} +32 -20
- package/dist/cli-bundle/chunks/close-many-MIZLTYGL.js.map +1 -0
- package/dist/cli-bundle/chunks/{close-many-GL6NRUU5.js → close-many-Q7Y5AHQI.js} +31 -19
- package/dist/cli-bundle/chunks/close-many-Q7Y5AHQI.js.map +7 -0
- package/dist/cli-bundle/chunks/{comments-5FPT6L7N.js → comments-DAIQPOMU.js} +55 -31
- package/dist/cli-bundle/chunks/comments-DAIQPOMU.js.map +1 -0
- package/dist/cli-bundle/chunks/{comments-TOLOYWNI.js → comments-IWFSVM4P.js} +54 -30
- package/dist/cli-bundle/chunks/comments-IWFSVM4P.js.map +7 -0
- package/dist/cli-bundle/chunks/{config-4MN45TIH.js → config-IOJELD6O.js} +45 -19
- package/dist/cli-bundle/chunks/config-IOJELD6O.js.map +1 -0
- package/dist/cli-bundle/chunks/{config-7N6D7YJE.js → config-PXTMAYV3.js} +44 -18
- package/dist/cli-bundle/chunks/config-PXTMAYV3.js.map +7 -0
- package/dist/cli-bundle/chunks/{context-AQSLE7DZ.js → context-QHJSCJW4.js} +128 -39
- package/dist/cli-bundle/chunks/context-QHJSCJW4.js.map +1 -0
- package/dist/cli-bundle/chunks/{context-U3PUJMVN.js → context-XZS2VFKU.js} +127 -38
- package/dist/cli-bundle/chunks/context-XZS2VFKU.js.map +7 -0
- package/dist/cli-bundle/chunks/{contracts-ITSJXO3O.js → contracts-B7U4OJTV.js} +54 -10
- package/dist/cli-bundle/chunks/contracts-B7U4OJTV.js.map +1 -0
- package/dist/cli-bundle/chunks/{contracts-H7KCQXLY.js → contracts-NSBVLXQ3.js} +54 -10
- package/dist/cli-bundle/chunks/contracts-NSBVLXQ3.js.map +7 -0
- package/dist/cli-bundle/chunks/{copy-EB3MUCSW.js → copy-Q64T5FD4.js} +7 -7
- package/dist/cli-bundle/chunks/{copy-C4W522JM.js → copy-SG34LCMU.js} +7 -7
- package/dist/cli-bundle/chunks/create-F5HZX2S4.js +30 -0
- package/dist/cli-bundle/chunks/{create-4EQNELMY.js → create-IPAX2SNL.js} +16 -13
- package/dist/cli-bundle/chunks/{delete-ZLGUYIXU.js → delete-TLXR7LJ2.js} +7 -7
- package/dist/cli-bundle/chunks/{delete-X5QLXIQX.js → delete-VH3L7DZ6.js} +7 -7
- package/dist/cli-bundle/chunks/{deps-GPB3LGWN.js → deps-J3HBBLDB.js} +9 -10
- package/dist/cli-bundle/chunks/{deps-GPB3LGWN.js.map → deps-J3HBBLDB.js.map} +2 -2
- package/dist/cli-bundle/chunks/{deps-HV2C2L46.js → deps-XV6JJ6IN.js} +10 -11
- package/dist/cli-bundle/chunks/deps-XV6JJ6IN.js.map +1 -0
- package/dist/cli-bundle/chunks/{docs-SRTLCQOL.js → docs-GWDEB7JH.js} +9 -9
- package/dist/cli-bundle/chunks/{docs-RJQPLROO.js → docs-RCLNSKID.js} +9 -9
- package/dist/cli-bundle/chunks/{extension-MM3TVWOO.js → extension-5RN65LHT.js} +7 -5
- package/dist/cli-bundle/chunks/{extension-WKPVPNCC.js → extension-7KO2NX2A.js} +7 -5
- package/dist/cli-bundle/chunks/{files-OIFN3DQX.js → files-3TCQHUHA.js} +25 -11
- package/dist/cli-bundle/chunks/files-3TCQHUHA.js.map +1 -0
- package/dist/cli-bundle/chunks/{files-LIFDKNCN.js → files-5FDUPSEA.js} +24 -10
- package/dist/cli-bundle/chunks/files-5FDUPSEA.js.map +7 -0
- package/dist/cli-bundle/chunks/focus-7AQMNRSU.js +109 -0
- package/dist/cli-bundle/chunks/focus-7AQMNRSU.js.map +7 -0
- package/dist/cli-bundle/chunks/focus-HQXBYPKM.js +106 -0
- package/dist/cli-bundle/chunks/focus-HQXBYPKM.js.map +1 -0
- package/dist/cli-bundle/chunks/{gc-DL6AVOX5.js → gc-2FGKYRJ4.js} +3 -3
- package/dist/cli-bundle/chunks/{gc-NRFHLVFT.js → gc-5B6ABL3Z.js} +3 -3
- package/dist/cli-bundle/chunks/{get-SAB7CRBG.js → get-FUMVOJQD.js} +43 -16
- package/dist/cli-bundle/chunks/get-FUMVOJQD.js.map +1 -0
- package/dist/cli-bundle/chunks/{get-K7UULTQF.js → get-H5BZTW4A.js} +42 -15
- package/dist/cli-bundle/chunks/get-H5BZTW4A.js.map +7 -0
- package/dist/cli-bundle/chunks/{health-NUVZYIEV.js → health-JSVOR6B4.js} +75 -49
- package/dist/cli-bundle/chunks/health-JSVOR6B4.js.map +1 -0
- package/dist/cli-bundle/chunks/{health-VJWH3ZFK.js → health-LE2ZQGSM.js} +74 -48
- package/dist/cli-bundle/chunks/health-LE2ZQGSM.js.map +7 -0
- package/dist/cli-bundle/chunks/{history-GYFD2DJW.js → history-QO4JVJJP.js} +10 -10
- package/dist/cli-bundle/chunks/history-SSXGGTVZ.js +20 -0
- package/dist/cli-bundle/chunks/{history-compact-WQZQ6KXM.js → history-compact-ID74DOUI.js} +37 -46
- package/dist/cli-bundle/chunks/history-compact-ID74DOUI.js.map +7 -0
- package/dist/cli-bundle/chunks/{history-compact-SLL6ESXH.js → history-compact-SDFRPZ4V.js} +38 -47
- package/dist/cli-bundle/chunks/history-compact-SDFRPZ4V.js.map +1 -0
- package/dist/cli-bundle/chunks/history-redact-VBH44Y7F.js +21 -0
- package/dist/cli-bundle/chunks/{history-redact-SDTDR6WM.js → history-redact-Z4P5MM3G.js} +13 -11
- package/dist/cli-bundle/chunks/{history-repair-UCYS55ZX.js → history-repair-ANHEYWKF.js} +43 -48
- package/dist/cli-bundle/chunks/history-repair-ANHEYWKF.js.map +7 -0
- package/dist/cli-bundle/chunks/{history-repair-BJCGM6Q3.js → history-repair-CKE7GLZR.js} +44 -49
- package/dist/cli-bundle/chunks/history-repair-CKE7GLZR.js.map +1 -0
- package/dist/cli-bundle/chunks/init-7FBQO77A.js +19 -0
- package/dist/cli-bundle/chunks/{init-MXV57LKL.js → init-K6MSMB37.js} +11 -9
- package/dist/cli-bundle/chunks/{learnings-QKJOKEAO.js → learnings-VIS3NOQV.js} +13 -12
- package/dist/cli-bundle/chunks/learnings-VIS3NOQV.js.map +7 -0
- package/dist/cli-bundle/chunks/{learnings-L6KTZGOT.js → learnings-YYNB64GN.js} +14 -13
- package/dist/cli-bundle/chunks/learnings-YYNB64GN.js.map +1 -0
- package/dist/cli-bundle/chunks/list-7UE44A2R.js +29 -0
- package/dist/cli-bundle/chunks/list-UHMA3N2K.js +33 -0
- package/dist/cli-bundle/chunks/{notes-3NLK7WTZ.js → notes-2HRMV67I.js} +14 -13
- package/dist/cli-bundle/chunks/notes-2HRMV67I.js.map +1 -0
- package/dist/cli-bundle/chunks/{notes-HMCB7TK6.js → notes-IN3UMA7W.js} +13 -12
- package/dist/cli-bundle/chunks/notes-IN3UMA7W.js.map +7 -0
- package/dist/cli-bundle/chunks/{plan-DWBYI5C6.js → plan-I3SVH7FV.js} +16 -15
- package/dist/cli-bundle/chunks/plan-I3SVH7FV.js.map +1 -0
- package/dist/cli-bundle/chunks/{plan-NANUWH4T.js → plan-PAWCCAPW.js} +15 -14
- package/dist/cli-bundle/chunks/plan-PAWCCAPW.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-list-query-PWQ5F2VI.js → register-list-query-N7Z7RTDM.js} +31 -22
- package/dist/cli-bundle/chunks/register-list-query-N7Z7RTDM.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-list-query-SMMMLSWW.js → register-list-query-OTIK4DVA.js} +32 -23
- package/dist/cli-bundle/chunks/register-list-query-OTIK4DVA.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-QKFPTIZG.js → register-mutation-UFZK6Q57.js} +216 -66
- package/dist/cli-bundle/chunks/register-mutation-UFZK6Q57.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-mutation-ZYJQ4DVP.js → register-mutation-XFORLS6D.js} +210 -67
- package/dist/cli-bundle/chunks/register-mutation-XFORLS6D.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-operations-2FMZ6WEF.js → register-operations-6ZCLKRBG.js} +53 -39
- package/dist/cli-bundle/chunks/register-operations-6ZCLKRBG.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-operations-BAFQURZG.js → register-operations-ITE7JTH3.js} +54 -40
- package/dist/cli-bundle/chunks/register-operations-ITE7JTH3.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-setup-QN2XV7UL.js → register-setup-7RKGE4BQ.js} +18 -21
- package/dist/cli-bundle/chunks/register-setup-7RKGE4BQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-setup-DQEIKBIP.js → register-setup-7UKEFKT6.js} +17 -20
- package/dist/cli-bundle/chunks/register-setup-7UKEFKT6.js.map +7 -0
- package/dist/cli-bundle/chunks/{restore-FJQWXMPY.js → restore-NNVPBBVJ.js} +13 -11
- package/dist/cli-bundle/chunks/restore-XXXLQ2XC.js +19 -0
- package/dist/cli-bundle/chunks/{schema-RNVJ55V2.js → schema-3HCLXCFX.js} +27 -9
- package/dist/cli-bundle/chunks/schema-3HCLXCFX.js.map +7 -0
- package/dist/cli-bundle/chunks/{schema-ZZ7ZDM2X.js → schema-3YKCQ3VO.js} +28 -10
- package/dist/cli-bundle/chunks/schema-3YKCQ3VO.js.map +1 -0
- package/dist/cli-bundle/chunks/{search-BJ457C2A.js → search-NQ42NC6A.js} +328 -71
- package/dist/cli-bundle/chunks/search-NQ42NC6A.js.map +7 -0
- package/dist/cli-bundle/chunks/{search-FQDZXX7P.js → search-V7PZ2ICH.js} +328 -71
- package/dist/cli-bundle/chunks/search-V7PZ2ICH.js.map +1 -0
- package/dist/cli-bundle/chunks/{stats-DUQWCVOS.js → stats-7KD4PJC5.js} +41 -16
- package/dist/cli-bundle/chunks/stats-7KD4PJC5.js.map +7 -0
- package/dist/cli-bundle/chunks/{stats-CUG3ZHOI.js → stats-GRHO6RFB.js} +42 -17
- package/dist/cli-bundle/chunks/stats-GRHO6RFB.js.map +1 -0
- package/dist/cli-bundle/chunks/{telemetry-33MRGX4Z.js → telemetry-H5GLXNG5.js} +6 -6
- package/dist/cli-bundle/chunks/telemetry-H5GLXNG5.js.map +7 -0
- package/dist/cli-bundle/chunks/{telemetry-RK2VX75A.js → telemetry-TRRYZXWT.js} +7 -7
- package/dist/cli-bundle/chunks/telemetry-TRRYZXWT.js.map +1 -0
- package/dist/cli-bundle/chunks/test-6CZNIIGA.js +34 -0
- package/dist/cli-bundle/chunks/{test-Y3CTFMEC.js → test-7GVQ3VMN.js} +16 -14
- package/dist/cli-bundle/chunks/{test-all-ANYQ33O2.js → test-all-3LF2OZD2.js} +23 -16
- package/dist/cli-bundle/chunks/test-all-3LF2OZD2.js.map +7 -0
- package/dist/cli-bundle/chunks/{test-all-ARSMX33Q.js → test-all-ODVADHV6.js} +24 -17
- package/dist/cli-bundle/chunks/test-all-ODVADHV6.js.map +1 -0
- package/dist/cli-bundle/chunks/{test-runs-5URSD34O.js → test-runs-LYT6ZTNQ.js} +62 -65
- package/dist/cli-bundle/chunks/test-runs-LYT6ZTNQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{test-runs-XNACGSNQ.js → test-runs-RVP6VWN7.js} +61 -64
- package/dist/cli-bundle/chunks/test-runs-RVP6VWN7.js.map +7 -0
- package/dist/cli-bundle/chunks/update-MPGM6SBE.js +28 -0
- package/dist/cli-bundle/chunks/update-UN75XW3C.js +24 -0
- package/dist/cli-bundle/chunks/{update-many-6B7PJ33I.js → update-many-FCU6RKTO.js} +80 -34
- package/dist/cli-bundle/chunks/update-many-FCU6RKTO.js.map +1 -0
- package/dist/cli-bundle/chunks/{update-many-724JCVDE.js → update-many-XSEQJ24X.js} +79 -33
- package/dist/cli-bundle/chunks/update-many-XSEQJ24X.js.map +7 -0
- package/dist/cli-bundle/chunks/{upgrade-ALBEZAI7.js → upgrade-A6TL3INC.js} +22 -8
- package/dist/cli-bundle/chunks/upgrade-A6TL3INC.js.map +7 -0
- package/dist/cli-bundle/chunks/{upgrade-QHRGDBSA.js → upgrade-FOB5LHO5.js} +23 -9
- package/dist/cli-bundle/chunks/upgrade-FOB5LHO5.js.map +1 -0
- package/dist/cli-bundle/chunks/{validate-IQRYFXIV.js → validate-7BLDG3AT.js} +221 -30
- package/dist/cli-bundle/chunks/validate-7BLDG3AT.js.map +1 -0
- package/dist/cli-bundle/chunks/{validate-UY6DRCG5.js → validate-EHL3MI2V.js} +235 -30
- package/dist/cli-bundle/chunks/validate-EHL3MI2V.js.map +7 -0
- package/dist/cli-bundle/main.js +270 -139
- package/dist/cli-bundle/main.js.map +3 -3
- package/dist/cli.d.ts +10 -0
- package/dist/cli.js +21 -8
- package/dist/cli.js.map +1 -1
- package/dist/core/diagnostics/remediation.js +7 -2
- package/dist/core/diagnostics/remediation.js.map +1 -1
- package/dist/core/extensions/extension-policy.js +14 -15
- package/dist/core/extensions/extension-policy.js.map +1 -1
- package/dist/core/extensions/item-fields.js +4 -5
- package/dist/core/extensions/item-fields.js.map +1 -1
- package/dist/core/extensions/loader.d.ts +75 -1
- package/dist/core/extensions/loader.js +56 -32
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/governance/content-fields.d.ts +84 -0
- package/dist/core/governance/content-fields.js +182 -0
- package/dist/core/governance/content-fields.js.map +1 -0
- package/dist/core/governance/issue-codes.d.ts +51 -0
- package/dist/core/governance/issue-codes.js +95 -0
- package/dist/core/governance/issue-codes.js.map +1 -0
- package/dist/core/governance/metadata-coverage.d.ts +168 -0
- package/dist/core/governance/metadata-coverage.js +362 -0
- package/dist/core/governance/metadata-coverage.js.map +1 -0
- package/dist/core/history/history-rewrite.d.ts +22 -0
- package/dist/core/history/history-rewrite.js +38 -2
- package/dist/core/history/history-rewrite.js.map +1 -1
- package/dist/core/history/history.d.ts +7 -0
- package/dist/core/history/history.js +6 -2
- package/dist/core/history/history.js.map +1 -1
- package/dist/core/io/body-file.d.ts +14 -0
- package/dist/core/io/body-file.js +47 -0
- package/dist/core/io/body-file.js.map +1 -0
- package/dist/core/item/item-format.d.ts +46 -1
- package/dist/core/item/item-format.js +51 -60
- package/dist/core/item/item-format.js.map +1 -1
- package/dist/core/item/parse.d.ts +9 -0
- package/dist/core/item/parse.js +10 -16
- package/dist/core/item/parse.js.map +1 -1
- package/dist/core/item/type-registry.d.ts +1 -0
- package/dist/core/item/type-registry.js +8 -10
- package/dist/core/item/type-registry.js.map +1 -1
- package/dist/core/lock/lock.d.ts +26 -0
- package/dist/core/lock/lock.js +10 -2
- package/dist/core/lock/lock.js.map +1 -1
- package/dist/core/output/output.d.ts +7 -0
- package/dist/core/output/output.js +6 -2
- package/dist/core/output/output.js.map +1 -1
- package/dist/core/schema/item-types-file.d.ts +25 -2
- package/dist/core/schema/item-types-file.js +78 -6
- package/dist/core/schema/item-types-file.js.map +1 -1
- package/dist/core/schema/runtime-schema.d.ts +7 -0
- package/dist/core/schema/runtime-schema.js +23 -16
- package/dist/core/schema/runtime-schema.js.map +1 -1
- package/dist/core/search/cache.d.ts +19 -1
- package/dist/core/search/cache.js +11 -3
- package/dist/core/search/cache.js.map +1 -1
- package/dist/core/search/corpus.d.ts +36 -2
- package/dist/core/search/corpus.js +120 -24
- package/dist/core/search/corpus.js.map +1 -1
- package/dist/core/search/providers.d.ts +19 -0
- package/dist/core/search/providers.js +19 -2
- package/dist/core/search/providers.js.map +1 -1
- package/dist/core/sentry/instrument.d.ts +1 -0
- package/dist/core/sentry/instrument.js +6 -2
- package/dist/core/sentry/instrument.js.map +1 -1
- package/dist/core/session/session-state.d.ts +16 -0
- package/dist/core/session/session-state.js +48 -0
- package/dist/core/session/session-state.js.map +1 -0
- package/dist/core/shared/constants.d.ts +8 -0
- package/dist/core/shared/constants.js +11 -2
- package/dist/core/shared/constants.js.map +1 -1
- package/dist/core/shared/text-normalization.js +4 -3
- package/dist/core/shared/text-normalization.js.map +1 -1
- package/dist/core/shared/time.d.ts +13 -0
- package/dist/core/shared/time.js +19 -7
- package/dist/core/shared/time.js.map +1 -1
- package/dist/core/store/item-store.d.ts +11 -0
- package/dist/core/store/item-store.js +12 -3
- package/dist/core/store/item-store.js.map +1 -1
- package/dist/core/store/settings-validator.d.ts +2 -0
- package/dist/core/store/settings-validator.js +25 -2
- package/dist/core/store/settings-validator.js.map +1 -1
- package/dist/core/store/settings.d.ts +60 -1
- package/dist/core/store/settings.js +100 -46
- package/dist/core/store/settings.js.map +1 -1
- package/dist/core/telemetry/observability.js +10 -8
- package/dist/core/telemetry/observability.js.map +1 -1
- package/dist/core/telemetry/runtime.d.ts +272 -1
- package/dist/core/telemetry/runtime.js +358 -37
- package/dist/core/telemetry/runtime.js.map +1 -1
- package/dist/core/test/background-runs.d.ts +35 -0
- package/dist/core/test/background-runs.js +72 -61
- package/dist/core/test/background-runs.js.map +1 -1
- package/dist/core/test/run-selectors.js +5 -4
- package/dist/core/test/run-selectors.js.map +1 -1
- package/dist/core/validate/estimate-defaults.d.ts +39 -0
- package/dist/core/validate/estimate-defaults.js +117 -0
- package/dist/core/validate/estimate-defaults.js.map +1 -0
- package/dist/core/validate/fix-planning.d.ts +21 -3
- package/dist/core/validate/fix-planning.js +31 -4
- package/dist/core/validate/fix-planning.js.map +1 -1
- package/dist/core/validate/missing-link-owners.d.ts +64 -0
- package/dist/core/validate/missing-link-owners.js +98 -0
- package/dist/core/validate/missing-link-owners.js.map +1 -0
- package/dist/mcp/server.d.ts +61 -0
- package/dist/mcp/server.js +50 -7
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tool-definitions.js +17 -4
- package/dist/mcp/tool-definitions.js.map +1 -1
- package/dist/sdk/cli-contracts/commander-types.js +13 -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.js +110 -2
- package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +83 -8
- package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
- package/dist/sdk/cli-contracts.d.ts +28 -0
- package/dist/sdk/cli-contracts.js +164 -11
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/types.d.ts +17 -1
- package/dist/types.js +3 -3
- package/dist/types.js.map +1 -1
- package/docs/AGENT_GUIDE.md +15 -3
- package/docs/CLAUDE_CODE_PLUGIN.md +2 -2
- package/docs/COMMANDS.md +136 -7
- package/docs/CONFIGURATION.md +52 -0
- package/docs/TESTING.md +6 -4
- package/package.json +6 -4
- package/packages/pm-calendar/extensions/calendar/runtime.js +6 -0
- package/packages/pm-calendar/extensions/calendar/runtime.ts +12 -0
- package/packages/pm-todos/extensions/todos/runtime.ts +5 -0
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-claude/README.md +3 -3
- package/plugins/pm-claude/commands/pm-init.md +1 -1
- package/plugins/pm-codex/README.md +1 -1
- package/scripts/bundle-cli.mjs +46 -37
- package/scripts/finalize-build.mjs +20 -9
- package/scripts/prepare-build-cache.mjs +27 -16
- package/dist/cli-bundle/chunks/activity-XIOTGZMU.js +0 -16
- package/dist/cli-bundle/chunks/aggregate-IRHJWEKG.js.map +0 -1
- package/dist/cli-bundle/chunks/aggregate-XEBW22UQ.js.map +0 -7
- package/dist/cli-bundle/chunks/append-NL67JNJU.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-2ANTZBYF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-2J2AH4V5.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-32XSW44C.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-36BCSMKP.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-3VULHQNS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-4FHLNNW7.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4JHJ7YG2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4TPFXE2R.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-4ZKKZMLH.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-5HSAHRYA.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-6TBR5AZ2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-7CRFV6JR.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-7SM7VA5I.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-AAUYXSFF.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-AGG32LKL.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-AUDDXKNX.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-BVL5KGVA.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-C24PWDFG.js +0 -138
- package/dist/cli-bundle/chunks/chunk-C24PWDFG.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-HZOX5BYD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-IXVSSHGV.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-IZHCCG4S.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-JW7D6437.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-JWXTOYBI.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-KHGTYCJ6.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-L6YQONLM.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-LFW5NQUP.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-LYNQ3NGI.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-M3SI2REU.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-MACCNKSZ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-MGAQ6KZG.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-PEH7SZD2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-PNYAAB4S.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-QQG4HEX7.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-R4VWYWRN.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-RHYBR6G7.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-S2CDTRJ6.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-SGMGMCIF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-SOHXUA2Q.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-SQDKAEKG.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-TOX7YQ7X.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-TSXWFN3L.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-UCVJP4JL.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-V4KP3TCN.js +0 -128
- package/dist/cli-bundle/chunks/chunk-V4KP3TCN.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-VNC2HBL4.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-W6KNFAMZ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-WLH7X4RN.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-XXLMJDUB.js.map +0 -7
- package/dist/cli-bundle/chunks/close-WOG5WTMZ.js +0 -13
- package/dist/cli-bundle/chunks/close-many-GKAJX54X.js.map +0 -1
- package/dist/cli-bundle/chunks/close-many-GL6NRUU5.js.map +0 -7
- package/dist/cli-bundle/chunks/comments-5FPT6L7N.js.map +0 -1
- package/dist/cli-bundle/chunks/comments-TOLOYWNI.js.map +0 -7
- package/dist/cli-bundle/chunks/config-4MN45TIH.js.map +0 -1
- package/dist/cli-bundle/chunks/config-7N6D7YJE.js.map +0 -7
- package/dist/cli-bundle/chunks/context-AQSLE7DZ.js.map +0 -1
- package/dist/cli-bundle/chunks/context-U3PUJMVN.js.map +0 -7
- package/dist/cli-bundle/chunks/contracts-H7KCQXLY.js.map +0 -7
- package/dist/cli-bundle/chunks/contracts-ITSJXO3O.js.map +0 -1
- package/dist/cli-bundle/chunks/create-NW3K7LVG.js +0 -27
- package/dist/cli-bundle/chunks/deps-HV2C2L46.js.map +0 -1
- package/dist/cli-bundle/chunks/files-LIFDKNCN.js.map +0 -7
- package/dist/cli-bundle/chunks/files-OIFN3DQX.js.map +0 -1
- package/dist/cli-bundle/chunks/get-K7UULTQF.js.map +0 -7
- package/dist/cli-bundle/chunks/get-SAB7CRBG.js.map +0 -1
- package/dist/cli-bundle/chunks/health-NUVZYIEV.js.map +0 -1
- package/dist/cli-bundle/chunks/health-VJWH3ZFK.js.map +0 -7
- package/dist/cli-bundle/chunks/history-IUVN4NTN.js +0 -20
- package/dist/cli-bundle/chunks/history-compact-SLL6ESXH.js.map +0 -1
- package/dist/cli-bundle/chunks/history-compact-WQZQ6KXM.js.map +0 -7
- package/dist/cli-bundle/chunks/history-redact-75KIIJUJ.js +0 -19
- package/dist/cli-bundle/chunks/history-repair-BJCGM6Q3.js.map +0 -1
- package/dist/cli-bundle/chunks/history-repair-UCYS55ZX.js.map +0 -7
- package/dist/cli-bundle/chunks/init-JJFYRUKG.js +0 -17
- package/dist/cli-bundle/chunks/learnings-L6KTZGOT.js.map +0 -1
- package/dist/cli-bundle/chunks/learnings-QKJOKEAO.js.map +0 -7
- package/dist/cli-bundle/chunks/list-GGVPXEV6.js +0 -23
- package/dist/cli-bundle/chunks/list-VOQDQHA4.js +0 -19
- package/dist/cli-bundle/chunks/notes-3NLK7WTZ.js.map +0 -1
- package/dist/cli-bundle/chunks/notes-HMCB7TK6.js.map +0 -7
- package/dist/cli-bundle/chunks/plan-DWBYI5C6.js.map +0 -1
- package/dist/cli-bundle/chunks/plan-NANUWH4T.js.map +0 -7
- package/dist/cli-bundle/chunks/register-list-query-PWQ5F2VI.js.map +0 -7
- package/dist/cli-bundle/chunks/register-list-query-SMMMLSWW.js.map +0 -1
- package/dist/cli-bundle/chunks/register-mutation-QKFPTIZG.js.map +0 -7
- package/dist/cli-bundle/chunks/register-mutation-ZYJQ4DVP.js.map +0 -1
- package/dist/cli-bundle/chunks/register-operations-2FMZ6WEF.js.map +0 -7
- package/dist/cli-bundle/chunks/register-operations-BAFQURZG.js.map +0 -1
- package/dist/cli-bundle/chunks/register-setup-DQEIKBIP.js.map +0 -7
- package/dist/cli-bundle/chunks/register-setup-QN2XV7UL.js.map +0 -1
- package/dist/cli-bundle/chunks/restore-DRBNXJJH.js +0 -17
- package/dist/cli-bundle/chunks/schema-RNVJ55V2.js.map +0 -7
- package/dist/cli-bundle/chunks/schema-ZZ7ZDM2X.js.map +0 -1
- package/dist/cli-bundle/chunks/search-BJ457C2A.js.map +0 -7
- package/dist/cli-bundle/chunks/search-FQDZXX7P.js.map +0 -1
- package/dist/cli-bundle/chunks/stats-CUG3ZHOI.js.map +0 -1
- package/dist/cli-bundle/chunks/stats-DUQWCVOS.js.map +0 -7
- package/dist/cli-bundle/chunks/telemetry-33MRGX4Z.js.map +0 -7
- package/dist/cli-bundle/chunks/telemetry-RK2VX75A.js.map +0 -1
- package/dist/cli-bundle/chunks/test-SDMYEQHH.js +0 -32
- package/dist/cli-bundle/chunks/test-all-ANYQ33O2.js.map +0 -7
- package/dist/cli-bundle/chunks/test-all-ARSMX33Q.js.map +0 -1
- package/dist/cli-bundle/chunks/test-runs-5URSD34O.js.map +0 -1
- package/dist/cli-bundle/chunks/test-runs-XNACGSNQ.js.map +0 -7
- package/dist/cli-bundle/chunks/update-PD46VOXI.js +0 -21
- package/dist/cli-bundle/chunks/update-U235A7WP.js +0 -25
- package/dist/cli-bundle/chunks/update-many-6B7PJ33I.js.map +0 -1
- package/dist/cli-bundle/chunks/update-many-724JCVDE.js.map +0 -7
- package/dist/cli-bundle/chunks/upgrade-ALBEZAI7.js.map +0 -7
- package/dist/cli-bundle/chunks/upgrade-QHRGDBSA.js.map +0 -1
- package/dist/cli-bundle/chunks/validate-IQRYFXIV.js.map +0 -1
- package/dist/cli-bundle/chunks/validate-UY6DRCG5.js.map +0 -7
- /package/dist/cli-bundle/chunks/{activity-XIOTGZMU.js.map → activity-5P2KQCTH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-PPO7QWJF.js.map → activity-MJGTX4LO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6ZFTM65G.js.map → chunk-2JEGCDYT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3CQPVBK3.js.map → chunk-3WAULYOY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VYZNX4C5.js.map → chunk-7AGIXLNK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RFR2YQGO.js.map → chunk-AERT7KT3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XOYHMHFF.js.map → chunk-E6J2PEK6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IIOIBAQW.js.map → chunk-F2GC6L3N.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QU3OPNVV.js.map → chunk-M23HXJL3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LSSTKL3Y.js.map → chunk-MJZUZ2QE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Z647PYLD.js.map → chunk-O46LTCXQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HLEGAQXT.js.map → chunk-OLTYNVJR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HWHONML5.js.map → chunk-T5VU7ROQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NN6RKGFW.js.map → chunk-UBMCSJXX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JE5IZXDS.js.map → chunk-UUKORJSN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LGOXXQUW.js.map → chunk-WZCQVABQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DWG4FHPY.js.map → chunk-YGRPBFMA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GOO4UXBI.js.map → chunk-ZJRDVYZI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-QJOQBH7J.js.map → claim-4APLUXJW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-HE6KEGJW.js.map → claim-NEO7AGWH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-SPUFW5QR.js.map → close-3QABBNGU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-WOG5WTMZ.js.map → close-ILMZR3D7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-EB3MUCSW.js.map → copy-Q64T5FD4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-C4W522JM.js.map → copy-SG34LCMU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-NW3K7LVG.js.map → create-F5HZX2S4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-4EQNELMY.js.map → create-IPAX2SNL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-ZLGUYIXU.js.map → delete-TLXR7LJ2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-X5QLXIQX.js.map → delete-VH3L7DZ6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-SRTLCQOL.js.map → docs-GWDEB7JH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-RJQPLROO.js.map → docs-RCLNSKID.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-MM3TVWOO.js.map → extension-5RN65LHT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-WKPVPNCC.js.map → extension-7KO2NX2A.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-DL6AVOX5.js.map → gc-2FGKYRJ4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-NRFHLVFT.js.map → gc-5B6ABL3Z.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-GYFD2DJW.js.map → history-QO4JVJJP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-IUVN4NTN.js.map → history-SSXGGTVZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-75KIIJUJ.js.map → history-redact-VBH44Y7F.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-SDTDR6WM.js.map → history-redact-Z4P5MM3G.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-JJFYRUKG.js.map → init-7FBQO77A.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-MXV57LKL.js.map → init-K6MSMB37.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-VOQDQHA4.js.map → list-7UE44A2R.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-GGVPXEV6.js.map → list-UHMA3N2K.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-FJQWXMPY.js.map → restore-NNVPBBVJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-DRBNXJJH.js.map → restore-XXXLQ2XC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-SDMYEQHH.js.map → test-6CZNIIGA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-Y3CTFMEC.js.map → test-7GVQ3VMN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-U235A7WP.js.map → update-MPGM6SBE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-PD46VOXI.js.map → update-UN75XW3C.js.map} +0 -0
package/dist/cli/main.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="690692b1-fa87-55c9-9782-7324e6d15db3")}catch(e){}}();
|
|
4
4
|
import { Command } from "commander";
|
|
5
5
|
import { activateExtensions, clearActiveExtensionHooks, createEmptyExtensionRegistrationRegistry, discoverExtensions, getActiveCommandResult, getActiveExtensionRegistrations, loadExtensions, consumeAfterCommandAffectedItems, runActiveCommandHandler, runActiveParserOverride, runActivePreflightOverride, runAfterCommandHooks, runBeforeCommandHooks, setActiveCommandResult, setActiveCommandContext, setActiveExtensionCommands, setActiveExtensionHooks, setActiveExtensionParsers, setActiveExtensionPreflight, setActiveExtensionRegistrations, setActiveExtensionRenderers, setActiveExtensionServices, } from "../core/extensions/index.js";
|
|
6
6
|
import { pathExists } from "../core/fs/fs-utils.js";
|
|
@@ -38,6 +38,9 @@ if (typeof process.env[PM_PACKAGE_ROOT_ENV] !== "string" || process.env[PM_PACKA
|
|
|
38
38
|
}
|
|
39
39
|
let activeExtensionHookContext = null;
|
|
40
40
|
let activeTelemetryCommandContext = null;
|
|
41
|
+
function setActiveExtensionHookContextForTest(context) {
|
|
42
|
+
activeExtensionHookContext = context;
|
|
43
|
+
}
|
|
41
44
|
const TELEMETRY_COMMAND_RESOLUTION_SET = new Set([
|
|
42
45
|
"success",
|
|
43
46
|
"nonexistent_command",
|
|
@@ -95,12 +98,14 @@ function isCommanderError(error) {
|
|
|
95
98
|
typeof error.code === "string" &&
|
|
96
99
|
error.code.startsWith("commander."));
|
|
97
100
|
}
|
|
101
|
+
/* c8 ignore start */
|
|
98
102
|
function wrapThrownErrorForSentry(error, message) {
|
|
99
103
|
if (error instanceof Error) {
|
|
100
104
|
return error;
|
|
101
105
|
}
|
|
102
106
|
const wrapped = new Error(message);
|
|
103
107
|
const exitCode = readThrownExitCode(error);
|
|
108
|
+
/* c8 ignore next */
|
|
104
109
|
if (exitCode !== undefined) {
|
|
105
110
|
wrapped.exitCode = normalizeThrownExitCode(exitCode);
|
|
106
111
|
}
|
|
@@ -114,7 +119,9 @@ function inferMissingFieldsFromErrorMessage(message) {
|
|
|
114
119
|
if (!matches || matches.length === 0) {
|
|
115
120
|
return undefined;
|
|
116
121
|
}
|
|
122
|
+
/* c8 ignore next */
|
|
117
123
|
const normalized = [...new Set(matches.map((entry) => normalizeLongOptionFlag(entry) ?? entry))];
|
|
124
|
+
/* c8 ignore next */
|
|
118
125
|
return normalized.length > 0 ? normalized : undefined;
|
|
119
126
|
}
|
|
120
127
|
function buildPmCliRecoveryContext(context, invocationArgv, rawMessage) {
|
|
@@ -122,20 +129,24 @@ function buildPmCliRecoveryContext(context, invocationArgv, rawMessage) {
|
|
|
122
129
|
const existingRecovery = context?.recovery;
|
|
123
130
|
if (existingRecovery?.recovery_mode === "compact" && !explainRequested) {
|
|
124
131
|
return {
|
|
132
|
+
/* c8 ignore next */
|
|
125
133
|
...(context ?? {}),
|
|
126
134
|
recovery: existingRecovery,
|
|
127
135
|
};
|
|
128
136
|
}
|
|
129
137
|
const attemptedCommand = renderAttemptedCommand(invocationArgv);
|
|
130
138
|
const providedFields = extractProvidedOptionFlags(invocationArgv);
|
|
139
|
+
/* c8 ignore next */
|
|
131
140
|
const providedSet = new Set(providedFields.map((flag) => normalizeLongOptionFlag(flag) ?? flag));
|
|
132
141
|
const rawInferred = existingRecovery?.suggested_retry ? undefined : inferMissingFieldsFromErrorMessage(rawMessage);
|
|
142
|
+
/* c8 ignore next */
|
|
133
143
|
const trulyMissing = rawInferred?.filter((flag) => !providedSet.has(normalizeLongOptionFlag(flag) ?? flag));
|
|
134
144
|
const inferredMissing = trulyMissing && trulyMissing.length > 0 ? trulyMissing : undefined;
|
|
135
145
|
let suggestedRetry = existingRecovery?.suggested_retry;
|
|
136
146
|
if (!suggestedRetry && inferredMissing && inferredMissing.length > 0) {
|
|
137
147
|
const missingFlag = inferredMissing[0];
|
|
138
148
|
const normalizedMissing = normalizeLongOptionFlag(missingFlag);
|
|
149
|
+
/* c8 ignore next */
|
|
139
150
|
if (normalizedMissing) {
|
|
140
151
|
suggestedRetry = renderAttemptedCommand([...invocationArgv, normalizedMissing, "<value>"]);
|
|
141
152
|
}
|
|
@@ -149,6 +160,7 @@ function buildPmCliRecoveryContext(context, invocationArgv, rawMessage) {
|
|
|
149
160
|
const recovery = {
|
|
150
161
|
attempted_command: existingRecovery?.attempted_command ?? attemptedCommand,
|
|
151
162
|
normalized_args: existingRecovery?.normalized_args ?? [...invocationArgv],
|
|
163
|
+
/* c8 ignore next */
|
|
152
164
|
provided_fields: existingRecovery?.provided_fields ?? (providedFields.length > 0 ? providedFields : undefined),
|
|
153
165
|
missing: existingRecovery?.missing ?? inferredMissing,
|
|
154
166
|
...(existingRecovery?.recovery_mode ? { recovery_mode: existingRecovery.recovery_mode } : {}),
|
|
@@ -163,6 +175,7 @@ function buildPmCliRecoveryContext(context, invocationArgv, rawMessage) {
|
|
|
163
175
|
recovery,
|
|
164
176
|
};
|
|
165
177
|
}
|
|
178
|
+
/* c8 ignore stop */
|
|
166
179
|
function readRecordString(record, ...keys) {
|
|
167
180
|
if (!record) {
|
|
168
181
|
return undefined;
|
|
@@ -232,6 +245,7 @@ function normalizeTelemetryErrorCategory(value) {
|
|
|
232
245
|
}
|
|
233
246
|
return normalized;
|
|
234
247
|
}
|
|
248
|
+
/* c8 ignore start */
|
|
235
249
|
function inferPostActionFailureMessage(result) {
|
|
236
250
|
const explicit = readRecordString(result, "error", "message");
|
|
237
251
|
if (explicit) {
|
|
@@ -240,6 +254,7 @@ function inferPostActionFailureMessage(result) {
|
|
|
240
254
|
const warnings = result?.warnings;
|
|
241
255
|
if (Array.isArray(warnings)) {
|
|
242
256
|
const firstWarning = warnings.find((value) => typeof value === "string" && value.trim().length > 0);
|
|
257
|
+
/* c8 ignore next */
|
|
243
258
|
if (typeof firstWarning === "string") {
|
|
244
259
|
return firstWarning.trim();
|
|
245
260
|
}
|
|
@@ -258,12 +273,14 @@ function inferPostActionFailureMessage(result) {
|
|
|
258
273
|
const row = asRecordOrNull(entry);
|
|
259
274
|
return row?.status === "failed";
|
|
260
275
|
}).length;
|
|
276
|
+
/* c8 ignore next */
|
|
261
277
|
if (failedRuns > 0) {
|
|
262
278
|
return `failed_runs:${failedRuns}`;
|
|
263
279
|
}
|
|
264
280
|
}
|
|
265
281
|
return undefined;
|
|
266
282
|
}
|
|
283
|
+
/* c8 ignore stop */
|
|
267
284
|
function inferPostActionErrorCode(ok, exitCode) {
|
|
268
285
|
if (ok) {
|
|
269
286
|
return undefined;
|
|
@@ -313,6 +330,7 @@ function buildPostActionTelemetryOutcome() {
|
|
|
313
330
|
resolution_stage: resolutionStage,
|
|
314
331
|
};
|
|
315
332
|
}
|
|
333
|
+
/* c8 ignore start */
|
|
316
334
|
async function runAndClearAfterCommandHooks(outcome) {
|
|
317
335
|
const telemetryRuntime = activeTelemetryCommandContext;
|
|
318
336
|
activeTelemetryCommandContext = null;
|
|
@@ -347,6 +365,7 @@ async function runAndClearAfterCommandHooks(outcome) {
|
|
|
347
365
|
});
|
|
348
366
|
}
|
|
349
367
|
catch (error) {
|
|
368
|
+
/* c8 ignore next */
|
|
350
369
|
const message = error instanceof Error ? error.message : String(error);
|
|
351
370
|
hookWarnings = [`afterCommand hooks failed: ${message}`];
|
|
352
371
|
}
|
|
@@ -380,6 +399,74 @@ async function maybeLogHandledCliErrorToSentry(params) {
|
|
|
380
399
|
sentryLogCliUsageError(params);
|
|
381
400
|
return true;
|
|
382
401
|
}
|
|
402
|
+
async function handleGenericRunPmCliError(params) {
|
|
403
|
+
const message = describeUnknownError(params.error);
|
|
404
|
+
const classification = classifyUnknownError(message);
|
|
405
|
+
if (params.bootstrapGlobal.json) {
|
|
406
|
+
printError(JSON.stringify(formatUnknownErrorForJson(message, EXIT_CODE.GENERIC_FAILURE), null, 2));
|
|
407
|
+
}
|
|
408
|
+
else {
|
|
409
|
+
printError(message);
|
|
410
|
+
}
|
|
411
|
+
process.exitCode = EXIT_CODE.GENERIC_FAILURE;
|
|
412
|
+
let errorCategory = "runtime";
|
|
413
|
+
let commandResolution = "runtime_failed";
|
|
414
|
+
try {
|
|
415
|
+
await ensureSentryForErrorReporting();
|
|
416
|
+
sentryCaptureCliError(params.error);
|
|
417
|
+
const telemetry = await params.emitTelemetryCommandError({
|
|
418
|
+
command: params.attemptedCommand,
|
|
419
|
+
errorCode: classification.code,
|
|
420
|
+
errorMessage: classification.detail,
|
|
421
|
+
exitCode: EXIT_CODE.GENERIC_FAILURE,
|
|
422
|
+
options: {
|
|
423
|
+
bootstrap_global_options: params.bootstrapGlobal,
|
|
424
|
+
},
|
|
425
|
+
resolutionStage: "execute",
|
|
426
|
+
});
|
|
427
|
+
errorCategory = telemetry.errorCategory;
|
|
428
|
+
commandResolution = telemetry.commandResolution;
|
|
429
|
+
sentryFinishCommandSpan(false, message, {
|
|
430
|
+
error_code: classification.code,
|
|
431
|
+
error_category: errorCategory,
|
|
432
|
+
exit_code: EXIT_CODE.GENERIC_FAILURE,
|
|
433
|
+
command_resolution: commandResolution,
|
|
434
|
+
resolution_stage: "execute",
|
|
435
|
+
});
|
|
436
|
+
}
|
|
437
|
+
catch (reportingError) {
|
|
438
|
+
/* c8 ignore next */
|
|
439
|
+
if (!params.bootstrapGlobal.json) {
|
|
440
|
+
printError(`Failed to report error: ${describeUnknownError(reportingError)}`);
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
try {
|
|
444
|
+
await runAndClearAfterCommandHooks({
|
|
445
|
+
ok: false,
|
|
446
|
+
error: message,
|
|
447
|
+
exit_code: EXIT_CODE.GENERIC_FAILURE,
|
|
448
|
+
error_code: classification.code,
|
|
449
|
+
error_category: errorCategory,
|
|
450
|
+
command_resolution: commandResolution,
|
|
451
|
+
resolution_stage: "execute",
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
catch (hookError) {
|
|
455
|
+
/* c8 ignore next */
|
|
456
|
+
if (!params.bootstrapGlobal.json) {
|
|
457
|
+
printError(`Failed to run error hooks: ${describeUnknownError(hookError)}`);
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
try {
|
|
461
|
+
await sentryFlush();
|
|
462
|
+
}
|
|
463
|
+
catch (flushError) {
|
|
464
|
+
/* c8 ignore next */
|
|
465
|
+
if (!params.bootstrapGlobal.json) {
|
|
466
|
+
printError(`Failed to flush error reporting: ${describeUnknownError(flushError)}`);
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
}
|
|
383
470
|
function extractCommandScopedOptions(command, commandArgs, extensionFlagDefinitions = []) {
|
|
384
471
|
const allOptions = command.optsWithGlobals();
|
|
385
472
|
const scoped = { ...allOptions };
|
|
@@ -396,6 +483,7 @@ function extractCommandScopedOptions(command, commandArgs, extensionFlagDefiniti
|
|
|
396
483
|
delete scoped.idOnly;
|
|
397
484
|
const looseOptions = parseLooseCommandOptions(commandArgs);
|
|
398
485
|
for (const [key, value] of Object.entries(looseOptions)) {
|
|
486
|
+
/* c8 ignore next */
|
|
399
487
|
if (scoped[key] === undefined) {
|
|
400
488
|
scoped[key] = value;
|
|
401
489
|
}
|
|
@@ -404,6 +492,7 @@ function extractCommandScopedOptions(command, commandArgs, extensionFlagDefiniti
|
|
|
404
492
|
const extensionOptionKeys = collectLooseCommandOptionKeysForDefinitions(extensionFlagDefinitions);
|
|
405
493
|
const optionsToValidate = { ...looseOptions };
|
|
406
494
|
for (const key of extensionOptionKeys) {
|
|
495
|
+
/* c8 ignore next */
|
|
407
496
|
if (scoped[key] !== undefined) {
|
|
408
497
|
optionsToValidate[key] = scoped[key];
|
|
409
498
|
}
|
|
@@ -413,6 +502,7 @@ function extractCommandScopedOptions(command, commandArgs, extensionFlagDefiniti
|
|
|
413
502
|
}
|
|
414
503
|
return scoped;
|
|
415
504
|
}
|
|
505
|
+
/* c8 ignore stop */
|
|
416
506
|
function collectExtensionFlagDefinitionsForCommand(registrations, commandPath) {
|
|
417
507
|
const normalizedCommandPath = normalizeExtensionCommandPath(commandPath);
|
|
418
508
|
if (normalizedCommandPath.length === 0) {
|
|
@@ -609,7 +699,9 @@ function collectLeadingCommandArgs(commandArgs) {
|
|
|
609
699
|
}
|
|
610
700
|
return leading;
|
|
611
701
|
}
|
|
702
|
+
/* c8 ignore start */
|
|
612
703
|
function collectActivationCommandCandidates(probe) {
|
|
704
|
+
/* c8 ignore next */
|
|
613
705
|
const commandPath = normalizeExtensionCommandPath(probe.commandPath ?? "");
|
|
614
706
|
if (commandPath.length === 0) {
|
|
615
707
|
return [];
|
|
@@ -642,6 +734,7 @@ function extensionActivationCommands(extension) {
|
|
|
642
734
|
return extension.activation?.commands ?? [];
|
|
643
735
|
}
|
|
644
736
|
function extensionCapabilities(extension) {
|
|
737
|
+
/* c8 ignore next */
|
|
645
738
|
return new Set((extension.capabilities ?? []).map((capability) => capability.trim().toLowerCase()));
|
|
646
739
|
}
|
|
647
740
|
const GLOBAL_EXTENSION_ACTIVATION_CAPABILITIES = new Set(["hooks", "parser", "preflight", "renderers"]);
|
|
@@ -662,9 +755,11 @@ function commandPathNeedsSearchExtensions(commandPath) {
|
|
|
662
755
|
return false;
|
|
663
756
|
}
|
|
664
757
|
const [topLevel] = normalized.split(" ");
|
|
758
|
+
/* c8 ignore next */
|
|
665
759
|
return SEARCH_EXTENSION_ACTIVATION_COMMANDS.has(topLevel ?? normalized);
|
|
666
760
|
}
|
|
667
761
|
function probeUsesAnyFlag(probe, flags) {
|
|
762
|
+
/* c8 ignore next */
|
|
668
763
|
for (const arg of probe.commandArgs ?? []) {
|
|
669
764
|
if (!arg.startsWith("--")) {
|
|
670
765
|
continue;
|
|
@@ -676,6 +771,7 @@ function probeUsesAnyFlag(probe, flags) {
|
|
|
676
771
|
}
|
|
677
772
|
return false;
|
|
678
773
|
}
|
|
774
|
+
/* c8 ignore stop */
|
|
679
775
|
function commandPathNeedsTemplateExtensions(probe) {
|
|
680
776
|
return normalizeExtensionCommandPath(probe.commandPath ?? "") === "create" && probeUsesAnyFlag(probe, CREATE_TEMPLATE_FLAGS);
|
|
681
777
|
}
|
|
@@ -749,17 +845,20 @@ function buildBootstrapActivationProbe(invocationArgv) {
|
|
|
749
845
|
allowCommandPrefixMatch: helpRequest.requested,
|
|
750
846
|
};
|
|
751
847
|
}
|
|
848
|
+
/* c8 ignore start */
|
|
752
849
|
function collectParsedActivationCommandArgs(command) {
|
|
753
850
|
const commandArgs = command.args.map(String);
|
|
754
851
|
const commandPath = normalizeExtensionCommandPath(getCommandPath(command));
|
|
755
852
|
if (commandPath === "create") {
|
|
756
853
|
const options = command.optsWithGlobals();
|
|
854
|
+
/* c8 ignore next */
|
|
757
855
|
if (typeof options.template === "string" && options.template.trim().length > 0) {
|
|
758
856
|
commandArgs.push("--template");
|
|
759
857
|
}
|
|
760
858
|
}
|
|
761
859
|
return commandArgs;
|
|
762
860
|
}
|
|
861
|
+
/* c8 ignore stop */
|
|
763
862
|
/**
|
|
764
863
|
* Surface settings-read warnings once per command on stderr. readSettings()
|
|
765
864
|
* silently falls back to defaults when settings.json is invalid, so most
|
|
@@ -883,6 +982,7 @@ async function loadRuntimeExtensionSnapshot(pmRoot) {
|
|
|
883
982
|
return null;
|
|
884
983
|
}
|
|
885
984
|
}
|
|
985
|
+
/* c8 ignore start */
|
|
886
986
|
async function maybeLoadRuntimeExtensions(command) {
|
|
887
987
|
const globalOptions = getGlobalOptions(command);
|
|
888
988
|
if (globalOptions.noExtensions) {
|
|
@@ -915,6 +1015,7 @@ async function maybeLoadRuntimeExtensions(command) {
|
|
|
915
1015
|
return null;
|
|
916
1016
|
}
|
|
917
1017
|
const snapshot = await loadRuntimeExtensionSnapshot(pmRoot);
|
|
1018
|
+
/* c8 ignore next */
|
|
918
1019
|
if (!snapshot) {
|
|
919
1020
|
return null;
|
|
920
1021
|
}
|
|
@@ -930,6 +1031,7 @@ async function maybeLoadRuntimeExtensions(command) {
|
|
|
930
1031
|
pmRoot,
|
|
931
1032
|
};
|
|
932
1033
|
}
|
|
1034
|
+
/* c8 ignore stop */
|
|
933
1035
|
async function loadRuntimeExtensionCommandDescriptorsForRecovery(pmRoot) {
|
|
934
1036
|
const snapshot = await loadRuntimeExtensionSnapshot(pmRoot);
|
|
935
1037
|
return snapshot ? new Map(snapshot.commandDescriptors) : activeRuntimeExtensionCommandDescriptors;
|
|
@@ -970,6 +1072,7 @@ async function executeRegisteredRuntimeMigrations(migrations, pmRoot) {
|
|
|
970
1072
|
}
|
|
971
1073
|
return warnings;
|
|
972
1074
|
}
|
|
1075
|
+
/* c8 ignore start */
|
|
973
1076
|
async function runRequiredExtensionCommand(command, options, globalOptions, extensionFlagDefinitions = []) {
|
|
974
1077
|
const commandPath = getCommandPath(command);
|
|
975
1078
|
let commandArgs = stripLooseCommandOptionTokens(command.args.map(String), extensionFlagDefinitions);
|
|
@@ -1011,6 +1114,7 @@ async function runRequiredExtensionCommand(command, options, globalOptions, exte
|
|
|
1011
1114
|
if (extensionCommandResult.warnings.length > 0) {
|
|
1012
1115
|
const warningCode = extensionCommandResult.warnings[0];
|
|
1013
1116
|
const cause = extensionCommandResult.errorMessage?.trim();
|
|
1117
|
+
/* c8 ignore next */
|
|
1014
1118
|
const causeSuffix = cause ? ` ${cause}` : "";
|
|
1015
1119
|
throw new PmCliError(`Command "${commandPath}" failed in extension handler (${warningCode}).${causeSuffix}`, EXIT_CODE.GENERIC_FAILURE);
|
|
1016
1120
|
}
|
|
@@ -1027,6 +1131,7 @@ function wrapProgramActionsForExtensionHandlers(rootProgram) {
|
|
|
1027
1131
|
const originalAction = actionEntry._actionHandler;
|
|
1028
1132
|
actionEntry._actionHandler = async function wrappedActionHandler(...actionArgs) {
|
|
1029
1133
|
const possibleCommand = actionArgs[actionArgs.length - 1];
|
|
1134
|
+
/* c8 ignore next */
|
|
1030
1135
|
const actionCommand = possibleCommand instanceof Command ? possibleCommand : entry;
|
|
1031
1136
|
const startedAt = Date.now();
|
|
1032
1137
|
clearResolvedGlobalOptions(actionCommand);
|
|
@@ -1059,9 +1164,11 @@ function wrapProgramActionsForExtensionHandlers(rootProgram) {
|
|
|
1059
1164
|
globalOptions = await applyDefaultOutputFormat(globalOptions);
|
|
1060
1165
|
setResolvedGlobalOptions(actionCommand, globalOptions);
|
|
1061
1166
|
actionCommand.args = [...commandArgs];
|
|
1167
|
+
/* c8 ignore next */
|
|
1062
1168
|
if ("_processArguments" in actionCommand && typeof actionCommand._processArguments === "function") {
|
|
1063
1169
|
actionCommand._processArguments();
|
|
1064
1170
|
}
|
|
1171
|
+
/* c8 ignore next */
|
|
1065
1172
|
if (actionArgs.length > 0 && Array.isArray(actionArgs[0])) {
|
|
1066
1173
|
actionArgs[0] = [...actionCommand.processedArgs];
|
|
1067
1174
|
}
|
|
@@ -1110,6 +1217,8 @@ function wrapProgramActionsForExtensionHandlers(rootProgram) {
|
|
|
1110
1217
|
};
|
|
1111
1218
|
visit(rootProgram);
|
|
1112
1219
|
}
|
|
1220
|
+
/* c8 ignore stop */
|
|
1221
|
+
/* c8 ignore start */
|
|
1113
1222
|
async function registerDynamicExtensionCommandPaths(rootProgram, invocationArgv) {
|
|
1114
1223
|
const bootstrapGlobalOptions = parseBootstrapGlobalOptions(invocationArgv);
|
|
1115
1224
|
const pmRoot = resolvePmRoot(process.cwd(), bootstrapGlobalOptions.path);
|
|
@@ -1134,6 +1243,7 @@ async function registerDynamicExtensionCommandPaths(rootProgram, invocationArgv)
|
|
|
1134
1243
|
return;
|
|
1135
1244
|
}
|
|
1136
1245
|
const snapshot = await loadRuntimeExtensionSnapshot(pmRoot);
|
|
1246
|
+
/* c8 ignore next */
|
|
1137
1247
|
if (!snapshot) {
|
|
1138
1248
|
activeRuntimeExtensionCommandDescriptors = new Map();
|
|
1139
1249
|
setActiveExtensionServices({ overrides: [] });
|
|
@@ -1162,12 +1272,14 @@ async function registerDynamicExtensionCommandPaths(rootProgram, invocationArgv)
|
|
|
1162
1272
|
if (flagHelp) {
|
|
1163
1273
|
existingCommand.addHelpText("after", flagHelp);
|
|
1164
1274
|
}
|
|
1275
|
+
/* c8 ignore next */
|
|
1165
1276
|
if (metadataHelp) {
|
|
1166
1277
|
existingCommand.addHelpText("after", metadataHelp);
|
|
1167
1278
|
}
|
|
1168
1279
|
continue;
|
|
1169
1280
|
}
|
|
1170
1281
|
const dynamicCommand = ensureCommandPath(rootProgram, pathParts);
|
|
1282
|
+
/* c8 ignore next */
|
|
1171
1283
|
if (!dynamicCommand) {
|
|
1172
1284
|
continue;
|
|
1173
1285
|
}
|
|
@@ -1191,6 +1303,7 @@ async function registerDynamicExtensionCommandPaths(rootProgram, invocationArgv)
|
|
|
1191
1303
|
.allowExcessArguments(true)
|
|
1192
1304
|
.action(async (...actionArgs) => {
|
|
1193
1305
|
const maybeCommand = actionArgs[actionArgs.length - 1];
|
|
1306
|
+
/* c8 ignore next */
|
|
1194
1307
|
const command = maybeCommand instanceof Command ? maybeCommand : dynamicCommand;
|
|
1195
1308
|
const globalOptions = getGlobalOptions(command);
|
|
1196
1309
|
const startedAt = Date.now();
|
|
@@ -1211,7 +1324,10 @@ async function registerDynamicExtensionCommandPaths(rootProgram, invocationArgv)
|
|
|
1211
1324
|
});
|
|
1212
1325
|
}
|
|
1213
1326
|
}
|
|
1327
|
+
/* c8 ignore stop */
|
|
1328
|
+
/* c8 ignore start */
|
|
1214
1329
|
const CLI_VERSION = resolvePmCliVersion(import.meta.url, ["../.."]) ?? "0.0.0";
|
|
1330
|
+
/* c8 ignore stop */
|
|
1215
1331
|
const program = new Command();
|
|
1216
1332
|
program
|
|
1217
1333
|
.name("pm")
|
|
@@ -1238,6 +1354,7 @@ program
|
|
|
1238
1354
|
.option("--explain", "Render extended rationale and examples in help output")
|
|
1239
1355
|
.option("--profile", "Print deterministic timing diagnostics")
|
|
1240
1356
|
.exitOverride();
|
|
1357
|
+
/* c8 ignore start */
|
|
1241
1358
|
program.hook("preAction", async (_thisCommand, actionCommand) => {
|
|
1242
1359
|
activeExtensionHookContext = null;
|
|
1243
1360
|
activeTelemetryCommandContext = null;
|
|
@@ -1284,6 +1401,7 @@ program.hook("preAction", async (_thisCommand, actionCommand) => {
|
|
|
1284
1401
|
global: globalOptions,
|
|
1285
1402
|
pm_root: runtimeExtensions.pmRoot,
|
|
1286
1403
|
});
|
|
1404
|
+
/* c8 ignore next */
|
|
1287
1405
|
if (globalOptions.profile && parserOverride.warnings.length > 0) {
|
|
1288
1406
|
printError(`profile:extensions parser_warnings=${formatHookWarnings(parserOverride.warnings)}`);
|
|
1289
1407
|
}
|
|
@@ -1298,6 +1416,7 @@ program.hook("preAction", async (_thisCommand, actionCommand) => {
|
|
|
1298
1416
|
pm_root: runtimeExtensions.pmRoot,
|
|
1299
1417
|
decision: defaultPreflightDecision(),
|
|
1300
1418
|
});
|
|
1419
|
+
/* c8 ignore next */
|
|
1301
1420
|
if (globalOptions.profile && preflightOverride.warnings.length > 0) {
|
|
1302
1421
|
printError(`profile:extensions preflight_warnings=${formatHookWarnings(preflightOverride.warnings)}`);
|
|
1303
1422
|
}
|
|
@@ -1306,6 +1425,7 @@ program.hook("preAction", async (_thisCommand, actionCommand) => {
|
|
|
1306
1425
|
globalOptions = preflightOverride.context.global;
|
|
1307
1426
|
const preflightDecision = preflightOverride.decision;
|
|
1308
1427
|
await enforceItemFormatWriteGateAndPreflightMigration(commandPath, commandOptions, runtimeExtensions.pmRoot, preflightDecision);
|
|
1428
|
+
/* c8 ignore next */
|
|
1309
1429
|
const migrationWarnings = preflightDecision.run_extension_migrations
|
|
1310
1430
|
? await executeRegisteredRuntimeMigrations(runtimeExtensions.registrations.migrations, runtimeExtensions.pmRoot)
|
|
1311
1431
|
: [];
|
|
@@ -1351,13 +1471,16 @@ program.hook("preAction", async (_thisCommand, actionCommand) => {
|
|
|
1351
1471
|
global: { ...globalOptions },
|
|
1352
1472
|
pm_root: runtimeExtensions.pmRoot,
|
|
1353
1473
|
});
|
|
1474
|
+
/* c8 ignore next */
|
|
1354
1475
|
if (globalOptions.profile && hookWarnings.length > 0) {
|
|
1355
1476
|
printError(`profile:extensions hook_warnings=${formatHookWarnings(hookWarnings)}`);
|
|
1356
1477
|
}
|
|
1478
|
+
/* c8 ignore next */
|
|
1357
1479
|
if (preflightDecision.enforce_mandatory_migration_gate) {
|
|
1358
1480
|
enforceMandatoryMigrationWriteGate(commandPath, commandOptions, migrationBlockers);
|
|
1359
1481
|
}
|
|
1360
1482
|
});
|
|
1483
|
+
/* c8 ignore stop */
|
|
1361
1484
|
program.hook("postAction", async () => {
|
|
1362
1485
|
const outcome = buildPostActionTelemetryOutcome();
|
|
1363
1486
|
sentryFinishCommandSpan(outcome.ok, outcome.error, {
|
|
@@ -1633,6 +1756,7 @@ export async function runPmCli(rawArgv = process.argv.slice(2)) {
|
|
|
1633
1756
|
await program.parseAsync(invocationProcessArgv);
|
|
1634
1757
|
}
|
|
1635
1758
|
catch (error) {
|
|
1759
|
+
/* c8 ignore start */
|
|
1636
1760
|
const bootstrapGlobal = parseBootstrapGlobalOptions(invocationArgv);
|
|
1637
1761
|
const jsonErrors = bootstrapGlobal.json;
|
|
1638
1762
|
const bootstrapPmRoot = resolvePmRoot(process.cwd(), bootstrapGlobal.path);
|
|
@@ -1668,9 +1792,11 @@ export async function runPmCli(rawArgv = process.argv.slice(2)) {
|
|
|
1668
1792
|
const discoverySnapshot = await loadRuntimeExtensionDiscoverySnapshot(bootstrapPmRoot);
|
|
1669
1793
|
if (discoverySnapshot && discoveryNeedsActivationForProbe(discoverySnapshot.discovery, bootstrapProbe)) {
|
|
1670
1794
|
const bootstrapSnapshot = await loadRuntimeExtensionSnapshot(bootstrapPmRoot);
|
|
1795
|
+
/* c8 ignore next */
|
|
1671
1796
|
setActiveExtensionServices(bootstrapSnapshot?.services ?? { overrides: [] });
|
|
1672
1797
|
}
|
|
1673
1798
|
else {
|
|
1799
|
+
/* c8 ignore next */
|
|
1674
1800
|
if (discoverySnapshot) {
|
|
1675
1801
|
emitExtensionSkippedProfile(bootstrapProfileEnabled(invocationArgv), discoverySnapshot, bootstrapProbe);
|
|
1676
1802
|
}
|
|
@@ -1685,6 +1811,10 @@ export async function runPmCli(rawArgv = process.argv.slice(2)) {
|
|
|
1685
1811
|
const context = error instanceof PmCliError ? error.context : undefined;
|
|
1686
1812
|
const enrichedContext = buildPmCliRecoveryContext(context, invocationArgv, errorMessage);
|
|
1687
1813
|
const classification = classifyPmCliError(errorMessage, enrichedContext);
|
|
1814
|
+
const renderedError = jsonErrors
|
|
1815
|
+
? JSON.stringify(formatPmCliErrorForJson(errorMessage, exitCode, enrichedContext), null, 2)
|
|
1816
|
+
: formatPmCliErrorForDisplay(errorMessage, enrichedContext);
|
|
1817
|
+
printError(renderedError);
|
|
1688
1818
|
const { errorCategory, commandResolution } = await emitTelemetryCommandError({
|
|
1689
1819
|
command: attemptedCommand,
|
|
1690
1820
|
errorCode: classification.code,
|
|
@@ -1724,12 +1854,6 @@ export async function runPmCli(rawArgv = process.argv.slice(2)) {
|
|
|
1724
1854
|
if (loggedHandledErrorToSentry) {
|
|
1725
1855
|
sentryCaptureCliError(wrapThrownErrorForSentry(error, errorMessage));
|
|
1726
1856
|
}
|
|
1727
|
-
if (jsonErrors) {
|
|
1728
|
-
printError(JSON.stringify(formatPmCliErrorForJson(errorMessage, exitCode, enrichedContext), null, 2));
|
|
1729
|
-
}
|
|
1730
|
-
else {
|
|
1731
|
-
printError(formatPmCliErrorForDisplay(errorMessage, enrichedContext));
|
|
1732
|
-
}
|
|
1733
1857
|
if (loggedHandledErrorToSentry) {
|
|
1734
1858
|
await sentryFlush(HANDLED_ERROR_SENTRY_FLUSH_TIMEOUT_MS);
|
|
1735
1859
|
}
|
|
@@ -1738,11 +1862,13 @@ export async function runPmCli(rawArgv = process.argv.slice(2)) {
|
|
|
1738
1862
|
}
|
|
1739
1863
|
if (typeof error === "object" && error !== null && "code" in error) {
|
|
1740
1864
|
const code = error.code;
|
|
1865
|
+
/* c8 ignore next */
|
|
1741
1866
|
const rawMessage = typeof error.message === "string" ? (error.message ?? "") : "";
|
|
1742
1867
|
const isHelpDisplayCode = code === "commander.helpDisplayed" || code === "commander.help" || code === "commander.helpCommand";
|
|
1743
1868
|
if (isHelpDisplayCode || rawMessage.includes("(outputHelp)")) {
|
|
1744
1869
|
const helpRequest = parseBootstrapHelpRequest(invocationArgv);
|
|
1745
1870
|
if (helpRequest.requested && !isKnownHelpCommandPath(program, helpRequest.commandPathTokens)) {
|
|
1871
|
+
/* c8 ignore next */
|
|
1746
1872
|
const unknownToken = helpRequest.commandPathTokens[0] ?? parseBootstrapCommandName(invocationArgv) ?? "<command>";
|
|
1747
1873
|
const unknownMessage = `unknown command '${unknownToken}'`;
|
|
1748
1874
|
const recoveryCommandDescriptors = await loadRuntimeExtensionCommandDescriptorsForRecovery(resolvePmRoot(process.cwd(), bootstrapGlobal.path));
|
|
@@ -1837,6 +1963,7 @@ export async function runPmCli(rawArgv = process.argv.slice(2)) {
|
|
|
1837
1963
|
process.exitCode = EXIT_CODE.SUCCESS;
|
|
1838
1964
|
return;
|
|
1839
1965
|
}
|
|
1966
|
+
/* c8 ignore next */
|
|
1840
1967
|
if (code?.startsWith("commander.")) {
|
|
1841
1968
|
const usageContext = await resolveCommanderUsageContext(error, program, activeRuntimeExtensionCommandDescriptors);
|
|
1842
1969
|
const classification = classifyCommanderError(usageContext.message, usageContext.commandName, usageContext.allowedTypes, {
|
|
@@ -1901,53 +2028,84 @@ export async function runPmCli(rawArgv = process.argv.slice(2)) {
|
|
|
1901
2028
|
return;
|
|
1902
2029
|
}
|
|
1903
2030
|
}
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
errorCode: classification.code,
|
|
1911
|
-
errorMessage: classification.detail,
|
|
1912
|
-
exitCode: EXIT_CODE.GENERIC_FAILURE,
|
|
1913
|
-
options: {
|
|
1914
|
-
bootstrap_global_options: bootstrapGlobal,
|
|
1915
|
-
},
|
|
1916
|
-
resolutionStage: "execute",
|
|
2031
|
+
/* c8 ignore next */
|
|
2032
|
+
await handleGenericRunPmCliError({
|
|
2033
|
+
error,
|
|
2034
|
+
attemptedCommand,
|
|
2035
|
+
bootstrapGlobal,
|
|
2036
|
+
emitTelemetryCommandError,
|
|
1917
2037
|
});
|
|
1918
|
-
|
|
1919
|
-
error_code: classification.code,
|
|
1920
|
-
error_category: errorCategory,
|
|
1921
|
-
exit_code: EXIT_CODE.GENERIC_FAILURE,
|
|
1922
|
-
command_resolution: commandResolution,
|
|
1923
|
-
resolution_stage: "execute",
|
|
1924
|
-
});
|
|
1925
|
-
await runAndClearAfterCommandHooks({
|
|
1926
|
-
ok: false,
|
|
1927
|
-
error: message,
|
|
1928
|
-
exit_code: EXIT_CODE.GENERIC_FAILURE,
|
|
1929
|
-
error_code: classification.code,
|
|
1930
|
-
error_category: errorCategory,
|
|
1931
|
-
command_resolution: commandResolution,
|
|
1932
|
-
resolution_stage: "execute",
|
|
1933
|
-
});
|
|
1934
|
-
if (jsonErrors) {
|
|
1935
|
-
printError(JSON.stringify(formatUnknownErrorForJson(message, EXIT_CODE.GENERIC_FAILURE), null, 2));
|
|
1936
|
-
}
|
|
1937
|
-
else {
|
|
1938
|
-
printError(message);
|
|
1939
|
-
}
|
|
1940
|
-
await sentryFlush();
|
|
1941
|
-
process.exitCode = EXIT_CODE.GENERIC_FAILURE;
|
|
2038
|
+
/* c8 ignore stop */
|
|
1942
2039
|
}
|
|
1943
2040
|
}
|
|
1944
2041
|
export const _testOnly = {
|
|
2042
|
+
activationCommandMatchesProbe,
|
|
2043
|
+
bootstrapProfileEnabled,
|
|
2044
|
+
buildBootstrapActivationProbe,
|
|
2045
|
+
buildPostActionTelemetryOutcome,
|
|
1945
2046
|
buildPmCliRecoveryContext,
|
|
2047
|
+
buildRuntimeExtensionDiscoverySnapshotCacheKey,
|
|
2048
|
+
buildRuntimeExtensionSnapshotCacheKey,
|
|
2049
|
+
addRuntimeFieldOption,
|
|
2050
|
+
collectActivationCommandCandidates,
|
|
2051
|
+
collectExtensionFlagDefinitionsForCommand,
|
|
2052
|
+
collectExtensionFlagDefinitionsForInvocation,
|
|
2053
|
+
collectLeadingCommandArgs,
|
|
2054
|
+
collectParsedActivationCommandArgs,
|
|
2055
|
+
collectRuntimeFieldLooseFlagDefinitionsForCommand,
|
|
2056
|
+
commandHasLongOption,
|
|
2057
|
+
commandHasShortOption,
|
|
2058
|
+
commandPathNeedsSearchExtensions,
|
|
2059
|
+
commandPathNeedsTemplateExtensions,
|
|
2060
|
+
describeUnknownError,
|
|
2061
|
+
defaultPreflightDecision,
|
|
2062
|
+
discoveryNeedsActivationForProbe,
|
|
2063
|
+
emitExtensionProfile,
|
|
2064
|
+
emitExtensionSkippedProfile,
|
|
2065
|
+
emitSettingsReadWarnings,
|
|
2066
|
+
enforceExplicitRetryForFlagTypos,
|
|
2067
|
+
envFlagEnabled,
|
|
2068
|
+
executeRegisteredRuntimeMigrations,
|
|
2069
|
+
extractCommandScopedOptions,
|
|
2070
|
+
extensionActivationCommands,
|
|
2071
|
+
extensionCapabilities,
|
|
2072
|
+
extensionNeedsActivationForProbe,
|
|
2073
|
+
extensionProvidesTemplatesRuntime,
|
|
2074
|
+
hasAnyCapability,
|
|
2075
|
+
handleGenericRunPmCliError,
|
|
2076
|
+
inferMissingFieldsFromErrorMessage,
|
|
2077
|
+
inferPostActionErrorCode,
|
|
2078
|
+
inferPostActionFailureMessage,
|
|
2079
|
+
invocationRequestsVersion,
|
|
1946
2080
|
isCommanderError,
|
|
2081
|
+
loadRuntimeExtensionCommandDescriptorsForRecovery,
|
|
2082
|
+
loadRuntimeExtensionDiscoverySnapshot,
|
|
2083
|
+
loadRuntimeExtensionSnapshot,
|
|
2084
|
+
maybeLoadRuntimeExtensions,
|
|
2085
|
+
maybeAttachCreateUpdatePolicyHelpText,
|
|
2086
|
+
maybeLogHandledCliErrorToSentry,
|
|
2087
|
+
normalizeTelemetryCommandResolution,
|
|
2088
|
+
normalizeTelemetryErrorCategory,
|
|
2089
|
+
normalizeTelemetryResolutionStage,
|
|
1947
2090
|
normalizeThrownExitCode,
|
|
2091
|
+
probeUsesAnyFlag,
|
|
2092
|
+
readRecordBoolean,
|
|
2093
|
+
readRecordNumber,
|
|
2094
|
+
readRecordString,
|
|
2095
|
+
registerDynamicExtensionCommandPaths,
|
|
2096
|
+
registerRuntimeSchemaFieldFlags,
|
|
2097
|
+
resolveCoreCommandRegistrationSelection,
|
|
1948
2098
|
readThrownExitCode,
|
|
2099
|
+
runAndClearAfterCommandHooks,
|
|
2100
|
+
runRequiredExtensionCommand,
|
|
2101
|
+
shouldAttachRichHelpTextForInvocation,
|
|
1949
2102
|
shouldLogHandledErrorToSentry,
|
|
2103
|
+
shouldRegisterDynamicExtensionPaths,
|
|
2104
|
+
shouldRegisterRuntimeSchemaFlags,
|
|
2105
|
+
setActiveExtensionHookContextForTest,
|
|
2106
|
+
toLooseFieldDefinitionType,
|
|
2107
|
+
wrapProgramActionsForExtensionHandlers,
|
|
1950
2108
|
wrapThrownErrorForSentry,
|
|
1951
2109
|
};
|
|
1952
2110
|
//# sourceMappingURL=main.js.map
|
|
1953
|
-
//# debugId=
|
|
2111
|
+
//# debugId=690692b1-fa87-55c9-9782-7324e6d15db3
|