Skip to content

Conversation

@scottlovegrove
Copy link
Contributor

Summary

Upgrades the project from Zod v3 to Zod v4, fixing all type errors caused by breaking changes in the new version.

Changes

  • Upgraded zod from v3.25.76 to v4.1.13
  • Fixed z.objectOutputTypez.infer<z.ZodObject<Params>> in mcp-helpers.ts
  • Fixed z.record(z.unknown())z.record(z.string(), z.unknown()) in 9 files
  • Fixed z.enum() description from constructor options to .describe() method
  • Updated scripts/validate-schemas.ts to work with Zod v4 internals

Breaking Changes

⚠️ BREAKING CHANGE: Output schema types are now more strict with Zod v4. The z.record() schemas now explicitly require string keys (z.record(z.string(), z.unknown())), and the z.enum() description is now set via .describe() method instead of constructor options. This affects TypeScript type inference for consumers using these schemas.

While this is primarily a type-level breaking change (runtime behavior is unchanged), TypeScript consumers may need to update their types.

Verification

  • ✅ All 350 tests pass
  • ✅ Type-check passes with zero errors
  • ✅ Build succeeds
  • ✅ Schema validation passes

🤖 Generated with Claude Code

BREAKING CHANGE: Output schema types are now more strict with Zod v4. The `z.record()` schemas now explicitly require string keys (`z.record(z.string(), z.unknown())`), and the `z.enum()` description is now set via `.describe()` method instead of constructor options. This affects TypeScript type inference for consumers using these schemas.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@scottlovegrove scottlovegrove marked this pull request as ready for review December 8, 2025 10:28
@scottlovegrove scottlovegrove self-assigned this Dec 8, 2025
Copy link
Member

@amix amix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants