@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 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../core/schema/item-types-file.ts"],"sourcesContent":["import { BUILTIN_ITEM_TYPE_VALUES } from \"../../types/index.js\";\nimport type { ItemTypeDefinition } from \"../../types/index.js\";\nimport { toDefaultFolder } from \"../item/type-registry.js\";\n\nexport type { ItemTypeDefinition } from \"../../types/index.js\";\n\n/**\n * Pure logic for the `pm schema add-type` command and the create/update\n * invalid-type discoverability hint. The CLI command file (schema.ts) handles\n * IO/governance; everything testable and side-effect-free lives here so it can\n * be coverage-gated to 100%.\n */\n\nconst BUILTIN_NAME_LOOKUP = new Map<string, string>(\n BUILTIN_ITEM_TYPE_VALUES.map((name) => [name.toLowerCase(), name]),\n);\n\n/**\n * The shape persisted at `.agents/pm/schema/types.json`.\n */\nexport interface ItemTypesFile {\n definitions: ItemTypeDefinition[];\n}\n\nexport interface NormalizedAddTypeInput {\n name: string;\n description?: string;\n defaultStatus?: string;\n folder?: string;\n aliases: string[];\n}\n\nexport interface RawAddTypeInput {\n name: string | undefined;\n description?: string;\n defaultStatus?: string;\n folder?: string;\n aliases?: string[];\n}\n\nexport interface UpsertItemTypeResult {\n file: ItemTypesFile;\n /** The definition as stored after the upsert (existing fields preserved). */\n definition: ItemTypeDefinition;\n /** True when an existing definition with the same (case-insensitive) name was replaced. */\n replaced: boolean;\n /**\n * The canonical name of the replaced definition (only present when `replaced`).\n * Lets the caller detect a silent recase (e.g. \"Spike\" -> \"spike\") and warn.\n */\n previousName?: string;\n}\n\n/**\n * Custom item type names (and aliases) must be a single letter-led identifier\n * token: letters, digits, hyphen, or underscore — no whitespace or other\n * punctuation. This keeps names copy-pasteable as shell arguments and folder\n * slugs deterministic, matching the single-token PascalCase shape of every\n * built-in type. Folder/slug overlap between two distinct valid tokens (e.g.\n * \"Spike\"/\"Spikes\", \"code-review\"/\"code_review\") is rejected separately by\n * assertTypeFolderAvailable.\n */\nconst TYPE_NAME_TOKEN_PATTERN = /^[A-Za-z][A-Za-z0-9_-]*$/;\n\nfunction assertValidTypeToken(value: string, label: string): void {\n if (!TYPE_NAME_TOKEN_PATTERN.test(value)) {\n throw new Error(\n `${label} \"${value}\" is not a valid identifier. Use a single letter-led token of letters, digits, hyphen, or underscore with no spaces or punctuation (e.g. \"Spike\" or \"code-review\").`,\n );\n }\n}\n\nexport interface RemoveItemTypeResult {\n file: ItemTypesFile;\n /** True when a matching definition existed and was dropped from the file. */\n removed: boolean;\n /** The removed definition, when one matched (case-insensitively) the requested name. */\n definition?: ItemTypeDefinition;\n}\n\n/**\n * Returns the canonical built-in name when `name` collides (case-insensitively)\n * with a reserved built-in item type, otherwise undefined.\n */\nexport function matchBuiltinTypeName(name: string): string | undefined {\n return BUILTIN_NAME_LOOKUP.get(name.trim().toLowerCase());\n}\n\n/**\n * Coerces a persisted `aliases` value into a string array, tolerating malformed\n * data (a non-array, or an array containing non-string entries) without throwing\n * or exploding a stray string into character aliases.\n */\nfunction coerceAliasArray(value: unknown): string[] {\n return Array.isArray(value) ? value.filter((entry): entry is string => typeof entry === \"string\") : [];\n}\n\n/**\n * Escapes a value for safe interpolation inside a double-quoted shell string so\n * suggested copy-pasteable commands stay well-formed for names containing\n * `\"`, `` ` ``, `$`, or `\\`.\n */\nexport function escapeForDoubleQuotes(value: string): string {\n return value.replace(/[\\\\\"`$]/g, (char) => `\\\\${char}`);\n}\n\nfunction dedupeAliases(values: Iterable<string>): string[] {\n const seen = new Map<string, string>();\n for (const value of values) {\n const trimmed = value.trim();\n if (trimmed.length === 0) {\n continue;\n }\n const key = trimmed.toLowerCase();\n if (!seen.has(key)) {\n seen.set(key, trimmed);\n }\n }\n return [...seen.values()].sort((left, right) => left.localeCompare(right));\n}\n\n/**\n * Validates and normalizes raw add-type CLI input. Throws a plain Error with a\n * stable message when the name is missing/empty or collides with a built-in;\n * the CLI layer maps these to PmCliError exit codes.\n */\nexport function normalizeAddTypeInput(raw: RawAddTypeInput): NormalizedAddTypeInput {\n const name = (raw.name ?? \"\").trim();\n if (name.length === 0) {\n throw new Error(\"Type name must not be empty.\");\n }\n assertValidTypeToken(name, \"Type name\");\n const builtinMatch = matchBuiltinTypeName(name);\n if (builtinMatch) {\n throw new Error(\n `Cannot redefine built-in item type \"${builtinMatch}\". Built-in types are reserved: ${BUILTIN_ITEM_TYPE_VALUES.join(\", \")}.`,\n );\n }\n const description = raw.description?.trim();\n const defaultStatus = raw.defaultStatus?.trim();\n const folder = raw.folder?.trim();\n const aliases = dedupeAliases(raw.aliases ?? []);\n for (const alias of aliases) {\n assertValidTypeToken(alias, \"Alias\");\n const aliasBuiltin = matchBuiltinTypeName(alias);\n if (aliasBuiltin) {\n throw new Error(\n `Alias \"${alias}\" collides with built-in item type \"${aliasBuiltin}\". Built-in types are reserved: ${BUILTIN_ITEM_TYPE_VALUES.join(\", \")}.`,\n );\n }\n }\n return {\n name,\n description: description && description.length > 0 ? description : undefined,\n defaultStatus: defaultStatus && defaultStatus.length > 0 ? defaultStatus : undefined,\n folder: folder && folder.length > 0 ? folder : undefined,\n aliases,\n };\n}\n\n/**\n * Throws when the requested name or any alias collides (case-insensitively)\n * with the canonical name or an alias of a DIFFERENT existing definition.\n * Such collisions would make `pm create`/`pm update --type` resolve\n * ambiguously (the runtime registry keys a single lowercase alias map), so\n * they are rejected. Tokens belonging to the same-named definition being\n * upserted are ignored, keeping re-runs idempotent.\n */\nexport function assertAliasesAvailable(input: NormalizedAddTypeInput, existing: ItemTypesFile): void {\n const selfLower = input.name.toLowerCase();\n const taken = new Map<string, string>();\n for (const definition of existing.definitions) {\n if (typeof definition.name !== \"string\") {\n continue;\n }\n const definitionName = definition.name.trim();\n if (definitionName.length === 0 || definitionName.toLowerCase() === selfLower) {\n continue;\n }\n taken.set(definitionName.toLowerCase(), definitionName);\n for (const alias of coerceAliasArray(definition.aliases)) {\n if (alias.trim().length > 0) {\n taken.set(alias.trim().toLowerCase(), definitionName);\n }\n }\n }\n const nameOwner = taken.get(selfLower);\n if (nameOwner) {\n throw new Error(`Type name \"${input.name}\" collides with an alias of existing item type \"${nameOwner}\".`);\n }\n for (const alias of input.aliases) {\n const owner = taken.get(alias.toLowerCase());\n if (owner) {\n throw new Error(`Alias \"${alias}\" already maps to existing item type \"${owner}\".`);\n }\n }\n}\n\n/**\n * Resolves the storage folder a definition would use: an explicit non-empty\n * `folder` wins, otherwise the deterministic slug derived from the name (the\n * same derivation the runtime registry applies, single-sourced from\n * type-registry.toDefaultFolder).\n */\nfunction resolveDefinitionFolder(name: string, folder: unknown): string {\n if (typeof folder === \"string\" && folder.trim().length > 0) {\n return folder.trim().toLowerCase();\n }\n return toDefaultFolder(name).toLowerCase();\n}\n\n/**\n * Throws when the requested type's storage folder would collide with a\n * DIFFERENT existing definition's folder. Two distinct type names can slug to\n * one folder (\"Spike\"/\"Spikes\", \"code-review\"/\"code_review\"), which would make\n * their item files share a directory and silently corrupt the taxonomy. The\n * same-named definition being upserted is ignored (folder reuse on re-run is\n * expected). Resolving the collision is a matter of passing a distinct\n * `--folder`, so the error says so.\n *\n * `reservedFolders` carries the folders already owned by built-in and extension\n * types (folder-slug → owner name); a custom type whose slug matches one of\n * those (e.g. \"Tasks\" → \"tasks\", owned by the built-in Task) is just as\n * corrupting as a custom-vs-custom collision, so both are checked.\n */\nexport function assertTypeFolderAvailable(\n input: NormalizedAddTypeInput,\n existing: ItemTypesFile,\n reservedFolders?: ReadonlyMap<string, string>,\n): void {\n const selfLower = input.name.toLowerCase();\n const inputFolder = resolveDefinitionFolder(input.name, input.folder);\n const fail = (ownerName: string): never => {\n throw new Error(\n `Item type \"${input.name}\" would store items in folder \"${inputFolder}\", which already belongs to existing item type \"${ownerName}\". Pass a distinct --folder to keep their storage separate.`,\n );\n };\n for (const definition of existing.definitions) {\n if (typeof definition.name !== \"string\") {\n continue;\n }\n const definitionName = definition.name.trim();\n if (definitionName.length === 0 || definitionName.toLowerCase() === selfLower) {\n continue;\n }\n if (resolveDefinitionFolder(definitionName, definition.folder) === inputFolder) {\n fail(definitionName);\n }\n }\n const reservedOwner = reservedFolders?.get(inputFolder);\n if (reservedOwner !== undefined && reservedOwner.toLowerCase() !== selfLower) {\n fail(reservedOwner);\n }\n}\n\n/**\n * Coerces an arbitrary parsed value from types.json into an ItemTypesFile.\n * Accepts the canonical `{ definitions: [...] }` shape, a bare array of\n * definitions, or a nested `{ item_types: { definitions: [...] } }` form, and\n * tolerates a missing/invalid file by returning an empty definitions list.\n */\nexport function parseItemTypesFile(raw: string | null | undefined): ItemTypesFile {\n if (raw === null || raw === undefined || raw.trim().length === 0) {\n return { definitions: [] };\n }\n let parsed: unknown;\n try {\n parsed = JSON.parse(raw) as unknown;\n } catch {\n throw new Error(\"schema/types.json contains invalid JSON.\");\n }\n return { definitions: extractDefinitions(parsed) };\n}\n\nfunction extractDefinitions(parsed: unknown): ItemTypeDefinition[] {\n const candidate = selectDefinitionsArray(parsed);\n if (!candidate) {\n return [];\n }\n const definitions: ItemTypeDefinition[] = [];\n for (const entry of candidate) {\n if (typeof entry !== \"object\" || entry === null || Array.isArray(entry)) {\n continue;\n }\n const record = entry as Record<string, unknown>;\n if (typeof record.name !== \"string\" || record.name.trim().length === 0) {\n continue;\n }\n definitions.push(record as unknown as ItemTypeDefinition);\n }\n return definitions;\n}\n\nfunction selectDefinitionsArray(parsed: unknown): unknown[] | undefined {\n if (Array.isArray(parsed)) {\n return parsed;\n }\n if (typeof parsed !== \"object\" || parsed === null) {\n return undefined;\n }\n const record = parsed as Record<string, unknown>;\n if (Array.isArray(record.definitions)) {\n return record.definitions;\n }\n if (typeof record.item_types === \"object\" && record.item_types !== null) {\n const nested = record.item_types as Record<string, unknown>;\n if (Array.isArray(nested.definitions)) {\n return nested.definitions;\n }\n }\n return undefined;\n}\n\n/**\n * Idempotent UPSERT of a custom item type into the parsed file. Matching is\n * case-insensitive by name. When a definition already exists, fields supplied\n * in `input` override the previous values; aliases are merged (deduped); other\n * fields not addressed by add-type flags are preserved untouched.\n */\nexport function upsertItemType(file: ItemTypesFile, input: NormalizedAddTypeInput): UpsertItemTypeResult {\n const lowerName = input.name.toLowerCase();\n const definitions = file.definitions.slice();\n const existingIndex = definitions.findIndex(\n (definition) => typeof definition.name === \"string\" && definition.name.trim().toLowerCase() === lowerName,\n );\n const existing = existingIndex >= 0 ? definitions[existingIndex] : undefined;\n\n const mergedAliases = dedupeAliases([...coerceAliasArray(existing?.aliases), ...input.aliases]);\n\n const next: ItemTypeDefinition = {\n ...(existing ?? {}),\n name: input.name,\n };\n if (input.folder !== undefined) {\n next.folder = input.folder;\n }\n if (mergedAliases.length > 0) {\n next.aliases = mergedAliases;\n } else if (next.aliases !== undefined) {\n delete next.aliases;\n }\n applyAttribute(next, \"description\", input.description);\n applyAttribute(next, \"default_status\", input.defaultStatus);\n\n if (existingIndex >= 0) {\n definitions[existingIndex] = next;\n } else {\n definitions.push(next);\n }\n definitions.sort((left, right) => left.name.localeCompare(right.name));\n\n return {\n file: { definitions },\n definition: next,\n replaced: existingIndex >= 0,\n ...(existing && typeof existing.name === \"string\" ? { previousName: existing.name } : {}),\n };\n}\n\n/**\n * Removes a custom item type definition from the parsed file by name\n * (case-insensitive). Throws a plain Error when `name` is empty or collides\n * with a reserved built-in type (built-ins are not stored in the file and must\n * never be deletable). Returns `removed: false` when no matching custom\n * definition exists so the CLI layer can treat the call as an idempotent no-op.\n */\nexport function removeItemType(file: ItemTypesFile, name: string | undefined): RemoveItemTypeResult {\n const trimmed = (name ?? \"\").trim();\n if (trimmed.length === 0) {\n throw new Error(\"Type name must not be empty.\");\n }\n const builtinMatch = matchBuiltinTypeName(trimmed);\n if (builtinMatch) {\n throw new Error(\n `Cannot remove built-in item type \"${builtinMatch}\". Built-in types are reserved: ${BUILTIN_ITEM_TYPE_VALUES.join(\", \")}.`,\n );\n }\n const lowerName = trimmed.toLowerCase();\n const definitions = file.definitions.slice();\n const existingIndex = definitions.findIndex(\n (definition) => typeof definition.name === \"string\" && definition.name.trim().toLowerCase() === lowerName,\n );\n if (existingIndex < 0) {\n return { file: { definitions }, removed: false };\n }\n const [definition] = definitions.splice(existingIndex, 1);\n return { file: { definitions }, removed: true, definition };\n}\n\nfunction applyAttribute(definition: ItemTypeDefinition, key: string, value: string | undefined): void {\n const record = definition as unknown as Record<string, unknown>;\n if (value !== undefined) {\n record[key] = value;\n }\n}\n\n/**\n * Serializes the item types file with a trailing newline (matches the rest of\n * the schema scaffold files written by pm).\n */\nexport function serializeItemTypesFile(file: ItemTypesFile): string {\n return `${JSON.stringify({ definitions: file.definitions }, null, 2)}\\n`;\n}\n\n/**\n * Appends a discoverable hint to the \"Invalid type\" error so agents learn that\n * custom types exist and how to register one. Quotes are chosen so the printed\n * line is copy-pasteable as a shell command.\n */\nexport function buildInvalidTypeHint(name: string, typesFilePath?: string): string {\n const safeName = name.trim().length > 0 ? name.trim() : name;\n const target = typesFilePath?.trim() || \".agents/pm/schema/types.json\";\n return `To register a custom type, run: pm schema add-type \"${escapeForDoubleQuotes(safeName)}\" (writes ${target}).`;\n}\n\n/**\n * Builds the full invalid-type error message used by create/update: the\n * existing \"Invalid type ... Allowed: ...\" line plus the discoverable hint.\n * `typesFilePath` should be the resolved schema/types.json path for the active\n * tracker (see {@link resolveItemTypesFilePath}) so the hint reflects a custom\n * `--pm-path` instead of the hardcoded `.agents/pm` default.\n */\nexport function buildInvalidTypeError(name: string, allowedTypes: readonly string[], typesFilePath?: string): string {\n return `Invalid type value \"${name}\". Allowed: ${allowedTypes.join(\", \")}. ${buildInvalidTypeHint(name, typesFilePath)}`;\n}\n"],"names":["definition"],"mappings":";;;;;;;;;;AAaA,IAAM,sBAAsB,IAAI,IAC9B,yBAAyB,IAAI,CAAC,SAAS,CAAC,KAAK,YAAW,GAAI,IAAI,CAAC,CAAC;AAgDpE,IAAM,0BAA0B;AAEhC,SAAS,qBAAqB,OAAe,OAAa;AACxD,MAAI,CAAC,wBAAwB,KAAK,KAAK,GAAG;AACxC,UAAM,IAAI,MACR,GAAG,KAAK,KAAK,KAAK,qKAAqK;EAE3L;AACF;AAcM,SAAU,qBAAqB,MAAY;AAC/C,SAAO,oBAAoB,IAAI,KAAK,KAAI,EAAG,YAAW,CAAE;AAC1D;AAOA,SAAS,iBAAiB,OAAc;AACtC,SAAO,MAAM,QAAQ,KAAK,IAAI,MAAM,OAAO,CAAC,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AAC,KAAK,qBAAqB,MAAM,aAAa,CAAC;AACxH","debugId":"7af73b5c-b50d-50c9-95e7-c6ed4caefbeb"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
hashDocument,
|
|
3
3
|
toItemRecord
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-4KBK4BA3.js";
|
|
5
5
|
import {
|
|
6
6
|
canonicalDocument
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-GYMG7AG6.js";
|
|
8
8
|
import {
|
|
9
9
|
FRONT_MATTER_KEY_ORDER,
|
|
10
10
|
orderObject,
|
|
11
11
|
sha256Hex,
|
|
12
12
|
stableStringify
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-LV5FFQ7M.js";
|
|
14
14
|
|
|
15
15
|
// dist/core/history/replay.js
|
|
16
16
|
import jsonPatch from "fast-json-patch";
|
|
@@ -237,4 +237,4 @@ export {
|
|
|
237
237
|
reanchorHistoryEntries,
|
|
238
238
|
historyEntriesToRaw
|
|
239
239
|
};
|
|
240
|
-
//# sourceMappingURL=chunk-
|
|
240
|
+
//# sourceMappingURL=chunk-ZJRDVYZI.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="381b3134-c9c0-5f34-a609-b640a7de78b6")}catch(e){}}();
|
|
3
3
|
import {
|
|
4
4
|
ITEM_TYPE_VALUES,
|
|
5
5
|
TYPE_TO_FOLDER,
|
|
6
6
|
normalizeItemTypeDefinition,
|
|
7
7
|
normalizeItemTypeStringList,
|
|
8
8
|
strictPolicyCommand
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-KTVETP66.js";
|
|
10
10
|
|
|
11
11
|
// dist/core/item/type-registry.js
|
|
12
12
|
var DEFAULT_REQUIRED_CREATE_FIELDS = [
|
|
@@ -417,7 +417,7 @@ function coerceTypeDefinitionFromUnknown(raw) {
|
|
|
417
417
|
command_option_policies: commandOptionPolicies
|
|
418
418
|
};
|
|
419
419
|
}
|
|
420
|
-
function applyTypeDefinitions(source, target
|
|
420
|
+
function applyTypeDefinitions(source, target) {
|
|
421
421
|
for (const rawDefinition of source) {
|
|
422
422
|
const normalizedDefinition = normalizeTypeDefinition(rawDefinition);
|
|
423
423
|
if (!normalizedDefinition) {
|
|
@@ -431,8 +431,8 @@ function applyTypeDefinitions(source, target, preserveBuiltinDefaults) {
|
|
|
431
431
|
...existing?.aliases ?? [],
|
|
432
432
|
...normalizedDefinition.aliases ?? []
|
|
433
433
|
]);
|
|
434
|
-
const requiredCreateFields = normalizedDefinition.required_create_fields ? normalizeItemTypeStringList(normalizedDefinition.required_create_fields) : existing?.required_create_fields ??
|
|
435
|
-
const requiredCreateRepeatables = normalizedDefinition.required_create_repeatables ? normalizeItemTypeStringList(normalizedDefinition.required_create_repeatables) : existing?.required_create_repeatables ??
|
|
434
|
+
const requiredCreateFields = normalizedDefinition.required_create_fields ? normalizeItemTypeStringList(normalizedDefinition.required_create_fields) : existing?.required_create_fields ?? [];
|
|
435
|
+
const requiredCreateRepeatables = normalizedDefinition.required_create_repeatables ? normalizeItemTypeStringList(normalizedDefinition.required_create_repeatables) : existing?.required_create_repeatables ?? [];
|
|
436
436
|
const options = normalizedDefinition.options ? normalizedDefinition.options : existing?.options ? [...existing.options] : [];
|
|
437
437
|
const commandOptionPolicies = normalizedDefinition.command_option_policies ? normalizedDefinition.command_option_policies : existing?.command_option_policies ? [...existing.command_option_policies] : [];
|
|
438
438
|
const defaultStatus = normalizedDefinition.default_status ?? existing?.default_status;
|
|
@@ -482,8 +482,8 @@ function resolveItemTypeRegistry(settings, extensionRegistrations = null) {
|
|
|
482
482
|
command_option_policies: []
|
|
483
483
|
});
|
|
484
484
|
}
|
|
485
|
-
applyTypeDefinitions(settings.item_types?.definitions ?? [], byLowerName
|
|
486
|
-
applyTypeDefinitions(collectExtensionTypeDefinitions(extensionRegistrations), byLowerName
|
|
485
|
+
applyTypeDefinitions(settings.item_types?.definitions ?? [], byLowerName);
|
|
486
|
+
applyTypeDefinitions(collectExtensionTypeDefinitions(extensionRegistrations), byLowerName);
|
|
487
487
|
const definitions = [...byLowerName.values()].sort((left, right) => left.name.localeCompare(right.name));
|
|
488
488
|
const byType = {};
|
|
489
489
|
const aliasToType = {};
|
|
@@ -642,12 +642,13 @@ function validateTypeOptions(typeName, rawTypeOptions, registry) {
|
|
|
642
642
|
export {
|
|
643
643
|
canonicalizeCommandOptionKey,
|
|
644
644
|
commandOptionFlagLabel,
|
|
645
|
+
toDefaultFolder,
|
|
645
646
|
resolveItemTypeRegistry,
|
|
646
647
|
resolveTypeName,
|
|
647
648
|
resolveTypeDefinition,
|
|
648
649
|
resolveCommandOptionPolicyState,
|
|
649
650
|
validateTypeOptions
|
|
650
651
|
};
|
|
651
|
-
//# sourceMappingURL=chunk-
|
|
652
|
+
//# sourceMappingURL=chunk-ZONXMSVB.js.map
|
|
652
653
|
|
|
653
|
-
//# debugId=
|
|
654
|
+
//# debugId=381b3134-c9c0-5f34-a609-b640a7de78b6
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../core/item/type-registry.ts"],"sourcesContent":["import { TYPE_TO_FOLDER } from \"../shared/constants.js\";\nimport type { ExtensionRegistrationRegistry } from \"../extensions/loader.js\";\nimport type {\n ItemTypeCommandOptionPolicy,\n ItemTypeDefinition,\n ItemTypeOptionDefinition,\n PmSettings,\n} from \"../../types/index.js\";\nimport { ITEM_TYPE_VALUES } from \"../../types/index.js\";\nimport {\n normalizeItemTypeDefinition as normalizeSharedItemTypeDefinition,\n normalizeItemTypeStringList,\n strictPolicyCommand,\n} from \"./item-type-definition.js\";\n\nexport const DEFAULT_REQUIRED_CREATE_FIELDS = [\n \"title\",\n \"description\",\n \"status\",\n \"priority\",\n \"tags\",\n \"body\",\n \"deadline\",\n \"estimatedMinutes\",\n \"acceptanceCriteria\",\n \"author\",\n \"message\",\n \"assignee\",\n] as const;\n\nexport const DEFAULT_REQUIRED_CREATE_REPEATABLES = [\"dep\", \"comment\", \"note\", \"learning\", \"file\", \"test\", \"doc\"] as const;\n\nexport type CommandOptionPolicyCommand = \"create\" | \"update\";\n\nconst CREATE_COMMAND_OPTION_KEYS = [\n \"title\",\n \"description\",\n \"type\",\n \"status\",\n \"priority\",\n \"tags\",\n \"body\",\n \"deadline\",\n \"estimatedMinutes\",\n \"acceptanceCriteria\",\n \"definitionOfReady\",\n \"order\",\n \"goal\",\n \"objective\",\n \"value\",\n \"impact\",\n \"outcome\",\n \"whyNow\",\n \"author\",\n \"message\",\n \"assignee\",\n \"parent\",\n \"reviewer\",\n \"risk\",\n \"confidence\",\n \"sprint\",\n \"release\",\n \"blockedBy\",\n \"blockedReason\",\n \"unblockNote\",\n \"reporter\",\n \"severity\",\n \"environment\",\n \"reproSteps\",\n \"resolution\",\n \"expectedResult\",\n \"actualResult\",\n \"affectedVersion\",\n \"fixedVersion\",\n \"component\",\n \"regression\",\n \"customerImpact\",\n \"dep\",\n \"comment\",\n \"note\",\n \"learning\",\n \"file\",\n \"test\",\n \"doc\",\n \"reminder\",\n \"event\",\n \"typeOption\",\n \"field\",\n] as const;\n\nconst UPDATE_COMMAND_OPTION_KEYS = [\n \"title\",\n \"description\",\n \"body\",\n \"status\",\n \"closeReason\",\n \"priority\",\n \"type\",\n \"tags\",\n \"deadline\",\n \"estimatedMinutes\",\n \"acceptanceCriteria\",\n \"definitionOfReady\",\n \"order\",\n \"goal\",\n \"objective\",\n \"value\",\n \"impact\",\n \"outcome\",\n \"whyNow\",\n \"author\",\n \"message\",\n \"assignee\",\n \"parent\",\n \"reviewer\",\n \"risk\",\n \"confidence\",\n \"sprint\",\n \"release\",\n \"blockedBy\",\n \"blockedReason\",\n \"unblockNote\",\n \"reporter\",\n \"severity\",\n \"environment\",\n \"reproSteps\",\n \"resolution\",\n \"expectedResult\",\n \"actualResult\",\n \"affectedVersion\",\n \"fixedVersion\",\n \"component\",\n \"regression\",\n \"customerImpact\",\n \"comment\",\n \"note\",\n \"learning\",\n \"file\",\n \"test\",\n \"doc\",\n \"reminder\",\n \"event\",\n \"typeOption\",\n \"field\",\n \"allowAuditUpdate\",\n \"force\",\n] as const;\n\nconst SHARED_COMMAND_OPTION_ALIASES: Record<string, string> = {\n \"close-reason\": \"closeReason\",\n close_reason: \"closeReason\",\n \"estimated-minutes\": \"estimatedMinutes\",\n estimated_minutes: \"estimatedMinutes\",\n estimate: \"estimatedMinutes\",\n \"acceptance-criteria\": \"acceptanceCriteria\",\n acceptance_criteria: \"acceptanceCriteria\",\n ac: \"acceptanceCriteria\",\n \"definition-of-ready\": \"definitionOfReady\",\n definition_of_ready: \"definitionOfReady\",\n rank: \"order\",\n \"why-now\": \"whyNow\",\n why_now: \"whyNow\",\n \"blocked-by\": \"blockedBy\",\n blocked_by: \"blockedBy\",\n \"blocked-reason\": \"blockedReason\",\n blocked_reason: \"blockedReason\",\n \"unblock-note\": \"unblockNote\",\n unblock_note: \"unblockNote\",\n \"repro-steps\": \"reproSteps\",\n repro_steps: \"reproSteps\",\n \"expected-result\": \"expectedResult\",\n expected_result: \"expectedResult\",\n \"actual-result\": \"actualResult\",\n actual_result: \"actualResult\",\n \"affected-version\": \"affectedVersion\",\n affected_version: \"affectedVersion\",\n \"fixed-version\": \"fixedVersion\",\n fixed_version: \"fixedVersion\",\n \"customer-impact\": \"customerImpact\",\n customer_impact: \"customerImpact\",\n \"type-option\": \"typeOption\",\n type_option: \"typeOption\",\n type_options: \"typeOption\",\n};\n\nconst CREATE_COMMAND_OPTION_ALIASES: Record<string, string> = {\n ...SHARED_COMMAND_OPTION_ALIASES,\n};\n\nconst UPDATE_COMMAND_OPTION_ALIASES: Record<string, string> = {\n ...SHARED_COMMAND_OPTION_ALIASES,\n \"allow-audit-update\": \"allowAuditUpdate\",\n allow_audit_update: \"allowAuditUpdate\",\n};\n\nconst CREATE_COMMAND_OPTION_FLAG_LABELS: Record<string, string> = {\n title: \"--title\",\n description: \"--description\",\n type: \"--type\",\n status: \"--status\",\n priority: \"--priority\",\n tags: \"--tags\",\n body: \"--body\",\n deadline: \"--deadline\",\n estimatedMinutes: \"--estimate/--estimated-minutes\",\n acceptanceCriteria: \"--acceptance-criteria/--ac\",\n definitionOfReady: \"--definition-of-ready\",\n order: \"--order/--rank\",\n goal: \"--goal\",\n objective: \"--objective\",\n value: \"--value\",\n impact: \"--impact\",\n outcome: \"--outcome\",\n whyNow: \"--why-now\",\n author: \"--author\",\n message: \"--message\",\n assignee: \"--assignee\",\n parent: \"--parent\",\n reviewer: \"--reviewer\",\n risk: \"--risk\",\n confidence: \"--confidence\",\n sprint: \"--sprint\",\n release: \"--release\",\n blockedBy: \"--blocked-by\",\n blockedReason: \"--blocked-reason\",\n unblockNote: \"--unblock-note\",\n reporter: \"--reporter\",\n severity: \"--severity\",\n environment: \"--environment\",\n reproSteps: \"--repro-steps\",\n resolution: \"--resolution\",\n expectedResult: \"--expected-result\",\n actualResult: \"--actual-result\",\n affectedVersion: \"--affected-version\",\n fixedVersion: \"--fixed-version\",\n component: \"--component\",\n regression: \"--regression\",\n customerImpact: \"--customer-impact\",\n dep: \"--dep\",\n comment: \"--comment\",\n note: \"--note\",\n learning: \"--learning\",\n file: \"--file\",\n test: \"--test\",\n doc: \"--doc\",\n reminder: \"--reminder\",\n event: \"--event\",\n typeOption: \"--type-option\",\n};\n\nconst UPDATE_COMMAND_OPTION_FLAG_LABELS: Record<string, string> = {\n title: \"--title\",\n description: \"--description\",\n body: \"--body\",\n status: \"--status\",\n closeReason: \"--close-reason\",\n priority: \"--priority\",\n type: \"--type\",\n tags: \"--tags\",\n deadline: \"--deadline\",\n estimatedMinutes: \"--estimate/--estimated-minutes\",\n acceptanceCriteria: \"--acceptance-criteria/--ac\",\n definitionOfReady: \"--definition-of-ready\",\n order: \"--order/--rank\",\n goal: \"--goal\",\n objective: \"--objective\",\n value: \"--value\",\n impact: \"--impact\",\n outcome: \"--outcome\",\n whyNow: \"--why-now\",\n assignee: \"--assignee\",\n parent: \"--parent\",\n reviewer: \"--reviewer\",\n risk: \"--risk\",\n confidence: \"--confidence\",\n sprint: \"--sprint\",\n release: \"--release\",\n blockedBy: \"--blocked-by\",\n blockedReason: \"--blocked-reason\",\n unblockNote: \"--unblock-note\",\n reporter: \"--reporter\",\n severity: \"--severity\",\n environment: \"--environment\",\n reproSteps: \"--repro-steps\",\n resolution: \"--resolution\",\n expectedResult: \"--expected-result\",\n actualResult: \"--actual-result\",\n affectedVersion: \"--affected-version\",\n fixedVersion: \"--fixed-version\",\n component: \"--component\",\n regression: \"--regression\",\n customerImpact: \"--customer-impact\",\n comment: \"--comment\",\n note: \"--note\",\n learning: \"--learning\",\n file: \"--file\",\n test: \"--test\",\n doc: \"--doc\",\n reminder: \"--reminder\",\n event: \"--event\",\n typeOption: \"--type-option\",\n allowAuditUpdate: \"--allow-audit-update\",\n author: \"--author\",\n message: \"--message\",\n force: \"--force\",\n};\n\nexport interface CommandOptionPolicyState {\n required: string[];\n hidden: string[];\n disabled: string[];\n errors: string[];\n}\n\nexport interface ResolvedItemTypeDefinition {\n name: string;\n /** Optional human description carried from the type definition. */\n description?: string;\n folder: string;\n aliases: string[];\n /** Optional per-type status applied at create time when `--status` is omitted. */\n default_status?: string;\n required_create_fields: string[];\n required_create_repeatables: string[];\n options: ItemTypeOptionDefinition[];\n command_option_policies: ItemTypeCommandOptionPolicy[];\n}\n\nexport interface ItemTypeRegistry {\n types: string[];\n folders: string[];\n type_to_folder: Record<string, string>;\n by_type: Record<string, ResolvedItemTypeDefinition>;\n alias_to_type: Record<string, string>;\n}\n\nfunction normalizeCommandOptionToken(value: string): string {\n return value.trim().replace(/^--+/, \"\").toLowerCase();\n}\n\nfunction commandOptionKeys(command: CommandOptionPolicyCommand): readonly string[] {\n return command === \"create\" ? CREATE_COMMAND_OPTION_KEYS : UPDATE_COMMAND_OPTION_KEYS;\n}\n\nfunction commandOptionAliases(command: CommandOptionPolicyCommand): Record<string, string> {\n return command === \"create\" ? CREATE_COMMAND_OPTION_ALIASES : UPDATE_COMMAND_OPTION_ALIASES;\n}\n\nexport function canonicalizeCommandOptionKey(\n command: CommandOptionPolicyCommand,\n rawOption: string,\n): string | undefined {\n const normalizedToken = normalizeCommandOptionToken(rawOption);\n if (normalizedToken.length === 0) {\n return undefined;\n }\n const aliased = commandOptionAliases(command)[normalizedToken];\n if (aliased) {\n return aliased;\n }\n return commandOptionKeys(command).find((candidate) => candidate.toLowerCase() === normalizedToken);\n}\n\nexport function commandOptionFlagLabel(command: CommandOptionPolicyCommand, optionKey: string): string {\n const labels = command === \"create\" ? CREATE_COMMAND_OPTION_FLAG_LABELS : UPDATE_COMMAND_OPTION_FLAG_LABELS;\n return labels[optionKey] ?? `--${optionKey.replace(/([A-Z])/g, \"-$1\").toLowerCase()}`;\n}\n\nexport function toDefaultFolder(name: string): string {\n const normalized = toSlugToken(name);\n if (normalized.length === 0) {\n return \"items\";\n }\n return normalized.endsWith(\"s\") ? normalized : `${normalized}s`;\n}\n\nfunction toSlugToken(value: string): string {\n const trimmed = value.trim().toLowerCase();\n let slug = \"\";\n let pendingDash = false;\n for (const character of trimmed) {\n const code = character.charCodeAt(0);\n const isAlpha = code >= 97 && code <= 122;\n const isDigit = code >= 48 && code <= 57;\n if (isAlpha || isDigit) {\n if (pendingDash && slug.length > 0) {\n slug += \"-\";\n }\n slug += character;\n pendingDash = false;\n continue;\n }\n if (slug.length > 0) {\n pendingDash = true;\n }\n }\n return slug;\n}\n\n// Runtime registry consumes untrusted extension/file definitions, so it uses the\n// strict policy-command resolver (trim + lowercase, reject non-create/update). All\n// other normalization is single-sourced from ./item-type-definition.ts (pm-v798).\nfunction normalizeTypeDefinition(definition: ItemTypeDefinition): ItemTypeDefinition | null {\n return normalizeSharedItemTypeDefinition(definition, { resolvePolicyCommand: strictPolicyCommand });\n}\n\nfunction coerceTypeDefinitionFromUnknown(raw: unknown): ItemTypeDefinition | null {\n if (typeof raw !== \"object\" || raw === null || Array.isArray(raw)) {\n return null;\n }\n const record = raw as Record<string, unknown>;\n const name = typeof record.name === \"string\" ? record.name : \"\";\n if (name.trim().length === 0) {\n return null;\n }\n const folder = typeof record.folder === \"string\" ? record.folder : undefined;\n const description = typeof record.description === \"string\" ? record.description : undefined;\n const defaultStatus = typeof record.default_status === \"string\" ? record.default_status : undefined;\n const aliases = Array.isArray(record.aliases) ? record.aliases.filter((value): value is string => typeof value === \"string\") : undefined;\n const requiredCreateFields = Array.isArray(record.required_create_fields)\n ? record.required_create_fields.filter((value): value is string => typeof value === \"string\")\n : undefined;\n const requiredCreateRepeatables = Array.isArray(record.required_create_repeatables)\n ? record.required_create_repeatables.filter((value): value is string => typeof value === \"string\")\n : undefined;\n let options: ItemTypeOptionDefinition[] | undefined;\n if (Array.isArray(record.options)) {\n options = [];\n for (const entry of record.options) {\n if (typeof entry !== \"object\" || entry === null || Array.isArray(entry)) {\n continue;\n }\n const optionRecord = entry as Record<string, unknown>;\n if (typeof optionRecord.key !== \"string\") {\n continue;\n }\n options.push({\n key: optionRecord.key,\n values: Array.isArray(optionRecord.values)\n ? optionRecord.values.filter((value): value is string => typeof value === \"string\")\n : [],\n required: optionRecord.required === undefined ? undefined : Boolean(optionRecord.required),\n aliases: Array.isArray(optionRecord.aliases)\n ? optionRecord.aliases.filter((value): value is string => typeof value === \"string\")\n : undefined,\n description: typeof optionRecord.description === \"string\" ? optionRecord.description : undefined,\n });\n }\n }\n let commandOptionPolicies: ItemTypeCommandOptionPolicy[] | undefined;\n if (Array.isArray(record.command_option_policies)) {\n commandOptionPolicies = [];\n for (const entry of record.command_option_policies) {\n if (typeof entry !== \"object\" || entry === null || Array.isArray(entry)) {\n continue;\n }\n const policyRecord = entry as Record<string, unknown>;\n if (typeof policyRecord.command !== \"string\" || typeof policyRecord.option !== \"string\") {\n continue;\n }\n const normalizedCommand = policyRecord.command.trim().toLowerCase();\n if (normalizedCommand !== \"create\" && normalizedCommand !== \"update\") {\n continue;\n }\n commandOptionPolicies.push({\n command: normalizedCommand,\n option: policyRecord.option,\n required: policyRecord.required === undefined ? undefined : Boolean(policyRecord.required),\n visible: policyRecord.visible === undefined ? undefined : Boolean(policyRecord.visible),\n enabled: policyRecord.enabled === undefined ? undefined : Boolean(policyRecord.enabled),\n });\n }\n }\n return {\n name,\n description,\n default_status: defaultStatus,\n folder,\n aliases,\n required_create_fields: requiredCreateFields,\n required_create_repeatables: requiredCreateRepeatables,\n options,\n command_option_policies: commandOptionPolicies,\n };\n}\n\nfunction applyTypeDefinitions(\n source: ItemTypeDefinition[],\n target: Map<string, ResolvedItemTypeDefinition>,\n): void {\n for (const rawDefinition of source) {\n const normalizedDefinition = normalizeTypeDefinition(rawDefinition);\n if (!normalizedDefinition) {\n continue;\n }\n const lowerName = normalizedDefinition.name.toLowerCase();\n const existing = target.get(lowerName);\n const keepName = existing?.name ?? normalizedDefinition.name;\n const folder = normalizedDefinition.folder ?? existing?.folder ?? toDefaultFolder(keepName);\n const aliases = normalizeItemTypeStringList([\n ...(existing?.aliases ?? []),\n ...(normalizedDefinition.aliases ?? []),\n ]);\n const requiredCreateFields = normalizedDefinition.required_create_fields\n ? normalizeItemTypeStringList(normalizedDefinition.required_create_fields)\n : existing?.required_create_fields ?? [];\n const requiredCreateRepeatables = normalizedDefinition.required_create_repeatables\n ? normalizeItemTypeStringList(normalizedDefinition.required_create_repeatables)\n : existing?.required_create_repeatables ?? [];\n const options = normalizedDefinition.options\n ? normalizedDefinition.options\n : existing?.options\n ? [...existing.options]\n : [];\n const commandOptionPolicies = normalizedDefinition.command_option_policies\n ? normalizedDefinition.command_option_policies\n : existing?.command_option_policies\n ? [...existing.command_option_policies]\n : [];\n const defaultStatus = normalizedDefinition.default_status ?? existing?.default_status;\n const description = normalizedDefinition.description ?? existing?.description;\n target.set(lowerName, {\n name: keepName,\n ...(description ? { description } : {}),\n ...(defaultStatus ? { default_status: defaultStatus } : {}),\n folder,\n aliases,\n required_create_fields: requiredCreateFields,\n required_create_repeatables: requiredCreateRepeatables,\n options,\n command_option_policies: commandOptionPolicies,\n });\n }\n}\n\nfunction collectExtensionTypeDefinitions(registrations: ExtensionRegistrationRegistry | null | undefined): ItemTypeDefinition[] {\n if (!registrations) {\n return [];\n }\n const definitions: ItemTypeDefinition[] = [];\n for (const registration of registrations.item_types ?? []) {\n const typeDefinitionsRaw = (registration as { types?: unknown[] }).types;\n if (!Array.isArray(typeDefinitionsRaw)) {\n continue;\n }\n for (const rawDefinition of typeDefinitionsRaw) {\n const normalized = coerceTypeDefinitionFromUnknown(rawDefinition);\n if (normalized) {\n definitions.push(normalized);\n }\n }\n }\n return definitions;\n}\n\nexport function resolveItemTypeRegistry(\n settings: PmSettings,\n extensionRegistrations: ExtensionRegistrationRegistry | null | undefined = null,\n): ItemTypeRegistry {\n const byLowerName = new Map<string, ResolvedItemTypeDefinition>();\n for (const builtin of ITEM_TYPE_VALUES) {\n byLowerName.set(builtin.toLowerCase(), {\n name: builtin,\n folder: TYPE_TO_FOLDER[builtin],\n aliases: [],\n required_create_fields: [...DEFAULT_REQUIRED_CREATE_FIELDS],\n required_create_repeatables: [...DEFAULT_REQUIRED_CREATE_REPEATABLES],\n options: [],\n command_option_policies: [],\n });\n }\n\n applyTypeDefinitions(settings.item_types?.definitions ?? [], byLowerName);\n applyTypeDefinitions(collectExtensionTypeDefinitions(extensionRegistrations), byLowerName);\n\n const definitions = [...byLowerName.values()].sort((left, right) => left.name.localeCompare(right.name));\n const byType: Record<string, ResolvedItemTypeDefinition> = {};\n const aliasToType: Record<string, string> = {};\n const typeToFolder: Record<string, string> = {};\n for (const definition of definitions) {\n byType[definition.name] = definition;\n typeToFolder[definition.name] = definition.folder;\n aliasToType[definition.name.toLowerCase()] = definition.name;\n for (const alias of definition.aliases) {\n aliasToType[alias.toLowerCase()] = definition.name;\n }\n }\n const folders = [...new Set(definitions.map((definition) => definition.folder))].sort((left, right) => left.localeCompare(right));\n return {\n types: definitions.map((definition) => definition.name),\n folders,\n type_to_folder: typeToFolder,\n by_type: byType,\n alias_to_type: aliasToType,\n };\n}\n\nexport function resolveTypeName(rawType: string | undefined, registry: ItemTypeRegistry): string | undefined {\n if (rawType === undefined) {\n return undefined;\n }\n return registry.alias_to_type[rawType.trim().toLowerCase()];\n}\n\nexport function resolveTypeDefinition(\n typeName: string | undefined,\n registry: ItemTypeRegistry,\n): ResolvedItemTypeDefinition | undefined {\n const resolvedName = resolveTypeName(typeName, registry);\n if (!resolvedName) {\n return undefined;\n }\n return registry.by_type[resolvedName];\n}\n\nexport function resolveCommandOptionPolicyState(\n typeDefinition: ResolvedItemTypeDefinition,\n command: CommandOptionPolicyCommand,\n baseRequiredOptions: Iterable<string>,\n): CommandOptionPolicyState {\n const errors: string[] = [];\n const required = new Set<string>();\n const hidden = new Set<string>();\n const disabled = new Set<string>();\n\n for (const rawBase of baseRequiredOptions) {\n const canonical = canonicalizeCommandOptionKey(command, rawBase);\n if (!canonical) {\n errors.push(\n `Unsupported base required option \"${rawBase}\" for command \"${command}\" on type \"${typeDefinition.name}\"`,\n );\n continue;\n }\n required.add(canonical);\n }\n\n for (const policy of typeDefinition.command_option_policies) {\n if (policy.command !== command) {\n continue;\n }\n const canonical = canonicalizeCommandOptionKey(command, policy.option);\n if (!canonical) {\n errors.push(\n `Unsupported command_option_policies option \"${policy.option}\" for command \"${command}\" on type \"${typeDefinition.name}\"`,\n );\n continue;\n }\n if (policy.required !== undefined) {\n if (policy.required) {\n required.add(canonical);\n } else {\n required.delete(canonical);\n }\n }\n if (policy.visible !== undefined) {\n if (policy.visible) {\n hidden.delete(canonical);\n } else {\n hidden.add(canonical);\n }\n }\n if (policy.enabled !== undefined) {\n if (policy.enabled) {\n disabled.delete(canonical);\n } else {\n disabled.add(canonical);\n }\n }\n }\n\n for (const option of required) {\n if (disabled.has(option)) {\n errors.push(\n `Option \"${option}\" cannot be both required and disabled for command \"${command}\" on type \"${typeDefinition.name}\"`,\n );\n }\n }\n\n return {\n required: [...required],\n hidden: [...hidden].sort((left, right) => left.localeCompare(right)),\n disabled: [...disabled].sort((left, right) => left.localeCompare(right)),\n errors,\n };\n}\n\nexport function validateTypeOptions(\n typeName: string,\n rawTypeOptions: Record<string, string> | undefined,\n registry: ItemTypeRegistry,\n): { normalized: Record<string, string> | undefined; errors: string[] } {\n const typeDefinition = resolveTypeDefinition(typeName, registry);\n if (!typeDefinition) {\n return {\n normalized: undefined,\n errors: [`Unknown type \"${typeName}\"`],\n };\n }\n const errors: string[] = [];\n const optionByAlias = new Map<string, ItemTypeOptionDefinition>();\n for (const option of typeDefinition.options) {\n optionByAlias.set(option.key.toLowerCase(), option);\n for (const alias of option.aliases ?? []) {\n optionByAlias.set(alias.toLowerCase(), option);\n }\n }\n\n const normalized: Record<string, string> = {};\n for (const [rawKey, rawValue] of Object.entries(rawTypeOptions ?? {})) {\n const trimmedKey = rawKey.trim();\n const trimmedValue = rawValue.trim();\n if (trimmedKey.length === 0) {\n errors.push(\"type option keys must not be empty\");\n continue;\n }\n if (trimmedValue.length === 0) {\n errors.push(`type option \"${trimmedKey}\" must not be empty`);\n continue;\n }\n const optionDefinition = optionByAlias.get(trimmedKey.toLowerCase());\n if (!optionDefinition) {\n const allowed = typeDefinition.options.map((option) => option.key).join(\", \");\n errors.push(\n typeDefinition.options.length > 0\n ? `Unknown type option \"${trimmedKey}\" for type \"${typeDefinition.name}\". Allowed: ${allowed}`\n : `Type \"${typeDefinition.name}\" does not define any configurable type options`,\n );\n continue;\n }\n const allowedValues = optionDefinition.values;\n let resolvedValue = trimmedValue;\n if (allowedValues.length > 0) {\n const valueLookup = new Map(allowedValues.map((value) => [value.toLowerCase(), value]));\n const canonical = valueLookup.get(trimmedValue.toLowerCase());\n if (!canonical) {\n errors.push(\n `Invalid value \"${trimmedValue}\" for type option \"${optionDefinition.key}\". Allowed: ${allowedValues.join(\", \")}`,\n );\n continue;\n }\n resolvedValue = canonical;\n }\n normalized[optionDefinition.key] = resolvedValue;\n }\n\n for (const option of typeDefinition.options) {\n if (option.required && !(option.key in normalized)) {\n errors.push(`Missing required type option \"${option.key}\" for type \"${typeDefinition.name}\"`);\n }\n }\n\n const sortedKeys = Object.keys(normalized).sort((left, right) => left.localeCompare(right));\n if (sortedKeys.length === 0) {\n return {\n normalized: undefined,\n errors,\n };\n }\n return {\n normalized: Object.fromEntries(sortedKeys.map((key) => [key, normalized[key]])),\n errors,\n };\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAeO,IAAM,iCAAiC;EAC5C;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGK,IAAM,sCAAsC,CAAC,OAAO,WAAW,QAAQ,YAAY,QAAQ,QAAQ,KAAK;AAI/G,IAAM,6BAA6B;EACjC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF,IAAM,6BAA6B;EACjC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA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,MAAI,WAAW,WAAW,GAAG;AAC3B,WAAO;MACL,YAAY;MACZ;;EAEJ;AACA,SAAO;IACL,YAAY,OAAO,YAAY,WAAW,IAAI,CAAC,QAAQ,CAAC,KAAK,WAAW,GAAG,CAAC,CAAC,CAAC;IAC9E;;AAEJ","debugId":"381b3134-c9c0-5f34-a609-b640a7de78b6"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
wrapOwnershipConflict
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NIQHNDBZ.js";
|
|
4
4
|
import {
|
|
5
5
|
resolveAuthor
|
|
6
6
|
} from "./chunk-O7IWB35H.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-7L5VOUYP.js";
|
|
8
|
+
import "./chunk-7AGIXLNK.js";
|
|
9
9
|
import {
|
|
10
10
|
mutateItem,
|
|
11
11
|
toItemRecord
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-4KBK4BA3.js";
|
|
13
|
+
import "./chunk-WZCQVABQ.js";
|
|
14
|
+
import "./chunk-GYMG7AG6.js";
|
|
15
|
+
import "./chunk-6BV7ENQL.js";
|
|
16
|
+
import "./chunk-OY3P2I6B.js";
|
|
17
17
|
import {
|
|
18
18
|
EXIT_CODE,
|
|
19
19
|
PmCliError,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
resolvePmRoot,
|
|
24
24
|
resolveRuntimeStatusRegistry,
|
|
25
25
|
statusIsTerminal
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-LV5FFQ7M.js";
|
|
27
27
|
|
|
28
28
|
// dist/cli/commands/claim.js
|
|
29
29
|
!(function() {
|
|
@@ -129,4 +129,4 @@ export {
|
|
|
129
129
|
runClaim,
|
|
130
130
|
runRelease
|
|
131
131
|
};
|
|
132
|
-
//# sourceMappingURL=claim-
|
|
132
|
+
//# sourceMappingURL=claim-4APLUXJW.js.map
|
|
@@ -2,20 +2,20 @@
|
|
|
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]="69440d9c-1dff-5d99-b0ac-dec73e521560")}catch(e){}}();
|
|
3
3
|
import {
|
|
4
4
|
wrapOwnershipConflict
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FXNT5LPX.js";
|
|
6
6
|
import {
|
|
7
7
|
resolveAuthor
|
|
8
8
|
} from "./chunk-J27KIHTG.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-F7WSO5UX.js";
|
|
10
|
+
import "./chunk-UBMCSJXX.js";
|
|
11
11
|
import {
|
|
12
12
|
mutateItem,
|
|
13
13
|
toItemRecord
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-7K2MXFMX.js";
|
|
15
|
+
import "./chunk-2JEGCDYT.js";
|
|
16
|
+
import "./chunk-GAVE4MYM.js";
|
|
17
|
+
import "./chunk-ZONXMSVB.js";
|
|
18
|
+
import "./chunk-G2YVUY7I.js";
|
|
19
19
|
import {
|
|
20
20
|
EXIT_CODE,
|
|
21
21
|
PmCliError,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
resolvePmRoot,
|
|
26
26
|
resolveRuntimeStatusRegistry,
|
|
27
27
|
statusIsTerminal
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-KTVETP66.js";
|
|
29
29
|
|
|
30
30
|
// dist/cli/commands/claim.js
|
|
31
31
|
async function runClaim(id, force, global, options = {}) {
|
|
@@ -124,6 +124,6 @@ export {
|
|
|
124
124
|
runClaim,
|
|
125
125
|
runRelease
|
|
126
126
|
};
|
|
127
|
-
//# sourceMappingURL=claim-
|
|
127
|
+
//# sourceMappingURL=claim-NEO7AGWH.js.map
|
|
128
128
|
|
|
129
129
|
//# debugId=69440d9c-1dff-5d99-b0ac-dec73e521560
|
|
@@ -2,16 +2,16 @@
|
|
|
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]="45eac7fa-f181-5cca-93b7-cfb58909dbb3")}catch(e){}}();
|
|
3
3
|
import {
|
|
4
4
|
runClose
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-II7OGE3V.js";
|
|
6
|
+
import "./chunk-7K2MXFMX.js";
|
|
7
|
+
import "./chunk-2JEGCDYT.js";
|
|
8
|
+
import "./chunk-GAVE4MYM.js";
|
|
9
|
+
import "./chunk-ZONXMSVB.js";
|
|
10
|
+
import "./chunk-G2YVUY7I.js";
|
|
11
|
+
import "./chunk-KTVETP66.js";
|
|
12
12
|
export {
|
|
13
13
|
runClose
|
|
14
14
|
};
|
|
15
|
-
//# sourceMappingURL=close-
|
|
15
|
+
//# sourceMappingURL=close-3QABBNGU.js.map
|
|
16
16
|
|
|
17
17
|
//# debugId=45eac7fa-f181-5cca-93b7-cfb58909dbb3
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
runClose
|
|
3
|
+
} from "./chunk-6NQXMGYU.js";
|
|
4
|
+
import "./chunk-4KBK4BA3.js";
|
|
5
|
+
import "./chunk-WZCQVABQ.js";
|
|
6
|
+
import "./chunk-GYMG7AG6.js";
|
|
7
|
+
import "./chunk-6BV7ENQL.js";
|
|
8
|
+
import "./chunk-OY3P2I6B.js";
|
|
9
|
+
import "./chunk-LV5FFQ7M.js";
|
|
10
|
+
export {
|
|
11
|
+
runClose
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=close-ILMZR3D7.js.map
|
|
@@ -1,40 +1,43 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a4595c01-fd9c-55fd-9f97-0ee14fc4c5f4")}catch(e){}}();
|
|
3
3
|
import {
|
|
4
4
|
createCheckpointId,
|
|
5
5
|
loadMutationCheckpoint,
|
|
6
6
|
restoreCheckpointItems,
|
|
7
7
|
writeMutationCheckpoint
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-3WAULYOY.js";
|
|
9
9
|
import {
|
|
10
10
|
runClose
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-II7OGE3V.js";
|
|
12
12
|
import {
|
|
13
13
|
runRestore
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-656HPQPO.js";
|
|
15
15
|
import {
|
|
16
16
|
resolveAuthor
|
|
17
17
|
} from "./chunk-J27KIHTG.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-L6FJPOT4.js";
|
|
19
|
+
import "./chunk-UUKORJSN.js";
|
|
20
|
+
import {
|
|
21
|
+
hasListFilters
|
|
22
|
+
} from "./chunk-X3W5ESZQ.js";
|
|
20
23
|
import {
|
|
21
24
|
runList
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
+
} from "./chunk-667XI4UJ.js";
|
|
26
|
+
import "./chunk-UAR2VNCK.js";
|
|
27
|
+
import "./chunk-UBMCSJXX.js";
|
|
25
28
|
import {
|
|
26
29
|
listAllFrontMatterLight
|
|
27
|
-
} from "./chunk-
|
|
28
|
-
import "./chunk-
|
|
30
|
+
} from "./chunk-7K2MXFMX.js";
|
|
31
|
+
import "./chunk-2JEGCDYT.js";
|
|
29
32
|
import {
|
|
30
33
|
isTerminalStatus
|
|
31
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-GAVE4MYM.js";
|
|
32
35
|
import {
|
|
33
36
|
resolveItemTypeRegistry
|
|
34
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-ZONXMSVB.js";
|
|
35
38
|
import {
|
|
36
39
|
nowIso
|
|
37
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-G2YVUY7I.js";
|
|
38
41
|
import {
|
|
39
42
|
EXIT_CODE,
|
|
40
43
|
PmCliError,
|
|
@@ -45,7 +48,7 @@ import {
|
|
|
45
48
|
resolvePmRoot,
|
|
46
49
|
resolveRuntimeStatusRegistry,
|
|
47
50
|
toErrorMessage
|
|
48
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-KTVETP66.js";
|
|
49
52
|
|
|
50
53
|
// dist/cli/commands/close-many.js
|
|
51
54
|
var CLOSE_MANY_CHECKPOINT_SCHEMA_VERSION = 1;
|
|
@@ -63,11 +66,10 @@ var CLOSE_MANY_FILTER_GUIDANCE = [
|
|
|
63
66
|
"--ids"
|
|
64
67
|
].join(", ");
|
|
65
68
|
function hasCloseManyFilters(list, status) {
|
|
66
|
-
|
|
67
|
-
return isActive(status) || isActive(list?.status) || isActive(list?.type) || isActive(list?.tag) || isActive(list?.priority) || isActive(list?.deadlineBefore) || isActive(list?.deadlineAfter) || isActive(list?.updatedAfter) || isActive(list?.updatedBefore) || isActive(list?.createdAfter) || isActive(list?.createdBefore) || isActive(list?.ids) || isActive(list?.assignee) || isActive(list?.assigneeFilter) || isActive(list?.parent) || isActive(list?.sprint) || isActive(list?.release);
|
|
69
|
+
return hasListFilters(list, status, { includePagination: false });
|
|
68
70
|
}
|
|
69
71
|
function hasCloseManyRollbackConflicts(list, status) {
|
|
70
|
-
return
|
|
72
|
+
return hasListFilters(list, status);
|
|
71
73
|
}
|
|
72
74
|
function rejectBlankIdsFilter(list) {
|
|
73
75
|
if (list?.ids != null && String(list.ids).trim().length === 0) {
|
|
@@ -311,9 +313,19 @@ async function runCloseMany(options, global) {
|
|
|
311
313
|
ids: closedIds
|
|
312
314
|
};
|
|
313
315
|
}
|
|
316
|
+
var _testOnly = {
|
|
317
|
+
activeListOptions,
|
|
318
|
+
buildActiveChildrenByParent,
|
|
319
|
+
hasCloseManyFilters,
|
|
320
|
+
hasCloseManyRollbackConflicts,
|
|
321
|
+
hierarchyDepth,
|
|
322
|
+
rejectBlankIdsFilter,
|
|
323
|
+
resolveReason
|
|
324
|
+
};
|
|
314
325
|
export {
|
|
326
|
+
_testOnly,
|
|
315
327
|
runCloseMany
|
|
316
328
|
};
|
|
317
|
-
//# sourceMappingURL=close-many-
|
|
329
|
+
//# sourceMappingURL=close-many-MIZLTYGL.js.map
|
|
318
330
|
|
|
319
|
-
//# debugId=
|
|
331
|
+
//# debugId=a4595c01-fd9c-55fd-9f97-0ee14fc4c5f4
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../cli/commands/close-many.ts"],"sourcesContent":["import { pathExists } from \"../../core/fs/fs-utils.js\";\nimport {\n createCheckpointId,\n loadMutationCheckpoint,\n restoreCheckpointItems,\n writeMutationCheckpoint,\n type MutationCheckpointItem,\n} from \"../../core/checkpoint/mutation-checkpoint.js\";\nimport { getActiveExtensionRegistrations } from \"../../core/extensions/index.js\";\nimport { isTerminalStatus } from \"../../core/item/status.js\";\nimport { resolveItemTypeRegistry } from \"../../core/item/type-registry.js\";\nimport { resolveRuntimeStatusRegistry } from \"../../core/schema/runtime-schema.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { toErrorMessage } from \"../../core/shared/primitives.js\";\nimport { resolveAuthor } from \"../../core/shared/author.js\";\nimport { nowIso } from \"../../core/shared/time.js\";\nimport { listAllFrontMatterLight } from \"../../core/store/item-store.js\";\nimport { getSettingsPath, resolvePmRoot } from \"../../core/store/paths.js\";\nimport { readSettings } from \"../../core/store/settings.js\";\nimport { runClose, type CloseCommandOptions } from \"./close.js\";\nimport { hasListFilters } from \"./list-filter-shared.js\";\nimport { runList, type ListOptions, type ListedItem } from \"./list.js\";\nimport { runRestore } from \"./restore.js\";\n\nconst CLOSE_MANY_CHECKPOINT_SCHEMA_VERSION = 1;\nconst CLOSE_MANY_CHECKPOINT_SUBDIR = \"close-many\";\n\nconst CLOSE_MANY_FILTER_GUIDANCE = [\n \"--filter-status\",\n \"--filter-type\",\n \"--filter-tag\",\n \"--filter-priority\",\n \"--filter-sprint\",\n \"--filter-release\",\n \"--filter-parent\",\n \"--filter-assignee\",\n \"--filter-updated-before\",\n \"--ids\",\n].join(\", \");\n\nexport interface CloseManyCommandOptions {\n status?: string;\n list?: ListOptions;\n reason?: string;\n resolution?: string;\n expectedResult?: string;\n actualResult?: string;\n validateClose?: string;\n author?: string;\n message?: string;\n force?: boolean;\n dryRun?: boolean;\n rollback?: string;\n checkpoint?: boolean;\n}\n\ninterface CloseManyPlanRow {\n id: string;\n title: string;\n status: string;\n action: \"close\" | \"skip\";\n skip_reason?: string;\n active_child_ids?: string[];\n}\n\ninterface CloseManyApplyRow {\n id: string;\n status: \"closed\" | \"skipped\" | \"failed\";\n skip_reason?: string;\n changed_fields?: string[];\n warnings?: string[];\n error?: string;\n}\n\nexport interface CloseManyResult {\n mode: \"dry_run\" | \"apply\" | \"rollback\";\n matched_count: number;\n dry_run: boolean;\n reason?: string;\n filters?: Record<string, unknown>;\n validate_close?: string;\n item_plans?: CloseManyPlanRow[];\n checkpoint?: {\n id: string;\n created_at: string;\n path: string;\n rollback_command: string;\n };\n closed_count?: number;\n skipped_count?: number;\n failed_count?: number;\n restored_count?: number;\n rollback_checkpoint_id?: string;\n rows?: CloseManyApplyRow[] | Array<{ id: string; status: \"restored\" | \"failed\"; changed_fields?: string[]; warnings?: string[]; error?: string }>;\n ids: string[];\n}\n\nfunction hasCloseManyFilters(list: ListOptions | undefined, status: string | undefined): boolean {\n return hasListFilters(list, status, { includePagination: false });\n}\n\nfunction hasCloseManyRollbackConflicts(list: ListOptions | undefined, status: string | undefined): boolean {\n return hasListFilters(list, status);\n}\n\nfunction rejectBlankIdsFilter(list: ListOptions | undefined): void {\n if (list?.ids != null && String(list.ids).trim().length === 0) {\n throw new PmCliError(\"--ids requires at least one non-empty item ID\", EXIT_CODE.USAGE);\n }\n}\n\nfunction activeListOptions(list: ListOptions | undefined): ListOptions {\n const active: ListOptions = {};\n if (!list) {\n return active;\n }\n for (const [key, value] of Object.entries(list) as Array<[keyof ListOptions, unknown]>) {\n if (value == null || (typeof value === \"string\" && !value.split(\",\").some((entry) => entry.trim().length > 0))) {\n continue;\n }\n (active as Record<string, unknown>)[key] = value;\n }\n return active;\n}\n\nfunction resolveReason(reason: unknown, required: boolean): string | undefined {\n const trimmed = String(reason ?? \"\").trim();\n if (trimmed.length > 0) {\n return trimmed;\n }\n if (required) {\n throw new PmCliError(\n \"pm close-many requires a shared close reason via --reason because governance.require_close_reason is enabled.\",\n EXIT_CODE.USAGE,\n {\n code: \"close_reason_required\",\n required: \"Provide a shared closing summary via --reason for the whole batch.\",\n why: \"governance.require_close_reason is enabled, so every close must record why the items are done.\",\n examples: [\n 'pm close-many --filter-sprint S-12 --reason \"Sprint S-12 acceptance criteria met\"',\n 'pm close-many --ids pm-a,pm-b --reason \"Superseded by redesign\"',\n ],\n nextSteps: [\n \"Re-run with --reason describing the shared outcome.\",\n \"To stop requiring reasons, run: pm config set governance-require-close-reason --policy disabled\",\n ],\n },\n );\n }\n return undefined;\n}\n\n// Build a parent -> non-terminal child id map in a single light scan so each\n// matched parent can be annotated with the active children that closing it\n// would orphan (the same signal runClose surfaces per item on apply).\nasync function buildActiveChildrenByParent(\n pmRoot: string,\n settings: Awaited<ReturnType<typeof readSettings>>,\n): Promise<{ childrenByParent: Map<string, string[]>; parentByChild: Map<string, string> }> {\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());\n const items = await listAllFrontMatterLight(\n pmRoot,\n settings.item_format,\n typeRegistry.type_to_folder,\n undefined,\n settings.schema,\n );\n const childrenByParent = new Map<string, string[]>();\n const parentByChild = new Map<string, string>();\n for (const item of items) {\n if (typeof item.parent !== \"string\" || item.parent.length === 0) {\n continue;\n }\n parentByChild.set(item.id, item.parent);\n if (isTerminalStatus(item.status, statusRegistry)) {\n continue;\n }\n const existing = childrenByParent.get(item.parent);\n if (existing) {\n existing.push(item.id);\n } else {\n childrenByParent.set(item.parent, [item.id]);\n }\n }\n for (const ids of childrenByParent.values()) {\n ids.sort((left, right) => left.localeCompare(right));\n }\n return { childrenByParent, parentByChild };\n}\n\nfunction hierarchyDepth(id: string, parentByChild: Map<string, string>, cache?: Map<string, number>): number {\n const cached = cache?.get(id);\n if (cached !== undefined) {\n return cached;\n }\n let depth = 0;\n let current = parentByChild.get(id);\n const path: string[] = [];\n const visited = new Set<string>();\n let hasCycle = false;\n while (current !== undefined && !visited.has(current)) {\n const cachedCurrent = cache?.get(current);\n if (cachedCurrent !== undefined) {\n depth += cachedCurrent + 1;\n break;\n }\n visited.add(current);\n path.push(current);\n depth += 1;\n current = parentByChild.get(current);\n }\n if (current !== undefined && visited.has(current)) {\n hasCycle = true;\n }\n if (!hasCycle) {\n cache?.set(id, depth);\n for (const [index, ancestorId] of path.entries()) {\n cache?.set(ancestorId, depth - index - 1);\n }\n }\n return depth;\n}\n\nexport async function runCloseMany(options: CloseManyCommandOptions, global: GlobalOptions): Promise<CloseManyResult> {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n if (!(await pathExists(getSettingsPath(pmRoot)))) {\n throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);\n }\n const settings = await readSettings(pmRoot);\n const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);\n\n const dryRun = options.dryRun === true;\n const rollbackId = typeof options.rollback === \"string\" ? options.rollback : undefined;\n rejectBlankIdsFilter(options.list);\n\n if (rollbackId) {\n if (dryRun) {\n throw new PmCliError(\"--dry-run cannot be combined with --rollback\", EXIT_CODE.USAGE);\n }\n if (hasCloseManyRollbackConflicts(options.list, options.status)) {\n throw new PmCliError(\"Rollback mode does not accept filter options\", EXIT_CODE.USAGE);\n }\n const checkpoint = await loadMutationCheckpoint(\n pmRoot,\n CLOSE_MANY_CHECKPOINT_SUBDIR,\n rollbackId,\n CLOSE_MANY_CHECKPOINT_SCHEMA_VERSION,\n );\n const restoreMessage = options.message ?? `Rollback close-many checkpoint ${checkpoint.id}`;\n const rollback = await restoreCheckpointItems(checkpoint.items, (id, targetUpdatedAt) =>\n runRestore(id, targetUpdatedAt, { author: options.author, message: restoreMessage, force: true }, global),\n );\n return {\n mode: \"rollback\",\n matched_count: checkpoint.items.length,\n dry_run: false,\n rollback_checkpoint_id: checkpoint.id,\n checkpoint: {\n id: checkpoint.id,\n created_at: checkpoint.created_at,\n path: checkpoint.path,\n rollback_command: `pm close-many --rollback ${checkpoint.id}`,\n },\n restored_count: rollback.restored_ids.length,\n failed_count: rollback.failed_count,\n rows: rollback.rows,\n ids: rollback.restored_ids,\n };\n }\n\n if (!hasCloseManyFilters(options.list, options.status)) {\n throw new PmCliError(\n `close-many requires at least one filter to scope the close (for example: ${CLOSE_MANY_FILTER_GUIDANCE}). Refusing to match every item.`,\n EXIT_CODE.USAGE,\n );\n }\n\n const reason = resolveReason(options.reason, settings.governance.require_close_reason);\n const validateCloseMode = options.validateClose;\n const force = options.force === true;\n\n const listOptions = activeListOptions(options.list);\n const listed = await runList(options.status, listOptions, global);\n const { childrenByParent, parentByChild } = await buildActiveChildrenByParent(pmRoot, settings);\n const depthCache = new Map<string, number>();\n const matched = [...(listed.items as ListedItem[])].sort((left, right) => {\n const depthDelta = hierarchyDepth(right.id, parentByChild, depthCache) - hierarchyDepth(left.id, parentByChild, depthCache);\n return depthDelta !== 0 ? depthDelta : left.id.localeCompare(right.id);\n });\n const closePlannedIds = new Set(\n matched\n .filter((item) => force || !isTerminalStatus(item.status, statusRegistry))\n .map((item) => item.id),\n );\n\n const planRows: CloseManyPlanRow[] = matched.map((item) => {\n const alreadyTerminal = isTerminalStatus(item.status, statusRegistry);\n const activeChildIds = (childrenByParent.get(item.id) ?? []).filter((childId) => !closePlannedIds.has(childId));\n const willSkip = alreadyTerminal && !force;\n return {\n id: item.id,\n title: typeof item.title === \"string\" ? item.title : \"\",\n status: item.status,\n action: willSkip ? \"skip\" : \"close\",\n ...(willSkip ? { skip_reason: \"already_terminal\" } : {}),\n ...(activeChildIds.length > 0 ? { active_child_ids: activeChildIds } : {}),\n };\n });\n\n if (dryRun) {\n return {\n mode: \"dry_run\",\n matched_count: matched.length,\n dry_run: true,\n ...(reason !== undefined ? { reason } : {}),\n filters: listed.filters,\n ...(validateCloseMode ? { validate_close: validateCloseMode } : {}),\n item_plans: planRows,\n ids: [],\n };\n }\n\n const closableIds = new Set(planRows.filter((row) => row.action === \"close\").map((row) => row.id));\n\n const nowValue = nowIso();\n const checkpointId = createCheckpointId(CLOSE_MANY_CHECKPOINT_SUBDIR, nowValue);\n const checkpointEnabled = options.checkpoint !== false;\n let checkpointInfo: CloseManyResult[\"checkpoint\"] | undefined;\n if (checkpointEnabled && closableIds.size > 0) {\n const checkpointItems: MutationCheckpointItem[] = matched\n .filter((item) => closableIds.has(item.id))\n .map((item) => ({ id: item.id, target_updated_at: item.updated_at }));\n const checkpointPath = await writeMutationCheckpoint(pmRoot, CLOSE_MANY_CHECKPOINT_SUBDIR, checkpointId, {\n schema_version: CLOSE_MANY_CHECKPOINT_SCHEMA_VERSION,\n id: checkpointId,\n created_at: nowValue,\n author: resolveAuthor(options.author, \"unknown\"),\n ...(reason !== undefined ? { reason } : {}),\n filters: listed.filters,\n items: checkpointItems,\n });\n checkpointInfo = {\n id: checkpointId,\n created_at: nowValue,\n path: checkpointPath,\n rollback_command: `pm close-many --rollback ${checkpointId}`,\n };\n }\n\n const closeOptions: CloseCommandOptions = {\n author: options.author,\n message: options.message ?? `close-many apply ${checkpointId}`,\n validateClose: validateCloseMode,\n force,\n resolution: options.resolution,\n expectedResult: options.expectedResult,\n actualResult: options.actualResult,\n };\n\n const rows: CloseManyApplyRow[] = [];\n const closedIds: string[] = [];\n for (const item of matched) {\n if (!closableIds.has(item.id)) {\n rows.push({ id: item.id, status: \"skipped\", skip_reason: \"already_terminal\" });\n continue;\n }\n try {\n const result = await runClose(item.id, reason, closeOptions, global);\n rows.push({\n id: item.id,\n status: \"closed\",\n changed_fields: result.changed_fields,\n ...(result.warnings && result.warnings.length > 0 ? { warnings: result.warnings } : {}),\n });\n closedIds.push(item.id);\n } catch (error: unknown) {\n rows.push({ id: item.id, status: \"failed\", error: toErrorMessage(error) });\n }\n }\n\n return {\n mode: \"apply\",\n matched_count: matched.length,\n dry_run: false,\n ...(reason !== undefined ? { reason } : {}),\n filters: listed.filters,\n ...(validateCloseMode ? { validate_close: validateCloseMode } : {}),\n ...(checkpointInfo ? { checkpoint: checkpointInfo } : {}),\n closed_count: rows.filter((row) => row.status === \"closed\").length,\n skipped_count: rows.filter((row) => row.status === \"skipped\").length,\n failed_count: rows.filter((row) => row.status === \"failed\").length,\n rows,\n ids: closedIds,\n };\n}\n\nexport const _testOnly = {\n activeListOptions,\n buildActiveChildrenByParent,\n hasCloseManyFilters,\n hasCloseManyRollbackConflicts,\n hierarchyDepth,\n rejectBlankIdsFilter,\n resolveReason,\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,IAAM,uCAAuC;AAC7C,IAAM,+BAA+B;AAErC,IAAM,6BAA6B;EACjC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,KAAK,IAAI;AA2DX,SAAS,oBAAoB,MAA+B,QAA0B;AACpF,SAAO,eAAe,MAAM,QAAQ,EAAE,mBAAmB,MAAK,CAAE;AAClE;AAEA,SAAS,8BAA8B,MAA+B,QAA0B;AAC9F,SAAO,eAAe,MAAM,MAAM;AACpC;AAEA,SAAS,qBAAqB,MAA6B;AACzD,MAAI,MAAM,OAAO,QAAQ,OAAO,KAAK,GAAG,EAAE,KAAI,EAAG,WAAW,GAAG;AAC7D,UAAM,IAAI,WAAW,iDAAiD,UAAU,KAAK;EACvF;AACF;AAEA,SAAS,kBAAkB,MAA6B;AACtD,QAAM,SAAsB,CAAA;AAC5B,MAAI,CAAC,MAAM;AACT,WAAO;EACT;AACA,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,IAAI,GAA0C;AACtF,QAAI,SAAS,QAAS,OAAO,UAAU,YAAY,CAAC,MAAM,MAAM,GAAG,EAAE,KAAK,CAAC,UAAU,MAAM,KAAI,EAAG,SAAS,CAAC,GAAI;AAC9G;IACF;AACC,WAAmC,GAAG,IAAI;EAC7C;AACA,SAAO;AACT;AAEA,SAAS,cAAc,QAAiB,UAAiB;AACvD,QAAM,UAAU,OAAO,UAAU,EAAE,EAAE,KAAI;AACzC,MAAI,QAAQ,SAAS,GAAG;AACtB,WAAO;EACT;AACA,MAAI,UAAU;AACZ,UAAM,IAAI,WACR,iHACA,UAAU,OACV;MACE,MAAM;MACN,UAAU;MACV,KAAK;MACL,UAAU;QACR;Q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EACvB;EACA;EACA;EACA;EACA;EACA;EACA","debugId":"a4595c01-fd9c-55fd-9f97-0ee14fc4c5f4"}
|
|
@@ -3,36 +3,39 @@ import {
|
|
|
3
3
|
loadMutationCheckpoint,
|
|
4
4
|
restoreCheckpointItems,
|
|
5
5
|
writeMutationCheckpoint
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MJZUZ2QE.js";
|
|
7
7
|
import {
|
|
8
8
|
runClose
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6NQXMGYU.js";
|
|
10
10
|
import {
|
|
11
11
|
runRestore
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-KZYVTOG5.js";
|
|
13
13
|
import {
|
|
14
14
|
resolveAuthor
|
|
15
15
|
} from "./chunk-O7IWB35H.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-2IUJBMKS.js";
|
|
17
|
+
import "./chunk-ZJRDVYZI.js";
|
|
18
|
+
import {
|
|
19
|
+
hasListFilters
|
|
20
|
+
} from "./chunk-6EFCFPNE.js";
|
|
18
21
|
import {
|
|
19
22
|
runList
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
+
} from "./chunk-XLNNCKTN.js";
|
|
24
|
+
import "./chunk-7EILPFMA.js";
|
|
25
|
+
import "./chunk-7AGIXLNK.js";
|
|
23
26
|
import {
|
|
24
27
|
listAllFrontMatterLight
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import "./chunk-
|
|
28
|
+
} from "./chunk-4KBK4BA3.js";
|
|
29
|
+
import "./chunk-WZCQVABQ.js";
|
|
27
30
|
import {
|
|
28
31
|
isTerminalStatus
|
|
29
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-GYMG7AG6.js";
|
|
30
33
|
import {
|
|
31
34
|
resolveItemTypeRegistry
|
|
32
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-6BV7ENQL.js";
|
|
33
36
|
import {
|
|
34
37
|
nowIso
|
|
35
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-OY3P2I6B.js";
|
|
36
39
|
import {
|
|
37
40
|
EXIT_CODE,
|
|
38
41
|
PmCliError,
|
|
@@ -43,13 +46,13 @@ import {
|
|
|
43
46
|
resolvePmRoot,
|
|
44
47
|
resolveRuntimeStatusRegistry,
|
|
45
48
|
toErrorMessage
|
|
46
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-LV5FFQ7M.js";
|
|
47
50
|
|
|
48
51
|
// dist/cli/commands/close-many.js
|
|
49
52
|
!(function() {
|
|
50
53
|
try {
|
|
51
54
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
52
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
55
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "6666a3ef-d9aa-56b5-8574-e532ce119f37");
|
|
53
56
|
} catch (e2) {
|
|
54
57
|
}
|
|
55
58
|
})();
|
|
@@ -68,11 +71,10 @@ var CLOSE_MANY_FILTER_GUIDANCE = [
|
|
|
68
71
|
"--ids"
|
|
69
72
|
].join(", ");
|
|
70
73
|
function hasCloseManyFilters(list, status) {
|
|
71
|
-
|
|
72
|
-
return isActive(status) || isActive(list?.status) || isActive(list?.type) || isActive(list?.tag) || isActive(list?.priority) || isActive(list?.deadlineBefore) || isActive(list?.deadlineAfter) || isActive(list?.updatedAfter) || isActive(list?.updatedBefore) || isActive(list?.createdAfter) || isActive(list?.createdBefore) || isActive(list?.ids) || isActive(list?.assignee) || isActive(list?.assigneeFilter) || isActive(list?.parent) || isActive(list?.sprint) || isActive(list?.release);
|
|
74
|
+
return hasListFilters(list, status, { includePagination: false });
|
|
73
75
|
}
|
|
74
76
|
function hasCloseManyRollbackConflicts(list, status) {
|
|
75
|
-
return
|
|
77
|
+
return hasListFilters(list, status);
|
|
76
78
|
}
|
|
77
79
|
function rejectBlankIdsFilter(list) {
|
|
78
80
|
if (list?.ids != null && String(list.ids).trim().length === 0) {
|
|
@@ -316,7 +318,17 @@ async function runCloseMany(options, global2) {
|
|
|
316
318
|
ids: closedIds
|
|
317
319
|
};
|
|
318
320
|
}
|
|
321
|
+
var _testOnly = {
|
|
322
|
+
activeListOptions,
|
|
323
|
+
buildActiveChildrenByParent,
|
|
324
|
+
hasCloseManyFilters,
|
|
325
|
+
hasCloseManyRollbackConflicts,
|
|
326
|
+
hierarchyDepth,
|
|
327
|
+
rejectBlankIdsFilter,
|
|
328
|
+
resolveReason
|
|
329
|
+
};
|
|
319
330
|
export {
|
|
331
|
+
_testOnly,
|
|
320
332
|
runCloseMany
|
|
321
333
|
};
|
|
322
|
-
//# sourceMappingURL=close-many-
|
|
334
|
+
//# sourceMappingURL=close-many-Q7Y5AHQI.js.map
|