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

1,794 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]
05a6931471
chore: version packages (alpha) (#30172)
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.60.0-alpha.12

### Minor Changes

- Allow `querySpans()` to sort by `model` or `provider`.
([#30096](https://github.com/mastra-ai/mastra/pull/30096))

  ```ts
  orderBy: [{ field: 'model', direction: 'asc' }];
  ```

### Patch Changes

- The generated route types for scores now include the `SCORER` and
`PROCESSOR` entity types, matching the entity types experiments can
emit. ([#30145](https://github.com/mastra-ai/mastra/pull/30145))

- Add span-local error counts.
([#30088](https://github.com/mastra-ai/mastra/pull/30088))

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`f071044`](f0710446e0),
[`72abae6`](72abae68eb),
[`987566e`](987566e882)]:
  - @mastra/core@1.83.0-alpha.12
## @mastra/factory@0.28.0-alpha.14

### Minor Changes

- A card's sandbox now stops as soon as the card is done with that
context, instead of idling until the provider times it out.
([#29981](https://github.com/mastra-ai/mastra/pull/29981))

- When a card moves out of the last phase of a context into a phase that
runs in another one, Factory stops that context's sandbox. Triage →
Planning stops the triage sandbox; Planning → Building keeps the shared
`work` sandbox running. A run still in flight on the session keeps its
sandbox until it ends.
- When a card finishes, Factory stops every sandbox it holds, from any
Factory process, by identity through the configured sandbox provider.
Before, only the process that had opened a sandbox stopped it.
- A card that comes back to a context resumes the same sandbox with its
files.

Stopping never fails the move. Sandboxes are stopped, not destroyed;
deleting a session still destroys its sandbox.

- Added two read routes that answer what the new session page shows
without sending a project's cards.
([#30097](https://github.com/mastra-ai/mastra/pull/30097))

`GET /web/factory/projects/:id/work-items/starters` counts the cards
behind each starter on the project's default board, such as the cards
whose run failed, the pull requests awaiting review and the cards not
yet triaged.

`GET /web/factory/projects/:id/work-items/activity?since=<instant>`
returns how many cards the project has, and when cards were created and
completed since that instant. `since` is required and must be an ISO
date-time such as `2026-06-01T00:00:00.000Z`. The answer carries an
`ETag`, so asking again for the same `since` with `If-None-Match`
returns a 304 with no body when nothing changed.

### Patch Changes

- Fixed environment templates that could stop rebuilding for good. When
a build start was never recorded and the sandbox provider can't list its
builds (Mastra Platform), every later Build now, schedule and push run
used to skip with `unresolved` forever. Factory now treats that start as
failed 30 minutes after its lease lapsed and the next trigger builds.
([#30148](https://github.com/mastra-ai/mastra/pull/30148))

Saving a change to a template input (setup commands, the working
directory, settings, environment repositories, source-control
connections or Build variables) now rebuilds the template once the
project has one, so new sandboxes stop rerunning setup on every boot.
Saves that change nothing don't build, and a change saved during any
build, scheduled ones included, is built when that build ends.

- Factory sessions and MCP clients can now read the Factory's audit
trail with `factory_list_audit_events`: who did what to which work item,
run, branch or setting, and when. Filter by actor (`me`, a user id, or
an agent, optionally with the agent runs a person started), namespace or
exact actions, work item and time range, and page back with a cursor.
The tool only returns this Factory's events and never returns request
context (IP address, user agent), actor emails or event metadata beyond
who started an agent run. It leaves out events from or about other
people's private sessions.
([#30165](https://github.com/mastra-ai/mastra/pull/30165))

- Added a "Join the issue's card instead" switch to intake routes in the
Factory UI. A route for pull requests that close an issue can now put
the pull request on that issue's card instead of giving it a card of its
own; until now only the route Factory seeds could do this. The switch
shows on new and saved routes whose conditions include "Source kind is
Pull request" and "Pull request closes an issue is Yes".
([#30197](https://github.com/mastra-ai/mastra/pull/30197))

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`f071044`](f0710446e0),
[`72abae6`](72abae68eb),
[`987566e`](987566e882)]:
  - @mastra/core@1.83.0-alpha.12
  - @mastra/code-sdk@1.19.0-alpha.14
  - @mastra/mcp@2.9.0-alpha.4
## @mastra/observability@1.24.0-alpha.7

### Minor Changes

- Add span-local error counts.
([#30088](https://github.com/mastra-ai/mastra/pull/30088))

### Patch Changes

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`f071044`](f0710446e0),
[`72abae6`](72abae68eb),
[`987566e`](987566e882)]:
  - @mastra/core@1.83.0-alpha.12
## @mastra/core@1.83.0-alpha.12

### Minor Changes

- Add model and provider as span query sort fields.
([#30096](https://github.com/mastra-ai/mastra/pull/30096))

  ```ts
  orderBy: [{ field: 'model', direction: 'asc' }];
  ```

- Add span-local error counts.
([#30088](https://github.com/mastra-ai/mastra/pull/30088))

### Patch Changes

- Name the agent in the missing-storage error thrown by `Memory`. When
an agent's memory never received storage because the agent was never
attached to a Mastra instance, accessing `memory.storage` now fails with
`[Agent:<name>] Memory requires a storage provider to function. ...`, so
it is clear which agent is misconfigured. The registration and
standalone-storage guidance added in #29972 is unchanged, and agents
that inherit storage from their Mastra or configure it directly on
`Memory` are unaffected.
([#30164](https://github.com/mastra-ai/mastra/pull/30164))

- Experiments with a scorer or processor target now save their scores,
and workflow step scorers in experiments now save their step scores.
Previously these scores were silently discarded.
([#30145](https://github.com/mastra-ai/mastra/pull/30145))
## @mastra/mcp-apps-components@0.1.0-alpha.7

### Minor Changes

- Dashboards authored in chat now accept the same widgets as the
dashboard editor: KPIs that combine values (ratio, difference, max,
fallback), read trace, span or score aggregates (for example p95 span
duration) and use duration, percent or score formats; line charts of
scores; six more chart colors (blue, orange, pink, yellow, red, purple);
and optional KPI icon and detail, series color and table empty message.
([#30192](https://github.com/mastra-ai/mastra/pull/30192))

### Patch Changes

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`f071044`](f0710446e0),
[`72abae6`](72abae68eb),
[`987566e`](987566e882)]:
  - @mastra/core@1.83.0-alpha.12
## @mastra/playground-ui@69.0.0-alpha.14

### Minor Changes

- Widened what dashboard widgets can show:
([#30192](https://github.com/mastra-ai/mastra/pull/30192))

- KPIs can combine values with `ratio`, `minus`, `max` and `coalesce`,
read trace and span aggregates (for example `duration.p95`) and score
aggregates, and are formatted as `duration`, `percent` or `score`.
Combined values are compared with the previous window.
- Charts accept six more colors: `blue`, `orange`, `pink`, `yellow`,
`red` and `purple`.
- KPI `icon` and `detail`, series `color` and table `emptyMessage` are
optional. Series without a color pick one from a palette, and tables
without an empty message show "No data".

### Patch Changes

- Fixed hover highlights on cards and other surfaces stopping short of
the edge. The highlight now covers the whole surface and follows its
rounded corners exactly, including the sidebar credits card and
clickable cards. Hover highlights on these surfaces now switch instantly
instead of fading.
([#30047](https://github.com/mastra-ai/mastra/pull/30047))

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`f071044`](f0710446e0),
[`987566e`](987566e882),
[`72abae6`](72abae68eb),
[`987566e`](987566e882),
[`f071044`](f0710446e0)]:
  - @mastra/core@1.83.0-alpha.12
  - @mastra/client-js@1.60.0-alpha.12
  - @mastra/react@1.15.0-alpha.12
## @mastra/server@1.83.0-alpha.12

### Minor Changes

- Support model and provider sorting in span queries.
([#30096](https://github.com/mastra-ai/mastra/pull/30096))

### Patch Changes

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`f071044`](f0710446e0),
[`72abae6`](72abae68eb),
[`987566e`](987566e882)]:
  - @mastra/core@1.83.0-alpha.12
## @mastra/clickhouse@1.30.0-alpha.4

### Minor Changes

- Sort span queries by model or provider in ascending or descending
order. ([#30096](https://github.com/mastra-ai/mastra/pull/30096))

### Patch Changes

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`f071044`](f0710446e0),
[`72abae6`](72abae68eb),
[`987566e`](987566e882)]:
  - @mastra/core@1.83.0-alpha.12
## @mastra/duckdb@1.19.0-alpha.5

### Minor Changes

- Sort span queries by model or provider in ascending or descending
order. ([#30096](https://github.com/mastra-ai/mastra/pull/30096))

### Patch Changes

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`f071044`](f0710446e0),
[`72abae6`](72abae68eb),
[`987566e`](987566e882)]:
  - @mastra/core@1.83.0-alpha.12
## @mastra/pg@1.36.0-alpha.6

### Minor Changes

- Sort span queries by model or provider in ascending or descending
order. ([#30096](https://github.com/mastra-ai/mastra/pull/30096))

### Patch Changes

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`f071044`](f0710446e0),
[`72abae6`](72abae68eb),
[`987566e`](987566e882)]:
  - @mastra/core@1.83.0-alpha.12
## @mastra/react@1.15.0-alpha.12

### Patch Changes

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`f071044`](f0710446e0),
[`987566e`](987566e882),
[`72abae6`](72abae68eb),
[`987566e`](987566e882),
[`f071044`](f0710446e0)]:
  - @mastra/core@1.83.0-alpha.12
  - @mastra/client-js@1.60.0-alpha.12
## @mastra/deployer-cloud@1.83.0-alpha.12

### Patch Changes

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`f071044`](f0710446e0),
[`72abae6`](72abae68eb),
[`987566e`](987566e882)]:
  - @mastra/core@1.83.0-alpha.12
  - @mastra/deployer@1.83.0-alpha.12
## @mastra/longmemeval@1.1.42-alpha.12

### Patch Changes

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`f071044`](f0710446e0),
[`72abae6`](72abae68eb),
[`987566e`](987566e882)]:
  - @mastra/core@1.83.0-alpha.12
  - @mastra/libsql@1.30.0-alpha.3
## @mastra/opencode@0.1.42-alpha.12

### Patch Changes

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`f071044`](f0710446e0),
[`72abae6`](72abae68eb),
[`987566e`](987566e882)]:
  - @mastra/core@1.83.0-alpha.12
  - @mastra/libsql@1.30.0-alpha.3
## create-factory@0.4.3-alpha.14

### Patch Changes

- Updated dependencies
[[`1fbc69a`](1fbc69aa9a),
[`4e378c3`](4e378c3e26),
[`1fbc69a`](1fbc69aa9a)]:
  - mastra@1.39.0-alpha.14
## @mastra/code-sdk@1.19.0-alpha.14

### Patch Changes

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`72abae6`](72abae68eb),
[`f071044`](f0710446e0),
[`f071044`](f0710446e0),
[`987566e`](987566e882),
[`72abae6`](72abae68eb),
[`987566e`](987566e882),
[`f071044`](f0710446e0),
[`f071044`](f0710446e0)]:
  - @mastra/core@1.83.0-alpha.12
  - @mastra/observability@1.24.0-alpha.7
  - @mastra/duckdb@1.19.0-alpha.5
  - @mastra/client-js@1.60.0-alpha.12
  - @mastra/pg@1.36.0-alpha.6
  - @mastra/mcp@2.9.0-alpha.4
  - @mastra/libsql@1.30.0-alpha.3
## mastracode@0.50.0-alpha.13

### Patch Changes

- Fix `/settings` crashing when mouse preferences are missing from saved
settings by defaulting to Off.
([#30184](https://github.com/mastra-ai/mastra/pull/30184))

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`72abae6`](72abae68eb),
[`f071044`](f0710446e0),
[`f071044`](f0710446e0),
[`72abae6`](72abae68eb),
[`987566e`](987566e882),
[`f071044`](f0710446e0)]:
  - @mastra/core@1.83.0-alpha.12
  - @mastra/observability@1.24.0-alpha.7
  - @mastra/duckdb@1.19.0-alpha.5
  - @mastra/pg@1.36.0-alpha.6
  - @mastra/code-sdk@1.19.0-alpha.14
  - @mastra/mcp@2.9.0-alpha.4
  - @mastra/libsql@1.30.0-alpha.3
## @mastra/arize@1.3.30-alpha.7

### Patch Changes

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`f071044`](f0710446e0),
[`72abae6`](72abae68eb),
[`987566e`](987566e882)]:
  - @mastra/core@1.83.0-alpha.12
  - @mastra/otel-exporter@1.5.2-alpha.7
## @mastra/arthur@0.4.30-alpha.7

### Patch Changes

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`f071044`](f0710446e0),
[`72abae6`](72abae68eb),
[`987566e`](987566e882)]:
  - @mastra/core@1.83.0-alpha.12
  - @mastra/otel-exporter@1.5.2-alpha.7
## @mastra/braintrust@1.3.27-alpha.7

### Patch Changes

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`72abae6`](72abae68eb),
[`f071044`](f0710446e0),
[`72abae6`](72abae68eb),
[`987566e`](987566e882)]:
  - @mastra/core@1.83.0-alpha.12
  - @mastra/observability@1.24.0-alpha.7
## @mastra/datadog@1.4.22-alpha.7

### Patch Changes

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`72abae6`](72abae68eb),
[`f071044`](f0710446e0),
[`72abae6`](72abae68eb),
[`987566e`](987566e882)]:
  - @mastra/core@1.83.0-alpha.12
  - @mastra/observability@1.24.0-alpha.7
## @mastra/deepeval@0.1.24-alpha.7

### Patch Changes

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`72abae6`](72abae68eb),
[`f071044`](f0710446e0),
[`72abae6`](72abae68eb),
[`987566e`](987566e882)]:
  - @mastra/core@1.83.0-alpha.12
  - @mastra/observability@1.24.0-alpha.7
## @mastra/laminar@1.3.32-alpha.7

### Patch Changes

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`72abae6`](72abae68eb),
[`f071044`](f0710446e0),
[`72abae6`](72abae68eb),
[`987566e`](987566e882)]:
  - @mastra/core@1.83.0-alpha.12
  - @mastra/observability@1.24.0-alpha.7
## @mastra/langfuse@1.6.6-alpha.7

### Patch Changes

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`72abae6`](72abae68eb),
[`f071044`](f0710446e0),
[`72abae6`](72abae68eb),
[`987566e`](987566e882)]:
  - @mastra/core@1.83.0-alpha.12
  - @mastra/observability@1.24.0-alpha.7
  - @mastra/otel-exporter@1.5.2-alpha.7
## @mastra/langsmith@1.4.3-alpha.7

### Patch Changes

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`72abae6`](72abae68eb),
[`f071044`](f0710446e0),
[`72abae6`](72abae68eb),
[`987566e`](987566e882)]:
  - @mastra/core@1.83.0-alpha.12
  - @mastra/observability@1.24.0-alpha.7
## @mastra/otel-bridge@1.5.22-alpha.7

### Patch Changes

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`72abae6`](72abae68eb),
[`f071044`](f0710446e0),
[`72abae6`](72abae68eb),
[`987566e`](987566e882)]:
  - @mastra/core@1.83.0-alpha.12
  - @mastra/observability@1.24.0-alpha.7
  - @mastra/otel-exporter@1.5.2-alpha.7
## @mastra/otel-exporter@1.5.2-alpha.7

### Patch Changes

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`72abae6`](72abae68eb),
[`f071044`](f0710446e0),
[`72abae6`](72abae68eb),
[`987566e`](987566e882)]:
  - @mastra/core@1.83.0-alpha.12
  - @mastra/observability@1.24.0-alpha.7
## @mastra/posthog@1.4.7-alpha.7

### Patch Changes

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`72abae6`](72abae68eb),
[`f071044`](f0710446e0),
[`72abae6`](72abae68eb),
[`987566e`](987566e882)]:
  - @mastra/core@1.83.0-alpha.12
  - @mastra/observability@1.24.0-alpha.7
## @mastra/sentry@1.2.32-alpha.7

### Patch Changes

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`72abae6`](72abae68eb),
[`f071044`](f0710446e0),
[`72abae6`](72abae68eb),
[`987566e`](987566e882)]:
  - @mastra/core@1.83.0-alpha.12
  - @mastra/observability@1.24.0-alpha.7
  - @mastra/otel-exporter@1.5.2-alpha.7
## mastra@1.39.0-alpha.14

### Patch Changes

- Added `mastra api factory work-item starters` and `mastra api factory
work-item activity`. The first counts the cards behind each new-session
starter on a project's default board. The second lists when a project's
cards were created and completed since an instant:
([#30097](https://github.com/mastra-ai/mastra/pull/30097))

  ```bash
  mastra api factory work-item starters <project-id>
mastra api factory work-item activity <project-id>
'{"since":"2026-06-01T00:00:00.000Z"}'
  ```

- Added a "Join the issue's card instead" switch to intake routes in the
Factory UI. A route for pull requests that close an issue can now put
the pull request on that issue's card instead of giving it a card of its
own; until now only the route Factory seeds could do this. The switch
shows on new and saved routes whose conditions include "Source kind is
Pull request" and "Pull request closes an issue is Yes".
([#30197](https://github.com/mastra-ai/mastra/pull/30197))

- Improved the Factory new session page on large boards. Its starters
and its activity band now load the counts and dates they show instead of
downloading every card of the project. They show the same content as
before. ([#30097](https://github.com/mastra-ai/mastra/pull/30097))

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`f071044`](f0710446e0),
[`72abae6`](72abae68eb),
[`987566e`](987566e882)]:
  - @mastra/core@1.83.0-alpha.12
  - @mastra/deployer@1.83.0-alpha.12
## @mastra/deployer@1.83.0-alpha.12

### Patch Changes

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`f071044`](f0710446e0),
[`f071044`](f0710446e0),
[`72abae6`](72abae68eb),
[`987566e`](987566e882)]:
  - @mastra/core@1.83.0-alpha.12
  - @mastra/server@1.83.0-alpha.12
## @mastra/mcp-docs-server@1.3.13-alpha.16

### Patch Changes

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`f071044`](f0710446e0),
[`72abae6`](72abae68eb),
[`987566e`](987566e882)]:
  - @mastra/core@1.83.0-alpha.12
## @mastra/elysia@0.1.23-alpha.12

### Patch Changes

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`f071044`](f0710446e0),
[`f071044`](f0710446e0),
[`72abae6`](72abae68eb),
[`987566e`](987566e882)]:
  - @mastra/core@1.83.0-alpha.12
  - @mastra/server@1.83.0-alpha.12
## @mastra/express@1.5.27-alpha.12

### Patch Changes

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`f071044`](f0710446e0),
[`f071044`](f0710446e0),
[`72abae6`](72abae68eb),
[`987566e`](987566e882)]:
  - @mastra/core@1.83.0-alpha.12
  - @mastra/server@1.83.0-alpha.12
## @mastra/fastify@1.5.27-alpha.12

### Patch Changes

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`f071044`](f0710446e0),
[`f071044`](f0710446e0),
[`72abae6`](72abae68eb),
[`987566e`](987566e882)]:
  - @mastra/core@1.83.0-alpha.12
  - @mastra/server@1.83.0-alpha.12
## @mastra/hono@1.7.25-alpha.12

### Patch Changes

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`f071044`](f0710446e0),
[`f071044`](f0710446e0),
[`72abae6`](72abae68eb),
[`987566e`](987566e882)]:
  - @mastra/core@1.83.0-alpha.12
  - @mastra/server@1.83.0-alpha.12
## @mastra/koa@1.7.27-alpha.12

### Patch Changes

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`f071044`](f0710446e0),
[`f071044`](f0710446e0),
[`72abae6`](72abae68eb),
[`987566e`](987566e882)]:
  - @mastra/core@1.83.0-alpha.12
  - @mastra/server@1.83.0-alpha.12
## @mastra/nestjs@0.3.0-alpha.12

### Patch Changes

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`f071044`](f0710446e0),
[`f071044`](f0710446e0),
[`72abae6`](72abae68eb),
[`987566e`](987566e882)]:
  - @mastra/core@1.83.0-alpha.12
  - @mastra/server@1.83.0-alpha.12
## @mastra/next@0.2.41-alpha.12

### Patch Changes

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`f071044`](f0710446e0),
[`f071044`](f0710446e0),
[`72abae6`](72abae68eb),
[`987566e`](987566e882)]:
  - @mastra/core@1.83.0-alpha.12
  - @mastra/server@1.83.0-alpha.12
  - @mastra/hono@1.7.25-alpha.12
## @mastra/tanstack-start@0.2.41-alpha.12

### Patch Changes

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`f071044`](f0710446e0),
[`f071044`](f0710446e0),
[`72abae6`](72abae68eb),
[`987566e`](987566e882)]:
  - @mastra/core@1.83.0-alpha.12
  - @mastra/server@1.83.0-alpha.12
  - @mastra/hono@1.7.25-alpha.12
## @mastra/voice-openai-realtime@0.14.9-alpha.2

### Patch Changes

- Use gpt-realtime-2.1-mini by default for OpenAI Realtime voice
connections instead of the retired
gpt-4o-mini-realtime-preview-2024-12-17 model.
([#30183](https://github.com/mastra-ai/mastra/pull/30183))
## @mastra/inngest@1.11.2-alpha.8

### Patch Changes

- Support span-local error counts in Inngest workflows.
([#30088](https://github.com/mastra-ai/mastra/pull/30088))

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`f071044`](f0710446e0),
[`72abae6`](72abae68eb),
[`987566e`](987566e882)]:
  - @mastra/core@1.83.0-alpha.12
## @mastra/temporal@0.6.0-alpha.12

### Patch Changes

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`f071044`](f0710446e0),
[`72abae6`](72abae68eb),
[`987566e`](987566e882)]:
  - @mastra/core@1.83.0-alpha.12
  - @mastra/deployer@1.83.0-alpha.12
## create-mastra@1.39.0-alpha.14


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

### Patch Changes

- Updated dependencies
[[`56f654f`](56f654fc0d),
[`f071044`](f0710446e0),
[`987566e`](987566e882),
[`72abae6`](72abae68eb),
[`f9088d8`](f9088d8510),
[`987566e`](987566e882),
[`f071044`](f0710446e0),
[`43d1e9c`](43d1e9c16d)]:
  - @mastra/core@1.83.0-alpha.12
  - @mastra/client-js@1.60.0-alpha.12
  - @mastra/playground-ui@69.0.0-alpha.14
  - @mastra/react@1.15.0-alpha.12

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-11-12 14:42:02 +01:00
dane-ai-mastra[bot]
a4258a989c
chore: version packages (alpha) (#30127)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-11-11 21:12:19 -08:00
dane-ai-mastra[bot]
055a8c3b82 chore: version packages 2026-11-12 04:17:40 +00: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[bot]
3a6ca42696
chore: version packages (alpha) (#30026)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-11-11 08:16:57 -08: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]
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]
7c4dd88400
chore: version packages (alpha) (#29889)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-11-10 15:48:17 +01:00
Ward Peeters
1892f79532
chore: remove stale scripts, workspace entries and package metadata (#29891)
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-11-10 14:09:52 +01: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
mastra-platform[bot]
4cd4c46e54
fix(core): release thread leases on shutdown (#29794)
## Summary

`Mastra.shutdown()` left behind the agent thread runs it was still
holding. Thread leases stayed held, and kept renewing with the
in-process pubsub, so another process couldn't use the thread until the
lease expired. Anyone following the run saw it fail with
`AgentThreadLeaseLostError`. This is the last open case of #27364; the
other four were fixed earlier.

Shutdown now hands those runs back once durable executions are
abandoned, while pubsub and storage are still open:

- **Parked runs** (waiting on a tool approval or suspension) are
announced with `run-suspended`, so they stay resumable.
- **Runs still executing** are aborted and get the rest of the drain
budget, at least 500 ms, to wind down, so they start no further steps.
Then the run ends with an unpersisted `run-completed`.
- The thread lease is released only after that event is published, and
only if the run has stopped. A run that hasn't stopped in time, such as
one whose tool ignores the abort, keeps its lease until it expires. A
tool's step counts as running until the tool body settles, not just
until the 250 ms abort grace hands control back to the loop.
- Every lease renewal this Mastra started stops.
- **Only this Mastra's runs are touched.** A run whose lease now belongs
to someone else is left alone. So is an evented run a worker executes
over a broker: it is only detached at shutdown, same as
`abandonDurableAgentExecutions`, and the worker keeps the lease.
- Abandoned durable runs now release their thread lease right away.
Recovery on the next boot no longer has to wait for the lease to lapse.

Late stream parts, suspended-run publishes and the run's own end are
skipped for runs shutdown already handed back, so nothing is published
twice.

Out of scope: whether followers of an abandoned durable run should wait
for recovery instead of ending.

Fixes #27364

## Test plan

- New `thread-shutdown-lease-release.test.ts`: two Mastra instances
share events and a lease backend that expires like Redis. Covers a
streaming run and a run parked on an approval, on every engine (normal,
durable, evented, fs). Checks that the lease is free right after
`shutdown()`, renewals and tool ticks stop, and the follower sees no
lost-lease error. All 8 fail without the fix.
- Updated the durable fence test: after shutdown, the thread lease no
longer marks the abandoned run live, so recovery works without mocking.
- `evented-execution.test.ts` still passes: when the API instance shuts
down, the run its worker executes keeps its thread lease.
- `src/agent/durable`, `src/agent/__tests__`, `src/mastra`: 6818 passed.
`durable-agent-crash-recovery.test.ts` hits a worker SIGABRT in this
sandbox, but that happens on main too.
- `tsc --noEmit`, oxlint and oxfmt are clean.
- Deployer `shutdown.test.ts` updated for the 6.5s core shutdown budget
(room for the handback).


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

## ELI5

When Mastra shuts down, it tells other processes whether each agent run
is paused or has ended. It stops renewing the run’s thread lease and
releases it when the run has stopped and the lease backend confirms
ownership, so another process can use the thread sooner. If a tool keeps
running after an abort, Mastra keeps the lease until it expires to avoid
handing the thread over too early.

## Changes

- Added shutdown handback for thread runs owned by the shutting-down
Mastra instance. Handback runs after durable executions are abandoned
and before pubsub teardown.
- Shutdown publishes `run-suspended` for parked runs and an unpersisted
`run-completed` event for other runs. It aborts executing runs and waits
for output, broadcasts, and running steps to settle within the grace
period.
- Shutdown releases a lease only if the run stopped and the lease
backend confirms that the instance still owns the lease. If a tool
ignores abort or the lease backend does not respond in time, shutdown
stops renewal and leaves the lease to expire.
- Runs executing elsewhere keep their lease. Shutdown suppresses later
stream parts and duplicate terminal events for runs it handles.
- Added shutdown tests for streaming, approval-parked, and partially
resumed runs across engines. A slow-tool test verifies that shutdown
does not release the lease while the abort-ignoring tool is still
running. Updated durable recovery and generated-server SIGTERM tests,
deployment guidance, the deployer shutdown budget, and the changeset.
- Diff size: 15 files changed, 873 lines added, 38 removed.

## Validation

Current-head test, build, and lint results: not available.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: mastra-platform[bot] <mastra-platform[bot]@users.noreply.github.com>
Co-authored-by: mastra-platform[bot] <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-11-09 20:39:52 -08:00
shreyas-mastra
bc9d8d482c
fix(deployer): don't allow CORS credentials for reflected origins by default (#29406)
With `server.auth` set and no `server.cors.origin`, the deployer server
reflected any request origin and also sent
`Access-Control-Allow-Credentials: true`. Any website could then make
cookie-authenticated requests to the server from a logged-in user's
browser and read the responses.

Now the origin is still reflected, but credentials are only on by
default when `server.cors.origin` lists allowed origins. An explicit
`server.cors.credentials` setting is respected either way. Without auth
nothing changes (`origin: '*'`, no credentials).

If you use cookie sessions from a browser app on another origin, set
`server.cors.origin` to that app's origin.

Updated the CORS tests for the three cases. Deployer server tests pass
(141), and `tsc` and lint are clean.


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

## ELI5

When authentication is on, the server can still reply to requests from
other websites. If it reflects a website’s origin, it no longer lets
that website use a visitor’s saved login credentials by default. List
allowed origins or set `server.cors.credentials` to allow credentials.

## Changes

- With `server.auth` set and `server.cors.origin` unset, the server
reflects the request origin but disables credentials by default.
- With an explicitly configured origin and auth enabled, credentials
remain enabled by default.
- An explicit `server.cors.credentials` setting takes precedence,
including when no origin is configured.
- Without auth, the default origin remains `'*'`.
- Updated CORS documentation, unit and end-to-end tests, and patch
changesets for `@mastra/deployer` and `@mastra/core`.

Test and lint results were not available.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-11-09 18:46:52 -05:00
dane-ai-mastra[bot]
009f632534 chore: version packages 2026-11-09 04:19:07 +00: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
Tyler Barnes
43f77e77a0
ci: delete the Changed Test Gate (#29099)
## What this does

Deletes the Changed Test Gate workflow, its labeler workflow (which
labels PRs from the gate's result) and `scripts/pr-test-gate/`. The
gate's deployer rule is kept: it moves into Prebuild as a small
`Deployer E2E coverage` job.

## What the gate enforced, and what goes

The gate checked out the base branch, restored the PR's changed test
files on top of it, and ran them. Removing it drops two rules:

1. **Fail-before-fix.** If a PR changed tests, those tests had to fail
against the base branch ("Changed tests passed against the base branch.
They should fail before the PR code is applied."). This rule goes.
2. **External contributors must add tests.** A PR from outside the org
(`AUTHOR_ASSOCIATION` not OWNER/MEMBER/COLLABORATOR) with no changed
test files failed. This rule goes.

A third rule stays: **a PR that changes `packages/deployer/` must also
change `e2e-tests/monorepo/`** (`packages/deployer/AGENTS.md` and
`CHANGELOG.md` exempt; the same-repo Changesets release PR skipped).
It's now `Deployer E2E coverage` in `prebuild.yml`: a `git diff
--name-only` against the merge base, no install or build. It's its own
job rather than a step in `changes`, because a failing `changes` job
would skip every test job. `packages/deployer/AGENTS.md` now names that
job.

## Why dropping 1 and 2 is acceptable

- Neither rule was enforced at merge time: the gate isn't a required
check. The required checks are `Lint` and `Unit and E2E Tests / Merge
Test Reports`, and this PR touches neither.
- Of the gate's last 1000 runs, 8 failed. All 8 were the fail-before-fix
rule firing on tests that passed without the fix; each PR resolved it by
rewriting its tests. Across 812 gate logs from Aug–Oct, every run that
executed tests took the passing path (changed tests failed against base,
as required). So it shaped how a few tests were written, but no run
showed it stopping broken code from merging.
- It costs a runner, a checkout and a test run on every non-draft PR, on
top of Prebuild running the same changed tests against the PR head.
- External contributions still go through maintainer review, which can
ask for tests.

## Test plan

- [x] `rg` for remaining references: only two "former" comments and an
unrelated fixture name
- [x] `pnpm install --frozen-lockfile` works after removing
`scripts/pr-test-gate` (192 projects)
- [x] Deployer check shell logic run locally under `bash -eo pipefail`
with a stubbed diff: deployer-only change fails with the annotation;
deployer + `e2e-tests/monorepo/` passes; `AGENTS.md`/`CHANGELOG.md`-only
passes; no deployer change passes
- [ ] CI on this PR: no Changed Test Gate check appears; `Deployer E2E
coverage` passes


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

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

## ELI5

This change removes the old system that checked whether pull requests
added and tested tests. It keeps one focused rule: changes to the
deployer package must include a monorepo E2E test change, with specified
documentation files exempt.

## Changes

- Deleted the Changed Test Gate workflow, its labeler workflow, and the
`scripts/pr-test-gate/` package.
- Added a separate `Deployer E2E coverage` job to Prebuild. The job
checks the merge-base diff and fails when a non-exempt file under
`packages/deployer/` changes without a file under `e2e-tests/monorepo/`.
- Exempted `packages/deployer/AGENTS.md` and
`packages/deployer/CHANGELOG.md` from the coverage check.
- Updated `packages/deployer/AGENTS.md` to refer to the Prebuild job.
- Updated comments in the memory simulation config and two test
link-provider files.

## Validation

The PR description reports that `pnpm install --frozen-lockfile`
succeeded across 192 projects and that the deployer-check shell logic
passed the listed local cases. CI validation is not confirmed: the
description says it is not yet known whether the old check disappears
and the new job passes.

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

---------

Co-authored-by: remy-builder[bot] <324360501+remy-builder[bot]@users.noreply.github.com>
2026-11-05 19:42:33 +00:00
Arthur Fiorette
90e981b6e2
fix(deployer): stop option extraction from loading installed packages (#29558) 2026-11-05 11:37:02 -08:00
Arthur Fiorette
da7549b741
perf(deployer): skip the pino transport scan when it cannot match (#29454) 2026-11-05 14:02:07 -03: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
Arthur Fiorette
eaa3b5ce1e
fix(deployer): write chunks of extracted config options as .mjs (#29329) 2026-11-04 12:50:21 +01:00
Arthur Fiorette
52af646524
fix(deployer): only edit the root importer of the copied pnpm lockfile (#29330) 2026-11-04 12:49:42 +01:00
Arthur Fiorette
742b37dc32
fix(deployer): keep pnpm overrides scoped to the app working in the build output (#29350) 2026-11-03 17:48:21 -08: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
c0fba5ea4d
fix(deployer): install the build output with the project's pnpm overrides (#29249) 2026-11-03 08:38:02 -08: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
Arthur Fiorette
501f010c0c
fix(deployer): stop packing workspace packages already bundled into the output (#29172)
## Description

In a monorepo, `mastra build` packs every workspace package the app
imports into `.mastra/output/workspace-module/` and installs it with its
whole dependency tree, even when the package is bundled into the output
and nothing imports it at runtime.

The packing seed in `Bundler._bundle` read from both
`analyzedBundleInfo.dependencies` (packages compiled into the bundle)
and `externalDependencies` (packages still imported at runtime). The
`dependencies` half came from #19808, as a fallback for workspace
subpaths that could leak into the output as bare imports. Since #24210
such a leak fails the build with
`DEPLOYER_BUNDLER_UNRESOLVED_WORKSPACE_IMPORT`, so the fallback only
adds tarballs. This PR seeds packing from `externalDependencies` only.
Transitive workspace dependencies of external workspace packages are
still collected from their `package.json`.

Before, in the monorepo E2E fixture (only `@inner/subpath-only` is in
`bundler.externals`):

```
Packaging batch 1/2: @inner/hello-world, @inner/inner-tools, @inner/lodash, @inner/native-binding-package, @inner/transitive-a
Packaging batch 2/2: @inner/transitive-b, @inner/transitive-c, @inner/subpath-only
```

After:

```
Packaging batch 1/1: @inner/subpath-only
```

Behavior change: code that loads a bundled workspace package at runtime
without a static import (`createRequire().resolve('@inner/x/...')`,
`node --import @inner/x`) used to work because the tarball happened to
be installed. Those packages now need to be listed in
`bundler.dynamicPackages`, the existing option for packages with no
static import, and the changeset says so. I checked that
`dynamicPackages: ['@repro/heavy']` packs and installs the workspace
package with this change, while `externals: ['@repro/heavy']` with no
import installs nothing (same as for third-party packages).

Verification:

- `@mastra/deployer` unit tests pass, and so does `tsc --noEmit`.
- Monorepo E2E suite locally: 85 of 88 pass. The 3 failures also happen
with the fix reverted and come from my local tooling: npm prints `npm
notice` on stderr during `mastra dev`, and pnpm 11.3 formats
`ERR_PNPM_IGNORED_BUILDS` differently.
- The new E2E assertion checks that `workspace-module/` only contains
`inner-subpath-only-1.0.0.tgz`. The changed-test gate confirmed it fails
against `main` and passes with the fix.

## Related issue(s)

Fixes #28303

## Type of change

- [x] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Code refactoring
- [ ] Performance improvement
- [ ] Test update

## Checklist

- [x] I have linked the related issue(s) in the description above
- [ ] 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
- [x] I have addressed all Coderabbit comments on this PR
2026-11-02 09:27:27 -08:00
mastra-platform[bot]
1b40564c17
fix(deployer,cli): honor mastra dev --root for dev pre-bundle output (#29156) 2026-11-02 16:30:46 +01: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
Arthur Fiorette
0b5c4e919e
fix(deployer): pin the installed package for subpath imports that ship their own package.json (#29076) 2026-10-31 11:10:48 -07:00
dane-ai-mastra[bot]
77076a1012 chore: version - exit prerelease mode 2026-10-30 23:02:25 +00:00
Arthur Fiorette
436b734df5
fix(deployer): apply bundler options when the project has file-based agents (#29054) 2026-10-30 15:30:42 -07: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
dane-ai-mastra[bot]
2e62b365e4
chore: version packages (alpha) (#28869) 2026-10-29 20:09:33 +01: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
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[bot]
332eb25cdc
chore: version packages (alpha) (#28647)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-27 23:13:59 +01:00
dane-ai-mastra[bot]
e6764d26da
chore: version packages (alpha) (#28625)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-27 15:40:38 -05: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
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