@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
|
@@ -0,0 +1,394 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d9c38660-7b8d-54c6-82c4-12f9a2204743")}catch(e){}}();
|
|
3
|
+
import {
|
|
4
|
+
toNonEmptyStringOrUndefined
|
|
5
|
+
} from "./chunk-KTVETP66.js";
|
|
6
|
+
|
|
7
|
+
// dist/core/governance/metadata-coverage.js
|
|
8
|
+
function normalizeStatus(status, registry) {
|
|
9
|
+
const trimmed = status.trim().toLowerCase();
|
|
10
|
+
return registry.alias_to_id.get(trimmed) ?? trimmed;
|
|
11
|
+
}
|
|
12
|
+
function lifecycleClassifierFromStatusRegistry(registry) {
|
|
13
|
+
return {
|
|
14
|
+
isTerminal(status) {
|
|
15
|
+
return registry.terminal_statuses.has(normalizeStatus(status, registry));
|
|
16
|
+
},
|
|
17
|
+
classify(status) {
|
|
18
|
+
const id = normalizeStatus(status, registry);
|
|
19
|
+
if (registry.terminal_canceled_statuses.has(id)) {
|
|
20
|
+
return "canceled";
|
|
21
|
+
}
|
|
22
|
+
if (registry.terminal_statuses.has(id)) {
|
|
23
|
+
return "closed";
|
|
24
|
+
}
|
|
25
|
+
if (registry.blocked_statuses.has(id)) {
|
|
26
|
+
return "blocked";
|
|
27
|
+
}
|
|
28
|
+
if (registry.draft_statuses.has(id)) {
|
|
29
|
+
return "draft";
|
|
30
|
+
}
|
|
31
|
+
if (id === registry.open_status) {
|
|
32
|
+
return "open";
|
|
33
|
+
}
|
|
34
|
+
if (registry.active_statuses.has(id)) {
|
|
35
|
+
return "in_progress";
|
|
36
|
+
}
|
|
37
|
+
return "other";
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function isAcMissing(item) {
|
|
42
|
+
return toNonEmptyStringOrUndefined(item.acceptance_criteria) === void 0;
|
|
43
|
+
}
|
|
44
|
+
function isEstimateMissing(item) {
|
|
45
|
+
return !Number.isFinite(item.estimated_minutes);
|
|
46
|
+
}
|
|
47
|
+
function isResolutionMissing(item, classifier) {
|
|
48
|
+
if (!classifier.isTerminal(item.status)) {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
return toNonEmptyStringOrUndefined(item.resolution) === void 0;
|
|
52
|
+
}
|
|
53
|
+
function isReviewerMissing(item) {
|
|
54
|
+
return toNonEmptyStringOrUndefined(item.reviewer) === void 0;
|
|
55
|
+
}
|
|
56
|
+
function isRiskMissing(item) {
|
|
57
|
+
return toNonEmptyStringOrUndefined(item.risk) === void 0;
|
|
58
|
+
}
|
|
59
|
+
function isConfidenceMissing(item) {
|
|
60
|
+
if (typeof item.confidence === "number") {
|
|
61
|
+
return !Number.isFinite(item.confidence);
|
|
62
|
+
}
|
|
63
|
+
return toNonEmptyStringOrUndefined(item.confidence) === void 0;
|
|
64
|
+
}
|
|
65
|
+
function isSprintMissing(item) {
|
|
66
|
+
return toNonEmptyStringOrUndefined(item.sprint) === void 0;
|
|
67
|
+
}
|
|
68
|
+
function isReleaseMissing(item) {
|
|
69
|
+
return toNonEmptyStringOrUndefined(item.release) === void 0;
|
|
70
|
+
}
|
|
71
|
+
function hasMissingMetadataFilter(filters) {
|
|
72
|
+
return Boolean(filters.acMissing || filters.estimatesMissing || filters.resolutionMissing || filters.reviewerMissing || filters.riskMissing || filters.confidenceMissing || filters.sprintMissing || filters.releaseMissing || filters.metadataMissing);
|
|
73
|
+
}
|
|
74
|
+
function itemMatchesMissingMetadata(item, filters, classifier) {
|
|
75
|
+
if (!hasMissingMetadataFilter(filters)) {
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
if (filters.acMissing && !isAcMissing(item)) {
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
if (filters.estimatesMissing && !isEstimateMissing(item)) {
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
if (filters.resolutionMissing && !isResolutionMissing(item, classifier)) {
|
|
85
|
+
return false;
|
|
86
|
+
}
|
|
87
|
+
if (filters.reviewerMissing && !isReviewerMissing(item)) {
|
|
88
|
+
return false;
|
|
89
|
+
}
|
|
90
|
+
if (filters.riskMissing && !isRiskMissing(item)) {
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
if (filters.confidenceMissing && !isConfidenceMissing(item)) {
|
|
94
|
+
return false;
|
|
95
|
+
}
|
|
96
|
+
if (filters.sprintMissing && !isSprintMissing(item)) {
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
if (filters.releaseMissing && !isReleaseMissing(item)) {
|
|
100
|
+
return false;
|
|
101
|
+
}
|
|
102
|
+
if (filters.metadataMissing) {
|
|
103
|
+
const anyMissing = isAcMissing(item) || isEstimateMissing(item) || isResolutionMissing(item, classifier);
|
|
104
|
+
if (!anyMissing) {
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
110
|
+
var COVERAGE_FIELD_ORDER = [
|
|
111
|
+
"acceptance_criteria",
|
|
112
|
+
"estimated_minutes",
|
|
113
|
+
"resolution",
|
|
114
|
+
"tags",
|
|
115
|
+
"parent"
|
|
116
|
+
];
|
|
117
|
+
function isFieldPresent(item, field) {
|
|
118
|
+
switch (field) {
|
|
119
|
+
case "acceptance_criteria":
|
|
120
|
+
return !isAcMissing(item);
|
|
121
|
+
case "estimated_minutes":
|
|
122
|
+
return !isEstimateMissing(item);
|
|
123
|
+
case "resolution":
|
|
124
|
+
return toNonEmptyStringOrUndefined(item.resolution) !== void 0;
|
|
125
|
+
case "tags":
|
|
126
|
+
return Array.isArray(item.tags) && item.tags.length > 0;
|
|
127
|
+
default:
|
|
128
|
+
return toNonEmptyStringOrUndefined(item.parent) !== void 0;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
function isFieldApplicable(item, field, classifier) {
|
|
132
|
+
if (field === "resolution") {
|
|
133
|
+
return classifier.isTerminal(item.status);
|
|
134
|
+
}
|
|
135
|
+
return true;
|
|
136
|
+
}
|
|
137
|
+
function roundPercent(present, applicable) {
|
|
138
|
+
if (applicable === 0) {
|
|
139
|
+
return 100;
|
|
140
|
+
}
|
|
141
|
+
return Math.round(present / applicable * 1e3) / 10;
|
|
142
|
+
}
|
|
143
|
+
function emptyFieldCoverage() {
|
|
144
|
+
const record = {};
|
|
145
|
+
for (const field of COVERAGE_FIELD_ORDER) {
|
|
146
|
+
record[field] = { present: 0, applicable: 0, percent: 100 };
|
|
147
|
+
}
|
|
148
|
+
return record;
|
|
149
|
+
}
|
|
150
|
+
function accumulateCoverage(target, item, classifier) {
|
|
151
|
+
for (const field of COVERAGE_FIELD_ORDER) {
|
|
152
|
+
if (!isFieldApplicable(item, field, classifier)) {
|
|
153
|
+
continue;
|
|
154
|
+
}
|
|
155
|
+
const entry = target[field];
|
|
156
|
+
entry.applicable += 1;
|
|
157
|
+
if (isFieldPresent(item, field)) {
|
|
158
|
+
entry.present += 1;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
function finalizePercentages(record) {
|
|
163
|
+
for (const field of COVERAGE_FIELD_ORDER) {
|
|
164
|
+
const entry = record[field];
|
|
165
|
+
entry.percent = roundPercent(entry.present, entry.applicable);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
function computeMetadataCoverage(items, classifier) {
|
|
169
|
+
const overall = emptyFieldCoverage();
|
|
170
|
+
const byType = {};
|
|
171
|
+
for (const item of items) {
|
|
172
|
+
accumulateCoverage(overall, item, classifier);
|
|
173
|
+
const typeRecord = byType[item.type] ?? (byType[item.type] = emptyFieldCoverage());
|
|
174
|
+
accumulateCoverage(typeRecord, item, classifier);
|
|
175
|
+
}
|
|
176
|
+
finalizePercentages(overall);
|
|
177
|
+
for (const typeRecord of Object.values(byType)) {
|
|
178
|
+
finalizePercentages(typeRecord);
|
|
179
|
+
}
|
|
180
|
+
return { overall, by_type: byType };
|
|
181
|
+
}
|
|
182
|
+
var EMPTY_GROUP_LABELS = {
|
|
183
|
+
assignee: "(unassigned)",
|
|
184
|
+
priority: "(no priority)",
|
|
185
|
+
tag: "(untagged)",
|
|
186
|
+
parent: "(unparented)",
|
|
187
|
+
type: "(untyped)",
|
|
188
|
+
status: "(no status)"
|
|
189
|
+
};
|
|
190
|
+
function emptyGroupLabel(dimension) {
|
|
191
|
+
return EMPTY_GROUP_LABELS[dimension];
|
|
192
|
+
}
|
|
193
|
+
function emptyBuckets() {
|
|
194
|
+
return {
|
|
195
|
+
open: 0,
|
|
196
|
+
in_progress: 0,
|
|
197
|
+
blocked: 0,
|
|
198
|
+
draft: 0,
|
|
199
|
+
closed: 0,
|
|
200
|
+
canceled: 0,
|
|
201
|
+
other: 0
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
function groupKeysForItem(item, dimension, options) {
|
|
205
|
+
switch (dimension) {
|
|
206
|
+
case "assignee":
|
|
207
|
+
return [toNonEmptyStringOrUndefined(item.assignee) ?? null];
|
|
208
|
+
case "parent":
|
|
209
|
+
return [toNonEmptyStringOrUndefined(item.parent) ?? null];
|
|
210
|
+
case "type":
|
|
211
|
+
return [toNonEmptyStringOrUndefined(item.type) ?? null];
|
|
212
|
+
case "status":
|
|
213
|
+
return [toNonEmptyStringOrUndefined(item.status) ?? null];
|
|
214
|
+
case "priority":
|
|
215
|
+
return [typeof item.priority === "number" ? `P${item.priority}` : null];
|
|
216
|
+
default: {
|
|
217
|
+
const prefix = options.tagPrefix?.trim();
|
|
218
|
+
const tags = Array.isArray(item.tags) ? item.tags : [];
|
|
219
|
+
const matching = tags.filter((tag) => typeof tag === "string" && tag.length > 0 && (!prefix || tag.startsWith(prefix)));
|
|
220
|
+
return matching.length > 0 ? matching : [null];
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
function groupItemsByDimension(items, dimension, classifier, options = {}) {
|
|
225
|
+
const rows = /* @__PURE__ */ new Map();
|
|
226
|
+
let totalItems = 0;
|
|
227
|
+
for (const item of items) {
|
|
228
|
+
totalItems += 1;
|
|
229
|
+
const bucket = classifier.classify(item.status);
|
|
230
|
+
for (const key of groupKeysForItem(item, dimension, options)) {
|
|
231
|
+
const mapKey = key ?? "\0empty";
|
|
232
|
+
let row = rows.get(mapKey);
|
|
233
|
+
if (!row) {
|
|
234
|
+
row = {
|
|
235
|
+
label: key ?? emptyGroupLabel(dimension),
|
|
236
|
+
key,
|
|
237
|
+
buckets: emptyBuckets(),
|
|
238
|
+
total: 0
|
|
239
|
+
};
|
|
240
|
+
rows.set(mapKey, row);
|
|
241
|
+
}
|
|
242
|
+
row.buckets[bucket] += 1;
|
|
243
|
+
row.total += 1;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
const sorted = [...rows.values()].sort((left, right) => {
|
|
247
|
+
if (right.total !== left.total) {
|
|
248
|
+
return right.total - left.total;
|
|
249
|
+
}
|
|
250
|
+
if (left.key === null) {
|
|
251
|
+
return 1;
|
|
252
|
+
}
|
|
253
|
+
if (right.key === null) {
|
|
254
|
+
return -1;
|
|
255
|
+
}
|
|
256
|
+
return left.label.localeCompare(right.label);
|
|
257
|
+
});
|
|
258
|
+
return { dimension, rows: sorted, total_items: totalItems };
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
// dist/core/governance/content-fields.js
|
|
262
|
+
var CONTENT_FIELD_ORDER = [
|
|
263
|
+
"notes",
|
|
264
|
+
"learnings",
|
|
265
|
+
"files",
|
|
266
|
+
"docs",
|
|
267
|
+
"tests",
|
|
268
|
+
"comments",
|
|
269
|
+
"deps",
|
|
270
|
+
"body",
|
|
271
|
+
"linked_command"
|
|
272
|
+
];
|
|
273
|
+
function hasEntries(value) {
|
|
274
|
+
return Array.isArray(value) && value.length > 0;
|
|
275
|
+
}
|
|
276
|
+
function hasBody(body) {
|
|
277
|
+
return typeof body === "string" && body.trim().length > 0;
|
|
278
|
+
}
|
|
279
|
+
function hasLinkedCommand(tests) {
|
|
280
|
+
if (!Array.isArray(tests)) {
|
|
281
|
+
return false;
|
|
282
|
+
}
|
|
283
|
+
return tests.some((entry) => {
|
|
284
|
+
if (typeof entry !== "object" || entry === null) {
|
|
285
|
+
return false;
|
|
286
|
+
}
|
|
287
|
+
const command = entry.command;
|
|
288
|
+
return typeof command === "string" && command.trim().length > 0;
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
function isContentFieldPresent(item, field) {
|
|
292
|
+
switch (field) {
|
|
293
|
+
case "notes":
|
|
294
|
+
return hasEntries(item.notes);
|
|
295
|
+
case "learnings":
|
|
296
|
+
return hasEntries(item.learnings);
|
|
297
|
+
case "files":
|
|
298
|
+
return hasEntries(item.files);
|
|
299
|
+
case "docs":
|
|
300
|
+
return hasEntries(item.docs);
|
|
301
|
+
case "tests":
|
|
302
|
+
return hasEntries(item.tests);
|
|
303
|
+
case "comments":
|
|
304
|
+
return hasEntries(item.comments);
|
|
305
|
+
case "deps":
|
|
306
|
+
return hasEntries(item.dependencies);
|
|
307
|
+
case "body":
|
|
308
|
+
return hasBody(item.body);
|
|
309
|
+
case "linked_command":
|
|
310
|
+
return hasLinkedCommand(item.tests);
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
function hasContentFieldFilter(filters) {
|
|
314
|
+
return CONTENT_FIELD_ORDER.some((field) => filters[field] !== void 0);
|
|
315
|
+
}
|
|
316
|
+
function itemMatchesContentFilters(item, filters) {
|
|
317
|
+
for (const field of CONTENT_FIELD_ORDER) {
|
|
318
|
+
const selection = filters[field];
|
|
319
|
+
if (selection === void 0) {
|
|
320
|
+
continue;
|
|
321
|
+
}
|
|
322
|
+
const present = isContentFieldPresent(item, field);
|
|
323
|
+
if (selection === "present" && !present) {
|
|
324
|
+
return false;
|
|
325
|
+
}
|
|
326
|
+
if (selection === "absent" && present) {
|
|
327
|
+
return false;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
return true;
|
|
331
|
+
}
|
|
332
|
+
function contentFiltersNeedCollections(filters) {
|
|
333
|
+
return CONTENT_FIELD_ORDER.some((field) => field !== "body" && filters[field] !== void 0);
|
|
334
|
+
}
|
|
335
|
+
function contentFiltersNeedBody(filters) {
|
|
336
|
+
return filters.body !== void 0;
|
|
337
|
+
}
|
|
338
|
+
function roundPercent2(present, total) {
|
|
339
|
+
if (total === 0) {
|
|
340
|
+
return 100;
|
|
341
|
+
}
|
|
342
|
+
return Math.round(present / total * 1e3) / 10;
|
|
343
|
+
}
|
|
344
|
+
function emptyUtilizationFields() {
|
|
345
|
+
const record = {};
|
|
346
|
+
for (const field of CONTENT_FIELD_ORDER) {
|
|
347
|
+
record[field] = { present: 0, total: 0, percent: 100 };
|
|
348
|
+
}
|
|
349
|
+
return record;
|
|
350
|
+
}
|
|
351
|
+
function computeContentFieldUtilization(items) {
|
|
352
|
+
const fields = emptyUtilizationFields();
|
|
353
|
+
const total = items.length;
|
|
354
|
+
for (const item of items) {
|
|
355
|
+
for (const field of CONTENT_FIELD_ORDER) {
|
|
356
|
+
if (isContentFieldPresent(item, field)) {
|
|
357
|
+
fields[field].present += 1;
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
for (const field of CONTENT_FIELD_ORDER) {
|
|
362
|
+
fields[field].total = total;
|
|
363
|
+
fields[field].percent = roundPercent2(fields[field].present, total);
|
|
364
|
+
}
|
|
365
|
+
const bodyPopulated = fields.body;
|
|
366
|
+
const emptyBodyCount = total - bodyPopulated.present;
|
|
367
|
+
const emptyBody = {
|
|
368
|
+
present: emptyBodyCount,
|
|
369
|
+
total,
|
|
370
|
+
percent: roundPercent2(emptyBodyCount, total)
|
|
371
|
+
};
|
|
372
|
+
return {
|
|
373
|
+
total_items: total,
|
|
374
|
+
fields,
|
|
375
|
+
body_populated: bodyPopulated,
|
|
376
|
+
empty_body: emptyBody
|
|
377
|
+
};
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
export {
|
|
381
|
+
lifecycleClassifierFromStatusRegistry,
|
|
382
|
+
hasMissingMetadataFilter,
|
|
383
|
+
itemMatchesMissingMetadata,
|
|
384
|
+
computeMetadataCoverage,
|
|
385
|
+
groupItemsByDimension,
|
|
386
|
+
hasContentFieldFilter,
|
|
387
|
+
itemMatchesContentFilters,
|
|
388
|
+
contentFiltersNeedCollections,
|
|
389
|
+
contentFiltersNeedBody,
|
|
390
|
+
computeContentFieldUtilization
|
|
391
|
+
};
|
|
392
|
+
//# sourceMappingURL=chunk-UAR2VNCK.js.map
|
|
393
|
+
|
|
394
|
+
//# debugId=d9c38660-7b8d-54c6-82c4-12f9a2204743
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../core/governance/metadata-coverage.ts","../../../../../../../../core/governance/content-fields.ts"],"sourcesContent":["/**\n * Metadata governance & coverage observability primitives.\n *\n * One dependency-light module that powers the whole metadata-governance\n * surface: missing-field selection (pm list / pm update-many), coverage\n * percentages (pm stats --metadata-coverage / pm validate), and grouped\n * lifecycle breakdowns (pm stats --by-assignee/--by-tag/--by-priority,\n * pm aggregate explicit labels).\n *\n * The module is pure: it performs no IO and imports no heavy runtime\n * dependencies. Lifecycle semantics are injected via a {@link LifecycleClassifier}\n * so callers map their runtime status registry to lifecycle buckets while the\n * pure logic here stays trivially testable with a fake classifier.\n */\n\nimport { toNonEmptyStringOrUndefined } from \"../shared/primitives.js\";\n\n/** Minimal structural shape this module needs from an item's front matter. */\nexport interface CoverageItem {\n type: string;\n status: string;\n assignee?: string;\n tags?: string[];\n parent?: string;\n priority?: number;\n acceptance_criteria?: string;\n estimated_minutes?: number;\n resolution?: string;\n reviewer?: string;\n risk?: string;\n /** Confidence is a string-like enum or a numeric score depending on workspace. */\n confidence?: string | number;\n sprint?: string;\n release?: string;\n [key: string]: unknown;\n}\n\n/** Lifecycle buckets used by grouped breakdowns and distributions. */\nexport type LifecycleBucket =\n | \"open\"\n | \"in_progress\"\n | \"blocked\"\n | \"draft\"\n | \"closed\"\n | \"canceled\"\n | \"other\";\n\n/** Stable rendering order for lifecycle buckets. */\nexport const LIFECYCLE_BUCKET_ORDER: readonly LifecycleBucket[] = [\n \"open\",\n \"in_progress\",\n \"blocked\",\n \"draft\",\n \"closed\",\n \"canceled\",\n \"other\",\n] as const;\n\n/**\n * Classifies a raw status string into a lifecycle bucket and reports whether a\n * status is terminal (closed/canceled). Callers build this from their resolved\n * runtime status registry via {@link lifecycleClassifierFromStatusRegistry}.\n */\nexport interface LifecycleClassifier {\n classify(status: string): LifecycleBucket;\n isTerminal(status: string): boolean;\n}\n\n/** The subset of a resolved runtime status registry this module consumes. */\nexport interface StatusRegistryLike {\n alias_to_id: Map<string, string>;\n terminal_statuses: Set<string>;\n terminal_canceled_statuses: Set<string>;\n blocked_statuses: Set<string>;\n draft_statuses: Set<string>;\n active_statuses: Set<string>;\n open_status: string;\n}\n\nfunction normalizeStatus(status: string, registry: StatusRegistryLike): string {\n const trimmed = status.trim().toLowerCase();\n return registry.alias_to_id.get(trimmed) ?? trimmed;\n}\n\n/**\n * Adapt a resolved runtime status registry into a {@link LifecycleClassifier}.\n *\n * Precedence is deliberate and disjoint: canceled → closed → blocked → draft →\n * open → in_progress (active but not the default open status) → other.\n */\nexport function lifecycleClassifierFromStatusRegistry(registry: StatusRegistryLike): LifecycleClassifier {\n return {\n isTerminal(status: string): boolean {\n return registry.terminal_statuses.has(normalizeStatus(status, registry));\n },\n classify(status: string): LifecycleBucket {\n const id = normalizeStatus(status, registry);\n if (registry.terminal_canceled_statuses.has(id)) {\n return \"canceled\";\n }\n if (registry.terminal_statuses.has(id)) {\n return \"closed\";\n }\n if (registry.blocked_statuses.has(id)) {\n return \"blocked\";\n }\n if (registry.draft_statuses.has(id)) {\n return \"draft\";\n }\n if (id === registry.open_status) {\n return \"open\";\n }\n if (registry.active_statuses.has(id)) {\n return \"in_progress\";\n }\n return \"other\";\n },\n };\n}\n\n// ---------------------------------------------------------------------------\n// Missing-metadata predicates\n// ---------------------------------------------------------------------------\n\n/** True when an item has no non-empty acceptance_criteria. */\nexport function isAcMissing(item: CoverageItem): boolean {\n return toNonEmptyStringOrUndefined(item.acceptance_criteria) === undefined;\n}\n\n/** True when an item has no finite estimated_minutes. */\nexport function isEstimateMissing(item: CoverageItem): boolean {\n return !Number.isFinite(item.estimated_minutes);\n}\n\n/**\n * True when a terminal (closed/canceled) item has no non-empty resolution.\n * Resolution is only expected on terminal items, so open items are never\n * considered \"resolution-missing\".\n */\nexport function isResolutionMissing(item: CoverageItem, classifier: LifecycleClassifier): boolean {\n if (!classifier.isTerminal(item.status)) {\n return false;\n }\n return toNonEmptyStringOrUndefined(item.resolution) === undefined;\n}\n\n/** True when an item has no non-empty reviewer. */\nexport function isReviewerMissing(item: CoverageItem): boolean {\n return toNonEmptyStringOrUndefined(item.reviewer) === undefined;\n}\n\n/** True when an item has no non-empty risk level. */\nexport function isRiskMissing(item: CoverageItem): boolean {\n return toNonEmptyStringOrUndefined(item.risk) === undefined;\n}\n\n/**\n * True when an item has no confidence value. Confidence is a string-like enum\n * or a numeric score depending on workspace, so a finite number counts as\n * present and only blank/absent values are treated as missing.\n */\nexport function isConfidenceMissing(item: CoverageItem): boolean {\n if (typeof item.confidence === \"number\") {\n return !Number.isFinite(item.confidence);\n }\n return toNonEmptyStringOrUndefined(item.confidence) === undefined;\n}\n\n/** True when an item has no non-empty sprint. */\nexport function isSprintMissing(item: CoverageItem): boolean {\n return toNonEmptyStringOrUndefined(item.sprint) === undefined;\n}\n\n/** True when an item has no non-empty release. */\nexport function isReleaseMissing(item: CoverageItem): boolean {\n return toNonEmptyStringOrUndefined(item.release) === undefined;\n}\n\n/** Selection flags for {@link filterMissingMetadata}. */\nexport interface MissingMetadataFilters {\n acMissing?: boolean;\n estimatesMissing?: boolean;\n resolutionMissing?: boolean;\n reviewerMissing?: boolean;\n riskMissing?: boolean;\n confidenceMissing?: boolean;\n sprintMissing?: boolean;\n releaseMissing?: boolean;\n /** Match items missing ANY of the tracked metadata fields (union). */\n metadataMissing?: boolean;\n}\n\n/** True when any missing-metadata filter is requested. */\nexport function hasMissingMetadataFilter(filters: MissingMetadataFilters): boolean {\n return Boolean(\n filters.acMissing ||\n filters.estimatesMissing ||\n filters.resolutionMissing ||\n filters.reviewerMissing ||\n filters.riskMissing ||\n filters.confidenceMissing ||\n filters.sprintMissing ||\n filters.releaseMissing ||\n filters.metadataMissing,\n );\n}\n\n/**\n * Does a single item satisfy the requested missing-metadata filters?\n *\n * Specific flags (acMissing/estimatesMissing/resolutionMissing plus the\n * governance flags reviewerMissing/riskMissing/confidenceMissing/sprintMissing/\n * releaseMissing) are ANDed together so callers can narrow precisely.\n * `metadataMissing` is ORed in as a union shortcut for \"missing any of the\n * core tracked fields\" (acceptance_criteria/estimated_minutes/resolution); it\n * deliberately excludes the governance fields so the long-standing flag keeps\n * its original meaning. When no filter is requested the item passes.\n */\nexport function itemMatchesMissingMetadata(\n item: CoverageItem,\n filters: MissingMetadataFilters,\n classifier: LifecycleClassifier,\n): boolean {\n if (!hasMissingMetadataFilter(filters)) {\n return true;\n }\n if (filters.acMissing && !isAcMissing(item)) {\n return false;\n }\n if (filters.estimatesMissing && !isEstimateMissing(item)) {\n return false;\n }\n if (filters.resolutionMissing && !isResolutionMissing(item, classifier)) {\n return false;\n }\n if (filters.reviewerMissing && !isReviewerMissing(item)) {\n return false;\n }\n if (filters.riskMissing && !isRiskMissing(item)) {\n return false;\n }\n if (filters.confidenceMissing && !isConfidenceMissing(item)) {\n return false;\n }\n if (filters.sprintMissing && !isSprintMissing(item)) {\n return false;\n }\n if (filters.releaseMissing && !isReleaseMissing(item)) {\n return false;\n }\n if (filters.metadataMissing) {\n const anyMissing =\n isAcMissing(item) || isEstimateMissing(item) || isResolutionMissing(item, classifier);\n if (!anyMissing) {\n return false;\n }\n }\n return true;\n}\n\n/** Filter a list of items by the requested missing-metadata predicates. */\nexport function filterMissingMetadata<T extends CoverageItem>(\n items: readonly T[],\n filters: MissingMetadataFilters,\n classifier: LifecycleClassifier,\n): T[] {\n if (!hasMissingMetadataFilter(filters)) {\n return [...items];\n }\n return items.filter((item) => itemMatchesMissingMetadata(item, filters, classifier));\n}\n\n// ---------------------------------------------------------------------------\n// Metadata coverage percentages\n// ---------------------------------------------------------------------------\n\n/** Coverage-tracked metadata fields. */\nexport type CoverageField =\n | \"acceptance_criteria\"\n | \"estimated_minutes\"\n | \"resolution\"\n | \"tags\"\n | \"parent\";\n\n/** Stable ordering of coverage fields for rendering. */\nexport const COVERAGE_FIELD_ORDER: readonly CoverageField[] = [\n \"acceptance_criteria\",\n \"estimated_minutes\",\n \"resolution\",\n \"tags\",\n \"parent\",\n] as const;\n\n/** Coverage of a single field: present vs applicable, with a rounded percent. */\nexport interface FieldCoverage {\n present: number;\n /** Items for which the field is expected (all items, except resolution = terminal only). */\n applicable: number;\n /** present/applicable * 100, rounded to one decimal; 100 when applicable is 0. */\n percent: number;\n}\n\nexport interface MetadataCoverageReport {\n overall: Record<CoverageField, FieldCoverage>;\n by_type: Record<string, Record<CoverageField, FieldCoverage>>;\n}\n\nfunction isFieldPresent(item: CoverageItem, field: CoverageField): boolean {\n switch (field) {\n case \"acceptance_criteria\":\n return !isAcMissing(item);\n case \"estimated_minutes\":\n return !isEstimateMissing(item);\n case \"resolution\":\n return toNonEmptyStringOrUndefined(item.resolution) !== undefined;\n case \"tags\":\n return Array.isArray(item.tags) && item.tags.length > 0;\n default:\n return toNonEmptyStringOrUndefined(item.parent) !== undefined;\n }\n}\n\n/** Whether a field applies to a given item (resolution only applies to terminal items). */\nfunction isFieldApplicable(item: CoverageItem, field: CoverageField, classifier: LifecycleClassifier): boolean {\n if (field === \"resolution\") {\n return classifier.isTerminal(item.status);\n }\n return true;\n}\n\nfunction roundPercent(present: number, applicable: number): number {\n if (applicable === 0) {\n return 100;\n }\n return Math.round((present / applicable) * 1000) / 10;\n}\n\nfunction emptyFieldCoverage(): Record<CoverageField, FieldCoverage> {\n const record = {} as Record<CoverageField, FieldCoverage>;\n for (const field of COVERAGE_FIELD_ORDER) {\n record[field] = { present: 0, applicable: 0, percent: 100 };\n }\n return record;\n}\n\nfunction accumulateCoverage(\n target: Record<CoverageField, FieldCoverage>,\n item: CoverageItem,\n classifier: LifecycleClassifier,\n): void {\n for (const field of COVERAGE_FIELD_ORDER) {\n if (!isFieldApplicable(item, field, classifier)) {\n continue;\n }\n const entry = target[field];\n entry.applicable += 1;\n if (isFieldPresent(item, field)) {\n entry.present += 1;\n }\n }\n}\n\nfunction finalizePercentages(record: Record<CoverageField, FieldCoverage>): void {\n for (const field of COVERAGE_FIELD_ORDER) {\n const entry = record[field];\n entry.percent = roundPercent(entry.present, entry.applicable);\n }\n}\n\n/**\n * Compute metadata coverage overall and per item type. For each tracked field\n * we report present/applicable counts and a rounded percentage. Resolution is\n * scoped to terminal items (its only applicable population).\n */\nexport function computeMetadataCoverage(\n items: readonly CoverageItem[],\n classifier: LifecycleClassifier,\n): MetadataCoverageReport {\n const overall = emptyFieldCoverage();\n const byType: Record<string, Record<CoverageField, FieldCoverage>> = {};\n for (const item of items) {\n accumulateCoverage(overall, item, classifier);\n const typeRecord = byType[item.type] ?? (byType[item.type] = emptyFieldCoverage());\n accumulateCoverage(typeRecord, item, classifier);\n }\n finalizePercentages(overall);\n for (const typeRecord of Object.values(byType)) {\n finalizePercentages(typeRecord);\n }\n return { overall, by_type: byType };\n}\n\n// ---------------------------------------------------------------------------\n// Grouped lifecycle breakdowns\n// ---------------------------------------------------------------------------\n\n/** Dimensions a breakdown can group by. */\nexport type GroupDimension = \"assignee\" | \"priority\" | \"tag\" | \"parent\" | \"type\" | \"status\";\n\n/** Explicit labels for empty/blank group keys, by dimension. */\nconst EMPTY_GROUP_LABELS: Record<GroupDimension, string> = {\n assignee: \"(unassigned)\",\n priority: \"(no priority)\",\n tag: \"(untagged)\",\n parent: \"(unparented)\",\n type: \"(untyped)\",\n status: \"(no status)\",\n};\n\n/** Explicit label for an empty/blank group value for a given dimension. */\nexport function emptyGroupLabel(dimension: GroupDimension): string {\n return EMPTY_GROUP_LABELS[dimension];\n}\n\nexport interface GroupRow {\n /** Display label; explicit \"(unassigned)\"-style label for blank keys. */\n label: string;\n /** Stable structured key (null for the empty/blank group). */\n key: string | null;\n buckets: Record<LifecycleBucket, number>;\n total: number;\n}\n\nexport interface GroupedBreakdown {\n dimension: GroupDimension;\n rows: GroupRow[];\n /** Distinct items observed (an item can contribute to multiple tag rows). */\n total_items: number;\n}\n\nexport interface GroupOptions {\n /** For dimension=\"tag\": only consider tags starting with this prefix. */\n tagPrefix?: string;\n}\n\nfunction emptyBuckets(): Record<LifecycleBucket, number> {\n return {\n open: 0,\n in_progress: 0,\n blocked: 0,\n draft: 0,\n closed: 0,\n canceled: 0,\n other: 0,\n };\n}\n\n/**\n * Resolve the group keys an item belongs to for a dimension. Most dimensions\n * yield exactly one key (possibly null for blank); tag yields one key per\n * matching tag (or [null] when none match), so an item can span multiple rows.\n */\nfunction groupKeysForItem(item: CoverageItem, dimension: GroupDimension, options: GroupOptions): (string | null)[] {\n switch (dimension) {\n case \"assignee\":\n return [toNonEmptyStringOrUndefined(item.assignee) ?? null];\n case \"parent\":\n return [toNonEmptyStringOrUndefined(item.parent) ?? null];\n case \"type\":\n return [toNonEmptyStringOrUndefined(item.type) ?? null];\n case \"status\":\n return [toNonEmptyStringOrUndefined(item.status) ?? null];\n case \"priority\":\n return [typeof item.priority === \"number\" ? `P${item.priority}` : null];\n default: {\n const prefix = options.tagPrefix?.trim();\n const tags = Array.isArray(item.tags) ? item.tags : [];\n const matching = tags.filter(\n (tag) => typeof tag === \"string\" && tag.length > 0 && (!prefix || tag.startsWith(prefix)),\n );\n return matching.length > 0 ? matching : [null];\n }\n }\n}\n\n/**\n * Group items by a dimension into lifecycle-bucketed rows. Blank keys render\n * with an explicit \"(unassigned)\"-style label. Rows are sorted by total\n * descending, then label ascending, with the empty group sorted last on ties.\n */\nexport function groupItemsByDimension(\n items: readonly CoverageItem[],\n dimension: GroupDimension,\n classifier: LifecycleClassifier,\n options: GroupOptions = {},\n): GroupedBreakdown {\n const rows = new Map<string, GroupRow>();\n let totalItems = 0;\n for (const item of items) {\n totalItems += 1;\n const bucket = classifier.classify(item.status);\n for (const key of groupKeysForItem(item, dimension, options)) {\n const mapKey = key ?? \"\u0000empty\";\n let row = rows.get(mapKey);\n if (!row) {\n row = {\n label: key ?? emptyGroupLabel(dimension),\n key,\n buckets: emptyBuckets(),\n total: 0,\n };\n rows.set(mapKey, row);\n }\n row.buckets[bucket] += 1;\n row.total += 1;\n }\n }\n const sorted = [...rows.values()].sort((left, right) => {\n if (right.total !== left.total) {\n return right.total - left.total;\n }\n // All blank-key items collapse into a single row per dimension, so at most\n // one row has key === null; it sorts last on ties.\n if (left.key === null) {\n return 1;\n }\n if (right.key === null) {\n return -1;\n }\n return left.label.localeCompare(right.label);\n });\n return { dimension, rows: sorted, total_items: totalItems };\n}\n\n/** Lifecycle-bucket distribution across all items (for stats lifecycle section). */\nexport function computeLifecycleDistribution(\n items: readonly CoverageItem[],\n classifier: LifecycleClassifier,\n): Record<LifecycleBucket, number> {\n const buckets = emptyBuckets();\n for (const item of items) {\n buckets[classifier.classify(item.status)] += 1;\n }\n return buckets;\n}\n","/**\n * Content-field governance & utilization primitives.\n *\n * \"Project management = context management\": these primitives let agents query\n * which items carry context (notes/learnings/files/docs/tests/comments/deps/\n * body, plus whether a linked test carries a runnable command) and which do\n * not. The surface powers content-field selection (pm list / pm update-many)\n * and field-utilization reporting (pm stats --field-utilization).\n *\n * The module is pure: it performs no IO and imports no heavy runtime\n * dependencies. Callers pass plain structural item shapes so the logic stays\n * trivially testable.\n */\n\n/** The content fields an item can carry context in. */\nexport type ContentField =\n | \"notes\"\n | \"learnings\"\n | \"files\"\n | \"docs\"\n | \"tests\"\n | \"comments\"\n | \"deps\"\n | \"body\"\n | \"linked_command\";\n\n/** Stable rendering / iteration order for content fields. */\nexport const CONTENT_FIELD_ORDER: readonly ContentField[] = [\n \"notes\",\n \"learnings\",\n \"files\",\n \"docs\",\n \"tests\",\n \"comments\",\n \"deps\",\n \"body\",\n \"linked_command\",\n] as const;\n\n/** Minimal structural shape needed: the collection arrays + optional body. */\nexport interface ContentFieldItem {\n notes?: unknown[];\n learnings?: unknown[];\n files?: unknown[];\n docs?: unknown[];\n tests?: unknown[];\n comments?: unknown[];\n dependencies?: unknown[];\n body?: string;\n [key: string]: unknown;\n}\n\n/** True when `value` is a non-empty array. */\nfunction hasEntries(value: unknown): boolean {\n return Array.isArray(value) && value.length > 0;\n}\n\n/** True when the body string carries non-whitespace content. */\nfunction hasBody(body: unknown): boolean {\n return typeof body === \"string\" && body.trim().length > 0;\n}\n\n/**\n * True when at least one entry in the `tests` array carries a non-empty string\n * `command`. Tolerant of non-object / non-string entries.\n */\nfunction hasLinkedCommand(tests: unknown): boolean {\n if (!Array.isArray(tests)) {\n return false;\n }\n return tests.some((entry) => {\n if (typeof entry !== \"object\" || entry === null) {\n return false;\n }\n const command = (entry as { command?: unknown }).command;\n return typeof command === \"string\" && command.trim().length > 0;\n });\n}\n\n/**\n * True when the given content field carries context on this item.\n * - collection fields: `Array.isArray && length > 0`\n * - \"deps\": maps to the `dependencies` array\n * - \"body\": `typeof body === \"string\" && body.trim().length > 0`\n * - \"linked_command\": `tests` array has at least one entry with a non-empty\n * string `command`\n */\nexport function isContentFieldPresent(item: ContentFieldItem, field: ContentField): boolean {\n switch (field) {\n case \"notes\":\n return hasEntries(item.notes);\n case \"learnings\":\n return hasEntries(item.learnings);\n case \"files\":\n return hasEntries(item.files);\n case \"docs\":\n return hasEntries(item.docs);\n case \"tests\":\n return hasEntries(item.tests);\n case \"comments\":\n return hasEntries(item.comments);\n case \"deps\":\n return hasEntries(item.dependencies);\n case \"body\":\n return hasBody(item.body);\n case \"linked_command\":\n return hasLinkedCommand(item.tests);\n }\n // No default: every ContentField has an explicit case above, so TypeScript\n // enforces exhaustiveness here — adding a new field without a case is a\n // compile error rather than a silent fall-through (and no unreachable branch\n // to dent the literal-100% coverage gate).\n}\n\n/** Per-field selection: 'present' requires the field populated, 'absent' requires it empty. */\nexport type ContentFieldSelection = \"present\" | \"absent\";\n\n/** Map of content fields to a present/absent requirement. */\nexport type ContentFieldFilters = Partial<Record<ContentField, ContentFieldSelection>>;\n\n/** True when at least one content-field selection is requested. */\nexport function hasContentFieldFilter(filters: ContentFieldFilters): boolean {\n return CONTENT_FIELD_ORDER.some((field) => filters[field] !== undefined);\n}\n\n/**\n * Does a single item satisfy the requested content-field filters?\n *\n * AND semantics across all requested fields: each requested field must match\n * its present/absent requirement. When no filter is requested the item passes.\n */\nexport function itemMatchesContentFilters(item: ContentFieldItem, filters: ContentFieldFilters): boolean {\n for (const field of CONTENT_FIELD_ORDER) {\n const selection = filters[field];\n if (selection === undefined) {\n continue;\n }\n const present = isContentFieldPresent(item, field);\n if (selection === \"present\" && !present) {\n return false;\n }\n if (selection === \"absent\" && present) {\n return false;\n }\n }\n return true;\n}\n\n/** Filter a list of items by the requested content-field selections. */\nexport function filterByContentFields<T extends ContentFieldItem>(\n items: readonly T[],\n filters: ContentFieldFilters,\n): T[] {\n if (!hasContentFieldFilter(filters)) {\n return [...items];\n }\n return items.filter((item) => itemMatchesContentFilters(item, filters));\n}\n\n/**\n * Whether a content-field filter set requires the heavy collections to be\n * loaded. True when any non-body field is requested (collections + tests'\n * linked command all live in the heavy front-matter arrays).\n */\nexport function contentFiltersNeedCollections(filters: ContentFieldFilters): boolean {\n return CONTENT_FIELD_ORDER.some((field) => field !== \"body\" && filters[field] !== undefined);\n}\n\n/** Whether a content-field filter set requires the item body to be loaded. */\nexport function contentFiltersNeedBody(filters: ContentFieldFilters): boolean {\n return filters.body !== undefined;\n}\n\n// ---------------------------------------------------------------------------\n// Field utilization\n// ---------------------------------------------------------------------------\n\n/** Utilization of a single content field: present vs total, with a rounded percent. */\nexport interface ContentFieldUtilization {\n present: number;\n total: number;\n /** present/total * 100, rounded to one decimal; 100 when total is 0. */\n percent: number;\n}\n\n/** Per-field utilization report for pm stats --field-utilization. */\nexport interface ContentFieldUtilizationReport {\n total_items: number;\n /** Utilization keyed by content field (includes body and linked_command). */\n fields: Record<ContentField, ContentFieldUtilization>;\n /** Convenience alias mirroring GH-241: identical to `fields.body`. */\n body_populated: ContentFieldUtilization;\n /** Items with an empty body; `present` counts the empty-bodied items. */\n empty_body: ContentFieldUtilization;\n}\n\n/**\n * Round present/total into a one-decimal percentage. Matches the convention in\n * metadata-coverage.ts: a zero population reports 100 (nothing missing).\n */\nfunction roundPercent(present: number, total: number): number {\n if (total === 0) {\n return 100;\n }\n return Math.round((present / total) * 1000) / 10;\n}\n\nfunction emptyUtilizationFields(): Record<ContentField, ContentFieldUtilization> {\n const record = {} as Record<ContentField, ContentFieldUtilization>;\n for (const field of CONTENT_FIELD_ORDER) {\n record[field] = { present: 0, total: 0, percent: 100 };\n }\n return record;\n}\n\n/**\n * Compute content-field utilization across a list of items. For each field we\n * report how many items populate it out of the total, plus a rounded\n * percentage. Convenience `body_populated`/`empty_body` aliases mirror GH-241.\n */\nexport function computeContentFieldUtilization(\n items: readonly ContentFieldItem[],\n): ContentFieldUtilizationReport {\n const fields = emptyUtilizationFields();\n const total = items.length;\n for (const item of items) {\n for (const field of CONTENT_FIELD_ORDER) {\n if (isContentFieldPresent(item, field)) {\n fields[field].present += 1;\n }\n }\n }\n for (const field of CONTENT_FIELD_ORDER) {\n fields[field].total = total;\n fields[field].percent = roundPercent(fields[field].present, total);\n }\n const bodyPopulated = fields.body;\n const emptyBodyCount = total - bodyPopulated.present;\n const emptyBody: ContentFieldUtilization = {\n present: emptyBodyCount,\n total,\n percent: roundPercent(emptyBodyCount, total),\n };\n return {\n total_items: total,\n fields,\n body_populated: bodyPopulated,\n empty_body: emptyBody,\n };\n}\n"],"names":["roundPercent"],"mappings":";;;;;;;AA+EA,SAAS,gBAAgB,QAAgB,UAA4B;AACnE,QAAM,UAAU,OAAO,KAAI,EAAG,YAAW;AACzC,SAAO,SAAS,YAAY,IAAI,OAAO,KAAK;AAC9C;AAQM,SAAU,sCAAsC,UAA4B;AAChF,SAAO;IACL,WAAW,QAAc;AACvB,aAAO,SAAS,kBAAkB,IAAI,gBAAgB,QAAQ,QAAQ,CAAC;IACzE;IACA,SAAS,QAAc;AACrB,YA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AAQ,OAAO;AACxB,eAAW,SAAS,qBAAqB;AACvC,UAAI,sBAAsB,MAAM,KAAK,GAAG;AACtC,eAAO,KAAK,EAAE,WAAW;MAC3B;IACF;EACF;AACA,aAAW,SAAS,qBAAqB;AACvC,WAAO,KAAK,EAAE,QAAQ;AACtB,WAAO,KAAK,EAAE,UAAUA,cAAa,OAAO,KAAK,EAAE,SAAS,KAAK;EACnE;AACA,QAAM,gBAAgB,OAAO;AAC7B,QAAM,iBAAiB,QAAQ,cAAc;AAC7C,QAAM,YAAqC;IACzC,SAAS;IACT;IACA,SAASA,cAAa,gBAAgB,KAAK;;AAE7C,SAAO;IACL,aAAa;IACb;IACA,gBAAgB;IAChB,YAAY;;AAEhB","debugId":"d9c38660-7b8d-54c6-82c4-12f9a2204743"}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="5290e29c-a147-56df-94c4-59907951e37f")}catch(e){}}();
|
|
3
3
|
import {
|
|
4
4
|
resolveTypeName
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ZONXMSVB.js";
|
|
6
6
|
import {
|
|
7
7
|
EXIT_CODE,
|
|
8
8
|
PmCliError
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-KTVETP66.js";
|
|
10
10
|
|
|
11
11
|
// dist/cli/shared-parsers.js
|
|
12
12
|
function parseLimit(raw, label = "--limit") {
|
|
@@ -52,6 +52,6 @@ export {
|
|
|
52
52
|
parsePriority,
|
|
53
53
|
parseType
|
|
54
54
|
};
|
|
55
|
-
//# sourceMappingURL=chunk-
|
|
55
|
+
//# sourceMappingURL=chunk-UBMCSJXX.js.map
|
|
56
56
|
|
|
57
57
|
//# debugId=5290e29c-a147-56df-94c4-59907951e37f
|
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
import {
|
|
4
4
|
hashDocument,
|
|
5
5
|
toItemRecord
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7K2MXFMX.js";
|
|
7
7
|
import {
|
|
8
8
|
canonicalDocument
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-GAVE4MYM.js";
|
|
10
10
|
import {
|
|
11
11
|
FRONT_MATTER_KEY_ORDER,
|
|
12
12
|
orderObject,
|
|
13
13
|
sha256Hex,
|
|
14
14
|
stableStringify
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-KTVETP66.js";
|
|
16
16
|
|
|
17
17
|
// dist/core/history/replay.js
|
|
18
18
|
import jsonPatch from "fast-json-patch";
|
|
@@ -232,6 +232,6 @@ export {
|
|
|
232
232
|
reanchorHistoryEntries,
|
|
233
233
|
historyEntriesToRaw
|
|
234
234
|
};
|
|
235
|
-
//# sourceMappingURL=chunk-
|
|
235
|
+
//# sourceMappingURL=chunk-UUKORJSN.js.map
|
|
236
236
|
|
|
237
237
|
//# debugId=eaf45328-2532-5e1c-9570-442b894b03d3
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
!(function() {
|
|
3
3
|
try {
|
|
4
4
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
5
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
5
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "9264c187-2e9a-59c0-8e99-f7af400748ee");
|
|
6
6
|
} catch (e2) {
|
|
7
7
|
}
|
|
8
8
|
})();
|
|
@@ -76,6 +76,11 @@ var REMEDIATION_REGISTRY = Object.freeze([
|
|
|
76
76
|
command: "pm health --check-telemetry",
|
|
77
77
|
summary: "Client schema is behind server; upgrade pm-cli to emit the latest event shape."
|
|
78
78
|
},
|
|
79
|
+
{
|
|
80
|
+
code: "telemetry_otel_export_failing",
|
|
81
|
+
command: "pm health --check-telemetry",
|
|
82
|
+
summary: "OTLP trace spans are queued but the traces endpoint export is failing; spans retry automatically on the next reachable command, or set PM_TELEMETRY_OTEL_DISABLED=1 to skip OTLP export. Advisory only."
|
|
83
|
+
},
|
|
79
84
|
// --- pm health: integrity ---
|
|
80
85
|
{
|
|
81
86
|
code: "integrity_item_unreadable",
|
|
@@ -309,4 +314,4 @@ export {
|
|
|
309
314
|
buildRemediationMap,
|
|
310
315
|
buildRemediationCommands
|
|
311
316
|
};
|
|
312
|
-
//# sourceMappingURL=chunk-
|
|
317
|
+
//# sourceMappingURL=chunk-W3HFLORZ.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../../core/diagnostics/remediation.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Shared machine-executable remediation registry.\n *\n * `pm health` and `pm validate` both emit stable, colon-delimited warning tokens\n * (for example `history_drift_missing_stream:pm-abcd` or\n * `validate_resolution_missing_fields:3`). Agents that gate on these commands\n * previously had to hardcode the mapping from a warning code to the `pm` command\n * that fixes it. This module is the single source of truth for that mapping so\n * `pm health --json` (per-check `remediation_map`) and `pm validate --fix-hints`\n * (per-check `fix_hints`) can both surface executable remediation without any\n * duplicated, drift-prone lookup tables.\n *\n * Semantics of {@link RemediationEntry.command}: the suggested next `pm` command\n * an operator/agent should run to resolve findings with that code. Per-item\n * findings use an `<id>` placeholder (callers that have the concrete id may\n * substitute it); findings whose only fix is a manual file edit point at the\n * most useful diagnostic/repair command and describe the manual step in\n * {@link RemediationEntry.summary}.\n */\n\nexport interface RemediationEntry {\n /**\n * Stable warning-code prefix this entry resolves. A warning matches when it\n * equals this code or begins with `<code>:`. Registry codes are mutually\n * exclusive under that colon-boundary rule (no code is a `:`-delimited prefix\n * of another — e.g. `settings:id_prefix_empty` is distinct from a bare\n * `settings`, which is intentionally not registered), so `resolveRemediation`\n * uses first-match with no ordering dependency.\n */\n readonly code: string;\n /** Executable `pm` command (or imperative) that resolves the finding. May contain an `<id>` placeholder. */\n readonly command: string;\n /** One-line description of what the command does / which manual step it covers. */\n readonly summary: string;\n}\n\n/**\n * Registry of every non-extension `pm health` / `pm validate` warning code and\n * its remediation. Extension findings keep their richer, contextual\n * `details.triage.remediation` produced by the extension health triage and are\n * intentionally excluded here (see pm-0hnu: \"all non-extension checks\").\n */\nexport const REMEDIATION_REGISTRY: readonly RemediationEntry[] = Object.freeze([\n // --- pm health: directories ---\n {\n code: \"missing_directory\",\n command: \"pm init\",\n summary: \"Recreate missing tracker directories (pm init is idempotent and restores the scaffold).\",\n },\n // --- pm health: settings (read/parse) ---\n {\n code: \"settings_read_invalid_json\",\n command: \"pm config list --json\",\n summary:\n \"settings.json is not valid JSON and pm fell back to defaults; fix the syntax error in the reported path, then re-run.\",\n },\n {\n code: \"settings_read_invalid_schema\",\n command: \"pm config list --json\",\n summary:\n \"settings.json failed schema validation and pm fell back to defaults; correct the reported key in the file, then re-run.\",\n },\n {\n code: \"settings_read_merge_failed\",\n command: \"pm config list --json\",\n summary: \"Global/project settings could not be merged; reconcile the conflicting keys in the reported settings files.\",\n },\n // --- pm health: settings_values ---\n {\n code: \"settings:id_prefix_empty\",\n command: \"pm config list --json\",\n summary: 'id_prefix is empty; set a non-empty \"id_prefix\" in settings.json so generated item ids are well-formed.',\n },\n {\n code: \"settings:locks_ttl_non_positive\",\n command: \"pm config list --json\",\n summary: 'locks.ttl_seconds must be positive; set a positive \"locks.ttl_seconds\" in settings.json.',\n },\n // --- pm health: telemetry (advisory) ---\n {\n code: \"telemetry_state_invalid_json\",\n command: \"pm health --check-telemetry\",\n summary: \"Local telemetry state file is corrupt; pm recreates it on the next flush. Advisory only.\",\n },\n {\n code: \"telemetry_queue_invalid_rows\",\n command: \"pm health --check-telemetry\",\n summary: \"The telemetry queue has unparseable rows; they are skipped on the next flush. Advisory only.\",\n },\n {\n code: \"telemetry_queue_pending\",\n command: \"pm health --check-telemetry\",\n summary: \"Telemetry events are queued; they flush automatically on the next reachable command. Advisory only.\",\n },\n {\n code: \"telemetry_queue_high_retries\",\n command: \"pm telemetry flush\",\n summary:\n \"Some queued telemetry events are near retry exhaustion; flush now and verify endpoint reachability before entries are dropped.\",\n },\n {\n code: \"telemetry_endpoint_probe_failed\",\n command: \"pm health --check-telemetry\",\n summary: \"The telemetry endpoint is unreachable; events stay queued until it recovers. Advisory only.\",\n },\n {\n code: \"telemetry_endpoint_probe_http_status\",\n command: \"pm health --check-telemetry\",\n summary: \"The telemetry endpoint returned a non-success status; events stay queued until it recovers. Advisory only.\",\n },\n {\n code: \"telemetry_schema_version_behind\",\n command: \"pm health --check-telemetry\",\n summary: \"Client schema is behind server; upgrade pm-cli to emit the latest event shape.\",\n },\n {\n code: \"telemetry_otel_export_failing\",\n command: \"pm health --check-telemetry\",\n summary:\n \"OTLP trace spans are queued but the traces endpoint export is failing; spans retry automatically on the next reachable command, or set PM_TELEMETRY_OTEL_DISABLED=1 to skip OTLP export. Advisory only.\",\n },\n // --- pm health: integrity ---\n {\n code: \"integrity_item_unreadable\",\n command: \"pm validate --check-files --verbose-diagnostics\",\n summary: \"An item file could not be read; restore or repair the file at the reported path.\",\n },\n {\n code: \"integrity_item_parse_failed\",\n command: \"pm validate --check-files --verbose-diagnostics\",\n summary: \"An item file failed to parse; fix the malformed front matter at the reported path.\",\n },\n {\n code: \"integrity_item_conflict_marker\",\n command: \"pm validate --check-files --verbose-diagnostics\",\n summary: \"An item file contains Git conflict markers; resolve the <<<<<<< / >>>>>>> markers at the reported line.\",\n },\n {\n code: \"integrity_history_unreadable\",\n command: \"pm history-repair <id>\",\n summary: \"A history stream could not be read; re-anchor the affected item's history chain.\",\n },\n {\n code: \"integrity_history_invalid_json\",\n command: \"pm history-repair <id>\",\n summary: \"A history stream contains invalid JSON; re-anchor the affected item's history chain.\",\n },\n {\n code: \"integrity_history_conflict_marker\",\n command: \"pm history-repair <id>\",\n summary: \"A history stream contains Git conflict markers; resolve the markers, then re-anchor the chain.\",\n },\n // --- pm health: history_drift ---\n // `pm health` rewrites these commands to `pm history-repair --all` in the\n // per-check remediation_map when more than one stream is drifted.\n {\n code: \"history_drift_missing_stream\",\n command: \"pm history-repair <id>\",\n summary: \"The item has no history stream; re-anchor the chain to rebuild it (pm history-repair --all repairs every drifted stream in one pass).\",\n },\n {\n code: \"history_drift_unreadable_stream\",\n command: \"pm history-repair <id>\",\n summary: \"The item's history stream is unreadable; re-anchor the chain (pm history-repair --all repairs every drifted stream in one pass).\",\n },\n {\n code: \"history_drift_hash_mismatch\",\n command: \"pm history-repair <id>\",\n summary: \"The item's content hash no longer matches its history; re-anchor the chain (pm history-repair --all repairs every drifted stream in one pass).\",\n },\n {\n code: \"history_drift_chain_mismatch\",\n command: \"pm history-repair <id>\",\n summary: \"The item's history chain is broken; re-anchor the chain (pm history-repair --all repairs every drifted stream in one pass).\",\n },\n // --- pm health: locks ---\n {\n code: \"locks_stale_count\",\n command: \"pm gc --scope locks\",\n summary:\n \"Stale item-claim locks (embedded ttl elapsed) can block mutations; sweep them — gc retains active and unparseable locks.\",\n },\n {\n code: \"locks_unreadable\",\n command: \"pm gc --scope locks --dry-run\",\n summary:\n \"Some lock files could not be read; preview the sweep and inspect the unreadable files manually — gc never deletes what it cannot read.\",\n },\n // --- pm health: vectorization ---\n {\n code: \"vectorization_stale_items_remaining\",\n command: \"pm health --refresh-vectors\",\n summary: \"Some items have stale embeddings; refresh vectors so semantic search results stay current.\",\n },\n {\n code: \"vectorization_embedding_identity_changed\",\n command: \"pm reindex --mode semantic\",\n summary: \"Embedding provider/model changed since the last index; run a semantic reindex to rebuild vectors.\",\n },\n // --- pm validate: metadata ---\n // Note: validate_metadata_missing_author has no entry on purpose. `pm update\n // --author` sets the mutation/audit author (history), not the item's\n // `metadata.author` front-matter field, and there is no CLI flag that writes\n // that field — so emitting a command here would record an audit entry without\n // clearing the finding. A missing item author must be restored at the source.\n {\n code: \"validate_metadata_missing_acceptance_criteria\",\n command: 'pm update <id> --acceptance-criteria \"<criteria>\"',\n summary: \"Backfill the missing acceptance criteria on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_estimate\",\n command: 'pm update <id> --estimate \"<estimate>\"',\n summary: \"Backfill the missing estimate on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_close_reason\",\n command: 'pm update <id> --close-reason \"<reason>\"',\n summary: \"Backfill the missing close reason on the reported closed item(s).\",\n },\n {\n code: \"validate_metadata_missing_reviewer\",\n command: 'pm update <id> --reviewer \"<name>\"',\n summary: \"Backfill the missing reviewer on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_risk\",\n command: 'pm update <id> --risk \"<level>\"',\n summary: \"Backfill the missing risk on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_confidence\",\n command: 'pm update <id> --confidence \"<level>\"',\n summary: \"Backfill the missing confidence on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_sprint\",\n command: 'pm update <id> --sprint \"<sprint>\"',\n summary: \"Backfill the missing sprint on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_release\",\n command: 'pm update <id> --release \"<release>\"',\n summary: \"Backfill the missing release on the reported item(s).\",\n },\n {\n code: \"validate_metadata_custom_profile_missing_required_fields\",\n command: 'pm config set metadata-required-fields --criterion \"<field>\"',\n summary:\n \"Config-driven finding: the custom metadata profile has no required fields configured and falls back to core, so configure the fields rather than mutating items.\",\n },\n // --- pm validate: resolution ---\n {\n code: \"validate_resolution_missing_fields\",\n command: 'pm update <id> --resolution \"<how resolved>\"',\n summary: \"Backfill resolution / expected_result / actual_result on the reported closed item(s).\",\n },\n // --- pm validate: lifecycle ---\n {\n code: \"validate_lifecycle_active_closure_like_metadata\",\n command: \"pm update <id> --unset <closure-like-field>\",\n summary:\n \"Clear the closure-like field the validator flags on this active item — the detail row names it (resolution / actual-result / blocked-reason) — or close the item if it is actually done.\",\n },\n {\n code: \"validate_lifecycle_active_terminal_parent\",\n command: \"pm update <id> --parent <active-parent-id>\",\n summary: \"Reopen the terminal parent or move the active child under a non-terminal parent.\",\n },\n {\n code: \"validate_lifecycle_stale_blockers\",\n command: \"pm update <id> --unset blocked-by --unset blocked-reason\",\n summary:\n \"Resolve the stale blocker the validator flags: clear blocked-by/blocked-reason when they linger on a non-blocked item or report a resolved blocker; if instead a blocked item is missing blocker context, add the context or move it out of a blocked status.\",\n },\n {\n code: \"validate_lifecycle_dependency_cycles_error\",\n command: \"pm update <id> --dep-remove <dep-id>\",\n summary: \"Break the dependency cycle by removing one edge from the reported cycle.\",\n },\n {\n code: \"validate_lifecycle_dependency_cycles\",\n command: \"pm update <id> --dep-remove <dep-id>\",\n summary: \"Break the dependency cycle by removing one edge from the reported cycle.\",\n },\n // --- pm validate: files ---\n {\n code: \"validate_files_missing_linked_paths\",\n command: \"pm <files|docs> <id> --remove <path>\",\n summary:\n \"The check spans both item.files and item.docs under one code: restore the missing linked artifact, or unlink it with pm files (linked file) or pm docs (linked doc).\",\n },\n {\n code: \"validate_files_orphaned_paths\",\n command: \"pm <files|docs> <id> --add <path>\",\n summary:\n \"Link the orphaned artifact with pm files (file) or pm docs (doc), or remove it from the workspace.\",\n },\n {\n code: \"validate_files_tracked_all_strict_forces_pm_internals\",\n command: \"pm validate --check-files --include-pm-internals\",\n summary: \"tracked-all-strict scan flagged pm internals; re-run with --include-pm-internals or a softer --scan-mode.\",\n },\n // --- pm validate: history_drift ---\n {\n code: \"validate_history_drift_missing_streams\",\n command: \"pm history-repair <id>\",\n summary: \"Re-anchor the history chains of the items missing a history stream.\",\n },\n {\n code: \"validate_history_drift_unreadable_streams\",\n command: \"pm history-repair <id>\",\n summary: \"Re-anchor the history chains of the items with an unreadable history stream.\",\n },\n {\n code: \"validate_history_drift_hash_mismatches\",\n command: \"pm history-repair <id>\",\n summary: \"Re-anchor the history chains of the items whose content hash drifted.\",\n },\n {\n code: \"validate_history_drift_chain_mismatches\",\n command: \"pm history-repair <id>\",\n summary: \"Re-anchor the history chains of the items with a broken history chain.\",\n },\n // --- pm validate: command_references ---\n {\n code: \"validate_command_references_stale_pm_ids\",\n command: 'pm update <id> --replace-tests --test \"command=<corrected-command>\" [--test ...]',\n summary:\n \"Correct the stale pm-ID inside the item's linked test command (the check scans tests[].command, not the body). --replace-tests overwrites the entire tests list, so re-include the item's other linked tests in the same call.\",\n },\n]);\n\n/**\n * Resolve the remediation entry for a warning token, or `undefined` when no\n * entry is registered. A warning matches an entry when it equals the entry code\n * or begins with `<code>:` (the colon boundary keeps sibling codes such as\n * `validate_lifecycle_dependency_cycles` and\n * `validate_lifecycle_dependency_cycles_error` disjoint).\n *\n * First match is intentional and correct: registry codes are mutually exclusive\n * under the colon-boundary rule, so at most one entry can ever match a warning\n * and order is irrelevant. That invariant is enforced by a test (see\n * remediation-registry.spec.ts \"keeps every registry code mutually exclusive\"),\n * which is why this stays a simple linear scan rather than a longest-prefix\n * search — a longest-prefix tie-break is unreachable with disjoint codes.\n *\n * Accepts unknown input defensively (this is an exported helper SDK consumers\n * may call from untyped JS): a non-string `warning` resolves to `undefined`.\n */\nexport function resolveRemediation(warning: string): RemediationEntry | undefined {\n if (typeof warning !== \"string\") {\n return undefined;\n }\n const normalized = warning.trim();\n for (const entry of REMEDIATION_REGISTRY) {\n if (normalized === entry.code || normalized.startsWith(`${entry.code}:`)) {\n return entry;\n }\n }\n return undefined;\n}\n\n/**\n * Build a compact `remediation_map` (code -> command) for a set of warning\n * tokens. First match wins per code; unknown codes are skipped. Used by\n * `pm health --json` per-check details and as the source of deduped executable\n * commands for `pm validate --fix-hints`.\n */\nexport function buildRemediationMap(warnings: Iterable<string>): Record<string, string> {\n const map: Record<string, string> = {};\n for (const warning of warnings) {\n const entry = resolveRemediation(warning);\n if (entry !== undefined && !Object.prototype.hasOwnProperty.call(map, entry.code)) {\n map[entry.code] = entry.command;\n }\n }\n return map;\n}\n\n/**\n * Build a deduped, ordered list of executable remediation commands for a set of\n * warning tokens (one command per distinct matched code). Used by\n * `pm validate --fix-hints` for checks that do not already emit per-row\n * remediation commands.\n */\nexport function buildRemediationCommands(warnings: Iterable<string>): string[] {\n return Object.values(buildRemediationMap(warnings));\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;AA0CO,IAAM,uBAAoD,OAAO,OAAO;;EAE7E;IACE,MAAM;IACN,SAAS;IACT,SAAS;;;EAGX;IACE,MAAM;IACN,SAAS;IACT,SACE;;EAEJ;IACE,MAAM;IACN,SAAS;IACT,SACE;;EAEJ;IACE,MAAM;IACN,SAAS;IACT,SAAS;;;EAGX;IACE,MAAM;IACN,SAAS;IACT,SAAS;;EAEX;IACE,MAAM;IACN,SAAS;IACT,SAAS;;;EAGX;IACE,MAAM;IACN,SAAS;IACT,SAAS;;EAEX;IACE,MAAM;IACN,SAAS;IACT,SAAS;;EAEX;IACE,MAAM;IACN,SAAS;IACT,SAAS;;EAEX;IACE,MAAM;IACN,SAAS;IACT,SACE;;EAEJ;IACE,MAAM;IACN,SAAS;IACT,SAAS;;EAEX;IACE,MAAM;IACN,SAAS;IACT,SAAS;;EAEX;IACE,MAAM;IACN,SAAS;IACT,SAAS;;EAEX;IACE,MAAM;IACN,SAAS;IACT,SACE;;;EAGJ;IACE,MAAM;IACN,SAAS;IACT,SAAS;;EAEX;IACE,MAAM;IACN,SAAS;IACT,SAAS;;EAEX;IACE,MAAM;IACN,SAAS;IACT,SAAS;;EAEX;IACE,MAAM;IACN,SAAS;IACT,SAAS;;EAEX;IACE,MAAM;IACN,SAAS;IACT,SAAS;;EAEX;IACE,MAAM;IACN,SAAS;IACT,SAAS;;;;;EAKX;IACE,MAAM;IACN,SAAS;IACT,SAAS;;EAEX;IACE,MAAM;IACN,SAAS;IACT,SAAS;;EAEX;IACE,MAAM;IACN,SAAS;IACT,SAAS;;EAEX;IACE,MAAM;IACN,SAAS;IACT,SAAS;;;EAGX;IACE,MAAM;IACN,SAAS;IACT,SACE;;EAEJ;IACE,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AI,GAAG,GAAG;AACxE,aAAO;IACT;EACF;AACA,SAAO;AACT;AAQM,SAAU,oBAAoB,UAA0B;AAC5D,QAAM,MAA8B,CAAA;AACpC,aAAW,WAAW,UAAU;AAC9B,UAAM,QAAQ,mBAAmB,OAAO;AACxC,QAAI,UAAU,UAAa,CAAC,OAAO,UAAU,eAAe,KAAK,KAAK,MAAM,IAAI,GAAG;AACjF,UAAI,MAAM,IAAI,IAAI,MAAM;IAC1B;EACF;AACA,SAAO;AACT;AAQM,SAAU,yBAAyB,UAA0B;AACjE,SAAO,OAAO,OAAO,oBAAoB,QAAQ,CAAC;AACpD;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TYPE_TO_FOLDER,
|
|
3
3
|
pathExists
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-LV5FFQ7M.js";
|
|
5
5
|
|
|
6
6
|
// dist/core/item/id.js
|
|
7
7
|
import crypto from "node:crypto";
|
|
@@ -75,4 +75,4 @@ export {
|
|
|
75
75
|
normalizeItemId,
|
|
76
76
|
generateItemId
|
|
77
77
|
};
|
|
78
|
-
//# sourceMappingURL=chunk-
|
|
78
|
+
//# sourceMappingURL=chunk-WZCQVABQ.js.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// dist/cli/commands/list-filter-shared.js
|
|
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]="a367b520-b891-596b-9893-1d7b3b9087e0")}catch(e){}}();
|
|
4
|
+
function isActiveListFilterValue(value) {
|
|
5
|
+
return value != null && (typeof value !== "string" || value.split(",").some((entry) => entry.trim().length > 0));
|
|
6
|
+
}
|
|
7
|
+
function hasListFilters(list, status, options = {}) {
|
|
8
|
+
const includePagination = options.includePagination !== false;
|
|
9
|
+
return isActiveListFilterValue(status) || isActiveListFilterValue(list?.status) || isActiveListFilterValue(list?.type) || isActiveListFilterValue(list?.tag) || isActiveListFilterValue(list?.priority) || isActiveListFilterValue(list?.deadlineBefore) || isActiveListFilterValue(list?.deadlineAfter) || isActiveListFilterValue(list?.updatedAfter) || isActiveListFilterValue(list?.updatedBefore) || isActiveListFilterValue(list?.createdAfter) || isActiveListFilterValue(list?.createdBefore) || isActiveListFilterValue(list?.ids) || isActiveListFilterValue(list?.assignee) || isActiveListFilterValue(list?.assigneeFilter) || isActiveListFilterValue(list?.parent) || isActiveListFilterValue(list?.sprint) || isActiveListFilterValue(list?.release) || list?.filterAcMissing === true || list?.filterEstimatesMissing === true || list?.filterResolutionMissing === true || list?.filterMetadataMissing === true || list?.filterReviewerMissing === true || list?.filterRiskMissing === true || list?.filterConfidenceMissing === true || list?.filterSprintMissing === true || list?.filterReleaseMissing === true || list?.hasNotes === true || list?.hasLearnings === true || list?.hasFiles === true || list?.hasDocs === true || list?.hasTests === true || list?.hasComments === true || list?.hasDeps === true || list?.hasBody === true || list?.hasLinkedCommand === true || list?.noNotes === true || list?.noLearnings === true || list?.noFiles === true || list?.noDocs === true || list?.noTests === true || list?.noComments === true || list?.noDeps === true || list?.emptyBody === true || list?.noLinkedCommand === true || includePagination && isActiveListFilterValue(list?.limit) || includePagination && isActiveListFilterValue(list?.offset);
|
|
10
|
+
}
|
|
11
|
+
function buildListQueryFilters(filters) {
|
|
12
|
+
return {
|
|
13
|
+
type: filters.type,
|
|
14
|
+
tag: filters.tag,
|
|
15
|
+
priority: filters.priority,
|
|
16
|
+
deadlineBefore: filters.deadlineBefore,
|
|
17
|
+
deadlineAfter: filters.deadlineAfter,
|
|
18
|
+
assignee: filters.assignee,
|
|
19
|
+
assigneeFilter: filters.assigneeFilter,
|
|
20
|
+
parent: filters.parent,
|
|
21
|
+
sprint: filters.sprint,
|
|
22
|
+
release: filters.release
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export {
|
|
27
|
+
hasListFilters,
|
|
28
|
+
buildListQueryFilters
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=chunk-X3W5ESZQ.js.map
|
|
31
|
+
|
|
32
|
+
//# debugId=a367b520-b891-596b-9893-1d7b3b9087e0
|