chore(core): repin the 2026-07-28 spec references at spec commit 2fb207da#2318
Conversation
…07da Regenerate the vendored draft-revision reference artifacts against the current spec main (2fb207da; schema.ts last touched at 91b403f8): - packages/core/src/types/spec.types.2026-07-28.ts via fetch:spec-types - the schema.json twins + manifest via fetch:schema-twins (the 2025-11-25 twin is byte-identical; only the 2026-07-28 twin and the provenance pin move) - the 2026-07-28 example corpus + manifest via fetch:spec-examples (ElicitationCompleteNotification/elicitation-complete.json removed upstream, HeaderMismatchError/header-mismatch.json added, ElicitRequestURLParams/elicit-sensitive-data.json no longer carries elicitationId; directory/file counts unchanged at 86/127) Wire-surface and test reconciliation land in the follow-up commits of this change.
…hema - Drop notifications/elicitation/complete from the 2026-07-28 notification registry: the draft removed the notification (and elicitationId on URL-mode elicitation), so it is 2025-11-25-only vocabulary. On 2026-era connections an outbound send now dies locally with a typed error and inbound copies are dropped as unknown; the 2025-11-25 path is unchanged. - Fork notifications/cancelled for the 2026 era: requestId is required on this revision, and the notification _meta shape types the io.modelcontextprotocol/subscriptionId key (shape only - listen delivery is out of scope here). The shared schema keeps the frozen 2025-11-25 optional shape. - Document Server.createElicitationCompletionNotifier() as 2025-11-25-only and note its behavior on 2026-era connections. - Refresh the header-mismatch comment: -32001 is now the draft schema's HEADER_MISMATCH constant, not just a conformance-suite assertion (comment only; emitted behavior unchanged). Changeset included; no public API surface changes.
…h the regenerated anchor - spec.types.2026-07-28.test.ts: drop the checks for the removed ElicitationCompleteNotification(Params) types; compare the cancelled notification (and the ClientNotification union, now cancelled-only) and the new NotificationMetaObject against the 2026-era wire forks; move the ElicitRequest/ElicitRequestParams/ElicitRequestURLParams comparisons to the feature-owned pending list (the 2026-era in-band elicitation shape, which no longer carries elicitationId, lands with the multi-round-trip work); add HeaderMismatchError to the validation-ladder pending entries. The exported-type count pin stays at 151. - specCorpus.test.ts: map the new HeaderMismatchError example directory as an error-object directory and record the regenerated ElicitRequestURLParams example as a pending file until the in-band elicitation surface models the elicitationId-less shape.
…entryModern arm The 2026-07-28 wire registry no longer carries notifications/elicitation/complete (the draft removed the notification), so on a 2026-era connection the client drops inbound copies as unknown and the row's received-then-ignored assertion observes nothing. Annotate the requirement with the existing method-not-in-modern-registry entry exclusion so the entryModern cell is not registered; the 2025-era cells (and the stateful-transport elicitation:url:complete-notification row) are unchanged.
🦋 Changeset detectedLatest commit: a4d58f7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@modelcontextprotocol/client
@modelcontextprotocol/codemod
@modelcontextprotocol/server
@modelcontextprotocol/server-legacy
@modelcontextprotocol/express
@modelcontextprotocol/fastify
@modelcontextprotocol/hono
@modelcontextprotocol/node
commit: |
There was a problem hiding this comment.
I didn't find any bugs — the changeset claims (2026-era elicitation/complete now failing locally with MethodNotSupportedByProtocolVersion, the cancelled-notification requestId fork) check out against the implementation — but this re-pin makes deliberate wire-surface changes on the 2026-07-28 draft era, so it's worth a human confirming the new spec commit and the era-fork decisions.
Extended reasoning...
Overview
This PR re-pins the vendored 2026-07-28 draft references (anchor types, schema.json twin, example corpus, manifests) to spec commit 2fb207da and aligns the 2026-era wire surface: notifications/elicitation/complete is removed from the 2026 registry/schemas, notifications/cancelled gains an era-local fork with required requestId, a NotificationMetaSchema types the subscriptions/listen _meta key, and the parity/corpus suites and pending lists are reconciled. There is also a comment-only update documenting -32001 as the draft's HEADER_MISMATCH constant, a JSDoc note on Server.createElicitationCompletionNotifier(), an e2e arm exclusion, and a changeset.
Verification of claims
The changeset's behavioral claims are backed by code: the outbound era gate in packages/core/src/shared/protocol.ts throws SdkErrorCode.MethodNotSupportedByProtocolVersion for spec notifications absent from the negotiated era's registry, and notifications/elicitation/complete remains in the 2025-11-25 registry (so isSpecNotificationMethod still classifies it), meaning a 2026-negotiated connection now fails locally as described while 2025-11-25 behavior is untouched. The new CancelledNotificationParamsSchema fork and NotificationMetaSchema use z.looseObject/optional members consistent with the regenerated anchor, and the corpus/parity pending entries are stale-checked by the existing harnesses.
Security risks
None apparent — the changes are vendored test artifacts, Zod schema forks for a draft protocol revision, and documentation. No auth, crypto, or input-handling on the released surface is modified; if anything, requiring requestId on 2026-era cancellation is stricter parsing.
Level of scrutiny
Moderate-to-high: most of the diff is regenerated reference material, but the wire registry/schema changes in packages/core/src/wire/rev2026-07-28/ are protocol-correctness-critical and encode deliberate behavior changes (a notification removed from a wire era, a requiredness fork). These follow the upstream draft, but confirming the pinned spec commit is the intended one and that the era-fork strategy (era-local cancelled fork vs. shared schema) matches maintainer intent is a judgment call for a human, so I'm not shadow-approving.
Other factors
The bug-hunting system found no bugs, the PR description reports full unit/e2e/integration/conformance runs with unchanged conformance baselines, and the existing registry-diff and twin-hash oracles should keep the regenerated artifacts honest. The 2025-11-25 twin is byte-identical per the manifest, limiting blast radius to the unreleased draft surface.
Re-pin the 2026-07-28 draft references (vendored spec types, schema.json twins, example corpus) to
the latest spec commit (
2fb207da) and align the 2026-era wire surface with it.Motivation and Context
The 2026-07-28 draft schema moved upstream (spec PRs #2889/#2890/#2891). The vendored reference
artifacts and the 2026-era wire registry must track it so the type-parity and corpus oracles stay
honest and so the 2026-era surface does not advertise vocabulary the draft has removed.
How Has This Been Tested?
pre-change baseline (324/24/1 client, 42/0 server, 39/13 server-draft).
Breaking Changes
None for users on the released 2025-11-25 surface. On connections negotiated at the 2026-07-28
draft revision,
notifications/elicitation/completeis no longer a wire method (sending it —including via
Server.createElicitationCompletionNotifier()— now fails locally withSdkErrorCode.MethodNotSupportedByProtocolVersion; inbound copies are dropped as unknown), andnotifications/cancelledparses withrequestIdrequired. Both follow the upstream draft.Types of changes
Checklist
Additional context
fetch:spec-types/fetch:schema-twins/fetch:spec-examplesscripts; the 2025-11-25 twinis byte-identical.
notifications/cancelledis now an era-local fork (the shared schema keeps thefrozen 2025-11-25 optional-
requestIdshape); the notification_metashape types theio.modelcontextprotocol/subscriptionIdkey (shape only — listen delivery is separate work).-32001is now documented as the draft schema'sHEADER_MISMATCHconstant (comment only; theemitted behavior already matched).
typescript-sdk chore: update spec.types.ts from upstream #2027, which carries the anchor file only and not the twins/corpus/oracle updates
this change includes.