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

736 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
Daniel Lew
392c7b69d5
feat(server): built-in MCP endpoint for agents, workflows and tools (#29929)
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-11-12 12:56:28 -05:00
arctic-char
c0d3bfdc43
feat: pass the authenticated user to DynamicArgument callbacks (#28612)
Dynamic agent config callbacks now get the authenticated end user as an
optional `user` argument, so you can personalize an agent without
digging auth keys out of `requestContext` yourself. It works in any
`DynamicArgument` callback: instructions, model, tools, memory,
workspace, processors, scorers, and so on.

```ts
import { Agent } from '@mastra/core/agent';

const supportAgent = new Agent({
  id: 'support-agent',
  instructions: ({ user }) =>
    user ? `You are helping ${user.name ?? user.id}.` : 'You are a helpful assistant.',
  model: ({ user }) => (user?.role === 'admin' ? 'openai/gpt-5' : 'openai/gpt-5-mini'),
  tools: ({ user }) => (user ? { accountTool, ...(user.role === 'admin' ? { adminTool } : {}) } : {}),
  memory: ({ user }) => (user ? userMemory : undefined),
});
```

`user` always has the same `MastraUser` shape, no matter which auth
provider you use, and it's `undefined` for unauthenticated requests:

```ts
import type { MastraUser } from '@mastra/core/types';

// { id: string; name?: string; email?: string; avatarUrl?: string; role?: string }
```

The server auth middleware builds it through a new overridable
`toMastraUser()` on `MastraAuthProvider`. The default handles common
shapes (`id`/`sub`/`userId`, `name`, `email`, `avatarUrl`/`picture`,
`role`), and JWT, Cloud, Supabase, Neon and Better Auth ship overrides
for their user objects. Custom providers can map their own shape:

```ts
import { MastraAuthProvider } from '@mastra/core/server';
import type { MastraUser } from '@mastra/core/types';

class MyAuth extends MastraAuthProvider<MyUser> {
  async authenticateToken(token: string) { /* ... */ }
  async authorizeUser(user: MyUser) { return true; }

  toMastraUser(user: MyUser): MastraUser {
    return { id: user.accountId, name: user.profile.displayName, role: user.permissions.primaryRole };
  }
}
```

Inline auth configs can pass `toMastraUser` too. If the provider user
has no role and an RBAC provider is configured, the primary RBAC role
fills it in, so `user.role` also works with WorkOS, Okta, Google and
Neon. The raw provider user is still available when you need
provider-specific fields, and the new context key is reserved, so
clients can't spoof it through the request body:

```ts
instructions: ({ requestContext }) => {
  const rawUser = requestContext.get('mastra__user'); // provider-specific object, unchanged
  // ...
},
```

Dynamic `vectorStore` resolvers on RAG tools get `user` as well:

```ts
createVectorQueryTool({
  indexName: 'docs',
  model: embedder,
  vectorStore: ({ user }) => (user ? tenantStores.get(user.id)! : sharedStore),
});
```

Inside core, every place that invoked a `DynamicArgument` callback
inline now goes through a single `resolveDynamicArgument` helper, which
reads the user from `requestContext` at call time. This is non-breaking:
callbacks get an extra optional field, providers get a method with a
working default. Requests served through an `MCPServer` don't get `user`
yet, since MCP builds its own request context; that's documented.

Tested with unit tests for the helper, normalization and each provider
override, middleware tests (inline config, provider role, RBAC role,
CompositeAuth ordering, unauthenticated), regression tests for the
migrated call sites, and an end-to-end test where an agent behind a fake
auth provider gets personalized instructions. Core, server, rag and the
touched auth packages typecheck clean, and their suites pass.



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

## ELI5
When a signed-in user makes a request, configuration callbacks can now
use a standard set of details about that user. When a workflow resumes,
it uses the new request’s user details instead of restoring them from
the earlier run.

## Summary
- Added optional `user` data to `DynamicArgument` callbacks and RAG
vector-store resolvers. Callbacks can also use `getRequestUser()` to
read the normalized user from request context.
- Added the `MastraUser` type and `toMastraUser()` normalization hooks
for auth providers and inline auth configs. The server stores the
normalized user in a reserved request-context key and uses the primary
RBAC role when the user has no role.
- Updated core dynamic configuration paths to use the shared resolver.
Added user support to agent scopes and migrated A2A memory resolution.
- Added `withoutLiveRequestKeys()` to remove live authentication and
authorization data from saved context during workflow resume, restart,
and time travel. Saved non-authentication context, such as tenant data,
remains available.
- Added documentation and changesets. Raised relevant `@mastra/core`
peer dependency minimums to 1.81.0. MCPServer requests do not receive
the normalized `user`.

## Validation
The author reports passing typechecks and test suites across core,
server, RAG, and several auth packages. The author also reports three
failing Inngest tests and earlier failures in evented workflow and
scheduler tests, which reportedly fail the same way on comparison
sources. These results are author-reported and have not been
independently verified.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-11-12 10:55:12 -05:00
dane-ai-mastra[bot]
8bce7717eb
chore: version packages (alpha) (#29986)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-11-10 20:51:40 -08:00
Arthur Fiorette
bd1fca831d
fix(deployer): build and serve file-based agents with CloudflareDeployer (#30003) 2026-11-10 20:32:18 -08:00
dane-ai-mastra[bot]
f21e0742ce chore: version packages 2026-11-07 04:18:11 +00:00
Arthur Fiorette
d076f44bd7
fix(deployer): Windows backslash specifiers and deployer not stripped from build (#29578) 2026-11-05 14:14:02 -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[bot]
6e8dfcb83f chore: version - exit prerelease mode 2026-11-03 23:45:58 +00: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
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
Ward Peeters
6a18fc5094
refactor: move the bundler/deployer contract into @internal/deployer (#28428)
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-10-29 16:25:04 +01:00
dane-ai-mastra[bot]
6a191d46dc chore: version - exit prerelease mode 2026-10-28 13:15:52 +00: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
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
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]
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
Leo
ecf555c696
fix(deployer-cloudflare): enable WeakRef in the default worker runtime (#28146)
Co-authored-by: mastra-platform[bot] <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-10-22 22:24:02 -04:00
Ward Peeters
461ee61237
fix: repair build and test failures surfaced by the release-PR run (#28139)
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-10-22 16:48:29 +02:00
Dane - AI (Mastra)
d73dc0cef1
chore(deps): update dependency wrangler to ^4.151.2 (#28008) 2026-10-22 14:46:15 +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
Max Katz
9a423dae48
refactor(lint): replace ESLint with type-aware oxlint (#27476) 2026-10-18 10:38:35 -07:00
dane-ai-mastra[bot]
71956e0430 chore: version packages 2026-10-16 16:04:19 +00:00
dane-ai-mastra[bot]
a15924e709 chore: version packages 2026-10-16 04:04:12 +00:00
dane-ai-mastra[bot]
fe516094f5 chore: version - exit prerelease mode 2026-10-15 21:33:45 +00:00
dane-ai-mastra[bot]
e478d86cea
chore: version packages (alpha) (#27054)
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.23.0-alpha.3


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


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


## @mastra/memory@1.38.0-alpha.0


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


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


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


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


## @mastra/deployer-cloudflare@1.2.37-alpha.1


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


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


## create-factory@0.2.10-alpha.3


## mastracode@0.47.1-alpha.3


## @mastra/agent-builder@1.1.29-alpha.0


## mastra@1.34.2-alpha.3


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


## @mastra/editor@0.16.3-alpha.0


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


## @mastra/schema-compat@1.3.15-alpha.0


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


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


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


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


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


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


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


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


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


## @mastra/clickhouse@1.25.1-alpha.1


## @mastra/duckdb@1.14.1-alpha.0


## @mastra/pg@1.31.2-alpha.1


## @mastra/voice-google-gemini-live@0.14.16-alpha.0


## @mastra/voice-openai-realtime@0.14.6-alpha.0


## @mastra/voice-sarvam@1.1.2-alpha.0


## @mastra/voice-xai-realtime@0.2.15-alpha.0


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


## @mastra/e2b@0.14.1-alpha.0


## @mastra/e2b-desktop@0.1.8-alpha.0


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


## create-mastra@1.34.2-alpha.3


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

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-14 17:11:14 -07:00
Shane Thomas
49c4b0dfa5
fix(deployer-cloudflare): stub @opentelemetry/api so Wrangler builds work with posthog-node 5.56 (#27079)
Fixes #27037.

`posthog-node` 5.56.1 (published today, pulled in by `@mastra/core`)
added a lazy `import('@opentelemetry/api')` for an optional peer
dependency. Wrangler tries to bundle every import it finds, so any
Cloudflare build of a project that doesn't install `@opentelemetry/api`
now fails with `Could not resolve "@opentelemetry/api"`. That's what is
turning `E2E deployers` red on every PR, and fresh user projects hit the
same error.

When no `node_modules` at or above the build output contains
`@opentelemetry/api`, the Cloudflare deployer now writes a small stub
and aliases the package to it in the generated Wrangler config, the same
way it already stubs `typescript`, `execa` and `module`:

```js
// .mastra/output/opentelemetry-api-stub.mjs
throw new Error('@opentelemetry/api is not installed');
```

A dynamic import of it rejects just like a missing optional peer does,
and `posthog-node` already catches that (it only uses the API for
`$exception` events, which Mastra doesn't send). Projects that install
`@opentelemetry/api`, or alias it themselves, get no stub and no alias.

I checked this against a real fixture built from a local registry with
`posthog-node@5.56.1`: without the alias, `wrangler deploy --dry-run`
fails with the same two errors as CI, and with it both `wrangler.json`
and the project-root `wrangler.jsonc` build. The cloudflare deployer E2E
(`wrangler dev`, `/test` and `/api/tools`) passes locally, and I ran the
stub inside workerd to confirm the import rejects and PostHog still
sends events. New unit tests cover the missing, installed and
user-aliased cases.


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

## ELI5

Some Cloudflare builds fail because a package looks for an optional tool
that the project may not have installed. This change makes Wrangler use
a small stub only when that tool is missing, so the build can continue
without changing projects that install it or provide their own alias.

## Changes

- The Cloudflare deployer checks for `@opentelemetry/api` in
`node_modules` directories from the output directory upward.
- If the package is missing and the user has not configured an alias,
the deployer writes a stub that throws an installation error and adds
the stub alias to both generated Wrangler configurations.
- Unit tests cover the missing-package, installed-package, and
user-alias cases. The Cloudflare E2E test checks the generated alias.
- A patch changeset documents the fix for the Wrangler resolution
failure reported in `#27037`.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
Co-authored-by: Mastra CI <ci@mastra.ai>
Co-authored-by: Abhi Aiyer <abhiaiyer91@gmail.com>
2026-10-14 16:47:18 -07:00
dane-ai-mastra[bot]
7173ca28af
chore: version packages (alpha) (#26962)
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/core@1.78.0-alpha.0

### Minor Changes

- Added `scopes` to agents: the addresses a run acts as, written as
`<type>:<value>` (for example `org:acme`, `resource:user-123`,
`thread:conversation-123`).
([#26593](https://github.com/mastra-ai/mastra/pull/26593))

**Setting scopes.** Pass them per call on `stream`, `generate`,
`network`, `sendMessage`, `queueMessage` and `sendSignal`, set them on
the agent, or set them from trusted middleware with the new
`MASTRA_SCOPES_KEY` request context key. Mastra combines all three. Read
an agent's configured scopes with `agent.getScopes()`.

**Memory.** Memory reads its resource and thread from `resource:` and
`thread:` scopes, in addition to `memory.resource`, `memory.thread` and
the existing request context keys. If they name different values, the
call throws a 400 error instead of silently picking one. Runs with no
scopes from any source behave as before.

  ```ts
  const agent = new Agent({
    id: 'support',
    model: 'openai/gpt-5-mini',
    memory: new Memory(),
    scopes: ({ requestContext }) => {
// Set by your auth middleware. Request bodies can fill unreserved keys,
so only read trusted ones.
      const orgId = requestContext.get('org-id');
      return orgId ? [`org:${orgId}`] : [];
    },
  });

  // Before
await agent.generate('Hi', { memory: { resource: 'user-123', thread:
'conversation-123' } });

  // After
await agent.generate('Hi', { scopes: ['resource:user-123',
'thread:conversation-123'] });
  ```

**Nested calls.** Tools, processors and subagents see the run's other
scopes (for example `org:acme`) under `MASTRA_SCOPES_KEY`, but not its
`resource:` and `thread:` scopes, so nested agent calls can choose their
own thread.

**Suspended runs.** Suspended runs keep their scopes when resumed: a
resume may repeat some or all of them but cannot add new ones.

**Upgrading.** Upgrade `@mastra/server` together with this release.
While an older server is registered, agents refuse scopes from the call
and the request context with an `AGENT_SCOPES_SERVER_OUTDATED` error
(HTTP 400); the agent's own `scopes` option still applies. This
detection relies on the server registering itself with Mastra, which
`@mastra/server` has done since `1.0.0-beta.5`. Servers older than that
— and custom server adapters that never call `mastra.setMastraServer()`
— are indistinguishable from no server at all, so they are not detected:
upgrade them rather than relying on the guard.

Runs suspended before this release have no recorded scope set; resuming
one adopts the scopes supplied at resume time (the same trust checks as
a fresh run apply) instead of rejecting them. Runs suspended after the
upgrade record their set — including the empty set — and a resume may
not add to it.

### Patch Changes

- Fixed durable recovery observers hanging when recovery fails before
the stream starts.
([#26918](https://github.com/mastra-ai/mastra/pull/26918))

- Fixed background task events leaking across resources. Previously,
calling `BackgroundTaskManager.stream()` without a `resourceId`
delivered every resource's task events, including tool arguments and
results. Without a `resourceId`, `stream()` now only delivers tasks that
have no resource. To subscribe to every resource, pass `allResources:
true`: ([#26895](https://github.com/mastra-ai/mastra/pull/26895))

  ```ts
const events = mastra.backgroundTaskManager.stream({ agentId:
'my-agent', allResources: true });
  ```

The `/background-tasks`, `/background-tasks/stream` and
`/background-tasks/:backgroundTaskId` routes now use the resource from
the request context. A resource-scoped caller only sees its own tasks:
requesting a different `resourceId` returns 403, and fetching another
resource's task returns 404. An empty resource id in the request context
is rejected with 403. Requests without a resource in the request context
keep access to all resources.
## @mastra/client-js@1.54.1-alpha.0

### Patch Changes

- Updated dependencies
[[`0b1ea6c`](0b1ea6ca62),
[`33eb344`](33eb344ebf),
[`5d12fbf`](5d12fbfcd7)]:
  - @mastra/core@1.78.0-alpha.0
## @mastra/react@1.10.1-alpha.0

### Patch Changes

- Updated dependencies
[[`0b1ea6c`](0b1ea6ca62),
[`33eb344`](33eb344ebf),
[`5d12fbf`](5d12fbfcd7)]:
  - @mastra/core@1.78.0-alpha.0
  - @mastra/client-js@1.54.1-alpha.0
## @mastra/deployer-cloud@1.78.0-alpha.0

### Patch Changes

- Updated dependencies
[[`0b1ea6c`](0b1ea6ca62),
[`33eb344`](33eb344ebf),
[`5d12fbf`](5d12fbfcd7)]:
  - @mastra/core@1.78.0-alpha.0
  - @mastra/deployer@1.78.0-alpha.0
## @mastra/deployer-cloudflare@1.2.37-alpha.0

### Patch Changes

- Updated dependencies
[[`0b1ea6c`](0b1ea6ca62),
[`33eb344`](33eb344ebf),
[`5d12fbf`](5d12fbfcd7)]:
  - @mastra/core@1.78.0-alpha.0
  - @mastra/deployer@1.78.0-alpha.0
## @mastra/deployer-netlify@1.2.37-alpha.0

### Patch Changes

- Updated dependencies
[[`0b1ea6c`](0b1ea6ca62),
[`33eb344`](33eb344ebf),
[`5d12fbf`](5d12fbfcd7)]:
  - @mastra/core@1.78.0-alpha.0
  - @mastra/deployer@1.78.0-alpha.0
## @mastra/deployer-sandbox@0.3.22-alpha.0

### Patch Changes

- Updated dependencies
[[`0b1ea6c`](0b1ea6ca62),
[`33eb344`](33eb344ebf),
[`5d12fbf`](5d12fbfcd7)]:
  - @mastra/core@1.78.0-alpha.0
  - @mastra/deployer@1.78.0-alpha.0
## @mastra/deployer-vercel@1.2.37-alpha.0

### Patch Changes

- Updated dependencies
[[`0b1ea6c`](0b1ea6ca62),
[`33eb344`](33eb344ebf),
[`5d12fbf`](5d12fbfcd7)]:
  - @mastra/core@1.78.0-alpha.0
  - @mastra/deployer@1.78.0-alpha.0
## @mastra/longmemeval@1.1.37-alpha.0

### Patch Changes

- Updated dependencies
[[`0b1ea6c`](0b1ea6ca62),
[`33eb344`](33eb344ebf),
[`5d12fbf`](5d12fbfcd7)]:
  - @mastra/core@1.78.0-alpha.0
## @mastra/opencode@0.1.37-alpha.0

### Patch Changes

- Updated dependencies
[[`0b1ea6c`](0b1ea6ca62),
[`33eb344`](33eb344ebf),
[`5d12fbf`](5d12fbfcd7)]:
  - @mastra/core@1.78.0-alpha.0
## @mastra/factory@0.22.1-alpha.0

### Patch Changes

- Fixed runs failing with "Factory source-control repository not found."
after a repository's source-control connection was reinstalled. When a
card's repository is linked but turned off in the Factory's environment,
the error now names the repository and says to turn it on under Settings
→ Environment.
([#26970](https://github.com/mastra-ai/mastra/pull/26970))

- Updated dependencies
[[`0b1ea6c`](0b1ea6ca62),
[`33eb344`](33eb344ebf),
[`5d12fbf`](5d12fbfcd7)]:
  - @mastra/core@1.78.0-alpha.0
  - @mastra/code-sdk@1.13.1-alpha.0
## create-factory@0.2.10-alpha.0

### Patch Changes

- Updated dependencies
[[`27b03c3`](27b03c3b61)]:
  - mastra@1.34.2-alpha.0
## @mastra/code-sdk@1.13.1-alpha.0

### Patch Changes

- Updated dependencies
[[`0b1ea6c`](0b1ea6ca62),
[`33eb344`](33eb344ebf),
[`5d12fbf`](5d12fbfcd7)]:
  - @mastra/core@1.78.0-alpha.0
## mastracode@0.47.1-alpha.0

### Patch Changes

- Updated dependencies
[[`0b1ea6c`](0b1ea6ca62),
[`33eb344`](33eb344ebf),
[`5d12fbf`](5d12fbfcd7)]:
  - @mastra/core@1.78.0-alpha.0
  - @mastra/code-sdk@1.13.1-alpha.0
## mastra@1.34.2-alpha.0

### Patch Changes

- Fixed new Factory sessions showing "Failed to load messages: Thread
not found" while the session's environment is still starting. The
session shows an empty history until it is ready, then loads it,
including after a page reload.
([#26970](https://github.com/mastra-ai/mastra/pull/26970))

- Updated dependencies
[[`0b1ea6c`](0b1ea6ca62),
[`33eb344`](33eb344ebf),
[`5d12fbf`](5d12fbfcd7)]:
  - @mastra/core@1.78.0-alpha.0
  - @mastra/deployer@1.78.0-alpha.0
## @mastra/deployer@1.78.0-alpha.0

### Patch Changes

- Updated dependencies
[[`0b1ea6c`](0b1ea6ca62),
[`0b1ea6c`](0b1ea6ca62),
[`33eb344`](33eb344ebf),
[`5d12fbf`](5d12fbfcd7)]:
  - @mastra/core@1.78.0-alpha.0
  - @mastra/server@1.78.0-alpha.0
## @mastra/mcp-docs-server@1.3.8-alpha.0

### Patch Changes

- Updated dependencies
[[`0b1ea6c`](0b1ea6ca62),
[`33eb344`](33eb344ebf),
[`5d12fbf`](5d12fbfcd7)]:
  - @mastra/core@1.78.0-alpha.0
## @mastra/playground-ui@63.0.1-alpha.0

### Patch Changes

- Updated dependencies
[[`0b1ea6c`](0b1ea6ca62),
[`33eb344`](33eb344ebf),
[`5d12fbf`](5d12fbfcd7)]:
  - @mastra/core@1.78.0-alpha.0
  - @mastra/client-js@1.54.1-alpha.0
  - @mastra/react@1.10.1-alpha.0
## @mastra/server@1.78.0-alpha.0

### Patch Changes

- Agent scopes support:
([#26593](https://github.com/mastra-ai/mastra/pull/26593))

- Agent routes ignore `scopes` in request bodies (including
`ifIdle.streamOptions.scopes`), and `mastra__scopes` is a reserved
request context key.
  - Set scopes from trusted server middleware instead:

    ```ts
    import { MASTRA_SCOPES_KEY } from '@mastra/core/request-context';

    server: {
      middleware: [async (c, next) => {
c.get('requestContext').set(MASTRA_SCOPES_KEY,
[`org:${orgIdFromAuth(c)}`]);
        await next();
      }],
    }
    ```

  - A conflicting `resource:` or `thread:` scope returns a 400 error.
- With an older `@mastra/server` registered, agent calls that pass
scopes — from the call or the request context — fail with
`AGENT_SCOPES_SERVER_OUTDATED` (HTTP 400). Scopes configured on the
agent itself still work. Upgrade the server to lift the restriction.

- Fixed background task events leaking across resources. Previously,
calling `BackgroundTaskManager.stream()` without a `resourceId`
delivered every resource's task events, including tool arguments and
results. Without a `resourceId`, `stream()` now only delivers tasks that
have no resource. To subscribe to every resource, pass `allResources:
true`: ([#26895](https://github.com/mastra-ai/mastra/pull/26895))

  ```ts
const events = mastra.backgroundTaskManager.stream({ agentId:
'my-agent', allResources: true });
  ```

The `/background-tasks`, `/background-tasks/stream` and
`/background-tasks/:backgroundTaskId` routes now use the resource from
the request context. A resource-scoped caller only sees its own tasks:
requesting a different `resourceId` returns 403, and fetching another
resource's task returns 404. An empty resource id in the request context
is rejected with 403. Requests without a resource in the request context
keep access to all resources.

- Updated dependencies
[[`0b1ea6c`](0b1ea6ca62),
[`33eb344`](33eb344ebf),
[`5d12fbf`](5d12fbfcd7)]:
  - @mastra/core@1.78.0-alpha.0
## @mastra/elysia@0.1.18-alpha.0

### Patch Changes

- Updated dependencies
[[`0b1ea6c`](0b1ea6ca62),
[`0b1ea6c`](0b1ea6ca62),
[`33eb344`](33eb344ebf),
[`5d12fbf`](5d12fbfcd7)]:
  - @mastra/core@1.78.0-alpha.0
  - @mastra/server@1.78.0-alpha.0
## @mastra/express@1.5.22-alpha.0

### Patch Changes

- Updated dependencies
[[`0b1ea6c`](0b1ea6ca62),
[`0b1ea6c`](0b1ea6ca62),
[`33eb344`](33eb344ebf),
[`5d12fbf`](5d12fbfcd7)]:
  - @mastra/core@1.78.0-alpha.0
  - @mastra/server@1.78.0-alpha.0
## @mastra/fastify@1.5.22-alpha.0

### Patch Changes

- Updated dependencies
[[`0b1ea6c`](0b1ea6ca62),
[`0b1ea6c`](0b1ea6ca62),
[`33eb344`](33eb344ebf),
[`5d12fbf`](5d12fbfcd7)]:
  - @mastra/core@1.78.0-alpha.0
  - @mastra/server@1.78.0-alpha.0
## @mastra/hono@1.7.20-alpha.0

### Patch Changes

- Updated dependencies
[[`0b1ea6c`](0b1ea6ca62),
[`0b1ea6c`](0b1ea6ca62),
[`33eb344`](33eb344ebf),
[`5d12fbf`](5d12fbfcd7)]:
  - @mastra/core@1.78.0-alpha.0
  - @mastra/server@1.78.0-alpha.0
## @mastra/koa@1.7.22-alpha.0

### Patch Changes

- Updated dependencies
[[`0b1ea6c`](0b1ea6ca62),
[`0b1ea6c`](0b1ea6ca62),
[`33eb344`](33eb344ebf),
[`5d12fbf`](5d12fbfcd7)]:
  - @mastra/core@1.78.0-alpha.0
  - @mastra/server@1.78.0-alpha.0
## @mastra/nestjs@0.2.37-alpha.0

### Patch Changes

- The NestJS server marks itself as reserving agent scopes, like the
other server adapters. Its routes already ignore `scopes` in request
bodies and treat `mastra__scopes` as reserved, so agents accept scopes
from your code and middleware when served through NestJS.
([#26593](https://github.com/mastra-ai/mastra/pull/26593))

- Updated dependencies
[[`0b1ea6c`](0b1ea6ca62),
[`0b1ea6c`](0b1ea6ca62),
[`33eb344`](33eb344ebf),
[`5d12fbf`](5d12fbfcd7)]:
  - @mastra/core@1.78.0-alpha.0
  - @mastra/server@1.78.0-alpha.0
## @mastra/next@0.2.36-alpha.0

### Patch Changes

- Updated dependencies
[[`0b1ea6c`](0b1ea6ca62),
[`0b1ea6c`](0b1ea6ca62),
[`33eb344`](33eb344ebf),
[`5d12fbf`](5d12fbfcd7)]:
  - @mastra/core@1.78.0-alpha.0
  - @mastra/server@1.78.0-alpha.0
  - @mastra/hono@1.7.20-alpha.0
## @mastra/tanstack-start@0.2.36-alpha.0

### Patch Changes

- Updated dependencies
[[`0b1ea6c`](0b1ea6ca62),
[`0b1ea6c`](0b1ea6ca62),
[`33eb344`](33eb344ebf),
[`5d12fbf`](5d12fbfcd7)]:
  - @mastra/core@1.78.0-alpha.0
  - @mastra/server@1.78.0-alpha.0
  - @mastra/hono@1.7.20-alpha.0
## @mastra/inngest@1.10.6-alpha.0

### Patch Changes

- Inngest agents honor agent `scopes` when used with a `@mastra/core`
release that supports them. Memory identity comes from `resource:` and
`thread:` scopes, tools and processors see the other scopes, and a
resumed run keeps the scopes it started with. Resuming with a scope the
run did not hold throws an error and leaves the suspended run untouched.
Scopes in the agent's `defaultOptions` count as the agent's own scopes,
not the caller's.
([#26593](https://github.com/mastra-ai/mastra/pull/26593))

- Updated dependencies
[[`0b1ea6c`](0b1ea6ca62),
[`33eb344`](33eb344ebf),
[`5d12fbf`](5d12fbfcd7)]:
  - @mastra/core@1.78.0-alpha.0
## @mastra/temporal@0.4.16-alpha.0

### Patch Changes

- Updated dependencies
[[`0b1ea6c`](0b1ea6ca62),
[`33eb344`](33eb344ebf),
[`5d12fbf`](5d12fbfcd7)]:
  - @mastra/core@1.78.0-alpha.0
  - @mastra/deployer@1.78.0-alpha.0
## create-mastra@1.34.2-alpha.0


## @internal/playground@1.34.2-alpha.0

### Patch Changes

- Updated dependencies
[[`0b1ea6c`](0b1ea6ca62),
[`33eb344`](33eb344ebf),
[`5d12fbf`](5d12fbfcd7)]:
  - @mastra/core@1.78.0-alpha.0
  - @mastra/client-js@1.54.1-alpha.0
  - @mastra/react@1.10.1-alpha.0
  - @mastra/playground-ui@63.0.1-alpha.0

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-13 23:10:04 -07:00
dane-ai-mastra[bot]
f88217d19b chore: version - exit prerelease mode 2026-10-14 05:19:31 +00:00
dane-ai-mastra[bot]
e0e844d05c chore: version packages 2026-10-12 04:14:48 +00:00
dane-ai-mastra[bot]
81299c921d chore: version - exit prerelease mode 2026-10-11 16:59:51 +00:00
dane-ai-mastra[bot]
60bfdc5ea4 chore: version packages 2026-10-07 16:06:11 +00:00
dane-ai-mastra[bot]
b10b70fd77 chore: version - exit prerelease mode 2026-10-07 08:40:03 +00:00
shreyas-mastra
bf0dd07091
security: Vanta remediation pass 2026-10-05 (#25966)
Update 2026-10-06 (commits added on this branch; origin/main merged in
to clear the lockfile conflict)

Dependabot opened new alerts overnight (4 critical). This pass adds:
- braintrust ^3.24.0 -> ^3.36.0 in @mastra/braintrust. braintrust 3.27
pulled in simple-git 3.36.0, which has critical and high advisories
(GHSA-x6jw-m9v5-85vh, GHSA-v5rq-49vh-5v5c via @simple-git/argv-parser
1.1.1, GHSA-858h-whjf-mvg5, GHSA-g4wm-2vf7-vfgr). Those are only fixed
in simple-git 4. braintrust 3.36 no longer depends on simple-git, so
simple-git drops out of the lockfile. @mastra/braintrust only uses
initLogger and currentSpan.
- wrangler ^4.110.0 -> ^4.147.0 (devDependency of
@mastra/deployer-cloudflare, type-only import). This moves workerd
1.20260708.1 -> 1.20261001.1 on that chain (Aikido medium). workerd
1.20260714.1 is still there through the miniflare 4 devDependency in
stores/cloudflare and stores/cloudflare-d1.
- source-map-js 1.2.1 -> 1.2.2 (GHSA-68fv-2mgg-jv7q, high). Added the
floor `source-map-js@>=1.0.0 <1.2.2: 1.2.2` in the root and in 15 nested
pnpm workspaces (9 e2e projects, mastracode/web, otel-bridge agent-hub
and hono-multi, agent-builder, mcp and memory integration-tests).
postcss, css-tree, magicast and @tailwindcss/node all declare ^1.2.x. In
the customer-refund template, a plain npm lock refresh was enough (no
override).
- postcss-selector-parser: raised the existing floor from `>=7.1.0
<7.1.3: 7.1.3` to `>=7.1.0 <7.1.6: 7.1.6` (GHSA-rj75-hqrm-r3gf, medium).
- observability/_examples/otel-bridge/hono-multi: tsx catalog ^4.21.0 ->
^4.23.15. tsx 4.23 uses esbuild ~0.28, so esbuild 0.27.2 is gone (Aikido
high and low, fixed in 0.28.1).
- Changeset `.changeset/vanta-2026-10-06.md`: patch for
@mastra/braintrust.

Still not fixed (as of 2026-10-06)
- sprintf-js 1.0.3/1.1.3 (GHSA-hp3w-g68c-fv3c): no patched release.
- postcss-selector-parser 6.0.10/6.1.3: the fix is only in 7.1.6.
@tailwindcss/typography 0.5.20 pins 6.0.10 exactly, and cssnano
6/postcss-calc 9 use ^6.
- katex 0.16.47 (GHSA-238p-pmpm-9mq7, low): the fix is in 0.18.2.
mermaid 12.1.0 still declares ^0.16.47.
- http-cache-semantics: 4.3.0 is now older than 24h, but it still
doesn't touch the max-stale path, and the advisory still lists no
patched version.
- braces 3.0.3 has no new release.
- The rest of the deferred list below is unchanged.

---

Vanta remediation for 2026-10-05. The finding list was rebuilt from
GitHub Dependabot, OSV-scanner on every tracked lockfile, and Aikido
intel (full intel.aikido.dev feed re-pulled today). It is not a Vanta
export.

What changed

Package bumps
- probe-image-size ^7.2.3 -> ^7.4.0 in @mastra/memory
(GHSA-gjj5-9665-rwrc, high).
- verdaccio ^6.10.4 -> ^6.10.5 in the 9 e2e projects. That moves
@verdaccio/core to 8.3.2 and js-yaml 5.2.2 -> 5.4.1
(GHSA-r3ph-w7gj-g6xm, medium).
- smol-toml 1.8.0 -> 1.9.0 pin in @mastra/code-sdk.

Root lockfile refresh (no range changes)
- serialize-javascript 7.0.5 -> 7.1.2, shell-quote 1.10.0 -> 1.12.0, ws
7.5.11 -> 7.5.13, enhanced-resolve -> 5.26.0, fs-extra 11.3.5 -> 11.4.1,
@sinclair/typebox 0.27.8 -> 0.27.12, @zip.js/zip.js 2.8.26 -> 2.23.0,
memfs/@jsonjoy.com/fs-snapshot 4.57.2 -> 4.80.0, @vue/* 3.5.38 ->
3.5.43.

pnpm overrides, for parents that pin an exact vulnerable version. All
stay in the same major.
- modern-tar 0.7.7 (just-bash), smol-toml 1.9.0 (just-bash,
@blaxel/core, @react-grab/cli, modal), strnum 2.4.2 (fast-xml-parser
5.10.1), inline-style-parser 0.2.9 (style-to-object 1.0.11),
`@opentelemetry/configuration>yaml` 2.9.1 (sdk-node 0.221).

Nested lockfiles
- shell-quote floor raised from <1.10.0 to <1.11.0 in examples/agent,
examples/voice-agent and otel-bridge/agent-hub.
- yaml 2.9.0 -> 2.9.1 in e2e-tests/pkg-outputs, examples/durable-agents,
mastracode/web, packages/mcp/integration-tests and the customer-refund
template.
- next 16.3.6 -> 16.3.8 in packages/memory/integration-tests.
- customer-refund template: tinypool 2.1.0 -> 2.1.2 through an override
scoped to oxfmt. oxfmt 0.59 pins it exactly, and bumping oxfmt would
change the template's format check.

Not fixed here
- braces 3.0.3 (GHSA-vfj7-8cjw-p6xm) and http-cache-semantics 4.2.0
(GHSA-ch52-4w7c-c8xp): no patched release. http-cache-semantics 4.3.0 is
outside the advisory range, but it doesn't change the max-stale code
path, so bumping to it would only hide the alert.
- extract-zip 2.0.1: no patched release. It comes from the webdriverio
chain that #25855 removes.
- workerd 1.20260708/1.20260714 (Aikido medium): miniflare 4.x stops at
workerd 1.20260730. The fix needs miniflare 5, which is only published
as an alpha.
- Major-only: @ai-sdk/provider-utils 2.2.8 / ai 4.3.19 (AI SDK v4),
@opentelemetry/core 1.30.1, esbuild 0.18/0.25/0.27.0 (convex pins 0.27.0
exactly), js-yaml 3, brace-expansion 1/2, uuid 11, zod 3, pino 8/9,
undici 6, plus other Aikido lows.
- websocket-driver 0.7.5: Aikido says the fix is 0.8.x, but no 0.8 is
published on npm.

The changeset is a patch for @mastra/memory and @mastra/code-sdk.


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

This PR updates several dependencies that have security fixes. It also
adds version rules so nested projects use safer versions of related
packages.

## Changes

- Updates `probe-image-size` in `@mastra/memory` to `^7.4.0` and pins
`smol-toml` in `@mastra/code-sdk` to `1.9.0`.
- Updates Verdaccio to `^6.10.5` in nine end-to-end test projects.
- Raises `shell-quote` overrides to `1.11.0` and adds overrides for
transitive dependencies, including `yaml`, `source-map-js`,
`postcss-selector-parser`, `modern-tar`, `smol-toml`, `strnum`,
`inline-style-parser`, and `tinypool`.
- Updates `braintrust` to `^3.36.0`, `wrangler` to `^4.147.0`, and `tsx`
to `^4.23.15`.
- Adds patch changesets for `@mastra/memory`, `@mastra/code-sdk`, and
`@mastra/braintrust`. The changesets report no API changes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-10-06 10:35:09 -04:00
dane-ai-mastra[bot]
a84cbc0eef chore: version packages 2026-10-02 04:06:41 +00:00
dane-ai-mastra[bot]
b21e46e19b chore: version - exit prerelease mode 2026-10-01 18:04:32 +00:00
dane-ai-mastra[bot]
a354bdc1ca chore: version packages 2026-10-01 16:12:57 +00:00
dane-ai-mastra[bot]
8b35a6c1d6 chore: version - exit prerelease mode 2026-10-01 08:22:20 +00:00
dane-ai-mastra[bot]
b782191b6c chore: version packages 2026-09-30 16:07:15 +00:00
dane-ai-mastra[bot]
5306a14346 chore: version - exit prerelease mode 2026-09-29 23:50:38 +00:00
dane-ai-mastra[bot]
6ce2452b53 chore: version packages 2026-09-25 04:05:37 +00:00
dane-ai-mastra[bot]
6721bffd7e chore: version - exit prerelease mode 2026-09-24 23:17:52 +00:00
dane-ai-mastra[bot]
f62037ece1 chore: version packages 2026-09-24 16:05:56 +00:00
dane-ai-mastra[bot]
6d36499758 chore: version - exit prerelease mode 2026-09-24 12:50:16 +00:00
dane-ai-mastra[bot]
744e4fd375 chore: version packages 2026-09-23 16:05:15 +00:00