Skip to content

ci(changesets): version packages#1057

Merged
omeraplak merged 1 commit into
mainfrom
changeset-release/main
Feb 13, 2026
Merged

ci(changesets): version packages#1057
omeraplak merged 1 commit into
mainfrom
changeset-release/main

Conversation

@voltagent-bot

@voltagent-bot voltagent-bot commented Feb 12, 2026

Copy link
Copy Markdown
Member

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@voltagent/core@2.4.0

Minor Changes

  • #1055 21891b4 Thanks @omeraplak! - feat: add tool-aware live-eval payloads and a deterministic tool-call accuracy scorer

    What's New

    • @voltagent/core
      • Live eval payload now includes messages, toolCalls, and toolResults.
      • If toolCalls/toolResults are not explicitly provided, they are derived from the normalized message/step chain.
      • New exported eval types: AgentEvalToolCall and AgentEvalToolResult.
    • @voltagent/scorers
      • Added prebuilt createToolCallAccuracyScorerCode for deterministic tool evaluation.
      • Supports both single-tool checks (expectedTool) and ordered tool-chain checks (expectedToolOrder).
      • Supports strict and lenient matching modes.

    Code Examples

    Built-in tool-call scorer:

    import { createToolCallAccuracyScorerCode } from "@voltagent/scorers";
    
    const toolOrderScorer = createToolCallAccuracyScorerCode({
      expectedToolOrder: ["searchProducts", "checkInventory"],
      strictMode: false,
    });

    Custom scorer using toolCalls + toolResults:

    import { buildScorer } from "@voltagent/core";
    
    interface ToolEvalPayload extends Record<string, unknown> {
      toolCalls?: Array<{ toolName?: string }>;
      toolResults?: Array<{ isError?: boolean; error?: unknown }>;
    }
    
    const toolExecutionHealthScorer = buildScorer<ToolEvalPayload, Record<string, unknown>>({
      id: "tool-execution-health",
      label: "Tool Execution Health",
    })
      .score(({ payload }) => {
        const toolCalls = payload.toolCalls ?? [];
        const toolResults = payload.toolResults ?? [];
    
        const failedResults = toolResults.filter(
          (result) => result.isError === true || Boolean(result.error)
        );
        const completionRatio =
          toolCalls.length === 0 ? 1 : Math.min(toolResults.length / toolCalls.length, 1);
    
        return {
          score: Math.max(0, completionRatio - failedResults.length * 0.25),
          metadata: {
            toolCallCount: toolCalls.length,
            toolResultCount: toolResults.length,
            failedResultCount: failedResults.length,
          },
        };
      })
      .build();
  • #1054 3556385 Thanks @omeraplak! - feat: add onToolError hook for customizing tool error payloads before serialization

    Example:

    import { Agent, createHooks } from "@voltagent/core";
    
    const agent = new Agent({
      name: "Assistant",
      instructions: "Use tools when needed.",
      model: "openai/gpt-4o-mini",
      hooks: createHooks({
        onToolError: async ({ originalError, error }) => {
          const maybeAxios = (originalError as any).isAxiosError === true;
          if (!maybeAxios) {
            return;
          }
    
          return {
            output: {
              error: true,
              name: error.name,
              message: originalError.message,
              code: (originalError as any).code,
              status: (originalError as any).response?.status,
            },
          };
        },
      }),
    });

Patch Changes

  • #1052 156c98e Thanks @omeraplak! - feat: expose workspace in tool execution context - [FEAT] Workspace context support for tool calls (fetch from sandbox) #1046

    • Add workspace?: Workspace to OperationContext, so custom tools can access options.workspace during tool calls.
    • Wire agent operation context creation to attach the configured workspace automatically.
    • Add regression coverage showing a tool call can read workspace filesystem content and fetch sandbox output in the same execution.
  • #1058 480981a Thanks @omeraplak! - fix: make workspace toolkit schemas compatible with Zod v4 record handling - [BUG] TypeError: Cannot read properties of undefined (reading '_zod') when using workspace toolkit tools with latest Zod and AI SDK #1043

    What Changed

    • Updated workspace toolkit input schemas to avoid single-argument z.record(...) usage that can fail in Zod v4 JSON schema conversion paths.
    • workspace_sandbox.execute_command now uses z.record(z.string(), z.string()) for env.
    • workspace_index_content now uses z.record(z.string(), z.unknown()) for metadata.

    Why

    With @voltagent/core + zod@4, some workspace toolkit flows could fail at runtime with:

    Cannot read properties of undefined (reading '_zod')

    This patch ensures built-in workspace toolkits (such as sandbox and search indexing) work reliably across supported Zod versions.

@voltagent/scorers@2.1.0

Minor Changes

  • #1055 21891b4 Thanks @omeraplak! - feat: add tool-aware live-eval payloads and a deterministic tool-call accuracy scorer

    What's New

    • @voltagent/core
      • Live eval payload now includes messages, toolCalls, and toolResults.
      • If toolCalls/toolResults are not explicitly provided, they are derived from the normalized message/step chain.
      • New exported eval types: AgentEvalToolCall and AgentEvalToolResult.
    • @voltagent/scorers
      • Added prebuilt createToolCallAccuracyScorerCode for deterministic tool evaluation.
      • Supports both single-tool checks (expectedTool) and ordered tool-chain checks (expectedToolOrder).
      • Supports strict and lenient matching modes.

    Code Examples

    Built-in tool-call scorer:

    import { createToolCallAccuracyScorerCode } from "@voltagent/scorers";
    
    const toolOrderScorer = createToolCallAccuracyScorerCode({
      expectedToolOrder: ["searchProducts", "checkInventory"],
      strictMode: false,
    });

    Custom scorer using toolCalls + toolResults:

    import { buildScorer } from "@voltagent/core";
    
    interface ToolEvalPayload extends Record<string, unknown> {
      toolCalls?: Array<{ toolName?: string }>;
      toolResults?: Array<{ isError?: boolean; error?: unknown }>;
    }
    
    const toolExecutionHealthScorer = buildScorer<ToolEvalPayload, Record<string, unknown>>({
      id: "tool-execution-health",
      label: "Tool Execution Health",
    })
      .score(({ payload }) => {
        const toolCalls = payload.toolCalls ?? [];
        const toolResults = payload.toolResults ?? [];
    
        const failedResults = toolResults.filter(
          (result) => result.isError === true || Boolean(result.error)
        );
        const completionRatio =
          toolCalls.length === 0 ? 1 : Math.min(toolResults.length / toolCalls.length, 1);
    
        return {
          score: Math.max(0, completionRatio - failedResults.length * 0.25),
          metadata: {
            toolCallCount: toolCalls.length,
            toolResultCount: toolResults.length,
            failedResultCount: failedResults.length,
          },
        };
      })
      .build();

Patch Changes

Summary by CodeRabbit

  • New Features

    • Added tool error customization hook for payload serialization control
    • Exposed workspace context to tool execution environment
    • Introduced tool-aware live-eval payloads with new evaluation types
    • Added deterministic tool-call accuracy scorer with strict/lenient modes
  • Bug Fixes

    • Resolved Zod v4 schema compatibility issues
  • Chores

    • Updated core package to version 2.4.0
    • Updated scorers package to version 2.1.0
    • Bumped dependencies across all example projects

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Feb 12, 2026

Copy link
Copy Markdown

Deploying voltagent with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1e3593b
Status: ✅  Deploy successful!
Preview URL: https://39b5cb84.voltagent.pages.dev
Branch Preview URL: https://changeset-release-main.voltagent.pages.dev

View logs

@ghost

This comment has been minimized.

@coderabbitai

coderabbitai Bot commented Feb 12, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Bumped packages/core to 2.4.0 and packages/scorers to 2.1.0; removed a release changeset file; updated many example projects' @voltagent/core dependency from ^2.3.8 → ^2.4.0; added changelog entries describing an onToolError hook and tool-aware live-eval/scorer notes.

Changes

Cohort / File(s) Summary
Removed changeset
\.changeset/good-bottles-wave.md, \.changeset/good-bottles-hike.md
Removed changeset markdown entries documenting the minor release(s).
Core package
packages/core/package.json, packages/core/CHANGELOG.md
Version bumped 2.3.8 → 2.4.0; changelog adds onToolError hook and related examples documenting transformed tool error payloads and workspace context exposure.
Scorers package
packages/scorers/package.json, packages/scorers/CHANGELOG.md
Version bumped 2.0.4 → 2.1.0; changelog adds tool-aware live-eval payloads and creates a tool-call accuracy scorer; dependency on @voltagent/core updated to ^2.4.0.
Example projects
examples/*/package.json
Updated @voltagent/core dependency from ^2.3.8^2.4.0 across many example package.json files (bulk dependency bumps).

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Dev as Developer
  participant Agent as Agent Runtime
  participant Tool as Tool
  participant Hook as onToolError Hook
  participant Serializer as Error Serializer

  Dev->>Agent: request that triggers tool call
  Agent->>Tool: call tool
  Tool-->>Agent: throws error
  Agent->>Hook: onToolError(error, operationContext)
  Hook-->>Agent: returns transformedErrorPayload
  Agent->>Serializer: serialize transformedErrorPayload
  Serializer-->>Dev: deliver serialized error payload
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 I hopped through changelogs, neat and quick,
Bumped versions, fixed a tiny nick.
Hooks for tool-errors, payloads now bright,
Examples updated — carrots in sight.
Thump-thump — a celebratory hop and a lick!

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The PR title 'ci(changesets): version packages' accurately reflects the main change—a Changesets-triggered release PR that versions and prepares packages for publication.
Description check ✅ Passed The PR description fully documents the releases with version numbers, detailed minor and patch changes, code examples, and rationale—exceeding the template requirements.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch changeset-release/main

No actionable comments were generated in the recent review. 🎉


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 82 files

Note: This PR contains a large number of files. cubic only reviews up to 75 files per PR, so some files may not have been reviewed.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/scorers/package.json (1)

33-34: ⚠️ Potential issue | 🟡 Minor

Peer dependency for @voltagent/core may be too broad.

The direct dependency requires ^2.4.0 (line 7), indicating scorers 2.1.0 relies on APIs introduced in core 2.4.0 (e.g., AgentEvalToolCall, AgentEvalToolResult). However, the peer dependency still allows ^2.0.0, which could let consumers install an older core version that lacks these APIs, potentially causing runtime errors when npm dedupes.

Consider tightening the peer dependency to ^2.4.0 to match.

@omeraplak
omeraplak merged commit a4a6cf8 into main Feb 13, 2026
22 checks passed
@omeraplak
omeraplak deleted the changeset-release/main branch February 13, 2026 02: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.

2 participants