chore: sync spec-types/draft.ts to modelcontextprotocol@2fb207d (#348)

Re-vendors schema/draft/schema.ts from the spec repo at the merge commit
of PR #2891 (2fb207da428f43a4981513ec2aef218b7533c5b3), which also
includes #2889 and #2890.

Type changes picked up:
- Add NotificationMetaObject (with io.modelcontextprotocol/subscriptionId)
- Add HEADER_MISMATCH (-32001) const and HeaderMismatchError interface
- CancelledNotificationParams.requestId is now required
- ClientNotification narrowed to CancelledNotification only
- ListRootsRequest.params narrowed (drops progressToken)
- Remove ElicitationCompleteNotification and elicitationId

Also replaces the local -32001 literal in
src/scenarios/server/http-standard-headers.ts with the new exported
HEADER_MISMATCH constant.

Claude-Session: https://claude.ai/code/session_01Gbqx5LodtAghT5fRYFxeja
This commit is contained in:
Peter Alexander 2026-06-18 16:01:49 +01:00 • committed by GitHub
commit 7c4bea4188
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -25,6 +25,7 @@ import {
sendStatelessRequest,
type RunContext
} from '../../connection';
import { HEADER_MISMATCH } from '../../spec-types/draft';
const SPEC_REFERENCE = {
id: 'SEP-2243-Server-Validation',
@ -55,7 +56,7 @@ const SPEC_REFERENCE_CUSTOM = {
url: 'https://modelcontextprotocol.io/specification/draft/basic/transports#server-behavior-for-custom-headers'
};
const HEADER_MISMATCH_ERROR_CODE = -32001;
const HEADER_MISMATCH_ERROR_CODE = HEADER_MISMATCH;
// Coarse, requirement-level check IDs (SEP-2243) for STANDARD-header
// rejections. Every standard-header rejection case emits this same pair of IDs;