Skip to content

feat: upgrade @anthropic-ai/claude-agent-sdk to v0.2.19 and zod to v4#33

Open
oxwen11 wants to merge 4 commits intomainfrom
fix/sync-zod-schemas-with-sdk
Open

feat: upgrade @anthropic-ai/claude-agent-sdk to v0.2.19 and zod to v4#33
oxwen11 wants to merge 4 commits intomainfrom
fix/sync-zod-schemas-with-sdk

Conversation

@oxwen11
Copy link
Member

@oxwen11 oxwen11 commented Jan 26, 2026

Summary

  • Upgrade @anthropic-ai/claude-agent-sdk from ^0.1.22 to ^0.2.19
  • Upgrade zod from ^3.x to ^4.0.0 across all packages
  • Sync Zod schemas with new SDK types

Changes

Package updates

Updated versions in 9 packages:

  • packages/agents
  • packages/ai-sdk-agents
  • packages/server-rpc
  • packages/vibest-devtools
  • packages/vibest
  • packages/vibest-devtools-client
  • packages/code-inspector-web
  • examples/vite-react

Schema updates

  • Added error?: string field to McpServerStatusSchema
  • Made updatedInput optional in PermissionResultSchema (was required)

Test updates

  • Updated type expectation for updatedInput to be Record<string, unknown> | undefined

Test plan

  • All tests pass (118 tests across 5 test files)
  • All typechecks pass (20 tasks)
  • Core packages build successfully (ai-sdk-agents, @vibest/agents, @vibest/server-rpc)

Update local Zod schemas to match @anthropic-ai/claude-agent-sdk types:
- PermissionModeSchema: add "delegate" and "dontAsk" values
- PermissionUpdateDestinationSchema: add "cliArg" value
- PermissionResultSchema: add optional "toolUseID" field to both branches
The tsdown bundler was generating declaration files with hash suffixes
(e.g., index-Brk488Q3.d.ts) but package.json expects stable names
(index.d.ts). Adding unbundle: true keeps filenames stable.
Same fix as ai-sdk-agents - keeps declaration filenames stable
without hash suffixes.
- Upgrade @anthropic-ai/claude-agent-sdk from ^0.1.22 to ^0.2.19
- Upgrade zod from ^3.x to ^4.0.0 across all packages
- Update McpServerStatusSchema to include optional error field
- Update PermissionResultSchema to make updatedInput optional
- Update type compatibility tests to match new SDK types
@iamdin iamdin force-pushed the fix/sync-zod-schemas-with-sdk branch from bb7de23 to 43521a4 Compare January 26, 2026 12:13
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.

1 participant