@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,239 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c24c8d31-1b90-5be3-945a-d650f99d71a4")}catch(e){}}();
|
|
3
|
+
import { activateExtensions } from "../core/extensions/loader.js";
|
|
4
|
+
import { createDefaultExtensionGovernancePolicy } from "../core/extensions/extension-types.js";
|
|
5
|
+
const HOOK_KIND_TO_REGISTRY_FIELD = {
|
|
6
|
+
before_command: "beforeCommand",
|
|
7
|
+
after_command: "afterCommand",
|
|
8
|
+
on_read: "onRead",
|
|
9
|
+
on_write: "onWrite",
|
|
10
|
+
on_index: "onIndex",
|
|
11
|
+
};
|
|
12
|
+
function normalizeSdkIdentifier(value) {
|
|
13
|
+
return value.trim().toLowerCase();
|
|
14
|
+
}
|
|
15
|
+
function extensionNameSuffix(extensionName) {
|
|
16
|
+
return extensionName ? ` from extension "${extensionName}"` : "";
|
|
17
|
+
}
|
|
18
|
+
function sortedUnique(values) {
|
|
19
|
+
return [...new Set(values)].sort((left, right) => left.localeCompare(right));
|
|
20
|
+
}
|
|
21
|
+
function normalizeSdkCommandName(command) {
|
|
22
|
+
return command
|
|
23
|
+
.trim()
|
|
24
|
+
.toLowerCase()
|
|
25
|
+
.split(/\s+/)
|
|
26
|
+
.filter((part) => part.length > 0)
|
|
27
|
+
.join(" ");
|
|
28
|
+
}
|
|
29
|
+
function formatAvailable(values) {
|
|
30
|
+
return values.length > 0 ? values.join(", ") : "(none)";
|
|
31
|
+
}
|
|
32
|
+
function collectFlagLabels(flags) {
|
|
33
|
+
const labels = new Set();
|
|
34
|
+
for (const flag of flags) {
|
|
35
|
+
if (typeof flag.long === "string" && flag.long.trim().length > 0) {
|
|
36
|
+
labels.add(flag.long.trim());
|
|
37
|
+
}
|
|
38
|
+
if (typeof flag.short === "string" && flag.short.trim().length > 0) {
|
|
39
|
+
labels.add(flag.short.trim());
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return labels;
|
|
43
|
+
}
|
|
44
|
+
function readTestExtensionManifest(module) {
|
|
45
|
+
if (module && typeof module === "object") {
|
|
46
|
+
const testModule = module;
|
|
47
|
+
const manifest = testModule.manifest;
|
|
48
|
+
if (manifest && typeof manifest === "object") {
|
|
49
|
+
return manifest;
|
|
50
|
+
}
|
|
51
|
+
const defaultExport = testModule.default;
|
|
52
|
+
const defaultManifest = defaultExport?.manifest;
|
|
53
|
+
if (defaultManifest && typeof defaultManifest === "object") {
|
|
54
|
+
return defaultManifest;
|
|
55
|
+
}
|
|
56
|
+
if (defaultExport && typeof defaultExport === "object" && ("name" in defaultExport || "capabilities" in defaultExport)) {
|
|
57
|
+
return defaultExport;
|
|
58
|
+
}
|
|
59
|
+
if ("name" in testModule || "capabilities" in testModule) {
|
|
60
|
+
return testModule;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return {};
|
|
64
|
+
}
|
|
65
|
+
function readTestExtensionCapabilities(manifest, options) {
|
|
66
|
+
if (Array.isArray(options.capabilities)) {
|
|
67
|
+
return [...options.capabilities];
|
|
68
|
+
}
|
|
69
|
+
if (Array.isArray(manifest.capabilities)) {
|
|
70
|
+
return manifest.capabilities.filter((capability) => typeof capability === "string");
|
|
71
|
+
}
|
|
72
|
+
return [];
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Activate one in-memory extension module for package tests.
|
|
76
|
+
*
|
|
77
|
+
* This uses pm's real registration validation and activation engine while
|
|
78
|
+
* avoiding private loader imports, filesystem manifests, or workspace setup.
|
|
79
|
+
*/
|
|
80
|
+
export async function activateExtensionForTest(module, options = {}) {
|
|
81
|
+
const manifest = readTestExtensionManifest(module);
|
|
82
|
+
const name = options.name ??
|
|
83
|
+
(typeof manifest.name === "string" && manifest.name.trim().length > 0 ? manifest.name.trim() : "test-extension");
|
|
84
|
+
const layer = options.layer ?? "project";
|
|
85
|
+
const capabilities = readTestExtensionCapabilities(manifest, options);
|
|
86
|
+
return activateExtensions({
|
|
87
|
+
disabled_by_flag: false,
|
|
88
|
+
roots: { global: "", project: "" },
|
|
89
|
+
configured_enabled: [],
|
|
90
|
+
configured_disabled: [],
|
|
91
|
+
discovered: [],
|
|
92
|
+
effective: [],
|
|
93
|
+
warnings: [],
|
|
94
|
+
policy: options.policy ?? createDefaultExtensionGovernancePolicy(),
|
|
95
|
+
failed: [],
|
|
96
|
+
loaded: [
|
|
97
|
+
{
|
|
98
|
+
layer,
|
|
99
|
+
directory: "",
|
|
100
|
+
manifest_path: "",
|
|
101
|
+
name,
|
|
102
|
+
version: typeof manifest.version === "string" ? manifest.version : "0.0.0",
|
|
103
|
+
entry: typeof manifest.entry === "string" ? manifest.entry : "./index.js",
|
|
104
|
+
priority: typeof manifest.priority === "number" ? manifest.priority : 0,
|
|
105
|
+
entry_path: "",
|
|
106
|
+
capabilities,
|
|
107
|
+
manifest_version: typeof manifest.manifest_version === "number" ? manifest.manifest_version : undefined,
|
|
108
|
+
pm_min_version: typeof manifest.pm_min_version === "string" ? manifest.pm_min_version : undefined,
|
|
109
|
+
pm_max_version: typeof manifest.pm_max_version === "string" ? manifest.pm_max_version : undefined,
|
|
110
|
+
engines: manifest.engines,
|
|
111
|
+
trusted: manifest.trusted,
|
|
112
|
+
provenance: manifest.provenance,
|
|
113
|
+
sandbox_profile: manifest.sandbox_profile,
|
|
114
|
+
permissions: manifest.permissions,
|
|
115
|
+
activation: manifest.activation,
|
|
116
|
+
module,
|
|
117
|
+
},
|
|
118
|
+
],
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Assert that an activated extension registration registry contains a command
|
|
123
|
+
* contract with the expected public metadata.
|
|
124
|
+
*/
|
|
125
|
+
export function assertRegisteredCommandContract(registrations, expectation) {
|
|
126
|
+
const expectedCommand = normalizeSdkCommandName(expectation.command);
|
|
127
|
+
if (expectedCommand.length === 0) {
|
|
128
|
+
throw new Error("Expected command name must be a non-empty string");
|
|
129
|
+
}
|
|
130
|
+
const commandCandidates = registrations.commands.filter((entry) => entry.command === expectedCommand);
|
|
131
|
+
const command = expectation.extensionName
|
|
132
|
+
? commandCandidates.find((entry) => entry.name === expectation.extensionName)
|
|
133
|
+
: commandCandidates[0];
|
|
134
|
+
if (!command) {
|
|
135
|
+
const available = registrations.commands.map((entry) => entry.command).sort((left, right) => left.localeCompare(right));
|
|
136
|
+
const extensionSuffix = expectation.extensionName ? ` from extension "${expectation.extensionName}"` : "";
|
|
137
|
+
throw new Error(`Expected extension command "${expectedCommand}"${extensionSuffix} to be registered. Available commands: ${formatAvailable(available)}`);
|
|
138
|
+
}
|
|
139
|
+
if (expectation.action !== undefined && command.action !== expectation.action) {
|
|
140
|
+
throw new Error(`Expected extension command "${expectedCommand}" action "${expectation.action}", received "${command.action}"`);
|
|
141
|
+
}
|
|
142
|
+
if (expectation.arguments !== undefined) {
|
|
143
|
+
const actualArguments = (command.arguments ?? []).map((argument) => argument.name);
|
|
144
|
+
const missingArguments = expectation.arguments.filter((argument) => !actualArguments.includes(argument));
|
|
145
|
+
if (missingArguments.length > 0) {
|
|
146
|
+
throw new Error(`Expected extension command "${expectedCommand}" arguments ${formatAvailable(expectation.arguments)}; missing ${formatAvailable(missingArguments)}; available ${formatAvailable(actualArguments)}`);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
const flags = registrations.flags
|
|
150
|
+
.filter((entry) => entry.target_command === expectedCommand &&
|
|
151
|
+
(expectation.extensionName === undefined || entry.name === expectation.extensionName))
|
|
152
|
+
.flatMap((entry) => entry.flags);
|
|
153
|
+
if (expectation.flags !== undefined) {
|
|
154
|
+
const actualFlagLabels = collectFlagLabels(flags);
|
|
155
|
+
const missingFlags = expectation.flags.filter((flag) => !actualFlagLabels.has(flag));
|
|
156
|
+
if (missingFlags.length > 0) {
|
|
157
|
+
throw new Error(`Expected extension command "${expectedCommand}" flags ${formatAvailable(expectation.flags)}; missing ${formatAvailable(missingFlags)}; available ${formatAvailable([...actualFlagLabels].sort((left, right) => left.localeCompare(right)))}`);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
return { command, flags };
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Assert that an activated extension hook registry contains a hook of the
|
|
164
|
+
* expected lifecycle kind (optionally scoped to a specific extension).
|
|
165
|
+
*
|
|
166
|
+
* Hooks are surfaced via `ExtensionActivationResult.hooks`, not the command
|
|
167
|
+
* registration registry, so this helper accepts an `ExtensionHookRegistry`.
|
|
168
|
+
*/
|
|
169
|
+
export function assertRegisteredHook(hooks, expectation) {
|
|
170
|
+
const field = HOOK_KIND_TO_REGISTRY_FIELD[expectation.kind];
|
|
171
|
+
const candidates = hooks[field];
|
|
172
|
+
const hook = expectation.extensionName
|
|
173
|
+
? candidates.find((entry) => entry.name === expectation.extensionName)
|
|
174
|
+
: candidates[0];
|
|
175
|
+
if (!hook) {
|
|
176
|
+
const available = sortedUnique(candidates.map((entry) => entry.name));
|
|
177
|
+
throw new Error(`Expected a "${expectation.kind}" hook${extensionNameSuffix(expectation.extensionName)} to be registered. Available "${expectation.kind}" hooks: ${formatAvailable(available)}`);
|
|
178
|
+
}
|
|
179
|
+
return hook;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Assert that an activated extension registration registry contains a search
|
|
183
|
+
* provider with the expected name (optionally scoped to a specific extension).
|
|
184
|
+
*/
|
|
185
|
+
export function assertRegisteredSearchProvider(registrations, expectation) {
|
|
186
|
+
const expectedProvider = normalizeSdkIdentifier(expectation.provider);
|
|
187
|
+
if (expectedProvider.length === 0) {
|
|
188
|
+
throw new Error("Expected search provider name must be a non-empty string");
|
|
189
|
+
}
|
|
190
|
+
const candidates = registrations.search_providers.filter((entry) => normalizeSdkIdentifier(entry.definition.name) === expectedProvider);
|
|
191
|
+
const provider = expectation.extensionName
|
|
192
|
+
? candidates.find((entry) => entry.name === expectation.extensionName)
|
|
193
|
+
: candidates[0];
|
|
194
|
+
if (!provider) {
|
|
195
|
+
const available = sortedUnique(registrations.search_providers.map((entry) => entry.definition.name));
|
|
196
|
+
throw new Error(`Expected search provider "${expectedProvider}"${extensionNameSuffix(expectation.extensionName)} to be registered. Available search providers: ${formatAvailable(available)}`);
|
|
197
|
+
}
|
|
198
|
+
return provider;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Assert that an activated extension registration registry contains an importer
|
|
202
|
+
* for the expected format/name (optionally scoped to a specific extension).
|
|
203
|
+
*/
|
|
204
|
+
export function assertRegisteredImporter(registrations, expectation) {
|
|
205
|
+
const expectedImporter = normalizeSdkIdentifier(expectation.importer);
|
|
206
|
+
if (expectedImporter.length === 0) {
|
|
207
|
+
throw new Error("Expected importer name must be a non-empty string");
|
|
208
|
+
}
|
|
209
|
+
const candidates = registrations.importers.filter((entry) => normalizeSdkIdentifier(entry.importer) === expectedImporter);
|
|
210
|
+
const importer = expectation.extensionName
|
|
211
|
+
? candidates.find((entry) => entry.name === expectation.extensionName)
|
|
212
|
+
: candidates[0];
|
|
213
|
+
if (!importer) {
|
|
214
|
+
const available = sortedUnique(registrations.importers.map((entry) => entry.importer));
|
|
215
|
+
throw new Error(`Expected importer "${expectedImporter}"${extensionNameSuffix(expectation.extensionName)} to be registered. Available importers: ${formatAvailable(available)}`);
|
|
216
|
+
}
|
|
217
|
+
return importer;
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Assert that an activated extension registration registry contains an exporter
|
|
221
|
+
* for the expected format/name (optionally scoped to a specific extension).
|
|
222
|
+
*/
|
|
223
|
+
export function assertRegisteredExporter(registrations, expectation) {
|
|
224
|
+
const expectedExporter = normalizeSdkIdentifier(expectation.exporter);
|
|
225
|
+
if (expectedExporter.length === 0) {
|
|
226
|
+
throw new Error("Expected exporter name must be a non-empty string");
|
|
227
|
+
}
|
|
228
|
+
const candidates = registrations.exporters.filter((entry) => normalizeSdkIdentifier(entry.exporter) === expectedExporter);
|
|
229
|
+
const exporter = expectation.extensionName
|
|
230
|
+
? candidates.find((entry) => entry.name === expectation.extensionName)
|
|
231
|
+
: candidates[0];
|
|
232
|
+
if (!exporter) {
|
|
233
|
+
const available = sortedUnique(registrations.exporters.map((entry) => entry.exporter));
|
|
234
|
+
throw new Error(`Expected exporter "${expectedExporter}"${extensionNameSuffix(expectation.extensionName)} to be registered. Available exporters: ${formatAvailable(available)}`);
|
|
235
|
+
}
|
|
236
|
+
return exporter;
|
|
237
|
+
}
|
|
238
|
+
//# sourceMappingURL=testing.js.map
|
|
239
|
+
//# debugId=c24c8d31-1b90-5be3-945a-d650f99d71a4
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testing.js","sources":["sdk/testing.ts"],"sourceRoot":"/","sourcesContent":["import type {\n ExtensionActivationResult,\n ExtensionCapability,\n ExtensionGovernancePolicy,\n ExtensionHookRegistry,\n ExtensionLayer,\n ExtensionManifest,\n ExtensionRegistrationRegistry,\n FlagDefinition,\n RegisteredExtensionCommandDefinition,\n RegisteredExtensionExporter,\n RegisteredExtensionHook,\n RegisteredExtensionImporter,\n RegisteredExtensionSearchProvider,\n} from \"../core/extensions/loader.js\";\nimport { activateExtensions } from \"../core/extensions/loader.js\";\nimport { createDefaultExtensionGovernancePolicy } from \"../core/extensions/extension-types.js\";\n\ninterface TestExtensionModule {\n manifest?: Partial<ExtensionManifest>;\n activate?: unknown;\n default?: TestExtensionModule;\n}\n\nexport interface ActivateExtensionForTestOptions {\n name?: string;\n layer?: ExtensionLayer;\n capabilities?: readonly ExtensionCapability[];\n policy?: ExtensionGovernancePolicy;\n}\n\nexport interface RegisteredCommandContractExpectation {\n command: string;\n action?: string;\n extensionName?: string;\n arguments?: string[];\n flags?: string[];\n}\n\nexport interface RegisteredCommandContractAssertion {\n command: RegisteredExtensionCommandDefinition;\n flags: FlagDefinition[];\n}\n\n/**\n * Public hook lifecycle kinds an extension can register through `api.hooks.*`.\n */\nexport type RegisteredHookKind = \"before_command\" | \"after_command\" | \"on_read\" | \"on_write\" | \"on_index\";\n\nconst HOOK_KIND_TO_REGISTRY_FIELD: Record<RegisteredHookKind, keyof ExtensionHookRegistry> = {\n before_command: \"beforeCommand\",\n after_command: \"afterCommand\",\n on_read: \"onRead\",\n on_write: \"onWrite\",\n on_index: \"onIndex\",\n};\n\nexport interface RegisteredHookExpectation {\n kind: RegisteredHookKind;\n extensionName?: string;\n}\n\nexport interface RegisteredSearchProviderExpectation {\n provider: string;\n extensionName?: string;\n}\n\nexport interface RegisteredImporterExpectation {\n importer: string;\n extensionName?: string;\n}\n\nexport interface RegisteredExporterExpectation {\n exporter: string;\n extensionName?: string;\n}\n\nfunction normalizeSdkIdentifier(value: string): string {\n return value.trim().toLowerCase();\n}\n\nfunction extensionNameSuffix(extensionName: string | undefined): string {\n return extensionName ? ` from extension \"${extensionName}\"` : \"\";\n}\n\nfunction sortedUnique(values: readonly string[]): string[] {\n return [...new Set(values)].sort((left, right) => left.localeCompare(right));\n}\n\nfunction normalizeSdkCommandName(command: string): string {\n return command\n .trim()\n .toLowerCase()\n .split(/\\s+/)\n .filter((part) => part.length > 0)\n .join(\" \");\n}\n\nfunction formatAvailable(values: readonly string[]): string {\n return values.length > 0 ? values.join(\", \") : \"(none)\";\n}\n\nfunction collectFlagLabels(flags: readonly FlagDefinition[]): Set<string> {\n const labels = new Set<string>();\n for (const flag of flags) {\n if (typeof flag.long === \"string\" && flag.long.trim().length > 0) {\n labels.add(flag.long.trim());\n }\n if (typeof flag.short === \"string\" && flag.short.trim().length > 0) {\n labels.add(flag.short.trim());\n }\n }\n return labels;\n}\n\nfunction readTestExtensionManifest(module: unknown): Partial<ExtensionManifest> {\n if (module && typeof module === \"object\") {\n const testModule = module as TestExtensionModule;\n const manifest = testModule.manifest;\n if (manifest && typeof manifest === \"object\") {\n return manifest;\n }\n const defaultExport = testModule.default;\n const defaultManifest = defaultExport?.manifest;\n if (defaultManifest && typeof defaultManifest === \"object\") {\n return defaultManifest;\n }\n if (defaultExport && typeof defaultExport === \"object\" && (\"name\" in defaultExport || \"capabilities\" in defaultExport)) {\n return defaultExport as Partial<ExtensionManifest>;\n }\n if (\"name\" in testModule || \"capabilities\" in testModule) {\n return testModule as Partial<ExtensionManifest>;\n }\n }\n return {};\n}\n\nfunction readTestExtensionCapabilities(\n manifest: Partial<ExtensionManifest>,\n options: ActivateExtensionForTestOptions,\n): ExtensionCapability[] {\n if (Array.isArray(options.capabilities)) {\n return [...options.capabilities];\n }\n if (Array.isArray(manifest.capabilities)) {\n return manifest.capabilities.filter((capability): capability is ExtensionCapability => typeof capability === \"string\");\n }\n return [];\n}\n\n/**\n * Activate one in-memory extension module for package tests.\n *\n * This uses pm's real registration validation and activation engine while\n * avoiding private loader imports, filesystem manifests, or workspace setup.\n */\nexport async function activateExtensionForTest(\n module: unknown,\n options: ActivateExtensionForTestOptions = {},\n): Promise<ExtensionActivationResult> {\n const manifest = readTestExtensionManifest(module);\n const name =\n options.name ??\n (typeof manifest.name === \"string\" && manifest.name.trim().length > 0 ? manifest.name.trim() : \"test-extension\");\n const layer = options.layer ?? \"project\";\n const capabilities = readTestExtensionCapabilities(manifest, options);\n\n return activateExtensions({\n disabled_by_flag: false,\n roots: { global: \"\", project: \"\" },\n configured_enabled: [],\n configured_disabled: [],\n discovered: [],\n effective: [],\n warnings: [],\n policy: options.policy ?? createDefaultExtensionGovernancePolicy(),\n failed: [],\n loaded: [\n {\n layer,\n directory: \"\",\n manifest_path: \"\",\n name,\n version: typeof manifest.version === \"string\" ? manifest.version : \"0.0.0\",\n entry: typeof manifest.entry === \"string\" ? manifest.entry : \"./index.js\",\n priority: typeof manifest.priority === \"number\" ? manifest.priority : 0,\n entry_path: \"\",\n capabilities,\n manifest_version: typeof manifest.manifest_version === \"number\" ? manifest.manifest_version : undefined,\n pm_min_version: typeof manifest.pm_min_version === \"string\" ? manifest.pm_min_version : undefined,\n pm_max_version: typeof manifest.pm_max_version === \"string\" ? manifest.pm_max_version : undefined,\n engines: manifest.engines,\n trusted: manifest.trusted,\n provenance: manifest.provenance,\n sandbox_profile: manifest.sandbox_profile,\n permissions: manifest.permissions,\n activation: manifest.activation,\n module,\n },\n ],\n });\n}\n\n/**\n * Assert that an activated extension registration registry contains a command\n * contract with the expected public metadata.\n */\nexport function assertRegisteredCommandContract(\n registrations: ExtensionRegistrationRegistry,\n expectation: RegisteredCommandContractExpectation,\n): RegisteredCommandContractAssertion {\n const expectedCommand = normalizeSdkCommandName(expectation.command);\n if (expectedCommand.length === 0) {\n throw new Error(\"Expected command name must be a non-empty string\");\n }\n\n const commandCandidates = registrations.commands.filter((entry) => entry.command === expectedCommand);\n const command = expectation.extensionName\n ? commandCandidates.find((entry) => entry.name === expectation.extensionName)\n : commandCandidates[0];\n if (!command) {\n const available = registrations.commands.map((entry) => entry.command).sort((left, right) => left.localeCompare(right));\n const extensionSuffix = expectation.extensionName ? ` from extension \"${expectation.extensionName}\"` : \"\";\n throw new Error(\n `Expected extension command \"${expectedCommand}\"${extensionSuffix} to be registered. Available commands: ${formatAvailable(\n available,\n )}`,\n );\n }\n\n if (expectation.action !== undefined && command.action !== expectation.action) {\n throw new Error(\n `Expected extension command \"${expectedCommand}\" action \"${expectation.action}\", received \"${command.action}\"`,\n );\n }\n\n if (expectation.arguments !== undefined) {\n const actualArguments = (command.arguments ?? []).map((argument) => argument.name);\n const missingArguments = expectation.arguments.filter((argument) => !actualArguments.includes(argument));\n if (missingArguments.length > 0) {\n throw new Error(\n `Expected extension command \"${expectedCommand}\" arguments ${formatAvailable(\n expectation.arguments,\n )}; missing ${formatAvailable(missingArguments)}; available ${formatAvailable(actualArguments)}`,\n );\n }\n }\n\n const flags = registrations.flags\n .filter(\n (entry) =>\n entry.target_command === expectedCommand &&\n (expectation.extensionName === undefined || entry.name === expectation.extensionName),\n )\n .flatMap((entry) => entry.flags);\n\n if (expectation.flags !== undefined) {\n const actualFlagLabels = collectFlagLabels(flags);\n const missingFlags = expectation.flags.filter((flag) => !actualFlagLabels.has(flag));\n if (missingFlags.length > 0) {\n throw new Error(\n `Expected extension command \"${expectedCommand}\" flags ${formatAvailable(expectation.flags)}; missing ${formatAvailable(\n missingFlags,\n )}; available ${formatAvailable([...actualFlagLabels].sort((left, right) => left.localeCompare(right)))}`,\n );\n }\n }\n\n return { command, flags };\n}\n\n/**\n * Assert that an activated extension hook registry contains a hook of the\n * expected lifecycle kind (optionally scoped to a specific extension).\n *\n * Hooks are surfaced via `ExtensionActivationResult.hooks`, not the command\n * registration registry, so this helper accepts an `ExtensionHookRegistry`.\n */\nexport function assertRegisteredHook<TKind extends RegisteredHookKind>(\n hooks: ExtensionHookRegistry,\n expectation: RegisteredHookExpectation & { kind: TKind },\n): ExtensionHookRegistry[(typeof HOOK_KIND_TO_REGISTRY_FIELD)[TKind]][number] {\n const field = HOOK_KIND_TO_REGISTRY_FIELD[expectation.kind];\n const candidates = hooks[field] as ReadonlyArray<RegisteredExtensionHook<unknown>>;\n const hook = expectation.extensionName\n ? candidates.find((entry) => entry.name === expectation.extensionName)\n : candidates[0];\n if (!hook) {\n const available = sortedUnique(candidates.map((entry) => entry.name));\n throw new Error(\n `Expected a \"${expectation.kind}\" hook${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available \"${expectation.kind}\" hooks: ${formatAvailable(available)}`,\n );\n }\n\n return hook as ExtensionHookRegistry[(typeof HOOK_KIND_TO_REGISTRY_FIELD)[TKind]][number];\n}\n\n/**\n * Assert that an activated extension registration registry contains a search\n * provider with the expected name (optionally scoped to a specific extension).\n */\nexport function assertRegisteredSearchProvider(\n registrations: ExtensionRegistrationRegistry,\n expectation: RegisteredSearchProviderExpectation,\n): RegisteredExtensionSearchProvider {\n const expectedProvider = normalizeSdkIdentifier(expectation.provider);\n if (expectedProvider.length === 0) {\n throw new Error(\"Expected search provider name must be a non-empty string\");\n }\n\n const candidates = registrations.search_providers.filter(\n (entry) => normalizeSdkIdentifier(entry.definition.name) === expectedProvider,\n );\n const provider = expectation.extensionName\n ? candidates.find((entry) => entry.name === expectation.extensionName)\n : candidates[0];\n if (!provider) {\n const available = sortedUnique(registrations.search_providers.map((entry) => entry.definition.name));\n throw new Error(\n `Expected search provider \"${expectedProvider}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available search providers: ${formatAvailable(available)}`,\n );\n }\n\n return provider;\n}\n\n/**\n * Assert that an activated extension registration registry contains an importer\n * for the expected format/name (optionally scoped to a specific extension).\n */\nexport function assertRegisteredImporter(\n registrations: ExtensionRegistrationRegistry,\n expectation: RegisteredImporterExpectation,\n): RegisteredExtensionImporter {\n const expectedImporter = normalizeSdkIdentifier(expectation.importer);\n if (expectedImporter.length === 0) {\n throw new Error(\"Expected importer name must be a non-empty string\");\n }\n\n const candidates = registrations.importers.filter(\n (entry) => normalizeSdkIdentifier(entry.importer) === expectedImporter,\n );\n const importer = expectation.extensionName\n ? candidates.find((entry) => entry.name === expectation.extensionName)\n : candidates[0];\n if (!importer) {\n const available = sortedUnique(registrations.importers.map((entry) => entry.importer));\n throw new Error(\n `Expected importer \"${expectedImporter}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available importers: ${formatAvailable(available)}`,\n );\n }\n\n return importer;\n}\n\n/**\n * Assert that an activated extension registration registry contains an exporter\n * for the expected format/name (optionally scoped to a specific extension).\n */\nexport function assertRegisteredExporter(\n registrations: ExtensionRegistrationRegistry,\n expectation: RegisteredExporterExpectation,\n): RegisteredExtensionExporter {\n const expectedExporter = normalizeSdkIdentifier(expectation.exporter);\n if (expectedExporter.length === 0) {\n throw new Error(\"Expected exporter name must be a non-empty string\");\n }\n\n const candidates = registrations.exporters.filter(\n (entry) => normalizeSdkIdentifier(entry.exporter) === expectedExporter,\n );\n const exporter = expectation.extensionName\n ? candidates.find((entry) => entry.name === expectation.extensionName)\n : candidates[0];\n if (!exporter) {\n const available = sortedUnique(registrations.exporters.map((entry) => entry.exporter));\n throw new Error(\n `Expected exporter \"${expectedExporter}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available exporters: ${formatAvailable(available)}`,\n );\n }\n\n return exporter;\n}\n"],"names":[],"mappings":";;AAeA,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,sCAAsC,EAAE,MAAM,uCAAuC,CAAC;AAiC/F,MAAM,2BAA2B,GAA4D;IAC3F,cAAc,EAAE,eAAe;IAC/B,aAAa,EAAE,cAAc;IAC7B,OAAO,EAAE,QAAQ;IACjB,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;CACpB,CAAC;AAsBF,SAAS,sBAAsB,CAAC,KAAa;IAC3C,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;AACpC,CAAC;AAED,SAAS,mBAAmB,CAAC,aAAiC;IAC5D,OAAO,aAAa,CAAC,CAAC,CAAC,oBAAoB,aAAa,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;AACnE,CAAC;AAED,SAAS,YAAY,CAAC,MAAyB;IAC7C,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAA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dist/types.d.ts
CHANGED
|
@@ -39,6 +39,8 @@ export declare const GOVERNANCE_CREATE_MODE_DEFAULT_VALUES: readonly ["progressi
|
|
|
39
39
|
export type GovernanceCreateModeDefault = (typeof GOVERNANCE_CREATE_MODE_DEFAULT_VALUES)[number];
|
|
40
40
|
export declare const GOVERNANCE_CLOSE_VALIDATION_DEFAULT_VALUES: readonly ["off", "warn", "strict"];
|
|
41
41
|
export type GovernanceCloseValidationDefault = (typeof GOVERNANCE_CLOSE_VALIDATION_DEFAULT_VALUES)[number];
|
|
42
|
+
export declare const GOVERNANCE_WORKFLOW_ENFORCEMENT_VALUES: readonly ["off", "warn", "strict"];
|
|
43
|
+
export type GovernanceWorkflowEnforcement = (typeof GOVERNANCE_WORKFLOW_ENFORCEMENT_VALUES)[number];
|
|
42
44
|
export declare const VALIDATE_METADATA_REQUIRED_FIELD_VALUES: readonly ["author", "acceptance_criteria", "estimated_minutes", "close_reason", "reviewer", "risk", "confidence", "sprint", "release"];
|
|
43
45
|
export type ValidateMetadataRequiredField = (typeof VALIDATE_METADATA_REQUIRED_FIELD_VALUES)[number];
|
|
44
46
|
export declare const RECURRENCE_FREQUENCY_VALUES: readonly ["daily", "weekly", "monthly", "yearly"];
|
|
@@ -201,6 +203,12 @@ export interface ItemTypeCommandOptionPolicy {
|
|
|
201
203
|
}
|
|
202
204
|
export interface ItemTypeDefinition {
|
|
203
205
|
name: string;
|
|
206
|
+
description?: string;
|
|
207
|
+
/**
|
|
208
|
+
* Status assigned to newly created items of this type when `--status` is not
|
|
209
|
+
* provided. Falls back to the workflow's open status when unset or invalid.
|
|
210
|
+
*/
|
|
211
|
+
default_status?: string;
|
|
204
212
|
folder?: string;
|
|
205
213
|
aliases?: string[];
|
|
206
214
|
required_create_fields?: string[];
|
|
@@ -247,12 +255,23 @@ export interface RuntimeSchemaFileConfig {
|
|
|
247
255
|
fields?: string;
|
|
248
256
|
workflows?: string;
|
|
249
257
|
}
|
|
258
|
+
/**
|
|
259
|
+
* Per-type allowed-transition rule. A type with no matching entry is
|
|
260
|
+
* unrestricted; a type with an entry allows only the listed [from, to]
|
|
261
|
+
* status pairs (status tokens are resolved case-insensitively through the
|
|
262
|
+
* status registry alias map; a same-status no-op is always allowed).
|
|
263
|
+
*/
|
|
264
|
+
export interface TypeWorkflowDefinition {
|
|
265
|
+
type: string;
|
|
266
|
+
allowed_transitions: [string, string][];
|
|
267
|
+
}
|
|
250
268
|
export interface RuntimeSchemaSettings {
|
|
251
269
|
version: number;
|
|
252
270
|
files: RuntimeSchemaFileConfig;
|
|
253
271
|
statuses: RuntimeStatusDefinition[];
|
|
254
272
|
fields: RuntimeFieldDefinition[];
|
|
255
273
|
workflow: RuntimeWorkflowDefinition;
|
|
274
|
+
type_workflows?: TypeWorkflowDefinition[];
|
|
256
275
|
unknown_field_policy: RuntimeUnknownFieldPolicy;
|
|
257
276
|
}
|
|
258
277
|
export interface ItemTestRunSummary {
|
|
@@ -304,7 +323,7 @@ export interface ItemMetadata {
|
|
|
304
323
|
why_now?: string;
|
|
305
324
|
parent?: string;
|
|
306
325
|
reviewer?: string;
|
|
307
|
-
risk?:
|
|
326
|
+
risk?: RiskLevel;
|
|
308
327
|
confidence?: ConfidenceValue;
|
|
309
328
|
sprint?: string;
|
|
310
329
|
release?: string;
|
|
@@ -394,6 +413,12 @@ export interface GovernanceSettings {
|
|
|
394
413
|
metadata_profile: ValidateMetadataProfile;
|
|
395
414
|
force_required_for_stale_lock: boolean;
|
|
396
415
|
create_default_type?: string;
|
|
416
|
+
/**
|
|
417
|
+
* Per-type allowed-transition enforcement mode for `pm update --status`.
|
|
418
|
+
* Read raw from settings (not preset-derived) so existing projects are
|
|
419
|
+
* unaffected when unset; defaults to "off".
|
|
420
|
+
*/
|
|
421
|
+
workflow_enforcement?: GovernanceWorkflowEnforcement;
|
|
397
422
|
}
|
|
398
423
|
export type ExtensionPolicyMode = "off" | "warn" | "enforce";
|
|
399
424
|
export type ExtensionTrustMode = "off" | "warn" | "enforce";
|
package/dist/types.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="dd045bd8-53d3-51f9-8e24-1905c0ed6413")}catch(e){}}();
|
|
3
3
|
export const BUILTIN_ITEM_TYPE_VALUES = [
|
|
4
4
|
"Epic",
|
|
5
5
|
"Feature",
|
|
@@ -63,6 +63,7 @@ export const GOVERNANCE_PRESET_VALUES = ["minimal", "default", "strict", "custom
|
|
|
63
63
|
export const GOVERNANCE_OWNERSHIP_ENFORCEMENT_VALUES = ["none", "warn", "strict"];
|
|
64
64
|
export const GOVERNANCE_CREATE_MODE_DEFAULT_VALUES = ["progressive", "strict"];
|
|
65
65
|
export const GOVERNANCE_CLOSE_VALIDATION_DEFAULT_VALUES = ["off", "warn", "strict"];
|
|
66
|
+
export const GOVERNANCE_WORKFLOW_ENFORCEMENT_VALUES = ["off", "warn", "strict"];
|
|
66
67
|
export const VALIDATE_METADATA_REQUIRED_FIELD_VALUES = [
|
|
67
68
|
"author",
|
|
68
69
|
"acceptance_criteria",
|
|
@@ -125,4 +126,4 @@ export const CONTEXT_SECTION_VALUES = [
|
|
|
125
126
|
"tests",
|
|
126
127
|
];
|
|
127
128
|
//# sourceMappingURL=types.js.map
|
|
128
|
-
//# debugId=
|
|
129
|
+
//# debugId=dd045bd8-53d3-51f9-8e24-1905c0ed6413
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":["types.ts"],"sourceRoot":"/","sourcesContent":["export const BUILTIN_ITEM_TYPE_VALUES = [\n \"Epic\",\n \"Feature\",\n \"Task\",\n \"Chore\",\n \"Issue\",\n \"Decision\",\n \"Event\",\n \"Reminder\",\n \"Milestone\",\n \"Meeting\",\n \"Plan\",\n] as const;\nexport const ITEM_TYPE_VALUES = BUILTIN_ITEM_TYPE_VALUES;\nexport type BuiltinItemType = (typeof BUILTIN_ITEM_TYPE_VALUES)[number];\nexport type ItemType = string;\n\nexport const STATUS_VALUES = [\n \"draft\",\n \"open\",\n \"in_progress\",\n \"blocked\",\n \"closed\",\n \"canceled\",\n] as const;\nexport type ItemStatus = string;\n\nexport const RUNTIME_STATUS_ROLE_VALUES = [\n \"draft\",\n \"active\",\n \"blocked\",\n \"terminal\",\n \"terminal_done\",\n \"terminal_canceled\",\n \"default_open\",\n \"default_close\",\n \"default_cancel\",\n] as const;\nexport type RuntimeStatusRole = (typeof RUNTIME_STATUS_ROLE_VALUES)[number];\n\nexport const RUNTIME_FIELD_TYPE_VALUES = [\"string\", \"number\", \"boolean\", \"string_array\"] as const;\nexport type RuntimeFieldType = (typeof RUNTIME_FIELD_TYPE_VALUES)[number];\n\nexport const RUNTIME_FIELD_COMMAND_VALUES = [\"create\", \"update\", \"update_many\", \"list\", \"search\", \"calendar\", \"context\"] as const;\nexport type RuntimeFieldCommand = (typeof RUNTIME_FIELD_COMMAND_VALUES)[number];\n\nexport const RUNTIME_UNKNOWN_FIELD_POLICY_VALUES = [\"allow\", \"warn\", \"reject\"] as const;\nexport type RuntimeUnknownFieldPolicy = (typeof RUNTIME_UNKNOWN_FIELD_POLICY_VALUES)[number];\n\nexport const DEPENDENCY_KIND_VALUES = [\n \"blocks\",\n \"parent\",\n \"child\",\n \"parent_child\",\n \"child_of\",\n \"related\",\n \"related_to\",\n \"discovered_from\",\n \"blocked_by\",\n \"incident_from\",\n \"epic\",\n \"supersedes\",\n \"task\",\n] as const;\nexport type DependencyKind = (typeof DEPENDENCY_KIND_VALUES)[number];\n\nexport const SCOPE_VALUES = [\"project\", \"global\"] as const;\nexport type LinkScope = (typeof SCOPE_VALUES)[number];\n\nexport const RISK_VALUES = [\"low\", \"medium\", \"high\", \"critical\"] as const;\nexport type RiskLevel = (typeof RISK_VALUES)[number];\n\nexport const ISSUE_SEVERITY_VALUES = [\"low\", \"medium\", \"high\", \"critical\"] as const;\nexport type IssueSeverity = (typeof ISSUE_SEVERITY_VALUES)[number];\n\nexport const CONFIDENCE_TEXT_VALUES = [\"low\", \"medium\", \"high\"] as const;\nexport type ConfidenceTextLevel = (typeof CONFIDENCE_TEXT_VALUES)[number];\nexport type ConfidenceValue = number | ConfidenceTextLevel;\n\nexport const ITEM_FORMAT_VALUES = [\"toon\", \"json_markdown\"] as const;\nexport type ItemFormat = (typeof ITEM_FORMAT_VALUES)[number];\n\nexport const SPRINT_RELEASE_FORMAT_POLICY_VALUES = [\"warn\", \"strict_error\"] as const;\nexport type SprintReleaseFormatPolicy = (typeof SPRINT_RELEASE_FORMAT_POLICY_VALUES)[number];\nexport const PARENT_REFERENCE_POLICY_VALUES = [\"warn\", \"strict_error\"] as const;\nexport type ParentReferencePolicy = (typeof PARENT_REFERENCE_POLICY_VALUES)[number];\nexport const VALIDATE_METADATA_PROFILE_VALUES = [\"core\", \"strict\", \"custom\"] as const;\nexport type ValidateMetadataProfile = (typeof VALIDATE_METADATA_PROFILE_VALUES)[number];\nexport const GOVERNANCE_PRESET_VALUES = [\"minimal\", \"default\", \"strict\", \"custom\"] as const;\nexport type GovernancePreset = (typeof GOVERNANCE_PRESET_VALUES)[number];\nexport const GOVERNANCE_OWNERSHIP_ENFORCEMENT_VALUES = [\"none\", \"warn\", \"strict\"] as const;\nexport type GovernanceOwnershipEnforcement = (typeof GOVERNANCE_OWNERSHIP_ENFORCEMENT_VALUES)[number];\nexport const GOVERNANCE_CREATE_MODE_DEFAULT_VALUES = [\"progressive\", \"strict\"] as const;\nexport type GovernanceCreateModeDefault = (typeof GOVERNANCE_CREATE_MODE_DEFAULT_VALUES)[number];\nexport const GOVERNANCE_CLOSE_VALIDATION_DEFAULT_VALUES = [\"off\", \"warn\", \"strict\"] as const;\nexport type GovernanceCloseValidationDefault = (typeof GOVERNANCE_CLOSE_VALIDATION_DEFAULT_VALUES)[number];\nexport const VALIDATE_METADATA_REQUIRED_FIELD_VALUES = [\n \"author\",\n \"acceptance_criteria\",\n \"estimated_minutes\",\n \"close_reason\",\n \"reviewer\",\n \"risk\",\n \"confidence\",\n \"sprint\",\n \"release\",\n] as const;\nexport type ValidateMetadataRequiredField = (typeof VALIDATE_METADATA_REQUIRED_FIELD_VALUES)[number];\n\nexport const RECURRENCE_FREQUENCY_VALUES = [\"daily\", \"weekly\", \"monthly\", \"yearly\"] as const;\nexport type RecurrenceFrequency = (typeof RECURRENCE_FREQUENCY_VALUES)[number];\n\nexport const RECURRENCE_WEEKDAY_VALUES = [\"mon\", \"tue\", \"wed\", \"thu\", \"fri\", \"sat\", \"sun\"] as const;\nexport type RecurrenceWeekday = (typeof RECURRENCE_WEEKDAY_VALUES)[number];\n\n/**\n * Canonical week-order index for a recurrence weekday (mon=0 .. sun=6).\n * Shared by item serialization, create/update parsing, and calendar expansion\n * so weekday ordering cannot drift between those modules.\n */\nexport function weekdayOrderIndex(value: RecurrenceWeekday): number {\n return RECURRENCE_WEEKDAY_VALUES.indexOf(value);\n}\n\nexport interface Dependency {\n id: string;\n kind: DependencyKind;\n created_at: string;\n author?: string;\n source_kind?: string;\n}\n\nexport interface Comment {\n created_at: string;\n author: string;\n text: string;\n}\n\nexport interface LogNote {\n created_at: string;\n author: string;\n text: string;\n}\n\nexport interface LinkedFile {\n path: string;\n scope: LinkScope;\n note?: string;\n}\n\nexport interface LinkedTest {\n command?: string;\n path?: string;\n scope: LinkScope;\n timeout_seconds?: number;\n pm_context_mode?: \"schema\" | \"tracker\" | \"auto\";\n env_set?: Record<string, string>;\n env_clear?: string[];\n shared_host_safe?: boolean;\n assert_stdout_contains?: string[];\n assert_stdout_regex?: string[];\n assert_stderr_contains?: string[];\n assert_stderr_regex?: string[];\n assert_stdout_min_lines?: number;\n assert_json_field_equals?: Record<string, string>;\n assert_json_field_gte?: Record<string, number>;\n note?: string;\n}\n\nexport interface LinkedDoc {\n path: string;\n scope: LinkScope;\n note?: string;\n}\n\nexport interface Reminder {\n at: string;\n text: string;\n}\n\nexport interface RecurrenceRule {\n freq: RecurrenceFrequency;\n interval?: number;\n count?: number;\n until?: string;\n by_weekday?: RecurrenceWeekday[];\n by_month_day?: number[];\n exdates?: string[];\n}\n\nexport interface CalendarEvent {\n start_at: string;\n end_at?: string;\n title?: string;\n description?: string;\n location?: string;\n all_day?: boolean;\n timezone?: string;\n recurrence?: RecurrenceRule;\n}\n\nexport const PLAN_MODE_VALUES = [\n \"draft\",\n \"research\",\n \"review\",\n \"approved\",\n \"executing\",\n \"paused\",\n \"completed\",\n \"superseded\",\n] as const;\nexport type PlanMode = (typeof PLAN_MODE_VALUES)[number];\n\nexport const PLAN_STEP_STATUS_VALUES = [\n \"pending\",\n \"in_progress\",\n \"completed\",\n \"blocked\",\n \"skipped\",\n \"superseded\",\n] as const;\nexport type PlanStepStatus = (typeof PLAN_STEP_STATUS_VALUES)[number];\n\nexport const PLAN_HARNESS_VALUES = [\"codex\", \"claude-code\", \"cursor\", \"generic\"] as const;\nexport type PlanHarness = (typeof PLAN_HARNESS_VALUES)[number];\n\nexport const PLAN_STEP_LINK_KIND_VALUES = [\n \"related\",\n \"blocks\",\n \"blocked_by\",\n \"depends_on\",\n \"discovered_from\",\n \"implements\",\n \"verifies\",\n \"supersedes\",\n] as const;\nexport type PlanStepLinkKind = (typeof PLAN_STEP_LINK_KIND_VALUES)[number];\n\nexport interface PlanStepLink {\n id: string;\n kind: PlanStepLinkKind;\n note?: string;\n required_before_step?: boolean;\n}\n\nexport interface PlanStepFile {\n path: string;\n scope?: LinkScope;\n note?: string;\n}\n\nexport interface PlanStepTest {\n command?: string;\n path?: string;\n note?: string;\n}\n\nexport interface PlanStepDoc {\n path: string;\n scope?: LinkScope;\n note?: string;\n}\n\nexport interface PlanStep {\n id: string;\n order: number;\n title: string;\n body?: string;\n status: PlanStepStatus;\n owner?: string;\n evidence?: string;\n blocked_reason?: string;\n superseded_by?: string;\n linked_items?: PlanStepLink[];\n files?: PlanStepFile[];\n tests?: PlanStepTest[];\n docs?: PlanStepDoc[];\n created_at: string;\n updated_at: string;\n completed_at?: string;\n}\n\nexport interface PlanDecision {\n ts: string;\n author: string;\n decision: string;\n rationale?: string;\n evidence?: string;\n step_id?: string;\n}\n\nexport interface PlanDiscovery {\n ts: string;\n author: string;\n text: string;\n step_id?: string;\n}\n\nexport interface PlanValidationCheck {\n text: string;\n command?: string;\n expected?: string;\n}\n\nexport interface ItemTypeOptionDefinition {\n key: string;\n values: string[];\n required?: boolean;\n aliases?: string[];\n description?: string;\n}\n\nexport interface ItemTypeCommandOptionPolicy {\n command: \"create\" | \"update\";\n option: string;\n required?: boolean;\n visible?: boolean;\n enabled?: boolean;\n}\n\nexport interface ItemTypeDefinition {\n name: string;\n folder?: string;\n aliases?: string[];\n required_create_fields?: string[];\n required_create_repeatables?: string[];\n options?: ItemTypeOptionDefinition[];\n command_option_policies?: ItemTypeCommandOptionPolicy[];\n}\n\nexport interface RuntimeStatusDefinition {\n id: string;\n aliases?: string[];\n roles?: RuntimeStatusRole[];\n description?: string;\n order?: number;\n}\n\nexport interface RuntimeFieldDefinition {\n key: string;\n metadata_key?: string;\n /**\n * @deprecated Use metadata_key.\n */\n front_matter_key?: string;\n cli_flag?: string;\n cli_aliases?: string[];\n description?: string;\n type?: RuntimeFieldType;\n commands?: RuntimeFieldCommand[];\n repeatable?: boolean;\n required?: boolean;\n required_on_create?: boolean;\n required_types?: string[];\n allow_unset?: boolean;\n}\n\nexport interface RuntimeWorkflowDefinition {\n draft_status?: string;\n open_status?: string;\n in_progress_status?: string;\n blocked_status?: string;\n close_status?: string;\n canceled_status?: string;\n}\n\nexport interface RuntimeSchemaFileConfig {\n types?: string;\n statuses?: string;\n fields?: string;\n workflows?: string;\n}\n\nexport interface RuntimeSchemaSettings {\n version: number;\n files: RuntimeSchemaFileConfig;\n statuses: RuntimeStatusDefinition[];\n fields: RuntimeFieldDefinition[];\n workflow: RuntimeWorkflowDefinition;\n unknown_field_policy: RuntimeUnknownFieldPolicy;\n}\n\nexport interface ItemTestRunSummary {\n run_id: string;\n kind: \"test\" | \"test-all\";\n status: \"passed\" | \"failed\" | \"stopped\" | \"canceled\";\n started_at: string;\n finished_at: string;\n recorded_at: string;\n attempt?: number;\n resumed_from?: string;\n passed: number;\n failed: number;\n skipped: number;\n items?: number;\n linked_tests?: number;\n fail_on_skipped_triggered?: boolean;\n}\n\nexport interface ItemMetadata {\n id: string;\n title: string;\n description: string;\n type: ItemType;\n source_type?: string;\n type_options?: Record<string, string>;\n status: ItemStatus;\n priority: 0 | 1 | 2 | 3 | 4;\n tags: string[];\n created_at: string;\n updated_at: string;\n deadline?: string;\n reminders?: Reminder[];\n events?: CalendarEvent[];\n closed_at?: string;\n assignee?: string;\n source_owner?: string;\n author?: string;\n estimated_minutes?: number;\n acceptance_criteria?: string;\n design?: string;\n external_ref?: string;\n definition_of_ready?: string;\n order?: number;\n goal?: string;\n objective?: string;\n value?: string;\n impact?: string;\n outcome?: string;\n why_now?: string;\n parent?: string;\n reviewer?: string;\n risk?: \"low\" | \"medium\" | \"high\" | \"critical\";\n confidence?: ConfidenceValue;\n sprint?: string;\n release?: string;\n blocked_by?: string;\n blocked_reason?: string;\n unblock_note?: string;\n reporter?: string;\n severity?: IssueSeverity;\n environment?: string;\n repro_steps?: string;\n resolution?: string;\n expected_result?: string;\n actual_result?: string;\n affected_version?: string;\n fixed_version?: string;\n component?: string;\n regression?: boolean;\n customer_impact?: string;\n dependencies?: Dependency[];\n comments?: Comment[];\n notes?: LogNote[];\n learnings?: LogNote[];\n files?: LinkedFile[];\n tests?: LinkedTest[];\n test_runs?: ItemTestRunSummary[];\n docs?: LinkedDoc[];\n close_reason?: string;\n plan_mode?: PlanMode;\n plan_scope?: string;\n plan_harness?: PlanHarness;\n plan_steps?: PlanStep[];\n plan_decisions?: PlanDecision[];\n plan_discoveries?: PlanDiscovery[];\n plan_validation?: PlanValidationCheck[];\n plan_resume_context?: string;\n [key: string]: unknown;\n}\n\n/**\n * @deprecated Use ItemMetadata.\n */\nexport type ItemFrontMatter = ItemMetadata;\n\nexport interface ItemDocument {\n metadata: ItemMetadata;\n body: string;\n}\n\nexport interface HistoryPatchOp {\n op: \"add\" | \"remove\" | \"replace\" | \"move\" | \"copy\" | \"test\";\n path: string;\n from?: string;\n value?: unknown;\n}\n\nexport interface HistoryEntry {\n ts: string;\n author: string;\n op: string;\n patch: HistoryPatchOp[];\n before_hash: string;\n after_hash: string;\n message?: string;\n}\n\nexport const CONTEXT_DEPTH_VALUES = [\"brief\", \"standard\", \"deep\"] as const;\nexport type ContextDepth = (typeof CONTEXT_DEPTH_VALUES)[number];\n\nexport const CONTEXT_SECTION_VALUES = [\n \"hierarchy\",\n \"activity\",\n \"progress\",\n \"blockers\",\n \"files\",\n \"workload\",\n \"staleness\",\n \"tests\",\n] as const;\nexport type ContextSectionName = (typeof CONTEXT_SECTION_VALUES)[number];\n\nexport interface ContextSectionSettings {\n hierarchy: boolean;\n activity: boolean;\n progress: boolean;\n blockers: boolean;\n files: boolean;\n workload: boolean;\n staleness: boolean;\n tests: boolean;\n}\n\nexport interface ContextSettings {\n default_depth: ContextDepth;\n activity_limit: number;\n stale_threshold_days: number;\n sections: ContextSectionSettings;\n}\n\nexport interface GovernanceSettings {\n preset: GovernancePreset;\n ownership_enforcement: GovernanceOwnershipEnforcement;\n create_mode_default: GovernanceCreateModeDefault;\n close_validation_default: GovernanceCloseValidationDefault;\n parent_reference: ParentReferencePolicy;\n metadata_profile: ValidateMetadataProfile;\n force_required_for_stale_lock: boolean;\n create_default_type?: string;\n}\n\nexport type ExtensionPolicyMode = \"off\" | \"warn\" | \"enforce\";\nexport type ExtensionTrustMode = \"off\" | \"warn\" | \"enforce\";\nexport type ExtensionSandboxProfile = \"none\" | \"restricted\" | \"strict\";\n\nexport interface ExtensionPolicyOverrideSettings {\n name: string;\n disabled?: boolean;\n require_trusted?: boolean;\n require_provenance?: boolean;\n sandbox_profile?: ExtensionSandboxProfile;\n allowed_capabilities?: string[];\n blocked_capabilities?: string[];\n allowed_surfaces?: string[];\n blocked_surfaces?: string[];\n allowed_commands?: string[];\n blocked_commands?: string[];\n allowed_actions?: string[];\n blocked_actions?: string[];\n allowed_services?: string[];\n blocked_services?: string[];\n}\n\nexport interface ExtensionPolicySettings {\n mode: ExtensionPolicyMode;\n trust_mode: ExtensionTrustMode;\n require_provenance: boolean;\n trusted_extensions: string[];\n default_sandbox_profile: ExtensionSandboxProfile;\n allowed_extensions: string[];\n blocked_extensions: string[];\n allowed_capabilities: string[];\n blocked_capabilities: string[];\n allowed_surfaces: string[];\n blocked_surfaces: string[];\n allowed_commands: string[];\n blocked_commands: string[];\n allowed_actions: string[];\n blocked_actions: string[];\n allowed_services: string[];\n blocked_services: string[];\n extension_overrides: ExtensionPolicyOverrideSettings[];\n}\n\nexport interface AgentGuidanceSettings {\n prompt_completed: boolean;\n declined: boolean;\n declined_at: string;\n template_version: number;\n last_checked_files: string[];\n}\n\nexport type SearchMutationRefreshPolicy = \"cache_only\" | \"semantic_configured\" | \"semantic_auto\";\n\nexport interface PmSettings {\n version: number;\n id_prefix: string;\n author_default: string;\n item_format: ItemFormat;\n locks: {\n ttl_seconds: number;\n };\n output: {\n default_format: \"toon\" | \"json\";\n };\n history: {\n missing_stream: \"auto_create\" | \"strict_error\";\n };\n validation: {\n sprint_release_format: SprintReleaseFormatPolicy;\n parent_reference: ParentReferencePolicy;\n metadata_profile: ValidateMetadataProfile;\n metadata_required_fields: ValidateMetadataRequiredField[];\n lifecycle_stale_blocker_reason_patterns: string[];\n lifecycle_closure_like_blocked_reason_patterns: string[];\n lifecycle_closure_like_resolution_patterns: string[];\n lifecycle_closure_like_actual_result_patterns: string[];\n };\n governance: GovernanceSettings;\n workflow: {\n definition_of_done: string[];\n };\n testing: {\n record_results_to_items: boolean;\n };\n telemetry: {\n enabled: boolean;\n first_run_prompt_completed: boolean;\n capture_level: \"minimal\" | \"redacted\" | \"max\";\n endpoint: string;\n installation_id: string;\n retention_days: number;\n };\n agent_guidance: AgentGuidanceSettings;\n item_types: {\n definitions: ItemTypeDefinition[];\n };\n schema: RuntimeSchemaSettings;\n extensions: {\n enabled: string[];\n disabled: string[];\n policy: ExtensionPolicySettings;\n };\n search: {\n score_threshold: number;\n hybrid_semantic_weight: number;\n max_results: number;\n embedding_model: string;\n embedding_batch_size: number;\n embedding_timeout_ms: number;\n scanner_max_batch_retries: number;\n provider?: string;\n mutation_refresh_policy: SearchMutationRefreshPolicy;\n tuning?: {\n title_exact_bonus?: number;\n title_weight?: number;\n description_weight?: number;\n tags_weight?: number;\n status_weight?: number;\n body_weight?: number;\n comments_weight?: number;\n notes_weight?: number;\n learnings_weight?: number;\n dependencies_weight?: number;\n linked_content_weight?: number;\n };\n };\n providers: {\n openai: {\n base_url: string;\n api_key: string;\n model: string;\n };\n ollama: {\n base_url: string;\n model: string;\n };\n };\n context: ContextSettings;\n vector_store: {\n adapter?: string;\n qdrant: {\n url: string;\n api_key: string;\n };\n lancedb: {\n path: string;\n };\n };\n}\n"],"names":[],"mappings":";;AAAA,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,MAAM;IACN,SAAS;IACT,MAAM;IACN,OAAO;IACP,OAAO;IACP,UAAU;IACV,OAAO;IACP,UAAU;IACV,WAAW;IACX,SAAS;IACT,MAAM;CACE,CAAC;AACX,MAAM,CAAC,MAAM,gBAAgB,GAAG,wBAAwB,CAAC;AAIzD,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO;IACP,MAAM;IACN,aAAa;IACb,SAAS;IACT,QAAQ;IACR,UAAU;CACF,CAAC;AAGX,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,OAAO;IACP,QAAQ;IAC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AAmB,GAAG,CAAC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,SAAS,CAAU,CAAC;AAG1F,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,SAAS;IACT,QAAQ;IACR,YAAY;IACZ,YAAY;IACZ,iBAAiB;IACjB,YAAY;IACZ,UAAU;IACV,YAAY;CACJ,CAAC;AAuQX,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,MAAM,CAAU,CAAC;AAG3E,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,WAAW;IACX,UAAU;IACV,UAAU;IACV,UAAU;IACV,OAAO;IACP,UAAU;IACV,WAAW;IACX,OAAO;CACC,CAAC","debugId":"026a0266-59b3-5570-af68-9a56d4113da2"}
|
|
1
|
+
{"version":3,"file":"types.js","sources":["types.ts"],"sourceRoot":"/","sourcesContent":["export const BUILTIN_ITEM_TYPE_VALUES = [\n \"Epic\",\n \"Feature\",\n \"Task\",\n \"Chore\",\n \"Issue\",\n \"Decision\",\n \"Event\",\n \"Reminder\",\n \"Milestone\",\n \"Meeting\",\n \"Plan\",\n] as const;\nexport const ITEM_TYPE_VALUES = BUILTIN_ITEM_TYPE_VALUES;\nexport type BuiltinItemType = (typeof BUILTIN_ITEM_TYPE_VALUES)[number];\nexport type ItemType = string;\n\nexport const STATUS_VALUES = [\n \"draft\",\n \"open\",\n \"in_progress\",\n \"blocked\",\n \"closed\",\n \"canceled\",\n] as const;\nexport type ItemStatus = string;\n\nexport const RUNTIME_STATUS_ROLE_VALUES = [\n \"draft\",\n \"active\",\n \"blocked\",\n \"terminal\",\n \"terminal_done\",\n \"terminal_canceled\",\n \"default_open\",\n \"default_close\",\n \"default_cancel\",\n] as const;\nexport type RuntimeStatusRole = (typeof RUNTIME_STATUS_ROLE_VALUES)[number];\n\nexport const RUNTIME_FIELD_TYPE_VALUES = [\"string\", \"number\", \"boolean\", \"string_array\"] as const;\nexport type RuntimeFieldType = (typeof RUNTIME_FIELD_TYPE_VALUES)[number];\n\nexport const RUNTIME_FIELD_COMMAND_VALUES = [\"create\", \"update\", \"update_many\", \"list\", \"search\", \"calendar\", \"context\"] as const;\nexport type RuntimeFieldCommand = (typeof RUNTIME_FIELD_COMMAND_VALUES)[number];\n\nexport const RUNTIME_UNKNOWN_FIELD_POLICY_VALUES = [\"allow\", \"warn\", \"reject\"] as const;\nexport type RuntimeUnknownFieldPolicy = (typeof RUNTIME_UNKNOWN_FIELD_POLICY_VALUES)[number];\n\nexport const DEPENDENCY_KIND_VALUES = [\n \"blocks\",\n \"parent\",\n \"child\",\n \"parent_child\",\n \"child_of\",\n \"related\",\n \"related_to\",\n \"discovered_from\",\n \"blocked_by\",\n \"incident_from\",\n \"epic\",\n \"supersedes\",\n \"task\",\n] as const;\nexport type DependencyKind = (typeof DEPENDENCY_KIND_VALUES)[number];\n\nexport const SCOPE_VALUES = [\"project\", \"global\"] as const;\nexport type LinkScope = (typeof SCOPE_VALUES)[number];\n\nexport const RISK_VALUES = [\"low\", \"medium\", \"high\", \"critical\"] as const;\nexport type RiskLevel = (typeof RISK_VALUES)[number];\n\nexport const ISSUE_SEVERITY_VALUES = [\"low\", \"medium\", \"high\", \"critical\"] as const;\nexport type IssueSeverity = (typeof ISSUE_SEVERITY_VALUES)[number];\n\nexport const CONFIDENCE_TEXT_VALUES = [\"low\", \"medium\", \"high\"] as const;\nexport type ConfidenceTextLevel = (typeof CONFIDENCE_TEXT_VALUES)[number];\nexport type ConfidenceValue = number | ConfidenceTextLevel;\n\nexport const ITEM_FORMAT_VALUES = [\"toon\", \"json_markdown\"] as const;\nexport type ItemFormat = (typeof ITEM_FORMAT_VALUES)[number];\n\nexport const SPRINT_RELEASE_FORMAT_POLICY_VALUES = [\"warn\", \"strict_error\"] as const;\nexport type SprintReleaseFormatPolicy = (typeof SPRINT_RELEASE_FORMAT_POLICY_VALUES)[number];\nexport const PARENT_REFERENCE_POLICY_VALUES = [\"warn\", \"strict_error\"] as const;\nexport type ParentReferencePolicy = (typeof PARENT_REFERENCE_POLICY_VALUES)[number];\nexport const VALIDATE_METADATA_PROFILE_VALUES = [\"core\", \"strict\", \"custom\"] as const;\nexport type ValidateMetadataProfile = (typeof VALIDATE_METADATA_PROFILE_VALUES)[number];\nexport const GOVERNANCE_PRESET_VALUES = [\"minimal\", \"default\", \"strict\", \"custom\"] as const;\nexport type GovernancePreset = (typeof GOVERNANCE_PRESET_VALUES)[number];\nexport const GOVERNANCE_OWNERSHIP_ENFORCEMENT_VALUES = [\"none\", \"warn\", \"strict\"] as const;\nexport type GovernanceOwnershipEnforcement = (typeof GOVERNANCE_OWNERSHIP_ENFORCEMENT_VALUES)[number];\nexport const GOVERNANCE_CREATE_MODE_DEFAULT_VALUES = [\"progressive\", \"strict\"] as const;\nexport type GovernanceCreateModeDefault = (typeof GOVERNANCE_CREATE_MODE_DEFAULT_VALUES)[number];\nexport const GOVERNANCE_CLOSE_VALIDATION_DEFAULT_VALUES = [\"off\", \"warn\", \"strict\"] as const;\nexport type GovernanceCloseValidationDefault = (typeof GOVERNANCE_CLOSE_VALIDATION_DEFAULT_VALUES)[number];\nexport const GOVERNANCE_WORKFLOW_ENFORCEMENT_VALUES = [\"off\", \"warn\", \"strict\"] as const;\nexport type GovernanceWorkflowEnforcement = (typeof GOVERNANCE_WORKFLOW_ENFORCEMENT_VALUES)[number];\nexport const VALIDATE_METADATA_REQUIRED_FIELD_VALUES = [\n \"author\",\n \"acceptance_criteria\",\n \"estimated_minutes\",\n \"close_reason\",\n \"reviewer\",\n \"risk\",\n \"confidence\",\n \"sprint\",\n \"release\",\n] as const;\nexport type ValidateMetadataRequiredField = (typeof VALIDATE_METADATA_REQUIRED_FIELD_VALUES)[number];\n\nexport const RECURRENCE_FREQUENCY_VALUES = [\"daily\", \"weekly\", \"monthly\", \"yearly\"] as const;\nexport type RecurrenceFrequency = (typeof RECURRENCE_FREQUENCY_VALUES)[number];\n\nexport const RECURRENCE_WEEKDAY_VALUES = [\"mon\", \"tue\", \"wed\", \"thu\", \"fri\", \"sat\", \"sun\"] as const;\nexport type RecurrenceWeekday = (typeof RECURRENCE_WEEKDAY_VALUES)[number];\n\n/**\n * Canonical week-order index for a recurrence weekday (mon=0 .. sun=6).\n * Shared by item serialization, create/update parsing, and calendar expansion\n * so weekday ordering cannot drift between those modules.\n */\nexport function weekdayOrderIndex(value: RecurrenceWeekday): number {\n return RECURRENCE_WEEKDAY_VALUES.indexOf(value);\n}\n\nexport interface Dependency {\n id: string;\n kind: DependencyKind;\n created_at: string;\n author?: string;\n source_kind?: string;\n}\n\nexport interface Comment {\n created_at: string;\n author: string;\n text: string;\n}\n\nexport interface LogNote {\n created_at: string;\n author: string;\n text: string;\n}\n\nexport interface LinkedFile {\n path: string;\n scope: LinkScope;\n note?: string;\n}\n\nexport interface LinkedTest {\n command?: string;\n path?: string;\n scope: LinkScope;\n timeout_seconds?: number;\n pm_context_mode?: \"schema\" | \"tracker\" | \"auto\";\n env_set?: Record<string, string>;\n env_clear?: string[];\n shared_host_safe?: boolean;\n assert_stdout_contains?: string[];\n assert_stdout_regex?: string[];\n assert_stderr_contains?: string[];\n assert_stderr_regex?: string[];\n assert_stdout_min_lines?: number;\n assert_json_field_equals?: Record<string, string>;\n assert_json_field_gte?: Record<string, number>;\n note?: string;\n}\n\nexport interface LinkedDoc {\n path: string;\n scope: LinkScope;\n note?: string;\n}\n\nexport interface Reminder {\n at: string;\n text: string;\n}\n\nexport interface RecurrenceRule {\n freq: RecurrenceFrequency;\n interval?: number;\n count?: number;\n until?: string;\n by_weekday?: RecurrenceWeekday[];\n by_month_day?: number[];\n exdates?: string[];\n}\n\nexport interface CalendarEvent {\n start_at: string;\n end_at?: string;\n title?: string;\n description?: string;\n location?: string;\n all_day?: boolean;\n timezone?: string;\n recurrence?: RecurrenceRule;\n}\n\nexport const PLAN_MODE_VALUES = [\n \"draft\",\n \"research\",\n \"review\",\n \"approved\",\n \"executing\",\n \"paused\",\n \"completed\",\n \"superseded\",\n] as const;\nexport type PlanMode = (typeof PLAN_MODE_VALUES)[number];\n\nexport const PLAN_STEP_STATUS_VALUES = [\n \"pending\",\n \"in_progress\",\n \"completed\",\n \"blocked\",\n \"skipped\",\n \"superseded\",\n] as const;\nexport type PlanStepStatus = (typeof PLAN_STEP_STATUS_VALUES)[number];\n\nexport const PLAN_HARNESS_VALUES = [\"codex\", \"claude-code\", \"cursor\", \"generic\"] as const;\nexport type PlanHarness = (typeof PLAN_HARNESS_VALUES)[number];\n\nexport const PLAN_STEP_LINK_KIND_VALUES = [\n \"related\",\n \"blocks\",\n \"blocked_by\",\n \"depends_on\",\n \"discovered_from\",\n \"implements\",\n \"verifies\",\n \"supersedes\",\n] as const;\nexport type PlanStepLinkKind = (typeof PLAN_STEP_LINK_KIND_VALUES)[number];\n\nexport interface PlanStepLink {\n id: string;\n kind: PlanStepLinkKind;\n note?: string;\n required_before_step?: boolean;\n}\n\nexport interface PlanStepFile {\n path: string;\n scope?: LinkScope;\n note?: string;\n}\n\nexport interface PlanStepTest {\n command?: string;\n path?: string;\n note?: string;\n}\n\nexport interface PlanStepDoc {\n path: string;\n scope?: LinkScope;\n note?: string;\n}\n\nexport interface PlanStep {\n id: string;\n order: number;\n title: string;\n body?: string;\n status: PlanStepStatus;\n owner?: string;\n evidence?: string;\n blocked_reason?: string;\n superseded_by?: string;\n linked_items?: PlanStepLink[];\n files?: PlanStepFile[];\n tests?: PlanStepTest[];\n docs?: PlanStepDoc[];\n created_at: string;\n updated_at: string;\n completed_at?: string;\n}\n\nexport interface PlanDecision {\n ts: string;\n author: string;\n decision: string;\n rationale?: string;\n evidence?: string;\n step_id?: string;\n}\n\nexport interface PlanDiscovery {\n ts: string;\n author: string;\n text: string;\n step_id?: string;\n}\n\nexport interface PlanValidationCheck {\n text: string;\n command?: string;\n expected?: string;\n}\n\nexport interface ItemTypeOptionDefinition {\n key: string;\n values: string[];\n required?: boolean;\n aliases?: string[];\n description?: string;\n}\n\nexport interface ItemTypeCommandOptionPolicy {\n command: \"create\" | \"update\";\n option: string;\n required?: boolean;\n visible?: boolean;\n enabled?: boolean;\n}\n\nexport interface ItemTypeDefinition {\n name: string;\n description?: string;\n /**\n * Status assigned to newly created items of this type when `--status` is not\n * provided. Falls back to the workflow's open status when unset or invalid.\n */\n default_status?: string;\n folder?: string;\n aliases?: string[];\n required_create_fields?: string[];\n required_create_repeatables?: string[];\n options?: ItemTypeOptionDefinition[];\n command_option_policies?: ItemTypeCommandOptionPolicy[];\n}\n\nexport interface RuntimeStatusDefinition {\n id: string;\n aliases?: string[];\n roles?: RuntimeStatusRole[];\n description?: string;\n order?: number;\n}\n\nexport interface RuntimeFieldDefinition {\n key: string;\n metadata_key?: string;\n /**\n * @deprecated Use metadata_key.\n */\n front_matter_key?: string;\n cli_flag?: string;\n cli_aliases?: string[];\n description?: string;\n type?: RuntimeFieldType;\n commands?: RuntimeFieldCommand[];\n repeatable?: boolean;\n required?: boolean;\n required_on_create?: boolean;\n required_types?: string[];\n allow_unset?: boolean;\n}\n\nexport interface RuntimeWorkflowDefinition {\n draft_status?: string;\n open_status?: string;\n in_progress_status?: string;\n blocked_status?: string;\n close_status?: string;\n canceled_status?: string;\n}\n\nexport interface RuntimeSchemaFileConfig {\n types?: string;\n statuses?: string;\n fields?: string;\n workflows?: string;\n}\n\n/**\n * Per-type allowed-transition rule. A type with no matching entry is\n * unrestricted; a type with an entry allows only the listed [from, to]\n * status pairs (status tokens are resolved case-insensitively through the\n * status registry alias map; a same-status no-op is always allowed).\n */\nexport interface TypeWorkflowDefinition {\n type: string;\n allowed_transitions: [string, string][];\n}\n\nexport interface RuntimeSchemaSettings {\n version: number;\n files: RuntimeSchemaFileConfig;\n statuses: RuntimeStatusDefinition[];\n fields: RuntimeFieldDefinition[];\n workflow: RuntimeWorkflowDefinition;\n type_workflows?: TypeWorkflowDefinition[];\n unknown_field_policy: RuntimeUnknownFieldPolicy;\n}\n\nexport interface ItemTestRunSummary {\n run_id: string;\n kind: \"test\" | \"test-all\";\n status: \"passed\" | \"failed\" | \"stopped\" | \"canceled\";\n started_at: string;\n finished_at: string;\n recorded_at: string;\n attempt?: number;\n resumed_from?: string;\n passed: number;\n failed: number;\n skipped: number;\n items?: number;\n linked_tests?: number;\n fail_on_skipped_triggered?: boolean;\n}\n\nexport interface ItemMetadata {\n id: string;\n title: string;\n description: string;\n type: ItemType;\n source_type?: string;\n type_options?: Record<string, string>;\n status: ItemStatus;\n priority: 0 | 1 | 2 | 3 | 4;\n tags: string[];\n created_at: string;\n updated_at: string;\n deadline?: string;\n reminders?: Reminder[];\n events?: CalendarEvent[];\n closed_at?: string;\n assignee?: string;\n source_owner?: string;\n author?: string;\n estimated_minutes?: number;\n acceptance_criteria?: string;\n design?: string;\n external_ref?: string;\n definition_of_ready?: string;\n order?: number;\n goal?: string;\n objective?: string;\n value?: string;\n impact?: string;\n outcome?: string;\n why_now?: string;\n parent?: string;\n reviewer?: string;\n risk?: RiskLevel;\n confidence?: ConfidenceValue;\n sprint?: string;\n release?: string;\n blocked_by?: string;\n blocked_reason?: string;\n unblock_note?: string;\n reporter?: string;\n severity?: IssueSeverity;\n environment?: string;\n repro_steps?: string;\n resolution?: string;\n expected_result?: string;\n actual_result?: string;\n affected_version?: string;\n fixed_version?: string;\n component?: string;\n regression?: boolean;\n customer_impact?: string;\n dependencies?: Dependency[];\n comments?: Comment[];\n notes?: LogNote[];\n learnings?: LogNote[];\n files?: LinkedFile[];\n tests?: LinkedTest[];\n test_runs?: ItemTestRunSummary[];\n docs?: LinkedDoc[];\n close_reason?: string;\n plan_mode?: PlanMode;\n plan_scope?: string;\n plan_harness?: PlanHarness;\n plan_steps?: PlanStep[];\n plan_decisions?: PlanDecision[];\n plan_discoveries?: PlanDiscovery[];\n plan_validation?: PlanValidationCheck[];\n plan_resume_context?: string;\n [key: string]: unknown;\n}\n\n/**\n * @deprecated Use ItemMetadata.\n */\nexport type ItemFrontMatter = ItemMetadata;\n\nexport interface ItemDocument {\n metadata: ItemMetadata;\n body: string;\n}\n\nexport interface HistoryPatchOp {\n op: \"add\" | \"remove\" | \"replace\" | \"move\" | \"copy\" | \"test\";\n path: string;\n from?: string;\n value?: unknown;\n}\n\nexport interface HistoryEntry {\n ts: string;\n author: string;\n op: string;\n patch: HistoryPatchOp[];\n before_hash: string;\n after_hash: string;\n message?: string;\n}\n\nexport const CONTEXT_DEPTH_VALUES = [\"brief\", \"standard\", \"deep\"] as const;\nexport type ContextDepth = (typeof CONTEXT_DEPTH_VALUES)[number];\n\nexport const CONTEXT_SECTION_VALUES = [\n \"hierarchy\",\n \"activity\",\n \"progress\",\n \"blockers\",\n \"files\",\n \"workload\",\n \"staleness\",\n \"tests\",\n] as const;\nexport type ContextSectionName = (typeof CONTEXT_SECTION_VALUES)[number];\n\nexport interface ContextSectionSettings {\n hierarchy: boolean;\n activity: boolean;\n progress: boolean;\n blockers: boolean;\n files: boolean;\n workload: boolean;\n staleness: boolean;\n tests: boolean;\n}\n\nexport interface ContextSettings {\n default_depth: ContextDepth;\n activity_limit: number;\n stale_threshold_days: number;\n sections: ContextSectionSettings;\n}\n\nexport interface GovernanceSettings {\n preset: GovernancePreset;\n ownership_enforcement: GovernanceOwnershipEnforcement;\n create_mode_default: GovernanceCreateModeDefault;\n close_validation_default: GovernanceCloseValidationDefault;\n parent_reference: ParentReferencePolicy;\n metadata_profile: ValidateMetadataProfile;\n force_required_for_stale_lock: boolean;\n create_default_type?: string;\n /**\n * Per-type allowed-transition enforcement mode for `pm update --status`.\n * Read raw from settings (not preset-derived) so existing projects are\n * unaffected when unset; defaults to \"off\".\n */\n workflow_enforcement?: GovernanceWorkflowEnforcement;\n}\n\nexport type ExtensionPolicyMode = \"off\" | \"warn\" | \"enforce\";\nexport type ExtensionTrustMode = \"off\" | \"warn\" | \"enforce\";\nexport type ExtensionSandboxProfile = \"none\" | \"restricted\" | \"strict\";\n\nexport interface ExtensionPolicyOverrideSettings {\n name: string;\n disabled?: boolean;\n require_trusted?: boolean;\n require_provenance?: boolean;\n sandbox_profile?: ExtensionSandboxProfile;\n allowed_capabilities?: string[];\n blocked_capabilities?: string[];\n allowed_surfaces?: string[];\n blocked_surfaces?: string[];\n allowed_commands?: string[];\n blocked_commands?: string[];\n allowed_actions?: string[];\n blocked_actions?: string[];\n allowed_services?: string[];\n blocked_services?: string[];\n}\n\nexport interface ExtensionPolicySettings {\n mode: ExtensionPolicyMode;\n trust_mode: ExtensionTrustMode;\n require_provenance: boolean;\n trusted_extensions: string[];\n default_sandbox_profile: ExtensionSandboxProfile;\n allowed_extensions: string[];\n blocked_extensions: string[];\n allowed_capabilities: string[];\n blocked_capabilities: string[];\n allowed_surfaces: string[];\n blocked_surfaces: string[];\n allowed_commands: string[];\n blocked_commands: string[];\n allowed_actions: string[];\n blocked_actions: string[];\n allowed_services: string[];\n blocked_services: string[];\n extension_overrides: ExtensionPolicyOverrideSettings[];\n}\n\nexport interface AgentGuidanceSettings {\n prompt_completed: boolean;\n declined: boolean;\n declined_at: string;\n template_version: number;\n last_checked_files: string[];\n}\n\nexport type SearchMutationRefreshPolicy = \"cache_only\" | \"semantic_configured\" | \"semantic_auto\";\n\nexport interface PmSettings {\n version: number;\n id_prefix: string;\n author_default: string;\n item_format: ItemFormat;\n locks: {\n ttl_seconds: number;\n };\n output: {\n default_format: \"toon\" | \"json\";\n };\n history: {\n missing_stream: \"auto_create\" | \"strict_error\";\n };\n validation: {\n sprint_release_format: SprintReleaseFormatPolicy;\n parent_reference: ParentReferencePolicy;\n metadata_profile: ValidateMetadataProfile;\n metadata_required_fields: ValidateMetadataRequiredField[];\n lifecycle_stale_blocker_reason_patterns: string[];\n lifecycle_closure_like_blocked_reason_patterns: string[];\n lifecycle_closure_like_resolution_patterns: string[];\n lifecycle_closure_like_actual_result_patterns: string[];\n };\n governance: GovernanceSettings;\n workflow: {\n definition_of_done: string[];\n };\n testing: {\n record_results_to_items: boolean;\n };\n telemetry: {\n enabled: boolean;\n first_run_prompt_completed: boolean;\n capture_level: \"minimal\" | \"redacted\" | \"max\";\n endpoint: string;\n installation_id: string;\n retention_days: number;\n };\n agent_guidance: AgentGuidanceSettings;\n item_types: {\n definitions: ItemTypeDefinition[];\n };\n schema: RuntimeSchemaSettings;\n extensions: {\n enabled: string[];\n disabled: string[];\n policy: ExtensionPolicySettings;\n };\n search: {\n score_threshold: number;\n hybrid_semantic_weight: number;\n max_results: number;\n embedding_model: string;\n embedding_batch_size: number;\n embedding_timeout_ms: number;\n scanner_max_batch_retries: number;\n provider?: string;\n mutation_refresh_policy: SearchMutationRefreshPolicy;\n tuning?: {\n title_exact_bonus?: number;\n title_weight?: number;\n description_weight?: number;\n tags_weight?: number;\n status_weight?: number;\n body_weight?: number;\n comments_weight?: number;\n notes_weight?: number;\n learnings_weight?: number;\n dependencies_weight?: number;\n linked_content_weight?: number;\n };\n };\n providers: {\n openai: {\n base_url: string;\n api_key: string;\n model: string;\n };\n ollama: {\n base_url: string;\n model: string;\n };\n };\n context: ContextSettings;\n vector_store: {\n adapter?: string;\n qdrant: {\n url: string;\n api_key: string;\n };\n lancedb: {\n path: string;\n };\n };\n}\n"],"names":[],"mappings":";;AAAA,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,MAAM;IACN,SAAS;IACT,MAAM;IACN,OAAO;IACP,OAAO;IACP,UAAU;IACV,OAAO;IACP,UAAU;IACV,WAAW;IACX,SAAS;IACT,MAAM;CACE,CAAC;AACX,MAAM,CAAC,MAAM,gBAAgB,GAAG,wBAAwB,CAAC;AAIzD,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO;IACP,MAAM;IACN,aAAa;IACb,SAAS;IACT,QAAQ;IACR,UAAU;CACF,CAAC;AAGX,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,OAAO;IACP,QAAQ;IACR,SAAS;IACT,UAAU;IACV,eAAe;IACf,mBAAmB;IACnB,cAAc;IACd,eAAe;IACf,gBAAgB;CACR,CAAC;AAGX,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,QAAQ,EAAE,QAAQ,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,CAAC;AAG1F,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,SAAS;IACT,QAAQ;IACR,YAAY;IACZ,YAAY;IACZ,iBAAiB;IACjB,YAAY;IACZ,UAAU;IACV,YAAY;CACJ,CAAC;AAyRX,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,MAAM,CAAU,CAAC;AAG3E,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,WAAW;IACX,UAAU;IACV,UAAU;IACV,UAAU;IACV,OAAO;IACP,UAAU;IACV,WAAW;IACX,OAAO;CACC,CAAC","debugId":"dd045bd8-53d3-51f9-8e24-1905c0ed6413"}
|
package/docs/AGENT_GUIDE.md
CHANGED
|
@@ -103,19 +103,26 @@ pm release <item-id>
|
|
|
103
103
|
|------|---------|
|
|
104
104
|
| Next work and agenda | `pm context --limit 10` |
|
|
105
105
|
| Relevant items | `pm search "<keywords>" --limit 10` |
|
|
106
|
+
| Open work only | `pm search "<keywords>" --status open` (drops closed-history noise; did-you-mean on typos) |
|
|
107
|
+
| Items changed since last window | `pm list-all --updated-after <prev-run-ISO> --brief` (relative `-2h`/`-7d` also work) |
|
|
106
108
|
| Single item | `pm get <id>` |
|
|
107
|
-
|
|
|
109
|
+
| Full machine payload | `pm get <id> --full --json` |
|
|
108
110
|
| Command flags | `pm <command> --help --json` |
|
|
109
111
|
| Low-noise machine contracts | `pm contracts --command <command> --flags-only --json` |
|
|
110
112
|
| Timeline | `pm activity --id <id> --limit 20` |
|
|
111
113
|
| Audited history redaction | `pm history-redact <id> --literal "<secret>" --replacement "[redacted]" --dry-run` |
|
|
112
114
|
| Audited history re-anchor | `pm history-repair <id> --dry-run` (clears drift flagged by `pm health`/`pm validate`) |
|
|
113
115
|
| Register custom item type | `pm schema add-type <Name> --description "<text>" --default-status open` (then `pm create <Name> "..."`) |
|
|
116
|
+
| Remove custom item type | `pm schema remove-type <Name>` (warns if items still use it; built-ins refused) |
|
|
117
|
+
| Register custom status | `pm schema add-status <id> --role <active\|terminal\|...> --alias <name> --order <n>` |
|
|
118
|
+
| Remove custom status | `pm schema remove-status <id>` (warns if items use it; built-in statuses refused) |
|
|
114
119
|
| Agent plan create | `pm plan create --title "<scope>" --harness claude-code --scope "<short>" --claim` |
|
|
115
120
|
| Agent plan step update | `pm plan update-step <plan-id> plan-step-001 --step-status in_progress --step-evidence "<short>"` |
|
|
116
121
|
| Agent plan read | `pm plan show <plan-id> --depth brief` (or `--fields id,title,steps_summary`) |
|
|
117
122
|
| Materialize plan steps | `pm plan materialize <plan-id> --steps plan-step-002 --materialize-type Task` |
|
|
118
123
|
| Dependencies | `pm deps <id> --format tree` |
|
|
124
|
+
| Bulk update by id allowlist | `pm update-many --ids pm-a,pm-b --priority 1 --dry-run` (preview, then drop `--dry-run`) |
|
|
125
|
+
| Audited bulk close (sprint closeout) | `pm close-many --filter-sprint <s> --reason "<text>" --dry-run` (full `pm close` semantics per item; `--rollback <id>` to undo) |
|
|
119
126
|
| Local docs routing | `pm install guide-shell --project`, then `pm guide <topic>` |
|
|
120
127
|
| Compact mutation echo | `pm --no-changed-fields create "..."` (drops the redundant `changed_fields` array, keeps `changed_field_count`) |
|
|
121
128
|
|
|
@@ -154,6 +161,18 @@ Use these defaults unless the task requires otherwise:
|
|
|
154
161
|
- `pm validate --check-resolution --check-history-drift` before closing broad work.
|
|
155
162
|
- `pm history-redact <id> --dry-run` before rewriting sensitive history payloads, then rerun without `--dry-run` once scope is confirmed.
|
|
156
163
|
- `pm history-repair <id> --dry-run` when `pm health` or `pm validate --check-history-drift` report drifted streams; it re-anchors the hash chain and reconciles with the on-disk item without touching item content. Rerun without `--dry-run` to apply.
|
|
157
|
-
- `pm schema
|
|
164
|
+
- `pm schema list` and `pm schema show <Type>` before creating custom-domain work; they show built-in, persisted custom, and extension-provided item types without reading schema files by hand.
|
|
165
|
+
- `pm schema add-type <Name>` when `pm create`/`pm update` reject a project-specific type as invalid; it registers the type in `.agents/pm/schema/types.json` so `pm create <Name> "..."` works. Built-in types are reserved; the upsert is idempotent. `pm schema remove-type <Name>` removes a custom type (warns, non-blocking, if items still use it).
|
|
166
|
+
- `pm schema add-status <id> --role <role>` / `pm schema remove-status <id>` manage custom lifecycle statuses in `.agents/pm/schema/statuses.json`; roles come from the runtime status-role vocabulary, the upsert is idempotent, and built-in default statuses cannot be removed. `pm schema list` now reports statuses (builtin vs custom) alongside types.
|
|
167
|
+
- `pm init --type-preset agile|ops|research` for new projects that should start with domain item types instead of generic tasks only.
|
|
158
168
|
- `pm normalize --dry-run --json` before lifecycle metadata cleanups.
|
|
159
169
|
- `pm health --check-only` when inspecting repository health without refresh side effects.
|
|
170
|
+
|
|
171
|
+
## Self-Repair Remediation
|
|
172
|
+
|
|
173
|
+
When gating on `pm health` / `pm validate`, read the executable fix command from the output instead of hardcoding a warning-code-to-command mapping:
|
|
174
|
+
|
|
175
|
+
- `pm health --json` per-check `details.remediation_map` maps each warning-code prefix to a `pm` fix command (for example `{ "history_drift_missing_stream": "pm history-repair <id>" }`). It is present in default/`--full` output and omitted in `--brief`/`--summary`.
|
|
176
|
+
- `pm validate --fix-hints` (read-only) adds `details.fix_hints[]` to each failing check — a uniform list of executable `pm` commands for that check's findings.
|
|
177
|
+
|
|
178
|
+
Both draw from the same remediation registry, so an agent can substitute the concrete `<id>` and run the command to auto-repair findings. Extension health checks expose their remediation under `details.triage.remediation` instead. See [Command Reference](COMMANDS.md#self-repair-remediation).
|