fix: update the draft wire version to 2026-07-28 (#331)

* chore: sync spec-types to modelcontextprotocol@0168c57f

Refreshes the vendored schema copies via npm run sync-schema. The draft
schema now declares LATEST_PROTOCOL_VERSION = "2026-07-28" (previously
the DRAFT-2026-v1 placeholder) and picks up the latest draft doc-comment
and type updates. The dated schemas are unchanged.

* fix: update the draft wire version to 2026-07-28

The spec repo's draft schema now declares
LATEST_PROTOCOL_VERSION = "2026-07-28", but the harness still asserted
the old DRAFT-2026-v1 placeholder, so an SDK that sends the version the
draft spec actually declares cannot pass the draft suite.

- bump DRAFT_PROTOCOL_VERSION in src/types.ts to 2026-07-28
- update the hard-coded literals in tests, example servers, and README
- add src/types.test.ts pinning DRAFT_PROTOCOL_VERSION to the vendored
  draft schema's LATEST_PROTOCOL_VERSION so the two cannot drift, and
  asserting the draft identifier stays distinct from the dated versions
This commit is contained in:
Felix Weinberger 2026-06-08 16:47:17 +01:00 • committed by GitHub
commit 6f83abf786
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 167 additions and 43 deletions

View file

@ -99,7 +99,7 @@ Servers MUST include \`ttlMs\` (integer >= 0) and \`cacheScope\` ("public" or "p
// SEP-2549 only exists in the draft spec, so each cacheable endpoint is
// queried over the version-appropriate connection. Under --spec-version
// draft that resolves to the stateless impl (SEP-2575): protocolVersion
// DRAFT-2026-v1 plus the cross-cutting _meta and standard headers
// 2026-07-28 plus the cross-cutting _meta and standard headers
// (issue #315).
let conn: Connection;
try {

View file

@ -101,7 +101,7 @@ describe('Stateless Server Scenario Negative Tests', () => {
jsonrpc: '2.0',
id: reqBody.id,
result: {
supportedVersions: ['DRAFT-2026-v1'],
supportedVersions: ['2026-07-28'],
capabilities: {},
serverInfo: { name: 'bad-meta-server', version: '1.0.0' }
}
@ -341,7 +341,7 @@ describe('Stateless Server Scenario Negative Tests', () => {
jsonrpc: '2.0',
id: reqBody.id,
result: {
supportedVersions: ['DRAFT-2026-v1'],
supportedVersions: ['2026-07-28'],
capabilities: {
tools: { listChanged: true },
prompts: { listChanged: true }