mirror of
https://github.com/mastra-ai/mastra.git
synced 2026-11-17 08:44:46 +00:00
709 commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
d60ba71be0 | chore: version - exit prerelease mode | ||
|
|
5c87442ed7 |
chore: version packages (alpha) (#30203)
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or [setup this action to publish automatically](https://github.com/changesets/action#with-publishing). If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. ⚠️⚠️⚠️⚠️⚠️⚠️ `main` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `main`. ⚠️⚠️⚠️⚠️⚠️⚠️ # Releases > The changelog information of each package has been omitted from this message, as the content exceeds the size limit. ## @mastra/auth-auth0@1.3.0-alpha.0 ## @mastra/auth-clerk@1.4.0-alpha.0 ## @mastra/auth-okta@0.3.0-alpha.0 ## @mastra/auth-supabase@1.2.0-alpha.0 ## @mastra/client-js@1.60.0-alpha.13 ## @mastra/auth@1.2.0-alpha.0 ## @mastra/core@1.83.0-alpha.13 ## @mastra/playground-ui@69.0.0-alpha.15 ## @mastra/rag@2.8.0-alpha.3 ## @mastra/server@1.83.0-alpha.13 ## @mastra/server-adapters-test-suite@0.3.0-alpha.5 ## @mastra/auth-better-auth@1.1.11-alpha.2 ## @mastra/auth-cloud@1.2.9-alpha.0 ## @mastra/auth-neon@0.3.6-alpha.1 ## @mastra/auth-workos@1.6.9-alpha.0 ## @mastra/discord@1.3.4-alpha.0 ## @mastra/react@1.15.0-alpha.13 ## @mastra/deployer-cloud@1.83.0-alpha.13 ## @mastra/deployer-cloudflare@1.2.42-alpha.3 ## @mastra/deployer-netlify@1.2.42-alpha.1 ## @mastra/deployer-sandbox@0.3.27-alpha.1 ## @mastra/deployer-vercel@1.2.42-alpha.1 ## @mastra/longmemeval@1.1.42-alpha.13 ## @mastra/opencode@0.1.42-alpha.13 ## @mastra/factory@0.28.0-alpha.15 ## create-factory@0.4.3-alpha.15 ## @mastra/code-sdk@1.19.0-alpha.15 ## mastracode@0.50.0-alpha.14 ## @mastra/agent-builder@1.2.1-alpha.5 ## mastra@1.39.0-alpha.15 ## @mastra/connect@1.4.0-alpha.6 ## @mastra/deployer@1.83.0-alpha.13 ## @mastra/editor@0.17.1-alpha.7 ## @mastra/mcp@2.9.0-alpha.5 ## @mastra/mcp-docs-server@1.3.13-alpha.17 ## @mastra/memory@1.41.1-alpha.5 ## @mastra/schema-compat@1.4.0-alpha.2 ## @mastra/elysia@0.1.23-alpha.13 ## @mastra/express@1.5.27-alpha.13 ## @mastra/fastify@1.5.27-alpha.13 ## @mastra/hono@1.7.25-alpha.13 ## @mastra/koa@1.7.27-alpha.13 ## @mastra/nestjs@0.3.0-alpha.13 ## @mastra/next@0.2.41-alpha.13 ## @mastra/tanstack-start@0.2.41-alpha.13 ## @mastra/voice-google-gemini-live@0.14.19-alpha.2 ## @mastra/voice-openai-realtime@0.14.9-alpha.3 ## @mastra/voice-xai-realtime@0.2.18-alpha.2 ## @mastra/inngest@1.11.2-alpha.9 ## @mastra/temporal@0.6.0-alpha.13 ## create-mastra@1.39.0-alpha.15 ## @internal/playground@1.39.0-alpha.15 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
c0d3bfdc43 |
feat: pass the authenticated user to DynamicArgument callbacks (#28612)
Dynamic agent config callbacks now get the authenticated end user as an
optional `user` argument, so you can personalize an agent without
digging auth keys out of `requestContext` yourself. It works in any
`DynamicArgument` callback: instructions, model, tools, memory,
workspace, processors, scorers, and so on.
```ts
import { Agent } from '@mastra/core/agent';
const supportAgent = new Agent({
id: 'support-agent',
instructions: ({ user }) =>
user ? `You are helping ${user.name ?? user.id}.` : 'You are a helpful assistant.',
model: ({ user }) => (user?.role === 'admin' ? 'openai/gpt-5' : 'openai/gpt-5-mini'),
tools: ({ user }) => (user ? { accountTool, ...(user.role === 'admin' ? { adminTool } : {}) } : {}),
memory: ({ user }) => (user ? userMemory : undefined),
});
```
`user` always has the same `MastraUser` shape, no matter which auth
provider you use, and it's `undefined` for unauthenticated requests:
```ts
import type { MastraUser } from '@mastra/core/types';
// { id: string; name?: string; email?: string; avatarUrl?: string; role?: string }
```
The server auth middleware builds it through a new overridable
`toMastraUser()` on `MastraAuthProvider`. The default handles common
shapes (`id`/`sub`/`userId`, `name`, `email`, `avatarUrl`/`picture`,
`role`), and JWT, Cloud, Supabase, Neon and Better Auth ship overrides
for their user objects. Custom providers can map their own shape:
```ts
import { MastraAuthProvider } from '@mastra/core/server';
import type { MastraUser } from '@mastra/core/types';
class MyAuth extends MastraAuthProvider<MyUser> {
async authenticateToken(token: string) { /* ... */ }
async authorizeUser(user: MyUser) { return true; }
toMastraUser(user: MyUser): MastraUser {
return { id: user.accountId, name: user.profile.displayName, role: user.permissions.primaryRole };
}
}
```
Inline auth configs can pass `toMastraUser` too. If the provider user
has no role and an RBAC provider is configured, the primary RBAC role
fills it in, so `user.role` also works with WorkOS, Okta, Google and
Neon. The raw provider user is still available when you need
provider-specific fields, and the new context key is reserved, so
clients can't spoof it through the request body:
```ts
instructions: ({ requestContext }) => {
const rawUser = requestContext.get('mastra__user'); // provider-specific object, unchanged
// ...
},
```
Dynamic `vectorStore` resolvers on RAG tools get `user` as well:
```ts
createVectorQueryTool({
indexName: 'docs',
model: embedder,
vectorStore: ({ user }) => (user ? tenantStores.get(user.id)! : sharedStore),
});
```
Inside core, every place that invoked a `DynamicArgument` callback
inline now goes through a single `resolveDynamicArgument` helper, which
reads the user from `requestContext` at call time. This is non-breaking:
callbacks get an extra optional field, providers get a method with a
working default. Requests served through an `MCPServer` don't get `user`
yet, since MCP builds its own request context; that's documented.
Tested with unit tests for the helper, normalization and each provider
override, middleware tests (inline config, provider role, RBAC role,
CompositeAuth ordering, unauthenticated), regression tests for the
migrated call sites, and an end-to-end test where an agent behind a fake
auth provider gets personalized instructions. Core, server, rag and the
touched auth packages typecheck clean, and their suites pass.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## ELI5
When a signed-in user makes a request, configuration callbacks can now
use a standard set of details about that user. When a workflow resumes,
it uses the new request’s user details instead of restoring them from
the earlier run.
## Summary
- Added optional `user` data to `DynamicArgument` callbacks and RAG
vector-store resolvers. Callbacks can also use `getRequestUser()` to
read the normalized user from request context.
- Added the `MastraUser` type and `toMastraUser()` normalization hooks
for auth providers and inline auth configs. The server stores the
normalized user in a reserved request-context key and uses the primary
RBAC role when the user has no role.
- Updated core dynamic configuration paths to use the shared resolver.
Added user support to agent scopes and migrated A2A memory resolution.
- Added `withoutLiveRequestKeys()` to remove live authentication and
authorization data from saved context during workflow resume, restart,
and time travel. Saved non-authentication context, such as tenant data,
remains available.
- Added documentation and changesets. Raised relevant `@mastra/core`
peer dependency minimums to 1.81.0. MCPServer requests do not receive
the normalized `user`.
## Validation
The author reports passing typechecks and test suites across core,
server, RAG, and several auth packages. The author also reports three
failing Inngest tests and earlier failures in evented workflow and
scheduler tests, which reportedly fail the same way on comparison
sources. These results are author-reported and have not been
independently verified.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
|
||
|
|
79ff445aca |
fix(rag): reject JSON chunk sizes that stall string splitting (#30186)
## Summary - Require JSON chunk `maxSize` of at least 21 in strategy validation and direct transformer construction, preventing zero-length string splits from stalling chunking. - Add regressions for invalid integer and fractional limits and verify long strings reconstruct at the supported boundary. - Include a patch changeset for `@mastra/rag`. ## Test plan - `cd packages/rag && ./node_modules/.bin/vitest run src/document/document.test.ts --reporter=dot` (167 passed) - `./node_modules/.bin/tsc --noEmit -p packages/rag/tsconfig.json` - Type-aware oxlint for changed files; Prettier check; `git diff --check` Fixes #30166 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> **ELI5:** The JSON text splitter could get stuck in an endless loop when a user set a small chunk size. This change rejects those small sizes with a clear error, so the splitter never hangs. ## Summary This change stops JSON chunking from hanging when `maxSize` is too small. The splitter subtracts a fixed overhead of 20 from `maxSize` and floors the result. At `maxSize` 20, the split point is zero. The splitter then never consumes input. Fractional values between 20 and 21 have the same problem. The change sets a minimum JSON `maxSize` of 21. It applies this minimum in two places: - **Option validation** (`packages/rag/src/document/validation.ts`): The JSON chunk options schema adds an optional `maxSize` field. It accepts the field only when the value is at least 21. - **Transformer constructor** (`packages/rag/src/document/transformers/json.ts`): `RecursiveJsonTransformer` throws a `RangeError` when `maxSize` is not finite or is below 21. Other chunking strategies keep their existing size rules. ### Documentation - `docs/src/content/en/reference/rag/chunk.mdx` states that the JSON strategy's `maxSize` is a target maximum for each chunk. It must be at least 21. Long values nested in objects can exceed it. - A patch changeset for `@mastra/rag` describes the new minimum. ### Tests (`packages/rag/src/document/document.test.ts`) - Adds cases that expect `maxSize` values `0.5`, `20`, and `20.9` to be rejected. The cases cover both `MDocument.chunk` and direct transformer construction. The expected error matches `maxSize.*21`. - Adds a case that splits a 100-character JSON string with `maxSize: 21`. The test checks that the output has multiple chunks. It also checks that the parsed string values rejoin to the original text. ### Behavior change Callers that pass a JSON `maxSize` below 21 now receive a configuration error. Before this change, those calls were accepted and could hang. Default JSON chunking remains valid. ### Reported validation (not verified in this summary) The PR description reports these checks: - `vitest run src/document/document.test.ts`: 167 passed. - `tsc --noEmit` for `packages/rag`. - Type-aware oxlint on changed files, Prettier check, and `git diff --check`. Diff size: 5 files changed, 38 lines added, 1 line removed. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: mastra-platform[bot] <mastra-platform[bot]@users.noreply.github.com> Co-authored-by: mastra-platform[bot] <284800079+mastra-platform[bot]@users.noreply.github.com> |
||
|
|
da717f489c |
Fix GraphRAG leaking documents across reused tool requests (#30185)
## Summary - Rebuild the GraphRAG graph from each request’s retrieval results so tenant-specific indexes cannot reuse a previous request’s documents. - Return empty context and sources when retrieval yields no candidates. - Add a real LibSQL and embedding-server regression covering sequential, empty, and concurrent requests, plus a patch changeset. ## Test plan - `pnpm build:rag` - `pnpm test:rag` (454 tests) - `pnpm exec tsc --noEmit -p packages/rag/tsconfig.json` - `pnpm --filter ./packages/rag lint` - `pnpm exec prettier --check packages/rag/src/tools/graph-rag.ts packages/rag/src/tools/graph-rag-isolation.test.ts .changeset/graph-rag-request-isolation.md` Fixes #30168 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> **ELI5:** A search helper that is reused can return a document from an earlier user's search. This change makes the helper build its answer only from the current search. Each request now gets results for its own search. ## Summary This change fixes a data-isolation defect in the GraphRAG tool that `createGraphRAGTool` creates in `@mastra/rag`. Linked issue `#30168` reports the defect. The tool kept one `GraphRAG` instance and an `isInitialized` flag across executions. Later requests that selected a different index could still receive documents from the first execution. ## Changes - `packages/rag/src/tools/graph-rag.ts` (+32/-37): - Removes the `GraphRAG` instance and the initialization flag that persisted across executions. - Returns empty context and sources when vector search finds no candidates. - Otherwise, builds a new graph from that execution's retrieved chunks and embeddings, then traverses it. - Keeps graph-build logging, tracing, and error propagation. - `packages/rag/src/tools/graph-rag-isolation.test.ts` (+84/-0): Adds a Vitest integration test. The test uses tenant-specific and empty vector indexes. It serves an `LLMock` through a local HTTP proxy. It checks that: - A request returns only the document from its selected index. - An empty index returns empty results. - Concurrent requests stay isolated. - `.changeset/graph-rag-request-isolation.md` (+5/-0): Declares a patch release for `@mastra/rag`. - `docs/src/content/en/reference/rag/graph-rag-guide.mdx` (+1/-1): States that each graph query tool execution builds its graph from that request's retrieved chunks. The guide no longer says that later queries reuse the first execution's graph. No exported or public declarations change. ## Tradeoff Each execution now builds a graph. The linked issue states that this adds work per request. The request-specific candidates require this work. A future cache would need correct candidate and scope keys. ## Verification Not available. The PR lists planned checks: `pnpm build:rag`, `pnpm test:rag`, a TypeScript check, lint, and a Prettier check. No completed results for these checks were supplied. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: mastra-platform[bot] <mastra-platform[bot]@users.noreply.github.com> Co-authored-by: mastra-platform[bot] <284800079+mastra-platform[bot]@users.noreply.github.com> |
||
|
|
23cc34a9c5 |
chore: version packages (alpha) (#29938)
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or [setup this action to publish automatically](https://github.com/changesets/action#with-publishing). If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. ⚠️⚠️⚠️⚠️⚠️⚠️ `main` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `main`. ⚠️⚠️⚠️⚠️⚠️⚠️ # Releases > The changelog information of each package has been omitted from this message, as the content exceeds the size limit. ## @mastra/factory@0.28.0-alpha.6 ## @mastra/code-sdk@1.19.0-alpha.6 ## @mastra/playground-ui@69.0.0-alpha.7 ## @mastra/client-js@1.60.0-alpha.6 ## @mastra/react@1.15.0-alpha.6 ## @mastra/deployer-cloud@1.83.0-alpha.6 ## @mastra/longmemeval@1.1.42-alpha.6 ## @mastra/opencode@0.1.42-alpha.6 ## create-factory@0.4.3-alpha.6 ## mastracode@0.50.0-alpha.6 ## @mastra/agent-builder@1.2.1-alpha.3 ## mastra@1.39.0-alpha.6 ## @mastra/core@1.83.0-alpha.6 ## @mastra/deployer@1.83.0-alpha.6 ## @mastra/editor@0.17.1-alpha.4 ## @mastra/mcp@2.9.0-alpha.3 ## @mastra/mcp-docs-server@1.3.13-alpha.9 ## @mastra/memory@1.41.1-alpha.3 ## @mastra/rag@2.7.3-alpha.2 ## @mastra/schema-compat@1.3.18-alpha.0 ## @mastra/server@1.83.0-alpha.6 ## @mastra/elysia@0.1.23-alpha.6 ## @mastra/express@1.5.27-alpha.6 ## @mastra/fastify@1.5.27-alpha.6 ## @mastra/hono@1.7.25-alpha.6 ## @mastra/koa@1.7.27-alpha.6 ## @mastra/nestjs@0.3.0-alpha.6 ## @mastra/next@0.2.41-alpha.6 ## @mastra/server-adapters-test-suite@0.3.0-alpha.3 ## @mastra/tanstack-start@0.2.41-alpha.6 ## @mastra/upstash@1.6.1-alpha.0 ## @mastra/vectorize@1.1.5-alpha.0 ## @mastra/voice-google-gemini-live@0.14.19-alpha.0 ## @mastra/voice-openai-realtime@0.14.9-alpha.0 ## @mastra/voice-xai-realtime@0.2.18-alpha.0 ## @mastra/inngest@1.11.2-alpha.4 ## @mastra/temporal@0.6.0-alpha.6 ## create-mastra@1.39.0-alpha.6 ## @internal/playground@1.39.0-alpha.6 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
79d21c536e |
fix(rag): reject nonfinite GraphRAG edge weights (#29956) | ||
|
|
5d70732c0c |
fix(rag): replace GraphRAG state when rebuilding (#29962) | ||
|
|
2cdb073822 |
fix(rag): reject invalid rerank component weights (#29957) | ||
|
|
85e7b7baf1 |
fix(rag): reject non-finite GraphRAG embeddings (#29959) | ||
|
|
c04c882f76 |
fix(rag): reject invalid GraphRAG query controls (#29961) | ||
|
|
5c89a7697d |
fix(rag): store GraphRAG self-links only once (#29960) | ||
|
|
4fc880de46 |
fix(rag): reject duplicate GraphRAG snapshot node IDs (#29958) | ||
|
|
779d2875b1 |
chore: version packages (alpha) (#29912)
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or [setup this action to publish automatically](https://github.com/changesets/action#with-publishing). If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. ⚠️⚠️⚠️⚠️⚠️⚠️ `main` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `main`. ⚠️⚠️⚠️⚠️⚠️⚠️ # Releases > The changelog information of each package has been omitted from this message, as the content exceeds the size limit. ## @mastra/auth-studio@1.4.0-alpha.1 ## @mastra/factory@0.28.0-alpha.5 ## @mastra/mcp-apps-components@0.1.0-alpha.5 ## @mastra/playground-ui@69.0.0-alpha.6 ## @mastra/client-js@1.60.0-alpha.5 ## @mastra/react@1.15.0-alpha.5 ## @mastra/deployer-cloud@1.83.0-alpha.5 ## @mastra/longmemeval@1.1.42-alpha.5 ## @mastra/opencode@0.1.42-alpha.5 ## create-factory@0.4.3-alpha.5 ## @mastra/code-sdk@1.19.0-alpha.5 ## mastracode@0.50.0-alpha.5 ## @mastra/agent-builder@1.2.1-alpha.2 ## mastra@1.39.0-alpha.5 ## @mastra/core@1.83.0-alpha.5 ## @mastra/deployer@1.83.0-alpha.5 ## @mastra/editor@0.17.1-alpha.3 ## @mastra/mcp@2.9.0-alpha.2 ## @mastra/mcp-docs-server@1.3.13-alpha.8 ## @mastra/memory@1.41.1-alpha.2 ## @mastra/rag@2.7.3-alpha.1 ## @mastra/server@1.83.0-alpha.5 ## @mastra/elysia@0.1.23-alpha.5 ## @mastra/express@1.5.27-alpha.5 ## @mastra/fastify@1.5.27-alpha.5 ## @mastra/hono@1.7.25-alpha.5 ## @mastra/koa@1.7.27-alpha.5 ## @mastra/nestjs@0.3.0-alpha.5 ## @mastra/next@0.2.41-alpha.5 ## @mastra/server-adapters-test-suite@0.3.0-alpha.2 ## @mastra/tanstack-start@0.2.41-alpha.5 ## @mastra/libsql@1.30.0-alpha.2 ## @mastra/turso@0.1.21-alpha.2 ## @mastra/inngest@1.11.2-alpha.3 ## @mastra/temporal@0.6.0-alpha.5 ## create-mastra@1.39.0-alpha.5 ## @internal/playground@1.39.0-alpha.5 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
be7884e030 |
fix(rag): validate rerank topK and round tool topK (#29761) | ||
|
|
675caf0613 |
chore: version packages (alpha) (#29336)
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or [setup this action to publish automatically](https://github.com/changesets/action#with-publishing). If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. ⚠️⚠️⚠️⚠️⚠️⚠️ `main` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `main`. ⚠️⚠️⚠️⚠️⚠️⚠️ # Releases > The changelog information of each package has been omitted from this message, as the content exceeds the size limit. ## @mastra/client-js@1.60.0-alpha.0 ## @mastra/react@1.15.0-alpha.0 ## @mastra/factory@0.28.0-alpha.0 ## @mastra/code-sdk@1.19.0-alpha.0 ## mastra@1.39.0-alpha.0 ## @mastra/core@1.83.0-alpha.0 ## @mastra/mcp@2.9.0-alpha.0 ## @mastra/mcp-apps-components@0.1.0-alpha.0 ## @mastra/playground-ui@69.0.0-alpha.0 ## @mastra/server@1.83.0-alpha.0 ## @mastra/nestjs@0.3.0-alpha.0 ## @mastra/clickhouse@1.30.0-alpha.0 ## @mastra/duckdb@1.19.0-alpha.0 ## @mastra/libsql@1.30.0-alpha.0 ## @mastra/pg@1.36.0-alpha.0 ## @mastra/temporal@0.6.0-alpha.0 ## @mastra/auth-better-auth@1.1.11-alpha.0 ## @mastra/deployer-cloud@1.83.0-alpha.0 ## @mastra/deployer-cloudflare@1.2.42-alpha.0 ## @mastra/deployer-netlify@1.2.42-alpha.0 ## @mastra/deployer-sandbox@0.3.27-alpha.0 ## @mastra/deployer-vercel@1.2.42-alpha.0 ## @mastra/longmemeval@1.1.42-alpha.0 ## @mastra/opencode@0.1.42-alpha.0 ## create-factory@0.4.3-alpha.0 ## mastracode@0.49.1-alpha.0 ## @mastra/arize@1.3.30-alpha.0 ## @mastra/arthur@0.4.30-alpha.0 ## @mastra/braintrust@1.3.27-alpha.0 ## @mastra/datadog@1.4.22-alpha.0 ## @mastra/deepeval@0.1.24-alpha.0 ## @mastra/laminar@1.3.32-alpha.0 ## @mastra/langfuse@1.6.6-alpha.0 ## @mastra/langsmith@1.4.3-alpha.0 ## @mastra/observability@1.23.2-alpha.0 ## @mastra/otel-bridge@1.5.22-alpha.0 ## @mastra/otel-exporter@1.5.2-alpha.0 ## @mastra/posthog@1.4.7-alpha.0 ## @mastra/sentry@1.2.32-alpha.0 ## @mastra/agent-builder@1.2.1-alpha.0 ## @mastra/connect@1.3.2-alpha.0 ## create-mastra@1.39.0-alpha.0 ## @mastra/deployer@1.83.0-alpha.0 ## @mastra/editor@0.17.1-alpha.0 ## @mastra/mcp-docs-server@1.3.13-alpha.0 ## @mastra/memory@1.41.1-alpha.0 ## @mastra/rag@2.7.3-alpha.0 ## @mastra/redis-streams@0.8.1-alpha.0 ## @mastra/elysia@0.1.23-alpha.0 ## @mastra/express@1.5.27-alpha.0 ## @mastra/fastify@1.5.27-alpha.0 ## @mastra/hono@1.7.25-alpha.0 ## @mastra/koa@1.7.27-alpha.0 ## @mastra/next@0.2.41-alpha.0 ## @mastra/tanstack-start@0.2.41-alpha.0 ## @mastra/spanner@1.11.2-alpha.0 ## @mastra/turso@0.1.21-alpha.0 ## @mastra/inngest@1.11.2-alpha.0 ## @mastra/gcs@0.3.6-alpha.0 ## @internal/playground@1.39.0-alpha.0 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
12f461da2b |
fix(rag): keep surrogate pairs whole when chunking by character (#29410)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
6e8dfcb83f | chore: version - exit prerelease mode | ||
|
|
3bdb4ec5f4 |
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 (@​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 [@​hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi Ogawa** and **Claude Opus 5.5** in [#​11578](https://redirect.github.com/vitest-dev/vitest/issues/11578) [<samp>(28dc1)</samp>]( |
||
|
|
47a6cd82e5 |
chore(deps): update ai sdk (#29242)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> |
||
|
|
886679eb10 |
chore: version packages (alpha) (#29205)
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or [setup this action to publish automatically](https://github.com/changesets/action#with-publishing). If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. ⚠️⚠️⚠️⚠️⚠️⚠️ `main` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `main`. ⚠️⚠️⚠️⚠️⚠️⚠️ # Releases > The changelog information of each package has been omitted from this message, as the content exceeds the size limit. ## @mastra/client-js@1.59.0-alpha.2 ## @mastra/factory@0.27.0-alpha.2 ## @mastra/code-sdk@1.18.0-alpha.2 ## mastra@1.38.0-alpha.2 ## @mastra/core@1.82.0-alpha.2 ## @mastra/editor@0.17.0-alpha.2 ## @mastra/server@1.82.0-alpha.2 ## @mastra/clickhouse@1.29.0-alpha.1 ## @mastra/duckdb@1.18.0-alpha.1 ## @mastra/pg@1.35.0-alpha.2 ## @mastra/platform-workspace@1.12.0-alpha.1 ## @mastra/react@1.14.1-alpha.2 ## @mastra/deployer-cloud@1.82.0-alpha.2 ## @mastra/deployer-sandbox@0.3.26-alpha.1 ## @mastra/longmemeval@1.1.41-alpha.2 ## @mastra/opencode@0.1.41-alpha.2 ## @mastra/parallel@0.1.5-alpha.0 ## create-factory@0.4.2-alpha.2 ## mastracode@0.49.0-alpha.2 ## @mastra/arize@1.3.29-alpha.1 ## @mastra/arthur@0.4.29-alpha.1 ## @mastra/braintrust@1.3.26-alpha.1 ## @mastra/datadog@1.4.21-alpha.1 ## @mastra/deepeval@0.1.23-alpha.1 ## @mastra/laminar@1.3.31-alpha.1 ## @mastra/langfuse@1.6.5-alpha.1 ## @mastra/langsmith@1.4.2-alpha.1 ## @mastra/observability@1.23.1-alpha.1 ## @mastra/otel-bridge@1.5.21-alpha.1 ## @mastra/otel-exporter@1.5.1-alpha.1 ## @mastra/posthog@1.4.6-alpha.1 ## @mastra/sentry@1.2.31-alpha.2 ## @mastra/agent-builder@1.1.33-alpha.2 ## @mastra/deployer@1.82.0-alpha.2 ## @mastra/mcp@2.8.0-alpha.1 ## @mastra/mcp-docs-server@1.3.12-alpha.3 ## @mastra/memory@1.41.0-alpha.2 ## @mastra/playground-ui@68.0.0-alpha.2 ## @mastra/rag@2.7.2-alpha.0 ## @mastra/elysia@0.1.22-alpha.2 ## @mastra/express@1.5.26-alpha.2 ## @mastra/fastify@1.5.26-alpha.2 ## @mastra/hono@1.7.24-alpha.2 ## @mastra/koa@1.7.26-alpha.2 ## @mastra/nestjs@0.2.41-alpha.2 ## @mastra/next@0.2.40-alpha.2 ## @mastra/tanstack-start@0.2.40-alpha.2 ## @mastra/dsql@1.5.6-alpha.0 ## @mastra/libsql@1.29.0-alpha.1 ## @mastra/mongodb@1.26.0-alpha.1 ## @mastra/mssql@1.11.1-alpha.0 ## @mastra/mysql@0.16.0-alpha.2 ## @mastra/oracledb@0.5.6-alpha.0 ## @mastra/spanner@1.11.1-alpha.0 ## @mastra/turso@0.1.20-alpha.1 ## @mastra/voice-google@0.14.5-alpha.0 ## @mastra/inngest@1.11.1-alpha.1 ## @mastra/temporal@0.5.0-alpha.2 ## @mastra/e2b@0.16.1-alpha.1 ## create-mastra@1.38.0-alpha.2 ## @internal/playground@1.38.0-alpha.2 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
1ed3d10bb3 |
Fix Markdown heading splitting when titles contain pipes (#29221) | ||
|
|
6831804379 |
fix(rag): keep undersized JSON chunks instead of dropping them (#29222) | ||
|
|
1857921430 |
Fix RAG regex separators with capture groups (#29225) | ||
|
|
056e666f94 |
fix(rag): preserve Unicode and literal escapes in JSON chunking (#29223) | ||
|
|
278ecceb2d |
chore(deps): update ai sdk (#28928)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> |
||
|
|
1b8b0ac10e |
chore(deps): update ai sdk (#28223)
This PR contains the following updates: | Package | Type | Update | Change | Pending | |---|---|---|---|---| | [@ai-sdk/alibaba-v7](https://ai-sdk.dev/docs) ([source](https://redirect.github.com/vercel/ai/tree/HEAD/packages/alibaba)) | devDependencies | patch | [`2.0.69` → `2.0.71`](https://renovatebot.com/diffs/npm/@ai-sdk%2falibaba-v7/2.0.69/2.0.71) | `2.0.75` (+3) | | [@ai-sdk/anthropic-v7](https://ai-sdk.dev/docs) ([source](https://redirect.github.com/vercel/ai/tree/HEAD/packages/anthropic)) | devDependencies | patch | [`4.0.82` → `4.0.83`](https://renovatebot.com/diffs/npm/@ai-sdk%2fanthropic-v7/4.0.82/4.0.83) | `4.0.87` (+3) | | [@ai-sdk/cerebras-v7](https://ai-sdk.dev/docs) ([source](https://redirect.github.com/vercel/ai/tree/HEAD/packages/cerebras)) | devDependencies | patch | [`3.0.71` → `3.0.73`](https://renovatebot.com/diffs/npm/@ai-sdk%2fcerebras-v7/3.0.71/3.0.73) | `3.0.77` (+3) | | [@ai-sdk/deepinfra-v7](https://ai-sdk.dev/docs) ([source](https://redirect.github.com/vercel/ai/tree/HEAD/packages/deepinfra)) | devDependencies | patch | [`3.0.71` → `3.0.73`](https://renovatebot.com/diffs/npm/@ai-sdk%2fdeepinfra-v7/3.0.71/3.0.73) | `3.0.77` (+3) | | [@ai-sdk/deepseek-v7](https://ai-sdk.dev/docs) ([source](https://redirect.github.com/vercel/ai/tree/HEAD/packages/deepseek)) | devDependencies | patch | [`3.0.67` → `3.0.68`](https://renovatebot.com/diffs/npm/@ai-sdk%2fdeepseek-v7/3.0.67/3.0.68) | `3.0.72` (+3) | | [@ai-sdk/gateway](https://ai-sdk.dev/docs) ([source](https://redirect.github.com/vercel/ai/tree/HEAD/packages/gateway)) | devDependencies | patch | [`^4.0.116` → `^4.0.118`](https://renovatebot.com/diffs/npm/@ai-sdk%2fgateway/4.0.116/4.0.118) | `4.0.123` (+4) | | [@ai-sdk/gateway](https://ai-sdk.dev/docs) ([source](https://redirect.github.com/vercel/ai/tree/HEAD/packages/gateway)) | devDependencies | patch | [`^3.0.217` → `^3.0.218`](https://renovatebot.com/diffs/npm/@ai-sdk%2fgateway/3.0.217/3.0.218) | `3.0.220` (+1) | | [@ai-sdk/gateway](https://ai-sdk.dev/docs) ([source](https://redirect.github.com/vercel/ai/tree/HEAD/packages/gateway)) | devDependencies | patch | [`2.0.168` → `2.0.169`](https://renovatebot.com/diffs/npm/@ai-sdk%2fgateway/2.0.168/2.0.169) | `2.0.171` (+1) | | [@ai-sdk/google](https://ai-sdk.dev/docs) ([source](https://redirect.github.com/vercel/ai/tree/HEAD/packages/google)) | devDependencies | patch | [`^3.0.135` → `^3.0.136`](https://renovatebot.com/diffs/npm/@ai-sdk%2fgoogle/3.0.135/3.0.136) | `3.0.137` | | [@ai-sdk/google-v5](https://ai-sdk.dev/docs) ([source](https://redirect.github.com/vercel/ai/tree/HEAD/packages/google)) | devDependencies | patch | [`2.0.103` → `2.0.104`](https://renovatebot.com/diffs/npm/@ai-sdk%2fgoogle-v5/2.0.103/2.0.104) | `2.0.105` | | [@ai-sdk/google-v5](https://ai-sdk.dev/docs) ([source](https://redirect.github.com/vercel/ai/tree/HEAD/packages/google)) | dependencies | patch | [`2.0.103` → `2.0.104`](https://renovatebot.com/diffs/npm/@ai-sdk%2fgoogle-v5/2.0.103/2.0.104) | `2.0.105` | | [@ai-sdk/google-v6](https://ai-sdk.dev/docs) ([source](https://redirect.github.com/vercel/ai/tree/HEAD/packages/google)) | devDependencies | patch | [`3.0.135` → `3.0.136`](https://renovatebot.com/diffs/npm/@ai-sdk%2fgoogle-v6/3.0.135/3.0.136) | `3.0.137` | | [@ai-sdk/google-v7](https://ai-sdk.dev/docs) ([source](https://redirect.github.com/vercel/ai/tree/HEAD/packages/google)) | devDependencies | patch | [`4.0.99` → `4.0.100`](https://renovatebot.com/diffs/npm/@ai-sdk%2fgoogle-v7/4.0.99/4.0.100) | `4.0.104` (+3) | | [@ai-sdk/groq-v7](https://ai-sdk.dev/docs) ([source](https://redirect.github.com/vercel/ai/tree/HEAD/packages/groq)) | devDependencies | patch | [`4.0.63` → `4.0.65`](https://renovatebot.com/diffs/npm/@ai-sdk%2fgroq-v7/4.0.63/4.0.65) | `4.0.69` (+3) | | [@ai-sdk/openai-compatible](https://ai-sdk.dev/docs) ([source](https://redirect.github.com/vercel/ai/tree/HEAD/packages/openai-compatible)) | dependencies | patch | [`^2.0.85` → `^2.0.86`](https://renovatebot.com/diffs/npm/@ai-sdk%2fopenai-compatible/2.0.85/2.0.86) | `2.0.87` | | [@ai-sdk/openai-compatible-v6](https://ai-sdk.dev/docs) ([source](https://redirect.github.com/vercel/ai/tree/HEAD/packages/openai-compatible)) | devDependencies | patch | [`2.0.85` → `2.0.86`](https://renovatebot.com/diffs/npm/@ai-sdk%2fopenai-compatible-v6/2.0.85/2.0.86) | `2.0.87` | | [@ai-sdk/openai-v7](https://ai-sdk.dev/docs) ([source](https://redirect.github.com/vercel/ai/tree/HEAD/packages/openai)) | devDependencies | patch | [`4.0.96` → `4.0.97`](https://renovatebot.com/diffs/npm/@ai-sdk%2fopenai-v7/4.0.96/4.0.97) | `4.0.101` (+3) | | [@ai-sdk/provider](https://ai-sdk.dev/docs) ([source](https://redirect.github.com/vercel/ai/tree/HEAD/packages/provider)) | devDependencies | patch | [`^4.0.29` → `^4.0.30`](https://renovatebot.com/diffs/npm/@ai-sdk%2fprovider/4.0.29/4.0.30) | `4.0.33` (+2) | | [@ai-sdk/provider-utils](https://ai-sdk.dev/docs) ([source](https://redirect.github.com/vercel/ai/tree/HEAD/packages/provider-utils)) | devDependencies | patch | [`^5.0.62` → `^5.0.63`](https://renovatebot.com/diffs/npm/@ai-sdk%2fprovider-utils/5.0.62/5.0.63) | `5.0.67` (+3) | | [@ai-sdk/provider-utils-v7](https://ai-sdk.dev/docs) ([source](https://redirect.github.com/vercel/ai/tree/HEAD/packages/provider-utils)) | dependencies | patch | [`5.0.62` → `5.0.63`](https://renovatebot.com/diffs/npm/@ai-sdk%2fprovider-utils-v7/5.0.62/5.0.63) | `5.0.67` (+3) | | [@ai-sdk/provider-v7](https://ai-sdk.dev/docs) ([source](https://redirect.github.com/vercel/ai/tree/HEAD/packages/provider)) | dependencies | patch | [`4.0.29` → `4.0.30`](https://renovatebot.com/diffs/npm/@ai-sdk%2fprovider-v7/4.0.29/4.0.30) | `4.0.33` (+2) | | [@ai-sdk/togetherai-v7](https://ai-sdk.dev/docs) ([source](https://redirect.github.com/vercel/ai/tree/HEAD/packages/togetherai)) | devDependencies | patch | [`3.0.72` → `3.0.74`](https://renovatebot.com/diffs/npm/@ai-sdk%2ftogetherai-v7/3.0.72/3.0.74) | `3.0.78` (+3) | | [@ai-sdk/xai-v7](https://ai-sdk.dev/docs) ([source](https://redirect.github.com/vercel/ai/tree/HEAD/packages/xai)) | devDependencies | patch | [`5.0.24` → `5.0.25`](https://renovatebot.com/diffs/npm/@ai-sdk%2fxai-v7/5.0.24/5.0.25) | `5.0.29` (+3) | | [ai](https://ai-sdk.dev/docs) ([source](https://redirect.github.com/vercel/ai/tree/HEAD/packages/ai)) | devDependencies | patch | [`^7.0.143` → `^7.0.145`](https://renovatebot.com/diffs/npm/ai/7.0.143/7.0.145) | `7.0.150` (+4) | | [ai](https://ai-sdk.dev/docs) ([source](https://redirect.github.com/vercel/ai/tree/HEAD/packages/ai)) | devDependencies | patch | [`^6.0.309` → `^6.0.311`](https://renovatebot.com/diffs/npm/ai/6.0.309/6.0.311) | `6.0.314` (+2) | | [ai](https://ai-sdk.dev/docs) ([source](https://redirect.github.com/vercel/ai/tree/HEAD/packages/ai)) | devDependencies | patch | [`^5.0.277` → `^5.0.278`](https://renovatebot.com/diffs/npm/ai/5.0.277/5.0.278) | `5.0.280` (+1) | | [ai](https://ai-sdk.dev/docs) ([source](https://redirect.github.com/vercel/ai/tree/HEAD/packages/ai)) | dependencies | patch | [`^6.0.309` → `^6.0.311`](https://renovatebot.com/diffs/npm/ai/6.0.309/6.0.311) | `6.0.314` (+2) | | [ai-v5](https://ai-sdk.dev/docs) ([source](https://redirect.github.com/vercel/ai/tree/HEAD/packages/ai)) | devDependencies | patch | [`5.0.277` → `5.0.278`](https://renovatebot.com/diffs/npm/ai-v5/5.0.277/5.0.278) | `5.0.280` (+1) | --- > [!WARNING] > Some dependencies could not be looked up. Check the [Dependency Dashboard](../issues/9505) for more information. --- ### Release Notes <details> <summary>vercel/ai (@​ai-sdk/alibaba-v7)</summary> ### [`v2.0.71`](https://redirect.github.com/vercel/ai/blob/HEAD/packages/alibaba/CHANGELOG.md#2071) [Compare Source](https://redirect.github.com/vercel/ai/compare/@ai-sdk/alibaba@2.0.70...@ai-sdk/alibaba@2.0.71) ##### Patch Changes - [`869601f`]( |
||
|
|
6deb7c0a1e |
chore(security): Vanta 2026-10-28 - qs 6.16.1, @modelcontextprotocol/node 2.1.1 floors (#28716)
Refs mastra-ai/platform#2931 Vanta remediation pass for 2026-10-28. It follows #28325, which has merged. ## 2026-10-28 update Today's live Vanta export added 3 advisory IDs on `mastra-ai/mastra` (GitHub/Dependabot). This PR fixes the two that have a published fix and leaves deepmerge, which has none. | Package | From → To | Finding | Where | How | |---|---|---|---|---| | qs | 6.16.0 → 6.16.1 | CVE-2026-110816 / GHSA-6pq8-jhm2-2vcw (Medium ×4) | root `pnpm-lock.yaml`, 9 `e2e-tests/*` lockfiles, `scripts/gh-issue-triage/package-lock.json` | Raised the existing floors `qs@>=6.7.0 <6.16.0: 6.16.0` → `<6.16.1: 6.16.1` and `'qs@<6.7.0': 6.16.0` → `6.16.1`. Raised the npm override in gh-issue-triage. | | @modelcontextprotocol/node | 2.0.0 → 2.1.1 | GHSA-f897-62hf-6gxq (High ×2; HTTP transports had no body-size or batch-length limit) | root `pnpm-lock.yaml` (published `@mastra/mcp` 1.18.0, used as `mcp-legacy`), `scripts/gh-issue-triage/package-lock.json` | New pnpm override `'@modelcontextprotocol/node@>=2.0.0 <2.1.0': 2.1.1` and a new npm override in gh-issue-triage. I used 2.1.1 rather than 2.1.2 because 2.1.2 needs a `@modelcontextprotocol/server` peer of `^2.4.0`, while `@mastra/mcp` 1.18 resolves server 2.3.1. `packages/mcp` itself already uses node 2.1.2. | - Both versions are older than the 1-day `minimumReleaseAge`: qs 6.16.1 was published 10-14 and node 2.1.1 on 10-02. I did not use qs 6.16.2 (10-27), which is too new. - No floors or overrides were removed; existing ones were only raised. - `pnpm install --frozen-lockfile --lockfile-only` passes at the root. Each nested e2e workspace was regenerated with `pnpm install --lockfile-only`. - Added the empty changeset `.changeset/vanta-2026-10-28-security-floors.md`. No published package changes. - After this change, osv-scanner over all 33 lockfiles reports only the documented leftovers: - zod 3.25.76 (zod v3 compat line on purpose) - ai 4.3.19 / `@ai-sdk/provider-utils` 2.2.8 (vendored v4 line) - `@azure/msal-node` 5.6.0 / 6.0.1 (fix 7.1.0 needs majors in identity and teams) - `@opentelemetry/core` 1.30.1 (needs pubsub 6) - extract-zip 2.0.1 (no patched release) - deepmerge 4.3.1 (CVE-2026-93753 / GHSA-gcqx-w48m-w2h4; no patched release, 4.3.1 is the latest) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## ELI5 This PR updates dependency rules and package versions to use newer releases, including security fixes for `qs` and `@modelcontextprotocol/node`. It also updates AI SDK dependencies and does not include published package changes. ## Summary - Raise the `qs` override target to `6.16.1` in the root and e2e workspaces and in `scripts/gh-issue-triage`. - Add an `@modelcontextprotocol/node` override at `2.1.1` in the root workspace and `scripts/gh-issue-triage`. - Update AI SDK dependency versions across package manifests and add a changeset describing the provider-utils update. - Add an empty changeset for the security-only dependency updates. <!-- end of auto-generated comment: release notes by coderabbit.ai --> ## Update 2026-10-28 (afternoon) - Merged origin/main (clean). - Bumped the AI SDK v5 compat line from @ai-sdk/provider-utils 3.0.41 to 3.0.42 (patch, published 2026-10-21; it blocks `.internal` hostnames in download URL validation and encodes provider-returned IDs in request paths). This addresses the Aikido /mastra Highs AIKIDO-2026-10990 and AIKIDO-2026-10981: - ai 5.0.277 → 5.0.282, @ai-sdk/gateway 2.0.168 → 2.0.173 (vendored ai_v5) - anthropic 2.0.109 → 2.0.110, google 2.0.103 → 2.0.106, groq 2.0.58 → 2.0.59, openai 2.0.135 → 2.0.137, openai-compatible 1.0.58 → 1.0.59, xai 2.0.99 → 2.0.100 - Nested lockfiles updated: memory/integration-tests and playground/e2e/kitchen-sink. - No new overrides. Changeset: `vanta-2026-10-28-ai-sdk-v5-provider-utils.md`. |
||
|
|
6a191d46dc | chore: version - exit prerelease mode | ||
|
|
976fde7416 |
refactor(lint): enable no-else-return at root (#28601)
Enables `no-else-return: error` in the root Oxlint config and removes 186 redundant `else` branches across 111 source/test files. Existing rule defaults are retained. Reviewed every code diff for behavior preservation. An independent TypeScript AST comparison confirms that changes are limited to removing `else` after returning branches, with the same expressions, statement order, return values, and `try`/`catch`/`finally` boundaries. All 181,158 identifier occurrences retain their bindings. The recorder replay path keeps an explicit block: flattening it would shadow the earlier request `body` with the response `body` and introduce a temporal-dead-zone error. Extends the existing monorepo optimized-dependency test to assert that a raw TypeScript workspace package, including its enum and transitive dependency, still executes in the production bundle. Validation: the root rule-only scan passes on 15,273 files with zero diagnostics; formatting and `git diff --check` pass. Schema compatibility tests: 1,060 passed, 9 skipped. Recorder runtime tests: 21 passed. The core selection initially passed 3,513 tests; rerunning the suites requiring local server/cache access passed 185 tests, with one remaining cache-file assertion also reproduced on unchanged `main`. Remaining validation limits: four asset-download cases cannot reach `placehold.co`; the changed-file lint run reports six import-order errors reproduced on unchanged files from `main`. Deployer unit tests and the monorepo test could not run because this checkout lacks required package dependencies (`fs-extra`/workspace links and `get-port`, respectively). These limits are left visible for CI. No changeset is included because this is a behavior-preserving lint cleanup. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## ELI5 This PR makes the code easier to read by removing `else` branches that are not needed after a return. It also enables a rule that catches those branches and adds a test for loading a raw TypeScript workspace package in a production bundle. ## Summary - Enables Oxlint’s `no-else-return` rule at error severity and removes 186 redundant `else` branches across 111 files. - Extends the monorepo optimized-dependencies test to check a raw TypeScript workspace package, its enum, and a transitive dependency. - Updates the deployer’s transpile-package path pattern. - In workflow event processing, a truthy branch index with no matching child now falls through to publish a skipped-step end event. Previously, this case published no event. - Keeps the recorder replay block explicit to avoid request/response `body` shadowing and a temporal-dead-zone error. ## Validation Reported checks passed: the rule-only scan across 15,273 files, formatting, `git diff --check`, schema compatibility tests (1,060 passed, 9 skipped), recorder runtime tests (21 passed), and an initial core test selection (3,513 passed). Some test limits remain. Four asset-download cases could not reach `placehold.co`. Changed-file lint reported six import-order errors that also occur on unchanged files from `main`. Deployer unit tests and the monorepo test could not run because dependencies were unavailable. On rerun, suites requiring local server/cache access had 185 passes; one cache-file assertion also reproduced on unchanged `main`. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
7dbc6c1d18 |
refactor(lint): simplify unnecessary template expressions (#28447)
Enable `typescript/no-unnecessary-template-expression` in the shared
TypeScript configuration and simplify 17 redundant interpolations.
Preserve 11 intentional coercions at runtime boundaries and in mock
response text with local explanations. Existing lint scope and package
manifests are unchanged.
Reviewed every edit and compared emitted JavaScript after the approved
string simplifications, including interpolation order and tagged
templates. All 916 function return types and 1,833 variable binding
types in the 21 affected source files are unchanged. CI lint and build
pass; the local 57-task build, CLI typecheck, formatting, and whitespace
checks pass.
Validation covers 193 focused processor, CLI, Couchbase, and GraphRAG
tests, plus 902 deployer tests across the full run and an isolated retry
of one timeout. That protocol-import case passed alone in 14.55 seconds;
unchanged main took 14.61 seconds against its 15-second timeout. Both
selected published-package monorepo E2E cases pass, including the
extended HTTP check for external module resolution. The broad rule audit
found zero rule violations across 15,106 files, alongside four
TypeScript configuration diagnostics in unchanged files; the targeted
scan passes cleanly.
The DuckDB CI job also fails two existing capability-list assertions
because their expected arrays omit `span-aggregate`. Both failures were
reproduced on unchanged base `
|
||
|
|
2c646b53d0 |
chore: version packages (alpha) (#28399)
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or [setup this action to publish automatically](https://github.com/changesets/action#with-publishing). If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. ⚠️⚠️⚠️⚠️⚠️⚠️ `main` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `main`. ⚠️⚠️⚠️⚠️⚠️⚠️ # Releases > The changelog information of each package has been omitted from this message, as the content exceeds the size limit. ## @mastra/factory@0.25.0-alpha.5 ## @mastra/langsmith@1.4.0-alpha.2 ## @mastra/connect@1.2.0-alpha.2 ## @mastra/core@1.80.0-alpha.4 ## @mastra/playground-ui@66.0.0-alpha.4 ## @mastra/acp@0.4.4-alpha.0 ## @mastra/claude@0.3.4-alpha.0 ## @mastra/cursor@0.3.4-alpha.0 ## @mastra/openai@1.1.4-alpha.0 ## @mastra/auth-auth0@1.2.6-alpha.0 ## @mastra/auth-better-auth@1.1.9-alpha.0 ## @mastra/auth-clerk@1.3.2-alpha.0 ## @mastra/auth-cloud@1.2.8-alpha.0 ## @mastra/auth-firebase@1.1.5-alpha.0 ## @mastra/auth-google@0.1.7-alpha.0 ## @mastra/auth-neon@0.3.5-alpha.0 ## @mastra/auth-okta@0.2.6-alpha.0 ## @mastra/auth-studio@1.3.11-alpha.1 ## @mastra/auth-supabase@1.1.6-alpha.0 ## @mastra/auth-workos@1.6.8-alpha.0 ## @mastra/agent-browser@0.5.5-alpha.0 ## @mastra/browser-viewer@0.2.6-alpha.0 ## @mastra/browser-firecrawl@0.2.5-alpha.1 ## @mastra/stagehand@0.3.7-alpha.1 ## @mastra/discord@1.3.2-alpha.0 ## @mastra/slack@1.8.0-alpha.1 ## @mastra/teams@0.1.3-alpha.0 ## @mastra/telegram@0.2.4-alpha.0 ## @mastra/client-js@1.57.0-alpha.4 ## @mastra/react@1.13.0-alpha.4 ## @mastra/isolated-vm@0.1.4-alpha.0 ## @mastra/quickjs@0.1.5-alpha.0 ## @mastra/deployer-cloud@1.80.0-alpha.4 ## @mastra/deployer-cloudflare@1.2.39-alpha.1 ## @mastra/deployer-netlify@1.2.39-alpha.1 ## @mastra/deployer-sandbox@0.3.24-alpha.1 ## @mastra/deployer-vercel@1.2.39-alpha.1 ## @mastra/voyageai@0.4.3-alpha.0 ## @mastra/longmemeval@1.1.39-alpha.4 ## @mastra/livekit@0.5.2-alpha.0 ## @mastra/opencode@0.1.39-alpha.4 ## @mastra/parallel@0.1.4-alpha.0 ## create-factory@0.3.1-alpha.4 ## @mastra/code-sdk@1.15.1-alpha.5 ## mastracode@0.48.1-alpha.4 ## @mastra/arize@1.3.27-alpha.2 ## @mastra/arthur@0.4.27-alpha.2 ## @mastra/braintrust@1.3.24-alpha.2 ## @mastra/datadog@1.4.19-alpha.2 ## @mastra/deepeval@0.1.21-alpha.2 ## @mastra/laminar@1.3.29-alpha.2 ## @mastra/langfuse@1.6.3-alpha.2 ## @mastra/observability@1.21.1-alpha.2 ## @mastra/otel-bridge@1.5.19-alpha.2 ## @mastra/otel-exporter@1.4.10-alpha.2 ## @mastra/posthog@1.4.4-alpha.2 ## @mastra/sentry@1.2.29-alpha.2 ## @mastra/agent-builder@1.1.31-alpha.2 ## @mastra/auth@1.1.5-alpha.0 ## mastra@1.36.0-alpha.4 ## @mastra/codemod@1.1.8-alpha.0 ## create-mastra@1.36.0-alpha.4 ## @mastra/deployer@1.80.0-alpha.4 ## @mastra/editor@0.16.5-alpha.2 ## @mastra/evals@1.10.9-alpha.0 ## @mastra/fastembed@1.3.5-alpha.2 ## @mastra/loggers@1.3.10-alpha.1 ## @mastra/mcp@2.6.0-alpha.1 ## @mastra/mcp-docs-server@1.3.10-alpha.7 ## @mastra/mcp-registry-registry@1.1.7-alpha.0 ## @mastra/memory@1.39.1-alpha.2 ## @mastra/rag@2.7.1-alpha.0 ## @mastra/schema-compat@1.3.17-alpha.0 ## @mastra/server@1.80.0-alpha.4 ## @mastra/google-cloud-pubsub@1.1.5-alpha.1 ## @mastra/redis-streams@0.6.5-alpha.1 ## @mastra/valkey-streams@0.5.7-alpha.1 ## @mastra/elysia@0.1.20-alpha.4 ## @mastra/express@1.5.24-alpha.4 ## @mastra/fastify@1.5.24-alpha.4 ## @mastra/hono@1.7.22-alpha.4 ## @mastra/koa@1.7.24-alpha.4 ## @mastra/nestjs@0.2.39-alpha.4 ## @mastra/next@0.2.38-alpha.4 ## @mastra/server-adapters-test-suite@0.1.4-alpha.2 ## @mastra/tanstack-start@0.2.38-alpha.4 ## @mastra/astra@1.1.3-alpha.0 ## @mastra/azure-ai-search@0.1.2-alpha.1 ## @mastra/chroma@1.1.5-alpha.0 ## @mastra/clickhouse@1.27.0-alpha.1 ## @mastra/cloudflare@1.7.6-alpha.0 ## @mastra/cloudflare-d1@1.4.5-alpha.1 ## @mastra/convex@1.7.6-alpha.0 ## @mastra/couchbase@1.1.4-alpha.1 ## @mastra/dsql@1.5.5-alpha.0 ## @mastra/duckdb@1.16.0-alpha.1 ## @mastra/dynamodb@1.4.5-alpha.1 ## @mastra/elasticsearch@1.4.6-alpha.1 ## @mastra/lance@1.5.2-alpha.1 ## @mastra/libsql@1.27.1-alpha.0 ## @mastra/mongodb@1.24.1-alpha.1 ## @mastra/mssql@1.10.6-alpha.0 ## @mastra/mysql@0.14.1-alpha.0 ## @mastra/opensearch@1.1.4-alpha.1 ## @mastra/oracledb@0.5.5-alpha.0 ## @mastra/pg@1.33.0-alpha.2 ## @mastra/pinecone@1.1.3-alpha.0 ## @mastra/qdrant@1.1.6-alpha.0 ## @mastra/redis@1.4.12-alpha.1 ## @mastra/s3vectors@1.1.5-alpha.0 ## @mastra/spanner@1.10.1-alpha.1 ## @mastra/turbopuffer@1.2.3-alpha.0 ## @mastra/turso@0.1.18-alpha.0 ## @mastra/upstash@1.5.5-alpha.1 ## @mastra/valkey@0.2.8-alpha.1 ## @mastra/vectorize@1.1.4-alpha.0 ## @mastra/weaviate@0.1.4-alpha.0 ## @mastra/voice-aws-nova-sonic@0.2.6-alpha.0 ## @mastra/voice-azure@0.12.3-alpha.0 ## @mastra/voice-cloudflare@0.13.4-alpha.0 ## @mastra/voice-deepgram@0.13.3-alpha.0 ## @mastra/voice-elevenlabs@0.13.3-alpha.0 ## @mastra/voice-gladia@0.13.3-alpha.0 ## @mastra/voice-google@0.14.4-alpha.0 ## @mastra/voice-google-gemini-live@0.14.18-alpha.0 ## @mastra/voice-inworld@0.4.6-alpha.0 ## @mastra/voice-mistral@0.1.3-alpha.0 ## @mastra/voice-modelslab@0.2.3-alpha.0 ## @mastra/voice-murf@0.13.3-alpha.0 ## @mastra/voice-openai@0.13.4-alpha.0 ## @mastra/voice-openai-realtime@0.14.8-alpha.0 ## @mastra/voice-playai@0.13.3-alpha.0 ## @mastra/voice-sarvam@1.1.4-alpha.0 ## @mastra/voice-speechify@0.14.3-alpha.0 ## @mastra/voice-xai-realtime@0.2.17-alpha.0 ## @mastra/inngest@1.10.8-alpha.3 ## @mastra/temporal@0.4.18-alpha.4 ## @mastra/agentcore@0.5.3-alpha.0 ## @mastra/agentfs@0.2.3-alpha.0 ## @mastra/apple-container@0.5.2-alpha.0 ## @mastra/archil@0.3.2-alpha.0 ## @mastra/azure@0.3.3-alpha.1 ## @mastra/blaxel@0.10.2-alpha.0 ## @mastra/cloudflare-sandbox@0.5.4-alpha.0 ## @mastra/daytona@0.11.4-alpha.0 ## @mastra/docker@0.12.1-alpha.0 ## @mastra/e2b@0.15.1-alpha.1 ## @mastra/e2b-desktop@0.1.10-alpha.1 ## @mastra/files-sdk@0.3.3-alpha.0 ## @mastra/gcs@0.3.5-alpha.1 ## @mastra/google-drive@0.2.4-alpha.0 ## @mastra/mesa@0.3.3-alpha.0 ## @mastra/modal@0.7.3-alpha.0 ## @mastra/platform-workspace@1.10.0-alpha.1 ## @mastra/railway@0.10.2-alpha.1 ## @mastra/s3@0.6.5-alpha.1 ## @mastra/sprites@0.1.2-alpha.0 ## @mastra/vercel@1.6.2-alpha.0 ## @internal/playground@1.36.0-alpha.4 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
0f82b38ed4 |
refactor(lint): flatten lone if statements in else branches (#28431)
Enable `no-lonely-if` in the shared Oxlint config and flatten 38 lone
`if` statements in `else` blocks across 35 files. For example, `else {
if (condition) { ... } }` becomes `else if (condition) { ... }`.
Conditions, evaluation order, statements, comments, and local bindings
are preserved. No package filters or lint exceptions are added.
Strengthen the existing monorepo test to execute another named export
from an optimized dependency. Comparisons of TypeScript syntax, emitted
JavaScript, raw template text, comments, and local bindings pass for all
35 migrated files after normalizing only the redundant else blocks. The
rule clears all 15,094 scanned files.
[CI lint and formatting
pass](https://github.com/mastra-ai/mastra/actions/runs/40344286057/job/121647174331)
for `
|
||
|
|
ce5d4731ee |
chore(deps): update dependencies across the monorepo (#28417)
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com> |
||
|
|
40a522c142 |
chore(deps): update build tools (#27997) | ||
|
|
6338514d87 |
fix: repair test failures surfaced by the full release-PR test run (#28116)
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com> |
||
|
|
fbd27197d7 |
refactor(lint): simplify literal strings and const assertions (#27982)
Enable `no-useless-concat` and `typescript/prefer-as-const` in the
shared Oxlint config. Simplify 15 string concatenations and use const
assertions for four readonly SDK specification versions. Existing
package filters stay as configured.
String contents and expression evaluation order are preserved, and the
SDK fields keep their readonly `v1`–`v4` literal types. A documented
exception keeps NUL-delimited fixture records separate so the next
record’s leading digit cannot become an octal escape.
261 focused tests pass. A fresh scan clears both rules across 14,747
files, and emitted-JavaScript and declaration comparisons preserve
values and public field types. [CI lint and formatting
pass](https://github.com/mastra-ai/mastra/actions/runs/39583377036/job/119166317139)
for `
|
||
|
|
4c22623ea3 | chore: version - exit prerelease mode | ||
|
|
dbde4bf36a |
chore(deps): update ai sdk (#27728)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> |
||
|
|
3dc61777dd |
chore: version packages (alpha) (#27703)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
e8d7f8e52d |
feat: support v4 embedding models in core, memory, and RAG (#27710) | ||
|
|
03e4a73b78 |
chore: version packages (alpha) (#27375) | ||
|
|
fe048f7950 |
chore(lint): require import type for type-only imports (#27642)
Lint now requires `import type` for imports used only as types, as `oxlint.config.ts` always intended. The two rules have matched no files since mastra-ai/mastra#20173 broke their override's glob, so the repo drifted into mixing `import { type X }`, `import { X }` for types, and `import type`. This turns them back on and fixes the existing imports. No runtime behavior changes. ## What changed - `import/consistent-type-specifier-style` and `typescript/consistent-type-imports` go from `off` to `error`. - 186 files: type-only imports become `import type { … }`, split from value imports where a statement had both. Done with `oxlint --fix` plus 6 files the fixer left with inline `type` specifiers, then `oxfmt`. - `disallowTypeAnnotations` is now `false`: `typeof import('x')` is already type-only, and 97 of its 112 uses are the `vi.importActual<typeof import('./x')>()` pattern in tests. ## Could this change behavior? Only where a package keeps imports at runtime (`verbatimModuleSyntax`, via `tsconfig.node.json`) and a statement became fully `import type`, since that drops the module load. That happens in 18 places: 11 in tests, and in source `GithubAppIdentity` (factory), `Workspace`, `SpanType`, `Knowledge` and `WORKSPACE_TOOLS` (core), `Observable` from `rxjs` (nestjs), and `zod` / `@mastra/mcp` in the server adapter test suite. None of those modules run code at load time. ## Scope The other rules the broken glob turned off (`no-unused-vars`, `no-console`/`no-debugger`, `ban-ts-comment`, `no-require-imports`, the test-file import ban) stay off for their own PRs. ## Testing 1. `pnpm lint`: passes (the 13 `only-export-components` warnings are already on `main`). 2. `pnpm turbo build` for the 34 changed packages and `typecheck` for the ones that have it: pass. 3. The test files that lost a runtime import: pass (core, server, observability, factory, voice). |
||
|
|
9a423dae48 |
refactor(lint): replace ESLint with type-aware oxlint (#27476) | ||
|
|
5055d631a0 |
fix(rag): report correct startIndex when chunk overlap is measured in tokens (#27484) | ||
|
|
a15924e709 | chore: version packages | ||
|
|
81299c921d | chore: version - exit prerelease mode | ||
|
|
dc0cf8dbc1 | chore: version packages | ||
|
|
2c0111fa49 |
fix(rag): record chunkSize on rag chunk tracing spans (#26290)
Co-authored-by: Abhi Aiyer <abhiaiyer91@gmail.com> |
||
|
|
8b35a6c1d6 | chore: version - exit prerelease mode |