0
Fork 0
mirror of https://github.com/mastra-ai/mastra.git synced 2026-11-17 08:44:46 +00:00
mastra/package.json

129 lines
7.7 KiB

2024-08-12 12:56:35 +01:00
2024-11-25 11:07:30 +01:00
2024-10-27 20:21:03 -07:00
2024-11-25 11:07:30 +01:00
2024-08-12 12:56:35 +01:00
2026-09-23 12:13:41 +02:00
fix: Add MCP server version validation and upgrade Vitest (#10373) ## Description <!-- Provide a brief description of the changes in this PR --> Fixes MCP server test failures and resolves Vitest snapshot issues. ### Changes: 1. Added version query parameter validation for MCP server detail endpoint - now returns 404 when requested version doesn't match 2. Upgraded Vitest to 4.0.12 to fix snapshot regression in 4.0.9 that broke package-level test execution ## Related Issue(s) <!-- Link to the issue(s) this PR addresses, using hashtag notation: #123 --> ## Type of Change - [x] Bug fix (non-breaking change that fixes an issue) - [ ] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update - [ ] Code refactoring - [ ] Performance improvement - [ ] Test update ## Checklist - [ ] I have made corresponding changes to the documentation (if applicable) - [x] I have added tests that prove my fix is effective or that my feature works <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * MCP server detail endpoint now accepts an optional version query parameter and returns a 404 response if the requested version doesn't match. * **Chores** * Updated development dependencies and testing framework to the latest stable versions. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-11-20 17:31:48 -06:00
chore(deps): update build tools (major) (#29026) > [!NOTE] > This PR body was truncated due to platform limits. This PR contains the following updates: | Package | Type | Update | Change | Pending | |---|---|---|---|---| | [@vitest/coverage-v8](https://vitest.dev/guide/coverage) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8)) | pnpm.catalog.default | major | [`4.1.12` → `5.0.5`](https://renovatebot.com/diffs/npm/@vitest%2fcoverage-v8/4.1.12/5.0.5) | `5.1.0` | | [@vitest/mocker@>=2.1.0 <4.1.12](https://redirect.github.com/vitest-dev/vitest/tree/main/packages/mocker) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/mocker)) | pnpm-workspace.overrides | major | [`4.1.12` → `5.0.5`](https://renovatebot.com/diffs/npm/@vitest%2fmocker@>=2.1.0 <4.1.12/4.1.12/5.0.5) | `5.1.0` | | [@vitest/ui](https://vitest.dev/guide/ui) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/ui)) | pnpm.catalog.default | major | [`4.1.12` → `5.0.5`](https://renovatebot.com/diffs/npm/@vitest%2fui/4.1.12/5.0.5) | `5.1.0` | | [dotenv](https://redirect.github.com/motdotla/dotenv) | devDependencies | major | [`^17.4.2` → `^18.0.9`](https://renovatebot.com/diffs/npm/dotenv/17.4.2/18.0.9) | | | [dotenv](https://redirect.github.com/motdotla/dotenv) | devDependencies | major | [`17.4.2` → `18.0.9`](https://renovatebot.com/diffs/npm/dotenv/17.4.2/18.0.9) | | | [vitest](https://vitest.dev) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/vitest)) | devDependencies | major | [`^4.1.12` → `^5.0.5`](https://renovatebot.com/diffs/npm/vitest/4.1.12/5.0.5) | `5.1.0` | | [vitest](https://vitest.dev) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/vitest)) | pnpm.catalog.default | major | [`4.1.12` → `5.0.5`](https://renovatebot.com/diffs/npm/vitest/4.1.12/5.0.5) | `5.1.0` | | [vitest](https://vitest.dev) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/vitest)) | devDependencies | major | [`4.1.12` → `5.0.5`](https://renovatebot.com/diffs/npm/vitest/4.1.12/5.0.5) | `5.1.0` | | [vitest@>=2.1.0 <4.1.12](https://vitest.dev) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/vitest)) | pnpm-workspace.overrides | major | [`4.1.12` → `5.0.5`](https://renovatebot.com/diffs/npm/vitest@>=2.1.0 <4.1.12/4.1.12/5.0.5) | `5.1.0` | --- > [!WARNING] > Some dependencies could not be looked up. Check the [Dependency Dashboard](../issues/9505) for more information. --- ### Release Notes <details> <summary>vitest-dev/vitest (@&#8203;vitest/coverage-v8)</summary> ### [`v5.0.5`](https://redirect.github.com/vitest-dev/vitest/releases/tag/v5.0.5) [Compare Source](https://redirect.github.com/vitest-dev/vitest/compare/v5.0.4...v5.0.5) #####    🐞 Bug Fixes - Keep vite default `fs.deny` with api token file  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi Ogawa** and **Claude Opus 5.5** in [#&#8203;11578](https://redirect.github.com/vitest-dev/vitest/issues/11578) [<samp>(28dc1)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/28dc1edfb) - Handle quoted file names in `--changed`  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11583](https://redirect.github.com/vitest-dev/vitest/issues/11583) [<samp>(14921)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/14921e962) - Add `data` to the `import.meta.hot` stub  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11590](https://redirect.github.com/vitest-dev/vitest/issues/11590) [<samp>(3a828)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/3a8289ac3) - Set `skip` in `skipIf`, ignore `undefined` options  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11591](https://redirect.github.com/vitest-dev/vitest/issues/11591) [<samp>(d523a)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/d523a15f2) - Skip builtin loading in async leak detector  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11598](https://redirect.github.com/vitest-dev/vitest/issues/11598) [<samp>(fe86a)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/fe86a64c6) - Keep the import frame in native loader errors  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11599](https://redirect.github.com/vitest-dev/vitest/issues/11599) [<samp>(9697b)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/9697b3894) - Run hook cleanups when a later hook fails  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11605](https://redirect.github.com/vitest-dev/vitest/issues/11605) [<samp>(6c5a4)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/6c5a44720) - Release mocks of finished test files  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11607](https://redirect.github.com/vitest-dev/vitest/issues/11607) [<samp>(e9c3d)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/e9c3d72f0) - Abort all running tests on cancel  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11606](https://redirect.github.com/vitest-dev/vitest/issues/11606) [<samp>(6621a)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/6621a72d6) - **browser**: - Ignore synthetic pagehide events  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11582](https://redirect.github.com/vitest-dev/vitest/issues/11582) [<samp>(ca081)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/ca0813584) - Run plugin buildStart on server creation  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11593](https://redirect.github.com/vitest-dev/vitest/issues/11593) [<samp>(ea611)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/ea611e44c) - Drop late connections of closed sessions  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11600](https://redirect.github.com/vitest-dev/vitest/issues/11600) [<samp>(f161e)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/f161e6df2) - Wait 30s for the browser to close  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11601](https://redirect.github.com/vitest-dev/vitest/issues/11601) [<samp>(6498b)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/6498b666a) - Run global setup once with instances  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11596](https://redirect.github.com/vitest-dev/vitest/issues/11596) [<samp>(8dd67)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/8dd67c262) - **reporter**: - End reason `&#&#8203;39;failed&#&#8203;39;` on worker crash  -  by [@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in [#&#8203;11568](https://redirect.github.com/vitest-dev/vitest/issues/11568) [<samp>(6ae8e)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/6ae8e89ff) #####     [View changes on GitHub](https://redirect.github.com/vitest-dev/vitest/compare/v5.0.4...v5.0.5) ### [`v5.0.4`](https://redirect.github.com/vitest-dev/vitest/releases/tag/v5.0.4) [Compare Source](https://redirect.github.com/vitest-dev/vitest/compare/v5.0.3...v5.0.4) #####    🚀 Features - **experimental**: - Tag cache directories with CACHEDIR.TAG  -  by [@&#8203;lifeiscontent](https://redirect.github.com/lifeiscontent) in [#&#8203;11461](https://redirect.github.com/vitest-dev/vitest/issues/11461) [<samp>(a8ea3)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/a8ea3c8fd) - Support `test.ui.theme` option  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11499](https://redirect.github.com/vitest-dev/vitest/issues/11499) [<samp>(1da66)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/1da66405d) - Highlight selector multiple matches in trace view  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi Ogawa** and **Claude Opus 5.5** in [#&#8203;11489](https://redirect.github.com/vitest-dev/vitest/issues/11489) [<samp>(5abba)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/5abba1e1b) - Print how many tests were affected and a total when running `--changed`  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11424](https://redirect.github.com/vitest-dev/vitest/issues/11424) [<samp>(a2336)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/a23368585) - Add an option to cache dependencies instead of statically parsing them  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11515](https://redirect.github.com/vitest-dev/vitest/issues/11515) [<samp>(c0601)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/c06012ac8) - Add fit and zoom controls to trace viewer  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi Ogawa** and **Claude Opus 5.5** in [#&#8203;11490](https://redirect.github.com/vitest-dev/vitest/issues/11490) [<samp>(f5dd9)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/f5dd99ed0) #####    🐞 Bug Fixes - Fail the run on git and location filter errors  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11430](https://redirect.github.com/vitest-dev/vitest/issues/11430) [<samp>(30d03)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/30d0304d2) - Enable fsModuleCache by default  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11435](https://redirect.github.com/vitest-dev/vitest/issues/11435) [<samp>(ad208)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/ad208cc29) - Track project files and mocks with --changed  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11432](https://redirect.github.com/vitest-dev/vitest/issues/11432) [<samp>(b0f2b)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/b0f2b3bb9) - Refactor caching, fix `:` in project and change the shape of `results` cache  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11453](https://redirect.github.com/vitest-dev/vitest/issues/11453) [<samp>(9673c)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/9673c49a4) - Keep full `$` string values when `taskTitleValueFormatTruncate` is 0  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi Ogawa** and **Claude Opus 5.5** in [#&#8203;11485](https://redirect.github.com/vitest-dev/vitest/issues/11485) [<samp>(4f7e1)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/4f7e1799b) - Resolve node builtins in client environments  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11417](https://redirect.github.com/vitest-dev/vitest/issues/11417) [<samp>(56b31)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/56b319ac6) - Fix module graph builtin externals after [#&#8203;11421](https://redirect.github.com/vitest-dev/vitest/issues/11421)  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi Ogawa** and **Claude Opus 5.5** in [#&#8203;11491](https://redirect.github.com/vitest-dev/vitest/issues/11491) and [#&#8203;11421](https://redirect.github.com/vitest-dev/vitest/issues/11421) [<samp>(008e1)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/008e184cb) - Wrap module mocks during in-source testing  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11505](https://redirect.github.com/vitest-dev/vitest/issues/11505) [<samp>(36d19)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/36d19cb00) - Handle line endings in snapshot  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11522](https://redirect.github.com/vitest-dev/vitest/issues/11522) [<samp>(4c468)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/4c468aa40) - Respect root in projects  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11521](https://redirect.github.com/vitest-dev/vitest/issues/11521) [<samp>(26642)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/26642f793) - Resolve mocks in directories with spaces  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11539](https://redirect.github.com/vitest-dev/vitest/issues/11539) [<samp>(caaef)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/caaef9416) - **api**: - Publish the api token atomically  -  by [@&#8203;umairnawaz333](https://redirect.github.com/umairnawaz333) in [#&#8203;11323](https://redirect.github.com/vitest-dev/vitest/issues/11323) [<samp>(6f990)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/6f990fef1) - **browser**: - Close the mock route interception race  -  by [@&#8203;cplieger](https://redirect.github.com/cplieger) and [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;8339](https://redirect.github.com/vitest-dev/vitest/issues/8339) and [#&#8203;11083](https://redirect.github.com/vitest-dev/vitest/issues/11083) [<samp>(d6620)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/d6620fae6) - Allow toHaveTextContent without arguments  -  by [@&#8203;nomadical](https://redirect.github.com/nomadical) in [#&#8203;11425](https://redirect.github.com/vitest-dev/vitest/issues/11425) [<samp>(8ebcf)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/8ebcf5f8a) - Apply API options without browser config  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;10852](https://redirect.github.com/vitest-dev/vitest/issues/10852) [<samp>(ad055)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/ad055837b) - Preserve undefined command arguments  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) and [@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in [#&#8203;11497](https://redirect.github.com/vitest-dev/vitest/issues/11497) [<samp>(1576d)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/1576d3d89) - Wait for setup mocks before importing a test file  -  by [@&#8203;kasperpeulen](https://redirect.github.com/kasperpeulen) in [#&#8203;11520](https://redirect.github.com/vitest-dev/vitest/issues/11520) [<samp>(b61d1)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/b61d1ced3) - Avoid extra scroll outside the iframe  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11523](https://redirect.github.com/vitest-dev/vitest/issues/11523) [<samp>(662e8)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/662e8a363) - Run browser instances as workers  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11525](https://redirect.github.com/vitest-dev/vitest/issues/11525) [<samp>(bf04b)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/bf04b9ccc) - ⚠️ This can degrade performance if you have a custom `maxWorkers` setting. Previously, it was applied incorrectly and could lead to Vitest using too many resources. For example, a lower number would still open too many browsers. Fixing it means Vitest opens less instances by default now. - Open one cdp session per tester  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11542](https://redirect.github.com/vitest-dev/vitest/issues/11542) [<samp>(69e63)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/69e6369f6) - Clean up unmocked and pending mocks  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11537](https://redirect.github.com/vitest-dev/vitest/issues/11537) [<samp>(5c955)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/5c9552173) - **coverage**: - V8 browser memory leak between test files  -  by [@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in [#&#8203;11466](https://redirect.github.com/vitest-dev/vitest/issues/11466) [<samp>(2297d)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/2297d93a8) - `allowExternal` fails to include uncovered files  -  by [@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in [#&#8203;11513](https://redirect.github.com/vitest-dev/vitest/issues/11513) [<samp>(4ef00)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/4ef000a93) - Filenames containing brackets incorrectly showing as uncovered  -  by [@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in [#&#8203;11531](https://redirect.github.com/vitest-dev/vitest/issues/11531) [<samp>(0fa80)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/0fa80f53c) - Istanbul coverage wrong when module transform warmups  -  by [@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in [#&#8203;11529](https://redirect.github.com/vitest-dev/vitest/issues/11529) [<samp>(9f61d)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/9f61dcca2) - **deps**: - Update all non-major dependencies  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11167](https://redirect.github.com/vitest-dev/vitest/issues/11167) [<samp>(c74e0)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/c74e099a9) - **expect**: - Fix `Map` and `Set` deep equality in some assertions  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi Ogawa** and **Claude Opus 5.5** in [#&#8203;11402](https://redirect.github.com/vitest-dev/vitest/issues/11402) [<samp>(b4e79)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/b4e79fd7a) - Check value in chai-style returned  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11500](https://redirect.github.com/vitest-dev/vitest/issues/11500) [<samp>(1aca0)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/1aca02a21) - **mocker**: - Fix native loader mocking edge cases  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11540](https://redirect.github.com/vitest-dev/vitest/issues/11540) [<samp>(cd423)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/cd423ba04) - **pretty-format**: - Support boxed symbols  -  by [@&#8203;lehni](https://redirect.github.com/lehni) in [#&#8203;11445](https://redirect.github.com/vitest-dev/vitest/issues/11445) and [#&#8203;11446](https://redirect.github.com/vitest-dev/vitest/issues/11446) [<samp>(eba44)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/eba44926e) - **reporters**: - Junit to strip ANSI sequences from all XML attributes  -  by [@&#8203;meganemura](https://redirect.github.com/meganemura) and **Claude Opus 5.5** in [#&#8203;11407](https://redirect.github.com/vitest-dev/vitest/issues/11407) [<samp>(e1a73)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/e1a731470) - **runner**: - Don't cache failed fixture setups  -  by [@&#8203;hamed-bavar](https://redirect.github.com/hamed-bavar) in [#&#8203;11237](https://redirect.github.com/vitest-dev/vitest/issues/11237) and [#&#8203;11238](https://redirect.github.com/vitest-dev/vitest/issues/11238) [<samp>(4ee66)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/4ee66c021) - **typecheck**: - Use typescript pool in toTestSpecification  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11451](https://redirect.github.com/vitest-dev/vitest/issues/11451) [<samp>(5f273)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/5f2739e74) - **ui**: - Remove duplicate browser-open call opening two tabs  -  by [@&#8203;feastyr69](https://redirect.github.com/feastyr69) in [#&#8203;11356](https://redirect.github.com/vitest-dev/vitest/issues/11356) and [#&#8203;11358](https://redirect.github.com/vitest-dev/vitest/issues/11358) [<samp>(d7e13)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/d7e1315c1) - Simplify explorer filtering + fix nested tests when search matches a suite  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi Ogawa**, **Codex** and **Claude Opus 5.5** in [#&#8203;11262](https://redirect.github.com/vitest-dev/vitest/issues/11262) [<samp>(a627b)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/a627be498) - Store module graph once per environment  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi Ogawa** and **Claude Opus 5.5** in [#&#8203;11421](https://redirect.github.com/vitest-dev/vitest/issues/11421) [<samp>(af903)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/af903c65e) - Mount index.html handler on the ui base path  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi Ogawa** and **Claude Opus 5.5** in [#&#8203;11517](https://redirect.github.com/vitest-dev/vitest/issues/11517) [<samp>(1bc24)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/1bc2495c7) - Center split pane resize handle  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi Ogawa** and **Claude Opus 5.5** in [#&#8203;11506](https://redirect.github.com/vitest-dev/vitest/issues/11506) [<samp>(e658b)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/e658b9b6a) - **vm**: - Bind `this` to `module.exports`  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11504](https://redirect.github.com/vitest-dev/vitest/issues/11504) [<samp>(b618a)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/b618afd5c) #####    🏎 Performance - Reuse fsModuleCache when filtering by source  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11428](https://redirect.github.com/vitest-dev/vitest/issues/11428) [<samp>(7ebd9)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/7ebd95fdd) - **spy**: Reset only mocks that were called or reconfigured  -  by [@&#8203;johan-gorter](https://redirect.github.com/johan-gorter) and **Claude Opus 5.5** in [#&#8203;11197](https://redirect.github.com/vitest-dev/vitest/issues/11197) [<samp>(28ef9)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/28ef93df2) #####     [View changes on GitHub](https://redirect.github.com/vitest-dev/vitest/compare/v5.0.3...v5.0.4) ### [`v5.0.3`](https://redirect.github.com/vitest-dev/vitest/releases/tag/v5.0.3) [Compare Source](https://redirect.github.com/vitest-dev/vitest/compare/v5.0.2...v5.0.3) #####    🐞 Bug Fixes - Isolate `result.status` between `repeats` runs  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi Ogawa** and **Codex (GPT-6)** in [#&#8203;11218](https://redirect.github.com/vitest-dev/vitest/issues/11218) [<samp>(5dbeb)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/5dbebe9e3) - Don't print an interceptor warning in browser mode  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11377](https://redirect.github.com/vitest-dev/vitest/issues/11377) [<samp>(15cc0)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/15cc006aa) - Don't retry when `test.fails` expectedly failed  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi Ogawa** and **Codex (GPT-6)** in [#&#8203;11219](https://redirect.github.com/vitest-dev/vitest/issues/11219) [<samp>(b2458)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/b24585f08) - Scope cache key generators to projects  -  by [@&#8203;ecoyoung](https://redirect.github.com/ecoyoung) in [#&#8203;11281](https://redirect.github.com/vitest-dev/vitest/issues/11281) and [#&#8203;11301](https://redirect.github.com/vitest-dev/vitest/issues/11301) [<samp>(92ba7)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/92ba7fc1d) - **browser**: - Delay server `listen` until tests start running  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11366](https://redirect.github.com/vitest-dev/vitest/issues/11366) [<samp>(7d8ed)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/7d8ed3e9b) - Check mock path boundaries  -  by [@&#8203;saryn17](https://redirect.github.com/saryn17), **Ryosei Sato** and [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11361](https://redirect.github.com/vitest-dev/vitest/issues/11361) and [#&#8203;11362](https://redirect.github.com/vitest-dev/vitest/issues/11362) [<samp>(1c388)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/1c3888bce) - Keep config of browser-consumed environments  -  by [@&#8203;kasperpeulen](https://redirect.github.com/kasperpeulen) and **Claude** in [#&#8203;11378](https://redirect.github.com/vitest-dev/vitest/issues/11378) [<samp>(aafc0)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/aafc0996f) - Ignore page crash while cancelling  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11386](https://redirect.github.com/vitest-dev/vitest/issues/11386) [<samp>(7c367)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/7c36748fa) - `toMatchScreenshot` uses wrong reference on retried tests  -  by [@&#8203;macarie](https://redirect.github.com/macarie) in [#&#8203;11393](https://redirect.github.com/vitest-dev/vitest/issues/11393) [<samp>(c22ab)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/c22aba992) - **cache**: - Revalidate imports of cached modules  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11381](https://redirect.github.com/vitest-dev/vitest/issues/11381) [<samp>(38f98)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/38f98855f) - **deps**: - Pin `why-is-node-running` to `3.2.1` to avoid users running into `ERR_PNPM_TRUST_DOWNGRADE`  -  by [@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in [#&#8203;11403](https://redirect.github.com/vitest-dev/vitest/issues/11403) [<samp>(f6c9a)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/f6c9a4977) - **expect**: - Pass current equality testers to `expect.extend` asymmetric matchers  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi Ogawa** and **Claude** in [#&#8203;11401](https://redirect.github.com/vitest-dev/vitest/issues/11401) [<samp>(3e794)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/3e794a96b) - **jsdom**: - Support Blob on jsdom 30.1  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11379](https://redirect.github.com/vitest-dev/vitest/issues/11379) [<samp>(6c49b)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/6c49b7197) - **pool**: - Preserve unique pool ids when `groupOrder` is set  -  by [@&#8203;mtorp](https://redirect.github.com/mtorp) in [#&#8203;11392](https://redirect.github.com/vitest-dev/vitest/issues/11392) [<samp>(50312)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/50312ebb4) - **ui**: - Split-pane handle overlapping iframe  -  by [@&#8203;macarie](https://redirect.github.com/macarie) in [#&#8203;11221](https://redirect.github.com/vitest-dev/vitest/issues/11221) [<samp>(f91db)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/f91db0dfd) - **vitest**: - Remove root temp dir on close  -  by [@&#8203;abhinav-phi](https://redirect.github.com/abhinav-phi) in [#&#8203;11248](https://redirect.github.com/vitest-dev/vitest/issues/11248) [<samp>(7c711)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/7c7119cf7) - **vm**: - Do not optimize deps from index.html  -  by [@&#8203;ezefernandezyf](https://redirect.github.com/ezefernandezyf), **Hiroshi Ogawa** and **Codex (GPT-6)** in [#&#8203;11329](https://redirect.github.com/vitest-dev/vitest/issues/11329) and [#&#8203;11360](https://redirect.github.com/vitest-dev/vitest/issues/11360) [<samp>(caf28)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/caf2887de) - Don't reuse scripts across vite environments  -  by [@&#8203;MO2k4](https://redirect.github.com/MO2k4), **Martin Oehlert** and **Claude** in [#&#8203;11395](https://redirect.github.com/vitest-dev/vitest/issues/11395) [<samp>(346d3)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/346d3896b) #####     [View changes on GitHub](https://redirect.github.com/vitest-dev/vitest/compare/v5.0.2...v5.0.3) ### [`v5.0.2`](https://redirect.github.com/vitest-dev/vitest/releases/tag/v5.0.2) [Compare Source](https://redirect.github.com/vitest-dev/vitest/compare/v5.0.1...v5.0.2) #####    🐞 Bug Fixes - Bind `process` in case global is overwritten  -  by [@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in [#&#8203;11343](https://redirect.github.com/vitest-dev/vitest/issues/11343) [<samp>(0b792)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/0b79231ad) - **detect-async-leaks**: - Ignore `process.stdio` handles  -  by [@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in [#&#8203;11333](https://redirect.github.com/vitest-dev/vitest/issues/11333) [<samp>(0fd6b)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/0fd6b9790) - **expect**: - Fix `toMatchObject` with asymmetric matchers  -  by [@&#8203;ShreeBohara](https://redirect.github.com/ShreeBohara), **Claude Opus 5**, [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi Ogawa** and **Codex (GPT-5)** in [#&#8203;11100](https://redirect.github.com/vitest-dev/vitest/issues/11100) [<samp>(42523)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/42523289e) - **jsdom**: - Fix `Request` with `Blob` body on jsdom 28+  -  by [@&#8203;harshit-d3v](https://redirect.github.com/harshit-d3v) in [#&#8203;11295](https://redirect.github.com/vitest-dev/vitest/issues/11295) [<samp>(d1c3e)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/d1c3ecc93) - **reporter**: - `agent` to respect `--silent`  -  by [@&#8203;Raj4478](https://redirect.github.com/Raj4478) and [@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in [#&#8203;11271](https://redirect.github.com/vitest-dev/vitest/issues/11271) [<samp>(5b95e)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/5b95efb6d) - **reporters**: - Handle concurrent `createReport` calls  -  by [@&#8203;7rulnik](https://redirect.github.com/7rulnik) in [#&#8203;11278](https://redirect.github.com/vitest-dev/vitest/issues/11278) [<samp>(e8e55)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/e8e556ff7) - `hanging-process` to use ESM entrypoint  -  by [@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in [#&#8203;11316](https://redirect.github.com/vitest-dev/vitest/issues/11316) [<samp>(4e91e)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/4e91e5668) - **spy**: - Fix stack overflow when spying `Set.prototype.add`  -  by [@&#8203;fengmk2](https://redirect.github.com/fengmk2) in [#&#8203;11299](https://redirect.github.com/vitest-dev/vitest/issues/11299) [<samp>(a0a93)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/a0a939653) - **ui**: - Persist authentication cookie beyond current browser session  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi Ogawa** and **OpenCode (gpt-5.6-sol)** in [#&#8203;11066](https://redirect.github.com/vitest-dev/vitest/issues/11066) [<samp>(f8819)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/f88195e16) #####     [View changes on GitHub](https://redirect.github.com/vitest-dev/vitest/compare/v5.0.1...v5.0.2) ### [`v5.0.1`](https://redirect.github.com/vitest-dev/vitest/releases/tag/v5.0.1) [Compare Source](https://redirect.github.com/vitest-dev/vitest/compare/v5.0.0...v5.0.1) #####    🚀 Features - **ui**: - Move trace attempts selector to viewer header  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi Ogawa** and **Codex** in [#&#8203;11189](https://redirect.github.com/vitest-dev/vitest/issues/11189) [<samp>(5dc4b)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/5dc4b5c92) - Add focused trace view layout mode  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi Ogawa**, **OpenCode (gpt-5.6-sol)** and **Codex** in [#&#8203;11190](https://redirect.github.com/vitest-dev/vitest/issues/11190) [<samp>(376dc)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/376dc3bc1) #####    🐞 Bug Fixes - Exit 1 when vitest list fails collection  -  by [@&#8203;hamed-bavar](https://redirect.github.com/hamed-bavar) in [#&#8203;11145](https://redirect.github.com/vitest-dev/vitest/issues/11145) and [#&#8203;11146](https://redirect.github.com/vitest-dev/vitest/issues/11146) [<samp>(6108b)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/6108b8197) - Keep parse error details in static collection  -  by [@&#8203;hamed-bavar](https://redirect.github.com/hamed-bavar) in [#&#8203;11150](https://redirect.github.com/vitest-dev/vitest/issues/11150) and [#&#8203;11151](https://redirect.github.com/vitest-dev/vitest/issues/11151) [<samp>(7c818)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/7c818153a) - Avoid recursive prototype in automocking  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11195](https://redirect.github.com/vitest-dev/vitest/issues/11195) [<samp>(99fc5)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/99fc52591) - Prevent false Vitest import resolution  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11196](https://redirect.github.com/vitest-dev/vitest/issues/11196) [<samp>(b426c)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/b426c1976) - Keep metadata file when clearing the cache  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11199](https://redirect.github.com/vitest-dev/vitest/issues/11199) [<samp>(73614)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/73614654a) - Correct typos in error message and comments  -  by [@&#8203;shinji00222](https://redirect.github.com/shinji00222) and **Shinji** in [#&#8203;11187](https://redirect.github.com/vitest-dev/vitest/issues/11187) [<samp>(115c3)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/115c3f6d2) - Resolve ResolvedConfig exactOptionalPropertyTypes errors  -  by [@&#8203;LukeAbby](https://redirect.github.com/LukeAbby) in [#&#8203;11175](https://redirect.github.com/vitest-dev/vitest/issues/11175) [<samp>(498fb)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/498fbe922) - Share the server on self-referencing `extends`  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11034](https://redirect.github.com/vitest-dev/vitest/issues/11034) [<samp>(23dda)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/23dda738c) - Warn when deprecated `deps.optimizer.web` is used  -  by [@&#8203;im10furry](https://redirect.github.com/im10furry) in [#&#8203;11214](https://redirect.github.com/vitest-dev/vitest/issues/11214) [<samp>(2ce29)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/2ce29d5fa) - **browser**: - Avoid double quotes in `config.define`  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11198](https://redirect.github.com/vitest-dev/vitest/issues/11198) [<samp>(972e2)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/972e24bab) - **doctor**: - Measure vm pools for custom environments  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11212](https://redirect.github.com/vitest-dev/vitest/issues/11212) [<samp>(91ab1)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/91ab1588c) - **expect**: - Correct return value in `toMatchAriaSnapshot`  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11208](https://redirect.github.com/vitest-dev/vitest/issues/11208) [<samp>(c119b)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/c119be016) - **fakeTimers**: - Force `queueMicrotask` and `nextTick` in `toNotFake`  -  by [@&#8203;kingmakeruix](https://redirect.github.com/kingmakeruix), **kingmakeruix**, **Hiroshi Ogawa**, **Codex** and [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) in [#&#8203;11261](https://redirect.github.com/vitest-dev/vitest/issues/11261) [<samp>(a47d7)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/a47d7908f) - **snapshot**: - Report obsolete keys next to skipped tests  -  by [@&#8203;hamed-bavar](https://redirect.github.com/hamed-bavar), **Hiroshi Ogawa** and **OpenCode (gpt-5.6-sol)** in [#&#8203;11157](https://redirect.github.com/vitest-dev/vitest/issues/11157) and [#&#8203;11158](https://redirect.github.com/vitest-dev/vitest/issues/11158) [<samp>(17e2b)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/17e2b22dd) - **types**: - Make public declarations self-contained  -  by [@&#8203;ZoeySigel](https://redirect.github.com/ZoeySigel) in [#&#8203;11141](https://redirect.github.com/vitest-dev/vitest/issues/11141) [<samp>(45546)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/455466c16) - **ui**: - Fix collapse/expand suite with file name search  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi Ogawa** and **Codex** in [#&#8203;11260](https://redirect.github.com/vitest-dev/vitest/issues/11260) [<samp>(0a712)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/0a7122daa) - Fix explorer file summary count  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi Ogawa**, **OpenCode (gpt-5.6-sol)** and **Codex** in [#&#8203;11125](https://redirect.github.com/vitest-dev/vitest/issues/11125) [<samp>(05982)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/05982297d) - **utils**: - Fix `deepMerge` to handle prototype  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi Ogawa** and **Codex** in [#&#8203;11215](https://redirect.github.com/vitest-dev/vitest/issues/11215) [<samp>(4944c)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/4944cf498) #####     [View changes on GitHub](https://redirect.github.com/vitest-dev/vitest/compare/v5.0.0...v5.0.1) ### [`v5.0.0`](https://redirect.github.com/vitest-dev/vitest/releases/tag/v5.0.0) [Compare Source](https://redirect.github.com/vitest-dev/vitest/compare/v4.1.12...v5.0.0) Vitest 5 is officially out! This release focuses on performance and brings a lot of new features while fixing long-standing bugs. See our [blog post](https://vitest.dev/blog/vitest-5.html) for the official announcement. #####    🚨 Breaking Changes - Replace `loupe.inspect` with pretty-format  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Claude Opus 5 (1M context)** and **OpenAI Codex** in [#&#8203;9609](https://redirect.github.com/vitest-dev/vitest/issues/9609) [<samp>(3f802)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/3f802da4b) - Remove quotes from string values in `test.for/each` title `$` variable (take 2)  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) in [#&#8203;10170](https://redirect.github.com/vitest-dev/vitest/issues/10170) [<samp>(04d37)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/04d37e9d7) - Default `attachmentsDir` from `.vitest-attachements/` to `.vitest/attachments/`  -  by [@&#8203;MdSadiqMd](https://redirect.github.com/MdSadiqMd) in [#&#8203;10186](https://redirect.github.com/vitest-dev/vitest/issues/10186) [<samp>(1ba73)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/1ba7338c3) - Remove `sequential` test/suite options in favor of `concurrent`  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) and **OpenAI Codex** in [#&#8203;10198](https://redirect.github.com/vitest-dev/vitest/issues/10198) [<samp>(9229f)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/9229f2edc) - Represent locator as an object instead of a string  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;10212](https://redirect.github.com/vitest-dev/vitest/issues/10212) [<samp>(80f07)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/80f07edf6) - Inline `expect` package  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;10221](https://redirect.github.com/vitest-dev/vitest/issues/10221) [<samp>(ad162)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/ad16223e7) - Remove deprecated entry points  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;10222](https://redirect.github.com/vitest-dev/vitest/issues/10222) [<samp>(994c6)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/994c6ddb9) - Require Node.js 22 and Vite 6.4  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;10178](https://redirect.github.com/vitest-dev/vitest/issues/10178) [<samp>(38762)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/3876283e8) - Fail `expect.poll` when function didn't resolve in time  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) and **OpenAI Codex** in [#&#8203;10233](https://redirect.github.com/vitest-dev/vitest/issues/10233) [<samp>(4df04)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/4df048c11) - Throw an error if hoistable methods are outside the top level scope  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;10460](https://redirect.github.com/vitest-dev/vitest/issues/10460) [<samp>(d0b4f)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/d0b4fddcb) - `toHaveTextContent` is strict, add `toMatchTextContent` as alternative  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;10473](https://redirect.github.com/vitest-dev/vitest/issues/10473) [<samp>(18f30)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/18f303079) - Don't lookup config file from ancestor directories  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **OpenAI Codex** and **Hiroshi Ogawa** in [#&#8203;10428](https://redirect.github.com/vitest-dev/vitest/issues/10428) [<samp>(945d9)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/945d9090e) - Inline `@vitest/runner` package, do not publish it anymore  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;10511](https://redirect.github.com/vitest-dev/vitest/issues/10511) [<samp>(6d6e4)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/6d6e46b1e) - Allow mutating happy-dom/jsdom window object  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi Ogawa** and **OpenAI Codex** in [#&#8203;10373](https://redirect.github.com/vitest-dev/vitest/issues/10373) [<samp>(206e8)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/206e8cff8) - Expose `concurrencyId`/`workerId` on TestModule's diagnostics, make id 1-based  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;10516](https://redirect.github.com/vitest-dev/vitest/issues/10516) [<samp>(bdd98)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/bdd985433) - Add `screenshotDirectory` config to `browser.expect.toMatchScreenshot`  -  by [@&#8203;macarie](https://redirect.github.com/macarie) in [#&#8203;10592](https://redirect.github.com/vitest-dev/vitest/issues/10592) [<samp>(a60de)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/a60ded0fb) - Update `@sinonjs/fake-timers` and support mocking `Temporal`  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi Ogawa** and **OpenCode (gpt-5.6-sol)** in [#&#8203;10654](https://redirect.github.com/vitest-dev/vitest/issues/10654) [<samp>(f8b15)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/f8b1532fe) - Remove webdriverio package  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;10675](https://redirect.github.com/vitest-dev/vitest/issues/10675) [<samp>(5fed6)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/5fed68f72) - Clear mocks by default before each test  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;10613](https://redirect.github.com/vitest-dev/vitest/issues/10613) [<samp>(0f646)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/0f6463bf2) - Don't emit localStorage warnings on Node 26, fail gracefully when worker fails to start  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;10293](https://redirect.github.com/vitest-dev/vitest/issues/10293) [<samp>(334ed)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/334edef92) - Separate config resolution from the server creation  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;10554](https://redirect.github.com/vitest-dev/vitest/issues/10554) [<samp>(1c0ec)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/1c0ec3444) - Inline projects extend the root config by default  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;10750](https://redirect.github.com/vitest-dev/vitest/issues/10750) [<samp>(fec00)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/fec001ad3) - Enable mocking Temporal without fake timers  -  by [@&#8203;fabon-f](https://redirect.github.com/fabon-f), **Hiroshi Ogawa** and **OpenCode (gpt-5.6-sol)** in [#&#8203;10757](https://redirect.github.com/vitest-dev/vitest/issues/10757) [<samp>(ac2d4)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/ac2d46b42) - Support nested projects  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;10846](https://redirect.github.com/vitest-dev/vitest/issues/10846) [<samp>(ec367)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/ec367cf2a) - Use `>` as separator in `-t`, calculate `only` once  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;10686](https://redirect.github.com/vitest-dev/vitest/issues/10686) [<samp>(a0b20)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/a0b20bc86) - Fail the test when an asynchronous assertion is not awaited  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;10868](https://redirect.github.com/vitest-dev/vitest/issues/10868) [<samp>(86d4a)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/86d4a9da9) - Share the Vite server between inline projects  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;10848](https://redirect.github.com/vitest-dev/vitest/issues/10848) [<samp>(d87c9)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/d87c96ee4) - Parse files statically in vitest list by default  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11088](https://redirect.github.com/vitest-dev/vitest/issues/11088) [<samp>(51e94)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/51e949416) - **benchmark**: - Rewrite the public API  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;10113](https://redirect.github.com/vitest-dev/vitest/issues/10113) [<samp>(19f6e)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/19f6e8947) - **browser**: - Iframe scale  -  by [@&#8203;macarie](https://redirect.github.com/macarie) in [#&#8203;9745](https://redirect.github.com/vitest-dev/vitest/issues/9745) [<samp>(b6398)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/b639852cc) - Enable `locators.exact` by default  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;10430](https://redirect.github.com/vitest-dev/vitest/issues/10430) [<samp>(e2032)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/e203202f9) - Require `sessionId` for orchestrator html request  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi Ogawa** and **OpenAI Codex** in [#&#8203;10522](https://redirect.github.com/vitest-dev/vitest/issues/10522) [<samp>(79b7d)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/79b7d8fcc) - Save failure screenshots in `attachmentsDir`  -  by [@&#8203;macarie](https://redirect.github.com/macarie) in [#&#8203;10917](https://redirect.github.com/vitest-dev/vitest/issues/10917) [<samp>(3b5bb)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/3b5bbd8b4) - **coverage**: - `include/exclude` globs too eager  -  by [@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in [#&#8203;9818](https://redirect.github.com/vitest-dev/vitest/issues/9818) [<samp>(edacb)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/edacb0fd4) - Allow `thresholds.perFile` to accept an object  -  by [@&#8203;vladlenskiy](https://redirect.github.com/vladlenskiy) and [@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in [#&#8203;10190](https://redirect.github.com/vitest-dev/vitest/issues/10190) [<samp>(13b78)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/13b78d98b) - **expect**: - Fix `toThrow("")` behavior by reverting [#&#8203;6710](https://redirect.github.com/vitest-dev/vitest/issues/6710)  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) in [#&#8203;9643](https://redirect.github.com/vitest-dev/vitest/issues/9643) and [#&#8203;6710](https://redirect.github.com/vitest-dev/vitest/issues/6710) [<samp>(6c3e4)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/6c3e4bdbf) - **mocker**: - Deserialize automock as automock  -  by [@&#8203;nami8824](https://redirect.github.com/nami8824) in [#&#8203;10192](https://redirect.github.com/vitest-dev/vitest/issues/10192) [<samp>(2f892)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/2f892712d) - **reporters**: - `blob` reporter and `--merge-reports` default to `.vitest/blob/`  -  by [@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in [#&#8203;10232](https://redirect.github.com/vitest-dev/vitest/issues/10232) [<samp>(d22b0)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/d22b029ae) - Write json and junit reporter output files to `.vitest` by default  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi Ogawa**, **OpenCode (gpt-5.6-sol)** and [@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in [#&#8203;10621](https://redirect.github.com/vitest-dev/vitest/issues/10621) [<samp>(58577)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/58577290a) - **spy**: - Preserve class mock prototype methods on instances  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;10910](https://redirect.github.com/vitest-dev/vitest/issues/10910) [<samp>(6093d)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/6093d764a) - **types**: - Add better promise support in expects and matchers  -  by [@&#8203;samchungy](https://redirect.github.com/samchungy) and [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;8266](https://redirect.github.com/vitest-dev/vitest/issues/8266) [<samp>(41f55)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/41f551bce) - **ui**: - Harden UI API access  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi Ogawa** and **OpenAI Codex** in [#&#8203;10583](https://redirect.github.com/vitest-dev/vitest/issues/10583) [<samp>(4c26d)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/4c26d7675) - Change html reporter default output to `.vitest`  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) and **Hiroshi Ogawa** in [#&#8203;10620](https://redirect.github.com/vitest-dev/vitest/issues/10620) [<samp>(29c36)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/29c364d50) #####    🚀 Features - Add `createReport` and `.vitest` report directory convention  -  by [@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in [#&#8203;9993](https://redirect.github.com/vitest-dev/vitest/issues/9993) [<samp>(72a6d)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/72a6dc257) - Expose default reporters through `configDefaults.reporters`  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) and **Claude Opus 5 (1M context)** in [#&#8203;10219](https://redirect.github.com/vitest-dev/vitest/issues/10219) [<samp>(083f6)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/083f6bdd6) - Support merge reports for non-sharded multi-environment runs (take 2)  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Claude Opus 5 (1M context)**, **OpenAI Codex** and [@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in [#&#8203;10031](https://redirect.github.com/vitest-dev/vitest/issues/10031) [<samp>(e60b2)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/e60b2f49e) - Add `logger.formatError`  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) and **OpenAI Codex** in [#&#8203;10268](https://redirect.github.com/vitest-dev/vitest/issues/10268) [<samp>(2c5f3)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/2c5f3ee2f) - Support typescript build mode  -  by [@&#8203;lishaduck](https://redirect.github.com/lishaduck) in [#&#8203;9870](https://redirect.github.com/vitest-dev/vitest/issues/9870) [<samp>(106da)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/106da5896) - Add toggable `injectCjsGlobals` option  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;10709](https://redirect.github.com/vitest-dev/vitest/issues/10709) [<samp>(82671)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/826714ece) - Promote fsModuleCache to a top-level option  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;10734](https://redirect.github.com/vitest-dev/vitest/issues/10734) [<samp>(78ed7)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/78ed73afd) - Support non-ascii characters in `for/each` title placeholders  -  by [@&#8203;k-yle](https://redirect.github.com/k-yle) in [#&#8203;10773](https://redirect.github.com/vitest-dev/vitest/issues/10773) [<samp>(15e0a)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/15e0af953) - Report the duration breakdown as percentages  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) and [@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in [#&#8203;10820](https://redirect.github.com/vitest-dev/vitest/issues/10820) [<samp>(c67d2)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/c67d296f4) - Promote parseSpecifications out of experimental  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11087](https://redirect.github.com/vitest-dev/vitest/issues/11087) [<samp>(b628c)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/b628cb680) - Promote clearCache out of experimental  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;11086](https://redirect.github.com/vitest-dev/vitest/issues/11086) [<samp>(d4fe1)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/d4fe1986f) - **api**: - Expose logs recorded during the test  -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;10277](https://redirect.github.com/vitest-dev/vitest/issues/10277) [<samp>(cba20)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/cba2036a1) - **benchmark**: - Add pluggable benchmark provider API  -  by [@&#8203;GuillaumeLagrange](https://redirect.github.com/GuillaumeLagrange) and [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;10799](https://redirect.github.com/vitest-dev/vitest/issues/10799) [<samp>(86c70)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/86c700ed8) - **browser**: - Export aria tree utils  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) in [#&#8203;10171](https://redirect.github.com/vitest-dev/vitest/issues/10171) [<samp>(c3423)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/c3423014c) - Support dom snapshot trace view  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Claude Opus 5 (1M context)** and **OpenAI Codex** in [#&#8203;10102](https://redirect.github.com/vitest-dev/vitest/issues/10102) [<samp>(7eddd)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/7eddd273d) - Provide project reference in `ToMatchScreenshotResolvePath`  -  by [@&#8203;macarie](https://redirect.github.com/macarie) and [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in [#&#8203;10138](https://redirect.github.com/vitest-dev/vitest/issues/10138) [<samp>(16654)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/166544e39) - Show aria tree on locator element error  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) and **OpenAI Codex** in [#&#8203;10257](https://redirect.github.com/vitest-dev/vitest/issues/10257) [<samp>(04f04)</samp>](https://redirect.github.com/vitest-dev/vitest/commit/04f04cdd1) - Support custom `kind` in `page.mark`  -  by [@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in > [!IMPORTANT] > ✂ PR body was truncated to here. </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - "before 6am every weekday" - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://redirect.github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xOTguMiIsInVwZGF0ZWRJblZlciI6IjQ0LjIwNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWF0aW9uIl19--> --------- Co-authored-by: wardpeet <ward@coding-tech.com> Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-11-03 11:18:21 -08:00
ci: select tests for dependency bumps and directory-scanning tests on… (#29725) … PRs PR test selection only follows source imports, so three PRs merged green and broke the alpha cron's full suite: an OpenTelemetry lockfile bump (#28581, otel-bridge), lockfile maintenance moving @ai-sdk/anthropic (#29341, schema-compat e2e), and a new hook without a story (#29373, storybook-coverage.test.ts reads the hooks folder rather than importing it). Prebuild now compares each workspace package's resolved dependency tree between the base and head lockfiles and runs the tests of packages whose tree or package.json changed. A root toolchain change, or a selection over a quarter of the suite, runs the sharded full suite instead. Tests that scan their package's directory run when a file there is added, removed or renamed. The selection logic also moves out of inline workflow script into .github/scripts/select-affected-tests.cjs with unit tests, and keeps the three-way split of large affected unit runs from #29143. ## Description <!-- Required: Provide a brief description of the changes in this PR. --> ## Related issue(s) <!-- Required: Link to the issue(s) this PR addresses, e.g. with: Fixes #123. PRs without linked issues will be closed. High-quality issues with reproductions are preferred to vague pull requests. --> ## Type of change - [ ] Bug fix (non-breaking change that fixes an issue) - [ ] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update - [ ] Code refactoring - [ ] Performance improvement - [ ] Test update ## Checklist - [ ] I have linked the related issue(s) in the description above - [ ] I have made corresponding changes to the documentation (if applicable) - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have addressed all Coderabbit comments on this PR <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## ELI5 The test selector checks whether package dependencies changed and whether tests search their package folders for files. It uses the PR’s own lockfile changes to select relevant tests, so unrelated changes on the base branch do not trigger extra test runs. ## What changed - Added dependency-based test routing. It compares resolved dependency trees in the merge-base and PR-head lockfiles, follows workspace links, and selects tests for affected packages. - Selects a package’s tests when its `package.json` changes. - Selects directory-scanning tests when files in their package are added, removed, or renamed. - Requests the full suite when root dependencies change or dependency-based selection exceeds 25% of the test files. - Moved Prebuild test selection into `.github/scripts/select-affected-tests.cjs`. The script combines import-graph and dependency-based selections and routes tests to the applicable suites. - Added tests for dependency routing and suite selection. Added `yaml` as a root development dependency. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-11-09 23:45:01 +01:00
2024-08-12 12:56:35 +01:00
2024-08-12 12:56:35 +01:00
2024-12-05 23:19:53 -08:00
chore(repo): Improve embedded docs script (#12664) ## Description Improve the `generate-package-docs.ts` script by using the new `llms-manifest.json` from docs to copy over llms.txt files to the embedded docs (previously the raw MDX was parsed and assembled). This PR also updates the script to be run without any cli args, it just runs in the current `process.cwd()` context. This simplifies usage when running via `npm` scripts. This PR also improves the performance of the `SOURCE_MAP.json` generation by 2x. Lastly, the `dist/docs` structure itself is updated to follow the agent skills spec. ## Related Issue(s) <!-- Link to the issue(s) this PR addresses, using hashtag notation: Fixes #123 --> ## Type of Change - [ ] Bug fix (non-breaking change that fixes an issue) - [ ] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update - [X] Code refactoring - [ ] Performance improvement - [ ] Test update ## Checklist - [ ] I have made corresponding changes to the documentation (if applicable) - [ ] I have added tests that prove my fix is effective or that my feature works <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Refactor** * Docs generation moved to a centralized, manifest-driven workflow; package-level doc scripts simplified to rely on contextual discovery and a central docs build. * Build tasks updated across packages to depend on the centralized docs build step. * **Documentation** * Replaced a lengthy proposal with a concise Turbo-focused guide and added optional description metadata for doc entries. * **Bug Fix** * Removed noisy console warnings during docs site initialization. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-02-05 01:24:43 +01:00
Server adapters (#10263) Generic ServerAdapter class and hono/express implementations. Using the new implementation in the mastra dev server. ## Description <!-- Provide a brief description of the changes in this PR --> ## Related Issue(s) <!-- Link to the issue(s) this PR addresses, using hashtag notation: #123 --> ## Type of Change - [ ] Bug fix (non-breaking change that fixes an issue) - [x] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update - [ ] Code refactoring - [ ] Performance improvement - [x] Test update ## Checklist - [ ] I have made corresponding changes to the documentation (if applicable) - [x] I have added tests that prove my fix is effective or that my feature works <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** - MCP support: server registry, server detail, tools listing/execution, and SSE/message endpoints. - New A2A endpoints for agent card and agent execution. - Server-adapter packages and export for Hono/Express enabling adapter-based server integration. * **Refactor** - Routing consolidated to a route-driven / adapter pattern across agents, memory, tools, voice, vector, scores, workflows, logs, and observability; handlers migrated to route objects. * **Chores** - Added npm scripts for building/testing server adapters. - .gitignore updated to ignore *.db files. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: mfrachet <marvin@mastra.ai> Co-authored-by: NikAiyer <nick.aiyer@gmail.com> Co-authored-by: Taofeeq Oluder <oluderutaofeeq@gmail.com>
2025-11-20 18:08:33 +02:00
feat: make your IDE or agent into a Mastra expert via MCP (#2966) This turns your IDE or agent into a Mastra expert with up to date knowledge of Mastra! It can look up specific docs (evals, rag, storage, deployer, getting started, etc), read the blog, check code examples, and read `CHANGELOG.md` for any Mastra package. Works in a Mastra agent, cursor, windsurf, claude, goose, etc - any MCP client. Trying this PR locally in cursor: - checkout the PR - `pnpm build:packages` - Add this file with the correct absolute path to your local Mastra repo in the args. This file should be placed in `some_project_root/.cursor/mcp.json` MacOS/Linux ```json { "mcpServers": { "mastra": { "command": "npx", "args": [ "-y", "tsx", "[FULL_PATH_TO_MASTRA_REPO]/packages/mcp-docs-server/src/stdio.ts" ] } } } ``` Windows: ```json { "mcpServers": { "mastra": { "command": "cmd", "args": [ "/c", "npx", "-y", "tsx", "[FULL_PATH_TO_MASTRA_REPO]/packages/mcp-docs-server/src/stdio.ts" ] } } } ``` Questions: 1. ~~Naming? I called it `@mastra/docs-mcp` @calcsam @smthomas thoughts? We need it to be different enough from our `@mastra/mcp` package~~ Sam suggested asking claude and it came up with `@mastra/mcp-docs-server` which seems fitting to me. 2. To make it so this package is bumped and released with any other package change I added _every_ mastra package as a devDep. @wardpeet I feel like this is not the right approach but I couldn't see in changeset docs how to make it bump with every package change. Any ideas? Follow ups: 1. Need to add this to `pnpm create mastra` as an option to install in cursor/windsurf automatically when scaffolding a new project. Will follow up in another PR once this is published and available on npm 2. Need to add proper docs - this PR only has a README 3. ~~[It needs to self update](https://www.perplexity.ai/search/npm-npx-self-updater-Va1mguxQSZmltavk62iaWQ#1) - otherwise it will eventually be out of date. It should periodically check for new versions of itself. Maybe the server should run a subprocess and communicate via IPC so it can kill and restart the subprocess when it updates. This will become an issue basically as soon as folks start using this longer than a week~~ actually I'll change the instructions to include `@latest` so restarting the mcp server will update 4. We should add a tool so the agent can query GH issues when the user or code is having a problem. And another tool to fill out an issue template and open it in their browser for them Demo: Here I only prompted about 4 times and it can do a lot with very little input. There are some things it said wrong (passing the agent to an api key in useChat) but we can use these kinds of errors to improve our docs. In cursor/windsurf the agent will also figure it out itself. When it reads docs and writes code that's broken I've seen it check the docs again and fix the code. <img width="909" alt="Screenshot 2025-03-14 at 9 50 48 AM" src="https://github.com/user-attachments/assets/4586c6ee-b182-42ae-a323-3f0c592f7552" /> <img width="884" alt="Screenshot 2025-03-14 at 9 50 22 AM" src="https://github.com/user-attachments/assets/152d9173-2b06-4377-b67c-15558cd437b4" /> <img width="857" alt="Screenshot 2025-03-14 at 9 50 28 AM" src="https://github.com/user-attachments/assets/fd30af8f-017a-43b5-bee5-67e47596feb8" /> <img width="892" alt="Screenshot 2025-03-14 at 9 51 11 AM" src="https://github.com/user-attachments/assets/9d6f7612-5c02-4c11-beca-bb836dc1922c" /> <img width="894" alt="Screenshot 2025-03-14 at 9 51 20 AM" src="https://github.com/user-attachments/assets/86f21ac8-d015-4dd0-b72e-0b96177a3895" /> <img width="909" alt="Screenshot 2025-03-14 at 9 51 29 AM" src="https://github.com/user-attachments/assets/fd6f4faf-1383-4471-8885-9869725f50f4" /> <img width="912" alt="Screenshot 2025-03-14 at 9 51 44 AM" src="https://github.com/user-attachments/assets/abdc405d-1a80-4043-aad7-acb81ce23e72" /> <img width="902" alt="Screenshot 2025-03-14 at 9 51 59 AM" src="https://github.com/user-attachments/assets/0efbab16-8f53-4c33-b34a-f32139c06a00" /> <img width="903" alt="Screenshot 2025-03-14 at 9 52 07 AM" src="https://github.com/user-attachments/assets/0ab1000e-9739-4388-8d3f-83098756bcdd" /> <img width="898" alt="Screenshot 2025-03-14 at 9 52 14 AM" src="https://github.com/user-attachments/assets/c0ab9f8f-b9f2-4694-af59-d17cf613360f" /> <img width="895" alt="Screenshot 2025-03-14 at 9 52 24 AM" src="https://github.com/user-attachments/assets/a0181467-84f9-4df0-a11c-0cc0ecaec5fb" /> <img width="907" alt="Screenshot 2025-03-14 at 9 52 42 AM" src="https://github.com/user-attachments/assets/5bc6c81b-ce47-4907-b7a4-006032933001" /> <img width="916" alt="Screenshot 2025-03-14 at 9 53 37 AM" src="https://github.com/user-attachments/assets/bdc1ddf0-fa24-4b30-acb4-f25d39e02313" /> <img width="894" alt="Screenshot 2025-03-14 at 9 54 40 AM" src="https://github.com/user-attachments/assets/d81b75fd-4cda-4380-a1bb-f57d0cdbccaf" /> <img width="894" alt="Screenshot 2025-03-14 at 9 54 53 AM" src="https://github.com/user-attachments/assets/faf04696-09d4-4b7e-892e-dbbe75acea5e" /> <img width="898" alt="Screenshot 2025-03-14 at 10 01 29 AM" src="https://github.com/user-attachments/assets/ef3645b1-4d57-4f87-a999-4c2cce9fce38" /> <img width="899" alt="Screenshot 2025-03-14 at 10 02 04 AM" src="https://github.com/user-attachments/assets/10345772-937b-4cb6-ae58-11fb94b86b9c" />
2025-03-17 10:42:18 -07:00
2025-02-20 00:02:52 +01:00
feat: auth core, server RBAC, and adapter permission enforcement (#13163) ## Summary PR 1 of 3 from the `auth-rbac-cms` branch split. This PR adds all backend plumbing for auth/RBAC. PRs 2 (auth providers) and 3 (playground UI) depend on this and can land in parallel once this merges. - **New `@mastra/core/auth` export** — interfaces for RBAC, sessions, SSO, credentials, ACL, and user management, plus default implementations (static RBAC provider, cookie/memory session providers, built-in roles) - **Server auth handlers** — login, signup, logout, session management, and SSO flows with Zod-validated schemas - **Route-level permission enforcement** — `requiresPermission` on route configs with convention-based derivation from path/method (e.g. `GET /agents/:id` → `agents:read`) - **Server adapter RBAC middleware** (Hono, Express, Fastify, Koa) — resolves user permissions via RBAC provider, cookie auth fallthrough for session-based auth - **Authorization policy fix** — `isProtectedPath` now uses `isProtectedCustomRoute` instead of `!isCustomRoutePublic`, fixing a bug where studio UI couldn't load in production - **Deployer updates** — `MASTRA_PACKAGES_FILE` env var injection, dynamic CORS origin when auth configured - **Client SDK** — `getFullUrl` helper, `AuthCapabilities` type export ### Key behavioral changes | Change | Risk | Mitigation | |---|---|---| | `SimpleAuth<TUser>` → `SimpleAuth<TUser extends EEUser>` | Medium — requires `id` + `email` fields | Intentional; compile-time catch | | `isProtectedPath` logic change | Medium — authorization policy | New tests cover this; required for studio login in prod | | Cookie fallthrough in Hono auth middleware | Low | Falls back to 401 if no user found | | No RBAC → authenticated users get full access | Low — intentional | Auth-only mode preserved | | CORS dynamic origin when auth configured | Low | Only activates with auth config; user can override | ### Deviation from plan `deployers/cloud/package.json` — the plan called for adding `@mastra/auth-cloud` dependency, but that package is created in PR 2. Omitted here to avoid workspace resolution failure; PR 2 will add it. ### Fixed pre-existing test bug All 4 adapter RBAC tests had a failing test ("should derive permissions from route path/method when not explicitly set") that registered an API handler at `/agents/test` with no prefix. That's a frontend/SPA path — real API handlers are always under `/api/*`. Fixed the test to use `prefix: '/api'` so the route is at `/api/agents/test`, matching how routes are actually registered. Verified the bug exists on `auth-rbac-cms` with clean install + build. ## Test plan - [x] `pnpm build:packages` — 35/35 tasks pass - [x] Core auth tests (cookie.test.ts) — 16/16 pass - [x] Server tests (permissions, helpers, system) — 177/177 pass - [x] Hono RBAC tests — 21/21 pass - [x] Express RBAC tests — 15/15 pass - [x] Fastify RBAC tests — 15/15 pass - [x] Koa RBAC tests — 15/15 pass - [x] Client SDK tests (base.test.ts) — 5/5 pass - [ ] Verify no auth configured → all existing behavior identical (no 403s, no auth prompts) - [ ] Verify pre-commit hooks pass (eslint + prettier) 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Enterprise auth: SSO and credentials sign-in/sign-up, login/logout, cookie and in-memory sessions, auth capabilities and current-user endpoints. * RBAC: default roles, static RBAC provider, route-level permission enforcement and middleware across adapters. * Client: full-URL helper; system responses include isDev. * Deploy/build: bundling emits package metadata; deployers set runtime packages file and adjust CORS when auth is enabled. * **Bug Fixes** * Studio UI loads correctly in production. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Shane Thomas <shane@codekarate.com> Co-authored-by: Mastra Code (anthropic/claude-opus-4-6) <noreply@mastra.ai> Co-authored-by: Abhi Aiyer <abhiaiyer91@gmail.com>
2026-03-03 13:49:10 -08:00
feat: E2B sandbox and S3 filesystem with mount support (COR-380, COR-385, COR-484) (#12605) ## Summary Adds E2B sandbox and S3 filesystem packages with automatic mount support, enabling agents to access cloud storage from within sandboxed code execution environments. ### New Packages - **@mastra/e2b** - E2B sandbox implementation with FUSE mounting support - **@mastra/s3** - S3-compatible filesystem (AWS S3, Cloudflare R2, MinIO, etc.) ### Core Changes - Add mount types and `FilesystemMountConfig` interface - Add `CompositeFilesystem` for multi-mount workspaces - Add mount state tracking to `BaseSandbox` (pending → mounting → mounted) - Workspace passes mount config to sandbox via `setMounts()` - Lazy mounting: filesystems are mounted when sandbox starts ### Features - **Automatic mounting**: S3 buckets auto-mount into E2B sandbox via s3fs - **Config change detection**: Remounts on credential/bucket changes - **Mount reconciliation**: Cleans up stale mounts when config changes - **Provider icons**: UI shows cloud provider icons for mount points - **Sandbox reconnection**: Reconnects to existing sandbox with mount preservation ### Usage ```typescript import { Workspace } from '@mastra/core/workspace'; import { E2BSandbox } from '@mastra/e2b'; import { S3Filesystem } from '@mastra/s3'; const workspace = new Workspace({ mounts: { '/bucket': new S3Filesystem({ bucket: 'my-bucket', region: 'auto', endpoint: process.env.S3_ENDPOINT, accessKeyId: process.env.S3_ACCESS_KEY_ID, secretAccessKey: process.env.S3_SECRET_ACCESS_KEY, }), }, sandbox: new E2BSandbox({ id: 'my-sandbox', }), }); // No need to call init() - mounts happen lazily on first sandbox use const result = await workspace.sandbox.executeCommand('ls', ['/bucket']); ``` ## Test plan - [x] Mount S3 bucket into E2B sandbox - [x] Change mount path and verify old mount is cleaned up - [x] Change bucket/credentials and verify remount - [x] Reconnect to existing sandbox with mount preservation - [x] UI shows mount icons and provider badges - [ ] Add unit tests for S3Filesystem - [ ] Add unit tests for E2BSandbox mount logic ## Related Based on work from #12179 --- 🤖 Generated with [Claude Code](https://claude.ai/code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Multi-filesystem mounting with provider-aware icons/labels, virtual mount browsing, cross-mount copy/move, and E2B cloud sandbox (lifecycle, templating, command execution, mount reconciliation). * New S3 and GCS filesystem providers and a shared workspace test-utils library for standardized filesystem/sandbox/integration tests. * UI: mount-aware file browser icons and metadata in listings. * **Bug Fixes / Reliability** * Safer lifecycle/readiness handling and clearer error signaling for filesystems and sandboxes. * **Chores** * Conditional CI workspace/cloud test workflows and new workspace build script. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: CalebBarnes <CalebBarnes@users.noreply.github.com> Co-authored-by: NikAiyer <nick.aiyer@gmail.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 14:07:57 -08:00
feat(playground): redesign dataset detail page layout and versions panel (#21910) ## Summary Redesigns the dataset detail page in Studio so it matches the look and behavior of the rest of the app (agents/workflows pages): - **Header & tabs**: pill-style tabs with the actions (`Created … — vN` metadata, Run Experiment, actions menu) inlined on the same row; consistent spacing and a full-width top border on tab content. - **Toolbar consistency**: Items / Experiments / Review toolbars now align (same control heights and top offset); Review empty state uses the shared `EmptyState` component; the duplicate top-right "Add Item" is hidden in the empty state. - **Versions panel**: always visible on the right (no toggle, no close button), full-height with its own scroll, single clean divider, and rendered with the `ThreadList` pattern used by workflow runs — sentence-case "Versions" header and compact ghost Compare action. - **Compare fix**: version checkboxes are now purely visual and the row button owns the toggle, fixing direct checkbox clicks not selecting versions. - Also includes a pnpm 11 compatibility fix so `pnpm dev:playground:full` works (root pins `pnpm@11.21.0`; moved `examples/agent` overrides to `pnpm-workspace.yaml`). ## Test plan - Verified in Studio via Playwright on `/datasets/:id`: tab alignment (all controls at same offset/height), always-visible full-height versions panel, single divider, full-width tab border. - Compare flow: entering compare mode, selecting two versions via direct checkbox clicks, Compare button enabling — all working with 0 console errors. - `tsc --noEmit` passes for `packages/playground` and `packages/playground-ui`. --------- Co-authored-by: Mastra Code (anthropic/claude-fable-5) <noreply@mastra.ai>
2026-08-25 12:06:31 +02:00
2025-01-16 17:53:47 +01:00
feat: auth core, server RBAC, and adapter permission enforcement (#13163) ## Summary PR 1 of 3 from the `auth-rbac-cms` branch split. This PR adds all backend plumbing for auth/RBAC. PRs 2 (auth providers) and 3 (playground UI) depend on this and can land in parallel once this merges. - **New `@mastra/core/auth` export** — interfaces for RBAC, sessions, SSO, credentials, ACL, and user management, plus default implementations (static RBAC provider, cookie/memory session providers, built-in roles) - **Server auth handlers** — login, signup, logout, session management, and SSO flows with Zod-validated schemas - **Route-level permission enforcement** — `requiresPermission` on route configs with convention-based derivation from path/method (e.g. `GET /agents/:id` → `agents:read`) - **Server adapter RBAC middleware** (Hono, Express, Fastify, Koa) — resolves user permissions via RBAC provider, cookie auth fallthrough for session-based auth - **Authorization policy fix** — `isProtectedPath` now uses `isProtectedCustomRoute` instead of `!isCustomRoutePublic`, fixing a bug where studio UI couldn't load in production - **Deployer updates** — `MASTRA_PACKAGES_FILE` env var injection, dynamic CORS origin when auth configured - **Client SDK** — `getFullUrl` helper, `AuthCapabilities` type export ### Key behavioral changes | Change | Risk | Mitigation | |---|---|---| | `SimpleAuth<TUser>` → `SimpleAuth<TUser extends EEUser>` | Medium — requires `id` + `email` fields | Intentional; compile-time catch | | `isProtectedPath` logic change | Medium — authorization policy | New tests cover this; required for studio login in prod | | Cookie fallthrough in Hono auth middleware | Low | Falls back to 401 if no user found | | No RBAC → authenticated users get full access | Low — intentional | Auth-only mode preserved | | CORS dynamic origin when auth configured | Low | Only activates with auth config; user can override | ### Deviation from plan `deployers/cloud/package.json` — the plan called for adding `@mastra/auth-cloud` dependency, but that package is created in PR 2. Omitted here to avoid workspace resolution failure; PR 2 will add it. ### Fixed pre-existing test bug All 4 adapter RBAC tests had a failing test ("should derive permissions from route path/method when not explicitly set") that registered an API handler at `/agents/test` with no prefix. That's a frontend/SPA path — real API handlers are always under `/api/*`. Fixed the test to use `prefix: '/api'` so the route is at `/api/agents/test`, matching how routes are actually registered. Verified the bug exists on `auth-rbac-cms` with clean install + build. ## Test plan - [x] `pnpm build:packages` — 35/35 tasks pass - [x] Core auth tests (cookie.test.ts) — 16/16 pass - [x] Server tests (permissions, helpers, system) — 177/177 pass - [x] Hono RBAC tests — 21/21 pass - [x] Express RBAC tests — 15/15 pass - [x] Fastify RBAC tests — 15/15 pass - [x] Koa RBAC tests — 15/15 pass - [x] Client SDK tests (base.test.ts) — 5/5 pass - [ ] Verify no auth configured → all existing behavior identical (no 403s, no auth prompts) - [ ] Verify pre-commit hooks pass (eslint + prettier) 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Enterprise auth: SSO and credentials sign-in/sign-up, login/logout, cookie and in-memory sessions, auth capabilities and current-user endpoints. * RBAC: default roles, static RBAC provider, route-level permission enforcement and middleware across adapters. * Client: full-URL helper; system responses include isDev. * Deploy/build: bundling emits package metadata; deployers set runtime packages file and adjust CORS when auth is enabled. * **Bug Fixes** * Studio UI loads correctly in production. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Shane Thomas <shane@codekarate.com> Co-authored-by: Mastra Code (anthropic/claude-opus-4-6) <noreply@mastra.ai> Co-authored-by: Abhi Aiyer <abhiaiyer91@gmail.com>
2026-03-03 13:49:10 -08:00
fix(voice): compatibility with dynamic agent instructions (#5070) ## Description When using agents with voice capabilities and dynamic instructions (function-based instructions), the voice handlers in both server and deployer packages were calling the deprecated agent.voice getter, which throws an error: Apply `Error: Voice is not compatible when instructions are a function. Please use getVoice() instead.` This error occurs because: The `agent.voice` getter cannot handle dynamic instructions that require runtime context Dynamic instructions need to be resolved asynchronously with runtime context The voice handlers were not following the recommended API for agents with function-based properties Proposed Solution Replace usage of the deprecated agent.voice getter with the async agent.getVoice() method in voice handlers: Server package: Updated packages/server/src/server/handlers/voice.ts Tests: Added comprehensive test coverage for dynamic instructions scenario ## Related Issue(s) ## Type of Change - [x] Bug fix (non-breaking change that fixes an issue) - [ ] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update - [ ] Code refactoring - [ ] Performance improvement - [x] Test update ## Checklist - [ ] I have made corresponding changes to the documentation (if applicable) - [x] I have added tests that prove my fix is effective or that my feature works --------- Co-authored-by: Ryan Hansen <rphansen91@gmail.com> Co-authored-by: Abhi Aiyer <abhiaiyer91@gmail.com>
2025-06-17 01:55:48 +03:00
2025-01-16 18:10:07 +01:00
2025-02-20 00:02:52 +01:00
2025-01-16 18:10:07 +01:00
feat: make your IDE or agent into a Mastra expert via MCP (#2966) This turns your IDE or agent into a Mastra expert with up to date knowledge of Mastra! It can look up specific docs (evals, rag, storage, deployer, getting started, etc), read the blog, check code examples, and read `CHANGELOG.md` for any Mastra package. Works in a Mastra agent, cursor, windsurf, claude, goose, etc - any MCP client. Trying this PR locally in cursor: - checkout the PR - `pnpm build:packages` - Add this file with the correct absolute path to your local Mastra repo in the args. This file should be placed in `some_project_root/.cursor/mcp.json` MacOS/Linux ```json { "mcpServers": { "mastra": { "command": "npx", "args": [ "-y", "tsx", "[FULL_PATH_TO_MASTRA_REPO]/packages/mcp-docs-server/src/stdio.ts" ] } } } ``` Windows: ```json { "mcpServers": { "mastra": { "command": "cmd", "args": [ "/c", "npx", "-y", "tsx", "[FULL_PATH_TO_MASTRA_REPO]/packages/mcp-docs-server/src/stdio.ts" ] } } } ``` Questions: 1. ~~Naming? I called it `@mastra/docs-mcp` @calcsam @smthomas thoughts? We need it to be different enough from our `@mastra/mcp` package~~ Sam suggested asking claude and it came up with `@mastra/mcp-docs-server` which seems fitting to me. 2. To make it so this package is bumped and released with any other package change I added _every_ mastra package as a devDep. @wardpeet I feel like this is not the right approach but I couldn't see in changeset docs how to make it bump with every package change. Any ideas? Follow ups: 1. Need to add this to `pnpm create mastra` as an option to install in cursor/windsurf automatically when scaffolding a new project. Will follow up in another PR once this is published and available on npm 2. Need to add proper docs - this PR only has a README 3. ~~[It needs to self update](https://www.perplexity.ai/search/npm-npx-self-updater-Va1mguxQSZmltavk62iaWQ#1) - otherwise it will eventually be out of date. It should periodically check for new versions of itself. Maybe the server should run a subprocess and communicate via IPC so it can kill and restart the subprocess when it updates. This will become an issue basically as soon as folks start using this longer than a week~~ actually I'll change the instructions to include `@latest` so restarting the mcp server will update 4. We should add a tool so the agent can query GH issues when the user or code is having a problem. And another tool to fill out an issue template and open it in their browser for them Demo: Here I only prompted about 4 times and it can do a lot with very little input. There are some things it said wrong (passing the agent to an api key in useChat) but we can use these kinds of errors to improve our docs. In cursor/windsurf the agent will also figure it out itself. When it reads docs and writes code that's broken I've seen it check the docs again and fix the code. <img width="909" alt="Screenshot 2025-03-14 at 9 50 48 AM" src="https://github.com/user-attachments/assets/4586c6ee-b182-42ae-a323-3f0c592f7552" /> <img width="884" alt="Screenshot 2025-03-14 at 9 50 22 AM" src="https://github.com/user-attachments/assets/152d9173-2b06-4377-b67c-15558cd437b4" /> <img width="857" alt="Screenshot 2025-03-14 at 9 50 28 AM" src="https://github.com/user-attachments/assets/fd30af8f-017a-43b5-bee5-67e47596feb8" /> <img width="892" alt="Screenshot 2025-03-14 at 9 51 11 AM" src="https://github.com/user-attachments/assets/9d6f7612-5c02-4c11-beca-bb836dc1922c" /> <img width="894" alt="Screenshot 2025-03-14 at 9 51 20 AM" src="https://github.com/user-attachments/assets/86f21ac8-d015-4dd0-b72e-0b96177a3895" /> <img width="909" alt="Screenshot 2025-03-14 at 9 51 29 AM" src="https://github.com/user-attachments/assets/fd6f4faf-1383-4471-8885-9869725f50f4" /> <img width="912" alt="Screenshot 2025-03-14 at 9 51 44 AM" src="https://github.com/user-attachments/assets/abdc405d-1a80-4043-aad7-acb81ce23e72" /> <img width="902" alt="Screenshot 2025-03-14 at 9 51 59 AM" src="https://github.com/user-attachments/assets/0efbab16-8f53-4c33-b34a-f32139c06a00" /> <img width="903" alt="Screenshot 2025-03-14 at 9 52 07 AM" src="https://github.com/user-attachments/assets/0ab1000e-9739-4388-8d3f-83098756bcdd" /> <img width="898" alt="Screenshot 2025-03-14 at 9 52 14 AM" src="https://github.com/user-attachments/assets/c0ab9f8f-b9f2-4694-af59-d17cf613360f" /> <img width="895" alt="Screenshot 2025-03-14 at 9 52 24 AM" src="https://github.com/user-attachments/assets/a0181467-84f9-4df0-a11c-0cc0ecaec5fb" /> <img width="907" alt="Screenshot 2025-03-14 at 9 52 42 AM" src="https://github.com/user-attachments/assets/5bc6c81b-ce47-4907-b7a4-006032933001" /> <img width="916" alt="Screenshot 2025-03-14 at 9 53 37 AM" src="https://github.com/user-attachments/assets/bdc1ddf0-fa24-4b30-acb4-f25d39e02313" /> <img width="894" alt="Screenshot 2025-03-14 at 9 54 40 AM" src="https://github.com/user-attachments/assets/d81b75fd-4cda-4380-a1bb-f57d0cdbccaf" /> <img width="894" alt="Screenshot 2025-03-14 at 9 54 53 AM" src="https://github.com/user-attachments/assets/faf04696-09d4-4b7e-892e-dbbe75acea5e" /> <img width="898" alt="Screenshot 2025-03-14 at 10 01 29 AM" src="https://github.com/user-attachments/assets/ef3645b1-4d57-4f87-a999-4c2cce9fce38" /> <img width="899" alt="Screenshot 2025-03-14 at 10 02 04 AM" src="https://github.com/user-attachments/assets/10345772-937b-4cb6-ae58-11fb94b86b9c" />
2025-03-17 10:42:18 -07:00
feat(editor): clean up and move stored agents to @mastra/editor (#12631) Created @mastra/editor package for managing and resolving stored agent configurations This major addition introduces the editor package, which provides a complete solution for storing, versioning, and instantiating agent configurations from a database. The editor seamlessly integrates with Mastra's storage layer to enable dynamic agent management. **Key Features:** - **Agent Storage & Retrieval**: Store complete agent configurations including instructions, model settings, tools, workflows, nested agents, scorers, processors, and memory configuration - **Version Management**: Create and manage multiple versions of agents, with support for activating specific versions - **Dependency Resolution**: Automatically resolves and instantiates all agent dependencies (tools, workflows, sub-agents, etc.) from the Mastra registry - **Caching**: Built-in caching for improved performance when repeatedly accessing stored agents - **Type Safety**: Full TypeScript support with proper typing for stored configurations **Usage Example:** ```typescript import { MastraEditor } from '@mastra/editor'; import { Mastra } from '@mastra/core'; // Initialize editor with Mastra const mastra = new Mastra({ /* config */ editor: new MastraEditor(); }); // Store an agent configuration const agentId = await mastra.storage.stores?.agents?.createAgent({ name: 'customer-support', instructions: 'Help customers with inquiries', model: { provider: 'openai', name: 'gpt-4' }, tools: ['search-kb', 'create-ticket'], workflows: ['escalation-flow'], memory: { vector: 'pinecone-db' }, }); // Retrieve and use the stored agent const agent = await mastra.getEditor()?.getStoredAgentById(agentId); const response = await agent?.generate('How do I reset my password?'); // List all stored agents const agents = await mastra.getEditor()?.listStoredAgents({ pageSize: 10 }); ``` **Storage Improvements:** - Fixed JSONB handling in LibSQL, PostgreSQL, and MongoDB adapters - Improved agent resolution queries to properly merge version data - Enhanced type safety for serialized configurations <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * MastraEditor: store, version, retrieve, and instantiate agents with dependency resolution, version activation, pagination, caching, and raw/instantiated outputs; editor can register with Mastra and manage per-agent caches. Exposed types for serialized memory and default options; Agent source flag. * **Bug Fixes** * Improved version fallback, safer JSONB handling across adapters, and guarded editor-based lookups to avoid crashes when editor is absent. * **Tests / CI** * New unit/integration tests for editor and a dedicated CI workflow; added test:editor script. * **Documentation** * Initial editor CHANGELOG entry. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Mastra Code <noreply@mastra.ai>
2026-02-03 17:07:37 -05:00
feat(core,inngest): durable agent architecture with resumable streams (#12557) This PR introduces durable agents - a way to make agent execution resilient to disconnections, crashes, and long-running operations. ## The Problem Standard agent streaming has two fragility points: 1. **Connection drops** - If a client disconnects mid-stream (network blip, browser refresh, mobile app backgrounded), all subsequent events are lost. The client has no way to "catch up" on what they missed. 2. **Long-running operations** - Agent loops with tool calls can take minutes. Holding an HTTP connection open that long is unreliable. If the server restarts or the connection times out, the work is lost. ## The Solution Durable agents address both problems: **Resumable streams** solve connection drops. Every event is cached with a sequential index. If a client disconnects at event 5, they can reconnect and request events starting from index 6. They receive cached events immediately, then continue with live events as they arrive. ```typescript // Start streaming const { runId, output } = await durableAgent.stream('Analyze this data...'); // Client disconnects at event 5... // Reconnect and resume from where we left off const { output: resumed } = await durableAgent.observe(runId, { offset: 6 }); // Receives events 6, 7, 8... from cache, then continues with live events ``` **Durable execution** solves long-running operations. Instead of executing the agent loop directly in the HTTP request, execution happens in a workflow engine (built-in evented engine or Inngest). The HTTP request just subscribes to events. If the connection drops, execution continues. The client can reconnect anytime to observe progress. ## Usage Wrap any existing `Agent` with durability using factory functions: ```typescript import { Agent } from '@mastra/core/agent'; import { createDurableAgent } from '@mastra/core/agent/durable'; const agent = new Agent({ id: 'my-agent', model: openai('gpt-4'), instructions: 'You are helpful', }); const durableAgent = createDurableAgent({ agent }); ``` **Factory functions for different execution strategies:** | Factory | Execution | Use Case | |---------|-----------|----------| | `createDurableAgent({ agent })` | Local, synchronous | Development, simple deployments | | `createEventedAgent({ agent })` | Fire-and-forget via workflow engine | Long-running operations | | `createInngestAgent({ agent, inngest })` | Inngest-powered | Production, distributed systems | ## PubSub and Cache Durable agents use two infrastructure components: | Component | Purpose | Default | |-----------|---------|---------| | **PubSub** | Real-time event delivery during streaming | `EventEmitterPubSub` | | **Cache** | Stores events for replay on reconnection | `InMemoryServerCache` | When `stream()` is called, events flow through pubsub in real-time. The cache stores each event with a sequential index. When `observe()` is called, missed events replay from cache before continuing with live events. **Configure via Mastra instance (recommended):** ```typescript const mastra = new Mastra({ cache: new RedisServerCache({ url: 'redis://...' }), pubsub: new RedisPubSub({ url: 'redis://...' }), agents: { // Inherits cache and pubsub from Mastra myAgent: createDurableAgent({ agent }), }, }); ``` **Configure per-agent (overrides Mastra):** ```typescript const durableAgent = createDurableAgent({ agent, cache: new RedisServerCache({ url: 'redis://...' }), pubsub: new RedisPubSub({ url: 'redis://...' }), }); ``` **Disable caching (streams won't be resumable):** ```typescript const durableAgent = createDurableAgent({ agent, cache: false }); ``` For single-instance deployments, the defaults work fine. For multi-instance deployments (load balancer, horizontal scaling), use Redis-backed implementations so any instance can serve reconnection requests. ## Class Hierarchy - `DurableAgent` extends `Agent` - base class with resumable streams - `EventedAgent` extends `DurableAgent` - fire-and-forget execution - `InngestAgent` extends `DurableAgent` - Inngest-powered execution ## Other Additions - `observe()` method on all durable agents for stream reconnection - `CachingPubSub` - decorator that wraps any PubSub with automatic event caching - Model fallback support with retry logic - 284 tests covering all durable agent functionality - Docker-free test setup for InngestAgent 🤖 Generated with [Claude Code](https://claude.ai/code) --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Taofeeq Oluderu <oluderutaofeeq@gmail.com> Co-authored-by: Tyler Barnes <tylerdbarnes@gmail.com> Co-authored-by: Mastra Code (openai/gpt-5.5) <noreply@mastra.ai>
2026-04-30 12:17:05 +02:00
fix observability tests and add them to CI (#9316) ## Description * Fixes broken Observability tests, and adds them to CI so we can actually know if things are broken :) * Note, I confirmed the Observablity CI tests are working as expected by forcing them to run on this branch, and then reverting that change. * Adds a test confirming Observability imports are correct * Fixed broken Observability imports * Moves `Otel-Exporter` to use `BaseExporter` class * Updated `vitest.config.json` in `observability/` paths to match others elsewhere in the repo. * Improved functionality of `pnpm run test:observability`: # Test all observability packages with unified summary `pnpm test:observability` # Test a specific observability package `pnpm test:observability otel-exporter` `pnpm test:observability langfuse` `pnpm test:observability braintrust` # Filter by test file across all observability packages (unified results) `pnpm test:observability src/ai-tracing.test.ts` # Test a specific file in a specific package `pnpm test:observability otel-exporter src/ai-tracing.test.ts` ## Related Issue(s) #6773 Fixes #9272 Fixes #9276 ## Type of Change - [X] Bug fix (non-breaking change that fixes an issue) - [ ] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update - [ ] Code refactoring - [ ] Performance improvement - [X] Test update ## Checklist - [ ] I have made corresponding changes to the documentation (if applicable) - [X] I have added tests that prove my fix is effective or that my feature works
2025-10-28 08:51:33 +01:00
added new client-js e2e tests (#11721) ## Description Added new `client-js` e2e tests, which run against both zod v3 & v4 dependencies. They test client->server->storage. Currently these only test observability endpoints, but we should add more coverage soon. These were used to diagnose and fix an issue with the API parsing complex query params here: https://github.com/mastra-ai/mastra/pull/11711/changes#diff-a85fa6725ca52eb46a715cf3f03348d150e15bcb1158d6bfe64f847ebae89f79 No changeset required. ## Related Issue(s) ## Type of Change - [ ] Bug fix (non-breaking change that fixes an issue) - [ ] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update - [ ] Code refactoring - [ ] Performance improvement - [X] Test update ## Checklist - [ ] I have made corresponding changes to the documentation (if applicable) - [ ] I have added tests that prove my fix is effective or that my feature works <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Added a client-JS E2E workflow job and integrated it into success/failure pipelines. * Registered three new workspace packages, added a top-level script to run client-JS E2E tests, and pinned Zod versions via overrides. * **Tests** * Added shared test utilities for observability and server setup. * Added full end-to-end suites for Zod v3 and Zod v4 with configs and setup harnesses. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude <noreply@anthropic.com>
2026-01-09 12:05:06 +01:00
2024-08-12 12:56:35 +01:00
2024-08-12 12:56:35 +01:00
2024-08-21 12:50:54 -04:00
feat: expand `processInputStep` and integrate `prepareStep` as processor (#10774) ## Description Expands the `processInputStep` processor method and integrates `prepareStep` to run through the standard processor pipeline. This PR enables per-step configuration changes during the agentic loop. ### Key Changes 1. **prepareStep as a processor**: `prepareStep` is now internally wrapped as `PrepareStepProcessor` and runs through the standard `processInputStep` pipeline. 2. **Expanded ProcessInputStepArgs**: Processors now receive much more context: - `messages` - Current messages snapshot (read-only) - `systemMessages` - Current system messages (read-only) - `messageList` - Full MessageList instance for mutations - `model` - Current model - `tools` - Current tools available for this step - `toolChoice` - Current tool choice setting - `activeTools` - Currently active tools - `steps` - Results from previous steps - `providerOptions` - Current provider options - `modelSettings` - Current model settings - `structuredOutput` - Structured output configuration 3. **New ProcessInputStepResult type**: Processors can now return: - `model` - Change model for this step (with model config resolution) - `tools` - Replace or add tools (dynamically add tools mid-conversation) - `toolChoice` - Change tool choice - `activeTools` - Filter active tools - `messages` - Replace messages - `messageList` - Return same messageList (indicates mutations) - `systemMessages` - Replace all system messages - `providerOptions` - Change provider options - `modelSettings` - Change model settings - `structuredOutput` - Change structured output configuration 4. **Processor chaining**: Each processor receives accumulated state from previous processors. If Processor 1 returns `{ model: modelA }`, Processor 2 receives `model: modelA` in its args (not the original). 5. **System message isolation**: System messages are reset to their original values at the start of each step. Modifications made in `prepareStep`/`processInputStep` only affect the current step. 6. **Tools passed to toolCallStep**: Tools modified in `prepareStep`/`processInputStep` are now correctly passed through to the tool execution step, so dynamically added tools can be executed. 7. **Validation and error handling**: - Validates that returned MessageList is the same instance passed in - Validates that both `messages` and `messageList` aren't returned together - Validates that v1 models aren't returned (only v2 supported) - Resolves model config strings (e.g., `"openai/gpt-4o"`) to model instances 8. **Improved observability**: Processor spans include all serializable input args and output results. 9. **Type improvements**: - Added `void | Promise<void>` to `Processor.processInputStep` return type - Generic `TOOLS` type flows through `ProcessInputStepArgs` and `ProcessInputStepResult` - New `RunProcessInputStepArgs` and `RunProcessInputStepResult` types for the runner ### Breaking Changes - **prepareStep messages format changed**: `prepareStep` used to receive `messages` formatted as AI SDK v5 model messages. Now that it's unified with `processInputStep`, messages are in `MastraDBMessage` format. - **Migration**: Use `messageList.get.all.aiV5.model()` if you need the old format - Example: ```typescript prepareStep: async ({ messageList }) => { const aiSdkMessages = messageList.get.all.aiV5.model(); // ... use aiSdkMessages }; ``` ### Example Usage ```typescript // Dynamic model switching per step agent.generate('Hello', { prepareStep: async ({ stepNumber }) => { if (stepNumber === 0) return { model: 'openai/gpt-4o-mini' }; return { model: 'openai/gpt-4o' }; } }); // Dynamically add tools based on conversation context agent.generate('Hello', { prepareStep: async ({ stepNumber, tools }) => { if (stepNumber === 1) { return { tools: { ...tools, dynamicTool: tool({ inputSchema: z.object({ query: z.string() }), execute: async () => 'dynamic result', }), }, toolChoice: { type: 'tool', toolName: 'dynamicTool' }, }; } } }); // Per-step system instructions (isolated to each step) agent.generate('Hello', { prepareStep: async ({ stepNumber, systemMessages }) => { return { systemMessages: [ ...systemMessages, { role: 'system', content: `Step ${stepNumber} instructions` } ] }; } }); // Provider options per step agent.generate('Hello', { prepareStep: async ({ stepNumber }) => { if (stepNumber === 0) { return { providerOptions: { anthropic: { cacheControl: { type: 'ephemeral' } } } }; } } }); // Model settings per step agent.generate('Hello', { prepareStep: async ({ stepNumber, modelSettings }) => { if (stepNumber > 3) { return { modelSettings: { ...modelSettings, maxTokens: 500 } }; } } }); // Disable tools after certain steps agent.generate('Hello', { prepareStep: async ({ stepNumber }) => { if (stepNumber > 5) { return { toolChoice: 'none' }; } } }); // Access previous step results agent.generate('Hello', { prepareStep: async ({ steps }) => { if (steps.length > 0 && steps[steps.length - 1].finishReason === 'tool-calls') { // React to tool calls from previous step } } }); ``` ## Type of Change - [x] Bug fix (non-breaking change that fixes an issue) - [x] New feature (non-breaking change that adds functionality) ## Checklist - [x] I have added tests that prove my fix is effective or that my feature works - [x] Documentation updated (migration guide, processor docs, reference docs) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * prepareStep now runs in the processor pipeline, letting processors modify per-step model, tools, toolChoice, activeTools, messages, systemMessages, providerOptions, modelSettings, and structuredOutput. * Processor chaining accumulates and passes state across steps. * System messages are reset at each step for isolation. * **Breaking Changes** * prepareStep message format changed to MastraDBMessage; use messageList.get.all.aiV5.model() to obtain the legacy format. * **Documentation** * Expanded processor docs, migration guide, examples, and reference material. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: CalebBarnes <CalebBarnes@users.noreply.github.com>
2025-12-09 16:19:27 -08:00
2024-08-12 12:56:35 +01:00
2024-08-13 12:26:12 -04:00
chore: migrate workspace to pnpm v11 (#17038) Migrates the workspace to pnpm 11.3.0 and moves pnpm config out of package.json into pnpm-workspace.yaml, which is where pnpm v11 reads these settings. It also enables the global virtual store for faster git worktree installs: ```yaml # Share pnpm's virtual store across git worktrees: https://pnpm.io/git-worktrees enableGlobalVirtualStore: true ``` I also moved the standalone e2e fixture pnpm settings into local pnpm-workspace.yaml files so their overrides and build approvals still apply under pnpm v11. Verified with pnpm 11.3.0 install --frozen-lockfile and git diff --check. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## ELI5 This PR upgrades the repository to pnpm v11 (11.3.0), moves workspace pnpm settings out of package.json into pnpm-workspace.yaml so pnpm v11 reads them, and enables a shared global virtual store to speed up installs (useful for git worktrees). It also updates tests, fixtures, and CI to use pnpm-specific env vars and workspace-aware installs. ## Changes Overview ### Core changes - Bumped required pnpm in root package.json: engines.pnpm → >=11.0.0 and updated packageManager to pnpm@11.3.0 (with new integrity). - Added/expanded top-level pnpm-workspace.yaml: - enableGlobalVirtualStore: true to share pnpm’s virtual store across git worktrees. - Reworked patchedDependencies to versioned patch entries (e.g., `@changesets/get-dependents-graph`@2.1.3/2.1.4, tsup@8.5.1). - Added packageExtensions (e.g., `@uiw/codemirror-theme-dracula`@*). - Extended trustPolicyExclude and expanded overrides to constrain many deps (ssri, qs, zod variants, etc.). - Broadened allowBuilds to explicitly disable builds for many packages. ### E2E & fixture workspace changes - Removed pnpm/resolutions and top-level pnpm blocks from many package.json files and introduced local pnpm-workspace.yaml files in fixture/e2e directories (commonjs, create-mastra, deployers, monorepo, no-bundling, type-check, memory, agent-builder, mcp, playground kitchen-sink, pkg-outputs, etc.). - Those local pnpm-workspace.yaml files reintroduce necessary overrides (e.g., ssri >=6.0.2, qs ^6.15.1) and allowBuilds settings so fixture-specific build allowances and overrides continue to apply under pnpm v11. ### Tests & tooling updates - Updated many e2e tests and setup scripts to export pnpm-specific env vars (pnpm_config_registry, pnpm_config_minimum_release_age, etc.) instead of npm_config_* so pnpm receives registry/minimum-release-age configs. - Extended pnpm-specific env var allowlist (packages/_types-builder) with additional pnpm_config_* keys. - Small TypeScript typings and build tweaks (tsup externals, various Droppable typing updates). - Patch update: changesets-get-dependents-graph patch updated to construct Range with includePrerelease: true. ### CI & GitHub Actions - Composite action explicitly sets up Node 22 via actions/setup-node@v6 and continues to install pnpm via pnpm/action-setup@v4. - Turbo action now runs turborepo via pnpm dlx (pnpm dlx turbo ...) and disables telemetry. - Multiple CI steps and workflows changed pnpm install --ignore-workspace → pnpm install to be workspace-aware where appropriate. ### Commit / migration notes - Added commit(s) to preserve nested pnpm workspace configs for fixtures, add missing packageExtensions, and make other adjustments required by pnpm v11 (including explicit allowBuilds in nested workspaces so frozen installs pass). - Author verified migration with pnpm 11.3.0 using install --frozen-lockfile and git diff --check, but noted further testing/investigation will follow (primary motivation: enable worktree/global virtual store behavior). ## Impact & reviewer notes - Requires pnpm >=11.0.0 locally and in CI (declared 11.3.0). Update local tooling if needed. - Workspace overrides, patched deps, and build allowances were relocated to pnpm-workspace.yaml — reviewers should confirm fixture behavior, package linking, and build approvals still match expectations. - enableGlobalVirtualStore changes dependency layout/hoisting for worktree installs; test git worktree installs and CI runs. - Verify e2e fixtures, CI jobs, and any environment-specific registry/settings propagate correctly via pnpm_config_* env vars. <!-- review_stack_entry_start --> [![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/mastra-ai/mastra/pull/17038?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Mastra Code (openai/gpt-5.5) <noreply@mastra.ai>
2026-05-28 09:45:07 -07:00
added new client-js e2e tests (#11721) ## Description Added new `client-js` e2e tests, which run against both zod v3 & v4 dependencies. They test client->server->storage. Currently these only test observability endpoints, but we should add more coverage soon. These were used to diagnose and fix an issue with the API parsing complex query params here: https://github.com/mastra-ai/mastra/pull/11711/changes#diff-a85fa6725ca52eb46a715cf3f03348d150e15bcb1158d6bfe64f847ebae89f79 No changeset required. ## Related Issue(s) ## Type of Change - [ ] Bug fix (non-breaking change that fixes an issue) - [ ] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update - [ ] Code refactoring - [ ] Performance improvement - [X] Test update ## Checklist - [ ] I have made corresponding changes to the documentation (if applicable) - [ ] I have added tests that prove my fix is effective or that my feature works <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Added a client-JS E2E workflow job and integrated it into success/failure pipelines. * Registered three new workspace packages, added a top-level script to run client-JS E2E tests, and pinned Zod versions via overrides. * **Tests** * Added shared test utilities for observability and server setup. * Added full end-to-end suites for Zod v3 and Zod v4 with configs and setup harnesses. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude <noreply@anthropic.com>
2026-01-09 12:05:06 +01:00
2025-04-19 01:30:13 +02:00
chore: enforce AGENTS.md token limits (#15464) Adds a CI check that fails when any AGENTS.md file goes over the 500 token limit, then trims the existing AGENTS files so the repo passes the new rule. Before: ```md # AGENTS.md ## Scope This file applies to work in `packages/auth/`. - Build from root: `pnpm build:auth` ``` After: ```md Build from root: pnpm build:auth Test from root: pnpm --filter ./packages/auth test For broader auth coverage use pnpm test:auth ``` For codemod, the short AGENTS file now keeps the high-signal instructions and points to a package-local skill for the longer workflow and pattern reference. codemod file went from ~5k tokens to 250, root AGENTS.md went from 1.8k to 375 <img width="634" height="440" alt="Screenshot 2026-04-16 at 5 02 38 PM" src="https://github.com/user-attachments/assets/307b6516-736b-47eb-98f4-48310d2d7d96" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## ELI5 This PR adds an automatic check that makes sure every AGENTS.md file stays short (under 500 tokens) and shortens the existing AGENTS.md files so they all pass that check. ## Overview Enforces a 500-token limit for AGENTS.md files via CI, adds a validation script to count tokens, and trims many AGENTS.md documents to keep only high-signal guidance while moving large, detailed reference content into a separate skill file. ## Changes ### CI & Validation - Added `.github/scripts/validate-agents-md.mjs`: Node script that finds AGENTS.md files, counts tokens using `tokenx`, and exits non‑zero if any file exceeds the 500-token limit. - Updated `.github/workflows/lint.yml`: new `agents-md-check` job runs the validation script in CI for the mastra-ai/mastra repository. ### Dependencies - Added `tokenx` (^1.3.0) to root `package.json` for token counting. ### AGENTS.md Consolidation Multiple AGENTS.md files were condensed by removing multi-section structure and extraneous formatting, preserving core commands and high-signal instructions so each file stays ≤ 500 tokens: - Root AGENTS.md: ~1.8k → 375 tokens (condensed conventions, removed detailed examples and lengthy rules) - docs/AGENTS.md: condensed docs and E2E guidance (removed fenced code blocks and verbose explanations) - packages/auth/AGENTS.md: simplified to core build/test guidance (62 tokens) - packages/cli/AGENTS.md: collapsed into concise command lines (53 tokens) - packages/codemod/AGENTS.md: main codemod guidance trimmed and redirected to new skill file (result much smaller; AGENTS.md reduced significantly) - packages/core/AGENTS.md: flattened while keeping build/test/Zod-compat notes (147 tokens) - packages/mcp/AGENTS.md: consolidated client/server/integration test guidance (107 tokens) - packages/memory/AGENTS.md: reorganized integration workflow into a concise section (283 tokens) - packages/playground-ui/AGENTS.md: reduced to operational commands and a brief design-system note (74 tokens) - packages/playground/AGENTS.md: simplified build/test instructions and coordination note (99 tokens) - packages/rag/AGENTS.md: collapsed into brief build/test/lint guidance (81 tokens) - packages/server/AGENTS.md: condensed to three sentences covering build/test/permissions (85 tokens) ### Knowledge Base Enhancement - Added `packages/codemod/.claude/skills/codemod-patterns/SKILL.md`: a 607-line detailed codemod patterns and workflow guide moved out of AGENTS.md to keep AGENTS.md concise. ## Validation A terminal validation run (included in the PR) shows all AGENTS.md files pass the 500-token rule, with token counts ranging from 53 to 403 and a final message: "All AGENTS.md files are within the 500-token limit." <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Mastra Code (openai/gpt-5.4) <noreply@mastra.ai> Co-authored-by: Abhi Aiyer <abhiaiyer91@gmail.com>
2026-04-18 19:12:37 -07:00
2025-04-19 01:30:13 +02:00
2024-08-12 12:56:35 +01:00