| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…ocal SDK build)
…ompat pass-through schemas
…ansport on v2 Transport
…ssignment)
Preserves all public methods and on* handlers. Removed: 5 assert*Capability
no-op overrides, inherited Protocol surface. Wire renames: notifications/message
-> ui/log; oncalltool/onlisttools now on ui/{call-view-tool,list-view-tools}.
Standard MCP proxying via server.setRequestHandler. ui/initialize handler kept
for v1-iframe wire compat. callTool/listTools wire renamed to ui/{call-view-tool,
list-view-tools}.
…nHandle casts; ctx type params; exclude docs/; gen-schemas path
… tsc clean npx tsc --noEmit -> 0 errors npm run build -> see commit body
…pulls child_process) npm run build -> see body
…ed pre-connect (v1 parity)
…oolUiResourceUri validation (v1 parity)
…express,node}; restore test tsconfig includes
…mulate, onclose shim, onupdatemodelcontext return type, getToolUiResourceUri error message
…opped Protocol surface
…basic-host typo+v1 schema usage
… unported pdf-server suite The pdf-server example's server.test.ts (~77 tests) needs deeper v2 porting beyond the SDK migration scope. SDK tests + pdf-annotations.test.ts (no SDK coupling) all pass.
…ypescript-sdk#1871)
- spec.types.ts: import RequestId from @modelcontextprotocol/client (already public)
- app.ts/app-bridge.ts: replace pass-through *Schema shims with z.custom<T>(v => isSpecType('T', v))
- generate-schemas.ts: emit isSpecType-backed z.custom for external SDK types instead of importing from sdk-compat
- delete src/sdk-compat.ts
Friction surfaced: ExtensionHandle.setRequestHandler/sendRequest accept AnySchema (Zod-only),
so specTypeSchema()'s StandardSchemaV1 return cannot be passed directly. Wrapped via
z.custom(isSpecType) instead. #1868 should widen the param type to StandardSchemaV1 | AnySchema.
…pt-sdk#1846 StandardSchemaV1 widening) generated/schema.ts keeps z.custom(isSpecType()) since it composes into Zod chains; specTypeSchema() is used at the ExtensionHandle boundary where the SDK now accepts StandardSchemaV1. app-bridge event-map params type widened ZodType -> StandardSchemaV1. app.ts no longer imports zod.
- AppBridge dual-listens on legacy notifications/message → loggingmessage event - bridge.callTool/listTools throw descriptive error if iframe is v1 (instead of MethodNotFound) - Unskip ping test (Server.ping() is public; skip reason was wrong) - Document on*-setter replace-semantics with explicit test - BREAKING.md: v1↔v2 interop section, host-first upgrade guidance
…mappings
- Remove tsconfig excludes for *.examples.ts(x) and docs/ — all now typecheck
- Port companion files to v2 API (app.ui.sendRequest, client.callTool, z.object wraps)
- typedoc externalSymbolLinkMappings for @modelcontextprotocol/{client,server}
- Fix raw-shape inputSchema and Schema.shape→Schema across 9 example servers
- 25/25 examples now build; typedoc warnings 11→0
….registerTool) All 33 fails fixed: v2 registerTool requires StandardSchema (raw shapes lack ~standard.validate). Also extra.signal→extra.mcpReq.signal, drop stale v1 import. test:full now 277/2/0 (was 197/1/33). e2e API tests pass; browser tests need playwright install (env, not v2 break).
- import paths sdk/* → @modelcontextprotocol/{client,server}
- events.ts: ProtocolWithEvents extends Protocol (concrete), v1-schema-shim setRequestHandler
- request/notification call-shape transforms (perl)
- drop assert*Capability overrides (Protocol no longer abstract)
- server/index.ts copied from #612 port
- tsconfig: exclude *.examples.ts, docs/ (same as #612)
NOT YET: *Schema imports → specTypeSchema(), request() visibility, ~225 tsc errors remain
|
Closing in favor of #614 (concrete Protocol approach via typescript-sdk#1891). |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
DO NOT MERGE — proof-of-concept port to SDK v2. CI is expected to fail (package.json depends on local file:/tmp/*.tgz SDK builds that combine unpublished typescript-sdk changes).
Review guide — file map, reading order, what to skip (105 files but ~90 are mechanical)105 files changed, but ~90 of them are mechanical. This guide maps what to read vs skim.
If you have 10 minutes
File map
Read carefully (~6 files, the actual design)
Skim (mechanical, verify pattern then move on)
Recommended reading order (by commit)
25 commits, intentionally staged. Read bottom-up in groups:
1. Setup (skim): 231251a6 deps swap, b50315b1 types/schemas, a9713e3d EventDispatcher + transport.
2. The core rewrite (read): 25da6658 App, a1f1f016 AppBridge, a5378733 react/server.
3. Compile fixes (skim): ea3f4af5..a97206ca.
4. v1 parity fixes (read commit messages): 87fee346, f7490c6b, 47f4cdf3, be67283e — each is a behavior the test suite caught.
5. Tests + examples (skim): 7e8ae100, cce8436b, 570781e0, 9998758b, 4298d34a, b845fd7c.
6. Upstream-fix follow-through (skim): 953a5d81/4e26407d (#1871), 76b3ba7a /stdio import.
7. Validator integration (read): c8bc2649 eliminates sdk-compat.ts via isSpecType(); 60e9d690 passes specTypeSchema() directly to ExtensionHandle after #1846's StandardSchemaV1 widen.
Questions to evaluate
Known gaps (intentional, documented)
Depends on:
Motivation and Context
App/AppBridge move from subclassing Protocol to composing Client/Server + ExtensionHandle per the SEP-1865 role assignment. See BREAKING.md for the full surface delta. 73/88 of the v1 app-bridge.test.ts tests pass unmodified against the rewrite (final: 85 pass / 1 skip / 0 fail).
How Has This Been Tested?
Locally against an SDK build with the dependencies above: npm run build, npm test (197 pass / 1 skip / 0 fail), and basic-server-react/basic-server-vanillajs/quickstart/basic-host example builds all green. npm run test:full retains the unported examples/pdf-server suite.
Breaking Changes
Yes — see BREAKING.md. Peer dep moves from @modelcontextprotocol/sdk@^1 to @modelcontextprotocol/{client,server}@^2.
Types of changes
Checklist
Additional context
This PR is the artifact for reviewing the v2 shape. Once the SDK dependencies publish to @alpha, the file: deps will be swapped to npm versions and CI will go green.