Skip to content

Commit a230db5

Browse files
ochafikclaude
andcommitted
fix: re-export SDK version constants from generated index
The generated/ module now exports SDK version constants alongside the auto-generated schemas: - LATEST_PROTOCOL_VERSION (SDK production version, not spec draft) - DEFAULT_NEGOTIATED_PROTOCOL_VERSION - SUPPORTED_PROTOCOL_VERSIONS - JSONRPC_VERSION 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent abf59af commit a230db5

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

src/generated/index.ts

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,27 @@
11
/**
2-
* Generated Zod schemas from spec.types.ts with SDK-specific extensions.
2+
* Generated Zod Schemas from MCP Specification
33
*
4-
* This module re-exports all generated schemas and adds SDK-specific schemas
5-
* that are not part of the MCP specification but are needed for SDK functionality.
4+
* This module provides auto-generated Zod schemas from spec.types.ts,
5+
* plus SDK version constants.
66
*
7-
* ## Usage
7+
* For production use with SDK-specific refinements and extras,
8+
* import from '@modelcontextprotocol/sdk/types.js'.
89
*
9-
* For now, continue using `@modelcontextprotocol/sdk/types.js` for production.
10-
* This generated module is available for reference and comparison.
11-
*
12-
* ## Structure
13-
*
14-
* - `spec.schemas.ts` - Auto-generated from spec.types.ts via ts-to-zod
15-
* - `index.ts` (this file) - Re-exports + SDK-specific extras
10+
* @see spec.types.ts - Source TypeScript interfaces from MCP spec
11+
* @see spec.schemas.ts - Auto-generated Zod schemas
12+
* @see ../types.ts - Production schemas with SDK refinements
1613
*/
1714

1815
// Re-export all generated schemas
1916
export * from './spec.schemas.js';
2017

21-
// Re-export types from spec (for convenience)
18+
// Re-export spec types (interfaces/types from MCP specification)
2219
export * from '../spec.types.js';
20+
21+
// Re-export SDK version constants (these differ from spec's DRAFT version)
22+
export {
23+
LATEST_PROTOCOL_VERSION,
24+
DEFAULT_NEGOTIATED_PROTOCOL_VERSION,
25+
SUPPORTED_PROTOCOL_VERSIONS,
26+
JSONRPC_VERSION,
27+
} from '../types.js';

0 commit comments

Comments
 (0)