@unbrained/pm-cli 2026.5.30 → 2026.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +152 -0
- package/dist/cli/argv-utils.js +7 -3
- package/dist/cli/argv-utils.js.map +1 -1
- package/dist/cli/bootstrap-args.d.ts +1 -0
- package/dist/cli/bootstrap-args.js +23 -3
- package/dist/cli/bootstrap-args.js.map +1 -1
- package/dist/cli/commands/calendar.js +96 -10
- package/dist/cli/commands/calendar.js.map +1 -1
- package/dist/cli/commands/close-many.d.ts +63 -0
- package/dist/cli/commands/close-many.js +302 -0
- package/dist/cli/commands/close-many.js.map +1 -0
- package/dist/cli/commands/completion.d.ts +1 -0
- package/dist/cli/commands/completion.js +241 -27
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/config.d.ts +4 -4
- package/dist/cli/commands/config.js +115 -3
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/contracts.js +191 -162
- package/dist/cli/commands/contracts.js.map +1 -1
- package/dist/cli/commands/create.d.ts +1 -0
- package/dist/cli/commands/create.js +109 -116
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/extension/doctor.d.ts +12 -0
- package/dist/cli/commands/extension/doctor.js +97 -2
- package/dist/cli/commands/extension/doctor.js.map +1 -1
- package/dist/cli/commands/extension/install-sources.d.ts +2 -0
- package/dist/cli/commands/extension/install-sources.js +11 -4
- package/dist/cli/commands/extension/install-sources.js.map +1 -1
- package/dist/cli/commands/extension/scaffold.js +49 -48
- package/dist/cli/commands/extension/scaffold.js.map +1 -1
- package/dist/cli/commands/extension.js +51 -23
- package/dist/cli/commands/extension.js.map +1 -1
- package/dist/cli/commands/get.js +7 -7
- package/dist/cli/commands/get.js.map +1 -1
- package/dist/cli/commands/health.js +38 -3
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/index.d.ts +2 -1
- package/dist/cli/commands/index.js +4 -3
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/init.d.ts +10 -0
- package/dist/cli/commands/init.js +107 -4
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/list.d.ts +5 -0
- package/dist/cli/commands/list.js +58 -26
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/cli/commands/reindex.js +164 -48
- package/dist/cli/commands/reindex.js.map +1 -1
- package/dist/cli/commands/repeatable-metadata-parsers.d.ts +15 -0
- package/dist/cli/commands/repeatable-metadata-parsers.js +120 -0
- package/dist/cli/commands/repeatable-metadata-parsers.js.map +1 -0
- package/dist/cli/commands/restore.js +25 -4
- package/dist/cli/commands/restore.js.map +1 -1
- package/dist/cli/commands/schema.d.ts +122 -1
- package/dist/cli/commands/schema.js +536 -6
- package/dist/cli/commands/schema.js.map +1 -1
- package/dist/cli/commands/search.d.ts +18 -0
- package/dist/cli/commands/search.js +56 -12
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/test.js +4 -3
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/commands/update-many.js +69 -140
- package/dist/cli/commands/update-many.js.map +1 -1
- package/dist/cli/commands/update.d.ts +2 -0
- package/dist/cli/commands/update.js +138 -119
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/commands/validate.d.ts +1 -0
- package/dist/cli/commands/validate.js +63 -33
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/error-guidance.js +26 -3
- package/dist/cli/error-guidance.js.map +1 -1
- package/dist/cli/help-content.js +82 -3
- package/dist/cli/help-content.js.map +1 -1
- package/dist/cli/main.js +377 -23
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/register-list-query.js +16 -12
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +217 -47
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-operations.js +34 -25
- package/dist/cli/register-operations.js.map +1 -1
- package/dist/cli/register-setup.js +8 -8
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli/registration-helpers.js +35 -5
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli/search-refresh.d.ts +2 -0
- package/dist/cli/search-refresh.js +13 -0
- package/dist/cli/search-refresh.js.map +1 -0
- package/dist/cli-bundle/chunks/activity-3RWRRNOW.js +20 -0
- package/dist/cli-bundle/chunks/activity-3RWRRNOW.js.map +1 -0
- package/dist/cli-bundle/chunks/activity-P5BUMWP3.js +16 -0
- package/dist/cli-bundle/chunks/activity-P5BUMWP3.js.map +7 -0
- package/dist/cli-bundle/chunks/aggregate-J35K7WZB.js +206 -0
- package/dist/cli-bundle/chunks/aggregate-J35K7WZB.js.map +1 -0
- package/dist/cli-bundle/chunks/aggregate-OOAGKWRG.js +209 -0
- package/dist/cli-bundle/chunks/aggregate-OOAGKWRG.js.map +7 -0
- package/dist/cli-bundle/chunks/append-5JE3YGXU.js +72 -0
- package/dist/cli-bundle/chunks/append-5JE3YGXU.js.map +7 -0
- package/dist/cli-bundle/chunks/append-PNN6UIBZ.js +69 -0
- package/dist/cli-bundle/chunks/append-PNN6UIBZ.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-26KTVXJW.js +218 -0
- package/dist/cli-bundle/chunks/chunk-26KTVXJW.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-3HUE7XOF.js +27 -0
- package/dist/cli-bundle/chunks/chunk-3HUE7XOF.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-3OH4DAEB.js +761 -0
- package/dist/cli-bundle/chunks/chunk-3OH4DAEB.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-4LTBNUYT.js +5553 -0
- package/dist/cli-bundle/chunks/chunk-4LTBNUYT.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-4PJQSECJ.js +634 -0
- package/dist/cli-bundle/chunks/chunk-4PJQSECJ.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-4QCR4QW3.js +1832 -0
- package/dist/cli-bundle/chunks/chunk-4QCR4QW3.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-5IRA6IYD.js +1891 -0
- package/dist/cli-bundle/chunks/chunk-5IRA6IYD.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-5KB4X7YY.js +412 -0
- package/dist/cli-bundle/chunks/chunk-5KB4X7YY.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-5PAOPUZX.js +182 -0
- package/dist/cli-bundle/chunks/chunk-5PAOPUZX.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-7K24QB23.js +698 -0
- package/dist/cli-bundle/chunks/chunk-7K24QB23.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-A6PEXMYN.js +380 -0
- package/dist/cli-bundle/chunks/chunk-A6PEXMYN.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-ASQM3IF5.js +230 -0
- package/dist/cli-bundle/chunks/chunk-ASQM3IF5.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-ATBVS6WW.js +185 -0
- package/dist/cli-bundle/chunks/chunk-ATBVS6WW.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-AXXKLVTW.js +332 -0
- package/dist/cli-bundle/chunks/chunk-AXXKLVTW.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-B3N4TKNL.js +1681 -0
- package/dist/cli-bundle/chunks/chunk-B3N4TKNL.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-PB2YU2E3.js → chunk-BNL6S7QH.js} +28 -70
- package/dist/cli-bundle/chunks/chunk-BNL6S7QH.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-CCUFLH4J.js +154 -0
- package/dist/cli-bundle/chunks/chunk-CCUFLH4J.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-CJDQB2ED.js +341 -0
- package/dist/cli-bundle/chunks/chunk-CJDQB2ED.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-CWT53EYT.js +1340 -0
- package/dist/cli-bundle/chunks/chunk-CWT53EYT.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-D3WUNETC.js +349 -0
- package/dist/cli-bundle/chunks/chunk-D3WUNETC.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-D5X7N6FI.js +1714 -0
- package/dist/cli-bundle/chunks/chunk-D5X7N6FI.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-DFIZGAI5.js +550 -0
- package/dist/cli-bundle/chunks/chunk-DFIZGAI5.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-DFUSXJDE.js +1704 -0
- package/dist/cli-bundle/chunks/chunk-DFUSXJDE.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-EAOG77HM.js +56 -0
- package/dist/cli-bundle/chunks/chunk-EAOG77HM.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-EHXPIKKP.js +2988 -0
- package/dist/cli-bundle/chunks/chunk-EHXPIKKP.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-FVXM3GKS.js +128 -0
- package/dist/cli-bundle/chunks/chunk-FVXM3GKS.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-G5BACLYH.js +454 -0
- package/dist/cli-bundle/chunks/chunk-G5BACLYH.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-GCAVRLGE.js +383 -0
- package/dist/cli-bundle/chunks/chunk-GCAVRLGE.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-GFWHHMVV.js +57 -0
- package/dist/cli-bundle/chunks/chunk-GFWHHMVV.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-GNHVV4SY.js +3860 -0
- package/dist/cli-bundle/chunks/chunk-GNHVV4SY.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-GPGAYASV.js +346 -0
- package/dist/cli-bundle/chunks/chunk-GPGAYASV.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-HPH6X4ZZ.js +1356 -0
- package/dist/cli-bundle/chunks/chunk-HPH6X4ZZ.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-HZOS2UG5.js +342 -0
- package/dist/cli-bundle/chunks/chunk-HZOS2UG5.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-IUV734HF.js +17 -0
- package/dist/cli-bundle/chunks/chunk-IUV734HF.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-J27KIHTG.js +15 -0
- package/dist/cli-bundle/chunks/chunk-J27KIHTG.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-JB4RGL4V.js +185 -0
- package/dist/cli-bundle/chunks/chunk-JB4RGL4V.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-JQI2HE55.js +130 -0
- package/dist/cli-bundle/chunks/chunk-JQI2HE55.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-K47WAYQV.js +60 -0
- package/dist/cli-bundle/chunks/chunk-K47WAYQV.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-KA24HME7.js +79 -0
- package/dist/cli-bundle/chunks/chunk-KA24HME7.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-KBG47ZOY.js +1325 -0
- package/dist/cli-bundle/chunks/chunk-KBG47ZOY.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-KCMIYKTA.js +242 -0
- package/dist/cli-bundle/chunks/chunk-KCMIYKTA.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-KK6YPGH3.js +221 -0
- package/dist/cli-bundle/chunks/chunk-KK6YPGH3.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-LDJK7SHN.js +157 -0
- package/dist/cli-bundle/chunks/chunk-LDJK7SHN.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-LXYVKYMQ.js +24 -0
- package/dist/cli-bundle/chunks/chunk-LXYVKYMQ.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-MISYRLEP.js +80 -0
- package/dist/cli-bundle/chunks/chunk-MISYRLEP.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-N5YF3VFN.js +457 -0
- package/dist/cli-bundle/chunks/chunk-N5YF3VFN.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-NQP3ECKF.js +173 -0
- package/dist/cli-bundle/chunks/chunk-NQP3ECKF.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-O5IBJE6S.js +338 -0
- package/dist/cli-bundle/chunks/chunk-O5IBJE6S.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-O7IWB35H.js +18 -0
- package/dist/cli-bundle/chunks/chunk-O7IWB35H.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-OIQIXTNB.js +3040 -0
- package/dist/cli-bundle/chunks/chunk-OIQIXTNB.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-ORTLYVA4.js +751 -0
- package/dist/cli-bundle/chunks/chunk-ORTLYVA4.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-OUF3ARDX.js +1861 -0
- package/dist/cli-bundle/chunks/chunk-OUF3ARDX.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-QAJBIGRA.js +20 -0
- package/dist/cli-bundle/chunks/chunk-QAJBIGRA.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-RANZIID5.js +176 -0
- package/dist/cli-bundle/chunks/chunk-RANZIID5.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-RQAWLSUU.js +140 -0
- package/dist/cli-bundle/chunks/chunk-RQAWLSUU.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-S3CV7JGJ.js +233 -0
- package/dist/cli-bundle/chunks/chunk-S3CV7JGJ.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-SRVKTWPR.js +5705 -0
- package/dist/cli-bundle/chunks/chunk-SRVKTWPR.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-SSFMJCPF.js +76 -0
- package/dist/cli-bundle/chunks/chunk-SSFMJCPF.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-SZQCER6S.js +631 -0
- package/dist/cli-bundle/chunks/chunk-SZQCER6S.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-T2ORWB6D.js +540 -0
- package/dist/cli-bundle/chunks/chunk-T2ORWB6D.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-TBQVUNVH.js +422 -0
- package/dist/cli-bundle/chunks/chunk-TBQVUNVH.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-RJONRNXN.js → chunk-TK633IVD.js} +51 -32
- package/dist/cli-bundle/chunks/chunk-TK633IVD.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-TQ3ZK6VD.js +131 -0
- package/dist/cli-bundle/chunks/chunk-TQ3ZK6VD.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-UFCG3SWR.js +119 -0
- package/dist/cli-bundle/chunks/chunk-UFCG3SWR.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-UOVLWB47.js +1664 -0
- package/dist/cli-bundle/chunks/chunk-UOVLWB47.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-V3JQ4IPL.js +186 -0
- package/dist/cli-bundle/chunks/chunk-V3JQ4IPL.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-VGO2T3TY.js +182 -0
- package/dist/cli-bundle/chunks/chunk-VGO2T3TY.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-WIKR7KFL.js +189 -0
- package/dist/cli-bundle/chunks/chunk-WIKR7KFL.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-XG7RJYHV.js +1385 -0
- package/dist/cli-bundle/chunks/chunk-XG7RJYHV.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-XSLQSXAH.js +53 -0
- package/dist/cli-bundle/chunks/chunk-XSLQSXAH.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-XX5LRINW.js +90 -0
- package/dist/cli-bundle/chunks/chunk-XX5LRINW.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-Y2AKE2HS.js +252 -0
- package/dist/cli-bundle/chunks/chunk-Y2AKE2HS.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-ZQ4F6EC4.js +3898 -0
- package/dist/cli-bundle/chunks/chunk-ZQ4F6EC4.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-ZRVSMOMR.js +1809 -0
- package/dist/cli-bundle/chunks/chunk-ZRVSMOMR.js.map +1 -0
- package/dist/cli-bundle/chunks/claim-AZLP7YFO.js +132 -0
- package/dist/cli-bundle/chunks/claim-AZLP7YFO.js.map +7 -0
- package/dist/cli-bundle/chunks/claim-ZFA7HKU4.js +129 -0
- package/dist/cli-bundle/chunks/claim-ZFA7HKU4.js.map +1 -0
- package/dist/cli-bundle/chunks/close-65DFYAVS.js +17 -0
- package/dist/cli-bundle/chunks/close-65DFYAVS.js.map +1 -0
- package/dist/cli-bundle/chunks/close-RMHQ3KWH.js +13 -0
- package/dist/cli-bundle/chunks/close-RMHQ3KWH.js.map +7 -0
- package/dist/cli-bundle/chunks/close-many-AKPZNSGI.js +311 -0
- package/dist/cli-bundle/chunks/close-many-AKPZNSGI.js.map +1 -0
- package/dist/cli-bundle/chunks/close-many-UKZSQGM7.js +314 -0
- package/dist/cli-bundle/chunks/close-many-UKZSQGM7.js.map +7 -0
- package/dist/cli-bundle/chunks/comments-AGBNSJJH.js +103 -0
- package/dist/cli-bundle/chunks/comments-AGBNSJJH.js.map +7 -0
- package/dist/cli-bundle/chunks/comments-CJWXQI7X.js +100 -0
- package/dist/cli-bundle/chunks/comments-CJWXQI7X.js.map +1 -0
- package/dist/cli-bundle/chunks/config-5ON3ADRH.js +1688 -0
- package/dist/cli-bundle/chunks/config-5ON3ADRH.js.map +7 -0
- package/dist/cli-bundle/chunks/config-DDPYIA6J.js +1671 -0
- package/dist/cli-bundle/chunks/config-DDPYIA6J.js.map +1 -0
- package/dist/cli-bundle/chunks/context-E6U3DWVM.js +1471 -0
- package/dist/cli-bundle/chunks/context-E6U3DWVM.js.map +7 -0
- package/dist/cli-bundle/chunks/context-ZOJEN5VT.js +1461 -0
- package/dist/cli-bundle/chunks/context-ZOJEN5VT.js.map +1 -0
- package/dist/cli-bundle/chunks/contracts-CXSFM45B.js +1277 -0
- package/dist/cli-bundle/chunks/contracts-CXSFM45B.js.map +7 -0
- package/dist/cli-bundle/chunks/contracts-LCSX5R53.js +1274 -0
- package/dist/cli-bundle/chunks/contracts-LCSX5R53.js.map +1 -0
- package/dist/cli-bundle/chunks/create-ATONSAZW.js +27 -0
- package/dist/cli-bundle/chunks/create-ATONSAZW.js.map +7 -0
- package/dist/cli-bundle/chunks/create-WYFKN2U4.js +31 -0
- package/dist/cli-bundle/chunks/create-WYFKN2U4.js.map +1 -0
- package/dist/cli-bundle/chunks/delete-RONNH4F4.js +58 -0
- package/dist/cli-bundle/chunks/delete-RONNH4F4.js.map +7 -0
- package/dist/cli-bundle/chunks/delete-ZXWC56WO.js +55 -0
- package/dist/cli-bundle/chunks/delete-ZXWC56WO.js.map +1 -0
- package/dist/cli-bundle/chunks/deps-EHXIFOZR.js +225 -0
- package/dist/cli-bundle/chunks/deps-EHXIFOZR.js.map +1 -0
- package/dist/cli-bundle/chunks/deps-WII3O4HB.js +228 -0
- package/dist/cli-bundle/chunks/deps-WII3O4HB.js.map +7 -0
- package/dist/cli-bundle/chunks/docs-JMVCFNHH.js +34 -0
- package/dist/cli-bundle/chunks/docs-JMVCFNHH.js.map +7 -0
- package/dist/cli-bundle/chunks/docs-PDREIMLS.js +31 -0
- package/dist/cli-bundle/chunks/docs-PDREIMLS.js.map +1 -0
- package/dist/cli-bundle/chunks/extension-B4ROVWJD.js +28 -0
- package/dist/cli-bundle/chunks/extension-B4ROVWJD.js.map +1 -0
- package/dist/cli-bundle/chunks/extension-G6UXSM5S.js +24 -0
- package/dist/cli-bundle/chunks/extension-G6UXSM5S.js.map +7 -0
- package/dist/cli-bundle/chunks/files-2PN7UM2D.js +282 -0
- package/dist/cli-bundle/chunks/files-2PN7UM2D.js.map +1 -0
- package/dist/cli-bundle/chunks/files-MXYS5W4M.js +285 -0
- package/dist/cli-bundle/chunks/files-MXYS5W4M.js.map +7 -0
- package/dist/cli-bundle/chunks/gc-GT552UJH.js +178 -0
- package/dist/cli-bundle/chunks/gc-GT552UJH.js.map +1 -0
- package/dist/cli-bundle/chunks/gc-QNBRJG6H.js +181 -0
- package/dist/cli-bundle/chunks/gc-QNBRJG6H.js.map +7 -0
- package/dist/cli-bundle/chunks/get-CINFEUIY.js +197 -0
- package/dist/cli-bundle/chunks/get-CINFEUIY.js.map +7 -0
- package/dist/cli-bundle/chunks/get-WXMLRG7M.js +194 -0
- package/dist/cli-bundle/chunks/get-WXMLRG7M.js.map +1 -0
- package/dist/cli-bundle/chunks/health-5VPOJQ53.js +1258 -0
- package/dist/cli-bundle/chunks/health-5VPOJQ53.js.map +1 -0
- package/dist/cli-bundle/chunks/health-IT5DBPRJ.js +1261 -0
- package/dist/cli-bundle/chunks/health-IT5DBPRJ.js.map +7 -0
- package/dist/cli-bundle/chunks/history-6FC4H6HI.js +20 -0
- package/dist/cli-bundle/chunks/history-6FC4H6HI.js.map +7 -0
- package/dist/cli-bundle/chunks/history-FLZIP7PM.js +24 -0
- package/dist/cli-bundle/chunks/history-FLZIP7PM.js.map +1 -0
- package/dist/cli-bundle/chunks/history-redact-SSZBAD76.js +23 -0
- package/dist/cli-bundle/chunks/history-redact-SSZBAD76.js.map +1 -0
- package/dist/cli-bundle/chunks/history-redact-XKYEZDBL.js +19 -0
- package/dist/cli-bundle/chunks/history-redact-XKYEZDBL.js.map +7 -0
- package/dist/cli-bundle/chunks/history-repair-KC5ZOJRZ.js +196 -0
- package/dist/cli-bundle/chunks/history-repair-KC5ZOJRZ.js.map +7 -0
- package/dist/cli-bundle/chunks/history-repair-X7CO5JJZ.js +193 -0
- package/dist/cli-bundle/chunks/history-repair-X7CO5JJZ.js.map +1 -0
- package/dist/cli-bundle/chunks/init-6MRFVOLH.js +20 -0
- package/dist/cli-bundle/chunks/init-6MRFVOLH.js.map +1 -0
- package/dist/cli-bundle/chunks/init-KHX3FEEM.js +16 -0
- package/dist/cli-bundle/chunks/init-KHX3FEEM.js.map +7 -0
- package/dist/cli-bundle/chunks/learnings-A3CLB5CO.js +47 -0
- package/dist/cli-bundle/chunks/learnings-A3CLB5CO.js.map +7 -0
- package/dist/cli-bundle/chunks/learnings-DCX55BNX.js +44 -0
- package/dist/cli-bundle/chunks/learnings-DCX55BNX.js.map +1 -0
- package/dist/cli-bundle/chunks/list-53LZ2AEO.js +20 -0
- package/dist/cli-bundle/chunks/list-53LZ2AEO.js.map +7 -0
- package/dist/cli-bundle/chunks/list-DBRECOG4.js +24 -0
- package/dist/cli-bundle/chunks/list-DBRECOG4.js.map +1 -0
- package/dist/cli-bundle/chunks/notes-42LIC3UE.js +47 -0
- package/dist/cli-bundle/chunks/notes-42LIC3UE.js.map +7 -0
- package/dist/cli-bundle/chunks/notes-P5O3VMQ3.js +44 -0
- package/dist/cli-bundle/chunks/notes-P5O3VMQ3.js.map +1 -0
- package/dist/cli-bundle/chunks/plan-HDQXEUKD.js +1174 -0
- package/dist/cli-bundle/chunks/plan-HDQXEUKD.js.map +7 -0
- package/dist/cli-bundle/chunks/plan-IGTE3WOJ.js +1171 -0
- package/dist/cli-bundle/chunks/plan-IGTE3WOJ.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-list-query-EIVQ5FMR.js → register-list-query-AG3XKXWL.js} +25 -18
- package/dist/cli-bundle/chunks/register-list-query-AG3XKXWL.js.map +7 -0
- package/dist/cli-bundle/chunks/register-list-query-EMNSIUO4.js +227 -0
- package/dist/cli-bundle/chunks/register-list-query-EMNSIUO4.js.map +1 -0
- package/dist/cli-bundle/chunks/register-mutation-M3YS6XDO.js +813 -0
- package/dist/cli-bundle/chunks/register-mutation-M3YS6XDO.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-RSZNPSGI.js → register-mutation-RSMT6DPK.js} +160 -39
- package/dist/cli-bundle/chunks/register-mutation-RSMT6DPK.js.map +7 -0
- package/dist/cli-bundle/chunks/register-operations-KYUOOOOD.js +370 -0
- package/dist/cli-bundle/chunks/register-operations-KYUOOOOD.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-operations-APUSYDMR.js → register-operations-Q54JQZUN.js} +50 -32
- package/dist/cli-bundle/chunks/register-operations-Q54JQZUN.js.map +7 -0
- package/dist/cli-bundle/chunks/register-setup-DI6P7X75.js +242 -0
- package/dist/cli-bundle/chunks/register-setup-DI6P7X75.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-setup-OZOKSMPJ.js → register-setup-YJKIQRKA.js} +21 -13
- package/dist/cli-bundle/chunks/register-setup-YJKIQRKA.js.map +7 -0
- package/dist/cli-bundle/chunks/restore-2XVTBLKQ.js +21 -0
- package/dist/cli-bundle/chunks/restore-2XVTBLKQ.js.map +1 -0
- package/dist/cli-bundle/chunks/restore-JL5QIH7H.js +17 -0
- package/dist/cli-bundle/chunks/restore-JL5QIH7H.js.map +7 -0
- package/dist/cli-bundle/chunks/schema-LVXZWFGY.js +770 -0
- package/dist/cli-bundle/chunks/schema-LVXZWFGY.js.map +1 -0
- package/dist/cli-bundle/chunks/schema-V6BX65Q2.js +780 -0
- package/dist/cli-bundle/chunks/schema-V6BX65Q2.js.map +7 -0
- package/dist/cli-bundle/chunks/search-5A3BMFA7.js +1144 -0
- package/dist/cli-bundle/chunks/search-5A3BMFA7.js.map +7 -0
- package/dist/cli-bundle/chunks/search-C7NPB7G7.js +1127 -0
- package/dist/cli-bundle/chunks/search-C7NPB7G7.js.map +1 -0
- package/dist/cli-bundle/chunks/stats-FNLYVXTB.js +120 -0
- package/dist/cli-bundle/chunks/stats-FNLYVXTB.js.map +1 -0
- package/dist/cli-bundle/chunks/stats-Y2CBTZSL.js +123 -0
- package/dist/cli-bundle/chunks/stats-Y2CBTZSL.js.map +7 -0
- package/dist/cli-bundle/chunks/test-OFYONO3C.js +35 -0
- package/dist/cli-bundle/chunks/test-OFYONO3C.js.map +1 -0
- package/dist/cli-bundle/chunks/test-RJ4ZF35X.js +31 -0
- package/dist/cli-bundle/chunks/test-RJ4ZF35X.js.map +7 -0
- package/dist/cli-bundle/chunks/test-all-EEMKNTGU.js +331 -0
- package/dist/cli-bundle/chunks/test-all-EEMKNTGU.js.map +7 -0
- package/dist/cli-bundle/chunks/test-all-OJE6CIO7.js +328 -0
- package/dist/cli-bundle/chunks/test-all-OJE6CIO7.js.map +1 -0
- package/dist/cli-bundle/chunks/test-runs-IPOPFOAF.js +929 -0
- package/dist/cli-bundle/chunks/test-runs-IPOPFOAF.js.map +1 -0
- package/dist/cli-bundle/chunks/test-runs-L2M7WKH7.js +939 -0
- package/dist/cli-bundle/chunks/test-runs-L2M7WKH7.js.map +7 -0
- package/dist/cli-bundle/chunks/update-6YEHPVXH.js +25 -0
- package/dist/cli-bundle/chunks/update-6YEHPVXH.js.map +1 -0
- package/dist/cli-bundle/chunks/update-PYLVHMRD.js +21 -0
- package/dist/cli-bundle/chunks/update-PYLVHMRD.js.map +7 -0
- package/dist/cli-bundle/chunks/update-many-322CCH2L.js +608 -0
- package/dist/cli-bundle/chunks/update-many-322CCH2L.js.map +7 -0
- package/dist/cli-bundle/chunks/update-many-DYWGW57M.js +605 -0
- package/dist/cli-bundle/chunks/update-many-DYWGW57M.js.map +1 -0
- package/dist/cli-bundle/chunks/upgrade-2U727SAM.js +269 -0
- package/dist/cli-bundle/chunks/upgrade-2U727SAM.js.map +7 -0
- package/dist/cli-bundle/chunks/upgrade-3W3RVSNM.js +266 -0
- package/dist/cli-bundle/chunks/upgrade-3W3RVSNM.js.map +1 -0
- package/dist/cli-bundle/chunks/validate-GZ24NYHO.js +1120 -0
- package/dist/cli-bundle/chunks/validate-GZ24NYHO.js.map +1 -0
- package/dist/cli-bundle/chunks/validate-ZFVWPEEN.js +1123 -0
- package/dist/cli-bundle/chunks/validate-ZFVWPEEN.js.map +7 -0
- package/dist/cli-bundle/main.js +615 -121
- package/dist/cli-bundle/main.js.map +4 -4
- package/dist/core/checkpoint/mutation-checkpoint.d.ts +44 -0
- package/dist/core/checkpoint/mutation-checkpoint.js +119 -0
- package/dist/core/checkpoint/mutation-checkpoint.js.map +1 -0
- package/dist/core/config/positional-value.js +4 -2
- package/dist/core/config/positional-value.js.map +1 -1
- package/dist/core/diagnostics/remediation.d.ts +73 -0
- package/dist/core/diagnostics/remediation.js +328 -0
- package/dist/core/diagnostics/remediation.js.map +1 -0
- package/dist/core/extensions/extension-hook-runtime.js +9 -2
- package/dist/core/extensions/extension-hook-runtime.js.map +1 -1
- package/dist/core/extensions/extension-types.d.ts +60 -4
- package/dist/core/extensions/extension-types.js +2 -2
- package/dist/core/extensions/extension-types.js.map +1 -1
- package/dist/core/extensions/index.d.ts +5 -1
- package/dist/core/extensions/index.js +61 -2
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/item-fields.d.ts +5 -1
- package/dist/core/extensions/item-fields.js +126 -4
- package/dist/core/extensions/item-fields.js.map +1 -1
- package/dist/core/extensions/loader.js +283 -8
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/item/item-format.d.ts +3 -2
- package/dist/core/item/item-format.js +15 -10
- package/dist/core/item/item-format.js.map +1 -1
- package/dist/core/item/item-type-definition.js +6 -2
- package/dist/core/item/item-type-definition.js.map +1 -1
- package/dist/core/item/status-filter.d.ts +29 -0
- package/dist/core/item/status-filter.js +97 -0
- package/dist/core/item/status-filter.js.map +1 -0
- package/dist/core/item/type-registry.d.ts +4 -0
- package/dist/core/item/type-registry.js +12 -2
- package/dist/core/item/type-registry.js.map +1 -1
- package/dist/core/output/output.js +17 -5
- package/dist/core/output/output.js.map +1 -1
- package/dist/core/schema/item-types-file.d.ts +15 -0
- package/dist/core/schema/item-types-file.js +27 -2
- package/dist/core/schema/item-types-file.js.map +1 -1
- package/dist/core/schema/runtime-field-filters.js +4 -3
- package/dist/core/schema/runtime-field-filters.js.map +1 -1
- package/dist/core/schema/runtime-field-values.d.ts +1 -1
- package/dist/core/schema/runtime-field-values.js +10 -4
- package/dist/core/schema/runtime-field-values.js.map +1 -1
- package/dist/core/schema/runtime-schema.js +75 -2
- package/dist/core/schema/runtime-schema.js.map +1 -1
- package/dist/core/schema/status-defs-file.d.ts +113 -0
- package/dist/core/schema/status-defs-file.js +260 -0
- package/dist/core/schema/status-defs-file.js.map +1 -0
- package/dist/core/schema/type-workflows.d.ts +64 -0
- package/dist/core/schema/type-workflows.js +98 -0
- package/dist/core/schema/type-workflows.js.map +1 -0
- package/dist/core/search/background-refresh.d.ts +53 -0
- package/dist/core/search/background-refresh.js +286 -0
- package/dist/core/search/background-refresh.js.map +1 -0
- package/dist/core/search/cache.d.ts +23 -2
- package/dist/core/search/cache.js +135 -30
- package/dist/core/search/cache.js.map +1 -1
- package/dist/core/search/http-client.d.ts +2 -2
- package/dist/core/search/http-client.js +2 -2
- package/dist/core/search/http-client.js.map +1 -1
- package/dist/core/search/vector-stores.d.ts +1 -0
- package/dist/core/search/vector-stores.js +69 -15
- package/dist/core/search/vector-stores.js.map +1 -1
- package/dist/core/search/vectorization-metadata.d.ts +13 -0
- package/dist/core/search/vectorization-metadata.js +65 -0
- package/dist/core/search/vectorization-metadata.js.map +1 -0
- package/dist/core/shared/constants.d.ts +2 -2
- package/dist/core/shared/constants.js +2 -3
- package/dist/core/shared/constants.js.map +1 -1
- package/dist/core/shared/serialization.d.ts +1 -0
- package/dist/core/shared/serialization.js +86 -2
- package/dist/core/shared/serialization.js.map +1 -1
- package/dist/core/store/front-matter-cache.js +14 -5
- package/dist/core/store/front-matter-cache.js.map +1 -1
- package/dist/core/store/item-format-migration.js +25 -15
- package/dist/core/store/item-format-migration.js.map +1 -1
- package/dist/core/store/item-store.d.ts +2 -0
- package/dist/core/store/item-store.js +61 -6
- package/dist/core/store/item-store.js.map +1 -1
- package/dist/core/store/settings-validator.js +22 -2
- package/dist/core/store/settings-validator.js.map +1 -1
- package/dist/core/store/settings.js +40 -5
- package/dist/core/store/settings.js.map +1 -1
- package/dist/core/telemetry/consent.js +3 -3
- package/dist/core/telemetry/consent.js.map +1 -1
- package/dist/core/telemetry/observability.js +4 -3
- package/dist/core/telemetry/observability.js.map +1 -1
- package/dist/core/telemetry/runtime.d.ts +10 -0
- package/dist/core/telemetry/runtime.js +86 -2
- package/dist/core/telemetry/runtime.js.map +1 -1
- package/dist/mcp/server.js +221 -12
- package/dist/mcp/server.js.map +1 -1
- package/dist/sdk/cli-contracts/commander-mutation-options.js +16 -2
- package/dist/sdk/cli-contracts/commander-mutation-options.js.map +1 -1
- package/dist/sdk/cli-contracts/commander-types.js +7 -2
- package/dist/sdk/cli-contracts/commander-types.js.map +1 -1
- package/dist/sdk/cli-contracts/enum-contracts.d.ts +2 -2
- package/dist/sdk/cli-contracts/enum-contracts.js +4 -2
- package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.d.ts +1 -0
- package/dist/sdk/cli-contracts/tool-option-contracts.js +53 -3
- package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +37 -8
- package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
- package/dist/sdk/cli-contracts.d.ts +19 -1
- package/dist/sdk/cli-contracts.js +211 -18
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/sdk/errors.d.ts +22 -0
- package/dist/sdk/errors.js +46 -0
- package/dist/sdk/errors.js.map +1 -0
- package/dist/sdk/index.d.ts +2 -1
- package/dist/sdk/index.js +3 -2
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/package-import-adapters.js +14 -3
- package/dist/sdk/package-import-adapters.js.map +1 -1
- package/dist/sdk/runtime.d.ts +1 -0
- package/dist/sdk/runtime.js +3 -2
- package/dist/sdk/runtime.js.map +1 -1
- package/dist/sdk/testing.d.ts +77 -0
- package/dist/sdk/testing.js +239 -0
- package/dist/sdk/testing.js.map +1 -0
- package/dist/types.d.ts +26 -1
- package/dist/types.js +3 -2
- package/dist/types.js.map +1 -1
- package/docs/AGENT_GUIDE.md +21 -2
- package/docs/COMMANDS.md +85 -5
- package/docs/CONFIGURATION.md +49 -2
- package/docs/EXTENSIONS.md +118 -6
- package/docs/QUICKSTART.md +2 -0
- package/docs/RELEASING.md +3 -3
- package/docs/SDK.md +273 -1
- package/docs/TESTING.md +17 -0
- package/docs/examples/policy-restricted-extension/manifest.json +1 -0
- package/docs/examples/starter-extension/index.js +9 -1
- package/docs/examples/starter-extension/manifest.json +1 -0
- package/package.json +12 -7
- package/packages/pm-beads/extensions/beads/index.js +2 -4
- package/packages/pm-beads/extensions/beads/index.ts +43 -33
- package/packages/pm-beads/extensions/beads/manifest.json +12 -1
- package/packages/pm-calendar/README.md +6 -0
- package/packages/pm-calendar/extensions/calendar/index.js +6 -1
- package/packages/pm-calendar/extensions/calendar/index.ts +6 -1
- package/packages/pm-calendar/extensions/calendar/manifest.json +6 -1
- package/packages/pm-governance-audit/extensions/governance-audit/manifest.json +6 -1
- package/packages/pm-guide-shell/README.md +4 -0
- package/packages/pm-guide-shell/extensions/guide-shell/index.js +22 -0
- package/packages/pm-guide-shell/extensions/guide-shell/index.ts +22 -0
- package/packages/pm-guide-shell/extensions/guide-shell/manifest.json +6 -1
- package/packages/pm-guide-shell/extensions/guide-shell/runtime.js +74 -3
- package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +84 -4
- package/packages/pm-lifecycle-hooks/README.md +29 -0
- package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/index.js +18 -0
- package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/index.ts +20 -0
- package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/manifest.json +9 -0
- package/packages/pm-lifecycle-hooks/package.json +52 -0
- package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/manifest.json +13 -1
- package/packages/pm-search-advanced/extensions/search-advanced/index.js +69 -1
- package/packages/pm-search-advanced/extensions/search-advanced/index.ts +91 -2
- package/packages/pm-search-advanced/extensions/search-advanced/manifest.json +13 -1
- package/packages/pm-templates/extensions/templates/manifest.json +6 -1
- package/packages/pm-todos/extensions/todos/index.js +3 -7
- package/packages/pm-todos/extensions/todos/index.ts +55 -42
- package/packages/pm-todos/extensions/todos/manifest.json +13 -1
- package/scripts/bundle-cli.mjs +121 -17
- package/dist/cli-bundle/chunks/chunk-PB2YU2E3.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-RJONRNXN.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-SW5BMMCU.js +0 -13864
- package/dist/cli-bundle/chunks/chunk-SW5BMMCU.js.map +0 -7
- package/dist/cli-bundle/chunks/commands-XJ4TJ5UN.js +0 -24225
- package/dist/cli-bundle/chunks/commands-XJ4TJ5UN.js.map +0 -7
- package/dist/cli-bundle/chunks/register-list-query-EIVQ5FMR.js.map +0 -7
- package/dist/cli-bundle/chunks/register-mutation-RSZNPSGI.js.map +0 -7
- package/dist/cli-bundle/chunks/register-operations-APUSYDMR.js.map +0 -7
- package/dist/cli-bundle/chunks/register-setup-OZOKSMPJ.js.map +0 -7
|
@@ -0,0 +1,1688 @@
|
|
|
1
|
+
import {
|
|
2
|
+
normalizeParentReferencePolicy,
|
|
3
|
+
normalizeSprintReleaseFormatPolicy
|
|
4
|
+
} from "./chunk-XX5LRINW.js";
|
|
5
|
+
import {
|
|
6
|
+
migrateItemFilesToFormat
|
|
7
|
+
} from "./chunk-BNL6S7QH.js";
|
|
8
|
+
import {
|
|
9
|
+
buildInvalidTypeError
|
|
10
|
+
} from "./chunk-KK6YPGH3.js";
|
|
11
|
+
import "./chunk-HPH6X4ZZ.js";
|
|
12
|
+
import {
|
|
13
|
+
resolveItemTypeRegistry,
|
|
14
|
+
resolveTypeName
|
|
15
|
+
} from "./chunk-4PJQSECJ.js";
|
|
16
|
+
import "./chunk-RANZIID5.js";
|
|
17
|
+
import {
|
|
18
|
+
CONTEXT_DEPTH_VALUES,
|
|
19
|
+
EXIT_CODE,
|
|
20
|
+
PmCliError,
|
|
21
|
+
getActiveExtensionRegistrations,
|
|
22
|
+
getSettingsPath,
|
|
23
|
+
pathExists,
|
|
24
|
+
readSettingsWithMetadata,
|
|
25
|
+
resolveGlobalPmRoot,
|
|
26
|
+
resolvePmRoot,
|
|
27
|
+
writeSettings
|
|
28
|
+
} from "./chunk-SRVKTWPR.js";
|
|
29
|
+
|
|
30
|
+
// dist/core/config/positional-value.js
|
|
31
|
+
!(function() {
|
|
32
|
+
try {
|
|
33
|
+
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
34
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "fd40ea7d-d52d-54b7-ab73-89bebc4a762e");
|
|
35
|
+
} catch (e2) {
|
|
36
|
+
}
|
|
37
|
+
})();
|
|
38
|
+
var FORMAT_KEYS = /* @__PURE__ */ new Set(["item_format"]);
|
|
39
|
+
var CRITERIA_KEYS = /* @__PURE__ */ new Set([
|
|
40
|
+
"definition_of_done",
|
|
41
|
+
"metadata_required_fields",
|
|
42
|
+
"lifecycle_stale_blocker_reason_patterns",
|
|
43
|
+
"lifecycle_closure_like_blocked_reason_patterns",
|
|
44
|
+
"lifecycle_closure_like_resolution_patterns",
|
|
45
|
+
"lifecycle_closure_like_actual_result_patterns"
|
|
46
|
+
]);
|
|
47
|
+
var POLICY_KEYS = /* @__PURE__ */ new Set([
|
|
48
|
+
"history_missing_stream_policy",
|
|
49
|
+
"sprint_release_format_policy",
|
|
50
|
+
"parent_reference_policy",
|
|
51
|
+
"metadata_validation_profile",
|
|
52
|
+
"governance_preset",
|
|
53
|
+
"governance_ownership_enforcement",
|
|
54
|
+
"governance_create_mode_default",
|
|
55
|
+
"governance_close_validation_default",
|
|
56
|
+
"governance_create_default_type",
|
|
57
|
+
"governance_workflow_enforcement",
|
|
58
|
+
"governance_parent_reference_policy",
|
|
59
|
+
"governance_metadata_validation_profile",
|
|
60
|
+
"governance_force_required_for_stale_lock",
|
|
61
|
+
"test_result_tracking",
|
|
62
|
+
"telemetry_tracking"
|
|
63
|
+
]);
|
|
64
|
+
var ENABLED_DISABLED_POLICY_KEYS = /* @__PURE__ */ new Set([
|
|
65
|
+
"governance_force_required_for_stale_lock",
|
|
66
|
+
"test_result_tracking",
|
|
67
|
+
"telemetry_tracking"
|
|
68
|
+
]);
|
|
69
|
+
var ENABLED_DISABLED_SYNONYMS = {
|
|
70
|
+
off: "disabled",
|
|
71
|
+
on: "enabled",
|
|
72
|
+
true: "enabled",
|
|
73
|
+
false: "disabled",
|
|
74
|
+
enabled: "enabled",
|
|
75
|
+
disabled: "disabled"
|
|
76
|
+
};
|
|
77
|
+
function toCanonicalKey(keyOrAlias) {
|
|
78
|
+
const normalized = keyOrAlias.trim().toLowerCase().replaceAll("-", "_");
|
|
79
|
+
if (FORMAT_KEYS.has(normalized) || CRITERIA_KEYS.has(normalized) || POLICY_KEYS.has(normalized) || normalized === "context") {
|
|
80
|
+
return normalized;
|
|
81
|
+
}
|
|
82
|
+
return void 0;
|
|
83
|
+
}
|
|
84
|
+
function normalizeEnabledDisabled(value) {
|
|
85
|
+
const normalized = value.trim().toLowerCase();
|
|
86
|
+
return ENABLED_DISABLED_SYNONYMS[normalized] ?? value;
|
|
87
|
+
}
|
|
88
|
+
function resolveConfigPositionalValue(canonicalKeyOrAlias, value) {
|
|
89
|
+
const key = toCanonicalKey(canonicalKeyOrAlias);
|
|
90
|
+
if (key === void 0) {
|
|
91
|
+
return {
|
|
92
|
+
routable: false,
|
|
93
|
+
reason: `Unknown config key "${canonicalKeyOrAlias}" cannot route a positional value.`
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
if (key === "context") {
|
|
97
|
+
return {
|
|
98
|
+
routable: false,
|
|
99
|
+
reason: "Config set context does not accept a positional value. Use --default-depth, --activity-limit, --stale-threshold-days, or --section-<name> flags."
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
if (FORMAT_KEYS.has(key)) {
|
|
103
|
+
return { routable: true, flag: "format", value };
|
|
104
|
+
}
|
|
105
|
+
if (CRITERIA_KEYS.has(key)) {
|
|
106
|
+
return { routable: true, flag: "criterion", values: [value] };
|
|
107
|
+
}
|
|
108
|
+
const policyValue = ENABLED_DISABLED_POLICY_KEYS.has(key) ? normalizeEnabledDisabled(value) : value;
|
|
109
|
+
return { routable: true, flag: "policy", value: policyValue };
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// dist/core/config/nested-settings.js
|
|
113
|
+
!(function() {
|
|
114
|
+
try {
|
|
115
|
+
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
116
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "a5fc9ece-8275-58dd-88d2-a4e0ae48f952");
|
|
117
|
+
} catch (e2) {
|
|
118
|
+
}
|
|
119
|
+
})();
|
|
120
|
+
var NESTED_SETTING_DESCRIPTORS = [
|
|
121
|
+
{
|
|
122
|
+
key: "search_provider",
|
|
123
|
+
path: "search.provider",
|
|
124
|
+
kind: "string",
|
|
125
|
+
summary: "Search embedding provider name (e.g. openai, ollama, or an extension provider)."
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
key: "search_mutation_refresh_policy",
|
|
129
|
+
path: "search.mutation_refresh_policy",
|
|
130
|
+
kind: "string",
|
|
131
|
+
choices: ["cache_only", "semantic_configured", "semantic_auto"],
|
|
132
|
+
summary: "Mutation-time search refresh policy: cache_only, semantic_configured, or semantic_auto."
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
key: "search_embedding_model",
|
|
136
|
+
path: "search.embedding_model",
|
|
137
|
+
kind: "string",
|
|
138
|
+
summary: "Default embedding model name (overrides provider-specific model when set)."
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
key: "search_embedding_batch_size",
|
|
142
|
+
path: "search.embedding_batch_size",
|
|
143
|
+
kind: "integer",
|
|
144
|
+
min: 1,
|
|
145
|
+
summary: "Number of items embedded per request batch."
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
key: "search_embedding_timeout_ms",
|
|
149
|
+
path: "search.embedding_timeout_ms",
|
|
150
|
+
kind: "integer",
|
|
151
|
+
min: 1,
|
|
152
|
+
summary: "Per-request embedding timeout in milliseconds."
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
key: "search_score_threshold",
|
|
156
|
+
path: "search.score_threshold",
|
|
157
|
+
kind: "number",
|
|
158
|
+
summary: "Minimum score for a hit to be returned (0 keeps all matches)."
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
key: "search_hybrid_semantic_weight",
|
|
162
|
+
path: "search.hybrid_semantic_weight",
|
|
163
|
+
kind: "ratio",
|
|
164
|
+
summary: "Hybrid mode semantic weight in [0, 1] (1-weight goes to keyword)."
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
key: "search_max_results",
|
|
168
|
+
path: "search.max_results",
|
|
169
|
+
kind: "integer",
|
|
170
|
+
min: 1,
|
|
171
|
+
summary: "Default upper bound on search hits when --limit is not supplied."
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
key: "openai_base_url",
|
|
175
|
+
path: "providers.openai.base_url",
|
|
176
|
+
kind: "string",
|
|
177
|
+
summary: "OpenAI-compatible API base URL (LM Studio/vLLM also use this)."
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
key: "openai_api_key",
|
|
181
|
+
path: "providers.openai.api_key",
|
|
182
|
+
kind: "string",
|
|
183
|
+
summary: "OpenAI-compatible API key."
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
key: "openai_model",
|
|
187
|
+
path: "providers.openai.model",
|
|
188
|
+
kind: "string",
|
|
189
|
+
summary: "OpenAI-compatible embedding model name."
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
key: "ollama_base_url",
|
|
193
|
+
path: "providers.ollama.base_url",
|
|
194
|
+
kind: "string",
|
|
195
|
+
summary: "Ollama API base URL (typically http://localhost:11434)."
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
key: "ollama_model",
|
|
199
|
+
path: "providers.ollama.model",
|
|
200
|
+
kind: "string",
|
|
201
|
+
summary: "Ollama embedding model name (e.g. nomic-embed-text)."
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
key: "vector_store_adapter",
|
|
205
|
+
path: "vector_store.adapter",
|
|
206
|
+
kind: "string",
|
|
207
|
+
summary: "Vector store adapter name (lancedb, qdrant, or an extension adapter)."
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
key: "qdrant_url",
|
|
211
|
+
path: "vector_store.qdrant.url",
|
|
212
|
+
kind: "string",
|
|
213
|
+
summary: "Qdrant HTTP API URL."
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
key: "qdrant_api_key",
|
|
217
|
+
path: "vector_store.qdrant.api_key",
|
|
218
|
+
kind: "string",
|
|
219
|
+
summary: "Qdrant API key (empty if running unauthenticated)."
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
key: "lancedb_path",
|
|
223
|
+
path: "vector_store.lancedb.path",
|
|
224
|
+
kind: "string",
|
|
225
|
+
summary: "LanceDB storage path (relative to pm root or absolute)."
|
|
226
|
+
}
|
|
227
|
+
];
|
|
228
|
+
var DESCRIPTOR_BY_KEY = new Map(NESTED_SETTING_DESCRIPTORS.map((descriptor) => [descriptor.key, descriptor]));
|
|
229
|
+
var NESTED_SETTING_KEYS = NESTED_SETTING_DESCRIPTORS.map((descriptor) => descriptor.key);
|
|
230
|
+
function resolveNestedSettingDescriptor(raw) {
|
|
231
|
+
if (typeof raw !== "string") {
|
|
232
|
+
return void 0;
|
|
233
|
+
}
|
|
234
|
+
const normalized = raw.trim().toLowerCase().replaceAll("-", "_");
|
|
235
|
+
if (normalized.length === 0) {
|
|
236
|
+
return void 0;
|
|
237
|
+
}
|
|
238
|
+
return DESCRIPTOR_BY_KEY.get(normalized);
|
|
239
|
+
}
|
|
240
|
+
function parseNestedSettingValue(descriptor, rawValue) {
|
|
241
|
+
if (typeof rawValue !== "string") {
|
|
242
|
+
return { ok: false, error: { message: `Config set ${descriptor.key} requires a string value` } };
|
|
243
|
+
}
|
|
244
|
+
const trimmed = rawValue.trim();
|
|
245
|
+
if (descriptor.kind === "string") {
|
|
246
|
+
if (descriptor.choices && !descriptor.choices.includes(trimmed)) {
|
|
247
|
+
return {
|
|
248
|
+
ok: false,
|
|
249
|
+
error: {
|
|
250
|
+
message: `Config set ${descriptor.key} must be one of ${descriptor.choices.join("|")}, got "${rawValue}"`
|
|
251
|
+
}
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
return { ok: true, parsed: { descriptor, value: trimmed } };
|
|
255
|
+
}
|
|
256
|
+
if (trimmed.length === 0) {
|
|
257
|
+
return {
|
|
258
|
+
ok: false,
|
|
259
|
+
error: { message: `Config set ${descriptor.key} requires a non-empty value` }
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
const parsed = Number(trimmed);
|
|
263
|
+
if (!Number.isFinite(parsed)) {
|
|
264
|
+
return {
|
|
265
|
+
ok: false,
|
|
266
|
+
error: { message: `Config set ${descriptor.key} requires a finite number, got "${rawValue}"` }
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
if (descriptor.kind === "integer") {
|
|
270
|
+
if (!Number.isInteger(parsed) || parsed < 0) {
|
|
271
|
+
return {
|
|
272
|
+
ok: false,
|
|
273
|
+
error: { message: `Config set ${descriptor.key} requires a non-negative integer, got "${rawValue}"` }
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
if (descriptor.min !== void 0 && parsed < descriptor.min) {
|
|
277
|
+
return {
|
|
278
|
+
ok: false,
|
|
279
|
+
error: {
|
|
280
|
+
message: `Config set ${descriptor.key} requires an integer >= ${descriptor.min}, got "${rawValue}" (the runtime silently ignores 0 here and falls back to the default)`
|
|
281
|
+
}
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
return { ok: true, parsed: { descriptor, value: parsed } };
|
|
285
|
+
}
|
|
286
|
+
if (descriptor.kind === "ratio") {
|
|
287
|
+
if (parsed < 0 || parsed > 1) {
|
|
288
|
+
return {
|
|
289
|
+
ok: false,
|
|
290
|
+
error: { message: `Config set ${descriptor.key} requires a number in [0, 1], got "${rawValue}"` }
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
return { ok: true, parsed: { descriptor, value: parsed } };
|
|
294
|
+
}
|
|
295
|
+
if (descriptor.min !== void 0 && parsed < descriptor.min) {
|
|
296
|
+
return {
|
|
297
|
+
ok: false,
|
|
298
|
+
error: { message: `Config set ${descriptor.key} requires a number >= ${descriptor.min}, got "${rawValue}"` }
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
return { ok: true, parsed: { descriptor, value: parsed } };
|
|
302
|
+
}
|
|
303
|
+
function readNestedSettingValue(settings, descriptor) {
|
|
304
|
+
const segments = descriptor.path.split(".");
|
|
305
|
+
let cursor = settings;
|
|
306
|
+
for (const segment of segments) {
|
|
307
|
+
if (typeof cursor !== "object" || cursor === null) {
|
|
308
|
+
return null;
|
|
309
|
+
}
|
|
310
|
+
cursor = cursor[segment];
|
|
311
|
+
}
|
|
312
|
+
if (typeof cursor === "string" || typeof cursor === "number") {
|
|
313
|
+
return cursor;
|
|
314
|
+
}
|
|
315
|
+
return null;
|
|
316
|
+
}
|
|
317
|
+
function writeNestedSettingValue(settings, descriptor, value) {
|
|
318
|
+
const segments = descriptor.path.split(".");
|
|
319
|
+
let cursor = settings;
|
|
320
|
+
for (let index = 0; index < segments.length - 1; index += 1) {
|
|
321
|
+
const segment = segments[index];
|
|
322
|
+
const existing = cursor[segment];
|
|
323
|
+
if (typeof existing !== "object" || existing === null || Array.isArray(existing)) {
|
|
324
|
+
const next = {};
|
|
325
|
+
cursor[segment] = next;
|
|
326
|
+
cursor = next;
|
|
327
|
+
} else {
|
|
328
|
+
cursor = existing;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
const leafKey = segments[segments.length - 1];
|
|
332
|
+
const previous = cursor[leafKey];
|
|
333
|
+
if (previous === value) {
|
|
334
|
+
return false;
|
|
335
|
+
}
|
|
336
|
+
cursor[leafKey] = value;
|
|
337
|
+
return true;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
// dist/cli/commands/config.js
|
|
341
|
+
!(function() {
|
|
342
|
+
try {
|
|
343
|
+
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
344
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "597be62b-f4c6-5dfe-8f00-62b9ab38f374");
|
|
345
|
+
} catch (e2) {
|
|
346
|
+
}
|
|
347
|
+
})();
|
|
348
|
+
var CONFIG_SCOPE_VALUES = ["project", "global"];
|
|
349
|
+
var CONFIG_KEY_VALUES = [
|
|
350
|
+
"definition-of-done",
|
|
351
|
+
"definition_of_done",
|
|
352
|
+
"item-format",
|
|
353
|
+
"item_format",
|
|
354
|
+
"history-missing-stream-policy",
|
|
355
|
+
"history_missing_stream_policy",
|
|
356
|
+
"sprint-release-format-policy",
|
|
357
|
+
"sprint_release_format_policy",
|
|
358
|
+
"parent-reference-policy",
|
|
359
|
+
"parent_reference_policy",
|
|
360
|
+
"metadata-validation-profile",
|
|
361
|
+
"metadata_validation_profile",
|
|
362
|
+
"metadata-required-fields",
|
|
363
|
+
"metadata_required_fields",
|
|
364
|
+
"lifecycle-stale-blocker-reason-patterns",
|
|
365
|
+
"lifecycle_stale_blocker_reason_patterns",
|
|
366
|
+
"lifecycle-closure-like-blocked-reason-patterns",
|
|
367
|
+
"lifecycle_closure_like_blocked_reason_patterns",
|
|
368
|
+
"lifecycle-closure-like-resolution-patterns",
|
|
369
|
+
"lifecycle_closure_like_resolution_patterns",
|
|
370
|
+
"lifecycle-closure-like-actual-result-patterns",
|
|
371
|
+
"lifecycle_closure_like_actual_result_patterns",
|
|
372
|
+
"governance-preset",
|
|
373
|
+
"governance_preset",
|
|
374
|
+
"governance-ownership-enforcement",
|
|
375
|
+
"governance_ownership_enforcement",
|
|
376
|
+
"governance-create-mode-default",
|
|
377
|
+
"governance_create_mode_default",
|
|
378
|
+
"governance-close-validation-default",
|
|
379
|
+
"governance_close_validation_default",
|
|
380
|
+
"governance-create-default-type",
|
|
381
|
+
"governance_create_default_type",
|
|
382
|
+
"governance-workflow-enforcement",
|
|
383
|
+
"governance_workflow_enforcement",
|
|
384
|
+
"governance-parent-reference-policy",
|
|
385
|
+
"governance_parent_reference_policy",
|
|
386
|
+
"governance-metadata-validation-profile",
|
|
387
|
+
"governance_metadata_validation_profile",
|
|
388
|
+
"governance-force-required-for-stale-lock",
|
|
389
|
+
"governance_force_required_for_stale_lock",
|
|
390
|
+
"test-result-tracking",
|
|
391
|
+
"test_result_tracking",
|
|
392
|
+
"telemetry-tracking",
|
|
393
|
+
"telemetry_tracking",
|
|
394
|
+
"context"
|
|
395
|
+
];
|
|
396
|
+
var CONFIG_KEY_ALIASES = {
|
|
397
|
+
definition_of_done: ["definition-of-done", "definition_of_done"],
|
|
398
|
+
item_format: ["item-format", "item_format"],
|
|
399
|
+
history_missing_stream_policy: ["history-missing-stream-policy", "history_missing_stream_policy"],
|
|
400
|
+
sprint_release_format_policy: ["sprint-release-format-policy", "sprint_release_format_policy"],
|
|
401
|
+
parent_reference_policy: ["parent-reference-policy", "parent_reference_policy"],
|
|
402
|
+
metadata_validation_profile: ["metadata-validation-profile", "metadata_validation_profile"],
|
|
403
|
+
metadata_required_fields: ["metadata-required-fields", "metadata_required_fields"],
|
|
404
|
+
lifecycle_stale_blocker_reason_patterns: [
|
|
405
|
+
"lifecycle-stale-blocker-reason-patterns",
|
|
406
|
+
"lifecycle_stale_blocker_reason_patterns"
|
|
407
|
+
],
|
|
408
|
+
lifecycle_closure_like_blocked_reason_patterns: [
|
|
409
|
+
"lifecycle-closure-like-blocked-reason-patterns",
|
|
410
|
+
"lifecycle_closure_like_blocked_reason_patterns"
|
|
411
|
+
],
|
|
412
|
+
lifecycle_closure_like_resolution_patterns: [
|
|
413
|
+
"lifecycle-closure-like-resolution-patterns",
|
|
414
|
+
"lifecycle_closure_like_resolution_patterns"
|
|
415
|
+
],
|
|
416
|
+
lifecycle_closure_like_actual_result_patterns: [
|
|
417
|
+
"lifecycle-closure-like-actual-result-patterns",
|
|
418
|
+
"lifecycle_closure_like_actual_result_patterns"
|
|
419
|
+
],
|
|
420
|
+
governance_preset: ["governance-preset", "governance_preset"],
|
|
421
|
+
governance_ownership_enforcement: ["governance-ownership-enforcement", "governance_ownership_enforcement"],
|
|
422
|
+
governance_create_mode_default: ["governance-create-mode-default", "governance_create_mode_default"],
|
|
423
|
+
governance_close_validation_default: [
|
|
424
|
+
"governance-close-validation-default",
|
|
425
|
+
"governance_close_validation_default"
|
|
426
|
+
],
|
|
427
|
+
governance_create_default_type: ["governance-create-default-type", "governance_create_default_type"],
|
|
428
|
+
governance_workflow_enforcement: ["governance-workflow-enforcement", "governance_workflow_enforcement"],
|
|
429
|
+
governance_parent_reference_policy: ["governance-parent-reference-policy", "governance_parent_reference_policy"],
|
|
430
|
+
governance_metadata_validation_profile: [
|
|
431
|
+
"governance-metadata-validation-profile",
|
|
432
|
+
"governance_metadata_validation_profile"
|
|
433
|
+
],
|
|
434
|
+
governance_force_required_for_stale_lock: [
|
|
435
|
+
"governance-force-required-for-stale-lock",
|
|
436
|
+
"governance_force_required_for_stale_lock"
|
|
437
|
+
],
|
|
438
|
+
test_result_tracking: ["test-result-tracking", "test_result_tracking"],
|
|
439
|
+
telemetry_tracking: ["telemetry-tracking", "telemetry_tracking"],
|
|
440
|
+
context: ["context"]
|
|
441
|
+
};
|
|
442
|
+
var CANONICAL_CONFIG_KEYS = Object.keys(CONFIG_KEY_ALIASES).map((candidate) => CONFIG_KEY_ALIASES[candidate][0]);
|
|
443
|
+
var CONFIG_KEY_SUMMARIES = {
|
|
444
|
+
definition_of_done: "Definition of Done criteria list.",
|
|
445
|
+
item_format: "Default item file format.",
|
|
446
|
+
history_missing_stream_policy: "Missing history stream handling policy.",
|
|
447
|
+
sprint_release_format_policy: "Sprint/release format validation policy.",
|
|
448
|
+
parent_reference_policy: "Parent reference validation policy.",
|
|
449
|
+
metadata_validation_profile: "Validate metadata profile policy (core|strict|custom).",
|
|
450
|
+
metadata_required_fields: "Validate custom metadata required-fields list.",
|
|
451
|
+
lifecycle_stale_blocker_reason_patterns: "Validate lifecycle stale-blocker reason substring patterns (criteria list).",
|
|
452
|
+
lifecycle_closure_like_blocked_reason_patterns: "Validate lifecycle closure-like blocked_reason substring patterns (criteria list).",
|
|
453
|
+
lifecycle_closure_like_resolution_patterns: "Validate lifecycle closure-like resolution substring patterns (criteria list).",
|
|
454
|
+
lifecycle_closure_like_actual_result_patterns: "Validate lifecycle closure-like actual_result substring patterns (criteria list).",
|
|
455
|
+
governance_preset: "Governance preset policy (minimal|default|strict|custom).",
|
|
456
|
+
governance_ownership_enforcement: "Governance ownership enforcement policy (none|warn|strict).",
|
|
457
|
+
governance_create_mode_default: "Governance default create mode (progressive|strict).",
|
|
458
|
+
governance_close_validation_default: "Governance default close validation mode (off|warn|strict).",
|
|
459
|
+
governance_create_default_type: "Governance default item type for `pm create` when --type is omitted.",
|
|
460
|
+
governance_workflow_enforcement: "Governance per-type transition enforcement mode (off|warn|strict).",
|
|
461
|
+
governance_parent_reference_policy: "Governance parent reference policy (warn|strict_error).",
|
|
462
|
+
governance_metadata_validation_profile: "Governance metadata validation profile (core|strict|custom).",
|
|
463
|
+
governance_force_required_for_stale_lock: "Governance stale-lock force policy (enabled|disabled).",
|
|
464
|
+
test_result_tracking: "Item-level linked test result persistence policy.",
|
|
465
|
+
telemetry_tracking: "Telemetry usage reporting policy.",
|
|
466
|
+
context: "Context command settings (depth, section toggles, limits)."
|
|
467
|
+
};
|
|
468
|
+
var LIFECYCLE_PATTERN_CONFIG_KEYS = [
|
|
469
|
+
"lifecycle_stale_blocker_reason_patterns",
|
|
470
|
+
"lifecycle_closure_like_blocked_reason_patterns",
|
|
471
|
+
"lifecycle_closure_like_resolution_patterns",
|
|
472
|
+
"lifecycle_closure_like_actual_result_patterns"
|
|
473
|
+
];
|
|
474
|
+
function isCriteriaConfigKey(key) {
|
|
475
|
+
return key === "definition_of_done" || key === "metadata_required_fields" || LIFECYCLE_PATTERN_CONFIG_KEYS.includes(key);
|
|
476
|
+
}
|
|
477
|
+
function normalizeScope(value) {
|
|
478
|
+
if (CONFIG_SCOPE_VALUES.includes(value)) {
|
|
479
|
+
return value;
|
|
480
|
+
}
|
|
481
|
+
throw new PmCliError(`Invalid config scope "${value}". Allowed: ${CONFIG_SCOPE_VALUES.join(", ")}`, EXIT_CODE.USAGE);
|
|
482
|
+
}
|
|
483
|
+
function normalizeAction(value) {
|
|
484
|
+
if (value === "get" || value === "set" || value === "list" || value === "export") {
|
|
485
|
+
return value;
|
|
486
|
+
}
|
|
487
|
+
throw new PmCliError(`Invalid config action "${value}". Allowed: get, set, list, export`, EXIT_CODE.USAGE);
|
|
488
|
+
}
|
|
489
|
+
function normalizeKey(value) {
|
|
490
|
+
if (CONFIG_KEY_VALUES.includes(value)) {
|
|
491
|
+
if (value === "item-format" || value === "item_format") {
|
|
492
|
+
return "item_format";
|
|
493
|
+
}
|
|
494
|
+
if (value === "history-missing-stream-policy" || value === "history_missing_stream_policy") {
|
|
495
|
+
return "history_missing_stream_policy";
|
|
496
|
+
}
|
|
497
|
+
if (value === "sprint-release-format-policy" || value === "sprint_release_format_policy") {
|
|
498
|
+
return "sprint_release_format_policy";
|
|
499
|
+
}
|
|
500
|
+
if (value === "parent-reference-policy" || value === "parent_reference_policy") {
|
|
501
|
+
return "parent_reference_policy";
|
|
502
|
+
}
|
|
503
|
+
if (value === "metadata-validation-profile" || value === "metadata_validation_profile") {
|
|
504
|
+
return "metadata_validation_profile";
|
|
505
|
+
}
|
|
506
|
+
if (value === "metadata-required-fields" || value === "metadata_required_fields") {
|
|
507
|
+
return "metadata_required_fields";
|
|
508
|
+
}
|
|
509
|
+
if (value === "lifecycle-stale-blocker-reason-patterns" || value === "lifecycle_stale_blocker_reason_patterns") {
|
|
510
|
+
return "lifecycle_stale_blocker_reason_patterns";
|
|
511
|
+
}
|
|
512
|
+
if (value === "lifecycle-closure-like-blocked-reason-patterns" || value === "lifecycle_closure_like_blocked_reason_patterns") {
|
|
513
|
+
return "lifecycle_closure_like_blocked_reason_patterns";
|
|
514
|
+
}
|
|
515
|
+
if (value === "lifecycle-closure-like-resolution-patterns" || value === "lifecycle_closure_like_resolution_patterns") {
|
|
516
|
+
return "lifecycle_closure_like_resolution_patterns";
|
|
517
|
+
}
|
|
518
|
+
if (value === "lifecycle-closure-like-actual-result-patterns" || value === "lifecycle_closure_like_actual_result_patterns") {
|
|
519
|
+
return "lifecycle_closure_like_actual_result_patterns";
|
|
520
|
+
}
|
|
521
|
+
if (value === "governance-preset" || value === "governance_preset") {
|
|
522
|
+
return "governance_preset";
|
|
523
|
+
}
|
|
524
|
+
if (value === "governance-ownership-enforcement" || value === "governance_ownership_enforcement") {
|
|
525
|
+
return "governance_ownership_enforcement";
|
|
526
|
+
}
|
|
527
|
+
if (value === "governance-create-mode-default" || value === "governance_create_mode_default") {
|
|
528
|
+
return "governance_create_mode_default";
|
|
529
|
+
}
|
|
530
|
+
if (value === "governance-close-validation-default" || value === "governance_close_validation_default") {
|
|
531
|
+
return "governance_close_validation_default";
|
|
532
|
+
}
|
|
533
|
+
if (value === "governance-create-default-type" || value === "governance_create_default_type") {
|
|
534
|
+
return "governance_create_default_type";
|
|
535
|
+
}
|
|
536
|
+
if (value === "governance-workflow-enforcement" || value === "governance_workflow_enforcement") {
|
|
537
|
+
return "governance_workflow_enforcement";
|
|
538
|
+
}
|
|
539
|
+
if (value === "governance-parent-reference-policy" || value === "governance_parent_reference_policy") {
|
|
540
|
+
return "governance_parent_reference_policy";
|
|
541
|
+
}
|
|
542
|
+
if (value === "governance-metadata-validation-profile" || value === "governance_metadata_validation_profile") {
|
|
543
|
+
return "governance_metadata_validation_profile";
|
|
544
|
+
}
|
|
545
|
+
if (value === "governance-force-required-for-stale-lock" || value === "governance_force_required_for_stale_lock") {
|
|
546
|
+
return "governance_force_required_for_stale_lock";
|
|
547
|
+
}
|
|
548
|
+
if (value === "test-result-tracking" || value === "test_result_tracking") {
|
|
549
|
+
return "test_result_tracking";
|
|
550
|
+
}
|
|
551
|
+
if (value === "telemetry-tracking" || value === "telemetry_tracking") {
|
|
552
|
+
return "telemetry_tracking";
|
|
553
|
+
}
|
|
554
|
+
if (value === "context") {
|
|
555
|
+
return "context";
|
|
556
|
+
}
|
|
557
|
+
return "definition_of_done";
|
|
558
|
+
}
|
|
559
|
+
const nestedKeys = NESTED_SETTING_DESCRIPTORS.map((descriptor) => descriptor.key).join(", ");
|
|
560
|
+
throw new PmCliError(`Invalid config key "${value}". Supported: ${CANONICAL_CONFIG_KEYS.join(", ")} (underscore variants also accepted). Nested leaf settings: ${nestedKeys}.`, EXIT_CODE.USAGE);
|
|
561
|
+
}
|
|
562
|
+
function normalizeCriteria(values, clearCriteria) {
|
|
563
|
+
const normalized = [...new Set((values ?? []).map((value) => value.trim()).filter((value) => value.length > 0))].sort((left, right) => left.localeCompare(right));
|
|
564
|
+
if (clearCriteria) {
|
|
565
|
+
if (normalized.length > 0) {
|
|
566
|
+
throw new PmCliError("Config set definition-of-done cannot combine --clear-criteria with --criterion values", EXIT_CODE.USAGE);
|
|
567
|
+
}
|
|
568
|
+
return [];
|
|
569
|
+
}
|
|
570
|
+
if (normalized.length === 0) {
|
|
571
|
+
throw new PmCliError("Config set definition-of-done requires at least one non-empty --criterion value (or --clear-criteria to clear)", EXIT_CODE.USAGE);
|
|
572
|
+
}
|
|
573
|
+
return normalized;
|
|
574
|
+
}
|
|
575
|
+
function normalizeItemFormat(value) {
|
|
576
|
+
const normalized = value?.trim().toLowerCase();
|
|
577
|
+
if (normalized === "toon") {
|
|
578
|
+
return "toon";
|
|
579
|
+
}
|
|
580
|
+
if (normalized === "json_markdown") {
|
|
581
|
+
throw new PmCliError("Config set item-format no longer accepts json_markdown. Markdown item files are legacy read/migration input only.", EXIT_CODE.USAGE);
|
|
582
|
+
}
|
|
583
|
+
throw new PmCliError("Config set item-format requires --format toon", EXIT_CODE.USAGE);
|
|
584
|
+
}
|
|
585
|
+
function normalizeHistoryMissingStreamPolicy(value) {
|
|
586
|
+
const normalized = value?.trim().toLowerCase().replaceAll("-", "_");
|
|
587
|
+
if (normalized === "auto_create" || normalized === "strict_error") {
|
|
588
|
+
return normalized;
|
|
589
|
+
}
|
|
590
|
+
throw new PmCliError("Config set history-missing-stream-policy requires --policy with one of: auto_create, strict_error", EXIT_CODE.USAGE);
|
|
591
|
+
}
|
|
592
|
+
function normalizeTestResultTrackingPolicy(value) {
|
|
593
|
+
const normalized = value?.trim().toLowerCase().replaceAll("-", "_");
|
|
594
|
+
if (normalized === "enabled" || normalized === "disabled") {
|
|
595
|
+
return normalized;
|
|
596
|
+
}
|
|
597
|
+
throw new PmCliError("Config set test-result-tracking requires --policy with one of: enabled, disabled", EXIT_CODE.USAGE);
|
|
598
|
+
}
|
|
599
|
+
function normalizeTelemetryTrackingPolicy(value) {
|
|
600
|
+
const normalized = value?.trim().toLowerCase().replaceAll("-", "_");
|
|
601
|
+
if (normalized === "enabled" || normalized === "disabled") {
|
|
602
|
+
return normalized;
|
|
603
|
+
}
|
|
604
|
+
throw new PmCliError("Config set telemetry-tracking requires --policy with one of: enabled, disabled", EXIT_CODE.USAGE);
|
|
605
|
+
}
|
|
606
|
+
function normalizeValidateMetadataProfile(value) {
|
|
607
|
+
const normalized = value?.trim().toLowerCase().replaceAll("-", "_");
|
|
608
|
+
if (normalized === "core" || normalized === "strict" || normalized === "custom") {
|
|
609
|
+
return normalized;
|
|
610
|
+
}
|
|
611
|
+
throw new PmCliError("Config set metadata-validation-profile requires --policy with one of: core, strict, custom", EXIT_CODE.USAGE);
|
|
612
|
+
}
|
|
613
|
+
function normalizeGovernancePreset(value) {
|
|
614
|
+
const normalized = value?.trim().toLowerCase().replaceAll("-", "_");
|
|
615
|
+
if (normalized === "minimal" || normalized === "default" || normalized === "strict" || normalized === "custom") {
|
|
616
|
+
return normalized;
|
|
617
|
+
}
|
|
618
|
+
throw new PmCliError("Config set governance-preset requires --policy with one of: minimal, default, strict, custom", EXIT_CODE.USAGE);
|
|
619
|
+
}
|
|
620
|
+
function normalizeGovernanceOwnershipEnforcement(value) {
|
|
621
|
+
const normalized = value?.trim().toLowerCase().replaceAll("-", "_");
|
|
622
|
+
if (normalized === "none" || normalized === "warn" || normalized === "strict") {
|
|
623
|
+
return normalized;
|
|
624
|
+
}
|
|
625
|
+
throw new PmCliError("Config set governance-ownership-enforcement requires --policy with one of: none, warn, strict", EXIT_CODE.USAGE);
|
|
626
|
+
}
|
|
627
|
+
function normalizeGovernanceCreateModeDefault(value) {
|
|
628
|
+
const normalized = value?.trim().toLowerCase().replaceAll("-", "_");
|
|
629
|
+
if (normalized === "progressive" || normalized === "strict") {
|
|
630
|
+
return normalized;
|
|
631
|
+
}
|
|
632
|
+
throw new PmCliError("Config set governance-create-mode-default requires --policy with one of: progressive, strict", EXIT_CODE.USAGE);
|
|
633
|
+
}
|
|
634
|
+
function normalizeGovernanceCloseValidationDefault(value) {
|
|
635
|
+
const normalized = value?.trim().toLowerCase().replaceAll("-", "_");
|
|
636
|
+
if (normalized === "off" || normalized === "warn" || normalized === "strict") {
|
|
637
|
+
return normalized;
|
|
638
|
+
}
|
|
639
|
+
if (normalized === "none" || normalized === "disabled") {
|
|
640
|
+
return "off";
|
|
641
|
+
}
|
|
642
|
+
throw new PmCliError("Config set governance-close-validation-default requires --policy with one of: off, warn, strict", EXIT_CODE.USAGE);
|
|
643
|
+
}
|
|
644
|
+
function normalizeGovernanceWorkflowEnforcement(value) {
|
|
645
|
+
const normalized = typeof value === "string" ? value.trim().toLowerCase().replaceAll("-", "_") : void 0;
|
|
646
|
+
if (normalized === "off" || normalized === "warn" || normalized === "strict") {
|
|
647
|
+
return normalized;
|
|
648
|
+
}
|
|
649
|
+
if (normalized === "none" || normalized === "disabled") {
|
|
650
|
+
return "off";
|
|
651
|
+
}
|
|
652
|
+
throw new PmCliError("Config set governance-workflow-enforcement requires one of: off, warn, strict", EXIT_CODE.USAGE);
|
|
653
|
+
}
|
|
654
|
+
function normalizeGovernanceForceRequiredForStaleLockPolicy(value) {
|
|
655
|
+
const normalized = value?.trim().toLowerCase().replaceAll("-", "_");
|
|
656
|
+
if (normalized === "enabled" || normalized === "disabled") {
|
|
657
|
+
return normalized;
|
|
658
|
+
}
|
|
659
|
+
throw new PmCliError("Config set governance-force-required-for-stale-lock requires --policy with one of: enabled, disabled", EXIT_CODE.USAGE);
|
|
660
|
+
}
|
|
661
|
+
function normalizePolicyForConflict(key, value) {
|
|
662
|
+
switch (key) {
|
|
663
|
+
case "history_missing_stream_policy":
|
|
664
|
+
return normalizeHistoryMissingStreamPolicy(value);
|
|
665
|
+
case "sprint_release_format_policy":
|
|
666
|
+
return normalizeSprintReleaseFormatPolicy(value);
|
|
667
|
+
case "parent_reference_policy":
|
|
668
|
+
case "governance_parent_reference_policy":
|
|
669
|
+
return normalizeParentReferencePolicy(value);
|
|
670
|
+
case "metadata_validation_profile":
|
|
671
|
+
case "governance_metadata_validation_profile":
|
|
672
|
+
return normalizeValidateMetadataProfile(value);
|
|
673
|
+
case "governance_preset":
|
|
674
|
+
return normalizeGovernancePreset(value);
|
|
675
|
+
case "governance_ownership_enforcement":
|
|
676
|
+
return normalizeGovernanceOwnershipEnforcement(value);
|
|
677
|
+
case "governance_create_mode_default":
|
|
678
|
+
return normalizeGovernanceCreateModeDefault(value);
|
|
679
|
+
case "governance_close_validation_default":
|
|
680
|
+
return normalizeGovernanceCloseValidationDefault(value);
|
|
681
|
+
case "governance_workflow_enforcement":
|
|
682
|
+
return normalizeGovernanceWorkflowEnforcement(value);
|
|
683
|
+
case "governance_force_required_for_stale_lock":
|
|
684
|
+
return normalizeGovernanceForceRequiredForStaleLockPolicy(value);
|
|
685
|
+
case "test_result_tracking":
|
|
686
|
+
return normalizeTestResultTrackingPolicy(value);
|
|
687
|
+
case "telemetry_tracking":
|
|
688
|
+
return normalizeTelemetryTrackingPolicy(value);
|
|
689
|
+
default:
|
|
690
|
+
return value.trim().toLowerCase().replaceAll("-", "_");
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
var METADATA_REQUIRED_FIELD_ALIAS_MAP = {
|
|
694
|
+
author: "author",
|
|
695
|
+
acceptance_criteria: "acceptance_criteria",
|
|
696
|
+
"acceptance-criteria": "acceptance_criteria",
|
|
697
|
+
estimated_minutes: "estimated_minutes",
|
|
698
|
+
"estimated-minutes": "estimated_minutes",
|
|
699
|
+
estimate: "estimated_minutes",
|
|
700
|
+
close_reason: "close_reason",
|
|
701
|
+
"close-reason": "close_reason",
|
|
702
|
+
reviewer: "reviewer",
|
|
703
|
+
risk: "risk",
|
|
704
|
+
confidence: "confidence",
|
|
705
|
+
sprint: "sprint",
|
|
706
|
+
release: "release"
|
|
707
|
+
};
|
|
708
|
+
var METADATA_REQUIRED_FIELD_OPTIONS = [
|
|
709
|
+
"author",
|
|
710
|
+
"acceptance_criteria",
|
|
711
|
+
"estimated_minutes",
|
|
712
|
+
"close_reason",
|
|
713
|
+
"reviewer",
|
|
714
|
+
"risk",
|
|
715
|
+
"confidence",
|
|
716
|
+
"sprint",
|
|
717
|
+
"release"
|
|
718
|
+
];
|
|
719
|
+
function normalizeMetadataRequiredFields(values, clearCriteria) {
|
|
720
|
+
const normalized = [...new Set((values ?? []).map((value) => value.trim()).filter((value) => value.length > 0))];
|
|
721
|
+
if (clearCriteria) {
|
|
722
|
+
if (normalized.length > 0) {
|
|
723
|
+
throw new PmCliError("Config set metadata-required-fields cannot combine --clear-criteria with --criterion values", EXIT_CODE.USAGE);
|
|
724
|
+
}
|
|
725
|
+
return [];
|
|
726
|
+
}
|
|
727
|
+
if (normalized.length === 0) {
|
|
728
|
+
throw new PmCliError("Config set metadata-required-fields requires at least one --criterion value (or --clear-criteria to clear)", EXIT_CODE.USAGE);
|
|
729
|
+
}
|
|
730
|
+
const lowered = normalized.map((value) => value.toLowerCase().replaceAll("-", "_"));
|
|
731
|
+
const unsupported = lowered.filter((value) => METADATA_REQUIRED_FIELD_ALIAS_MAP[value] === void 0);
|
|
732
|
+
if (unsupported.length > 0) {
|
|
733
|
+
throw new PmCliError(`Config set metadata-required-fields received unsupported values: ${unsupported.join(", ")}. Supported values: ${METADATA_REQUIRED_FIELD_OPTIONS.join(", ")}`, EXIT_CODE.USAGE);
|
|
734
|
+
}
|
|
735
|
+
return [...new Set(lowered.map((value) => METADATA_REQUIRED_FIELD_ALIAS_MAP[value]))].sort((left, right) => left.localeCompare(right));
|
|
736
|
+
}
|
|
737
|
+
function normalizeLifecyclePatternCriteria(key, values, clearCriteria) {
|
|
738
|
+
const normalized = [...new Set((values ?? []).map((value) => value.trim().toLowerCase()).filter((value) => value.length > 0))].sort((left, right) => left.localeCompare(right));
|
|
739
|
+
if (clearCriteria) {
|
|
740
|
+
if (normalized.length > 0) {
|
|
741
|
+
throw new PmCliError(`Config set ${CONFIG_KEY_ALIASES[key][0]} cannot combine --clear-criteria with --criterion values`, EXIT_CODE.USAGE);
|
|
742
|
+
}
|
|
743
|
+
return [];
|
|
744
|
+
}
|
|
745
|
+
if (normalized.length === 0) {
|
|
746
|
+
throw new PmCliError(`Config set ${CONFIG_KEY_ALIASES[key][0]} requires at least one --criterion value (or --clear-criteria to clear)`, EXIT_CODE.USAGE);
|
|
747
|
+
}
|
|
748
|
+
return normalized;
|
|
749
|
+
}
|
|
750
|
+
function normalizeWarnings(values) {
|
|
751
|
+
return [...new Set(values)].sort((left, right) => left.localeCompare(right));
|
|
752
|
+
}
|
|
753
|
+
function normalizeKeyForAction(action, value) {
|
|
754
|
+
if (action === "list" || action === "export") {
|
|
755
|
+
if (typeof value === "string" && value.trim().length > 0) {
|
|
756
|
+
throw new PmCliError(`Config action "${action}" does not accept <key>`, EXIT_CODE.USAGE);
|
|
757
|
+
}
|
|
758
|
+
return void 0;
|
|
759
|
+
}
|
|
760
|
+
if (typeof value !== "string" || value.trim().length === 0) {
|
|
761
|
+
throw new PmCliError(`Config action "${action}" requires <key>`, EXIT_CODE.USAGE);
|
|
762
|
+
}
|
|
763
|
+
return normalizeKey(value);
|
|
764
|
+
}
|
|
765
|
+
function readConfigValue(settings, key) {
|
|
766
|
+
if (key === "item_format") {
|
|
767
|
+
return settings.item_format;
|
|
768
|
+
}
|
|
769
|
+
if (key === "history_missing_stream_policy") {
|
|
770
|
+
return settings.history.missing_stream;
|
|
771
|
+
}
|
|
772
|
+
if (key === "sprint_release_format_policy") {
|
|
773
|
+
return settings.validation.sprint_release_format;
|
|
774
|
+
}
|
|
775
|
+
if (key === "parent_reference_policy") {
|
|
776
|
+
return settings.validation.parent_reference;
|
|
777
|
+
}
|
|
778
|
+
if (key === "metadata_validation_profile") {
|
|
779
|
+
return settings.validation.metadata_profile;
|
|
780
|
+
}
|
|
781
|
+
if (key === "metadata_required_fields") {
|
|
782
|
+
return [...settings.validation.metadata_required_fields];
|
|
783
|
+
}
|
|
784
|
+
if (key === "lifecycle_stale_blocker_reason_patterns") {
|
|
785
|
+
return [...settings.validation.lifecycle_stale_blocker_reason_patterns];
|
|
786
|
+
}
|
|
787
|
+
if (key === "lifecycle_closure_like_blocked_reason_patterns") {
|
|
788
|
+
return [...settings.validation.lifecycle_closure_like_blocked_reason_patterns];
|
|
789
|
+
}
|
|
790
|
+
if (key === "lifecycle_closure_like_resolution_patterns") {
|
|
791
|
+
return [...settings.validation.lifecycle_closure_like_resolution_patterns];
|
|
792
|
+
}
|
|
793
|
+
if (key === "lifecycle_closure_like_actual_result_patterns") {
|
|
794
|
+
return [...settings.validation.lifecycle_closure_like_actual_result_patterns];
|
|
795
|
+
}
|
|
796
|
+
if (key === "governance_preset") {
|
|
797
|
+
return settings.governance.preset;
|
|
798
|
+
}
|
|
799
|
+
if (key === "governance_ownership_enforcement") {
|
|
800
|
+
return settings.governance.ownership_enforcement;
|
|
801
|
+
}
|
|
802
|
+
if (key === "governance_create_mode_default") {
|
|
803
|
+
return settings.governance.create_mode_default;
|
|
804
|
+
}
|
|
805
|
+
if (key === "governance_close_validation_default") {
|
|
806
|
+
return settings.governance.close_validation_default;
|
|
807
|
+
}
|
|
808
|
+
if (key === "governance_create_default_type") {
|
|
809
|
+
return settings.governance.create_default_type ?? "";
|
|
810
|
+
}
|
|
811
|
+
if (key === "governance_workflow_enforcement") {
|
|
812
|
+
return settings.governance.workflow_enforcement ?? "off";
|
|
813
|
+
}
|
|
814
|
+
if (key === "governance_parent_reference_policy") {
|
|
815
|
+
return settings.governance.parent_reference;
|
|
816
|
+
}
|
|
817
|
+
if (key === "governance_metadata_validation_profile") {
|
|
818
|
+
return settings.governance.metadata_profile;
|
|
819
|
+
}
|
|
820
|
+
if (key === "governance_force_required_for_stale_lock") {
|
|
821
|
+
return settings.governance.force_required_for_stale_lock ? "enabled" : "disabled";
|
|
822
|
+
}
|
|
823
|
+
if (key === "test_result_tracking") {
|
|
824
|
+
return settings.testing.record_results_to_items ? "enabled" : "disabled";
|
|
825
|
+
}
|
|
826
|
+
if (key === "telemetry_tracking") {
|
|
827
|
+
return settings.telemetry.enabled ? "enabled" : "disabled";
|
|
828
|
+
}
|
|
829
|
+
if (key === "context") {
|
|
830
|
+
return {
|
|
831
|
+
default_depth: settings.context.default_depth,
|
|
832
|
+
activity_limit: settings.context.activity_limit,
|
|
833
|
+
stale_threshold_days: settings.context.stale_threshold_days,
|
|
834
|
+
sections: { ...settings.context.sections }
|
|
835
|
+
};
|
|
836
|
+
}
|
|
837
|
+
return [...settings.workflow.definition_of_done];
|
|
838
|
+
}
|
|
839
|
+
function withWarnings(result, warnings) {
|
|
840
|
+
if (warnings.length === 0) {
|
|
841
|
+
return result;
|
|
842
|
+
}
|
|
843
|
+
return {
|
|
844
|
+
...result,
|
|
845
|
+
warnings
|
|
846
|
+
};
|
|
847
|
+
}
|
|
848
|
+
async function resolveSettingsTarget(scope, global2) {
|
|
849
|
+
const cwd = process.cwd();
|
|
850
|
+
const pmRoot = scope === "project" ? resolvePmRoot(cwd, global2.path) : resolveGlobalPmRoot(cwd);
|
|
851
|
+
const settingsPath = getSettingsPath(pmRoot);
|
|
852
|
+
if (scope === "project" && !await pathExists(settingsPath)) {
|
|
853
|
+
throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
|
|
854
|
+
}
|
|
855
|
+
return { pmRoot, settingsPath };
|
|
856
|
+
}
|
|
857
|
+
function parseSectionToggle(raw) {
|
|
858
|
+
if (raw === void 0)
|
|
859
|
+
return void 0;
|
|
860
|
+
const normalized = raw.trim().toLowerCase();
|
|
861
|
+
if (normalized === "true" || normalized === "enabled" || normalized === "on" || normalized === "1")
|
|
862
|
+
return true;
|
|
863
|
+
if (normalized === "false" || normalized === "disabled" || normalized === "off" || normalized === "0")
|
|
864
|
+
return false;
|
|
865
|
+
throw new PmCliError(`Context section toggle must be true|false|enabled|disabled, got "${raw}"`, EXIT_CODE.USAGE);
|
|
866
|
+
}
|
|
867
|
+
async function applyContextConfig(settings, options, target, scope, warnings) {
|
|
868
|
+
let changed = false;
|
|
869
|
+
const ctx = settings.context;
|
|
870
|
+
if (options.defaultDepth !== void 0) {
|
|
871
|
+
const normalized = options.defaultDepth.trim().toLowerCase();
|
|
872
|
+
if (!CONTEXT_DEPTH_VALUES.includes(normalized)) {
|
|
873
|
+
throw new PmCliError(`Context --default-depth must be one of ${CONTEXT_DEPTH_VALUES.join("|")}`, EXIT_CODE.USAGE);
|
|
874
|
+
}
|
|
875
|
+
if (ctx.default_depth !== normalized) {
|
|
876
|
+
ctx.default_depth = normalized;
|
|
877
|
+
changed = true;
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
if (options.activityLimit !== void 0) {
|
|
881
|
+
const parsed = parseInt(options.activityLimit.trim(), 10);
|
|
882
|
+
if (isNaN(parsed) || parsed <= 0) {
|
|
883
|
+
throw new PmCliError("Context --activity-limit must be a positive integer", EXIT_CODE.USAGE);
|
|
884
|
+
}
|
|
885
|
+
if (ctx.activity_limit !== parsed) {
|
|
886
|
+
ctx.activity_limit = parsed;
|
|
887
|
+
changed = true;
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
if (options.staleThresholdDays !== void 0) {
|
|
891
|
+
const parsed = parseInt(options.staleThresholdDays.trim(), 10);
|
|
892
|
+
if (isNaN(parsed) || parsed <= 0) {
|
|
893
|
+
throw new PmCliError("Context --stale-threshold-days must be a positive integer", EXIT_CODE.USAGE);
|
|
894
|
+
}
|
|
895
|
+
if (ctx.stale_threshold_days !== parsed) {
|
|
896
|
+
ctx.stale_threshold_days = parsed;
|
|
897
|
+
changed = true;
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
const sectionToggles = [
|
|
901
|
+
["hierarchy", options.sectionHierarchy],
|
|
902
|
+
["activity", options.sectionActivity],
|
|
903
|
+
["progress", options.sectionProgress],
|
|
904
|
+
["blockers", options.sectionBlockers],
|
|
905
|
+
["files", options.sectionFiles],
|
|
906
|
+
["workload", options.sectionWorkload],
|
|
907
|
+
["staleness", options.sectionStaleness],
|
|
908
|
+
["tests", options.sectionTests]
|
|
909
|
+
];
|
|
910
|
+
for (const [sectionName, rawValue] of sectionToggles) {
|
|
911
|
+
const toggle = parseSectionToggle(rawValue);
|
|
912
|
+
if (toggle !== void 0) {
|
|
913
|
+
const key = sectionName;
|
|
914
|
+
if (ctx.sections[key] !== toggle) {
|
|
915
|
+
ctx.sections[key] = toggle;
|
|
916
|
+
changed = true;
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
if (changed) {
|
|
921
|
+
await writeSettings(target.pmRoot, settings, "config:set:context");
|
|
922
|
+
}
|
|
923
|
+
return withWarnings({
|
|
924
|
+
scope,
|
|
925
|
+
key: "context",
|
|
926
|
+
context_settings: {
|
|
927
|
+
default_depth: ctx.default_depth,
|
|
928
|
+
activity_limit: ctx.activity_limit,
|
|
929
|
+
stale_threshold_days: ctx.stale_threshold_days,
|
|
930
|
+
sections: { ...ctx.sections }
|
|
931
|
+
},
|
|
932
|
+
settings_path: target.settingsPath,
|
|
933
|
+
changed
|
|
934
|
+
}, warnings);
|
|
935
|
+
}
|
|
936
|
+
function applyPositionalValue(action, keyValue, normalizedKey, nestedSetting, valueValue, options) {
|
|
937
|
+
if (valueValue === void 0) {
|
|
938
|
+
return options;
|
|
939
|
+
}
|
|
940
|
+
if (action !== "set") {
|
|
941
|
+
throw new PmCliError(`Config action "${action}" does not accept a positional value. Only "set" takes <value>.`, EXIT_CODE.USAGE);
|
|
942
|
+
}
|
|
943
|
+
if (typeof keyValue !== "string" || keyValue.trim().length === 0) {
|
|
944
|
+
throw new PmCliError('Config action "set" requires <key> before a positional <value>.', EXIT_CODE.USAGE);
|
|
945
|
+
}
|
|
946
|
+
if (nestedSetting) {
|
|
947
|
+
if (options.value !== void 0 && valueValue !== void 0 && options.value !== valueValue) {
|
|
948
|
+
throw new PmCliError(`Config set ${keyValue} received both positional value "${valueValue}" and --value "${options.value}". Pass only one.`, EXIT_CODE.USAGE);
|
|
949
|
+
}
|
|
950
|
+
return { ...options, value: valueValue ?? options.value };
|
|
951
|
+
}
|
|
952
|
+
const routed = resolveConfigPositionalValue(normalizedKey ?? keyValue, valueValue);
|
|
953
|
+
if (!routed.routable) {
|
|
954
|
+
throw new PmCliError(routed.reason, EXIT_CODE.USAGE);
|
|
955
|
+
}
|
|
956
|
+
if (routed.flag === "criterion") {
|
|
957
|
+
if (options.criterion !== void 0 && options.criterion.length > 0) {
|
|
958
|
+
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);
|
|
959
|
+
}
|
|
960
|
+
return { ...options, criterion: routed.values };
|
|
961
|
+
}
|
|
962
|
+
if (routed.flag === "format") {
|
|
963
|
+
if (options.format !== void 0 && normalizeItemFormat(options.format) !== normalizeItemFormat(routed.value)) {
|
|
964
|
+
throw new PmCliError(`Config set ${keyValue} received both positional value "${valueValue}" and --format "${options.format}". Pass only one.`, EXIT_CODE.USAGE);
|
|
965
|
+
}
|
|
966
|
+
return { ...options, format: routed.value };
|
|
967
|
+
}
|
|
968
|
+
if (options.policy !== void 0 && normalizePolicyForConflict(normalizedKey, options.policy) !== normalizePolicyForConflict(normalizedKey, routed.value)) {
|
|
969
|
+
throw new PmCliError(`Config set ${keyValue} received both positional value "${valueValue}" and --policy "${options.policy}". Pass only one.`, EXIT_CODE.USAGE);
|
|
970
|
+
}
|
|
971
|
+
return { ...options, policy: routed.value };
|
|
972
|
+
}
|
|
973
|
+
async function runConfig(scopeValue, actionValue, keyValue, options, global2, valueValue) {
|
|
974
|
+
const scope = normalizeScope(scopeValue);
|
|
975
|
+
const action = normalizeAction(actionValue);
|
|
976
|
+
const nestedSetting = action === "get" || action === "set" ? resolveNestedSettingDescriptor(keyValue) : void 0;
|
|
977
|
+
const key = nestedSetting ? void 0 : normalizeKeyForAction(action, keyValue);
|
|
978
|
+
options = applyPositionalValue(action, keyValue, key, nestedSetting, valueValue, options);
|
|
979
|
+
const target = await resolveSettingsTarget(scope, global2);
|
|
980
|
+
const { settings, metadata, warnings: settingsReadWarnings } = await readSettingsWithMetadata(target.pmRoot);
|
|
981
|
+
const warnings = normalizeWarnings(settingsReadWarnings);
|
|
982
|
+
if (nestedSetting) {
|
|
983
|
+
if (action === "get") {
|
|
984
|
+
const currentValue = readNestedSettingValue(settings, nestedSetting);
|
|
985
|
+
return withWarnings({
|
|
986
|
+
scope,
|
|
987
|
+
key: nestedSetting.key,
|
|
988
|
+
nested_setting: {
|
|
989
|
+
key: nestedSetting.key,
|
|
990
|
+
path: nestedSetting.path,
|
|
991
|
+
kind: nestedSetting.kind,
|
|
992
|
+
value: currentValue
|
|
993
|
+
},
|
|
994
|
+
settings_path: target.settingsPath,
|
|
995
|
+
changed: false
|
|
996
|
+
}, warnings);
|
|
997
|
+
}
|
|
998
|
+
const rawValue = options.value;
|
|
999
|
+
if (typeof rawValue !== "string") {
|
|
1000
|
+
throw new PmCliError(`Config set ${nestedSetting.key} requires a value. Pass it positionally (\`pm config ${scope} set ${nestedSetting.key} <value>\`) or via --value.`, EXIT_CODE.USAGE);
|
|
1001
|
+
}
|
|
1002
|
+
const parsed = parseNestedSettingValue(nestedSetting, rawValue);
|
|
1003
|
+
if (!parsed.ok) {
|
|
1004
|
+
throw new PmCliError(parsed.error.message, EXIT_CODE.USAGE);
|
|
1005
|
+
}
|
|
1006
|
+
const changed2 = writeNestedSettingValue(settings, nestedSetting, parsed.parsed.value);
|
|
1007
|
+
if (changed2) {
|
|
1008
|
+
await writeSettings(target.pmRoot, settings, `config:set:${nestedSetting.path}`);
|
|
1009
|
+
}
|
|
1010
|
+
return withWarnings({
|
|
1011
|
+
scope,
|
|
1012
|
+
key: nestedSetting.key,
|
|
1013
|
+
nested_setting: {
|
|
1014
|
+
key: nestedSetting.key,
|
|
1015
|
+
path: nestedSetting.path,
|
|
1016
|
+
kind: nestedSetting.kind,
|
|
1017
|
+
value: parsed.parsed.value
|
|
1018
|
+
},
|
|
1019
|
+
settings_path: target.settingsPath,
|
|
1020
|
+
changed: changed2
|
|
1021
|
+
}, warnings);
|
|
1022
|
+
}
|
|
1023
|
+
if (action === "list") {
|
|
1024
|
+
const keys = Object.keys(CONFIG_KEY_ALIASES).map((candidate) => ({
|
|
1025
|
+
key: candidate,
|
|
1026
|
+
aliases: CONFIG_KEY_ALIASES[candidate],
|
|
1027
|
+
value_kind: candidate === "context" ? "object" : isCriteriaConfigKey(candidate) ? "string_array" : "enum",
|
|
1028
|
+
set_flags: candidate === "context" ? ["--default-depth", "--activity-limit", "--stale-threshold-days", "--section-<name>"] : isCriteriaConfigKey(candidate) ? ["--criterion", "--clear-criteria"] : candidate === "item_format" ? ["--format"] : ["--policy"],
|
|
1029
|
+
summary: CONFIG_KEY_SUMMARIES[candidate],
|
|
1030
|
+
value: readConfigValue(settings, candidate)
|
|
1031
|
+
}));
|
|
1032
|
+
const nestedSettings = NESTED_SETTING_DESCRIPTORS.map((descriptor) => ({
|
|
1033
|
+
key: descriptor.key,
|
|
1034
|
+
path: descriptor.path,
|
|
1035
|
+
kind: descriptor.kind,
|
|
1036
|
+
value: readNestedSettingValue(settings, descriptor)
|
|
1037
|
+
}));
|
|
1038
|
+
return withWarnings({
|
|
1039
|
+
scope,
|
|
1040
|
+
keys,
|
|
1041
|
+
nested_settings: nestedSettings,
|
|
1042
|
+
count: keys.length,
|
|
1043
|
+
settings_path: target.settingsPath,
|
|
1044
|
+
changed: false
|
|
1045
|
+
}, warnings);
|
|
1046
|
+
}
|
|
1047
|
+
if (action === "export") {
|
|
1048
|
+
const values = {
|
|
1049
|
+
definition_of_done: readConfigValue(settings, "definition_of_done"),
|
|
1050
|
+
item_format: readConfigValue(settings, "item_format"),
|
|
1051
|
+
history_missing_stream_policy: readConfigValue(settings, "history_missing_stream_policy"),
|
|
1052
|
+
sprint_release_format_policy: readConfigValue(settings, "sprint_release_format_policy"),
|
|
1053
|
+
parent_reference_policy: readConfigValue(settings, "parent_reference_policy"),
|
|
1054
|
+
metadata_validation_profile: readConfigValue(settings, "metadata_validation_profile"),
|
|
1055
|
+
metadata_required_fields: readConfigValue(settings, "metadata_required_fields"),
|
|
1056
|
+
lifecycle_stale_blocker_reason_patterns: readConfigValue(settings, "lifecycle_stale_blocker_reason_patterns"),
|
|
1057
|
+
lifecycle_closure_like_blocked_reason_patterns: readConfigValue(settings, "lifecycle_closure_like_blocked_reason_patterns"),
|
|
1058
|
+
lifecycle_closure_like_resolution_patterns: readConfigValue(settings, "lifecycle_closure_like_resolution_patterns"),
|
|
1059
|
+
lifecycle_closure_like_actual_result_patterns: readConfigValue(settings, "lifecycle_closure_like_actual_result_patterns"),
|
|
1060
|
+
governance_preset: readConfigValue(settings, "governance_preset"),
|
|
1061
|
+
governance_ownership_enforcement: readConfigValue(settings, "governance_ownership_enforcement"),
|
|
1062
|
+
governance_create_mode_default: readConfigValue(settings, "governance_create_mode_default"),
|
|
1063
|
+
governance_close_validation_default: readConfigValue(settings, "governance_close_validation_default"),
|
|
1064
|
+
governance_create_default_type: readConfigValue(settings, "governance_create_default_type"),
|
|
1065
|
+
governance_workflow_enforcement: readConfigValue(settings, "governance_workflow_enforcement"),
|
|
1066
|
+
governance_parent_reference_policy: readConfigValue(settings, "governance_parent_reference_policy"),
|
|
1067
|
+
governance_metadata_validation_profile: readConfigValue(settings, "governance_metadata_validation_profile"),
|
|
1068
|
+
governance_force_required_for_stale_lock: readConfigValue(settings, "governance_force_required_for_stale_lock"),
|
|
1069
|
+
test_result_tracking: readConfigValue(settings, "test_result_tracking"),
|
|
1070
|
+
telemetry_tracking: readConfigValue(settings, "telemetry_tracking"),
|
|
1071
|
+
context: readConfigValue(settings, "context")
|
|
1072
|
+
};
|
|
1073
|
+
return withWarnings({
|
|
1074
|
+
scope,
|
|
1075
|
+
values,
|
|
1076
|
+
settings_path: target.settingsPath,
|
|
1077
|
+
changed: false
|
|
1078
|
+
}, warnings);
|
|
1079
|
+
}
|
|
1080
|
+
if (action === "get") {
|
|
1081
|
+
if (!key) {
|
|
1082
|
+
throw new PmCliError('Config action "get" requires <key>', EXIT_CODE.USAGE);
|
|
1083
|
+
}
|
|
1084
|
+
if (key === "item_format") {
|
|
1085
|
+
return withWarnings({
|
|
1086
|
+
scope,
|
|
1087
|
+
key,
|
|
1088
|
+
format: settings.item_format,
|
|
1089
|
+
has_explicit_item_format: metadata.has_explicit_item_format,
|
|
1090
|
+
settings_path: target.settingsPath,
|
|
1091
|
+
changed: false
|
|
1092
|
+
}, warnings);
|
|
1093
|
+
}
|
|
1094
|
+
if (key === "history_missing_stream_policy") {
|
|
1095
|
+
return withWarnings({
|
|
1096
|
+
scope,
|
|
1097
|
+
key,
|
|
1098
|
+
policy: settings.history.missing_stream,
|
|
1099
|
+
settings_path: target.settingsPath,
|
|
1100
|
+
changed: false
|
|
1101
|
+
}, warnings);
|
|
1102
|
+
}
|
|
1103
|
+
if (key === "sprint_release_format_policy") {
|
|
1104
|
+
return withWarnings({
|
|
1105
|
+
scope,
|
|
1106
|
+
key,
|
|
1107
|
+
policy: settings.validation.sprint_release_format,
|
|
1108
|
+
settings_path: target.settingsPath,
|
|
1109
|
+
changed: false
|
|
1110
|
+
}, warnings);
|
|
1111
|
+
}
|
|
1112
|
+
if (key === "parent_reference_policy") {
|
|
1113
|
+
return withWarnings({
|
|
1114
|
+
scope,
|
|
1115
|
+
key,
|
|
1116
|
+
policy: settings.validation.parent_reference,
|
|
1117
|
+
settings_path: target.settingsPath,
|
|
1118
|
+
changed: false
|
|
1119
|
+
}, warnings);
|
|
1120
|
+
}
|
|
1121
|
+
if (key === "metadata_validation_profile") {
|
|
1122
|
+
return withWarnings({
|
|
1123
|
+
scope,
|
|
1124
|
+
key,
|
|
1125
|
+
policy: settings.validation.metadata_profile,
|
|
1126
|
+
settings_path: target.settingsPath,
|
|
1127
|
+
changed: false
|
|
1128
|
+
}, warnings);
|
|
1129
|
+
}
|
|
1130
|
+
if (key === "metadata_required_fields") {
|
|
1131
|
+
return withWarnings({
|
|
1132
|
+
scope,
|
|
1133
|
+
key,
|
|
1134
|
+
criteria: [...settings.validation.metadata_required_fields],
|
|
1135
|
+
settings_path: target.settingsPath,
|
|
1136
|
+
changed: false
|
|
1137
|
+
}, warnings);
|
|
1138
|
+
}
|
|
1139
|
+
if (key === "lifecycle_stale_blocker_reason_patterns") {
|
|
1140
|
+
return withWarnings({
|
|
1141
|
+
scope,
|
|
1142
|
+
key,
|
|
1143
|
+
criteria: [...settings.validation.lifecycle_stale_blocker_reason_patterns],
|
|
1144
|
+
settings_path: target.settingsPath,
|
|
1145
|
+
changed: false
|
|
1146
|
+
}, warnings);
|
|
1147
|
+
}
|
|
1148
|
+
if (key === "lifecycle_closure_like_blocked_reason_patterns") {
|
|
1149
|
+
return withWarnings({
|
|
1150
|
+
scope,
|
|
1151
|
+
key,
|
|
1152
|
+
criteria: [...settings.validation.lifecycle_closure_like_blocked_reason_patterns],
|
|
1153
|
+
settings_path: target.settingsPath,
|
|
1154
|
+
changed: false
|
|
1155
|
+
}, warnings);
|
|
1156
|
+
}
|
|
1157
|
+
if (key === "lifecycle_closure_like_resolution_patterns") {
|
|
1158
|
+
return withWarnings({
|
|
1159
|
+
scope,
|
|
1160
|
+
key,
|
|
1161
|
+
criteria: [...settings.validation.lifecycle_closure_like_resolution_patterns],
|
|
1162
|
+
settings_path: target.settingsPath,
|
|
1163
|
+
changed: false
|
|
1164
|
+
}, warnings);
|
|
1165
|
+
}
|
|
1166
|
+
if (key === "lifecycle_closure_like_actual_result_patterns") {
|
|
1167
|
+
return withWarnings({
|
|
1168
|
+
scope,
|
|
1169
|
+
key,
|
|
1170
|
+
criteria: [...settings.validation.lifecycle_closure_like_actual_result_patterns],
|
|
1171
|
+
settings_path: target.settingsPath,
|
|
1172
|
+
changed: false
|
|
1173
|
+
}, warnings);
|
|
1174
|
+
}
|
|
1175
|
+
if (key === "governance_preset") {
|
|
1176
|
+
return withWarnings({
|
|
1177
|
+
scope,
|
|
1178
|
+
key,
|
|
1179
|
+
policy: settings.governance.preset,
|
|
1180
|
+
settings_path: target.settingsPath,
|
|
1181
|
+
changed: false
|
|
1182
|
+
}, warnings);
|
|
1183
|
+
}
|
|
1184
|
+
if (key === "governance_ownership_enforcement") {
|
|
1185
|
+
return withWarnings({
|
|
1186
|
+
scope,
|
|
1187
|
+
key,
|
|
1188
|
+
policy: settings.governance.ownership_enforcement,
|
|
1189
|
+
settings_path: target.settingsPath,
|
|
1190
|
+
changed: false
|
|
1191
|
+
}, warnings);
|
|
1192
|
+
}
|
|
1193
|
+
if (key === "governance_create_mode_default") {
|
|
1194
|
+
return withWarnings({
|
|
1195
|
+
scope,
|
|
1196
|
+
key,
|
|
1197
|
+
policy: settings.governance.create_mode_default,
|
|
1198
|
+
settings_path: target.settingsPath,
|
|
1199
|
+
changed: false
|
|
1200
|
+
}, warnings);
|
|
1201
|
+
}
|
|
1202
|
+
if (key === "governance_close_validation_default") {
|
|
1203
|
+
return withWarnings({
|
|
1204
|
+
scope,
|
|
1205
|
+
key,
|
|
1206
|
+
policy: settings.governance.close_validation_default,
|
|
1207
|
+
settings_path: target.settingsPath,
|
|
1208
|
+
changed: false
|
|
1209
|
+
}, warnings);
|
|
1210
|
+
}
|
|
1211
|
+
if (key === "governance_create_default_type") {
|
|
1212
|
+
return withWarnings({
|
|
1213
|
+
scope,
|
|
1214
|
+
key,
|
|
1215
|
+
policy: settings.governance.create_default_type ?? "",
|
|
1216
|
+
settings_path: target.settingsPath,
|
|
1217
|
+
changed: false
|
|
1218
|
+
}, warnings);
|
|
1219
|
+
}
|
|
1220
|
+
if (key === "governance_workflow_enforcement") {
|
|
1221
|
+
return withWarnings({
|
|
1222
|
+
scope,
|
|
1223
|
+
key,
|
|
1224
|
+
policy: settings.governance.workflow_enforcement ?? "off",
|
|
1225
|
+
settings_path: target.settingsPath,
|
|
1226
|
+
changed: false
|
|
1227
|
+
}, warnings);
|
|
1228
|
+
}
|
|
1229
|
+
if (key === "governance_parent_reference_policy") {
|
|
1230
|
+
return withWarnings({
|
|
1231
|
+
scope,
|
|
1232
|
+
key,
|
|
1233
|
+
policy: settings.governance.parent_reference,
|
|
1234
|
+
settings_path: target.settingsPath,
|
|
1235
|
+
changed: false
|
|
1236
|
+
}, warnings);
|
|
1237
|
+
}
|
|
1238
|
+
if (key === "governance_metadata_validation_profile") {
|
|
1239
|
+
return withWarnings({
|
|
1240
|
+
scope,
|
|
1241
|
+
key,
|
|
1242
|
+
policy: settings.governance.metadata_profile,
|
|
1243
|
+
settings_path: target.settingsPath,
|
|
1244
|
+
changed: false
|
|
1245
|
+
}, warnings);
|
|
1246
|
+
}
|
|
1247
|
+
if (key === "governance_force_required_for_stale_lock") {
|
|
1248
|
+
return withWarnings({
|
|
1249
|
+
scope,
|
|
1250
|
+
key,
|
|
1251
|
+
policy: settings.governance.force_required_for_stale_lock ? "enabled" : "disabled",
|
|
1252
|
+
settings_path: target.settingsPath,
|
|
1253
|
+
changed: false
|
|
1254
|
+
}, warnings);
|
|
1255
|
+
}
|
|
1256
|
+
if (key === "test_result_tracking") {
|
|
1257
|
+
return withWarnings({
|
|
1258
|
+
scope,
|
|
1259
|
+
key,
|
|
1260
|
+
policy: settings.testing.record_results_to_items ? "enabled" : "disabled",
|
|
1261
|
+
settings_path: target.settingsPath,
|
|
1262
|
+
changed: false
|
|
1263
|
+
}, warnings);
|
|
1264
|
+
}
|
|
1265
|
+
if (key === "telemetry_tracking") {
|
|
1266
|
+
return withWarnings({
|
|
1267
|
+
scope,
|
|
1268
|
+
key,
|
|
1269
|
+
policy: settings.telemetry.enabled ? "enabled" : "disabled",
|
|
1270
|
+
settings_path: target.settingsPath,
|
|
1271
|
+
changed: false
|
|
1272
|
+
}, warnings);
|
|
1273
|
+
}
|
|
1274
|
+
if (key === "context") {
|
|
1275
|
+
return withWarnings({
|
|
1276
|
+
scope,
|
|
1277
|
+
key,
|
|
1278
|
+
context_settings: {
|
|
1279
|
+
default_depth: settings.context.default_depth,
|
|
1280
|
+
activity_limit: settings.context.activity_limit,
|
|
1281
|
+
stale_threshold_days: settings.context.stale_threshold_days,
|
|
1282
|
+
sections: { ...settings.context.sections }
|
|
1283
|
+
},
|
|
1284
|
+
settings_path: target.settingsPath,
|
|
1285
|
+
changed: false
|
|
1286
|
+
}, warnings);
|
|
1287
|
+
}
|
|
1288
|
+
return withWarnings({
|
|
1289
|
+
scope,
|
|
1290
|
+
key,
|
|
1291
|
+
criteria: [...settings.workflow.definition_of_done],
|
|
1292
|
+
settings_path: target.settingsPath,
|
|
1293
|
+
changed: false
|
|
1294
|
+
}, warnings);
|
|
1295
|
+
}
|
|
1296
|
+
if (!key) {
|
|
1297
|
+
throw new PmCliError('Config action "set" requires <key>', EXIT_CODE.USAGE);
|
|
1298
|
+
}
|
|
1299
|
+
if (options.clearCriteria === true && !isCriteriaConfigKey(key)) {
|
|
1300
|
+
throw new PmCliError("--clear-criteria is only supported with config set criteria-list keys", EXIT_CODE.USAGE);
|
|
1301
|
+
}
|
|
1302
|
+
if (key === "item_format") {
|
|
1303
|
+
const nextFormat = normalizeItemFormat(options.format);
|
|
1304
|
+
const changed2 = settings.item_format !== nextFormat || !metadata.has_explicit_item_format;
|
|
1305
|
+
let migration = void 0;
|
|
1306
|
+
if (changed2) {
|
|
1307
|
+
const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());
|
|
1308
|
+
const migrated = await migrateItemFilesToFormat(target.pmRoot, nextFormat, "config:set:item_format:migrate", typeRegistry.type_to_folder, settings.schema);
|
|
1309
|
+
migration = {
|
|
1310
|
+
target_format: migrated.target_format,
|
|
1311
|
+
scanned: migrated.scanned,
|
|
1312
|
+
migrated: migrated.migrated,
|
|
1313
|
+
removed: migrated.removed,
|
|
1314
|
+
warnings: migrated.warnings
|
|
1315
|
+
};
|
|
1316
|
+
settings.item_format = nextFormat;
|
|
1317
|
+
await writeSettings(target.pmRoot, settings, "config:set:item_format");
|
|
1318
|
+
}
|
|
1319
|
+
return withWarnings({
|
|
1320
|
+
scope,
|
|
1321
|
+
key,
|
|
1322
|
+
format: settings.item_format,
|
|
1323
|
+
has_explicit_item_format: true,
|
|
1324
|
+
migration,
|
|
1325
|
+
settings_path: target.settingsPath,
|
|
1326
|
+
changed: changed2
|
|
1327
|
+
}, warnings);
|
|
1328
|
+
}
|
|
1329
|
+
if (key === "history_missing_stream_policy") {
|
|
1330
|
+
const nextPolicy = normalizeHistoryMissingStreamPolicy(options.policy);
|
|
1331
|
+
const changed2 = settings.history.missing_stream !== nextPolicy;
|
|
1332
|
+
settings.history.missing_stream = nextPolicy;
|
|
1333
|
+
if (changed2) {
|
|
1334
|
+
await writeSettings(target.pmRoot, settings, "config:set:history_missing_stream_policy");
|
|
1335
|
+
}
|
|
1336
|
+
return withWarnings({
|
|
1337
|
+
scope,
|
|
1338
|
+
key,
|
|
1339
|
+
policy: settings.history.missing_stream,
|
|
1340
|
+
settings_path: target.settingsPath,
|
|
1341
|
+
changed: changed2
|
|
1342
|
+
}, warnings);
|
|
1343
|
+
}
|
|
1344
|
+
if (key === "sprint_release_format_policy") {
|
|
1345
|
+
const nextPolicy = normalizeSprintReleaseFormatPolicy(options.policy);
|
|
1346
|
+
const changed2 = settings.validation.sprint_release_format !== nextPolicy;
|
|
1347
|
+
settings.validation.sprint_release_format = nextPolicy;
|
|
1348
|
+
if (changed2) {
|
|
1349
|
+
await writeSettings(target.pmRoot, settings, "config:set:sprint_release_format_policy");
|
|
1350
|
+
}
|
|
1351
|
+
return withWarnings({
|
|
1352
|
+
scope,
|
|
1353
|
+
key,
|
|
1354
|
+
policy: settings.validation.sprint_release_format,
|
|
1355
|
+
settings_path: target.settingsPath,
|
|
1356
|
+
changed: changed2
|
|
1357
|
+
}, warnings);
|
|
1358
|
+
}
|
|
1359
|
+
if (key === "parent_reference_policy") {
|
|
1360
|
+
const nextPolicy = normalizeParentReferencePolicy(options.policy);
|
|
1361
|
+
const changed2 = settings.validation.parent_reference !== nextPolicy || settings.governance.preset !== "custom" || settings.governance.parent_reference !== nextPolicy;
|
|
1362
|
+
settings.validation.parent_reference = nextPolicy;
|
|
1363
|
+
settings.governance.preset = "custom";
|
|
1364
|
+
settings.governance.parent_reference = nextPolicy;
|
|
1365
|
+
if (changed2) {
|
|
1366
|
+
await writeSettings(target.pmRoot, settings, "config:set:parent_reference_policy");
|
|
1367
|
+
}
|
|
1368
|
+
return withWarnings({
|
|
1369
|
+
scope,
|
|
1370
|
+
key,
|
|
1371
|
+
policy: settings.validation.parent_reference,
|
|
1372
|
+
settings_path: target.settingsPath,
|
|
1373
|
+
changed: changed2
|
|
1374
|
+
}, warnings);
|
|
1375
|
+
}
|
|
1376
|
+
if (key === "metadata_validation_profile") {
|
|
1377
|
+
const nextPolicy = normalizeValidateMetadataProfile(options.policy);
|
|
1378
|
+
const changed2 = settings.validation.metadata_profile !== nextPolicy || settings.governance.preset !== "custom" || settings.governance.metadata_profile !== nextPolicy;
|
|
1379
|
+
settings.validation.metadata_profile = nextPolicy;
|
|
1380
|
+
settings.governance.preset = "custom";
|
|
1381
|
+
settings.governance.metadata_profile = nextPolicy;
|
|
1382
|
+
if (changed2) {
|
|
1383
|
+
await writeSettings(target.pmRoot, settings, "config:set:metadata_validation_profile");
|
|
1384
|
+
}
|
|
1385
|
+
return withWarnings({
|
|
1386
|
+
scope,
|
|
1387
|
+
key,
|
|
1388
|
+
policy: settings.validation.metadata_profile,
|
|
1389
|
+
settings_path: target.settingsPath,
|
|
1390
|
+
changed: changed2
|
|
1391
|
+
}, warnings);
|
|
1392
|
+
}
|
|
1393
|
+
if (key === "metadata_required_fields") {
|
|
1394
|
+
const nextCriteria2 = normalizeMetadataRequiredFields(options.criterion, options.clearCriteria);
|
|
1395
|
+
const changed2 = nextCriteria2.length !== settings.validation.metadata_required_fields.length || nextCriteria2.some((value, index) => value !== settings.validation.metadata_required_fields[index]);
|
|
1396
|
+
settings.validation.metadata_required_fields = nextCriteria2;
|
|
1397
|
+
if (changed2) {
|
|
1398
|
+
await writeSettings(target.pmRoot, settings, "config:set:metadata_required_fields");
|
|
1399
|
+
}
|
|
1400
|
+
return withWarnings({
|
|
1401
|
+
scope,
|
|
1402
|
+
key,
|
|
1403
|
+
criteria: [...settings.validation.metadata_required_fields],
|
|
1404
|
+
settings_path: target.settingsPath,
|
|
1405
|
+
changed: changed2
|
|
1406
|
+
}, warnings);
|
|
1407
|
+
}
|
|
1408
|
+
if (key === "lifecycle_stale_blocker_reason_patterns") {
|
|
1409
|
+
const nextCriteria2 = normalizeLifecyclePatternCriteria(key, options.criterion, options.clearCriteria);
|
|
1410
|
+
const changed2 = nextCriteria2.length !== settings.validation.lifecycle_stale_blocker_reason_patterns.length || nextCriteria2.some((value, index) => value !== settings.validation.lifecycle_stale_blocker_reason_patterns[index]);
|
|
1411
|
+
settings.validation.lifecycle_stale_blocker_reason_patterns = nextCriteria2;
|
|
1412
|
+
if (changed2) {
|
|
1413
|
+
await writeSettings(target.pmRoot, settings, "config:set:lifecycle_stale_blocker_reason_patterns");
|
|
1414
|
+
}
|
|
1415
|
+
return withWarnings({
|
|
1416
|
+
scope,
|
|
1417
|
+
key,
|
|
1418
|
+
criteria: [...settings.validation.lifecycle_stale_blocker_reason_patterns],
|
|
1419
|
+
settings_path: target.settingsPath,
|
|
1420
|
+
changed: changed2
|
|
1421
|
+
}, warnings);
|
|
1422
|
+
}
|
|
1423
|
+
if (key === "lifecycle_closure_like_blocked_reason_patterns") {
|
|
1424
|
+
const nextCriteria2 = normalizeLifecyclePatternCriteria(key, options.criterion, options.clearCriteria);
|
|
1425
|
+
const changed2 = nextCriteria2.length !== settings.validation.lifecycle_closure_like_blocked_reason_patterns.length || nextCriteria2.some((value, index) => value !== settings.validation.lifecycle_closure_like_blocked_reason_patterns[index]);
|
|
1426
|
+
settings.validation.lifecycle_closure_like_blocked_reason_patterns = nextCriteria2;
|
|
1427
|
+
if (changed2) {
|
|
1428
|
+
await writeSettings(target.pmRoot, settings, "config:set:lifecycle_closure_like_blocked_reason_patterns");
|
|
1429
|
+
}
|
|
1430
|
+
return withWarnings({
|
|
1431
|
+
scope,
|
|
1432
|
+
key,
|
|
1433
|
+
criteria: [...settings.validation.lifecycle_closure_like_blocked_reason_patterns],
|
|
1434
|
+
settings_path: target.settingsPath,
|
|
1435
|
+
changed: changed2
|
|
1436
|
+
}, warnings);
|
|
1437
|
+
}
|
|
1438
|
+
if (key === "lifecycle_closure_like_resolution_patterns") {
|
|
1439
|
+
const nextCriteria2 = normalizeLifecyclePatternCriteria(key, options.criterion, options.clearCriteria);
|
|
1440
|
+
const changed2 = nextCriteria2.length !== settings.validation.lifecycle_closure_like_resolution_patterns.length || nextCriteria2.some((value, index) => value !== settings.validation.lifecycle_closure_like_resolution_patterns[index]);
|
|
1441
|
+
settings.validation.lifecycle_closure_like_resolution_patterns = nextCriteria2;
|
|
1442
|
+
if (changed2) {
|
|
1443
|
+
await writeSettings(target.pmRoot, settings, "config:set:lifecycle_closure_like_resolution_patterns");
|
|
1444
|
+
}
|
|
1445
|
+
return withWarnings({
|
|
1446
|
+
scope,
|
|
1447
|
+
key,
|
|
1448
|
+
criteria: [...settings.validation.lifecycle_closure_like_resolution_patterns],
|
|
1449
|
+
settings_path: target.settingsPath,
|
|
1450
|
+
changed: changed2
|
|
1451
|
+
}, warnings);
|
|
1452
|
+
}
|
|
1453
|
+
if (key === "lifecycle_closure_like_actual_result_patterns") {
|
|
1454
|
+
const nextCriteria2 = normalizeLifecyclePatternCriteria(key, options.criterion, options.clearCriteria);
|
|
1455
|
+
const changed2 = nextCriteria2.length !== settings.validation.lifecycle_closure_like_actual_result_patterns.length || nextCriteria2.some((value, index) => value !== settings.validation.lifecycle_closure_like_actual_result_patterns[index]);
|
|
1456
|
+
settings.validation.lifecycle_closure_like_actual_result_patterns = nextCriteria2;
|
|
1457
|
+
if (changed2) {
|
|
1458
|
+
await writeSettings(target.pmRoot, settings, "config:set:lifecycle_closure_like_actual_result_patterns");
|
|
1459
|
+
}
|
|
1460
|
+
return withWarnings({
|
|
1461
|
+
scope,
|
|
1462
|
+
key,
|
|
1463
|
+
criteria: [...settings.validation.lifecycle_closure_like_actual_result_patterns],
|
|
1464
|
+
settings_path: target.settingsPath,
|
|
1465
|
+
changed: changed2
|
|
1466
|
+
}, warnings);
|
|
1467
|
+
}
|
|
1468
|
+
if (key === "governance_preset") {
|
|
1469
|
+
const nextPolicy = normalizeGovernancePreset(options.policy);
|
|
1470
|
+
const changed2 = settings.governance.preset !== nextPolicy;
|
|
1471
|
+
settings.governance.preset = nextPolicy;
|
|
1472
|
+
if (changed2) {
|
|
1473
|
+
await writeSettings(target.pmRoot, settings, "config:set:governance_preset");
|
|
1474
|
+
}
|
|
1475
|
+
return withWarnings({
|
|
1476
|
+
scope,
|
|
1477
|
+
key,
|
|
1478
|
+
policy: settings.governance.preset,
|
|
1479
|
+
settings_path: target.settingsPath,
|
|
1480
|
+
changed: changed2
|
|
1481
|
+
}, warnings);
|
|
1482
|
+
}
|
|
1483
|
+
if (key === "governance_ownership_enforcement") {
|
|
1484
|
+
const nextPolicy = normalizeGovernanceOwnershipEnforcement(options.policy);
|
|
1485
|
+
const changed2 = settings.governance.preset !== "custom" || settings.governance.ownership_enforcement !== nextPolicy;
|
|
1486
|
+
settings.governance.preset = "custom";
|
|
1487
|
+
settings.governance.ownership_enforcement = nextPolicy;
|
|
1488
|
+
if (changed2) {
|
|
1489
|
+
await writeSettings(target.pmRoot, settings, "config:set:governance_ownership_enforcement");
|
|
1490
|
+
}
|
|
1491
|
+
return withWarnings({
|
|
1492
|
+
scope,
|
|
1493
|
+
key,
|
|
1494
|
+
policy: settings.governance.ownership_enforcement,
|
|
1495
|
+
settings_path: target.settingsPath,
|
|
1496
|
+
changed: changed2
|
|
1497
|
+
}, warnings);
|
|
1498
|
+
}
|
|
1499
|
+
if (key === "governance_create_mode_default") {
|
|
1500
|
+
const nextPolicy = normalizeGovernanceCreateModeDefault(options.policy);
|
|
1501
|
+
const changed2 = settings.governance.preset !== "custom" || settings.governance.create_mode_default !== nextPolicy;
|
|
1502
|
+
settings.governance.preset = "custom";
|
|
1503
|
+
settings.governance.create_mode_default = nextPolicy;
|
|
1504
|
+
if (changed2) {
|
|
1505
|
+
await writeSettings(target.pmRoot, settings, "config:set:governance_create_mode_default");
|
|
1506
|
+
}
|
|
1507
|
+
return withWarnings({
|
|
1508
|
+
scope,
|
|
1509
|
+
key,
|
|
1510
|
+
policy: settings.governance.create_mode_default,
|
|
1511
|
+
settings_path: target.settingsPath,
|
|
1512
|
+
changed: changed2
|
|
1513
|
+
}, warnings);
|
|
1514
|
+
}
|
|
1515
|
+
if (key === "governance_close_validation_default") {
|
|
1516
|
+
const nextPolicy = normalizeGovernanceCloseValidationDefault(options.policy);
|
|
1517
|
+
const changed2 = settings.governance.preset !== "custom" || settings.governance.close_validation_default !== nextPolicy;
|
|
1518
|
+
settings.governance.preset = "custom";
|
|
1519
|
+
settings.governance.close_validation_default = nextPolicy;
|
|
1520
|
+
if (changed2) {
|
|
1521
|
+
await writeSettings(target.pmRoot, settings, "config:set:governance_close_validation_default");
|
|
1522
|
+
}
|
|
1523
|
+
return withWarnings({
|
|
1524
|
+
scope,
|
|
1525
|
+
key,
|
|
1526
|
+
policy: settings.governance.close_validation_default,
|
|
1527
|
+
settings_path: target.settingsPath,
|
|
1528
|
+
changed: changed2
|
|
1529
|
+
}, warnings);
|
|
1530
|
+
}
|
|
1531
|
+
if (key === "governance_create_default_type") {
|
|
1532
|
+
const policyProvided = typeof options.policy === "string";
|
|
1533
|
+
const rawType = policyProvided ? options.policy.trim() : "";
|
|
1534
|
+
if (policyProvided && rawType.length === 0) {
|
|
1535
|
+
const changed3 = settings.governance.create_default_type !== void 0;
|
|
1536
|
+
delete settings.governance.create_default_type;
|
|
1537
|
+
if (changed3) {
|
|
1538
|
+
await writeSettings(target.pmRoot, settings, "config:set:governance_create_default_type");
|
|
1539
|
+
}
|
|
1540
|
+
return withWarnings({
|
|
1541
|
+
scope,
|
|
1542
|
+
key,
|
|
1543
|
+
policy: settings.governance.create_default_type ?? "",
|
|
1544
|
+
settings_path: target.settingsPath,
|
|
1545
|
+
changed: changed3
|
|
1546
|
+
}, warnings);
|
|
1547
|
+
}
|
|
1548
|
+
if (rawType.length === 0) {
|
|
1549
|
+
throw new PmCliError('Config set governance-create-default-type requires an item type value (or an empty value "" to clear it)', EXIT_CODE.USAGE);
|
|
1550
|
+
}
|
|
1551
|
+
const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());
|
|
1552
|
+
const resolvedType = resolveTypeName(rawType, typeRegistry);
|
|
1553
|
+
if (!resolvedType) {
|
|
1554
|
+
throw new PmCliError(buildInvalidTypeError(rawType, typeRegistry.types), EXIT_CODE.USAGE);
|
|
1555
|
+
}
|
|
1556
|
+
const changed2 = settings.governance.create_default_type !== resolvedType;
|
|
1557
|
+
settings.governance.create_default_type = resolvedType;
|
|
1558
|
+
if (changed2) {
|
|
1559
|
+
await writeSettings(target.pmRoot, settings, "config:set:governance_create_default_type");
|
|
1560
|
+
}
|
|
1561
|
+
return withWarnings({
|
|
1562
|
+
scope,
|
|
1563
|
+
key,
|
|
1564
|
+
policy: settings.governance.create_default_type,
|
|
1565
|
+
settings_path: target.settingsPath,
|
|
1566
|
+
changed: changed2
|
|
1567
|
+
}, warnings);
|
|
1568
|
+
}
|
|
1569
|
+
if (key === "governance_workflow_enforcement") {
|
|
1570
|
+
const nextPolicy = normalizeGovernanceWorkflowEnforcement(options.policy);
|
|
1571
|
+
const changed2 = (settings.governance.workflow_enforcement ?? "off") !== nextPolicy;
|
|
1572
|
+
settings.governance.workflow_enforcement = nextPolicy;
|
|
1573
|
+
if (changed2) {
|
|
1574
|
+
await writeSettings(target.pmRoot, settings, "config:set:governance_workflow_enforcement");
|
|
1575
|
+
}
|
|
1576
|
+
return withWarnings({
|
|
1577
|
+
scope,
|
|
1578
|
+
key,
|
|
1579
|
+
policy: settings.governance.workflow_enforcement,
|
|
1580
|
+
settings_path: target.settingsPath,
|
|
1581
|
+
changed: changed2
|
|
1582
|
+
}, warnings);
|
|
1583
|
+
}
|
|
1584
|
+
if (key === "governance_parent_reference_policy") {
|
|
1585
|
+
const nextPolicy = normalizeParentReferencePolicy(options.policy);
|
|
1586
|
+
const changed2 = settings.governance.preset !== "custom" || settings.governance.parent_reference !== nextPolicy;
|
|
1587
|
+
settings.governance.preset = "custom";
|
|
1588
|
+
settings.governance.parent_reference = nextPolicy;
|
|
1589
|
+
settings.validation.parent_reference = nextPolicy;
|
|
1590
|
+
if (changed2) {
|
|
1591
|
+
await writeSettings(target.pmRoot, settings, "config:set:governance_parent_reference_policy");
|
|
1592
|
+
}
|
|
1593
|
+
return withWarnings({
|
|
1594
|
+
scope,
|
|
1595
|
+
key,
|
|
1596
|
+
policy: settings.governance.parent_reference,
|
|
1597
|
+
settings_path: target.settingsPath,
|
|
1598
|
+
changed: changed2
|
|
1599
|
+
}, warnings);
|
|
1600
|
+
}
|
|
1601
|
+
if (key === "governance_metadata_validation_profile") {
|
|
1602
|
+
const nextPolicy = normalizeValidateMetadataProfile(options.policy);
|
|
1603
|
+
const changed2 = settings.governance.preset !== "custom" || settings.governance.metadata_profile !== nextPolicy;
|
|
1604
|
+
settings.governance.preset = "custom";
|
|
1605
|
+
settings.governance.metadata_profile = nextPolicy;
|
|
1606
|
+
settings.validation.metadata_profile = nextPolicy;
|
|
1607
|
+
if (changed2) {
|
|
1608
|
+
await writeSettings(target.pmRoot, settings, "config:set:governance_metadata_validation_profile");
|
|
1609
|
+
}
|
|
1610
|
+
return withWarnings({
|
|
1611
|
+
scope,
|
|
1612
|
+
key,
|
|
1613
|
+
policy: settings.governance.metadata_profile,
|
|
1614
|
+
settings_path: target.settingsPath,
|
|
1615
|
+
changed: changed2
|
|
1616
|
+
}, warnings);
|
|
1617
|
+
}
|
|
1618
|
+
if (key === "governance_force_required_for_stale_lock") {
|
|
1619
|
+
const nextPolicy = normalizeGovernanceForceRequiredForStaleLockPolicy(options.policy);
|
|
1620
|
+
const nextEnabled = nextPolicy === "enabled";
|
|
1621
|
+
const changed2 = settings.governance.preset !== "custom" || settings.governance.force_required_for_stale_lock !== nextEnabled;
|
|
1622
|
+
settings.governance.preset = "custom";
|
|
1623
|
+
settings.governance.force_required_for_stale_lock = nextEnabled;
|
|
1624
|
+
if (changed2) {
|
|
1625
|
+
await writeSettings(target.pmRoot, settings, "config:set:governance_force_required_for_stale_lock");
|
|
1626
|
+
}
|
|
1627
|
+
return withWarnings({
|
|
1628
|
+
scope,
|
|
1629
|
+
key,
|
|
1630
|
+
policy: settings.governance.force_required_for_stale_lock ? "enabled" : "disabled",
|
|
1631
|
+
settings_path: target.settingsPath,
|
|
1632
|
+
changed: changed2
|
|
1633
|
+
}, warnings);
|
|
1634
|
+
}
|
|
1635
|
+
if (key === "test_result_tracking") {
|
|
1636
|
+
const nextPolicy = normalizeTestResultTrackingPolicy(options.policy);
|
|
1637
|
+
const nextEnabled = nextPolicy === "enabled";
|
|
1638
|
+
const changed2 = settings.testing.record_results_to_items !== nextEnabled;
|
|
1639
|
+
settings.testing.record_results_to_items = nextEnabled;
|
|
1640
|
+
if (changed2) {
|
|
1641
|
+
await writeSettings(target.pmRoot, settings, "config:set:test_result_tracking");
|
|
1642
|
+
}
|
|
1643
|
+
return withWarnings({
|
|
1644
|
+
scope,
|
|
1645
|
+
key,
|
|
1646
|
+
policy: settings.testing.record_results_to_items ? "enabled" : "disabled",
|
|
1647
|
+
settings_path: target.settingsPath,
|
|
1648
|
+
changed: changed2
|
|
1649
|
+
}, warnings);
|
|
1650
|
+
}
|
|
1651
|
+
if (key === "telemetry_tracking") {
|
|
1652
|
+
const nextPolicy = normalizeTelemetryTrackingPolicy(options.policy);
|
|
1653
|
+
const nextEnabled = nextPolicy === "enabled";
|
|
1654
|
+
const changed2 = settings.telemetry.enabled !== nextEnabled || !settings.telemetry.first_run_prompt_completed;
|
|
1655
|
+
settings.telemetry.enabled = nextEnabled;
|
|
1656
|
+
settings.telemetry.first_run_prompt_completed = true;
|
|
1657
|
+
if (changed2) {
|
|
1658
|
+
await writeSettings(target.pmRoot, settings, "config:set:telemetry_tracking");
|
|
1659
|
+
}
|
|
1660
|
+
return withWarnings({
|
|
1661
|
+
scope,
|
|
1662
|
+
key,
|
|
1663
|
+
policy: settings.telemetry.enabled ? "enabled" : "disabled",
|
|
1664
|
+
settings_path: target.settingsPath,
|
|
1665
|
+
changed: changed2
|
|
1666
|
+
}, warnings);
|
|
1667
|
+
}
|
|
1668
|
+
if (key === "context") {
|
|
1669
|
+
return applyContextConfig(settings, options, target, scope, warnings);
|
|
1670
|
+
}
|
|
1671
|
+
const nextCriteria = normalizeCriteria(options.criterion, options.clearCriteria);
|
|
1672
|
+
const changed = nextCriteria.length !== settings.workflow.definition_of_done.length || nextCriteria.some((value, index) => value !== settings.workflow.definition_of_done[index]);
|
|
1673
|
+
settings.workflow.definition_of_done = nextCriteria;
|
|
1674
|
+
if (changed) {
|
|
1675
|
+
await writeSettings(target.pmRoot, settings, "config:set:definition_of_done");
|
|
1676
|
+
}
|
|
1677
|
+
return withWarnings({
|
|
1678
|
+
scope,
|
|
1679
|
+
key,
|
|
1680
|
+
criteria: [...settings.workflow.definition_of_done],
|
|
1681
|
+
settings_path: target.settingsPath,
|
|
1682
|
+
changed
|
|
1683
|
+
}, warnings);
|
|
1684
|
+
}
|
|
1685
|
+
export {
|
|
1686
|
+
runConfig
|
|
1687
|
+
};
|
|
1688
|
+
//# sourceMappingURL=config-5ON3ADRH.js.map
|