fix: upgrade zod to v4 to fix global install crash
@modelcontextprotocol/sdk@1.26.0 uses zod/v4 APIs (specifically z.literal().value getter). When installed globally, npm shared the project's zod@3.25.5 instead of the SDK's nested zod@4.3.6; the 3.25.5 v4 compat shim lacks the .value getter, throwing 'Schema method literal must be a string' on startup. Also updates z.record(z.any()) to z.record(z.string(), z.any()) for zod v4 strict record key typing. 446/446 tests passing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
d1689a2e5c
commit
c368d4088a
@@ -5,6 +5,12 @@ Format: [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [1.0.3] - 2026-03-30
|
||||
|
||||
### Fixed
|
||||
- Global install crash (`Schema method literal must be a string`) — upgraded `zod` from `3.25.5` to `^4.3.6` so the package uses real zod v4 rather than falling back to zod 3.x's v4 compatibility shim, which lacks the `.value` getter required by `@modelcontextprotocol/sdk@1.26.0`
|
||||
- `z.record(z.any())` call updated to `z.record(z.string(), z.any())` to satisfy zod v4's stricter record key-type requirement
|
||||
|
||||
## [1.0.2] - 2026-03-30
|
||||
|
||||
### Added
|
||||
|
||||
Reference in New Issue
Block a user