Skip to content

Base App and AppBridge on public core Protocol - #3

Draft
khandrew1 wants to merge 2 commits into
v2-sdk-migrationfrom
codex/v2-core-protocol-events
Draft

Base App and AppBridge on public core Protocol#3
khandrew1 wants to merge 2 commits into
v2-sdk-migrationfrom
codex/v2-core-protocol-events

Conversation

@khandrew1

@khandrew1 khandrew1 commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • make App and AppBridge extend the same role-neutral Protocol through the existing ProtocolWithEvents architecture
  • keep the old lazy event-slot model and avoid EventDispatcher
  • port the v2 schema and type work onto the neutral core/protocol surface
  • keep client and server as optional role-specific peers, so consumers only need the role package they use
  • align all example workspaces to the v2 beta.4 role packages

SDK dependency

Verification

  • npm run build:all
  • TypeScript no-emit check
  • strict TypeDoc validation
  • 296 source/SDK tests passed
  • npm pack --dry-run
  • dependency-surface audit confirms App/AppBridge declarations import core/protocol and no EventDispatcher

Test note

The repository-wide npm test run reached 382 passes and exposed one deterministic pre-existing PDF.js range-transport assertion after a fresh dependency resolution, plus three file-watcher timeouts under concurrent load. The watcher tests pass in isolation. No PDF tests or implementation files are changed here.


Summary by cubic

Bases App and AppBridge on the public @modelcontextprotocol/core/protocol engine with a unified, role-neutral ProtocolWithEvents, removing the old dispatcher while keeping the lazy on*/addEventListener model. Aligns all examples to v2.0.0‑beta.4 and preserves the no‑MCP‑negotiation behavior on the iframe link.

  • Refactors

    • App/AppBridge now extend ProtocolWithEvents (from core Protocol); event fan-out keeps replace semantics and adds double-set protection.
    • Removed EventDispatcher/method-claim registry; internal guard prevents duplicate handler registration.
    • AppBridge depends on a structural AppBridgeClient interface to auto-forward MCP calls; no hard dependency on @modelcontextprotocol/client/@modelcontextprotocol/server.
    • Handshake remains ui/initialize only; no MCP version negotiation on the App↔Bridge channel (tests updated).
    • Introduced src/mcp-types.ts to re-export protocol types; schema generation rebinds to core/protocol types to avoid TS4023; transport and React hook import from core/protocol or mcp-types.
    • Added App.ping(); capability checks moved to Protocol-level asserts.
  • Dependencies

    • Bumped @modelcontextprotocol/client and @modelcontextprotocol/server to 2.0.0-beta.4; pin @modelcontextprotocol/core via https://pkg.pr.new/...; mark client/server as optional peer deps.
    • Updated all example workspaces to beta.4 role packages; build externals include @modelcontextprotocol/core/protocol.
    • Pre-commit now allows public pkg.pr.new URLs and blocks non-public registries in package-lock.json; lockfile regenerated with CI npm to ensure only public URLs.

Written for commit ebfe660. Summary will update on new commits.

Review in cubic

@pkg-pr-new

pkg-pr-new Bot commented Jul 17, 2026

Copy link
Copy Markdown

Open in StackBlitz

@modelcontextprotocol/ext-apps

npm i https://pkg.pr.new/@modelcontextprotocol/ext-apps@3

@modelcontextprotocol/server-basic-preact

npm i https://pkg.pr.new/@modelcontextprotocol/server-basic-preact@3

@modelcontextprotocol/server-basic-react

npm i https://pkg.pr.new/@modelcontextprotocol/server-basic-react@3

@modelcontextprotocol/server-basic-solid

npm i https://pkg.pr.new/@modelcontextprotocol/server-basic-solid@3

@modelcontextprotocol/server-basic-svelte

npm i https://pkg.pr.new/@modelcontextprotocol/server-basic-svelte@3

@modelcontextprotocol/server-basic-vanillajs

npm i https://pkg.pr.new/@modelcontextprotocol/server-basic-vanillajs@3

@modelcontextprotocol/server-basic-vue

npm i https://pkg.pr.new/@modelcontextprotocol/server-basic-vue@3

@modelcontextprotocol/server-budget-allocator

npm i https://pkg.pr.new/@modelcontextprotocol/server-budget-allocator@3

@modelcontextprotocol/server-cohort-heatmap

npm i https://pkg.pr.new/@modelcontextprotocol/server-cohort-heatmap@3

@modelcontextprotocol/server-customer-segmentation

npm i https://pkg.pr.new/@modelcontextprotocol/server-customer-segmentation@3

@modelcontextprotocol/server-debug

npm i https://pkg.pr.new/@modelcontextprotocol/server-debug@3

@modelcontextprotocol/server-lazy-auth

npm i https://pkg.pr.new/@modelcontextprotocol/server-lazy-auth@3

@modelcontextprotocol/server-map

npm i https://pkg.pr.new/@modelcontextprotocol/server-map@3

@modelcontextprotocol/server-pdf

npm i https://pkg.pr.new/@modelcontextprotocol/server-pdf@3

@modelcontextprotocol/server-scenario-modeler

npm i https://pkg.pr.new/@modelcontextprotocol/server-scenario-modeler@3

@modelcontextprotocol/server-shadertoy

npm i https://pkg.pr.new/@modelcontextprotocol/server-shadertoy@3

@modelcontextprotocol/server-sheet-music

npm i https://pkg.pr.new/@modelcontextprotocol/server-sheet-music@3

@modelcontextprotocol/server-system-monitor

npm i https://pkg.pr.new/@modelcontextprotocol/server-system-monitor@3

@modelcontextprotocol/server-threejs

npm i https://pkg.pr.new/@modelcontextprotocol/server-threejs@3

@modelcontextprotocol/server-transcript

npm i https://pkg.pr.new/@modelcontextprotocol/server-transcript@3

@modelcontextprotocol/server-video-resource

npm i https://pkg.pr.new/@modelcontextprotocol/server-video-resource@3

@modelcontextprotocol/server-wiki-explorer

npm i https://pkg.pr.new/@modelcontextprotocol/server-wiki-explorer@3

commit: ebfe660

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant