Skip to content

dependabot:(deps): bump the github-actions group across 1 directory with 5 updates#6

Closed
dependabot[bot] wants to merge 354 commits intomainfrom
dependabot/github_actions/github-actions-4a29f0ea55
Closed

dependabot:(deps): bump the github-actions group across 1 directory with 5 updates#6
dependabot[bot] wants to merge 354 commits intomainfrom
dependabot/github_actions/github-actions-4a29f0ea55

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot bot commented on behalf of github Mar 18, 2026

Bumps the github-actions group with 5 updates in the / directory:

Package From To
actions/checkout 4 6
pnpm/action-setup 4 5
actions/setup-node 4 6
codecov/codecov-action 4 5
actions/upload-artifact 4 7

Updates actions/checkout from 4 to 6

Release notes

Sourced from actions/checkout's releases.

v6.0.0

What's Changed

Full Changelog: actions/checkout@v5.0.0...v6.0.0

v6-beta

What's Changed

Updated persist-credentials to store the credentials under $RUNNER_TEMP instead of directly in the local git config.

This requires a minimum Actions Runner version of v2.329.0 to access the persisted credentials for Docker container action scenarios.

v5.0.1

What's Changed

Full Changelog: actions/checkout@v5...v5.0.1

v5.0.0

What's Changed

⚠️ Minimum Compatible Runner Version

v2.327.1
Release Notes

Make sure your runner is updated to this version or newer to use this release.

Full Changelog: actions/checkout@v4...v5.0.0

v4.3.1

What's Changed

Full Changelog: actions/checkout@v4...v4.3.1

v4.3.0

What's Changed

... (truncated)

Changelog

Sourced from actions/checkout's changelog.

Changelog

v6.0.2

v6.0.1

v6.0.0

v5.0.1

v5.0.0

v4.3.1

v4.3.0

v4.2.2

v4.2.1

v4.2.0

v4.1.7

v4.1.6

... (truncated)

Commits

Updates pnpm/action-setup from 4 to 5

Release notes

Sourced from pnpm/action-setup's releases.

v5.0.0

Updated the action to use Node.js 24.

v4.4.0

Updated the action to use Node.js 24.

v4.3.0

What's Changed

New Contributors

Full Changelog: pnpm/action-setup@v4.2.0...v4.3.0

v4.2.0

When there's a .npmrc file at the root of the repository, pnpm will be fetched from the registry that is specified in that .npmrc file #179

v4.1.0

Add support for package.yaml #156.

Commits

Updates actions/setup-node from 4 to 6

Release notes

Sourced from actions/setup-node's releases.

v6.0.0

What's Changed

Breaking Changes

Dependency Upgrades

Full Changelog: actions/setup-node@v5...v6.0.0

v5.0.0

What's Changed

Breaking Changes

This update, introduces automatic caching when a valid packageManager field is present in your package.json. This aims to improve workflow performance and make dependency management more seamless. To disable this automatic caching, set package-manager-cache: false

steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
  with:
    package-manager-cache: false

Make sure your runner is on version v2.327.1 or later to ensure compatibility with this release. See Release Notes

Dependency Upgrades

New Contributors

Full Changelog: actions/setup-node@v4...v5.0.0

v4.4.0

... (truncated)

Commits

Updates codecov/codecov-action from 4 to 5

Release notes

Sourced from codecov/codecov-action's releases.

v5.0.0

v5 Release

v5 of the Codecov GitHub Action will use the Codecov Wrapper to encapsulate the CLI. This will help ensure that the Action gets updates quicker.

Migration Guide

The v5 release also coincides with the opt-out feature for tokens for public repositories. In the Global Upload Token section of the settings page of an organization in codecov.io, you can set the ability for Codecov to receive a coverage reports from any source. This will allow contributors or other members of a repository to upload without needing access to the Codecov token. For more details see how to upload without a token.

[!WARNING]
The following arguments have been changed

  • file (this has been deprecated in favor of files)
  • plugin (this has been deprecated in favor of plugins)

The following arguments have been added:

  • binary
  • gcov_args
  • gcov_executable
  • gcov_ignore
  • gcov_include
  • report_type
  • skip_validation
  • swift_project

You can see their usage in the action.yml file.

What's Changed

... (truncated)

Changelog

Sourced from codecov/codecov-action's changelog.

v5 Release

v5 of the Codecov GitHub Action will use the Codecov Wrapper to encapsulate the CLI. This will help ensure that the Action gets updates quicker.

Migration Guide

The v5 release also coincides with the opt-out feature for tokens for public repositories. In the Global Upload Token section of the settings page of an organization in codecov.io, you can set the ability for Codecov to receive a coverage reports from any source. This will allow contributors or other members of a repository to upload without needing access to the Codecov token. For more details see how to upload without a token.

[!WARNING] The following arguments have been changed

  • file (this has been deprecated in favor of files)
  • plugin (this has been deprecated in favor of plugins)

The following arguments have been added:

  • binary
  • gcov_args
  • gcov_executable
  • gcov_ignore
  • gcov_include
  • report_type
  • skip_validation
  • swift_project

You can see their usage in the action.yml file.

What's Changed

... (truncated)

Commits

Updates actions/upload-artifact from 4 to 7

Release notes

Sourced from actions/upload-artifact's releases.

v7.0.0

v7 What's new

Direct Uploads

Adds support for uploading single files directly (unzipped). Callers can set the new archive parameter to false to skip zipping the file during upload. Right now, we only support single files. The action will fail if the glob passed resolves to multiple files. The name parameter is also ignored with this setting. Instead, the name of the artifact will be the name of the uploaded file.

ESM

To support new versions of the @actions/* packages, we've upgraded the package to ESM.

What's Changed

New Contributors

Full Changelog: actions/upload-artifact@v6...v7.0.0

v6.0.0

v6 - What's new

[!IMPORTANT] actions/upload-artifact@v6 now runs on Node.js 24 (runs.using: node24) and requires a minimum Actions Runner version of 2.327.1. If you are using self-hosted runners, ensure they are updated before upgrading.

Node.js 24

This release updates the runtime to Node.js 24. v5 had preliminary support for Node.js 24, however this action was by default still running on Node.js 20. Now this action by default will run on Node.js 24.

What's Changed

Full Changelog: actions/upload-artifact@v5.0.0...v6.0.0

v5.0.0

What's Changed

BREAKING CHANGE: this update supports Node v24.x. This is not a breaking change per-se but we're treating it as such.

... (truncated)

Commits
  • bbbca2d Support direct file uploads (#764)
  • 589182c Upgrade the module to ESM and bump dependencies (#762)
  • 47309c9 Merge pull request #754 from actions/Link-/add-proxy-integration-tests
  • 02a8460 Add proxy integration test
  • b7c566a Merge pull request #745 from actions/upload-artifact-v6-release
  • e516bc8 docs: correct description of Node.js 24 support in README
  • ddc45ed docs: update README to correct action name for Node.js 24 support
  • 615b319 chore: release v6.0.0 for Node.js 24 support
  • 017748b Merge pull request #744 from actions/fix-storage-blob
  • 38d4c79 chore: rebuild dist
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore <dependency name> major version will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
  • @dependabot ignore <dependency name> minor version will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
  • @dependabot ignore <dependency name> will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
  • @dependabot unignore <dependency name> will remove all of the ignore conditions of the specified dependency
  • @dependabot unignore <dependency name> <ignore condition> will remove the ignore condition of the specified dependency and ignore conditions

minpeter and others added 30 commits August 20, 2025 00:54
* docs: update README to include link to Vercel AI SDK documentation

* docs: refine wording in README for clarity and consistency

* docs: add note about using any provider in example code
* fix: remove duplicate documentation link in README

* fix: correct formatting in README documentation link
* feat: Implement Vercel AI SDK evaluation tool

This commit introduces the initial version of the AI SDK Eval tool, a library for benchmarking `LanguageModel` instances from the Vercel AI SDK.

Key Features:
- An `evaluate` function that runs benchmarks against specified models.
- Support for console and JSON reporters.
- A suite of benchmarks for single-turn function calling based on the Berkeley Function-Calling Leaderboard (BFCL). This includes support for simple, parallel, multiple, and parallel-multiple function call evaluations.
- A well-defined `LanguageModelV2Benchmark` interface to allow for easy creation of custom benchmarks.

The implementation of multi-turn benchmarks has been deferred as agreed. The `json-generation` benchmark is temporarily disabled due to a persistent TypeScript compilation error (TS2589) that needs further investigation.

* chore: Add runnable example for eval tool

This commit adds a new `examples` package to demonstrate how to use the `@ai-sdk-tool/eval` library.

The example includes:
- A `simple-eval.ts` script showing how to use the `evaluate` function with a built-in benchmark and a model provider.
- A `package.json` with the necessary dependencies (`ai`, `@openrouter/ai-sdk-provider`).
- A `tsconfig.json` for compilation.
- A `.env.example` file to guide users on setting up their API keys.

* fix minor bug - checkpoint 2

* fix test

* update test gt

* rename example pages core -> parser-core

* fix import libs

* fix build error

* chore(changeset): add changeset for eval (minor) and parser (patch)

* chore(examples): add json-generation benchmark example to eval-core

* impl: json generation bench (sample bench impl)

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Woonggi Min <kali2005611@gmail.com>
* Version Packages

* fix auto gen changelog

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Woonggi Min <kali2005611@gmail.com>
* fix eval package config

* add changeset

* bump deps

* bump deps

* Update .changeset/cruel-bananas-teach.md

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Refactor BFCL benchmark tool handling in eval package

- Updated input schema handling to maintain plain JSON format initially, with a plan to wrap in jsonSchema later for compatibility.
- Converted tools array to an object format for better integration with the generateText function, changing tool choice to 'auto' for improved functionality.

* chore(parser): add vitest devDependency to fix pre-commit tests

* chore(parser): update parser-core example and fix import issues

* Refactor tools object creation in BFCL benchmark for improved readability

- Replaced the manual object construction with Object.fromEntries for converting the tools array to an object format.
- Maintained compatibility with jsonSchema wrapping for input schemas.

* Update packages/eval/src/benchmarks/bfcl.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update dependencies in package.json files across examples and packages

- Bump versions of `@ai-sdk/openai`, `@ai-sdk/openai-compatible`, and `ai` in example projects to 2.0.22, 1.0.13, and 5.0.26 respectively.
- Update `zod` dependency to version 4.1.3 in relevant packages.
- Adjust `@ai-sdk/provider-utils` version to 3.0.7 in the parser package.
- Refactor tools handling in the BFCL benchmark for improved clarity and maintainability.

* Refactor BFCL benchmark tool handling for enhanced maintainability

- Streamlined the tools object creation process in the BFCL benchmark by utilizing Object.fromEntries for better clarity.
- Ensured compatibility with jsonSchema wrapping for input schemas.
- Updated input schema handling to maintain a plain JSON format initially, with future plans for jsonSchema integration.

* Update packages/eval/src/benchmarks/bfcl.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update zod dependency to version 4.1.3 in pnpm-lock.yaml and refactor BFCL benchmark tool handling in eval package

- Updated zod version across various dependencies in pnpm-lock.yaml for compatibility.
- Enhanced the tools object creation in the BFCL benchmark by integrating the tool function for better structure and clarity.
- Maintained compatibility with jsonSchema for input schemas in the benchmark tool.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update dependencies and refactor tool middleware

- Bump  to version 5.0.26 and add  as a new dependency in the parser package.
- Introduce  alongside existing middleware for enhanced tool call handling.
- Refactor  to support new protocols for JSON and XML formats.
- Update TypeScript configuration to include additional libraries and improve strictness.
- Modify test cases to ensure compatibility with new middleware and protocols.

This commit enhances the parser's functionality and maintains compatibility with the latest SDK versions.

* Refactor korinaiToolMiddleware to xmlToolMiddleware

- Replaced korinaiToolMiddleware with xmlToolMiddleware in parser-core example and tests.
- Updated middleware implementation to support XML tool calls.
- Ensured all references and tests are aligned with the new middleware name.

This change enhances the clarity and functionality of the tool middleware in the parser package.

* Refactor hermesToolMiddleware to simplify protocol configuration

- Removed custom XML tag delimiters from the hermesToolMiddleware implementation.
- Updated the protocol to use the default jsonMixProtocol for improved clarity and maintainability.

This change streamlines the middleware setup and enhances the overall functionality of the parser package.

* Add test:watch script and update test command in package.json

- Introduced a new script "test:watch" in the root package.json to run tests in watch mode.
- Updated the "test" script in the parser package.json to use "vitest run" for improved clarity.

These changes enhance the testing capabilities and streamline the development workflow.

* Update packages/parser/src/index.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Enhance configuration and formatting settings

- Updated .editorconfig to enforce consistent formatting rules across all file types.
- Added .prettierignore to exclude specific directories and file types from formatting.
- Modified package.json to expand the file types checked and formatted by Prettier.
- Updated .vscode/settings.json to set Prettier as the default formatter for various file types.

These changes improve code consistency and streamline the development environment.

* Update package.json scripts for parallel execution and add VSCode extension recommendations

- Modified package.json scripts to enable parallel execution for build, test, lint, and release commands.
- Introduced a new .vscode/extensions.json file to recommend ESLint and Prettier extensions for improved development experience.

These changes enhance the efficiency of script execution and streamline the development environment setup.

* Update vitest configuration for improved testing and coverage

- Disabled watch mode for CI environments.
- Enhanced coverage settings by changing reporters and specifying reports directory.
- Included all TypeScript files in coverage and excluded test files.
- Set environment to Node and enabled global variables for better module resolution.

These changes optimize the testing setup and ensure comprehensive coverage reporting.

* Enhance tool call middleware with error handling options

- Added an `onError` callback option to the `toolCallMiddleware` configuration, allowing custom error handling during tool call processing.
- Updated `parseGeneratedText` and `createStreamParser` methods in both JSON and XML protocols to utilize the new error handling mechanism.
- Improved error logging by providing detailed messages and metadata when tool call processing fails.

These changes enhance the robustness of the middleware by allowing developers to define custom error handling strategies.

* Refactor tool stream handling by removing unused normalToolStream function

- Removed the `normalToolStream` function from `stream-handler.ts` as it was not utilized in the current implementation.
- This change simplifies the codebase and improves maintainability by eliminating unnecessary code.

* Remove MathAPI mock implementation from benchmarks

- Deleted the MathAPI class from the mock-apis directory as it was no longer needed for the current benchmark tests.
- This cleanup simplifies the codebase and reduces unnecessary complexity in the benchmarks.

* Refactor parser middleware and protocols for improved clarity and functionality

- Consolidated protocol imports in `index.ts` for cleaner code structure.
- Enhanced `tool-call-middleware.ts` by removing unused functions and simplifying error handling options.
- Updated JSON and XML protocols to utilize the new `escapeRegExp` utility for regex operations.
- Improved parsing logic in middleware to handle tool call content more robustly.

These changes streamline the middleware implementation and enhance the overall maintainability of the parser package.

* Add tests for tool choice stream and middleware functionality

- Introduced comprehensive tests for the `toolChoiceStream` function, validating its behavior with valid and invalid JSON inputs.
- Added tests for the `createToolMiddleware` function, ensuring correct handling of tool-call content and error scenarios.
- Implemented tests for various protocols, including JSON and XML, to cover edge cases in streaming and parsing.
- Enhanced utility tests for error handling and tool management functions.

These additions improve test coverage and ensure the robustness of the parser's tool handling capabilities.

* Enhance tool choice stream and middleware tests

- Added additional test cases for the `toolChoiceStream` function to cover more edge cases.
- Improved existing tests for the `createToolMiddleware` function, focusing on various tool-call scenarios.
- Updated protocol tests to ensure compatibility with recent changes in error handling and parsing logic.

These enhancements increase test coverage and ensure the reliability of the tool handling features.

* Refactor tool choice stream and middleware tests for improved clarity

- Consolidated test cases for the `toolChoiceStream` and `createToolMiddleware` functions to enhance readability and maintainability.
- Streamlined error handling tests to better align with recent changes in middleware functionality.
- Updated protocol tests to ensure they reflect the latest parsing logic and error handling improvements.

These modifications improve the organization of test cases and ensure they accurately reflect the current implementation of tool handling features.

* Add tests for jsonMixProtocol streaming and enhance xmlProtocol buffer handling

* Update tool call tags in tests and protocol for consistency

- Replaced legacy `<tool_code>` tags with `<tool_call>` in `tool-call-middleware.test.ts` and `json-mix-protocol.stream.test.ts` to ensure uniformity across the codebase.
- Modified the `jsonMixProtocol` implementation to remove legacy tag normalization, directly using the updated `<tool_call>` format for parsing and streaming.
- Enhanced test coverage by adding a new test case for handling tool calls split across multiple chunks.

These changes improve the clarity and consistency of tool call handling in the parser.

* Enhance jsonMixProtocol handling and add debug output

- Updated the `jsonMixProtocol` implementation to flush remaining buffered text when not inside a tool call, ensuring proper handling of partial start tag suffixes.
- Added debug output in the test file to assist with tracking the output of the `collect` function during tests.

These changes improve the robustness of the protocol handling and aid in debugging during test execution.

* Update tool call models and enhance test coverage

- Changed the model used in `00-stream-tool-call.ts` and `00-tool-call.ts` from `z-ai/glm-4.5-air` to `google/gemma-3-27b-it`, while commenting out the previous model configuration.
- Added tests for formatting assistant tool calls and results in `index.test.ts`, covering various middleware scenarios including `gemma`, `hermes`, and `xml`.
- Updated type guards in `type-guards.ts` to accommodate both JSON string and object inputs for tool calls.

These modifications improve the flexibility of tool call handling and enhance the robustness of the testing framework.

* Add support note for 'none' toolChoice type and introduce legacy stream handler tests

- Added a TODO comment in  to indicate future support for the 'none' toolChoice type.
- Created a new test file  to validate the behavior of the  with various tool call scenarios, including handling valid and malformed tool calls.

These changes enhance the middleware's documentation and improve test coverage for stream parsing functionality.

* Update dependencies in pnpm-lock.yaml and package.json

- Added '@ai-sdk/openai-compatible' version 1.0.13 and 'ai' version 5.0.26 to devDependencies in both pnpm-lock.yaml and package.json.
- Included 'zod' version 4.1.3 in devDependencies of package.json.
- Marked source-map@0.8.0-beta.0 as deprecated in pnpm-lock.yaml.

These updates ensure the project uses the latest compatible versions of dependencies and improves overall stability.

* Add friendli API integration and update model references in stream tests

- Introduced a new OpenAI-compatible configuration for the friendli API, allowing for additional model usage.
- Updated the model reference for the hermes language model to a newer version.
- Changed the reasoning model to utilize the new friendli API instead of the previous openrouter model.
- Enhanced output formatting for reasoning deltas in the streaming function.

These changes expand the capabilities of the parser by integrating new models and improving output clarity.

* Refactor tool call handling and enhance test coverage

- Updated the implementation of tool call models to improve flexibility and maintainability.
- Enhanced test coverage for tool call scenarios, including various middleware interactions and edge cases.
- Streamlined error handling tests to align with recent changes in the middleware functionality.

These changes improve the robustness of tool call handling and ensure comprehensive testing of the parser's capabilities.

* Update Node.js version and enhance test reporting

- Changed the Node.js version in the GitHub Actions workflow from 18 to 20 for improved compatibility.
- Updated the parser's package.json to configure Vitest to output test results in JUnit format, saving them to junit.xml.
- Added junit.xml to the .gitignore file to prevent it from being tracked in version control.

These changes ensure the project is using a more recent Node.js version and improve test reporting capabilities.

* Enhance tool call middleware to condense multiple tool responses into single user text content

- Updated the `createToolMiddleware` function to condense multiple text parts into a single text block when the assistant's content consists solely of text.
- Improved handling of tool response messages by mapping them to a single user text content block, ensuring clarity in the output.
- Added a new test case to validate the functionality of condensing tool response messages into a single user message.

These changes improve the efficiency of message handling in the middleware and enhance test coverage for this functionality.

* Remove unused import of createOpenAICompatible from multiple parser files

- Eliminated the import statement for `createOpenAICompatible` in `02-choice-required.ts`, `02-choice-toolname.ts`, `02-stream-choice-required.ts`, and `02-stream-choice-toolname.ts` as it is not utilized in these files.
- This cleanup enhances code clarity and reduces unnecessary dependencies.

These changes streamline the codebase by removing redundant imports.

* Update packages/parser/src/protocols/json-mix-protocol.partial-tag.test.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update packages/parser/src/protocols/json-mix-protocol.stream.test.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update packages/parser/src/tool-call-middleware.merge-users.test.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Refactor XML protocol handling to use optional chaining

- Updated the XML protocol implementation to utilize optional chaining when accessing the `#text` property, enhancing code safety and readability.
- This change ensures that the code handles cases where the property may not exist without throwing errors.

These modifications improve the robustness of the XML protocol handling in the parser.

* Remove unnecessary blank line in tool-call-middleware.merge-users.test.ts

- Cleaned up the test file by removing an extraneous blank line, enhancing code readability without altering functionality.

This minor adjustment contributes to a cleaner codebase.

* Refactor XML protocol input handling for improved robustness

- Updated the `formatToolCall` method to enhance input handling by checking the type of `toolCall` and safely accessing the `input` property.
- Improved error handling when parsing JSON strings, ensuring that both string and object inputs are processed correctly.

These changes enhance the reliability and clarity of the XML protocol implementation in the parser.

* Update packages/parser/src/index.ts

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Refactor .editorconfig to streamline settings

- Removed redundant global settings and retained specific configurations for Markdown files.
- This cleanup enhances clarity and maintains consistent formatting rules across the project.

* Update tool call end delimiter in parser middleware

- Changed the tool call end delimiter from "\n```" to "\n``" to align with common gemma output conventions.
- This adjustment improves consistency in the tool call formatting within the parser.

* Enhance tool call middleware and error handling

- Updated `toolChoiceStream` to accept an optional `options` parameter for error handling.
- Improved error reporting in JSON parsing within `toolChoiceStream` and `createToolMiddleware`.
- Added tests to ensure proper handling of tool choice requirements and non-text content.
- Introduced XML utility functions for better XML handling and parsing.

These changes improve the robustness and clarity of the tool call middleware and enhance error management across the parser.

* Update packages/parser/src/index.ts

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Update packages/parser/src/index.ts

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Refactor error handling in tool call middleware and XML protocol

- Updated `createToolMiddleware` to use the `onError` callback for non-fatal warnings instead of console warnings.
- Refactored XML protocol to utilize the new `hasInputProperty` utility for safer input handling.
- Adjusted tests to reflect changes in error handling behavior, ensuring no console warnings are triggered when `onError` is not provided.

These improvements enhance the robustness and clarity of error management across the parser.

* Update packages/parser/src/protocols/json-mix-protocol.ts

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Enhance error handling in XML protocol

- Updated error handling in the XML protocol to include the error object in the `onError` callback, providing more context for error reporting.
- This change improves the clarity and robustness of error management during XML tool calls.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Enhance tool call middleware and XML protocol handling

- Introduced `xmlToolMiddleware` alongside existing middleware for improved tool call processing.
- Added schema-based coercion for tool call inputs, ensuring proper type handling according to JSON schemas.
- Updated XML protocol to utilize the new coercion logic, enhancing robustness in input handling.
- Refactored tests to validate the new coercion behavior and ensure compatibility with updated middleware.

These changes improve the clarity and functionality of tool call handling in the parser package.

* Enhance BFCL benchmark capabilities by adding multiple benchmark options

- Imported additional benchmark functions: `bfclMultipleBenchmark`, `bfclParallelBenchmark`, and `bfclParallelMultipleBenchmark` from the `@ai-sdk-tool/eval` package.
- Updated the benchmarks array in the main function to include the new benchmark options, improving the evaluation flexibility and performance testing capabilities.

These changes expand the benchmarking functionality within the eval-core example, allowing for more comprehensive performance assessments.

* Add a heuristic-based typecaster to the xml tool parser.

* Refactor BFCL example and XML protocol handling

- Updated the BFCL example to comment out unused benchmark options, improving clarity and focus on relevant benchmarks.
- Changed the reporter format in the main function from "console" to "json" for better output handling.
- Enhanced XML protocol coercion logic to handle string inputs more robustly, allowing for better parsing of JSON-like strings and arrays.
- Added new test cases to validate the coercion of various input formats, ensuring comprehensive coverage of edge cases.

These changes improve the usability and reliability of the BFCL example and XML protocol handling.

* Enhance BFCL example and benchmark functionality

- Added `morphExpToolMiddleware` to the BFCL example for improved tool call processing.
- Updated the main function to include `morphExpGemma27b` in the models array, enhancing evaluation capabilities.
- Changed the reporter type to include "console.debug" for more detailed output options.
- Modified the `check` function in benchmarks to include an `error_type` property for better error reporting.
- Implemented concurrency control in benchmark execution, allowing for more efficient test case processing.

These changes improve the flexibility and clarity of the BFCL example and benchmark evaluations.

* Enhance BFCL evaluation and XML protocol handling

- Introduced `morphExpToolMiddleware` with a detailed tool system prompt template for improved XML function call processing.
- Updated the evaluation function to support keyed model entries, allowing for better identification of models during benchmark execution.
- Enhanced error reporting in the console and debug reporters to include optional model keys for clearer output.
- Refactored benchmark handling to compute parameter-level diffs, improving the clarity of function call discrepancies.

These changes enhance the flexibility and clarity of the BFCL evaluation process and improve XML protocol handling.

* Add comprehensive tests for tool call middleware and protocols

- Introduced new test files for `index.prompt-template`, `index`, `stream-handler.toolchoice`, `stream-protocol-compliance`, and various tool call middleware scenarios.
- Enhanced coverage for `createToolMiddleware`, validating its behavior with different tool configurations and error handling.
- Added tests for XML and JSON protocols to ensure robust parsing and streaming functionality.
- Implemented edge case tests for tool choice streams and middleware interactions, improving overall test reliability.

These additions significantly enhance the testing framework, ensuring better validation of tool call handling and protocol compliance.

* Refactor tool call middleware by removing unused imports

- Eliminated unused import statements for `fixToolCallWithSchema`, `unwrapJsonSchema`, and `getSchemaType` from `tool-call-middleware.ts`.
- This cleanup enhances code clarity and reduces unnecessary dependencies, streamlining the middleware implementation.

* Refactor tool call middleware and update coercion logic

- Renamed the `coerceBySchema` import to `coerceToolCallInput` for clarity in `tool-call-middleware.ts`.
- Removed the unused `coerceToolCallInput` function from `tool-call-middleware.ts` and replaced it with a wrapper that calls `fixToolCallWithSchema` in `coercion.ts`, maintaining backward compatibility.
- Consolidated utility imports in `index.ts` to streamline the code structure.
- Deleted the obsolete test file `tool-call-middleware.coercion.test.ts`, improving overall code cleanliness.

These changes enhance the clarity and maintainability of the tool call middleware and coercion logic.

* Add wrapGenerate and wrapStream functions to handle tool choice logic

- Introduced `wrapGenerate` and `wrapStream` functions in `generate-handler.ts` and `stream-handler.ts` respectively to manage tool choice scenarios.
- Enhanced `tool-call-middleware.ts` to utilize the new wrapper functions, improving the middleware's handling of tool calls and error management.
- Updated tests in `tool-call-middleware.branches.test.ts` to ensure proper invocation of the new stream and generate wrappers.

These changes improve the flexibility and clarity of tool call handling in the parser package.

* Refactor tool call middleware to streamline parameter transformation

- Updated the `transformParams` function in `tool-call-middleware.ts` to utilize a new `transformParams` utility, enhancing clarity and maintainability.
- Removed redundant code related to prompt processing and tool choice handling, simplifying the middleware's logic.
- Improved the overall structure of the middleware to better align with the new utility functions, ensuring more efficient tool call processing.

These changes enhance the readability and efficiency of the tool call middleware in the parser package.

* Refactor stream handling and prompt transformation in parser package

- Introduced a new `wrapStream` function in `stream-handler.ts` to manage tool choice logic more effectively.
- Moved the `convertToolPrompt` function to `transform-handler.ts`, enhancing the clarity and maintainability of prompt processing.
- Updated the `transformParams` function to utilize the new `convertToolPrompt`, streamlining the transformation of prompts and improving error handling.

These changes improve the structure and readability of the stream and transformation handling in the parser package.

* Remove obsolete test files for tool call middleware

- Deleted several test files related to tool call middleware, including `index.prompt-template.test.ts`, `tool-call-middleware.convert-prompt.test.ts`, `tool-call-middleware.errors.test.ts`, `tool-call-middleware.merge-users.test.ts`, and `tool-call-middleware.positive.test.ts`.
- This cleanup improves the overall structure and maintainability of the test suite by removing outdated and redundant tests.

These changes enhance the clarity and focus of the testing framework in the parser package.

* Refactor transformParams function for improved clarity and structure

- Changed the export of the `transformParams` function from a constant to a standard async function declaration, enhancing readability.
- Updated the function's closing syntax from a closure to a block, aligning with common JavaScript practices.
- These modifications improve the overall clarity and maintainability of the transformation logic in the parser package.

* Refactor tool call middleware tests by consolidating positive path scenarios

- Moved the positive path test for `createToolMiddleware` from a separate file to the main test suite, enhancing organization and maintainability.
- This change improves the clarity of the testing framework by consolidating related tests and ensuring better coverage for the tool call middleware functionality.

* Add test for preserving assistant reasoning and formatting tool calls

- Introduced a new test case in `transform-handler.test.ts` to verify that the `transformParams` function correctly preserves assistant reasoning parts while formatting tool calls.
- The test ensures that both the tool call text and the original reasoning content are retained in the output, enhancing the coverage of the transformation logic in the parser package.

* Enhance ToolCallProtocol with detailed documentation and new methods

- Added comprehensive JSDoc comments to the ToolCallProtocol interface, clarifying the purpose and usage of each method.
- Introduced new methods for formatting tool calls, parsing generated text, and creating a stream parser, improving the interface's functionality and usability.
- Updated the XML protocol implementation to remove unused imports, streamlining the code structure.

These changes improve the clarity and maintainability of the tool call protocols in the parser package.

* Enhance BFCL and XML Protocol with improved schema handling and coercion logic

- Updated the BFCL benchmark to include original schema information in middleware options, enhancing tool call processing.
- Improved the XML protocol to utilize original schemas when available, ensuring better schema handling during tool calls.
- Enhanced coercion logic to handle multiline JSON strings and nested objects, improving robustness in parsing and validation.
- Added tests to verify the handling of multiline JSON strings in object properties, ensuring correctness in coercion behavior.

These changes improve the functionality and reliability of the BFCL and XML protocol implementations in the parser package.

* Enhance BFCL and XML Protocol with improved configuration and parsing logic

- Updated BFCL configuration to include additional benchmarks and JSON options, enhancing tool call capabilities.
- Improved XML protocol parsing to handle various XML patterns, including heuristic array and tuple parsing, ensuring better data extraction.
- Enhanced coercion logic to manage array-like structures in XML, improving robustness in data handling.

These changes improve the functionality and reliability of the BFCL and XML protocol implementations in the parser package.

* Refactor XML protocol parsing for enhanced data handling

- Updated XML protocol parsing logic to improve handling of complex XML structures, including better support for nested elements and attributes.
- Enhanced error handling during parsing to provide clearer feedback on malformed XML inputs, improving robustness.
- Added unit tests to verify the correctness of the new parsing logic and ensure reliability in various scenarios.

These changes enhance the functionality and reliability of the XML protocol implementation in the parser package.

* Enhance XML protocol parsing with improved attribute handling and validation

- Updated XML protocol parsing to better handle attributes and nested elements, ensuring more accurate data extraction.
- Improved validation logic to catch and report errors in malformed XML structures, enhancing robustness.
- Added additional unit tests to cover new parsing scenarios and validate the correctness of the implementation.

These changes improve the reliability and functionality of the XML protocol in the parser package.

* Enhance XML protocol tests with type annotations and improved assertions

- Updated XML protocol heuristic parsing and streaming tests to include type annotations for `tools`, enhancing type safety and clarity.
- Improved assertions in coercion heuristic handling tests to ensure type correctness of results, providing better validation of the coercion logic.
- These changes improve the robustness and maintainability of the test suite in the parser package.

* chore(husky): run pnpm check-types on pre-commit

* chore(husky): add pnpm lint to pre-commit

* chore(husky): run fmt:fix and re-stage before lint/typecheck/test

* chore(husky): format and re-stage only staged files affected by Prettier

* chore(husky): document pre-commit behavior and add shebang

* Refactor BFCL and Parser Core Imports and Update XML Protocol Test Assertions

- Removed unused `openrouter` configuration from BFCL example, streamlining the code.
- Simplified imports in parser core files by removing `xmlToolMiddleware`, which is no longer needed.
- Updated XML protocol heuristic parsing test to correct precision in assertions, enhancing test accuracy.

These changes improve code clarity and maintainability across the examples and tests.

* Update xmlToolMiddleware description for clarity

- Revised the description in the xmlToolMiddleware to enhance clarity by simplifying the language used in the prompt.
- This change aims to improve the understanding of the AI model's capabilities and instructions for function calls.

* Refactor Type Handling Across Parser and Utility Files

- Updated type definitions in various parser files to replace `any` with `unknown`, enhancing type safety and clarity.
- Improved type handling in the `coercion` and `relaxed-json` utilities to ensure better validation and error handling.
- Removed unnecessary type assertions and streamlined code for better maintainability.

These changes contribute to a more robust and type-safe codebase in the parser package.

* Update dependencies to latest versions

- Upgraded `ai` package from version 5.0.26 to 5.0.27 across multiple package.json files.
- Updated `zod` package from version 4.1.3 to 4.1.5 in relevant package.json files, ensuring compatibility and access to the latest features and fixes.
- Adjusted pnpm-lock.yaml to reflect these dependency changes, maintaining consistency across the project.

These updates enhance the overall stability and functionality of the codebase.

* Update packages/parser/src/protocols/xml-protocol.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- Updated the `check-types` task in `turbo.json` to depend on both `build` and `check-types`, ensuring proper execution order.
- Added input specification for `check-types` to include default Turbo inputs and the `dist/**` directory, improving type checking accuracy.
- Modified the pre-commit hook to skip heavy operations in CI environments, optimizing performance during automated workflows.

These changes improve the efficiency and reliability of the build and type-checking processes.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* aa

* Update package names in examples and configuration

- Changed package names from `@ai-sdk-tool/example/*` to `@ai-sdk-tool/examples/*` in `package.json` files for `eval-core` and `parser-core` to maintain consistency.
- Updated the `.changeset/config.json` to reflect the new package names in the ignore list.

These changes enhance clarity and ensure uniformity across the project structure.
* Refactor parser index file to remove unused exports

- Eliminated unused exports from the parser's index file, enhancing code clarity and reducing unnecessary dependencies. This cleanup contributes to a more streamlined and maintainable codebase.

* Enhance code quality and tooling configuration

- Added `prettier-plugin-organize-imports` to the Prettier configuration for improved import organization.
- Integrated `eslint-plugin-simple-import-sort` and `eslint-plugin-unused-imports` into the ESLint configuration to enforce better import management and warn about unused imports.
- Updated the `fmt:fix` script in `package.json` to run lint fixes before formatting, ensuring a cleaner codebase.
- Made various import adjustments across multiple files to align with the new ESLint rules and improve code clarity.

These changes enhance the maintainability and readability of the codebase by enforcing consistent formatting and import practices.

* Refactor import paths for consistency across parser files

- Updated import statements in multiple files to use absolute paths (e.g., from "../src" to "@/index" and "@/utils"), enhancing clarity and maintainability.
- This change standardizes the import structure, making it easier to navigate the codebase and reducing potential errors related to relative paths.

These modifications improve the overall organization and readability of the parser package.

* Update TypeScript configuration and refactor import paths

- Enhanced `tsconfig.json` by adding a schema reference, updating compiler options for better type handling, and refining module resolution settings.
- Refactored import statements in several benchmark and reporter files to use absolute paths, improving consistency and clarity across the codebase.

These changes improve the maintainability and readability of the project, ensuring a more robust TypeScript setup.

* Update project configuration and dependencies

- Added new entries to  to exclude , , , and TypeScript declaration files from formatting.
- Updated  to include  version 2.0.0 as a dependency for the  package.
- Modified  in the  package to include  version 2.0.0 and added linting scripts for TypeScript files.

These changes enhance the project's configuration and ensure better dependency management and code quality practices.

* Refactor import statements for improved organization

- Rearranged import statements in `evaluate.ts`, `bfcl.ts`, and `json-generation.ts` to enhance clarity and maintainability by grouping related imports together.
- Updated error handling in `console.debug.ts` to ignore JSON parse errors for debug lines, improving robustness in logging.

These changes streamline the code structure and enhance readability across the evaluation and reporting modules.

* Refactor import statements and enhance type safety across multiple files

- Rearranged import statements in `bfcl-simple.ts`, `json-generation.ts`, and parser core files to improve organization and clarity.
- Updated type definitions in various files to replace `any` with `unknown`, enhancing type safety and maintainability.
- Improved error handling in `evaluate.ts` and `console.debug.ts` to ensure better type validation and robustness.

These changes contribute to a cleaner, more maintainable codebase with improved type safety and organization.

* Refactor error handling and remove unused code in evaluation modules

- Removed unnecessary code in `console.debug.ts` to streamline error handling during JSON parsing.
- Cleaned up import statements in `bfcl.ts` by eliminating the ESLint directive for explicit `any` types, contributing to improved type safety.

These changes enhance code clarity and maintainability across the evaluation and reporting modules.

* Refactor schema handling in BFCL benchmark

- Updated the `fixSchema` function to return `unknown` instead of a specific `ToolSchemaObject`, enhancing type flexibility.
- Improved the logic for determining valid input schemas, ensuring that only valid JSON Schema objects are returned, which contributes to better type safety and clarity in schema handling.

These changes streamline the schema processing logic and enhance type safety in the BFCL benchmark implementation.
- Updated XML protocol implementation to utilize optional chaining for safer property access, improving code readability and robustness.
- Enhanced error handling to include detailed error objects in the `onError` callback, providing better context during XML tool calls.
- Improved input handling in the `formatToolCall` method to ensure correct processing of both string and object inputs, enhancing reliability.

These changes contribute to a more robust and maintainable XML protocol implementation in the parser package.
* Refactor tool call handling and enhance debugging capabilities

- Updated the `00-stream-tool-call.ts` example to utilize `xmlToolMiddleware` instead of `gemmaToolMiddleware`, improving compatibility with the new XML protocol.
- Enhanced `generate-handler.ts` and `stream-handler.ts` to include detailed debug logging for parsed chunks and raw text, allowing for better tracking of tool call processing.
- Introduced `extractToolCallSegments` methods in both `jsonMixProtocol` and `morphXmlProtocol` to facilitate debugging by extracting tool call segments from text.
- Added a new `debug.ts` utility for managing debug levels and logging, improving the overall debugging experience in the parser package.

These changes enhance the clarity and maintainability of tool call handling while providing better insights during development and testing.

* Update debug utility to enhance logging configuration

- Changed environment variable from `AI_TOOL_MW_DEBUG` to `DEBUG_PASER_MW` for better clarity in debug level management.
- Updated logging style configuration to utilize `DEBUG_PASER_MW_STYLE`, improving the customization of debug output.

These modifications streamline the debugging process and enhance the overall logging capabilities in the parser package.

* Update README files and add example documentation for parser and eval packages

- Revised the main README to reflect the monorepo structure and provide clearer package descriptions.
- Added new README files for `examples/eval-core` and `examples/parser-core`, detailing runnable examples for the evaluation and parser packages.
- Updated installation instructions and quickstart guides across various README files to enhance clarity and usability.

These changes improve the documentation and accessibility of examples for users working with the AI SDK tooling.

* Update AGENTS.md and README files for clarity and accuracy

- Revised AGENTS.md to remove references to AI SDK v2, ensuring consistency in documentation regarding middleware capabilities.
- Updated README files to enhance descriptions of the parser and eval packages, including new badges for the eval package.
- Improved installation instructions and added usage examples to facilitate better understanding of the middleware functionalities.

These changes enhance the documentation's clarity and ensure users have accurate information regarding the AI SDK tooling.

* Refactor parser and eval package documentation for clarity

- Revised AGENTS.md to enhance clarity regarding middleware capabilities and usage.
- Updated README files for parser and eval packages, improving descriptions and adding usage examples.
- Enhanced installation instructions to facilitate better understanding of the middleware functionalities.

These changes improve the documentation's clarity and ensure users have accurate information regarding the AI SDK tooling.

* Update documentation for gemmaToolMiddleware to clarify usage

- Revised descriptions of `gemmaToolMiddleware` in both `protocols.md` and the parser's README to specify the use of markdown code fences for tool calls.
- Enhanced clarity regarding the prompt tailored for Gemma, ensuring users have accurate information on middleware functionality.

These updates improve the documentation's precision and usability for developers working with the AI SDK tooling.

* Update docs/guides/tool-calling.md

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Update debugging documentation to correct environment variable names

- Changed references from `DEBUG_PASER_MW` to `DEBUG_PARSER_MW` across multiple documentation files, ensuring consistency in logging configuration.
- Updated related environment variable styles and usage instructions to reflect the new naming convention.

These changes enhance the clarity and accuracy of the debugging documentation for users working with the AI SDK tooling.

* Update tool-calling documentation for clarity

- Revised descriptions of `gemmaToolMiddleware` and `hermesToolMiddleware` to correct formatting examples, ensuring accurate representation of tool call syntax.
- Enhanced clarity in the documentation to improve usability for developers working with the AI SDK tooling.

* Enhance stream handling with improved debug logging and tool call processing

- Refactored the `wrapStream` function in `stream-handler.ts` to streamline debug logging based on the debug level.
- Introduced new logging for raw and parsed chunks to facilitate better tracking of tool call processing.
- Simplified the handling of tool call options and improved the extraction of tool call segments, enhancing overall clarity and maintainability.

These updates improve the debugging experience and ensure more accurate processing of tool calls in the AI SDK middleware.

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update configuration files and enhance example imports

- Expanded `.prettierignore` to include additional directories and files for improved formatting control.
- Removed the `prettier-plugin-organize-imports` from `.prettierrc.json` to simplify the configuration.
- Updated formatting scripts in `package.json` to target specific directories, enhancing clarity and organization.
- Adjusted dependencies in `turbo.json` to ensure proper execution order for tasks.
- Refactored import statements in example files to improve consistency and maintainability.

These changes enhance the project's configuration and improve the clarity of example implementations.

* Enhance VSCode settings for improved linting and formatting

- Added ESLint auto-fix on save to the VSCode configuration, ensuring consistent code quality and organization.
- Maintained existing formatting settings to streamline the development experience.

These updates improve the development environment by automating code quality checks and enhancing overall productivity.
* morph-xml: preserve raw inner text for string-typed args; add tests; adjust eval examples (model targets, reporter)

* chore(changeset): release @ai-sdk-tool/parser patch

* fix(tests): use constant for chunk size in XML protocol streaming test

* feat(morph-xml): implement duplicate string tag handling in XML protocol

- Added logic to cancel tool calls when duplicate string tags are detected for properties of type `string`, ensuring malformed outputs are managed correctly.
- Updated `morphXmlProtocol` to emit warnings via `options.onError` and return the original text when cancellations occur.
- Enhanced tests to verify the new behavior for both streaming and non-streaming scenarios, ensuring robust error handling in the XML protocol.

* refactor(eval-core): update model references in bfcl-simple example

- Changed model references in `bfcl-simple.ts` from `skt/A.X-3.1` to `google/gemma-3-27b-it` for improved compatibility with the latest model.
- Updated `morph-xml-protocol.ts` to use a constant for warning on duplicate string tags, enhancing code clarity.
- Enhanced type safety in XML protocol tests by using type guards for tool call and text parts, ensuring more robust test assertions.

* feat(eval): add temperature control option for model evaluation

- Introduced a new optional `temperature` parameter in the evaluation options to control model generation variability.
- Updated the `evaluate` function to accept and pass the temperature setting to benchmarks.
- Modified existing benchmarks to utilize the temperature parameter during execution, enhancing flexibility in model evaluations.
- Added a sample usage of the temperature parameter in the `bfcl-simple.ts` example for demonstration purposes.

* refactor(eval): streamline temperature handling in benchmarks

- Updated temperature handling in benchmark files to improve clarity and consistency.
- Replaced repetitive temperature assignment logic with a simplified approach using a temporary variable.
- Ensured type safety and readability in the `bfcl.ts`, `json-generation.ts`, and `evaluate.ts` files, enhancing overall code maintainability.

* refactor(parser): simplify array mapping in morphXmlProtocol

- Streamlined the array mapping logic for handling multiple tags with the same name in the `morphXmlProtocol`.
- Removed unnecessary filtering and improved readability by consolidating mapping operations.
- Enhanced code clarity while maintaining existing functionality for string-type properties.

* refactor(eval): enhance benchmark execution with optional config parameter

- Updated the `runSingleBenchmark` function to accept an optional `config` parameter, allowing for more flexible benchmark execution.
- Modified benchmark calls in the `evaluate` function to utilize the new config parameter, specifically for temperature settings.
- Improved code clarity and maintainability by streamlining the handling of benchmark configurations.

* refactor(parser): improve schema type handling in morphXmlProtocol

- Replaced the custom `getSchemaTypeString` function with a shared `getSchemaType` utility from coercion utils for better consistency and maintainability.
- Removed redundant code related to schema type resolution, enhancing clarity in the `morphXmlProtocol`.
- Streamlined the handling of string-type properties to prefer raw inner content, ensuring more robust parsing behavior.

* refactor(parser): consolidate argument processing in morphXmlProtocol

- Introduced a shared helper function `processParsedArgs` to streamline the handling of parsed XML arguments according to schema and heuristics.
- Removed redundant argument processing logic from `morphXmlProtocol`, enhancing code clarity and maintainability.
- Improved handling of various XML patterns and error management for duplicate string tags, ensuring more robust parsing behavior.

* refactor(parser): export processParsedArgs for internal use and enhance XML argument processing

- Made the `processParsedArgs` function exportable for internal use, facilitating testing and modularity.
- Improved argument processing logic to handle various XML patterns, including trimming and coercing numeric-like strings.
- Added comprehensive unit tests for `processParsedArgs` to ensure robust behavior across different scenarios, including handling of duplicate tags and nested structures.

* refactor(parser): enhance numeric parsing in morphXmlProtocol

- Updated the `processParsedArgs` function to ensure consistent parsing of numeric keys by specifying a radix in `parseInt`.
- Improved the sorting logic for keys to enhance clarity and maintainability while preserving existing functionality for indexed tuples.

* refactor(parser): improve regex for tag extraction and enhance indexed tuple detection

- Updated the regex in `extractRawInner` to allow for attributes in XML tags, improving the robustness of tag extraction.
- Refactored the logic in `processParsedArgs` to simplify the detection of indexed tuples, enhancing code clarity while maintaining existing functionality.

* refactor(parser): enhance XML tag extraction and argument processing

- Improved the `extractRawInner` function to accurately extract raw inner content from top-level XML tags, preserving nested markup and avoiding sibling bleed.
- Added new helper functions to support the detection of tag occurrences and manage nested structures effectively.
- Updated `processParsedArgs` to handle duplicate string-typed tags more robustly, including logic to cancel tool calls when duplicates are detected.
- Expanded unit tests to cover various scenarios, ensuring correct handling of attributes, nested markup, and self-closing tags.

* refactor(parser): enhance XML name parsing in morph-xml-protocol

- Exported the `extractRawInner`, `findFirstTopLevelRange`, and `countTagOccurrences` functions for improved modularity and testing.
- Introduced helper functions for XML name character validation to enhance the robustness of tag extraction.
- Updated logic in tag extraction functions to utilize the new helper functions, improving clarity and maintainability.
- Ensured consistent handling of XML tag names, accommodating various naming conventions.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Add LICENSE and NOTICE files; update package.json and documentation for Apache-2.0 license compliance

- Introduced LICENSE and NOTICE files to clarify licensing terms under Apache License 2.0.
- Updated package.json files across various packages and examples to reflect the new license.
- Enhanced README and documentation files to include license information and distribution requirements.

These changes ensure proper licensing and compliance across the project.

* Refactor XML protocol handling and enhance error management

- Updated XML protocol implementation to utilize optional chaining for safer property access, improving code readability and robustness.
- Enhanced error handling to include detailed error objects in the `onError` callback, providing better context during XML tool calls.
- Improved input handling in the `formatToolCall` method to ensure correct processing of both string and object inputs, enhancing reliability.

These changes contribute to a more robust and maintainable XML protocol implementation in the parser package.
* Enhance XML protocol and add RXML utilities

- Updated `.gemini/settings.json` to enable checkpointing for improved testing.
- Refactored `morph-xml-protocol.ts` to streamline XML parsing and enhance error handling, including the introduction of new RXML utility functions for better modularity.
- Added `rxml.ts` to encapsulate XML parsing logic, including functions for extracting raw inner content, counting tag occurrences, and handling duplicate string tags.
- Improved argument processing in `morphXmlProtocol` to utilize the new RXML utilities, ensuring more robust handling of XML tool calls.

These changes contribute to a more maintainable and efficient XML protocol implementation in the parser package.

* Refactor morph-xml-protocol and RXML utilities

- Removed deprecated functions from `morph-xml-protocol.ts` to streamline XML parsing.
- Consolidated XML helper functions into `rxml.ts` for improved modularity and clarity.
- Deleted the `processParsedArgs` function, as it is no longer needed, enhancing code maintainability.
- Updated tests to reflect changes in function exports and ensure compatibility with the new structure.

These modifications contribute to a cleaner and more efficient XML protocol implementation in the parser package.

* Enhance XML protocol tests and VSCode settings

- Added new test cases for the XML protocol to ensure proper handling of nested object structures and arrays of objects with text properties.
- Updated VSCode settings to include custom spell-check words, improving development experience.

These changes improve the robustness of XML parsing and enhance the development environment.

* Refactor XML parsing in morph-xml-protocol and RXML utilities

- Updated function names from `parser` to `parse` for clarity and consistency in `rxml.ts`.
- Enhanced the `morphXmlProtocol` to correctly handle DOCTYPE HTML within string-typed content, ensuring robust parsing during streaming.
- Added new tests to verify the preservation of HTML content with DOCTYPE in tool calls, addressing user-reported issues.

These changes improve the reliability and maintainability of XML parsing in the parser package.

* Enhance XML and JSON parsing utilities with RXML and RJSON

- Introduced RXML (Robust XML) and RJSON (Robust JSON) utilities for improved parsing of XML and JSON, respectively, allowing for better handling of minor imperfections and noise in model outputs.
- Updated the `morphXmlProtocol` to utilize RXML for XML argument parsing, enhancing error handling and robustness.
- Enhanced the `json-mix-protocol` to leverage RJSON for relaxed JSON parsing, accommodating unquoted keys, comments, and trailing commas.
- Added comprehensive tests for RXML and RJSON to ensure reliability and correctness in various parsing scenarios.

These changes significantly improve the resilience and maintainability of the parsing logic in the parser package.

* Update protocol documentation for JSON and XML handling

- Enhanced the `jsonMixProtocol` and `morphXmlProtocol` sections to clarify the serialization and parsing processes, including error handling improvements.
- Added examples for default and Gemma-style delimiters in JSON and XML protocols to illustrate usage.
- Updated descriptions to reflect changes in error handling, including the invocation of `options.onError` for parse errors and duplicate string tags.
- Improved clarity on the handling of tool calls and responses in both protocols, ensuring comprehensive guidance for users.

These updates improve the documentation's accuracy and usability for developers working with the tool-calling middleware.

* Update packages/parser/src/utils/robust-xml.ts

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Enhance error handling in RXML utilities

- Updated the `RXMLCoercionError` class to include an optional `cause` parameter for better error context.
- Improved error logging in the `parse` function to provide clearer debugging information when XML parsing fails.
- Enhanced the error handling in the coercion process to throw `RXMLCoercionError` with the original error as context.

These changes improve the robustness and maintainability of error management in the XML parsing utilities.

* Enhance error handling in RXML utilities

- Added an optional `onError` callback to the `Options` interface for custom error handling during XML parsing.
- Updated the `parse` function to invoke the `onError` callback with detailed error information when falling back to the original XML, improving error management.

These changes enhance the robustness and flexibility of error handling in the XML parsing utilities.

* Enhance error handling in morphXmlProtocol

- Updated the `morphXmlProtocol` to utilize the optional `onError` callback in the `RXML.parse` function, improving error management during XML parsing.
- This change enhances the robustness of the protocol by allowing custom error handling options, ensuring better feedback during tool call processing.

These modifications contribute to a more resilient XML parsing experience in the parser package.

* Add RXMLStringifyError for improved XML stringification error handling

- Introduced the `RXMLStringifyError` class to enhance error reporting during XML stringification processes.
- Updated the `stringify` function to catch errors and throw `RXMLStringifyError`, providing clearer context for failures.

These changes improve the robustness of XML handling in the parser package, ensuring better feedback when stringification fails.

* Enhance XML stringification error handling with optional callback

- Added an `onError` callback option to the `stringify` function in `robust-xml.ts` for improved error management during XML stringification.
- The callback allows users to handle errors more flexibly by providing detailed context when stringification fails.

These changes further enhance the robustness of XML handling in the parser package, ensuring better feedback and control during the stringification process.

* Improve error handling in morphXmlProtocol for streaming XML tool calls

- Enhanced the error handling logic in the `morphXmlProtocol` to provide more specific error messages based on the type of error encountered during streaming XML tool calls.
- Introduced detailed messages for `RXMLDuplicateStringTagError`, `RXMLCoercionError`, and `RXMLParseError`, allowing for better debugging and feedback when processing tool calls.

These changes contribute to a more robust and informative error management experience in the parser package.

* Remove optional error callback from XML stringification in robust-xml.ts

- Eliminated the `onError` callback option from the `stringify` function, simplifying error handling during XML stringification.
- This change streamlines the error management process, focusing on throwing `RXMLStringifyError` for failures without additional callback complexity.

These modifications contribute to a more straightforward error handling approach in the parser package.

* Implement placeholder extraction guard in RXML parser

- Added a check in the `parse` function of `robust-xml.ts` to throw an `RXMLParseError` if a placeholder was used but the raw content extraction failed. This prevents returning placeholder tokens when the original content is unavailable.
- Introduced a new test case to verify that the parser correctly throws an error under these conditions, enhancing the robustness of the XML parsing process.

These changes improve error handling in the parser package, ensuring more reliable XML content extraction.

* Refactor RXML tests by removing skipped placeholder extraction guard test

- Removed the skipped test case for the placeholder/raw extraction guard in `robust-xml.test.ts`, simplifying the test suite.
- This change focuses on maintaining relevant and active tests, enhancing the clarity and efficiency of the testing process for the RXML parser.

These modifications contribute to a cleaner and more maintainable test structure in the parser package.

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* Add debug utilities and tests for XML tokenizer and robust XML parser

- Introduced  and  scripts for detailed debugging of the XML tokenizer, allowing step-by-step analysis of tokenization processes.
- Added  and  files to validate the functionality of the RXML utilities, ensuring robust parsing and error handling.
- Enhanced the  to improve XML parsing capabilities, including better handling of attributes and nested structures.
- Updated the  to export new utility functions, improving modularity and usability of the parser package.

These changes enhance the debugging experience and ensure the reliability of XML parsing in the parser package.

* Enhance XML parsing robustness and error handling

- Improved the `parse` function in `robust-xml` to conditionally unwrap XML content based on schema expectations, ensuring better handling of root elements.
- Enhanced error handling in `parseWithoutSchema` to provide more tolerant parsing of malformed XML, including detailed error reporting for invalid structures.
- Updated `XMLTransformStream` to emit meaningful errors when no XML elements are parsed from the stream, improving feedback during streaming operations.
- Refactored buffer processing logic to efficiently handle nested XML elements and improve memory management during chunked streaming.

These changes significantly enhance the reliability and user experience of XML parsing in the parser package.

* Remove XML utility functions and tests from parser package

- Deleted the `xml.ts` utility file and its associated tests to streamline the codebase, as these functions are no longer needed.
- Updated the `index.ts` file to remove the export of the deleted XML utilities.
- Refactored the `Options` interface in `robust-xml` to enhance type safety by changing the `context` parameter to `Record<string, unknown>`.

These changes contribute to a cleaner and more maintainable parser package.

* Remove robust XML utility file from parser package

- Deleted the `robust-xml.ts` file to streamline the codebase, as it is no longer needed following recent refactoring and enhancements in XML parsing utilities.
- This change contributes to a cleaner and more maintainable parser package.

* Refactor XML parsing utilities to enhance modularity and error handling

- Replaced the import of coercion utilities in `parser.ts` with a more specific import from `base-coercion`, improving clarity and maintainability.
- Updated the `OnErrorFn` type definition in `types.ts` to enhance error handling capabilities by allowing optional metadata.
- Streamlined the import structure in `coercion.ts` to consolidate related functionalities, ensuring better organization of XML-specific handling.

These changes contribute to a more robust and maintainable XML parsing implementation in the parser package.

* Update dependencies and remove deprecated files in parser package

- Added `@ai-sdk-tool/rxml` as a dependency in the parser package to enhance XML parsing capabilities.
- Removed obsolete debug files (`debug-detailed.cjs`, `debug-tokenizer.cjs`, `test-rxml.cjs`, `test-rxml.js`) to streamline the codebase.
- Updated `package.json` to reflect the new dependency and removed references to the deprecated `fast-xml-parser`.

These changes contribute to a cleaner and more maintainable parser package, improving modularity and functionality.

* Refactor tool call middleware and transform handler to consolidate protocol factory logic

- Moved the  function from  to , enhancing modularity and clarity.
- Updated imports in  and  to reflect the new location of .
- Deleted the now-obsolete  file, streamlining the codebase.

These changes improve the organization of protocol-related utilities within the parser package.

* Update devDependencies to include @types/node for improved type support

- Added `@types/node` version 24.3.0 to `package.json` and `pnpm-lock.yaml` to enhance type definitions for Node.js.
- Removed the export of the `protocol` module in `index.ts` to streamline the utility exports.

These changes contribute to better type safety and maintainability in the codebase.

* Update documentation and tests for RXML utilities

- Added a new section in the documentation to introduce the RXML (Robust XML) parser, enhancing clarity on its capabilities.
- Refactored the test file for RXML utilities to improve organization and ensure proper imports, maintaining consistency with the testing framework.

These changes improve the documentation and testing structure for the RXML utilities, contributing to better usability and maintainability in the parser package.

* Add initial RXML documentation and README

- Introduced comprehensive documentation for RXML (Robust XML) including safe XML parsing, JSON Schema-based coercion, and error types.
- Added a concise README with installation instructions and quick usage examples.
- Created a new documentation file at `docs/rxml.md` to enhance user guidance.

These changes provide essential resources for users to effectively utilize the RXML package, improving overall usability and accessibility of the XML parsing utilities.

* Update RXML test configuration and improve tag counting logic

- Modified the Vitest configuration to enable watch mode unless in a CI environment, enhancing local development experience.
- Updated the `countTagOccurrences` function to clarify the logic for skipping the first occurrence of a tag, improving code readability and maintainability.

These changes contribute to a more efficient testing setup and clearer logic in the RXML package.

* Enhance XML stringification with minimal escaping option

- Added a `minimalEscaping` option to the `stringify` function, allowing for more efficient XML output by reducing unnecessary character escaping.
- Introduced new helper functions `escapeXmlMinimalText` and `escapeXmlMinimalAttr` to handle minimal escaping for text content and attribute values, respectively.
- Updated the `StringifyOptions` interface to include the new `minimalEscaping` option, enhancing flexibility in XML generation.
- Enhanced existing tests to cover scenarios for minimal escaping, ensuring robust functionality and correctness.

These changes improve the XML stringification process, providing users with more control over the escaping behavior in the RXML package.

* Enhance XML parsing to handle nested string-typed tags correctly

- Updated the `parse` function to filter out nested ranges, ensuring that only the outermost ranges are kept during XML parsing.
- Added logic to populate missing string-typed properties from the original XML, improving data integrity.
- Introduced a new test case to verify that nested string-typed tags are parsed correctly without losing inner content.

These changes improve the robustness of the XML parsing functionality in the RXML package, ensuring accurate representation of nested structures.

* Refactor morph XML protocol to improve tool call handling

- Changed the internal structure of the `morphXmlProtocol` to use an array of objects for tool calls, including both the segment and its start index.
- Updated the return value to sort tool calls by their start index before mapping to segments, enhancing the order of parsed output.

These changes improve the clarity and efficiency of the XML parsing process in the parser package.

* Add exports field to RXML package.json for improved module resolution

- Introduced an `exports` field in the `package.json` of the RXML package to define module entry points for different environments (CommonJS and ES modules).
- This enhancement improves compatibility and clarity for consumers of the RXML package, ensuring proper module resolution.

These changes contribute to a more robust and user-friendly package structure in the RXML module.

* Update GitHub Actions workflows for improved workspace handling

- Modified the coverage and PR validation workflows to specify workspace root for installation, build, type check, linting, formatting, and testing commands.
- Updated Node.js version from 18.x to 20.x in the PR validation workflow for consistency with the coverage workflow.

These changes enhance the clarity and efficiency of the CI/CD processes, ensuring proper execution in a monorepo setup.

* Update GitHub Actions workflows to use pnpm version 9

- Modified the coverage and PR validation workflows to specify pnpm version 9 for improved compatibility and performance.
- This change ensures consistency across CI/CD processes in the monorepo setup.

* Refactor GitHub Actions workflows for improved clarity and consistency

- Updated the coverage and PR validation workflows to specify installation, build, type check, linting, formatting, and testing commands for all workspace packages instead of just the workspace root.
- This change enhances the clarity of the CI/CD processes and ensures consistent execution across the monorepo setup.

* Update RXML package.json for improved type definitions and file exports

- Changed the path for the `types` field in the `package.json` from `./dist/index.d.ts` to `./index.d.ts` to ensure correct type definitions are referenced.
- Updated the `exports` field to reflect the new path for type definitions, enhancing module resolution for consumers of the RXML package.
- Added `index.d.ts` to the `files` array to ensure it is included in the package distribution.

These changes contribute to a more accurate and user-friendly package structure in the RXML module.

* Refactor morph XML protocol to utilize updated RXML functions

- Replaced direct RXML function calls with imported functions from the RXML package in the `morphXmlProtocol` implementation, enhancing code clarity and maintainability.
- Updated the `package.json` of the RXML package to include new exports for better module resolution and type definitions.
- These changes improve the integration of the RXML package within the parser, ensuring a more robust and consistent XML handling process.

* Refactor morph XML protocol to improve tool call detection

- Introduced a shared helper function `findToolCalls` to streamline the process of identifying tool call ranges within XML text, enhancing code reusability and clarity.
- Replaced the previous inline logic for finding tool calls with the new helper function, resulting in cleaner and more maintainable code.
- This refactor improves the overall efficiency of the `morphXmlProtocol` by consolidating tool call handling logic.

* Enhance XML parsing and streaming functionality

- Improved the `morphXmlProtocol` by robustly detecting closing tags with optional whitespace, ensuring accurate parsing of XML tool calls.
- Refactored the streaming implementation in `stream.ts` to ensure proper handling of tag boundaries, enhancing the reliability of XML transformations.
- Updated tests to utilize the core XML streaming functions, replacing the previous custom parser, which improves maintainability and consistency in the testing process.

* Enhance stringify function to support strict boolean attributes

- Updated the `stringify` function to include a new option `strictBooleanAttributes`, allowing boolean-like attributes (value `null`) to be serialized as `name="name"` for strict XML compliance.
- Modified the `StringifyOptions` interface to document the new behavior for boolean attributes.
- Added tests to verify the correct handling of boolean attributes in both strict and convenience modes, ensuring consistent output for XML serialization.

* Enhance XML stringification and parsing functionality

- Updated the `stringify` function to include a new option `minimalEscaping`, allowing for more flexible XML serialization.
- Improved the robustness of XML parsing by refining the logic for detecting closing tags, accommodating optional whitespace.
- Refactored the `stringifyNode` and `stringifyNodes` functions to utilize the new options, ensuring consistent behavior across XML serialization.
- Enhanced the overall clarity and maintainability of the XML handling process in the RXML package.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Add file write example and enhance XML protocol handling

- Introduced a new example file `XX-file-write.ts` demonstrating how to write text files to the local workspace using the `file_write` tool.
- Enhanced the `morphXmlProtocol` to decode entity-escaped HTML within string-typed content during streaming, ensuring accurate parsing and output.
- Added tests to verify the correct handling of entity-escaped HTML and preservation of DOCTYPE in tool calls, improving robustness and reliability of XML processing.

These changes improve the usability of the file writing functionality and enhance the XML protocol's handling of string content.

* Update dependencies and add new examples for XML handling

- Added  version 4.1.5 as a dependency in  for improved schema validation.
- Introduced a new example file  demonstrating the use of the  tool for creating text files in the local workspace.
- Created a new example file  to showcase parsing XML content using the  package, enhancing the usability of XML handling in the project.

These changes improve the functionality and examples available for users working with file writing and XML parsing in the AI SDK tooling.

* Add new example for XML parsing and refactor existing parser logic

- Introduced a new example file `XX-parse-c.ts` demonstrating the parsing of XML content with a nested object schema, showcasing the ability to handle string content with angle brackets.
- Deleted the outdated example file `XX-parser.ts` to streamline the examples directory.
- Enhanced the `parse` function in the parser to improve handling of string-typed properties, ensuring accurate extraction and restoration of content from XML structures.

These changes improve the usability of the XML parsing functionality and provide clearer examples for users working with the AI SDK tooling.

* Enhance XML parsing examples and update schema validation

- Introduced a new example file `XX-parse-c.ts` demonstrating the parsing of XML content across multiple programming languages, showcasing the ability to handle various file write operations.
- Updated existing tests in `parser.test.ts` to utilize Zod for schema validation, improving type safety and clarity in XML parsing tests.
- Enhanced test cases to cover parsing of file write content for multiple languages, ensuring robust handling of diverse code snippets.

These changes improve the usability of XML parsing functionality and provide clearer examples for users working with the AI SDK tooling.

* Refactor XML parsing utilities and enhance error handling

- Streamlined the `morphXmlProtocol` to improve argument processing and error management, ensuring robust handling of XML tool calls.
- Introduced new helper functions for better modularity and clarity in XML parsing logic, including improved handling of duplicate string tags.
- Enhanced error handling in the `RXML` utilities to provide clearer context during XML parsing failures, including detailed error messages for various error types.
- Updated tests to reflect changes in the XML protocol and ensure comprehensive coverage of new functionalities.

These changes contribute to a more maintainable and resilient XML parsing experience in the parser package.

* Refactor morph XML protocol to utilize updated RXML functions

- Replaced direct calls to `extractRawInner` with the newly imported function from the RXML package, enhancing code clarity and maintainability.
- Introduced a new test file for RXML utilities, ensuring comprehensive coverage of XML parsing functionalities, including basic parsing, heuristics, and error handling for duplicate string tags.
- Updated existing tests to reflect changes in the XML protocol and ensure compatibility with the new RXML structure.

These changes improve the robustness and maintainability of XML parsing in the parser package.

* Refactor morph XML protocol and enhance utility imports

- Removed deprecated functions and streamlined the `morphXmlProtocol` by utilizing updated RXML functions for improved clarity and maintainability.
- Introduced new utility functions for XML parsing, enhancing modularity and error handling.
- Updated the `index.ts` file to export new XML utilities, ensuring comprehensive access to parsing functionalities.

These changes contribute to a more robust and maintainable XML parsing experience in the parser package.

* Refactor XML parsing utilities and enhance tool call handling

- Updated the `findToolCalls` function in `morph-xml-protocol.ts` to improve the detection of closing tags, allowing for optional whitespace.
- Refactored the content extraction logic to utilize the `RXML.extractRawInner` function, enhancing clarity and maintainability.
- Replaced the deprecated `decodeXmlEntities` function with `unescapeXml` from the RXML package in `xml.ts`, streamlining XML entity decoding.
- Added a new export for `findAllTopLevelRanges` in `rxml/index.ts` to enhance modularity and access to XML utilities.

These changes contribute to a more robust and maintainable XML parsing experience in the parser package.

* Refactor coercion utilities to improve naming consistency

- Renamed `coerceToolCallInput` to `fixToolCallWithSchema` for clarity and consistency across the codebase.
- Updated documentation and handler references to reflect the new function name, ensuring accurate guidance on coercion processes.
- Removed the deprecated `coerceToolCallInput` function, streamlining the coercion utility structure.

These changes enhance the maintainability and clarity of the coercion logic within the parser package.

* refactor: move XML entity decoding logic into RXML parser module

* refactor: move findToolCalls helper to bottom of file for better organization

* feat: add example files for parser core in C, HTML, and XML formats

- Introduced `test.c`, `test.html`, and `test.xml` example files to demonstrate basic usage of the parser core.
- Updated `bfcl.ts`, `generate-handler.ts`, `stream-handler.ts`, and `transform-handler.ts` to utilize new provider options for tool call middleware.
- Removed deprecated functions and streamlined utility imports for better organization and clarity.

These additions enhance the usability of the parser core and provide clear examples for users.

* refactor: update tool call middleware options for clarity and consistency

- Renamed `toolNames` to `originalTools` in `providerOptions.toolCallMiddleware` to better reflect its purpose of propagating tool schemas.
- Updated related documentation and internal comments to ensure accurate guidance on the usage of the new `originalTools` field.
- Adjusted tests to verify the correct propagation of tool schemas, enhancing the clarity and maintainability of the middleware implementation.

These changes improve the overall consistency and understanding of the tool call middleware options in the parser package.

* refactor: streamline coercion utilities and update protocol handling

- Removed the `unwrapJsonSchema` and `getToolSchema` functions from `coercion.ts`, consolidating coercion logic within the RXML package for improved clarity and maintainability.
- Updated the `morphXmlProtocol` to utilize the new `RXML.unwrapJsonSchema` and `RXML.coerceBySchema` functions, enhancing consistency in schema handling.
- Adjusted the `tsconfig.json` to simplify the included files for better project organization.
- Added a new test file for coercion heuristics, ensuring comprehensive coverage of coercion scenarios and edge cases.

These changes enhance the maintainability and robustness of the coercion logic and protocol handling in the parser package.

* chore: update package.json scripts and remove unused RXML type definitions

- Modified the build and CI release scripts in package.json to remove the parallel flag for improved execution clarity.
- Deleted the unused index.d.ts file from the RXML package, streamlining the package structure and ensuring only necessary files are included.
- Updated the RXML package.json to point to the correct types file in the dist directory, enhancing type definition accessibility.

These changes contribute to a cleaner and more efficient project structure.

* feat: enhance evaluation options with maxTokens parameter

- Added an optional `maxTokens` parameter to the `EvaluateOptions` interface, allowing users to specify the maximum number of tokens to generate during evaluation.
- Updated the `evaluate` function to accept and utilize the `maxTokens` parameter in benchmark evaluations, improving flexibility in model configurations.
- Modified the example evaluation script to demonstrate the use of the new `maxTokens` option, enhancing clarity for users.

These changes improve the configurability of the evaluation process and provide clearer examples for users.

* refactor: update maxTokens parameter to maxOutputTokens in BFCL benchmark

- Changed the `maxTokens` parameter to `maxOutputTokens` in the `createBfclBenchmark` function for improved clarity and consistency in naming.
- This update aligns with the recent enhancements to evaluation options, ensuring a more intuitive understanding of the parameter's purpose.

These changes enhance the maintainability and clarity of the benchmark evaluation process.

* fix: disable HTML self-closing tag behavior in morphXmlProtocol

- Updated the `morphXmlProtocol` to disable self-closing tag behavior for HTML elements such as base, meta, and link, allowing them to be treated as regular tags.
- This change enhances the parsing accuracy of XML tool calls by accommodating standard HTML tag structures.

These modifications improve the robustness of the XML parsing functionality in the parser package.

* chore: remove deprecated example files and update ignore list

- Deleted unused example files `test.c`, `test.html`, and `test.xml` from the `parser-core` directory to streamline the project and eliminate clutter.
- Updated the `.changeset/config.json` to include `@ai-sdk-tool/examples/rxml-core` in the ignore list, ensuring it is not considered for internal dependency updates.

These changes contribute to a cleaner project structure and improved management of example files.

* feat: add new middleware examples for model evaluation

- Introduced `morphExpGemma27b` middleware for the `google/gemma-3-27b-it` model, enhancing the evaluation capabilities.
- Created a `compareDifferentMiddlewares` object to facilitate comparisons between different middleware implementations.
- Updated the `evaluate` function call in the main script to utilize the new middleware examples, improving the demonstration of model evaluation.

These changes enhance the flexibility and clarity of the evaluation process by showcasing multiple middleware options.

* fix: remove redundant condition in findAllTopLevelRanges function

- Simplified the condition in the `findAllTopLevelRanges` function by removing a redundant check for the `!` character in the XML content. This change improves code clarity without altering functionality.

These modifications enhance the maintainability of the extraction logic in the RXML package.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@dependabot @github
Copy link
Copy Markdown
Contributor Author

dependabot bot commented on behalf of github Mar 18, 2026

Labels

The following labels could not be found: automated, dependencies, github-actions. Please create them before Dependabot can add them to a pull request.

Please fix the above issues or remove invalid values from dependabot.yml.

KIM3310 added 4 commits March 19, 2026 10:32
Introduce tracing and metrics via @opentelemetry/sdk-node, gated behind
OTEL_EXPORTER_OTLP_ENDPOINT so existing deployments are unaffected.

- src/telemetry/index.ts: configurable OTLP exporter, trace provider,
  and span helpers for tool-call parsing, protocol detection, retry
  loops, and benchmark runs.
- src/telemetry/metrics.ts: tool_calls_total, tool_call_parse_duration_ms,
  tool_call_retries_total, and benchmark_success_rate instruments.
- Instrument createToolMiddleware wrapGenerate/wrapStream with spans and
  metric recordings.
- Add OTEL dependencies to package.json.
- Document configuration in README.
1,713 tests passing across 184 files in 4.51s. Includes benchmark
results (100% parse success with middleware+ralph-loop), k6 load
test data (p95: 1,668ms, 0% failure rate), and regression gate
status (3 pass, 2 watch, 0 fail).
The original 7-mode / 24-case suite showed 100% success with middleware+retry,
which masked real parser limits. This adds 13 genuinely challenging mutation modes
(deeply nested args, unicode values, oversized payloads, HTML-escaped JSON,
double-encoded arguments, adversarial injection, wrong tool names, truncated JSON,
concurrent tool calls, empty arguments, backreference placeholders, trailing commas,
and mixed XML/JSON) to expose honest failure boundaries.

New numbers: baseline 25% -> middleware 65% -> middleware+ralph-loop 90%.
4 cases fail by design (wrong-tool-name, empty-arguments) with documented reasons.
@dependabot dependabot bot force-pushed the dependabot/github_actions/github-actions-4a29f0ea55 branch from 1b6989f to 6b93c0e Compare March 19, 2026 06:07
KIM3310 and others added 4 commits March 19, 2026 15:11
…i-platform deployment

- AWS adapter (S3 artifacts, CloudWatch metrics) gated by AWS_ACCESS_KEY_ID
- GCP adapter (GCS artifacts, BigQuery analytics) gated by GCP_PROJECT_ID
- Prometheus /v1/metrics endpoint with parse rates, latency histograms, benchmark counters
- Kubernetes manifests: deployment, service, configmap, HPA autoscaler
- Vercel deployment config (vercel.json) for demo UI/API
- Cloudflare Workers entry point (wrangler.toml + worker-entry.ts) for edge demo
- Updated .env.example with AWS, GCP, and Datadog vars
- Updated README with deployment docs, architecture diagram, curl examples, badges
- Performance baseline documentation in docs/evidence/

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The variable is documented in the README and present in the K8s configmap
but was missing from .env.example.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dependabot dependabot bot force-pushed the dependabot/github_actions/github-actions-4a29f0ea55 branch from 6b93c0e to da0ba84 Compare March 20, 2026 00:12
Pizza and others added 6 commits March 21, 2026 03:15
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The README now opens with a tighter reviewer-first route so the runtime,
benchmark, and contract surfaces are easier to inspect in the right order.

Constraint: Proof hierarchy had to stay aligned with the existing runtime and benchmark surfaces
Rejected: Broader README rewrite | too much churn for a documentation-first polish pass
Confidence: high
Scope-risk: narrow
Directive: Keep StagePilot docs centered on proof order and checked-in evidence
Tested: npm run verify
Not-tested: No runtime code changes
The runtime event store now defaults to JSONL and local test runs mute the
known sqlite warning, which keeps verification output focused on real
contract failures rather than backend noise.

Constraint: Runtime summaries and existing proof surfaces had to stay intact
Rejected: Remove sqlite support entirely | it is still useful as an explicit backend option
Confidence: high
Scope-risk: narrow
Directive: Keep the default local review path on the least surprising backend unless sqlite is explicitly requested
Tested: npm run verify
Not-tested: Explicit sqlite backend on non-local runtimes
…ith 5 updates

Dependabot couldn't find the original pull request head commit, 1b6989f.
@dependabot dependabot bot force-pushed the dependabot/github_actions/github-actions-4a29f0ea55 branch from da0ba84 to c91103f Compare March 23, 2026 00:16
@KIM3310 KIM3310 closed this Mar 23, 2026
@dependabot @github
Copy link
Copy Markdown
Contributor Author

dependabot bot commented on behalf of github Mar 23, 2026

This pull request was built based on a group rule. Closing it will not ignore any of these versions in future pull requests.

To ignore these dependencies, configure ignore rules in dependabot.yml

@dependabot dependabot bot deleted the dependabot/github_actions/github-actions-4a29f0ea55 branch March 23, 2026 09:08
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.

5 participants