feat: support protocol version 2025-11-25 (#81)
- Update client initialization check to accept both 2025-06-18 and 2025-11-25 - Server echoes back client's version if valid (proper version negotiation) - Fixes compatibility with SDK 1.25.1+ which sends 2025-11-25 🦉 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
5f1bedd54b
commit
3994cb3c86
1 changed files with 18 additions and 3 deletions
|
|
@ -110,11 +110,18 @@ export class InitializeScenario implements Scenario {
|
|||
|
||||
this.checks.push(clientChecks.createServerInfoCheck(serverInfo));
|
||||
|
||||
// Echo back client's version if valid, otherwise use latest
|
||||
const VALID_VERSIONS = ['2025-06-18', '2025-11-25'];
|
||||
const clientVersion = initializeRequest?.protocolVersion;
|
||||
const responseVersion = VALID_VERSIONS.includes(clientVersion)
|
||||
? clientVersion
|
||||
: '2025-11-25';
|
||||
|
||||
const response = {
|
||||
jsonrpc: '2.0',
|
||||
id: request.id,
|
||||
result: {
|
||||
protocolVersion: '2025-06-18',
|
||||
protocolVersion: responseVersion,
|
||||
serverInfo,
|
||||
capabilities: {}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue