@unbrained/pm-cli 2026.6.9 → 2026.6.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/CHANGELOG.md +59 -0
- package/README.md +1 -1
- package/dist/cli/bootstrap-args.d.ts +11 -0
- package/dist/cli/bootstrap-args.js +90 -4
- package/dist/cli/bootstrap-args.js.map +1 -1
- package/dist/cli/commands/aggregate.d.ts +7 -0
- package/dist/cli/commands/aggregate.js +53 -12
- package/dist/cli/commands/aggregate.js.map +1 -1
- package/dist/cli/commands/close.d.ts +1 -0
- package/dist/cli/commands/close.js +106 -3
- package/dist/cli/commands/close.js.map +1 -1
- package/dist/cli/commands/completion.js +20 -7
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/context.d.ts +9 -0
- package/dist/cli/commands/context.js +149 -20
- package/dist/cli/commands/context.js.map +1 -1
- package/dist/cli/commands/contracts.d.ts +2 -0
- package/dist/cli/commands/contracts.js +9 -2
- package/dist/cli/commands/contracts.js.map +1 -1
- package/dist/cli/commands/create.d.ts +1 -0
- package/dist/cli/commands/create.js +5 -3
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/extension.js +4 -2
- package/dist/cli/commands/extension.js.map +1 -1
- package/dist/cli/commands/health.js +44 -6
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/history.js +6 -5
- package/dist/cli/commands/history.js.map +1 -1
- package/dist/cli/commands/linked-test-parsers.d.ts +1 -0
- package/dist/cli/commands/linked-test-parsers.js +289 -2
- package/dist/cli/commands/linked-test-parsers.js.map +1 -1
- package/dist/cli/commands/reindex.d.ts +1 -0
- package/dist/cli/commands/reindex.js +33 -4
- package/dist/cli/commands/reindex.js.map +1 -1
- package/dist/cli/commands/test.d.ts +6 -0
- package/dist/cli/commands/test.js +46 -5
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/error-guidance.d.ts +8 -0
- package/dist/cli/error-guidance.js +102 -2
- package/dist/cli/error-guidance.js.map +1 -1
- package/dist/cli/extension-command-help.d.ts +1 -0
- package/dist/cli/extension-command-help.js +42 -2
- package/dist/cli/extension-command-help.js.map +1 -1
- package/dist/cli/extension-command-options.d.ts +2 -0
- package/dist/cli/extension-command-options.js +51 -2
- package/dist/cli/extension-command-options.js.map +1 -1
- package/dist/cli/main.js +26 -26
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/register-list-query.js +3 -2
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +4 -2
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-operations.js +15 -6
- package/dist/cli/register-operations.js.map +1 -1
- package/dist/cli/registration-helpers.js +9 -2
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli-bundle/chunks/{activity-RUJATACW.js → activity-XADJOG6G.js} +11 -11
- package/dist/cli-bundle/chunks/activity-XZIUPGZH.js +16 -0
- package/dist/cli-bundle/chunks/{aggregate-TT7OCHHT.js → aggregate-6OTS3AOO.js} +65 -24
- package/dist/cli-bundle/chunks/aggregate-6OTS3AOO.js.map +1 -0
- package/dist/cli-bundle/chunks/{aggregate-IQ27NFBI.js → aggregate-OD36DJU5.js} +64 -23
- package/dist/cli-bundle/chunks/aggregate-OD36DJU5.js.map +7 -0
- package/dist/cli-bundle/chunks/{append-E7AJ5RTR.js → append-JYWO4P7W.js} +8 -8
- package/dist/cli-bundle/chunks/{append-CWQZBUWV.js → append-KG55G7S3.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-LF2VNLEZ.js → chunk-3KLPFWZ4.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-LF2VNLEZ.js.map → chunk-3KLPFWZ4.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ENCVPOID.js → chunk-3SLOMKCJ.js} +12 -12
- package/dist/cli-bundle/chunks/chunk-4HFU4UO2.js +518 -0
- package/dist/cli-bundle/chunks/chunk-4HFU4UO2.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-F2REA7VW.js → chunk-4JCSYR6F.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-CAXUGAAF.js → chunk-4YFAGDRH.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-U3Z4OCZC.js → chunk-5SCT2JCT.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NHRZSYAA.js → chunk-73ZPG2I3.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-D5D7VKIC.js → chunk-7IYFN5R7.js} +6 -5
- package/dist/cli-bundle/chunks/chunk-7IYFN5R7.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-A5342JVL.js → chunk-7RIT3OCD.js} +12 -12
- package/dist/cli-bundle/chunks/{chunk-LU54Z4QI.js → chunk-7UGSRQCL.js} +76 -74
- package/dist/cli-bundle/chunks/{chunk-LU54Z4QI.js.map → chunk-7UGSRQCL.js.map} +3 -3
- package/dist/cli-bundle/chunks/{chunk-5JF76OJF.js → chunk-A6LXQFO7.js} +290 -25
- package/dist/cli-bundle/chunks/chunk-A6LXQFO7.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-7CR4GAYN.js → chunk-ATEES5SX.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-FHUI7AXS.js → chunk-AVGHVVF7.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-T7B5VAKD.js → chunk-B65UUCGQ.js} +13 -6
- package/dist/cli-bundle/chunks/chunk-B65UUCGQ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-42IULX44.js → chunk-CCX4RSYZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-EFRHTZO4.js → chunk-CW6E4NAT.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-JN3BT7UY.js → chunk-DY6C42S6.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-PUSOAQCR.js → chunk-E5DUIJA4.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-E7LOIIFP.js → chunk-ESANVZF4.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-WQZCEEQN.js → chunk-EWFY7SLA.js} +157 -12
- package/dist/cli-bundle/chunks/chunk-EWFY7SLA.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-YI6W2DBN.js → chunk-F75JSIOZ.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-6IGTNFE3.js → chunk-FDH2X65L.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-GPOSGWCN.js → chunk-FXRU333M.js} +68 -7
- package/dist/cli-bundle/chunks/chunk-FXRU333M.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-C72IQIBT.js → chunk-FY4SPXSC.js} +302 -30
- package/dist/cli-bundle/chunks/chunk-FY4SPXSC.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-TLD3UYGY.js → chunk-GKIZW7SM.js} +5 -4
- package/dist/cli-bundle/chunks/chunk-GKIZW7SM.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-YSANBZAE.js → chunk-GWZSYR6X.js} +12 -5
- package/dist/cli-bundle/chunks/chunk-GWZSYR6X.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-FJNJEWU4.js → chunk-HGLC63AU.js} +14 -12
- package/dist/cli-bundle/chunks/chunk-HGLC63AU.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-RLVI7KDW.js → chunk-HHHJ2GI3.js} +163 -11
- package/dist/cli-bundle/chunks/chunk-HHHJ2GI3.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-AVGOVJGV.js → chunk-HI7STVF2.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-AVGOVJGV.js.map → chunk-HI7STVF2.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-ANKG2JKL.js → chunk-I2IJY2NL.js} +12 -5
- package/dist/cli-bundle/chunks/chunk-I2IJY2NL.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ZPXDD6RQ.js → chunk-I53JBTJW.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-23WNCJBA.js → chunk-I7NYDZDV.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-EQ6N6IDR.js → chunk-IGVJRZ6H.js} +13 -11
- package/dist/cli-bundle/chunks/chunk-IGVJRZ6H.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-JVMAOD54.js → chunk-IH4MBKK7.js} +14 -7
- package/dist/cli-bundle/chunks/chunk-IH4MBKK7.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-BIRVSIM2.js → chunk-IKOH24GZ.js} +14 -14
- package/dist/cli-bundle/chunks/chunk-IKOH24GZ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-SAUXUI6U.js → chunk-IUKD4W6Z.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-3RHE76G6.js → chunk-J3GD64J2.js} +15 -15
- package/dist/cli-bundle/chunks/chunk-J3GD64J2.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-OT6XAMO5.js → chunk-KWAXVAXX.js} +7 -5
- package/dist/cli-bundle/chunks/{chunk-OT6XAMO5.js.map → chunk-KWAXVAXX.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-SD6H3RLA.js → chunk-LCSCXBGT.js} +15 -5
- package/dist/cli-bundle/chunks/{chunk-SD6H3RLA.js.map → chunk-LCSCXBGT.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RKCJ2JMA.js → chunk-OASDW5UI.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-JEGFLKSI.js → chunk-OLKBSY4N.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4LRVXVJK.js → chunk-P2PSODAQ.js} +70 -9
- package/dist/cli-bundle/chunks/chunk-P2PSODAQ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-XEOO6K5J.js → chunk-P5BJOMBB.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-P2NVFE4L.js → chunk-P5U5EOMA.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-AM2AXVFS.js → chunk-PSD7F7DX.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-VDVVOLR6.js → chunk-QJMGRZO2.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-7YTWXGE3.js → chunk-QKW5D45B.js} +112 -7
- package/dist/cli-bundle/chunks/chunk-QKW5D45B.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-T7NWFVOA.js → chunk-QNJSITCX.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-MNXJ6YDO.js → chunk-RXAP6JL5.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-5MMLINZB.js → chunk-S26FESD4.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-I26E6XA7.js → chunk-S2ZLDYGS.js} +8 -6
- package/dist/cli-bundle/chunks/chunk-S2ZLDYGS.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-SXKNJPQ7.js +528 -0
- package/dist/cli-bundle/chunks/chunk-SXKNJPQ7.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-OPYA2HIU.js → chunk-TK5VZFHY.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-4TJWRPIH.js → chunk-TNAP7EJX.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-I4FGL3K2.js → chunk-UOO6BYIA.js} +16 -6
- package/dist/cli-bundle/chunks/chunk-UOO6BYIA.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-5ATRWEZO.js → chunk-UUWGCWBU.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-YX5LAKFJ.js → chunk-VAOUX6TK.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RMTI5R76.js → chunk-VFUZV5EB.js} +111 -6
- package/dist/cli-bundle/chunks/chunk-VFUZV5EB.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-WCWIDJII.js → chunk-VPEAS7PS.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RE2JQJZJ.js → chunk-VSRZRLG3.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-PW7C262O.js → chunk-WUNFKP7M.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-BACSNVWE.js → chunk-XJDGS74Y.js} +71 -69
- package/dist/cli-bundle/chunks/{chunk-BACSNVWE.js.map → chunk-XJDGS74Y.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-H37YPWLM.js → chunk-XMBI6TNW.js} +13 -7
- package/dist/cli-bundle/chunks/chunk-XMBI6TNW.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-NUGAWYEN.js → chunk-XTKJSVWH.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KDX6VC3P.js → chunk-XUC4C4PT.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-44JP4PYY.js → chunk-Y3YKK7CY.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KTVXLI54.js → chunk-YW6Q3RYZ.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-I3UILOUU.js → chunk-ZLMIWZUG.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-FKH7K6YP.js → chunk-ZMW77VWV.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-NJRZIJ4N.js → chunk-ZYNJNPYD.js} +14 -8
- package/dist/cli-bundle/chunks/chunk-ZYNJNPYD.js.map +1 -0
- package/dist/cli-bundle/chunks/{claim-UXFGCF3P.js → claim-2RDYMCTP.js} +10 -10
- package/dist/cli-bundle/chunks/{claim-RV6WYUF7.js → claim-MJ7DZFC3.js} +10 -10
- package/dist/cli-bundle/chunks/close-4FMAPEMY.js +13 -0
- package/dist/cli-bundle/chunks/{close-O4JK2JKD.js → close-XLEKIQSW.js} +8 -8
- package/dist/cli-bundle/chunks/{close-many-EQO4TPIE.js → close-many-AOD4HSAZ.js} +15 -15
- package/dist/cli-bundle/chunks/{close-many-SRDBV3SI.js → close-many-XKAQY5CQ.js} +15 -15
- package/dist/cli-bundle/chunks/{comments-TTZUIB2O.js → comments-B4RWWDJT.js} +10 -10
- package/dist/cli-bundle/chunks/{comments-OMB7YE27.js → comments-RN5TG4ZN.js} +10 -10
- package/dist/cli-bundle/chunks/{config-5VPR42A6.js → config-3JXJ3XZ7.js} +8 -8
- package/dist/cli-bundle/chunks/{config-NNLXVGVC.js → config-FZ4UDC4B.js} +8 -8
- package/dist/cli-bundle/chunks/{context-4QK6GRXO.js → context-L36PIN35.js} +146 -33
- package/dist/cli-bundle/chunks/{context-4QK6GRXO.js.map → context-L36PIN35.js.map} +2 -2
- package/dist/cli-bundle/chunks/{context-4N7GYTVQ.js → context-QBPO3BFM.js} +147 -34
- package/dist/cli-bundle/chunks/context-QBPO3BFM.js.map +1 -0
- package/dist/cli-bundle/chunks/{contracts-DXCWXOSP.js → contracts-3NKWYKKU.js} +309 -6
- package/dist/cli-bundle/chunks/contracts-3NKWYKKU.js.map +1 -0
- package/dist/cli-bundle/chunks/{contracts-AOBNEBVT.js → contracts-MIXBWJIB.js} +315 -5
- package/dist/cli-bundle/chunks/contracts-MIXBWJIB.js.map +7 -0
- package/dist/cli-bundle/chunks/{copy-5NM3SVJA.js → copy-ALU5WMHA.js} +7 -7
- package/dist/cli-bundle/chunks/{copy-XSYEQTLA.js → copy-FWIVTLBO.js} +7 -7
- package/dist/cli-bundle/chunks/{create-FCCAATQV.js → create-IFA26O2I.js} +13 -13
- package/dist/cli-bundle/chunks/create-JVXYHYH4.js +27 -0
- package/dist/cli-bundle/chunks/{delete-5JFP6OG7.js → delete-IYTIYAJS.js} +7 -7
- package/dist/cli-bundle/chunks/{delete-PQXJQXQ7.js → delete-Y2SGJBGY.js} +7 -7
- package/dist/cli-bundle/chunks/{deps-S5322EOQ.js → deps-6TSPOSGU.js} +7 -7
- package/dist/cli-bundle/chunks/{deps-XXKBOQUA.js → deps-CZ4PTVXU.js} +7 -7
- package/dist/cli-bundle/chunks/{docs-C7CCVWAJ.js → docs-5WMBVQT2.js} +9 -9
- package/dist/cli-bundle/chunks/{docs-DZRPAW5S.js → docs-MB53UJAJ.js} +9 -9
- package/dist/cli-bundle/chunks/{extension-CSHP6FZX.js → extension-Q34OEWO5.js} +5 -5
- package/dist/cli-bundle/chunks/{extension-XNNVUVAY.js → extension-WH2FOIOZ.js} +5 -5
- package/dist/cli-bundle/chunks/{files-UPCNKEIZ.js → files-DLB5LJEP.js} +9 -9
- package/dist/cli-bundle/chunks/{files-OBWYYPKM.js → files-GVMNVLCB.js} +9 -9
- package/dist/cli-bundle/chunks/{gc-FA2ONELT.js → gc-2WEPW6D6.js} +3 -3
- package/dist/cli-bundle/chunks/{gc-KXK6KBRN.js → gc-4Z3IKHAZ.js} +3 -3
- package/dist/cli-bundle/chunks/{get-PNTSONGB.js → get-PCHS7RA6.js} +11 -11
- package/dist/cli-bundle/chunks/{get-FLHYTOBA.js → get-QARTE6BL.js} +11 -11
- package/dist/cli-bundle/chunks/{health-CS5RNTJX.js → health-4ZYB3IYQ.js} +47 -19
- package/dist/cli-bundle/chunks/health-4ZYB3IYQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{health-KCRVYIYY.js → health-YO5LRWN4.js} +46 -18
- package/dist/cli-bundle/chunks/health-YO5LRWN4.js.map +7 -0
- package/dist/cli-bundle/chunks/{history-COQTPBEU.js → history-7WUAEWHW.js} +10 -10
- package/dist/cli-bundle/chunks/history-L2FQFRTU.js +20 -0
- package/dist/cli-bundle/chunks/{history-compact-PVS2A3FS.js → history-compact-3EJ3L2O7.js} +11 -11
- package/dist/cli-bundle/chunks/{history-compact-66PSRYL3.js → history-compact-LW27IPFK.js} +11 -11
- package/dist/cli-bundle/chunks/{history-redact-DCXAWGTF.js → history-redact-G72A4EJ4.js} +11 -11
- package/dist/cli-bundle/chunks/history-redact-QWQCX5DZ.js +19 -0
- package/dist/cli-bundle/chunks/{history-repair-SEQDFTGW.js → history-repair-KVPFJKOS.js} +11 -11
- package/dist/cli-bundle/chunks/{history-repair-TA3NRIFO.js → history-repair-RUGKD3YR.js} +11 -11
- package/dist/cli-bundle/chunks/init-4BKRHGWW.js +17 -0
- package/dist/cli-bundle/chunks/{init-IQJE3EKJ.js → init-S5WEGUJY.js} +9 -9
- package/dist/cli-bundle/chunks/{learnings-XC6EMW5E.js → learnings-HQXSSKZ5.js} +10 -10
- package/dist/cli-bundle/chunks/{learnings-RJPGH2ME.js → learnings-XK3P4ZDR.js} +10 -10
- package/dist/cli-bundle/chunks/{list-NJV6WBT4.js → list-6CL3XFT6.js} +10 -10
- package/dist/cli-bundle/chunks/list-BYNN4ZEO.js +19 -0
- package/dist/cli-bundle/chunks/{notes-2KWHADK3.js → notes-5T6P7C5V.js} +10 -10
- package/dist/cli-bundle/chunks/{notes-FNCDMZW2.js → notes-U5FZCSBT.js} +10 -10
- package/dist/cli-bundle/chunks/{plan-CYK2P5PD.js → plan-FQLMJRLZ.js} +13 -13
- package/dist/cli-bundle/chunks/{plan-MQO5JTSV.js → plan-VNUG3WZZ.js} +13 -13
- package/dist/cli-bundle/chunks/{register-list-query-6RA24SIZ.js → register-list-query-NPE3ECJQ.js} +21 -21
- package/dist/cli-bundle/chunks/register-list-query-NPE3ECJQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-list-query-IO3RR5K6.js → register-list-query-VHDXWEPP.js} +20 -20
- package/dist/cli-bundle/chunks/register-list-query-VHDXWEPP.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-mutation-VV2SC2KL.js → register-mutation-DG53FCBV.js} +36 -35
- package/dist/cli-bundle/chunks/register-mutation-DG53FCBV.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-KVFUXCAZ.js → register-mutation-EAYNLGOS.js} +35 -34
- package/dist/cli-bundle/chunks/register-mutation-EAYNLGOS.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-operations-DFNVRSJ5.js → register-operations-AM6KTWB6.js} +42 -37
- package/dist/cli-bundle/chunks/register-operations-AM6KTWB6.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-operations-TAUUTRJ4.js → register-operations-FWFE64JG.js} +41 -36
- package/dist/cli-bundle/chunks/register-operations-FWFE64JG.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-setup-X2R5CFDV.js → register-setup-G4QYI3RX.js} +15 -15
- package/dist/cli-bundle/chunks/{register-setup-GAQZZRUA.js → register-setup-IKX5524L.js} +15 -15
- package/dist/cli-bundle/chunks/restore-CHIOQAQL.js +17 -0
- package/dist/cli-bundle/chunks/{restore-E3GZKRRK.js → restore-M6AFHMV4.js} +11 -11
- package/dist/cli-bundle/chunks/{schema-3CPFLDAY.js → schema-76HDZJCC.js} +8 -8
- package/dist/cli-bundle/chunks/{schema-7EHBPNXM.js → schema-AINZ2IMM.js} +8 -8
- package/dist/cli-bundle/chunks/{search-OBZVYJJ2.js → search-JMLFQEPJ.js} +10 -10
- package/dist/cli-bundle/chunks/{search-2T3NCCUR.js → search-NL3TSCYB.js} +10 -10
- package/dist/cli-bundle/chunks/{stats-6LVK4JER.js → stats-BKXCBIGT.js} +7 -7
- package/dist/cli-bundle/chunks/{stats-ULGQACF7.js → stats-UBD56TGK.js} +7 -7
- package/dist/cli-bundle/chunks/{telemetry-HHKRTMZA.js → telemetry-N454RHG5.js} +4 -4
- package/dist/cli-bundle/chunks/{telemetry-6G27FLCP.js → telemetry-ZJXK3H7X.js} +4 -4
- package/dist/cli-bundle/chunks/{test-2PP4YBV6.js → test-BQAKIXAT.js} +14 -14
- package/dist/cli-bundle/chunks/test-O74JFUH5.js +32 -0
- package/dist/cli-bundle/chunks/{test-all-6Z272JRI.js → test-all-7LV3I6S5.js} +14 -14
- package/dist/cli-bundle/chunks/{test-all-NETGVNM6.js → test-all-TDYCCBA4.js} +14 -14
- package/dist/cli-bundle/chunks/{test-runs-M24WA6TI.js → test-runs-E64M6XS3.js} +5 -5
- package/dist/cli-bundle/chunks/{test-runs-CRPQVMMG.js → test-runs-LXZLULCI.js} +5 -5
- package/dist/cli-bundle/chunks/update-2EVXOC7V.js +21 -0
- package/dist/cli-bundle/chunks/update-5A2B6QYB.js +25 -0
- package/dist/cli-bundle/chunks/{update-many-JSRF5EH5.js → update-many-TUGU5YXQ.js} +22 -22
- package/dist/cli-bundle/chunks/{update-many-Y3HOL7WA.js → update-many-V4LA3C4H.js} +22 -22
- package/dist/cli-bundle/chunks/{upgrade-5RTQVKKE.js → upgrade-37F7JKES.js} +5 -5
- package/dist/cli-bundle/chunks/{upgrade-ECB6GH3M.js → upgrade-L32JA4TZ.js} +5 -5
- package/dist/cli-bundle/chunks/{validate-MCNMAXVA.js → validate-EQTT6WVX.js} +16 -16
- package/dist/cli-bundle/chunks/{validate-J6Q444SD.js → validate-XN4I4DPL.js} +16 -16
- package/dist/cli-bundle/main.js +276 -47
- package/dist/cli-bundle/main.js.map +2 -2
- package/dist/core/diagnostics/remediation.js +12 -2
- package/dist/core/diagnostics/remediation.js.map +1 -1
- package/dist/core/extensions/extension-policy.d.ts +14 -1
- package/dist/core/extensions/extension-policy.js +38 -3
- package/dist/core/extensions/extension-policy.js.map +1 -1
- package/dist/core/extensions/extension-types.d.ts +40 -1
- package/dist/core/extensions/extension-types.js +28 -2
- package/dist/core/extensions/extension-types.js.map +1 -1
- package/dist/core/extensions/loader.d.ts +6 -4
- package/dist/core/extensions/loader.js +67 -14
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/history/replay.d.ts +1 -1
- package/dist/core/history/replay.js +13 -4
- package/dist/core/history/replay.js.map +1 -1
- package/dist/core/output/mutation-projection.d.ts +2 -0
- package/dist/core/output/mutation-projection.js +9 -2
- package/dist/core/output/mutation-projection.js.map +1 -1
- package/dist/core/output/output.d.ts +2 -0
- package/dist/core/output/output.js +7 -3
- package/dist/core/output/output.js.map +1 -1
- package/dist/core/output/query-summary.d.ts +31 -0
- package/dist/core/output/query-summary.js +62 -0
- package/dist/core/output/query-summary.js.map +1 -0
- package/dist/core/shared/command-types.d.ts +1 -0
- package/dist/core/shared/command-types.js +2 -2
- package/dist/core/shared/command-types.js.map +1 -1
- package/dist/core/shared/constants.js +8 -4
- package/dist/core/shared/constants.js.map +1 -1
- package/dist/core/store/item-store.d.ts +1 -1
- package/dist/core/store/item-store.js +3 -3
- package/dist/core/store/item-store.js.map +1 -1
- package/dist/core/store/settings-read-cache.d.ts +15 -0
- package/dist/core/store/settings-read-cache.js +72 -0
- package/dist/core/store/settings-read-cache.js.map +1 -0
- package/dist/core/store/settings-validator.d.ts +4 -1
- package/dist/core/store/settings-validator.js +14 -2
- package/dist/core/store/settings-validator.js.map +1 -1
- package/dist/core/store/settings.js +166 -16
- package/dist/core/store/settings.js.map +1 -1
- package/dist/core/telemetry/runtime.d.ts +1 -0
- package/dist/core/telemetry/runtime.js +3 -3
- package/dist/core/telemetry/runtime.js.map +1 -1
- package/dist/core/test/run-selectors.d.ts +27 -0
- package/dist/core/test/run-selectors.js +110 -0
- package/dist/core/test/run-selectors.js.map +1 -0
- package/dist/mcp/server.js +76 -262
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tool-definitions.d.ts +27 -0
- package/dist/mcp/tool-definitions.js +330 -0
- package/dist/mcp/tool-definitions.js.map +1 -0
- package/dist/sdk/cli-contracts/commander-mutation-options.js +3 -2
- package/dist/sdk/cli-contracts/commander-mutation-options.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.js +3 -2
- package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +29 -2
- package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
- package/dist/sdk/cli-contracts.js +37 -5
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/index.js +2 -2
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/runtime.d.ts +6 -0
- package/dist/sdk/runtime.js +51 -3
- package/dist/sdk/runtime.js.map +1 -1
- package/dist/types.d.ts +4 -1
- package/dist/types.js +4 -2
- package/dist/types.js.map +1 -1
- package/docs/AGENT_GUIDE.md +7 -1
- package/docs/ARCHITECTURE.md +7 -0
- package/docs/CLAUDE_CODE_PLUGIN.md +2 -2
- package/docs/COMMANDS.md +38 -3
- package/docs/CONFIGURATION.md +1 -1
- package/docs/EXTENSIONS.md +55 -53
- package/docs/SDK.md +8 -2
- package/docs/TESTING.md +60 -0
- package/docs/schemas/extension-manifest.schema.json +120 -0
- package/marketplace.json +1 -1
- package/package.json +2 -2
- package/packages/pm-beads/extensions/beads/manifest.json +10 -0
- package/packages/pm-calendar/extensions/calendar/manifest.json +10 -0
- package/packages/pm-command-kit/README.md +72 -0
- package/packages/pm-command-kit/extensions/command-kit/index.js +181 -0
- package/packages/pm-command-kit/extensions/command-kit/index.ts +176 -0
- package/packages/pm-command-kit/extensions/command-kit/manifest.json +22 -0
- package/packages/pm-command-kit/package.json +53 -0
- package/packages/pm-governance-audit/extensions/governance-audit/manifest.json +10 -0
- package/packages/pm-guide-shell/extensions/guide-shell/manifest.json +10 -0
- package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/manifest.json +10 -0
- package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/manifest.json +10 -0
- package/packages/pm-search-advanced/extensions/search-advanced/index.js +6 -0
- package/packages/pm-search-advanced/extensions/search-advanced/index.ts +6 -0
- package/packages/pm-search-advanced/extensions/search-advanced/manifest.json +10 -0
- package/packages/pm-search-advanced/extensions/search-advanced/runtime.js +1 -0
- package/packages/pm-search-advanced/extensions/search-advanced/runtime.ts +1 -0
- package/packages/pm-templates/extensions/templates/manifest.json +10 -0
- package/packages/pm-todos/extensions/todos/manifest.json +10 -0
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-claude/README.md +7 -3
- package/plugins/pm-claude/commands/pm-init.md +1 -1
- package/plugins/pm-codex/README.md +2 -2
- package/dist/cli-bundle/chunks/activity-HF3VJYKH.js +0 -16
- package/dist/cli-bundle/chunks/aggregate-IQ27NFBI.js.map +0 -7
- package/dist/cli-bundle/chunks/aggregate-TT7OCHHT.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-3RHE76G6.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-4LRVXVJK.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5JF76OJF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-7YTWXGE3.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ANKG2JKL.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-BIRVSIM2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-C72IQIBT.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-D5D7VKIC.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-EQ6N6IDR.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-FJNJEWU4.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-GPOSGWCN.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-H37YPWLM.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-I26E6XA7.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-I4FGL3K2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-JVMAOD54.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-LU2HE272.js +0 -242
- package/dist/cli-bundle/chunks/chunk-LU2HE272.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-NJRZIJ4N.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-O4L7Z6LB.js +0 -252
- package/dist/cli-bundle/chunks/chunk-O4L7Z6LB.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-RLVI7KDW.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-RMTI5R76.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-T7B5VAKD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-TLD3UYGY.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-WQZCEEQN.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-YSANBZAE.js.map +0 -7
- package/dist/cli-bundle/chunks/close-JTTGW7TS.js +0 -13
- package/dist/cli-bundle/chunks/context-4N7GYTVQ.js.map +0 -1
- package/dist/cli-bundle/chunks/contracts-AOBNEBVT.js.map +0 -7
- package/dist/cli-bundle/chunks/contracts-DXCWXOSP.js.map +0 -1
- package/dist/cli-bundle/chunks/create-JAPLFDGJ.js +0 -27
- package/dist/cli-bundle/chunks/health-CS5RNTJX.js.map +0 -1
- package/dist/cli-bundle/chunks/health-KCRVYIYY.js.map +0 -7
- package/dist/cli-bundle/chunks/history-6624XISO.js +0 -20
- package/dist/cli-bundle/chunks/history-redact-ZRQTI7NB.js +0 -19
- package/dist/cli-bundle/chunks/init-ZVE2HMKK.js +0 -17
- package/dist/cli-bundle/chunks/list-OO5P472O.js +0 -19
- package/dist/cli-bundle/chunks/register-list-query-6RA24SIZ.js.map +0 -1
- package/dist/cli-bundle/chunks/register-list-query-IO3RR5K6.js.map +0 -7
- package/dist/cli-bundle/chunks/register-mutation-KVFUXCAZ.js.map +0 -7
- package/dist/cli-bundle/chunks/register-mutation-VV2SC2KL.js.map +0 -1
- package/dist/cli-bundle/chunks/register-operations-DFNVRSJ5.js.map +0 -1
- package/dist/cli-bundle/chunks/register-operations-TAUUTRJ4.js.map +0 -7
- package/dist/cli-bundle/chunks/restore-F4ALFV4D.js +0 -17
- package/dist/cli-bundle/chunks/test-PPOLRIBA.js +0 -32
- package/dist/cli-bundle/chunks/update-MCPCPMHV.js +0 -25
- package/dist/cli-bundle/chunks/update-O7TBOUVQ.js +0 -21
- /package/dist/cli-bundle/chunks/{activity-RUJATACW.js.map → activity-XADJOG6G.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-HF3VJYKH.js.map → activity-XZIUPGZH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-E7AJ5RTR.js.map → append-JYWO4P7W.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-CWQZBUWV.js.map → append-KG55G7S3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ENCVPOID.js.map → chunk-3SLOMKCJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-F2REA7VW.js.map → chunk-4JCSYR6F.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CAXUGAAF.js.map → chunk-4YFAGDRH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-U3Z4OCZC.js.map → chunk-5SCT2JCT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NHRZSYAA.js.map → chunk-73ZPG2I3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-A5342JVL.js.map → chunk-7RIT3OCD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7CR4GAYN.js.map → chunk-ATEES5SX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FHUI7AXS.js.map → chunk-AVGHVVF7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-42IULX44.js.map → chunk-CCX4RSYZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EFRHTZO4.js.map → chunk-CW6E4NAT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JN3BT7UY.js.map → chunk-DY6C42S6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PUSOAQCR.js.map → chunk-E5DUIJA4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-E7LOIIFP.js.map → chunk-ESANVZF4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YI6W2DBN.js.map → chunk-F75JSIOZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6IGTNFE3.js.map → chunk-FDH2X65L.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZPXDD6RQ.js.map → chunk-I53JBTJW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-23WNCJBA.js.map → chunk-I7NYDZDV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SAUXUI6U.js.map → chunk-IUKD4W6Z.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RKCJ2JMA.js.map → chunk-OASDW5UI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JEGFLKSI.js.map → chunk-OLKBSY4N.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XEOO6K5J.js.map → chunk-P5BJOMBB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-P2NVFE4L.js.map → chunk-P5U5EOMA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AM2AXVFS.js.map → chunk-PSD7F7DX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VDVVOLR6.js.map → chunk-QJMGRZO2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-T7NWFVOA.js.map → chunk-QNJSITCX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MNXJ6YDO.js.map → chunk-RXAP6JL5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5MMLINZB.js.map → chunk-S26FESD4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OPYA2HIU.js.map → chunk-TK5VZFHY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4TJWRPIH.js.map → chunk-TNAP7EJX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5ATRWEZO.js.map → chunk-UUWGCWBU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YX5LAKFJ.js.map → chunk-VAOUX6TK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WCWIDJII.js.map → chunk-VPEAS7PS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RE2JQJZJ.js.map → chunk-VSRZRLG3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PW7C262O.js.map → chunk-WUNFKP7M.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NUGAWYEN.js.map → chunk-XTKJSVWH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KDX6VC3P.js.map → chunk-XUC4C4PT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-44JP4PYY.js.map → chunk-Y3YKK7CY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KTVXLI54.js.map → chunk-YW6Q3RYZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-I3UILOUU.js.map → chunk-ZLMIWZUG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FKH7K6YP.js.map → chunk-ZMW77VWV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-UXFGCF3P.js.map → claim-2RDYMCTP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-RV6WYUF7.js.map → claim-MJ7DZFC3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-JTTGW7TS.js.map → close-4FMAPEMY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-O4JK2JKD.js.map → close-XLEKIQSW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-EQO4TPIE.js.map → close-many-AOD4HSAZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-SRDBV3SI.js.map → close-many-XKAQY5CQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-TTZUIB2O.js.map → comments-B4RWWDJT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-OMB7YE27.js.map → comments-RN5TG4ZN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{config-5VPR42A6.js.map → config-3JXJ3XZ7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{config-NNLXVGVC.js.map → config-FZ4UDC4B.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-5NM3SVJA.js.map → copy-ALU5WMHA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-XSYEQTLA.js.map → copy-FWIVTLBO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-FCCAATQV.js.map → create-IFA26O2I.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-JAPLFDGJ.js.map → create-JVXYHYH4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-5JFP6OG7.js.map → delete-IYTIYAJS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-PQXJQXQ7.js.map → delete-Y2SGJBGY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-S5322EOQ.js.map → deps-6TSPOSGU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-XXKBOQUA.js.map → deps-CZ4PTVXU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-C7CCVWAJ.js.map → docs-5WMBVQT2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-DZRPAW5S.js.map → docs-MB53UJAJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-CSHP6FZX.js.map → extension-Q34OEWO5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-XNNVUVAY.js.map → extension-WH2FOIOZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-UPCNKEIZ.js.map → files-DLB5LJEP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-OBWYYPKM.js.map → files-GVMNVLCB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-FA2ONELT.js.map → gc-2WEPW6D6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-KXK6KBRN.js.map → gc-4Z3IKHAZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{get-PNTSONGB.js.map → get-PCHS7RA6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{get-FLHYTOBA.js.map → get-QARTE6BL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-COQTPBEU.js.map → history-7WUAEWHW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-6624XISO.js.map → history-L2FQFRTU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-PVS2A3FS.js.map → history-compact-3EJ3L2O7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-66PSRYL3.js.map → history-compact-LW27IPFK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-DCXAWGTF.js.map → history-redact-G72A4EJ4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-ZRQTI7NB.js.map → history-redact-QWQCX5DZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-SEQDFTGW.js.map → history-repair-KVPFJKOS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-TA3NRIFO.js.map → history-repair-RUGKD3YR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-ZVE2HMKK.js.map → init-4BKRHGWW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-IQJE3EKJ.js.map → init-S5WEGUJY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-XC6EMW5E.js.map → learnings-HQXSSKZ5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-RJPGH2ME.js.map → learnings-XK3P4ZDR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-NJV6WBT4.js.map → list-6CL3XFT6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-OO5P472O.js.map → list-BYNN4ZEO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-2KWHADK3.js.map → notes-5T6P7C5V.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-FNCDMZW2.js.map → notes-U5FZCSBT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-CYK2P5PD.js.map → plan-FQLMJRLZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-MQO5JTSV.js.map → plan-VNUG3WZZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-setup-X2R5CFDV.js.map → register-setup-G4QYI3RX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-setup-GAQZZRUA.js.map → register-setup-IKX5524L.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-F4ALFV4D.js.map → restore-CHIOQAQL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-E3GZKRRK.js.map → restore-M6AFHMV4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-3CPFLDAY.js.map → schema-76HDZJCC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-7EHBPNXM.js.map → schema-AINZ2IMM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-OBZVYJJ2.js.map → search-JMLFQEPJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-2T3NCCUR.js.map → search-NL3TSCYB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-6LVK4JER.js.map → stats-BKXCBIGT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-ULGQACF7.js.map → stats-UBD56TGK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{telemetry-HHKRTMZA.js.map → telemetry-N454RHG5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{telemetry-6G27FLCP.js.map → telemetry-ZJXK3H7X.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-2PP4YBV6.js.map → test-BQAKIXAT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-PPOLRIBA.js.map → test-O74JFUH5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-all-6Z272JRI.js.map → test-all-7LV3I6S5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-all-NETGVNM6.js.map → test-all-TDYCCBA4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-M24WA6TI.js.map → test-runs-E64M6XS3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-CRPQVMMG.js.map → test-runs-LXZLULCI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-O7TBOUVQ.js.map → update-2EVXOC7V.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-MCPCPMHV.js.map → update-5A2B6QYB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-JSRF5EH5.js.map → update-many-TUGU5YXQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-Y3HOL7WA.js.map → update-many-V4LA3C4H.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{upgrade-5RTQVKKE.js.map → upgrade-37F7JKES.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{upgrade-ECB6GH3M.js.map → upgrade-L32JA4TZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{validate-MCNMAXVA.js.map → validate-EQTT6WVX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{validate-J6Q444SD.js.map → validate-XN4I4DPL.js.map} +0 -0
|
@@ -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]="96f92147-d769-57ff-a0e3-387c90152c9e")}catch(e){}}();
|
|
3
3
|
export const KNOWN_EXTENSION_CAPABILITIES = [
|
|
4
4
|
"commands",
|
|
5
5
|
"renderers",
|
|
@@ -24,6 +24,7 @@ export const EXTENSION_CAPABILITY_CONTRACT = Object.freeze({
|
|
|
24
24
|
export const KNOWN_EXTENSION_POLICY_MODES = ["off", "warn", "enforce"];
|
|
25
25
|
export const KNOWN_EXTENSION_TRUST_MODES = ["off", "warn", "enforce"];
|
|
26
26
|
export const KNOWN_EXTENSION_SANDBOX_PROFILES = ["none", "restricted", "strict"];
|
|
27
|
+
export const KNOWN_PM_MAX_VERSION_EXCEEDED_MODES = ["block", "warn"];
|
|
27
28
|
export const KNOWN_EXTENSION_POLICY_SURFACES = [
|
|
28
29
|
"commands.override",
|
|
29
30
|
"commands.handler",
|
|
@@ -77,5 +78,30 @@ export function createDefaultExtensionGovernancePolicy() {
|
|
|
77
78
|
extension_overrides: [],
|
|
78
79
|
};
|
|
79
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* Author-facing `manifest.json` fields recognized by the extension loader, plus
|
|
83
|
+
* `$schema` (tolerated for inline IDE validation against
|
|
84
|
+
* `docs/schemas/extension-manifest.schema.json`). `legacy_capability_aliases`
|
|
85
|
+
* is loader-derived, never authored, so it is intentionally absent. A
|
|
86
|
+
* governance test keeps the published JSON Schema's `properties` in sync with
|
|
87
|
+
* this list.
|
|
88
|
+
*/
|
|
89
|
+
export const KNOWN_EXTENSION_MANIFEST_FIELDS = Object.freeze([
|
|
90
|
+
"$schema",
|
|
91
|
+
"name",
|
|
92
|
+
"version",
|
|
93
|
+
"entry",
|
|
94
|
+
"priority",
|
|
95
|
+
"manifest_version",
|
|
96
|
+
"pm_min_version",
|
|
97
|
+
"pm_max_version",
|
|
98
|
+
"engines",
|
|
99
|
+
"trusted",
|
|
100
|
+
"provenance",
|
|
101
|
+
"sandbox_profile",
|
|
102
|
+
"permissions",
|
|
103
|
+
"capabilities",
|
|
104
|
+
"activation",
|
|
105
|
+
]);
|
|
80
106
|
//# sourceMappingURL=extension-types.js.map
|
|
81
|
-
//# debugId=
|
|
107
|
+
//# debugId=96f92147-d769-57ff-a0e3-387c90152c9e
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extension-types.js","sources":["core/extensions/extension-types.ts"],"sourceRoot":"/","sourcesContent":["import type {\n ExtensionPolicyOverrideSettings,\n ExtensionPolicySettings,\n ItemDocument,\n ItemFrontMatter,\n ItemStatus,\n PmSettings,\n} from \"../../types/index.js\";\nimport type { GlobalOptions } from \"../shared/command-types.js\";\n\nexport const KNOWN_EXTENSION_CAPABILITIES = [\n \"commands\",\n \"renderers\",\n \"hooks\",\n \"schema\",\n \"importers\",\n \"search\",\n \"parser\",\n \"preflight\",\n \"services\",\n] as const;\nexport type ExtensionCapability = (typeof KNOWN_EXTENSION_CAPABILITIES)[number];\nexport const EXTENSION_CAPABILITY_CONTRACT_VERSION = 2;\nexport const EXTENSION_CAPABILITY_LEGACY_ALIASES: Readonly<Record<string, ExtensionCapability>> = Object.freeze({\n migration: \"schema\",\n validation: \"schema\",\n});\nexport const EXTENSION_CAPABILITY_CONTRACT = Object.freeze({\n version: EXTENSION_CAPABILITY_CONTRACT_VERSION,\n capabilities: [...KNOWN_EXTENSION_CAPABILITIES],\n legacy_aliases: { ...EXTENSION_CAPABILITY_LEGACY_ALIASES },\n});\n\nexport const KNOWN_EXTENSION_POLICY_MODES = [\"off\", \"warn\", \"enforce\"] as const;\nexport type ExtensionPolicyMode = (typeof KNOWN_EXTENSION_POLICY_MODES)[number];\nexport const KNOWN_EXTENSION_TRUST_MODES = [\"off\", \"warn\", \"enforce\"] as const;\nexport type ExtensionTrustMode = (typeof KNOWN_EXTENSION_TRUST_MODES)[number];\nexport const KNOWN_EXTENSION_SANDBOX_PROFILES = [\"none\", \"restricted\", \"strict\"] as const;\nexport type ExtensionSandboxProfile = (typeof KNOWN_EXTENSION_SANDBOX_PROFILES)[number];\n\nexport const KNOWN_EXTENSION_POLICY_SURFACES = [\n \"commands.override\",\n \"commands.handler\",\n \"hooks.beforecommand\",\n \"hooks.aftercommand\",\n \"hooks.onwrite\",\n \"hooks.onread\",\n \"hooks.onindex\",\n \"schema.flags\",\n \"schema.itemfields\",\n \"schema.itemtypes\",\n \"schema.migrations\",\n \"parser.override\",\n \"preflight.override\",\n \"services.override\",\n \"renderers.override\",\n \"importers.importer\",\n \"importers.exporter\",\n \"search.provider\",\n \"search.vectorstore\",\n] as const;\nexport type ExtensionPolicySurface = (typeof KNOWN_EXTENSION_POLICY_SURFACES)[number];\n\nexport const KNOWN_EXTENSION_SERVICE_NAMES = [\n \"output_format\",\n \"error_format\",\n \"help_format\",\n \"lock_acquire\",\n \"lock_release\",\n \"history_append\",\n \"item_store_write\",\n \"item_store_delete\",\n] as const;\nexport type ExtensionServiceName = (typeof KNOWN_EXTENSION_SERVICE_NAMES)[number];\n\nexport interface ExtensionProvenanceMetadata {\n source?: string;\n signature?: string;\n attestation?: string;\n verified?: boolean;\n}\n\nexport interface ExtensionRuntimePermissionDeclaration {\n fs_read?: boolean;\n fs_write?: boolean;\n network?: boolean;\n env_read?: boolean;\n env_write?: boolean;\n process_spawn?: boolean;\n}\n\nexport interface ExtensionActivationMetadata {\n commands?: string[];\n}\n\nexport type ExtensionPolicyOverride = ExtensionPolicyOverrideSettings;\nexport type ExtensionGovernancePolicy = ExtensionPolicySettings;\n\nexport interface ExtensionManifestEngines {\n pm?: string;\n node?: string;\n [engine: string]: string | undefined;\n}\n\nexport function createDefaultExtensionGovernancePolicy(): ExtensionGovernancePolicy {\n return {\n mode: \"off\",\n trust_mode: \"off\",\n require_provenance: false,\n trusted_extensions: [],\n default_sandbox_profile: \"none\",\n allowed_extensions: [],\n blocked_extensions: [],\n allowed_capabilities: [],\n blocked_capabilities: [],\n allowed_surfaces: [],\n blocked_surfaces: [],\n allowed_commands: [],\n blocked_commands: [],\n allowed_actions: [],\n blocked_actions: [],\n allowed_services: [],\n blocked_services: [],\n extension_overrides: [],\n };\n}\n\nexport type ExtensionLayer = \"global\" | \"project\";\nexport type ExtensionStatus = \"ok\" | \"warn\";\n\nexport interface ExtensionManifest {\n name: string;\n version: string;\n entry: string;\n priority: number;\n capabilities: string[];\n manifest_version?: number;\n pm_min_version?: string;\n pm_max_version?: string;\n engines?: ExtensionManifestEngines;\n trusted?: boolean;\n provenance?: ExtensionProvenanceMetadata;\n sandbox_profile?: ExtensionSandboxProfile;\n permissions?: ExtensionRuntimePermissionDeclaration;\n activation?: ExtensionActivationMetadata;\n legacy_capability_aliases?: LegacyExtensionCapabilityAliasMapping[];\n}\n\nexport interface ExtensionDiagnostic {\n layer: ExtensionLayer;\n directory: string;\n manifest_path: string;\n name: string | null;\n version: string | null;\n entry: string | null;\n priority: number | null;\n entry_path: string | null;\n enabled: boolean | null;\n status: ExtensionStatus;\n}\n\nexport interface EffectiveExtension {\n layer: ExtensionLayer;\n directory: string;\n manifest_path: string;\n name: string;\n source_package?: string;\n version: string;\n entry: string;\n priority: number;\n entry_path: string;\n manifest_version?: number;\n pm_min_version?: string;\n pm_max_version?: string;\n engines?: ExtensionManifestEngines;\n trusted?: boolean;\n provenance?: ExtensionProvenanceMetadata;\n sandbox_profile?: ExtensionSandboxProfile;\n permissions?: ExtensionRuntimePermissionDeclaration;\n capabilities?: string[];\n activation?: ExtensionActivationMetadata;\n}\n\nexport interface ExtensionDiscoveryResult {\n disabled_by_flag: boolean;\n roots: {\n global: string;\n project: string;\n };\n configured_enabled: string[];\n configured_disabled: string[];\n discovered: ExtensionDiagnostic[];\n effective: EffectiveExtension[];\n warnings: string[];\n policy: ExtensionGovernancePolicy;\n}\n\nexport interface LoadedExtension extends EffectiveExtension {\n module: unknown;\n}\n\nexport interface FailedExtensionLoad {\n layer: ExtensionLayer;\n name: string;\n entry_path: string;\n error: string;\n}\n\nexport interface ExtensionLoadResult extends ExtensionDiscoveryResult {\n loaded: LoadedExtension[];\n failed: FailedExtensionLoad[];\n}\n\nexport interface BeforeCommandHookContext {\n command: string;\n args: string[];\n options?: Record<string, unknown>;\n global?: GlobalOptions;\n pm_root: string;\n}\n\nexport interface AfterCommandHookContext extends BeforeCommandHookContext {\n ok: boolean;\n error?: string;\n result?: unknown;\n affected?: AfterCommandAffectedItem[];\n}\n\nexport interface AfterCommandAffectedItem {\n id: string;\n op?: string;\n item_type?: string;\n previous_status?: ItemStatus;\n status?: ItemStatus;\n previous?: Partial<ItemFrontMatter>;\n current?: Partial<ItemFrontMatter>;\n changed_fields?: string[];\n}\n\nexport interface OnWriteHookContext {\n path: string;\n scope: \"project\" | \"global\";\n op: string;\n item_id?: string;\n item_type?: string;\n before?: ItemDocument;\n after?: ItemDocument;\n changed_fields?: string[];\n}\n\nexport interface OnReadHookContext {\n path: string;\n scope: \"project\" | \"global\";\n}\n\nexport interface OnIndexHookContext {\n mode: string;\n total_items?: number;\n}\n\nexport type BeforeCommandHook = (context: BeforeCommandHookContext) => Promise<void> | void;\nexport type AfterCommandHook = (context: AfterCommandHookContext) => Promise<void> | void;\nexport type OnWriteHook = (context: OnWriteHookContext) => Promise<void> | void;\nexport type OnReadHook = (context: OnReadHookContext) => Promise<void> | void;\nexport type OnIndexHook = (context: OnIndexHookContext) => Promise<void> | void;\nexport type OutputRendererFormat = \"toon\" | \"json\";\nexport type CommandOverride = (context: CommandOverrideContext) => unknown;\nexport type RendererOverride = (context: RendererOverrideContext) => string | null | undefined;\nexport type CommandHandler = (context: CommandHandlerContext) => unknown;\nexport type ParserOverride = (context: ParserOverrideContext) => ParserOverrideDelta | Promise<ParserOverrideDelta>;\nexport type PreflightOverride = (context: PreflightOverrideContext) => PreflightOverrideDelta | Promise<PreflightOverrideDelta>;\nexport type ServiceOverride = (context: ServiceOverrideContext) => unknown;\n\nexport interface RegisteredExtensionHook<THook> {\n layer: ExtensionLayer;\n name: string;\n run: THook;\n}\n\nexport interface ExtensionHookRegistry {\n beforeCommand: Array<RegisteredExtensionHook<BeforeCommandHook>>;\n afterCommand: Array<RegisteredExtensionHook<AfterCommandHook>>;\n onWrite: Array<RegisteredExtensionHook<OnWriteHook>>;\n onRead: Array<RegisteredExtensionHook<OnReadHook>>;\n onIndex: Array<RegisteredExtensionHook<OnIndexHook>>;\n}\n\nexport interface CommandOverrideContext {\n command: string;\n args: string[];\n options?: Record<string, unknown>;\n global?: GlobalOptions;\n pm_root: string;\n result: unknown;\n}\n\nexport interface RendererOverrideContext {\n format: OutputRendererFormat;\n command?: string;\n args?: string[];\n options?: Record<string, unknown>;\n global?: GlobalOptions;\n pm_root?: string;\n result: unknown;\n}\n\nexport interface CommandHandlerContext {\n command: string;\n args: string[];\n options: Record<string, unknown>;\n global: GlobalOptions;\n pm_root: string;\n}\n\nexport interface ParserOverrideContext extends CommandHandlerContext {}\n\nexport interface ParserOverrideDelta {\n args?: string[];\n options?: Record<string, unknown>;\n global?: GlobalOptions;\n}\n\nexport interface PreflightOverrideContext extends CommandHandlerContext {\n decision: PreflightRuntimeDecision;\n}\n\nexport interface PreflightRuntimeDecision {\n enforce_item_format_gate: boolean;\n run_preflight_item_format_sync: boolean;\n run_extension_migrations: boolean;\n enforce_mandatory_migration_gate: boolean;\n}\n\nexport interface PreflightOverrideDelta extends ParserOverrideDelta {\n enforce_item_format_gate?: boolean;\n run_preflight_item_format_sync?: boolean;\n run_extension_migrations?: boolean;\n enforce_mandatory_migration_gate?: boolean;\n}\n\nexport interface ServiceOverrideContext {\n service: ExtensionServiceName;\n command?: string;\n args?: string[];\n options?: Record<string, unknown>;\n global?: GlobalOptions;\n pm_root?: string;\n payload: unknown;\n}\n\nexport interface ExtensionCommandArgumentDefinition {\n name: string;\n required?: boolean;\n variadic?: boolean;\n description?: string;\n}\n\nexport interface CommandDefinition {\n name: string;\n run?: CommandHandler;\n /**\n * @deprecated Use `run` instead. This alias remains for backward compatibility.\n */\n handler?: CommandHandler;\n action?: string;\n description?: string;\n intent?: string;\n examples?: string[];\n failure_hints?: string[];\n arguments?: ExtensionCommandArgumentDefinition[];\n flags?: FlagDefinition[];\n}\n\n/**\n * Optional command-definition metadata for first-class importer/exporter\n * registration.\n *\n * `registerImporter`/`registerExporter` always create a `<name> import` /\n * `<name> export` command path. By default that path only has a handler. When\n * these options are supplied, the auto-created command also gains a full command\n * definition (description, flags, intent, examples, failure hints, positional\n * arguments) — surfaced in help and runtime contracts exactly like\n * `registerCommand`. The registration `name` and `run` handler are implicit, so\n * they are not part of this options object.\n */\nexport interface ImportExportRegistrationOptions {\n action?: string;\n description?: string;\n intent?: string;\n examples?: string[];\n failure_hints?: string[];\n arguments?: ExtensionCommandArgumentDefinition[];\n flags?: FlagDefinition[];\n}\n\nexport type FlagValueType = \"string\" | \"number\" | \"boolean\";\n\nexport interface FlagDefinition {\n long?: string;\n short?: string;\n value_name?: string;\n description?: string;\n required?: boolean;\n enabled?: boolean;\n visible?: boolean;\n /**\n * Canonical flag value type. Prefer this field; it is the one runtime\n * contracts and help output read first.\n */\n value_type?: FlagValueType;\n /**\n * @deprecated Use `value_type`. Retained for backward compatibility: when\n * both are present `value_type` wins, and `type` resolves only when\n * `value_type` is absent (`value_type ?? type`).\n */\n type?: FlagValueType;\n /**\n * When true, a repeated comma-list flag accumulates values across repeats\n * — parity with core list flags such as `--tags` — instead of the last\n * value winning. Mirrors the core `CliFlagContract.list` field so\n * extension-registered list flags coalesce through the same bootstrap path.\n */\n list?: boolean;\n /**\n * Default value applied when the flag is omitted. Surfaced to runtime\n * contracts and help output. A `list` flag may default to an array of scalars\n * (e.g. `[\"a\", \"b\"]`); the array is flattened/coerced like any list value.\n */\n default?: string | number | boolean | Array<string | number | boolean>;\n [key: string]: unknown;\n}\n\nexport interface SchemaFieldDefinition {\n name: string;\n type: string;\n optional?: boolean;\n [key: string]: unknown;\n}\n\nexport interface SchemaItemTypeCommandOptionPolicyDefinition {\n command: string;\n option: string;\n enabled?: boolean;\n required?: boolean;\n visible?: boolean;\n [key: string]: unknown;\n}\n\nexport interface SchemaItemTypeOptionDefinition {\n key: string;\n values?: string[];\n required?: boolean;\n aliases?: string[];\n [key: string]: unknown;\n}\n\nexport interface SchemaItemTypeDefinition {\n name: string;\n folder?: string;\n aliases?: string[];\n required_create_fields?: string[];\n required_create_repeatables?: string[];\n command_option_policies?: SchemaItemTypeCommandOptionPolicyDefinition[];\n options?: SchemaItemTypeOptionDefinition[];\n [key: string]: unknown;\n}\n\nexport interface SchemaMigrationRunContext {\n id: string;\n command: \"migration\";\n layer: ExtensionLayer;\n extension: string;\n pm_root: string;\n status: string;\n}\n\nexport type SchemaMigrationRunner = (context: SchemaMigrationRunContext) => unknown | Promise<unknown>;\n\nexport interface SchemaMigrationDefinition {\n id?: string;\n description?: string;\n status?: string;\n mandatory?: boolean;\n run?: SchemaMigrationRunner;\n [key: string]: unknown;\n}\n\nexport interface ImportExportContext {\n registration: string;\n action: \"import\" | \"export\";\n command: string;\n args: string[];\n options: Record<string, unknown>;\n global: GlobalOptions;\n pm_root: string;\n}\n\nexport type Importer = (context: ImportExportContext) => unknown | Promise<unknown>;\nexport type Exporter = (context: ImportExportContext) => unknown | Promise<unknown>;\n\nexport type ExtensionSearchMode = \"keyword\" | \"semantic\" | \"hybrid\";\n\nexport interface SearchProviderQueryContext {\n query: string;\n mode: ExtensionSearchMode;\n tokens: string[];\n options: Record<string, unknown>;\n settings: PmSettings;\n documents: ItemDocument[];\n [key: string]: unknown;\n}\n\nexport interface SearchProviderHit {\n id: string;\n score: number;\n matched_fields?: string[];\n [key: string]: unknown;\n}\n\nexport type SearchProviderQueryResult = SearchProviderHit[] | { hits?: SearchProviderHit[] };\n\nexport interface SearchProviderQueryExpansionContext {\n query: string;\n mode: Exclude<ExtensionSearchMode, \"keyword\">;\n settings: PmSettings;\n [key: string]: unknown;\n}\n\nexport type SearchProviderQueryExpansionResult = string[] | { queries?: string[] };\n\nexport interface SearchProviderRerankCandidate {\n id: string;\n text: string;\n score: number;\n}\n\nexport interface SearchProviderRerankHit {\n id: string;\n score: number;\n}\n\nexport type SearchProviderRerankResult = SearchProviderRerankHit[] | { hits?: SearchProviderRerankHit[] };\n\nexport interface SearchProviderRerankContext {\n query: string;\n mode: \"hybrid\";\n model: string;\n top_k: number;\n settings: PmSettings;\n candidates: SearchProviderRerankCandidate[];\n [key: string]: unknown;\n}\n\nexport interface SearchProviderEmbedBatchContext {\n inputs: string[];\n settings: PmSettings;\n model: string;\n [key: string]: unknown;\n}\n\nexport interface SearchProviderEmbedContext {\n input: string;\n settings: PmSettings;\n model: string;\n [key: string]: unknown;\n}\n\nexport interface SearchProviderDefinition {\n name: string;\n query?: (context: SearchProviderQueryContext) => SearchProviderQueryResult | Promise<SearchProviderQueryResult>;\n queryExpansion?: (\n context: SearchProviderQueryExpansionContext,\n ) => SearchProviderQueryExpansionResult | Promise<SearchProviderQueryExpansionResult>;\n query_expansion?: (\n context: SearchProviderQueryExpansionContext,\n ) => SearchProviderQueryExpansionResult | Promise<SearchProviderQueryExpansionResult>;\n rerank?: (context: SearchProviderRerankContext) => SearchProviderRerankResult | Promise<SearchProviderRerankResult>;\n embedBatch?: (context: SearchProviderEmbedBatchContext) => number[][] | Promise<number[][]>;\n embed_batch?: (context: SearchProviderEmbedBatchContext) => number[][] | Promise<number[][]>;\n embed?: (context: SearchProviderEmbedContext) => number[] | Promise<number[]>;\n [key: string]: unknown;\n}\n\nexport interface VectorStoreQueryHit {\n id: string;\n score: number;\n payload?: Record<string, unknown>;\n [key: string]: unknown;\n}\n\nexport interface VectorStoreQueryContext {\n vector: number[];\n limit: number;\n settings: PmSettings;\n [key: string]: unknown;\n}\n\nexport interface VectorStoreUpsertPoint {\n id: string;\n vector: number[];\n payload?: Record<string, unknown>;\n [key: string]: unknown;\n}\n\nexport interface VectorStoreUpsertContext {\n points: VectorStoreUpsertPoint[];\n settings: PmSettings;\n [key: string]: unknown;\n}\n\nexport interface VectorStoreDeleteContext {\n ids: string[];\n settings: PmSettings;\n [key: string]: unknown;\n}\n\nexport interface VectorStoreAdapterDefinition {\n name: string;\n query?: (context: VectorStoreQueryContext) => VectorStoreQueryHit[] | Promise<VectorStoreQueryHit[]>;\n upsert?: (context: VectorStoreUpsertContext) => unknown | Promise<unknown>;\n delete?: (context: VectorStoreDeleteContext) => unknown | Promise<unknown>;\n [key: string]: unknown;\n}\n\nexport interface RegisteredExtensionCommandOverride {\n layer: ExtensionLayer;\n name: string;\n command: string;\n run: CommandOverride;\n}\n\nexport interface RegisteredExtensionCommandHandler {\n layer: ExtensionLayer;\n name: string;\n command: string;\n run: CommandHandler;\n}\n\nexport interface RegisteredExtensionParserOverride {\n layer: ExtensionLayer;\n name: string;\n command: string;\n run: ParserOverride;\n}\n\nexport interface RegisteredExtensionPreflightOverride {\n layer: ExtensionLayer;\n name: string;\n run: PreflightOverride;\n}\n\nexport interface RegisteredExtensionServiceOverride {\n layer: ExtensionLayer;\n name: string;\n service: ExtensionServiceName;\n run: ServiceOverride;\n}\n\nexport interface RegisteredExtensionRendererOverride {\n layer: ExtensionLayer;\n name: string;\n format: OutputRendererFormat;\n run: RendererOverride;\n}\n\nexport interface ExtensionCommandRegistry {\n overrides: RegisteredExtensionCommandOverride[];\n handlers: RegisteredExtensionCommandHandler[];\n}\n\nexport interface ExtensionParserRegistry {\n overrides: RegisteredExtensionParserOverride[];\n}\n\nexport interface ExtensionPreflightRegistry {\n overrides: RegisteredExtensionPreflightOverride[];\n}\n\nexport interface ExtensionServiceRegistry {\n overrides: RegisteredExtensionServiceOverride[];\n}\n\nexport interface ExtensionRendererRegistry {\n overrides: RegisteredExtensionRendererOverride[];\n}\n\nexport interface RegisteredExtensionFlagDefinitions {\n layer: ExtensionLayer;\n name: string;\n target_command: string;\n flags: FlagDefinition[];\n}\n\nexport interface RegisteredExtensionCommandDefinition {\n layer: ExtensionLayer;\n name: string;\n source_package?: string;\n command: string;\n action: string;\n description?: string;\n intent?: string;\n examples: string[];\n failure_hints: string[];\n arguments: ExtensionCommandArgumentDefinition[];\n}\n\nexport interface RegisteredExtensionSchemaFieldDefinitions {\n layer: ExtensionLayer;\n name: string;\n fields: SchemaFieldDefinition[];\n}\n\nexport interface RegisteredExtensionSchemaItemTypeDefinitions {\n layer: ExtensionLayer;\n name: string;\n types: SchemaItemTypeDefinition[];\n}\n\nexport interface RegisteredExtensionSchemaMigrationDefinition {\n layer: ExtensionLayer;\n name: string;\n definition: SchemaMigrationDefinition;\n runtime_definition: SchemaMigrationDefinition;\n}\n\nexport interface RegisteredExtensionImporter {\n layer: ExtensionLayer;\n name: string;\n importer: string;\n}\n\nexport interface RegisteredExtensionExporter {\n layer: ExtensionLayer;\n name: string;\n exporter: string;\n}\n\nexport interface RegisteredExtensionSearchProvider {\n layer: ExtensionLayer;\n name: string;\n definition: SearchProviderDefinition;\n runtime_definition: SearchProviderDefinition;\n}\n\nexport interface RegisteredExtensionVectorStoreAdapter {\n layer: ExtensionLayer;\n name: string;\n definition: VectorStoreAdapterDefinition;\n runtime_definition: VectorStoreAdapterDefinition;\n}\n\nexport interface ExtensionRegistrationRegistry {\n commands: RegisteredExtensionCommandDefinition[];\n flags: RegisteredExtensionFlagDefinitions[];\n item_fields: RegisteredExtensionSchemaFieldDefinitions[];\n item_types: RegisteredExtensionSchemaItemTypeDefinitions[];\n migrations: RegisteredExtensionSchemaMigrationDefinition[];\n importers: RegisteredExtensionImporter[];\n exporters: RegisteredExtensionExporter[];\n search_providers: RegisteredExtensionSearchProvider[];\n vector_store_adapters: RegisteredExtensionVectorStoreAdapter[];\n}\n\nexport interface ExtensionRegistrationCounts {\n commands: number;\n flags: number;\n item_fields: number;\n item_types: number;\n migrations: number;\n importers: number;\n exporters: number;\n search_providers: number;\n vector_store_adapters: number;\n}\n\n/**\n * Read-only identity an extension's `activate(api)` receives about itself, so\n * authors can emit self-identifying logs, gate on their own version, and build\n * better error messages without re-reading the on-disk manifest or duplicating\n * metadata in-module. Exposed as `api.extension`.\n */\nexport interface ExtensionSelfIdentity {\n readonly name: string;\n readonly layer: ExtensionLayer;\n readonly version: string;\n readonly capabilities: readonly ExtensionCapability[];\n readonly pm_min_version?: string;\n readonly pm_max_version?: string;\n readonly source_package?: string;\n}\n\nexport interface ExtensionApi {\n /** Read-only identity of the extension this `api` was created for. */\n readonly extension: ExtensionSelfIdentity;\n registerCommand(command: string, override: CommandOverride): void;\n registerCommand(definition: CommandDefinition): void;\n registerParser(command: string, override: ParserOverride): void;\n registerPreflight(override: PreflightOverride): void;\n registerService(service: ExtensionServiceName, override: ServiceOverride): void;\n registerFlags(targetCommand: string, flags: FlagDefinition[]): void;\n registerItemFields(fields: SchemaFieldDefinition[]): void;\n registerItemTypes(types: SchemaItemTypeDefinition[]): void;\n registerMigration(definition: SchemaMigrationDefinition): void;\n registerRenderer(format: OutputRendererFormat, renderer: RendererOverride): void;\n registerImporter(name: string, importer: Importer, options?: ImportExportRegistrationOptions): void;\n registerExporter(name: string, exporter: Exporter, options?: ImportExportRegistrationOptions): void;\n registerSearchProvider(provider: SearchProviderDefinition): void;\n registerVectorStoreAdapter(adapter: VectorStoreAdapterDefinition): void;\n hooks: {\n beforeCommand(hook: BeforeCommandHook): void;\n afterCommand(hook: AfterCommandHook): void;\n onWrite(hook: OnWriteHook): void;\n onRead(hook: OnReadHook): void;\n onIndex(hook: OnIndexHook): void;\n };\n}\n\nexport interface FailedExtensionActivation {\n layer: ExtensionLayer;\n name: string;\n entry_path: string;\n error: string;\n trace?: ExtensionActivationFailureTrace;\n}\n\nexport interface ExtensionActivationFailureTrace {\n method: string;\n /** `-1` means the failure happened before a numbered registration was accepted. */\n registration_index: number;\n command?: string;\n capability?: ExtensionCapability;\n missing_capability?: ExtensionCapability;\n expected_schema: string;\n received?: unknown;\n hint?: string;\n}\n\nexport interface ExtensionActivationResult {\n hooks: ExtensionHookRegistry;\n commands: ExtensionCommandRegistry;\n parsers: ExtensionParserRegistry;\n preflight: ExtensionPreflightRegistry;\n services: ExtensionServiceRegistry;\n renderers: ExtensionRendererRegistry;\n registrations: ExtensionRegistrationRegistry;\n failed: FailedExtensionActivation[];\n warnings: string[];\n hook_counts: {\n before_command: number;\n after_command: number;\n on_write: number;\n on_read: number;\n on_index: number;\n };\n command_override_count: number;\n command_handler_count: number;\n parser_override_count: number;\n preflight_override_count: number;\n service_override_count: number;\n renderer_override_count: number;\n registration_counts: ExtensionRegistrationCounts;\n}\n\nexport interface ExtensionCandidate {\n layer: ExtensionLayer;\n directory: string;\n manifest_path: string;\n entry_path: string;\n manifest: ExtensionManifest;\n source_package?: string;\n}\n\nexport interface ExtensionLayerScanResult {\n diagnostics: ExtensionDiagnostic[];\n warnings: string[];\n candidates: ExtensionCandidate[];\n}\n\nexport interface ScannedExtensionDirectory {\n diagnostic: ExtensionDiagnostic;\n warnings: string[];\n candidate: ExtensionCandidate | null;\n}\n\nexport interface LegacyExtensionCapabilityAliasMapping {\n alias: string;\n target: ExtensionCapability;\n}\n\nexport interface DiscoverExtensionsOptions {\n pmRoot: string;\n settings: PmSettings;\n cwd?: string;\n noExtensions?: boolean;\n reload_token?: string;\n cache_bust?: boolean;\n}\n\nexport interface ActivatableExtension {\n activate: (api: ExtensionApi) => void | Promise<void>;\n /**\n * Optional teardown lifecycle hook, analogous to VS Code's `deactivate`\n * export. Invoked when the host tears the extension down — on long-running\n * MCP-server reload between requests, or via the `deactivateExtensions`\n * primitive — so an extension can close connections, clear timers, and\n * release buffers it opened during `activate`.\n */\n deactivate?: () => void | Promise<void>;\n}\n\nexport interface ExtensionDeactivationFailure {\n layer: ExtensionLayer;\n name: string;\n error: string;\n}\n\nexport interface ExtensionDeactivationResult {\n /** Count of loaded extensions whose `deactivate` hook ran without throwing. */\n deactivated: number;\n warnings: string[];\n failed: ExtensionDeactivationFailure[];\n}\n\nexport interface ServiceOverrideResult {\n handled: boolean;\n result: unknown;\n warnings: string[];\n}\n\nexport interface CommandOverrideResult {\n overridden: boolean;\n result: unknown;\n warnings: string[];\n}\n\nexport interface CommandHandlerResult {\n handled: boolean;\n result: unknown;\n warnings: string[];\n /**\n * Human-readable, single-line, length-bounded message describing why an\n * extension command handler failed. Surfaced to the user/CI so the real cause\n * (e.g. \"Changelog is out of date: CHANGELOG.md\") is visible instead of only\n * the opaque `extension_command_handler_failed` warning code.\n */\n errorMessage?: string;\n}\n\nexport interface ParserOverrideResult {\n overridden: boolean;\n context: CommandHandlerContext;\n warnings: string[];\n}\n\nexport interface PreflightOverrideResult {\n overridden: boolean;\n context: CommandHandlerContext;\n decision: PreflightRuntimeDecision;\n warnings: string[];\n}\n\nexport interface RendererOverrideResult {\n overridden: boolean;\n rendered: string | null;\n warnings: string[];\n}\n\nexport interface UnknownExtensionCapabilityWarningDetails {\n layer: ExtensionLayer;\n name: string;\n capability: string;\n allowed_capabilities: string[];\n capability_contract_version: number;\n suggested_capability?: string;\n suggestion_source?: \"legacy_alias\" | \"nearest_match\";\n legacy_alias_target?: string;\n}\n"],"names":[],"mappings":";;AAUA,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,UAAU;IACV,WAAW;IACX,OAAO;IACP,QAAQ;IACR,WAAW;IACX,QAAQ;IACR,QAAQ;IACR,WAAW;IACX,UAAU;CACF,CAAC;AAEX,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAC,CAAC;AACvD,MAAM,CAAC,MAAM,mCAAmC,GAAkD,MAAM,CAAC,MAAM,CAAC;IAC9G,SAAS,EAAE,QAAQ;IACnB,UAAU,EAAE,QAAQ;CACrB,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,MAAM,CAAC,MAAM,CAAC;IACzD,OAAO,EAAE,qCAAqC;IAC9C,YAAY,EAAE,CAAC,GAAG,4BAA4B,CAAC;IAC/C,cAAc,EAAE,EAAE,GAAG,mCAAmC,EAAE;CAC3D,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,CAAU,CAAC;AAEhF,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,CAAU,CAAC;AAE/E,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,CAAU,CAAC;AAG1F,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,mBAAmB;IACnB,kBAAkB;IAClB,qBAAqB;IACrB,oBAAoB;IACpB,eAAe;IACf,cAAc;IACd,eAAe;IACf,cAAc;IACd,mBAAmB;IACnB,kBAAkB;IAClB,mBAAmB;IACnB,iBAAiB;IACjB,oBAAoB;IACpB,mBAAmB;IACnB,oBAAoB;IACpB,oBAAoB;IACpB,oBAAoB;IACpB,iBAAiB;IACjB,oBAAoB;CACZ,CAAC;AAGX,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,eAAe;IACf,cAAc;IACd,aAAa;IACb,cAAc;IACd,cAAc;IACd,gBAAgB;IAChB,kBAAkB;IAClB,mBAAmB;CACX,CAAC;AAgCX,MAAM,UAAU,sCAAsC;IACpD,OAAO;QACL,IAAI,EAAE,KAAK;QACX,UAAU,EAAE,KAAK;QACjB,kBAAkB,EAAE,KAAK;QACzB,kBAAkB,EAAE,EAAE;QACtB,uBAAuB,EAAE,MAAM;QAC/B,kBAAkB,EAAE,EAAE;QACtB,kBAAkB,EAAE,EAAE;QACtB,oBAAoB,EAAE,EAAE;QACxB,oBAAoB,EAAE,EAAE;QACxB,gBAAgB,EAAE,EAAE;QACpB,gBAAgB,EAAE,EAAE;QACpB,gBAAgB,EAAE,EAAE;QACpB,gBAAgB,EAAE,EAAE;QACpB,eAAe,EAAE,EAAE;QACnB,eAAe,EAAE,EAAE;QACnB,gBAAgB,EAAE,EAAE;QACpB,gBAAgB,EAAE,EAAE;QACpB,mBAAmB,EAAE,EAAE;KACxB,CAAC;AACJ,CAAC","debugId":"46e39061-1b71-5927-a798-045c766d91c5"}
|
|
1
|
+
{"version":3,"file":"extension-types.js","sources":["core/extensions/extension-types.ts"],"sourceRoot":"/","sourcesContent":["import type {\n ExtensionPolicyOverrideSettings,\n ExtensionPolicySettings,\n ItemDocument,\n ItemFrontMatter,\n ItemStatus,\n PmSettings,\n} from \"../../types/index.js\";\nimport type { GlobalOptions } from \"../shared/command-types.js\";\n\nexport const KNOWN_EXTENSION_CAPABILITIES = [\n \"commands\",\n \"renderers\",\n \"hooks\",\n \"schema\",\n \"importers\",\n \"search\",\n \"parser\",\n \"preflight\",\n \"services\",\n] as const;\nexport type ExtensionCapability = (typeof KNOWN_EXTENSION_CAPABILITIES)[number];\nexport const EXTENSION_CAPABILITY_CONTRACT_VERSION = 2;\nexport const EXTENSION_CAPABILITY_LEGACY_ALIASES: Readonly<Record<string, ExtensionCapability>> = Object.freeze({\n migration: \"schema\",\n validation: \"schema\",\n});\nexport const EXTENSION_CAPABILITY_CONTRACT = Object.freeze({\n version: EXTENSION_CAPABILITY_CONTRACT_VERSION,\n capabilities: [...KNOWN_EXTENSION_CAPABILITIES],\n legacy_aliases: { ...EXTENSION_CAPABILITY_LEGACY_ALIASES },\n});\n\nexport const KNOWN_EXTENSION_POLICY_MODES = [\"off\", \"warn\", \"enforce\"] as const;\nexport type ExtensionPolicyMode = (typeof KNOWN_EXTENSION_POLICY_MODES)[number];\nexport const KNOWN_EXTENSION_TRUST_MODES = [\"off\", \"warn\", \"enforce\"] as const;\nexport type ExtensionTrustMode = (typeof KNOWN_EXTENSION_TRUST_MODES)[number];\nexport const KNOWN_EXTENSION_SANDBOX_PROFILES = [\"none\", \"restricted\", \"strict\"] as const;\nexport type ExtensionSandboxProfile = (typeof KNOWN_EXTENSION_SANDBOX_PROFILES)[number];\n\nexport const KNOWN_PM_MAX_VERSION_EXCEEDED_MODES = [\"block\", \"warn\"] as const;\n/** How a `pm_max_version` violation is handled for an extension layer. */\nexport type PmMaxVersionExceededMode = (typeof KNOWN_PM_MAX_VERSION_EXCEEDED_MODES)[number];\n/** Optional per-layer override map for `extensions.policy.pm_max_version_exceeded_mode`. */\nexport interface PmMaxVersionExceededModeByLayer {\n global?: PmMaxVersionExceededMode;\n project?: PmMaxVersionExceededMode;\n}\n/**\n * Settings value for `extensions.policy.pm_max_version_exceeded_mode`: either a\n * single mode applied to both layers, or a per-layer override map. Unset (and\n * any unset layer key) defaults to `\"block\"`.\n */\nexport type PmMaxVersionExceededModeSetting = PmMaxVersionExceededMode | PmMaxVersionExceededModeByLayer;\n\nexport const KNOWN_EXTENSION_POLICY_SURFACES = [\n \"commands.override\",\n \"commands.handler\",\n \"hooks.beforecommand\",\n \"hooks.aftercommand\",\n \"hooks.onwrite\",\n \"hooks.onread\",\n \"hooks.onindex\",\n \"schema.flags\",\n \"schema.itemfields\",\n \"schema.itemtypes\",\n \"schema.migrations\",\n \"parser.override\",\n \"preflight.override\",\n \"services.override\",\n \"renderers.override\",\n \"importers.importer\",\n \"importers.exporter\",\n \"search.provider\",\n \"search.vectorstore\",\n] as const;\nexport type ExtensionPolicySurface = (typeof KNOWN_EXTENSION_POLICY_SURFACES)[number];\n\nexport const KNOWN_EXTENSION_SERVICE_NAMES = [\n \"output_format\",\n \"error_format\",\n \"help_format\",\n \"lock_acquire\",\n \"lock_release\",\n \"history_append\",\n \"item_store_write\",\n \"item_store_delete\",\n] as const;\nexport type ExtensionServiceName = (typeof KNOWN_EXTENSION_SERVICE_NAMES)[number];\n\nexport interface ExtensionProvenanceMetadata {\n source?: string;\n signature?: string;\n attestation?: string;\n verified?: boolean;\n}\n\nexport interface ExtensionRuntimePermissionDeclaration {\n fs_read?: boolean;\n fs_write?: boolean;\n network?: boolean;\n env_read?: boolean;\n env_write?: boolean;\n process_spawn?: boolean;\n}\n\nexport interface ExtensionActivationMetadata {\n commands?: string[];\n}\n\nexport type ExtensionPolicyOverride = ExtensionPolicyOverrideSettings;\n/**\n * Extension governance policy as read from / serialized to settings. Extends the\n * stored settings shape with `pm_max_version_exceeded_mode` (pm-k5e8), which\n * relaxes the default-BLOCK on `pm_max_version` violations to warn-only —\n * globally or per extension layer.\n */\nexport type ExtensionGovernancePolicy = ExtensionPolicySettings & {\n pm_max_version_exceeded_mode?: PmMaxVersionExceededModeSetting;\n};\n\nexport interface ExtensionManifestEngines {\n pm?: string;\n node?: string;\n [engine: string]: string | undefined;\n}\n\nexport function createDefaultExtensionGovernancePolicy(): ExtensionGovernancePolicy {\n return {\n mode: \"off\",\n trust_mode: \"off\",\n require_provenance: false,\n trusted_extensions: [],\n default_sandbox_profile: \"none\",\n allowed_extensions: [],\n blocked_extensions: [],\n allowed_capabilities: [],\n blocked_capabilities: [],\n allowed_surfaces: [],\n blocked_surfaces: [],\n allowed_commands: [],\n blocked_commands: [],\n allowed_actions: [],\n blocked_actions: [],\n allowed_services: [],\n blocked_services: [],\n extension_overrides: [],\n };\n}\n\nexport type ExtensionLayer = \"global\" | \"project\";\nexport type ExtensionStatus = \"ok\" | \"warn\";\n\nexport interface ExtensionManifest {\n name: string;\n version: string;\n entry: string;\n priority: number;\n capabilities: string[];\n manifest_version?: number;\n pm_min_version?: string;\n pm_max_version?: string;\n engines?: ExtensionManifestEngines;\n trusted?: boolean;\n provenance?: ExtensionProvenanceMetadata;\n sandbox_profile?: ExtensionSandboxProfile;\n permissions?: ExtensionRuntimePermissionDeclaration;\n activation?: ExtensionActivationMetadata;\n legacy_capability_aliases?: LegacyExtensionCapabilityAliasMapping[];\n}\n\n/**\n * Author-facing `manifest.json` fields recognized by the extension loader, plus\n * `$schema` (tolerated for inline IDE validation against\n * `docs/schemas/extension-manifest.schema.json`). `legacy_capability_aliases`\n * is loader-derived, never authored, so it is intentionally absent. A\n * governance test keeps the published JSON Schema's `properties` in sync with\n * this list.\n */\nexport const KNOWN_EXTENSION_MANIFEST_FIELDS = Object.freeze([\n \"$schema\",\n \"name\",\n \"version\",\n \"entry\",\n \"priority\",\n \"manifest_version\",\n \"pm_min_version\",\n \"pm_max_version\",\n \"engines\",\n \"trusted\",\n \"provenance\",\n \"sandbox_profile\",\n \"permissions\",\n \"capabilities\",\n \"activation\",\n] as const) satisfies readonly (Exclude<keyof ExtensionManifest, \"legacy_capability_aliases\"> | \"$schema\")[];\n\nexport interface ExtensionDiagnostic {\n layer: ExtensionLayer;\n directory: string;\n manifest_path: string;\n name: string | null;\n version: string | null;\n entry: string | null;\n priority: number | null;\n entry_path: string | null;\n enabled: boolean | null;\n status: ExtensionStatus;\n}\n\nexport interface EffectiveExtension {\n layer: ExtensionLayer;\n directory: string;\n manifest_path: string;\n name: string;\n source_package?: string;\n version: string;\n entry: string;\n priority: number;\n entry_path: string;\n manifest_version?: number;\n pm_min_version?: string;\n pm_max_version?: string;\n engines?: ExtensionManifestEngines;\n trusted?: boolean;\n provenance?: ExtensionProvenanceMetadata;\n sandbox_profile?: ExtensionSandboxProfile;\n permissions?: ExtensionRuntimePermissionDeclaration;\n capabilities?: string[];\n activation?: ExtensionActivationMetadata;\n}\n\nexport interface ExtensionDiscoveryResult {\n disabled_by_flag: boolean;\n roots: {\n global: string;\n project: string;\n };\n configured_enabled: string[];\n configured_disabled: string[];\n discovered: ExtensionDiagnostic[];\n effective: EffectiveExtension[];\n warnings: string[];\n policy: ExtensionGovernancePolicy;\n}\n\nexport interface LoadedExtension extends EffectiveExtension {\n module: unknown;\n}\n\nexport interface FailedExtensionLoad {\n layer: ExtensionLayer;\n name: string;\n entry_path: string;\n error: string;\n}\n\nexport interface ExtensionLoadResult extends ExtensionDiscoveryResult {\n loaded: LoadedExtension[];\n failed: FailedExtensionLoad[];\n}\n\nexport interface BeforeCommandHookContext {\n command: string;\n args: string[];\n options?: Record<string, unknown>;\n global?: GlobalOptions;\n pm_root: string;\n}\n\nexport interface AfterCommandHookContext extends BeforeCommandHookContext {\n ok: boolean;\n error?: string;\n result?: unknown;\n affected?: AfterCommandAffectedItem[];\n}\n\nexport interface AfterCommandAffectedItem {\n id: string;\n op?: string;\n item_type?: string;\n previous_status?: ItemStatus;\n status?: ItemStatus;\n previous?: Partial<ItemFrontMatter>;\n current?: Partial<ItemFrontMatter>;\n changed_fields?: string[];\n}\n\nexport interface OnWriteHookContext {\n path: string;\n scope: \"project\" | \"global\";\n op: string;\n item_id?: string;\n item_type?: string;\n before?: ItemDocument;\n after?: ItemDocument;\n changed_fields?: string[];\n}\n\nexport interface OnReadHookContext {\n path: string;\n scope: \"project\" | \"global\";\n}\n\nexport interface OnIndexHookContext {\n mode: string;\n total_items?: number;\n}\n\nexport type BeforeCommandHook = (context: BeforeCommandHookContext) => Promise<void> | void;\nexport type AfterCommandHook = (context: AfterCommandHookContext) => Promise<void> | void;\nexport type OnWriteHook = (context: OnWriteHookContext) => Promise<void> | void;\nexport type OnReadHook = (context: OnReadHookContext) => Promise<void> | void;\nexport type OnIndexHook = (context: OnIndexHookContext) => Promise<void> | void;\nexport type OutputRendererFormat = \"toon\" | \"json\";\nexport type CommandOverride = (context: CommandOverrideContext) => unknown;\nexport type RendererOverride = (context: RendererOverrideContext) => string | null | undefined;\nexport type CommandHandler = (context: CommandHandlerContext) => unknown;\nexport type ParserOverride = (context: ParserOverrideContext) => ParserOverrideDelta | Promise<ParserOverrideDelta>;\nexport type PreflightOverride = (context: PreflightOverrideContext) => PreflightOverrideDelta | Promise<PreflightOverrideDelta>;\nexport type ServiceOverride = (context: ServiceOverrideContext) => unknown;\n\nexport interface RegisteredExtensionHook<THook> {\n layer: ExtensionLayer;\n name: string;\n run: THook;\n}\n\nexport interface ExtensionHookRegistry {\n beforeCommand: Array<RegisteredExtensionHook<BeforeCommandHook>>;\n afterCommand: Array<RegisteredExtensionHook<AfterCommandHook>>;\n onWrite: Array<RegisteredExtensionHook<OnWriteHook>>;\n onRead: Array<RegisteredExtensionHook<OnReadHook>>;\n onIndex: Array<RegisteredExtensionHook<OnIndexHook>>;\n}\n\nexport interface CommandOverrideContext {\n command: string;\n args: string[];\n options?: Record<string, unknown>;\n global?: GlobalOptions;\n pm_root: string;\n result: unknown;\n}\n\nexport interface RendererOverrideContext {\n format: OutputRendererFormat;\n command?: string;\n args?: string[];\n options?: Record<string, unknown>;\n global?: GlobalOptions;\n pm_root?: string;\n result: unknown;\n}\n\nexport interface CommandHandlerContext {\n command: string;\n args: string[];\n options: Record<string, unknown>;\n global: GlobalOptions;\n pm_root: string;\n}\n\nexport interface ParserOverrideContext extends CommandHandlerContext {}\n\nexport interface ParserOverrideDelta {\n args?: string[];\n options?: Record<string, unknown>;\n global?: GlobalOptions;\n}\n\nexport interface PreflightOverrideContext extends CommandHandlerContext {\n decision: PreflightRuntimeDecision;\n}\n\nexport interface PreflightRuntimeDecision {\n enforce_item_format_gate: boolean;\n run_preflight_item_format_sync: boolean;\n run_extension_migrations: boolean;\n enforce_mandatory_migration_gate: boolean;\n}\n\nexport interface PreflightOverrideDelta extends ParserOverrideDelta {\n enforce_item_format_gate?: boolean;\n run_preflight_item_format_sync?: boolean;\n run_extension_migrations?: boolean;\n enforce_mandatory_migration_gate?: boolean;\n}\n\nexport interface ServiceOverrideContext {\n service: ExtensionServiceName;\n command?: string;\n args?: string[];\n options?: Record<string, unknown>;\n global?: GlobalOptions;\n pm_root?: string;\n payload: unknown;\n}\n\nexport interface ExtensionCommandArgumentDefinition {\n name: string;\n required?: boolean;\n variadic?: boolean;\n description?: string;\n}\n\nexport interface CommandDefinition {\n name: string;\n run?: CommandHandler;\n /**\n * @deprecated Use `run` instead. This alias remains for backward compatibility.\n */\n handler?: CommandHandler;\n action?: string;\n description?: string;\n intent?: string;\n examples?: string[];\n failure_hints?: string[];\n arguments?: ExtensionCommandArgumentDefinition[];\n flags?: FlagDefinition[];\n}\n\n/**\n * Optional command-definition metadata for first-class importer/exporter\n * registration.\n *\n * `registerImporter`/`registerExporter` always create a `<name> import` /\n * `<name> export` command path. By default that path only has a handler. When\n * these options are supplied, the auto-created command also gains a full command\n * definition (description, flags, intent, examples, failure hints, positional\n * arguments) — surfaced in help and runtime contracts exactly like\n * `registerCommand`. The registration `name` and `run` handler are implicit, so\n * they are not part of this options object.\n */\nexport interface ImportExportRegistrationOptions {\n action?: string;\n description?: string;\n intent?: string;\n examples?: string[];\n failure_hints?: string[];\n arguments?: ExtensionCommandArgumentDefinition[];\n flags?: FlagDefinition[];\n}\n\nexport type FlagValueType = \"string\" | \"number\" | \"boolean\";\n\nexport interface FlagDefinition {\n long?: string;\n short?: string;\n value_name?: string;\n description?: string;\n required?: boolean;\n enabled?: boolean;\n visible?: boolean;\n /**\n * Canonical flag value type. Prefer this field; it is the one runtime\n * contracts and help output read first.\n */\n value_type?: FlagValueType;\n /**\n * @deprecated Use `value_type`. Retained for backward compatibility: when\n * both are present `value_type` wins, and `type` resolves only when\n * `value_type` is absent (`value_type ?? type`).\n */\n type?: FlagValueType;\n /**\n * When true, a repeated comma-list flag accumulates values across repeats\n * — parity with core list flags such as `--tags` — instead of the last\n * value winning. Mirrors the core `CliFlagContract.list` field so\n * extension-registered list flags coalesce through the same bootstrap path.\n */\n list?: boolean;\n /**\n * Default value applied when the flag is omitted. Surfaced to runtime\n * contracts and help output. A `list` flag may default to an array of scalars\n * (e.g. `[\"a\", \"b\"]`); the array is flattened/coerced like any list value.\n */\n default?: string | number | boolean | Array<string | number | boolean>;\n [key: string]: unknown;\n}\n\nexport interface SchemaFieldDefinition {\n name: string;\n type: string;\n optional?: boolean;\n [key: string]: unknown;\n}\n\nexport interface SchemaItemTypeCommandOptionPolicyDefinition {\n command: string;\n option: string;\n enabled?: boolean;\n required?: boolean;\n visible?: boolean;\n [key: string]: unknown;\n}\n\nexport interface SchemaItemTypeOptionDefinition {\n key: string;\n values?: string[];\n required?: boolean;\n aliases?: string[];\n [key: string]: unknown;\n}\n\nexport interface SchemaItemTypeDefinition {\n name: string;\n folder?: string;\n aliases?: string[];\n required_create_fields?: string[];\n required_create_repeatables?: string[];\n command_option_policies?: SchemaItemTypeCommandOptionPolicyDefinition[];\n options?: SchemaItemTypeOptionDefinition[];\n [key: string]: unknown;\n}\n\nexport interface SchemaMigrationRunContext {\n id: string;\n command: \"migration\";\n layer: ExtensionLayer;\n extension: string;\n pm_root: string;\n status: string;\n}\n\nexport type SchemaMigrationRunner = (context: SchemaMigrationRunContext) => unknown | Promise<unknown>;\n\nexport interface SchemaMigrationDefinition {\n id?: string;\n description?: string;\n status?: string;\n mandatory?: boolean;\n run?: SchemaMigrationRunner;\n [key: string]: unknown;\n}\n\nexport interface ImportExportContext {\n registration: string;\n action: \"import\" | \"export\";\n command: string;\n args: string[];\n options: Record<string, unknown>;\n global: GlobalOptions;\n pm_root: string;\n}\n\nexport type Importer = (context: ImportExportContext) => unknown | Promise<unknown>;\nexport type Exporter = (context: ImportExportContext) => unknown | Promise<unknown>;\n\nexport type ExtensionSearchMode = \"keyword\" | \"semantic\" | \"hybrid\";\n\nexport interface SearchProviderQueryContext {\n query: string;\n mode: ExtensionSearchMode;\n tokens: string[];\n options: Record<string, unknown>;\n settings: PmSettings;\n documents: ItemDocument[];\n [key: string]: unknown;\n}\n\nexport interface SearchProviderHit {\n id: string;\n score: number;\n matched_fields?: string[];\n [key: string]: unknown;\n}\n\nexport type SearchProviderQueryResult = SearchProviderHit[] | { hits?: SearchProviderHit[] };\n\nexport interface SearchProviderQueryExpansionContext {\n query: string;\n mode: Exclude<ExtensionSearchMode, \"keyword\">;\n settings: PmSettings;\n [key: string]: unknown;\n}\n\nexport type SearchProviderQueryExpansionResult = string[] | { queries?: string[] };\n\nexport interface SearchProviderRerankCandidate {\n id: string;\n text: string;\n score: number;\n}\n\nexport interface SearchProviderRerankHit {\n id: string;\n score: number;\n}\n\nexport type SearchProviderRerankResult = SearchProviderRerankHit[] | { hits?: SearchProviderRerankHit[] };\n\nexport interface SearchProviderRerankContext {\n query: string;\n mode: \"hybrid\";\n model: string;\n top_k: number;\n settings: PmSettings;\n candidates: SearchProviderRerankCandidate[];\n [key: string]: unknown;\n}\n\nexport interface SearchProviderEmbedBatchContext {\n inputs: string[];\n settings: PmSettings;\n model: string;\n [key: string]: unknown;\n}\n\nexport interface SearchProviderEmbedContext {\n input: string;\n settings: PmSettings;\n model: string;\n [key: string]: unknown;\n}\n\nexport interface SearchProviderDefinition {\n name: string;\n query?: (context: SearchProviderQueryContext) => SearchProviderQueryResult | Promise<SearchProviderQueryResult>;\n queryExpansion?: (\n context: SearchProviderQueryExpansionContext,\n ) => SearchProviderQueryExpansionResult | Promise<SearchProviderQueryExpansionResult>;\n query_expansion?: (\n context: SearchProviderQueryExpansionContext,\n ) => SearchProviderQueryExpansionResult | Promise<SearchProviderQueryExpansionResult>;\n rerank?: (context: SearchProviderRerankContext) => SearchProviderRerankResult | Promise<SearchProviderRerankResult>;\n embedBatch?: (context: SearchProviderEmbedBatchContext) => number[][] | Promise<number[][]>;\n embed_batch?: (context: SearchProviderEmbedBatchContext) => number[][] | Promise<number[][]>;\n embed?: (context: SearchProviderEmbedContext) => number[] | Promise<number[]>;\n [key: string]: unknown;\n}\n\nexport interface VectorStoreQueryHit {\n id: string;\n score: number;\n payload?: Record<string, unknown>;\n [key: string]: unknown;\n}\n\nexport interface VectorStoreQueryContext {\n vector: number[];\n limit: number;\n settings: PmSettings;\n [key: string]: unknown;\n}\n\nexport interface VectorStoreUpsertPoint {\n id: string;\n vector: number[];\n payload?: Record<string, unknown>;\n [key: string]: unknown;\n}\n\nexport interface VectorStoreUpsertContext {\n points: VectorStoreUpsertPoint[];\n settings: PmSettings;\n [key: string]: unknown;\n}\n\nexport interface VectorStoreDeleteContext {\n ids: string[];\n settings: PmSettings;\n [key: string]: unknown;\n}\n\nexport interface VectorStoreAdapterDefinition {\n name: string;\n query?: (context: VectorStoreQueryContext) => VectorStoreQueryHit[] | Promise<VectorStoreQueryHit[]>;\n upsert?: (context: VectorStoreUpsertContext) => unknown | Promise<unknown>;\n delete?: (context: VectorStoreDeleteContext) => unknown | Promise<unknown>;\n [key: string]: unknown;\n}\n\nexport interface RegisteredExtensionCommandOverride {\n layer: ExtensionLayer;\n name: string;\n command: string;\n run: CommandOverride;\n}\n\nexport interface RegisteredExtensionCommandHandler {\n layer: ExtensionLayer;\n name: string;\n command: string;\n run: CommandHandler;\n}\n\nexport interface RegisteredExtensionParserOverride {\n layer: ExtensionLayer;\n name: string;\n command: string;\n run: ParserOverride;\n}\n\nexport interface RegisteredExtensionPreflightOverride {\n layer: ExtensionLayer;\n name: string;\n run: PreflightOverride;\n}\n\nexport interface RegisteredExtensionServiceOverride {\n layer: ExtensionLayer;\n name: string;\n service: ExtensionServiceName;\n run: ServiceOverride;\n}\n\nexport interface RegisteredExtensionRendererOverride {\n layer: ExtensionLayer;\n name: string;\n format: OutputRendererFormat;\n run: RendererOverride;\n}\n\nexport interface ExtensionCommandRegistry {\n overrides: RegisteredExtensionCommandOverride[];\n handlers: RegisteredExtensionCommandHandler[];\n}\n\nexport interface ExtensionParserRegistry {\n overrides: RegisteredExtensionParserOverride[];\n}\n\nexport interface ExtensionPreflightRegistry {\n overrides: RegisteredExtensionPreflightOverride[];\n}\n\nexport interface ExtensionServiceRegistry {\n overrides: RegisteredExtensionServiceOverride[];\n}\n\nexport interface ExtensionRendererRegistry {\n overrides: RegisteredExtensionRendererOverride[];\n}\n\nexport interface RegisteredExtensionFlagDefinitions {\n layer: ExtensionLayer;\n name: string;\n target_command: string;\n flags: FlagDefinition[];\n}\n\nexport interface RegisteredExtensionCommandDefinition {\n layer: ExtensionLayer;\n name: string;\n source_package?: string;\n command: string;\n action: string;\n description?: string;\n intent?: string;\n examples: string[];\n failure_hints: string[];\n arguments: ExtensionCommandArgumentDefinition[];\n}\n\nexport interface RegisteredExtensionSchemaFieldDefinitions {\n layer: ExtensionLayer;\n name: string;\n fields: SchemaFieldDefinition[];\n}\n\nexport interface RegisteredExtensionSchemaItemTypeDefinitions {\n layer: ExtensionLayer;\n name: string;\n types: SchemaItemTypeDefinition[];\n}\n\nexport interface RegisteredExtensionSchemaMigrationDefinition {\n layer: ExtensionLayer;\n name: string;\n definition: SchemaMigrationDefinition;\n runtime_definition: SchemaMigrationDefinition;\n}\n\nexport interface RegisteredExtensionImporter {\n layer: ExtensionLayer;\n name: string;\n importer: string;\n}\n\nexport interface RegisteredExtensionExporter {\n layer: ExtensionLayer;\n name: string;\n exporter: string;\n}\n\nexport interface RegisteredExtensionSearchProvider {\n layer: ExtensionLayer;\n name: string;\n definition: SearchProviderDefinition;\n runtime_definition: SearchProviderDefinition;\n}\n\nexport interface RegisteredExtensionVectorStoreAdapter {\n layer: ExtensionLayer;\n name: string;\n definition: VectorStoreAdapterDefinition;\n runtime_definition: VectorStoreAdapterDefinition;\n}\n\nexport interface ExtensionRegistrationRegistry {\n commands: RegisteredExtensionCommandDefinition[];\n flags: RegisteredExtensionFlagDefinitions[];\n item_fields: RegisteredExtensionSchemaFieldDefinitions[];\n item_types: RegisteredExtensionSchemaItemTypeDefinitions[];\n migrations: RegisteredExtensionSchemaMigrationDefinition[];\n importers: RegisteredExtensionImporter[];\n exporters: RegisteredExtensionExporter[];\n search_providers: RegisteredExtensionSearchProvider[];\n vector_store_adapters: RegisteredExtensionVectorStoreAdapter[];\n}\n\nexport interface ExtensionRegistrationCounts {\n commands: number;\n flags: number;\n item_fields: number;\n item_types: number;\n migrations: number;\n importers: number;\n exporters: number;\n search_providers: number;\n vector_store_adapters: number;\n}\n\n/**\n * Read-only identity an extension's `activate(api)` receives about itself, so\n * authors can emit self-identifying logs, gate on their own version, and build\n * better error messages without re-reading the on-disk manifest or duplicating\n * metadata in-module. Exposed as `api.extension`.\n */\nexport interface ExtensionSelfIdentity {\n readonly name: string;\n readonly layer: ExtensionLayer;\n readonly version: string;\n readonly capabilities: readonly ExtensionCapability[];\n readonly pm_min_version?: string;\n readonly pm_max_version?: string;\n readonly source_package?: string;\n}\n\nexport interface ExtensionApi {\n /** Read-only identity of the extension this `api` was created for. */\n readonly extension: ExtensionSelfIdentity;\n registerCommand(command: string, override: CommandOverride): void;\n registerCommand(definition: CommandDefinition): void;\n registerParser(command: string, override: ParserOverride): void;\n registerPreflight(override: PreflightOverride): void;\n registerService(service: ExtensionServiceName, override: ServiceOverride): void;\n registerFlags(targetCommand: string, flags: FlagDefinition[]): void;\n registerItemFields(fields: SchemaFieldDefinition[]): void;\n registerItemTypes(types: SchemaItemTypeDefinition[]): void;\n registerMigration(definition: SchemaMigrationDefinition): void;\n registerRenderer(format: OutputRendererFormat, renderer: RendererOverride): void;\n registerImporter(name: string, importer: Importer, options?: ImportExportRegistrationOptions): void;\n registerExporter(name: string, exporter: Exporter, options?: ImportExportRegistrationOptions): void;\n registerSearchProvider(provider: SearchProviderDefinition): void;\n registerVectorStoreAdapter(adapter: VectorStoreAdapterDefinition): void;\n hooks: {\n beforeCommand(hook: BeforeCommandHook): void;\n afterCommand(hook: AfterCommandHook): void;\n onWrite(hook: OnWriteHook): void;\n onRead(hook: OnReadHook): void;\n onIndex(hook: OnIndexHook): void;\n };\n}\n\nexport interface FailedExtensionActivation {\n layer: ExtensionLayer;\n name: string;\n entry_path: string;\n error: string;\n trace?: ExtensionActivationFailureTrace;\n}\n\nexport interface ExtensionActivationFailureTrace {\n method: string;\n /** `-1` means the failure happened before a numbered registration was accepted. */\n registration_index: number;\n command?: string;\n capability?: ExtensionCapability;\n missing_capability?: ExtensionCapability;\n expected_schema: string;\n received?: unknown;\n hint?: string;\n}\n\nexport interface ExtensionActivationResult {\n hooks: ExtensionHookRegistry;\n commands: ExtensionCommandRegistry;\n parsers: ExtensionParserRegistry;\n preflight: ExtensionPreflightRegistry;\n services: ExtensionServiceRegistry;\n renderers: ExtensionRendererRegistry;\n registrations: ExtensionRegistrationRegistry;\n failed: FailedExtensionActivation[];\n warnings: string[];\n hook_counts: {\n before_command: number;\n after_command: number;\n on_write: number;\n on_read: number;\n on_index: number;\n };\n command_override_count: number;\n command_handler_count: number;\n parser_override_count: number;\n preflight_override_count: number;\n service_override_count: number;\n renderer_override_count: number;\n registration_counts: ExtensionRegistrationCounts;\n}\n\nexport interface ExtensionCandidate {\n layer: ExtensionLayer;\n directory: string;\n manifest_path: string;\n entry_path: string;\n manifest: ExtensionManifest;\n source_package?: string;\n}\n\nexport interface ExtensionLayerScanResult {\n diagnostics: ExtensionDiagnostic[];\n warnings: string[];\n candidates: ExtensionCandidate[];\n}\n\nexport interface ScannedExtensionDirectory {\n diagnostic: ExtensionDiagnostic;\n warnings: string[];\n candidate: ExtensionCandidate | null;\n}\n\nexport interface LegacyExtensionCapabilityAliasMapping {\n alias: string;\n target: ExtensionCapability;\n}\n\nexport interface DiscoverExtensionsOptions {\n pmRoot: string;\n settings: PmSettings;\n cwd?: string;\n noExtensions?: boolean;\n reload_token?: string;\n cache_bust?: boolean;\n}\n\nexport interface ActivatableExtension {\n activate: (api: ExtensionApi) => void | Promise<void>;\n /**\n * Optional teardown lifecycle hook, analogous to VS Code's `deactivate`\n * export. Invoked when the host tears the extension down — on long-running\n * MCP-server reload between requests, or via the `deactivateExtensions`\n * primitive — so an extension can close connections, clear timers, and\n * release buffers it opened during `activate`.\n */\n deactivate?: () => void | Promise<void>;\n}\n\nexport interface ExtensionDeactivationFailure {\n layer: ExtensionLayer;\n name: string;\n error: string;\n}\n\nexport interface ExtensionDeactivationOptions {\n /**\n * Maximum time to wait for each extension's `deactivate` hook. Defaults to\n * 5000ms so a hanging teardown cannot block host shutdown or reload. Set to\n * 0 or Infinity only when the host intentionally wants to wait indefinitely.\n */\n deactivate_timeout_ms?: number;\n}\n\nexport interface ExtensionDeactivationResult {\n /** Count of loaded extensions whose `deactivate` hook ran without throwing. */\n deactivated: number;\n warnings: string[];\n failed: ExtensionDeactivationFailure[];\n}\n\nexport interface ServiceOverrideResult {\n handled: boolean;\n result: unknown;\n warnings: string[];\n}\n\nexport interface CommandOverrideResult {\n overridden: boolean;\n result: unknown;\n warnings: string[];\n}\n\nexport interface CommandHandlerResult {\n handled: boolean;\n result: unknown;\n warnings: string[];\n /**\n * Human-readable, single-line, length-bounded message describing why an\n * extension command handler failed. Surfaced to the user/CI so the real cause\n * (e.g. \"Changelog is out of date: CHANGELOG.md\") is visible instead of only\n * the opaque `extension_command_handler_failed` warning code.\n */\n errorMessage?: string;\n}\n\nexport interface ParserOverrideResult {\n overridden: boolean;\n context: CommandHandlerContext;\n warnings: string[];\n}\n\nexport interface PreflightOverrideResult {\n overridden: boolean;\n context: CommandHandlerContext;\n decision: PreflightRuntimeDecision;\n warnings: string[];\n}\n\nexport interface RendererOverrideResult {\n overridden: boolean;\n rendered: string | null;\n warnings: string[];\n}\n\nexport interface UnknownExtensionCapabilityWarningDetails {\n layer: ExtensionLayer;\n name: string;\n capability: string;\n allowed_capabilities: string[];\n capability_contract_version: number;\n suggested_capability?: string;\n suggestion_source?: \"legacy_alias\" | \"nearest_match\";\n legacy_alias_target?: string;\n}\n"],"names":[],"mappings":";;AAUA,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,UAAU;IACV,WAAW;IACX,OAAO;IACP,QAAQ;IACR,WAAW;IACX,QAAQ;IACR,QAAQ;IACR,WAAW;IACX,UAAU;CACF,CAAC;AAEX,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAC,CAAC;AACvD,MAAM,CAAC,MAAM,mCAAmC,GAAkD,MAAM,CAAC,MAAM,CAAC;IAC9G,SAAS,EAAE,QAAQ;IACnB,UAAU,EAAE,QAAQ;CACrB,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,MAAM,CAAC,MAAM,CAAC;IACzD,OAAO,EAAE,qCAAqC;IAC9C,YAAY,EAAE,CAAC,GAAG,4BAA4B,CAAC;IAC/C,cAAc,EAAE,EAAE,GAAG,mCAAmC,EAAE;CAC3D,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,CAAU,CAAC;AAEhF,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,CAAU,CAAC;AAE/E,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,CAAU,CAAC;AAG1F,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,OAAO,EAAE,MAAM,CAAU,CAAC;AAe9E,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,mBAAmB;IACnB,kBAAkB;IAClB,qBAAqB;IACrB,oBAAoB;IACpB,eAAe;IACf,cAAc;IACd,eAAe;IACf,cAAc;IACd,mBAAmB;IACnB,kBAAkB;IAClB,mBAAmB;IACnB,iBAAiB;IACjB,oBAAoB;IACpB,mBAAmB;IACnB,oBAAoB;IACpB,oBAAoB;IACpB,oBAAoB;IACpB,iBAAiB;IACjB,oBAAoB;CACZ,CAAC;AAGX,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,eAAe;IACf,cAAc;IACd,aAAa;IACb,cAAc;IACd,cAAc;IACd,gBAAgB;IAChB,kBAAkB;IAClB,mBAAmB;CACX,CAAC;AAwCX,MAAM,UAAU,sCAAsC;IACpD,OAAO;QACL,IAAI,EAAE,KAAK;QACX,UAAU,EAAE,KAAK;QACjB,kBAAkB,EAAE,KAAK;QACzB,kBAAkB,EAAE,EAAE;QACtB,uBAAuB,EAAE,MAAM;QAC/B,kBAAkB,EAAE,EAAE;QACtB,kBAAkB,EAAE,EAAE;QACtB,oBAAoB,EAAE,EAAE;QACxB,oBAAoB,EAAE,EAAE;QACxB,gBAAgB,EAAE,EAAE;QACpB,gBAAgB,EAAE,EAAE;QACpB,gBAAgB,EAAE,EAAE;QACpB,gBAAgB,EAAE,EAAE;QACpB,eAAe,EAAE,EAAE;QACnB,eAAe,EAAE,EAAE;QACnB,gBAAgB,EAAE,EAAE;QACpB,gBAAgB,EAAE,EAAE;QACpB,mBAAmB,EAAE,EAAE;KACxB,CAAC;AACJ,CAAC;AAuBD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,MAAM,CAAC,MAAM,CAAC;IAC3D,SAAS;IACT,MAAM;IACN,SAAS;IACT,OAAO;IACP,UAAU;IACV,kBAAkB;IAClB,gBAAgB;IAChB,gBAAgB;IAChB,SAAS;IACT,SAAS;IACT,YAAY;IACZ,iBAAiB;IACjB,aAAa;IACb,cAAc;IACd,YAAY;CACJ,CAAkG,CAAC","debugId":"96f92147-d769-57ff-a0e3-387c90152c9e"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { parseUnknownExtensionCapabilityWarning, parseLegacyExtensionCapabilityAliasWarning, } from "./extension-capability-aliases.js";
|
|
2
2
|
export { createEmptyExtensionHookRegistry, createEmptyExtensionCommandRegistry, createEmptyExtensionParserRegistry, createEmptyExtensionPreflightRegistry, createEmptyExtensionServiceRegistry, createEmptyExtensionRendererRegistry, createEmptyExtensionRegistrationRegistry, } from "./extension-registries.js";
|
|
3
3
|
export { runBeforeCommandHooks, runAfterCommandHooks, runOnWriteHooks, runOnReadHooks, runOnIndexHooks, runCommandHandler, runParserOverride, runPreflightOverride, runServiceOverrideSync, runServiceOverride, runCommandOverride, runRendererOverride, } from "./extension-hook-runtime.js";
|
|
4
|
-
import { type ExtensionDeactivationResult, type ExtensionDiscoveryResult, type ExtensionLoadResult, type ExtensionActivationResult, type DiscoverExtensionsOptions } from "./extension-types.js";
|
|
4
|
+
import { type ExtensionDeactivationOptions, type ExtensionDeactivationResult, type ExtensionDiscoveryResult, type ExtensionLoadResult, type ExtensionActivationResult, type DiscoverExtensionsOptions } from "./extension-types.js";
|
|
5
5
|
export * from "./extension-types.js";
|
|
6
6
|
export declare function nextExtensionReloadToken(seed?: number): string;
|
|
7
7
|
export declare function resolveExtensionRoots(pmRoot: string, cwd?: string): {
|
|
@@ -19,8 +19,10 @@ export declare function loadExtensions(options: DiscoverExtensionsOptions): Prom
|
|
|
19
19
|
*
|
|
20
20
|
* Pass the `activationResult` to skip extensions whose `activate` failed — they
|
|
21
21
|
* never fully initialized, so (VS Code-style) their `deactivate` must not run.
|
|
22
|
-
* Teardowns run concurrently
|
|
23
|
-
*
|
|
22
|
+
* Teardowns run concurrently and each hook has a bounded timeout by default, so
|
|
23
|
+
* one slow or hanging hook cannot serialize the rest or block the host
|
|
24
|
+
* indefinitely unless the host explicitly disables the timeout; the returned
|
|
25
|
+
* warnings/failures preserve loaded order.
|
|
24
26
|
*/
|
|
25
|
-
export declare function deactivateExtensions(loadResult: ExtensionLoadResult, activationResult?: Pick<ExtensionActivationResult, "failed"
|
|
27
|
+
export declare function deactivateExtensions(loadResult: ExtensionLoadResult, activationResult?: Pick<ExtensionActivationResult, "failed">, options?: ExtensionDeactivationOptions): Promise<ExtensionDeactivationResult>;
|
|
26
28
|
export declare function activateExtensions(loadResult: ExtensionLoadResult): Promise<ExtensionActivationResult>;
|
|
@@ -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]="19026387-34f8-5e8e-b936-4fc13489f244")}catch(e){}}();
|
|
3
3
|
import fs from "node:fs/promises";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { pathToFileURL } from "node:url";
|
|
@@ -352,14 +352,14 @@ function buildEffectiveExtensions(globalCandidates, projectCandidates) {
|
|
|
352
352
|
}
|
|
353
353
|
return effective;
|
|
354
354
|
}
|
|
355
|
-
async function scanExtensionLayer(layer, extensionsRoot, enabled, disabled) {
|
|
355
|
+
async function scanExtensionLayer(layer, extensionsRoot, enabled, disabled, pmMaxVersionExceededMode) {
|
|
356
356
|
const diagnostics = [];
|
|
357
357
|
const warnings = [];
|
|
358
358
|
const candidates = [];
|
|
359
359
|
const directories = await listExtensionDirectories(extensionsRoot);
|
|
360
360
|
const managedSourcePackages = await readManagedExtensionSourcePackages(extensionsRoot);
|
|
361
361
|
for (const directory of directories) {
|
|
362
|
-
const scanned = await scanExtensionDirectory(layer, extensionsRoot, directory, enabled, disabled, managedSourcePackages);
|
|
362
|
+
const scanned = await scanExtensionDirectory(layer, extensionsRoot, directory, enabled, disabled, managedSourcePackages, pmMaxVersionExceededMode);
|
|
363
363
|
diagnostics.push(scanned.diagnostic);
|
|
364
364
|
warnings.push(...scanned.warnings);
|
|
365
365
|
if (scanned.candidate) {
|
|
@@ -368,7 +368,7 @@ async function scanExtensionLayer(layer, extensionsRoot, enabled, disabled) {
|
|
|
368
368
|
}
|
|
369
369
|
return { diagnostics, warnings, candidates };
|
|
370
370
|
}
|
|
371
|
-
async function scanExtensionDirectory(layer, extensionsRoot, directory, enabled, disabled, managedSourcePackages) {
|
|
371
|
+
async function scanExtensionDirectory(layer, extensionsRoot, directory, enabled, disabled, managedSourcePackages, pmMaxVersionExceededMode) {
|
|
372
372
|
const extensionDir = path.join(extensionsRoot, directory);
|
|
373
373
|
const manifestPath = path.join(extensionDir, "manifest.json");
|
|
374
374
|
if (!(await pathExists(manifestPath))) {
|
|
@@ -439,7 +439,7 @@ async function scanExtensionDirectory(layer, extensionsRoot, directory, enabled,
|
|
|
439
439
|
if (pmVersionCompatibility.warning) {
|
|
440
440
|
extensionWarnings.push(pmVersionCompatibility.warning);
|
|
441
441
|
}
|
|
442
|
-
const pmMaxVersionCompatibility = await evaluatePmMaxVersionCompatibility(layer, manifest);
|
|
442
|
+
const pmMaxVersionCompatibility = await evaluatePmMaxVersionCompatibility(layer, manifest, pmMaxVersionExceededMode);
|
|
443
443
|
if (pmMaxVersionCompatibility.warning) {
|
|
444
444
|
extensionWarnings.push(pmMaxVersionCompatibility.warning);
|
|
445
445
|
}
|
|
@@ -494,8 +494,8 @@ export async function discoverExtensions(options) {
|
|
|
494
494
|
}
|
|
495
495
|
const enabled = new Set(configured_enabled);
|
|
496
496
|
const disabled = new Set(configured_disabled);
|
|
497
|
-
const globalScan = await scanExtensionLayer("global", roots.global, enabled, disabled);
|
|
498
|
-
const projectScan = await scanExtensionLayer("project", roots.project, enabled, disabled);
|
|
497
|
+
const globalScan = await scanExtensionLayer("global", roots.global, enabled, disabled, policy.pmMaxVersionExceededMode.global);
|
|
498
|
+
const projectScan = await scanExtensionLayer("project", roots.project, enabled, disabled, policy.pmMaxVersionExceededMode.project);
|
|
499
499
|
const policyWarnings = [...policy.warnings];
|
|
500
500
|
const effectiveCandidates = buildEffectiveExtensions(globalScan.candidates, projectScan.candidates);
|
|
501
501
|
const effective = [];
|
|
@@ -623,7 +623,7 @@ async function evaluatePmMinVersionCompatibility(layer, manifest) {
|
|
|
623
623
|
}
|
|
624
624
|
return { allowed: true };
|
|
625
625
|
}
|
|
626
|
-
async function evaluatePmMaxVersionCompatibility(layer, manifest) {
|
|
626
|
+
async function evaluatePmMaxVersionCompatibility(layer, manifest, exceededMode) {
|
|
627
627
|
if (typeof manifest.pm_max_version !== "string" || manifest.pm_max_version.trim().length === 0) {
|
|
628
628
|
return { allowed: true };
|
|
629
629
|
}
|
|
@@ -656,8 +656,16 @@ async function evaluatePmMaxVersionCompatibility(layer, manifest) {
|
|
|
656
656
|
warning: `extension_pm_max_version_unchecked:${layer}:${manifest.name}:allowed=${manifest.pm_max_version}:current=${currentVersion}`,
|
|
657
657
|
};
|
|
658
658
|
}
|
|
659
|
-
// follow-up: pm-4gw6 recommends a future settings toggle to relax this default-BLOCK to warn-only per layer.
|
|
660
659
|
if (comparison > 0) {
|
|
660
|
+
// pm-k5e8: `extensions.policy.pm_max_version_exceeded_mode` (default "block",
|
|
661
|
+
// per-layer overridable) relaxes this to warn-only so operators can keep
|
|
662
|
+
// pinned extensions loading during a CLI upgrade window.
|
|
663
|
+
if (exceededMode === "warn") {
|
|
664
|
+
return {
|
|
665
|
+
allowed: true,
|
|
666
|
+
warning: `extension_pm_max_version_exceeded_warn:${layer}:${manifest.name}:allowed=${manifest.pm_max_version}:current=${currentVersion}`,
|
|
667
|
+
};
|
|
668
|
+
}
|
|
661
669
|
return {
|
|
662
670
|
allowed: false,
|
|
663
671
|
warning: `extension_pm_max_version_exceeded:${layer}:${manifest.name}:allowed=${manifest.pm_max_version}:current=${currentVersion}`,
|
|
@@ -729,6 +737,8 @@ export async function loadExtensions(options) {
|
|
|
729
737
|
failed,
|
|
730
738
|
};
|
|
731
739
|
}
|
|
740
|
+
const DEFAULT_EXTENSION_DEACTIVATE_TIMEOUT_MS = 5_000;
|
|
741
|
+
const MAX_EXTENSION_DEACTIVATE_TIMEOUT_MS = 2_147_483_647;
|
|
732
742
|
function toActivatableExtension(source) {
|
|
733
743
|
// Bind to `source` so a module/default-export authored with methods (or a class
|
|
734
744
|
// instance) keeps its `this` across both lifecycle calls — `activate` is a
|
|
@@ -767,10 +777,13 @@ function resolveActivatableExtension(module) {
|
|
|
767
777
|
*
|
|
768
778
|
* Pass the `activationResult` to skip extensions whose `activate` failed — they
|
|
769
779
|
* never fully initialized, so (VS Code-style) their `deactivate` must not run.
|
|
770
|
-
* Teardowns run concurrently
|
|
771
|
-
*
|
|
780
|
+
* Teardowns run concurrently and each hook has a bounded timeout by default, so
|
|
781
|
+
* one slow or hanging hook cannot serialize the rest or block the host
|
|
782
|
+
* indefinitely unless the host explicitly disables the timeout; the returned
|
|
783
|
+
* warnings/failures preserve loaded order.
|
|
772
784
|
*/
|
|
773
|
-
export async function deactivateExtensions(loadResult, activationResult) {
|
|
785
|
+
export async function deactivateExtensions(loadResult, activationResult, options = {}) {
|
|
786
|
+
const timeoutMs = normalizeExtensionDeactivateTimeout(options?.deactivate_timeout_ms);
|
|
774
787
|
const failedActivationKeys = new Set((activationResult?.failed ?? []).map((entry) => `${entry.layer}:${entry.name}`));
|
|
775
788
|
const targets = [];
|
|
776
789
|
for (const extension of loadResult.loaded) {
|
|
@@ -785,7 +798,7 @@ export async function deactivateExtensions(loadResult, activationResult) {
|
|
|
785
798
|
}
|
|
786
799
|
const outcomes = await Promise.all(targets.map(async ({ extension, deactivate }) => {
|
|
787
800
|
try {
|
|
788
|
-
await deactivate
|
|
801
|
+
await runExtensionDeactivateWithTimeout(deactivate, timeoutMs);
|
|
789
802
|
return { ok: true };
|
|
790
803
|
}
|
|
791
804
|
catch (error) {
|
|
@@ -805,6 +818,46 @@ export async function deactivateExtensions(loadResult, activationResult) {
|
|
|
805
818
|
}
|
|
806
819
|
return { deactivated, warnings, failed };
|
|
807
820
|
}
|
|
821
|
+
function normalizeExtensionDeactivateTimeout(rawTimeout) {
|
|
822
|
+
if (typeof rawTimeout !== "number" || rawTimeout < 0) {
|
|
823
|
+
return DEFAULT_EXTENSION_DEACTIVATE_TIMEOUT_MS;
|
|
824
|
+
}
|
|
825
|
+
if (rawTimeout === 0 || rawTimeout === Infinity) {
|
|
826
|
+
return 0;
|
|
827
|
+
}
|
|
828
|
+
if (!Number.isFinite(rawTimeout)) {
|
|
829
|
+
return DEFAULT_EXTENSION_DEACTIVATE_TIMEOUT_MS;
|
|
830
|
+
}
|
|
831
|
+
return Math.min(MAX_EXTENSION_DEACTIVATE_TIMEOUT_MS, Math.max(1, Math.floor(rawTimeout)));
|
|
832
|
+
}
|
|
833
|
+
async function runExtensionDeactivateWithTimeout(deactivate, timeoutMs) {
|
|
834
|
+
if (timeoutMs === 0) {
|
|
835
|
+
await deactivate();
|
|
836
|
+
return;
|
|
837
|
+
}
|
|
838
|
+
let timeoutHandle;
|
|
839
|
+
try {
|
|
840
|
+
// A timed-out deactivate promise may still finish later; JavaScript promises
|
|
841
|
+
// are not cancellable, so the host only stops waiting and consumes any late
|
|
842
|
+
// rejection from the hook.
|
|
843
|
+
const deactivatePromise = Promise.resolve().then(() => deactivate());
|
|
844
|
+
deactivatePromise.catch(() => { });
|
|
845
|
+
await Promise.race([
|
|
846
|
+
deactivatePromise,
|
|
847
|
+
new Promise((_, reject) => {
|
|
848
|
+
timeoutHandle = setTimeout(() => {
|
|
849
|
+
reject(new Error(`extension deactivate timed out after ${timeoutMs}ms`));
|
|
850
|
+
}, timeoutMs);
|
|
851
|
+
timeoutHandle.unref?.();
|
|
852
|
+
}),
|
|
853
|
+
]);
|
|
854
|
+
}
|
|
855
|
+
finally {
|
|
856
|
+
if (timeoutHandle) {
|
|
857
|
+
clearTimeout(timeoutHandle);
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
}
|
|
808
861
|
function isOutputRendererFormat(value) {
|
|
809
862
|
return value === "toon" || value === "json";
|
|
810
863
|
}
|
|
@@ -1900,4 +1953,4 @@ export async function activateExtensions(loadResult) {
|
|
|
1900
1953
|
};
|
|
1901
1954
|
}
|
|
1902
1955
|
//# sourceMappingURL=loader.js.map
|
|
1903
|
-
//# debugId=
|
|
1956
|
+
//# debugId=19026387-34f8-5e8e-b936-4fc13489f244
|