@unbrained/pm-cli 2026.6.24 → 2026.7.1
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/AGENTS.md +2 -0
- package/CHANGELOG.md +113 -1
- package/CONTRIBUTING.md +30 -0
- package/README.md +16 -3
- package/dist/cli/bootstrap-args.js +89 -79
- package/dist/cli/bootstrap-args.js.map +1 -1
- package/dist/cli/commander-usage.js +3 -3
- package/dist/cli/commander-usage.js.map +1 -1
- package/dist/cli/commands/aggregate.js +8 -7
- package/dist/cli/commands/aggregate.js.map +1 -1
- package/dist/cli/commands/calendar.js +63 -62
- package/dist/cli/commands/calendar.js.map +1 -1
- package/dist/cli/commands/close.d.ts +2 -4
- package/dist/cli/commands/close.js +5 -17
- package/dist/cli/commands/close.js.map +1 -1
- package/dist/cli/commands/completion.js +158 -9
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/config.d.ts +1 -1
- package/dist/cli/commands/config.js +2 -2
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/context.d.ts +31 -4
- package/dist/cli/commands/context.js +33 -10
- package/dist/cli/commands/context.js.map +1 -1
- package/dist/cli/commands/contracts.js +48 -8
- package/dist/cli/commands/contracts.js.map +1 -1
- package/dist/cli/commands/create.d.ts +1 -6
- package/dist/cli/commands/create.js +491 -587
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/extension/bundled-catalog.js +59 -46
- package/dist/cli/commands/extension/bundled-catalog.js.map +1 -1
- package/dist/cli/commands/extension/describe.d.ts +15 -0
- package/dist/cli/commands/extension/describe.js +48 -2
- package/dist/cli/commands/extension/describe.js.map +1 -1
- package/dist/cli/commands/extension/doctor.js +129 -75
- package/dist/cli/commands/extension/doctor.js.map +1 -1
- package/dist/cli/commands/extension/install-sources.js +37 -7
- package/dist/cli/commands/extension/install-sources.js.map +1 -1
- package/dist/cli/commands/extension/managed-state.js +101 -57
- package/dist/cli/commands/extension/managed-state.js.map +1 -1
- package/dist/cli/commands/extension/scaffold.d.ts +38 -8
- package/dist/cli/commands/extension/scaffold.js +1956 -242
- package/dist/cli/commands/extension/scaffold.js.map +1 -1
- package/dist/cli/commands/extension.d.ts +28 -3
- package/dist/cli/commands/extension.js +1181 -880
- package/dist/cli/commands/extension.js.map +1 -1
- package/dist/cli/commands/index.d.ts +3 -1
- package/dist/cli/commands/index.js +5 -3
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/item-filter-options.d.ts +63 -0
- package/dist/cli/commands/item-filter-options.js +10 -0
- package/dist/cli/commands/item-filter-options.js.map +1 -0
- package/dist/cli/commands/legacy-none-tokens.d.ts +14 -0
- package/dist/cli/commands/legacy-none-tokens.js +31 -2
- package/dist/cli/commands/legacy-none-tokens.js.map +1 -1
- package/dist/cli/commands/linked-artifacts.d.ts +7 -0
- package/dist/cli/commands/linked-artifacts.js +12 -2
- package/dist/cli/commands/linked-artifacts.js.map +1 -1
- package/dist/cli/commands/list-filter-shared.js +55 -48
- package/dist/cli/commands/list-filter-shared.js.map +1 -1
- package/dist/cli/commands/list.d.ts +16 -39
- package/dist/cli/commands/list.js +127 -118
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/cli/commands/next.d.ts +98 -0
- package/dist/cli/commands/next.js +304 -0
- package/dist/cli/commands/next.js.map +1 -0
- package/dist/cli/commands/profile.d.ts +208 -0
- package/dist/cli/commands/profile.js +418 -0
- package/dist/cli/commands/profile.js.map +1 -0
- package/dist/cli/commands/repeatable-metadata-parsers.js +12 -13
- package/dist/cli/commands/repeatable-metadata-parsers.js.map +1 -1
- package/dist/cli/commands/schema.d.ts +7 -0
- package/dist/cli/commands/schema.js +9 -3
- package/dist/cli/commands/schema.js.map +1 -1
- package/dist/cli/commands/search.d.ts +2 -39
- package/dist/cli/commands/search.js +196 -172
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/shared-unset-fields.d.ts +30 -0
- package/dist/cli/commands/shared-unset-fields.js +161 -0
- package/dist/cli/commands/shared-unset-fields.js.map +1 -0
- package/dist/cli/commands/stats.js +15 -3
- package/dist/cli/commands/stats.js.map +1 -1
- package/dist/cli/commands/test.js +115 -125
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/commands/update.d.ts +1 -6
- package/dist/cli/commands/update.js +37 -232
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/commands/validate.js +20 -5
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/extension-command-options.js +48 -21
- package/dist/cli/extension-command-options.js.map +1 -1
- package/dist/cli/help-content.js +26 -2
- package/dist/cli/help-content.js.map +1 -1
- package/dist/cli/help-json-payload.js +3 -3
- package/dist/cli/help-json-payload.js.map +1 -1
- package/dist/cli/main.js +27 -12
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/register-list-query.js +42 -3
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +86 -2
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-setup.js +67 -6
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli/registration-helpers.d.ts +9 -1
- package/dist/cli/registration-helpers.js +149 -123
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli-bundle/chunks/activity-AW6XVFH6.js +16 -0
- package/dist/cli-bundle/chunks/{activity-N7RVTLBQ.js → activity-DBLQVIP6.js} +9 -11
- package/dist/cli-bundle/chunks/{aggregate-63NWNIBR.js → aggregate-JTEF4BP7.js} +17 -18
- package/dist/cli-bundle/chunks/aggregate-JTEF4BP7.js.map +1 -0
- package/dist/cli-bundle/chunks/{aggregate-YHCYX2EV.js → aggregate-SDF7DUOD.js} +16 -17
- package/dist/cli-bundle/chunks/aggregate-SDF7DUOD.js.map +7 -0
- package/dist/cli-bundle/chunks/{append-VLQQDHMJ.js → append-LOVPGVPT.js} +8 -10
- package/dist/cli-bundle/chunks/{append-VLQQDHMJ.js.map → append-LOVPGVPT.js.map} +1 -1
- package/dist/cli-bundle/chunks/{append-PUKREFV5.js → append-QCFJSDFL.js} +10 -12
- package/dist/cli-bundle/chunks/{append-PUKREFV5.js.map → append-QCFJSDFL.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-ABYCA5VX.js → chunk-22WKIL3H.js} +9 -11
- package/dist/cli-bundle/chunks/{chunk-ABYCA5VX.js.map → chunk-22WKIL3H.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-A66VYUOV.js → chunk-2466X6E4.js} +9 -11
- package/dist/cli-bundle/chunks/{chunk-A66VYUOV.js.map → chunk-2466X6E4.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-F32L4HR6.js → chunk-27BXPBAY.js} +3 -3
- package/dist/cli-bundle/chunks/{schema-QO5I4FBL.js → chunk-2D4HATP2.js} +136 -66
- package/dist/cli-bundle/chunks/chunk-2D4HATP2.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-J7I4C5ZB.js → chunk-3J6JRJ3I.js} +153 -125
- package/dist/cli-bundle/chunks/chunk-3J6JRJ3I.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-OHDQNKJB.js → chunk-3K2M5OYU.js} +106 -34
- package/dist/cli-bundle/chunks/chunk-3K2M5OYU.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-XVYKWZNL.js → chunk-3S2KT7NG.js} +127 -127
- package/dist/cli-bundle/chunks/chunk-3S2KT7NG.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-5BBEWX6C.js → chunk-3VGN2UWE.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-N5B6WZC5.js → chunk-3XZCOZ5J.js} +115 -123
- package/dist/cli-bundle/chunks/chunk-3XZCOZ5J.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-4A3BJ675.js +799 -0
- package/dist/cli-bundle/chunks/chunk-4A3BJ675.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-4BU75MF4.js +87 -0
- package/dist/cli-bundle/chunks/chunk-4BU75MF4.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-HZF5RLKX.js → chunk-4DSGXSBL.js} +5 -7
- package/dist/cli-bundle/chunks/{chunk-HZF5RLKX.js.map → chunk-4DSGXSBL.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-JV27C7OZ.js → chunk-4DUVCVLZ.js} +4 -6
- package/dist/cli-bundle/chunks/{chunk-JV27C7OZ.js.map → chunk-4DUVCVLZ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-IAP5KYBQ.js → chunk-4XOIEKSD.js} +563 -506
- package/dist/cli-bundle/chunks/chunk-4XOIEKSD.js.map +1 -0
- package/dist/cli-bundle/chunks/{context-5LB7UGKE.js → chunk-55SNVXRQ.js} +79 -82
- package/dist/cli-bundle/chunks/chunk-55SNVXRQ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-BFFO3AIB.js → chunk-5CGRF3L5.js} +128 -128
- package/dist/cli-bundle/chunks/chunk-5CGRF3L5.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-JKL6HRMV.js → chunk-5QFDBI4F.js} +1260 -1046
- package/dist/cli-bundle/chunks/chunk-5QFDBI4F.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-LU36E6GU.js → chunk-64HNBBFQ.js} +8 -12
- package/dist/cli-bundle/chunks/{chunk-LU36E6GU.js.map → chunk-64HNBBFQ.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-6AQZPVHQ.js +2444 -0
- package/dist/cli-bundle/chunks/chunk-6AQZPVHQ.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-7M2HAZEB.js +17 -0
- package/dist/cli-bundle/chunks/chunk-7M2HAZEB.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-VSAABFGQ.js → chunk-7R4QEMZZ.js} +1490 -734
- package/dist/cli-bundle/chunks/chunk-7R4QEMZZ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-M6TUBOGW.js → chunk-A7FPBAQS.js} +19 -12
- package/dist/cli-bundle/chunks/chunk-A7FPBAQS.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-GQYJEEFX.js → chunk-AVEE5EHK.js} +53 -54
- package/dist/cli-bundle/chunks/chunk-AVEE5EHK.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-FMWW2JDU.js → chunk-AXIDKKAT.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-TIM4OD74.js → chunk-BDTISOSD.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-C4C3EJCJ.js → chunk-BHO33VBQ.js} +509 -363
- package/dist/cli-bundle/chunks/chunk-BHO33VBQ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-6W3Y65PL.js → chunk-BZCEN4JA.js} +198 -177
- package/dist/cli-bundle/chunks/chunk-BZCEN4JA.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-RRP6D345.js → chunk-CF7RL6FR.js} +12 -16
- package/dist/cli-bundle/chunks/{chunk-RRP6D345.js.map → chunk-CF7RL6FR.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-HC2S36NB.js → chunk-CWFNTKQJ.js} +154 -126
- package/dist/cli-bundle/chunks/chunk-CWFNTKQJ.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-CZVISY5A.js +87 -0
- package/dist/cli-bundle/chunks/chunk-CZVISY5A.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-CZIFFMZI.js → chunk-DDPTYJIM.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-AYPQUFCX.js → chunk-EJUDVUYZ.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-EOGBMLCE.js → chunk-EVMTBV6V.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-RAWA3Y7O.js → chunk-FFMQB7WR.js} +199 -178
- package/dist/cli-bundle/chunks/chunk-FFMQB7WR.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-CG3KP6I5.js → chunk-G7I7DEZA.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-MEXZ5XUM.js → chunk-GJ326ZKX.js} +53 -54
- package/dist/cli-bundle/chunks/chunk-GJ326ZKX.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-HPPFYYOV.js +119 -0
- package/dist/cli-bundle/chunks/chunk-HPPFYYOV.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-OF7V47P3.js → chunk-HXTQJXWT.js} +2172 -2146
- package/dist/cli-bundle/chunks/chunk-HXTQJXWT.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-F4BNR2IN.js → chunk-HYTGA6GI.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-2WCYE3IF.js → chunk-HZZEHPRG.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-IBMFIKVS.js +14 -0
- package/dist/cli-bundle/chunks/chunk-IBMFIKVS.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-YV2OSAMS.js → chunk-IJYK2T43.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4XDGYFHL.js → chunk-IPYBJWTE.js} +10 -14
- package/dist/cli-bundle/chunks/{chunk-4XDGYFHL.js.map → chunk-IPYBJWTE.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-6EBNFQOR.js → chunk-IZBR4NRW.js} +10 -14
- package/dist/cli-bundle/chunks/{chunk-6EBNFQOR.js.map → chunk-IZBR4NRW.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-VFJYVXHL.js → chunk-JLM7BHI7.js} +7 -9
- package/dist/cli-bundle/chunks/{chunk-VFJYVXHL.js.map → chunk-JLM7BHI7.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-6EL7SW5C.js → chunk-JMP4E6D7.js} +114 -122
- package/dist/cli-bundle/chunks/chunk-JMP4E6D7.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-QOUOMPHO.js → chunk-JPECA746.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KJZOSF7J.js → chunk-JSU5P7VS.js} +100 -35
- package/dist/cli-bundle/chunks/chunk-JSU5P7VS.js.map +1 -0
- package/dist/cli-bundle/chunks/{context-55VEOYI3.js → chunk-JWXRETDF.js} +79 -82
- package/dist/cli-bundle/chunks/chunk-JWXRETDF.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-OQ2E64FH.js → chunk-KNPEF7QG.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-3BKH2CL3.js → chunk-L5OEFZQG.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-DTABLLVE.js → chunk-LB6TP6MC.js} +5 -7
- package/dist/cli-bundle/chunks/{chunk-DTABLLVE.js.map → chunk-LB6TP6MC.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-TSI32UEL.js → chunk-MAUKX7JC.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-TSI32UEL.js.map → chunk-MAUKX7JC.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-SMXSDY7J.js → chunk-MDPEOIGN.js} +2221 -2172
- package/dist/cli-bundle/chunks/chunk-MDPEOIGN.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-5S4ZGDB2.js → chunk-N74UMG5H.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-IXAZI443.js → chunk-NFDPYAIP.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-SKC4UTRP.js → chunk-NKZAN7BD.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-NOLPZMSV.js +116 -0
- package/dist/cli-bundle/chunks/chunk-NOLPZMSV.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-L7UXKP2I.js → chunk-NU2UEROZ.js} +1257 -1029
- package/dist/cli-bundle/chunks/chunk-NU2UEROZ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-HBAEFWX3.js → chunk-NUHHPVVS.js} +65 -335
- package/dist/cli-bundle/chunks/chunk-NUHHPVVS.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-JPJDP4VU.js → chunk-NWMZWYYB.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-MWMHZOZZ.js → chunk-OGXLACHC.js} +10 -14
- package/dist/cli-bundle/chunks/{chunk-MWMHZOZZ.js.map → chunk-OGXLACHC.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-OKQ22KTH.js +379 -0
- package/dist/cli-bundle/chunks/chunk-OKQ22KTH.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-KKX4Z2SE.js → chunk-OTUHB4HS.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-ZLWRPBOW.js → chunk-QCWF6IYD.js} +510 -364
- package/dist/cli-bundle/chunks/chunk-QCWF6IYD.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-PRVTGX64.js → chunk-RGEMWD6Q.js} +11 -23
- package/dist/cli-bundle/chunks/chunk-RGEMWD6Q.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-RH5ZBYFD.js +809 -0
- package/dist/cli-bundle/chunks/chunk-RH5ZBYFD.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-ALQKV6U7.js → chunk-RLDHZHQS.js} +12 -16
- package/dist/cli-bundle/chunks/{chunk-ALQKV6U7.js.map → chunk-RLDHZHQS.js.map} +1 -1
- package/dist/cli-bundle/chunks/{schema-C6QA367T.js → chunk-RMMQ74TG.js} +144 -67
- package/dist/cli-bundle/chunks/chunk-RMMQ74TG.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-EYPINTFR.js → chunk-RVUALSJF.js} +1516 -753
- package/dist/cli-bundle/chunks/chunk-RVUALSJF.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-SDR5J34Q.js +2468 -0
- package/dist/cli-bundle/chunks/chunk-SDR5J34Q.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-WB5BYQMF.js → chunk-SLMUGTK3.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-SUREE24M.js → chunk-TP5Q5ZD3.js} +12 -24
- package/dist/cli-bundle/chunks/chunk-TP5Q5ZD3.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-UACWNBL2.js → chunk-UYUYDGIB.js} +7 -9
- package/dist/cli-bundle/chunks/{chunk-UACWNBL2.js.map → chunk-UYUYDGIB.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-V4UYNSEM.js → chunk-UZIWVBE6.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-V4UYNSEM.js.map → chunk-UZIWVBE6.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-EWRSXOIZ.js → chunk-V3NOKJF2.js} +11 -13
- package/dist/cli-bundle/chunks/{chunk-EWRSXOIZ.js.map → chunk-V3NOKJF2.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-XXKV4UWE.js → chunk-VARHOHYV.js} +571 -507
- package/dist/cli-bundle/chunks/chunk-VARHOHYV.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-AEACLRVH.js → chunk-VICZWYGZ.js} +18 -11
- package/dist/cli-bundle/chunks/chunk-VICZWYGZ.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-VY3VQ22F.js +84 -0
- package/dist/cli-bundle/chunks/chunk-VY3VQ22F.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-VZDBVEZR.js +382 -0
- package/dist/cli-bundle/chunks/chunk-VZDBVEZR.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-GDUMGZK3.js → chunk-W4ULYO7Z.js} +11 -13
- package/dist/cli-bundle/chunks/{chunk-GDUMGZK3.js.map → chunk-W4ULYO7Z.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-I6QMJ2XT.js → chunk-WYDHYJPO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ALKFCIIB.js → chunk-YITK2PJ6.js} +9 -11
- package/dist/cli-bundle/chunks/{chunk-ALKFCIIB.js.map → chunk-YITK2PJ6.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-YJIEJRZB.js +84 -0
- package/dist/cli-bundle/chunks/chunk-YJIEJRZB.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-LNEDHJNQ.js → chunk-ZETXE4SE.js} +66 -329
- package/dist/cli-bundle/chunks/chunk-ZETXE4SE.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-KIEAK7YE.js → chunk-ZRP4VG5U.js} +2 -2
- package/dist/cli-bundle/chunks/{claim-FZZZCAY6.js → claim-EMQLYPRW.js} +10 -12
- package/dist/cli-bundle/chunks/{claim-FZZZCAY6.js.map → claim-EMQLYPRW.js.map} +1 -1
- package/dist/cli-bundle/chunks/{claim-XK5QBZE3.js → claim-T3GCKV7C.js} +8 -10
- package/dist/cli-bundle/chunks/{claim-XK5QBZE3.js.map → claim-T3GCKV7C.js.map} +1 -1
- package/dist/cli-bundle/chunks/close-E6ZZGCJY.js +14 -0
- package/dist/cli-bundle/chunks/{close-QHMVWM7M.js → close-TQYAAFJP.js} +7 -8
- package/dist/cli-bundle/chunks/{close-many-OIXJE2JZ.js → close-many-BG5QQIDQ.js} +16 -18
- package/dist/cli-bundle/chunks/{close-many-OIXJE2JZ.js.map → close-many-BG5QQIDQ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{close-many-SUU5BS2C.js → close-many-LDRVEQY2.js} +18 -20
- package/dist/cli-bundle/chunks/{close-many-SUU5BS2C.js.map → close-many-LDRVEQY2.js.map} +1 -1
- package/dist/cli-bundle/chunks/{comments-5YM62D75.js → comments-QCKR2YY2.js} +11 -13
- package/dist/cli-bundle/chunks/{comments-5YM62D75.js.map → comments-QCKR2YY2.js.map} +1 -1
- package/dist/cli-bundle/chunks/{comments-RH3IBIRH.js → comments-YUXJRZPQ.js} +9 -11
- package/dist/cli-bundle/chunks/{comments-RH3IBIRH.js.map → comments-YUXJRZPQ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{config-NCNNWF6R.js → config-DMSU64QO.js} +18 -387
- package/dist/cli-bundle/chunks/config-DMSU64QO.js.map +7 -0
- package/dist/cli-bundle/chunks/{config-SW3U7XP2.js → config-QH2DICD6.js} +18 -380
- package/dist/cli-bundle/chunks/config-QH2DICD6.js.map +1 -0
- package/dist/cli-bundle/chunks/context-B6275WPX.js +46 -0
- package/dist/cli-bundle/chunks/context-OCZ3FJ4Z.js +42 -0
- package/dist/cli-bundle/chunks/{contracts-SY6PDFIK.js → contracts-HN7ABKLP.js} +72 -15
- package/dist/cli-bundle/chunks/contracts-HN7ABKLP.js.map +7 -0
- package/dist/cli-bundle/chunks/{contracts-JXFGBOYT.js → contracts-W4FZVVD6.js} +72 -15
- package/dist/cli-bundle/chunks/contracts-W4FZVVD6.js.map +1 -0
- package/dist/cli-bundle/chunks/{copy-N3GE6FYS.js → copy-BTJOSKKT.js} +7 -11
- package/dist/cli-bundle/chunks/{copy-N3GE6FYS.js.map → copy-BTJOSKKT.js.map} +1 -1
- package/dist/cli-bundle/chunks/{copy-IEDBJOOX.js → copy-DEM4DATS.js} +9 -13
- package/dist/cli-bundle/chunks/{copy-IEDBJOOX.js.map → copy-DEM4DATS.js.map} +1 -1
- package/dist/cli-bundle/chunks/create-OH3BDGBB.js +28 -0
- package/dist/cli-bundle/chunks/{create-O4VONGPG.js → create-RLRJMRTM.js} +12 -14
- package/dist/cli-bundle/chunks/{delete-LPEIF7RU.js → delete-BHK7VB2Z.js} +5 -7
- package/dist/cli-bundle/chunks/{delete-LPEIF7RU.js.map → delete-BHK7VB2Z.js.map} +1 -1
- package/dist/cli-bundle/chunks/{delete-724EQ6OS.js → delete-LSVHAB4Y.js} +7 -9
- package/dist/cli-bundle/chunks/{delete-724EQ6OS.js.map → delete-LSVHAB4Y.js.map} +1 -1
- package/dist/cli-bundle/chunks/{deps-RSBU4SIU.js → deps-4UDFJRUA.js} +8 -11
- package/dist/cli-bundle/chunks/{deps-RSBU4SIU.js.map → deps-4UDFJRUA.js.map} +1 -1
- package/dist/cli-bundle/chunks/{deps-T3Y6Y7RT.js → deps-XHYXWEPT.js} +6 -9
- package/dist/cli-bundle/chunks/{deps-T3Y6Y7RT.js.map → deps-XHYXWEPT.js.map} +1 -1
- package/dist/cli-bundle/chunks/{docs-IFS7HZPP.js → docs-26S44RXU.js} +8 -9
- package/dist/cli-bundle/chunks/{docs-IFS7HZPP.js.map → docs-26S44RXU.js.map} +1 -1
- package/dist/cli-bundle/chunks/{docs-75ZLCO3G.js → docs-GYZNVS26.js} +10 -11
- package/dist/cli-bundle/chunks/{docs-75ZLCO3G.js.map → docs-GYZNVS26.js.map} +1 -1
- package/dist/cli-bundle/chunks/{eval-L2KD7W3M.js → eval-PGRVIJQU.js} +12 -14
- package/dist/cli-bundle/chunks/{eval-L2KD7W3M.js.map → eval-PGRVIJQU.js.map} +1 -1
- package/dist/cli-bundle/chunks/{eval-QGR7JCQO.js → eval-UYF3ZPVO.js} +10 -12
- package/dist/cli-bundle/chunks/{eval-QGR7JCQO.js.map → eval-UYF3ZPVO.js.map} +1 -1
- package/dist/cli-bundle/chunks/{extension-YQF4CPIR.js → extension-CPSLJQVE.js} +12 -7
- package/dist/cli-bundle/chunks/{extension-3JYWJ5K2.js → extension-CXJ6RELI.js} +12 -7
- package/dist/cli-bundle/chunks/{files-EPEJMJHQ.js → files-MBNICQFM.js} +9 -11
- package/dist/cli-bundle/chunks/{files-EPEJMJHQ.js.map → files-MBNICQFM.js.map} +1 -1
- package/dist/cli-bundle/chunks/{files-5BQWDRDT.js → files-NQHEXUZD.js} +11 -13
- package/dist/cli-bundle/chunks/{files-5BQWDRDT.js.map → files-NQHEXUZD.js.map} +1 -1
- package/dist/cli-bundle/chunks/{focus-RWGKD76E.js → focus-DWYIG7GU.js} +10 -14
- package/dist/cli-bundle/chunks/{focus-RWGKD76E.js.map → focus-DWYIG7GU.js.map} +1 -1
- package/dist/cli-bundle/chunks/{focus-DQVJAPOE.js → focus-XZW5423D.js} +8 -12
- package/dist/cli-bundle/chunks/{focus-DQVJAPOE.js.map → focus-XZW5423D.js.map} +1 -1
- package/dist/cli-bundle/chunks/{gc-BEJMQT64.js → gc-7GQYOS2G.js} +3 -3
- package/dist/cli-bundle/chunks/{gc-JEFQDJPA.js → gc-LPVMKJQJ.js} +3 -3
- package/dist/cli-bundle/chunks/{get-LQG6PEVG.js → get-A7MAOHCU.js} +10 -13
- package/dist/cli-bundle/chunks/{get-LQG6PEVG.js.map → get-A7MAOHCU.js.map} +1 -1
- package/dist/cli-bundle/chunks/{get-WVN75H42.js → get-DSDEKJ3L.js} +12 -15
- package/dist/cli-bundle/chunks/{get-WVN75H42.js.map → get-DSDEKJ3L.js.map} +1 -1
- package/dist/cli-bundle/chunks/{health-JJJOY7DJ.js → health-3IPFLKXB.js} +17 -17
- package/dist/cli-bundle/chunks/{health-P67NZ6TT.js → health-GZXGBZ36.js} +17 -17
- package/dist/cli-bundle/chunks/{history-RUKPKNY7.js → history-NERDJNUB.js} +8 -10
- package/dist/cli-bundle/chunks/history-WSZHY3PN.js +18 -0
- package/dist/cli-bundle/chunks/{history-compact-NQ7VPRVT.js → history-compact-2WRZ2WK4.js} +11 -14
- package/dist/cli-bundle/chunks/{history-compact-NQ7VPRVT.js.map → history-compact-2WRZ2WK4.js.map} +1 -1
- package/dist/cli-bundle/chunks/{history-compact-ZAOWR7GD.js → history-compact-HR7BB4LR.js} +13 -16
- package/dist/cli-bundle/chunks/{history-compact-ZAOWR7GD.js.map → history-compact-HR7BB4LR.js.map} +1 -1
- package/dist/cli-bundle/chunks/history-redact-MP6CH7U5.js +19 -0
- package/dist/cli-bundle/chunks/{history-redact-YY4XYVEP.js → history-redact-O3NBCNWC.js} +9 -11
- package/dist/cli-bundle/chunks/{history-repair-EHL4ODQY.js → history-repair-LCMOS45X.js} +11 -14
- package/dist/cli-bundle/chunks/{history-repair-EHL4ODQY.js.map → history-repair-LCMOS45X.js.map} +1 -1
- package/dist/cli-bundle/chunks/{history-repair-YSQH6SY6.js → history-repair-XA3LC4GA.js} +13 -16
- package/dist/cli-bundle/chunks/{history-repair-YSQH6SY6.js.map → history-repair-XA3LC4GA.js.map} +1 -1
- package/dist/cli-bundle/chunks/{init-HBFGYS66.js → init-64XDLQJB.js} +12 -11
- package/dist/cli-bundle/chunks/init-PAX32BJA.js +22 -0
- package/dist/cli-bundle/chunks/{learnings-KFQO7GEZ.js → learnings-JR6MA5TI.js} +9 -11
- package/dist/cli-bundle/chunks/{learnings-KFQO7GEZ.js.map → learnings-JR6MA5TI.js.map} +1 -1
- package/dist/cli-bundle/chunks/{learnings-J555ZFPD.js → learnings-LPKCSJX7.js} +11 -13
- package/dist/cli-bundle/chunks/{learnings-J555ZFPD.js.map → learnings-LPKCSJX7.js.map} +1 -1
- package/dist/cli-bundle/chunks/{list-C7R33MD5.js → list-DNBJVO3E.js} +10 -10
- package/dist/cli-bundle/chunks/{list-DSN6UNFB.js → list-G5Y65VF6.js} +10 -10
- package/dist/cli-bundle/chunks/next-BCERKDUR.js +277 -0
- package/dist/cli-bundle/chunks/next-BCERKDUR.js.map +7 -0
- package/dist/cli-bundle/chunks/next-FYTQF6HG.js +274 -0
- package/dist/cli-bundle/chunks/next-FYTQF6HG.js.map +1 -0
- package/dist/cli-bundle/chunks/{notes-V4VNIQL4.js → notes-2BMU3VVQ.js} +9 -11
- package/dist/cli-bundle/chunks/{notes-V4VNIQL4.js.map → notes-2BMU3VVQ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{notes-VYJFN2A3.js → notes-6KTGO2OJ.js} +11 -13
- package/dist/cli-bundle/chunks/{notes-VYJFN2A3.js.map → notes-6KTGO2OJ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{plan-RBHQ5PO7.js → plan-4WXEQCTN.js} +15 -18
- package/dist/cli-bundle/chunks/{plan-RBHQ5PO7.js.map → plan-4WXEQCTN.js.map} +1 -1
- package/dist/cli-bundle/chunks/{plan-DHRSVSHR.js → plan-RKZHQVXR.js} +17 -20
- package/dist/cli-bundle/chunks/{plan-DHRSVSHR.js.map → plan-RKZHQVXR.js.map} +1 -1
- package/dist/cli-bundle/chunks/profile-4OMM32CD.js +1235 -0
- package/dist/cli-bundle/chunks/profile-4OMM32CD.js.map +7 -0
- package/dist/cli-bundle/chunks/profile-QLER5ENE.js +1197 -0
- package/dist/cli-bundle/chunks/profile-QLER5ENE.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-list-query-OM3E2KMY.js → register-list-query-7LV46VAU.js} +45 -21
- package/dist/cli-bundle/chunks/register-list-query-7LV46VAU.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-list-query-CCMHGZTF.js → register-list-query-SNG5PGA4.js} +44 -20
- package/dist/cli-bundle/chunks/register-list-query-SNG5PGA4.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-mutation-N3CDEGZU.js → register-mutation-ENNDUAZG.js} +106 -40
- package/dist/cli-bundle/chunks/register-mutation-ENNDUAZG.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-UXTTWL6N.js → register-mutation-KK7PHYYU.js} +105 -39
- package/dist/cli-bundle/chunks/register-mutation-KK7PHYYU.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-operations-UDIFMQKD.js → register-operations-C6OWLDSH.js} +32 -34
- package/dist/cli-bundle/chunks/{register-operations-UDIFMQKD.js.map → register-operations-C6OWLDSH.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-operations-R2FLOCRI.js → register-operations-HZ6XERQG.js} +30 -32
- package/dist/cli-bundle/chunks/{register-operations-R2FLOCRI.js.map → register-operations-HZ6XERQG.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-setup-G5LTSFYK.js → register-setup-P67EMBDJ.js} +68 -25
- package/dist/cli-bundle/chunks/register-setup-P67EMBDJ.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-setup-TWHKICM2.js → register-setup-ZKJ53RS7.js} +67 -24
- package/dist/cli-bundle/chunks/register-setup-ZKJ53RS7.js.map +7 -0
- package/dist/cli-bundle/chunks/{restore-LL2WLEDG.js → restore-4MHZFJ2E.js} +9 -11
- package/dist/cli-bundle/chunks/restore-YALDGTQR.js +17 -0
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-M4H2ZI64.js → scheduling-shortcuts-LB6DOLRL.js} +14 -16
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-M4H2ZI64.js.map → scheduling-shortcuts-LB6DOLRL.js.map} +1 -1
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-255GI3BU.js → scheduling-shortcuts-UTOYKLXQ.js} +12 -14
- package/dist/cli-bundle/chunks/{scheduling-shortcuts-255GI3BU.js.map → scheduling-shortcuts-UTOYKLXQ.js.map} +1 -1
- package/dist/cli-bundle/chunks/schema-73HR2OJW.js +75 -0
- package/dist/cli-bundle/chunks/schema-U6LJKSIR.js +71 -0
- package/dist/cli-bundle/chunks/{search-2EI6EAXH.js → search-AXPXKZER.js} +10 -12
- package/dist/cli-bundle/chunks/{search-QBFBLQRO.js → search-KILGT37L.js} +10 -12
- package/dist/cli-bundle/chunks/{stats-TKC6CAKB.js → stats-PSYVVTNZ.js} +21 -13
- package/dist/cli-bundle/chunks/stats-PSYVVTNZ.js.map +1 -0
- package/dist/cli-bundle/chunks/{stats-TCW2SZQG.js → stats-W5KNVJWQ.js} +20 -12
- package/dist/cli-bundle/chunks/stats-W5KNVJWQ.js.map +7 -0
- package/dist/cli-bundle/chunks/{telemetry-BT2VSWU2.js → telemetry-BZUF6H7G.js} +4 -4
- package/dist/cli-bundle/chunks/{telemetry-LQ6FRTUT.js → telemetry-GAHHQTOS.js} +4 -4
- package/dist/cli-bundle/chunks/test-ACD52Z3S.js +35 -0
- package/dist/cli-bundle/chunks/test-ACD52Z3S.js.map +7 -0
- package/dist/cli-bundle/chunks/{test-NV2DRPUS.js → test-PWDIZ255.js} +15 -16
- package/dist/cli-bundle/chunks/test-PWDIZ255.js.map +1 -0
- package/dist/cli-bundle/chunks/{test-all-DZ76VTPQ.js → test-all-L2MDDUCA.js} +20 -22
- package/dist/cli-bundle/chunks/{test-all-DZ76VTPQ.js.map → test-all-L2MDDUCA.js.map} +1 -1
- package/dist/cli-bundle/chunks/{test-all-REW67LXT.js → test-all-RBZ6DLU2.js} +18 -20
- package/dist/cli-bundle/chunks/{test-all-REW67LXT.js.map → test-all-RBZ6DLU2.js.map} +1 -1
- package/dist/cli-bundle/chunks/{test-runs-PX73DMMI.js → test-runs-PLRAZEFW.js} +5 -6
- package/dist/cli-bundle/chunks/test-runs-PLRAZEFW.js.map +7 -0
- package/dist/cli-bundle/chunks/{test-runs-FQ5WNQLP.js → test-runs-UXIXPDKU.js} +6 -7
- package/dist/cli-bundle/chunks/test-runs-UXIXPDKU.js.map +1 -0
- package/dist/cli-bundle/chunks/update-AMRSOIWP.js +24 -0
- package/dist/cli-bundle/chunks/update-AMRSOIWP.js.map +7 -0
- package/dist/cli-bundle/chunks/update-KFX2SIAC.js +28 -0
- package/dist/cli-bundle/chunks/update-KFX2SIAC.js.map +1 -0
- package/dist/cli-bundle/chunks/{update-many-Q5ZEI64S.js → update-many-RNSBX2TA.js} +35 -36
- package/dist/cli-bundle/chunks/{update-many-Q5ZEI64S.js.map → update-many-RNSBX2TA.js.map} +1 -1
- package/dist/cli-bundle/chunks/{update-many-2ILP6E4Y.js → update-many-Z5GJS5LC.js} +33 -34
- package/dist/cli-bundle/chunks/{update-many-2ILP6E4Y.js.map → update-many-Z5GJS5LC.js.map} +1 -1
- package/dist/cli-bundle/chunks/{upgrade-FOZKQTQF.js → upgrade-BRL6KCOJ.js} +13 -8
- package/dist/cli-bundle/chunks/{upgrade-FOZKQTQF.js.map → upgrade-BRL6KCOJ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{upgrade-DHL74PQH.js → upgrade-HAK6JG2O.js} +11 -6
- package/dist/cli-bundle/chunks/{upgrade-DHL74PQH.js.map → upgrade-HAK6JG2O.js.map} +1 -1
- package/dist/cli-bundle/chunks/{validate-HYZNIB6W.js → validate-MTUVL5VC.js} +38 -28
- package/dist/cli-bundle/chunks/validate-MTUVL5VC.js.map +7 -0
- package/dist/cli-bundle/chunks/{validate-54SYJ7QW.js → validate-X5W76YJL.js} +39 -29
- package/dist/cli-bundle/chunks/validate-X5W76YJL.js.map +1 -0
- package/dist/cli-bundle/main.js +95 -724
- package/dist/cli-bundle/main.js.map +4 -4
- package/dist/core/config/positional-value.d.ts +2 -0
- package/dist/core/config/positional-value.js +2 -2
- package/dist/core/config/positional-value.js.map +1 -1
- package/dist/core/extensions/activation-summary-markdown.d.ts +71 -0
- package/dist/core/extensions/activation-summary-markdown.js +151 -0
- package/dist/core/extensions/activation-summary-markdown.js.map +1 -0
- package/dist/core/extensions/activation-summary.d.ts +2 -0
- package/dist/core/extensions/activation-summary.js +3 -2
- package/dist/core/extensions/activation-summary.js.map +1 -1
- package/dist/core/extensions/capability-usage.d.ts +1 -1
- package/dist/core/extensions/capability-usage.js +4 -3
- package/dist/core/extensions/capability-usage.js.map +1 -1
- package/dist/core/extensions/extension-policy.d.ts +18 -3
- package/dist/core/extensions/extension-policy.js +116 -106
- package/dist/core/extensions/extension-policy.js.map +1 -1
- package/dist/core/extensions/extension-registries.js +3 -2
- package/dist/core/extensions/extension-registries.js.map +1 -1
- package/dist/core/extensions/extension-types.d.ts +21 -1
- package/dist/core/extensions/extension-types.js +3 -2
- package/dist/core/extensions/extension-types.js.map +1 -1
- package/dist/core/extensions/loader.js +439 -232
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/fs/fs-utils.js +27 -2
- package/dist/core/fs/fs-utils.js.map +1 -1
- package/dist/core/item/actionability.d.ts +57 -0
- package/dist/core/item/actionability.js +178 -0
- package/dist/core/item/actionability.js.map +1 -0
- package/dist/core/item/item-format.js +523 -410
- package/dist/core/item/item-format.js.map +1 -1
- package/dist/core/item/type-registry.js +18 -45
- package/dist/core/item/type-registry.js.map +1 -1
- package/dist/core/profile/profile-describe.d.ts +64 -0
- package/dist/core/profile/profile-describe.js +83 -0
- package/dist/core/profile/profile-describe.js.map +1 -0
- package/dist/core/profile/profile-lint.d.ts +53 -0
- package/dist/core/profile/profile-lint.js +422 -0
- package/dist/core/profile/profile-lint.js.map +1 -0
- package/dist/core/profile/profile-plan.d.ts +145 -0
- package/dist/core/profile/profile-plan.js +0 -0
- package/dist/core/profile/profile-plan.js.map +1 -0
- package/dist/core/profile/profile-presets.d.ts +218 -0
- package/dist/core/profile/profile-presets.js +325 -0
- package/dist/core/profile/profile-presets.js.map +1 -0
- package/dist/core/schema/fields-file.js +25 -25
- package/dist/core/schema/fields-file.js.map +1 -1
- package/dist/core/schema/item-types-file.js +3 -3
- package/dist/core/schema/item-types-file.js.map +1 -1
- package/dist/core/schema/runtime-schema.js +4 -4
- package/dist/core/schema/runtime-schema.js.map +1 -1
- package/dist/core/schema/status-defs-file.js +3 -3
- package/dist/core/schema/status-defs-file.js.map +1 -1
- package/dist/core/shared/serialization.js +83 -62
- package/dist/core/shared/serialization.js.map +1 -1
- package/dist/core/store/item-store.d.ts +1 -0
- package/dist/core/store/item-store.js +16 -8
- package/dist/core/store/item-store.js.map +1 -1
- package/dist/core/store/paths.js +4 -32
- package/dist/core/store/paths.js.map +1 -1
- package/dist/core/store/settings.js +14 -14
- package/dist/core/store/settings.js.map +1 -1
- package/dist/core/telemetry/observability.js +50 -54
- package/dist/core/telemetry/observability.js.map +1 -1
- package/dist/core/telemetry/runtime.js +11 -2
- package/dist/core/telemetry/runtime.js.map +1 -1
- package/dist/core/test/background-runs.js +3 -2
- package/dist/core/test/background-runs.js.map +1 -1
- package/dist/core/validate/linked-artifact-reference.d.ts +24 -0
- package/dist/core/validate/linked-artifact-reference.js +41 -0
- package/dist/core/validate/linked-artifact-reference.js.map +1 -0
- package/dist/mcp/server.js +540 -420
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tool-definitions.js +33 -2
- package/dist/mcp/tool-definitions.js.map +1 -1
- package/dist/sdk/cli-contracts/commander-types.d.ts +1 -0
- package/dist/sdk/cli-contracts/commander-types.js +15 -2
- package/dist/sdk/cli-contracts/commander-types.js.map +1 -1
- package/dist/sdk/cli-contracts/enum-contracts.d.ts +3 -3
- package/dist/sdk/cli-contracts/enum-contracts.js +6 -2
- package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.d.ts +149 -0
- package/dist/sdk/cli-contracts/flag-contracts.js +1514 -0
- package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -0
- package/dist/sdk/cli-contracts/string-lists.d.ts +14 -0
- package/dist/sdk/cli-contracts/string-lists.js +20 -0
- package/dist/sdk/cli-contracts/string-lists.js.map +1 -0
- package/dist/sdk/cli-contracts/tool-option-contracts.d.ts +1 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.js +51 -109
- package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.d.ts +17 -0
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +54 -5
- package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-schema.d.ts +74 -0
- package/dist/sdk/cli-contracts/tool-schema.js +871 -0
- package/dist/sdk/cli-contracts/tool-schema.js.map +1 -0
- package/dist/sdk/cli-contracts.d.ts +13 -193
- package/dist/sdk/cli-contracts.js +5 -2277
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/sdk/compose.d.ts +11 -5
- package/dist/sdk/compose.js +240 -124
- package/dist/sdk/compose.js.map +1 -1
- package/dist/sdk/define.d.ts +14 -0
- package/dist/sdk/define.js +17 -2
- package/dist/sdk/define.js.map +1 -1
- package/dist/sdk/index.d.ts +14 -3
- package/dist/sdk/index.js +14 -3
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/testing.d.ts +82 -2
- package/dist/sdk/testing.js +74 -3
- package/dist/sdk/testing.js.map +1 -1
- package/docs/AGENT_GUIDE.md +2 -0
- package/docs/CLAUDE_CODE_PLUGIN.md +2 -2
- package/docs/COMMANDS.md +37 -0
- package/docs/EXTENSIONS.md +12 -13
- package/docs/RELEASING.md +8 -4
- package/docs/SDK.md +184 -17
- package/docs/TESTING.md +12 -0
- package/docs/examples/policy-restricted-extension/README.md +6 -0
- package/docs/examples/policy-restricted-extension/index.ts +40 -0
- package/docs/examples/policy-restricted-extension/manifest.json +2 -2
- package/docs/examples/starter-extension/README.md +14 -2
- package/docs/examples/starter-extension/{index.js → index.ts} +51 -6
- package/docs/examples/starter-extension/manifest.json +2 -2
- package/package.json +20 -7
- package/packages/pm-beads/extensions/beads/index.ts +3 -3
- package/packages/pm-beads/extensions/beads/manifest.json +2 -2
- package/packages/pm-beads/extensions/beads/runtime-loader.ts +19 -7
- package/packages/pm-beads/extensions/beads/runtime.ts +155 -37
- package/packages/pm-calendar/extensions/calendar/index.ts +3 -3
- package/packages/pm-calendar/extensions/calendar/manifest.json +2 -2
- package/packages/pm-calendar/extensions/calendar/runtime.ts +2 -2
- package/packages/pm-command-kit/extensions/command-kit/index.ts +1 -1
- package/packages/pm-command-kit/extensions/command-kit/manifest.json +2 -2
- package/packages/pm-governance-audit/extensions/governance-audit/index.ts +2 -2
- package/packages/pm-governance-audit/extensions/governance-audit/manifest.json +2 -2
- package/packages/pm-governance-audit/extensions/governance-audit/runtime.ts +1 -1
- package/packages/pm-guide-shell/extensions/guide-shell/index.ts +2 -2
- package/packages/pm-guide-shell/extensions/guide-shell/manifest.json +2 -2
- package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +1 -1
- package/packages/pm-kanban/README.md +97 -0
- package/packages/pm-kanban/extensions/kanban/index.ts +191 -0
- package/packages/pm-kanban/extensions/kanban/manifest.json +19 -0
- package/packages/pm-kanban/package.json +57 -0
- package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/index.ts +1 -1
- package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/manifest.json +2 -2
- package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/index.ts +2 -2
- package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/manifest.json +2 -2
- package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/runtime.ts +1 -1
- package/packages/pm-search-advanced/extensions/search-advanced/index.ts +2 -2
- package/packages/pm-search-advanced/extensions/search-advanced/manifest.json +2 -2
- package/packages/pm-search-advanced/extensions/search-advanced/runtime.ts +1 -1
- package/packages/pm-templates/extensions/templates/index.ts +2 -2
- package/packages/pm-templates/extensions/templates/manifest.json +2 -2
- package/packages/pm-templates/extensions/templates/runtime.ts +1 -1
- package/packages/pm-todos/extensions/todos/index.ts +3 -3
- package/packages/pm-todos/extensions/todos/manifest.json +2 -2
- package/packages/pm-todos/extensions/todos/runtime-loader.ts +19 -7
- package/packages/pm-todos/extensions/todos/runtime.ts +177 -43
- package/plugins/pm-claude/scripts/pm-mcp-server.mjs +2 -2
- package/plugins/pm-codex/scripts/pm-mcp-server.mjs +2 -2
- package/scripts/bundle-cli.mjs +1 -1
- package/dist/cli-bundle/chunks/activity-54TXGJ2T.js +0 -18
- package/dist/cli-bundle/chunks/aggregate-63NWNIBR.js.map +0 -1
- package/dist/cli-bundle/chunks/aggregate-YHCYX2EV.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-6EL7SW5C.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-6W3Y65PL.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-AEACLRVH.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-B74BP6IS.js +0 -78
- package/dist/cli-bundle/chunks/chunk-B74BP6IS.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-BFFO3AIB.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-C4C3EJCJ.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-EYPINTFR.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-FBLT6WGK.js +0 -75
- package/dist/cli-bundle/chunks/chunk-FBLT6WGK.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-GQYJEEFX.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-HBAEFWX3.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-HC2S36NB.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-IAP5KYBQ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-INPHFO33.js +0 -764
- package/dist/cli-bundle/chunks/chunk-INPHFO33.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-IOT6WRL5.js +0 -86
- package/dist/cli-bundle/chunks/chunk-IOT6WRL5.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-ISEKN64V.js +0 -35
- package/dist/cli-bundle/chunks/chunk-ISEKN64V.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-J3NMWFIN.js +0 -115
- package/dist/cli-bundle/chunks/chunk-J3NMWFIN.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-J7I4C5ZB.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-JKL6HRMV.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-KJZOSF7J.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-L7UXKP2I.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-LNEDHJNQ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-M6TUBOGW.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-MEXZ5XUM.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-N5B6WZC5.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-NJ73ALW2.js +0 -761
- package/dist/cli-bundle/chunks/chunk-NJ73ALW2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-NVXGVEFD.js +0 -83
- package/dist/cli-bundle/chunks/chunk-NVXGVEFD.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-OF7V47P3.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-OHDQNKJB.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-PEL2NLQE.js +0 -118
- package/dist/cli-bundle/chunks/chunk-PEL2NLQE.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-PRVTGX64.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-RAWA3Y7O.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-SMXSDY7J.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-SUREE24M.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-TKPP4GOO.js +0 -654
- package/dist/cli-bundle/chunks/chunk-TKPP4GOO.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-VSAABFGQ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-W2VMLL5S.js +0 -32
- package/dist/cli-bundle/chunks/chunk-W2VMLL5S.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-XVYKWZNL.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-XXKV4UWE.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-ZLWRPBOW.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ZV7IQ23N.js +0 -657
- package/dist/cli-bundle/chunks/chunk-ZV7IQ23N.js.map +0 -7
- package/dist/cli-bundle/chunks/close-JEBZXONN.js +0 -15
- package/dist/cli-bundle/chunks/config-NCNNWF6R.js.map +0 -7
- package/dist/cli-bundle/chunks/config-SW3U7XP2.js.map +0 -1
- package/dist/cli-bundle/chunks/context-55VEOYI3.js.map +0 -1
- package/dist/cli-bundle/chunks/context-5LB7UGKE.js.map +0 -7
- package/dist/cli-bundle/chunks/contracts-JXFGBOYT.js.map +0 -1
- package/dist/cli-bundle/chunks/contracts-SY6PDFIK.js.map +0 -7
- package/dist/cli-bundle/chunks/create-CLSCHGJJ.js +0 -30
- package/dist/cli-bundle/chunks/history-ALTM2RRP.js +0 -20
- package/dist/cli-bundle/chunks/history-redact-5YGLWUDH.js +0 -21
- package/dist/cli-bundle/chunks/init-C4CRHW22.js +0 -21
- package/dist/cli-bundle/chunks/register-list-query-CCMHGZTF.js.map +0 -7
- package/dist/cli-bundle/chunks/register-list-query-OM3E2KMY.js.map +0 -1
- package/dist/cli-bundle/chunks/register-mutation-N3CDEGZU.js.map +0 -1
- package/dist/cli-bundle/chunks/register-mutation-UXTTWL6N.js.map +0 -7
- package/dist/cli-bundle/chunks/register-setup-G5LTSFYK.js.map +0 -1
- package/dist/cli-bundle/chunks/register-setup-TWHKICM2.js.map +0 -7
- package/dist/cli-bundle/chunks/restore-LQHXBAY5.js +0 -19
- package/dist/cli-bundle/chunks/schema-C6QA367T.js.map +0 -7
- package/dist/cli-bundle/chunks/schema-QO5I4FBL.js.map +0 -1
- package/dist/cli-bundle/chunks/stats-TCW2SZQG.js.map +0 -7
- package/dist/cli-bundle/chunks/stats-TKC6CAKB.js.map +0 -1
- package/dist/cli-bundle/chunks/test-WA6RZGM2.js +0 -36
- package/dist/cli-bundle/chunks/test-runs-FQ5WNQLP.js.map +0 -1
- package/dist/cli-bundle/chunks/test-runs-PX73DMMI.js.map +0 -7
- package/dist/cli-bundle/chunks/update-BSKMQOYH.js +0 -28
- package/dist/cli-bundle/chunks/update-FIGYNQ2I.js +0 -24
- package/dist/cli-bundle/chunks/validate-54SYJ7QW.js.map +0 -1
- package/dist/cli-bundle/chunks/validate-HYZNIB6W.js.map +0 -7
- package/docs/examples/policy-restricted-extension/index.js +0 -21
- package/packages/pm-beads/extensions/beads/index.js +0 -64
- package/packages/pm-beads/extensions/beads/runtime-loader.js +0 -86
- package/packages/pm-beads/extensions/beads/runtime.js +0 -482
- package/packages/pm-calendar/extensions/calendar/index.js +0 -150
- package/packages/pm-calendar/extensions/calendar/runtime.js +0 -126
- package/packages/pm-command-kit/extensions/command-kit/index.js +0 -181
- package/packages/pm-governance-audit/extensions/governance-audit/index.js +0 -177
- package/packages/pm-governance-audit/extensions/governance-audit/runtime.js +0 -153
- package/packages/pm-guide-shell/extensions/guide-shell/index.js +0 -98
- package/packages/pm-guide-shell/extensions/guide-shell/runtime.js +0 -294
- package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/index.js +0 -18
- package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/index.js +0 -124
- package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/runtime.js +0 -110
- package/packages/pm-search-advanced/extensions/search-advanced/index.js +0 -258
- package/packages/pm-search-advanced/extensions/search-advanced/runtime.js +0 -361
- package/packages/pm-templates/extensions/templates/index.js +0 -132
- package/packages/pm-templates/extensions/templates/runtime.js +0 -35
- package/packages/pm-todos/extensions/todos/index.js +0 -81
- package/packages/pm-todos/extensions/todos/runtime-loader.js +0 -86
- package/packages/pm-todos/extensions/todos/runtime.js +0 -545
- /package/dist/cli-bundle/chunks/{activity-54TXGJ2T.js.map → activity-AW6XVFH6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-N7RVTLBQ.js.map → activity-DBLQVIP6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-F32L4HR6.js.map → chunk-27BXPBAY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5BBEWX6C.js.map → chunk-3VGN2UWE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FMWW2JDU.js.map → chunk-AXIDKKAT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-TIM4OD74.js.map → chunk-BDTISOSD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CZIFFMZI.js.map → chunk-DDPTYJIM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AYPQUFCX.js.map → chunk-EJUDVUYZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EOGBMLCE.js.map → chunk-EVMTBV6V.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CG3KP6I5.js.map → chunk-G7I7DEZA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-F4BNR2IN.js.map → chunk-HYTGA6GI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2WCYE3IF.js.map → chunk-HZZEHPRG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YV2OSAMS.js.map → chunk-IJYK2T43.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-QOUOMPHO.js.map → chunk-JPECA746.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OQ2E64FH.js.map → chunk-KNPEF7QG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3BKH2CL3.js.map → chunk-L5OEFZQG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5S4ZGDB2.js.map → chunk-N74UMG5H.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IXAZI443.js.map → chunk-NFDPYAIP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SKC4UTRP.js.map → chunk-NKZAN7BD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JPJDP4VU.js.map → chunk-NWMZWYYB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KKX4Z2SE.js.map → chunk-OTUHB4HS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WB5BYQMF.js.map → chunk-SLMUGTK3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-I6QMJ2XT.js.map → chunk-WYDHYJPO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KIEAK7YE.js.map → chunk-ZRP4VG5U.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-JEBZXONN.js.map → close-E6ZZGCJY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-QHMVWM7M.js.map → close-TQYAAFJP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-O4VONGPG.js.map → context-B6275WPX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-CLSCHGJJ.js.map → context-OCZ3FJ4Z.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-YQF4CPIR.js.map → create-OH3BDGBB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-3JYWJ5K2.js.map → create-RLRJMRTM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-ALTM2RRP.js.map → extension-CPSLJQVE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-RUKPKNY7.js.map → extension-CXJ6RELI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-BEJMQT64.js.map → gc-7GQYOS2G.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-JEFQDJPA.js.map → gc-LPVMKJQJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{health-JJJOY7DJ.js.map → health-3IPFLKXB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{health-P67NZ6TT.js.map → health-GZXGBZ36.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-YY4XYVEP.js.map → history-NERDJNUB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-5YGLWUDH.js.map → history-WSZHY3PN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-C4CRHW22.js.map → history-redact-MP6CH7U5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-HBFGYS66.js.map → history-redact-O3NBCNWC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-C7R33MD5.js.map → init-64XDLQJB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-DSN6UNFB.js.map → init-PAX32BJA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-LL2WLEDG.js.map → list-DNBJVO3E.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-LQHXBAY5.js.map → list-G5Y65VF6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-2EI6EAXH.js.map → restore-4MHZFJ2E.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-QBFBLQRO.js.map → restore-YALDGTQR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-NV2DRPUS.js.map → schema-73HR2OJW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-WA6RZGM2.js.map → schema-U6LJKSIR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-BSKMQOYH.js.map → search-AXPXKZER.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-FIGYNQ2I.js.map → search-KILGT37L.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{telemetry-BT2VSWU2.js.map → telemetry-BZUF6H7G.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{telemetry-LQ6FRTUT.js.map → telemetry-GAHHQTOS.js.map} +0 -0
package/dist/sdk/testing.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.js","sources":["sdk/testing.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module sdk/testing\n *\n * Defines public SDK APIs and package-author helpers for Testing.\n */\nimport type {\n AfterCommandHookContext,\n BeforeCommandHookContext,\n CommandHandlerResult,\n CommandOverrideContext,\n CommandOverrideResult,\n ExtensionActivationResult,\n ExtensionCapability,\n ExtensionCommandRegistry,\n ExtensionDeactivationResult,\n ExtensionGovernancePolicy,\n ExtensionHookRegistry,\n ExtensionLayer,\n ExtensionLoadResult,\n ExtensionManifest,\n ExtensionParserRegistry,\n ExtensionPreflightRegistry,\n ExtensionRegistrationRegistry,\n ExtensionRendererRegistry,\n ExtensionServiceName,\n ExtensionServiceRegistry,\n FlagDefinition,\n OnIndexHookContext,\n OnReadHookContext,\n OnWriteHookContext,\n OutputRendererFormat,\n ParserOverrideContext,\n ParserOverrideResult,\n PreflightOverrideContext,\n PreflightOverrideResult,\n RegisteredExtensionCommandDefinition,\n RegisteredExtensionCommandOverride,\n RegisteredExtensionExporter,\n RegisteredExtensionFlagDefinitions,\n RegisteredExtensionHook,\n RegisteredExtensionImporter,\n RegisteredExtensionParserOverride,\n RegisteredExtensionPreflightOverride,\n RegisteredExtensionRendererOverride,\n RegisteredExtensionSchemaFieldDefinitions,\n RegisteredExtensionSchemaItemTypeDefinitions,\n RegisteredExtensionSchemaMigrationDefinition,\n RegisteredExtensionSearchProvider,\n RegisteredExtensionServiceOverride,\n RegisteredExtensionVectorStoreAdapter,\n RendererOverrideContext,\n RendererOverrideResult,\n SchemaFieldDefinition,\n SchemaItemTypeDefinition,\n SchemaMigrationRunContext,\n SearchProviderEmbedBatchContext,\n SearchProviderEmbedContext,\n SearchProviderQueryContext,\n SearchProviderQueryExpansionContext,\n SearchProviderQueryExpansionResult,\n SearchProviderQueryResult,\n SearchProviderRerankContext,\n SearchProviderRerankResult,\n ServiceOverrideContext,\n ServiceOverrideResult,\n VectorStoreDeleteContext,\n VectorStoreQueryContext,\n VectorStoreQueryHit,\n VectorStoreUpsertContext,\n} from \"../core/extensions/loader.js\";\nimport {\n activateExtensions,\n deactivateExtensions,\n runAfterCommandHooks,\n runBeforeCommandHooks,\n runCommandHandler,\n runCommandOverride,\n runOnIndexHooks,\n runOnReadHooks,\n runOnWriteHooks,\n runParserOverride,\n runPreflightOverride,\n runRendererOverride,\n runServiceOverride,\n} from \"../core/extensions/loader.js\";\nimport { createDefaultExtensionGovernancePolicy } from \"../core/extensions/extension-types.js\";\nimport {\n getMigrationRuntimeDefinition,\n resolveRegisteredSearchProvider,\n resolveRegisteredVectorStoreAdapter,\n} from \"../core/extensions/runtime-registrations.js\";\nimport { collectUsedExtensionCapabilities } from \"../core/extensions/capability-usage.js\";\nimport { normalizeKnownExtensionCapability } from \"../core/extensions/extension-capability-aliases.js\";\nimport {\n checkExtensionManifestCompatibility,\n describeExtensionBlueprint,\n lintExtensionBlueprint,\n preflightExtension,\n} from \"./compose.js\";\nimport type {\n ExtensionBlueprint,\n ExtensionBlueprintLintCode,\n ExtensionBlueprintLintFinding,\n ExtensionBlueprintLintResult,\n ExtensionBlueprintLintSeverity,\n ExtensionManifestCompatibilityManifest,\n ExtensionManifestCompatibilityResult,\n ExtensionManifestCompatibilityTarget,\n ExtensionPreflightReport,\n LintExtensionBlueprintOptions,\n PreflightExtensionOptions,\n} from \"./compose.js\";\nimport type { GlobalOptions } from \"../core/shared/command-types.js\";\nimport type { PmPackageManifest, PmPackageResourceKind } from \"../core/packages/manifest.js\";\n\n// `describeExtensionActivation` is the `describe` (enumerate-all) verb that\n// pairs with the `assert*` (verify-one) and `run*` (invoke-one) helpers below.\n// It lives in core (it walks the same registries the loader populates) and is\n// surfaced here so package authors get the whole testing surface from the\n// `@unbrained/pm-cli/sdk/testing` subpath.\nexport {\n describeExtensionActivation,\n type DescribeExtensionActivationOptions,\n type ExtensionActivationSummary,\n} from \"../core/extensions/activation-summary.js\";\n\n// `composeExtension`'s author-time companions: describe a blueprint's surface map\n// and preflight it for capability drift / duplicate / empty-surface footguns\n// without activating. Surfaced through the `@unbrained/pm-cli/sdk/testing` subpath\n// so a package author gets the full author → describe → preflight → test loop here,\n// alongside the assert*/run* helpers; `assertExtensionBlueprint` below is the\n// throwing assertion that pairs with the non-throwing `lintExtensionBlueprint`.\nexport { describeExtensionBlueprint, lintExtensionBlueprint };\nexport type {\n ExtensionBlueprint,\n ExtensionBlueprintLintCode,\n ExtensionBlueprintLintFinding,\n ExtensionBlueprintLintResult,\n ExtensionBlueprintLintSeverity,\n LintExtensionBlueprintOptions,\n};\n\ninterface TestExtensionModule {\n manifest?: Partial<ExtensionManifest>;\n activate?: unknown;\n default?: TestExtensionModule;\n}\n\n/**\n * Documents the activate extension for test options payload exchanged by command, SDK, and package integrations.\n */\nexport interface ActivateExtensionForTestOptions {\n name?: string;\n layer?: ExtensionLayer;\n capabilities?: readonly ExtensionCapability[];\n policy?: ExtensionGovernancePolicy;\n}\n\n/**\n * Documents the deactivate extension for test options payload exchanged by command, SDK, and package integrations.\n */\nexport interface DeactivateExtensionForTestOptions {\n /** Overrides the in-memory extension name (defaults to `manifest.name` or `\"test-extension\"`). */\n name?: string;\n /** Overrides the layer recorded for the in-memory extension (defaults to `\"project\"`). */\n layer?: ExtensionLayer;\n /**\n * Activation result returned by `activateExtensionForTest`. When provided, an\n * extension whose `activate` failed is skipped — mirroring the host teardown\n * contract that never deactivates a never-initialized extension. Pass the same\n * `name`/`layer` to both helpers so the skip key matches.\n */\n activation?: Pick<ExtensionActivationResult, \"failed\">;\n /**\n * Per-hook teardown bound, forwarded as `deactivate_timeout_ms`. Use `0` (or\n * `Infinity`) to wait indefinitely; omit to keep the host default.\n */\n deactivateTimeoutMs?: number;\n}\n\n/**\n * Options for {@link runRegisteredCommandForTest} — the inputs forwarded to a\n * registered extension command handler when exercising its behavior in a test.\n */\nexport interface RunRegisteredCommandForTestOptions {\n /**\n * Full registered command path to invoke, e.g. `\"hello\"` or `\"todos import\"`.\n * Matched against `commands.handlers[].command` after normalization (trimmed,\n * lower-cased, internal whitespace collapsed), mirroring runtime dispatch.\n */\n command: string;\n /** Positional arguments forwarded as `context.args` (default: none). */\n args?: readonly string[];\n /** Parsed flags/options forwarded as `context.options` (default: none). */\n options?: Record<string, unknown>;\n /**\n * Global option overrides merged onto the agent-safe test defaults\n * (`{ json: true, quiet: true, noPager: true }`), forwarded as `context.global`.\n */\n global?: Partial<GlobalOptions>;\n /**\n * Resolved pm workspace root forwarded as `context.pm_root` (default: `\"\"`).\n * Most pure handlers ignore it; set it when the handler reads workspace files.\n */\n pmRoot?: string;\n}\n\n/**\n * Options for {@link runRegisteredHookForTest} — the lifecycle `kind` to fire and\n * the synthetic context handed to every registered hook of that kind.\n *\n * The union keeps `context` type-safe per kind: `kind: \"on_write\"` requires an\n * {@link OnWriteHookContext}, `kind: \"after_command\"` an\n * {@link AfterCommandHookContext}, and so on — so authors cannot accidentally\n * pass an index context to a read hook.\n */\nexport type RunRegisteredHookForTestOptions =\n | { kind: \"before_command\"; context: BeforeCommandHookContext }\n | { kind: \"after_command\"; context: AfterCommandHookContext }\n | { kind: \"on_read\"; context: OnReadHookContext }\n | { kind: \"on_write\"; context: OnWriteHookContext }\n | { kind: \"on_index\"; context: OnIndexHookContext };\n\n/**\n * Maps each invokable search-provider operation to the context type its function\n * receives, keeping {@link runRegisteredSearchProviderForTest} type-safe per\n * operation. Mirrors the operations the host dispatches to a registered provider:\n * semantic `query`, single/batch embedding (`embed`/`embedBatch`),\n * `queryExpansion`, and `rerank`.\n */\nexport interface SearchProviderOperationContexts {\n query: SearchProviderQueryContext;\n embed: SearchProviderEmbedContext;\n embedBatch: SearchProviderEmbedBatchContext;\n queryExpansion: SearchProviderQueryExpansionContext;\n rerank: SearchProviderRerankContext;\n}\n\n/**\n * Maps each invokable search-provider operation to the result type its function\n * returns, so {@link runRegisteredSearchProviderForTest} resolves a precise return\n * type from the chosen `operation` instead of a union the caller must narrow.\n */\nexport interface SearchProviderOperationResults {\n query: SearchProviderQueryResult;\n embed: number[];\n embedBatch: number[][];\n queryExpansion: SearchProviderQueryExpansionResult;\n rerank: SearchProviderRerankResult;\n}\n\n/**\n * Options for {@link runRegisteredSearchProviderForTest}: the registered\n * `provider` name to resolve, the `operation` to invoke, and the synthetic\n * `context` handed to that operation. The discriminated union keeps `context`\n * type-safe per operation — `operation: \"embed\"` requires a\n * {@link SearchProviderEmbedContext}, `operation: \"rerank\"` a\n * {@link SearchProviderRerankContext}, and so on.\n */\nexport type RunRegisteredSearchProviderForTestOptions = {\n [Operation in keyof SearchProviderOperationContexts]: {\n /** Registered provider name to resolve, matched case-insensitively as the host does. */\n provider: string;\n /** Provider operation to invoke. */\n operation: Operation;\n /** Synthetic context handed to the resolved operation function. */\n context: SearchProviderOperationContexts[Operation];\n };\n}[keyof SearchProviderOperationContexts];\n\n/**\n * Maps each invokable vector-store-adapter operation to the context type its\n * function receives, keeping {@link runRegisteredVectorStoreAdapterForTest}\n * type-safe per operation. Mirrors the operations the host dispatches to a\n * registered adapter: nearest-neighbour `query`, `upsert`, and `delete`.\n */\nexport interface VectorStoreAdapterOperationContexts {\n query: VectorStoreQueryContext;\n upsert: VectorStoreUpsertContext;\n delete: VectorStoreDeleteContext;\n}\n\n/**\n * Maps each invokable vector-store-adapter operation to the result type its\n * function returns. Only `query` has a structured result\n * ({@link VectorStoreQueryHit}[]); `upsert`/`delete` report success by not\n * throwing, so their result is `unknown` and typically ignored.\n */\nexport interface VectorStoreAdapterOperationResults {\n query: VectorStoreQueryHit[];\n upsert: unknown;\n delete: unknown;\n}\n\n/**\n * Options for {@link runRegisteredVectorStoreAdapterForTest}: the registered\n * `adapter` name to resolve, the `operation` to invoke, and the synthetic\n * `context` handed to that operation. The discriminated union keeps `context`\n * type-safe per operation — `operation: \"upsert\"` requires a\n * {@link VectorStoreUpsertContext}, `operation: \"delete\"` a\n * {@link VectorStoreDeleteContext}, and so on.\n */\nexport type RunRegisteredVectorStoreAdapterForTestOptions = {\n [Operation in keyof VectorStoreAdapterOperationContexts]: {\n /** Registered adapter name to resolve, matched case-insensitively as the host does. */\n adapter: string;\n /** Adapter operation to invoke. */\n operation: Operation;\n /** Synthetic context handed to the resolved operation function. */\n context: VectorStoreAdapterOperationContexts[Operation];\n };\n}[keyof VectorStoreAdapterOperationContexts];\n\n/**\n * Options for {@link runRegisteredMigrationForTest}: which registered migration\n * to invoke and the workspace root its run context reports.\n */\nexport interface RunRegisteredMigrationForTestOptions {\n /** Registered migration id to resolve, matched case-insensitively against `definition.id`. */\n migration: string;\n /** Optional extension name to disambiguate when several extensions register the same id. */\n extensionName?: string;\n /** Resolved pm workspace root forwarded as `context.pm_root` (default `\"\"`). */\n pmRoot?: string;\n}\n\n/**\n * Options for {@link runRegisteredImporterForTest} — the registered importer name\n * to invoke plus the synthetic invocation context forwarded to its handler.\n *\n * The `importer` name is the value passed to `api.registerImporter(name, ...)`,\n * resolved case-insensitively (and whitespace-collapsed) against\n * `registrations.importers`; the helper derives the `\"<name> import\"` command\n * path internally, so authors never hand-build it.\n */\nexport interface RunRegisteredImporterForTestOptions {\n /** Registered importer name to resolve, e.g. `\"csv\"` for a `\"csv import\"` handler. */\n importer: string;\n /** Optional extension name to disambiguate when several extensions register the same importer. */\n extensionName?: string;\n /** Positional arguments forwarded as `context.args` (default: none). */\n args?: readonly string[];\n /** Parsed flags/options forwarded as `context.options` (default: none). */\n options?: Record<string, unknown>;\n /**\n * Global option overrides merged onto the agent-safe test defaults\n * (`{ json: true, quiet: true, noPager: true }`), forwarded as `context.global`.\n */\n global?: Partial<GlobalOptions>;\n /** Resolved pm workspace root forwarded as `context.pm_root` (default: `\"\"`). */\n pmRoot?: string;\n}\n\n/**\n * Options for {@link runRegisteredExporterForTest} — the registered exporter name\n * to invoke plus the synthetic invocation context forwarded to its handler.\n *\n * The `exporter` name is the value passed to `api.registerExporter(name, ...)`,\n * resolved case-insensitively (and whitespace-collapsed) against\n * `registrations.exporters`; the helper derives the `\"<name> export\"` command\n * path internally, so authors never hand-build it.\n */\nexport interface RunRegisteredExporterForTestOptions {\n /** Registered exporter name to resolve, e.g. `\"csv\"` for a `\"csv export\"` handler. */\n exporter: string;\n /** Optional extension name to disambiguate when several extensions register the same exporter. */\n extensionName?: string;\n /** Positional arguments forwarded as `context.args` (default: none). */\n args?: readonly string[];\n /** Parsed flags/options forwarded as `context.options` (default: none). */\n options?: Record<string, unknown>;\n /**\n * Global option overrides merged onto the agent-safe test defaults\n * (`{ json: true, quiet: true, noPager: true }`), forwarded as `context.global`.\n */\n global?: Partial<GlobalOptions>;\n /** Resolved pm workspace root forwarded as `context.pm_root` (default: `\"\"`). */\n pmRoot?: string;\n}\n\n/**\n * Documents the extension deactivation expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionDeactivationExpectation {\n /** Expected count of extensions whose `deactivate` ran without throwing (default `1`). */\n deactivated?: number;\n /** Expected count of teardown failures (default `0`). */\n failed?: number;\n}\n\n/**\n * Documents the registered command contract expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredCommandContractExpectation {\n command: string;\n action?: string;\n extensionName?: string;\n arguments?: string[];\n flags?: string[];\n}\n\n/**\n * Documents the registered command contract assertion payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredCommandContractAssertion {\n command: RegisteredExtensionCommandDefinition;\n flags: FlagDefinition[];\n}\n\n/**\n * Documents the registered flags expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredFlagsExpectation {\n targetCommand: string;\n extensionName?: string;\n flags?: string[];\n}\n\n/**\n * Public hook lifecycle kinds an extension can register through `api.hooks.*`.\n */\nexport type RegisteredHookKind = \"before_command\" | \"after_command\" | \"on_read\" | \"on_write\" | \"on_index\";\n\nconst HOOK_KIND_TO_REGISTRY_FIELD: Record<RegisteredHookKind, keyof ExtensionHookRegistry> = {\n before_command: \"beforeCommand\",\n after_command: \"afterCommand\",\n on_read: \"onRead\",\n on_write: \"onWrite\",\n on_index: \"onIndex\",\n};\n\n/**\n * Documents the registered hook expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredHookExpectation {\n kind: RegisteredHookKind;\n extensionName?: string;\n}\n\n/**\n * Documents the registered search provider expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredSearchProviderExpectation {\n provider: string;\n extensionName?: string;\n}\n\n/**\n * Documents the registered vector store adapter expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredVectorStoreAdapterExpectation {\n adapter: string;\n extensionName?: string;\n}\n\n/**\n * Documents the registered importer expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredImporterExpectation {\n importer: string;\n extensionName?: string;\n}\n\n/**\n * Documents the registered exporter expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredExporterExpectation {\n exporter: string;\n extensionName?: string;\n}\n\n/**\n * Documents the registered item field expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredItemFieldExpectation {\n field: string;\n extensionName?: string;\n type?: SchemaFieldDefinition[\"type\"];\n}\n\n/**\n * Documents the registered item field assertion payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredItemFieldAssertion {\n registration: RegisteredExtensionSchemaFieldDefinitions;\n field: SchemaFieldDefinition;\n}\n\n/**\n * Documents the registered item type expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredItemTypeExpectation {\n itemType: string;\n extensionName?: string;\n folder?: string;\n}\n\n/**\n * Documents the registered item type assertion payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredItemTypeAssertion {\n registration: RegisteredExtensionSchemaItemTypeDefinitions;\n itemType: SchemaItemTypeDefinition;\n}\n\n/**\n * Documents the registered command override expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredCommandOverrideExpectation {\n command: string;\n extensionName?: string;\n}\n\n/**\n * Documents the registered parser override expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredParserOverrideExpectation {\n command: string;\n extensionName?: string;\n}\n\n/**\n * Documents the registered preflight override expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredPreflightOverrideExpectation {\n extensionName?: string;\n}\n\n/**\n * Documents the registered renderer override expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredRendererOverrideExpectation {\n format: OutputRendererFormat;\n extensionName?: string;\n}\n\n/**\n * Documents the registered service override expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredServiceOverrideExpectation {\n service: ExtensionServiceName;\n extensionName?: string;\n}\n\n/**\n * Documents the registered migration expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredMigrationExpectation {\n migration: string;\n extensionName?: string;\n mandatory?: boolean;\n}\n\n/**\n * Documents the extension capability usage expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionCapabilityUsageExpectation {\n /**\n * Capabilities the manifest declares. Mirror `manifest.capabilities` here so\n * the assertion fails when the manifest grants more than the code uses.\n */\n declared: readonly ExtensionCapability[];\n /** Restrict reconciliation to a single extension when the activation has several. */\n extensionName?: string;\n /**\n * Capabilities allowed to be declared without being exercised (e.g. ones a\n * runtime registers only behind a config flag). These are excluded from the\n * least-privilege failure.\n */\n allowUnused?: readonly ExtensionCapability[];\n}\n\n/**\n * Documents the extension capability usage assertion payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionCapabilityUsageAssertion {\n /** Declared capabilities considered, sorted and de-duplicated. */\n declared: ExtensionCapability[];\n /** Capabilities the extension actually registered against, sorted. */\n used: ExtensionCapability[];\n /** Declared capabilities with no matching registration after the allowlist. */\n unused: ExtensionCapability[];\n}\n\n/**\n * Restricts package manifest resource expectation values accepted by command, SDK, and storage contracts.\n */\nexport type PackageManifestResourceExpectation = Partial<Record<PmPackageResourceKind, readonly string[]>>;\n\n/**\n * Documents the package manifest expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface PackageManifestExpectation {\n packageName?: string;\n aliases?: readonly string[];\n resources?: PackageManifestResourceExpectation;\n}\n\nfunction normalizeSdkIdentifier(value: string): string {\n return value.trim().toLowerCase();\n}\n\nfunction extensionNameSuffix(extensionName: string | undefined): string {\n return extensionName ? ` from extension \"${extensionName}\"` : \"\";\n}\n\nfunction sortedUnique(values: readonly string[]): string[] {\n return [...new Set(values)].sort((left, right) => left.localeCompare(right));\n}\n\nfunction normalizeSdkCommandName(command: string): string {\n return command\n .trim()\n .toLowerCase()\n .split(/\\s+/)\n .filter((part) => part.length > 0)\n .join(\" \");\n}\n\nfunction formatAvailable(values: readonly string[]): string {\n return values.length > 0 ? values.join(\", \") : \"(none)\";\n}\n\nfunction assertStringSetIncludes(\n actual: readonly string[] | undefined,\n expected: readonly string[],\n label: string,\n): void {\n const actualValues = new Set(actual ?? []);\n const missing = sortedUnique(expected.filter((value) => !actualValues.has(value)));\n if (missing.length > 0) {\n throw new Error(\n `Expected package manifest ${label} to include ${missing.join(\", \")}; available: ${formatAvailable(\n sortedUnique(actual ?? []),\n )}`,\n );\n }\n}\n\nfunction collectFlagLabels(flags: readonly FlagDefinition[]): Set<string> {\n const labels = new Set<string>();\n for (const flag of flags) {\n if (typeof flag.long === \"string\" && flag.long.trim().length > 0) {\n labels.add(flag.long.trim());\n }\n if (typeof flag.short === \"string\" && flag.short.trim().length > 0) {\n labels.add(flag.short.trim());\n }\n }\n return labels;\n}\n\nfunction readTestExtensionManifest(module: unknown): Partial<ExtensionManifest> {\n if (module && typeof module === \"object\") {\n const testModule = module as TestExtensionModule;\n const manifest = testModule.manifest;\n if (manifest && typeof manifest === \"object\") {\n return manifest;\n }\n const defaultExport = testModule.default;\n const defaultManifest = defaultExport?.manifest;\n if (defaultManifest && typeof defaultManifest === \"object\") {\n return defaultManifest;\n }\n if (defaultExport && typeof defaultExport === \"object\" && (\"name\" in defaultExport || \"capabilities\" in defaultExport)) {\n return defaultExport as Partial<ExtensionManifest>;\n }\n if (\"name\" in testModule || \"capabilities\" in testModule) {\n return testModule as Partial<ExtensionManifest>;\n }\n }\n return {};\n}\n\nfunction resolveTestExtensionName(manifest: Partial<ExtensionManifest>, explicitName: string | undefined): string {\n return (\n explicitName ??\n (typeof manifest.name === \"string\" && manifest.name.trim().length > 0 ? manifest.name.trim() : \"test-extension\")\n );\n}\n\nfunction readTestExtensionCapabilities(\n manifest: Partial<ExtensionManifest>,\n options: ActivateExtensionForTestOptions,\n): ExtensionCapability[] {\n if (Array.isArray(options.capabilities)) {\n return [...options.capabilities];\n }\n if (Array.isArray(manifest.capabilities)) {\n return manifest.capabilities.filter((capability): capability is ExtensionCapability => typeof capability === \"string\");\n }\n return [];\n}\n\n/**\n * Build the synthetic single-extension {@link ExtensionLoadResult} shared by the\n * activate/deactivate test helpers, so both stay aligned with the loader's load\n * contract as it evolves. The `loaded` entry mirrors the real on-disk shape\n * (including `capabilities` and the compatibility fields) while leaving\n * filesystem paths empty, since the module is supplied in memory.\n */\nfunction buildSingleExtensionLoadResult(\n module: unknown,\n manifest: Partial<ExtensionManifest>,\n identity: { name: string; layer: ExtensionLayer; capabilities: ExtensionCapability[]; policy: ExtensionGovernancePolicy },\n): ExtensionLoadResult {\n return {\n disabled_by_flag: false,\n roots: { global: \"\", project: \"\" },\n configured_enabled: [],\n configured_disabled: [],\n discovered: [],\n effective: [],\n warnings: [],\n policy: identity.policy,\n failed: [],\n loaded: [\n {\n layer: identity.layer,\n directory: \"\",\n manifest_path: \"\",\n name: identity.name,\n version: typeof manifest.version === \"string\" ? manifest.version : \"0.0.0\",\n entry: typeof manifest.entry === \"string\" ? manifest.entry : \"./index.js\",\n priority: typeof manifest.priority === \"number\" ? manifest.priority : 0,\n entry_path: \"\",\n capabilities: identity.capabilities,\n manifest_version: typeof manifest.manifest_version === \"number\" ? manifest.manifest_version : undefined,\n pm_min_version: typeof manifest.pm_min_version === \"string\" ? manifest.pm_min_version : undefined,\n pm_max_version: typeof manifest.pm_max_version === \"string\" ? manifest.pm_max_version : undefined,\n engines: manifest.engines,\n trusted: manifest.trusted,\n provenance: manifest.provenance,\n sandbox_profile: manifest.sandbox_profile,\n permissions: manifest.permissions,\n activation: manifest.activation,\n module,\n },\n ],\n };\n}\n\n/**\n * Activate one in-memory extension module for package tests.\n *\n * This uses pm's real registration validation and activation engine while\n * avoiding private loader imports, filesystem manifests, or workspace setup.\n */\nexport async function activateExtensionForTest(\n module: unknown,\n options: ActivateExtensionForTestOptions = {},\n): Promise<ExtensionActivationResult> {\n const manifest = readTestExtensionManifest(module);\n return activateExtensions(\n buildSingleExtensionLoadResult(module, manifest, {\n name: resolveTestExtensionName(manifest, options.name),\n layer: options.layer ?? \"project\",\n capabilities: readTestExtensionCapabilities(manifest, options),\n policy: options.policy ?? createDefaultExtensionGovernancePolicy(),\n }),\n );\n}\n\n/**\n * Deactivate one in-memory extension module for package tests — the teardown\n * counterpart to {@link activateExtensionForTest}.\n *\n * Runs pm's real `deactivateExtensions` engine (including its bounded per-hook\n * timeout and best-effort failure capture) over a single synthetic load entry,\n * so authors can prove an extension's `deactivate` releases the resources its\n * `activate` opened — without importing private loader internals or staging a\n * workspace. Resolve `name`/`layer` the same way {@link activateExtensionForTest}\n * does so a forwarded `activation` result skips a failed extension correctly.\n */\nexport async function deactivateExtensionForTest(\n module: unknown,\n options: DeactivateExtensionForTestOptions = {},\n): Promise<ExtensionDeactivationResult> {\n const manifest = readTestExtensionManifest(module);\n return deactivateExtensions(\n buildSingleExtensionLoadResult(module, manifest, {\n name: resolveTestExtensionName(manifest, options.name),\n layer: options.layer ?? \"project\",\n capabilities: readTestExtensionCapabilities(manifest, {}),\n policy: createDefaultExtensionGovernancePolicy(),\n }),\n options.activation,\n options.deactivateTimeoutMs === undefined ? {} : { deactivate_timeout_ms: options.deactivateTimeoutMs },\n );\n}\n\n/**\n * Invoke a registered extension command handler and return its real\n * {@link CommandHandlerResult} so package tests can assert on behavior — not\n * just that the command was registered.\n *\n * This is the \"invoke\" verb that completes the package-author testing loop:\n * `activateExtensionForTest` → `assertRegisteredCommandContract` → **run** →\n * `deactivateExtensionForTest`. It runs pm's real handler-dispatch engine\n * (`runCommandHandler`) over `activation.commands`, building the\n * `CommandHandlerContext` with agent-safe global defaults\n * (`{ json: true, quiet: true, noPager: true }`) that callers may override.\n *\n * Because `registerImporter`/`registerExporter` register their handlers under\n * the `\"<name> import\"` / `\"<name> export\"` command paths, this same helper\n * exercises importer and exporter handlers too.\n *\n * Throws a descriptive error (listing the available handler command paths) when\n * no handler is registered for `command`, since that is a wiring/typo bug in the\n * test rather than a behavior under test. When a handler is found, the result is\n * returned verbatim: a clean run yields `{ handled: true, result, warnings: [] }`,\n * while a handler that throws a non-exit error yields\n * `{ handled: false, warnings: [code], errorMessage }` so the failure can be\n * asserted. A handler that throws an error carrying a numeric `exitCode`\n * propagates the throw, matching runtime semantics.\n */\nexport async function runRegisteredCommandForTest(\n commands: ExtensionCommandRegistry,\n options: RunRegisteredCommandForTestOptions,\n): Promise<CommandHandlerResult> {\n const command = normalizeSdkCommandName(options.command);\n if (command.length === 0) {\n throw new Error(\"Expected command name must be a non-empty string\");\n }\n const hasHandler = commands.handlers.some((entry) => entry.command === command);\n if (!hasHandler) {\n const available = sortedUnique(commands.handlers.map((entry) => entry.command));\n throw new Error(\n `Expected a registered command handler for \"${command}\" to invoke. Available command handlers: ${formatAvailable(\n available,\n )}`,\n );\n }\n return runCommandHandler(commands, {\n command,\n args: options.args ? [...options.args] : [],\n options: options.options ? { ...options.options } : {},\n global: { json: true, quiet: true, noPager: true, ...options.global },\n pm_root: options.pmRoot ?? \"\",\n });\n}\n\n/**\n * Fire every registered lifecycle hook of a given `kind` through pm's real hook\n * runner and return the warnings array so package tests can assert on behavior —\n * not just that a hook was registered.\n *\n * This is the hook counterpart to {@link runRegisteredCommandForTest}, extending\n * the package-author \"invoke\" verb to the `api.hooks.*` surface. Pass the\n * `ExtensionHookRegistry` from `activateExtensionForTest(...).hooks` together with\n * the lifecycle `kind` and a synthetic context. Hooks observe their inputs via a\n * cloned context snapshot (mutations never leak back to the caller), so the\n * observable signal is twofold: any side effects the hook performs, and the\n * returned warnings. A clean run returns `[]`; a hook that throws contributes one\n * `extension_hook_failed:<layer>:<name>:<hookName>` warning, mirroring runtime\n * dispatch which isolates a failing hook without aborting the others.\n *\n * Throws a descriptive error (listing the hook kinds that do have registrations)\n * when no hook of `kind` is registered, since firing a hook the extension never\n * registered is a wiring/typo bug in the test rather than a behavior under test.\n */\nexport async function runRegisteredHookForTest(\n hooks: ExtensionHookRegistry,\n options: RunRegisteredHookForTestOptions,\n): Promise<string[]> {\n if (hooks[HOOK_KIND_TO_REGISTRY_FIELD[options.kind]].length === 0) {\n const populatedKinds = sortedUnique(\n (Object.keys(HOOK_KIND_TO_REGISTRY_FIELD) as RegisteredHookKind[]).filter(\n (kind) => hooks[HOOK_KIND_TO_REGISTRY_FIELD[kind]].length > 0,\n ),\n );\n throw new Error(\n `Expected a registered \"${options.kind}\" hook to invoke. Hook kinds with registrations: ${formatAvailable(\n populatedKinds,\n )}`,\n );\n }\n switch (options.kind) {\n case \"before_command\":\n return runBeforeCommandHooks(hooks, options.context);\n case \"after_command\":\n return runAfterCommandHooks(hooks, options.context);\n case \"on_read\":\n return runOnReadHooks(hooks, options.context);\n case \"on_write\":\n return runOnWriteHooks(hooks, options.context);\n case \"on_index\":\n return runOnIndexHooks(hooks, options.context);\n }\n}\n\n/**\n * Invoke a registered parser override through pm's real runner and return the\n * resolved {@link ParserOverrideResult}, so package tests can assert the rewritten\n * args/options/global an override produces for a command before dispatch.\n *\n * Guards that a parser override is registered for the (normalized) target command\n * before delegating: without a match `runParserOverride` would silently return\n * `overridden: false`, hiding a typo'd command name in the test. When a match\n * exists the result is returned verbatim — `overridden: true` with the rewritten\n * context on success, or `overridden: false` with an\n * `extension_parser_override_failed:*` warning when the override throws.\n */\nexport async function runRegisteredParserOverrideForTest(\n parsers: ExtensionParserRegistry,\n context: ParserOverrideContext,\n): Promise<ParserOverrideResult> {\n const command = normalizeSdkCommandName(context.command);\n if (!parsers.overrides.some((entry) => entry.command === command)) {\n throw new Error(\n `Expected a registered parser override for command \"${command}\" to invoke. Available parser override commands: ${formatAvailable(\n sortedUnique(parsers.overrides.map((entry) => entry.command)),\n )}`,\n );\n }\n return runParserOverride(parsers, context);\n}\n\n/**\n * Invoke the active preflight override through pm's real runner and return the\n * resolved {@link PreflightOverrideResult}, so package tests can assert the\n * migration/format gate decision an override yields.\n *\n * Unlike command-scoped overrides, the runtime applies the **last** registered\n * preflight override regardless of command, so this helper guards only that at\n * least one preflight override is registered before delegating. The result is\n * returned verbatim — `overridden: true` with the adjusted decision on success,\n * or `overridden: false` with an `extension_preflight_override_failed:*` warning\n * when the override throws.\n */\nexport async function runRegisteredPreflightOverrideForTest(\n preflight: ExtensionPreflightRegistry,\n context: PreflightOverrideContext,\n): Promise<PreflightOverrideResult> {\n if (preflight.overrides.length === 0) {\n throw new Error(\n \"Expected a registered preflight override to invoke, but none are registered.\",\n );\n }\n return runPreflightOverride(preflight, context);\n}\n\n/**\n * Invoke a registered command-result override through pm's real runner and return\n * the resolved {@link CommandOverrideResult}, so package tests can assert how an\n * override transforms a command's result payload.\n *\n * Accepts the same `ExtensionCommandRegistry` exposed as\n * `activateExtensionForTest(...).commands` (it carries both handlers and\n * overrides). Guards that an override is registered for the (normalized) target\n * command before delegating, so a typo'd command name surfaces as a clear error\n * rather than a silent `overridden: false`. The result is returned verbatim —\n * including the `extension_command_override_async_unsupported:*` warning the\n * runtime emits when an override returns a Promise (command overrides are\n * synchronous), or an `extension_command_override_failed:*` warning on throw.\n */\nexport async function runRegisteredCommandOverrideForTest(\n commands: ExtensionCommandRegistry,\n context: CommandOverrideContext,\n): Promise<CommandOverrideResult> {\n const command = normalizeSdkCommandName(context.command);\n if (!commands.overrides.some((entry) => entry.command === command)) {\n throw new Error(\n `Expected a registered command override for command \"${command}\" to invoke. Available command override commands: ${formatAvailable(\n sortedUnique(commands.overrides.map((entry) => entry.command)),\n )}`,\n );\n }\n return runCommandOverride(commands, context);\n}\n\n/**\n * Invoke a registered renderer override through pm's real runner and return the\n * resolved {@link RendererOverrideResult}, so package tests can assert the custom\n * string an override renders for a given output `format`.\n *\n * Guards that a renderer override is registered for `context.format` before\n * delegating, so a wrong format surfaces as a clear error rather than a silent\n * `overridden: false`. The result is returned verbatim — `overridden: true` with\n * the rendered string on success, or `overridden: false` (with an\n * `extension_renderer_invalid_result:*` / `extension_renderer_failed:*` warning\n * where applicable) when the override returns a non-string or throws.\n */\nexport async function runRegisteredRendererOverrideForTest(\n renderers: ExtensionRendererRegistry,\n context: RendererOverrideContext,\n): Promise<RendererOverrideResult> {\n if (!renderers.overrides.some((entry) => entry.format === context.format)) {\n throw new Error(\n `Expected a registered renderer override for format \"${context.format}\" to invoke. Available renderer override formats: ${formatAvailable(\n sortedUnique(renderers.overrides.map((entry) => entry.format)),\n )}`,\n );\n }\n return runRendererOverride(renderers, context);\n}\n\n/**\n * Invoke a registered service override through pm's real runner and return the\n * resolved {@link ServiceOverrideResult}, so package tests can assert how an\n * override handles an internal service payload (e.g. `output_format`).\n *\n * Guards that a service override is registered for `context.service` before\n * delegating, so a wrong service name surfaces as a clear error rather than a\n * silent `handled: false`. The result is returned verbatim — `handled: true` with\n * the override's result when it claims the payload, or `handled: false` with the\n * original payload (and any `extension_service_override_*` warnings) otherwise.\n */\nexport async function runRegisteredServiceOverrideForTest(\n services: ExtensionServiceRegistry,\n context: ServiceOverrideContext,\n): Promise<ServiceOverrideResult> {\n if (!services.overrides.some((entry) => entry.service === context.service)) {\n throw new Error(\n `Expected a registered service override for service \"${context.service}\" to invoke. Available service override services: ${formatAvailable(\n sortedUnique(services.overrides.map((entry) => entry.service)),\n )}`,\n );\n }\n return runServiceOverride(services, context);\n}\n\n/**\n * Maps each search-provider operation to the runtime-definition keys that may\n * hold its function, in priority order. The host accepts both camelCase and\n * snake_case spellings for the multi-word operations, so this helper mirrors that\n * by trying `embedBatch` before `embed_batch` and `queryExpansion` before\n * `query_expansion`.\n */\nconst SEARCH_PROVIDER_OPERATION_DEFINITION_KEYS: Record<keyof SearchProviderOperationContexts, readonly string[]> = {\n query: [\"query\"],\n embed: [\"embed\"],\n embedBatch: [\"embedBatch\", \"embed_batch\"],\n queryExpansion: [\"queryExpansion\", \"query_expansion\"],\n rerank: [\"rerank\"],\n};\n\n/**\n * Invoke an operation of a registered search provider through the same name\n * resolution the host uses and return the operation's result, so package tests\n * can assert a custom provider's runtime behavior — not just that it registered.\n *\n * This is the search-provider counterpart to {@link runRegisteredCommandForTest},\n * extending the package-author \"invoke\" verb to the `api.registerSearchProvider`\n * surface. Pass the `ExtensionRegistrationRegistry` from\n * `activateExtensionForTest(...).registrations`, the registered provider name, the\n * `operation` to exercise (`query`, `embed`, `embedBatch`, `queryExpansion`, or\n * `rerank`), and a synthetic context. The provider is resolved via\n * {@link resolveRegisteredSearchProvider} (case-insensitive, last registration\n * wins) and the operation is invoked on its `runtime_definition` — the clone that\n * preserves live functions, matching what the runtime dispatches.\n *\n * Throws a descriptive error listing the available providers when the name is not\n * registered, and a separate error when the resolved provider does not implement\n * the requested operation, since invoking an absent provider/operation is a\n * wiring bug in the test rather than a behavior under test.\n */\nexport async function runRegisteredSearchProviderForTest<Operation extends keyof SearchProviderOperationContexts>(\n registrations: ExtensionRegistrationRegistry,\n options: {\n provider: string;\n operation: Operation;\n context: SearchProviderOperationContexts[Operation];\n },\n): Promise<SearchProviderOperationResults[Operation]> {\n const registration = resolveRegisteredSearchProvider(registrations, options.provider);\n if (!registration) {\n const available = sortedUnique(registrations.search_providers.map((entry) => entry.definition.name));\n throw new Error(\n `Expected a registered search provider \"${options.provider}\" to invoke. Available search providers: ${formatAvailable(\n available,\n )}`,\n );\n }\n const runtimeDefinition = registration.runtime_definition;\n const operationFn = SEARCH_PROVIDER_OPERATION_DEFINITION_KEYS[options.operation]\n .map((key) => runtimeDefinition[key])\n .find((value) => typeof value === \"function\");\n if (typeof operationFn !== \"function\") {\n throw new Error(\n `Registered search provider \"${options.provider}\" does not implement the \"${options.operation}\" operation.`,\n );\n }\n return (await (operationFn as (context: SearchProviderOperationContexts[Operation]) => unknown)(\n options.context,\n )) as SearchProviderOperationResults[Operation];\n}\n\n/**\n * Invoke an operation of a registered vector store adapter through the same name\n * resolution the host uses and return the operation's result, so package tests\n * can assert a custom adapter's runtime behavior — not just that it registered.\n *\n * This is the vector-store counterpart to {@link runRegisteredSearchProviderForTest}.\n * Pass the `ExtensionRegistrationRegistry` from\n * `activateExtensionForTest(...).registrations`, the registered adapter name, the\n * `operation` to exercise (`query`, `upsert`, or `delete`), and a synthetic\n * context. The adapter is resolved via {@link resolveRegisteredVectorStoreAdapter}\n * (case-insensitive, last registration wins) and the operation is invoked on its\n * `runtime_definition` — the clone that preserves live functions, matching what\n * the runtime dispatches.\n *\n * Throws a descriptive error listing the available adapters when the name is not\n * registered, and a separate error when the resolved adapter does not implement\n * the requested operation.\n */\nexport async function runRegisteredVectorStoreAdapterForTest<\n Operation extends keyof VectorStoreAdapterOperationContexts,\n>(\n registrations: ExtensionRegistrationRegistry,\n options: {\n adapter: string;\n operation: Operation;\n context: VectorStoreAdapterOperationContexts[Operation];\n },\n): Promise<VectorStoreAdapterOperationResults[Operation]> {\n const registration = resolveRegisteredVectorStoreAdapter(registrations, options.adapter);\n if (!registration) {\n const available = sortedUnique(registrations.vector_store_adapters.map((entry) => entry.definition.name));\n throw new Error(\n `Expected a registered vector store adapter \"${options.adapter}\" to invoke. Available vector store adapters: ${formatAvailable(\n available,\n )}`,\n );\n }\n const operationFn = registration.runtime_definition[options.operation];\n if (typeof operationFn !== \"function\") {\n throw new Error(\n `Registered vector store adapter \"${options.adapter}\" does not implement the \"${options.operation}\" operation.`,\n );\n }\n return (await (operationFn as (context: VectorStoreAdapterOperationContexts[Operation]) => unknown)(\n options.context,\n )) as VectorStoreAdapterOperationResults[Operation];\n}\n\n/**\n * Invoke a registered schema migration's `run` function through the same runtime\n * definition the host executes and return its result, so package tests can assert\n * a migration's behavior — not just that it registered.\n *\n * This completes the package-author \"invoke\" verb across every executable\n * registration surface. The migration is resolved by id via\n * {@link assertRegisteredMigration} (which throws a descriptive \"available\n * migrations\" error when absent), then `run` is invoked on its\n * `runtime_definition` with a context mirroring the one\n * `executeRegisteredRuntimeMigrations` builds at runtime: the resolved id,\n * `command: \"migration\"`, the registering extension's layer/name, the supplied\n * `pmRoot`, and the migration's normalized status. Unlike the runtime — which\n * skips already-applied migrations and folds a throw into a warning — this helper\n * always invokes `run` and lets a throw propagate, so authors can assert both the\n * success result and failure via rejection.\n *\n * Throws when the resolved migration declares no `run` function, since invoking a\n * runless migration is a wiring bug in the test rather than a behavior under test.\n */\nexport async function runRegisteredMigrationForTest(\n registrations: ExtensionRegistrationRegistry,\n options: RunRegisteredMigrationForTestOptions,\n): Promise<unknown> {\n const migration = assertRegisteredMigration(registrations, {\n migration: options.migration,\n extensionName: options.extensionName,\n });\n const run = getMigrationRuntimeDefinition(migration).run;\n if (typeof run !== \"function\") {\n throw new Error(`Registered migration \"${options.migration}\" does not implement a run function to invoke.`);\n }\n const declaredStatus = migration.definition.status;\n const context: SchemaMigrationRunContext = {\n id: migration.definition.id as string,\n command: \"migration\",\n layer: migration.layer,\n extension: migration.name,\n pm_root: options.pmRoot ?? \"\",\n status: (typeof declaredStatus === \"string\" ? declaredStatus.trim().toLowerCase() : \"\") || \"pending\",\n };\n return await (run as (context: SchemaMigrationRunContext) => unknown)(context);\n}\n\n/**\n * Invoke a registered extension importer through pm's real handler-dispatch\n * engine and return its {@link CommandHandlerResult}, so package tests can assert\n * an importer's behavior — not just that it registered.\n *\n * This is the importer counterpart to {@link runRegisteredCommandForTest},\n * extending the package-author \"invoke\" verb to the `api.registerImporter`\n * surface. Because `registerImporter(name, fn)` wraps `fn` into a command handler\n * at the `\"<name> import\"` path, invoking it through `runRegisteredCommandForTest`\n * requires the author to know that naming convention and to remember that an\n * importer is reachable as a command at all. This helper closes both gaps: it\n * accepts the registered importer name directly, validates via\n * {@link assertRegisteredImporter} that it is genuinely a registered importer\n * (not merely some command parked at that path), derives the command path, and\n * dispatches through the same engine.\n *\n * The full activation result is required because importer execution spans two\n * sub-registries: `registrations.importers` proves the importer exists, while\n * `commands` holds the wrapped handler. The result is returned verbatim from the\n * command engine: a clean run yields `{ handled: true, result, warnings: [] }`\n * (where `result` is the importer's return value), a non-exit throw yields\n * `{ handled: false, warnings: [code], errorMessage }`, and an error carrying a\n * numeric `exitCode` propagates — matching runtime import semantics.\n *\n * Throws a descriptive \"available importers\" error (via `assertRegisteredImporter`)\n * when no importer matches, since that is a wiring/typo bug in the test rather\n * than a behavior under test.\n */\nexport async function runRegisteredImporterForTest(\n activation: ExtensionActivationResult,\n options: RunRegisteredImporterForTestOptions,\n): Promise<CommandHandlerResult> {\n const importer = assertRegisteredImporter(activation.registrations, {\n importer: options.importer,\n extensionName: options.extensionName,\n });\n return runRegisteredCommandForTest(activation.commands, {\n command: `${importer.importer} import`,\n args: options.args,\n options: options.options,\n global: options.global,\n pmRoot: options.pmRoot,\n });\n}\n\n/**\n * Invoke a registered extension exporter through pm's real handler-dispatch\n * engine and return its {@link CommandHandlerResult}, so package tests can assert\n * an exporter's behavior — not just that it registered.\n *\n * This is the exporter counterpart to {@link runRegisteredImporterForTest} and\n * the final surface in the package-author \"invoke\" verb. Because\n * `registerExporter(name, fn)` wraps `fn` into a command handler at the\n * `\"<name> export\"` path, this helper accepts the registered exporter name\n * directly, validates via {@link assertRegisteredExporter} that it is genuinely a\n * registered exporter, derives the command path, and dispatches through the same\n * engine. See {@link runRegisteredImporterForTest} for the full activation\n * rationale and return semantics (which apply identically here).\n *\n * Throws a descriptive \"available exporters\" error (via `assertRegisteredExporter`)\n * when no exporter matches, since that is a wiring/typo bug in the test rather\n * than a behavior under test.\n */\nexport async function runRegisteredExporterForTest(\n activation: ExtensionActivationResult,\n options: RunRegisteredExporterForTestOptions,\n): Promise<CommandHandlerResult> {\n const exporter = assertRegisteredExporter(activation.registrations, {\n exporter: options.exporter,\n extensionName: options.extensionName,\n });\n return runRegisteredCommandForTest(activation.commands, {\n command: `${exporter.exporter} export`,\n args: options.args,\n options: options.options,\n global: options.global,\n pmRoot: options.pmRoot,\n });\n}\n\n/**\n * Assert that an {@link ExtensionDeactivationResult} reports the expected clean\n * teardown counts, throwing a descriptive error otherwise. Defaults assert the\n * single-extension happy path — exactly one extension deactivated and none\n * failed. Returns the result so assertions can chain.\n */\nexport function assertExtensionDeactivated(\n result: ExtensionDeactivationResult,\n expectation: ExtensionDeactivationExpectation = {},\n): ExtensionDeactivationResult {\n const expectedDeactivated = expectation.deactivated ?? 1;\n if (result.deactivated !== expectedDeactivated) {\n throw new Error(\n `Expected ${expectedDeactivated} extension${expectedDeactivated === 1 ? \"\" : \"s\"} to deactivate cleanly, ` +\n `but ${result.deactivated} did.`,\n );\n }\n const expectedFailed = expectation.failed ?? 0;\n if (result.failed.length !== expectedFailed) {\n const detail = result.failed.map((failure) => `${failure.layer}:${failure.name} (${failure.error})`).join(\", \");\n throw new Error(\n `Expected ${expectedFailed} teardown failure${expectedFailed === 1 ? \"\" : \"s\"}, ` +\n `but observed ${result.failed.length}${detail.length > 0 ? `: ${detail}` : \"\"}.`,\n );\n }\n return result;\n}\n\n/**\n * Assert that a normalized package manifest advertises expected package\n * resources. Pair with `readPmPackageManifest(packageRoot)` in package tests.\n */\nexport function assertPackageManifest(\n manifest: PmPackageManifest,\n expectation: PackageManifestExpectation,\n): PmPackageManifest {\n if (expectation.packageName !== undefined && manifest.package_name !== expectation.packageName) {\n throw new Error(\n `Expected package manifest package_name to be \"${expectation.packageName}\"; received \"${\n manifest.package_name ?? \"(none)\"\n }\"`,\n );\n }\n if (expectation.aliases !== undefined) {\n assertStringSetIncludes(manifest.aliases, expectation.aliases, \"aliases\");\n }\n if (expectation.resources !== undefined) {\n for (const [kind, expectedPaths] of Object.entries(expectation.resources) as Array<\n [PmPackageResourceKind, readonly string[]]\n >) {\n assertStringSetIncludes(manifest.resources[kind], expectedPaths, `pm.${kind}`);\n }\n }\n return manifest;\n}\n\n/**\n * Assert that an activated extension registration registry contains a command\n * contract with the expected public metadata.\n */\nexport function assertRegisteredCommandContract(\n registrations: ExtensionRegistrationRegistry,\n expectation: RegisteredCommandContractExpectation,\n): RegisteredCommandContractAssertion {\n const expectedCommand = normalizeSdkCommandName(expectation.command);\n if (expectedCommand.length === 0) {\n throw new Error(\"Expected command name must be a non-empty string\");\n }\n\n const commandCandidates = registrations.commands.filter((entry) => entry.command === expectedCommand);\n const command = expectation.extensionName\n ? commandCandidates.find((entry) => entry.name === expectation.extensionName)\n : commandCandidates[0];\n if (!command) {\n const available = registrations.commands.map((entry) => entry.command).sort((left, right) => left.localeCompare(right));\n const extensionSuffix = expectation.extensionName ? ` from extension \"${expectation.extensionName}\"` : \"\";\n throw new Error(\n `Expected extension command \"${expectedCommand}\"${extensionSuffix} to be registered. Available commands: ${formatAvailable(\n available,\n )}`,\n );\n }\n\n if (expectation.action !== undefined && command.action !== expectation.action) {\n throw new Error(\n `Expected extension command \"${expectedCommand}\" action \"${expectation.action}\", received \"${command.action}\"`,\n );\n }\n\n if (expectation.arguments !== undefined) {\n const actualArguments = (command.arguments ?? []).map((argument) => argument.name);\n const missingArguments = expectation.arguments.filter((argument) => !actualArguments.includes(argument));\n if (missingArguments.length > 0) {\n throw new Error(\n `Expected extension command \"${expectedCommand}\" arguments ${formatAvailable(\n expectation.arguments,\n )}; missing ${formatAvailable(missingArguments)}; available ${formatAvailable(actualArguments)}`,\n );\n }\n }\n\n const flags = registrations.flags\n .filter(\n (entry) =>\n entry.target_command === expectedCommand &&\n (expectation.extensionName === undefined || entry.name === expectation.extensionName),\n )\n .flatMap((entry) => entry.flags);\n\n if (expectation.flags !== undefined) {\n const actualFlagLabels = collectFlagLabels(flags);\n const missingFlags = expectation.flags.filter((flag) => !actualFlagLabels.has(flag));\n if (missingFlags.length > 0) {\n throw new Error(\n `Expected extension command \"${expectedCommand}\" flags ${formatAvailable(expectation.flags)}; missing ${formatAvailable(\n missingFlags,\n )}; available ${formatAvailable([...actualFlagLabels].sort((left, right) => left.localeCompare(right)))}`,\n );\n }\n }\n\n return { command, flags };\n}\n\n/**\n * Assert that an activated extension registration registry contains flags\n * injected into an existing command through `api.registerFlags(...)`.\n */\nexport function assertRegisteredFlags(\n registrations: ExtensionRegistrationRegistry,\n expectation: RegisteredFlagsExpectation,\n): RegisteredExtensionFlagDefinitions {\n const expectedCommand = normalizeSdkCommandName(expectation.targetCommand);\n if (expectedCommand.length === 0) {\n throw new Error(\"Expected target command name must be a non-empty string\");\n }\n\n const candidates = registrations.flags.filter((entry) => entry.target_command === expectedCommand);\n let registration: RegisteredExtensionFlagDefinitions | undefined;\n if (expectation.extensionName) {\n registration = candidates.find((entry) => entry.name === expectation.extensionName);\n } else if (candidates.length === 1) {\n registration = candidates[0];\n } else if (candidates.length > 1) {\n const availableExtensions = sortedUnique(candidates.map((entry) => entry.name));\n throw new Error(\n `Expected flags for target command \"${expectedCommand}\" matched multiple extensions: ${formatAvailable(\n availableExtensions,\n )}. Specify extensionName to choose one registration.`,\n );\n }\n if (!registration) {\n const available = sortedUnique(registrations.flags.map((entry) => entry.target_command));\n const availableExtensions = sortedUnique(candidates.map((entry) => entry.name));\n throw new Error(\n `Expected flags for target command \"${expectedCommand}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available flag target commands: ${formatAvailable(available)}; matching extensions: ${formatAvailable(\n availableExtensions,\n )}`,\n );\n }\n\n if (expectation.flags !== undefined) {\n const actualFlagLabels = collectFlagLabels(registration.flags);\n const missingFlags = expectation.flags.filter((flag) => !actualFlagLabels.has(flag));\n if (missingFlags.length > 0) {\n throw new Error(\n `Expected flags for target command \"${expectedCommand}\" to include ${formatAvailable(\n expectation.flags,\n )}; missing ${formatAvailable(missingFlags)}; available ${formatAvailable(\n [...actualFlagLabels].sort((left, right) => left.localeCompare(right)),\n )}`,\n );\n }\n }\n\n return registration;\n}\n\n/**\n * Assert that an activated extension hook registry contains a hook of the\n * expected lifecycle kind (optionally scoped to a specific extension).\n *\n * Hooks are surfaced via `ExtensionActivationResult.hooks`, not the command\n * registration registry, so this helper accepts an `ExtensionHookRegistry`.\n */\nexport function assertRegisteredHook<TKind extends RegisteredHookKind>(\n hooks: ExtensionHookRegistry,\n expectation: RegisteredHookExpectation & { kind: TKind },\n): ExtensionHookRegistry[(typeof HOOK_KIND_TO_REGISTRY_FIELD)[TKind]][number] {\n const field = HOOK_KIND_TO_REGISTRY_FIELD[expectation.kind];\n const candidates = hooks[field] as ReadonlyArray<RegisteredExtensionHook<unknown>>;\n const hook = expectation.extensionName\n ? candidates.find((entry) => entry.name === expectation.extensionName)\n : candidates[0];\n if (!hook) {\n const available = sortedUnique(candidates.map((entry) => entry.name));\n throw new Error(\n `Expected a \"${expectation.kind}\" hook${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available \"${expectation.kind}\" hooks: ${formatAvailable(available)}`,\n );\n }\n\n return hook as ExtensionHookRegistry[(typeof HOOK_KIND_TO_REGISTRY_FIELD)[TKind]][number];\n}\n\n/**\n * Assert that an activated extension registration registry contains a search\n * provider with the expected name (optionally scoped to a specific extension).\n */\nexport function assertRegisteredSearchProvider(\n registrations: ExtensionRegistrationRegistry,\n expectation: RegisteredSearchProviderExpectation,\n): RegisteredExtensionSearchProvider {\n const expectedProvider = normalizeSdkIdentifier(expectation.provider);\n if (expectedProvider.length === 0) {\n throw new Error(\"Expected search provider name must be a non-empty string\");\n }\n\n const candidates = registrations.search_providers.filter(\n (entry) => normalizeSdkIdentifier(entry.definition.name) === expectedProvider,\n );\n const provider = expectation.extensionName\n ? candidates.find((entry) => entry.name === expectation.extensionName)\n : candidates[0];\n if (!provider) {\n const available = sortedUnique(registrations.search_providers.map((entry) => entry.definition.name));\n throw new Error(\n `Expected search provider \"${expectedProvider}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available search providers: ${formatAvailable(available)}`,\n );\n }\n\n return provider;\n}\n\n/**\n * Assert that an activated extension registration registry contains a vector\n * store adapter with the expected name (optionally scoped to a specific\n * extension).\n */\nexport function assertRegisteredVectorStoreAdapter(\n registrations: ExtensionRegistrationRegistry,\n expectation: RegisteredVectorStoreAdapterExpectation,\n): RegisteredExtensionVectorStoreAdapter {\n const expectedAdapter = normalizeSdkIdentifier(expectation.adapter);\n if (expectedAdapter.length === 0) {\n throw new Error(\"Expected vector store adapter name must be a non-empty string\");\n }\n\n const candidates = registrations.vector_store_adapters.filter(\n (entry) => normalizeSdkIdentifier(entry.definition.name) === expectedAdapter,\n );\n const adapter = expectation.extensionName\n ? candidates.find((entry) => entry.name === expectation.extensionName)\n : candidates[0];\n if (!adapter) {\n const available = sortedUnique(registrations.vector_store_adapters.map((entry) => entry.definition.name));\n throw new Error(\n `Expected vector store adapter \"${expectedAdapter}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available vector store adapters: ${formatAvailable(available)}`,\n );\n }\n\n return adapter;\n}\n\n/**\n * Assert that an activated extension registration registry contains an importer\n * for the expected format/name (optionally scoped to a specific extension).\n */\nexport function assertRegisteredImporter(\n registrations: ExtensionRegistrationRegistry,\n expectation: RegisteredImporterExpectation,\n): RegisteredExtensionImporter {\n const expectedImporter = normalizeSdkIdentifier(expectation.importer);\n if (expectedImporter.length === 0) {\n throw new Error(\"Expected importer name must be a non-empty string\");\n }\n\n const candidates = registrations.importers.filter(\n (entry) => normalizeSdkIdentifier(entry.importer) === expectedImporter,\n );\n const importer = expectation.extensionName\n ? candidates.find((entry) => entry.name === expectation.extensionName)\n : candidates[0];\n if (!importer) {\n const available = sortedUnique(registrations.importers.map((entry) => entry.importer));\n throw new Error(\n `Expected importer \"${expectedImporter}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available importers: ${formatAvailable(available)}`,\n );\n }\n\n return importer;\n}\n\n/**\n * Assert that an activated extension registration registry contains an exporter\n * for the expected format/name (optionally scoped to a specific extension).\n */\nexport function assertRegisteredExporter(\n registrations: ExtensionRegistrationRegistry,\n expectation: RegisteredExporterExpectation,\n): RegisteredExtensionExporter {\n const expectedExporter = normalizeSdkIdentifier(expectation.exporter);\n if (expectedExporter.length === 0) {\n throw new Error(\"Expected exporter name must be a non-empty string\");\n }\n\n const candidates = registrations.exporters.filter(\n (entry) => normalizeSdkIdentifier(entry.exporter) === expectedExporter,\n );\n const exporter = expectation.extensionName\n ? candidates.find((entry) => entry.name === expectation.extensionName)\n : candidates[0];\n if (!exporter) {\n const available = sortedUnique(registrations.exporters.map((entry) => entry.exporter));\n throw new Error(\n `Expected exporter \"${expectedExporter}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available exporters: ${formatAvailable(available)}`,\n );\n }\n\n return exporter;\n}\n\n/**\n * Assert that an activated extension registration registry contains a custom\n * item field definition (optionally scoped to a specific extension).\n */\nexport function assertRegisteredItemField(\n registrations: ExtensionRegistrationRegistry,\n expectation: RegisteredItemFieldExpectation,\n): RegisteredItemFieldAssertion {\n const expectedField = normalizeSdkIdentifier(expectation.field);\n if (expectedField.length === 0) {\n throw new Error(\"Expected item field name must be a non-empty string\");\n }\n\n const candidates = registrations.item_fields\n .filter((entry) => expectation.extensionName === undefined || entry.name === expectation.extensionName)\n .map((registration) => ({\n registration,\n field: registration.fields.find((field) => normalizeSdkIdentifier(field.name) === expectedField),\n }))\n .filter((entry): entry is RegisteredItemFieldAssertion => entry.field !== undefined);\n\n const match = candidates.find((entry) => expectation.type === undefined || entry.field.type === expectation.type);\n if (!match) {\n const available = sortedUnique(\n registrations.item_fields.flatMap((entry) => entry.fields.map((field) => `${field.name}:${field.type}`)),\n );\n throw new Error(\n `Expected item field \"${expectedField}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available item fields: ${formatAvailable(available)}`,\n );\n }\n\n return match;\n}\n\n/**\n * Assert that an activated extension registration registry contains a custom\n * item type definition (optionally scoped to a specific extension).\n */\nexport function assertRegisteredItemType(\n registrations: ExtensionRegistrationRegistry,\n expectation: RegisteredItemTypeExpectation,\n): RegisteredItemTypeAssertion {\n const expectedType = normalizeSdkIdentifier(expectation.itemType);\n if (expectedType.length === 0) {\n throw new Error(\"Expected item type name must be a non-empty string\");\n }\n\n const candidates = registrations.item_types\n .filter((entry) => expectation.extensionName === undefined || entry.name === expectation.extensionName)\n .map((registration) => ({\n registration,\n itemType: registration.types.find((itemType) => normalizeSdkIdentifier(itemType.name) === expectedType),\n }))\n .filter((entry): entry is RegisteredItemTypeAssertion => entry.itemType !== undefined);\n\n const match = candidates.find((entry) => expectation.folder === undefined || entry.itemType.folder === expectation.folder);\n if (!match) {\n const available = sortedUnique(\n registrations.item_types.flatMap((entry) => entry.types.map((itemType) => `${itemType.name}:${itemType.folder}`)),\n );\n throw new Error(\n `Expected item type \"${expectedType}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available item types: ${formatAvailable(available)}`,\n );\n }\n\n return match;\n}\n\n/**\n * Assert that an activated extension command registry contains a command\n * override registered via `api.registerCommand(command, override)` (optionally\n * scoped to a specific extension).\n *\n * Command overrides are surfaced via `ExtensionActivationResult.commands`, not\n * the command registration registry, so this helper accepts an\n * `ExtensionCommandRegistry`.\n */\nexport function assertRegisteredCommandOverride(\n commands: ExtensionCommandRegistry,\n expectation: RegisteredCommandOverrideExpectation,\n): RegisteredExtensionCommandOverride {\n const expectedCommand = normalizeSdkCommandName(expectation.command);\n if (expectedCommand.length === 0) {\n throw new Error(\"Expected command name must be a non-empty string\");\n }\n\n const candidates = commands.overrides.filter((entry) => entry.command === expectedCommand);\n const override = expectation.extensionName\n ? candidates.find((entry) => entry.name === expectation.extensionName)\n : candidates[0];\n if (!override) {\n const available = sortedUnique(commands.overrides.map((entry) => entry.command));\n throw new Error(\n `Expected command override \"${expectedCommand}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available command overrides: ${formatAvailable(available)}`,\n );\n }\n\n return override;\n}\n\n/**\n * Assert that an activated extension parser registry contains a parser override\n * registered via `api.registerParser(command, override)` (optionally scoped to\n * a specific extension).\n *\n * Parser overrides are surfaced via `ExtensionActivationResult.parsers`, not the\n * command registration registry, so this helper accepts an\n * `ExtensionParserRegistry`.\n */\nexport function assertRegisteredParserOverride(\n parsers: ExtensionParserRegistry,\n expectation: RegisteredParserOverrideExpectation,\n): RegisteredExtensionParserOverride {\n const expectedCommand = normalizeSdkCommandName(expectation.command);\n if (expectedCommand.length === 0) {\n throw new Error(\"Expected command name must be a non-empty string\");\n }\n\n const candidates = parsers.overrides.filter((entry) => entry.command === expectedCommand);\n const override = expectation.extensionName\n ? candidates.find((entry) => entry.name === expectation.extensionName)\n : candidates[0];\n if (!override) {\n const available = sortedUnique(parsers.overrides.map((entry) => entry.command));\n throw new Error(\n `Expected parser override \"${expectedCommand}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available parser overrides: ${formatAvailable(available)}`,\n );\n }\n\n return override;\n}\n\n/**\n * Assert that an activated extension preflight registry contains a preflight\n * override registered via `api.registerPreflight(override)` (optionally scoped\n * to a specific extension).\n *\n * Preflight overrides are global (they run for every command and carry no\n * `command` field), so the expectation only accepts an optional\n * `extensionName`. Preflight overrides are surfaced via\n * `ExtensionActivationResult.preflight`.\n */\nexport function assertRegisteredPreflightOverride(\n preflight: ExtensionPreflightRegistry,\n expectation: RegisteredPreflightOverrideExpectation = {},\n): RegisteredExtensionPreflightOverride {\n const override = expectation.extensionName\n ? preflight.overrides.find((entry) => entry.name === expectation.extensionName)\n : preflight.overrides[0];\n if (!override) {\n const available = sortedUnique(preflight.overrides.map((entry) => entry.name));\n throw new Error(\n `Expected a preflight override${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available preflight overrides: ${formatAvailable(available)}`,\n );\n }\n\n return override;\n}\n\n/**\n * Assert that an activated extension renderer registry contains a renderer\n * override registered via `api.registerRenderer(format, renderer)` for the\n * expected output format (optionally scoped to a specific extension).\n *\n * Renderer overrides are surfaced via `ExtensionActivationResult.renderers`.\n */\nexport function assertRegisteredRendererOverride(\n renderers: ExtensionRendererRegistry,\n expectation: RegisteredRendererOverrideExpectation,\n): RegisteredExtensionRendererOverride {\n const expectedFormat = normalizeSdkIdentifier(expectation.format);\n if (expectedFormat.length === 0) {\n throw new Error(\"Expected renderer format must be a non-empty string\");\n }\n\n const candidates = renderers.overrides.filter((entry) => entry.format === expectedFormat);\n const override = expectation.extensionName\n ? candidates.find((entry) => entry.name === expectation.extensionName)\n : candidates[0];\n if (!override) {\n const available = sortedUnique(renderers.overrides.map((entry) => entry.format));\n throw new Error(\n `Expected renderer override \"${expectedFormat}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available renderer overrides: ${formatAvailable(available)}`,\n );\n }\n\n return override;\n}\n\n/**\n * Assert that an activated extension service registry contains a service override\n * registered via `api.registerService(service, override)` for the expected\n * service name (optionally scoped to a specific extension).\n *\n * Service overrides are surfaced via `ExtensionActivationResult.services`, not the\n * command registration registry, so this helper accepts an\n * `ExtensionServiceRegistry`.\n */\nexport function assertRegisteredServiceOverride(\n services: ExtensionServiceRegistry,\n expectation: RegisteredServiceOverrideExpectation,\n): RegisteredExtensionServiceOverride {\n const expectedService = normalizeSdkIdentifier(expectation.service);\n if (expectedService.length === 0) {\n throw new Error(\"Expected service name must be a non-empty string\");\n }\n\n const candidates = services.overrides.filter((entry) => normalizeSdkIdentifier(entry.service) === expectedService);\n const override = expectation.extensionName\n ? candidates.find((entry) => entry.name === expectation.extensionName)\n : candidates[0];\n if (!override) {\n const available = sortedUnique(services.overrides.map((entry) => entry.service));\n throw new Error(\n `Expected service override \"${expectedService}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available service overrides: ${formatAvailable(available)}`,\n );\n }\n\n return override;\n}\n\n/**\n * Assert that an activated extension registration registry contains a schema\n * migration registered via `api.registerMigration(definition)` with the expected\n * id (optionally scoped to a specific extension and asserting the `mandatory`\n * governance flag, where an unset flag is treated as non-mandatory).\n *\n * Migrations are surfaced via `ExtensionActivationResult.registrations.migrations`.\n */\nexport function assertRegisteredMigration(\n registrations: ExtensionRegistrationRegistry,\n expectation: RegisteredMigrationExpectation,\n): RegisteredExtensionSchemaMigrationDefinition {\n const expectedMigration = normalizeSdkIdentifier(expectation.migration);\n if (expectedMigration.length === 0) {\n throw new Error(\"Expected migration id must be a non-empty string\");\n }\n\n const candidates = registrations.migrations.filter(\n (entry) =>\n (expectation.extensionName === undefined || entry.name === expectation.extensionName) &&\n typeof entry.definition.id === \"string\" &&\n normalizeSdkIdentifier(entry.definition.id) === expectedMigration,\n );\n const match = candidates.find(\n (entry) => expectation.mandatory === undefined || (entry.definition.mandatory ?? false) === expectation.mandatory,\n );\n if (match) {\n return match;\n }\n\n // The id (and any extension scope) matched but the `mandatory` flag did not:\n // report the mismatch directly rather than the misleading \"not registered\"\n // listing. Reaching here with a candidate implies `expectation.mandatory` was\n // set, since an unset flag matches any candidate above.\n const idMatch = candidates[0];\n if (idMatch !== undefined) {\n throw new Error(\n `Expected migration \"${expectedMigration}\"${extensionNameSuffix(expectation.extensionName)} to have ` +\n `mandatory=${expectation.mandatory}, but it is mandatory=${idMatch.definition.mandatory ?? false}.`,\n );\n }\n\n const available = sortedUnique(\n registrations.migrations.map((entry) => {\n const id =\n typeof entry.definition.id === \"string\" && entry.definition.id.trim().length > 0\n ? entry.definition.id.trim()\n : \"(unnamed)\";\n return `${id}:${entry.definition.mandatory === true}`;\n }),\n );\n throw new Error(\n `Expected migration \"${expectedMigration}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available migrations: ${formatAvailable(available)}`,\n );\n}\n\n/**\n * Assert that an activated extension declares no capability it never uses\n * (least privilege). Pass the same capabilities as `manifest.capabilities` via\n * `expectation.declared`; the helper computes what the extension actually\n * registered against and throws when any declared capability is unused.\n *\n * This is the package-test counterpart of the advisory\n * `extension_capability_unused` warning `pm package doctor` emits, letting an\n * author catch an over-broad manifest at `npm test` time. Returns the\n * declared/used/unused breakdown for further assertions.\n */\nexport function assertExtensionCapabilityUsage(\n activation: ExtensionActivationResult,\n expectation: ExtensionCapabilityUsageExpectation,\n): ExtensionCapabilityUsageAssertion {\n const toKnownCapabilitySet = (capabilities: readonly string[], field: string): Set<ExtensionCapability> => {\n const known = new Set<ExtensionCapability>();\n for (const capability of capabilities) {\n const normalized = normalizeKnownExtensionCapability(capability);\n if (normalized === null) {\n throw new Error(\n `Expected ${field} capability \"${capability}\" to be a known extension capability. ` +\n \"Use canonical capability names (see manifest.capabilities).\",\n );\n }\n known.add(normalized);\n }\n return known;\n };\n const declared = [...toKnownCapabilitySet(expectation.declared, \"declared\")].sort((left, right) =>\n left.localeCompare(right),\n );\n const allowUnused = toKnownCapabilitySet(expectation.allowUnused ?? [], \"allowUnused\");\n const used = collectUsedExtensionCapabilities(activation, { extensionName: expectation.extensionName });\n const usedSet = new Set(used);\n const unused = declared.filter((capability) => !usedSet.has(capability) && !allowUnused.has(capability));\n if (unused.length > 0) {\n const scopeSuffix = extensionNameSuffix(expectation.extensionName);\n throw new Error(\n `Expected every declared capability${scopeSuffix} to be exercised, but [${unused.join(\n \", \",\n )}] ${unused.length === 1 ? \"is\" : \"are\"} declared yet never registered against. ` +\n `Remove ${unused.length === 1 ? \"it\" : \"them\"} from manifest.capabilities for least privilege, ` +\n \"or pass allowUnused for capabilities registered only behind a runtime flag.\",\n );\n }\n return { declared, used, unused };\n}\n\n/**\n * Preflight a declarative {@link ExtensionBlueprint} in a test, throwing if it has\n * any `error`-severity issue (today: capability the blueprint exercises but the\n * declared set omits, which would fail activation with `extension_capability_missing`).\n *\n * The throwing counterpart to {@link lintExtensionBlueprint} and the `assert*`\n * family member for declarative authoring: drop `assertExtensionBlueprint(blueprint)`\n * into a package's `node:test`/Vitest suite to fail CI before the blueprint is\n * ever activated. The full {@link ExtensionBlueprintLintResult} is returned on\n * success so a test can still inspect advisory warnings (unused capability,\n * duplicate command, empty surface) without failing on them.\n */\nexport function assertExtensionBlueprint(\n blueprint: ExtensionBlueprint,\n options: LintExtensionBlueprintOptions = {},\n): ExtensionBlueprintLintResult {\n const result = lintExtensionBlueprint(blueprint, options);\n if (!result.ok) {\n const errors = result.findings.filter((finding) => finding.severity === \"error\");\n throw new Error(\n `Extension blueprint failed preflight with ${errors.length} ${errors.length === 1 ? \"error\" : \"errors\"}:\\n` +\n errors.map((finding) => ` - [${finding.code}] ${finding.message}`).join(\"\\n\"),\n );\n }\n return result;\n}\n\n/**\n * The structured result of {@link assertExtensionManifestMatchesBlueprint}: the\n * reconciliation between a manifest's declared capabilities and the set the\n * blueprint actually exercises. Returned only when they match exactly (the\n * assertion throws otherwise).\n */\nexport interface ExtensionManifestBlueprintMatch {\n /** The least-privilege capability set the blueprint exercises (from `deriveExtensionCapabilities`). */\n used: ExtensionCapability[];\n /** The manifest's declared capabilities, legacy-alias resolved and normalized. */\n declared: ExtensionCapability[];\n /** Capabilities the blueprint uses but the manifest omits — would crash activation. Empty on success. */\n missing: ExtensionCapability[];\n /** Capabilities the manifest declares but no surface exercises — violates least privilege. Empty on success. */\n unused: ExtensionCapability[];\n /** Every lint finding for the blueprint, so callers can inspect advisory warnings. */\n findings: ExtensionBlueprintLintFinding[];\n}\n\n/**\n * Strictly assert a manifest's `capabilities` equal the least-privilege set a\n * declarative {@link ExtensionBlueprint} exercises, throwing on any drift in\n * either direction.\n *\n * This is the strict bookend to the lenient {@link assertExtensionBlueprint}:\n * where that helper fails only on an *undeclared* capability (the `error`-severity\n * `extension_capability_missing` activation crash) and merely *warns* on an unused\n * one, this assertion fails on **both** — an undeclared capability (`missing`) and\n * a declared-but-unused one (`unused`) — so a hand-maintained `manifest.json` stays\n * exactly the set the blueprint requires. Drop it into a package's\n * `node:test`/Vitest suite to guard against capability drift in CI, the natural\n * companion to {@link ../sdk/compose.js#synthesizeExtensionManifest} (assert what\n * you would otherwise generate). Only `capabilities` are reconciled because that is\n * the one manifest field a blueprint determines.\n *\n * The reconciliation is returned on success so a test can still inspect advisory\n * warnings (duplicate command, empty surface) without failing on them.\n */\nexport function assertExtensionManifestMatchesBlueprint(\n manifest: Pick<ExtensionManifest, \"capabilities\">,\n blueprint: ExtensionBlueprint,\n): ExtensionManifestBlueprintMatch {\n // Coerce a malformed/absent capabilities field to an explicit empty declared set\n // so an untyped `.js` caller gets a deterministic `missing` list rather than the\n // lint silently falling back to the blueprint's in-module manifest mirror.\n const declaredCapabilities = Array.isArray(manifest.capabilities) ? manifest.capabilities : [];\n const result = lintExtensionBlueprint(blueprint, { declaredCapabilities });\n // `declared` is guaranteed non-null here: we always hand lint an array, so it\n // never takes its \"no declared set\" branch. The cast drops the unreachable null.\n const declared = result.declared as ExtensionCapability[];\n const declaredSet = new Set(declared);\n const usedSet = new Set(result.used);\n const missing = result.used.filter((capability) => !declaredSet.has(capability));\n const unused = declared.filter((capability) => !usedSet.has(capability));\n if (missing.length > 0 || unused.length > 0) {\n const parts: string[] = [];\n if (missing.length > 0) {\n parts.push(`missing [${missing.join(\", \")}] (the blueprint registers ${missing.length === 1 ? \"a surface\" : \"surfaces\"} requiring ${missing.length === 1 ? \"it\" : \"them\"}; activation throws extension_capability_missing)`);\n }\n if (unused.length > 0) {\n parts.push(`unused [${unused.join(\", \")}] (declared but no surface exercises ${unused.length === 1 ? \"it\" : \"them\"}; drop for least privilege)`);\n }\n throw new Error(\n `Manifest capabilities do not match the blueprint: ${parts.join(\"; \")}. ` +\n \"Set capabilities to synthesizeExtensionManifest(blueprint, identity).capabilities to stay in sync.\",\n );\n }\n return { used: result.used, declared, missing, unused, findings: result.findings };\n}\n\n/**\n * Assert an extension manifest's declared version bounds permit it to load on a\n * target pm CLI version, throwing when a bound blocks the load.\n *\n * This is the throwing CI/test counterpart to\n * {@link ../sdk/compose.js#checkExtensionManifestCompatibility}: it runs the same\n * author-time version-bound analysis and fails on any blocking incompatibility — a\n * malformed bound (`*_invalid`), a `pm_min_version` the target is below\n * (`pm_min_version_unmet`), or a `block`-mode `pm_max_version` the target exceeds\n * (`pm_max_version_exceeded`). Advisory `warning` findings (`*_unchecked`, or a\n * `warn`-mode `pm_max_version_exceeded_warn`) never throw, because the loader\n * would still load the extension. Pin it to the pm version a package commits to\n * supporting so a too-tight or malformed bound fails the package's own suite, not\n * a user's install. The full compatibility result is returned on success so a test\n * can still inspect advisory warnings.\n */\nexport function assertExtensionManifestCompatible(\n manifest: ExtensionManifestCompatibilityManifest,\n target: ExtensionManifestCompatibilityTarget,\n): ExtensionManifestCompatibilityResult {\n const result = checkExtensionManifestCompatibility(manifest, target);\n const blocking = result.findings.filter((finding) => finding.severity === \"error\");\n if (blocking.length > 0) {\n throw new Error(\n `Extension manifest is not compatible with pm ${result.pmVersion}: ${blocking\n .map((finding) => finding.message)\n .join(\"; \")}`,\n );\n }\n return result;\n}\n\n/**\n * Preflight a declarative {@link ExtensionBlueprint} through every author-time\n * check in one test, throwing if any stage produced an `error`-severity finding.\n *\n * This is the throwing CI/test bookend over\n * {@link ../sdk/compose.js#preflightExtension} — the single guard that replaces\n * chaining {@link assertExtensionBlueprint}, {@link assertExtensionManifestMatchesBlueprint},\n * and {@link assertExtensionManifestCompatible} in a package's\n * `node:test`/Vitest suite. It runs the same consolidated analysis (always lints\n * the blueprint; synthesizes the manifest when `options.identity` is given; checks\n * version bounds when `options.target` is given) and throws one error listing every\n * blocking finding tagged by its `source:code`. Advisory `warning` findings (an\n * unused capability, a duplicate command, an `*_unchecked` bound) never throw,\n * matching the underlying stages. The full {@link ExtensionPreflightReport} is\n * returned on success so a test can still inspect those warnings, the synthesized\n * manifest, and the derived capability set without failing on them.\n */\nexport function assertExtensionPreflight(\n blueprint: ExtensionBlueprint,\n options: PreflightExtensionOptions = {},\n): ExtensionPreflightReport {\n const report = preflightExtension(blueprint, options);\n if (!report.ok) {\n const errors = report.findings.filter((finding) => finding.severity === \"error\");\n throw new Error(\n `Extension failed preflight with ${errors.length} ${errors.length === 1 ? \"error\" : \"errors\"}:\\n` +\n errors.map((finding) => ` - [${finding.source}:${finding.code}] ${finding.message}`).join(\"\\n\"),\n );\n }\n return report;\n}\n\n/**\n * A fluent, single-extension test fixture returned by\n * {@link createExtensionTestHarness}.\n *\n * Every method binds one of the standalone SDK testing helpers to the correct\n * sub-registry of a single {@link ExtensionActivationResult}, so a package author\n * never threads `activation.registrations` vs `activation.commands` vs\n * `activation.hooks` (etc.) by hand — picking the wrong sub-registry is a common\n * footgun that surfaces as a confusing `available: (none)` error. Methods do not\n * use `this`; they close over the activation, so they remain safe to destructure\n * (`const { runCommand, assertCommandContract } = harness;`).\n *\n * The `assert*` methods verify registration wiring (returning the matched\n * registration); the `run*` methods invoke a registered surface through pm's real\n * dispatch engine (returning its runtime result); {@link deactivate} runs the real\n * teardown engine. The raw {@link activation} stays public as an escape hatch to\n * the standalone helpers for any surface not covered by a convenience method.\n */\nexport interface ExtensionTestHarness {\n /** The in-memory extension module supplied to {@link createExtensionTestHarness}. */\n readonly module: unknown;\n /** Resolved extension name (manifest name, explicit override, or `\"test-extension\"`). */\n readonly name: string;\n /** Layer recorded for the in-memory extension (defaults to `\"project\"`). */\n readonly layer: ExtensionLayer;\n /** The underlying activation result; use it to reach standalone helpers directly. */\n readonly activation: ExtensionActivationResult;\n\n /** Bound {@link assertRegisteredCommandContract} over `activation.registrations`. */\n assertCommandContract(expectation: RegisteredCommandContractExpectation): RegisteredCommandContractAssertion;\n /** Bound {@link assertRegisteredFlags} over `activation.registrations`. */\n assertFlags(expectation: RegisteredFlagsExpectation): RegisteredExtensionFlagDefinitions;\n /** Bound {@link assertRegisteredItemField} over `activation.registrations`. */\n assertItemField(expectation: RegisteredItemFieldExpectation): RegisteredItemFieldAssertion;\n /** Bound {@link assertRegisteredItemType} over `activation.registrations`. */\n assertItemType(expectation: RegisteredItemTypeExpectation): RegisteredItemTypeAssertion;\n /** Bound {@link assertRegisteredHook} over `activation.hooks`. */\n assertHook<TKind extends RegisteredHookKind>(\n expectation: RegisteredHookExpectation & { kind: TKind },\n ): ExtensionHookRegistry[(typeof HOOK_KIND_TO_REGISTRY_FIELD)[TKind]][number];\n /** Bound {@link assertRegisteredCommandOverride} over `activation.commands`. */\n assertCommandOverride(expectation: RegisteredCommandOverrideExpectation): RegisteredExtensionCommandOverride;\n /** Bound {@link assertRegisteredParserOverride} over `activation.parsers`. */\n assertParserOverride(expectation: RegisteredParserOverrideExpectation): RegisteredExtensionParserOverride;\n /** Bound {@link assertRegisteredPreflightOverride} over `activation.preflight`. */\n assertPreflightOverride(expectation?: RegisteredPreflightOverrideExpectation): RegisteredExtensionPreflightOverride;\n /** Bound {@link assertRegisteredRendererOverride} over `activation.renderers`. */\n assertRendererOverride(expectation: RegisteredRendererOverrideExpectation): RegisteredExtensionRendererOverride;\n /** Bound {@link assertRegisteredServiceOverride} over `activation.services`. */\n assertServiceOverride(expectation: RegisteredServiceOverrideExpectation): RegisteredExtensionServiceOverride;\n /** Bound {@link assertRegisteredSearchProvider} over `activation.registrations`. */\n assertSearchProvider(expectation: RegisteredSearchProviderExpectation): RegisteredExtensionSearchProvider;\n /** Bound {@link assertRegisteredVectorStoreAdapter} over `activation.registrations`. */\n assertVectorStoreAdapter(expectation: RegisteredVectorStoreAdapterExpectation): RegisteredExtensionVectorStoreAdapter;\n /** Bound {@link assertRegisteredImporter} over `activation.registrations`. */\n assertImporter(expectation: RegisteredImporterExpectation): RegisteredExtensionImporter;\n /** Bound {@link assertRegisteredExporter} over `activation.registrations`. */\n assertExporter(expectation: RegisteredExporterExpectation): RegisteredExtensionExporter;\n /** Bound {@link assertRegisteredMigration} over `activation.registrations`. */\n assertMigration(expectation: RegisteredMigrationExpectation): RegisteredExtensionSchemaMigrationDefinition;\n /** Bound {@link assertExtensionCapabilityUsage} over the whole `activation`. */\n assertCapabilityUsage(expectation: ExtensionCapabilityUsageExpectation): ExtensionCapabilityUsageAssertion;\n\n /** Bound {@link runRegisteredCommandForTest} over `activation.commands`. */\n runCommand(options: RunRegisteredCommandForTestOptions): Promise<CommandHandlerResult>;\n /** Bound {@link runRegisteredHookForTest} over `activation.hooks`. */\n runHook(options: RunRegisteredHookForTestOptions): Promise<string[]>;\n /** Bound {@link runRegisteredCommandOverrideForTest} over `activation.commands`. */\n runCommandOverride(context: CommandOverrideContext): Promise<CommandOverrideResult>;\n /** Bound {@link runRegisteredParserOverrideForTest} over `activation.parsers`. */\n runParserOverride(context: ParserOverrideContext): Promise<ParserOverrideResult>;\n /** Bound {@link runRegisteredPreflightOverrideForTest} over `activation.preflight`. */\n runPreflightOverride(context: PreflightOverrideContext): Promise<PreflightOverrideResult>;\n /** Bound {@link runRegisteredRendererOverrideForTest} over `activation.renderers`. */\n runRendererOverride(context: RendererOverrideContext): Promise<RendererOverrideResult>;\n /** Bound {@link runRegisteredServiceOverrideForTest} over `activation.services`. */\n runServiceOverride(context: ServiceOverrideContext): Promise<ServiceOverrideResult>;\n /** Bound {@link runRegisteredSearchProviderForTest} over `activation.registrations`. */\n runSearchProvider<Operation extends keyof SearchProviderOperationContexts>(options: {\n provider: string;\n operation: Operation;\n context: SearchProviderOperationContexts[Operation];\n }): Promise<SearchProviderOperationResults[Operation]>;\n /** Bound {@link runRegisteredVectorStoreAdapterForTest} over `activation.registrations`. */\n runVectorStoreAdapter<Operation extends keyof VectorStoreAdapterOperationContexts>(options: {\n adapter: string;\n operation: Operation;\n context: VectorStoreAdapterOperationContexts[Operation];\n }): Promise<VectorStoreAdapterOperationResults[Operation]>;\n /** Bound {@link runRegisteredMigrationForTest} over `activation.registrations`. */\n runMigration(options: RunRegisteredMigrationForTestOptions): Promise<unknown>;\n /** Bound {@link runRegisteredImporterForTest} over the whole `activation`. */\n runImporter(options: RunRegisteredImporterForTestOptions): Promise<CommandHandlerResult>;\n /** Bound {@link runRegisteredExporterForTest} over the whole `activation`. */\n runExporter(options: RunRegisteredExporterForTestOptions): Promise<CommandHandlerResult>;\n\n /**\n * Bound {@link deactivateExtensionForTest} — runs the real teardown engine for\n * this harness's module, forwarding its resolved `name`/`layer`/`activation` so\n * the skip-key matches and a never-initialized extension is not deactivated.\n */\n deactivate(options?: { deactivateTimeoutMs?: number }): Promise<ExtensionDeactivationResult>;\n}\n\n/**\n * Activate one in-memory extension module and return a fluent\n * {@link ExtensionTestHarness} that binds every SDK testing helper to the right\n * sub-registry of the resulting activation.\n *\n * This is the ergonomic capstone over the standalone helpers: instead of\n * `activateExtensionForTest(module)` followed by repeatedly threading\n * `activation.registrations` / `activation.commands` / `activation.hooks` into\n * each `assertRegistered*` / `runRegistered*` call, an author writes\n * `const ext = await createExtensionTestHarness(module, { capabilities });` and\n * then `ext.assertCommandContract(...)`, `await ext.runCommand(...)`,\n * `await ext.deactivate()` — never needing to know pm's internal registry layout.\n *\n * `name` and `layer` are resolved exactly as {@link activateExtensionForTest}\n * resolves them, and captured so {@link ExtensionTestHarness.deactivate} forwards\n * a matching skip-key. Activation runs pm's real validation/activation engine, so\n * every bound helper exercises real wiring and dispatch — not mocks.\n *\n * Fails fast: if the module does not activate cleanly (e.g. a registration is\n * dropped because the manifest omits the required capability), this throws a\n * descriptive error listing each failure instead of returning a harness whose\n * registries are empty — which would otherwise surface later as the confusing\n * `available: (none)` assertion error this helper exists to prevent. Tests that\n * deliberately exercise a *failed* activation should call\n * {@link activateExtensionForTest} directly and inspect `activation.failed`.\n */\nexport async function createExtensionTestHarness(\n module: unknown,\n options: ActivateExtensionForTestOptions = {},\n): Promise<ExtensionTestHarness> {\n const manifest = readTestExtensionManifest(module);\n const name = resolveTestExtensionName(manifest, options.name);\n const layer: ExtensionLayer = options.layer ?? \"project\";\n const activation = await activateExtensionForTest(module, options);\n if (activation.failed.length > 0) {\n const detail = activation.failed\n .map((failure) => {\n const missingCapability = failure.trace?.missing_capability;\n const reason = missingCapability ? `${failure.error}; missing capability \"${missingCapability}\"` : failure.error;\n return `${failure.layer}:${failure.name} (${reason})`;\n })\n .join(\", \");\n throw new Error(\n `createExtensionTestHarness could not activate the extension cleanly: ${detail}. ` +\n \"Declare the required capability in the manifest (or pass it via options.capabilities), \" +\n \"or use activateExtensionForTest directly to inspect a failed activation.\",\n );\n }\n return {\n module,\n name,\n layer,\n activation,\n assertCommandContract(expectation) {\n return assertRegisteredCommandContract(activation.registrations, expectation);\n },\n assertFlags(expectation) {\n return assertRegisteredFlags(activation.registrations, expectation);\n },\n assertItemField(expectation) {\n return assertRegisteredItemField(activation.registrations, expectation);\n },\n assertItemType(expectation) {\n return assertRegisteredItemType(activation.registrations, expectation);\n },\n assertHook(expectation) {\n return assertRegisteredHook(activation.hooks, expectation);\n },\n assertCommandOverride(expectation) {\n return assertRegisteredCommandOverride(activation.commands, expectation);\n },\n assertParserOverride(expectation) {\n return assertRegisteredParserOverride(activation.parsers, expectation);\n },\n assertPreflightOverride(expectation) {\n return assertRegisteredPreflightOverride(activation.preflight, expectation);\n },\n assertRendererOverride(expectation) {\n return assertRegisteredRendererOverride(activation.renderers, expectation);\n },\n assertServiceOverride(expectation) {\n return assertRegisteredServiceOverride(activation.services, expectation);\n },\n assertSearchProvider(expectation) {\n return assertRegisteredSearchProvider(activation.registrations, expectation);\n },\n assertVectorStoreAdapter(expectation) {\n return assertRegisteredVectorStoreAdapter(activation.registrations, expectation);\n },\n assertImporter(expectation) {\n return assertRegisteredImporter(activation.registrations, expectation);\n },\n assertExporter(expectation) {\n return assertRegisteredExporter(activation.registrations, expectation);\n },\n assertMigration(expectation) {\n return assertRegisteredMigration(activation.registrations, expectation);\n },\n assertCapabilityUsage(expectation) {\n return assertExtensionCapabilityUsage(activation, expectation);\n },\n runCommand(runOptions) {\n return runRegisteredCommandForTest(activation.commands, runOptions);\n },\n runHook(runOptions) {\n return runRegisteredHookForTest(activation.hooks, runOptions);\n },\n runCommandOverride(context) {\n return runRegisteredCommandOverrideForTest(activation.commands, context);\n },\n runParserOverride(context) {\n return runRegisteredParserOverrideForTest(activation.parsers, context);\n },\n runPreflightOverride(context) {\n return runRegisteredPreflightOverrideForTest(activation.preflight, context);\n },\n runRendererOverride(context) {\n return runRegisteredRendererOverrideForTest(activation.renderers, context);\n },\n runServiceOverride(context) {\n return runRegisteredServiceOverrideForTest(activation.services, context);\n },\n runSearchProvider(runOptions) {\n return runRegisteredSearchProviderForTest(activation.registrations, runOptions);\n },\n runVectorStoreAdapter(runOptions) {\n return runRegisteredVectorStoreAdapterForTest(activation.registrations, runOptions);\n },\n runMigration(runOptions) {\n return runRegisteredMigrationForTest(activation.registrations, runOptions);\n },\n runImporter(runOptions) {\n return runRegisteredImporterForTest(activation, runOptions);\n },\n runExporter(runOptions) {\n return runRegisteredExporterForTest(activation, runOptions);\n },\n deactivate(deactivateOptions = {}) {\n return deactivateExtensionForTest(module, {\n name,\n layer,\n activation,\n deactivateTimeoutMs: deactivateOptions.deactivateTimeoutMs,\n });\n },\n };\n}\n"],"names":[],"mappings":";;AAsEA,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,sCAAsC,EAAE,MAAM,uCAAuC,CAAC;AAC/F,OAAO,EACL,6BAA6B,EAC7B,+BAA+B,EAC/B,mCAAmC,GACpC,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,gCAAgC,EAAE,MAAM,wCAAwC,CAAC;AAC1F,OAAO,EAAE,iCAAiC,EAAE,MAAM,oDAAoD,CAAC;AACvG,OAAO,EACL,mCAAmC,EACnC,0BAA0B,EAC1B,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,cAAc,CAAC;AAiBtB,4EAA4E;AAC5E,+EAA+E;AAC/E,8EAA8E;AAC9E,0EAA0E;AAC1E,2CAA2C;AAC3C,OAAO,EACL,2BAA2B,GAG5B,MAAM,0CAA0C,CAAC;AAElD,kFAAkF;AAClF,6EAA6E;AAC7E,mFAAmF;AACnF,oFAAoF;AACpF,8EAA8E;AAC9E,gFAAgF;AAChF,OAAO,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,CAAC;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M,EAAE;gBACxC,IAAI;gBACJ,KAAK;gBACL,UAAU;gBACV,mBAAmB,EAAE,iBAAiB,CAAC,mBAAmB;aAC3D,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC","debugId":"98dee6b5-4a5f-552f-a6f9-6db6525de5a8"}
|
|
1
|
+
{"version":3,"file":"testing.js","sources":["sdk/testing.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module sdk/testing\n *\n * Defines public SDK APIs and package-author helpers for Testing.\n */\nimport type {\n AfterCommandHookContext,\n BeforeCommandHookContext,\n CommandHandlerResult,\n CommandOverrideContext,\n CommandOverrideResult,\n ExtensionActivationResult,\n ExtensionCapability,\n ExtensionCommandRegistry,\n ExtensionDeactivationResult,\n ExtensionGovernancePolicy,\n ExtensionHookRegistry,\n ExtensionLayer,\n ExtensionLoadResult,\n ExtensionManifest,\n ExtensionParserRegistry,\n ExtensionPreflightRegistry,\n ExtensionRegistrationRegistry,\n ExtensionRendererRegistry,\n ExtensionServiceName,\n ExtensionServiceRegistry,\n FlagDefinition,\n OnIndexHookContext,\n OnReadHookContext,\n OnWriteHookContext,\n OutputRendererFormat,\n ParserOverrideContext,\n ParserOverrideResult,\n PreflightOverrideContext,\n PreflightOverrideResult,\n RegisteredExtensionCommandDefinition,\n RegisteredExtensionCommandOverride,\n RegisteredExtensionExporter,\n RegisteredExtensionFlagDefinitions,\n RegisteredExtensionHook,\n RegisteredExtensionImporter,\n RegisteredExtensionParserOverride,\n RegisteredExtensionPreflightOverride,\n RegisteredExtensionProjectProfile,\n RegisteredExtensionRendererOverride,\n RegisteredExtensionSchemaFieldDefinitions,\n RegisteredExtensionSchemaItemTypeDefinitions,\n RegisteredExtensionSchemaMigrationDefinition,\n RegisteredExtensionSearchProvider,\n RegisteredExtensionServiceOverride,\n RegisteredExtensionVectorStoreAdapter,\n RendererOverrideContext,\n RendererOverrideResult,\n SchemaFieldDefinition,\n SchemaItemTypeDefinition,\n SchemaMigrationRunContext,\n SearchProviderEmbedBatchContext,\n SearchProviderEmbedContext,\n SearchProviderQueryContext,\n SearchProviderQueryExpansionContext,\n SearchProviderQueryExpansionResult,\n SearchProviderQueryResult,\n SearchProviderRerankContext,\n SearchProviderRerankResult,\n ServiceOverrideContext,\n ServiceOverrideResult,\n VectorStoreDeleteContext,\n VectorStoreQueryContext,\n VectorStoreQueryHit,\n VectorStoreUpsertContext,\n} from \"../core/extensions/loader.js\";\nimport {\n activateExtensions,\n deactivateExtensions,\n runAfterCommandHooks,\n runBeforeCommandHooks,\n runCommandHandler,\n runCommandOverride,\n runOnIndexHooks,\n runOnReadHooks,\n runOnWriteHooks,\n runParserOverride,\n runPreflightOverride,\n runRendererOverride,\n runServiceOverride,\n} from \"../core/extensions/loader.js\";\nimport { createDefaultExtensionGovernancePolicy } from \"../core/extensions/extension-types.js\";\nimport {\n getMigrationRuntimeDefinition,\n resolveRegisteredSearchProvider,\n resolveRegisteredVectorStoreAdapter,\n} from \"../core/extensions/runtime-registrations.js\";\nimport { collectUsedExtensionCapabilities } from \"../core/extensions/capability-usage.js\";\nimport { normalizeKnownExtensionCapability } from \"../core/extensions/extension-capability-aliases.js\";\nimport {\n checkExtensionManifestCompatibility,\n describeExtensionBlueprint,\n lintExtensionBlueprint,\n preflightExtension,\n} from \"./compose.js\";\nimport { describeExtensionActivation } from \"../core/extensions/activation-summary.js\";\nimport type {\n DescribeExtensionActivationOptions,\n ExtensionActivationSummary,\n} from \"../core/extensions/activation-summary.js\";\nimport type { ProjectProfileDefinition } from \"../core/profile/profile-presets.js\";\nimport { lintProjectProfile, type ProjectProfileLintReport } from \"../core/profile/profile-lint.js\";\nimport { renderExtensionSurfaceMarkdown } from \"../core/extensions/activation-summary-markdown.js\";\nimport type { ExtensionSurfaceMarkdownOptions } from \"../core/extensions/activation-summary-markdown.js\";\nimport type {\n ExtensionBlueprint,\n ExtensionBlueprintLintCode,\n ExtensionBlueprintLintFinding,\n ExtensionBlueprintLintResult,\n ExtensionBlueprintLintSeverity,\n ExtensionManifestCompatibilityManifest,\n ExtensionManifestCompatibilityResult,\n ExtensionManifestCompatibilityTarget,\n ExtensionPreflightReport,\n LintExtensionBlueprintOptions,\n PreflightExtensionOptions,\n} from \"./compose.js\";\nimport type { GlobalOptions } from \"../core/shared/command-types.js\";\nimport type { PmPackageManifest, PmPackageResourceKind } from \"../core/packages/manifest.js\";\n\n// `describeExtensionActivation` is the `describe` (enumerate-all) verb that\n// pairs with the `assert*` (verify-one) and `run*` (invoke-one) helpers below.\n// It lives in core (it walks the same registries the loader populates) and is\n// surfaced here so package authors get the whole testing surface from the\n// `@unbrained/pm-cli/sdk/testing` subpath.\nexport {\n describeExtensionActivation,\n renderExtensionSurfaceMarkdown,\n};\nexport type {\n DescribeExtensionActivationOptions,\n ExtensionActivationSummary,\n} from \"../core/extensions/activation-summary.js\";\nexport type { ExtensionSurfaceMarkdownOptions } from \"../core/extensions/activation-summary-markdown.js\";\n\n// `composeExtension`'s author-time companions: describe a blueprint's surface map\n// and preflight it for capability drift / duplicate / empty-surface footguns\n// without activating. Surfaced through the `@unbrained/pm-cli/sdk/testing` subpath\n// so a package author gets the full author → describe → preflight → test loop here,\n// alongside the assert*/run* helpers; `assertExtensionBlueprint` below is the\n// throwing assertion that pairs with the non-throwing `lintExtensionBlueprint`.\nexport { describeExtensionBlueprint, lintExtensionBlueprint };\nexport type {\n ExtensionBlueprint,\n ExtensionBlueprintLintCode,\n ExtensionBlueprintLintFinding,\n ExtensionBlueprintLintResult,\n ExtensionBlueprintLintSeverity,\n LintExtensionBlueprintOptions,\n};\n\ninterface TestExtensionModule {\n manifest?: Partial<ExtensionManifest>;\n activate?: unknown;\n default?: TestExtensionModule;\n}\n\n/**\n * Documents the activate extension for test options payload exchanged by command, SDK, and package integrations.\n */\nexport interface ActivateExtensionForTestOptions {\n name?: string;\n layer?: ExtensionLayer;\n capabilities?: readonly ExtensionCapability[];\n policy?: ExtensionGovernancePolicy;\n}\n\n/**\n * Documents the deactivate extension for test options payload exchanged by command, SDK, and package integrations.\n */\nexport interface DeactivateExtensionForTestOptions {\n /** Overrides the in-memory extension name (defaults to `manifest.name` or `\"test-extension\"`). */\n name?: string;\n /** Overrides the layer recorded for the in-memory extension (defaults to `\"project\"`). */\n layer?: ExtensionLayer;\n /**\n * Activation result returned by `activateExtensionForTest`. When provided, an\n * extension whose `activate` failed is skipped — mirroring the host teardown\n * contract that never deactivates a never-initialized extension. Pass the same\n * `name`/`layer` to both helpers so the skip key matches.\n */\n activation?: Pick<ExtensionActivationResult, \"failed\">;\n /**\n * Per-hook teardown bound, forwarded as `deactivate_timeout_ms`. Use `0` (or\n * `Infinity`) to wait indefinitely; omit to keep the host default.\n */\n deactivateTimeoutMs?: number;\n}\n\n/**\n * Options for {@link runRegisteredCommandForTest} — the inputs forwarded to a\n * registered extension command handler when exercising its behavior in a test.\n */\nexport interface RunRegisteredCommandForTestOptions {\n /**\n * Full registered command path to invoke, e.g. `\"hello\"` or `\"todos import\"`.\n * Matched against `commands.handlers[].command` after normalization (trimmed,\n * lower-cased, internal whitespace collapsed), mirroring runtime dispatch.\n */\n command: string;\n /** Positional arguments forwarded as `context.args` (default: none). */\n args?: readonly string[];\n /** Parsed flags/options forwarded as `context.options` (default: none). */\n options?: Record<string, unknown>;\n /**\n * Global option overrides merged onto the agent-safe test defaults\n * (`{ json: true, quiet: true, noPager: true }`), forwarded as `context.global`.\n */\n global?: Partial<GlobalOptions>;\n /**\n * Resolved pm workspace root forwarded as `context.pm_root` (default: `\"\"`).\n * Most pure handlers ignore it; set it when the handler reads workspace files.\n */\n pmRoot?: string;\n}\n\n/**\n * Options for {@link runRegisteredHookForTest} — the lifecycle `kind` to fire and\n * the synthetic context handed to every registered hook of that kind.\n *\n * The union keeps `context` type-safe per kind: `kind: \"on_write\"` requires an\n * {@link OnWriteHookContext}, `kind: \"after_command\"` an\n * {@link AfterCommandHookContext}, and so on — so authors cannot accidentally\n * pass an index context to a read hook.\n */\nexport type RunRegisteredHookForTestOptions =\n | { kind: \"before_command\"; context: BeforeCommandHookContext }\n | { kind: \"after_command\"; context: AfterCommandHookContext }\n | { kind: \"on_read\"; context: OnReadHookContext }\n | { kind: \"on_write\"; context: OnWriteHookContext }\n | { kind: \"on_index\"; context: OnIndexHookContext };\n\n/**\n * Maps each invokable search-provider operation to the context type its function\n * receives, keeping {@link runRegisteredSearchProviderForTest} type-safe per\n * operation. Mirrors the operations the host dispatches to a registered provider:\n * semantic `query`, single/batch embedding (`embed`/`embedBatch`),\n * `queryExpansion`, and `rerank`.\n */\nexport interface SearchProviderOperationContexts {\n query: SearchProviderQueryContext;\n embed: SearchProviderEmbedContext;\n embedBatch: SearchProviderEmbedBatchContext;\n queryExpansion: SearchProviderQueryExpansionContext;\n rerank: SearchProviderRerankContext;\n}\n\n/**\n * Maps each invokable search-provider operation to the result type its function\n * returns, so {@link runRegisteredSearchProviderForTest} resolves a precise return\n * type from the chosen `operation` instead of a union the caller must narrow.\n */\nexport interface SearchProviderOperationResults {\n query: SearchProviderQueryResult;\n embed: number[];\n embedBatch: number[][];\n queryExpansion: SearchProviderQueryExpansionResult;\n rerank: SearchProviderRerankResult;\n}\n\n/**\n * Options for {@link runRegisteredSearchProviderForTest}: the registered\n * `provider` name to resolve, the `operation` to invoke, and the synthetic\n * `context` handed to that operation. The discriminated union keeps `context`\n * type-safe per operation — `operation: \"embed\"` requires a\n * {@link SearchProviderEmbedContext}, `operation: \"rerank\"` a\n * {@link SearchProviderRerankContext}, and so on.\n */\nexport type RunRegisteredSearchProviderForTestOptions = {\n [Operation in keyof SearchProviderOperationContexts]: {\n /** Registered provider name to resolve, matched case-insensitively as the host does. */\n provider: string;\n /** Provider operation to invoke. */\n operation: Operation;\n /** Synthetic context handed to the resolved operation function. */\n context: SearchProviderOperationContexts[Operation];\n };\n}[keyof SearchProviderOperationContexts];\n\n/**\n * Maps each invokable vector-store-adapter operation to the context type its\n * function receives, keeping {@link runRegisteredVectorStoreAdapterForTest}\n * type-safe per operation. Mirrors the operations the host dispatches to a\n * registered adapter: nearest-neighbour `query`, `upsert`, and `delete`.\n */\nexport interface VectorStoreAdapterOperationContexts {\n query: VectorStoreQueryContext;\n upsert: VectorStoreUpsertContext;\n delete: VectorStoreDeleteContext;\n}\n\n/**\n * Maps each invokable vector-store-adapter operation to the result type its\n * function returns. Only `query` has a structured result\n * ({@link VectorStoreQueryHit}[]); `upsert`/`delete` report success by not\n * throwing, so their result is `unknown` and typically ignored.\n */\nexport interface VectorStoreAdapterOperationResults {\n query: VectorStoreQueryHit[];\n upsert: unknown;\n delete: unknown;\n}\n\n/**\n * Options for {@link runRegisteredVectorStoreAdapterForTest}: the registered\n * `adapter` name to resolve, the `operation` to invoke, and the synthetic\n * `context` handed to that operation. The discriminated union keeps `context`\n * type-safe per operation — `operation: \"upsert\"` requires a\n * {@link VectorStoreUpsertContext}, `operation: \"delete\"` a\n * {@link VectorStoreDeleteContext}, and so on.\n */\nexport type RunRegisteredVectorStoreAdapterForTestOptions = {\n [Operation in keyof VectorStoreAdapterOperationContexts]: {\n /** Registered adapter name to resolve, matched case-insensitively as the host does. */\n adapter: string;\n /** Adapter operation to invoke. */\n operation: Operation;\n /** Synthetic context handed to the resolved operation function. */\n context: VectorStoreAdapterOperationContexts[Operation];\n };\n}[keyof VectorStoreAdapterOperationContexts];\n\n/**\n * Options for {@link runRegisteredMigrationForTest}: which registered migration\n * to invoke and the workspace root its run context reports.\n */\nexport interface RunRegisteredMigrationForTestOptions {\n /** Registered migration id to resolve, matched case-insensitively against `definition.id`. */\n migration: string;\n /** Optional extension name to disambiguate when several extensions register the same id. */\n extensionName?: string;\n /** Resolved pm workspace root forwarded as `context.pm_root` (default `\"\"`). */\n pmRoot?: string;\n}\n\n/**\n * Options for {@link runRegisteredImporterForTest} — the registered importer name\n * to invoke plus the synthetic invocation context forwarded to its handler.\n *\n * The `importer` name is the value passed to `api.registerImporter(name, ...)`,\n * resolved case-insensitively (and whitespace-collapsed) against\n * `registrations.importers`; the helper derives the `\"<name> import\"` command\n * path internally, so authors never hand-build it.\n */\nexport interface RunRegisteredImporterForTestOptions {\n /** Registered importer name to resolve, e.g. `\"csv\"` for a `\"csv import\"` handler. */\n importer: string;\n /** Optional extension name to disambiguate when several extensions register the same importer. */\n extensionName?: string;\n /** Positional arguments forwarded as `context.args` (default: none). */\n args?: readonly string[];\n /** Parsed flags/options forwarded as `context.options` (default: none). */\n options?: Record<string, unknown>;\n /**\n * Global option overrides merged onto the agent-safe test defaults\n * (`{ json: true, quiet: true, noPager: true }`), forwarded as `context.global`.\n */\n global?: Partial<GlobalOptions>;\n /** Resolved pm workspace root forwarded as `context.pm_root` (default: `\"\"`). */\n pmRoot?: string;\n}\n\n/**\n * Options for {@link runRegisteredExporterForTest} — the registered exporter name\n * to invoke plus the synthetic invocation context forwarded to its handler.\n *\n * The `exporter` name is the value passed to `api.registerExporter(name, ...)`,\n * resolved case-insensitively (and whitespace-collapsed) against\n * `registrations.exporters`; the helper derives the `\"<name> export\"` command\n * path internally, so authors never hand-build it.\n */\nexport interface RunRegisteredExporterForTestOptions {\n /** Registered exporter name to resolve, e.g. `\"csv\"` for a `\"csv export\"` handler. */\n exporter: string;\n /** Optional extension name to disambiguate when several extensions register the same exporter. */\n extensionName?: string;\n /** Positional arguments forwarded as `context.args` (default: none). */\n args?: readonly string[];\n /** Parsed flags/options forwarded as `context.options` (default: none). */\n options?: Record<string, unknown>;\n /**\n * Global option overrides merged onto the agent-safe test defaults\n * (`{ json: true, quiet: true, noPager: true }`), forwarded as `context.global`.\n */\n global?: Partial<GlobalOptions>;\n /** Resolved pm workspace root forwarded as `context.pm_root` (default: `\"\"`). */\n pmRoot?: string;\n}\n\n/**\n * Documents the extension deactivation expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionDeactivationExpectation {\n /** Expected count of extensions whose `deactivate` ran without throwing (default `1`). */\n deactivated?: number;\n /** Expected count of teardown failures (default `0`). */\n failed?: number;\n}\n\n/**\n * Documents the registered command contract expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredCommandContractExpectation {\n command: string;\n action?: string;\n extensionName?: string;\n arguments?: string[];\n flags?: string[];\n}\n\n/**\n * Documents the registered command contract assertion payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredCommandContractAssertion {\n command: RegisteredExtensionCommandDefinition;\n flags: FlagDefinition[];\n}\n\n/**\n * Documents the registered flags expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredFlagsExpectation {\n targetCommand: string;\n extensionName?: string;\n flags?: string[];\n}\n\n/**\n * Public hook lifecycle kinds an extension can register through `api.hooks.*`.\n */\nexport type RegisteredHookKind = \"before_command\" | \"after_command\" | \"on_read\" | \"on_write\" | \"on_index\";\n\nconst HOOK_KIND_TO_REGISTRY_FIELD: Record<RegisteredHookKind, keyof ExtensionHookRegistry> = {\n before_command: \"beforeCommand\",\n after_command: \"afterCommand\",\n on_read: \"onRead\",\n on_write: \"onWrite\",\n on_index: \"onIndex\",\n};\n\n/**\n * Documents the registered hook expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredHookExpectation {\n kind: RegisteredHookKind;\n extensionName?: string;\n}\n\n/**\n * Documents the registered search provider expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredSearchProviderExpectation {\n provider: string;\n extensionName?: string;\n}\n\n/**\n * Documents the registered vector store adapter expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredVectorStoreAdapterExpectation {\n adapter: string;\n extensionName?: string;\n}\n\n/**\n * Documents the registered importer expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredImporterExpectation {\n importer: string;\n extensionName?: string;\n}\n\n/**\n * Documents the registered exporter expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredExporterExpectation {\n exporter: string;\n extensionName?: string;\n}\n\n/**\n * Documents the registered item field expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredItemFieldExpectation {\n field: string;\n extensionName?: string;\n type?: SchemaFieldDefinition[\"type\"];\n}\n\n/**\n * Documents the registered item field assertion payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredItemFieldAssertion {\n registration: RegisteredExtensionSchemaFieldDefinitions;\n field: SchemaFieldDefinition;\n}\n\n/**\n * Documents the registered item type expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredItemTypeExpectation {\n itemType: string;\n extensionName?: string;\n folder?: string;\n}\n\n/**\n * Documents the registered item type assertion payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredItemTypeAssertion {\n registration: RegisteredExtensionSchemaItemTypeDefinitions;\n itemType: SchemaItemTypeDefinition;\n}\n\n/**\n * Documents the registered command override expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredCommandOverrideExpectation {\n command: string;\n extensionName?: string;\n}\n\n/**\n * Documents the registered parser override expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredParserOverrideExpectation {\n command: string;\n extensionName?: string;\n}\n\n/**\n * Documents the registered preflight override expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredPreflightOverrideExpectation {\n extensionName?: string;\n}\n\n/**\n * Documents the registered renderer override expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredRendererOverrideExpectation {\n format: OutputRendererFormat;\n extensionName?: string;\n}\n\n/**\n * Documents the registered service override expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredServiceOverrideExpectation {\n service: ExtensionServiceName;\n extensionName?: string;\n}\n\n/**\n * Documents the registered migration expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredMigrationExpectation {\n migration: string;\n extensionName?: string;\n mandatory?: boolean;\n}\n\n/**\n * Documents the registered project-profile expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredProfileExpectation {\n /** Profile name to assert is registered (case-insensitive). */\n profile: string;\n /** Restrict the match to a single extension when several are active. */\n extensionName?: string;\n}\n\n/**\n * Documents the registered project-profile assertion payload exchanged by command, SDK, and package integrations.\n */\nexport interface RegisteredProfileAssertion {\n /** The matching registration entry. */\n registration: RegisteredExtensionProjectProfile;\n /** The registered profile definition. */\n profile: ProjectProfileDefinition;\n}\n\n/**\n * Documents the extension capability usage expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionCapabilityUsageExpectation {\n /**\n * Capabilities the manifest declares. Mirror `manifest.capabilities` here so\n * the assertion fails when the manifest grants more than the code uses.\n */\n declared: readonly ExtensionCapability[];\n /** Restrict reconciliation to a single extension when the activation has several. */\n extensionName?: string;\n /**\n * Capabilities allowed to be declared without being exercised (e.g. ones a\n * runtime registers only behind a config flag). These are excluded from the\n * least-privilege failure.\n */\n allowUnused?: readonly ExtensionCapability[];\n}\n\n/**\n * Documents the extension capability usage assertion payload exchanged by command, SDK, and package integrations.\n */\nexport interface ExtensionCapabilityUsageAssertion {\n /** Declared capabilities considered, sorted and de-duplicated. */\n declared: ExtensionCapability[];\n /** Capabilities the extension actually registered against, sorted. */\n used: ExtensionCapability[];\n /** Declared capabilities with no matching registration after the allowlist. */\n unused: ExtensionCapability[];\n}\n\n/**\n * Restricts package manifest resource expectation values accepted by command, SDK, and storage contracts.\n */\nexport type PackageManifestResourceExpectation = Partial<Record<PmPackageResourceKind, readonly string[]>>;\n\n/**\n * Documents the package manifest expectation payload exchanged by command, SDK, and package integrations.\n */\nexport interface PackageManifestExpectation {\n packageName?: string;\n aliases?: readonly string[];\n resources?: PackageManifestResourceExpectation;\n}\n\n/**\n * Options for {@link ExtensionTestHarness.renderMarkdown}.\n */\nexport interface RenderExtensionHarnessMarkdownOptions extends ExtensionSurfaceMarkdownOptions {\n /**\n * Restrict the rendered summary to one activated extension by name. Defaults\n * to the full activation union, matching {@link ExtensionTestHarness.activationSummary}.\n */\n extensionName?: string;\n}\n\nfunction normalizeSdkIdentifier(value: string): string {\n return value.trim().toLowerCase();\n}\n\n/**\n * Match key for profile-name assertions. Extends {@link normalizeSdkIdentifier}\n * with hyphen→underscore folding so the assertion mirrors the runtime profile\n * resolution (`pm profile`), which treats `my-flow` and `my_flow` as the same\n * archetype. Profiles are the one registration surface that resolves\n * hyphen-insensitively (item types resolve by alias, migrations by exact id), so\n * — unlike the other `assertRegistered*` helpers — this one folds the separator\n * to stay in lockstep with how a profile is actually looked up by name.\n */\nfunction normalizeSdkProfileMatchKey(value: string): string {\n return normalizeSdkIdentifier(value).replaceAll(\"-\", \"_\");\n}\n\nfunction extensionNameSuffix(extensionName: string | undefined): string {\n return extensionName ? ` from extension \"${extensionName}\"` : \"\";\n}\n\nfunction sortedUnique(values: readonly string[]): string[] {\n return [...new Set(values)].sort((left, right) => left.localeCompare(right));\n}\n\nfunction normalizeSdkCommandName(command: string): string {\n return command\n .trim()\n .toLowerCase()\n .split(/\\s+/)\n .filter((part) => part.length > 0)\n .join(\" \");\n}\n\nfunction formatAvailable(values: readonly string[]): string {\n return values.length > 0 ? values.join(\", \") : \"(none)\";\n}\n\nfunction assertStringSetIncludes(\n actual: readonly string[] | undefined,\n expected: readonly string[],\n label: string,\n): void {\n const actualValues = new Set(actual ?? []);\n const missing = sortedUnique(expected.filter((value) => !actualValues.has(value)));\n if (missing.length > 0) {\n throw new Error(\n `Expected package manifest ${label} to include ${missing.join(\", \")}; available: ${formatAvailable(\n sortedUnique(actual ?? []),\n )}`,\n );\n }\n}\n\nfunction collectFlagLabels(flags: readonly FlagDefinition[]): Set<string> {\n const labels = new Set<string>();\n for (const flag of flags) {\n if (typeof flag.long === \"string\" && flag.long.trim().length > 0) {\n labels.add(flag.long.trim());\n }\n if (typeof flag.short === \"string\" && flag.short.trim().length > 0) {\n labels.add(flag.short.trim());\n }\n }\n return labels;\n}\n\nfunction readTestExtensionManifest(module: unknown): Partial<ExtensionManifest> {\n if (module && typeof module === \"object\") {\n const testModule = module as TestExtensionModule;\n const manifest = testModule.manifest;\n if (manifest && typeof manifest === \"object\") {\n return manifest;\n }\n const defaultExport = testModule.default;\n const defaultManifest = defaultExport?.manifest;\n if (defaultManifest && typeof defaultManifest === \"object\") {\n return defaultManifest;\n }\n if (defaultExport && typeof defaultExport === \"object\" && (\"name\" in defaultExport || \"capabilities\" in defaultExport)) {\n return defaultExport as Partial<ExtensionManifest>;\n }\n if (\"name\" in testModule || \"capabilities\" in testModule) {\n return testModule as Partial<ExtensionManifest>;\n }\n }\n return {};\n}\n\nfunction resolveTestExtensionName(manifest: Partial<ExtensionManifest>, explicitName: string | undefined): string {\n return (\n explicitName ??\n (typeof manifest.name === \"string\" && manifest.name.trim().length > 0 ? manifest.name.trim() : \"test-extension\")\n );\n}\n\nfunction readTestExtensionCapabilities(\n manifest: Partial<ExtensionManifest>,\n options: ActivateExtensionForTestOptions,\n): ExtensionCapability[] {\n if (Array.isArray(options.capabilities)) {\n return [...options.capabilities];\n }\n if (Array.isArray(manifest.capabilities)) {\n return manifest.capabilities.filter((capability): capability is ExtensionCapability => typeof capability === \"string\");\n }\n return [];\n}\n\n/**\n * Build the synthetic single-extension {@link ExtensionLoadResult} shared by the\n * activate/deactivate test helpers, so both stay aligned with the loader's load\n * contract as it evolves. The `loaded` entry mirrors the real on-disk shape\n * (including `capabilities` and the compatibility fields) while leaving\n * filesystem paths empty, since the module is supplied in memory.\n */\nfunction buildSingleExtensionLoadResult(\n module: unknown,\n manifest: Partial<ExtensionManifest>,\n identity: { name: string; layer: ExtensionLayer; capabilities: ExtensionCapability[]; policy: ExtensionGovernancePolicy },\n): ExtensionLoadResult {\n return {\n disabled_by_flag: false,\n roots: { global: \"\", project: \"\" },\n configured_enabled: [],\n configured_disabled: [],\n discovered: [],\n effective: [],\n warnings: [],\n policy: identity.policy,\n failed: [],\n loaded: [\n {\n layer: identity.layer,\n directory: \"\",\n manifest_path: \"\",\n name: identity.name,\n version: typeof manifest.version === \"string\" ? manifest.version : \"0.0.0\",\n entry: typeof manifest.entry === \"string\" ? manifest.entry : \"./index.js\",\n priority: typeof manifest.priority === \"number\" ? manifest.priority : 0,\n entry_path: \"\",\n capabilities: identity.capabilities,\n manifest_version: typeof manifest.manifest_version === \"number\" ? manifest.manifest_version : undefined,\n pm_min_version: typeof manifest.pm_min_version === \"string\" ? manifest.pm_min_version : undefined,\n pm_max_version: typeof manifest.pm_max_version === \"string\" ? manifest.pm_max_version : undefined,\n engines: manifest.engines,\n trusted: manifest.trusted,\n provenance: manifest.provenance,\n sandbox_profile: manifest.sandbox_profile,\n permissions: manifest.permissions,\n activation: manifest.activation,\n module,\n },\n ],\n };\n}\n\n/**\n * Activate one in-memory extension module for package tests.\n *\n * This uses pm's real registration validation and activation engine while\n * avoiding private loader imports, filesystem manifests, or workspace setup.\n */\nexport async function activateExtensionForTest(\n module: unknown,\n options: ActivateExtensionForTestOptions = {},\n): Promise<ExtensionActivationResult> {\n const manifest = readTestExtensionManifest(module);\n return activateExtensions(\n buildSingleExtensionLoadResult(module, manifest, {\n name: resolveTestExtensionName(manifest, options.name),\n layer: options.layer ?? \"project\",\n capabilities: readTestExtensionCapabilities(manifest, options),\n policy: options.policy ?? createDefaultExtensionGovernancePolicy(),\n }),\n );\n}\n\n/**\n * Deactivate one in-memory extension module for package tests — the teardown\n * counterpart to {@link activateExtensionForTest}.\n *\n * Runs pm's real `deactivateExtensions` engine (including its bounded per-hook\n * timeout and best-effort failure capture) over a single synthetic load entry,\n * so authors can prove an extension's `deactivate` releases the resources its\n * `activate` opened — without importing private loader internals or staging a\n * workspace. Resolve `name`/`layer` the same way {@link activateExtensionForTest}\n * does so a forwarded `activation` result skips a failed extension correctly.\n */\nexport async function deactivateExtensionForTest(\n module: unknown,\n options: DeactivateExtensionForTestOptions = {},\n): Promise<ExtensionDeactivationResult> {\n const manifest = readTestExtensionManifest(module);\n return deactivateExtensions(\n buildSingleExtensionLoadResult(module, manifest, {\n name: resolveTestExtensionName(manifest, options.name),\n layer: options.layer ?? \"project\",\n capabilities: readTestExtensionCapabilities(manifest, {}),\n policy: createDefaultExtensionGovernancePolicy(),\n }),\n options.activation,\n options.deactivateTimeoutMs === undefined ? {} : { deactivate_timeout_ms: options.deactivateTimeoutMs },\n );\n}\n\n/**\n * Invoke a registered extension command handler and return its real\n * {@link CommandHandlerResult} so package tests can assert on behavior — not\n * just that the command was registered.\n *\n * This is the \"invoke\" verb that completes the package-author testing loop:\n * `activateExtensionForTest` → `assertRegisteredCommandContract` → **run** →\n * `deactivateExtensionForTest`. It runs pm's real handler-dispatch engine\n * (`runCommandHandler`) over `activation.commands`, building the\n * `CommandHandlerContext` with agent-safe global defaults\n * (`{ json: true, quiet: true, noPager: true }`) that callers may override.\n *\n * Because `registerImporter`/`registerExporter` register their handlers under\n * the `\"<name> import\"` / `\"<name> export\"` command paths, this same helper\n * exercises importer and exporter handlers too.\n *\n * Throws a descriptive error (listing the available handler command paths) when\n * no handler is registered for `command`, since that is a wiring/typo bug in the\n * test rather than a behavior under test. When a handler is found, the result is\n * returned verbatim: a clean run yields `{ handled: true, result, warnings: [] }`,\n * while a handler that throws a non-exit error yields\n * `{ handled: false, warnings: [code], errorMessage }` so the failure can be\n * asserted. A handler that throws an error carrying a numeric `exitCode`\n * propagates the throw, matching runtime semantics.\n */\nexport async function runRegisteredCommandForTest(\n commands: ExtensionCommandRegistry,\n options: RunRegisteredCommandForTestOptions,\n): Promise<CommandHandlerResult> {\n const command = normalizeSdkCommandName(options.command);\n if (command.length === 0) {\n throw new Error(\"Expected command name must be a non-empty string\");\n }\n const hasHandler = commands.handlers.some((entry) => entry.command === command);\n if (!hasHandler) {\n const available = sortedUnique(commands.handlers.map((entry) => entry.command));\n throw new Error(\n `Expected a registered command handler for \"${command}\" to invoke. Available command handlers: ${formatAvailable(\n available,\n )}`,\n );\n }\n return runCommandHandler(commands, {\n command,\n args: options.args ? [...options.args] : [],\n options: options.options ? { ...options.options } : {},\n global: { json: true, quiet: true, noPager: true, ...options.global },\n pm_root: options.pmRoot ?? \"\",\n });\n}\n\n/**\n * Fire every registered lifecycle hook of a given `kind` through pm's real hook\n * runner and return the warnings array so package tests can assert on behavior —\n * not just that a hook was registered.\n *\n * This is the hook counterpart to {@link runRegisteredCommandForTest}, extending\n * the package-author \"invoke\" verb to the `api.hooks.*` surface. Pass the\n * `ExtensionHookRegistry` from `activateExtensionForTest(...).hooks` together with\n * the lifecycle `kind` and a synthetic context. Hooks observe their inputs via a\n * cloned context snapshot (mutations never leak back to the caller), so the\n * observable signal is twofold: any side effects the hook performs, and the\n * returned warnings. A clean run returns `[]`; a hook that throws contributes one\n * `extension_hook_failed:<layer>:<name>:<hookName>` warning, mirroring runtime\n * dispatch which isolates a failing hook without aborting the others.\n *\n * Throws a descriptive error (listing the hook kinds that do have registrations)\n * when no hook of `kind` is registered, since firing a hook the extension never\n * registered is a wiring/typo bug in the test rather than a behavior under test.\n */\nexport async function runRegisteredHookForTest(\n hooks: ExtensionHookRegistry,\n options: RunRegisteredHookForTestOptions,\n): Promise<string[]> {\n if (hooks[HOOK_KIND_TO_REGISTRY_FIELD[options.kind]].length === 0) {\n const populatedKinds = sortedUnique(\n (Object.keys(HOOK_KIND_TO_REGISTRY_FIELD) as RegisteredHookKind[]).filter(\n (kind) => hooks[HOOK_KIND_TO_REGISTRY_FIELD[kind]].length > 0,\n ),\n );\n throw new Error(\n `Expected a registered \"${options.kind}\" hook to invoke. Hook kinds with registrations: ${formatAvailable(\n populatedKinds,\n )}`,\n );\n }\n switch (options.kind) {\n case \"before_command\":\n return runBeforeCommandHooks(hooks, options.context);\n case \"after_command\":\n return runAfterCommandHooks(hooks, options.context);\n case \"on_read\":\n return runOnReadHooks(hooks, options.context);\n case \"on_write\":\n return runOnWriteHooks(hooks, options.context);\n case \"on_index\":\n return runOnIndexHooks(hooks, options.context);\n }\n}\n\n/**\n * Invoke a registered parser override through pm's real runner and return the\n * resolved {@link ParserOverrideResult}, so package tests can assert the rewritten\n * args/options/global an override produces for a command before dispatch.\n *\n * Guards that a parser override is registered for the (normalized) target command\n * before delegating: without a match `runParserOverride` would silently return\n * `overridden: false`, hiding a typo'd command name in the test. When a match\n * exists the result is returned verbatim — `overridden: true` with the rewritten\n * context on success, or `overridden: false` with an\n * `extension_parser_override_failed:*` warning when the override throws.\n */\nexport async function runRegisteredParserOverrideForTest(\n parsers: ExtensionParserRegistry,\n context: ParserOverrideContext,\n): Promise<ParserOverrideResult> {\n const command = normalizeSdkCommandName(context.command);\n if (!parsers.overrides.some((entry) => entry.command === command)) {\n throw new Error(\n `Expected a registered parser override for command \"${command}\" to invoke. Available parser override commands: ${formatAvailable(\n sortedUnique(parsers.overrides.map((entry) => entry.command)),\n )}`,\n );\n }\n return runParserOverride(parsers, context);\n}\n\n/**\n * Invoke the active preflight override through pm's real runner and return the\n * resolved {@link PreflightOverrideResult}, so package tests can assert the\n * migration/format gate decision an override yields.\n *\n * Unlike command-scoped overrides, the runtime applies the **last** registered\n * preflight override regardless of command, so this helper guards only that at\n * least one preflight override is registered before delegating. The result is\n * returned verbatim — `overridden: true` with the adjusted decision on success,\n * or `overridden: false` with an `extension_preflight_override_failed:*` warning\n * when the override throws.\n */\nexport async function runRegisteredPreflightOverrideForTest(\n preflight: ExtensionPreflightRegistry,\n context: PreflightOverrideContext,\n): Promise<PreflightOverrideResult> {\n if (preflight.overrides.length === 0) {\n throw new Error(\n \"Expected a registered preflight override to invoke, but none are registered.\",\n );\n }\n return runPreflightOverride(preflight, context);\n}\n\n/**\n * Invoke a registered command-result override through pm's real runner and return\n * the resolved {@link CommandOverrideResult}, so package tests can assert how an\n * override transforms a command's result payload.\n *\n * Accepts the same `ExtensionCommandRegistry` exposed as\n * `activateExtensionForTest(...).commands` (it carries both handlers and\n * overrides). Guards that an override is registered for the (normalized) target\n * command before delegating, so a typo'd command name surfaces as a clear error\n * rather than a silent `overridden: false`. The result is returned verbatim —\n * including the `extension_command_override_async_unsupported:*` warning the\n * runtime emits when an override returns a Promise (command overrides are\n * synchronous), or an `extension_command_override_failed:*` warning on throw.\n */\nexport async function runRegisteredCommandOverrideForTest(\n commands: ExtensionCommandRegistry,\n context: CommandOverrideContext,\n): Promise<CommandOverrideResult> {\n const command = normalizeSdkCommandName(context.command);\n if (!commands.overrides.some((entry) => entry.command === command)) {\n throw new Error(\n `Expected a registered command override for command \"${command}\" to invoke. Available command override commands: ${formatAvailable(\n sortedUnique(commands.overrides.map((entry) => entry.command)),\n )}`,\n );\n }\n return runCommandOverride(commands, context);\n}\n\n/**\n * Invoke a registered renderer override through pm's real runner and return the\n * resolved {@link RendererOverrideResult}, so package tests can assert the custom\n * string an override renders for a given output `format`.\n *\n * Guards that a renderer override is registered for `context.format` before\n * delegating, so a wrong format surfaces as a clear error rather than a silent\n * `overridden: false`. The result is returned verbatim — `overridden: true` with\n * the rendered string on success, or `overridden: false` (with an\n * `extension_renderer_invalid_result:*` / `extension_renderer_failed:*` warning\n * where applicable) when the override returns a non-string or throws.\n */\nexport async function runRegisteredRendererOverrideForTest(\n renderers: ExtensionRendererRegistry,\n context: RendererOverrideContext,\n): Promise<RendererOverrideResult> {\n if (!renderers.overrides.some((entry) => entry.format === context.format)) {\n throw new Error(\n `Expected a registered renderer override for format \"${context.format}\" to invoke. Available renderer override formats: ${formatAvailable(\n sortedUnique(renderers.overrides.map((entry) => entry.format)),\n )}`,\n );\n }\n return runRendererOverride(renderers, context);\n}\n\n/**\n * Invoke a registered service override through pm's real runner and return the\n * resolved {@link ServiceOverrideResult}, so package tests can assert how an\n * override handles an internal service payload (e.g. `output_format`).\n *\n * Guards that a service override is registered for `context.service` before\n * delegating, so a wrong service name surfaces as a clear error rather than a\n * silent `handled: false`. The result is returned verbatim — `handled: true` with\n * the override's result when it claims the payload, or `handled: false` with the\n * original payload (and any `extension_service_override_*` warnings) otherwise.\n */\nexport async function runRegisteredServiceOverrideForTest(\n services: ExtensionServiceRegistry,\n context: ServiceOverrideContext,\n): Promise<ServiceOverrideResult> {\n if (!services.overrides.some((entry) => entry.service === context.service)) {\n throw new Error(\n `Expected a registered service override for service \"${context.service}\" to invoke. Available service override services: ${formatAvailable(\n sortedUnique(services.overrides.map((entry) => entry.service)),\n )}`,\n );\n }\n return runServiceOverride(services, context);\n}\n\n/**\n * Maps each search-provider operation to the runtime-definition keys that may\n * hold its function, in priority order. The host accepts both camelCase and\n * snake_case spellings for the multi-word operations, so this helper mirrors that\n * by trying `embedBatch` before `embed_batch` and `queryExpansion` before\n * `query_expansion`.\n */\nconst SEARCH_PROVIDER_OPERATION_DEFINITION_KEYS: Record<keyof SearchProviderOperationContexts, readonly string[]> = {\n query: [\"query\"],\n embed: [\"embed\"],\n embedBatch: [\"embedBatch\", \"embed_batch\"],\n queryExpansion: [\"queryExpansion\", \"query_expansion\"],\n rerank: [\"rerank\"],\n};\n\n/**\n * Invoke an operation of a registered search provider through the same name\n * resolution the host uses and return the operation's result, so package tests\n * can assert a custom provider's runtime behavior — not just that it registered.\n *\n * This is the search-provider counterpart to {@link runRegisteredCommandForTest},\n * extending the package-author \"invoke\" verb to the `api.registerSearchProvider`\n * surface. Pass the `ExtensionRegistrationRegistry` from\n * `activateExtensionForTest(...).registrations`, the registered provider name, the\n * `operation` to exercise (`query`, `embed`, `embedBatch`, `queryExpansion`, or\n * `rerank`), and a synthetic context. The provider is resolved via\n * {@link resolveRegisteredSearchProvider} (case-insensitive, last registration\n * wins) and the operation is invoked on its `runtime_definition` — the clone that\n * preserves live functions, matching what the runtime dispatches.\n *\n * Throws a descriptive error listing the available providers when the name is not\n * registered, and a separate error when the resolved provider does not implement\n * the requested operation, since invoking an absent provider/operation is a\n * wiring bug in the test rather than a behavior under test.\n */\nexport async function runRegisteredSearchProviderForTest<Operation extends keyof SearchProviderOperationContexts>(\n registrations: ExtensionRegistrationRegistry,\n options: {\n provider: string;\n operation: Operation;\n context: SearchProviderOperationContexts[Operation];\n },\n): Promise<SearchProviderOperationResults[Operation]> {\n const registration = resolveRegisteredSearchProvider(registrations, options.provider);\n if (!registration) {\n const available = sortedUnique(registrations.search_providers.map((entry) => entry.definition.name));\n throw new Error(\n `Expected a registered search provider \"${options.provider}\" to invoke. Available search providers: ${formatAvailable(\n available,\n )}`,\n );\n }\n const runtimeDefinition = registration.runtime_definition;\n const operationFn = SEARCH_PROVIDER_OPERATION_DEFINITION_KEYS[options.operation]\n .map((key) => runtimeDefinition[key])\n .find((value) => typeof value === \"function\");\n if (typeof operationFn !== \"function\") {\n throw new Error(\n `Registered search provider \"${options.provider}\" does not implement the \"${options.operation}\" operation.`,\n );\n }\n return (await (operationFn as (context: SearchProviderOperationContexts[Operation]) => unknown)(\n options.context,\n )) as SearchProviderOperationResults[Operation];\n}\n\n/**\n * Invoke an operation of a registered vector store adapter through the same name\n * resolution the host uses and return the operation's result, so package tests\n * can assert a custom adapter's runtime behavior — not just that it registered.\n *\n * This is the vector-store counterpart to {@link runRegisteredSearchProviderForTest}.\n * Pass the `ExtensionRegistrationRegistry` from\n * `activateExtensionForTest(...).registrations`, the registered adapter name, the\n * `operation` to exercise (`query`, `upsert`, or `delete`), and a synthetic\n * context. The adapter is resolved via {@link resolveRegisteredVectorStoreAdapter}\n * (case-insensitive, last registration wins) and the operation is invoked on its\n * `runtime_definition` — the clone that preserves live functions, matching what\n * the runtime dispatches.\n *\n * Throws a descriptive error listing the available adapters when the name is not\n * registered, and a separate error when the resolved adapter does not implement\n * the requested operation.\n */\nexport async function runRegisteredVectorStoreAdapterForTest<\n Operation extends keyof VectorStoreAdapterOperationContexts,\n>(\n registrations: ExtensionRegistrationRegistry,\n options: {\n adapter: string;\n operation: Operation;\n context: VectorStoreAdapterOperationContexts[Operation];\n },\n): Promise<VectorStoreAdapterOperationResults[Operation]> {\n const registration = resolveRegisteredVectorStoreAdapter(registrations, options.adapter);\n if (!registration) {\n const available = sortedUnique(registrations.vector_store_adapters.map((entry) => entry.definition.name));\n throw new Error(\n `Expected a registered vector store adapter \"${options.adapter}\" to invoke. Available vector store adapters: ${formatAvailable(\n available,\n )}`,\n );\n }\n const operationFn = registration.runtime_definition[options.operation];\n if (typeof operationFn !== \"function\") {\n throw new Error(\n `Registered vector store adapter \"${options.adapter}\" does not implement the \"${options.operation}\" operation.`,\n );\n }\n return (await (operationFn as (context: VectorStoreAdapterOperationContexts[Operation]) => unknown)(\n options.context,\n )) as VectorStoreAdapterOperationResults[Operation];\n}\n\n/**\n * Invoke a registered schema migration's `run` function through the same runtime\n * definition the host executes and return its result, so package tests can assert\n * a migration's behavior — not just that it registered.\n *\n * This completes the package-author \"invoke\" verb across every executable\n * registration surface. The migration is resolved by id via\n * {@link assertRegisteredMigration} (which throws a descriptive \"available\n * migrations\" error when absent), then `run` is invoked on its\n * `runtime_definition` with a context mirroring the one\n * `executeRegisteredRuntimeMigrations` builds at runtime: the resolved id,\n * `command: \"migration\"`, the registering extension's layer/name, the supplied\n * `pmRoot`, and the migration's normalized status. Unlike the runtime — which\n * skips already-applied migrations and folds a throw into a warning — this helper\n * always invokes `run` and lets a throw propagate, so authors can assert both the\n * success result and failure via rejection.\n *\n * Throws when the resolved migration declares no `run` function, since invoking a\n * runless migration is a wiring bug in the test rather than a behavior under test.\n */\nexport async function runRegisteredMigrationForTest(\n registrations: ExtensionRegistrationRegistry,\n options: RunRegisteredMigrationForTestOptions,\n): Promise<unknown> {\n const migration = assertRegisteredMigration(registrations, {\n migration: options.migration,\n extensionName: options.extensionName,\n });\n const run = getMigrationRuntimeDefinition(migration).run;\n if (typeof run !== \"function\") {\n throw new Error(`Registered migration \"${options.migration}\" does not implement a run function to invoke.`);\n }\n const declaredStatus = migration.definition.status;\n const context: SchemaMigrationRunContext = {\n id: migration.definition.id as string,\n command: \"migration\",\n layer: migration.layer,\n extension: migration.name,\n pm_root: options.pmRoot ?? \"\",\n status: (typeof declaredStatus === \"string\" ? declaredStatus.trim().toLowerCase() : \"\") || \"pending\",\n };\n return await (run as (context: SchemaMigrationRunContext) => unknown)(context);\n}\n\n/**\n * Invoke a registered extension importer through pm's real handler-dispatch\n * engine and return its {@link CommandHandlerResult}, so package tests can assert\n * an importer's behavior — not just that it registered.\n *\n * This is the importer counterpart to {@link runRegisteredCommandForTest},\n * extending the package-author \"invoke\" verb to the `api.registerImporter`\n * surface. Because `registerImporter(name, fn)` wraps `fn` into a command handler\n * at the `\"<name> import\"` path, invoking it through `runRegisteredCommandForTest`\n * requires the author to know that naming convention and to remember that an\n * importer is reachable as a command at all. This helper closes both gaps: it\n * accepts the registered importer name directly, validates via\n * {@link assertRegisteredImporter} that it is genuinely a registered importer\n * (not merely some command parked at that path), derives the command path, and\n * dispatches through the same engine.\n *\n * The full activation result is required because importer execution spans two\n * sub-registries: `registrations.importers` proves the importer exists, while\n * `commands` holds the wrapped handler. The result is returned verbatim from the\n * command engine: a clean run yields `{ handled: true, result, warnings: [] }`\n * (where `result` is the importer's return value), a non-exit throw yields\n * `{ handled: false, warnings: [code], errorMessage }`, and an error carrying a\n * numeric `exitCode` propagates — matching runtime import semantics.\n *\n * Throws a descriptive \"available importers\" error (via `assertRegisteredImporter`)\n * when no importer matches, since that is a wiring/typo bug in the test rather\n * than a behavior under test.\n */\nexport async function runRegisteredImporterForTest(\n activation: ExtensionActivationResult,\n options: RunRegisteredImporterForTestOptions,\n): Promise<CommandHandlerResult> {\n const importer = assertRegisteredImporter(activation.registrations, {\n importer: options.importer,\n extensionName: options.extensionName,\n });\n return runRegisteredCommandForTest(activation.commands, {\n command: `${importer.importer} import`,\n args: options.args,\n options: options.options,\n global: options.global,\n pmRoot: options.pmRoot,\n });\n}\n\n/**\n * Invoke a registered extension exporter through pm's real handler-dispatch\n * engine and return its {@link CommandHandlerResult}, so package tests can assert\n * an exporter's behavior — not just that it registered.\n *\n * This is the exporter counterpart to {@link runRegisteredImporterForTest} and\n * the final surface in the package-author \"invoke\" verb. Because\n * `registerExporter(name, fn)` wraps `fn` into a command handler at the\n * `\"<name> export\"` path, this helper accepts the registered exporter name\n * directly, validates via {@link assertRegisteredExporter} that it is genuinely a\n * registered exporter, derives the command path, and dispatches through the same\n * engine. See {@link runRegisteredImporterForTest} for the full activation\n * rationale and return semantics (which apply identically here).\n *\n * Throws a descriptive \"available exporters\" error (via `assertRegisteredExporter`)\n * when no exporter matches, since that is a wiring/typo bug in the test rather\n * than a behavior under test.\n */\nexport async function runRegisteredExporterForTest(\n activation: ExtensionActivationResult,\n options: RunRegisteredExporterForTestOptions,\n): Promise<CommandHandlerResult> {\n const exporter = assertRegisteredExporter(activation.registrations, {\n exporter: options.exporter,\n extensionName: options.extensionName,\n });\n return runRegisteredCommandForTest(activation.commands, {\n command: `${exporter.exporter} export`,\n args: options.args,\n options: options.options,\n global: options.global,\n pmRoot: options.pmRoot,\n });\n}\n\n/**\n * Assert that an {@link ExtensionDeactivationResult} reports the expected clean\n * teardown counts, throwing a descriptive error otherwise. Defaults assert the\n * single-extension happy path — exactly one extension deactivated and none\n * failed. Returns the result so assertions can chain.\n */\nexport function assertExtensionDeactivated(\n result: ExtensionDeactivationResult,\n expectation: ExtensionDeactivationExpectation = {},\n): ExtensionDeactivationResult {\n const expectedDeactivated = expectation.deactivated ?? 1;\n if (result.deactivated !== expectedDeactivated) {\n throw new Error(\n `Expected ${expectedDeactivated} extension${expectedDeactivated === 1 ? \"\" : \"s\"} to deactivate cleanly, ` +\n `but ${result.deactivated} did.`,\n );\n }\n const expectedFailed = expectation.failed ?? 0;\n if (result.failed.length !== expectedFailed) {\n const detail = result.failed.map((failure) => `${failure.layer}:${failure.name} (${failure.error})`).join(\", \");\n throw new Error(\n `Expected ${expectedFailed} teardown failure${expectedFailed === 1 ? \"\" : \"s\"}, ` +\n `but observed ${result.failed.length}${detail.length > 0 ? `: ${detail}` : \"\"}.`,\n );\n }\n return result;\n}\n\n/**\n * Assert that a normalized package manifest advertises expected package\n * resources. Pair with `readPmPackageManifest(packageRoot)` in package tests.\n */\nexport function assertPackageManifest(\n manifest: PmPackageManifest,\n expectation: PackageManifestExpectation,\n): PmPackageManifest {\n if (expectation.packageName !== undefined && manifest.package_name !== expectation.packageName) {\n throw new Error(\n `Expected package manifest package_name to be \"${expectation.packageName}\"; received \"${\n manifest.package_name ?? \"(none)\"\n }\"`,\n );\n }\n if (expectation.aliases !== undefined) {\n assertStringSetIncludes(manifest.aliases, expectation.aliases, \"aliases\");\n }\n if (expectation.resources !== undefined) {\n for (const [kind, expectedPaths] of Object.entries(expectation.resources) as Array<\n [PmPackageResourceKind, readonly string[]]\n >) {\n assertStringSetIncludes(manifest.resources[kind], expectedPaths, `pm.${kind}`);\n }\n }\n return manifest;\n}\n\n/**\n * Assert that an activated extension registration registry contains a command\n * contract with the expected public metadata.\n */\nexport function assertRegisteredCommandContract(\n registrations: ExtensionRegistrationRegistry,\n expectation: RegisteredCommandContractExpectation,\n): RegisteredCommandContractAssertion {\n const expectedCommand = normalizeSdkCommandName(expectation.command);\n if (expectedCommand.length === 0) {\n throw new Error(\"Expected command name must be a non-empty string\");\n }\n\n const commandCandidates = registrations.commands.filter((entry) => entry.command === expectedCommand);\n const command = expectation.extensionName\n ? commandCandidates.find((entry) => entry.name === expectation.extensionName)\n : commandCandidates[0];\n if (!command) {\n const available = registrations.commands.map((entry) => entry.command).sort((left, right) => left.localeCompare(right));\n const extensionSuffix = expectation.extensionName ? ` from extension \"${expectation.extensionName}\"` : \"\";\n throw new Error(\n `Expected extension command \"${expectedCommand}\"${extensionSuffix} to be registered. Available commands: ${formatAvailable(\n available,\n )}`,\n );\n }\n\n if (expectation.action !== undefined && command.action !== expectation.action) {\n throw new Error(\n `Expected extension command \"${expectedCommand}\" action \"${expectation.action}\", received \"${command.action}\"`,\n );\n }\n\n if (expectation.arguments !== undefined) {\n const actualArguments = (command.arguments ?? []).map((argument) => argument.name);\n const missingArguments = expectation.arguments.filter((argument) => !actualArguments.includes(argument));\n if (missingArguments.length > 0) {\n throw new Error(\n `Expected extension command \"${expectedCommand}\" arguments ${formatAvailable(\n expectation.arguments,\n )}; missing ${formatAvailable(missingArguments)}; available ${formatAvailable(actualArguments)}`,\n );\n }\n }\n\n const flags = registrations.flags\n .filter(\n (entry) =>\n entry.target_command === expectedCommand &&\n (expectation.extensionName === undefined || entry.name === expectation.extensionName),\n )\n .flatMap((entry) => entry.flags);\n\n if (expectation.flags !== undefined) {\n const actualFlagLabels = collectFlagLabels(flags);\n const missingFlags = expectation.flags.filter((flag) => !actualFlagLabels.has(flag));\n if (missingFlags.length > 0) {\n throw new Error(\n `Expected extension command \"${expectedCommand}\" flags ${formatAvailable(expectation.flags)}; missing ${formatAvailable(\n missingFlags,\n )}; available ${formatAvailable([...actualFlagLabels].sort((left, right) => left.localeCompare(right)))}`,\n );\n }\n }\n\n return { command, flags };\n}\n\n/**\n * Assert that an activated extension registration registry contains flags\n * injected into an existing command through `api.registerFlags(...)`.\n */\nexport function assertRegisteredFlags(\n registrations: ExtensionRegistrationRegistry,\n expectation: RegisteredFlagsExpectation,\n): RegisteredExtensionFlagDefinitions {\n const expectedCommand = normalizeSdkCommandName(expectation.targetCommand);\n if (expectedCommand.length === 0) {\n throw new Error(\"Expected target command name must be a non-empty string\");\n }\n\n const candidates = registrations.flags.filter((entry) => entry.target_command === expectedCommand);\n let registration: RegisteredExtensionFlagDefinitions | undefined;\n if (expectation.extensionName) {\n registration = candidates.find((entry) => entry.name === expectation.extensionName);\n } else if (candidates.length === 1) {\n registration = candidates[0];\n } else if (candidates.length > 1) {\n const availableExtensions = sortedUnique(candidates.map((entry) => entry.name));\n throw new Error(\n `Expected flags for target command \"${expectedCommand}\" matched multiple extensions: ${formatAvailable(\n availableExtensions,\n )}. Specify extensionName to choose one registration.`,\n );\n }\n if (!registration) {\n const available = sortedUnique(registrations.flags.map((entry) => entry.target_command));\n const availableExtensions = sortedUnique(candidates.map((entry) => entry.name));\n throw new Error(\n `Expected flags for target command \"${expectedCommand}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available flag target commands: ${formatAvailable(available)}; matching extensions: ${formatAvailable(\n availableExtensions,\n )}`,\n );\n }\n\n if (expectation.flags !== undefined) {\n const actualFlagLabels = collectFlagLabels(registration.flags);\n const missingFlags = expectation.flags.filter((flag) => !actualFlagLabels.has(flag));\n if (missingFlags.length > 0) {\n throw new Error(\n `Expected flags for target command \"${expectedCommand}\" to include ${formatAvailable(\n expectation.flags,\n )}; missing ${formatAvailable(missingFlags)}; available ${formatAvailable(\n [...actualFlagLabels].sort((left, right) => left.localeCompare(right)),\n )}`,\n );\n }\n }\n\n return registration;\n}\n\n/**\n * Assert that an activated extension hook registry contains a hook of the\n * expected lifecycle kind (optionally scoped to a specific extension).\n *\n * Hooks are surfaced via `ExtensionActivationResult.hooks`, not the command\n * registration registry, so this helper accepts an `ExtensionHookRegistry`.\n */\nexport function assertRegisteredHook<TKind extends RegisteredHookKind>(\n hooks: ExtensionHookRegistry,\n expectation: RegisteredHookExpectation & { kind: TKind },\n): ExtensionHookRegistry[(typeof HOOK_KIND_TO_REGISTRY_FIELD)[TKind]][number] {\n const field = HOOK_KIND_TO_REGISTRY_FIELD[expectation.kind];\n const candidates = hooks[field] as ReadonlyArray<RegisteredExtensionHook<unknown>>;\n const hook = expectation.extensionName\n ? candidates.find((entry) => entry.name === expectation.extensionName)\n : candidates[0];\n if (!hook) {\n const available = sortedUnique(candidates.map((entry) => entry.name));\n throw new Error(\n `Expected a \"${expectation.kind}\" hook${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available \"${expectation.kind}\" hooks: ${formatAvailable(available)}`,\n );\n }\n\n return hook as ExtensionHookRegistry[(typeof HOOK_KIND_TO_REGISTRY_FIELD)[TKind]][number];\n}\n\n/**\n * Assert that an activated extension registration registry contains a search\n * provider with the expected name (optionally scoped to a specific extension).\n */\nexport function assertRegisteredSearchProvider(\n registrations: ExtensionRegistrationRegistry,\n expectation: RegisteredSearchProviderExpectation,\n): RegisteredExtensionSearchProvider {\n const expectedProvider = normalizeSdkIdentifier(expectation.provider);\n if (expectedProvider.length === 0) {\n throw new Error(\"Expected search provider name must be a non-empty string\");\n }\n\n const candidates = registrations.search_providers.filter(\n (entry) => normalizeSdkIdentifier(entry.definition.name) === expectedProvider,\n );\n const provider = expectation.extensionName\n ? candidates.find((entry) => entry.name === expectation.extensionName)\n : candidates[0];\n if (!provider) {\n const available = sortedUnique(registrations.search_providers.map((entry) => entry.definition.name));\n throw new Error(\n `Expected search provider \"${expectedProvider}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available search providers: ${formatAvailable(available)}`,\n );\n }\n\n return provider;\n}\n\n/**\n * Assert that an activated extension registration registry contains a vector\n * store adapter with the expected name (optionally scoped to a specific\n * extension).\n */\nexport function assertRegisteredVectorStoreAdapter(\n registrations: ExtensionRegistrationRegistry,\n expectation: RegisteredVectorStoreAdapterExpectation,\n): RegisteredExtensionVectorStoreAdapter {\n const expectedAdapter = normalizeSdkIdentifier(expectation.adapter);\n if (expectedAdapter.length === 0) {\n throw new Error(\"Expected vector store adapter name must be a non-empty string\");\n }\n\n const candidates = registrations.vector_store_adapters.filter(\n (entry) => normalizeSdkIdentifier(entry.definition.name) === expectedAdapter,\n );\n const adapter = expectation.extensionName\n ? candidates.find((entry) => entry.name === expectation.extensionName)\n : candidates[0];\n if (!adapter) {\n const available = sortedUnique(registrations.vector_store_adapters.map((entry) => entry.definition.name));\n throw new Error(\n `Expected vector store adapter \"${expectedAdapter}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available vector store adapters: ${formatAvailable(available)}`,\n );\n }\n\n return adapter;\n}\n\n/**\n * Assert that an activated extension registration registry contains an importer\n * for the expected format/name (optionally scoped to a specific extension).\n */\nexport function assertRegisteredImporter(\n registrations: ExtensionRegistrationRegistry,\n expectation: RegisteredImporterExpectation,\n): RegisteredExtensionImporter {\n const expectedImporter = normalizeSdkIdentifier(expectation.importer);\n if (expectedImporter.length === 0) {\n throw new Error(\"Expected importer name must be a non-empty string\");\n }\n\n const candidates = registrations.importers.filter(\n (entry) => normalizeSdkIdentifier(entry.importer) === expectedImporter,\n );\n const importer = expectation.extensionName\n ? candidates.find((entry) => entry.name === expectation.extensionName)\n : candidates[0];\n if (!importer) {\n const available = sortedUnique(registrations.importers.map((entry) => entry.importer));\n throw new Error(\n `Expected importer \"${expectedImporter}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available importers: ${formatAvailable(available)}`,\n );\n }\n\n return importer;\n}\n\n/**\n * Assert that an activated extension registration registry contains an exporter\n * for the expected format/name (optionally scoped to a specific extension).\n */\nexport function assertRegisteredExporter(\n registrations: ExtensionRegistrationRegistry,\n expectation: RegisteredExporterExpectation,\n): RegisteredExtensionExporter {\n const expectedExporter = normalizeSdkIdentifier(expectation.exporter);\n if (expectedExporter.length === 0) {\n throw new Error(\"Expected exporter name must be a non-empty string\");\n }\n\n const candidates = registrations.exporters.filter(\n (entry) => normalizeSdkIdentifier(entry.exporter) === expectedExporter,\n );\n const exporter = expectation.extensionName\n ? candidates.find((entry) => entry.name === expectation.extensionName)\n : candidates[0];\n if (!exporter) {\n const available = sortedUnique(registrations.exporters.map((entry) => entry.exporter));\n throw new Error(\n `Expected exporter \"${expectedExporter}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available exporters: ${formatAvailable(available)}`,\n );\n }\n\n return exporter;\n}\n\n/**\n * Assert that an activated extension registration registry contains a custom\n * item field definition (optionally scoped to a specific extension).\n */\nexport function assertRegisteredItemField(\n registrations: ExtensionRegistrationRegistry,\n expectation: RegisteredItemFieldExpectation,\n): RegisteredItemFieldAssertion {\n const expectedField = normalizeSdkIdentifier(expectation.field);\n if (expectedField.length === 0) {\n throw new Error(\"Expected item field name must be a non-empty string\");\n }\n\n const candidates = registrations.item_fields\n .filter((entry) => expectation.extensionName === undefined || entry.name === expectation.extensionName)\n .map((registration) => ({\n registration,\n field: registration.fields.find((field) => normalizeSdkIdentifier(field.name) === expectedField),\n }))\n .filter((entry): entry is RegisteredItemFieldAssertion => entry.field !== undefined);\n\n const match = candidates.find((entry) => expectation.type === undefined || entry.field.type === expectation.type);\n if (!match) {\n const available = sortedUnique(\n registrations.item_fields.flatMap((entry) => entry.fields.map((field) => `${field.name}:${field.type}`)),\n );\n throw new Error(\n `Expected item field \"${expectedField}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available item fields: ${formatAvailable(available)}`,\n );\n }\n\n return match;\n}\n\n/**\n * Assert that an activated extension registration registry contains a custom\n * item type definition (optionally scoped to a specific extension).\n */\nexport function assertRegisteredItemType(\n registrations: ExtensionRegistrationRegistry,\n expectation: RegisteredItemTypeExpectation,\n): RegisteredItemTypeAssertion {\n const expectedType = normalizeSdkIdentifier(expectation.itemType);\n if (expectedType.length === 0) {\n throw new Error(\"Expected item type name must be a non-empty string\");\n }\n\n const candidates = registrations.item_types\n .filter((entry) => expectation.extensionName === undefined || entry.name === expectation.extensionName)\n .map((registration) => ({\n registration,\n itemType: registration.types.find((itemType) => normalizeSdkIdentifier(itemType.name) === expectedType),\n }))\n .filter((entry): entry is RegisteredItemTypeAssertion => entry.itemType !== undefined);\n\n const match = candidates.find((entry) => expectation.folder === undefined || entry.itemType.folder === expectation.folder);\n if (!match) {\n const available = sortedUnique(\n registrations.item_types.flatMap((entry) => entry.types.map((itemType) => `${itemType.name}:${itemType.folder}`)),\n );\n throw new Error(\n `Expected item type \"${expectedType}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available item types: ${formatAvailable(available)}`,\n );\n }\n\n return match;\n}\n\n/**\n * Assert that an activated extension registration registry contains a project\n * profile registered via `api.registerProfile(profile)` (optionally scoped to a\n * specific extension).\n *\n * This is the test-time counterpart to the declarative `defineProjectProfile`\n * authoring helper and the `pm profile list/show/apply` runtime surface: it\n * proves a package's archetype reached the registry so a downstream consumer can\n * resolve and apply it by name. Like the other declarative-surface assertions\n * (item types, item fields), a profile is verified by presence — it is staged,\n * not executed — so there is no `runRegisteredProfileForTest` counterpart.\n */\nexport function assertRegisteredProfile(\n registrations: ExtensionRegistrationRegistry,\n expectation: RegisteredProfileExpectation,\n): RegisteredProfileAssertion {\n const expectedProfile = normalizeSdkProfileMatchKey(expectation.profile);\n if (expectedProfile.length === 0) {\n throw new Error(\"Expected profile name must be a non-empty string\");\n }\n\n const match = registrations.profiles\n .filter((entry) => expectation.extensionName === undefined || entry.name === expectation.extensionName)\n .find((entry) => normalizeSdkProfileMatchKey(entry.profile.name) === expectedProfile);\n if (!match) {\n const available = sortedUnique(registrations.profiles.map((entry) => entry.profile.name));\n throw new Error(\n `Expected profile \"${expectedProfile}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available profiles: ${formatAvailable(available)}`,\n );\n }\n\n return { registration: match, profile: match.profile };\n}\n\n/**\n * Assert that an activated extension command registry contains a command\n * override registered via `api.registerCommand(command, override)` (optionally\n * scoped to a specific extension).\n *\n * Command overrides are surfaced via `ExtensionActivationResult.commands`, not\n * the command registration registry, so this helper accepts an\n * `ExtensionCommandRegistry`.\n */\nexport function assertRegisteredCommandOverride(\n commands: ExtensionCommandRegistry,\n expectation: RegisteredCommandOverrideExpectation,\n): RegisteredExtensionCommandOverride {\n const expectedCommand = normalizeSdkCommandName(expectation.command);\n if (expectedCommand.length === 0) {\n throw new Error(\"Expected command name must be a non-empty string\");\n }\n\n const candidates = commands.overrides.filter((entry) => entry.command === expectedCommand);\n const override = expectation.extensionName\n ? candidates.find((entry) => entry.name === expectation.extensionName)\n : candidates[0];\n if (!override) {\n const available = sortedUnique(commands.overrides.map((entry) => entry.command));\n throw new Error(\n `Expected command override \"${expectedCommand}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available command overrides: ${formatAvailable(available)}`,\n );\n }\n\n return override;\n}\n\n/**\n * Assert that an activated extension parser registry contains a parser override\n * registered via `api.registerParser(command, override)` (optionally scoped to\n * a specific extension).\n *\n * Parser overrides are surfaced via `ExtensionActivationResult.parsers`, not the\n * command registration registry, so this helper accepts an\n * `ExtensionParserRegistry`.\n */\nexport function assertRegisteredParserOverride(\n parsers: ExtensionParserRegistry,\n expectation: RegisteredParserOverrideExpectation,\n): RegisteredExtensionParserOverride {\n const expectedCommand = normalizeSdkCommandName(expectation.command);\n if (expectedCommand.length === 0) {\n throw new Error(\"Expected command name must be a non-empty string\");\n }\n\n const candidates = parsers.overrides.filter((entry) => entry.command === expectedCommand);\n const override = expectation.extensionName\n ? candidates.find((entry) => entry.name === expectation.extensionName)\n : candidates[0];\n if (!override) {\n const available = sortedUnique(parsers.overrides.map((entry) => entry.command));\n throw new Error(\n `Expected parser override \"${expectedCommand}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available parser overrides: ${formatAvailable(available)}`,\n );\n }\n\n return override;\n}\n\n/**\n * Assert that an activated extension preflight registry contains a preflight\n * override registered via `api.registerPreflight(override)` (optionally scoped\n * to a specific extension).\n *\n * Preflight overrides are global (they run for every command and carry no\n * `command` field), so the expectation only accepts an optional\n * `extensionName`. Preflight overrides are surfaced via\n * `ExtensionActivationResult.preflight`.\n */\nexport function assertRegisteredPreflightOverride(\n preflight: ExtensionPreflightRegistry,\n expectation: RegisteredPreflightOverrideExpectation = {},\n): RegisteredExtensionPreflightOverride {\n const override = expectation.extensionName\n ? preflight.overrides.find((entry) => entry.name === expectation.extensionName)\n : preflight.overrides[0];\n if (!override) {\n const available = sortedUnique(preflight.overrides.map((entry) => entry.name));\n throw new Error(\n `Expected a preflight override${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available preflight overrides: ${formatAvailable(available)}`,\n );\n }\n\n return override;\n}\n\n/**\n * Assert that an activated extension renderer registry contains a renderer\n * override registered via `api.registerRenderer(format, renderer)` for the\n * expected output format (optionally scoped to a specific extension).\n *\n * Renderer overrides are surfaced via `ExtensionActivationResult.renderers`.\n */\nexport function assertRegisteredRendererOverride(\n renderers: ExtensionRendererRegistry,\n expectation: RegisteredRendererOverrideExpectation,\n): RegisteredExtensionRendererOverride {\n const expectedFormat = normalizeSdkIdentifier(expectation.format);\n if (expectedFormat.length === 0) {\n throw new Error(\"Expected renderer format must be a non-empty string\");\n }\n\n const candidates = renderers.overrides.filter((entry) => entry.format === expectedFormat);\n const override = expectation.extensionName\n ? candidates.find((entry) => entry.name === expectation.extensionName)\n : candidates[0];\n if (!override) {\n const available = sortedUnique(renderers.overrides.map((entry) => entry.format));\n throw new Error(\n `Expected renderer override \"${expectedFormat}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available renderer overrides: ${formatAvailable(available)}`,\n );\n }\n\n return override;\n}\n\n/**\n * Assert that an activated extension service registry contains a service override\n * registered via `api.registerService(service, override)` for the expected\n * service name (optionally scoped to a specific extension).\n *\n * Service overrides are surfaced via `ExtensionActivationResult.services`, not the\n * command registration registry, so this helper accepts an\n * `ExtensionServiceRegistry`.\n */\nexport function assertRegisteredServiceOverride(\n services: ExtensionServiceRegistry,\n expectation: RegisteredServiceOverrideExpectation,\n): RegisteredExtensionServiceOverride {\n const expectedService = normalizeSdkIdentifier(expectation.service);\n if (expectedService.length === 0) {\n throw new Error(\"Expected service name must be a non-empty string\");\n }\n\n const candidates = services.overrides.filter((entry) => normalizeSdkIdentifier(entry.service) === expectedService);\n const override = expectation.extensionName\n ? candidates.find((entry) => entry.name === expectation.extensionName)\n : candidates[0];\n if (!override) {\n const available = sortedUnique(services.overrides.map((entry) => entry.service));\n throw new Error(\n `Expected service override \"${expectedService}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available service overrides: ${formatAvailable(available)}`,\n );\n }\n\n return override;\n}\n\n/**\n * Assert that an activated extension registration registry contains a schema\n * migration registered via `api.registerMigration(definition)` with the expected\n * id (optionally scoped to a specific extension and asserting the `mandatory`\n * governance flag, where an unset flag is treated as non-mandatory).\n *\n * Migrations are surfaced via `ExtensionActivationResult.registrations.migrations`.\n */\nexport function assertRegisteredMigration(\n registrations: ExtensionRegistrationRegistry,\n expectation: RegisteredMigrationExpectation,\n): RegisteredExtensionSchemaMigrationDefinition {\n const expectedMigration = normalizeSdkIdentifier(expectation.migration);\n if (expectedMigration.length === 0) {\n throw new Error(\"Expected migration id must be a non-empty string\");\n }\n\n const candidates = registrations.migrations.filter(\n (entry) =>\n (expectation.extensionName === undefined || entry.name === expectation.extensionName) &&\n typeof entry.definition.id === \"string\" &&\n normalizeSdkIdentifier(entry.definition.id) === expectedMigration,\n );\n const match = candidates.find(\n (entry) => expectation.mandatory === undefined || (entry.definition.mandatory ?? false) === expectation.mandatory,\n );\n if (match) {\n return match;\n }\n\n // The id (and any extension scope) matched but the `mandatory` flag did not:\n // report the mismatch directly rather than the misleading \"not registered\"\n // listing. Reaching here with a candidate implies `expectation.mandatory` was\n // set, since an unset flag matches any candidate above.\n const idMatch = candidates[0];\n if (idMatch !== undefined) {\n throw new Error(\n `Expected migration \"${expectedMigration}\"${extensionNameSuffix(expectation.extensionName)} to have ` +\n `mandatory=${expectation.mandatory}, but it is mandatory=${idMatch.definition.mandatory ?? false}.`,\n );\n }\n\n const available = sortedUnique(\n registrations.migrations.map((entry) => {\n const id =\n typeof entry.definition.id === \"string\" && entry.definition.id.trim().length > 0\n ? entry.definition.id.trim()\n : \"(unnamed)\";\n return `${id}:${entry.definition.mandatory === true}`;\n }),\n );\n throw new Error(\n `Expected migration \"${expectedMigration}\"${extensionNameSuffix(\n expectation.extensionName,\n )} to be registered. Available migrations: ${formatAvailable(available)}`,\n );\n}\n\n/**\n * Assert that an activated extension declares no capability it never uses\n * (least privilege). Pass the same capabilities as `manifest.capabilities` via\n * `expectation.declared`; the helper computes what the extension actually\n * registered against and throws when any declared capability is unused.\n *\n * This is the package-test counterpart of the advisory\n * `extension_capability_unused` warning `pm package doctor` emits, letting an\n * author catch an over-broad manifest at `npm test` time. Returns the\n * declared/used/unused breakdown for further assertions.\n */\nexport function assertExtensionCapabilityUsage(\n activation: ExtensionActivationResult,\n expectation: ExtensionCapabilityUsageExpectation,\n): ExtensionCapabilityUsageAssertion {\n const toKnownCapabilitySet = (capabilities: readonly string[], field: string): Set<ExtensionCapability> => {\n const known = new Set<ExtensionCapability>();\n for (const capability of capabilities) {\n const normalized = normalizeKnownExtensionCapability(capability);\n if (normalized === null) {\n throw new Error(\n `Expected ${field} capability \"${capability}\" to be a known extension capability. ` +\n \"Use canonical capability names (see manifest.capabilities).\",\n );\n }\n known.add(normalized);\n }\n return known;\n };\n const declared = [...toKnownCapabilitySet(expectation.declared, \"declared\")].sort((left, right) =>\n left.localeCompare(right),\n );\n const allowUnused = toKnownCapabilitySet(expectation.allowUnused ?? [], \"allowUnused\");\n const used = collectUsedExtensionCapabilities(activation, { extensionName: expectation.extensionName });\n const usedSet = new Set(used);\n const unused = declared.filter((capability) => !usedSet.has(capability) && !allowUnused.has(capability));\n if (unused.length > 0) {\n const scopeSuffix = extensionNameSuffix(expectation.extensionName);\n throw new Error(\n `Expected every declared capability${scopeSuffix} to be exercised, but [${unused.join(\n \", \",\n )}] ${unused.length === 1 ? \"is\" : \"are\"} declared yet never registered against. ` +\n `Remove ${unused.length === 1 ? \"it\" : \"them\"} from manifest.capabilities for least privilege, ` +\n \"or pass allowUnused for capabilities registered only behind a runtime flag.\",\n );\n }\n return { declared, used, unused };\n}\n\n/**\n * Preflight a declarative {@link ExtensionBlueprint} in a test, throwing if it has\n * any `error`-severity issue (today: capability the blueprint exercises but the\n * declared set omits, which would fail activation with `extension_capability_missing`).\n *\n * The throwing counterpart to {@link lintExtensionBlueprint} and the `assert*`\n * family member for declarative authoring: drop `assertExtensionBlueprint(blueprint)`\n * into a package's `node:test`/Vitest suite to fail CI before the blueprint is\n * ever activated. The full {@link ExtensionBlueprintLintResult} is returned on\n * success so a test can still inspect advisory warnings (unused capability,\n * duplicate command, empty surface) without failing on them.\n */\nexport function assertExtensionBlueprint(\n blueprint: ExtensionBlueprint,\n options: LintExtensionBlueprintOptions = {},\n): ExtensionBlueprintLintResult {\n const result = lintExtensionBlueprint(blueprint, options);\n if (!result.ok) {\n const errors = result.findings.filter((finding) => finding.severity === \"error\");\n throw new Error(\n `Extension blueprint failed preflight with ${errors.length} ${errors.length === 1 ? \"error\" : \"errors\"}:\\n` +\n errors.map((finding) => ` - [${finding.code}] ${finding.message}`).join(\"\\n\"),\n );\n }\n return result;\n}\n\n/** Options for {@link assertProjectProfile}. */\nexport interface AssertProjectProfileOptions {\n /**\n * Also throw when the profile produces `warning`-severity findings (e.g. a\n * workflow transition referencing a status no profile or built-in defines).\n * Off by default so warnings stay advisory; turn on for strict CI gates.\n */\n strict?: boolean;\n}\n\n/**\n * Assert a {@link ProjectProfileDefinition} is internally consistent in a test,\n * throwing on any `error`-severity finding (and on `warning`-severity findings\n * too when `strict` is set). The author-time counterpart to `defineProjectProfile`\n * and the project-profile analogue of {@link assertExtensionBlueprint}: drop\n * `assertProjectProfile(myProfile)` into a package's `node:test`/Vitest suite to\n * fail CI before the profile is ever registered via `api.registerProfile` or\n * applied via `pm profile apply`. The full {@link ProjectProfileLintReport} is\n * returned on success so a test can still inspect advisory warnings without\n * failing on them.\n */\nexport function assertProjectProfile(\n profile: ProjectProfileDefinition,\n options: AssertProjectProfileOptions = {},\n): ProjectProfileLintReport {\n const report = lintProjectProfile(profile);\n const blocking = report.findings.filter(\n (finding) => finding.severity === \"error\" || (options.strict === true && finding.severity === \"warning\"),\n );\n if (blocking.length > 0) {\n throw new Error(\n `Project profile \"${report.profile}\" failed lint with ${blocking.length} ${blocking.length === 1 ? \"issue\" : \"issues\"}:\\n` +\n blocking.map((finding) => ` - ${finding.severity} [${finding.code}] ${finding.message}`).join(\"\\n\"),\n );\n }\n return report;\n}\n\n/**\n * The structured result of {@link assertExtensionManifestMatchesBlueprint}: the\n * reconciliation between a manifest's declared capabilities and the set the\n * blueprint actually exercises. Returned only when they match exactly (the\n * assertion throws otherwise).\n */\nexport interface ExtensionManifestBlueprintMatch {\n /** The least-privilege capability set the blueprint exercises (from `deriveExtensionCapabilities`). */\n used: ExtensionCapability[];\n /** The manifest's declared capabilities, legacy-alias resolved and normalized. */\n declared: ExtensionCapability[];\n /** Capabilities the blueprint uses but the manifest omits — would crash activation. Empty on success. */\n missing: ExtensionCapability[];\n /** Capabilities the manifest declares but no surface exercises — violates least privilege. Empty on success. */\n unused: ExtensionCapability[];\n /** Every lint finding for the blueprint, so callers can inspect advisory warnings. */\n findings: ExtensionBlueprintLintFinding[];\n}\n\n/**\n * Strictly assert a manifest's `capabilities` equal the least-privilege set a\n * declarative {@link ExtensionBlueprint} exercises, throwing on any drift in\n * either direction.\n *\n * This is the strict bookend to the lenient {@link assertExtensionBlueprint}:\n * where that helper fails only on an *undeclared* capability (the `error`-severity\n * `extension_capability_missing` activation crash) and merely *warns* on an unused\n * one, this assertion fails on **both** — an undeclared capability (`missing`) and\n * a declared-but-unused one (`unused`) — so a hand-maintained `manifest.json` stays\n * exactly the set the blueprint requires. Drop it into a package's\n * `node:test`/Vitest suite to guard against capability drift in CI, the natural\n * companion to {@link ../sdk/compose.js#synthesizeExtensionManifest} (assert what\n * you would otherwise generate). Only `capabilities` are reconciled because that is\n * the one manifest field a blueprint determines.\n *\n * The reconciliation is returned on success so a test can still inspect advisory\n * warnings (duplicate command, empty surface) without failing on them.\n */\nexport function assertExtensionManifestMatchesBlueprint(\n manifest: Pick<ExtensionManifest, \"capabilities\">,\n blueprint: ExtensionBlueprint,\n): ExtensionManifestBlueprintMatch {\n // Coerce a malformed/absent capabilities field to an explicit empty declared set\n // so an untyped `.js` caller gets a deterministic `missing` list rather than the\n // lint silently falling back to the blueprint's in-module manifest mirror.\n const declaredCapabilities = Array.isArray(manifest.capabilities) ? manifest.capabilities : [];\n const result = lintExtensionBlueprint(blueprint, { declaredCapabilities });\n // `declared` is guaranteed non-null here: we always hand lint an array, so it\n // never takes its \"no declared set\" branch. The cast drops the unreachable null.\n const declared = result.declared as ExtensionCapability[];\n const declaredSet = new Set(declared);\n const usedSet = new Set(result.used);\n const missing = result.used.filter((capability) => !declaredSet.has(capability));\n const unused = declared.filter((capability) => !usedSet.has(capability));\n if (missing.length > 0 || unused.length > 0) {\n const parts: string[] = [];\n if (missing.length > 0) {\n parts.push(`missing [${missing.join(\", \")}] (the blueprint registers ${missing.length === 1 ? \"a surface\" : \"surfaces\"} requiring ${missing.length === 1 ? \"it\" : \"them\"}; activation throws extension_capability_missing)`);\n }\n if (unused.length > 0) {\n parts.push(`unused [${unused.join(\", \")}] (declared but no surface exercises ${unused.length === 1 ? \"it\" : \"them\"}; drop for least privilege)`);\n }\n throw new Error(\n `Manifest capabilities do not match the blueprint: ${parts.join(\"; \")}. ` +\n \"Set capabilities to synthesizeExtensionManifest(blueprint, identity).capabilities to stay in sync.\",\n );\n }\n return { used: result.used, declared, missing, unused, findings: result.findings };\n}\n\n/**\n * Assert an extension manifest's declared version bounds permit it to load on a\n * target pm CLI version, throwing when a bound blocks the load.\n *\n * This is the throwing CI/test counterpart to\n * {@link ../sdk/compose.js#checkExtensionManifestCompatibility}: it runs the same\n * author-time version-bound analysis and fails on any blocking incompatibility — a\n * malformed bound (`*_invalid`), a `pm_min_version` the target is below\n * (`pm_min_version_unmet`), or a `block`-mode `pm_max_version` the target exceeds\n * (`pm_max_version_exceeded`). Advisory `warning` findings (`*_unchecked`, or a\n * `warn`-mode `pm_max_version_exceeded_warn`) never throw, because the loader\n * would still load the extension. Pin it to the pm version a package commits to\n * supporting so a too-tight or malformed bound fails the package's own suite, not\n * a user's install. The full compatibility result is returned on success so a test\n * can still inspect advisory warnings.\n */\nexport function assertExtensionManifestCompatible(\n manifest: ExtensionManifestCompatibilityManifest,\n target: ExtensionManifestCompatibilityTarget,\n): ExtensionManifestCompatibilityResult {\n const result = checkExtensionManifestCompatibility(manifest, target);\n const blocking = result.findings.filter((finding) => finding.severity === \"error\");\n if (blocking.length > 0) {\n throw new Error(\n `Extension manifest is not compatible with pm ${result.pmVersion}: ${blocking\n .map((finding) => finding.message)\n .join(\"; \")}`,\n );\n }\n return result;\n}\n\n/**\n * Preflight a declarative {@link ExtensionBlueprint} through every author-time\n * check in one test, throwing if any stage produced an `error`-severity finding.\n *\n * This is the throwing CI/test bookend over\n * {@link ../sdk/compose.js#preflightExtension} — the single guard that replaces\n * chaining {@link assertExtensionBlueprint}, {@link assertExtensionManifestMatchesBlueprint},\n * and {@link assertExtensionManifestCompatible} in a package's\n * `node:test`/Vitest suite. It runs the same consolidated analysis (always lints\n * the blueprint; synthesizes the manifest when `options.identity` is given; checks\n * version bounds when `options.target` is given) and throws one error listing every\n * blocking finding tagged by its `source:code`. Advisory `warning` findings (an\n * unused capability, a duplicate command, an `*_unchecked` bound) never throw,\n * matching the underlying stages. The full {@link ExtensionPreflightReport} is\n * returned on success so a test can still inspect those warnings, the synthesized\n * manifest, and the derived capability set without failing on them.\n */\nexport function assertExtensionPreflight(\n blueprint: ExtensionBlueprint,\n options: PreflightExtensionOptions = {},\n): ExtensionPreflightReport {\n const report = preflightExtension(blueprint, options);\n if (!report.ok) {\n const errors = report.findings.filter((finding) => finding.severity === \"error\");\n throw new Error(\n `Extension failed preflight with ${errors.length} ${errors.length === 1 ? \"error\" : \"errors\"}:\\n` +\n errors.map((finding) => ` - [${finding.source}:${finding.code}] ${finding.message}`).join(\"\\n\"),\n );\n }\n return report;\n}\n\n/**\n * A fluent, single-extension test fixture returned by\n * {@link createExtensionTestHarness}.\n *\n * Every method binds one of the standalone SDK testing helpers to the correct\n * sub-registry of a single {@link ExtensionActivationResult}, so a package author\n * never threads `activation.registrations` vs `activation.commands` vs\n * `activation.hooks` (etc.) by hand — picking the wrong sub-registry is a common\n * footgun that surfaces as a confusing `available: (none)` error. Methods do not\n * use `this`; they close over the activation, so they remain safe to destructure\n * (`const { runCommand, assertCommandContract } = harness;`).\n *\n * The `assert*` methods verify registration wiring (returning the matched\n * registration); the `run*` methods invoke a registered surface through pm's real\n * dispatch engine (returning its runtime result); {@link deactivate} runs the real\n * teardown engine. The raw {@link activation} stays public as an escape hatch to\n * the standalone helpers for any surface not covered by a convenience method.\n */\nexport interface ExtensionTestHarness {\n /** The in-memory extension module supplied to {@link createExtensionTestHarness}. */\n readonly module: unknown;\n /** Resolved extension name (manifest name, explicit override, or `\"test-extension\"`). */\n readonly name: string;\n /** Layer recorded for the in-memory extension (defaults to `\"project\"`). */\n readonly layer: ExtensionLayer;\n /** The underlying activation result; use it to reach standalone helpers directly. */\n readonly activation: ExtensionActivationResult;\n\n /** Bound {@link describeExtensionActivation} over the whole `activation`. */\n activationSummary(options?: DescribeExtensionActivationOptions): ExtensionActivationSummary;\n /**\n * Bound {@link renderExtensionSurfaceMarkdown} over {@link activationSummary},\n * so tests and README generators can produce deterministic surface docs from\n * the same harness they use for assert/run coverage.\n */\n renderMarkdown(options?: RenderExtensionHarnessMarkdownOptions): string;\n\n /** Bound {@link assertRegisteredCommandContract} over `activation.registrations`. */\n assertCommandContract(expectation: RegisteredCommandContractExpectation): RegisteredCommandContractAssertion;\n /** Bound {@link assertRegisteredFlags} over `activation.registrations`. */\n assertFlags(expectation: RegisteredFlagsExpectation): RegisteredExtensionFlagDefinitions;\n /** Bound {@link assertRegisteredItemField} over `activation.registrations`. */\n assertItemField(expectation: RegisteredItemFieldExpectation): RegisteredItemFieldAssertion;\n /** Bound {@link assertRegisteredItemType} over `activation.registrations`. */\n assertItemType(expectation: RegisteredItemTypeExpectation): RegisteredItemTypeAssertion;\n /** Bound {@link assertRegisteredProfile} over `activation.registrations`. */\n assertProfile(expectation: RegisteredProfileExpectation): RegisteredProfileAssertion;\n /** Bound {@link assertRegisteredHook} over `activation.hooks`. */\n assertHook<TKind extends RegisteredHookKind>(\n expectation: RegisteredHookExpectation & { kind: TKind },\n ): ExtensionHookRegistry[(typeof HOOK_KIND_TO_REGISTRY_FIELD)[TKind]][number];\n /** Bound {@link assertRegisteredCommandOverride} over `activation.commands`. */\n assertCommandOverride(expectation: RegisteredCommandOverrideExpectation): RegisteredExtensionCommandOverride;\n /** Bound {@link assertRegisteredParserOverride} over `activation.parsers`. */\n assertParserOverride(expectation: RegisteredParserOverrideExpectation): RegisteredExtensionParserOverride;\n /** Bound {@link assertRegisteredPreflightOverride} over `activation.preflight`. */\n assertPreflightOverride(expectation?: RegisteredPreflightOverrideExpectation): RegisteredExtensionPreflightOverride;\n /** Bound {@link assertRegisteredRendererOverride} over `activation.renderers`. */\n assertRendererOverride(expectation: RegisteredRendererOverrideExpectation): RegisteredExtensionRendererOverride;\n /** Bound {@link assertRegisteredServiceOverride} over `activation.services`. */\n assertServiceOverride(expectation: RegisteredServiceOverrideExpectation): RegisteredExtensionServiceOverride;\n /** Bound {@link assertRegisteredSearchProvider} over `activation.registrations`. */\n assertSearchProvider(expectation: RegisteredSearchProviderExpectation): RegisteredExtensionSearchProvider;\n /** Bound {@link assertRegisteredVectorStoreAdapter} over `activation.registrations`. */\n assertVectorStoreAdapter(expectation: RegisteredVectorStoreAdapterExpectation): RegisteredExtensionVectorStoreAdapter;\n /** Bound {@link assertRegisteredImporter} over `activation.registrations`. */\n assertImporter(expectation: RegisteredImporterExpectation): RegisteredExtensionImporter;\n /** Bound {@link assertRegisteredExporter} over `activation.registrations`. */\n assertExporter(expectation: RegisteredExporterExpectation): RegisteredExtensionExporter;\n /** Bound {@link assertRegisteredMigration} over `activation.registrations`. */\n assertMigration(expectation: RegisteredMigrationExpectation): RegisteredExtensionSchemaMigrationDefinition;\n /** Bound {@link assertExtensionCapabilityUsage} over the whole `activation`. */\n assertCapabilityUsage(expectation: ExtensionCapabilityUsageExpectation): ExtensionCapabilityUsageAssertion;\n\n /** Bound {@link runRegisteredCommandForTest} over `activation.commands`. */\n runCommand(options: RunRegisteredCommandForTestOptions): Promise<CommandHandlerResult>;\n /** Bound {@link runRegisteredHookForTest} over `activation.hooks`. */\n runHook(options: RunRegisteredHookForTestOptions): Promise<string[]>;\n /** Bound {@link runRegisteredCommandOverrideForTest} over `activation.commands`. */\n runCommandOverride(context: CommandOverrideContext): Promise<CommandOverrideResult>;\n /** Bound {@link runRegisteredParserOverrideForTest} over `activation.parsers`. */\n runParserOverride(context: ParserOverrideContext): Promise<ParserOverrideResult>;\n /** Bound {@link runRegisteredPreflightOverrideForTest} over `activation.preflight`. */\n runPreflightOverride(context: PreflightOverrideContext): Promise<PreflightOverrideResult>;\n /** Bound {@link runRegisteredRendererOverrideForTest} over `activation.renderers`. */\n runRendererOverride(context: RendererOverrideContext): Promise<RendererOverrideResult>;\n /** Bound {@link runRegisteredServiceOverrideForTest} over `activation.services`. */\n runServiceOverride(context: ServiceOverrideContext): Promise<ServiceOverrideResult>;\n /** Bound {@link runRegisteredSearchProviderForTest} over `activation.registrations`. */\n runSearchProvider<Operation extends keyof SearchProviderOperationContexts>(options: {\n provider: string;\n operation: Operation;\n context: SearchProviderOperationContexts[Operation];\n }): Promise<SearchProviderOperationResults[Operation]>;\n /** Bound {@link runRegisteredVectorStoreAdapterForTest} over `activation.registrations`. */\n runVectorStoreAdapter<Operation extends keyof VectorStoreAdapterOperationContexts>(options: {\n adapter: string;\n operation: Operation;\n context: VectorStoreAdapterOperationContexts[Operation];\n }): Promise<VectorStoreAdapterOperationResults[Operation]>;\n /** Bound {@link runRegisteredMigrationForTest} over `activation.registrations`. */\n runMigration(options: RunRegisteredMigrationForTestOptions): Promise<unknown>;\n /** Bound {@link runRegisteredImporterForTest} over the whole `activation`. */\n runImporter(options: RunRegisteredImporterForTestOptions): Promise<CommandHandlerResult>;\n /** Bound {@link runRegisteredExporterForTest} over the whole `activation`. */\n runExporter(options: RunRegisteredExporterForTestOptions): Promise<CommandHandlerResult>;\n\n /**\n * Bound {@link deactivateExtensionForTest} — runs the real teardown engine for\n * this harness's module, forwarding its resolved `name`/`layer`/`activation` so\n * the skip-key matches and a never-initialized extension is not deactivated.\n */\n deactivate(options?: { deactivateTimeoutMs?: number }): Promise<ExtensionDeactivationResult>;\n}\n\n/**\n * Activate one in-memory extension module and return a fluent\n * {@link ExtensionTestHarness} that binds every SDK testing helper to the right\n * sub-registry of the resulting activation.\n *\n * This is the ergonomic capstone over the standalone helpers: instead of\n * `activateExtensionForTest(module)` followed by repeatedly threading\n * `activation.registrations` / `activation.commands` / `activation.hooks` into\n * each `assertRegistered*` / `runRegistered*` call, an author writes\n * `const ext = await createExtensionTestHarness(module, { capabilities });` and\n * then `ext.assertCommandContract(...)`, `await ext.runCommand(...)`,\n * `await ext.deactivate()` — never needing to know pm's internal registry layout.\n *\n * `name` and `layer` are resolved exactly as {@link activateExtensionForTest}\n * resolves them, and captured so {@link ExtensionTestHarness.deactivate} forwards\n * a matching skip-key. Activation runs pm's real validation/activation engine, so\n * every bound helper exercises real wiring and dispatch — not mocks.\n *\n * Fails fast: if the module does not activate cleanly (e.g. a registration is\n * dropped because the manifest omits the required capability), this throws a\n * descriptive error listing each failure instead of returning a harness whose\n * registries are empty — which would otherwise surface later as the confusing\n * `available: (none)` assertion error this helper exists to prevent. Tests that\n * deliberately exercise a *failed* activation should call\n * {@link activateExtensionForTest} directly and inspect `activation.failed`.\n */\nexport async function createExtensionTestHarness(\n module: unknown,\n options: ActivateExtensionForTestOptions = {},\n): Promise<ExtensionTestHarness> {\n const manifest = readTestExtensionManifest(module);\n const name = resolveTestExtensionName(manifest, options.name);\n const layer: ExtensionLayer = options.layer ?? \"project\";\n const activation = await activateExtensionForTest(module, options);\n if (activation.failed.length > 0) {\n const detail = activation.failed\n .map((failure) => {\n const missingCapability = failure.trace?.missing_capability;\n const reason = missingCapability ? `${failure.error}; missing capability \"${missingCapability}\"` : failure.error;\n return `${failure.layer}:${failure.name} (${reason})`;\n })\n .join(\", \");\n throw new Error(\n `createExtensionTestHarness could not activate the extension cleanly: ${detail}. ` +\n \"Declare the required capability in the manifest (or pass it via options.capabilities), \" +\n \"or use activateExtensionForTest directly to inspect a failed activation.\",\n );\n }\n return {\n module,\n name,\n layer,\n activation,\n activationSummary(describeOptions) {\n return describeExtensionActivation(activation, describeOptions);\n },\n renderMarkdown(markdownOptions = {}) {\n const { extensionName, ...renderOptions } = markdownOptions ?? {};\n return renderExtensionSurfaceMarkdown(describeExtensionActivation(activation, { extensionName }), renderOptions);\n },\n assertCommandContract(expectation) {\n return assertRegisteredCommandContract(activation.registrations, expectation);\n },\n assertFlags(expectation) {\n return assertRegisteredFlags(activation.registrations, expectation);\n },\n assertItemField(expectation) {\n return assertRegisteredItemField(activation.registrations, expectation);\n },\n assertItemType(expectation) {\n return assertRegisteredItemType(activation.registrations, expectation);\n },\n assertProfile(expectation) {\n return assertRegisteredProfile(activation.registrations, expectation);\n },\n assertHook(expectation) {\n return assertRegisteredHook(activation.hooks, expectation);\n },\n assertCommandOverride(expectation) {\n return assertRegisteredCommandOverride(activation.commands, expectation);\n },\n assertParserOverride(expectation) {\n return assertRegisteredParserOverride(activation.parsers, expectation);\n },\n assertPreflightOverride(expectation) {\n return assertRegisteredPreflightOverride(activation.preflight, expectation);\n },\n assertRendererOverride(expectation) {\n return assertRegisteredRendererOverride(activation.renderers, expectation);\n },\n assertServiceOverride(expectation) {\n return assertRegisteredServiceOverride(activation.services, expectation);\n },\n assertSearchProvider(expectation) {\n return assertRegisteredSearchProvider(activation.registrations, expectation);\n },\n assertVectorStoreAdapter(expectation) {\n return assertRegisteredVectorStoreAdapter(activation.registrations, expectation);\n },\n assertImporter(expectation) {\n return assertRegisteredImporter(activation.registrations, expectation);\n },\n assertExporter(expectation) {\n return assertRegisteredExporter(activation.registrations, expectation);\n },\n assertMigration(expectation) {\n return assertRegisteredMigration(activation.registrations, expectation);\n },\n assertCapabilityUsage(expectation) {\n return assertExtensionCapabilityUsage(activation, expectation);\n },\n runCommand(runOptions) {\n return runRegisteredCommandForTest(activation.commands, runOptions);\n },\n runHook(runOptions) {\n return runRegisteredHookForTest(activation.hooks, runOptions);\n },\n runCommandOverride(context) {\n return runRegisteredCommandOverrideForTest(activation.commands, context);\n },\n runParserOverride(context) {\n return runRegisteredParserOverrideForTest(activation.parsers, context);\n },\n runPreflightOverride(context) {\n return runRegisteredPreflightOverrideForTest(activation.preflight, context);\n },\n runRendererOverride(context) {\n return runRegisteredRendererOverrideForTest(activation.renderers, context);\n },\n runServiceOverride(context) {\n return runRegisteredServiceOverrideForTest(activation.services, context);\n },\n runSearchProvider(runOptions) {\n return runRegisteredSearchProviderForTest(activation.registrations, runOptions);\n },\n runVectorStoreAdapter(runOptions) {\n return runRegisteredVectorStoreAdapterForTest(activation.registrations, runOptions);\n },\n runMigration(runOptions) {\n return runRegisteredMigrationForTest(activation.registrations, runOptions);\n },\n runImporter(runOptions) {\n return runRegisteredImporterForTest(activation, runOptions);\n },\n runExporter(runOptions) {\n return runRegisteredExporterForTest(activation, runOptions);\n },\n deactivate(deactivateOptions = {}) {\n return deactivateExtensionForTest(module, {\n name,\n layer,\n activation,\n deactivateTimeoutMs: deactivateOptions.deactivateTimeoutMs,\n });\n },\n };\n}\n"],"names":[],"mappings":";;AAuEA,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,sCAAsC,EAAE,MAAM,uCAAuC,CAAC;AAC/F,OAAO,EACL,6BAA6B,EAC7B,+BAA+B,EAC/B,mCAAmC,GACpC,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,gCAAgC,EAAE,MAAM,wCAAwC,CAAC;AAC1F,OAAO,EAAE,iCAAiC,EAAE,MAAM,oDAAoD,CAAC;AACvG,OAAO,EACL,mCAAmC,EACnC,0BAA0B,EAC1B,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,2BAA2B,EAAE,MAAM,0CAA0C,CAAC;AAMvF,OAAO,EAAE,kBAAkB,EAAiC,MAAM,iCAAiC,CAAC;AACpG,OAAO,EAAE,8BAA8B,EAAE,MAAM,mDAAmD,CAAC;AAkBnG,4EAA4E;AAC5E,+EAA+E;AAC/E,8EAA8E;AAC9E,0EAA0E;AAC1E,2CAA2C;AAC3C,OAAO,EACL,2BAA2B,EAC3B,8BAA8B,GAC/B,CAAC;AAOF,kFAAkF;AAClF,6EAA6E;AAC7E,mFAAmF;AACnF,oFAAoF;AACpF,8EAA8E;AAC9E,gFAAgF;AAChF,OAAO,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,CAAC;AAmS9D,MAAM,2BAA2B,GAA4D;IAC3F,cAAc,EAAE,eAAe;IAC/B,aAAa,EAAE,cAAc;IAC7B,OAAO,EAAE,QAAQ;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