feat: prepare VoltAgent 3 next prerelease

OM
3d ago
+52718-7533

PR Checklist

Please check if your PR fulfills the following requirements:

Bugs / Features

What is the current behavior?

What is the new behavior?

fixes (issue)

Notes for reviewers


Summary by cubic

Prepares the VoltAgent 3 prerelease on the next channel with Node 22, zod@^4, and AI SDK v7-first tooling. @voltagent/core now exposes tool()/ToolSet, native AI SDK tool execution and streaming semantics, typed context schema validation, and per-provider-call retry/fallback. Adds an account-free local playground, refreshes examples and CI, and runs a new AI SDK compatibility matrix on Node 22/24.

Dependencies

  • Enables Changesets prerelease mode (next) and Node.js 22 CI; adds dedicated AI SDK compatibility checks against SDK 7.0.0 and 7.
  • Bumps @voltagent/* to 3.0.0-next.x, ai@^7, @ai-sdk/openai@^4, @ai-sdk/react@^4, @openrouter/ai-sdk-provider@^3, ollama-ai-provider-v2@^4, and zod@^4.
  • Adds @voltagent/libsql working memory, aligned Hono ^4.9.1, re-exported AI SDK primitives/types from @voltagent/core, and the new @voltagent/playground package.
  • Adds tool approval guidance (voltagent#1373) and standardizes package type/types order.

Migration

  • Require Node.js 22 and zod@^4; install via @next/3.0.0-next.x.
  • Tools: createTool -> tool, parameters -> inputSchema, configure tools as a ToolSet object map; raw AI SDK tools remain first-class and can be decorated with enhanceTool().
  • Native tools preserve AI SDK semantics: thrown errors become tool-error, AsyncIterable returns stream results, and final-output validation requires voltagent.validateOutput: true.
  • Native streaming requires a directly returned AsyncIterable; move async setup into an async generator. toUIMessageStreamResponse({ onEnd }) replaces onFinish.
  • Usage fields: usage.outputTokenDetails.reasoningTokens and usage.inputTokenDetails.cacheReadTokens.
  • generateObject: pass instructions instead of system; createTool remains for legacy compatibility. Optional playground starts on loopback port 3142 via playground: false or { enabled, port, apiUrl }.