fix(mcp): resolve named engines using export conditions

BL
3h ago
+188-33

What and why

  • Resolve MCP engine packages using exsolve with ESM import conditions, matching how the modules are loaded.
  • Preserve the existing package lookup order and add regression tests.

Issue

Fixes #1758

Verified

Ran it locally: yes

  • Published e2e@0.23.1: the standalone reproduction confirms the wrong export is selected.
  • Fix branch: pnpm build and pnpm plugins:check passed. MCP regression tests and e2e package tests passed.

Checklist

  • Changeset added (pnpm changeset) for any change to a published package, or the change is testbed, docs, or CI only.
  • Breaking change: title carries !, the changeset body names what breaks and what replaces it, and the deprecation warning landed a window earlier (stability policy in CONTRIBUTING.md).
  • Docs updated in the same PR: the docs/**/*.mdx page for the behavior, and skills/e2e/ if the skill describes it.
  • Contract change: emitted .d.ts reviewed, tests/types/sdk-types.ts updated; wire change edits the schema and both fixtures.
  • Engine contract change (e2e/engine): changesets for e2e, @e2e-dev/web, and @e2e-dev/mobile.