@unbrained/pm-cli 2026.7.14 → 2026.7.15
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/.claude-plugin/marketplace.json +2 -2
- package/CHANGELOG.md +48 -0
- package/README.md +14 -11
- package/dist/cli/argv-utils.d.ts +1 -4
- package/dist/cli/argv-utils.js +3 -13
- package/dist/cli/argv-utils.js.map +1 -1
- package/dist/cli/bootstrap-args.d.ts +6 -4
- package/dist/cli/bootstrap-args.js +51 -16
- package/dist/cli/bootstrap-args.js.map +1 -1
- package/dist/cli/bundle-integrity.d.ts +49 -0
- package/dist/cli/bundle-integrity.js +111 -0
- package/dist/cli/bundle-integrity.js.map +1 -0
- package/dist/cli/commands/completion.js +7 -2
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/config.d.ts +6 -163
- package/dist/cli/commands/config.js +4 -1133
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/context.d.ts +2 -4
- package/dist/cli/commands/context.js +10 -85
- package/dist/cli/commands/context.js.map +1 -1
- package/dist/cli/commands/create.d.ts +1 -0
- package/dist/cli/commands/create.js +3 -2
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/extension/describe.d.ts +2 -91
- package/dist/cli/commands/extension/describe.js +4 -142
- package/dist/cli/commands/extension/describe.js.map +1 -1
- package/dist/cli/commands/extension/scaffold.d.ts +2 -36
- package/dist/cli/commands/extension/scaffold.js +4 -2435
- package/dist/cli/commands/extension/scaffold.js.map +1 -1
- package/dist/cli/commands/extension/shared.d.ts +2 -28
- package/dist/cli/commands/extension/shared.js +4 -130
- package/dist/cli/commands/extension/shared.js.map +1 -1
- package/dist/cli/commands/extension.d.ts +3 -400
- package/dist/cli/commands/extension.js +4 -2183
- package/dist/cli/commands/extension.js.map +1 -1
- package/dist/cli/commands/gc.d.ts +6 -56
- package/dist/cli/commands/gc.js +4 -270
- package/dist/cli/commands/gc.js.map +1 -1
- package/dist/cli/commands/get.d.ts +18 -5
- package/dist/cli/commands/get.js +117 -58
- package/dist/cli/commands/get.js.map +1 -1
- package/dist/cli/commands/health.d.ts +6 -184
- package/dist/cli/commands/health.js +4 -1747
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/history-compact.d.ts +4 -139
- package/dist/cli/commands/history-compact.js +5 -510
- package/dist/cli/commands/history-compact.js.map +1 -1
- package/dist/cli/commands/history-redact.d.ts +8 -120
- package/dist/cli/commands/history-redact.js +6 -581
- package/dist/cli/commands/history-redact.js.map +1 -1
- package/dist/cli/commands/history-repair.d.ts +7 -89
- package/dist/cli/commands/history-repair.js +5 -257
- package/dist/cli/commands/history-repair.js.map +1 -1
- package/dist/cli/commands/history.d.ts +1 -2
- package/dist/cli/commands/history.js +6 -48
- 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 +6 -113
- package/dist/cli/commands/init-agent-guidance.js +4 -431
- package/dist/cli/commands/init-agent-guidance.js.map +1 -1
- package/dist/cli/commands/init.d.ts +6 -181
- package/dist/cli/commands/init.js +4 -690
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/next.js +3 -3
- package/dist/cli/commands/next.js.map +1 -1
- package/dist/cli/commands/profile.d.ts +4 -174
- package/dist/cli/commands/profile.js +4 -425
- package/dist/cli/commands/profile.js.map +1 -1
- package/dist/cli/commands/restore.d.ts +4 -19
- package/dist/cli/commands/restore.js +9 -158
- package/dist/cli/commands/restore.js.map +1 -1
- package/dist/cli/commands/schema.d.ts +7 -507
- package/dist/cli/commands/schema.js +5 -1254
- package/dist/cli/commands/schema.js.map +1 -1
- package/dist/cli/commands/test.d.ts +2 -4
- package/dist/cli/commands/test.js +7 -97
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/commands/validate.d.ts +9 -249
- package/dist/cli/commands/validate.js +9 -2150
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/extension-command-help.js +18 -4
- package/dist/cli/extension-command-help.js.map +1 -1
- package/dist/cli/extension-command-options.js +3 -3
- package/dist/cli/extension-command-options.js.map +1 -1
- package/dist/cli/help-content.js +7 -3
- package/dist/cli/help-content.js.map +1 -1
- package/dist/cli/main.js +20 -30
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/register-list-query.js +4 -2
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +11 -3
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-setup.js +4 -2
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli/registration-helpers.js +3 -2
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli-bundle/bundle-manifest.json +782 -0
- package/dist/cli-bundle/chunks/{append-PVZJDM6J.js → append-OJQFUQ4T.js} +5 -5
- package/dist/cli-bundle/chunks/append-UZVHUO74.js +11 -0
- package/dist/cli-bundle/chunks/{chunk-MQZ3PLCF.js → chunk-2IFFUZLC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-P6MYFH6K.js → chunk-2JKGO6QX.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-X3GYR4P2.js → chunk-2NCIPMQP.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-Q7E6OYZK.js → chunk-2VPAVL7O.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-DRNJPEPQ.js → chunk-2WSE6PO2.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-FDSBDNYE.js → chunk-34L5OT3Y.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-TH7U4KLY.js → chunk-3AUGG2DP.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-NKW36AMT.js → chunk-3CLU2XZO.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-N3CMP4NI.js → chunk-3S5QVM5H.js} +43 -7
- package/dist/cli-bundle/chunks/chunk-3S5QVM5H.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-3U7ZR6M4.js +64 -0
- package/dist/cli-bundle/chunks/chunk-3U7ZR6M4.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-ABRCOSDC.js → chunk-3WM75PWC.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-4223PVZT.js +121 -0
- package/dist/cli-bundle/chunks/chunk-4223PVZT.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-5URI7TPJ.js → chunk-4XQ3BDV4.js} +281 -164
- package/dist/cli-bundle/chunks/chunk-4XQ3BDV4.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-X6BVXQ52.js → chunk-5JLUII3O.js} +13 -13
- package/dist/cli-bundle/chunks/{chunk-MKL4CP2I.js → chunk-5ZSLZLDN.js} +631 -246
- package/dist/cli-bundle/chunks/chunk-5ZSLZLDN.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-Q37E63AM.js → chunk-6CFNAVTF.js} +21 -141
- package/dist/cli-bundle/chunks/chunk-6CFNAVTF.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-3TL7WOEF.js → chunk-6N2VXVTQ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ERL2YFJ2.js → chunk-6S3YSUYG.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-ZUKSZVBW.js → chunk-7B67ZL4N.js} +8 -7
- package/dist/cli-bundle/chunks/chunk-7B67ZL4N.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-IA3YFTXT.js → chunk-7PIWCHTW.js} +11 -13
- package/dist/cli-bundle/chunks/chunk-7PIWCHTW.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-BPD26E3P.js → chunk-7Z4LKRS4.js} +291 -81
- package/dist/cli-bundle/chunks/chunk-7Z4LKRS4.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-IFZA4VB5.js → chunk-AHVTB5I5.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-DO5RGJXT.js → chunk-APRVSW2O.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-NAQYVWSQ.js → chunk-B7PE22W6.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-MD6ULIPJ.js → chunk-BCOFWYW4.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-KADLSPIU.js → chunk-BEP7WJA2.js} +4 -4
- package/dist/cli-bundle/chunks/chunk-BKVG6XOA.js +1114 -0
- package/dist/cli-bundle/chunks/chunk-BKVG6XOA.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-AFWZRL7M.js → chunk-BSEQUTQP.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-AFWZRL7M.js.map → chunk-BSEQUTQP.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OBDLEQG5.js → chunk-CRVF2JDM.js} +10 -10
- package/dist/cli-bundle/chunks/{chunk-FJZDA6MS.js → chunk-DM4H7FP4.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-DUT67M43.js +5 -0
- package/dist/cli-bundle/chunks/{chunk-44LNIULG.js → chunk-DYH63FX7.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-LWTIRS3Y.js → chunk-E2OJMKML.js} +306 -82
- package/dist/cli-bundle/chunks/chunk-E2OJMKML.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-HAMLIWAF.js → chunk-EAB64KLB.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-CIOZ376P.js → chunk-EACOH7AU.js} +10 -10
- package/dist/cli-bundle/chunks/{chunk-HL7V2PHX.js → chunk-EH2OPHBI.js} +10 -10
- package/dist/cli-bundle/chunks/{chunk-HL7V2PHX.js.map → chunk-EH2OPHBI.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-QK2ZN6UL.js → chunk-EJEXHTY5.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WQUEHPZB.js → chunk-EYLCSJAI.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-655STMGA.js → chunk-FMBNM2EN.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RMF3IOYQ.js → chunk-FNSPG7MU.js} +12 -12
- package/dist/cli-bundle/chunks/{chunk-5CT5BW6E.js → chunk-GM5QHQU6.js} +46 -40
- package/dist/cli-bundle/chunks/chunk-GM5QHQU6.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-FTQLW4JD.js → chunk-GOSLKLFE.js} +418 -24
- package/dist/cli-bundle/chunks/chunk-GOSLKLFE.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-KB726FMH.js → chunk-H2Z3FYXQ.js} +4 -4
- package/dist/cli-bundle/chunks/chunk-H3EIEWGR.js +162 -0
- package/dist/cli-bundle/chunks/chunk-H3EIEWGR.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-2QIQGYPW.js → chunk-H5APFTHZ.js} +53 -10
- package/dist/cli-bundle/chunks/chunk-H5APFTHZ.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-HDH3JUGG.js +118 -0
- package/dist/cli-bundle/chunks/chunk-HDH3JUGG.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ZAYYDNB3.js → chunk-HO4KXD6I.js} +22 -142
- package/dist/cli-bundle/chunks/chunk-HO4KXD6I.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ILLUE5DI.js → chunk-HYB5AZ63.js} +203 -62
- package/dist/cli-bundle/chunks/{chunk-ILLUE5DI.js.map → chunk-HYB5AZ63.js.map} +3 -3
- package/dist/cli-bundle/chunks/{chunk-BN62TO2S.js → chunk-IA5FKNII.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-JL7WZ4O2.js → chunk-IG3SWA4A.js} +33 -9
- package/dist/cli-bundle/chunks/chunk-IG3SWA4A.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-W6HZ55JO.js → chunk-IJIICKVW.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-IGED7NH2.js → chunk-ILX33QXL.js} +668 -251
- package/dist/cli-bundle/chunks/chunk-ILX33QXL.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-UGTVWL3E.js → chunk-INU6DKT5.js} +47 -41
- package/dist/cli-bundle/chunks/chunk-INU6DKT5.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-UB2QYSTO.js → chunk-J5AOEGDC.js} +26 -18
- package/dist/cli-bundle/chunks/chunk-J5AOEGDC.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-4DY4KPQI.js → chunk-J6364LFM.js} +1330 -937
- package/dist/cli-bundle/chunks/chunk-J6364LFM.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-DVOLZJ3C.js → chunk-J6EY5V4N.js} +1295 -939
- package/dist/cli-bundle/chunks/chunk-J6EY5V4N.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-JFTKLTEF.js +1097 -0
- package/dist/cli-bundle/chunks/chunk-JFTKLTEF.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-M7EWN4TF.js → chunk-JOUQZENX.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-J4NZOP3I.js → chunk-JXQUXVMI.js} +9 -8
- package/dist/cli-bundle/chunks/chunk-JXQUXVMI.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-2FNWQXZ2.js → chunk-JYFOV7FC.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-HLHSQ5CA.js → chunk-K2X6U4UA.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-6OTZMORS.js → chunk-K3WII2ME.js} +27 -27
- package/dist/cli-bundle/chunks/chunk-K3WII2ME.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-M6ASXYCU.js → chunk-KG44YSKD.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-YVKE5ZDM.js → chunk-KPMKHGEA.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-QASRVKUQ.js → chunk-LPYWLWDS.js} +257 -163
- package/dist/cli-bundle/chunks/chunk-LPYWLWDS.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-RGXD5JJR.js → chunk-LSG2U345.js} +19 -12
- package/dist/cli-bundle/chunks/chunk-LSG2U345.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-MIQDDLB5.js +5 -0
- package/dist/cli-bundle/chunks/{chunk-UJ4HJYWL.js → chunk-NLDFBC6J.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WRKB56FC.js → chunk-NP22ERDF.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-YQYG2V23.js → chunk-NU3IMIEA.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-3I3LRT2G.js → chunk-NVPZIJVR.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-JAF4TUQ7.js → chunk-ODALILG3.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-CDJYP7OQ.js → chunk-ONG5V5CI.js} +190 -63
- package/dist/cli-bundle/chunks/chunk-ONG5V5CI.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-QZ7LT3XE.js → chunk-ONREO4ST.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-OW4JWD5M.js +61 -0
- package/dist/cli-bundle/chunks/chunk-OW4JWD5M.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-3CMRNVTO.js → chunk-P74IZQ7A.js} +12 -12
- package/dist/cli-bundle/chunks/chunk-PENXZX3U.js +172 -0
- package/dist/cli-bundle/chunks/chunk-PENXZX3U.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-ZTRBSABY.js → chunk-PGY23YTC.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-H2QBAKLQ.js → chunk-PMOSXADO.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-PNTULOGU.js +9 -0
- package/dist/cli-bundle/chunks/{chunk-GSEADLRH.js → chunk-Q7A43DS4.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-QSPARJWF.js → chunk-QEHQ2GVG.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-VJTAEIPC.js → chunk-QIPLHNP7.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-GXXC7QSK.js → chunk-QKECXBBG.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-GXXC7QSK.js.map → chunk-QKECXBBG.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-K7WNZ7KD.js → chunk-QKJGPFAF.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-F7PSHRNO.js → chunk-QKXHFPYM.js} +27 -10
- package/dist/cli-bundle/chunks/chunk-QKXHFPYM.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ZNP64HOW.js → chunk-RLCHOOHC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-IAPHYPRL.js → chunk-RMLWNPH2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UVBA6F5A.js → chunk-RRM5JYJC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-6IIVBC56.js → chunk-S6MQESFR.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-QABYZYLU.js → chunk-SDQLJWBO.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-ANSJHDOZ.js → chunk-SELVXEZK.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-DYEX6NFH.js → chunk-TD3LVC7D.js} +438 -23
- package/dist/cli-bundle/chunks/chunk-TD3LVC7D.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-WD6MSYMP.js → chunk-TKOVBP6C.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-TZ2PSLLT.js → chunk-TQSZFPIS.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-WPAWZW7S.js → chunk-TSMHDIW4.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-TZRTLMWM.js → chunk-UFXU44HV.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-TWLDBKQU.js → chunk-ULTHRDBP.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-OI4S4KCI.js → chunk-UMOPHQSU.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-OI4S4KCI.js.map → chunk-UMOPHQSU.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RA5AIAMP.js → chunk-UOHFKBUV.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-PHKP3AGR.js → chunk-UWQHLMEB.js} +35 -18
- package/dist/cli-bundle/chunks/chunk-UWQHLMEB.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-6TTOHMTB.js → chunk-UXONS674.js} +45 -112
- package/dist/cli-bundle/chunks/chunk-UXONS674.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-4RXTMU57.js → chunk-UY2ACEMF.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-6PKA3SJQ.js → chunk-WQPUU7XD.js} +19 -28
- package/dist/cli-bundle/chunks/chunk-WQPUU7XD.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-7TQMR6LK.js → chunk-WT3ZEOGH.js} +70 -20
- package/dist/cli-bundle/chunks/chunk-WT3ZEOGH.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-FIGXOCEQ.js → chunk-WUJQK4YV.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-T4BRCB6Z.js → chunk-XSJUSQAE.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-6MHSBDGD.js → chunk-XXXF6PAQ.js} +50 -117
- package/dist/cli-bundle/chunks/chunk-XXXF6PAQ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-UKUIIBDW.js → chunk-YAQEBNY7.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-7QDSYUMF.js → chunk-YAROI3PD.js} +44 -21
- package/dist/cli-bundle/chunks/chunk-YAROI3PD.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-E2WC6S4P.js → chunk-YBLZ2VE7.js} +13 -13
- package/dist/cli-bundle/chunks/{chunk-Y72FV7RM.js → chunk-YCQET3OT.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-YUSOJDWM.js +9 -0
- package/dist/cli-bundle/chunks/chunk-YXSHIAUJ.js +58 -0
- package/dist/cli-bundle/chunks/chunk-YXSHIAUJ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-FS6UM5WH.js → chunk-ZI6VQWQ7.js} +4 -4
- package/dist/cli-bundle/chunks/chunk-ZKRZY773.js +68 -0
- package/dist/cli-bundle/chunks/chunk-ZKRZY773.js.map +7 -0
- package/dist/cli-bundle/chunks/{close-LZECOMHO.js → close-CWODTPKG.js} +5 -5
- package/dist/cli-bundle/chunks/close-W6LI2PKM.js +12 -0
- package/dist/cli-bundle/chunks/{close-many-ZHI6A5TN.js → close-many-CQFUY7MR.js} +15 -13
- package/dist/cli-bundle/chunks/close-many-DLDDVSH5.js +23 -0
- package/dist/cli-bundle/chunks/comments-E3TNTK24.js +13 -0
- package/dist/cli-bundle/chunks/{comments-AJWRTFZ5.js → comments-WGLHR7LB.js} +7 -7
- package/dist/cli-bundle/chunks/{copy-GMXYKBXT.js → copy-LXVDXH7B.js} +4 -4
- package/dist/cli-bundle/chunks/copy-Q5ZJPUKR.js +9 -0
- package/dist/cli-bundle/chunks/{create-F53OBTOU.js → create-J5U6ND4K.js} +9 -9
- package/dist/cli-bundle/chunks/{create-HU4Q7RJX.js → create-LBVCYMEG.js} +9 -9
- package/dist/cli-bundle/chunks/{delete-GSDZLTRC.js → delete-PMJBNY5G.js} +4 -4
- package/dist/cli-bundle/chunks/delete-WNHB3LYW.js +10 -0
- package/dist/cli-bundle/chunks/{deps-WWB7P2GT.js → deps-JZ7TMVCB.js} +7 -4
- package/dist/cli-bundle/chunks/{deps-U57I7EAK.js → deps-OA26IS25.js} +7 -4
- package/dist/cli-bundle/chunks/{docs-MQIY2ZQS.js → docs-FEWB2DQB.js} +6 -6
- package/dist/cli-bundle/chunks/docs-HA2AIDBB.js +14 -0
- package/dist/cli-bundle/chunks/{files-TBZD7V6H.js → files-6YFBJRBG.js} +6 -6
- package/dist/cli-bundle/chunks/{files-TTY6N2AV.js → files-EFIWKFTM.js} +6 -6
- package/dist/cli-bundle/chunks/{focus-XT6YVFFX.js → focus-4QJR7FOQ.js} +5 -5
- package/dist/cli-bundle/chunks/focus-POIW5LTJ.js +10 -0
- package/dist/cli-bundle/chunks/{history-compact-KKVUWB4V.js → history-compact-CKRPDTJN.js} +6 -10
- package/dist/cli-bundle/chunks/history-compact-FWG2C7FZ.js +16 -0
- package/dist/cli-bundle/chunks/history-redact-BB3TGDAE.js +15 -0
- package/dist/cli-bundle/chunks/{history-redact-3DVZOILD.js → history-redact-D225BHOZ.js} +5 -6
- package/dist/cli-bundle/chunks/history-repair-6GEAM7HE.js +16 -0
- package/dist/cli-bundle/chunks/{history-repair-ITDUMK4N.js → history-repair-RQXKQHL4.js} +6 -8
- package/dist/cli-bundle/chunks/{learnings-FGO3NSFW.js → learnings-JLNLCOL5.js} +7 -7
- package/dist/cli-bundle/chunks/learnings-RSNLSWDC.js +13 -0
- package/dist/cli-bundle/chunks/notes-2WDH6DXU.js +13 -0
- package/dist/cli-bundle/chunks/{notes-NQ6RXVW6.js → notes-GB47XXQQ.js} +7 -7
- package/dist/cli-bundle/chunks/plan-DOVI2VMW.js +24 -0
- package/dist/cli-bundle/chunks/{plan-2NNEO46V.js → plan-VDCJ2PCN.js} +10 -10
- package/dist/cli-bundle/chunks/{profile-AAQUU6T3.js → profile-FAU7NZML.js} +10 -10
- package/dist/cli-bundle/chunks/{profile-U725ATWZ.js → profile-IVXQEL3D.js} +10 -10
- package/dist/cli-bundle/chunks/{register-list-query-BUWCYHBT.js → register-list-query-DKA3EH5D.js} +22 -19
- package/dist/cli-bundle/chunks/register-list-query-DKA3EH5D.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-list-query-KTZ6AGE7.js → register-list-query-UL4UKBBN.js} +23 -20
- package/dist/cli-bundle/chunks/register-list-query-UL4UKBBN.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-UELYYOR7.js → register-mutation-ARFHRW55.js} +36 -32
- package/dist/cli-bundle/chunks/{register-mutation-UELYYOR7.js.map → register-mutation-ARFHRW55.js.map} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-4FMGJJF7.js → register-mutation-RBBJ52DK.js} +37 -33
- package/dist/cli-bundle/chunks/register-mutation-RBBJ52DK.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-operations-JVW24J2Y.js → register-operations-ZIBBRSED.js} +41 -39
- package/dist/cli-bundle/chunks/{register-operations-JVW24J2Y.js.map → register-operations-ZIBBRSED.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-operations-ISUX6LY5.js → register-operations-ZUJ5JWPE.js} +39 -37
- package/dist/cli-bundle/chunks/{register-operations-ISUX6LY5.js.map → register-operations-ZUJ5JWPE.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-setup-5XNGKJ22.js → register-setup-BCVLFEYS.js} +29 -17
- package/dist/cli-bundle/chunks/{register-setup-5XNGKJ22.js.map → register-setup-BCVLFEYS.js.map} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-ZTNY6S7R.js → register-setup-TDCGWIOS.js} +19 -18
- package/dist/cli-bundle/chunks/{register-setup-ZTNY6S7R.js.map → register-setup-TDCGWIOS.js.map} +1 -1
- package/dist/cli-bundle/chunks/{restore-B3BAB6X2.js → restore-25DLT2Q2.js} +6 -6
- package/dist/cli-bundle/chunks/restore-YPMVUUEX.js +14 -0
- package/dist/cli-bundle/chunks/{schema-U7IM2DXV.js → schema-FNU3WE4O.js} +7 -6
- package/dist/cli-bundle/chunks/{schema-LZNUYHDB.js → schema-NBCM3RAD.js} +7 -6
- package/dist/cli-bundle/chunks/update-WWBYOPXO.js +21 -0
- package/dist/cli-bundle/chunks/update-WWBYOPXO.js.map +7 -0
- package/dist/cli-bundle/chunks/{update-Q3UCILNR.js → update-XHSIAIXE.js} +12 -12
- package/dist/cli-bundle/chunks/update-XHSIAIXE.js.map +1 -0
- package/dist/cli-bundle/chunks/update-many-OUGIU5SF.js +32 -0
- package/dist/cli-bundle/chunks/update-many-OUGIU5SF.js.map +7 -0
- package/dist/cli-bundle/chunks/update-many-TA7NGQBO.js +36 -0
- package/dist/cli-bundle/chunks/update-many-TA7NGQBO.js.map +1 -0
- package/dist/cli-bundle/main.js +826 -43
- package/dist/cli-bundle/main.js.map +4 -4
- package/dist/cli-bundle/sdk-runtime.js +70 -57
- package/dist/cli-bundle/sdk-testing.js +6 -6
- package/dist/cli-bundle/sdk.js +876 -74
- package/dist/cli-bundle/sdk.js.map +4 -4
- package/dist/cli.js +5 -4
- package/dist/cli.js.map +1 -1
- package/dist/core/diagnostics/remediation.js +12 -2
- package/dist/core/diagnostics/remediation.js.map +1 -1
- package/dist/core/history/projection.d.ts +39 -0
- package/dist/core/history/projection.js +164 -0
- package/dist/core/history/projection.js.map +1 -0
- package/dist/core/history/read.d.ts +3 -0
- package/dist/core/history/read.js +55 -0
- package/dist/core/history/read.js.map +1 -0
- package/dist/core/output/output-control.d.ts +18 -0
- package/dist/core/output/output-control.js +26 -0
- package/dist/core/output/output-control.js.map +1 -0
- package/dist/core/output/output.js +20 -8
- package/dist/core/output/output.js.map +1 -1
- package/dist/core/sentry/helpers.js +10 -2
- package/dist/core/sentry/helpers.js.map +1 -1
- package/dist/core/shared/command-types.d.ts +2 -0
- package/dist/core/shared/command-types.js +2 -2
- package/dist/core/shared/command-types.js.map +1 -1
- package/dist/core/shared/errors.d.ts +11 -0
- package/dist/core/shared/errors.js +2 -2
- package/dist/core/shared/errors.js.map +1 -1
- package/dist/mcp/server.d.ts +2 -2
- package/dist/mcp/tool-definitions.js +5 -5
- package/dist/mcp/tool-definitions.js.map +1 -1
- package/dist/sdk/author-attribution.d.ts +35 -0
- package/dist/sdk/author-attribution.js +118 -0
- package/dist/sdk/author-attribution.js.map +1 -0
- package/dist/sdk/cli-contracts/command-aliases.d.ts +7 -0
- package/dist/sdk/cli-contracts/command-aliases.js +17 -0
- package/dist/sdk/cli-contracts/command-aliases.js.map +1 -0
- package/dist/sdk/cli-contracts/flag-contracts.js +5 -2
- package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.js +6 -2
- package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +21 -2
- package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-schema.js +3 -3
- package/dist/sdk/cli-contracts/tool-schema.js.map +1 -1
- package/dist/sdk/cli-contracts.d.ts +1 -0
- package/dist/sdk/cli-contracts.js +3 -2
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/sdk/cli-program.d.ts +8 -0
- package/dist/sdk/cli-program.js +39 -0
- package/dist/sdk/cli-program.js.map +1 -0
- package/dist/sdk/command-line.d.ts +11 -0
- package/dist/sdk/command-line.js +40 -0
- package/dist/sdk/command-line.js.map +1 -0
- package/dist/sdk/config.d.ts +163 -0
- package/dist/sdk/config.js +1087 -0
- package/dist/sdk/config.js.map +1 -0
- package/dist/sdk/context-relevance.d.ts +21 -0
- package/dist/sdk/context-relevance.js +70 -2
- package/dist/sdk/context-relevance.js.map +1 -1
- package/dist/sdk/dependencies.d.ts +15 -2
- package/dist/sdk/dependencies.js +97 -8
- package/dist/sdk/dependencies.js.map +1 -1
- package/dist/{cli/commands → sdk}/extension/bundled-catalog.d.ts +1 -1
- package/dist/{cli/commands → sdk}/extension/bundled-catalog.js +12 -12
- package/dist/sdk/extension/bundled-catalog.js.map +1 -0
- package/dist/sdk/extension/concurrency.d.ts +7 -0
- package/dist/sdk/extension/concurrency.js +26 -0
- package/dist/sdk/extension/concurrency.js.map +1 -0
- package/dist/sdk/extension/describe.d.ts +91 -0
- package/dist/sdk/extension/describe.js +144 -0
- package/dist/sdk/extension/describe.js.map +1 -0
- package/dist/{cli/commands → sdk}/extension/doctor.d.ts +3 -3
- package/dist/{cli/commands → sdk}/extension/doctor.js +7 -7
- package/dist/sdk/extension/doctor.js.map +1 -0
- package/dist/sdk/extension/install-runtime.d.ts +26 -0
- package/dist/sdk/extension/install-runtime.js +269 -0
- package/dist/sdk/extension/install-runtime.js.map +1 -0
- package/dist/sdk/extension/install-snapshot.d.ts +23 -0
- package/dist/sdk/extension/install-snapshot.js +66 -0
- package/dist/sdk/extension/install-snapshot.js.map +1 -0
- package/dist/{cli/commands → sdk}/extension/install-sources.d.ts +3 -3
- package/dist/{cli/commands → sdk}/extension/install-sources.js +15 -12
- package/dist/sdk/extension/install-sources.js.map +1 -0
- package/dist/{cli/commands → sdk}/extension/managed-state.js +6 -6
- package/dist/sdk/extension/managed-state.js.map +1 -0
- package/dist/sdk/extension/scaffold.d.ts +36 -0
- package/dist/sdk/extension/scaffold.js +2436 -0
- package/dist/sdk/extension/scaffold.js.map +1 -0
- package/dist/sdk/extension/shared.d.ts +28 -0
- package/dist/sdk/extension/shared.js +140 -0
- package/dist/sdk/extension/shared.js.map +1 -0
- package/dist/sdk/extension/update-check.d.ts +15 -0
- package/dist/sdk/extension/update-check.js +68 -0
- package/dist/sdk/extension/update-check.js.map +1 -0
- package/dist/sdk/extension.d.ts +367 -0
- package/dist/sdk/extension.js +2174 -0
- package/dist/sdk/extension.js.map +1 -0
- package/dist/sdk/governance/gc.d.ts +56 -0
- package/dist/sdk/governance/gc.js +276 -0
- package/dist/sdk/governance/gc.js.map +1 -0
- package/dist/sdk/governance/health.d.ts +187 -0
- package/dist/sdk/governance/health.js +1796 -0
- package/dist/sdk/governance/health.js.map +1 -0
- package/dist/sdk/governance/validate.d.ts +255 -0
- package/dist/sdk/governance/validate.js +2175 -0
- package/dist/sdk/governance/validate.js.map +1 -0
- package/dist/sdk/history-compact.d.ts +142 -0
- package/dist/sdk/history-compact.js +508 -0
- package/dist/sdk/history-compact.js.map +1 -0
- package/dist/sdk/history-mcp.d.ts +17 -0
- package/dist/sdk/history-mcp.js +68 -0
- package/dist/sdk/history-mcp.js.map +1 -0
- package/dist/sdk/history-read.d.ts +31 -0
- package/dist/sdk/history-read.js +58 -0
- package/dist/sdk/history-read.js.map +1 -0
- package/dist/sdk/history-redact.d.ts +120 -0
- package/dist/sdk/history-redact.js +577 -0
- package/dist/sdk/history-redact.js.map +1 -0
- package/dist/sdk/history-repair.d.ts +89 -0
- package/dist/sdk/history-repair.js +263 -0
- package/dist/sdk/history-repair.js.map +1 -0
- package/dist/sdk/index.d.ts +25 -1
- package/dist/sdk/index.js +27 -3
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/init-agent-guidance.d.ts +113 -0
- package/dist/sdk/init-agent-guidance.js +437 -0
- package/dist/sdk/init-agent-guidance.js.map +1 -0
- package/dist/sdk/init.d.ts +186 -0
- package/dist/sdk/init.js +733 -0
- package/dist/sdk/init.js.map +1 -0
- package/dist/sdk/invocation-author.d.ts +2 -0
- package/dist/sdk/invocation-author.js +39 -0
- package/dist/sdk/invocation-author.js.map +1 -0
- package/dist/sdk/item-children.d.ts +45 -0
- package/dist/sdk/item-children.js +75 -0
- package/dist/sdk/item-children.js.map +1 -0
- package/dist/sdk/item-schedule.d.ts +26 -0
- package/dist/sdk/item-schedule.js +28 -0
- package/dist/sdk/item-schedule.js.map +1 -0
- package/dist/sdk/output.d.ts +7 -0
- package/dist/sdk/output.js +11 -0
- package/dist/sdk/output.js.map +1 -0
- package/dist/sdk/pagination.d.ts +4 -1
- package/dist/sdk/pagination.js +13 -5
- package/dist/sdk/pagination.js.map +1 -1
- package/dist/sdk/profile.d.ts +176 -0
- package/dist/sdk/profile.js +431 -0
- package/dist/sdk/profile.js.map +1 -0
- package/dist/sdk/relationship-analytics.d.ts +108 -0
- package/dist/sdk/relationship-analytics.js +292 -0
- package/dist/sdk/relationship-analytics.js.map +1 -0
- package/dist/sdk/relationship-context.d.ts +67 -0
- package/dist/sdk/relationship-context.js +207 -0
- package/dist/sdk/relationship-context.js.map +1 -0
- package/dist/sdk/relationship-history.d.ts +109 -0
- package/dist/sdk/relationship-history.js +401 -0
- package/dist/sdk/relationship-history.js.map +1 -0
- package/dist/sdk/relationships.d.ts +145 -0
- package/dist/sdk/relationships.js +551 -0
- package/dist/sdk/relationships.js.map +1 -0
- package/dist/sdk/runtime-input.d.ts +10 -0
- package/dist/sdk/runtime-input.js +60 -0
- package/dist/sdk/runtime-input.js.map +1 -0
- package/dist/sdk/runtime.d.ts +31 -8
- package/dist/sdk/runtime.js +61 -57
- package/dist/sdk/runtime.js.map +1 -1
- package/dist/sdk/schema.d.ts +507 -0
- package/dist/sdk/schema.js +1269 -0
- package/dist/sdk/schema.js.map +1 -0
- package/dist/{cli/commands → sdk}/templates.d.ts +1 -1
- package/dist/{cli/commands → sdk}/templates.js +9 -9
- package/dist/sdk/templates.js.map +1 -0
- package/dist/{cli/commands → sdk}/test/linked-command-detection.d.ts +10 -2
- package/dist/sdk/test/linked-command-detection.js +525 -0
- package/dist/sdk/test/linked-command-detection.js.map +1 -0
- package/docs/COMMANDS.md +58 -40
- package/docs/EXTENSIONS.md +10 -1
- package/docs/RELATIONSHIP_GRAPH.md +113 -0
- package/docs/RELEASING.md +2 -0
- package/docs/SDK.md +156 -9
- package/docs/SDK_CUSTOMIZATION_PRIMITIVES.md +79 -0
- package/marketplace.json +2 -2
- package/package.json +3 -2
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-governance-audit/extensions/governance-audit/runtime-utils.ts +76 -16
- package/packages/pm-governance-audit/extensions/governance-audit/sdk.ts +8 -0
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/scripts/bundle-cli.mjs +66 -23
- package/dist/cli/commands/extension/bundled-catalog.js.map +0 -1
- package/dist/cli/commands/extension/doctor.js.map +0 -1
- package/dist/cli/commands/extension/install-sources.js.map +0 -1
- package/dist/cli/commands/extension/managed-state.js.map +0 -1
- package/dist/cli/commands/templates.js.map +0 -1
- package/dist/cli/commands/test/linked-command-detection.js +0 -248
- package/dist/cli/commands/test/linked-command-detection.js.map +0 -1
- package/dist/cli-bundle/chunks/append-DYQWQK2J.js +0 -11
- package/dist/cli-bundle/chunks/chunk-2GA3NK35.js +0 -530
- package/dist/cli-bundle/chunks/chunk-2GA3NK35.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-2QIQGYPW.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4DY4KPQI.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4WREH7RT.js +0 -554
- package/dist/cli-bundle/chunks/chunk-4WREH7RT.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5CT5BW6E.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5URI7TPJ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-6MHSBDGD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-6OTZMORS.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-6PKA3SJQ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-6TTOHMTB.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-7QDSYUMF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-7TQMR6LK.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-B5DZYTT3.js +0 -312
- package/dist/cli-bundle/chunks/chunk-B5DZYTT3.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-BPD26E3P.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-CDJYP7OQ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-DBZVUJTK.js +0 -858
- package/dist/cli-bundle/chunks/chunk-DBZVUJTK.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-DVOLZJ3C.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-DYEX6NFH.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-F7PSHRNO.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-FO7GMJKG.js +0 -875
- package/dist/cli-bundle/chunks/chunk-FO7GMJKG.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-FTQLW4JD.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-IA3YFTXT.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-IGED7NH2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-J4NZOP3I.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-JL7WZ4O2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-L24HCJFC.js +0 -309
- package/dist/cli-bundle/chunks/chunk-L24HCJFC.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-LWTIRS3Y.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-MKL4CP2I.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-N3CMP4NI.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-PHKP3AGR.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-Q37E63AM.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-QASRVKUQ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RGXD5JJR.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-UB2QYSTO.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-UGTVWL3E.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ZAYYDNB3.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ZUKSZVBW.js.map +0 -7
- package/dist/cli-bundle/chunks/close-RI4JQQHU.js +0 -12
- package/dist/cli-bundle/chunks/close-many-LY2XJ52M.js +0 -21
- package/dist/cli-bundle/chunks/comments-35M273DN.js +0 -13
- package/dist/cli-bundle/chunks/copy-NPYM7M7U.js +0 -9
- package/dist/cli-bundle/chunks/delete-ODRWJWAM.js +0 -10
- package/dist/cli-bundle/chunks/docs-G7N4E2JO.js +0 -14
- package/dist/cli-bundle/chunks/focus-U5TRVCRS.js +0 -10
- package/dist/cli-bundle/chunks/history-compact-M7GHYVFN.js +0 -20
- package/dist/cli-bundle/chunks/history-redact-JIHZLHDP.js +0 -16
- package/dist/cli-bundle/chunks/history-repair-NAFCHLH7.js +0 -18
- package/dist/cli-bundle/chunks/learnings-SONGPSHI.js +0 -13
- package/dist/cli-bundle/chunks/notes-BSD53H2W.js +0 -13
- package/dist/cli-bundle/chunks/plan-AWLYGBNV.js +0 -24
- package/dist/cli-bundle/chunks/register-list-query-BUWCYHBT.js.map +0 -7
- package/dist/cli-bundle/chunks/register-list-query-KTZ6AGE7.js.map +0 -1
- package/dist/cli-bundle/chunks/register-mutation-4FMGJJF7.js.map +0 -1
- package/dist/cli-bundle/chunks/restore-66GLMHIX.js +0 -14
- package/dist/cli-bundle/chunks/update-2XGHIVQ2.js +0 -21
- package/dist/cli-bundle/chunks/update-many-75K57FS3.js +0 -34
- package/dist/cli-bundle/chunks/update-many-U42YA445.js +0 -30
- /package/dist/cli-bundle/chunks/{append-PVZJDM6J.js.map → append-OJQFUQ4T.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-DYQWQK2J.js.map → append-UZVHUO74.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MQZ3PLCF.js.map → chunk-2IFFUZLC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-P6MYFH6K.js.map → chunk-2JKGO6QX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-X3GYR4P2.js.map → chunk-2NCIPMQP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Q7E6OYZK.js.map → chunk-2VPAVL7O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DRNJPEPQ.js.map → chunk-2WSE6PO2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FDSBDNYE.js.map → chunk-34L5OT3Y.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TH7U4KLY.js.map → chunk-3AUGG2DP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NKW36AMT.js.map → chunk-3CLU2XZO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ABRCOSDC.js.map → chunk-3WM75PWC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-X6BVXQ52.js.map → chunk-5JLUII3O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3TL7WOEF.js.map → chunk-6N2VXVTQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ERL2YFJ2.js.map → chunk-6S3YSUYG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IFZA4VB5.js.map → chunk-AHVTB5I5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-DO5RGJXT.js.map → chunk-APRVSW2O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NAQYVWSQ.js.map → chunk-B7PE22W6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MD6ULIPJ.js.map → chunk-BCOFWYW4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KADLSPIU.js.map → chunk-BEP7WJA2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OBDLEQG5.js.map → chunk-CRVF2JDM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FJZDA6MS.js.map → chunk-DM4H7FP4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-LZECOMHO.js.map → chunk-DUT67M43.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-44LNIULG.js.map → chunk-DYH63FX7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HAMLIWAF.js.map → chunk-EAB64KLB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CIOZ376P.js.map → chunk-EACOH7AU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QK2ZN6UL.js.map → chunk-EJEXHTY5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WQUEHPZB.js.map → chunk-EYLCSJAI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-655STMGA.js.map → chunk-FMBNM2EN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RMF3IOYQ.js.map → chunk-FNSPG7MU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KB726FMH.js.map → chunk-H2Z3FYXQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BN62TO2S.js.map → chunk-IA5FKNII.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-W6HZ55JO.js.map → chunk-IJIICKVW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-M7EWN4TF.js.map → chunk-JOUQZENX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2FNWQXZ2.js.map → chunk-JYFOV7FC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-HLHSQ5CA.js.map → chunk-K2X6U4UA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-M6ASXYCU.js.map → chunk-KG44YSKD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YVKE5ZDM.js.map → chunk-KPMKHGEA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-ZHI6A5TN.js.map → chunk-MIQDDLB5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UJ4HJYWL.js.map → chunk-NLDFBC6J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WRKB56FC.js.map → chunk-NP22ERDF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YQYG2V23.js.map → chunk-NU3IMIEA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3I3LRT2G.js.map → chunk-NVPZIJVR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JAF4TUQ7.js.map → chunk-ODALILG3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QZ7LT3XE.js.map → chunk-ONREO4ST.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3CMRNVTO.js.map → chunk-P74IZQ7A.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZTRBSABY.js.map → chunk-PGY23YTC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-H2QBAKLQ.js.map → chunk-PMOSXADO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-RI4JQQHU.js.map → chunk-PNTULOGU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GSEADLRH.js.map → chunk-Q7A43DS4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QSPARJWF.js.map → chunk-QEHQ2GVG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VJTAEIPC.js.map → chunk-QIPLHNP7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-K7WNZ7KD.js.map → chunk-QKJGPFAF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZNP64HOW.js.map → chunk-RLCHOOHC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IAPHYPRL.js.map → chunk-RMLWNPH2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UVBA6F5A.js.map → chunk-RRM5JYJC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6IIVBC56.js.map → chunk-S6MQESFR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QABYZYLU.js.map → chunk-SDQLJWBO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ANSJHDOZ.js.map → chunk-SELVXEZK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WD6MSYMP.js.map → chunk-TKOVBP6C.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TZ2PSLLT.js.map → chunk-TQSZFPIS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WPAWZW7S.js.map → chunk-TSMHDIW4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TZRTLMWM.js.map → chunk-UFXU44HV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TWLDBKQU.js.map → chunk-ULTHRDBP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RA5AIAMP.js.map → chunk-UOHFKBUV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4RXTMU57.js.map → chunk-UY2ACEMF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FIGXOCEQ.js.map → chunk-WUJQK4YV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-T4BRCB6Z.js.map → chunk-XSJUSQAE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UKUIIBDW.js.map → chunk-YAQEBNY7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-E2WC6S4P.js.map → chunk-YBLZ2VE7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Y72FV7RM.js.map → chunk-YCQET3OT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-LY2XJ52M.js.map → chunk-YUSOJDWM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FS6UM5WH.js.map → chunk-ZI6VQWQ7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-AJWRTFZ5.js.map → close-CWODTPKG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-35M273DN.js.map → close-W6LI2PKM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-GMXYKBXT.js.map → close-many-CQFUY7MR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-NPYM7M7U.js.map → close-many-DLDDVSH5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-F53OBTOU.js.map → comments-E3TNTK24.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-HU4Q7RJX.js.map → comments-WGLHR7LB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-GSDZLTRC.js.map → copy-LXVDXH7B.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-ODRWJWAM.js.map → copy-Q5ZJPUKR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-U57I7EAK.js.map → create-J5U6ND4K.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-WWB7P2GT.js.map → create-LBVCYMEG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-MQIY2ZQS.js.map → delete-PMJBNY5G.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-G7N4E2JO.js.map → delete-WNHB3LYW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-TTY6N2AV.js.map → deps-JZ7TMVCB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-TBZD7V6H.js.map → deps-OA26IS25.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-XT6YVFFX.js.map → docs-FEWB2DQB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-U5TRVCRS.js.map → docs-HA2AIDBB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-M7GHYVFN.js.map → files-6YFBJRBG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-KKVUWB4V.js.map → files-EFIWKFTM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-3DVZOILD.js.map → focus-4QJR7FOQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-JIHZLHDP.js.map → focus-POIW5LTJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-ITDUMK4N.js.map → history-compact-CKRPDTJN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-NAFCHLH7.js.map → history-compact-FWG2C7FZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-SONGPSHI.js.map → history-redact-BB3TGDAE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-FGO3NSFW.js.map → history-redact-D225BHOZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-BSD53H2W.js.map → history-repair-6GEAM7HE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-NQ6RXVW6.js.map → history-repair-RQXKQHL4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-2NNEO46V.js.map → learnings-JLNLCOL5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-AWLYGBNV.js.map → learnings-RSNLSWDC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-U725ATWZ.js.map → notes-2WDH6DXU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{profile-AAQUU6T3.js.map → notes-GB47XXQQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-66GLMHIX.js.map → plan-DOVI2VMW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-B3BAB6X2.js.map → plan-VDCJ2PCN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-U7IM2DXV.js.map → profile-FAU7NZML.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-LZNUYHDB.js.map → profile-IVXQEL3D.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-Q3UCILNR.js.map → restore-25DLT2Q2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-2XGHIVQ2.js.map → restore-YPMVUUEX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-75K57FS3.js.map → schema-FNU3WE4O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-U42YA445.js.map → schema-NBCM3RAD.js.map} +0 -0
- /package/dist/{cli/commands → sdk}/extension/managed-state.d.ts +0 -0
|
@@ -1,1139 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module cli/commands/config
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Preserves the CLI compatibility import path for SDK-owned configuration primitives.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!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]="
|
|
8
|
-
|
|
9
|
-
import { resolveConfigPositionalValue, } from "../../core/config/positional-value.js";
|
|
10
|
-
import { NESTED_SETTING_DESCRIPTORS, parseNestedSettingValue, readNestedSettingValue, resolveNestedSettingDescriptor, writeNestedSettingValue, } from "../../core/config/nested-settings.js";
|
|
11
|
-
import { getActiveExtensionRegistrations } from "../../core/extensions/index.js";
|
|
12
|
-
import { normalizeParentReferencePolicy } from "../../core/item/parent-reference-policy.js";
|
|
13
|
-
import { normalizeSprintReleaseFormatPolicy } from "../../core/item/sprint-release-format.js";
|
|
14
|
-
import { resolveItemTypeRegistry, resolveTypeName, } from "../../core/item/type-registry.js";
|
|
15
|
-
import { buildInvalidTypeError } from "../../core/schema/item-types-file.js";
|
|
16
|
-
import { resolveItemTypesFilePath } from "../../core/schema/runtime-schema.js";
|
|
17
|
-
import { EXIT_CODE } from "../../core/shared/constants.js";
|
|
18
|
-
import { PmCliError } from "../../core/shared/errors.js";
|
|
19
|
-
import { migrateItemFilesToFormat } from "../../core/store/item-format-migration.js";
|
|
20
|
-
import { getSettingsPath, resolveGlobalPmRoot, resolvePmRoot, } from "../../core/store/paths.js";
|
|
21
|
-
import { readSettingsWithMetadata, writeSettings, } from "../../core/store/settings.js";
|
|
22
|
-
import { CONTEXT_DEPTH_VALUES } from "../../types/index.js";
|
|
23
|
-
const CONFIG_SCOPE_VALUES = ["project", "global"];
|
|
24
|
-
const CONFIG_KEY_VALUES = [
|
|
25
|
-
"definition-of-done",
|
|
26
|
-
"definition_of_done",
|
|
27
|
-
"item-format",
|
|
28
|
-
"item_format",
|
|
29
|
-
"history-missing-stream-policy",
|
|
30
|
-
"history_missing_stream_policy",
|
|
31
|
-
"sprint-release-format-policy",
|
|
32
|
-
"sprint_release_format_policy",
|
|
33
|
-
"parent-reference-policy",
|
|
34
|
-
"parent_reference_policy",
|
|
35
|
-
"metadata-validation-profile",
|
|
36
|
-
"metadata_validation_profile",
|
|
37
|
-
"metadata-required-fields",
|
|
38
|
-
"metadata_required_fields",
|
|
39
|
-
"lifecycle-stale-blocker-reason-patterns",
|
|
40
|
-
"lifecycle_stale_blocker_reason_patterns",
|
|
41
|
-
"lifecycle-closure-like-blocked-reason-patterns",
|
|
42
|
-
"lifecycle_closure_like_blocked_reason_patterns",
|
|
43
|
-
"lifecycle-closure-like-resolution-patterns",
|
|
44
|
-
"lifecycle_closure_like_resolution_patterns",
|
|
45
|
-
"lifecycle-closure-like-actual-result-patterns",
|
|
46
|
-
"lifecycle_closure_like_actual_result_patterns",
|
|
47
|
-
"governance-preset",
|
|
48
|
-
"governance_preset",
|
|
49
|
-
"governance-ownership-enforcement",
|
|
50
|
-
"governance_ownership_enforcement",
|
|
51
|
-
"governance-create-mode-default",
|
|
52
|
-
"governance_create_mode_default",
|
|
53
|
-
"governance-close-validation-default",
|
|
54
|
-
"governance_close_validation_default",
|
|
55
|
-
"governance-require-close-reason",
|
|
56
|
-
"governance_require_close_reason",
|
|
57
|
-
"governance-create-default-type",
|
|
58
|
-
"governance_create_default_type",
|
|
59
|
-
"governance-workflow-enforcement",
|
|
60
|
-
"governance_workflow_enforcement",
|
|
61
|
-
"governance-parent-reference-policy",
|
|
62
|
-
"governance_parent_reference_policy",
|
|
63
|
-
"governance-metadata-validation-profile",
|
|
64
|
-
"governance_metadata_validation_profile",
|
|
65
|
-
"governance-force-required-for-stale-lock",
|
|
66
|
-
"governance_force_required_for_stale_lock",
|
|
67
|
-
"test-result-tracking",
|
|
68
|
-
"test_result_tracking",
|
|
69
|
-
"telemetry-tracking",
|
|
70
|
-
"telemetry_tracking",
|
|
71
|
-
"context",
|
|
72
|
-
];
|
|
73
|
-
const CONFIG_KEY_ALIASES = {
|
|
74
|
-
definition_of_done: ["definition-of-done", "definition_of_done"],
|
|
75
|
-
item_format: ["item-format", "item_format"],
|
|
76
|
-
history_missing_stream_policy: [
|
|
77
|
-
"history-missing-stream-policy",
|
|
78
|
-
"history_missing_stream_policy",
|
|
79
|
-
],
|
|
80
|
-
sprint_release_format_policy: [
|
|
81
|
-
"sprint-release-format-policy",
|
|
82
|
-
"sprint_release_format_policy",
|
|
83
|
-
],
|
|
84
|
-
parent_reference_policy: [
|
|
85
|
-
"parent-reference-policy",
|
|
86
|
-
"parent_reference_policy",
|
|
87
|
-
],
|
|
88
|
-
metadata_validation_profile: [
|
|
89
|
-
"metadata-validation-profile",
|
|
90
|
-
"metadata_validation_profile",
|
|
91
|
-
],
|
|
92
|
-
metadata_required_fields: [
|
|
93
|
-
"metadata-required-fields",
|
|
94
|
-
"metadata_required_fields",
|
|
95
|
-
],
|
|
96
|
-
lifecycle_stale_blocker_reason_patterns: [
|
|
97
|
-
"lifecycle-stale-blocker-reason-patterns",
|
|
98
|
-
"lifecycle_stale_blocker_reason_patterns",
|
|
99
|
-
],
|
|
100
|
-
lifecycle_closure_like_blocked_reason_patterns: [
|
|
101
|
-
"lifecycle-closure-like-blocked-reason-patterns",
|
|
102
|
-
"lifecycle_closure_like_blocked_reason_patterns",
|
|
103
|
-
],
|
|
104
|
-
lifecycle_closure_like_resolution_patterns: [
|
|
105
|
-
"lifecycle-closure-like-resolution-patterns",
|
|
106
|
-
"lifecycle_closure_like_resolution_patterns",
|
|
107
|
-
],
|
|
108
|
-
lifecycle_closure_like_actual_result_patterns: [
|
|
109
|
-
"lifecycle-closure-like-actual-result-patterns",
|
|
110
|
-
"lifecycle_closure_like_actual_result_patterns",
|
|
111
|
-
],
|
|
112
|
-
governance_preset: ["governance-preset", "governance_preset"],
|
|
113
|
-
governance_ownership_enforcement: [
|
|
114
|
-
"governance-ownership-enforcement",
|
|
115
|
-
"governance_ownership_enforcement",
|
|
116
|
-
],
|
|
117
|
-
governance_create_mode_default: [
|
|
118
|
-
"governance-create-mode-default",
|
|
119
|
-
"governance_create_mode_default",
|
|
120
|
-
],
|
|
121
|
-
governance_close_validation_default: [
|
|
122
|
-
"governance-close-validation-default",
|
|
123
|
-
"governance_close_validation_default",
|
|
124
|
-
],
|
|
125
|
-
governance_require_close_reason: [
|
|
126
|
-
"governance-require-close-reason",
|
|
127
|
-
"governance_require_close_reason",
|
|
128
|
-
],
|
|
129
|
-
governance_create_default_type: [
|
|
130
|
-
"governance-create-default-type",
|
|
131
|
-
"governance_create_default_type",
|
|
132
|
-
],
|
|
133
|
-
governance_workflow_enforcement: [
|
|
134
|
-
"governance-workflow-enforcement",
|
|
135
|
-
"governance_workflow_enforcement",
|
|
136
|
-
],
|
|
137
|
-
governance_parent_reference_policy: [
|
|
138
|
-
"governance-parent-reference-policy",
|
|
139
|
-
"governance_parent_reference_policy",
|
|
140
|
-
],
|
|
141
|
-
governance_metadata_validation_profile: [
|
|
142
|
-
"governance-metadata-validation-profile",
|
|
143
|
-
"governance_metadata_validation_profile",
|
|
144
|
-
],
|
|
145
|
-
governance_force_required_for_stale_lock: [
|
|
146
|
-
"governance-force-required-for-stale-lock",
|
|
147
|
-
"governance_force_required_for_stale_lock",
|
|
148
|
-
],
|
|
149
|
-
test_result_tracking: ["test-result-tracking", "test_result_tracking"],
|
|
150
|
-
telemetry_tracking: ["telemetry-tracking", "telemetry_tracking"],
|
|
151
|
-
context: ["context"],
|
|
152
|
-
};
|
|
153
|
-
// Canonical kebab-case forms (first alias entry per key). Used for the invalid-key
|
|
154
|
-
// hint so agents see ~21 keys instead of all ~45 kebab+snake variants; snake_case
|
|
155
|
-
// forms stay fully accepted as input via CONFIG_KEY_VALUES/normalizeKey.
|
|
156
|
-
const CANONICAL_CONFIG_KEYS = Object.keys(CONFIG_KEY_ALIASES).map((candidate) => CONFIG_KEY_ALIASES[candidate][0]);
|
|
157
|
-
const CONFIG_KEY_BY_ALIAS = Object.fromEntries(Object.keys(CONFIG_KEY_ALIASES).flatMap((key) => CONFIG_KEY_ALIASES[key].map((alias) => [alias, key])));
|
|
158
|
-
const CONFIG_KEY_SUMMARIES = {
|
|
159
|
-
definition_of_done: "Definition of Done criteria list.",
|
|
160
|
-
item_format: "Default item file format.",
|
|
161
|
-
history_missing_stream_policy: "Missing history stream handling policy.",
|
|
162
|
-
sprint_release_format_policy: "Sprint/release format validation policy.",
|
|
163
|
-
parent_reference_policy: "Parent reference validation policy.",
|
|
164
|
-
metadata_validation_profile: "Validate metadata profile policy (core|strict|custom).",
|
|
165
|
-
metadata_required_fields: "Validate custom metadata required-fields list.",
|
|
166
|
-
lifecycle_stale_blocker_reason_patterns: "Validate lifecycle stale-blocker reason substring patterns (criteria list).",
|
|
167
|
-
lifecycle_closure_like_blocked_reason_patterns: "Validate lifecycle closure-like blocked_reason substring patterns (criteria list).",
|
|
168
|
-
lifecycle_closure_like_resolution_patterns: "Validate lifecycle closure-like resolution substring patterns (criteria list).",
|
|
169
|
-
lifecycle_closure_like_actual_result_patterns: "Validate lifecycle closure-like actual_result substring patterns (criteria list).",
|
|
170
|
-
governance_preset: "Governance preset policy (minimal|default|strict|custom).",
|
|
171
|
-
governance_ownership_enforcement: "Governance ownership enforcement policy (none|warn|strict).",
|
|
172
|
-
governance_create_mode_default: "Governance default create mode (progressive|strict).",
|
|
173
|
-
governance_close_validation_default: "Governance default close validation mode (off|warn|strict).",
|
|
174
|
-
governance_require_close_reason: "Governance close-reason requirement policy (enabled|disabled).",
|
|
175
|
-
governance_create_default_type: "Governance default item type for `pm create` when --type is omitted.",
|
|
176
|
-
governance_workflow_enforcement: "Governance per-type transition enforcement mode (off|warn|strict).",
|
|
177
|
-
governance_parent_reference_policy: "Governance parent reference policy (warn|strict_error).",
|
|
178
|
-
governance_metadata_validation_profile: "Governance metadata validation profile (core|strict|custom).",
|
|
179
|
-
governance_force_required_for_stale_lock: "Governance stale-lock force policy (enabled|disabled).",
|
|
180
|
-
test_result_tracking: "Item-level linked test result persistence policy.",
|
|
181
|
-
telemetry_tracking: "Telemetry usage reporting policy.",
|
|
182
|
-
context: "Context command settings (depth, section toggles, limits).",
|
|
183
|
-
};
|
|
184
|
-
const LIFECYCLE_PATTERN_CONFIG_KEYS = [
|
|
185
|
-
"lifecycle_stale_blocker_reason_patterns",
|
|
186
|
-
"lifecycle_closure_like_blocked_reason_patterns",
|
|
187
|
-
"lifecycle_closure_like_resolution_patterns",
|
|
188
|
-
"lifecycle_closure_like_actual_result_patterns",
|
|
189
|
-
];
|
|
190
|
-
const CRITERIA_CONFIG_KEYS = new Set([
|
|
191
|
-
"metadata_required_fields",
|
|
192
|
-
...LIFECYCLE_PATTERN_CONFIG_KEYS,
|
|
193
|
-
]);
|
|
194
|
-
const TRACKING_CONFIG_KEYS = new Set([
|
|
195
|
-
"test_result_tracking",
|
|
196
|
-
"telemetry_tracking",
|
|
197
|
-
]);
|
|
198
|
-
const GOVERNANCE_BOOLEAN_CONFIG_KEYS = new Set([
|
|
199
|
-
"governance_require_close_reason",
|
|
200
|
-
"governance_force_required_for_stale_lock",
|
|
201
|
-
]);
|
|
202
|
-
const GOVERNANCE_POLICY_CONFIG_KEYS = new Set([
|
|
203
|
-
"governance_ownership_enforcement",
|
|
204
|
-
"governance_create_mode_default",
|
|
205
|
-
"governance_close_validation_default",
|
|
206
|
-
]);
|
|
207
|
-
const GOVERNANCE_VALIDATION_CONFIG_KEYS = new Set([
|
|
208
|
-
"governance_parent_reference_policy",
|
|
209
|
-
"governance_metadata_validation_profile",
|
|
210
|
-
"governance_workflow_enforcement",
|
|
211
|
-
]);
|
|
212
|
-
const GOVERNANCE_PRESET_OR_TYPE_CONFIG_KEYS = new Set(["governance_preset", "governance_create_default_type"]);
|
|
213
|
-
const isCriteriaValueConfigKey = (key) => CRITERIA_CONFIG_KEYS.has(key);
|
|
214
|
-
const isGovernancePolicyConfigKey = (key) => GOVERNANCE_POLICY_CONFIG_KEYS.has(key);
|
|
215
|
-
const isGovernanceValidationConfigKey = (key) => GOVERNANCE_VALIDATION_CONFIG_KEYS.has(key);
|
|
216
|
-
const isGovernancePresetOrTypeConfigKey = (key) => GOVERNANCE_PRESET_OR_TYPE_CONFIG_KEYS.has(key);
|
|
217
|
-
function isCriteriaConfigKey(key) {
|
|
218
|
-
return key === "definition_of_done" || isCriteriaValueConfigKey(key);
|
|
219
|
-
}
|
|
220
|
-
function normalizeScope(value) {
|
|
221
|
-
if (CONFIG_SCOPE_VALUES.includes(value)) {
|
|
222
|
-
return value;
|
|
223
|
-
}
|
|
224
|
-
throw new PmCliError(`Invalid config scope "${value}". Allowed: ${CONFIG_SCOPE_VALUES.join(", ")}`, EXIT_CODE.USAGE);
|
|
225
|
-
}
|
|
226
|
-
function normalizeAction(value) {
|
|
227
|
-
if (value === "get" ||
|
|
228
|
-
value === "set" ||
|
|
229
|
-
value === "list" ||
|
|
230
|
-
value === "export") {
|
|
231
|
-
return value;
|
|
232
|
-
}
|
|
233
|
-
throw new PmCliError(`Invalid config action "${value}". Allowed: get, set, list, export`, EXIT_CODE.USAGE);
|
|
234
|
-
}
|
|
235
|
-
function normalizeKey(value) {
|
|
236
|
-
const key = CONFIG_KEY_BY_ALIAS[value];
|
|
237
|
-
if (key) {
|
|
238
|
-
return key;
|
|
239
|
-
}
|
|
240
|
-
const nestedKeys = NESTED_SETTING_DESCRIPTORS.map((descriptor) => descriptor.key).join(", ");
|
|
241
|
-
throw new PmCliError(`Invalid config key "${value}". Supported: ${CANONICAL_CONFIG_KEYS.join(", ")} (underscore variants also accepted). Nested leaf settings: ${nestedKeys}.`, EXIT_CODE.USAGE);
|
|
242
|
-
}
|
|
243
|
-
function normalizeCriteria(values, clearCriteria) {
|
|
244
|
-
const normalized = [
|
|
245
|
-
...new Set((values ?? [])
|
|
246
|
-
.map((value) => value.trim())
|
|
247
|
-
.filter((value) => value.length > 0)),
|
|
248
|
-
].sort((left, right) => left.localeCompare(right));
|
|
249
|
-
if (clearCriteria) {
|
|
250
|
-
if (normalized.length > 0) {
|
|
251
|
-
throw new PmCliError("Config set definition-of-done cannot combine --clear-criteria with --criterion values", EXIT_CODE.USAGE);
|
|
252
|
-
}
|
|
253
|
-
return [];
|
|
254
|
-
}
|
|
255
|
-
if (normalized.length === 0) {
|
|
256
|
-
throw new PmCliError("Config set definition-of-done requires at least one non-empty --criterion value (or --clear-criteria to clear)", EXIT_CODE.USAGE);
|
|
257
|
-
}
|
|
258
|
-
return normalized;
|
|
259
|
-
}
|
|
260
|
-
function normalizeItemFormat(value) {
|
|
261
|
-
const normalized = value?.trim().toLowerCase();
|
|
262
|
-
if (normalized === "toon") {
|
|
263
|
-
return "toon";
|
|
264
|
-
}
|
|
265
|
-
if (normalized === "json_markdown") {
|
|
266
|
-
throw new PmCliError("Config set item-format no longer accepts json_markdown. Markdown item files are legacy read/migration input only.", EXIT_CODE.USAGE);
|
|
267
|
-
}
|
|
268
|
-
throw new PmCliError("Config set item-format requires --format toon", EXIT_CODE.USAGE);
|
|
269
|
-
}
|
|
270
|
-
function normalizeHistoryMissingStreamPolicy(value) {
|
|
271
|
-
const normalized = value?.trim().toLowerCase().replaceAll("-", "_");
|
|
272
|
-
if (normalized === "auto_create" || normalized === "strict_error") {
|
|
273
|
-
return normalized;
|
|
274
|
-
}
|
|
275
|
-
throw new PmCliError("Config set history-missing-stream-policy requires --policy with one of: auto_create, strict_error", EXIT_CODE.USAGE);
|
|
276
|
-
}
|
|
277
|
-
function normalizeTestResultTrackingPolicy(value) {
|
|
278
|
-
const normalized = value?.trim().toLowerCase().replaceAll("-", "_");
|
|
279
|
-
if (normalized === "enabled" || normalized === "disabled") {
|
|
280
|
-
return normalized;
|
|
281
|
-
}
|
|
282
|
-
throw new PmCliError("Config set test-result-tracking requires --policy with one of: enabled, disabled", EXIT_CODE.USAGE);
|
|
283
|
-
}
|
|
284
|
-
function normalizeTelemetryTrackingPolicy(value) {
|
|
285
|
-
const normalized = value?.trim().toLowerCase().replaceAll("-", "_");
|
|
286
|
-
if (normalized === "enabled" || normalized === "disabled") {
|
|
287
|
-
return normalized;
|
|
288
|
-
}
|
|
289
|
-
throw new PmCliError("Config set telemetry-tracking requires --policy with one of: enabled, disabled", EXIT_CODE.USAGE);
|
|
290
|
-
}
|
|
291
|
-
function normalizeValidateMetadataProfile(value) {
|
|
292
|
-
const normalized = value?.trim().toLowerCase().replaceAll("-", "_");
|
|
293
|
-
if (normalized === "core" ||
|
|
294
|
-
normalized === "strict" ||
|
|
295
|
-
normalized === "custom") {
|
|
296
|
-
return normalized;
|
|
297
|
-
}
|
|
298
|
-
throw new PmCliError("Config set metadata-validation-profile requires --policy with one of: core, strict, custom", EXIT_CODE.USAGE);
|
|
299
|
-
}
|
|
300
|
-
function normalizeGovernancePreset(value) {
|
|
301
|
-
const normalized = value?.trim().toLowerCase().replaceAll("-", "_");
|
|
302
|
-
if (normalized === "minimal" ||
|
|
303
|
-
normalized === "default" ||
|
|
304
|
-
normalized === "strict" ||
|
|
305
|
-
normalized === "custom") {
|
|
306
|
-
return normalized;
|
|
307
|
-
}
|
|
308
|
-
throw new PmCliError("Config set governance-preset requires --policy with one of: minimal, default, strict, custom", EXIT_CODE.USAGE);
|
|
309
|
-
}
|
|
310
|
-
function normalizeGovernanceOwnershipEnforcement(value) {
|
|
311
|
-
const normalized = value?.trim().toLowerCase().replaceAll("-", "_");
|
|
312
|
-
if (normalized === "none" ||
|
|
313
|
-
normalized === "warn" ||
|
|
314
|
-
normalized === "strict") {
|
|
315
|
-
return normalized;
|
|
316
|
-
}
|
|
317
|
-
throw new PmCliError("Config set governance-ownership-enforcement requires --policy with one of: none, warn, strict", EXIT_CODE.USAGE);
|
|
318
|
-
}
|
|
319
|
-
function normalizeGovernanceCreateModeDefault(value) {
|
|
320
|
-
const normalized = value?.trim().toLowerCase().replaceAll("-", "_");
|
|
321
|
-
if (normalized === "progressive" || normalized === "strict") {
|
|
322
|
-
return normalized;
|
|
323
|
-
}
|
|
324
|
-
throw new PmCliError("Config set governance-create-mode-default requires --policy with one of: progressive, strict", EXIT_CODE.USAGE);
|
|
325
|
-
}
|
|
326
|
-
function normalizeGovernanceCloseValidationDefault(value) {
|
|
327
|
-
const normalized = value?.trim().toLowerCase().replaceAll("-", "_");
|
|
328
|
-
if (normalized === "off" ||
|
|
329
|
-
normalized === "warn" ||
|
|
330
|
-
normalized === "strict") {
|
|
331
|
-
return normalized;
|
|
332
|
-
}
|
|
333
|
-
if (normalized === "none" || normalized === "disabled") {
|
|
334
|
-
return "off";
|
|
335
|
-
}
|
|
336
|
-
throw new PmCliError("Config set governance-close-validation-default requires --policy with one of: off, warn, strict", EXIT_CODE.USAGE);
|
|
337
|
-
}
|
|
338
|
-
function normalizeGovernanceWorkflowEnforcement(value) {
|
|
339
|
-
const normalized = typeof value === "string"
|
|
340
|
-
? value.trim().toLowerCase().replaceAll("-", "_")
|
|
341
|
-
: undefined;
|
|
342
|
-
if (normalized === "off" ||
|
|
343
|
-
normalized === "warn" ||
|
|
344
|
-
normalized === "strict") {
|
|
345
|
-
return normalized;
|
|
346
|
-
}
|
|
347
|
-
if (normalized === "none" || normalized === "disabled") {
|
|
348
|
-
return "off";
|
|
349
|
-
}
|
|
350
|
-
throw new PmCliError("Config set governance-workflow-enforcement requires one of: off, warn, strict", EXIT_CODE.USAGE);
|
|
351
|
-
}
|
|
352
|
-
function normalizeGovernanceForceRequiredForStaleLockPolicy(value) {
|
|
353
|
-
const normalized = value?.trim().toLowerCase().replaceAll("-", "_");
|
|
354
|
-
if (normalized === "enabled" || normalized === "disabled") {
|
|
355
|
-
return normalized;
|
|
356
|
-
}
|
|
357
|
-
throw new PmCliError("Config set governance-force-required-for-stale-lock requires --policy with one of: enabled, disabled", EXIT_CODE.USAGE);
|
|
358
|
-
}
|
|
359
|
-
function normalizeGovernanceRequireCloseReasonPolicy(value) {
|
|
360
|
-
const normalized = value?.trim().toLowerCase().replaceAll("-", "_");
|
|
361
|
-
if (normalized === "enabled" || normalized === "disabled") {
|
|
362
|
-
return normalized;
|
|
363
|
-
}
|
|
364
|
-
throw new PmCliError("Config set governance-require-close-reason requires --policy with one of: enabled, disabled", EXIT_CODE.USAGE);
|
|
365
|
-
}
|
|
366
|
-
function normalizePolicyForConflict(key, value) {
|
|
367
|
-
switch (key) {
|
|
368
|
-
case "history_missing_stream_policy":
|
|
369
|
-
return normalizeHistoryMissingStreamPolicy(value);
|
|
370
|
-
case "sprint_release_format_policy":
|
|
371
|
-
return normalizeSprintReleaseFormatPolicy(value);
|
|
372
|
-
case "parent_reference_policy":
|
|
373
|
-
case "governance_parent_reference_policy":
|
|
374
|
-
return normalizeParentReferencePolicy(value);
|
|
375
|
-
case "metadata_validation_profile":
|
|
376
|
-
case "governance_metadata_validation_profile":
|
|
377
|
-
return normalizeValidateMetadataProfile(value);
|
|
378
|
-
case "governance_preset":
|
|
379
|
-
return normalizeGovernancePreset(value);
|
|
380
|
-
case "governance_ownership_enforcement":
|
|
381
|
-
return normalizeGovernanceOwnershipEnforcement(value);
|
|
382
|
-
case "governance_create_mode_default":
|
|
383
|
-
return normalizeGovernanceCreateModeDefault(value);
|
|
384
|
-
case "governance_close_validation_default":
|
|
385
|
-
return normalizeGovernanceCloseValidationDefault(value);
|
|
386
|
-
case "governance_require_close_reason":
|
|
387
|
-
return normalizeGovernanceRequireCloseReasonPolicy(value);
|
|
388
|
-
case "governance_workflow_enforcement":
|
|
389
|
-
return normalizeGovernanceWorkflowEnforcement(value);
|
|
390
|
-
case "governance_force_required_for_stale_lock":
|
|
391
|
-
return normalizeGovernanceForceRequiredForStaleLockPolicy(value);
|
|
392
|
-
case "test_result_tracking":
|
|
393
|
-
return normalizeTestResultTrackingPolicy(value);
|
|
394
|
-
case "telemetry_tracking":
|
|
395
|
-
return normalizeTelemetryTrackingPolicy(value);
|
|
396
|
-
default:
|
|
397
|
-
return value.trim().toLowerCase().replaceAll("-", "_");
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
const METADATA_REQUIRED_FIELD_ALIAS_MAP = {
|
|
401
|
-
author: "author",
|
|
402
|
-
acceptance_criteria: "acceptance_criteria",
|
|
403
|
-
"acceptance-criteria": "acceptance_criteria",
|
|
404
|
-
estimated_minutes: "estimated_minutes",
|
|
405
|
-
"estimated-minutes": "estimated_minutes",
|
|
406
|
-
estimate: "estimated_minutes",
|
|
407
|
-
close_reason: "close_reason",
|
|
408
|
-
"close-reason": "close_reason",
|
|
409
|
-
reviewer: "reviewer",
|
|
410
|
-
risk: "risk",
|
|
411
|
-
confidence: "confidence",
|
|
412
|
-
sprint: "sprint",
|
|
413
|
-
release: "release",
|
|
414
|
-
};
|
|
415
|
-
const METADATA_REQUIRED_FIELD_OPTIONS = [
|
|
416
|
-
"author",
|
|
417
|
-
"acceptance_criteria",
|
|
418
|
-
"estimated_minutes",
|
|
419
|
-
"close_reason",
|
|
420
|
-
"reviewer",
|
|
421
|
-
"risk",
|
|
422
|
-
"confidence",
|
|
423
|
-
"sprint",
|
|
424
|
-
"release",
|
|
425
|
-
];
|
|
426
|
-
function normalizeMetadataRequiredFields(values, clearCriteria) {
|
|
427
|
-
const normalized = [
|
|
428
|
-
...new Set((values ?? [])
|
|
429
|
-
.map((value) => value.trim())
|
|
430
|
-
.filter((value) => value.length > 0)),
|
|
431
|
-
];
|
|
432
|
-
if (clearCriteria) {
|
|
433
|
-
if (normalized.length > 0) {
|
|
434
|
-
throw new PmCliError("Config set metadata-required-fields cannot combine --clear-criteria with --criterion values", EXIT_CODE.USAGE);
|
|
435
|
-
}
|
|
436
|
-
return [];
|
|
437
|
-
}
|
|
438
|
-
if (normalized.length === 0) {
|
|
439
|
-
throw new PmCliError("Config set metadata-required-fields requires at least one --criterion value (or --clear-criteria to clear)", EXIT_CODE.USAGE);
|
|
440
|
-
}
|
|
441
|
-
const lowered = normalized.map((value) => value.toLowerCase().replaceAll("-", "_"));
|
|
442
|
-
const unsupported = lowered.filter((value) => METADATA_REQUIRED_FIELD_ALIAS_MAP[value] === undefined);
|
|
443
|
-
if (unsupported.length > 0) {
|
|
444
|
-
throw new PmCliError(`Config set metadata-required-fields received unsupported values: ${unsupported.join(", ")}. ` +
|
|
445
|
-
`Supported values: ${METADATA_REQUIRED_FIELD_OPTIONS.join(", ")}`, EXIT_CODE.USAGE);
|
|
446
|
-
}
|
|
447
|
-
return [
|
|
448
|
-
...new Set(lowered.map((value) => METADATA_REQUIRED_FIELD_ALIAS_MAP[value])),
|
|
449
|
-
].sort((left, right) => left.localeCompare(right));
|
|
450
|
-
}
|
|
451
|
-
function normalizeLifecyclePatternCriteria(key, values, clearCriteria) {
|
|
452
|
-
const normalized = [
|
|
453
|
-
...new Set((values ?? [])
|
|
454
|
-
.map((value) => value.trim().toLowerCase())
|
|
455
|
-
.filter((value) => value.length > 0)),
|
|
456
|
-
].sort((left, right) => left.localeCompare(right));
|
|
457
|
-
if (clearCriteria) {
|
|
458
|
-
if (normalized.length > 0) {
|
|
459
|
-
throw new PmCliError(`Config set ${CONFIG_KEY_ALIASES[key][0]} cannot combine --clear-criteria with --criterion values`, EXIT_CODE.USAGE);
|
|
460
|
-
}
|
|
461
|
-
return [];
|
|
462
|
-
}
|
|
463
|
-
if (normalized.length === 0) {
|
|
464
|
-
throw new PmCliError(`Config set ${CONFIG_KEY_ALIASES[key][0]} requires at least one --criterion value (or --clear-criteria to clear)`, EXIT_CODE.USAGE);
|
|
465
|
-
}
|
|
466
|
-
return normalized;
|
|
467
|
-
}
|
|
468
|
-
function normalizeWarnings(values) {
|
|
469
|
-
return [...new Set(values)].sort((left, right) => left.localeCompare(right));
|
|
470
|
-
}
|
|
471
|
-
function normalizeKeyForAction(action, value) {
|
|
472
|
-
if (action === "list" || action === "export") {
|
|
473
|
-
if (typeof value === "string" && value.trim().length > 0) {
|
|
474
|
-
throw new PmCliError(`Config action "${action}" does not accept <key>`, EXIT_CODE.USAGE);
|
|
475
|
-
}
|
|
476
|
-
return undefined;
|
|
477
|
-
}
|
|
478
|
-
if (typeof value !== "string" || value.trim().length === 0) {
|
|
479
|
-
throw new PmCliError(`Config action "${action}" requires <key>`, EXIT_CODE.USAGE);
|
|
480
|
-
}
|
|
481
|
-
return normalizeKey(value);
|
|
482
|
-
}
|
|
483
|
-
/** Narrows the `ConfigKey | undefined` carried into the get/set branches back to a concrete `ConfigKey`. By the time those branches run, `normalizeKeyForAction` has already thrown on a missing key and nested settings have returned earlier, so the `undefined` case is unreachable at runtime — the throw is a defensive type-narrowing guard only. */
|
|
484
|
-
function assertConfigKeyDefined(key) {
|
|
485
|
-
/* c8 ignore next 3 -- defensive: get/set always carry a key (see normalizeKeyForAction). */
|
|
486
|
-
if (!key) {
|
|
487
|
-
throw new PmCliError("Config action requires <key>", EXIT_CODE.USAGE);
|
|
488
|
-
}
|
|
489
|
-
}
|
|
490
|
-
const CONFIG_VALUE_READERS = {
|
|
491
|
-
definition_of_done: (settings) => [...settings.workflow.definition_of_done],
|
|
492
|
-
item_format: (settings) => settings.item_format,
|
|
493
|
-
history_missing_stream_policy: (settings) => settings.history.missing_stream,
|
|
494
|
-
sprint_release_format_policy: (settings) => settings.validation.sprint_release_format,
|
|
495
|
-
parent_reference_policy: (settings) => settings.validation.parent_reference,
|
|
496
|
-
metadata_validation_profile: (settings) => settings.validation.metadata_profile,
|
|
497
|
-
metadata_required_fields: (settings) => [
|
|
498
|
-
...settings.validation.metadata_required_fields,
|
|
499
|
-
],
|
|
500
|
-
lifecycle_stale_blocker_reason_patterns: (settings) => [
|
|
501
|
-
...settings.validation.lifecycle_stale_blocker_reason_patterns,
|
|
502
|
-
],
|
|
503
|
-
lifecycle_closure_like_blocked_reason_patterns: (settings) => [
|
|
504
|
-
...settings.validation.lifecycle_closure_like_blocked_reason_patterns,
|
|
505
|
-
],
|
|
506
|
-
lifecycle_closure_like_resolution_patterns: (settings) => [
|
|
507
|
-
...settings.validation.lifecycle_closure_like_resolution_patterns,
|
|
508
|
-
],
|
|
509
|
-
lifecycle_closure_like_actual_result_patterns: (settings) => [
|
|
510
|
-
...settings.validation.lifecycle_closure_like_actual_result_patterns,
|
|
511
|
-
],
|
|
512
|
-
governance_preset: (settings) => settings.governance.preset,
|
|
513
|
-
governance_ownership_enforcement: (settings) => settings.governance.ownership_enforcement,
|
|
514
|
-
governance_create_mode_default: (settings) => settings.governance.create_mode_default,
|
|
515
|
-
governance_close_validation_default: (settings) => settings.governance.close_validation_default,
|
|
516
|
-
governance_require_close_reason: (settings) => settings.governance.require_close_reason ? "enabled" : "disabled",
|
|
517
|
-
governance_create_default_type: (settings) => settings.governance.create_default_type ?? "",
|
|
518
|
-
governance_workflow_enforcement: (settings) => settings.governance.workflow_enforcement ?? "off",
|
|
519
|
-
governance_parent_reference_policy: (settings) => settings.governance.parent_reference,
|
|
520
|
-
governance_metadata_validation_profile: (settings) => settings.governance.metadata_profile,
|
|
521
|
-
governance_force_required_for_stale_lock: (settings) => settings.governance.force_required_for_stale_lock ? "enabled" : "disabled",
|
|
522
|
-
test_result_tracking: (settings) => settings.testing.record_results_to_items ? "enabled" : "disabled",
|
|
523
|
-
telemetry_tracking: (settings) => settings.telemetry.enabled ? "enabled" : "disabled",
|
|
524
|
-
context: (settings) => ({
|
|
525
|
-
default_depth: settings.context.default_depth,
|
|
526
|
-
activity_limit: settings.context.activity_limit,
|
|
527
|
-
stale_threshold_days: settings.context.stale_threshold_days,
|
|
528
|
-
sections: { ...settings.context.sections },
|
|
529
|
-
}),
|
|
530
|
-
};
|
|
531
|
-
function readConfigValue(settings, key) {
|
|
532
|
-
return CONFIG_VALUE_READERS[key](settings);
|
|
533
|
-
}
|
|
534
|
-
function withWarnings(result, warnings) {
|
|
535
|
-
if (warnings.length === 0) {
|
|
536
|
-
return result;
|
|
537
|
-
}
|
|
538
|
-
return {
|
|
539
|
-
...result,
|
|
540
|
-
warnings,
|
|
541
|
-
};
|
|
542
|
-
}
|
|
543
|
-
async function resolveSettingsTarget(scope, global) {
|
|
544
|
-
const cwd = process.cwd();
|
|
545
|
-
const pmRoot = scope === "project"
|
|
546
|
-
? resolvePmRoot(cwd, global.path)
|
|
547
|
-
: resolveGlobalPmRoot(cwd);
|
|
548
|
-
const settingsPath = getSettingsPath(pmRoot);
|
|
549
|
-
if (scope === "project" && !(await pathExists(settingsPath))) {
|
|
550
|
-
throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
|
|
551
|
-
}
|
|
552
|
-
return { pmRoot, settingsPath };
|
|
553
|
-
}
|
|
554
|
-
function parseSectionToggle(raw) {
|
|
555
|
-
if (raw === undefined)
|
|
556
|
-
return undefined;
|
|
557
|
-
const normalized = raw.trim().toLowerCase();
|
|
558
|
-
if (normalized === "true" ||
|
|
559
|
-
normalized === "enabled" ||
|
|
560
|
-
normalized === "on" ||
|
|
561
|
-
normalized === "1")
|
|
562
|
-
return true;
|
|
563
|
-
if (normalized === "false" ||
|
|
564
|
-
normalized === "disabled" ||
|
|
565
|
-
normalized === "off" ||
|
|
566
|
-
normalized === "0")
|
|
567
|
-
return false;
|
|
568
|
-
throw new PmCliError(`Context section toggle must be true|false|enabled|disabled, got "${raw}"`, EXIT_CODE.USAGE);
|
|
569
|
-
}
|
|
570
|
-
async function applyContextConfig(settings, options, target, scope, warnings) {
|
|
571
|
-
let changed = false;
|
|
572
|
-
const ctx = settings.context;
|
|
573
|
-
if (options.defaultDepth !== undefined) {
|
|
574
|
-
const normalized = options.defaultDepth.trim().toLowerCase();
|
|
575
|
-
if (!CONTEXT_DEPTH_VALUES.includes(normalized)) {
|
|
576
|
-
throw new PmCliError(`Context --default-depth must be one of ${CONTEXT_DEPTH_VALUES.join("|")}`, EXIT_CODE.USAGE);
|
|
577
|
-
}
|
|
578
|
-
if (ctx.default_depth !== normalized) {
|
|
579
|
-
ctx.default_depth = normalized;
|
|
580
|
-
changed = true;
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
if (options.activityLimit !== undefined) {
|
|
584
|
-
const parsed = parseInt(options.activityLimit.trim(), 10);
|
|
585
|
-
if (isNaN(parsed) || parsed <= 0) {
|
|
586
|
-
throw new PmCliError("Context --activity-limit must be a positive integer", EXIT_CODE.USAGE);
|
|
587
|
-
}
|
|
588
|
-
if (ctx.activity_limit !== parsed) {
|
|
589
|
-
ctx.activity_limit = parsed;
|
|
590
|
-
changed = true;
|
|
591
|
-
}
|
|
592
|
-
}
|
|
593
|
-
if (options.staleThresholdDays !== undefined) {
|
|
594
|
-
const parsed = parseInt(options.staleThresholdDays.trim(), 10);
|
|
595
|
-
if (isNaN(parsed) || parsed <= 0) {
|
|
596
|
-
throw new PmCliError("Context --stale-threshold-days must be a positive integer", EXIT_CODE.USAGE);
|
|
597
|
-
}
|
|
598
|
-
if (ctx.stale_threshold_days !== parsed) {
|
|
599
|
-
ctx.stale_threshold_days = parsed;
|
|
600
|
-
changed = true;
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
const sectionToggles = [
|
|
604
|
-
["hierarchy", options.sectionHierarchy],
|
|
605
|
-
["activity", options.sectionActivity],
|
|
606
|
-
["progress", options.sectionProgress],
|
|
607
|
-
["blockers", options.sectionBlockers],
|
|
608
|
-
["files", options.sectionFiles],
|
|
609
|
-
["workload", options.sectionWorkload],
|
|
610
|
-
["staleness", options.sectionStaleness],
|
|
611
|
-
["tests", options.sectionTests],
|
|
612
|
-
];
|
|
613
|
-
for (const [sectionName, rawValue] of sectionToggles) {
|
|
614
|
-
const toggle = parseSectionToggle(rawValue);
|
|
615
|
-
if (toggle !== undefined) {
|
|
616
|
-
const key = sectionName;
|
|
617
|
-
if (ctx.sections[key] !== toggle) {
|
|
618
|
-
ctx.sections[key] = toggle;
|
|
619
|
-
changed = true;
|
|
620
|
-
}
|
|
621
|
-
}
|
|
622
|
-
}
|
|
623
|
-
if (changed) {
|
|
624
|
-
await writeSettings(target.pmRoot, settings, "config:set:context");
|
|
625
|
-
}
|
|
626
|
-
return withWarnings({
|
|
627
|
-
scope,
|
|
628
|
-
key: "context",
|
|
629
|
-
context_settings: {
|
|
630
|
-
default_depth: ctx.default_depth,
|
|
631
|
-
activity_limit: ctx.activity_limit,
|
|
632
|
-
stale_threshold_days: ctx.stale_threshold_days,
|
|
633
|
-
sections: { ...ctx.sections },
|
|
634
|
-
},
|
|
635
|
-
settings_path: target.settingsPath,
|
|
636
|
-
changed,
|
|
637
|
-
}, warnings);
|
|
638
|
-
}
|
|
639
|
-
function applyNestedSettingPositionalValue(keyValue, valueValue, options) {
|
|
640
|
-
if (options.value !== undefined && options.value !== valueValue) {
|
|
641
|
-
throw new PmCliError(`Config set ${keyValue} received both positional value "${valueValue}" and --value "${options.value}". Pass only one.`, EXIT_CODE.USAGE);
|
|
642
|
-
}
|
|
643
|
-
return { ...options, value: valueValue };
|
|
644
|
-
}
|
|
645
|
-
/** Route an intuitive `pm config set <key> <value>` positional value onto the typed flag it belongs to (--format/--policy/--criterion), applying enabled/disabled synonyms. Returns the (possibly augmented) options. The typed-flag forms keep working exactly as before: a positional value is only injected when its flag was not already supplied, and a conflicting explicit flag is a clear error. */
|
|
646
|
-
function applyPositionalValue(action, keyValue, normalizedKey, nestedSetting, valueValue, options) {
|
|
647
|
-
if (valueValue === undefined) {
|
|
648
|
-
return options;
|
|
649
|
-
}
|
|
650
|
-
if (action !== "set") {
|
|
651
|
-
throw new PmCliError(`Config action "${action}" does not accept a positional value. Only "set" takes <value>.`, EXIT_CODE.USAGE);
|
|
652
|
-
}
|
|
653
|
-
if (typeof keyValue !== "string" || keyValue.trim().length === 0) {
|
|
654
|
-
throw new PmCliError('Config action "set" requires <key> before a positional <value>.', EXIT_CODE.USAGE);
|
|
655
|
-
}
|
|
656
|
-
if (nestedSetting) {
|
|
657
|
-
return applyNestedSettingPositionalValue(keyValue, valueValue, options);
|
|
658
|
-
}
|
|
659
|
-
assertConfigKeyDefined(normalizedKey);
|
|
660
|
-
const routed = resolveConfigPositionalValue(normalizedKey, valueValue);
|
|
661
|
-
if (!routed.routable) {
|
|
662
|
-
throw new PmCliError(routed.reason, EXIT_CODE.USAGE);
|
|
663
|
-
}
|
|
664
|
-
if (routed.flag === "criterion") {
|
|
665
|
-
if (options.criterion !== undefined && options.criterion.length > 0) {
|
|
666
|
-
throw new PmCliError(`Config set ${keyValue} received both positional value "${valueValue}" and --criterion. Pass criteria via --criterion only when supplying more than one value.`, EXIT_CODE.USAGE);
|
|
667
|
-
}
|
|
668
|
-
return { ...options, criterion: routed.values };
|
|
669
|
-
}
|
|
670
|
-
if (routed.flag === "format") {
|
|
671
|
-
/* c8 ignore start -- only `toon` is valid, so normalized explicit/positional formats cannot conflict. */
|
|
672
|
-
if (options.format !== undefined &&
|
|
673
|
-
normalizeItemFormat(options.format) !== normalizeItemFormat(routed.value)) {
|
|
674
|
-
throw new PmCliError(`Config set ${keyValue} received both positional value "${valueValue}" and --format "${options.format}". Pass only one.`, EXIT_CODE.USAGE);
|
|
675
|
-
}
|
|
676
|
-
/* c8 ignore stop */
|
|
677
|
-
return { ...options, format: routed.value };
|
|
678
|
-
}
|
|
679
|
-
// policy flag (--policy)
|
|
680
|
-
if (options.policy !== undefined &&
|
|
681
|
-
normalizePolicyForConflict(normalizedKey, options.policy) !==
|
|
682
|
-
normalizePolicyForConflict(normalizedKey, routed.value)) {
|
|
683
|
-
throw new PmCliError(`Config set ${keyValue} received both positional value "${valueValue}" and --policy "${options.policy}". Pass only one.`, EXIT_CODE.USAGE);
|
|
684
|
-
}
|
|
685
|
-
return { ...options, policy: routed.value };
|
|
686
|
-
}
|
|
687
|
-
function buildConfigListResult(context) {
|
|
688
|
-
const keys = Object.keys(CONFIG_KEY_ALIASES).map((candidate) => ({
|
|
689
|
-
key: candidate,
|
|
690
|
-
aliases: CONFIG_KEY_ALIASES[candidate],
|
|
691
|
-
value_kind: candidate === "context"
|
|
692
|
-
? "object"
|
|
693
|
-
: isCriteriaConfigKey(candidate)
|
|
694
|
-
? "string_array"
|
|
695
|
-
: "enum",
|
|
696
|
-
set_flags: candidate === "context"
|
|
697
|
-
? [
|
|
698
|
-
"--default-depth",
|
|
699
|
-
"--activity-limit",
|
|
700
|
-
"--stale-threshold-days",
|
|
701
|
-
"--section-<name>",
|
|
702
|
-
]
|
|
703
|
-
: isCriteriaConfigKey(candidate)
|
|
704
|
-
? ["--criterion", "--clear-criteria"]
|
|
705
|
-
: candidate === "item_format"
|
|
706
|
-
? ["--format"]
|
|
707
|
-
: ["--policy"],
|
|
708
|
-
summary: CONFIG_KEY_SUMMARIES[candidate],
|
|
709
|
-
value: readConfigValue(context.settings, candidate),
|
|
710
|
-
}));
|
|
711
|
-
const nestedSettings = NESTED_SETTING_DESCRIPTORS.map((descriptor) => ({
|
|
712
|
-
key: descriptor.key,
|
|
713
|
-
path: descriptor.path,
|
|
714
|
-
kind: descriptor.kind,
|
|
715
|
-
value: readNestedSettingValue(context.settings, descriptor),
|
|
716
|
-
}));
|
|
717
|
-
return withWarnings({
|
|
718
|
-
scope: context.scope,
|
|
719
|
-
keys,
|
|
720
|
-
nested_settings: nestedSettings,
|
|
721
|
-
count: keys.length,
|
|
722
|
-
settings_path: context.target.settingsPath,
|
|
723
|
-
changed: false,
|
|
724
|
-
}, context.warnings);
|
|
725
|
-
}
|
|
726
|
-
function buildConfigExportResult(context) {
|
|
727
|
-
const values = Object.fromEntries(Object.keys(CONFIG_KEY_ALIASES).map((key) => [
|
|
728
|
-
key,
|
|
729
|
-
readConfigValue(context.settings, key),
|
|
730
|
-
]));
|
|
731
|
-
return withWarnings({
|
|
732
|
-
scope: context.scope,
|
|
733
|
-
values,
|
|
734
|
-
settings_path: context.target.settingsPath,
|
|
735
|
-
changed: false,
|
|
736
|
-
}, context.warnings);
|
|
737
|
-
}
|
|
738
|
-
function buildConfigGetResult(context, key) {
|
|
739
|
-
const value = readConfigValue(context.settings, key);
|
|
740
|
-
const base = {
|
|
741
|
-
scope: context.scope,
|
|
742
|
-
key,
|
|
743
|
-
settings_path: context.target.settingsPath,
|
|
744
|
-
changed: false,
|
|
745
|
-
};
|
|
746
|
-
if (key === "item_format") {
|
|
747
|
-
return withWarnings({
|
|
748
|
-
...base,
|
|
749
|
-
format: context.settings.item_format,
|
|
750
|
-
has_explicit_item_format: context.metadata.has_explicit_item_format,
|
|
751
|
-
}, context.warnings);
|
|
752
|
-
}
|
|
753
|
-
if (key === "context") {
|
|
754
|
-
return withWarnings({ ...base, context_settings: value }, context.warnings);
|
|
755
|
-
}
|
|
756
|
-
if (Array.isArray(value)) {
|
|
757
|
-
return withWarnings({ ...base, criteria: value }, context.warnings);
|
|
758
|
-
}
|
|
759
|
-
return withWarnings({ ...base, policy: value }, context.warnings);
|
|
760
|
-
}
|
|
761
|
-
async function buildNestedSettingResult(context, action, nestedSetting, options) {
|
|
762
|
-
if (action === "get") {
|
|
763
|
-
const currentValue = readNestedSettingValue(context.settings, nestedSetting);
|
|
764
|
-
return withWarnings({
|
|
765
|
-
scope: context.scope,
|
|
766
|
-
key: nestedSetting.key,
|
|
767
|
-
nested_setting: {
|
|
768
|
-
key: nestedSetting.key,
|
|
769
|
-
path: nestedSetting.path,
|
|
770
|
-
kind: nestedSetting.kind,
|
|
771
|
-
value: currentValue,
|
|
772
|
-
},
|
|
773
|
-
settings_path: context.target.settingsPath,
|
|
774
|
-
changed: false,
|
|
775
|
-
}, context.warnings);
|
|
776
|
-
}
|
|
777
|
-
const rawValue = options.value;
|
|
778
|
-
if (typeof rawValue !== "string") {
|
|
779
|
-
throw new PmCliError(`Config set ${nestedSetting.key} requires a value. Pass it positionally (\`pm config ${context.scope} set ${nestedSetting.key} <value>\`) or via --value.`, EXIT_CODE.USAGE);
|
|
780
|
-
}
|
|
781
|
-
const parsed = parseNestedSettingValue(nestedSetting, rawValue);
|
|
782
|
-
if (!parsed.ok) {
|
|
783
|
-
throw new PmCliError(parsed.error.message, EXIT_CODE.USAGE);
|
|
784
|
-
}
|
|
785
|
-
const changed = writeNestedSettingValue(context.settings, nestedSetting, parsed.parsed.value);
|
|
786
|
-
if (changed) {
|
|
787
|
-
await writeSettings(context.target.pmRoot, context.settings, `config:set:${nestedSetting.path}`);
|
|
788
|
-
}
|
|
789
|
-
return withWarnings({
|
|
790
|
-
scope: context.scope,
|
|
791
|
-
key: nestedSetting.key,
|
|
792
|
-
nested_setting: {
|
|
793
|
-
key: nestedSetting.key,
|
|
794
|
-
path: nestedSetting.path,
|
|
795
|
-
kind: nestedSetting.kind,
|
|
796
|
-
value: parsed.parsed.value,
|
|
797
|
-
},
|
|
798
|
-
settings_path: context.target.settingsPath,
|
|
799
|
-
changed,
|
|
800
|
-
}, context.warnings);
|
|
801
|
-
}
|
|
802
|
-
async function writeConfigSettingsIfChanged(context, changed, reason) {
|
|
803
|
-
if (changed) {
|
|
804
|
-
await writeSettings(context.target.pmRoot, context.settings, reason);
|
|
805
|
-
}
|
|
806
|
-
}
|
|
807
|
-
function hasGovernanceValidationMirrorChange(governanceValue, validationValue, nextPolicy) {
|
|
808
|
-
return governanceValue !== nextPolicy || validationValue !== nextPolicy;
|
|
809
|
-
}
|
|
810
|
-
function buildPolicyResult(context, key, policy, changed) {
|
|
811
|
-
return withWarnings({
|
|
812
|
-
scope: context.scope,
|
|
813
|
-
key,
|
|
814
|
-
policy,
|
|
815
|
-
settings_path: context.target.settingsPath,
|
|
816
|
-
changed,
|
|
817
|
-
}, context.warnings);
|
|
818
|
-
}
|
|
819
|
-
function buildCriteriaResult(context, key, criteria, changed) {
|
|
820
|
-
return withWarnings({
|
|
821
|
-
scope: context.scope,
|
|
822
|
-
key,
|
|
823
|
-
criteria,
|
|
824
|
-
settings_path: context.target.settingsPath,
|
|
825
|
-
changed,
|
|
826
|
-
}, context.warnings);
|
|
827
|
-
}
|
|
828
|
-
async function setItemFormatConfig(context, options) {
|
|
829
|
-
const nextFormat = normalizeItemFormat(options.format);
|
|
830
|
-
const changed = context.settings.item_format !== nextFormat ||
|
|
831
|
-
!context.metadata.has_explicit_item_format;
|
|
832
|
-
let migration = undefined;
|
|
833
|
-
if (changed) {
|
|
834
|
-
const typeRegistry = resolveItemTypeRegistry(context.settings, getActiveExtensionRegistrations());
|
|
835
|
-
const migrated = await migrateItemFilesToFormat(context.target.pmRoot, nextFormat, "config:set:item_format:migrate", typeRegistry.type_to_folder, context.settings.schema);
|
|
836
|
-
migration = {
|
|
837
|
-
target_format: migrated.target_format,
|
|
838
|
-
scanned: migrated.scanned,
|
|
839
|
-
migrated: migrated.migrated,
|
|
840
|
-
removed: migrated.removed,
|
|
841
|
-
warnings: migrated.warnings,
|
|
842
|
-
};
|
|
843
|
-
context.settings.item_format = nextFormat;
|
|
844
|
-
await writeSettings(context.target.pmRoot, context.settings, "config:set:item_format");
|
|
845
|
-
}
|
|
846
|
-
return withWarnings({
|
|
847
|
-
scope: context.scope,
|
|
848
|
-
key: "item_format",
|
|
849
|
-
format: context.settings.item_format,
|
|
850
|
-
has_explicit_item_format: true,
|
|
851
|
-
migration,
|
|
852
|
-
settings_path: context.target.settingsPath,
|
|
853
|
-
changed,
|
|
854
|
-
}, context.warnings);
|
|
855
|
-
}
|
|
856
|
-
async function setValidationConfig(context, key, options) {
|
|
857
|
-
if (key === "history_missing_stream_policy") {
|
|
858
|
-
const nextPolicy = normalizeHistoryMissingStreamPolicy(options.policy);
|
|
859
|
-
const changed = context.settings.history.missing_stream !== nextPolicy;
|
|
860
|
-
context.settings.history.missing_stream = nextPolicy;
|
|
861
|
-
await writeConfigSettingsIfChanged(context, changed, "config:set:history_missing_stream_policy");
|
|
862
|
-
return buildPolicyResult(context, key, context.settings.history.missing_stream, changed);
|
|
863
|
-
}
|
|
864
|
-
if (key === "sprint_release_format_policy") {
|
|
865
|
-
const nextPolicy = normalizeSprintReleaseFormatPolicy(options.policy);
|
|
866
|
-
const changed = context.settings.validation.sprint_release_format !== nextPolicy;
|
|
867
|
-
context.settings.validation.sprint_release_format = nextPolicy;
|
|
868
|
-
await writeConfigSettingsIfChanged(context, changed, "config:set:sprint_release_format_policy");
|
|
869
|
-
return buildPolicyResult(context, key, context.settings.validation.sprint_release_format, changed);
|
|
870
|
-
}
|
|
871
|
-
if (key === "parent_reference_policy") {
|
|
872
|
-
const nextPolicy = normalizeParentReferencePolicy(options.policy);
|
|
873
|
-
const changed = context.settings.validation.parent_reference !== nextPolicy ||
|
|
874
|
-
context.settings.governance.preset !== "custom" ||
|
|
875
|
-
context.settings.governance.parent_reference !== nextPolicy;
|
|
876
|
-
context.settings.validation.parent_reference = nextPolicy;
|
|
877
|
-
context.settings.governance.preset = "custom";
|
|
878
|
-
context.settings.governance.parent_reference = nextPolicy;
|
|
879
|
-
await writeConfigSettingsIfChanged(context, changed, "config:set:parent_reference_policy");
|
|
880
|
-
return buildPolicyResult(context, key, context.settings.validation.parent_reference, changed);
|
|
881
|
-
}
|
|
882
|
-
const nextPolicy = normalizeValidateMetadataProfile(options.policy);
|
|
883
|
-
const changed = context.settings.validation.metadata_profile !== nextPolicy ||
|
|
884
|
-
context.settings.governance.preset !== "custom" ||
|
|
885
|
-
context.settings.governance.metadata_profile !== nextPolicy;
|
|
886
|
-
context.settings.validation.metadata_profile = nextPolicy;
|
|
887
|
-
context.settings.governance.preset = "custom";
|
|
888
|
-
context.settings.governance.metadata_profile = nextPolicy;
|
|
889
|
-
await writeConfigSettingsIfChanged(context, changed, "config:set:metadata_validation_profile");
|
|
890
|
-
return buildPolicyResult(context, key, context.settings.validation.metadata_profile, changed);
|
|
891
|
-
}
|
|
892
|
-
async function setCriteriaConfig(context, key, options) {
|
|
893
|
-
if (key === "metadata_required_fields") {
|
|
894
|
-
const nextCriteria = normalizeMetadataRequiredFields(options.criterion, options.clearCriteria);
|
|
895
|
-
const changed = nextCriteria.length !==
|
|
896
|
-
context.settings.validation.metadata_required_fields.length ||
|
|
897
|
-
nextCriteria.some((value, index) => value !== context.settings.validation.metadata_required_fields[index]);
|
|
898
|
-
context.settings.validation.metadata_required_fields = nextCriteria;
|
|
899
|
-
await writeConfigSettingsIfChanged(context, changed, "config:set:metadata_required_fields");
|
|
900
|
-
return buildCriteriaResult(context, key, [...context.settings.validation.metadata_required_fields], changed);
|
|
901
|
-
}
|
|
902
|
-
const lifecycleTargets = {
|
|
903
|
-
lifecycle_stale_blocker_reason_patterns: context.settings.validation.lifecycle_stale_blocker_reason_patterns,
|
|
904
|
-
lifecycle_closure_like_blocked_reason_patterns: context.settings.validation
|
|
905
|
-
.lifecycle_closure_like_blocked_reason_patterns,
|
|
906
|
-
lifecycle_closure_like_resolution_patterns: context.settings.validation.lifecycle_closure_like_resolution_patterns,
|
|
907
|
-
lifecycle_closure_like_actual_result_patterns: context.settings.validation.lifecycle_closure_like_actual_result_patterns,
|
|
908
|
-
};
|
|
909
|
-
const currentCriteria = lifecycleTargets[key];
|
|
910
|
-
const nextCriteria = normalizeLifecyclePatternCriteria(key, options.criterion, options.clearCriteria);
|
|
911
|
-
const changed = nextCriteria.length !== currentCriteria.length ||
|
|
912
|
-
nextCriteria.some((value, index) => value !== currentCriteria[index]);
|
|
913
|
-
currentCriteria.splice(0, currentCriteria.length, ...nextCriteria);
|
|
914
|
-
await writeConfigSettingsIfChanged(context, changed, `config:set:${key}`);
|
|
915
|
-
return buildCriteriaResult(context, key, [...currentCriteria], changed);
|
|
916
|
-
}
|
|
917
|
-
async function setGovernancePresetOrTypeConfig(context, key, options) {
|
|
918
|
-
if (key === "governance_preset") {
|
|
919
|
-
const nextPolicy = normalizeGovernancePreset(options.policy);
|
|
920
|
-
const changed = context.settings.governance.preset !== nextPolicy;
|
|
921
|
-
context.settings.governance.preset = nextPolicy;
|
|
922
|
-
await writeConfigSettingsIfChanged(context, changed, "config:set:governance_preset");
|
|
923
|
-
return buildPolicyResult(context, key, context.settings.governance.preset, changed);
|
|
924
|
-
}
|
|
925
|
-
const policyProvided = typeof options.policy === "string";
|
|
926
|
-
const rawType = policyProvided ? options.policy.trim() : "";
|
|
927
|
-
if (policyProvided && rawType.length === 0) {
|
|
928
|
-
const changed = context.settings.governance.create_default_type !== undefined;
|
|
929
|
-
delete context.settings.governance.create_default_type;
|
|
930
|
-
await writeConfigSettingsIfChanged(context, changed, "config:set:governance_create_default_type");
|
|
931
|
-
return buildPolicyResult(context, key, context.settings.governance.create_default_type ?? "", changed);
|
|
932
|
-
}
|
|
933
|
-
if (rawType.length === 0) {
|
|
934
|
-
throw new PmCliError('Config set governance-create-default-type requires an item type value (or an empty value "" to clear it)', EXIT_CODE.USAGE);
|
|
935
|
-
}
|
|
936
|
-
const typeRegistry = resolveItemTypeRegistry(context.settings, getActiveExtensionRegistrations());
|
|
937
|
-
const resolvedType = resolveTypeName(rawType, typeRegistry);
|
|
938
|
-
if (!resolvedType) {
|
|
939
|
-
throw new PmCliError(buildInvalidTypeError(rawType, typeRegistry.types, resolveItemTypesFilePath(context.target.pmRoot, context.settings.schema)), EXIT_CODE.USAGE);
|
|
940
|
-
}
|
|
941
|
-
const changed = context.settings.governance.create_default_type !== resolvedType;
|
|
942
|
-
context.settings.governance.create_default_type = resolvedType;
|
|
943
|
-
await writeConfigSettingsIfChanged(context, changed, "config:set:governance_create_default_type");
|
|
944
|
-
return buildPolicyResult(context, key, context.settings.governance.create_default_type, changed);
|
|
945
|
-
}
|
|
946
|
-
async function setGovernancePolicyConfig(context, key, options) {
|
|
947
|
-
if (key === "governance_ownership_enforcement") {
|
|
948
|
-
const nextPolicy = normalizeGovernanceOwnershipEnforcement(options.policy);
|
|
949
|
-
const changed = context.settings.governance.preset !== "custom" ||
|
|
950
|
-
context.settings.governance.ownership_enforcement !== nextPolicy;
|
|
951
|
-
context.settings.governance.preset = "custom";
|
|
952
|
-
context.settings.governance.ownership_enforcement = nextPolicy;
|
|
953
|
-
await writeConfigSettingsIfChanged(context, changed, "config:set:governance_ownership_enforcement");
|
|
954
|
-
return buildPolicyResult(context, key, context.settings.governance.ownership_enforcement, changed);
|
|
955
|
-
}
|
|
956
|
-
if (key === "governance_create_mode_default") {
|
|
957
|
-
const nextPolicy = normalizeGovernanceCreateModeDefault(options.policy);
|
|
958
|
-
const changed = context.settings.governance.preset !== "custom" ||
|
|
959
|
-
context.settings.governance.create_mode_default !== nextPolicy;
|
|
960
|
-
context.settings.governance.preset = "custom";
|
|
961
|
-
context.settings.governance.create_mode_default = nextPolicy;
|
|
962
|
-
await writeConfigSettingsIfChanged(context, changed, "config:set:governance_create_mode_default");
|
|
963
|
-
return buildPolicyResult(context, key, context.settings.governance.create_mode_default, changed);
|
|
964
|
-
}
|
|
965
|
-
const nextPolicy = normalizeGovernanceCloseValidationDefault(options.policy);
|
|
966
|
-
const changed = context.settings.governance.preset !== "custom" ||
|
|
967
|
-
context.settings.governance.close_validation_default !== nextPolicy;
|
|
968
|
-
context.settings.governance.preset = "custom";
|
|
969
|
-
context.settings.governance.close_validation_default = nextPolicy;
|
|
970
|
-
await writeConfigSettingsIfChanged(context, changed, "config:set:governance_close_validation_default");
|
|
971
|
-
return buildPolicyResult(context, key, context.settings.governance.close_validation_default, changed);
|
|
972
|
-
}
|
|
973
|
-
async function setGovernanceValidationConfig(context, key, options) {
|
|
974
|
-
if (key === "governance_parent_reference_policy") {
|
|
975
|
-
const nextPolicy = normalizeParentReferencePolicy(options.policy);
|
|
976
|
-
const changed = context.settings.governance.preset !== "custom" ||
|
|
977
|
-
hasGovernanceValidationMirrorChange(context.settings.governance.parent_reference, context.settings.validation.parent_reference, nextPolicy);
|
|
978
|
-
context.settings.governance.preset = "custom";
|
|
979
|
-
context.settings.governance.parent_reference = nextPolicy;
|
|
980
|
-
context.settings.validation.parent_reference = nextPolicy;
|
|
981
|
-
await writeConfigSettingsIfChanged(context, changed, "config:set:governance_parent_reference_policy");
|
|
982
|
-
return buildPolicyResult(context, key, context.settings.governance.parent_reference, changed);
|
|
983
|
-
}
|
|
984
|
-
if (key === "governance_metadata_validation_profile") {
|
|
985
|
-
const nextPolicy = normalizeValidateMetadataProfile(options.policy);
|
|
986
|
-
const changed = context.settings.governance.preset !== "custom" ||
|
|
987
|
-
hasGovernanceValidationMirrorChange(context.settings.governance.metadata_profile, context.settings.validation.metadata_profile, nextPolicy);
|
|
988
|
-
context.settings.governance.preset = "custom";
|
|
989
|
-
context.settings.governance.metadata_profile = nextPolicy;
|
|
990
|
-
context.settings.validation.metadata_profile = nextPolicy;
|
|
991
|
-
await writeConfigSettingsIfChanged(context, changed, "config:set:governance_metadata_validation_profile");
|
|
992
|
-
return buildPolicyResult(context, key, context.settings.governance.metadata_profile, changed);
|
|
993
|
-
}
|
|
994
|
-
const nextPolicy = normalizeGovernanceWorkflowEnforcement(options.policy);
|
|
995
|
-
const changed = (context.settings.governance.workflow_enforcement ?? "off") !== nextPolicy;
|
|
996
|
-
context.settings.governance.workflow_enforcement = nextPolicy;
|
|
997
|
-
await writeConfigSettingsIfChanged(context, changed, "config:set:governance_workflow_enforcement");
|
|
998
|
-
return buildPolicyResult(context, key, context.settings.governance.workflow_enforcement, changed);
|
|
999
|
-
}
|
|
1000
|
-
async function setGovernanceBooleanConfig(context, key, options) {
|
|
1001
|
-
if (key === "governance_require_close_reason") {
|
|
1002
|
-
const nextPolicy = normalizeGovernanceRequireCloseReasonPolicy(options.policy);
|
|
1003
|
-
const nextEnabled = nextPolicy === "enabled";
|
|
1004
|
-
const changed = context.settings.governance.require_close_reason !== nextEnabled;
|
|
1005
|
-
context.settings.governance.require_close_reason = nextEnabled;
|
|
1006
|
-
await writeConfigSettingsIfChanged(context, changed, "config:set:governance_require_close_reason");
|
|
1007
|
-
return buildPolicyResult(context, key, context.settings.governance.require_close_reason ? "enabled" : "disabled", changed);
|
|
1008
|
-
}
|
|
1009
|
-
const nextPolicy = normalizeGovernanceForceRequiredForStaleLockPolicy(options.policy);
|
|
1010
|
-
const nextEnabled = nextPolicy === "enabled";
|
|
1011
|
-
const changed = context.settings.governance.preset !== "custom" ||
|
|
1012
|
-
context.settings.governance.force_required_for_stale_lock !== nextEnabled;
|
|
1013
|
-
context.settings.governance.preset = "custom";
|
|
1014
|
-
context.settings.governance.force_required_for_stale_lock = nextEnabled;
|
|
1015
|
-
await writeConfigSettingsIfChanged(context, changed, "config:set:governance_force_required_for_stale_lock");
|
|
1016
|
-
return buildPolicyResult(context, key, context.settings.governance.force_required_for_stale_lock
|
|
1017
|
-
? "enabled"
|
|
1018
|
-
: "disabled", changed);
|
|
1019
|
-
}
|
|
1020
|
-
async function setTrackingConfig(context, key, options) {
|
|
1021
|
-
if (key === "test_result_tracking") {
|
|
1022
|
-
const nextPolicy = normalizeTestResultTrackingPolicy(options.policy);
|
|
1023
|
-
const nextEnabled = nextPolicy === "enabled";
|
|
1024
|
-
const changed = context.settings.testing.record_results_to_items !== nextEnabled;
|
|
1025
|
-
context.settings.testing.record_results_to_items = nextEnabled;
|
|
1026
|
-
await writeConfigSettingsIfChanged(context, changed, "config:set:test_result_tracking");
|
|
1027
|
-
return buildPolicyResult(context, key, context.settings.testing.record_results_to_items ? "enabled" : "disabled", changed);
|
|
1028
|
-
}
|
|
1029
|
-
const nextPolicy = normalizeTelemetryTrackingPolicy(options.policy);
|
|
1030
|
-
const nextEnabled = nextPolicy === "enabled";
|
|
1031
|
-
const changed = context.settings.telemetry.enabled !== nextEnabled ||
|
|
1032
|
-
!context.settings.telemetry.first_run_prompt_completed;
|
|
1033
|
-
context.settings.telemetry.enabled = nextEnabled;
|
|
1034
|
-
context.settings.telemetry.first_run_prompt_completed = true;
|
|
1035
|
-
await writeConfigSettingsIfChanged(context, changed, "config:set:telemetry_tracking");
|
|
1036
|
-
return buildPolicyResult(context, key, context.settings.telemetry.enabled ? "enabled" : "disabled", changed);
|
|
1037
|
-
}
|
|
1038
|
-
async function setDefinitionOfDoneConfig(context, key, options) {
|
|
1039
|
-
const nextCriteria = normalizeCriteria(options.criterion, options.clearCriteria);
|
|
1040
|
-
const changed = nextCriteria.length !==
|
|
1041
|
-
context.settings.workflow.definition_of_done.length ||
|
|
1042
|
-
nextCriteria.some((value, index) => value !== context.settings.workflow.definition_of_done[index]);
|
|
1043
|
-
context.settings.workflow.definition_of_done = nextCriteria;
|
|
1044
|
-
await writeConfigSettingsIfChanged(context, changed, "config:set:definition_of_done");
|
|
1045
|
-
return buildCriteriaResult(context, key, [...context.settings.workflow.definition_of_done], changed);
|
|
1046
|
-
}
|
|
1047
|
-
async function setConfigValue(context, key, options) {
|
|
1048
|
-
if (options.clearCriteria === true && !isCriteriaConfigKey(key)) {
|
|
1049
|
-
throw new PmCliError("--clear-criteria is only supported with config set criteria-list keys", EXIT_CODE.USAGE);
|
|
1050
|
-
}
|
|
1051
|
-
if (key === "item_format") {
|
|
1052
|
-
return setItemFormatConfig(context, options);
|
|
1053
|
-
}
|
|
1054
|
-
if (key === "context") {
|
|
1055
|
-
return applyContextConfig(context.settings, options, context.target, context.scope, context.warnings);
|
|
1056
|
-
}
|
|
1057
|
-
if (key === "definition_of_done") {
|
|
1058
|
-
return setDefinitionOfDoneConfig(context, key, options);
|
|
1059
|
-
}
|
|
1060
|
-
if (isCriteriaValueConfigKey(key)) {
|
|
1061
|
-
return setCriteriaConfig(context, key, options);
|
|
1062
|
-
}
|
|
1063
|
-
if (TRACKING_CONFIG_KEYS.has(key)) {
|
|
1064
|
-
return setTrackingConfig(context, key, options);
|
|
1065
|
-
}
|
|
1066
|
-
if (GOVERNANCE_BOOLEAN_CONFIG_KEYS.has(key)) {
|
|
1067
|
-
return setGovernanceBooleanConfig(context, key, options);
|
|
1068
|
-
}
|
|
1069
|
-
if (isGovernancePolicyConfigKey(key)) {
|
|
1070
|
-
return setGovernancePolicyConfig(context, key, options);
|
|
1071
|
-
}
|
|
1072
|
-
if (isGovernanceValidationConfigKey(key)) {
|
|
1073
|
-
return setGovernanceValidationConfig(context, key, options);
|
|
1074
|
-
}
|
|
1075
|
-
if (isGovernancePresetOrTypeConfigKey(key)) {
|
|
1076
|
-
return setGovernancePresetOrTypeConfig(context, key, options);
|
|
1077
|
-
}
|
|
1078
|
-
return setValidationConfig(context, key, options);
|
|
1079
|
-
}
|
|
1080
|
-
/** Implements run config for the public runtime surface of this module. */
|
|
1081
|
-
export async function runConfig(scopeValue, actionValue, keyValue, options, global, valueValue) {
|
|
1082
|
-
const scope = normalizeScope(scopeValue);
|
|
1083
|
-
const action = normalizeAction(actionValue);
|
|
1084
|
-
const nestedSetting = action === "get" || action === "set"
|
|
1085
|
-
? resolveNestedSettingDescriptor(keyValue)
|
|
1086
|
-
: undefined;
|
|
1087
|
-
const key = nestedSetting
|
|
1088
|
-
? undefined
|
|
1089
|
-
: normalizeKeyForAction(action, keyValue);
|
|
1090
|
-
const routedOptions = applyPositionalValue(action, keyValue, key, nestedSetting, valueValue, options);
|
|
1091
|
-
const target = await resolveSettingsTarget(scope, global);
|
|
1092
|
-
const { settings, metadata, warnings: settingsReadWarnings, } = await readSettingsWithMetadata(target.pmRoot);
|
|
1093
|
-
const context = {
|
|
1094
|
-
scope,
|
|
1095
|
-
target,
|
|
1096
|
-
settings,
|
|
1097
|
-
metadata,
|
|
1098
|
-
warnings: normalizeWarnings(settingsReadWarnings),
|
|
1099
|
-
};
|
|
1100
|
-
if (nestedSetting) {
|
|
1101
|
-
return buildNestedSettingResult(context, action, nestedSetting, routedOptions);
|
|
1102
|
-
}
|
|
1103
|
-
if (action === "list") {
|
|
1104
|
-
return buildConfigListResult(context);
|
|
1105
|
-
}
|
|
1106
|
-
if (action === "export") {
|
|
1107
|
-
return buildConfigExportResult(context);
|
|
1108
|
-
}
|
|
1109
|
-
assertConfigKeyDefined(key);
|
|
1110
|
-
return action === "get"
|
|
1111
|
-
? buildConfigGetResult(context, key)
|
|
1112
|
-
: setConfigValue(context, key, routedOptions);
|
|
1113
|
-
}
|
|
1114
|
-
/** Public contract for test only config command, shared by SDK and presentation-layer consumers. */
|
|
1115
|
-
export const _testOnlyConfigCommand = {
|
|
1116
|
-
hasGovernanceValidationMirrorChange,
|
|
1117
|
-
applyPositionalValue,
|
|
1118
|
-
normalizeAction,
|
|
1119
|
-
normalizeCriteria,
|
|
1120
|
-
normalizeGovernanceCloseValidationDefault,
|
|
1121
|
-
normalizeGovernanceCreateModeDefault,
|
|
1122
|
-
normalizeGovernanceForceRequiredForStaleLockPolicy,
|
|
1123
|
-
normalizeGovernanceOwnershipEnforcement,
|
|
1124
|
-
normalizeGovernancePreset,
|
|
1125
|
-
normalizeGovernanceRequireCloseReasonPolicy,
|
|
1126
|
-
normalizeGovernanceWorkflowEnforcement,
|
|
1127
|
-
normalizeHistoryMissingStreamPolicy,
|
|
1128
|
-
normalizeItemFormat,
|
|
1129
|
-
normalizeKey,
|
|
1130
|
-
normalizeMetadataRequiredFields,
|
|
1131
|
-
normalizePolicyForConflict,
|
|
1132
|
-
normalizeScope,
|
|
1133
|
-
normalizeTelemetryTrackingPolicy,
|
|
1134
|
-
normalizeTestResultTrackingPolicy,
|
|
1135
|
-
normalizeValidateMetadataProfile,
|
|
1136
|
-
normalizeWarnings,
|
|
1137
|
-
};
|
|
7
|
+
!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]="773ae087-5b66-5181-a575-174868990966")}catch(e){}}();
|
|
8
|
+
export * from "../../sdk/config.js";
|
|
1138
9
|
//# sourceMappingURL=config.js.map
|
|
1139
|
-
//# debugId=
|
|
10
|
+
//# debugId=773ae087-5b66-5181-a575-174868990966
|