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:
parent
25fd44323f
commit
6f83abf786
2 changed files with 167 additions and 43 deletions
|
|
@ -24,7 +24,7 @@ describe('HttpStandardHeadersScenario (SEP-2243) — negative', () => {
|
|||
id: 1,
|
||||
method: 'initialize',
|
||||
params: {
|
||||
protocolVersion: 'DRAFT-2026-v1',
|
||||
protocolVersion: '2026-07-28',
|
||||
clientInfo: { name: 'neg-test', version: '0' },
|
||||
capabilities: {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ async function badClient(serverUrl: string) {
|
|||
}
|
||||
|
||||
const goodMeta = {
|
||||
'io.modelcontextprotocol/protocolVersion': 'DRAFT-2026-v1',
|
||||
'io.modelcontextprotocol/protocolVersion': '2026-07-28',
|
||||
'io.modelcontextprotocol/clientInfo': { name: 'test', version: '1.0' },
|
||||
'io.modelcontextprotocol/clientCapabilities': {}
|
||||
};
|
||||
|
|
@ -70,7 +70,7 @@ async function nonRetryingClient(serverUrl: string) {
|
|||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'MCP-Protocol-Version': 'DRAFT-2026-v1'
|
||||
'MCP-Protocol-Version': '2026-07-28'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
jsonrpc: '2.0',
|
||||
|
|
@ -118,7 +118,7 @@ async function malformedCapabilitiesClient(serverUrl: string) {
|
|||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'MCP-Protocol-Version': 'DRAFT-2026-v1'
|
||||
'MCP-Protocol-Version': '2026-07-28'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
jsonrpc: '2.0',
|
||||
|
|
|
|||
Loading…
Reference in a new issue