Skip to content

feat(core): add coalesced harness display-state subscriptions#15974

Merged
abhiaiyer91 merged 1 commit into
mastra-ai:mainfrom
mbenhamd:feat/harness-display-state-subscription
Apr 30, 2026
Merged

feat(core): add coalesced harness display-state subscriptions#15974
abhiaiyer91 merged 1 commit into
mastra-ai:mainfrom
mbenhamd:feat/harness-display-state-subscription

Conversation

@mbenhamd

@mbenhamd mbenhamd commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Adds Harness.subscribeDisplayState() for UI, SSE, TUI, and bridge consumers that render from HarnessDisplayState. Raw subscribe() still delivers every event for logs, debugging, analytics, and replay.

Example usage:

render(harness.getDisplayState());

const unsubscribe = harness.subscribeDisplayState(render, {
  windowMs: 250,
  maxWaitMs: 500,
});

The scheduler coalesces high-frequency message and tool updates, emits fresh display-state snapshots, and flushes critical lifecycle updates immediately.

Fixes #15973.

Validated with pnpm --filter ./packages/core test -- display-state, pnpm --filter ./packages/core check, and pnpm build:core.

ELI5

This PR adds a smarter way for UI components to listen to harness updates. Instead of getting bombarded with every single internal event, they can now use subscribeDisplayState() to receive batched updates that combine rapid changes into fewer snapshots, while keeping the old raw subscribe() method unchanged for debugging and logging.

Overview

This PR introduces Harness.subscribeDisplayState(), a new UI-facing subscription API that delivers coalesced HarnessDisplayState snapshots. It implements intelligent batching of high-frequency internal events (messages, tool updates) into consolidated display-state snapshots, while preserving the raw event semantics of the existing subscribe() API. Critical lifecycle events (agent start/end, errors, approvals, suspensions, questions, plans) bypass coalescing and flush immediately.

Key Changes

New Display State Scheduler Module

  • display-state-scheduler.ts: Introduces DisplayStateScheduler class that buffers non-critical display state updates and dispatches them using two configurable timers:
    • windowMs (default 250ms): throttle window that resets on each non-critical update
    • maxWaitMs (default 500ms): maximum wait time to prevent starvation
    • Critical updates bypass buffering and flush immediately
    • Deep-clones entire HarnessDisplayState before invoking listeners to ensure isolation
    • Catches and logs listener errors via console.error without disrupting other listeners
    • Exports constants: DEFAULT_DISPLAY_STATE_SUBSCRIPTION_OPTIONS and CRITICAL_DISPLAY_STATE_EVENT_TYPES

API Additions to Harness

  • getDisplayState(): Returns a snapshot of current HarnessDisplayState for initial rendering
  • subscribeDisplayState(listener, options?): Registers a coalesced display-state listener that returns an unsubscribe function
    • Accepts optional windowMs and maxWaitMs tuning parameters
    • Listener is not invoked immediately (caller must use getDisplayState() for initial render)
    • All subscriptions are cleaned up during harness.destroy()

Integration Updates

  • Modified Harness.emit() to notify schedulers after dispatching events, passing isCritical flag based on event type
  • Event type display_state_changed is skipped to avoid double-notification
  • Harness destroy method extended to dispose and clear all registered schedulers

Type System Enhancements

  • New types in types.ts:
    • HarnessDisplayStateListener: callback type receiving HarnessDisplayState, may be sync or async
    • HarnessDisplayStateSubscriptionOptions: configuration interface for windowMs and maxWaitMs
  • Index re-exports: Both new types exported from harness module

Documentation

  • Updated harness-class.mdx with comprehensive documentation of both new APIs
  • Clarified that subscribe() is intended for raw event logs while subscribeDisplayState() is preferred for UI rendering
  • Added changeset documenting the new API with usage examples

Testing

Comprehensive test suite in display-state.test.ts covering:

  • Coalescing behavior driven by windowMs with fake timers
  • Forced flushes at maxWaitMs to prevent starvation
  • Critical event types trigger immediate (non-coalesced) emission
  • Emitted snapshots are fresh deep-clones isolated from harness internal state
  • Unsubscribe and harness.destroy() properly cancel pending timer flushes
  • Custom coalescing options change flush timing as configured
  • Raw subscriptions continue to receive every event while display subscribers remain coalesced
  • Listener errors are caught and logged without preventing other listeners
  • Validation of key snapshot fields like isRunning, pendingApproval, pendingSuspension, etc.

Validation

Changes have been validated with:

  • pnpm --filter ./packages/core test -- display-state
  • pnpm --filter ./packages/core check
  • pnpm build:core

Fixes issue #15973.

@changeset-bot

changeset-bot Bot commented Apr 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 1038e35

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 21 packages
Name Type
@mastra/core Patch
mastracode Patch
@mastra/mcp-docs-server Patch
@internal/playground Patch
@mastra/client-js Patch
@mastra/opencode Patch
@mastra/longmemeval Patch
mastra Patch
@mastra/deployer-cloud Patch
@mastra/deployer-vercel Patch
@mastra/playground-ui Patch
@mastra/react Patch
@mastra/server Patch
@mastra/deployer Patch
create-mastra Patch
@mastra/express Patch
@mastra/fastify Patch
@mastra/hono Patch
@mastra/koa Patch
@mastra/deployer-cloudflare Patch
@mastra/deployer-netlify Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Apr 30, 2026

Copy link
Copy Markdown

@mbenhamd is attempting to deploy a commit to the Mastra Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added the Documentation Improvements or additions to documentation label Apr 30, 2026
@dane-ai-mastra

Copy link
Copy Markdown
Contributor

Thank you for your contribution!

Please ensure that your PR fixes an existing issue and that you have linked it in the description (e.g. with Fixes #1234).

We use CodeRabbit for automated code reviews. Please address all feedback from CodeRabbit by either making changes to your PR or leaving a comment explaining why you disagree with the feedback. Since CodeRabbit is an AI, it may occasionally provide incorrect feedback.

Addressing CodeRabbit's feedback will greatly increase the chances of your PR being merged. We appreciate your understanding and cooperation in helping us maintain high code quality standards.

Comment @coderabbitai review in case you want to trigger a review.

@coderabbitai

coderabbitai Bot commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

Introduces a new subscribeDisplayState() API to the Harness class that provides coalesced display-state snapshots to UI consumers. The implementation includes a scheduler that buffers non-critical updates using configurable timing windows, flushes critical events immediately, deep-clones snapshots before delivery, and includes comprehensive test coverage validating coalescing behavior, cleanup, and isolation guarantees.

Changes

Cohort / File(s) Summary
Documentation & Changeset
.changeset/five-hands-punch.md, docs/src/content/en/reference/harness/harness-class.mdx
Documents new getDisplayState() snapshot method and subscribeDisplayState(listener, options?) API with configurable windowMs and maxWaitMs for coalesced delivery. Clarifies that subscribe() remains for raw event logs while subscribeDisplayState() targets UI rendering paths.
Type Definitions
packages/core/src/harness/types.ts, packages/core/src/harness/index.ts
Adds HarnessDisplayStateListener callback type and HarnessDisplayStateSubscriptionOptions configuration interface with optional windowMs and maxWaitMs properties. Exports new types from harness module.
Display State Scheduler
packages/core/src/harness/display-state-scheduler.ts
Implements DisplayStateScheduler class that buffers non-critical updates with throttling and max-wait timers, flushes critical events immediately, deep-clones entire state before listener invocation, prevents post-disposal operations, and logs listener errors without blocking other subscribers.
Harness Integration
packages/core/src/harness/harness.ts
Adds subscribeDisplayState() method that instantiates scheduler instances with configurable options and defaults. Extends emit() to notify active schedulers after dispatching events, marking certain event types as critical for immediate flush. Extends destroy() to dispose and clear all registered schedulers.
Test Suite
packages/core/src/harness/display-state.test.ts
Comprehensive Vitest suite using fake timers validating coalesced emission behavior driven by windowMs and maxWaitMs, critical event immediate flushing, snapshot freshness and deep isolation, unsubscribe/destroy cleanup, custom timing options, raw subscription compatibility, and listener error handling without blocking other subscribers.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~35 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Title is concise, descriptive, uses imperative mood with proper capitalization, and directly summarizes the main feature addition.
Linked Issues check ✅ Passed All coding objectives from issue #15973 are met: subscribeDisplayState() API added with coalescing logic, critical events flush immediately, tests cover coalescing/max-wait/cleanup/compatibility, and validation commands passed.
Out of Scope Changes check ✅ Passed All changes are directly related to the coalesced display-state subscription feature; no unrelated modifications detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/core/src/harness/display-state-scheduler.ts`:
- Around line 29-77: The cloneDisplayState function currently shallow-copies
nested opaque payloads and Date objects which can leak mutations (e.g., fields
named args, result, suspendPayload and any Date properties); update
cloneDisplayState to deep-clone those unknown payloads and Date instances when
copying structures like activeSubagents.toolCalls, modifiedFiles.operations (and
any tool call payloads), tasks/previousTasks items, and any payloads on
pendingApproval/pendingSuspension/pendingQuestion so that objects/arrays are
recursively cloned and Date objects are copied via new Date(date.getTime()) (or
JSON-safe deep clone for plain payloads) to eliminate shared references between
snapshots and live state.

In `@packages/core/src/harness/harness.ts`:
- Around line 2570-2585: The subscribeDisplayState method registers a
DisplayStateScheduler into this.displayStateSchedulers but destroy() does not
clean them up; update the Harness.destroy (or equivalent teardown) to iterate
over this.displayStateSchedulers, call scheduler.dispose() for each
DisplayStateScheduler instance and then clear the Set
(this.displayStateSchedulers.clear()) to stop timers and prevent callbacks after
teardown; keep subscribeDisplayState’s current unsubscribe behavior (deleting
and disposing the single scheduler) intact so explicit unsubscribes still work.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 56d115e3-1b1a-44ef-9df9-f7d43f80a834

📥 Commits

Reviewing files that changed from the base of the PR and between 1a55145 and 3604a3a.

📒 Files selected for processing (10)
  • .changeset/brown-lamps-lie.md
  • .changeset/five-hands-punch.md
  • docs/src/content/en/reference/harness/harness-class.mdx
  • packages/core/src/harness/display-state-scheduler.ts
  • packages/core/src/harness/display-state.test.ts
  • packages/core/src/harness/harness.ts
  • packages/core/src/harness/index.ts
  • packages/core/src/harness/types.ts
  • stores/convex/src/server/storage.test.ts
  • stores/convex/src/server/storage.ts

Comment thread packages/core/src/harness/display-state-scheduler.ts
Comment thread packages/core/src/harness/harness.ts
Add Harness.subscribeDisplayState() for UI consumers that need coalesced HarnessDisplayState snapshots instead of every raw harness event.

Raw subscribe() semantics remain unchanged for event-log and replay consumers. The new scheduler emits fresh snapshots, flushes critical lifecycle updates immediately, and coalesces high-frequency tool/message updates with windowMs/maxWaitMs options.

Docs, focused harness tests, and a changeset are included.

Closes mastra-ai#15973
@mbenhamd mbenhamd force-pushed the feat/harness-display-state-subscription branch from 3604a3a to 1038e35 Compare April 30, 2026 12:44

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
packages/core/src/harness/display-state.test.ts (1)

1275-1341: ⚡ Quick win

Cover the full critical-event contract in this suite.

These assertions only exercise part of CRITICAL_DISPLAY_STATE_EVENT_TYPES. Entries like plan_approved, thread_changed, thread_created, thread_deleted, mode_changed, model_changed, subagent_model_changed, tool_input_end, tool_end, and subagent_end can stop flushing immediately without this suite noticing. A small table-driven test over the exported set would keep the scheduler contract and tests from drifting.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/core/src/harness/display-state.test.ts` around lines 1275 - 1341,
Add a table-driven test that iterates over the exported
CRITICAL_DISPLAY_STATE_EVENT_TYPES and verifies each event causes an immediate
flush: subscribe a mock listener via harness.subscribeDisplayState (using the
same windowMs/maxWaitMs), loop over CRITICAL_DISPLAY_STATE_EVENT_TYPES and for
each type call emit(harness, { type, ...minimalPayloadForType }) (use generic
minimal payloads or a small mapping for types that require fields), and assert
the listener was called once per emit and that its received state reflects the
event (or at least that a call occurred). Reference
CRITICAL_DISPLAY_STATE_EVENT_TYPES, emit, harness.subscribeDisplayState and the
existing listener assertions to replace the duplicated individual-case checks
with this single table-driven assertion to cover all critical events.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/src/content/en/reference/harness/harness-class.mdx`:
- Around line 928-949: Clarify in the subscribeDisplayState docs that the
coalescing options (windowMs, maxWaitMs) do not apply to certain critical
lifecycle updates: explicitly state that approvals, errors, thread/model
changes, and completion events are flushed immediately (bypass the coalescing
window) by the display-state-scheduler logic; mention that subscribeDisplayState
still does not invoke the listener immediately (use getDisplayState for initial
render) and add a short note so UI/SSE/TUI consumers know these specific updates
have no guaranteed latency bound.

---

Nitpick comments:
In `@packages/core/src/harness/display-state.test.ts`:
- Around line 1275-1341: Add a table-driven test that iterates over the exported
CRITICAL_DISPLAY_STATE_EVENT_TYPES and verifies each event causes an immediate
flush: subscribe a mock listener via harness.subscribeDisplayState (using the
same windowMs/maxWaitMs), loop over CRITICAL_DISPLAY_STATE_EVENT_TYPES and for
each type call emit(harness, { type, ...minimalPayloadForType }) (use generic
minimal payloads or a small mapping for types that require fields), and assert
the listener was called once per emit and that its received state reflects the
event (or at least that a call occurred). Reference
CRITICAL_DISPLAY_STATE_EVENT_TYPES, emit, harness.subscribeDisplayState and the
existing listener assertions to replace the duplicated individual-case checks
with this single table-driven assertion to cover all critical events.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 97401741-c26c-48f6-a049-27ff8cf731a8

📥 Commits

Reviewing files that changed from the base of the PR and between 3604a3a and 1038e35.

📒 Files selected for processing (7)
  • .changeset/five-hands-punch.md
  • docs/src/content/en/reference/harness/harness-class.mdx
  • packages/core/src/harness/display-state-scheduler.ts
  • packages/core/src/harness/display-state.test.ts
  • packages/core/src/harness/harness.ts
  • packages/core/src/harness/index.ts
  • packages/core/src/harness/types.ts
✅ Files skipped from review due to trivial changes (2)
  • packages/core/src/harness/index.ts
  • .changeset/five-hands-punch.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/core/src/harness/harness.ts

Comment on lines +928 to +949
#### `subscribeDisplayState(listener, options?)`

Register a listener for coalesced display state snapshots. Use this method for UI, Server-Sent Events (SSE), terminal UI (TUI), and bridge rendering paths that only need the latest `HarnessDisplayState`. Use [`subscribe`](#subscribelistener) when you need the raw event log.

```typescript
const unsubscribe = harness.subscribeDisplayState(displayState => {
render(displayState)
})

// Optional tuning:
harness.subscribeDisplayState(render, {
windowMs: 250,
maxWaitMs: 500,
})

// Later:
unsubscribe()
```

Returns: `() => void`

`subscribeDisplayState()` does not call the listener immediately. Call [`getDisplayState`](#getdisplaystate) first if the UI needs an initial render before the next harness event.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Document that critical lifecycle updates bypass the coalescing window.

This reads like windowMs/maxWaitMs apply to every snapshot, but packages/core/src/harness/display-state-scheduler.ts:8-27 flushes approvals, errors, thread/model changes, and completion events immediately. Calling that out here will keep UI consumers from treating the timing options as hard latency bounds for all updates.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/src/content/en/reference/harness/harness-class.mdx` around lines 928 -
949, Clarify in the subscribeDisplayState docs that the coalescing options
(windowMs, maxWaitMs) do not apply to certain critical lifecycle updates:
explicitly state that approvals, errors, thread/model changes, and completion
events are flushed immediately (bypass the coalescing window) by the
display-state-scheduler logic; mention that subscribeDisplayState still does not
invoke the listener immediately (use getDisplayState for initial render) and add
a short note so UI/SSE/TUI consumers know these specific updates have no
guaranteed latency bound.

@abhiaiyer91 abhiaiyer91 merged commit 5fb6c2a into mastra-ai:main Apr 30, 2026
41 of 48 checks passed
abhiaiyer91 pushed a commit that referenced this pull request Apr 30, 2026
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/observability@1.11.0-alpha.0

### Minor Changes

- Auto-attach the Mastra-level `environment` to all observability
signals. ([#15956](https://github.com/mastra-ai/mastra/pull/15956))

### Patch Changes

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0

## @mastra/core@1.31.0-alpha.0

### Minor Changes

- Added Microsoft Entra ID authentication support for Azure OpenAI
gateways, so Azure deployments can call models without API keys when
using Azure SDK credentials.
([#15983](https://github.com/mastra-ai/mastra/pull/15983))

- Added top-level `environment` config on `Mastra` to tag observability
signals with the deployment environment.
([#15956](https://github.com/mastra-ai/mastra/pull/15956))

Set it once on the `Mastra` instance and it will be attached to all
observability signals automatically. Falls back to
`process.env.NODE_ENV` when unset; per-call
`tracingOptions.metadata.environment` still takes precedence.

    **Before**

    ```ts
    await agent.generate('hello', {
tracingOptions: { metadata: { environment: process.env.NODE_ENV } },
    });
    ```

    **After**

    ```ts
    new Mastra({
      environment: 'production',
      observability: new Observability({ ... }),
    })
    ```

    `mastra.getEnvironment()` returns the resolved value.

### Patch Changes

- Update provider registry and model documentation with latest models
and providers
([`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724))

- Fixed workflow runs not being cancellable when steps or conditions
ignored the abort signal. Cancelling a run now correctly stops
`dountil`, `dowhile`, and `foreach` loops at every cancellation boundary
— between iterations, after a step returns, after the loop condition is
evaluated, and (for `foreach`) between concurrency chunks and after the
final chunk. Previously, long-running loops (e.g. a `dountil` with a
`setTimeout` inside the step) would keep running and eventually emit
`success` even after the run was cancelled. Closes #15990.
([#15994](https://github.com/mastra-ai/mastra/pull/15994))

- Fixed type inference on workflow loop helpers (`foreach`, `dowhile`,
`dountil`) so a step's `requestContextSchema` correctly aligns with the
workflow's `requestContextSchema`. Previously these methods dropped the
workflow's `TRequestContext` from the step parameter, causing TypeScript
to reject typed-context steps even when the workflow declared a matching
schema. Steps without a `requestContextSchema` are still accepted; steps
whose schema does not match the workflow's now produce a type error.
Fixes [#15989](https://github.com/mastra-ai/mastra/issues/15989).
([#15995](https://github.com/mastra-ai/mastra/pull/15995))

- Fixed sub-agent delegation so nested tool results stay out of the
parent model context by default while remaining available to application
code. Set `delegation.includeSubAgentToolResultsInModelContext` to
include the full subagent result in the parent model context.
([#15832](https://github.com/mastra-ai/mastra/pull/15832))

- Added a coalesced display state subscription API for Harness.
([#15974](https://github.com/mastra-ai/mastra/pull/15974))

This helps UI clients render fewer updates while still receiving the
latest state. The example below renders the initial state, then
subscribes to coalesced updates with the default `windowMs` and
`maxWaitMs` timing options.

    ```ts
    render(harness.getDisplayState());

    const unsubscribe = harness.subscribeDisplayState(render, {
      windowMs: 250,
      maxWaitMs: 500,
    });
    ```

- Add `filterAfterToolSteps` to `ToolCallFilter` so tool calls can be
filtered during agentic loops after they are no longer recent. By
default, `ToolCallFilter` keeps its previous behavior and only filters
the initial input.
([#15795](https://github.com/mastra-ai/mastra/pull/15795))

- Fixed tool calls to run in parallel when active tools exclude approval
or suspending tools.
([#15978](https://github.com/mastra-ai/mastra/pull/15978))

- Fix semantic recall indexing to honor read-only memory mode.
([#15949](https://github.com/mastra-ai/mastra/pull/15949))

## @mastra/playground-ui@24.1.0-alpha.1

### Minor Changes

- Refactored Button component to use a single `cva`
(class-variance-authority) variant config instead of nested manual maps.
Consolidated `IconButton` into `Button` via
`size="icon-sm|icon-md|icon-lg"` and removed the `IconButton` export.
Replaced `variant="light"` and `variant="inputLike"` with
`variant="default"` (no behavior change for default styling). Added
`cta` and `outline` variants and unified active/hover styles between
text- and icon-mode buttons.
([#15985](https://github.com/mastra-ai/mastra/pull/15985))

**Why:** A single source of truth for variants means consistent visuals,
fewer drift bugs, simpler maintenance, and a more predictable surface
for AI agents — single-variant cva is the dominant shadcn pattern across
DS components in this repo (`Card`, `Input`, `Label`, `Textarea`,
`StatusBadge`).

    **Migration:**

    ```tsx
    // Before
    import { IconButton } from '@mastra/playground-ui';
    <IconButton><Settings /></IconButton>
    <Button variant="light">…</Button>
    <Combobox variant="inputLike" />

    // After
    import { Button } from '@mastra/playground-ui';
    <Button size="icon-md"><Settings /></Button>
    <Button variant="default">…</Button>
    <Combobox variant="default" />
    ```

### Patch Changes

- Aligned AlertDialog visual styling with Dialog component for design
system consistency. AlertDialog now uses the same surface tokens, border
radius, shadow, animation curves, and typography scale as Dialog. The
accessibility primitive remains separate (preserves `role="alertdialog"`
and explicit Action/Cancel semantics) — only the visual shell was
synced. Also added `AlertDialog.Body` for parity with Dialog.
([#15988](https://github.com/mastra-ai/mastra/pull/15988))

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0
    -   @mastra/client-js@1.15.3-alpha.0
    -   @mastra/react@0.2.33-alpha.0

## @mastra/clickhouse@1.6.0-alpha.0

### Minor Changes

- Added ClickhouseStoreVNext, a ClickHouse storage adapter that uses the
vNext observability domain by default. Equivalent to constructing a
ClickhouseStore and overriding the observability domain manually, but
exposed as a single class for new projects.
([#15984](https://github.com/mastra-ai/mastra/pull/15984))

    ```typescript
    import { Mastra } from '@mastra/core';
    import { ClickhouseStoreVNext } from '@mastra/clickhouse';

    export const mastra = new Mastra({
      storage: new ClickhouseStoreVNext({
        id: 'clickhouse-storage',
        url: process.env.CLICKHOUSE_URL!,
        username: process.env.CLICKHOUSE_USERNAME!,
        password: process.env.CLICKHOUSE_PASSWORD!,
      }),
    });
    ```

ClickhouseStoreVNext accepts the same configuration as ClickhouseStore
and reuses the same ClickHouse client across every domain.
ClickhouseStore continues to work for projects on the legacy
observability schema.

### Patch Changes

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0

## @mastra/google-drive@0.1.0-alpha.0

### Minor Changes

- Add `@mastra/google-drive`, a new Google Drive `WorkspaceFilesystem`
provider that mounts a single Drive folder as an agent workspace.
Supports OAuth access tokens, async refresh callbacks, and service
account (JWT) authentication. Implements the full `WorkspaceFilesystem`
interface — read, write, list, copy, move, mkdir, rmdir, stat, exists —
plus `expectedMtime` optimistic concurrency.
([#15756](https://github.com/mastra-ai/mastra/pull/15756))

    ```typescript
    import { Agent } from '@mastra/core/agent';
    import { Workspace } from '@mastra/core/workspace';
    import { GoogleDriveFilesystem } from '@mastra/google-drive';

    const workspace = new Workspace({
      filesystem: new GoogleDriveFilesystem({
        folderId: process.env.GOOGLE_DRIVE_FOLDER_ID!,
        accessToken: process.env.GOOGLE_DRIVE_ACCESS_TOKEN!,
      }),
    });

    const agent = new Agent({
      id: 'drive-agent',
      name: 'Drive Agent',
      model: 'openai/gpt-4o-mini',
      workspace,
    });
    ```

A matching `googleDriveFilesystemProvider` descriptor is also exported
for MastraEditor.

### Patch Changes

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0

## @mastra/client-js@1.15.3-alpha.0

### Patch Changes

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0

## @mastra/react@0.2.33-alpha.0

### Patch Changes

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0
    -   @mastra/client-js@1.15.3-alpha.0

## @mastra/deployer-cloud@1.31.0-alpha.0

### Patch Changes

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0
    -   @mastra/deployer@1.31.0-alpha.0

## @mastra/deployer-cloudflare@1.1.30-alpha.0

### Patch Changes

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0
    -   @mastra/deployer@1.31.0-alpha.0

## @mastra/deployer-netlify@1.1.6-alpha.0

### Patch Changes

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0
    -   @mastra/deployer@1.31.0-alpha.0

## @mastra/deployer-vercel@1.1.24-alpha.0

### Patch Changes

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0
    -   @mastra/deployer@1.31.0-alpha.0

## @mastra/longmemeval@1.0.35-alpha.0

### Patch Changes

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0

## @mastra/opencode@0.0.32-alpha.0

### Patch Changes

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0

## mastracode@0.16.3-alpha.0

### Patch Changes

- Fixed user message box border misalignment when the first line of text
fills the full width. The right border no longer extends past the top
corner. ([#15993](https://github.com/mastra-ai/mastra/pull/15993))

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0
    -   @mastra/observability@1.11.0-alpha.0

## @mastra/arize@1.0.22-alpha.1

### Patch Changes

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0
    -   @mastra/otel-exporter@1.0.21-alpha.1

## @mastra/arthur@0.2.8-alpha.1

### Patch Changes

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0
    -   @mastra/otel-exporter@1.0.21-alpha.1

## @mastra/braintrust@1.0.22-alpha.0

### Patch Changes

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0
    -   @mastra/observability@1.11.0-alpha.0

## @mastra/datadog@1.0.22-alpha.0

### Patch Changes

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0
    -   @mastra/observability@1.11.0-alpha.0

## @mastra/laminar@1.0.21-alpha.0

### Patch Changes

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0
    -   @mastra/observability@1.11.0-alpha.0

## @mastra/langfuse@1.2.4-alpha.1

### Patch Changes

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0
    -   @mastra/observability@1.11.0-alpha.0
    -   @mastra/otel-exporter@1.0.21-alpha.1

## @mastra/langsmith@1.1.19-alpha.0

### Patch Changes

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0
    -   @mastra/observability@1.11.0-alpha.0

## @mastra/otel-bridge@1.0.21-alpha.1

### Patch Changes

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0
    -   @mastra/observability@1.11.0-alpha.0
    -   @mastra/otel-exporter@1.0.21-alpha.1

## @mastra/otel-exporter@1.0.21-alpha.1

### Patch Changes

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0
    -   @mastra/observability@1.11.0-alpha.0

## @mastra/posthog@1.0.22-alpha.0

### Patch Changes

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0
    -   @mastra/observability@1.11.0-alpha.0

## @mastra/sentry@1.0.21-alpha.1

### Patch Changes

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0
    -   @mastra/observability@1.11.0-alpha.0
    -   @mastra/otel-exporter@1.0.21-alpha.1

## mastra@1.7.3-alpha.1

### Patch Changes

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0
    -   @mastra/deployer@1.31.0-alpha.0

## @mastra/deployer@1.31.0-alpha.0

### Patch Changes

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`7dfea5e`](https://github.com/mastra-ai/mastra/commit/7dfea5eff7774eeeccd55ceb655392d70886206b),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0
    -   @mastra/server@1.31.0-alpha.0

## @mastra/mcp-docs-server@1.1.32-alpha.1

### Patch Changes

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0

## @mastra/server@1.31.0-alpha.0

### Patch Changes

- Fixed memory query validation when optional JSON query params are
omitted with newer Zod versions.
([#15969](https://github.com/mastra-ai/mastra/pull/15969))

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0

## @mastra/express@1.3.16-alpha.0

### Patch Changes

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`7dfea5e`](https://github.com/mastra-ai/mastra/commit/7dfea5eff7774eeeccd55ceb655392d70886206b),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0
    -   @mastra/server@1.31.0-alpha.0

## @mastra/fastify@1.3.16-alpha.0

### Patch Changes

- Fix multipart file handling in Fastify adapter by aligning return type
with other adapters and preventing stream hang on file size limit.
([#15796](https://github.com/mastra-ai/mastra/pull/15796))

- Fix multipart upload tests to register the multipart content-type
parser. The tests were manually adding the preHandler hook but skipping
`registerContextMiddleware()`, which meant Fastify rejected
`multipart/form-data` requests with 415 Unsupported Media Type.
([#16002](https://github.com/mastra-ai/mastra/pull/16002))

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`7dfea5e`](https://github.com/mastra-ai/mastra/commit/7dfea5eff7774eeeccd55ceb655392d70886206b),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0
    -   @mastra/server@1.31.0-alpha.0

## @mastra/hono@1.4.11-alpha.0

### Patch Changes

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`7dfea5e`](https://github.com/mastra-ai/mastra/commit/7dfea5eff7774eeeccd55ceb655392d70886206b),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0
    -   @mastra/server@1.31.0-alpha.0

## @mastra/koa@1.4.16-alpha.0

### Patch Changes

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`7dfea5e`](https://github.com/mastra-ai/mastra/commit/7dfea5eff7774eeeccd55ceb655392d70886206b),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0
    -   @mastra/server@1.31.0-alpha.0

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

### Patch Changes

- Fixed Convex workflow snapshot loads to use the workflow/run index.
([#15971](https://github.com/mastra-ai/mastra/pull/15971))

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0

## @mastra/dynamodb@1.0.5-alpha.0

### Patch Changes

- Fixed an issue where automatic thread title generation was skipped
when using the DynamoDB storage adapter. The adapter was overwriting
empty thread titles with a `Thread <id>` placeholder on save, which
prevented the title-generation step (gated on an empty title) from
running. Empty titles now round-trip correctly so generated titles work
the same as with other storage adapters. Resolves #15998.
([#16003](https://github.com/mastra-ai/mastra/pull/16003))

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0

## @mastra/mongodb@1.7.4-alpha.0

### Patch Changes

- Removed unsupported `minScore` query option from MongoDB vector store
docs and README. Exported `MongoDBQueryVectorParams` so callers can type
`documentFilter` for `MongoDBVector.query()`.
([#15936](https://github.com/mastra-ai/mastra/pull/15936))

    Fixes #15715

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0

## create-mastra@1.7.3-alpha.1



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

### Patch Changes

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`ca27fb2`](https://github.com/mastra-ai/mastra/commit/ca27fb2bc4314d18ace0e1f22a1f3938bb683be3),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`4f5afc7`](https://github.com/mastra-ai/mastra/commit/4f5afc7899f75a4948ca61d4568b3fdd81af1638),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0
    -   @mastra/playground-ui@24.1.0-alpha.1
    -   @mastra/client-js@1.15.3-alpha.0
    -   @mastra/react@0.2.33-alpha.0

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
mbenhamd added a commit to mbenhamd/mastra that referenced this pull request May 1, 2026
* chore: version packages

* Add top-level environment config to Mastra for observability tagging (#15956)

## Description

This PR adds a top-level `environment` configuration option to the
`Mastra` class that automatically attaches the deployment environment to
every observability signal (traces, logs, metrics) without requiring
`tracingOptions.metadata.environment` on each call.

### Key Changes

- **`Mastra` class**: Added `environment` config field and
`getEnvironment()` method that resolves to the explicit config value,
falls back to `process.env.NODE_ENV`, or returns `undefined` if neither
is set
- **`Observability` entrypoint**: Modified `setMastraContext` to
propagate the resolved environment to all registered observability
instances via `__setMastraEnvironment()`
- **`BaseObservabilityInstance`**: Added `getMastraEnvironment()` and
`__setMastraEnvironment()` methods to store and retrieve the
Mastra-level environment
- **Span correlation context**: Updated to use the Mastra environment as
a fallback when `metadata.environment` is not set on a specific span
- **Documentation**: Added configuration guide and updated reference
docs

### Behavior

- Per-call `tracingOptions.metadata.environment` always takes precedence
- Falls back to `process.env.NODE_ENV` when `environment` config is not
set
- Child spans inherit the environment through metadata propagation
- Observability instances receive the environment during
`setMastraContext` initialization

## Type of Change

- [x] New feature (non-breaking change that adds functionality)
- [x] Documentation update
- [x] Test update

## Checklist

- [x] I have made corresponding changes to the documentation
- [x] I have added tests that prove my feature works
- Added comprehensive test suite in
`packages/core/src/mastra/environment.test.ts` covering config
resolution, fallback behavior, and observability propagation
- Added integration tests in `observability/mastra/src/tracing.test.ts`
verifying span correlation context behavior with Mastra environment
fallback

https://claude.ai/code/session_012fW46J3P9uuA3v8XsjcCYA

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## ELI5 (Explain Like I'm 5)

Set the environment once on Mastra (like "production" or "test"), and
that label will automatically be attached to all traces, logs, metrics,
and persisted telemetry so you don't have to pass it on every call.

## Overview

Adds a top-level `environment` configuration to Mastra, resolves it
(explicit config → `process.env.NODE_ENV` → `undefined`), exposes it via
`getEnvironment()`, and propagates the resolved value into observability
instances during `setMastraContext` so traces, logs, metrics, and
persisted span records include the deployment environment unless a
per-call override is provided.

## Key Changes

- Mastra core
  - Adds optional `environment?: string` to `Config`.
- Stores resolved environment on construction (explicit config →
`process.env.NODE_ENV` → `undefined`).
  - Adds `getEnvironment(): string | undefined`.

- Observability entrypoint
- `setMastraContext` captures `mastra.getEnvironment?.()` and calls
`__setMastraEnvironment()` on each registered observability instance
during initialization.

- Observability instance API & implementation
- `ObservabilityInstance` interface gains optional
`getMastraEnvironment?(): string | undefined` and
`__setMastraEnvironment?(environment: string | undefined): void`.
- `BaseObservabilityInstance` implements private storage plus
`__setMastraEnvironment()` and `getMastraEnvironment()`.

- Span correlation & persistence
- Root span creation (`startSpan`) injects Mastra-level environment into
root span `metadata` when `tracingOptions.metadata.environment` is not
provided; child spans inherit via existing metadata propagation.
- `BaseSpan.getCorrelationContext()` prefers `metadata.environment` and
falls back to `observabilityInstance.getMastraEnvironment()`.
- Persisted RecordedSpan/RecordedTrace consumers (scores, feedbacks,
downstream readers) preserve and surface the environment via
`correlationContext.environment`.

- Tests & snapshots
- Unit tests: `packages/core/src/mastra/environment.test.ts` (config
resolution, precedence, and propagation into observability).
- Integration tests: `observability/mastra/src/tracing.test.ts`,
`recorded.test.ts`, and other integration fixtures updated to assert
environment presence across traces, logs, metrics, recorded
scores/feedbacks, and exporter correlation contexts.
- Many trace snapshots updated to include `metadata.environment` values
(e.g., `"test"` or `"production"`).

## Precedence

1. per-call `tracingOptions.metadata.environment` (highest)  
2. Mastra-level `environment` config  
3. `process.env.NODE_ENV`  
4. `undefined` if none are present

## Documentation

- Tracing overview and Mastra class reference updated to document the
new `environment` config, its resolution rules, precedence, and
observability propagation.

## Release / Changesets

- Changesets added documenting the Mastra-level `environment` behavior;
intended minor releases for core/observability and documentation-only
changesets for snapshots.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude <noreply@anthropic.com>

* feat(clickhouse): add ClickhouseStoreVNext helper (#15984)

## Summary

Adds `ClickhouseStoreVNext`, a ClickHouse storage adapter that wires up
`ObservabilityStorageClickhouseVNext` as the observability domain by
default.

This is the helper class flagged during review of the ClickHouse storage
docs (#15912 review thread). It's equivalent to constructing a
`ClickhouseStore` and overriding the observability domain manually with
`MastraCompositeStore`, but exposed as a single class so new projects
don't have to repeat that wiring.

```typescript
import { Mastra } from '@mastra/core'
import { ClickhouseStoreVNext } from '@mastra/clickhouse'

export const mastra = new Mastra({
  storage: new ClickhouseStoreVNext({
    id: 'clickhouse-storage',
    url: process.env.CLICKHOUSE_URL!,
    username: process.env.CLICKHOUSE_USERNAME!,
    password: process.env.CLICKHOUSE_PASSWORD!,
  }),
})
```

## Implementation

`ClickhouseStoreVNext` extends `ClickhouseStore`. After `super()`
constructs the legacy domains, the constructor swaps
`this.stores.observability` for a fresh
`ObservabilityStorageClickhouseVNext` instance backed by the same
ClickHouse client. No additional connections, no duplicate config
surface — `ClickhouseConfig` works as-is.

The `name` field is overridden to `'ClickhouseStoreVNext'` so callers
introspecting the instance see the correct identity. The console logger
created by `MastraBase` still reflects the parent name (logger name is
built at construction time); that's a known minor cosmetic and easy to
clean up later if it matters.

## Docs

Updated `reference/storage/clickhouse.mdx` so the **ClickHouse for every
domain** section leads with `ClickhouseStoreVNext` as the recommended
path. The manual `MastraCompositeStore` + `ClickhouseStore` +
`ObservabilityStorageClickhouseVNext` composition is preserved as a
`Manual composition` subsection for users who need to customize the
composite (for example, to override another domain).

## Tests

Added `stores/clickhouse/src/storage/index.vnext.test.ts` covering:

- **Domain wiring**: `observability` is
`ObservabilityStorageClickhouseVNext`, not the legacy class. `memory`,
`workflows`, `scores` still come from `ClickhouseStore`.
`getStore('observability')` returns the vNext instance. `name` reports
`'ClickhouseStoreVNext'`.
- **Configuration forms**: pre-configured `ClickHouseClient` config
works. Empty `url` is rejected like `ClickhouseStore`.
- **Initialization**: `init()` runs end-to-end against ClickHouse
without throwing.

The init test requires a running ClickHouse (the existing docker-compose
harness handles this in CI). Local Docker wasn't available in this dev
environment, but typecheck and lint pass cleanly.

## Test plan

- [x] `pnpm tsc --noEmit -p tsconfig.json` (clickhouse package) — clean
- [x] `pnpm lint` (clickhouse package) — clean
- [x] `pnpm validate` (docs) — clean
- [ ] `pnpm test` (clickhouse package) — runs in CI via docker-compose

## Followup

The `name`/logger split mentioned above could be addressed by adding a
`name` override to `ClickhouseStore`'s constructor. Out of scope for
this PR.

https://claude.ai/code/session_01AzAdE2Ba5nsB8y2BebCFtK

---
_Generated by [Claude
Code](https://claude.ai/code/session_01AzAdE2Ba5nsB8y2BebCFtK)_

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

## ELI5

This PR adds a new `ClickhouseStoreVNext` helper that's like an upgraded
version of the existing ClickHouse storage option. Instead of using the
old observability system, it uses a newer, improved one—but they both
share the same database connection, so it's more efficient. Think of it
like replacing an old part of your storage system with a better version
without needing to set up a whole new database.

## Summary of Changes

**New Class: ClickhouseStoreVNext**
- Adds `ClickhouseStoreVNext` as a new export that extends
`ClickhouseStore`
- Automatically swaps the observability domain from the legacy
`ObservabilityStorageClickhouse` to the newer
`ObservabilityStorageClickhouseVNext`
- Reuses the same ClickHouse client across all domains (no duplicate
connections)
- Uses the same `ClickhouseConfig` configuration—no new settings
required
- Sets its name to `"ClickhouseStoreVNext"`

**Documentation Updates**
- Updated `docs/src/content/en/reference/storage/clickhouse.mdx` to
recommend `ClickhouseStoreVNext` as the primary option for "ClickHouse
for every domain" use cases
- Provides example configuration showing direct instantiation: `new
ClickhouseStoreVNext({id, url, username, password})`
- Preserves the manual composition approach (`MastraCompositeStore` +
`ClickhouseStore` + `ObservabilityStorageClickhouseVNext`) as an
alternative "Manual composition" subsection for users who need it

**Changeset Entry**
- Added `.changeset/twelve-coats-punch.md` marking a `minor` release for
`@mastra/clickhouse` with documentation of the new adapter

**Tests**
- New test suite at `stores/clickhouse/src/storage/index.vnext.test.ts`
covering:
- Domain wiring verification (observability uses vNext; other domains
unchanged)
- Configuration validation (ClickHouseClient config acceptance, empty
URL rejection)
  - `getStore()` behavior and `name` property
  - End-to-end `init()` against ClickHouse
  - Support for both configuration object and pre-created client

## Known Issues
- Minor cosmetic logger-name mismatch where the parent
`MastraBase`-built logger reflects the parent class name rather than
`ClickhouseStoreVNext` (documented as a follow-up item)

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

Co-authored-by: Claude <noreply@anthropic.com>

* fix(server): allow omitted optional memory query params (#15969)

This fixes a memory query validation regression that shows up when the
runtime resolves Zod 4.4.0 or newer. Zod 4.4.0 tightened
missing-key/undefined behavior for object properties, which is called
out in the release notes:
https://github.com/colinhacks/zod/releases/tag/v4.4.0

Our memory schemas were expressing optional preprocessed query fields as
`z.preprocess(fn, inner.optional())`. With newer Zod, omitted params
like `orderBy`, `metadata`, `include`, `filter`, and
`includeSystemReminders` can then fail with `expected nonoptional,
received undefined`, which breaks memory thread/message loading in
Studio and the underlying API routes.

This changes those fields to the safer equivalent `z.preprocess(fn,
inner).optional()` and keeps the preprocess functions passing through
`undefined`. That preserves the intended behavior: omitted query params
stay optional, but present JSON values still get parsed and validated.

Before:
```ts
z.preprocess(fn, inner.optional())
```

After:
```ts
z.preprocess(fn, inner).optional()
```

I also added regression coverage for the exact omitted-parameter cases
on `listThreadsQuerySchema` and `listMessagesQuerySchema`.

I verified this in the `apr-30` demo by linking the local
`@mastra/server` package and hitting the same routes that were
previously 400ing. After the change, both `/api/memory/threads` and
`/api/memory/threads/:threadId/messages` return normal JSON again
instead of validation errors.

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

## ELI5 (Explain Like I'm 5)

When you ask an API for information without providing some optional
details, the server was incorrectly rejecting your request as invalid
(because of a newer version of the validation tool it uses). This PR
fixes that by reorganizing how the validation rules work so that
optional details are actually treated as optional—if you don't send
them, that's perfectly fine.

## Changes Overview

This PR fixes a validation regression in the memory query API endpoints
that was introduced by Zod 4.4.0+. The issue occurred when optional
query parameters were omitted from requests to `/api/memory/threads` and
`/api/memory/threads/:threadId/messages`, causing validation errors with
"expected nonoptional, received undefined" even though those parameters
were intended to be optional.

## Root Cause

The memory query schemas were using `z.preprocess(fn,
schema.optional())`, which caused Zod 4.4.0+ to reject `undefined`
values during the preprocessing step. The stricter validation in newer
Zod versions exposed this improper ordering of the optional modifier,
preventing the preprocessor from handling undefined values before the
optional check.

## Solution

Refactored multiple Zod query schemas to move optionality outside the
preprocess call, changing from `z.preprocess(fn, schema.optional())` to
`z.preprocess(fn, schema).optional()`. This ensures that:
- Omitted query parameters (orderBy, metadata, include, filter,
includeSystemReminders, resourceId) pass through preprocessing without
triggering validation errors, and remain `undefined` in the parsed
result
- Present JSON values are still properly parsed and validated through
the preprocess functions
- The intended optional behavior is preserved for backward compatibility

## Files Modified

- **packages/server/src/server/schemas/memory.ts**: Refactored
preprocess callbacks in `storageOrderBySchema`, `messageOrderBySchema`,
`includeSchema`, `filterSchema`, `memoryConfigSchema`, and related
metadata/system reminder fields to use the corrected pattern (+122/-103
lines)
- **packages/server/src/server/schemas/memory.test.ts**: Added
regression tests verifying that `listThreadsQuerySchema` and
`listMessagesQuerySchema` successfully parse when optional query
parameters are omitted, with those parameters remaining `undefined` in
the result (+28 lines)
- **.changeset/four-owls-flow.md**: Patch-level version bump for
@mastra/server (+5 lines)

## Testing & Verification

- Added regression test coverage confirming that omitted optional
parameters (`resourceId`, `orderBy`, `metadata`, `include`, `filter`)
don't cause validation errors and correctly resolve to `undefined`
- Verified locally by linking the @mastra/server package and confirming
`/api/memory/threads` and `/api/memory/threads/:threadId/messages`
return normal JSON responses instead of 400 validation errors

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

* fix(mastracode): fix user message border misalignment when first line is full width (#15993)

## Description

Fixes the user message box border misalignment that occurs when the
first line of text fills 100% of the available width. The `»` prompt
prefix on the first line was not properly accounted for in the
`boxInner` width calculation — when `maxContentWidth + 2` exceeded
`maxInnerWidth`, the `Math.min` cap caused `boxInner` to be too narrow,
so the first line (content + prompt) extended past the top border
corner.

The fix removes the `Math.min(maxInnerWidth, ...)` cap. Since
`maxContentWidth <= maxInnerWidth` (the Markdown renderer wraps to that
width), `boxInner = maxContentWidth + 2` is always safe — the maximum
total line width is `width - 3`, well within the terminal.

**Before:** Right border `│` on the first line extends 2 chars past the
`╮` corner when text fills the line.

**After:** All content lines and borders align correctly regardless of
first-line content length.

## Type of Change

- [x] Bug fix (non-breaking change that fixes an issue)

## Checklist

- [x] I have made corresponding changes to the documentation (if
applicable)
- [x] I have addressed all Coderabbit comments on this PR

Link to Devin session:
https://app.devin.ai/sessions/7228326170de4982bd6f8c5bf11422ca
Requested by: @TylerBarnes

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: tyler <tylerdbarnes@gmail.com>

* Update mastracode TUI testing skill with rendering test tips (#15997)

Adds practical tips learned from testing the user message border
alignment fix: programmatic rendering verification, build workarounds,
and setup skip instructions.

Devin Session:
https://app.devin.ai/sessions/7228326170de4982bd6f8c5bf11422ca

---------

Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: tyler <tylerdbarnes@gmail.com>

* fix(core): preserve TRequestContext in workflow loop helper type inference (#15995)

Co-authored-by: Mastra Code (anthropic/claude-opus-4-7) <noreply@mastra.ai>

* fix(core): honor cancellation in dountil/dowhile/foreach loops (#15994)

Co-authored-by: Mastra Code (anthropic/claude-opus-4-7) <noreply@mastra.ai>

* feat(core): add Entra ID authentication to Azure OpenAI gateway (#15983)

* docs: add difficult bug debugging skill (#15991)

Co-authored-by: Mastra Code (openai/gpt-5.5) <noreply@mastra.ai>

* Add GoogleDriveFilesystem workspace provider (#15756)

Co-authored-by: Mastra Code (anthropic/claude-opus-4-7)
Co-authored-by: Mastra Code (anthropic/claude-opus-4-7) <noreply@mastra.ai>
Co-authored-by: Abhi Aiyer <abhiaiyer91@gmail.com>

* refactor(playground-ui): sync AlertDialog visual shell with Dialog (#15988)

* fix(fastify): handle multipart file limits and add tests (#15796)

Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Ward Peeters <ward@coding-tech.com>

* fix(core): add processInputStep to ToolCallFilter for per-step filtering (#15795)

## Description

`ToolCallFilter` only implemented `processInput` which runs once before
the agentic loop starts. In multi-step agentic loops, tool call results
from earlier steps accumulated in the context sent to subsequent LLM
calls, growing token usage unnecessarily.

This adds `processInputStep` which runs at every step of the agentic
loop, filtering tool calls before each LLM call. The implementation is
step-boundary-aware:

- **0 step-starts** (no boundaries, e.g. messages from memory): filters
all tool calls
- **1 step-start** (only 1 previous step): preserves tool results so the
LLM can use them
- **2+ step-starts** (multiple previous steps): filters older tool calls
before the second-to-last boundary while preserving the most recent
step's tool results

The filtering logic was refactored into shared private methods to avoid
duplication.

## Related Issue(s)

Fixes #15775

## Type of Change

- [x] Bug fix (non-breaking change that fixes an issue)

## Changes

- Added `processInputStep()` method to `ToolCallFilter` with
step-boundary-aware filtering
- Added `collectStepStartPositions()` and
`filterToolCallsBeforeBoundary()` private methods for part-level
filtering
- Refactored filtering into private methods: `filterMessages()`,
`filterAllToolCalls()`, `filterSpecificToolCalls()`,
`hasToolInvocations()`, `getToolInvocations()`
- Added 3 unit tests for `processInputStep` (filter all, filter
specific, empty exclude)
- Added integration test exercising ToolCallFilter through the real
agent loop with a 3-step multi-tool scenario (weather → booking → text)
verifying older tool calls are filtered while recent ones are preserved

## Checklist

- [x] I have added tests that prove my fix is effective or that my
feature works

Link to Devin session:
https://app.devin.ai/sessions/0201b8fd5dbf4d568a3011452e399940
Requested by: @wardpeet

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Ward Peeters <ward@coding-tech.com>
Co-authored-by: Tyler Barnes <tylerdbarnes@gmail.com>

* fix(mongodb): correct query() docs and export MongoDBQueryVectorParams (#15936)

* fix(cli): use https:// scheme for internal fetches when server.https is configured (#15980)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: dero.israel <dero.israel@mastra.ai>

* chore: regenerate providers and docs [skip ci]

* refactor(playground-ui): consolidate Button variants with cva (#15985)

* fix(convex): load workflow snapshots by composite index (#15971)

* fix(changeset): correct package name for fastify multipart fix (#15999)

Co-authored-by: Mastra Code (anthropic/claude-opus-4-7) <noreply@mastra.ai>

* fix: honor readOnly in semantic recall indexing (#15949)

Co-authored-by: Kyle Boyer <noreply@github.com>

* feat(core): add coalesced harness display-state subscriptions (#15974)

Adds Harness.subscribeDisplayState() for UI, SSE, TUI, and bridge
consumers that render from HarnessDisplayState. Raw subscribe() still
delivers every event for logs, debugging, analytics, and replay.

Example usage:

```ts
render(harness.getDisplayState());

const unsubscribe = harness.subscribeDisplayState(render, {
  windowMs: 250,
  maxWaitMs: 500,
});
```

The scheduler coalesces high-frequency message and tool updates, emits
fresh display-state snapshots, and flushes critical lifecycle updates
immediately.

Fixes #15973.

Validated with `pnpm --filter ./packages/core test -- display-state`,
`pnpm --filter ./packages/core check`, and `pnpm build:core`.

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

## ELI5

This PR adds a smarter way for UI components to listen to harness
updates. Instead of getting bombarded with every single internal event,
they can now use `subscribeDisplayState()` to receive batched updates
that combine rapid changes into fewer snapshots, while keeping the old
raw `subscribe()` method unchanged for debugging and logging.

## Overview

This PR introduces `Harness.subscribeDisplayState()`, a new UI-facing
subscription API that delivers coalesced `HarnessDisplayState`
snapshots. It implements intelligent batching of high-frequency internal
events (messages, tool updates) into consolidated display-state
snapshots, while preserving the raw event semantics of the existing
`subscribe()` API. Critical lifecycle events (agent start/end, errors,
approvals, suspensions, questions, plans) bypass coalescing and flush
immediately.

## Key Changes

### New Display State Scheduler Module
- **`display-state-scheduler.ts`**: Introduces `DisplayStateScheduler`
class that buffers non-critical display state updates and dispatches
them using two configurable timers:
- `windowMs` (default 250ms): throttle window that resets on each
non-critical update
  - `maxWaitMs` (default 500ms): maximum wait time to prevent starvation
  - Critical updates bypass buffering and flush immediately
- Deep-clones entire `HarnessDisplayState` before invoking listeners to
ensure isolation
- Catches and logs listener errors via `console.error` without
disrupting other listeners
- Exports constants: `DEFAULT_DISPLAY_STATE_SUBSCRIPTION_OPTIONS` and
`CRITICAL_DISPLAY_STATE_EVENT_TYPES`

### API Additions to Harness
- **`getDisplayState()`**: Returns a snapshot of current
`HarnessDisplayState` for initial rendering
- **`subscribeDisplayState(listener, options?)`**: Registers a coalesced
display-state listener that returns an unsubscribe function
  - Accepts optional `windowMs` and `maxWaitMs` tuning parameters
- Listener is not invoked immediately (caller must use
`getDisplayState()` for initial render)
  - All subscriptions are cleaned up during `harness.destroy()`

### Integration Updates
- Modified `Harness.emit()` to notify schedulers after dispatching
events, passing `isCritical` flag based on event type
- Event type `display_state_changed` is skipped to avoid
double-notification
- Harness destroy method extended to dispose and clear all registered
schedulers

### Type System Enhancements
- **New types in `types.ts`**:
- `HarnessDisplayStateListener`: callback type receiving
`HarnessDisplayState`, may be sync or async
- `HarnessDisplayStateSubscriptionOptions`: configuration interface for
`windowMs` and `maxWaitMs`
- **Index re-exports**: Both new types exported from harness module

### Documentation
- Updated harness-class.mdx with comprehensive documentation of both new
APIs
- Clarified that `subscribe()` is intended for raw event logs while
`subscribeDisplayState()` is preferred for UI rendering
- Added changeset documenting the new API with usage examples

## Testing

Comprehensive test suite in `display-state.test.ts` covering:
- Coalescing behavior driven by `windowMs` with fake timers
- Forced flushes at `maxWaitMs` to prevent starvation
- Critical event types trigger immediate (non-coalesced) emission
- Emitted snapshots are fresh deep-clones isolated from harness internal
state
- Unsubscribe and `harness.destroy()` properly cancel pending timer
flushes
- Custom coalescing options change flush timing as configured
- Raw subscriptions continue to receive every event while display
subscribers remain coalesced
- Listener errors are caught and logged without preventing other
listeners
- Validation of key snapshot fields like `isRunning`, `pendingApproval`,
`pendingSuspension`, etc.

## Validation

Changes have been validated with:
- `pnpm --filter ./packages/core test -- display-state`
- `pnpm --filter ./packages/core check`
- `pnpm build:core`

Fixes issue #15973.

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

* fix(core): isolate subagent tool results from supervisor context (#15832)

Fixes #15823.

## Summary

This keeps subagent nested tool results out of the supervisor model
context by default. The supervisor still receives the subagent text for
later iterations, while application and UI code can keep reading the raw
delegation result, including `subAgentToolResults`, from the tool result
payload.

This also adds an explicit escape hatch for workflows that intentionally
want the full subagent result in the supervisor model context:

```ts
delegation: {
  includeSubAgentToolResultsInModelContext: true,
}
```

## Why

Subagent tool results can contain large intermediate payloads, nested
tool arguments, and implementation details that are useful to
application code but usually harmful as implicit supervisor prompt
context. Sending only the subagent text by default keeps the next
supervisor model call focused and avoids accidental context bloat.

The opt-in keeps compatibility for prompt-organization workflows that
depend on the supervisor model seeing the full raw subagent result.

## Changes

- Adds text-only `toModelOutput` for subagent delegation tools by
default.
- Adds `delegation.includeSubAgentToolResultsInModelContext` to restore
full raw subagent result context when needed.
- Preserves raw nested tool results in `result.toolResults` for
application and UI consumers.
- Adds regression coverage for both default isolation and opt-in
behavior with output processors.
- Updates supervisor-agent docs and the `@mastra/core` changeset.

## Validation

- `pnpm --filter ./packages/core exec vitest run
src/agent/__tests__/supervisor-integration.test.ts
src/harness/subagent-tool.test.ts src/harness/display-state.test.ts
src/agent/message-list/tests/message-list-v5.test.ts`
- `pnpm --filter ./packages/core check`
- `pnpm --filter ./packages/core lint`
- `pnpm --dir docs validate`
- `pnpm --dir docs exec remark --no-stdout --frail --quiet --ext mdx
src/content/en/docs/agents/supervisor-agents.mdx`
- `pnpm --dir docs exec prettier --check
src/content/en/docs/agents/supervisor-agents.mdx`


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## ELI5 (Explain Like I'm 5)

Subagents used to pour all their internal steps into the supervisor's
brain and make it cluttered. This PR keeps only the subagent's final
text in the supervisor's context by default, while still saving the full
raw subagent result separately for apps/UIs; you can opt-in to include
the full raw result in the supervisor context if needed.

---

## Summary of Changes

Fixes #15823 by preventing nested subagent tool results from being
merged into the supervisor model context by default while preserving the
raw delegation payload for application/UI consumption.

### Key changes
- Code
  - packages/core/src/agent/agent.types.ts
- Adds DelegationConfig.includeSubAgentToolResultsInModelContext?:
boolean to let callers opt in to including full subagent results in the
supervisor model context.
  - packages/core/src/agent/agent.ts
- Tightens sub-agent wrapper typings (subAgentToolResults[].result and
.args typed as unknown).
- Conditionally injects a toModelOutput adapter for subagent delegation
tools: when includeSubAgentToolResultsInModelContext is false/absent,
only the subagent's processed text is converted into model-context
shape; when true, the adapter is omitted so the full raw subagent result
(including nested subAgentToolResults and metadata) is visible to the
supervisor model.
- Ensures raw nested tool results remain available under
result.toolResults for application/UI inspection.
- Tests
  - packages/core/src/agent/__tests__/supervisor-integration.test.ts
- New regression tests asserting default isolation (supervisor prompt
receives only subagent text; nested tool args/results excluded from
model context) and opt-in behavior (supervisor prompt includes
subAgentToolResults and nested tool artifacts when the flag is true).
Verifies raw results remain present on the tool result payload.
- Docs & release notes
  - docs/src/content/en/docs/agents/supervisor-agents.mdx
- Documents default behavior (only subagent text is merged into
supervisor context), how to access raw delegation payload, and usage of
includeSubAgentToolResultsInModelContext to opt into full inclusion.
  - .changeset/fifty-planets-refuse.md
- Adds a changeset entry describing the behavior change and the new
configuration flag.
- Validation
- Ran selected vitest tests, TypeScript checks, linting, and docs
validation/formatting as part of branch validation.

### Impact and compatibility
- Default: supervisor model context remains clean—only the subagent's
final assistant text is included; nested tool calls and
subAgentToolResults are excluded to avoid context pollution.
- Backwards compatibility: callers that need full nested results can opt
in by setting delegation.includeSubAgentToolResultsInModelContext: true.
- Observers: reviewers requested an opt-in/opt-out surface; this PR
implements an explicit opt-in flag to address that concern.

### Files changed (high-level)
- Modified: packages/core/src/agent/agent.types.ts,
packages/core/src/agent/agent.ts
- Added tests:
packages/core/src/agent/__tests__/supervisor-integration.test.ts
- Docs: docs/src/content/en/docs/agents/supervisor-agents.mdx
- Changeset: .changeset/fifty-planets-refuse.md
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

* fix(dynamodb): preserve empty thread titles so title generation runs (#16003)

Fixes #15998.

The DynamoDB storage adapter was overwriting empty thread titles with a
`Thread <id>` placeholder on save. Core's automatic title generation
only runs when `thread.title` is empty, so this silently prevented it
from ever running on DynamoDB.

Before:
\`\`\`ts
title: thread.title || \`Thread \${thread.id}\`,
\`\`\`

After:
\`\`\`ts
title: thread.title ?? \`Thread \${thread.id}\`,
\`\`\`

Empty titles now round-trip and generated titles work the same as with
the other adapters. I audited every other adapter's saveThread and
DynamoDB was the only one with this coercion. Added a dynamodb-specific
regression test plus a shared test in storage-test-utils so any future
adapter regressing this fails CI immediately.

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

## ELI5
The DynamoDB storage adapter was accidentally throwing away empty thread
titles and replacing them with a placeholder, which broke the system's
ability to auto-generate titles later. This fix ensures empty titles are
preserved so automatic title generation can work as intended.

## Problem
The DynamoDB storage adapter's `saveThread` method was using the
logical-OR operator (`||`) to fall back to `Thread ${thread.id}` when
`thread.title` was missing. Since `||` treats empty strings as falsy,
this caused empty-string titles to be replaced with the placeholder.
This prevented the core's automatic title generation logic (which only
runs when `!thread.title` evaluates to true) from functioning correctly.

## Solution
Replaced the logical-OR operator with nullish coalescing (`??`) in the
DynamoDB adapter's `saveThread` method. This preserves empty-string
titles through the save/round-trip while still providing a fallback only
when `thread.title` is genuinely `null` or `undefined`, allowing the
core's title generation to work as expected.

## Changes
- **stores/dynamodb/src/storage/domains/memory/index.ts**: Changed
`title: thread.title || ...` to `title: thread.title ?? ...`
- **stores/dynamodb/src/storage/index.test.ts**: Added a
DynamoDB-specific regression test verifying that empty titles round-trip
correctly through `saveThread` → `getThreadById`
- **stores/_test-utils/src/domains/memory/threads.ts**: Added a shared
test case for all storage adapters to catch regressions around empty
thread title handling
- **.changeset/empty-ads-clean.md**: Added changeset documenting the
patch for `@mastra/dynamodb`

## Testing & Validation
The fix includes two test cases:
- A DynamoDB-specific test ensuring the adapter preserves empty thread
titles
- A shared test in the storage test utilities to ensure all adapters
handle empty titles consistently

The author audited other storage adapter implementations and confirmed
DynamoDB was the only adapter using the problematic `||` coercion
pattern.

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

Co-authored-by: Mastra Code (anthropic/claude-opus-4-7) <noreply@mastra.ai>

* fix(fastify): register multipart content-type parser in upload tests (#16002)

## What

The multipart upload tests added in #15796 fail intermittently in CI
with HTTP 415 instead of 200 because they bypass the standard server
initialization flow.

## Why

The tests do:
```ts
app.addHook('preHandler', adapter.createContextMiddleware());
await adapter.registerRoute(app, testRoute, { prefix: '' });
```

This manually attaches the preHandler hook but skips
`registerContextMiddleware()`, which is where the `multipart/form-data`
content-type parser is registered
(server-adapters/fastify/src/index.ts:762). Without that parser, Fastify
rejects multipart requests with **415 Unsupported Media Type**, breaking
the 'should expose uploaded file as buffer' test.

This is the failure currently blocking the changeset bot PR #15979.

## How

Switch both multipart tests to call
`adapter.registerContextMiddleware()` directly. That method both
attaches the preHandler hook and registers the JSON + multipart
content-type parsers — the same code path the production `init()` uses.

## Test plan

```
pnpm --filter @mastra/fastify exec vitest run src/__tests__/fastify-adapter.test.ts
# Test Files  1 passed (1)
#       Tests  1964 passed (1964)
```

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

## ELI5

Tests were failing because the code that teaches Fastify how to handle
file uploads wasn't being set up properly. This PR fixes it by using the
correct method to initialize everything, which automatically registers
the needed file upload parser.

## Problem

Multipart upload tests in the Fastify adapter were experiencing
intermittent CI failures, returning HTTP 415 (Unsupported Media Type)
instead of HTTP 200. The root cause was that while tests manually
attached the Fastify preHandler hook via
`adapter.createContextMiddleware()`, they skipped calling
`adapter.registerContextMiddleware()`, which is responsible for
registering the multipart/form-data content-type parser. Without this
parser registration, Fastify rejects multipart requests with a 415
error.

## Solution

The fix updates both multipart stream-related tests to call
`adapter.registerContextMiddleware()` directly. This method:
- Attaches the preHandler hook for context middleware
- Registers both JSON and multipart content-type parsers
- Matches the production initialization code path used in `init()`

This ensures the multipart/form-data content-type parser is properly
registered before the tests execute, preventing the 415 rejection.

## Changes

- **server-adapters/fastify/src/__tests__/fastify-adapter.test.ts**:
Updated two test cases to use `adapter.registerContextMiddleware()`
instead of manually attaching the preHandler hook via `app.addHook()`
- **.changeset/fastify-multipart-test-fix.md**: Added changeset
documenting the test fix for `@mastra/fastify` (patch version)

## Testing

The fix has been validated with the Fastify adapter test suite:
- Command: `pnpm --filter @mastra/fastify exec vitest run
src/__tests__/fastify-adapter.test.ts`
- Result: 1 test file passed, 1964 tests passed

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

Co-authored-by: Mastra Code <noreply@mastra.ai>

* fix(core): compute tool concurrency from active tools (#15978)

## Description

Tool-call concurrency now follows the effective step tool surface
instead of the full registered tool set. Inactive approval or suspending
tools no longer force safe active tool calls to run one at a time.

The scheduler still stays conservative when request-wide
`requireToolApproval` is enabled, and resume paths keep a conservative
initial fallback until the LLM step recomputes the current step surface.

## Related Issue(s)

Fixes #15977

## 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
- [x] Performance improvement
- [x] Test update

## Checklist

- [ ] I have made corresponding changes to the documentation (if
applicable)
- [x] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have addressed all Coderabbit comments on this PR

Validation:

- `pnpm build:core`
- `pnpm --filter @mastra/core test
src/loop/workflows/agentic-execution/tool-call-concurrency.test.ts`
- `pnpm --filter @mastra/core test
src/agent/__tests__/tool-concurrency-active-tools.test.ts`
- `pnpm --filter @mastra/core test
src/agent/__tests__/tool-concurrency.test.ts`
- `pnpm --filter @mastra/core test
src/loop/workflows/agentic-execution/`
- `pnpm --filter ./packages/core check`

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

## ELI5

Imagine you have a toolbox with many tools, some of which need special
permission before use. Previously, the system would check *all* tools in
the box to see if any need approval, and if so, it would force *all*
tasks to use tools one-at-a-time. This PR fixes that by only checking
the tools you're *actually using* right now—so if the tools you need
don't require approval, your tasks can run in parallel even though other
unused tools in the toolbox do require approval.

## Overview

This PR fixes tool-call concurrency computation to be based on the
effective set of active tools for the current step, rather than all
registered tools. Previously, inactive approval or suspending tools
would force safe active tool calls to execute sequentially (one at a
time), unnecessarily serializing execution. Now, only active tools are
considered when determining whether sequential execution is required.

## Key Changes

**New concurrency utility module**
(`packages/core/src/loop/workflows/agentic-execution/tool-call-concurrency.ts`):
- Introduces `ToolCallForeachOptions` type and concurrency resolution
functions
- `resolveConfiguredToolCallConcurrency`: Normalizes concurrency values
with a default of 10
- `effectiveToolSetRequiresSequentialExecution`: Determines if
sequential execution is needed by checking only active tools (or all
tools if none specified) for `hasSuspendSchema`/`requireApproval` flags,
or if request-wide `requireToolApproval` is set
- `resolveToolCallConcurrency`: Selects effective concurrency (1 if
sequential required, else configured value)
- `updateToolCallForeachConcurrency`: Updates options object with
computed concurrency

**Workflow integration**
(`packages/core/src/loop/workflows/agentic-execution/index.ts`):
- Replaces inline concurrency logic with centralized
`resolveConfiguredToolCallConcurrency` and `resolveToolCallConcurrency`
calls
- Computes `toolCallForeachOptions` upfront from `toolCallConcurrency`,
`requireToolApproval`, `tools`, and `activeTools`
- Passes resolved options to both LLM step and foreach step

**LLM execution step**
(`packages/core/src/loop/workflows/agentic-execution/llm-execution-step.ts`):
- Accepts optional `toolCallForeachOptions` parameter in public
signature
- Resolves configured concurrency upfront
- After active tools are stored, conditionally updates tool call foreach
concurrency via `updateToolCallForeachConcurrency`

**Test coverage**:
- New integration test (`tool-concurrency-active-tools.test.ts`):
Validates that inactive approval/suspending tools don't serialize active
tool execution; tests concurrent execution across agent runs and tool
replacement scenarios
- New unit tests (`tool-call-concurrency.test.ts`): Validates
concurrency resolution logic, active tool filtering, and safe tool
detection

**Changeset** (`changesets/icy-trains-wait.md`): Documents the patch
bump for `@mastra/core` with release notes explaining tool calls now run
in parallel when active tools exclude approval/suspending tools.

## Impact

- **Performance**: Active tool calls can now execute in parallel even
when inactive tools require approval or suspension
- **Behavior**: Request-wide `requireToolApproval` and resume paths
remain conservative (sequential execution) until the LLM step recomputes
the current step surface
- **Backward compatibility**: The scheduler maintains conservative
defaults and explicit configuration is still respected

## References

Fixes #15977

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

Co-authored-by: Roamin <97863888+roaminro@users.noreply.github.com>

* fix(memory/integration-tests): isolate generateTitle-with-request-context recall (#16005)

## Summary

The 'should use generateTitle with request context' test in
`packages/memory/integration-tests/src/shared/agent-memory.ts` shared
resourceId `gen-title-metadata` with the prior `should preserve metadata
when generateTitle is true` test. Both tests share `dbFile` and have
`semanticRecall: true`, so the second test recalled the four
user/assistant messages written by the first test.

Recall ordering becomes non-deterministic when message timestamps tie
(the prior test uses `vi.advanceTimersByTime(100)` between two identical
user prompts, producing equal ticks). The remembered-messages block in
the LLM request payload then flipped between `U/A/U/A` and `U/A/A/U`
orderings depending on storage iteration order in CI vs local, which
changed the request hash and broke the recorded LLM replay (`No exact
match for hash 577bfeccbf72831e, ... recorded hash: f927d7c9fedd34c0`).

Use a dedicated `gen-title-with-request-context` resourceId so this
test's request payload no longer depends on prior-test recall state.

## Test plan

- `pnpm vitest run src/agent-memory.test.ts --reporter=dot` from
`packages/memory/integration-tests` — 79 passed, 5 skipped (was 78
passed, 5 skipped, 1 fail)
- `-t 'Agent thread metadata with generateTitle'` — 9 passed, 75
skipped, no fuzzy-match warnings
- `-t 'should use generateTitle with request context'` passes
individually (V4, V5, V6)

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

## ELI5
Two tests were stepping on each other's toes by sharing the same storage
location, which made one test's results unpredictably depend on what the
other test did first. The fix gives the second test its own storage
location so each test runs independently and reliably.

## Changes

**packages/memory/integration-tests/src/shared/agent-memory.ts**

Updated the `generateTitle` with request context test to use a dedicated
`resourceId` (`'gen-title-with-request-context'`) instead of reusing the
shared `'gen-title-metadata'` identifier. This isolation prevents the
test from being affected by message state recalled from the preceding
test in the suite, which was causing non-deterministic test behavior due
to tied message timestamps and variable recall ordering.

## Test Results

- **Before**: 78 passed, 5 skipped, 1 fail
- **After**: 79 passed, 5 skipped
- The previously failing test now passes consistently in both focused
and full test runs across V4–V6

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

Co-authored-by: Mastra Code (anthropic/claude-opus-4-7) <noreply@mastra.ai>

* chore: version packages (alpha) (#15979)

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/observability@1.11.0-alpha.0

### Minor Changes

- Auto-attach the Mastra-level `environment` to all observability
signals. ([#15956](https://github.com/mastra-ai/mastra/pull/15956))

### Patch Changes

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0

## @mastra/core@1.31.0-alpha.0

### Minor Changes

- Added Microsoft Entra ID authentication support for Azure OpenAI
gateways, so Azure deployments can call models without API keys when
using Azure SDK credentials.
([#15983](https://github.com/mastra-ai/mastra/pull/15983))

- Added top-level `environment` config on `Mastra` to tag observability
signals with the deployment environment.
([#15956](https://github.com/mastra-ai/mastra/pull/15956))

Set it once on the `Mastra` instance and it will be attached to all
observability signals automatically. Falls back to
`process.env.NODE_ENV` when unset; per-call
`tracingOptions.metadata.environment` still takes precedence.

    **Before**

    ```ts
    await agent.generate('hello', {
tracingOptions: { metadata: { environment: process.env.NODE_ENV } },
    });
    ```

    **After**

    ```ts
    new Mastra({
      environment: 'production',
      observability: new Observability({ ... }),
    })
    ```

    `mastra.getEnvironment()` returns the resolved value.

### Patch Changes

- Update provider registry and model documentation with latest models
and providers
([`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724))

- Fixed workflow runs not being cancellable when steps or conditions
ignored the abort signal. Cancelling a run now correctly stops
`dountil`, `dowhile`, and `foreach` loops at every cancellation boundary
— between iterations, after a step returns, after the loop condition is
evaluated, and (for `foreach`) between concurrency chunks and after the
final chunk. Previously, long-running loops (e.g. a `dountil` with a
`setTimeout` inside the step) would keep running and eventually emit
`success` even after the run was cancelled. Closes #15990.
([#15994](https://github.com/mastra-ai/mastra/pull/15994))

- Fixed type inference on workflow loop helpers (`foreach`, `dowhile`,
`dountil`) so a step's `requestContextSchema` correctly aligns with the
workflow's `requestContextSchema`. Previously these methods dropped the
workflow's `TRequestContext` from the step parameter, causing TypeScript
to reject typed-context steps even when the workflow declared a matching
schema. Steps without a `requestContextSchema` are still accepted; steps
whose schema does not match the workflow's now produce a type error.
Fixes [#15989](https://github.com/mastra-ai/mastra/issues/15989).
([#15995](https://github.com/mastra-ai/mastra/pull/15995))

- Fixed sub-agent delegation so nested tool results stay out of the
parent model context by default while remaining available to application
code. Set `delegation.includeSubAgentToolResultsInModelContext` to
include the full subagent result in the parent model context.
([#15832](https://github.com/mastra-ai/mastra/pull/15832))

- Added a coalesced display state subscription API for Harness.
([#15974](https://github.com/mastra-ai/mastra/pull/15974))

This helps UI clients render fewer updates while still receiving the
latest state. The example below renders the initial state, then
subscribes to coalesced updates with the default `windowMs` and
`maxWaitMs` timing options.

    ```ts
    render(harness.getDisplayState());

    const unsubscribe = harness.subscribeDisplayState(render, {
      windowMs: 250,
      maxWaitMs: 500,
    });
    ```

- Add `filterAfterToolSteps` to `ToolCallFilter` so tool calls can be
filtered during agentic loops after they are no longer recent. By
default, `ToolCallFilter` keeps its previous behavior and only filters
the initial input.
([#15795](https://github.com/mastra-ai/mastra/pull/15795))

- Fixed tool calls to run in parallel when active tools exclude approval
or suspending tools.
([#15978](https://github.com/mastra-ai/mastra/pull/15978))

- Fix semantic recall indexing to honor read-only memory mode.
([#15949](https://github.com/mastra-ai/mastra/pull/15949))

## @mastra/playground-ui@24.1.0-alpha.1

### Minor Changes

- Refactored Button component to use a single `cva`
(class-variance-authority) variant config instead of nested manual maps.
Consolidated `IconButton` into `Button` via
`size="icon-sm|icon-md|icon-lg"` and removed the `IconButton` export.
Replaced `variant="light"` and `variant="inputLike"` with
`variant="default"` (no behavior change for default styling). Added
`cta` and `outline` variants and unified active/hover styles between
text- and icon-mode buttons.
([#15985](https://github.com/mastra-ai/mastra/pull/15985))

**Why:** A single source of truth for variants means consistent visuals,
fewer drift bugs, simpler maintenance, and a more predictable surface
for AI agents — single-variant cva is the dominant shadcn pattern across
DS components in this repo (`Card`, `Input`, `Label`, `Textarea`,
`StatusBadge`).

    **Migration:**

    ```tsx
    // Before
    import { IconButton } from '@mastra/playground-ui';
    <IconButton><Settings /></IconButton>
    <Button variant="light">…</Button>
    <Combobox variant="inputLike" />

    // After
    import { Button } from '@mastra/playground-ui';
    <Button size="icon-md"><Settings /></Button>
    <Button variant="default">…</Button>
    <Combobox variant="default" />
    ```

### Patch Changes

- Aligned AlertDialog visual styling with Dialog component for design
system consistency. AlertDialog now uses the same surface tokens, border
radius, shadow, animation curves, and typography scale as Dialog. The
accessibility primitive remains separate (preserves `role="alertdialog"`
and explicit Action/Cancel semantics) — only the visual shell was
synced. Also added `AlertDialog.Body` for parity with Dialog.
([#15988](https://github.com/mastra-ai/mastra/pull/15988))

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0
    -   @mastra/client-js@1.15.3-alpha.0
    -   @mastra/react@0.2.33-alpha.0

## @mastra/clickhouse@1.6.0-alpha.0

### Minor Changes

- Added ClickhouseStoreVNext, a ClickHouse storage adapter that uses the
vNext observability domain by default. Equivalent to constructing a
ClickhouseStore and overriding the observability domain manually, but
exposed as a single class for new projects.
([#15984](https://github.com/mastra-ai/mastra/pull/15984))

    ```typescript
    import { Mastra } from '@mastra/core';
    import { ClickhouseStoreVNext } from '@mastra/clickhouse';

    export const mastra = new Mastra({
      storage: new ClickhouseStoreVNext({
        id: 'clickhouse-storage',
        url: process.env.CLICKHOUSE_URL!,
        username: process.env.CLICKHOUSE_USERNAME!,
        password: process.env.CLICKHOUSE_PASSWORD!,
      }),
    });
    ```

ClickhouseStoreVNext accepts the same configuration as ClickhouseStore
and reuses the same ClickHouse client across every domain.
ClickhouseStore continues to work for projects on the legacy
observability schema.

### Patch Changes

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0

## @mastra/google-drive@0.1.0-alpha.0

### Minor Changes

- Add `@mastra/google-drive`, a new Google Drive `WorkspaceFilesystem`
provider that mounts a single Drive folder as an agent workspace.
Supports OAuth access tokens, async refresh callbacks, and service
account (JWT) authentication. Implements the full `WorkspaceFilesystem`
interface — read, write, list, copy, move, mkdir, rmdir, stat, exists —
plus `expectedMtime` optimistic concurrency.
([#15756](https://github.com/mastra-ai/mastra/pull/15756))

    ```typescript
    import { Agent } from '@mastra/core/agent';
    import { Workspace } from '@mastra/core/workspace';
    import { GoogleDriveFilesystem } from '@mastra/google-drive';

    const workspace = new Workspace({
      filesystem: new GoogleDriveFilesystem({
        folderId: process.env.GOOGLE_DRIVE_FOLDER_ID!,
        accessToken: process.env.GOOGLE_DRIVE_ACCESS_TOKEN!,
      }),
    });

    const agent = new Agent({
      id: 'drive-agent',
      name: 'Drive Agent',
      model: 'openai/gpt-4o-mini',
      workspace,
    });
    ```

A matching `googleDriveFilesystemProvider` descriptor is also exported
for MastraEditor.

### Patch Changes

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0

## @mastra/client-js@1.15.3-alpha.0

### Patch Changes

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0

## @mastra/react@0.2.33-alpha.0

### Patch Changes

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0
    -   @mastra/client-js@1.15.3-alpha.0

## @mastra/deployer-cloud@1.31.0-alpha.0

### Patch Changes

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0
    -   @mastra/deployer@1.31.0-alpha.0

## @mastra/deployer-cloudflare@1.1.30-alpha.0

### Patch Changes

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0
    -   @mastra/deployer@1.31.0-alpha.0

## @mastra/deployer-netlify@1.1.6-alpha.0

### Patch Changes

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://github.com/mastra-ai/mastra/commit/48a42f114a4006a95e0b7a1b5ad1a24815a175c2),
[`2c83efc`](https://github.com/mastra-ai/mastra/commit/2c83efc4482b3efe50830e3b8b4ba9a8d219edff),
[`282a10c`](https://github.com/mastra-ai/mastra/commit/282a10c9446e9922afe80e10e3770481c8ac8a28)]:
    -   @mastra/core@1.31.0-alpha.0
    -   @mastra/deployer@1.31.0-alpha.0

## @mastra/deployer-vercel@1.1.24-alpha.0

### Patch Changes

- Updated dependencies
\[[`1723e09`](https://github.com/mastra-ai/mastra/commit/1723e099829892419ddbfe49287acfeac2522724),
[`629f9e9`](https://github.com/mastra-ai/mastra/commit/629f9e9a7e56aa8f129515a3923c5813298790c7),
[`25168fb`](https://github.com/mastra-ai/mastra/commit/25168fb9c1de9db7f8171df4f58ceb842c53aa29),
[`ab34b5a`](https://github.com/mastra-ai/mastra/commit/ab34b5a2191b8e4353df1dbf7b9155e7d6628d79),
[`5fb6c2a`](https://github.com/mastra-ai/mastra/commit/5fb6c2a95c1843cc231704b91354311fc1f34a71),
[`394f0cf`](https://github.com/mastra-ai/mastra/commit/394f0cfc31e6b4d801219fdef2e9cc69e5bc8682),
[`3d7f709`](https://github.com/mastra-ai/mastra/commit/3d7f709b615e588050bb6283c4ee5cfe2978cbde),
[`48a42f1`](https://g…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Coalesce Harness display-state subscriptions for UI consumers

2 participants