feat(server): retain the negotiated protocol version and expose getNegotiatedProtocolVersion() (#2230)

This commit is contained in:
Felix Weinberger 2026-06-01 16:56:48 +01:00 • committed by GitHub
commit 86276ed073
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -107,6 +107,13 @@ export const REQUIREMENTS: Record<string, Requirement> = {
transports: STATEFUL_TRANSPORTS,
note: 'Under stateless hosting each request is served by a new server instance, so state set up earlier in the session cannot be observed.'
},
'typescript:server:get-negotiated-protocol-version': {
source: 'sdk',
behavior:
'After initialize, Server.getNegotiatedProtocolVersion() returns the protocol version the server responded with; before initialize it returns undefined. Matches the Client-side getter.',
transports: STATEFUL_TRANSPORTS,
note: 'Under stateless hosting each request is served by a new server instance, so state set up earlier in the session cannot be observed.'
},
// Protocol primitives: cancellation, timeout, progress, errors, _meta