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

499 commits

Author SHA1 Message Date
dane-ai-mastra[bot]
d60ba71be0 chore: version - exit prerelease mode 2026-11-12 21:12:29 +00:00
dane-ai-mastra[bot]
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>
2026-11-12 12:07:03 -08:00
dane-ai-mastra[bot]
9e82af0237
chore: version packages (alpha) (#30074)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-11-11 14:21:14 -08:00
Dane - AI (Mastra)
c22107fce3
chore(deps): update dependency @ai-sdk/provider-utils@>=3.0.0 <3.0.38 to v3.0.45 (#29844) 2026-11-10 20:07:34 -08:00
dane-ai-mastra[bot]
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>
2026-11-10 15:51:29 -08:00
dane-ai-mastra[bot]
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>
2026-11-10 10:50:08 -08:00
dane-ai-mastra[bot]
6deb16047f
chore: version packages (alpha) (#29719)
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/slack@1.9.0-alpha.0


## @mastra/factory@0.28.0-alpha.3


## @mastra/code-sdk@1.19.0-alpha.3


## mastracode@0.50.0-alpha.3


## @mastra/observability@1.24.0-alpha.2


## @mastra/core@1.83.0-alpha.3


## @mastra/mcp-apps-components@0.1.0-alpha.3


## @mastra/playground-ui@69.0.0-alpha.4


## @mastra/server@1.83.0-alpha.3


## @mastra/server-adapters-test-suite@0.3.0-alpha.1


## @mastra/platform-workspace@1.13.0-alpha.0


## @mastra/auth-better-auth@1.1.11-alpha.1


## @mastra/client-js@1.60.0-alpha.3


## @mastra/react@1.15.0-alpha.3


## @mastra/deployer-cloud@1.83.0-alpha.3


## @mastra/longmemeval@1.1.42-alpha.3


## @mastra/opencode@0.1.42-alpha.3


## create-factory@0.4.3-alpha.3


## @mastra/arize@1.3.30-alpha.2


## @mastra/arthur@0.4.30-alpha.2


## @mastra/braintrust@1.3.27-alpha.2


## @mastra/datadog@1.4.22-alpha.2


## @mastra/deepeval@0.1.24-alpha.2


## @mastra/laminar@1.3.32-alpha.2


## @mastra/langfuse@1.6.6-alpha.2


## @mastra/langsmith@1.4.3-alpha.2


## @mastra/otel-bridge@1.5.22-alpha.2


## @mastra/otel-exporter@1.5.2-alpha.2


## @mastra/posthog@1.4.7-alpha.2


## @mastra/sentry@1.2.32-alpha.2


## @mastra/agent-builder@1.2.1-alpha.1


## mastra@1.39.0-alpha.3


## @mastra/connect@1.3.2-alpha.2


## @mastra/deployer@1.83.0-alpha.3


## @mastra/editor@0.17.1-alpha.2


## @mastra/fastembed@1.3.7-alpha.0


## @mastra/mcp-docs-server@1.3.13-alpha.6


## @mastra/memory@1.41.1-alpha.1


## @mastra/elysia@0.1.23-alpha.3


## @mastra/express@1.5.27-alpha.3


## @mastra/fastify@1.5.27-alpha.3


## @mastra/hono@1.7.25-alpha.3


## @mastra/koa@1.7.27-alpha.3


## @mastra/nestjs@0.3.0-alpha.3


## @mastra/next@0.2.41-alpha.3


## @mastra/tanstack-start@0.2.41-alpha.3


## @mastra/convex@1.8.1-alpha.0


## @mastra/pg@1.36.0-alpha.2


## @mastra/inngest@1.11.2-alpha.2


## @mastra/temporal@0.6.0-alpha.3


## create-mastra@1.39.0-alpha.3


## @internal/playground@1.39.0-alpha.3

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-11-10 10:33:29 +01:00
Arthur Fiorette
c9140d2d4d
fix(memory): write one semantic recall row per message on every agent engine (#29826)
## Description

Durable and evented agents wrote two or three semantic recall vector
rows for each message. Two writers embedded the same messages:

- the `SemanticRecall` output processor, which keys rows by message id;
- `Memory.saveMessages`, which the save queue calls from the durable
input save and the finalize flush, and which wrote rows without ids, so
the store generated random ones.

The duplicates took up `topK` slots, and the embedder ran twice per
message.

The two writers also built rows differently. Only `saveMessages` chunked
long text, stripped working-memory tags and stored thread metadata.
Neither writer can simply be removed: the processor serves agent runs,
while `saveMessages` serves direct callers (the HTTP route, the client
SDK, user code) and the save queue. So this PR gives both writers one
row builder and one id scheme.

Changes:

- Core: `buildMessageEmbeddingRows` and `upsertMessageVectors`
(internal, in `@mastra/core/memory`) now decide the row format: text
extraction, chunking, metadata and row ids. A message's first chunk
keeps its message id, which is the id the processor already wrote, so
existing rows get replaced rather than duplicated. Later chunks get a
UUID derived from the message id and chunk index. Every message-vector
upsert now sends ids. Each writer passes its own embed function, so
embedding calls, retries and caches work as before.
- Core: `MessageList` keeps a per-run record of embedded messages (index
and message id to text hash) and serializes it with the list. The save
queue passes the record to `saveMessages`, and the durable input save
copies it back from its cloned list, so the second writer skips what the
first one embedded into the same index. If a message's text has changed
since, it is embedded again. A processor writing to a custom
`semanticRecall.indexName` and `Memory` writing to its default index
each still get every message.
- Core: new `semanticRecall.maxChunkChars` option, default 16,384
characters (about 4,096 English tokens). The limit is in characters
because each provider uses its own tokenizer. The processor now chunks
long messages the way `saveMessages` already did, instead of embedding
them as one input, which failed past the embedder's limit.
- Memory: `saveMessages`, `updateMessages`, cloned-message embedding and
`updateThreadResourceId` all write through the builder. Edits and
resource moves embed before deleting the old rows, so a failed embedding
call leaves them in place. Thread metadata is read only when rows will
be written. The `@mastra/core` peer range is now `>=1.83.0-0`.
- FastEmbed: models declare `maxInputTokens: 512`, so recall chunks fit
their window.

Existing rows are not rewritten. Rows `saveMessages` wrote before this
change keep their random ids. Rows the processor wrote already use the
message id, so new writes replace them. An evented or Inngest finalize
that runs on another worker doesn't see the input save's record, so it
embeds the user message once more into the same row.

```ts
const memory = new Memory({
  options: {
    semanticRecall: { topK: 3, messageRange: 1, maxChunkChars: 6000 },
  },
})
```

Tests:
`packages/memory/integration-tests/src/semantic-recall-embedding-rows.test.ts`
runs plain, durable and evented agents against a LibSQL vector index,
with thread scope, resource scope and a custom index. It checks:

- each persisted message has exactly one row under its own id;
- no row is written twice in a run;
- the fact is recalled once.

On `main` the durable and evented cases fail with 30 rows for 12
messages. With the record not passed to `saveMessages`, the write-once
check fails on durable and evented. Memory cases cover:

- record skips;
- chunk size taken from the embedder's input limit;
- an edit that shortens a long message;
- an embedder failure during an edit.

Unit tests cover the builder and the `MessageList` record.

Six cases in `agent-memory.test.ts` fail because their recorded fixtures
no longer match the requests. They fail the same way on `main`.

## Related issue(s)

Related to #29352. Agent runs now store thread metadata on vector rows,
which the read-side fix in that issue needs. This PR does not change the
read side.

## Type of change

- [x] 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)
- [x] Documentation update
- [ ] Code refactoring
- [ ] Performance improvement
- [x] Test update

## Checklist

- [x] I have linked the related issue(s) in the description above
- [x] 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
- [ ] 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 PR helps agents avoid saving the same message to search more than
once. It also splits long messages into smaller pieces so search can use
more of their content.

## Summary

- Shared helpers extract message text, split it into chunks, build
vector rows, and upsert them. The first chunk uses the message ID when
it is a UUID or small integer; other IDs and later chunks use stable
derived IDs.
- `SemanticRecall` and `Memory.saveMessages()` use the shared
row-building path. Agent runs track embedded text by message and index,
so writers can skip unchanged messages.
- `semanticRecall.maxChunkChars` sets the chunk limit. It defaults to
16,384 characters and can use the embedder’s declared `maxInputTokens`
when unset. FastEmbed models declare a 512-token input limit.
- Memory updates and thread-resource moves build replacement rows before
deleting existing vectors. Re-saving shorter text can leave older chunk
rows searchable; the documentation describes this behavior.
- Tests cover row counts, scopes, custom indexes, chunking, repeated
saves, edits, and embedding failures. The supplied description reports
six fixture-based `agent-memory.test.ts` failures that also occur on the
base branch. Completed check results are not available.
- Documentation and peer dependency minimum versions were updated.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-11-10 00:03:33 -03:00
Dane - AI (Mastra)
4bd4b7f48e
chore(deps): update better-auth monorepo to v1.7.18 (#29714)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-11-09 12:39:24 +01:00
Dane - AI (Mastra)
bfe3af4ae1
chore(deps): update better-auth monorepo to v1.7.15 (#29497) 2026-11-04 17:36:58 -08:00
dane-ai-mastra[bot]
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>
2026-11-04 14:40:27 -08:00
Dane - AI (Mastra)
9ce7e350ea
chore(deps): lock file maintenance (#29341)
Co-authored-by: wardpeet <ward@coding-tech.com>
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-11-04 15:03:55 +01:00
dane-ai-mastra[bot]
6e8dfcb83f chore: version - exit prerelease mode 2026-11-03 23:45:58 +00:00
dane-ai-mastra[bot]
4bc3aa672f
chore: version packages (alpha) (#29255)
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.27.0-alpha.3


## @mastra/agent-builder@1.2.0-alpha.3


## @mastra/core@1.82.0-alpha.3


## @mastra/mcp@2.8.0-alpha.2


## @mastra/memory@1.41.0-alpha.3


## @mastra/playground-ui@68.0.0-alpha.3


## @mastra/ring-signals@0.1.0-alpha.0


## @mastra/libsql@1.29.0-alpha.2


## @mastra/mongodb@1.26.0-alpha.2


## @mastra/mysql@0.16.0-alpha.3


## @mastra/pg@1.35.0-alpha.3


## @mastra/discord@1.3.3-alpha.0


## @mastra/slack@1.8.1-alpha.0


## @mastra/teams@0.1.4-alpha.0


## @mastra/telegram@0.2.5-alpha.0


## @mastra/client-js@1.59.0-alpha.3


## @mastra/react@1.14.1-alpha.3


## @mastra/deployer-cloud@1.82.0-alpha.3


## @mastra/longmemeval@1.1.41-alpha.3


## @mastra/opencode@0.1.41-alpha.3


## create-factory@0.4.2-alpha.3


## @mastra/code-sdk@1.18.0-alpha.3


## mastracode@0.49.0-alpha.3


## @mastra/arize@1.3.29-alpha.2


## @mastra/arthur@0.4.29-alpha.2


## @mastra/laminar@1.3.31-alpha.2


## @mastra/langfuse@1.6.5-alpha.2


## @mastra/otel-bridge@1.5.21-alpha.2


## @mastra/otel-exporter@1.5.1-alpha.2


## @mastra/sentry@1.2.31-alpha.3


## mastra@1.38.0-alpha.3


## @mastra/connect@1.3.1-alpha.1


## @mastra/deployer@1.82.0-alpha.3


## @mastra/editor@0.17.0-alpha.3


## @mastra/evals@1.10.11-alpha.0


## @mastra/mcp-docs-server@1.3.12-alpha.4


## @mastra/server@1.82.0-alpha.3


## @mastra/elysia@0.1.22-alpha.3


## @mastra/express@1.5.26-alpha.3


## @mastra/fastify@1.5.26-alpha.3


## @mastra/hono@1.7.24-alpha.3


## @mastra/koa@1.7.26-alpha.3


## @mastra/nestjs@0.2.41-alpha.3


## @mastra/next@0.2.40-alpha.3


## @mastra/tanstack-start@0.2.40-alpha.3


## @mastra/turso@0.1.20-alpha.2


## @mastra/inngest@1.11.1-alpha.2


## @mastra/temporal@0.5.0-alpha.3


## create-mastra@1.38.0-alpha.3


## @internal/playground@1.38.0-alpha.3

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-11-03 13:59:38 -07:00
Arthur Fiorette
de1b638b2f
fix(server): give each Mastra instance its own agent-builder workflows (#29253) 2026-11-03 15:26:49 -03:00
Dane - AI (Mastra)
47a6cd82e5
chore(deps): update ai sdk (#29242)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-11-03 16:12:54 +01:00
dane-ai-mastra[bot]
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>
2026-11-02 20:29:47 -07:00
dane-ai-mastra[bot]
30046969ad
chore: version packages (alpha) (#29146)
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
## @mastra/client-js@1.59.0-alpha.1

### Minor Changes

- Added the `aggregateTimeToFirstMeasures` observability capability.
Trace and span aggregate requests for `timeToFirstToken.*` or
`timeToFirstChunk.*` measures now return `501` against stores that can't
compute them, and field discovery omits those measures for such stores.
([#29055](https://github.com/mastra-ai/mastra/pull/29055))

  ```typescript
const { capabilities } = await
mastraClient.getObservabilityCapabilities();

if (capabilities.traceAggregate &&
capabilities.aggregateTimeToFirstMeasures) {
    const { rows } = await mastraClient.aggregateTraces({
timeRange: { from: '2026-08-01T00:00:00.000Z', to:
'2026-08-02T00:00:00.000Z' },
      groupBy: ['entityName'],
      measures: ['timeToFirstChunk.p95', 'timeToFirstChunk.count'],
    });
  }
  ```

### Patch Changes

- Updated dependencies
[[`8751dd7`](8751dd7f56),
[`682e8f3`](682e8f3e44),
[`0900c20`](0900c20592),
[`ebf8a9a`](ebf8a9a137)]:
  - @mastra/core@1.82.0-alpha.1
## @mastra/factory@0.27.0-alpha.1

### Minor Changes

- The same Jira, Linear or incident.io item can now be filed in more
than one Factory project. Before, the first project to file an item held
it for the whole org, and other projects that ingested it got no card.
Each project now keeps its own card. Within a project the card is still
reused when the item is seen again, after the card finishes and when the
issue reopens. A Linear card is also found after the issue's identifier
changes, for example when the issue moves to another team.
([#29059](https://github.com/mastra-ai/mastra/pull/29059))

When intake routing sends an item to a different project, the new
project files its own card and the previous project's card stays where
it is.

  **Breaking changes**

- `claimKey` is removed from the `upsertLinkedWorkItem` decision type.
Rules that still return it, and decisions saved before this release,
keep working: the field is accepted and ignored.
- `WorkItemClaimConflictError`, `getByClaimKey`, `claimWorkItem`,
`releaseProjectClaims` and `WorkItemRow.claimKey` are removed.

  Drop `claimKey` from linked-item decisions your rules return:

  ```ts
  // Before
  return {
    type: 'upsertLinkedWorkItem',
    source: 'jira-issue',
    sourceKey: issue.id,
    claimKey: `jira:issue:${issue.id}` /* … */,
  };

  // After
return { type: 'upsertLinkedWorkItem', source: 'jira-issue', sourceKey:
issue.id /* … */ };
  ```

Remove calls to `getByClaimKey`, `claimWorkItem` and
`releaseProjectClaims`. To find a project's card for an item, use
`getByProjectSource`.

The `claim_key` column stays in the database. Values already stored
there are left in place and no longer affect anything.

### Patch Changes

- Fixed shell commands that exit with a failure code reading as
successful in the Factory transcript. The command now reads as failed
while the run streams, after a dropped stream reconnects, and after a
reload. Stopping a process with `kill_process` still reads as a success.
([#28963](https://github.com/mastra-ai/mastra/pull/28963))

A system reminder that loads project instructions (`AGENTS.md`,
`CLAUDE.md` or `CONTEXT.md`) now reads "Project instructions" and names
the file by its path in the working directory, such as
`packages/core/AGENTS.md`, instead of a bare "System reminder".

- A board tool rule that moves a work item back into its current stage
with `reenter: true` now runs that stage's entry rules, as documented.
Previously the entry rules were skipped, so no new agent run started.
([#29104](https://github.com/mastra-ai/mastra/pull/29104))

- Updated dependencies
[[`5735a50`](5735a50c6c),
[`8751dd7`](8751dd7f56),
[`682e8f3`](682e8f3e44),
[`0900c20`](0900c20592),
[`ebf8a9a`](ebf8a9a137)]:
  - @mastra/platform-workspace@1.11.1-alpha.0
  - @mastra/core@1.82.0-alpha.1
  - @mastra/code-sdk@1.18.0-alpha.1
## @mastra/core@1.82.0-alpha.1

### Minor Changes

- Added time to first token and time to first chunk measures to trace
and span aggregates, so dashboards can chart streaming latency next to
duration. ([#29055](https://github.com/mastra-ai/mastra/pull/29055))

The new measures are `timeToFirstToken.avg`, `.min`, `.max`, `.p50`,
`.p90`, `.p95`, `.p99`, and `.count`, plus the same set for
`timeToFirstChunk`. Traces and spans without a recorded value are
skipped instead of counted as 0, and `.count` reports how many had one.
Stores opt in through the `aggregate-time-to-first-measures` feature.

### Patch Changes

- Fixed durable agents (`durable: true`) ending the `model_generation`
trace span without `responseId` and `responseModel`. Durable runs now
record the provider's response id and model on the span, the same as
non-durable agents, so a trace can be linked back to the provider's own
response log. Fixes #29053.
([#29180](https://github.com/mastra-ai/mastra/pull/29180))

- Fixed metadata filters in the in-memory store returning records whose
nested metadata had different keys from the filter when one side
contained an `undefined` value.
([#29101](https://github.com/mastra-ai/mastra/pull/29101))

- Fixed directly resumed nested workflows in the evented engine so they
continue suspended parent runs.
([#25979](https://github.com/mastra-ai/mastra/pull/25979))
## @mastra/playground-ui@68.0.0-alpha.1

### Minor Changes

- Toolbar and filter bar controls now share one look: the same paddings,
icon gaps, chevron and spacing between controls.
([#28818](https://github.com/mastra-ai/mastra/pull/28818))

**Time range.** A filter bar's time range is now the
`DateTimeRangePicker` itself, so it looks and behaves the same on every
page: a calendar icon, the range and a chevron, with no separate "Time"
label. Pass `defaultPreset` to show a × that resets a custom range; it
replaces the chevron while a custom range is applied.

Added `FilterBar.TimeRange` with `FILTER_BAR_TIME_RANGE_FIELD`,
`FILTER_BAR_TIME_RANGE_ITEM` and `FILTER_BAR_TIME_RANGE_FIELD_ID`. They
replace `TraceTimeRangeChip` and the `TRACE_TIME_RANGE_*` names from
`domains/traces/components/trace-time-range-chip`, which are removed.

  ```tsx
  import {
    FilterBar,
    FILTER_BAR_TIME_RANGE_FIELD,
    FILTER_BAR_TIME_RANGE_FIELD_ID,
    FILTER_BAR_TIME_RANGE_ITEM,
  } from '@mastra/playground-ui/components/FilterBar';

  <FilterBar
    fields={[FILTER_BAR_TIME_RANGE_FIELD, ...fields]}
    operators={operators}
    value={[FILTER_BAR_TIME_RANGE_ITEM, ...items]}
// The time range item is synthetic: keep it out of the stored filters.
onValueChange={next => setItems(next.filter(item => item.fieldId !==
FILTER_BAR_TIME_RANGE_FIELD_ID))}
  >
    <FilterBar.Chips
      renderChip={item =>
        item.fieldId === FILTER_BAR_TIME_RANGE_FIELD_ID ? (
          <FilterBar.TimeRange
            preset={preset}
// A preset, including the × reset, drops the applied custom dates.
            onPresetChange={next => {
              setPreset(next);
              if (next !== 'custom') setRange({});
            }}
            dateFrom={range.from}
            dateTo={range.to}
            onDateRangeChange={(from, to) => setRange({ from, to })}
            defaultPreset="last-7d"
          />
        ) : (
          <FilterBar.Chip item={item} />
        )
      }
    />
    <FilterBar.Input />
  </FilterBar>;
  ```

`DateTimeRangePicker` gains `size`, `defaultPreset` and `ref` (the
trigger button).

  **Migrating removed APIs.**

- `TraceTimeRangeChip` → `FilterBar.TimeRange` (same props), and
`TRACE_TIME_RANGE_FIELD` / `_ITEM` / `_FIELD_ID` →
`FILTER_BAR_TIME_RANGE_FIELD` / `_ITEM` / `_FIELD_ID`, imported from
`@mastra/playground-ui/components/FilterBar`.

    ```tsx
    // Before
import { TraceTimeRangeChip, TRACE_TIME_RANGE_FIELD_ID } from
'@mastra/playground-ui/domains/traces/components/trace-time-range-chip';
item.fieldId === TRACE_TIME_RANGE_FIELD_ID ? <TraceTimeRangeChip
preset={preset} onPresetChange={setPreset} /> : …

    // After
import { FilterBar, FILTER_BAR_TIME_RANGE_FIELD_ID } from
'@mastra/playground-ui/components/FilterBar';
item.fieldId === FILTER_BAR_TIME_RANGE_FIELD_ID ? <FilterBar.TimeRange
preset={preset} onPresetChange={setPreset} /> : …
    ```

- `DateTimeRangePicker`'s `renderTrigger` → remove it: the trigger is
always the shared calendar button. Pass `size` for another rung and
`ref` to reach the trigger.
- `comboboxStyles.chevron` on a hand-built trigger → `<ButtonChevron
size={size} />` from `@mastra/playground-ui/components/Button`.

  **Other controls.**

- Added `ClearFiltersButton`, a round reset icon button with a tooltip,
used for every toolbar's "clear filters".
- Added `TriggerChevron` and `ButtonChevron`, the one chevron every
dropdown trigger (`Select`, `Combobox`, the date picker) shows.
  - `ComboboxTrigger` uses that chevron instead of the up-down one.
- Icons in every interactive control (buttons, fields, search inputs,
filter chips, menu and command rows) follow one rule: muted at rest,
brighter on hover. Two new theme tokens, `--control-icon-rest` and
`--control-icon-hover`, set those colours; menus retune them, and
icon-only controls always brighten. Search fields and combobox fields
now brighten their icons on hover like buttons do.
- Icons take their size from the control they sit in, as in a Button:
filter chips and search inputs no longer size their own icons.
- `ListSearch` defaults to the `sm` toolbar size, and `SearchInput`'s
icon sits at the same inset as a button's.
  - `ActionRow` and `FilterBar` space their controls 6px apart.

### Patch Changes

- Updated dependencies
[[`489d829`](489d8295c8),
[`0900c20`](0900c20592),
[`8751dd7`](8751dd7f56),
[`682e8f3`](682e8f3e44),
[`e1e64f0`](e1e64f072c),
[`0900c20`](0900c20592),
[`ebf8a9a`](ebf8a9a137)]:
  - @mastra/memory@1.41.0-alpha.1
  - @mastra/client-js@1.59.0-alpha.1
  - @mastra/core@1.82.0-alpha.1
  - @mastra/ai-sdk@1.11.3
  - @mastra/react@1.14.1-alpha.1
## @mastra/server@1.82.0-alpha.1

### Minor Changes

- Added the `aggregateTimeToFirstMeasures` observability capability.
Trace and span aggregate requests for `timeToFirstToken.*` or
`timeToFirstChunk.*` measures now return `501` against stores that can't
compute them, and field discovery omits those measures for such stores.
([#29055](https://github.com/mastra-ai/mastra/pull/29055))

  ```typescript
const { capabilities } = await
mastraClient.getObservabilityCapabilities();

if (capabilities.traceAggregate &&
capabilities.aggregateTimeToFirstMeasures) {
    const { rows } = await mastraClient.aggregateTraces({
timeRange: { from: '2026-08-01T00:00:00.000Z', to:
'2026-08-02T00:00:00.000Z' },
      groupBy: ['entityName'],
      measures: ['timeToFirstChunk.p95', 'timeToFirstChunk.count'],
    });
  }
  ```

### Patch Changes

- Updated dependencies
[[`8751dd7`](8751dd7f56),
[`682e8f3`](682e8f3e44),
[`0900c20`](0900c20592),
[`ebf8a9a`](ebf8a9a137)]:
  - @mastra/core@1.82.0-alpha.1
## @mastra/clickhouse@1.29.0-alpha.0

### Minor Changes

- Added support for `timeToFirstToken.*` and `timeToFirstChunk.*`
measures in trace and span aggregates. Rows without a recorded value are
skipped, never counted as 0.
([#29055](https://github.com/mastra-ai/mastra/pull/29055))

  ```typescript
  import { planSpanAggregate } from '@mastra/core/storage';

  const observability = await storage.getStore('observability');

if
(observability?.getFeatures().includes('aggregate-time-to-first-measures'))
{
    const { rows } = await observability.aggregateSpans(
      planSpanAggregate({
timeRange: { from: '2026-08-01T00:00:00.000Z', to:
'2026-08-02T00:00:00.000Z' },
where: { op: 'eq', left: { path: 'spanType' }, right: { literal:
'model_inference' } },
        measures: ['timeToFirstToken.p50', 'timeToFirstToken.p95'],
      }),
    );
  }
  ```

### Patch Changes

- Updated dependencies
[[`8751dd7`](8751dd7f56),
[`682e8f3`](682e8f3e44),
[`0900c20`](0900c20592),
[`ebf8a9a`](ebf8a9a137)]:
  - @mastra/core@1.82.0-alpha.1
## @mastra/duckdb@1.18.0-alpha.0

### Minor Changes

- Added support for `timeToFirstToken.*` and `timeToFirstChunk.*`
measures in trace and span aggregates. Rows without a recorded value are
skipped, never counted as 0.
([#29055](https://github.com/mastra-ai/mastra/pull/29055))

  ```typescript
  import { planSpanAggregate } from '@mastra/core/storage';

  const observability = await storage.getStore('observability');

if
(observability?.getFeatures().includes('aggregate-time-to-first-measures'))
{
    const { rows } = await observability.aggregateSpans(
      planSpanAggregate({
timeRange: { from: '2026-08-01T00:00:00.000Z', to:
'2026-08-02T00:00:00.000Z' },
where: { op: 'eq', left: { path: 'spanType' }, right: { literal:
'model_inference' } },
        measures: ['timeToFirstToken.p50', 'timeToFirstToken.p95'],
      }),
    );
  }
  ```

### Patch Changes

- Updated dependencies
[[`8751dd7`](8751dd7f56),
[`682e8f3`](682e8f3e44),
[`0900c20`](0900c20592),
[`ebf8a9a`](ebf8a9a137)]:
  - @mastra/core@1.82.0-alpha.1
## @mastra/pg@1.35.0-alpha.1

### Minor Changes

- Added support for `timeToFirstToken.*` and `timeToFirstChunk.*`
measures in trace and span aggregates. Rows without a recorded value are
skipped, never counted as 0.
([#29055](https://github.com/mastra-ai/mastra/pull/29055))

  ```typescript
  import { planSpanAggregate } from '@mastra/core/storage';

  const observability = await storage.getStore('observability');

if
(observability?.getFeatures().includes('aggregate-time-to-first-measures'))
{
    const { rows } = await observability.aggregateSpans(
      planSpanAggregate({
timeRange: { from: '2026-08-01T00:00:00.000Z', to:
'2026-08-02T00:00:00.000Z' },
where: { op: 'eq', left: { path: 'spanType' }, right: { literal:
'model_inference' } },
        measures: ['timeToFirstToken.p50', 'timeToFirstToken.p95'],
      }),
    );
  }
  ```

### Patch Changes

- Updated dependencies
[[`8751dd7`](8751dd7f56),
[`682e8f3`](682e8f3e44),
[`0900c20`](0900c20592),
[`ebf8a9a`](ebf8a9a137)]:
  - @mastra/core@1.82.0-alpha.1
## @mastra/react@1.14.1-alpha.1

### Patch Changes

- Updated dependencies
[[`0900c20`](0900c20592),
[`8751dd7`](8751dd7f56),
[`682e8f3`](682e8f3e44),
[`0900c20`](0900c20592),
[`ebf8a9a`](ebf8a9a137)]:
  - @mastra/client-js@1.59.0-alpha.1
  - @mastra/core@1.82.0-alpha.1
## @mastra/deployer-cloud@1.82.0-alpha.1

### Patch Changes

- Updated dependencies
[[`8751dd7`](8751dd7f56),
[`682e8f3`](682e8f3e44),
[`0900c20`](0900c20592),
[`ebf8a9a`](ebf8a9a137)]:
  - @mastra/core@1.82.0-alpha.1
  - @mastra/deployer@1.82.0-alpha.1
## @mastra/longmemeval@1.1.41-alpha.1

### Patch Changes

- Updated dependencies
[[`489d829`](489d8295c8),
[`8751dd7`](8751dd7f56),
[`682e8f3`](682e8f3e44),
[`e1e64f0`](e1e64f072c),
[`0900c20`](0900c20592),
[`ebf8a9a`](ebf8a9a137)]:
  - @mastra/memory@1.41.0-alpha.1
  - @mastra/core@1.82.0-alpha.1
  - @mastra/libsql@1.29.0-alpha.0
## @mastra/opencode@0.1.41-alpha.1

### Patch Changes

- Updated dependencies
[[`489d829`](489d8295c8),
[`8751dd7`](8751dd7f56),
[`682e8f3`](682e8f3e44),
[`e1e64f0`](e1e64f072c),
[`0900c20`](0900c20592),
[`ebf8a9a`](ebf8a9a137)]:
  - @mastra/memory@1.41.0-alpha.1
  - @mastra/core@1.82.0-alpha.1
  - @mastra/libsql@1.29.0-alpha.0
## create-factory@0.4.2-alpha.1

### Patch Changes

- Updated dependencies:
  - mastra@1.38.0-alpha.1
## @mastra/code-sdk@1.18.0-alpha.1

### Patch Changes

- Updated dependencies
[[`489d829`](489d8295c8),
[`0900c20`](0900c20592),
[`8751dd7`](8751dd7f56),
[`682e8f3`](682e8f3e44),
[`0900c20`](0900c20592),
[`e1e64f0`](e1e64f072c),
[`0900c20`](0900c20592),
[`ebf8a9a`](ebf8a9a137)]:
  - @mastra/memory@1.41.0-alpha.1
  - @mastra/client-js@1.59.0-alpha.1
  - @mastra/core@1.82.0-alpha.1
  - @mastra/pg@1.35.0-alpha.1
  - @mastra/duckdb@1.18.0-alpha.0
  - @mastra/libsql@1.29.0-alpha.0
## mastracode@0.49.0-alpha.1

### Patch Changes

- Updated dependencies
[[`489d829`](489d8295c8),
[`8751dd7`](8751dd7f56),
[`682e8f3`](682e8f3e44),
[`0900c20`](0900c20592),
[`e1e64f0`](e1e64f072c),
[`0900c20`](0900c20592),
[`ebf8a9a`](ebf8a9a137)]:
  - @mastra/memory@1.41.0-alpha.1
  - @mastra/core@1.82.0-alpha.1
  - @mastra/pg@1.35.0-alpha.1
  - @mastra/duckdb@1.18.0-alpha.0
  - @mastra/code-sdk@1.18.0-alpha.1
  - @mastra/libsql@1.29.0-alpha.0
## @mastra/sentry@1.2.31-alpha.1

### Patch Changes

- dependencies updates:
([#29123](https://github.com/mastra-ai/mastra/pull/29123))
- Updated dependency [`@sentry/node@^11.10.0`
↗︎](https://www.npmjs.com/package/@sentry/node/v/11.10.0) (from
`^10.76.2`, in `dependencies`)
- Updated dependencies
[[`8751dd7`](8751dd7f56),
[`682e8f3`](682e8f3e44),
[`0900c20`](0900c20592),
[`ebf8a9a`](ebf8a9a137)]:
  - @mastra/core@1.82.0-alpha.1
## @mastra/agent-builder@1.1.33-alpha.1

### Patch Changes

- Updated dependencies
[[`489d829`](489d8295c8),
[`8751dd7`](8751dd7f56),
[`682e8f3`](682e8f3e44),
[`e1e64f0`](e1e64f072c),
[`0900c20`](0900c20592),
[`ebf8a9a`](ebf8a9a137)]:
  - @mastra/memory@1.41.0-alpha.1
  - @mastra/core@1.82.0-alpha.1
## mastra@1.38.0-alpha.1

### Patch Changes

- Updated dependencies
[[`8751dd7`](8751dd7f56),
[`682e8f3`](682e8f3e44),
[`0900c20`](0900c20592),
[`ebf8a9a`](ebf8a9a137)]:
  - @mastra/core@1.82.0-alpha.1
  - @mastra/deployer@1.82.0-alpha.1
## @mastra/deployer@1.82.0-alpha.1

### Patch Changes

- Updated dependencies
[[`0900c20`](0900c20592),
[`8751dd7`](8751dd7f56),
[`682e8f3`](682e8f3e44),
[`0900c20`](0900c20592),
[`ebf8a9a`](ebf8a9a137)]:
  - @mastra/server@1.82.0-alpha.1
  - @mastra/core@1.82.0-alpha.1
## @mastra/editor@0.16.7-alpha.1

### Patch Changes

- Updated dependencies
[[`489d829`](489d8295c8),
[`8751dd7`](8751dd7f56),
[`682e8f3`](682e8f3e44),
[`e1e64f0`](e1e64f072c),
[`0900c20`](0900c20592),
[`ebf8a9a`](ebf8a9a137)]:
  - @mastra/memory@1.41.0-alpha.1
  - @mastra/core@1.82.0-alpha.1
## @mastra/mcp-docs-server@1.3.12-alpha.2

### Patch Changes

- Updated dependencies
[[`8751dd7`](8751dd7f56),
[`682e8f3`](682e8f3e44),
[`0900c20`](0900c20592),
[`ebf8a9a`](ebf8a9a137)]:
  - @mastra/core@1.82.0-alpha.1
## @mastra/memory@1.41.0-alpha.1

### Patch Changes

- dependencies updates:
([#29124](https://github.com/mastra-ai/mastra/pull/29124))
- Updated dependency [`diff@^9.0.0`
↗︎](https://www.npmjs.com/package/diff/v/9.0.0) (from `^8.0.4`, in
`dependencies`)

- Observational Memory now tells the Observer who sent each user signal.
In a thread shared by several people, messages sent with
`agent.sendMessage({ contents, attributes: { name: 'Alice' } }, ...)`
are labeled `User (name="Alice")` when observed, so observations can say
who said what instead of attributing everything to "User". Messages
without attributes keep the plain `User` label.
([#29176](https://github.com/mastra-ai/mastra/pull/29176))

- Updated dependencies
[[`8751dd7`](8751dd7f56),
[`682e8f3`](682e8f3e44),
[`0900c20`](0900c20592),
[`ebf8a9a`](ebf8a9a137)]:
  - @mastra/core@1.82.0-alpha.1
## @mastra/google-cloud-pubsub@1.1.7-alpha.0

### Patch Changes

- dependencies updates:
([#29113](https://github.com/mastra-ai/mastra/pull/29113))
- Updated dependency [`@google-cloud/pubsub@^6.3.1`
↗︎](https://www.npmjs.com/package/@google-cloud/pubsub/v/6.3.1) (from
`^5.3.1`, in `dependencies`)
- Updated dependencies
[[`8751dd7`](8751dd7f56),
[`682e8f3`](682e8f3e44),
[`0900c20`](0900c20592),
[`ebf8a9a`](ebf8a9a137)]:
  - @mastra/core@1.82.0-alpha.1
## @mastra/elysia@0.1.22-alpha.1

### Patch Changes

- Updated dependencies
[[`0900c20`](0900c20592),
[`8751dd7`](8751dd7f56),
[`682e8f3`](682e8f3e44),
[`0900c20`](0900c20592),
[`ebf8a9a`](ebf8a9a137)]:
  - @mastra/server@1.82.0-alpha.1
  - @mastra/core@1.82.0-alpha.1
## @mastra/express@1.5.26-alpha.1

### Patch Changes

- Updated dependencies
[[`0900c20`](0900c20592),
[`8751dd7`](8751dd7f56),
[`682e8f3`](682e8f3e44),
[`0900c20`](0900c20592),
[`ebf8a9a`](ebf8a9a137)]:
  - @mastra/server@1.82.0-alpha.1
  - @mastra/core@1.82.0-alpha.1
## @mastra/fastify@1.5.26-alpha.1

### Patch Changes

- Updated dependencies
[[`0900c20`](0900c20592),
[`8751dd7`](8751dd7f56),
[`682e8f3`](682e8f3e44),
[`0900c20`](0900c20592),
[`ebf8a9a`](ebf8a9a137)]:
  - @mastra/server@1.82.0-alpha.1
  - @mastra/core@1.82.0-alpha.1
## @mastra/hono@1.7.24-alpha.1

### Patch Changes

- Updated dependencies
[[`0900c20`](0900c20592),
[`8751dd7`](8751dd7f56),
[`682e8f3`](682e8f3e44),
[`0900c20`](0900c20592),
[`ebf8a9a`](ebf8a9a137)]:
  - @mastra/server@1.82.0-alpha.1
  - @mastra/core@1.82.0-alpha.1
## @mastra/koa@1.7.26-alpha.1

### Patch Changes

- Updated dependencies
[[`0900c20`](0900c20592),
[`8751dd7`](8751dd7f56),
[`682e8f3`](682e8f3e44),
[`0900c20`](0900c20592),
[`ebf8a9a`](ebf8a9a137)]:
  - @mastra/server@1.82.0-alpha.1
  - @mastra/core@1.82.0-alpha.1
## @mastra/nestjs@0.2.41-alpha.1

### Patch Changes

- Updated dependencies
[[`0900c20`](0900c20592),
[`8751dd7`](8751dd7f56),
[`682e8f3`](682e8f3e44),
[`0900c20`](0900c20592),
[`ebf8a9a`](ebf8a9a137)]:
  - @mastra/server@1.82.0-alpha.1
  - @mastra/core@1.82.0-alpha.1
## @mastra/next@0.2.40-alpha.1

### Patch Changes

- Updated dependencies
[[`0900c20`](0900c20592),
[`8751dd7`](8751dd7f56),
[`682e8f3`](682e8f3e44),
[`0900c20`](0900c20592),
[`ebf8a9a`](ebf8a9a137)]:
  - @mastra/server@1.82.0-alpha.1
  - @mastra/core@1.82.0-alpha.1
  - @mastra/hono@1.7.24-alpha.1
## @mastra/tanstack-start@0.2.40-alpha.1

### Patch Changes

- Updated dependencies
[[`0900c20`](0900c20592),
[`8751dd7`](8751dd7f56),
[`682e8f3`](682e8f3e44),
[`0900c20`](0900c20592),
[`ebf8a9a`](ebf8a9a137)]:
  - @mastra/server@1.82.0-alpha.1
  - @mastra/core@1.82.0-alpha.1
  - @mastra/hono@1.7.24-alpha.1
## @mastra/mysql@0.16.0-alpha.1

### Patch Changes

- Fixed experiment result writes putting plaintext back over a purged
dataset item. When a purge committed while a result was being written,
the writer could miss the purge marker and overwrite the redacted input,
output, ground truth, error and metadata.
([#29106](https://github.com/mastra-ai/mastra/pull/29106))

- Updated dependencies
[[`8751dd7`](8751dd7f56),
[`682e8f3`](682e8f3e44),
[`0900c20`](0900c20592),
[`ebf8a9a`](ebf8a9a137)]:
  - @mastra/core@1.82.0-alpha.1
## @mastra/inngest@1.11.1-alpha.0

### Patch Changes

- Fixed `InngestRun.watch()` crashing the process with an unhandled
rejection when the Inngest realtime subscription fails to connect (for
example `fetch failed` or a WebSocket error). The failure is now logged
as a warning and the run still completes through polling. Unwatching now
also closes the realtime connection instead of leaving it open.
([#29103](https://github.com/mastra-ai/mastra/pull/29103))

- Fixed Inngest durable agents ending the `model_generation` trace span
without `responseId` and `responseModel`. The span now carries the
provider's response id and model, the same as non-durable agents. Fixes
#29053. ([#29180](https://github.com/mastra-ai/mastra/pull/29180))

- Updated dependencies
[[`8751dd7`](8751dd7f56),
[`682e8f3`](682e8f3e44),
[`0900c20`](0900c20592),
[`ebf8a9a`](ebf8a9a137)]:
  - @mastra/core@1.82.0-alpha.1
## @mastra/temporal@0.5.0-alpha.1

### Patch Changes

- Updated dependencies
[[`8751dd7`](8751dd7f56),
[`682e8f3`](682e8f3e44),
[`0900c20`](0900c20592),
[`ebf8a9a`](ebf8a9a137)]:
  - @mastra/core@1.82.0-alpha.1
  - @mastra/deployer@1.82.0-alpha.1
## @mastra/e2b@0.16.1-alpha.0

### Patch Changes

- dependencies updates:
([#27993](https://github.com/mastra-ai/mastra/pull/27993))
- Updated dependency [`e2b@^2.62.0`
↗︎](https://www.npmjs.com/package/e2b/v/2.62.0) (from `^2.61.0`, in
`dependencies`)
- Updated dependencies
[[`8751dd7`](8751dd7f56),
[`682e8f3`](682e8f3e44),
[`0900c20`](0900c20592),
[`ebf8a9a`](ebf8a9a137)]:
  - @mastra/core@1.82.0-alpha.1
## @mastra/e2b-desktop@0.1.12-alpha.0

### Patch Changes

- dependencies updates:
([#27993](https://github.com/mastra-ai/mastra/pull/27993))
- Updated dependency [`e2b@^2.62.0`
↗︎](https://www.npmjs.com/package/e2b/v/2.62.0) (from `^2.61.0`, in
`dependencies`)
- Updated dependencies
[[`5735a50`](5735a50c6c),
[`8751dd7`](8751dd7f56),
[`682e8f3`](682e8f3e44),
[`0900c20`](0900c20592),
[`ebf8a9a`](ebf8a9a137)]:
  - @mastra/e2b@0.16.1-alpha.0
  - @mastra/core@1.82.0-alpha.1
## @mastra/platform-workspace@1.11.1-alpha.0

### Patch Changes

- dependencies updates:
([#27993](https://github.com/mastra-ai/mastra/pull/27993))
- Updated dependency [`e2b@^2.62.0`
↗︎](https://www.npmjs.com/package/e2b/v/2.62.0) (from `^2.61.0`, in
`dependencies`)
- Updated dependencies
[[`8751dd7`](8751dd7f56),
[`682e8f3`](682e8f3e44),
[`0900c20`](0900c20592),
[`ebf8a9a`](ebf8a9a137)]:
  - @mastra/core@1.82.0-alpha.1
## create-mastra@1.38.0-alpha.1


## @internal/playground@1.38.0-alpha.1

### Patch Changes

- Updated dependencies
[[`0900c20`](0900c20592),
[`8751dd7`](8751dd7f56),
[`682e8f3`](682e8f3e44),
[`3314289`](33142896c1),
[`0900c20`](0900c20592),
[`ebf8a9a`](ebf8a9a137)]:
  - @mastra/client-js@1.59.0-alpha.1
  - @mastra/core@1.82.0-alpha.1
  - @mastra/playground-ui@68.0.0-alpha.1
  - @mastra/react@1.14.1-alpha.1

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-11-02 16:03:13 +01:00
dane-ai-mastra[bot]
eed9cc214e chore: version packages 2026-11-01 04:20:58 +00:00
dane-ai-mastra[bot]
77076a1012 chore: version - exit prerelease mode 2026-10-30 23:02:25 +00:00
dane-ai-mastra[bot]
582ef17a2b
chore: version packages (alpha) (#28888)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-30 14:56:53 -07:00
Arthur Fiorette
e57fc08fd8
fix(core,agent-builder): ship every file referenced by package exports (#29056) 2026-10-30 14:35:14 -07:00
shreyas-mastra
655b19993f
chore(security): Vanta 2026-10-30 - zod ^4.6.7, @hono/node-server 2.1.5 (direct bumps) (#28983)
## Vanta 2026-10-30 security fixes (consolidated)

Direct dependency bumps and lockfile updates only. **No
overrides/resolutions added or raised.** The earlier override-based
edits on this branch were reverted; those findings are deferred below.

| Package | From → To | Advisory | Where |
|---|---|---|---|
| zod | ^3.25.76 → ^4.6.7 | zod <4.6.6 (High; no fixed 3.x) |
`client-sdks/react` (dev), `deployers/cloudflare` (dev),
`server-adapters/nestjs` (dev), `packages/editor` (dev),
`packages/playground-ui` (dep), `packages/playground`,
`workflows/_test-utils`, `examples/{durable-agents,inngest}`,
`explorations/longmemeval`,
`observability/_examples/otel-bridge/agent-hub`, e2e fixtures/templates
(`experiment-worker/fixtures/*`, `deployers/template/cloudflare`,
`no-bundling/template`, agent-builder `minimal-mastra-project`) + root
`pnpm-lock.yaml` |
| @hono/node-server | 1.19.x / 2.1.1 → 2.1.5 | CVE-2026-118663 /
GHSA-rmxm-3fg6-px4f (Medium) | direct deps: `examples/agent-builder`,
`otel-bridge/hono-multi/service-{one,two,mastra}`,
`templates/template-customer-refund-agent/client-demo-ui`,
`templates/template-kyc-customer-onboarding`,
`templates/template-security-incident-triage` |

Peer ranges (`^3.25.0 || ^4.0.0`) are unchanged, so consumers are
unaffected. Changeset: patch for `@mastra/playground-ui` (runtime zod
dep).

Supersedes the zod parts of #28075 (that PR also raises a pnpm override
and rewrites the `zod-v3` compat aliases to v4, so it is left as-is for
maintainers).

### Deferred (needs override, upstream release, or is intentional)
- zod v3 compat aliases (`zod-v3` in `packages/core`,
`packages/schema-compat`, `e2e-tests/type-check/template`;
`e2e-tests/client-js/zod-v3`): intentional zod 3 test coverage; no fixed
3.x release. Needs a decision to drop/dismiss.
- zod 3.25.76 transitive via `@arcadeai/arcadejs`, `@mcp-ui/client`,
firecrawl, `agent-browser`, `zod-to-json-schema`, MCP SDK paths:
upstream pins; override-only.
- @hono/node-server 1.19.x transitive via `@modelcontextprotocol/sdk`
(root, `examples/agent`, `packages/mcp/integration-tests`), and npm
lockfiles of `scripts/gh-issue-triage` (existing override, left alone)
and the two templates: override-only.
- graphql-scalars, raw-body, jose (templates/scripts): override-only.
- @azure/msal-node <7.1.0: 6.0.1 via `@azure/identity@4.14.0` (fixed in
4.14.1, blocked by the 1-day `minimumReleaseAge`; lockfile refresh
tomorrow), 5.6.0 via `@microsoft/teams.apps` (no fixed release).
- @opentelemetry/core <2.8.0: via `@google-cloud/pubsub@5` (fix needs
pubsub 6 major).
- @ai-sdk/provider-utils 2.2.8 / ai 4.x: pinned vendored AI SDK v4 line;
no fixed release in that major.
- extract-zip, deepmerge: no patched version.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## ELI5

This PR updates Zod and `@hono/node-server` versions in selected
packages, examples, and templates to address security advisories. It
also updates playground form code to work with Zod 4.

## Changes

- Updates selected `zod` dependencies to `^4.6.7`.
- Updates selected `@hono/node-server` dependencies to `2.1.5`.
- Updates the playground form’s IP address and record validators for Zod
4.
- Maps a specific Zod validation error to the message `Required`.
- Adds a patch changeset for `@mastra/playground-ui`.

## Validation

Test results are not provided in the supplied change summary.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: shreyas-mastra <327047572+shreyas-mastra@users.noreply.github.com>
2026-10-30 15:30:35 -04:00
dane-ai-mastra[bot]
4f12792ed1
chore: version packages (alpha) (#28722)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-29 08:37:01 -07:00
Dane - AI (Mastra)
f6cd11f348
chore(deps): lock file maintenance (#28672)
This PR contains the following updates:

| Update | Change |
|---|---|
| lockFileMaintenance | All locks refreshed |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/9505) for more information.

🔧 This Pull Request updates lock files to use the latest dependency
versions.

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - "before 6am on wednesday"
- 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:eyJjcmVhdGVkSW5WZXIiOiI0NC4xOTAuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjE5MC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWF0aW9uIl19-->

---------

Co-authored-by: mastra-platform[bot] <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-10-29 10:02:15 +00:00
Dane - AI (Mastra)
07c1bf2362
chore(deps): update dependency @ai-sdk/provider-utils@>=3.0.0 <3.0.38 to v3.0.42 (#28773) 2026-10-28 18:08:16 -07:00
Dane - AI (Mastra)
f2ad3844f3
chore(deps): update opentelemetry (#28581)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: mastra-platform[bot] <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-10-28 16:48:54 -07:00
shreyas-mastra
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`.
2026-10-28 18:51:27 -04:00
Dane - AI (Mastra)
29747ebd1d
chore(deps): update better-auth monorepo to v1.7.13 (#28538)
This PR contains the following updates:

| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
|
[@better-auth/drizzle-adapter@<1.7.7](https://www.better-auth.com/docs/adapters/drizzle)
([source](https://redirect.github.com/better-auth/better-auth/tree/HEAD/packages/drizzle-adapter))
| pnpm-workspace.overrides | patch | [`1.7.7` →
`1.7.13`](https://renovatebot.com/diffs/npm/@better-auth%2fdrizzle-adapter@<1.7.7/1.7.7/1.7.13)
| `1.7.14` |
| [better-auth](https://better-auth.com)
([source](https://redirect.github.com/better-auth/better-auth/tree/HEAD/packages/better-auth))
| pnpm-workspace.overrides | patch | [`^1.7.7` →
`^1.7.13`](https://renovatebot.com/diffs/npm/better-auth/1.7.7/1.7.13) |
`1.7.14` |
| [better-auth](https://better-auth.com)
([source](https://redirect.github.com/better-auth/better-auth/tree/HEAD/packages/better-auth))
| dependencies | patch | [`^1.7.12` →
`^1.7.13`](https://renovatebot.com/diffs/npm/better-auth/1.7.12/1.7.13)
| `1.7.14` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/9505) for more information.

---

### Release Notes

<details>
<summary>better-auth/better-auth
(@&#8203;better-auth/drizzle-adapter@<1.7.7)</summary>

###
[`v1.7.13`](https://redirect.github.com/better-auth/better-auth/blob/HEAD/packages/drizzle-adapter/CHANGELOG.md#1713)

[Compare
Source](https://redirect.github.com/better-auth/better-auth/compare/v1.7.12...v1.7.13)

###
[`v1.7.12`](https://redirect.github.com/better-auth/better-auth/blob/HEAD/packages/drizzle-adapter/CHANGELOG.md#1712)

[Compare
Source](https://redirect.github.com/better-auth/better-auth/compare/v1.7.11...v1.7.12)

###
[`v1.7.11`](https://redirect.github.com/better-auth/better-auth/blob/HEAD/packages/drizzle-adapter/CHANGELOG.md#1711)

[Compare
Source](https://redirect.github.com/better-auth/better-auth/compare/v1.7.10...v1.7.11)

###
[`v1.7.10`](https://redirect.github.com/better-auth/better-auth/blob/HEAD/packages/drizzle-adapter/CHANGELOG.md#1710)

[Compare
Source](https://redirect.github.com/better-auth/better-auth/compare/v1.7.9...v1.7.10)

###
[`v1.7.9`](https://redirect.github.com/better-auth/better-auth/blob/HEAD/packages/drizzle-adapter/CHANGELOG.md#179)

[Compare
Source](https://redirect.github.com/better-auth/better-auth/compare/v1.7.8...v1.7.9)

###
[`v1.7.8`](https://redirect.github.com/better-auth/better-auth/blob/HEAD/packages/drizzle-adapter/CHANGELOG.md#178)

[Compare
Source](https://redirect.github.com/better-auth/better-auth/compare/v1.7.7...v1.7.8)

##### Patch Changes

-
[#&#8203;11512](https://redirect.github.com/better-auth/better-auth/pull/11512)
[`4175b34`](4175b34a8f)
Thanks [@&#8203;bytaesu](https://redirect.github.com/bytaesu)! - Align
the installed `@better-auth/utils` version with `better-call` while
accepting `^0.4.2 || ^0.5.0` across official package peers.

-
[#&#8203;11731](https://redirect.github.com/better-auth/better-auth/pull/11731)
[`0cfe07d`](0cfe07dccd)
Thanks
[@&#8203;gustavovalverde](https://redirect.github.com/gustavovalverde)!
- Drizzle schemas that store dates in string columns now work:
`timestamp({ mode: "string" })`, MySQL `datetime({ mode: "string" })`,
and SQLite `text()`, including on Cloudflare D1. Before, the adapter
passed a JavaScript `Date` to those columns. Drivers such as
postgres-js, better-sqlite3 and D1 rejected it, so email sign-up, social
sign-in and session refresh failed. Filtering on those columns, for
example when listing sessions, failed the same way. Better Auth now
writes these dates as UTC text and reads a value without a time zone as
UTC.

If your server's time zone is not UTC and you use node-postgres or
mysql2 with a string column that has no time zone, existing rows were
written in the server's local time. They now read back shifted by the
server's UTC offset, so sessions and verification codes created before
the upgrade can expire early or late. Schemas generated by the CLI use
date columns and are unaffected.

</details>

<details>
<summary>better-auth/better-auth (better-auth)</summary>

###
[`v1.7.13`](https://redirect.github.com/better-auth/better-auth/blob/HEAD/packages/better-auth/CHANGELOG.md#1713)

[Compare
Source](https://redirect.github.com/better-auth/better-auth/compare/v1.7.12...v1.7.13)

##### Patch Changes

-
[#&#8203;11985](https://redirect.github.com/better-auth/better-auth/pull/11985)
[`9cb95fe`](9cb95fe3d0)
Thanks [@&#8203;bytaesu](https://redirect.github.com/bytaesu)! - Type
declarations no longer list type-only exports as values, so importing
one as a value now fails type checking instead of failing at runtime.

- Updated dependencies
\[[`2712441`](2712441e35),
[`1cf4b2c`](1cf4b2c8f5)]:
-
[@&#8203;better-auth/core](https://redirect.github.com/better-auth/core)@1.7.13
-
[@&#8203;better-auth/drizzle-adapter](https://redirect.github.com/better-auth/drizzle-adapter)@1.7.13
-
[@&#8203;better-auth/kysely-adapter](https://redirect.github.com/better-auth/kysely-adapter)@1.7.13
-
[@&#8203;better-auth/memory-adapter](https://redirect.github.com/better-auth/memory-adapter)@1.7.13
-
[@&#8203;better-auth/mongo-adapter](https://redirect.github.com/better-auth/mongo-adapter)@1.7.13
-
[@&#8203;better-auth/prisma-adapter](https://redirect.github.com/better-auth/prisma-adapter)@1.7.13
-
[@&#8203;better-auth/telemetry](https://redirect.github.com/better-auth/telemetry)@1.7.13

###
[`v1.7.12`](https://redirect.github.com/better-auth/better-auth/blob/HEAD/packages/better-auth/CHANGELOG.md#1712)

[Compare
Source](https://redirect.github.com/better-auth/better-auth/compare/v1.7.11...v1.7.12)

##### Patch Changes

-
[#&#8203;11925](https://redirect.github.com/better-auth/better-auth/pull/11925)
[`fb48619`](fb48619083)
Thanks [@&#8203;bytaesu](https://redirect.github.com/bytaesu)! - The JWT
plugin now verifies JWTs and session cookie-cache JWTs with the
algorithm of the stored key instead of the one named in the token
header, and logs a warning when it signs or verifies a JWT without an
issuer or audience.

-
[#&#8203;11924](https://redirect.github.com/better-auth/better-auth/pull/11924)
[`681aa5c`](681aa5c443)
Thanks [@&#8203;bytaesu](https://redirect.github.com/bytaesu)! -
`auth.api.getSession()` now keeps the original database error as
`error.cause` when the session lookup fails, so server code can tell a
transient failure from a bug.

-
[#&#8203;11930](https://redirect.github.com/better-auth/better-auth/pull/11930)
[`b18e3b8`](b18e3b8fdf)
Thanks [@&#8203;bytaesu](https://redirect.github.com/bytaesu)! - OAuth
callbacks completed through the OAuth proxy now run the same checks as
the standard OAuth callback, including issuer and ID token nonce
validation.

- Updated dependencies
\[[`681aa5c`](681aa5c443),
[`4bc78ba`](4bc78baa83),
[`876608d`](876608da86),
[`083a743`](083a74329b),
[`492134a`](492134aeba)]:
-
[@&#8203;better-auth/core](https://redirect.github.com/better-auth/core)@1.7.12
-
[@&#8203;better-auth/drizzle-adapter](https://redirect.github.com/better-auth/drizzle-adapter)@1.7.12
-
[@&#8203;better-auth/kysely-adapter](https://redirect.github.com/better-auth/kysely-adapter)@1.7.12
-
[@&#8203;better-auth/memory-adapter](https://redirect.github.com/better-auth/memory-adapter)@1.7.12
-
[@&#8203;better-auth/mongo-adapter](https://redirect.github.com/better-auth/mongo-adapter)@1.7.12
-
[@&#8203;better-auth/prisma-adapter](https://redirect.github.com/better-auth/prisma-adapter)@1.7.12
-
[@&#8203;better-auth/telemetry](https://redirect.github.com/better-auth/telemetry)@1.7.12

###
[`v1.7.11`](https://redirect.github.com/better-auth/better-auth/blob/HEAD/packages/better-auth/CHANGELOG.md#1711)

[Compare
Source](https://redirect.github.com/better-auth/better-auth/compare/v1.7.10...v1.7.11)

##### Patch Changes

-
[#&#8203;10719](https://redirect.github.com/better-auth/better-auth/pull/10719)
[`bd65db0`](bd65db02c1)
Thanks [@&#8203;rendermani](https://redirect.github.com/rendermani)! -
Recognize PostgreSQL `int8` as a valid number type in migration diffs.
Kysely's introspector reports `pg_type.typname`, so Better Auth's own
`bigint` columns (such as the database-backed rate limiter's
`lastRequest`) came back as `int8` and were reported as a type mismatch
on every run.

-
[#&#8203;11521](https://redirect.github.com/better-auth/better-auth/pull/11521)
[`37a75c9`](37a75c95d1)
Thanks [@&#8203;aryan1306](https://redirect.github.com/aryan1306)! - Fix
database-backed rate limiting returning an excessively large
`X-Retry-After` header instead of the remaining seconds in the
rate-limit window.

- Updated dependencies
\[[`ce96569`](ce965696d1),
[`2f6ca3f`](2f6ca3f370),
[`dfd8dd2`](dfd8dd287a)]:
-
[@&#8203;better-auth/core](https://redirect.github.com/better-auth/core)@1.7.11
-
[@&#8203;better-auth/drizzle-adapter](https://redirect.github.com/better-auth/drizzle-adapter)@1.7.11
-
[@&#8203;better-auth/kysely-adapter](https://redirect.github.com/better-auth/kysely-adapter)@1.7.11
-
[@&#8203;better-auth/memory-adapter](https://redirect.github.com/better-auth/memory-adapter)@1.7.11
-
[@&#8203;better-auth/mongo-adapter](https://redirect.github.com/better-auth/mongo-adapter)@1.7.11
-
[@&#8203;better-auth/prisma-adapter](https://redirect.github.com/better-auth/prisma-adapter)@1.7.11
-
[@&#8203;better-auth/telemetry](https://redirect.github.com/better-auth/telemetry)@1.7.11

###
[`v1.7.10`](https://redirect.github.com/better-auth/better-auth/blob/HEAD/packages/better-auth/CHANGELOG.md#1710)

[Compare
Source](https://redirect.github.com/better-auth/better-auth/compare/v1.7.9...v1.7.10)

##### Patch Changes

-
[#&#8203;11393](https://redirect.github.com/better-auth/better-auth/pull/11393)
[`eebd47a`](eebd47a0e7)
Thanks [@&#8203;breken-ai](https://redirect.github.com/breken-ai)! - If
you use the `lastLoginMethod` plugin with `oneTap`, signing in through
Google One Tap now records `"google"`, the same value as signing in with
the Google button. Before, a One Tap sign-in recorded nothing: the
`better-auth.last_used_login_method` cookie kept its previous value or
stayed unset, and so did `user.lastLoginMethod` with `storeInDatabase`.

If your `customResolveMethod` includes a `/one-tap/callback` →
`"google"` workaround, remove that mapping; keep the resolver if it
handles other routes.

-
[#&#8203;11821](https://redirect.github.com/better-auth/better-auth/pull/11821)
[`09d07e6`](09d07e6fea)
Thanks
[@&#8203;gustavovalverde](https://redirect.github.com/gustavovalverde)!
- The Google One Tap prompt (`authClient.oneTap()` without `button`) no
longer calls `getSkippedReason()`, which Google's FedCM migration guide
says to remove. Before, it called it under any `promptOptions.fedCM`
setting.

A skipped prompt now ends the flow and calls `onPromptNotification`
right away instead of retrying. Google doesn't report why a prompt was
skipped, and a prompt the user closed stays hidden for Google's cooldown
period, so the retries could not bring it back. Dismissed prompts still
retry as before.

Google Identity Services still logs its FedCM migration warning, because
it does so whenever `prompt()` receives a listener. The plugin needs the
listener to track dismissals and skips, so the warning is expected and
safe to ignore.

-
[#&#8203;11819](https://redirect.github.com/better-auth/better-auth/pull/11819)
[`eaecb72`](eaecb7229e)
Thanks
[@&#8203;gustavovalverde](https://redirect.github.com/gustavovalverde)!
- Google One Tap now applies your
`socialProviders.google.mapProfileToUser` and custom `getUserInfo`, the
same as the standard Google sign-in. Before, One Tap ignored both and
always stored the token's `name`, `email`, `email_verified`, and
`picture` claims.

If you configured either one, users created through One Tap now get the
fields it returns, including any extra fields such as a first name from
`given_name`. Returning users are updated from it on each One Tap
sign-in when `socialProviders.google.overrideUserInfoOnSignIn` is on,
and so are existing users that One Tap links when
`account.accountLinking.updateUserInfoOnLink` is on. Check that your
mapper suits One Tap users too.

If you set `socialProviders.google.overrideUserInfoOnSignIn`, One Tap
sign-ins now update returning users' name, image, and email from Google,
as the redirect sign-in already does.

Setups that configure none of these, including `oneTap({ clientId })`
with no Google provider, are unaffected.

-
[#&#8203;11820](https://redirect.github.com/better-auth/better-auth/pull/11820)
[`88c9a37`](88c9a37856)
Thanks
[@&#8203;gustavovalverde](https://redirect.github.com/gustavovalverde)!
- If you set `autoSelect` or `cancelOnTapOutside` on `oneTapClient()`,
the One Tap prompt and the Sign in with Google button now use them.
Before, only values passed to `authClient.oneTap()` took effect, so with
`autoSelect: true` on the plugin, returning users still had to pick an
account. Values passed to `oneTap()` still override the plugin's. Apps
that set these options only on `oneTap()`, or not at all, are
unaffected.

-
[#&#8203;11696](https://redirect.github.com/better-auth/better-auth/pull/11696)
[`0cf1f7c`](0cf1f7c6bc)
Thanks [@&#8203;drewsephski](https://redirect.github.com/drewsephski)! -
You can now import the One Tap plugin from
`better-auth/plugins/one-tap`, as you can for other plugins. Previously
this import failed with a "not exported" error. Imports from
`better-auth/plugins` and `better-auth/client/plugins` are unchanged.

-
[#&#8203;11822](https://redirect.github.com/better-auth/better-auth/pull/11822)
[`414e845`](414e845f12)
Thanks
[@&#8203;gustavovalverde](https://redirect.github.com/gustavovalverde)!
- You can now import the Captcha and OpenAPI plugins from
`better-auth/plugins/captcha` and `better-auth/plugins/open-api`, as you
can for other plugins. Previously these imports failed with a "not
exported" error. Imports from `better-auth/plugins` are unchanged.

If your TypeScript config uses `"moduleResolution": "node"` (or
`node10`), `better-auth/plugins/multi-session` and `better-auth/test`
now resolve their types. Previously TypeScript reported that it could
not find their declarations. Projects using `bundler`, `node16`, or
`nodenext` resolution are unaffected.

- Updated dependencies
\[[`fedd055`](fedd05586c),
[`bbd0a19`](bbd0a19c30),
[`99cdfe7`](99cdfe7c2e)]:
-
[@&#8203;better-auth/core](https://redirect.github.com/better-auth/core)@1.7.10
-
[@&#8203;better-auth/mongo-adapter](https://redirect.github.com/better-auth/mongo-adapter)@1.7.10
-
[@&#8203;better-auth/drizzle-adapter](https://redirect.github.com/better-auth/drizzle-adapter)@1.7.10
-
[@&#8203;better-auth/kysely-adapter](https://redirect.github.com/better-auth/kysely-adapter)@1.7.10
-
[@&#8203;better-auth/memory-adapter](https://redirect.github.com/better-auth/memory-adapter)@1.7.10
-
[@&#8203;better-auth/prisma-adapter](https://redirect.github.com/better-auth/prisma-adapter)@1.7.10
-
[@&#8203;better-auth/telemetry](https://redirect.github.com/better-auth/telemetry)@1.7.10

###
[`v1.7.9`](https://redirect.github.com/better-auth/better-auth/blob/HEAD/packages/better-auth/CHANGELOG.md#179)

[Compare
Source](https://redirect.github.com/better-auth/better-auth/compare/v1.7.8...v1.7.9)

##### Patch Changes

-
[#&#8203;11766](https://redirect.github.com/better-auth/better-auth/pull/11766)
[`6edaa61`](6edaa61e62)
Thanks [@&#8203;bytaesu](https://redirect.github.com/bytaesu)! - An
`onAPIError.onError` handler that throws or rejects no longer fails the
request or causes an unhandled promise rejection. The error is logged
and the original error response is returned. Async handlers now finish
before the response is sent.

- Updated dependencies \[]:
-
[@&#8203;better-auth/core](https://redirect.github.com/better-auth/core)@1.7.9
-
[@&#8203;better-auth/drizzle-adapter](https://redirect.github.com/better-auth/drizzle-adapter)@1.7.9
-
[@&#8203;better-auth/kysely-adapter](https://redirect.github.com/better-auth/kysely-adapter)@1.7.9
-
[@&#8203;better-auth/memory-adapter](https://redirect.github.com/better-auth/memory-adapter)@1.7.9
-
[@&#8203;better-auth/mongo-adapter](https://redirect.github.com/better-auth/mongo-adapter)@1.7.9
-
[@&#8203;better-auth/prisma-adapter](https://redirect.github.com/better-auth/prisma-adapter)@1.7.9
-
[@&#8203;better-auth/telemetry](https://redirect.github.com/better-auth/telemetry)@1.7.9

###
[`v1.7.8`](https://redirect.github.com/better-auth/better-auth/blob/HEAD/packages/better-auth/CHANGELOG.md#178)

[Compare
Source](https://redirect.github.com/better-auth/better-auth/compare/v1.7.7...v1.7.8)

##### Patch Changes

-
[#&#8203;11512](https://redirect.github.com/better-auth/better-auth/pull/11512)
[`4175b34`](4175b34a8f)
Thanks [@&#8203;bytaesu](https://redirect.github.com/bytaesu)! - Align
the installed `@better-auth/utils` version with `better-call` while
accepting `^0.4.2 || ^0.5.0` across official package peers.

-
[#&#8203;11565](https://redirect.github.com/better-auth/better-auth/pull/11565)
[`b1cfc1e`](b1cfc1ec1e)
Thanks [@&#8203;bytaesu](https://redirect.github.com/bytaesu)! - Omit
non-returned custom fields from inferred output schema types.

-
[#&#8203;11540](https://redirect.github.com/better-auth/better-auth/pull/11540)
[`678c555`](678c555beb)
Thanks [@&#8203;bytaesu](https://redirect.github.com/bytaesu)! - Align
cookie security attributes with RFC 6265bis.

-
[#&#8203;10591](https://redirect.github.com/better-auth/better-auth/pull/10591)
[`193efff`](193efff3d2)
Thanks [@&#8203;kdelay](https://redirect.github.com/kdelay)! - Expired
or revoked sessions now clear stale cookies when using `customSession`.

-
[#&#8203;11625](https://redirect.github.com/better-auth/better-auth/pull/11625)
[`369176e`](369176e7f6)
Thanks
[@&#8203;gustavovalverde](https://redirect.github.com/gustavovalverde)!
- Fixed single-use checks for apps that set
`advanced.database.generateId: "uuid"`. Default id generation is
unaffected, and no migration is needed.

- On SQLite and MySQL, SAML sign-in, DPoP-bound requests checked against
the database replay store, `private_key_jwt` client authentication, and
magic link or email OTP sign-ins that adopt an unverified account failed
with a `NOT NULL` error on the `id` column. They now work. SIWE sign-in
ignored the `email` field and used the wallet-derived address; it now
uses the supplied email when no other account has it.
- On Postgres and MongoDB, a reused SAML assertion, DPoP proof, or
client assertion was accepted. Each one is now accepted only once.

With `generateId: "serial"`, behavior is unchanged: these checks need
string ids, and Better Auth now logs a warning the first time one of
these flows runs.

-
[#&#8203;11391](https://redirect.github.com/better-auth/better-auth/pull/11391)
[`352d04c`](352d04c8eb)
Thanks [@&#8203;breken-ai](https://redirect.github.com/breken-ai)! - Fix
`customSession` treating session lookup failures as signed-out users.
Server-side `getSession` now throws an API error, and HTTP clients
receive an error response.

-
[#&#8203;11750](https://redirect.github.com/better-auth/better-auth/pull/11750)
[`e9d9921`](e9d9921217)
Thanks
[@&#8203;gustavovalverde](https://redirect.github.com/gustavovalverde)!
- Generic OAuth providers configured with `discoveryUrl` now recover
without a restart when discovery fails at startup. Since 1.7.3, a
provider whose discovery request failed at boot (for example, because
the identity provider was still starting) was skipped, and every sign-in
returned `PROVIDER_NOT_FOUND` until the app restarted. Better Auth now
retries discovery on the next sign-in, callback, or account-linking
request for that provider, and the provider works as soon as discovery
succeeds. While discovery keeps failing, sign-in and account linking
still return `PROVIDER_NOT_FOUND` and callbacks redirect with
`error=oauth_provider_not_found`, and each request may wait up to 10
seconds for the retry.

-
[#&#8203;11549](https://redirect.github.com/better-auth/better-auth/pull/11549)
[`1bd5c37`](1bd5c37884)
Thanks [@&#8203;bytaesu](https://redirect.github.com/bytaesu)! - Fix
`lastLoginMethod` failing sign-in when `cookieName` or `maxAge` is
explicitly `undefined`.

-
[#&#8203;11174](https://redirect.github.com/better-auth/better-auth/pull/11174)
[`766cfb3`](766cfb3f42)
Thanks [@&#8203;Bekacru](https://redirect.github.com/Bekacru)! - Stop
double-decoding `callbackURL`, `newUserCallbackURL` and
`errorCallbackURL` on magic link verify so percent-encoded characters in
callback query params are preserved.

-
[#&#8203;11505](https://redirect.github.com/better-auth/better-auth/pull/11505)
[`c46992f`](c46992f6ce)
Thanks [@&#8203;bytaesu](https://redirect.github.com/bytaesu)! -
Preserve the referenced model and field keys when generating Kysely
migrations, so custom table names that match another model key produce
the intended foreign keys.

-
[#&#8203;11718](https://redirect.github.com/better-auth/better-auth/pull/11718)
[`1d95ebf`](1d95ebf3fe)
Thanks [@&#8203;bytaesu](https://redirect.github.com/bytaesu)! - Fix
missing device sessions and failed automatic session switching after
cache eviction when `storeSessionInDatabase` is enabled and
`preserveSessionInDatabase` is disabled. Automatic switching now follows
the order of held sessions, and large lists or sessions whose users no
longer exist no longer cause valid sessions to disappear.

-
[#&#8203;10266](https://redirect.github.com/better-auth/better-auth/pull/10266)
[`c68b2cd`](c68b2cd8a5)
Thanks [@&#8203;shiminshen](https://redirect.github.com/shiminshen)! -
Projects that enable `exactOptionalPropertyTypes` can use the
`oauthProvider()` and `mcp()` plugins again. Since 1.7.0, adding either
plugin to `betterAuth()` failed to type-check with a TS2322 error.

-
[#&#8203;11637](https://redirect.github.com/better-auth/better-auth/pull/11637)
[`2627237`](2627237fae)
Thanks
[@&#8203;gustavovalverde](https://redirect.github.com/gustavovalverde)!
- Projects using the organization plugin with `skipLibCheck: false` no
longer get `TS2536: Type '"role"' cannot be used to index type ...` from
`crud-members.d.mts`. The `role` returned by `getActiveMemberRole` is
now typed as the organization's role names directly. Projects with
`skipLibCheck: true` (the default in most templates) were unaffected.

-
[#&#8203;10866](https://redirect.github.com/better-auth/better-auth/pull/10866)
[`3d1f008`](3d1f008ae3)
Thanks [@&#8203;heliohm](https://redirect.github.com/heliohm)! - The
organization plugin no longer pulls every zod locale into server
bundles.

-
[#&#8203;11626](https://redirect.github.com/better-auth/better-auth/pull/11626)
[`67743ed`](67743ed6e8)
Thanks
[@&#8203;gustavovalverde](https://redirect.github.com/gustavovalverde)!
- Password resets and password changes no longer keep the new password
when revoking the user's sessions fails. With
`revokeSessionsOnPasswordReset` or `revokeOtherSessions`, database
sessions are revoked and the password is saved in one transaction when
transactions are enabled for the adapter, so a failure leaves the old
password and sessions in place. Sessions in secondary storage are still
removed after commit, on a best-effort basis. This covers
`/reset-password`, the email OTP and phone number reset endpoints, and
`/change-password`. `onPasswordReset` now runs after sessions are
revoked, so a throwing callback no longer leaves them active, and a
callback that lists the user's sessions no longer sees the revoked ones.

-
[#&#8203;10698](https://redirect.github.com/better-auth/better-auth/pull/10698)
[`f0ce580`](f0ce580fbd)
Thanks
[@&#8203;jashkarangiya](https://redirect.github.com/jashkarangiya)! - If
you set the phone number plugin's `verifyOTP` option,
`/phone-number/reset-password` now checks the code with it, as
`/phone-number/verify` already does. Before, password reset always
compared the code with the one Better Auth generated, so apps that
verify codes through a provider such as Twilio Verify could not reset
passwords. If your `sendPasswordResetOTP` sends the code Better Auth
generates, make sure `verifyOTP` accepts that code. Apps that don't set
`verifyOTP` are unaffected.

-
[#&#8203;11646](https://redirect.github.com/better-auth/better-auth/pull/11646)
[`07a0938`](07a09389ef)
Thanks
[@&#8203;gustavovalverde](https://redirect.github.com/gustavovalverde)!
- A failed password reset no longer spends the reset link or OTP.
`/reset-password`, `/email-otp/reset-password` and
`/phone-number/reset-password` now check the token or code without
consuming it, validate and hash the new password, then consume it in the
same transaction as the session revocation and password write. A
rejected password, such as one refused by `haveIBeenPwned`, always
leaves the link or OTP usable. A later failure, such as a failed session
revocation or password write, also leaves it usable when the adapter's
transactions are enabled and verification values are stored in the
database (the default without secondary storage, or
`verification.storeInDatabase: true`). Wrong codes still count against
the OTP attempt limit.

-
[#&#8203;11643](https://redirect.github.com/better-auth/better-auth/pull/11643)
[`92dfcea`](92dfceaa14)
Thanks
[@&#8203;gustavovalverde](https://redirect.github.com/gustavovalverde)!
- A sign-up that fails after its session is created no longer leaves
that session in secondary storage. With `storeSessionInDatabase` enabled
and `preserveSessionInDatabase` off, the secondary-storage copy is
written only after the sign-up commits, and listing a user's sessions
now reads the database, so a session whose cached copy failed to write
is still listed and revoked. With other secondary-storage settings,
sign-up, passkey registration and SSO sign-in with `resolveUser` keep
the session write inside their transaction, so a storage failure rolls
back the new user, passkey or account instead of keeping them without a
session. A session revoked by a `session.create.after` database hook
also stays revoked.

-
[#&#8203;11488](https://redirect.github.com/better-auth/better-auth/pull/11488)
[`e15625f`](e15625ff38)
Thanks [@&#8203;Bekacru](https://redirect.github.com/Bekacru)! -
SvelteKit 3 projects can now install Better Auth without
`--legacy-peer-deps`. The `@sveltejs/kit` peer range now includes
`^3.0.0`; SvelteKit 2 projects are unaffected.

- Updated dependencies
\[[`4175b34`](4175b34a8f),
[`435645e`](435645e5eb),
[`369176e`](369176e7f6),
[`0cfe07d`](0cfe07dccd),
[`9904b29`](9904b29ece),
[`e78f15a`](e78f15aa31),
[`60525e0`](60525e08fd),
[`8133265`](813326536c),
[`ea85d13`](ea85d133d6),
[`916ef5c`](916ef5c530),
[`1d95ebf`](1d95ebf3fe),
[`6214610`](62146108c7),
[`67743ed`](67743ed6e8),
[`c46d2a6`](c46d2a6ac4),
[`92dfcea`](92dfceaa14),
[`a9f455d`](a9f455d586),
[`9725f1b`](9725f1b361)]:
-
[@&#8203;better-auth/core](https://redirect.github.com/better-auth/core)@1.7.8
-
[@&#8203;better-auth/drizzle-adapter](https://redirect.github.com/better-auth/drizzle-adapter)@1.7.8
-
[@&#8203;better-auth/kysely-adapter](https://redirect.github.com/better-auth/kysely-adapter)@1.7.8
-
[@&#8203;better-auth/memory-adapter](https://redirect.github.com/better-auth/memory-adapter)@1.7.8
-
[@&#8203;better-auth/mongo-adapter](https://redirect.github.com/better-auth/mongo-adapter)@1.7.8
-
[@&#8203;better-auth/prisma-adapter](https://redirect.github.com/better-auth/prisma-adapter)@1.7.8
-
[@&#8203;better-auth/telemetry](https://redirect.github.com/better-auth/telemetry)@1.7.8

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - "before 6am every weekday"
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiI0NC4xODYuNCIsInVwZGF0ZWRJblZlciI6IjQ0LjE5Mi4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWF0aW9uIl19-->

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-28 19:24:36 +00:00
dane-ai-mastra[bot]
6a191d46dc chore: version - exit prerelease mode 2026-10-28 13:15:52 +00:00
Damien Schneider
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 -->
2026-10-28 12:30:27 +01:00
Dane - AI (Mastra)
6fd9efb91f
chore(deps): update build tools to ^4.1.12 (#28673)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [vitest](https://vitest.dev)
([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/vitest))
| devDependencies | patch | [`^4.1.11` →
`^4.1.12`](https://renovatebot.com/diffs/npm/vitest/4.1.12/4.1.12) |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/9505) for more information.

---

### 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.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiI0NC4xOTAuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjE5MC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWF0aW9uIl19-->
2026-10-27 23:21:28 -07:00
Dane - AI (Mastra)
cd03e1cd44
chore(deps): update schema to ^4.6.7 [security] (#27936) 2026-10-27 22:44:19 +01:00
Dane - AI (Mastra)
cf170f8a11
chore(deps): update schema to v4 [security] (#28355)
> [!NOTE]
> This PR body was truncated due to platform limits.

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [zod](https://zod.dev)
([source](https://redirect.github.com/colinhacks/zod)) | dependencies |
major | [`^3.25.76` →
`^4.0.0`](https://renovatebot.com/diffs/npm/zod/3.25.76/4.6.6) |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/9505) for more information.

---

### Zod can exhaust memory while validating oversized constrained
collections
[CVE-2023-54404](https://nvd.nist.gov/vuln/detail/CVE-2023-54404) /
[GHSA-mrhx-c7xc-m3w5](https://redirect.github.com/advisories/GHSA-mrhx-c7xc-m3w5)

<details>
<summary>More information</summary>

#### Details
Zod schema-validation library through 4.6.5 contains an uncontrolled
resource consumption vulnerability that allows attackers to exhaust
memory by submitting a large array to an application using an array
schema without a length constraint. Attackers can exploit the
handleArrayResult parse logic in $ZodArray, which accumulates every
validation issue for each failing element with no cap or early
termination, causing the process to allocate excessive issue objects and
crash due to out-of-memory conditions.

#### Severity
- CVSS Score: 8.2 / 10 (High)
- Vector String:
`CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N`

#### References
-
[https://nvd.nist.gov/vuln/detail/CVE-2023-54404](https://nvd.nist.gov/vuln/detail/CVE-2023-54404)
-
[https://github.com/colinhacks/zod/issues/1872](https://redirect.github.com/colinhacks/zod/issues/1872)
-
[https://github.com/colinhacks/zod/pull/6475](https://redirect.github.com/colinhacks/zod/pull/6475)
-
[https://www.vulncheck.com/advisories/zod-uncontrolled-resource-consumption-via-array-validation](https://www.vulncheck.com/advisories/zod-uncontrolled-resource-consumption-via-array-validation)
-
[https://github.com/colinhacks/zod/pull/6652](https://redirect.github.com/colinhacks/zod/pull/6652)
-
[a0ebf970f2)
-
[https://github.com/advisories/GHSA-mrhx-c7xc-m3w5](https://redirect.github.com/advisories/GHSA-mrhx-c7xc-m3w5)

This data is provided by the [GitHub Advisory
Database](https://redirect.github.com/advisories/GHSA-mrhx-c7xc-m3w5)
([CC-BY
4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>

---

### Zod can exhaust memory while validating oversized constrained
collections
[CVE-2023-54404](https://nvd.nist.gov/vuln/detail/CVE-2023-54404) /
[GHSA-mrhx-c7xc-m3w5](https://redirect.github.com/advisories/GHSA-mrhx-c7xc-m3w5)

<details>
<summary>More information</summary>

#### Details
Zod schema-validation library through 4.6.5 contains an uncontrolled
resource consumption vulnerability that allows attackers to exhaust
memory by submitting a large array to an application using an array
schema without a length constraint. Attackers can exploit the
handleArrayResult parse logic in $ZodArray, which accumulates every
validation issue for each failing element with no cap or early
termination, causing the process to allocate excessive issue objects and
crash due to out-of-memory conditions.

#### Severity
- CVSS Score: 8.2 / 10 (High)
- Vector String:
`CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N`

#### References
-
[https://nvd.nist.gov/vuln/detail/CVE-2023-54404](https://nvd.nist.gov/vuln/detail/CVE-2023-54404)
-
[https://github.com/colinhacks/zod/issues/1872](https://redirect.github.com/colinhacks/zod/issues/1872)
-
[https://github.com/colinhacks/zod/pull/6475](https://redirect.github.com/colinhacks/zod/pull/6475)
-
[https://github.com/colinhacks/zod/pull/6652](https://redirect.github.com/colinhacks/zod/pull/6652)
-
[a0ebf970f2)
-
[https://github.com/colinhacks/zod](https://redirect.github.com/colinhacks/zod)
-
[https://www.vulncheck.com/advisories/zod-uncontrolled-resource-consumption-via-array-validation](https://www.vulncheck.com/advisories/zod-uncontrolled-resource-consumption-via-array-validation)

This data is provided by
[OSV](https://osv.dev/vulnerability/GHSA-mrhx-c7xc-m3w5) and the [GitHub
Advisory Database](https://redirect.github.com/github/advisory-database)
([CC-BY
4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>

---

### Release Notes

<details>
<summary>colinhacks/zod (zod)</summary>

###
[`v4.6.6`](https://redirect.github.com/colinhacks/zod/releases/tag/v4.6.6)

[Compare
Source](https://redirect.github.com/colinhacks/zod/compare/v4.6.5...v4.6.6)

> Six malicious commits pushed to `main` on September 21 with a
compromised git credential were reverted the same day in
[#&#8203;6620](https://redirect.github.com/colinhacks/zod/issues/6620)
and have since been removed from the history of `main`. None were ever
published to npm. The npm provenance for 4.6.6 names
[`284243f`](284243fb),
the pre-rewrite copy of
[`9c21983`](9c219833)
with identical contents.

#### Commits:

-
[`0cd3af5`](0cd3af5e9f)
docs: load the en locale directly in Zod Mini
-
[`9d5e60f`](9d5e60f162)
docs: import locales from zod/locales, not z.locales
-
[`34a626f`](34a626f307)
docs: tighten the z.locales tree-shaking note
-
[`74304ce`](74304ce5b5)
release: stage npm versions instead of publishing them
([#&#8203;6622](https://redirect.github.com/colinhacks/zod/issues/6622))
-
[`b2ef983`](b2ef983e07)
docs: add Code for Japan to bronze sponsors
-
[`8fb2faf`](8fb2faf058)
docs: crop the Code for Japan logo and list it first in bronze
-
[`bacad51`](bacad518c4)
docs: square the Code for Japan logo to match the other bronze tiles
-
[`c42596b`](c42596bd1c)
release: hold the run on the release-approval environment until the
staged versions are approved
([#&#8203;6638](https://redirect.github.com/colinhacks/zod/issues/6638))
-
[`a2ba4a6`](a2ba4a6798)
fix(types): declare record output and input as members, not base type
arguments
([#&#8203;6645](https://redirect.github.com/colinhacks/zod/issues/6645))
-
[`a0ebf97`](a0ebf970f2)
fix(v4): check array, set and map size bounds before parsing elements
([#&#8203;6652](https://redirect.github.com/colinhacks/zod/issues/6652))
-
[`529f78d`](529f78dd94)
4.6.6
-
[`9c21983`](9c219833c3)
ci: stage at verbose so a failed OIDC token exchange says why

###
[`v4.6.5`](https://redirect.github.com/colinhacks/zod/releases/tag/v4.6.5)

[Compare
Source](https://redirect.github.com/colinhacks/zod/compare/v4.6.4...v4.6.5)

#### Commits:

-
[`d2b135c`](d2b135cfb7)
docs: add the 4.6.x patch highlights to the 4.6 post
-
[`f1448f7`](f1448f7cee)
docs: fold the 4.6.x patch highlights into the 4.6 post's own sections
-
[`de65a5c`](de65a5cb39)
docs: lead the properties section with the check and add a Zod Mini tab
([#&#8203;6598](https://redirect.github.com/colinhacks/zod/issues/6598))
-
[`56222cd`](56222cd153)
feat(instanceof): key the .properties() shape off the instance type
([#&#8203;6600](https://redirect.github.com/colinhacks/zod/issues/6600))
-
[`ca0229a`](ca0229a404)
Revert "feat: add z.currencyCode() over a vendored ISO 4217 list,
refreshed weekly by CI
([#&#8203;6595](https://redirect.github.com/colinhacks/zod/issues/6595))"
-
[`cc4cd4e`](cc4cd4ee9c)
Revert "Revert "feat: add z.currencyCode() over a vendored ISO 4217
list, refreshed weekly by CI
([#&#8203;6595](https://redirect.github.com/colinhacks/zod/issues/6595))""
-
[`0f3f5ee`](0f3f5ee3ca)
4.6.5
-
[`59bbc03`](59bbc03e10)
chore: re-pin the integration peers to the workspace zod after the 4.6.5
bump

###
[`v4.6.4`](https://redirect.github.com/colinhacks/zod/releases/tag/v4.6.4)

[Compare
Source](https://redirect.github.com/colinhacks/zod/compare/v4.6.3...v4.6.4)

A patch on top of
[4.6.3](https://redirect.github.com/colinhacks/zod/releases/tag/v4.6.3).

-
[`d6bc1e30`](d6bc1e30)
feat: add `z.currencyCode()` over a vendored ISO 4217 list, refreshed
weekly by CI
([#&#8203;6595](https://redirect.github.com/colinhacks/zod/pull/6595))
-
[`ad32d751`](ad32d751)
perf: `z.url()` rejects an invalid URL with `URL.canParse()` instead of
a throwing constructor, about 50x faster; fewer allocations on the
validation path
([#&#8203;6588](https://redirect.github.com/colinhacks/zod/pull/6588))
-
[`2bb08717`](2bb08717)
chore: re-pin the integration peers to the workspace zod after the 4.6.4
bump
-
[`f6e1701a`](f6e1701a)
chore(deps): bump next to 15.5.25 and vite to 7.3.6
([#&#8203;6153](https://redirect.github.com/colinhacks/zod/pull/6153))

###
[`v4.6.3`](https://redirect.github.com/colinhacks/zod/releases/tag/v4.6.3)

[Compare
Source](https://redirect.github.com/colinhacks/zod/compare/v4.6.2...v4.6.3)

A patch on top of
[4.6.2](https://redirect.github.com/colinhacks/zod/releases/tag/v4.6.2).

-
[`413cce9a`](413cce9a)
fix(v4): make z.properties() a check again
([#&#8203;6594](https://redirect.github.com/colinhacks/zod/pull/6594)) —
removes the standalone `z.properties()` schema from 4.6.0;
`z.instanceof().properties()` and `.check(...z.properties())` are
unchanged
-
[`75d63ee1`](75d63ee1)
docs: show only the `.properties()` method form in the 4.6 post
-
[`46da9572`](46da9572)
docs: match the error-message examples to what the parsers emit

###
[`v4.6.2`](https://redirect.github.com/colinhacks/zod/releases/tag/v4.6.2)

[Compare
Source](https://redirect.github.com/colinhacks/zod/compare/v4.6.1...v4.6.2)

A patch on top of
[4.6.1](https://redirect.github.com/colinhacks/zod/releases/tag/v4.6.1).

-
[`9446b5cc`](9446b5cc)
fix: preserve undefined prefault outputs and object keys
([#&#8203;6587](https://redirect.github.com/colinhacks/zod/pull/6587)) —
closes
[#&#8203;6585](https://redirect.github.com/colinhacks/zod/issues/6585)
-
[`0c483c58`](0c483c58)
docs: the [Zod 4.6 announcement post](https://zod.dev/blog/zod-4-6)
([#&#8203;6546](https://redirect.github.com/colinhacks/zod/pull/6546))
-
[`a00c3f34`](a00c3f34)
docs: use Trigger.dev's brand-kit lockups for the platinum card

###
[`v4.6.1`](https://redirect.github.com/colinhacks/zod/releases/tag/v4.6.1)

[Compare
Source](https://redirect.github.com/colinhacks/zod/compare/v4.6.0...v4.6.1)

A patch on top of
[4.6.0](https://redirect.github.com/colinhacks/zod/releases/tag/v4.6.0).

-
[`b12aa523`](b12aa523)
fix: preserve unique tags with defaulted discriminators
([#&#8203;6582](https://redirect.github.com/colinhacks/zod/pull/6582)) —
closes
[#&#8203;6577](https://redirect.github.com/colinhacks/zod/issues/6577)
-
[`dd9c36fa`](dd9c36fa)
fix(v4): defer recursive object index inference
([#&#8203;6580](https://redirect.github.com/colinhacks/zod/pull/6580))
-
[`3b154992`](3b154992)
feat(lang): add Tajik (`tg`) locale
([#&#8203;6581](https://redirect.github.com/colinhacks/zod/pull/6581))
by [@&#8203;ismoil77](https://redirect.github.com/ismoil77)
-
[`2efa8b80`](2efa8b80)
ci: give the npm wait a real budget and drop the back-publish path
([#&#8203;6583](https://redirect.github.com/colinhacks/zod/pull/6583))

###
[`v4.6.0`](https://redirect.github.com/colinhacks/zod/releases/tag/v4.6.0)

[Compare
Source](https://redirect.github.com/colinhacks/zod/compare/v4.5.4...v4.6.0)

Zod 4.6 is now available.

```sh
npm install zod@latest
```

At a glance:

- [`.validate()`](https://zod.dev/blog/zod-4-6#validate) — checks input
validity without building a result (up to 35x faster than
`.safeParse().success` on a compiled schema)
-
[`z.instanceof().properties()`](https://zod.dev/blog/zod-4-6#zproperties)
— validates properties of an instance
- [`fromJSONSchema()`](https://zod.dev/blog/zod-4-6#fromjsonschema) —
enforces six validation keywords it used to ignore
- [`z.iban()`](https://zod.dev/blog/zod-4-6#ziban) — electronic-format
IBAN plus mod-97 checksum
- [`z.withParser()`](https://zod.dev/blog/zod-4-6#zwithparser) —
installs a parser generated elsewhere, for environments without `new
Function`
- [Faster CommonJS](https://zod.dev/blog/zod-4-6#faster-commonjs) —
drops the getter on every export (\~3x faster `z.validate()` under
`require`)
- [Memory retention in recursive
schemas](https://zod.dev/blog/zod-4-6#memory-retention-in-recursive-schemas)
— releases the parsed input, fixing a 4.5 out-of-memory regression
- [`@zod/mini`](https://zod.dev/packages/mini) — Zod Mini as a
standalone package, versioned in lockstep with `zod` since 4.5

#### `.validate()`

Standalone boolean validation, in Zod, Zod Mini, and Zod Core. It
answers "is this input valid?" without constructing a `ZodError`, which
makes rejection cheap. The return type is a guard on the schema's input
type.

```ts
z.validate(z.string(), "hi"); // true
z.validate(z.string(), 42);   // false
```

It is a method on Zod Classic schemas too.
([#&#8203;6547](https://redirect.github.com/colinhacks/zod/pull/6547))

```ts
const Player = z.object({
  username: z.string(),
  xp: z.number(),
});

if (Player.validate(data)) {
  data.username; // narrowed
}
```

In conjunction with [`z.compile()`](https://zod.dev/compile), this can
be up to 35x faster than `.safeParse().success` on invalid input.

![Time per call on invalid input, schemas compiled with z.compile(),
safeParse().success as a gray bar with .validate() as a blue bar inside
it: a union of 3 objects 28 ns (34.9x faster), an array of 10 strings 23
ns (24.6x), a 3-element tuple 28 ns (16.1x), a 5-key object 21 ns
(16.3x), a discriminated union of 3 21 ns (15.7x), z.number() 19 ns
(13.8x), z.string() 19 ns (13.2x), z.boolean() 19 ns (13.7x); up to
34.9x
faster](https://raw.githubusercontent.com/colinhacks/zod/0c483c58849fdb6445aea4f54b1bac6b57ab3d22/packages/docs/public/blog/validate-compiled-invalid.svg)

*Time per call on invalid input, compiled with z.compile() — lower is
better
([benchmark](https://redirect.github.com/colinhacks/zod/blob/main/packages/bench/validate-vs-safeparse.ts))*

<details>
<summary><b>Uncompiled schemas</b></summary>

Without compilation it is up to 5.9x faster. The saving is the result
object: `.safeParse()` allocates one with an accessor pair on every
call, and `.validate()` allocates nothing.

![Time per call on invalid input, plain schemas, safeParse().success as
a gray bar with .validate() as a blue bar inside it: a union of 3
objects 659 ns (1.5x faster), an array of 10 strings 211 ns (2.3x), a
3-element tuple 166 ns (2.5x), a discriminated union of 3 93 ns (3.3x),
a 5-key object 75 ns (3.9x), z.number() 47 ns (5.3x), z.string() 42 ns
(5.8x), z.boolean() 42 ns (5.9x); up to 5.9x
faster](https://raw.githubusercontent.com/colinhacks/zod/0c483c58849fdb6445aea4f54b1bac6b57ab3d22/packages/docs/public/blog/validate-invalid.svg)

*Time per call on invalid input, plain schemas — lower is better
([benchmark](https://redirect.github.com/colinhacks/zod/blob/main/packages/bench/validate-vs-safeparse.ts))*

</details>

Both charts measure the failure path. The key feature of `.validate()`
is that it can *short-circuit* on the first issue it encounters, instead
of aggregating a full `ZodIssue[]` array.

> \[!NOTE]
> Async refinements are covered by `.validateAsync()`.

#### `z.properties()`

A new API for validating specific properties of an object. Unlike
`z.object()` it validates *in-place*, so it plays nice with class
instances.
([#&#8203;6536](https://redirect.github.com/colinhacks/zod/pull/6536))

```ts
const responseLike = z.properties({ status: z.number().min(200).max(299) });

responseLike.parse(new Response("ok", { status: 200 }));  // ✅ a real Response
responseLike.parse({ status: 204 });                      // ✅ a plain object
```

A corresponding `.properties()` method has been added to
`ZodInstanceOf`.

**Zod**

```ts
const okResponse = z.instanceof(Response).properties({
  ok: z.literal(true),
  status: z.number().min(200).max(299),
});
```

**Zod Mini**

```ts
const okResponse = z.instanceof(Response).check(...z.properties({
  ok: z.literal(true),
  status: z.number().check(z.minimum(200), z.maximum(299)),
}));
```

The input comes back untouched, so the prototype survives and the
methods still work. That is the part `z.object()` cannot do: it would
hand back a plain object and the `Response` would be gone.

```ts
const res = await fetch("/api/user");

okResponse.parse(res) === res; // ✅ true
```

#### `fromJSONSchema()`

Six additional JSON Schema keywords are now supported in
`z.fromJSONSchema()`.
([#&#8203;6535](https://redirect.github.com/colinhacks/zod/pull/6535))

-
[`minProperties`](https://json-schema.org/understanding-json-schema/reference/object#size)
/
[`maxProperties`](https://json-schema.org/understanding-json-schema/reference/object#size)
-
[`uniqueItems`](https://json-schema.org/understanding-json-schema/reference/array#uniqueItems)
-
[`contains`](https://json-schema.org/understanding-json-schema/reference/array#contains)
-
[`minContains`](https://json-schema.org/understanding-json-schema/reference/array#mincontains-maxcontains)
/
[`maxContains`](https://json-schema.org/understanding-json-schema/reference/array#mincontains-maxcontains)

```ts
const schema = z.fromJSONSchema({
  type: "object",
  minProperties: 2,      // also maxProperties
});

schema.parse({ a: 1 });        // ❌ too few properties
schema.parse({ a: 1, b: 2 });  // ✅
```

Both property bounds count the input's own keys. Array uniqueness is
structural, so `[{ a: 1 }, { a: 1 }]` is a duplicate.

```ts
z.fromJSONSchema({ type: "array", uniqueItems: true }).parse([{ a: 1 }, { a: 1 }]); // ❌

z.fromJSONSchema({
  type: "array",
  contains: { type: "number" },   // also minContains and maxContains
  minContains: 2,
}).parse(["a", 2]);               // ❌ only one number
```

#### `z.iban()`

A new string format: an IBAN in electronic format, with a valid ISO 7064
MOD 97-10 checksum.
([#&#8203;6571](https://redirect.github.com/colinhacks/zod/pull/6571))

```ts
z.iban().parse("DE89370400440532013000"); // ✅
z.iban().parse("DE89370400440532013001"); // ❌ bad checksum
```

#### `z.withParser()`

`z.compile()` builds its parser with `new Function`, which a strict
Content Security Policy blocks. `z.withParser()` is that installer on
its own: it takes a parser generated somewhere else, at build time or by
a native compiler, and installs it under the same contract.
([#&#8203;6575](https://redirect.github.com/colinhacks/zod/pull/6575))

```ts
const Player = z.object({ username: z.string(), xp: z.number() });

// isPlayer is a type guard your build step generated
const Fast = z.withParser(Player, (input) =>
  isPlayer(input) ? { username: input.username, xp: input.xp } : z.INVALID
);
```

The supplied parser owns the whole result, so it has to return what the
schema would have returned. This one rebuilds the object rather than
handing back its input, because `z.object()` strips unknown keys.
Returning `z.INVALID` hands the input to the runtime, which stays the
only source of `ZodError`s.

#### Faster CommonJS

TypeScript compiles a re-export to a getter, and 252 of the 255 exports
on Zod 4.5's CommonJS entrypoint were getters. V8 could not see a
constant callee behind one, so it could not inline the call. The 4.6
build emits plain properties and freezes the exports object. On a
compiled schema, `z.validate()` under `require` is about 3x faster than
it was in Zod 4.5.
([#&#8203;6564](https://redirect.github.com/colinhacks/zod/pull/6564))

```ts
const { z } = require("zod");
const CompiledPlayer = z.compile(Player);

z.validate(CompiledPlayer, data); // ~3x faster than Zod 4.5
```

Only calls through the namespace were affected. A method call like
`Player.safeParse(data)` never reads the exports object, and the ESM
build is unchanged.

#### Memory retention in recursive schemas

A recursive schema held the input and output of its last parse until the
next parse replaced it, so one long-lived schema pinned every object it
had touched. Zod 4.4 released that input and Zod 4.5 did not, which
surfaced as an out-of-memory failure on a repository-wide lint run. The
parse state is weak throughout now: one parse of a 29k-node tree retains
2.2 MB where it used to retain 10.1 MB, and recursive parses give up
about 6% for it.
([#&#8203;6572](https://redirect.github.com/colinhacks/zod/pull/6572))

```ts
const Category = z.object({
  name: z.string(),
  get children() {
    return z.array(Category);
  },
});
```

#### Bug fixes

##### ⚠️ Error maps run on the first read of `error`

Because `safeParse()` now builds its error lazily, error maps — global,
locale, and per-schema `error` — run when `result.error` is first read,
not at parse time. Code that swaps `z.config()` between the parse and
the read gets the newer configuration.
([#&#8203;6519](https://redirect.github.com/colinhacks/zod/pull/6519))

```ts
const result = schema.safeParse(12);
z.config(z.locales.fr());
result.error.issues[0].message; // French in 4.6, English in 4.5
```

An error map with a side effect never runs if nothing reads the error.
Throwing parses are unaffected — `.parse()` builds and throws its error
immediately, never takes the lazy path, and its stack still points at
your call site.

##### ⚠️ `z.emoji()` rejects component-only strings

Unicode's `Emoji_Component` property covers the pieces that attach to an
emoji, so `z.emoji()` accepted `"123"`, `"#"`, `"*"`, and a lone
zero-width joiner, variation selector, or skin tone modifier. The
pattern now requires at least one pictograph, regional indicator, or
keycap.
([#&#8203;6532](https://redirect.github.com/colinhacks/zod/pull/6532))

```ts
z.emoji().parse("😀");   // ✅
z.emoji().parse("1️⃣");   // ✅ the keycap is the anchor
z.emoji().parse("123");  // ❌ was accepted in 4.5
```

Flags, subdivision flags, skin-tone-modified emoji, and ZWJ sequences
are unchanged. Closes
[#&#8203;6515](https://redirect.github.com/colinhacks/zod/issues/6515).

##### ⚠️ Numeric enum options no longer include the reverse mappings

A numeric TypeScript enum also carries its reverse mapping (`0` to
`"UK"`) at runtime. The parser already ignored those keys, but
`.options` was read straight off the enum object, so a three-member enum
listed six values and three of them failed to parse.
([#&#8203;6542](https://redirect.github.com/colinhacks/zod/pull/6542))

```ts
enum Country { UK, Germany, France }

z.enum(Country).options; // 4.5: ["UK", "Germany", "France", 0, 1, 2] — 4.6: [0, 1, 2]
```

##### ⚠️ base64 patterns

The runtime patterns for `z.base64()` and `z.base64url()` are the
character sets, with length and padding enforced in code, so a
multi-megabyte string can no longer overflow the regex stack through a
composed schema. The JSON Schema output still emits the exact block
forms, so `z.toJSONSchema()` is unchanged.
([#&#8203;6534](https://redirect.github.com/colinhacks/zod/pull/6534),
[#&#8203;6527](https://redirect.github.com/colinhacks/zod/pull/6527))

Composing `z.base64()` into a template literal now checks the alphabet
but not the length, which is how `z.creditCard()` already behaves there.
The exported `z.regexes.base64url` is now the length-aware form, so it
overflows on a multi-megabyte input the same way `z.regexes.base64`
does.

##### ⚠️ The email pattern dropped its lookaheads

`z.email()` opened with two lookaheads, and the second scanned the whole
string before the match began. Both are gone, and the rule they enforced
— no empty segment in the local part — is expressed structurally
instead, so `z.email()` accepts and rejects exactly what it did before.
Valid addresses validate roughly twice as fast.
([#&#8203;6573](https://redirect.github.com/colinhacks/zod/pull/6573))

The pattern string is user-visible, and every copy of it changes:
`z.regexes.email`, which has no capture groups now — neither of the two
it used to expose held a usable value; `issue.pattern` on a failed
`z.email()`; and the `pattern` that `z.toJSONSchema()` emits, which no
longer carries a lookahead, so validators outside ECMAScript can compile
it.

Composing an email into a template literal also stops applying its
no-consecutive-dots rule to the rest of the string.

```ts
z.templateLiteral([z.email(), "|", z.string()]).parse("a@b.cc|a..b");
// 4.5: ❌ — the lookahead reached past the email segment — 4.6: ✅
```

##### ⚠️ Chained checks no longer overwrite each other in JSON Schema

Each check used to write its own bounds into the schema as it attached,
in chain order, so a format check applied after `.min()` and `.max()`
replaced the tighter values with its own range. The converter folds the
checks as a conjunction now. The order they are chained in no longer
changes the output.
([#&#8203;6554](https://redirect.github.com/colinhacks/zod/pull/6554),
[#&#8203;6553](https://redirect.github.com/colinhacks/zod/pull/6553))

```ts
z.toJSONSchema(z.number().min(0).max(23).int());
// 4.5: { minimum: -9007199254740991, maximum: 9007199254740991 }
// 4.6: { minimum: 0, maximum: 23 }
```

Runtime parsing enforced the bounds in every version. Only the emitted
schema was wrong. The same fold fixes two more cases: a repeated
`multipleOf` kept the first divisor and dropped the rest, so
`z.number().multipleOf(2).multipleOf(3)` emitted a schema that accepts
4, and `z.string().min(8).length(5)` emitted `minLength: 5`, widening a
bound the runtime still rejected. Closes
[#&#8203;6550](https://redirect.github.com/colinhacks/zod/issues/6550).

##### ⚠️ Metadata members materialize on first read

Eight members on a Zod Classic schema — `.format`, `.minLength`,
`.maxLength`, `.minValue`, `.maxValue`, `.isInt`, `.minDate` and
`.maxDate` — are computed from the checks now instead of being written
onto every instance at construction. Each one is a prototype getter that
becomes an own property on first read.
([#&#8203;6554](https://redirect.github.com/colinhacks/zod/pull/6554))

```ts
const s = z.string().min(3).max(9);

Object.keys(s); // 4.5: ["def", "type", "format", "minLength", "maxLength"] — 4.6: ["def", "type"]
s.minLength;    // 3 in both
Object.keys(s); // 4.6: ["def", "type", "minLength"]
```

A key is absent until something reads it, and `Object.assign({},
schema)` copies only the members that have been read. Deleting one
restores the getter, and the next read recomputes it.

The values can move too, because the getters read the same fold the JSON
Schema converter does. An order-dependent chain reports the tighter
bound now instead of whichever check wrote last.

```ts
z.string().min(8).length(5).minLength; // 4.5: 5 — 4.6: 8
```

#### Commits

Zod 4.6 rolls up 72 commits.

-
[`661673ae`](661673ae)
docs: make the 9thCO logo visible on the light theme by
[@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`6de10dce`](6de10dce)
docs: reconcile the sponsor listings against every active sponsorship
([#&#8203;6579](https://redirect.github.com/colinhacks/zod/pull/6579))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`213ee75d`](213ee75d)
feat(compile): add z.withParser for externally generated parsers
([#&#8203;6575](https://redirect.github.com/colinhacks/zod/pull/6575))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`f9465d4e`](f9465d4e)
docs: reconcile the sponsor listings with active sponsorships
([#&#8203;6576](https://redirect.github.com/colinhacks/zod/pull/6576))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`f7fd5548`](f7fd5548)
perf(v4): drop the lookaheads from the email regex
([#&#8203;6573](https://redirect.github.com/colinhacks/zod/pull/6573))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`36f17960`](36f17960)
fix(v4): stop the memoizer from pinning a finished parse
([#&#8203;6572](https://redirect.github.com/colinhacks/zod/pull/6572))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`22bed613`](22bed613)
feat(v4): add z.iban() string format with mod-97 checksum
([#&#8203;6571](https://redirect.github.com/colinhacks/zod/pull/6571))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`c5b9bcb3`](c5b9bcb3)
bench: measure what a runtime island's leaked indent cost the generated
source by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`e54716cb`](e54716cb)
docs(ecosystem): add
[@&#8203;apical-ts/craft](https://redirect.github.com/apical-ts/craft)
([#&#8203;5946](https://redirect.github.com/colinhacks/zod/pull/5946))
by [@&#8203;gunzip](https://redirect.github.com/gunzip)
-
[`dcbcf052`](dcbcf052)
fix(compile): unwind the doc indent when a child generator throws
([#&#8203;6570](https://redirect.github.com/colinhacks/zod/pull/6570))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`277613a6`](277613a6)
docs: move the release procedure to the maintainer-local notes by
[@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`eb1c1089`](eb1c1089)
ci: release only on workflow_dispatch behind the npm environment
([#&#8203;6569](https://redirect.github.com/colinhacks/zod/pull/6569))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`741981ff`](741981ff)
perf(compile): for-in record walk, cheaper issue finalization, and a
generative compile differential
([#&#8203;6567](https://redirect.github.com/colinhacks/zod/pull/6567))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`804e0f52`](804e0f52)
perf: seal the CommonJS exports so require("zod") stops reading through
a getter
([#&#8203;6564](https://redirect.github.com/colinhacks/zod/pull/6564))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`6f048367`](6f048367)
fix(v4): derive JSON Schema constraints by folding checks in the
converter
([#&#8203;6554](https://redirect.github.com/colinhacks/zod/pull/6554))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`e4d67f3e`](e4d67f3e)
Migrate development and CI to Nub
([#&#8203;6562](https://redirect.github.com/colinhacks/zod/pull/6562))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`7a002366`](7a002366)
fix(v4): don't let format checks overwrite tighter min/max bounds
([#&#8203;6553](https://redirect.github.com/colinhacks/zod/pull/6553))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`5489a532`](5489a532)
test(v4): pin the check-chain case that keeps compiled validate's
definite guard
([#&#8203;6551](https://redirect.github.com/colinhacks/zod/pull/6551))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`e7604717`](e7604717)
docs: attribute the compiled failure cost to the fallback, not the
double pass by
[@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`764ac59f`](764ac59f)
perf(v4): settle z.validate on the first failure in parse order
([#&#8203;6544](https://redirect.github.com/colinhacks/zod/pull/6544))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`07917f4c`](07917f4c)
test(v4): pin the lazy safeParse error's stack behavior
([#&#8203;6548](https://redirect.github.com/colinhacks/zod/pull/6548))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`62e6624b`](62e6624b)
feat(v4): add .validate() and .validateAsync() to Zod Classic
([#&#8203;6547](https://redirect.github.com/colinhacks/zod/pull/6547))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`cafbee47`](cafbee47)
fix(v4): parse recursive schemas built by a factory
([#&#8203;6530](https://redirect.github.com/colinhacks/zod/pull/6530))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`4d730882`](4d730882)
Release the parsed input once a failing safeParse builds its error
([#&#8203;6543](https://redirect.github.com/colinhacks/zod/pull/6543))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`90269c60`](90269c60)
Keep a numeric TS enum's reverse-mapping keys out of `.options`
([#&#8203;6542](https://redirect.github.com/colinhacks/zod/pull/6542))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`18e71c71`](18e71c71)
Rename the JSON Schema `process` helper so bundler polyfills cannot
collide
([#&#8203;6541](https://redirect.github.com/colinhacks/zod/pull/6541))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`68aca3dc`](68aca3dc)
docs: cover the 4.5 API surface that never made it into the reference by
[@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`eca96871`](eca96871)
fix(v4): enforce the six JSON Schema keywords fromJSONSchema silently
dropped
([#&#8203;6535](https://redirect.github.com/colinhacks/zod/pull/6535))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`81ded991`](81ded991)
perf: answer z.validate from the compiled fast path on invalid input
([#&#8203;6538](https://redirect.github.com/colinhacks/zod/pull/6538))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`51caf010`](51caf010)
refactor: collapse cachedInternal back into cached
([#&#8203;6540](https://redirect.github.com/colinhacks/zod/pull/6540))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`abfb3897`](abfb3897)
feat(v4): make z.properties() a schema, and give z.instanceof() a
.properties() method
([#&#8203;6536](https://redirect.github.com/colinhacks/zod/pull/6536))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`69f2a7ff`](69f2a7ff)
Collapse toZod's normalizer and move its docs to the API reference
([#&#8203;6539](https://redirect.github.com/colinhacks/zod/pull/6539))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`bf990216`](bf990216)
perf: move util.cached's accessor to a prototype
([#&#8203;6537](https://redirect.github.com/colinhacks/zod/pull/6537))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`bec73bea`](bec73bea)
perf(v4): build the safeParse error on first read
([#&#8203;6519](https://redirect.github.com/colinhacks/zod/pull/6519))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`07c43e2a`](07c43e2a)
Keep the runtime base64 regexes linear so composed parse paths cannot
overflow
([#&#8203;6534](https://redirect.github.com/colinhacks/zod/pull/6534))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`bc1157e7`](bc1157e7)
docs: use a Response example for z.properties() by
[@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`2ec972ec`](2ec972ec)
refactor: collapse toZod's enum leaf normalizer to a dummy union
([#&#8203;6533](https://redirect.github.com/colinhacks/zod/pull/6533))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`68a609ac`](68a609ac)
Widen literal inputs in property check types
([#&#8203;6520](https://redirect.github.com/colinhacks/zod/pull/6520))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`0227e53d`](0227e53d)
docs: bump the star pill's GitHub mark to 20px by
[@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`84dd3b0f`](84dd3b0f)
perf: build literal and enum pattern regexes lazily
([#&#8203;6531](https://redirect.github.com/colinhacks/zod/pull/6531))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`f83ab511`](f83ab511)
fix(v4): reject component-only strings from z.emoji()
([#&#8203;6532](https://redirect.github.com/colinhacks/zod/pull/6532))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`74f9a6d3`](74f9a6d3)
docs: drop the toZod enum block from basics and pin the page's curation
rule in a comment by
[@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`a2a019a5`](a2a019a5)
Accept enum-typed targets in z.toZod
([#&#8203;6528](https://redirect.github.com/colinhacks/zod/pull/6528))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`319f47f4`](319f47f4)
Emit a length-aware base64url pattern in toJSONSchema
([#&#8203;6527](https://redirect.github.com/colinhacks/zod/pull/6527))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`08ba069e`](08ba069e)
perf(v4): read Luhn digits with charCodeAt instead of string indexing
([#&#8203;6529](https://redirect.github.com/colinhacks/zod/pull/6529))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`1ec6b7c5`](1ec6b7c5)
docs: add an RSS feed to the blog at /blog/rss.xml by
[@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`b801439b`](b801439b)
bench: add typebox (compiled and dynamic) to the moltar cross-library
harness by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`7ae49d64`](7ae49d64)
docs: drop the circle around the star pill's GitHub mark and center it
on the pill's arc by
[@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`93f3ab32`](93f3ab32)
docs: replace the blog navbar's GitHub icon with a star-count pill by
[@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`fb2fedfd`](fb2fedfd)
docs: tighten the memory chart callout, pad the canvas, say "less
memory" by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`ff56a551`](ff56a551)
docs: center the memory chart callout labels and pad them off the number
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`8cd1250f`](8cd1250f)
docs: center the memory chart callout labels by
[@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`3195ed01`](3195ed01)
docs: label the memory chart like the compile chart by
[@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`a6b49390`](a6b49390)
Mark the compile internals
[@&#8203;internal](https://redirect.github.com/internal) instead of
hiding them
([#&#8203;6518](https://redirect.github.com/colinhacks/zod/pull/6518))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`40b4d0b3`](40b4d0b3)
fix(ci): read zod's latest version with npm view when picking the
backfill dist-tag by
[@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`5ff95665`](5ff95665)
Stop re-exporting the compile internals from zod/v4/core
([#&#8203;6511](https://redirect.github.com/colinhacks/zod/pull/6511))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`f412178d`](f412178d)
ci: publish [@&#8203;zod/mini](https://redirect.github.com/zod/mini) to
JSR in lockstep with npm
([#&#8203;6510](https://redirect.github.com/colinhacks/zod/pull/6510))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`f3e7c72e`](f3e7c72e)
fix(docs): render the docs 404 page inside the (doc) layout once by
[@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`f3cb3644`](f3cb3644)
docs: surface the blog on the home page and in the sidebar by
[@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`cd4f9a67`](cd4f9a67)
perf(v4): report Standard Schema issues without constructing a ZodError
([#&#8203;6509](https://redirect.github.com/colinhacks/zod/pull/6509))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`43b9bfc5`](43b9bfc5)
docs: drop the bound-methods section from the Zod package page by
[@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`70eb2c07`](70eb2c07)
docs: drop the traits section and the compilation feature bullet by
[@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`1c0bce0c`](1c0bce0c)
docs: bring the 4.5 charts and worked examples into the docs pages by
[@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`a0898b4b`](a0898b4b)
ci: wait hours for npm to serve a publish, not ten minutes
([#&#8203;6502](https://redirect.github.com/colinhacks/zod/pull/6502))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`c46eeff0`](c46eeff0)
chore: narrow blanket biome-ignore comments
([#&#8203;6504](https://redirect.github.com/colinhacks/zod/pull/6504))
by [@&#8203;pullfrog\[bot\]](https://redirect.github.com/pullfrog\[bot])
-
[`c7ec94d3`](c7ec94d3)
ci: check zod and
[@&#8203;zod/mini](https://redirect.github.com/zod/mini) lockstep on npm
after every publish
([#&#8203;6507](https://redirect.github.com/colinhacks/zod/pull/6507))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`81065739`](81065739)
chore(docs): build with Turbopack by
[@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`abd41adb`](abd41adb)
docs(wiki): move plans and comparisons into a gitignored internal/
([#&#8203;6506](https://redirect.github.com/colinhacks/zod/pull/6506))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`2956c4c2`](2956c4c2)
chore(mini): sync
[@&#8203;zod/mini](https://redirect.github.com/zod/mini) to 4.5.4 by
[@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`8ce9e8d5`](8ce9e8d5)
feat(mini): publish Zod Mini as the standalone
[@&#8203;zod/mini](https://redirect.github.com/zod/mini) package
([#&#8203;6491](https://redirect.github.com/colinhacks/zod/pull/6491))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`93186cab`](93186cab)
docs(wiki): drop the zod-compiler benchmark
([#&#8203;6505](https://redirect.github.com/colinhacks/zod/pull/6505))
by [@&#8203;colinhacks](https://redirect.github.com/colinhacks)
-
[`908c9e17`](908c9e17)
fix(docs): retry the GitHub stars fetch and log the real status by
[@&#8203;colinhacks](https://redirect.github.com/colinhacks)

###
[`v4.5.4`](https://redirect.github.com/colinhacks/zod/releases/tag/v4.5.4)

[Compare
Source](https://redirect.github.com/colinhacks/zod/compare/v4.5.3...v4.5.4)

#### Commits:

-
[`84e416f`](84e416fbf4)
fix(v4): stop the cycle walk from firing a default factory
([#&#8203;6500](https://redirect.github.com/colinhacks/zod/issues/6500))
-
[`e8e206f`](e8e206fa33)
4.5.4

###
[`v4.5.3`](https://redirect.github.com/colinhacks/zod/releases/tag/v4.5.3)

[Compare
Source](https://redirect.github.com/colinhacks/zod/compare/v4.5.2...v4.5.3)

#### Commits:

-
[`e6b6ab3`](e6b6ab3476)
docs(blog): widen the z.compile example to a 20-property schema
-
[`87d6464`](87d6464418)
fix(docs): drop the OG description when the title wraps past two lines
-
[`99fce39`](99fce394a0)
bench(v4): z.compile() against zod-compiler
([#&#8203;6499](https://redirect.github.com/colinhacks/zod/issues/6499))
-
[`e3a695b`](e3a695b6bf)
docs(v4): record the email regex and container output-shape findings
under Open
-
[`7e24a24`](7e24a24288)
docs(blog): drop the reading time and put a GitHub link in the navbar
-
[`eab51ff`](eab51ff359)
fix(v4): emit record numeric keys as strings in toJSONSchema
([#&#8203;6497](https://redirect.github.com/colinhacks/zod/issues/6497))

###
[`v4.5.2`](https://redirect.github.com/colinhacks/zod/releases/tag/v4.5.2)

[Compare
Source](https://redirect.github.com/colinhacks/zod/compare/v4.5.1...v4.5.2)

#### Commits:

-
[`a354314`](a354314ac0)
fix(docs): keep blog posts out of the docs collection
([#&#8203;6484](https://redirect.github.com/colinhacks/zod/issues/6484))
-
[`d378c42`](d378c42aff)
ci: drop canary publishing from the release workflow
([#&#8203;6487](https://redirect.github.com/colinhacks/zod/issues/6487))
-
[`212b941`](212b941791)
fix(v4): let a prototype method getter answer a bare call so vi.spyOn
works
([#&#8203;6488](https://redirect.github.com/colinhacks/zod/issues/6488))
-
[`e7576f5`](e7576f542a)
docs(blog): let the page show through the navbar in dark mode
([#&#8203;6489](https://redirect.github.com/colinhacks/zod/issues/6489))
-
[`fedb06f`](fedb06fafe)
fix(docs): match the blog TOC hover bar to the 2px active indicator
-
[`6c932fc`](6c932fcb2e)
chore: bump devcontainer image to Node 24
([#&#8203;6470](https://redirect.github.com/colinhacks/zod/issues/6470))
-
[`6635d9d`](6635d9dd36)
docs(blog): soften the "method memoization" attribution
-
[`019ae29`](019ae299cc)
fix(docs): drop ISR on the docs route so the home page hydrates
-
[`652bb43`](652bb438aa)
chore(docs): drop the scroll log from the route-change scroller
-
[`571c8e8`](571c8e8a3d)
fix(docs): render blog tabs with the stock fumadocs tab card
-
[`9a193aa`](9a193aa24b)
4.5.2

###
[`v4.5.1`](https://redirect.github.com/colinhacks/zod/releases/tag/v4.5.1)

[Compare
Source](https://redirect.github.com/colinhacks/zod/compare/v4.5.0...v4.5.1)

#### Commits:

-
[`2e862db`](2e862dbf89)
ci: gate the GitHub release and JSR publish on the version being live on
npm
-
[`8e03380`](8e03380510)
4.5.1

###
[`v4.5.0`](https://redirect.github.com/colinhacks/zod/releases/tag/v4.5.0)

[Compare
Source](https://redirect.github.com/colinhacks/zod/compare/v4.4.3...v4.5.0)

Zod 4.5 is now available.

```sh
npm install zod@latest
```

At a glance:

- [`z.compile()`](#zcompile) — the flagship feature of Zod 4.5
- [`z.creditCard()`](#zcreditcard) — 12–19 digits plus Luhn checksum
- [`z.properties()`](#zproperties) — the multi-property counterpart to
`z.property()`
- [`z.deepPartial()`](#zdeeppartial)/[`.exactPartial()`](#exactpartial)
- [`z.validate(): boolean`](#zvalidate) — a fast-path to verify input
validity without a full parse (up to 16x faster on invalid data)
- [9x reduction in memory
footprint](#&#8203;9x-reduction-in-schema-memory-footprint)
- [New locales](https://zod.dev/error-customization#locales): Bengali
(`bn`), Central Kurdish (`ckb`), Hindi (`hi`), Kannada (`kn`), Norwegian
Nynorsk (`nn`), Brazilian Portuguese (`pt-BR`), Slovak (`sk`), Turkmen
(`tk`)

#### `z.compile()`

You can now pre-compile any Zod schema using `z.compile(schema)`. This
dramatically speeds up parsing performance.

```ts
import * as z from "zod";

const Player = z.object({
  username: z.string(),
  bio: z.string(),
  xp: z.number(),
  // ...20 more properties...
});

const CompiledPlayer = z.compile(Player);
```

A compiled schema can be used *exactly* like an uncompiled one. There
are no special rules around compiled schemas. They're just faster.

```ts
Player.parse({ ... });
CompiledPlayer.parse({ ... }); // ~9x faster
```

On objects, arrays, and unions, this speeds up parsing by a factor of
\~3–9. More complex schemas stand to benefit more than simpler ones.

<picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://zod.dev/blog/compile-speedup-dark.svg">
<img alt="Time per parse on a shared nanosecond axis, standard parser as
a gray bar with the compiled time as a blue bar inside it: an array of
10 objects 377 ns to 68 ns (5.5x), a 20-key object 301 ns to 38 ns
(7.8x), an array of 10 strings 241 ns to 33 ns (7.3x), a union of 3
objects 190 ns to 36 ns (5.3x), a 3-element tuple 119 ns to 33 ns
(3.6x), a 5-key strict object 117 ns to 32 ns (3.7x), a discriminated
union 92 ns to 27 ns (3.4x), a 5-key object 76 ns to 28 ns (2.8x); up to
7.8x faster when compiled"
src="https://zod.dev/blog/compile-speedup-light.svg">
</picture>

*Time per parse by schema type, standard parser vs compiled — lower is
better
([benchmark](https://redirect.github.com/colinhacks/zod/blob/main/packages/bench/compile-matrix.ts))*

Below are the Moltar benchmark results comparing Zod (compiled and
uncompiled) against the [**Moltar
ParseSafe**](https://redirect.github.com/moltar/typescript-runtime-type-benchmarks)
bench.

<picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://zod.dev/blog/moltar-dark.svg">
<img alt="Bar chart of operations per second on the moltar benchmark
fixture, parseSafe category: Zod 4 compiled 47.5M, typia 45.3M, Zod 4
11.6M, valibot 1.8M, effect 1.7M, Zod 3 1.2M, arktype 152k, yup 121k"
src="https://zod.dev/blog/moltar-light.svg">
</picture>

*Throughput on the moltar benchmark fixture (parseSafe: returns a new
object with unknown keys stripped) — higher is better
([benchmark](https://redirect.github.com/moltar/typescript-runtime-type-benchmarks/pull/2329))*

And the equivalent results for the Moltar AssertLoose bench. Tested
against the new `z.validate(schema, input)` function (detailed later in
the post).

<picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://zod.dev/blog/moltar-assertLoose-dark.svg">
<img alt="Bar chart of operations per second on the moltar benchmark
fixture, assertLoose category: typia 74.9M, arktype 66.2M, Zod 4
compiled 60.6M, Zod 4 6.5M, valibot 1.9M, effect 1.7M, Zod 3 1.2M, yup
124k" src="https://zod.dev/blog/moltar-assertLoose-light.svg">
</picture>

*Throughput on the moltar benchmark fixture (assertLoose: returns a
boolean, unknown keys allowed) — higher is better
([benchmark](https://redirect.github.com/moltar/typescript-runtime-type-benchmarks/pull/2329))*

Zod's entire test suite runs twice—once normally and again with
auto-compilation enabled globally—to ensure perfect fidelity.

<details>
<summary>How it works</summary>

Under the hood, `z.compile()` walks the entire schema once and produces
a hyperoptimized snippet of flat, loop-free JavaScript that can validate
inputs far faster than a standard runtime validator. This snippet can be
executed via `new Function()` (effectively a more powerful `eval`) to
serve as a fast-path validator. Schemas use this to "fast check"
validity, falling back to the regular runtime logic on validation
failure to provide granular error information.

Take this simple `Point` schema:

```ts
const Point = z.object({
  x: z.number(),
  y: z.number()
});
```

Here is the generated snippet for it:

```ts
const isPoint = new Function("input", `
  if (typeof input !== "object" || input === null) return false;
  if (typeof input.x !== "number") return false;
  if (typeof input.y !== "number") return false;
  return true;
`);

isPoint({ x: 1, y: 2 }); // true
isPoint({ x: "1" });     // false
```

For the large majority of inputs, the generated function validates the
data with the fastest logic JavaScript can express: straight-line
`typeof` checks and property reads, with no int

> [!IMPORTANT]
> ✂ PR body was truncated to here.


</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiI0NC4xODEuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjE4Ni40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWF0aW9uIiwic2VjdXJpdHkiXX0=-->
2026-10-27 11:18:23 -07:00
dane-ai-mastra[bot]
ef92d71d94
chore: version packages (alpha) (#28499)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-27 13:09:53 -05:00
Damien Schneider
1fc075ab7f
refactor(core): one provider-failure reader for retries, memory, rotation and Factory (#28496)
**─────── TLDR ───────**
> Retries, memory, account rotation, the TUI and Factory now read a
failed model call through one reader in `@mastra/core/error`, so one
rule change fixes them all.

Follows #27811, which put this reader in Factory first. Before this PR,
seven hand-written status, code and wording tables disagreed. The retry
processor retried an exhausted quota, because the AI SDK marks every 429
retryable. Rotation only read quota wording on a 400. The run report
said `Bad Request`.

Now `classifyProviderError` reads the HTTP status, the provider codes,
the body and the wording, and every site asks it. Each site keeps only
the signals the reader can't see: a numeric `status`, network errors,
Retry-After and `ProviderAuthRequiredError`.

### Behavior changed

a 429 whose body says the quota is exhausted (`insufficient_quota`)
&nbsp;&nbsp;├─ **was** — retried, and the TUI says to wait a moment
&nbsp;&nbsp;└─ **now** — never retried; the TUI names the quota and
points to billing

a credential or usage failure named only in the provider's body
&nbsp;&nbsp;├─ **was** — no account rotation; Factory reports a plain
run failure
&nbsp;&nbsp;└─ **now** — rotates to the next account; Factory reports
bad credentials

a Factory run report for a failed provider call
&nbsp;&nbsp;├─ **was** — quotes the provider for usage limits only, else
`Bad Request`
&nbsp;&nbsp;└─ **now** — quotes the provider's own reason, cut at 400
characters

a mid-stream provider code, such as a Codex `server_error`, on the web
card
&nbsp;&nbsp;├─ **was** — `Run stopped`, live and after a reload
&nbsp;&nbsp;└─ **now** — named as an outage; the saved part keeps the
codes

a stream error that your own retry matcher and the built-in OpenAI
matcher both accept
&nbsp;&nbsp;├─ **was** — the built-in policy wins: one immediate retry,
no callback
&nbsp;&nbsp;└─ **now** — your matcher's `maxRetries`, `delayMs` and
`onRetry` apply

a tool's `EACCES: permission denied` ending a run
&nbsp;&nbsp;├─ **was** — the reader called it a provider credential
failure
&nbsp;&nbsp;└─ **now** — unknown; only the code form `permission_denied`
reads as auth

### Shape changed

| | | |
|---|---|---|
| **−** | `mastracode/factory/src/provider-error.ts` | its home in
#27811, back in core |
| **−** | memory `context-overflow.ts` | replaced by the reader's
`context_overflow` |
| **−** | `USAGE_LIMIT_MESSAGE_PATTERN` ×2 | rotation and run report
each kept a copy |
| **−** | `RETRYABLE_OPENAI_ERROR_CODES` ·
`TERMINAL_AUTHORIZATION_ERROR_CODES` | the reader's kinds |
| **+** | `quota` in code-sdk `ErrorType` | a quota can't be waited out
|
| **~** | `MastraErrorPart['error']` | keeps `codes` and the provider's
`reason` for a reload |

what callers now import from `@mastra/core/error`
&nbsp;&nbsp;&nbsp;&nbsp;`classifyProviderError(error)` ·
`providerErrorReason(error)` · `providerRequestId(error)` ·
`providerModelId(error)` · `toPersistedErrorIdentity(error)` ·
`PROVIDER_CALL_ERROR_NAME` · `type ProviderFailureKind`

### Decisions

- **overflow wording outranks a 5xx** — a gateway relaying `prompt is
too long` gets compacted, not retried; one rule in `provider-error.ts`
to drop.
- **a caller's numeric `status` outranks wording** — the reader ignores
`status`, which Octokit and MCP errors also carry, so rotation and
`parseError` read it first; a 503 saying `weekly limit` retries instead
of burning an account.
- **only a provider's own sentence is saved** — the saved `reason` comes
from an HTTP response or a stream frame, never from another error's
`detail`, which can name a database row.

### Not verified

- [ ] an app on `@mastra/core` 1.80.0-alpha.0 to alpha.4: the repo's
`-0` floor admits them and they predate the reader, as with `@mastra/pg`
on main; `check:core-imports` passes for server, memory and code-sdk
against this branch's core packed as 1.80.0
- [ ] `changed-tests` stays red: the deployer's core floor moves with no
monorepo E2E change, as on #28417
- [ ] account rotation against real provider accounts: the
`account-rotation`, `account-routing-targeted` and `pack-fallback` TUI
E2E pass with HTTP 429s through the real AI SDK, not a live account
- [ ] the web card after a reload with a real Codex `server_error`
frame: fixtures only

---

> ██████████████████ **source** `+304 −455` — net −151
> █████████████ **tests** `+399 −140`
> ███ **changeset** `+112`
> █ **package.json** `+20 −20` — core peer floor 1.80: server, memory,
agent-builder and editor import the reader
> █ **docs** `+10 −6`


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

<!-- coderabbit-ai-generated:v1 -->

## ELI5

Different parts of the project could interpret the same provider error
in different ways. This change gives them one shared reader so retries,
account rotation, saved errors, and user-facing reports handle those
errors more consistently.

## What changed

- Added provider-error classification and extraction helpers to
`@mastra/core/error`. They read provider codes, reasons, request IDs,
and model IDs from responses and wrapped errors.
- Updated retry handling, account rotation, observational-memory
context-overflow recovery, server error serialization, Factory reports,
and TUI error mapping to use the shared reader.
- Saved errors can include provider codes and reasons. Persisted
provider text is capped at 2,000 characters. Factory failed-run reports
use the provider reason when available and cap the report text at 400
characters.
- Configured retry matchers now run before built-in matchers. Built-in
retry handling excludes credential and exhausted-quota failures.
- Raised the minimum `@mastra/core` peer dependency to 1.80.0 across
affected packages and deployers.

## Verification and limitations

The supplied notes report that `check:core-imports` at the 1.80 floor is
unverified. They also report that `changed-tests` remains red after the
deployer core-floor change. Account rotation against real provider
accounts and web-card behavior after reloading a real Codex
`server_error` frame were not verified; unit tests and fixtures were
used instead.

Review finding counts are unavailable because no current review findings
were supplied.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-10-27 14:04:37 +01:00
Damien Schneider
7701b35eaa
chore(lint): enable safe syntax simplification rules at root (#28582)
Enables all eleven requested Oxlint rules as errors in the root config
and migrates the 115 existing findings across 55 files. JSX curly-brace
simplification is limited to props (`props: 'never', children:
'ignore'`), boolean props use shorthand, and empty elements become
self-closing.

The manual edits preserve the exact continued-string and template
values, remove redundant assignment-side non-null assertions, and retain
the indexed-read assertion in fastembed's compound assignment. The
BigInt and octal conversions use native globals and exact values
supported by the existing compilation targets. No lint suppressions were
added.

Validation: the eleven-rule scan reports zero diagnostics; before/after
emitted-JavaScript comparison passes for all 55 migrated files,
including 31 JSX files, after normalizing only the reviewed syntax
rewrites. Formatting and whitespace checks pass. Core utility/clone
tests (146), fastembed pooling tests (9), the changed A2A signature test
(1), and fastembed build-config typechecking pass. The root lint scan
retains the same 1,244 pre-existing diagnostics with no new findings.
GitHub CI now also passes the full lint/format job, build, Mastra Code
typecheck, generated-file check, and bundle validation. Local UI/evals
runs were limited by missing dependencies; the CodeDiff folding failure
was reproduced on unchanged baseline code. A second audit confirmed
native unshadowed globals for all five literal conversions, pure targets
for all twelve assignment rewrites, no references or direct eval in all
eight simplified catches, and ordinary semantics for both computed keys.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

<!-- coderabbit-ai-generated:v1 -->

## ELI5

This PR turns on more code-style checks and updates existing code to
pass them. The changes simplify syntax while preserving the intended
behavior.

## Changes

- Enabled eleven Oxlint rules as errors in the root configuration.
- Updated 115 findings across 55 files. Changes include simpler string
and JSX syntax, compound assignments, native BigInt and octal literals,
and catch clauses without unused error variables.
- Configured JSX curly-brace simplification for props only. JSX children
remain unchanged.
- Removed redundant assignment-side non-null assertions while retaining
the indexed-read assertion needed for fastembed’s compound assignment.
- Added no lint suppressions.

## Validation

The author reports zero diagnostics from the eleven-rule scan and no new
findings in the root lint scan, which retains 1,244 pre-existing
diagnostics. Before-and-after emitted-JavaScript comparisons reportedly
pass for all 55 changed files after normalizing the reviewed syntax
rewrites. Formatting and whitespace checks also pass.

Reported tests include 146 core utility and clone tests, 9 fastembed
pooling tests, 1 changed A2A signature test, and fastembed build-config
typechecking. Full workspace lint and the UI/evals suites were limited
by missing dependencies in the checkout. The CodeDiff folding test fails
on unchanged baseline code.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-10-27 14:00:25 +01:00
Damien Schneider
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 `f4cbdb4d78`; DuckDB and core storage files
are unchanged by this PR.

No changeset is included for this lint maintenance, as requested; the
changeset check is expected to fail. Keep this PR as a draft.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## ELI5

This PR adds a check that finds template strings with unnecessary string
insertions. It removes those insertions while preserving explicit
conversions where they may affect behavior.

## Summary

- Enable `typescript/no-unnecessary-template-expression` as an error in
the shared TypeScript configuration.
- Simplify redundant template expressions across CLI, core, deployer,
storage, test, and end-to-end test code.
- Preserve intentional string coercion at runtime boundaries and in mock
responses with local Oxlint suppression comments.
- Keep the existing lint scope and package manifests unchanged,
according to the PR objectives.

## Validation

The PR objectives report passing lint, build, typecheck, formatting,
whitespace, and focused test checks. They also report DuckDB
capability-list failures reproduced on the unchanged base. No changeset
is included as requested. The changeset check is expected to fail.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-10-26 22:37:47 +01:00
dane-ai-mastra[bot]
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>
2026-10-26 13:49:15 -07:00
Damien Schneider
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 `36ca4471f9`. All 634 focused tests, four package typechecks (core,
playground, connect, and deployer), 57 packaged build tasks, and two
selected published-package monorepo E2E cases pass. The broader local
lint run hit a Tailwind design-system precomputation timeout; CI lint
succeeds. Live vendor and external-database suites were not run locally.

[DuckDB CI has two existing capability-list assertion
failures](https://github.com/mastra-ai/mastra/actions/runs/40344286246/job/121649643109):
its implementation advertises `span-aggregate`, while the expected lists
omit it. The failures reproduce locally, and the relevant implementation
and tests are unchanged from the base commit.

This maintenance PR intentionally contains no changeset and requests no
package releases. The missing-changeset check may fail.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

<!-- coderabbit-ai-generated:v1 -->

## ELI5
This PR turns on a lint rule that asks for simpler branching in code. It
updates the affected code and adds a leap-year check to an existing
test.

## Changes
- Enables Oxlint’s `no-lonely-if` rule in the shared configuration.
- Flattens 38 lone `if` statements across 35 files. The PR description
reports that the changes preserve behavior.
- Extends the optimized-dependency monorepo test to check `isLeapYear`.

## Validation
- The PR description reports that CI lint and formatting pass.
- It also reports 634 focused tests, four package typechecks, 57
packaged build tasks, and two selected monorepo E2E cases pass.
- The PR description notes two existing DuckDB CI capability-list
assertion failures. It reports that the related implementation and tests
are unchanged from the base commit.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-10-26 18:44:48 +01:00
Ward Peeters
ce5d4731ee
chore(deps): update dependencies across the monorepo (#28417)
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-10-26 16:59:30 +01:00
dane-ai-mastra[bot]
dac22288b0 chore: version packages 2026-10-25 04:28:20 +00:00
dane-ai-mastra[bot]
dacb190944
chore: version packages (alpha) (#28009)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-23 13:57:18 +02:00
Dane - AI (Mastra)
82e82fb5a7
chore(deps): update security updates [security] (#27869)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-22 14:54:47 +02:00
Dane - AI (Mastra)
40a522c142
chore(deps): update build tools (#27997) 2026-10-22 14:33:21 +02:00
dane-ai-mastra[bot]
4c22623ea3 chore: version - exit prerelease mode 2026-10-21 11:26:39 +00:00
Dane - AI (Mastra)
4f60903242
chore(deps): lock file maintenance (#27013) 2026-10-21 09:25:38 +02:00
dane-ai-mastra[bot]
dfe15b70fc
chore: version packages (alpha) (#27861)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-20 14:35:52 -07:00
dane-ai-mastra[bot]
83493c4c88
chore: version packages (alpha) (#27793)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-20 10:10:43 -07:00
dane-ai-mastra[bot]
98e53f781c chore: version packages 2026-10-20 16:27:45 +00:00