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

254 commits

Author SHA1 Message Date
shreyas-mastra
8d4abc4f88
chore(deps): Vanta 2026-11-12 — raise undici to 8.12.4 / 7.30.2 (#30205) 2026-11-12 07:20:12 -08:00
Abhi Aiyer
3dbe6f4314
fix(agent-controller): restore stored tool suspensions (#30132)
## Problem
When the server process that parked a run on a tool question (for
example `submit_plan`) goes away, the run stays suspended in storage.
Approving the plan later was rejected with `{ok:false,
reason:"no_pending_suspension"}` because claiming only looked in memory.
The Factory UI treated that 200 as success, so "Approve & build" did
nothing and the card kept offering buttons. Seen in prod on thread
`f82402a7` (plan waiting about 14h).

## Changes
- **core:** `Session.restoreStoredToolSuspension(toolCallId, runId?)`
registers a suspension that exists only in storage. It only does this
when exactly one stored suspended run on the active thread matches the
tool call id, and it skips approval prompts.
- **server:** the tool-suspension route restores the stored suspension
before claiming it. The claim stays synchronous.
- **factory-ui:** reply mutations now reject `ok:false` acks and show an
error toast. The respond mutation refetches the session. The transcript
only resolves a prompt once the reply was actually delivered.

## Tests
- `session-stored-suspension-after-restart.test.ts`: park on one
controller, then approve from a second controller that shares storage.
Fails before the fix. A negative case covers unknown calls and
mismatched runs.
- `useRespondSuspensionRejected.msw.test.tsx`: an `ok:false` ack fails
the mutation. Fails before the fix.
- core agent-controller 1021/1021, server agent-controller 104/104,
factory-ui chat/hooks 616/616, typecheck clean.


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

**ELI5:** When an AI agent asks a question and waits for an answer, the
server can restart before the user replies. The reply used to fail
because the server only checked memory. Now the server loads the waiting
question from storage, so the reply works. The user interface also shows
an error when a reply is rejected.

## Overview

This change fixes replies to tool prompts after the process that parked
the run has stopped. Before this change, the claim step checked only
in-memory suspensions. A reply could return `{ ok: false, reason:
"no_pending_suspension" }`. Factory UI treated that response as success,
so the prompt buttons stayed visible.

The change also keeps prompt cards in sync across windows. When a tool
call completes, the matching approval or suspension card clears in every
window.

## Changes

**Core (`packages/core/src/agent-controller/session.ts`)**
- Adds `Session.restoreStoredToolSuspension(toolCallId?: string, runId?:
string): Promise<void>`.
- Returns without a storage lookup when the tool-call ID is missing, the
suspension is already resolvable, or no thread is active.
- Searches suspended runs in storage for the active thread and resource.
It checks each configured agent, reads 100 runs per page, and reads at
most 10 pages per agent.
- Optionally filters by `runId`. Matches only non-approval tool calls
that have the requested ID and a tool name.
- Stops scanning an agent on the no-storage error. Propagates other
lookup errors.
- Registers the suspension and caches its owning agent only when exactly
one match exists and no concurrent restore occurred.

**Server (`packages/server/src/server/handlers/agent-controller.ts`)**
- If `session.restoreStoredToolSuspension` is available, the
tool-suspension route awaits it with `toolCallId` and `runId`. It then
claims the suspension. If the method is not available, the route claims
directly.
- Rejected claims return `{ ok: false, reason }`. Accepted claims are
acknowledged, and the suspension response runs in the background.

**Factory UI**
- `useAgentControllerRunMutations.ts`:
- Validates tool approval and suspension acknowledgments with
`requireAccepted`. A rejected acknowledgment throws the new
`RejectedReplyError`.
- Adds `isEndedPrompt(error: unknown): boolean`. It returns true for
rejections with reason `no_pending_suspension`.
  - Both mutations report errors in a toast.
- Suspension-reply errors invalidate the session query. Successful
mutations also invalidate it.
- `Transcript.tsx`: Resolves a prompt after a successful mutation. On
rejection, resolves the prompt only when `isEndedPrompt` returns true.
Otherwise, leaves it unresolved.
- `services/transcript.ts`:
- On a `tool_end` event, updates the tool result. Removes only the
approval or suspension prompt with the matching `toolCallId`.
- Omits persisted prompts for tool calls in terminal states (`result`,
`output-error`, or `output-denied`).
- During server-window reconciliation, removes prompts for terminal tool
calls. Updates matching assistant tool invocations from persisted
terminal parts.

**Changeset (`.changeset/stale-plan-approval.md`)**
- Declares patch releases for `@mastra/core` and `@mastra/server`.

**Channels test
(`packages/core/src/channels/__tests__/agent-controller-channels.test.ts`)**
- The allow/deny policy test sets `deployTool` permission in
`onSessionStart`. It no longer sets the permission on a manually created
session. It reads the session after inbound processing.

**Tests**
-
`packages/core/src/agent-controller/__tests__/session-stored-suspension-after-restart.test.ts`
(new, +169): Covers approval from a second controller that shares
storage. Covers an unknown tool call, a call tied to a different run,
and the 10-page limit.
-
`mastracode/factory-ui/src/hooks/__tests__/useRespondSuspensionRejected.msw.test.tsx`
(new, +45): Mocks a `no_pending_suspension` rejection. Asserts an error
whose message indicates the prompt is no longer waiting. Asserts that
`isEndedPrompt` classifies only that rejection reason as an ended
prompt.
-
`mastracode/factory-ui/src/ui/domains/chat/services/__tests__/transcript.test.ts`
(+57): Covers persisted prompt visibility. A prompt stays visible while
its tool call has no result. It is hidden when a later message or
refetched window includes the result. A `tool_end` event clears only the
prompt with the matching `toolCallId`.
- `mastracode/web/e2e/web/approval-other-window.scenario.test.ts` (new,
+130): End-to-end scenarios for prompts in two windows. After a response
settles, approval, plan-suspension, and `ask_user` cards clear from the
non-answering window. Approval cards clear from the answering window.
Unanswered cards stay in both windows.
- `mastracode/web/e2e/web/fixtures/approval-other-window.json` (new,
+104): Fixture for the end-to-end scenarios. Defines six `gpt-5.4-mini`
interactions: write-file approve and decline, plan approve and revise,
and an `ask_user` prompt.

## Scope

- 12 files changed, 663 lines added, 30 lines removed.
- Added declarations:
- `Session.restoreStoredToolSuspension` (method,
`packages/core/src/agent-controller/session.ts`)
- `RejectedReplyError` (class) and `isEndedPrompt` (function) in
`mastracode/factory-ui/src/hooks/useAgentControllerRunMutations.ts`

## Test results

The author reports these results. This review did not run them:
- Core agent-controller: 1021/1021 passed.
- Server agent-controller: 104/104 passed.
- Factory UI chat and hooks: 616/616 passed.
- Typecheck: clean.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
Co-authored-by: mastra-platform[bot] <mastra-platform[bot]@users.noreply.github.com>
2026-11-11 18:05:50 -08:00
Dustin Schau
99e0cea5c8
feat(factory): give sessions the Platform project's Mastra Connect tools and a host tools option (#28756)
**─────── TLDR ───────**
> Factory sessions in Slack, web chat and on work items can now use the
Mastra Connect tools of every connection attached to the Factory's
Platform project.

Attach Linear to the project on Platform's Connect page, and a Slack
thread can ask about its issues. The organization's other connections
stay out until someone attaches them, and a new project has none. It
needs Platform credentials and `MASTRA_PROJECT_ID`: Platform deploys
already have both, and local or self-hosted Factories set them in
`.env`. Tools with delete or archive in their name are left out, and so
are GitHub and GitLab tools. Connect caches the list for 30 seconds and
keeps the last one while Platform refreshes fail. A first listing that
fails or takes over 15 seconds leaves the run without Connect tools, and
Factory logs why.

### Behavior changed

a session on a Factory whose project has Linear attached
&nbsp;&nbsp;└─ **new** — it calls Connect's `linear_*` tools, no
approval prompt

Settings → Tools
&nbsp;&nbsp;└─ **new** — the attached connections, read-only, linking to
Mastra Platform

a configured tool named like one Factory already gives the session
&nbsp;&nbsp;└─ **new** — Factory's tool stays, the server warns once per
name

the host's `~/.mastracode/mcp.json`
&nbsp;&nbsp;├─ **was** — its MCP servers reached every hosted session
&nbsp;&nbsp;└─ **now** — ignored, with a warning at startup when the
file exists

### Shape changed

options and routes the reviewer now lives with
&nbsp;&nbsp;&nbsp;&nbsp;`MastraFactory({ tools })` · `GET
/web/integrations/platform/connect-tools`

`tools` takes a tool map or a per-run function and replaces the default;
`tools: {}` turns it off. The route reads the same unscoped
`/v2/projects/:id/connections` list as the resolver, so the page can't
show a list sessions don't use. Factory always registers it, like the
integration status routes, and it answers `404 connect_tools_off` when
sessions get no Connect tools: an unregistered `/web` route would fall
through to the SPA's HTML. The README and changeset carry the `mcp.json`
migration, `tools: await mcpClient.listTools()`.
`stored-board-runtime.test.ts` also picks up the
`factoryProjectSettingsUserId` rename it was missing.

### Decisions

- **Platform's attached connections are the opt-in, Factory stores
nothing** — attaching is already explicit, 2 of the org's 58 here; a
per-org table if orgs must differ.
- **no connecting from Factory** — a Factory admin isn't always a
Platform project member, so Platform's membership check decides.
- **host `tools` replaces the default instead of merging** — nothing
registers twice; spread Connect's `tools()` in yourself to keep both.
- **GitHub and GitLab Connect tools stay out of sessions** — Factory's
own source-control tools enforce repository scope and self-review, and
Connect's `github_create_pull_request` would skip both.
- **the destructive filter goes by name**, `delete` or `archive`
anywhere, any case — Connect has no MCP destructive hints to read, so
this is the check available.
- **the 15 second limit sits on the run, not on Connect's fetch** — that
fetch also carries tool calls and MCP streams, which can run longer.
- **sessions run Connect tools without approval** — attaching a
connection is the opt-in; a per-connection mode (read only, read and
write, ask before writes) is a follow-up.

### Watch

> [!WARNING]
> <mark>Every org on a Factory uses the accounts attached to its
project</mark>, and a connection attached for another app on the same
project reaches Factory sessions too. Per-org accounts through Connect's
`resourceId` are a follow-up.

> [!WARNING]
> <mark>Sessions run these tools without approval, and a name filter
can't catch everything</mark>: a SQL tool running a `DROP`, an email
send, a refund. `linear_remove_issue_label` and
`incident_io_remove_alert_tags` still get through here.

a Platform that stalls instead of failing keeps later runs without
Connect tools until that listing answers or fails. Node's `fetch` gave
up after 301 seconds when the Platform sent nothing at all, but a
response that trickles data can hold it longer: Connect's shared refresh
can't be cancelled, so a real fix belongs in `@mastra/connect`.

on deploy: a project that already has connections attached gives
sessions their tools right away. `@mastra/factory` now depends on
`@mastra/connect`.

Against the real Platform with my sign-in, the route returned linear and
incident.io, the project's 2 attached connections rather than the org's
58, and the resolver returned 101 tools from those same two providers,
none with delete or archive in their name. Without `MASTRA_PROJECT_ID`,
the route answered `404 application/json` with `connect_tools_off`,
where an unregistered path next to it served the SPA's HTML. Against a
Platform stand-in that never answers, two concurrent runs both went on
without Connect tools after 15.0 seconds. Factory's own Jira, GitLab and
incident.io connect flows mint sessions on Platform's org-level
endpoint, so what they connect reaches sessions only once someone
attaches it; the org's Jira connection is in neither project list I
checked.

### Not verified

- [ ] a signed-in session calling the tools: my machine has no personal
model key for a signed-in account
- [ ] Settings → Tools in a browser: only the MSW tests render it
- [ ] Slack end to end in a real workspace

---

> ████████████████████ **tests** `+391 −17` — 48% of the additions
> ██████████████████ **source** `+350 −3` — 157 of the additions are the
Settings UI
> ██ **docs** `+39`
> █ **changeset** `+23`
> █ **generated** `+4 −1` — lockfile

---------

Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
Co-authored-by: Damien Schneider <damien.schneider01@gmail.com>
2026-11-06 22:48:44 +01:00
Dane - AI (Mastra)
9ce7e350ea
chore(deps): lock file maintenance (#29341)
Co-authored-by: wardpeet <ward@coding-tech.com>
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-11-04 15:03:55 +01:00
Dane - AI (Mastra)
3bdb4ec5f4
chore(deps): update build tools (major) (#29026)
> [!NOTE]
> This PR body was truncated due to platform limits.

This PR contains the following updates:

| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
| [@vitest/coverage-v8](https://vitest.dev/guide/coverage)
([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8))
| pnpm.catalog.default | major | [`4.1.12` →
`5.0.5`](https://renovatebot.com/diffs/npm/@vitest%2fcoverage-v8/4.1.12/5.0.5)
| `5.1.0` |
| [@vitest/mocker@>=2.1.0
<4.1.12](https://redirect.github.com/vitest-dev/vitest/tree/main/packages/mocker)
([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/mocker))
| pnpm-workspace.overrides | major | [`4.1.12` →
`5.0.5`](https://renovatebot.com/diffs/npm/@vitest%2fmocker@>=2.1.0
<4.1.12/4.1.12/5.0.5) | `5.1.0` |
| [@vitest/ui](https://vitest.dev/guide/ui)
([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/ui))
| pnpm.catalog.default | major | [`4.1.12` →
`5.0.5`](https://renovatebot.com/diffs/npm/@vitest%2fui/4.1.12/5.0.5) |
`5.1.0` |
| [dotenv](https://redirect.github.com/motdotla/dotenv) |
devDependencies | major | [`^17.4.2` →
`^18.0.9`](https://renovatebot.com/diffs/npm/dotenv/17.4.2/18.0.9) | |
| [dotenv](https://redirect.github.com/motdotla/dotenv) |
devDependencies | major | [`17.4.2` →
`18.0.9`](https://renovatebot.com/diffs/npm/dotenv/17.4.2/18.0.9) | |
| [vitest](https://vitest.dev)
([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/vitest))
| devDependencies | major | [`^4.1.12` →
`^5.0.5`](https://renovatebot.com/diffs/npm/vitest/4.1.12/5.0.5) |
`5.1.0` |
| [vitest](https://vitest.dev)
([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/vitest))
| pnpm.catalog.default | major | [`4.1.12` →
`5.0.5`](https://renovatebot.com/diffs/npm/vitest/4.1.12/5.0.5) |
`5.1.0` |
| [vitest](https://vitest.dev)
([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/vitest))
| devDependencies | major | [`4.1.12` →
`5.0.5`](https://renovatebot.com/diffs/npm/vitest/4.1.12/5.0.5) |
`5.1.0` |
| [vitest@>=2.1.0 <4.1.12](https://vitest.dev)
([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/vitest))
| pnpm-workspace.overrides | major | [`4.1.12` →
`5.0.5`](https://renovatebot.com/diffs/npm/vitest@>=2.1.0
<4.1.12/4.1.12/5.0.5) | `5.1.0` |

---

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

---

### Release Notes

<details>
<summary>vitest-dev/vitest (@&#8203;vitest/coverage-v8)</summary>

###
[`v5.0.5`](https://redirect.github.com/vitest-dev/vitest/releases/tag/v5.0.5)

[Compare
Source](https://redirect.github.com/vitest-dev/vitest/compare/v5.0.4...v5.0.5)

#####    🐞 Bug Fixes

- Keep vite default `fs.deny` with api token file  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi
Ogawa** and **Claude Opus 5.5** in
[#&#8203;11578](https://redirect.github.com/vitest-dev/vitest/issues/11578)
[<samp>(28dc1)</samp>](28dc1edfb)
- Handle quoted file names in `--changed`  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11583](https://redirect.github.com/vitest-dev/vitest/issues/11583)
[<samp>(14921)</samp>](14921e962)
- Add `data` to the `import.meta.hot` stub  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11590](https://redirect.github.com/vitest-dev/vitest/issues/11590)
[<samp>(3a828)</samp>](3a8289ac3)
- Set `skip` in `skipIf`, ignore `undefined` options  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11591](https://redirect.github.com/vitest-dev/vitest/issues/11591)
[<samp>(d523a)</samp>](d523a15f2)
- Skip builtin loading in async leak detector  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11598](https://redirect.github.com/vitest-dev/vitest/issues/11598)
[<samp>(fe86a)</samp>](fe86a64c6)
- Keep the import frame in native loader errors  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11599](https://redirect.github.com/vitest-dev/vitest/issues/11599)
[<samp>(9697b)</samp>](9697b3894)
- Run hook cleanups when a later hook fails  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11605](https://redirect.github.com/vitest-dev/vitest/issues/11605)
[<samp>(6c5a4)</samp>](6c5a44720)
- Release mocks of finished test files  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11607](https://redirect.github.com/vitest-dev/vitest/issues/11607)
[<samp>(e9c3d)</samp>](e9c3d72f0)
- Abort all running tests on cancel  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11606](https://redirect.github.com/vitest-dev/vitest/issues/11606)
[<samp>(6621a)</samp>](6621a72d6)
- **browser**:
- Ignore synthetic pagehide events  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11582](https://redirect.github.com/vitest-dev/vitest/issues/11582)
[<samp>(ca081)</samp>](ca0813584)
- Run plugin buildStart on server creation  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11593](https://redirect.github.com/vitest-dev/vitest/issues/11593)
[<samp>(ea611)</samp>](ea611e44c)
- Drop late connections of closed sessions  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11600](https://redirect.github.com/vitest-dev/vitest/issues/11600)
[<samp>(f161e)</samp>](f161e6df2)
- Wait 30s for the browser to close  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11601](https://redirect.github.com/vitest-dev/vitest/issues/11601)
[<samp>(6498b)</samp>](6498b666a)
- Run global setup once with instances  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11596](https://redirect.github.com/vitest-dev/vitest/issues/11596)
[<samp>(8dd67)</samp>](8dd67c262)
- **reporter**:
- End reason `&#&#8203;39;failed&#&#8203;39;` on worker crash  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[#&#8203;11568](https://redirect.github.com/vitest-dev/vitest/issues/11568)
[<samp>(6ae8e)</samp>](6ae8e89ff)

#####     [View changes on
GitHub](https://redirect.github.com/vitest-dev/vitest/compare/v5.0.4...v5.0.5)

###
[`v5.0.4`](https://redirect.github.com/vitest-dev/vitest/releases/tag/v5.0.4)

[Compare
Source](https://redirect.github.com/vitest-dev/vitest/compare/v5.0.3...v5.0.4)

#####    🚀 Features

- **experimental**:
- Tag cache directories with CACHEDIR.TAG  -  by
[@&#8203;lifeiscontent](https://redirect.github.com/lifeiscontent) in
[#&#8203;11461](https://redirect.github.com/vitest-dev/vitest/issues/11461)
[<samp>(a8ea3)</samp>](a8ea3c8fd)
- Support `test.ui.theme` option  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11499](https://redirect.github.com/vitest-dev/vitest/issues/11499)
[<samp>(1da66)</samp>](1da66405d)
- Highlight selector multiple matches in trace view  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi
Ogawa** and **Claude Opus 5.5** in
[#&#8203;11489](https://redirect.github.com/vitest-dev/vitest/issues/11489)
[<samp>(5abba)</samp>](5abba1e1b)
- Print how many tests were affected and a total when running
`--changed`  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11424](https://redirect.github.com/vitest-dev/vitest/issues/11424)
[<samp>(a2336)</samp>](a23368585)
- Add an option to cache dependencies instead of statically parsing them
 -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11515](https://redirect.github.com/vitest-dev/vitest/issues/11515)
[<samp>(c0601)</samp>](c06012ac8)
- Add fit and zoom controls to trace viewer  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi
Ogawa** and **Claude Opus 5.5** in
[#&#8203;11490](https://redirect.github.com/vitest-dev/vitest/issues/11490)
[<samp>(f5dd9)</samp>](f5dd99ed0)

#####    🐞 Bug Fixes

- Fail the run on git and location filter errors  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11430](https://redirect.github.com/vitest-dev/vitest/issues/11430)
[<samp>(30d03)</samp>](30d0304d2)
- Enable fsModuleCache by default  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11435](https://redirect.github.com/vitest-dev/vitest/issues/11435)
[<samp>(ad208)</samp>](ad208cc29)
- Track project files and mocks with --changed  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11432](https://redirect.github.com/vitest-dev/vitest/issues/11432)
[<samp>(b0f2b)</samp>](b0f2b3bb9)
- Refactor caching, fix `:` in project and change the shape of `results`
cache  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11453](https://redirect.github.com/vitest-dev/vitest/issues/11453)
[<samp>(9673c)</samp>](9673c49a4)
- Keep full `$` string values when `taskTitleValueFormatTruncate` is 0
 -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa),
**Hiroshi Ogawa** and **Claude Opus 5.5** in
[#&#8203;11485](https://redirect.github.com/vitest-dev/vitest/issues/11485)
[<samp>(4f7e1)</samp>](4f7e1799b)
- Resolve node builtins in client environments  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11417](https://redirect.github.com/vitest-dev/vitest/issues/11417)
[<samp>(56b31)</samp>](56b319ac6)
- Fix module graph builtin externals after
[#&#8203;11421](https://redirect.github.com/vitest-dev/vitest/issues/11421)
 -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa),
**Hiroshi Ogawa** and **Claude Opus 5.5** in
[#&#8203;11491](https://redirect.github.com/vitest-dev/vitest/issues/11491)
and
[#&#8203;11421](https://redirect.github.com/vitest-dev/vitest/issues/11421)
[<samp>(008e1)</samp>](008e184cb)
- Wrap module mocks during in-source testing  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11505](https://redirect.github.com/vitest-dev/vitest/issues/11505)
[<samp>(36d19)</samp>](36d19cb00)
- Handle line endings in snapshot  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11522](https://redirect.github.com/vitest-dev/vitest/issues/11522)
[<samp>(4c468)</samp>](4c468aa40)
- Respect root in projects  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11521](https://redirect.github.com/vitest-dev/vitest/issues/11521)
[<samp>(26642)</samp>](26642f793)
- Resolve mocks in directories with spaces  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11539](https://redirect.github.com/vitest-dev/vitest/issues/11539)
[<samp>(caaef)</samp>](caaef9416)
- **api**:
- Publish the api token atomically  -  by
[@&#8203;umairnawaz333](https://redirect.github.com/umairnawaz333) in
[#&#8203;11323](https://redirect.github.com/vitest-dev/vitest/issues/11323)
[<samp>(6f990)</samp>](6f990fef1)
- **browser**:
- Close the mock route interception race  -  by
[@&#8203;cplieger](https://redirect.github.com/cplieger) and
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;8339](https://redirect.github.com/vitest-dev/vitest/issues/8339)
and
[#&#8203;11083](https://redirect.github.com/vitest-dev/vitest/issues/11083)
[<samp>(d6620)</samp>](d6620fae6)
- Allow toHaveTextContent without arguments  -  by
[@&#8203;nomadical](https://redirect.github.com/nomadical) in
[#&#8203;11425](https://redirect.github.com/vitest-dev/vitest/issues/11425)
[<samp>(8ebcf)</samp>](8ebcf5f8a)
- Apply API options without browser config  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;10852](https://redirect.github.com/vitest-dev/vitest/issues/10852)
[<samp>(ad055)</samp>](ad055837b)
- Preserve undefined command arguments  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) and
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[#&#8203;11497](https://redirect.github.com/vitest-dev/vitest/issues/11497)
[<samp>(1576d)</samp>](1576d3d89)
- Wait for setup mocks before importing a test file  -  by
[@&#8203;kasperpeulen](https://redirect.github.com/kasperpeulen) in
[#&#8203;11520](https://redirect.github.com/vitest-dev/vitest/issues/11520)
[<samp>(b61d1)</samp>](b61d1ced3)
- Avoid extra scroll outside the iframe  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11523](https://redirect.github.com/vitest-dev/vitest/issues/11523)
[<samp>(662e8)</samp>](662e8a363)
- Run browser instances as workers  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11525](https://redirect.github.com/vitest-dev/vitest/issues/11525)
[<samp>(bf04b)</samp>](bf04b9ccc)
- ⚠️ This can degrade performance if you have a custom `maxWorkers`
setting. Previously, it was applied incorrectly and could lead to Vitest
using too many resources. For example, a lower number would still open
too many browsers. Fixing it means Vitest opens less instances by
default now.
- Open one cdp session per tester  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11542](https://redirect.github.com/vitest-dev/vitest/issues/11542)
[<samp>(69e63)</samp>](69e6369f6)
- Clean up unmocked and pending mocks  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11537](https://redirect.github.com/vitest-dev/vitest/issues/11537)
[<samp>(5c955)</samp>](5c9552173)
- **coverage**:
- V8 browser memory leak between test files  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[#&#8203;11466](https://redirect.github.com/vitest-dev/vitest/issues/11466)
[<samp>(2297d)</samp>](2297d93a8)
- `allowExternal` fails to include uncovered files  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[#&#8203;11513](https://redirect.github.com/vitest-dev/vitest/issues/11513)
[<samp>(4ef00)</samp>](4ef000a93)
- Filenames containing brackets incorrectly showing as uncovered  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[#&#8203;11531](https://redirect.github.com/vitest-dev/vitest/issues/11531)
[<samp>(0fa80)</samp>](0fa80f53c)
- Istanbul coverage wrong when module transform warmups  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[#&#8203;11529](https://redirect.github.com/vitest-dev/vitest/issues/11529)
[<samp>(9f61d)</samp>](9f61dcca2)
- **deps**:
- Update all non-major dependencies  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11167](https://redirect.github.com/vitest-dev/vitest/issues/11167)
[<samp>(c74e0)</samp>](c74e099a9)
- **expect**:
- Fix `Map` and `Set` deep equality in some assertions  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi
Ogawa** and **Claude Opus 5.5** in
[#&#8203;11402](https://redirect.github.com/vitest-dev/vitest/issues/11402)
[<samp>(b4e79)</samp>](b4e79fd7a)
- Check value in chai-style returned  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11500](https://redirect.github.com/vitest-dev/vitest/issues/11500)
[<samp>(1aca0)</samp>](1aca02a21)
- **mocker**:
- Fix native loader mocking edge cases  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11540](https://redirect.github.com/vitest-dev/vitest/issues/11540)
[<samp>(cd423)</samp>](cd423ba04)
- **pretty-format**:
- Support boxed symbols  -  by
[@&#8203;lehni](https://redirect.github.com/lehni) in
[#&#8203;11445](https://redirect.github.com/vitest-dev/vitest/issues/11445)
and
[#&#8203;11446](https://redirect.github.com/vitest-dev/vitest/issues/11446)
[<samp>(eba44)</samp>](eba44926e)
- **reporters**:
- Junit to strip ANSI sequences from all XML attributes  -  by
[@&#8203;meganemura](https://redirect.github.com/meganemura) and
**Claude Opus 5.5** in
[#&#8203;11407](https://redirect.github.com/vitest-dev/vitest/issues/11407)
[<samp>(e1a73)</samp>](e1a731470)
- **runner**:
- Don't cache failed fixture setups  -  by
[@&#8203;hamed-bavar](https://redirect.github.com/hamed-bavar) in
[#&#8203;11237](https://redirect.github.com/vitest-dev/vitest/issues/11237)
and
[#&#8203;11238](https://redirect.github.com/vitest-dev/vitest/issues/11238)
[<samp>(4ee66)</samp>](4ee66c021)
- **typecheck**:
- Use typescript pool in toTestSpecification  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11451](https://redirect.github.com/vitest-dev/vitest/issues/11451)
[<samp>(5f273)</samp>](5f2739e74)
- **ui**:
- Remove duplicate browser-open call opening two tabs  -  by
[@&#8203;feastyr69](https://redirect.github.com/feastyr69) in
[#&#8203;11356](https://redirect.github.com/vitest-dev/vitest/issues/11356)
and
[#&#8203;11358](https://redirect.github.com/vitest-dev/vitest/issues/11358)
[<samp>(d7e13)</samp>](d7e1315c1)
- Simplify explorer filtering + fix nested tests when search matches a
suite  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa),
**Hiroshi Ogawa**, **Codex** and **Claude Opus 5.5** in
[#&#8203;11262](https://redirect.github.com/vitest-dev/vitest/issues/11262)
[<samp>(a627b)</samp>](a627be498)
- Store module graph once per environment  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi
Ogawa** and **Claude Opus 5.5** in
[#&#8203;11421](https://redirect.github.com/vitest-dev/vitest/issues/11421)
[<samp>(af903)</samp>](af903c65e)
- Mount index.html handler on the ui base path  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi
Ogawa** and **Claude Opus 5.5** in
[#&#8203;11517](https://redirect.github.com/vitest-dev/vitest/issues/11517)
[<samp>(1bc24)</samp>](1bc2495c7)
- Center split pane resize handle  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi
Ogawa** and **Claude Opus 5.5** in
[#&#8203;11506](https://redirect.github.com/vitest-dev/vitest/issues/11506)
[<samp>(e658b)</samp>](e658b9b6a)
- **vm**:
- Bind `this` to `module.exports`  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11504](https://redirect.github.com/vitest-dev/vitest/issues/11504)
[<samp>(b618a)</samp>](b618afd5c)

#####    🏎 Performance

- Reuse fsModuleCache when filtering by source  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11428](https://redirect.github.com/vitest-dev/vitest/issues/11428)
[<samp>(7ebd9)</samp>](7ebd95fdd)
- **spy**: Reset only mocks that were called or reconfigured  -  by
[@&#8203;johan-gorter](https://redirect.github.com/johan-gorter) and
**Claude Opus 5.5** in
[#&#8203;11197](https://redirect.github.com/vitest-dev/vitest/issues/11197)
[<samp>(28ef9)</samp>](28ef93df2)

#####     [View changes on
GitHub](https://redirect.github.com/vitest-dev/vitest/compare/v5.0.3...v5.0.4)

###
[`v5.0.3`](https://redirect.github.com/vitest-dev/vitest/releases/tag/v5.0.3)

[Compare
Source](https://redirect.github.com/vitest-dev/vitest/compare/v5.0.2...v5.0.3)

#####    🐞 Bug Fixes

- Isolate `result.status` between `repeats` runs  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi
Ogawa** and **Codex (GPT-6)** in
[#&#8203;11218](https://redirect.github.com/vitest-dev/vitest/issues/11218)
[<samp>(5dbeb)</samp>](5dbebe9e3)
- Don't print an interceptor warning in browser mode  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11377](https://redirect.github.com/vitest-dev/vitest/issues/11377)
[<samp>(15cc0)</samp>](15cc006aa)
- Don't retry when `test.fails` expectedly failed  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi
Ogawa** and **Codex (GPT-6)** in
[#&#8203;11219](https://redirect.github.com/vitest-dev/vitest/issues/11219)
[<samp>(b2458)</samp>](b24585f08)
- Scope cache key generators to projects  -  by
[@&#8203;ecoyoung](https://redirect.github.com/ecoyoung) in
[#&#8203;11281](https://redirect.github.com/vitest-dev/vitest/issues/11281)
and
[#&#8203;11301](https://redirect.github.com/vitest-dev/vitest/issues/11301)
[<samp>(92ba7)</samp>](92ba7fc1d)
- **browser**:
- Delay server `listen` until tests start running  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11366](https://redirect.github.com/vitest-dev/vitest/issues/11366)
[<samp>(7d8ed)</samp>](7d8ed3e9b)
- Check mock path boundaries  -  by
[@&#8203;saryn17](https://redirect.github.com/saryn17), **Ryosei Sato**
and [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11361](https://redirect.github.com/vitest-dev/vitest/issues/11361)
and
[#&#8203;11362](https://redirect.github.com/vitest-dev/vitest/issues/11362)
[<samp>(1c388)</samp>](1c3888bce)
- Keep config of browser-consumed environments  -  by
[@&#8203;kasperpeulen](https://redirect.github.com/kasperpeulen) and
**Claude** in
[#&#8203;11378](https://redirect.github.com/vitest-dev/vitest/issues/11378)
[<samp>(aafc0)</samp>](aafc0996f)
- Ignore page crash while cancelling  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11386](https://redirect.github.com/vitest-dev/vitest/issues/11386)
[<samp>(7c367)</samp>](7c36748fa)
- `toMatchScreenshot` uses wrong reference on retried tests  -  by
[@&#8203;macarie](https://redirect.github.com/macarie) in
[#&#8203;11393](https://redirect.github.com/vitest-dev/vitest/issues/11393)
[<samp>(c22ab)</samp>](c22aba992)
- **cache**:
- Revalidate imports of cached modules  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11381](https://redirect.github.com/vitest-dev/vitest/issues/11381)
[<samp>(38f98)</samp>](38f98855f)
- **deps**:
- Pin `why-is-node-running` to `3.2.1` to avoid users running into
`ERR_PNPM_TRUST_DOWNGRADE`  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[#&#8203;11403](https://redirect.github.com/vitest-dev/vitest/issues/11403)
[<samp>(f6c9a)</samp>](f6c9a4977)
- **expect**:
- Pass current equality testers to `expect.extend` asymmetric matchers
 -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa),
**Hiroshi Ogawa** and **Claude** in
[#&#8203;11401](https://redirect.github.com/vitest-dev/vitest/issues/11401)
[<samp>(3e794)</samp>](3e794a96b)
- **jsdom**:
- Support Blob on jsdom 30.1  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11379](https://redirect.github.com/vitest-dev/vitest/issues/11379)
[<samp>(6c49b)</samp>](6c49b7197)
- **pool**:
- Preserve unique pool ids when `groupOrder` is set  -  by
[@&#8203;mtorp](https://redirect.github.com/mtorp) in
[#&#8203;11392](https://redirect.github.com/vitest-dev/vitest/issues/11392)
[<samp>(50312)</samp>](50312ebb4)
- **ui**:
- Split-pane handle overlapping iframe  -  by
[@&#8203;macarie](https://redirect.github.com/macarie) in
[#&#8203;11221](https://redirect.github.com/vitest-dev/vitest/issues/11221)
[<samp>(f91db)</samp>](f91db0dfd)
- **vitest**:
- Remove root temp dir on close  -  by
[@&#8203;abhinav-phi](https://redirect.github.com/abhinav-phi) in
[#&#8203;11248](https://redirect.github.com/vitest-dev/vitest/issues/11248)
[<samp>(7c711)</samp>](7c7119cf7)
- **vm**:
- Do not optimize deps from index.html  -  by
[@&#8203;ezefernandezyf](https://redirect.github.com/ezefernandezyf),
**Hiroshi Ogawa** and **Codex (GPT-6)** in
[#&#8203;11329](https://redirect.github.com/vitest-dev/vitest/issues/11329)
and
[#&#8203;11360](https://redirect.github.com/vitest-dev/vitest/issues/11360)
[<samp>(caf28)</samp>](caf2887de)
- Don't reuse scripts across vite environments  -  by
[@&#8203;MO2k4](https://redirect.github.com/MO2k4), **Martin Oehlert**
and **Claude** in
[#&#8203;11395](https://redirect.github.com/vitest-dev/vitest/issues/11395)
[<samp>(346d3)</samp>](346d3896b)

#####     [View changes on
GitHub](https://redirect.github.com/vitest-dev/vitest/compare/v5.0.2...v5.0.3)

###
[`v5.0.2`](https://redirect.github.com/vitest-dev/vitest/releases/tag/v5.0.2)

[Compare
Source](https://redirect.github.com/vitest-dev/vitest/compare/v5.0.1...v5.0.2)

#####    🐞 Bug Fixes

- Bind `process` in case global is overwritten  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[#&#8203;11343](https://redirect.github.com/vitest-dev/vitest/issues/11343)
[<samp>(0b792)</samp>](0b79231ad)
- **detect-async-leaks**:
- Ignore `process.stdio` handles  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[#&#8203;11333](https://redirect.github.com/vitest-dev/vitest/issues/11333)
[<samp>(0fd6b)</samp>](0fd6b9790)
- **expect**:
- Fix `toMatchObject` with asymmetric matchers  -  by
[@&#8203;ShreeBohara](https://redirect.github.com/ShreeBohara), **Claude
Opus 5**, [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa),
**Hiroshi Ogawa** and **Codex (GPT-5)** in
[#&#8203;11100](https://redirect.github.com/vitest-dev/vitest/issues/11100)
[<samp>(42523)</samp>](42523289e)
- **jsdom**:
- Fix `Request` with `Blob` body on jsdom 28+  -  by
[@&#8203;harshit-d3v](https://redirect.github.com/harshit-d3v) in
[#&#8203;11295](https://redirect.github.com/vitest-dev/vitest/issues/11295)
[<samp>(d1c3e)</samp>](d1c3ecc93)
- **reporter**:
- `agent` to respect `--silent`  -  by
[@&#8203;Raj4478](https://redirect.github.com/Raj4478) and
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[#&#8203;11271](https://redirect.github.com/vitest-dev/vitest/issues/11271)
[<samp>(5b95e)</samp>](5b95efb6d)
- **reporters**:
- Handle concurrent `createReport` calls  -  by
[@&#8203;7rulnik](https://redirect.github.com/7rulnik) in
[#&#8203;11278](https://redirect.github.com/vitest-dev/vitest/issues/11278)
[<samp>(e8e55)</samp>](e8e556ff7)
- `hanging-process` to use ESM entrypoint  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[#&#8203;11316](https://redirect.github.com/vitest-dev/vitest/issues/11316)
[<samp>(4e91e)</samp>](4e91e5668)
- **spy**:
- Fix stack overflow when spying `Set.prototype.add`  -  by
[@&#8203;fengmk2](https://redirect.github.com/fengmk2) in
[#&#8203;11299](https://redirect.github.com/vitest-dev/vitest/issues/11299)
[<samp>(a0a93)</samp>](a0a939653)
- **ui**:
- Persist authentication cookie beyond current browser session  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi
Ogawa** and **OpenCode (gpt-5.6-sol)** in
[#&#8203;11066](https://redirect.github.com/vitest-dev/vitest/issues/11066)
[<samp>(f8819)</samp>](f88195e16)

#####     [View changes on
GitHub](https://redirect.github.com/vitest-dev/vitest/compare/v5.0.1...v5.0.2)

###
[`v5.0.1`](https://redirect.github.com/vitest-dev/vitest/releases/tag/v5.0.1)

[Compare
Source](https://redirect.github.com/vitest-dev/vitest/compare/v5.0.0...v5.0.1)

#####    🚀 Features

- **ui**:
- Move trace attempts selector to viewer header  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi
Ogawa** and **Codex** in
[#&#8203;11189](https://redirect.github.com/vitest-dev/vitest/issues/11189)
[<samp>(5dc4b)</samp>](5dc4b5c92)
- Add focused trace view layout mode  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi
Ogawa**, **OpenCode (gpt-5.6-sol)** and **Codex** in
[#&#8203;11190](https://redirect.github.com/vitest-dev/vitest/issues/11190)
[<samp>(376dc)</samp>](376dc3bc1)

#####    🐞 Bug Fixes

- Exit 1 when vitest list fails collection  -  by
[@&#8203;hamed-bavar](https://redirect.github.com/hamed-bavar) in
[#&#8203;11145](https://redirect.github.com/vitest-dev/vitest/issues/11145)
and
[#&#8203;11146](https://redirect.github.com/vitest-dev/vitest/issues/11146)
[<samp>(6108b)</samp>](6108b8197)
- Keep parse error details in static collection  -  by
[@&#8203;hamed-bavar](https://redirect.github.com/hamed-bavar) in
[#&#8203;11150](https://redirect.github.com/vitest-dev/vitest/issues/11150)
and
[#&#8203;11151](https://redirect.github.com/vitest-dev/vitest/issues/11151)
[<samp>(7c818)</samp>](7c818153a)
- Avoid recursive prototype in automocking  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11195](https://redirect.github.com/vitest-dev/vitest/issues/11195)
[<samp>(99fc5)</samp>](99fc52591)
- Prevent false Vitest import resolution  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11196](https://redirect.github.com/vitest-dev/vitest/issues/11196)
[<samp>(b426c)</samp>](b426c1976)
- Keep metadata file when clearing the cache  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11199](https://redirect.github.com/vitest-dev/vitest/issues/11199)
[<samp>(73614)</samp>](73614654a)
- Correct typos in error message and comments  -  by
[@&#8203;shinji00222](https://redirect.github.com/shinji00222) and
**Shinji** in
[#&#8203;11187](https://redirect.github.com/vitest-dev/vitest/issues/11187)
[<samp>(115c3)</samp>](115c3f6d2)
- Resolve ResolvedConfig exactOptionalPropertyTypes errors  -  by
[@&#8203;LukeAbby](https://redirect.github.com/LukeAbby) in
[#&#8203;11175](https://redirect.github.com/vitest-dev/vitest/issues/11175)
[<samp>(498fb)</samp>](498fbe922)
- Share the server on self-referencing `extends`  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11034](https://redirect.github.com/vitest-dev/vitest/issues/11034)
[<samp>(23dda)</samp>](23dda738c)
- Warn when deprecated `deps.optimizer.web` is used  -  by
[@&#8203;im10furry](https://redirect.github.com/im10furry) in
[#&#8203;11214](https://redirect.github.com/vitest-dev/vitest/issues/11214)
[<samp>(2ce29)</samp>](2ce29d5fa)
- **browser**:
- Avoid double quotes in `config.define`  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11198](https://redirect.github.com/vitest-dev/vitest/issues/11198)
[<samp>(972e2)</samp>](972e24bab)
- **doctor**:
- Measure vm pools for custom environments  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11212](https://redirect.github.com/vitest-dev/vitest/issues/11212)
[<samp>(91ab1)</samp>](91ab1588c)
- **expect**:
- Correct return value in `toMatchAriaSnapshot`  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11208](https://redirect.github.com/vitest-dev/vitest/issues/11208)
[<samp>(c119b)</samp>](c119be016)
- **fakeTimers**:
- Force `queueMicrotask` and `nextTick` in `toNotFake`  -  by
[@&#8203;kingmakeruix](https://redirect.github.com/kingmakeruix),
**kingmakeruix**, **Hiroshi Ogawa**, **Codex** and
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) in
[#&#8203;11261](https://redirect.github.com/vitest-dev/vitest/issues/11261)
[<samp>(a47d7)</samp>](a47d7908f)
- **snapshot**:
- Report obsolete keys next to skipped tests  -  by
[@&#8203;hamed-bavar](https://redirect.github.com/hamed-bavar),
**Hiroshi Ogawa** and **OpenCode (gpt-5.6-sol)** in
[#&#8203;11157](https://redirect.github.com/vitest-dev/vitest/issues/11157)
and
[#&#8203;11158](https://redirect.github.com/vitest-dev/vitest/issues/11158)
[<samp>(17e2b)</samp>](17e2b22dd)
- **types**:
- Make public declarations self-contained  -  by
[@&#8203;ZoeySigel](https://redirect.github.com/ZoeySigel) in
[#&#8203;11141](https://redirect.github.com/vitest-dev/vitest/issues/11141)
[<samp>(45546)</samp>](455466c16)
- **ui**:
- Fix collapse/expand suite with file name search  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi
Ogawa** and **Codex** in
[#&#8203;11260](https://redirect.github.com/vitest-dev/vitest/issues/11260)
[<samp>(0a712)</samp>](0a7122daa)
- Fix explorer file summary count  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi
Ogawa**, **OpenCode (gpt-5.6-sol)** and **Codex** in
[#&#8203;11125](https://redirect.github.com/vitest-dev/vitest/issues/11125)
[<samp>(05982)</samp>](05982297d)
- **utils**:
- Fix `deepMerge` to handle prototype  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi
Ogawa** and **Codex** in
[#&#8203;11215](https://redirect.github.com/vitest-dev/vitest/issues/11215)
[<samp>(4944c)</samp>](4944cf498)

#####     [View changes on
GitHub](https://redirect.github.com/vitest-dev/vitest/compare/v5.0.0...v5.0.1)

###
[`v5.0.0`](https://redirect.github.com/vitest-dev/vitest/releases/tag/v5.0.0)

[Compare
Source](https://redirect.github.com/vitest-dev/vitest/compare/v4.1.12...v5.0.0)

Vitest 5 is officially out! This release focuses on performance and
brings a lot of new features while fixing long-standing bugs. See our
[blog post](https://vitest.dev/blog/vitest-5.html) for the official
announcement.

#####    🚨 Breaking Changes

- Replace `loupe.inspect` with pretty-format  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Claude Opus
5 (1M context)** and **OpenAI Codex** in
[#&#8203;9609](https://redirect.github.com/vitest-dev/vitest/issues/9609)
[<samp>(3f802)</samp>](3f802da4b)
- Remove quotes from string values in `test.for/each` title `$` variable
(take 2)  -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa)
in
[#&#8203;10170](https://redirect.github.com/vitest-dev/vitest/issues/10170)
[<samp>(04d37)</samp>](04d37e9d7)
- Default `attachmentsDir` from `.vitest-attachements/` to
`.vitest/attachments/`  -  by
[@&#8203;MdSadiqMd](https://redirect.github.com/MdSadiqMd) in
[#&#8203;10186](https://redirect.github.com/vitest-dev/vitest/issues/10186)
[<samp>(1ba73)</samp>](1ba7338c3)
- Remove `sequential` test/suite options in favor of `concurrent`  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) and **OpenAI
Codex** in
[#&#8203;10198](https://redirect.github.com/vitest-dev/vitest/issues/10198)
[<samp>(9229f)</samp>](9229f2edc)
- Represent locator as an object instead of a string  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;10212](https://redirect.github.com/vitest-dev/vitest/issues/10212)
[<samp>(80f07)</samp>](80f07edf6)
- Inline `expect` package  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;10221](https://redirect.github.com/vitest-dev/vitest/issues/10221)
[<samp>(ad162)</samp>](ad16223e7)
- Remove deprecated entry points  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;10222](https://redirect.github.com/vitest-dev/vitest/issues/10222)
[<samp>(994c6)</samp>](994c6ddb9)
- Require Node.js 22 and Vite 6.4  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;10178](https://redirect.github.com/vitest-dev/vitest/issues/10178)
[<samp>(38762)</samp>](3876283e8)
- Fail `expect.poll` when function didn't resolve in time  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) and **OpenAI
Codex** in
[#&#8203;10233](https://redirect.github.com/vitest-dev/vitest/issues/10233)
[<samp>(4df04)</samp>](4df048c11)
- Throw an error if hoistable methods are outside the top level scope
 -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;10460](https://redirect.github.com/vitest-dev/vitest/issues/10460)
[<samp>(d0b4f)</samp>](d0b4fddcb)
- `toHaveTextContent` is strict, add `toMatchTextContent` as alternative
 -  by [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;10473](https://redirect.github.com/vitest-dev/vitest/issues/10473)
[<samp>(18f30)</samp>](18f303079)
- Don't lookup config file from ancestor directories  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **OpenAI
Codex** and **Hiroshi Ogawa** in
[#&#8203;10428](https://redirect.github.com/vitest-dev/vitest/issues/10428)
[<samp>(945d9)</samp>](945d9090e)
- Inline `@vitest/runner` package, do not publish it anymore  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;10511](https://redirect.github.com/vitest-dev/vitest/issues/10511)
[<samp>(6d6e4)</samp>](6d6e46b1e)
- Allow mutating happy-dom/jsdom window object  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi
Ogawa** and **OpenAI Codex** in
[#&#8203;10373](https://redirect.github.com/vitest-dev/vitest/issues/10373)
[<samp>(206e8)</samp>](206e8cff8)
- Expose `concurrencyId`/`workerId` on TestModule's diagnostics, make id
1-based  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;10516](https://redirect.github.com/vitest-dev/vitest/issues/10516)
[<samp>(bdd98)</samp>](bdd985433)
- Add `screenshotDirectory` config to `browser.expect.toMatchScreenshot`
 -  by [@&#8203;macarie](https://redirect.github.com/macarie) in
[#&#8203;10592](https://redirect.github.com/vitest-dev/vitest/issues/10592)
[<samp>(a60de)</samp>](a60ded0fb)
- Update `@sinonjs/fake-timers` and support mocking `Temporal`  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi
Ogawa** and **OpenCode (gpt-5.6-sol)** in
[#&#8203;10654](https://redirect.github.com/vitest-dev/vitest/issues/10654)
[<samp>(f8b15)</samp>](f8b1532fe)
- Remove webdriverio package  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;10675](https://redirect.github.com/vitest-dev/vitest/issues/10675)
[<samp>(5fed6)</samp>](5fed68f72)
- Clear mocks by default before each test  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;10613](https://redirect.github.com/vitest-dev/vitest/issues/10613)
[<samp>(0f646)</samp>](0f6463bf2)
- Don't emit localStorage warnings on Node 26, fail gracefully when
worker fails to start  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;10293](https://redirect.github.com/vitest-dev/vitest/issues/10293)
[<samp>(334ed)</samp>](334edef92)
- Separate config resolution from the server creation  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;10554](https://redirect.github.com/vitest-dev/vitest/issues/10554)
[<samp>(1c0ec)</samp>](1c0ec3444)
- Inline projects extend the root config by default  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;10750](https://redirect.github.com/vitest-dev/vitest/issues/10750)
[<samp>(fec00)</samp>](fec001ad3)
- Enable mocking Temporal without fake timers  -  by
[@&#8203;fabon-f](https://redirect.github.com/fabon-f), **Hiroshi
Ogawa** and **OpenCode (gpt-5.6-sol)** in
[#&#8203;10757](https://redirect.github.com/vitest-dev/vitest/issues/10757)
[<samp>(ac2d4)</samp>](ac2d46b42)
- Support nested projects  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;10846](https://redirect.github.com/vitest-dev/vitest/issues/10846)
[<samp>(ec367)</samp>](ec367cf2a)
- Use `>` as separator in `-t`, calculate `only` once  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;10686](https://redirect.github.com/vitest-dev/vitest/issues/10686)
[<samp>(a0b20)</samp>](a0b20bc86)
- Fail the test when an asynchronous assertion is not awaited  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;10868](https://redirect.github.com/vitest-dev/vitest/issues/10868)
[<samp>(86d4a)</samp>](86d4a9da9)
- Share the Vite server between inline projects  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;10848](https://redirect.github.com/vitest-dev/vitest/issues/10848)
[<samp>(d87c9)</samp>](d87c96ee4)
- Parse files statically in vitest list by default  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11088](https://redirect.github.com/vitest-dev/vitest/issues/11088)
[<samp>(51e94)</samp>](51e949416)
- **benchmark**:
- Rewrite the public API  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;10113](https://redirect.github.com/vitest-dev/vitest/issues/10113)
[<samp>(19f6e)</samp>](19f6e8947)
- **browser**:
- Iframe scale  -  by
[@&#8203;macarie](https://redirect.github.com/macarie) in
[#&#8203;9745](https://redirect.github.com/vitest-dev/vitest/issues/9745)
[<samp>(b6398)</samp>](b639852cc)
- Enable `locators.exact` by default  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;10430](https://redirect.github.com/vitest-dev/vitest/issues/10430)
[<samp>(e2032)</samp>](e203202f9)
- Require `sessionId` for orchestrator html request  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi
Ogawa** and **OpenAI Codex** in
[#&#8203;10522](https://redirect.github.com/vitest-dev/vitest/issues/10522)
[<samp>(79b7d)</samp>](79b7d8fcc)
- Save failure screenshots in `attachmentsDir`  -  by
[@&#8203;macarie](https://redirect.github.com/macarie) in
[#&#8203;10917](https://redirect.github.com/vitest-dev/vitest/issues/10917)
[<samp>(3b5bb)</samp>](3b5bbd8b4)
- **coverage**:
- `include/exclude` globs too eager  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[#&#8203;9818](https://redirect.github.com/vitest-dev/vitest/issues/9818)
[<samp>(edacb)</samp>](edacb0fd4)
- Allow `thresholds.perFile` to accept an object  -  by
[@&#8203;vladlenskiy](https://redirect.github.com/vladlenskiy) and
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[#&#8203;10190](https://redirect.github.com/vitest-dev/vitest/issues/10190)
[<samp>(13b78)</samp>](13b78d98b)
- **expect**:
- Fix `toThrow("")` behavior by reverting
[#&#8203;6710](https://redirect.github.com/vitest-dev/vitest/issues/6710)
 -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) in
[#&#8203;9643](https://redirect.github.com/vitest-dev/vitest/issues/9643)
and
[#&#8203;6710](https://redirect.github.com/vitest-dev/vitest/issues/6710)
[<samp>(6c3e4)</samp>](6c3e4bdbf)
- **mocker**:
- Deserialize automock as automock  -  by
[@&#8203;nami8824](https://redirect.github.com/nami8824) in
[#&#8203;10192](https://redirect.github.com/vitest-dev/vitest/issues/10192)
[<samp>(2f892)</samp>](2f892712d)
- **reporters**:
- `blob` reporter and `--merge-reports` default to `.vitest/blob/`  - 
by [@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[#&#8203;10232](https://redirect.github.com/vitest-dev/vitest/issues/10232)
[<samp>(d22b0)</samp>](d22b029ae)
- Write json and junit reporter output files to `.vitest` by default  - 
by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi
Ogawa**, **OpenCode (gpt-5.6-sol)** and
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[#&#8203;10621](https://redirect.github.com/vitest-dev/vitest/issues/10621)
[<samp>(58577)</samp>](58577290a)
- **spy**:
- Preserve class mock prototype methods on instances  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;10910](https://redirect.github.com/vitest-dev/vitest/issues/10910)
[<samp>(6093d)</samp>](6093d764a)
- **types**:
- Add better promise support in expects and matchers  -  by
[@&#8203;samchungy](https://redirect.github.com/samchungy) and
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;8266](https://redirect.github.com/vitest-dev/vitest/issues/8266)
[<samp>(41f55)</samp>](41f551bce)
- **ui**:
- Harden UI API access  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi
Ogawa** and **OpenAI Codex** in
[#&#8203;10583](https://redirect.github.com/vitest-dev/vitest/issues/10583)
[<samp>(4c26d)</samp>](4c26d7675)
- Change html reporter default output to `.vitest`  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) and **Hiroshi
Ogawa** in
[#&#8203;10620](https://redirect.github.com/vitest-dev/vitest/issues/10620)
[<samp>(29c36)</samp>](29c364d50)

#####    🚀 Features

- Add `createReport` and `.vitest` report directory convention  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[#&#8203;9993](https://redirect.github.com/vitest-dev/vitest/issues/9993)
[<samp>(72a6d)</samp>](72a6dc257)
- Expose default reporters through `configDefaults.reporters`  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) and **Claude
Opus 5 (1M context)** in
[#&#8203;10219](https://redirect.github.com/vitest-dev/vitest/issues/10219)
[<samp>(083f6)</samp>](083f6bdd6)
- Support merge reports for non-sharded multi-environment runs (take 2)
 -  by [@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa),
**Claude Opus 5 (1M context)**, **OpenAI Codex** and
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[#&#8203;10031](https://redirect.github.com/vitest-dev/vitest/issues/10031)
[<samp>(e60b2)</samp>](e60b2f49e)
- Add `logger.formatError`  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) and **OpenAI
Codex** in
[#&#8203;10268](https://redirect.github.com/vitest-dev/vitest/issues/10268)
[<samp>(2c5f3)</samp>](2c5f3ee2f)
- Support typescript build mode  -  by
[@&#8203;lishaduck](https://redirect.github.com/lishaduck) in
[#&#8203;9870](https://redirect.github.com/vitest-dev/vitest/issues/9870)
[<samp>(106da)</samp>](106da5896)
- Add toggable `injectCjsGlobals` option  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;10709](https://redirect.github.com/vitest-dev/vitest/issues/10709)
[<samp>(82671)</samp>](826714ece)
- Promote fsModuleCache to a top-level option  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;10734](https://redirect.github.com/vitest-dev/vitest/issues/10734)
[<samp>(78ed7)</samp>](78ed73afd)
- Support non-ascii characters in `for/each` title placeholders  -  by
[@&#8203;k-yle](https://redirect.github.com/k-yle) in
[#&#8203;10773](https://redirect.github.com/vitest-dev/vitest/issues/10773)
[<samp>(15e0a)</samp>](15e0af953)
- Report the duration breakdown as percentages  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) and
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in
[#&#8203;10820](https://redirect.github.com/vitest-dev/vitest/issues/10820)
[<samp>(c67d2)</samp>](c67d296f4)
- Promote parseSpecifications out of experimental  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11087](https://redirect.github.com/vitest-dev/vitest/issues/11087)
[<samp>(b628c)</samp>](b628cb680)
- Promote clearCache out of experimental  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;11086](https://redirect.github.com/vitest-dev/vitest/issues/11086)
[<samp>(d4fe1)</samp>](d4fe1986f)
- **api**:
- Expose logs recorded during the test  -  by
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;10277](https://redirect.github.com/vitest-dev/vitest/issues/10277)
[<samp>(cba20)</samp>](cba2036a1)
- **benchmark**:
- Add pluggable benchmark provider API  -  by
[@&#8203;GuillaumeLagrange](https://redirect.github.com/GuillaumeLagrange)
and [@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;10799](https://redirect.github.com/vitest-dev/vitest/issues/10799)
[<samp>(86c70)</samp>](86c700ed8)
- **browser**:
- Export aria tree utils  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) in
[#&#8203;10171](https://redirect.github.com/vitest-dev/vitest/issues/10171)
[<samp>(c3423)</samp>](c3423014c)
- Support dom snapshot trace view  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa), **Claude Opus
5 (1M context)** and **OpenAI Codex** in
[#&#8203;10102](https://redirect.github.com/vitest-dev/vitest/issues/10102)
[<samp>(7eddd)</samp>](7eddd273d)
- Provide project reference in `ToMatchScreenshotResolvePath`  -  by
[@&#8203;macarie](https://redirect.github.com/macarie) and
[@&#8203;sheremet-va](https://redirect.github.com/sheremet-va) in
[#&#8203;10138](https://redirect.github.com/vitest-dev/vitest/issues/10138)
[<samp>(16654)</samp>](166544e39)
- Show aria tree on locator element error  -  by
[@&#8203;hi-ogawa](https://redirect.github.com/hi-ogawa) and **OpenAI
Codex** in
[#&#8203;10257](https://redirect.github.com/vitest-dev/vitest/issues/10257)
[<samp>(04f04)</samp>](04f04cdd1)
- Support custom `kind` in `page.mark`  -  by
[@&#8203;AriPerkkio](https://redirect.github.com/AriPerkkio) in

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


</details>

---

### Configuration

📅 **Schedule**: (UTC)

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

🚦 **Automerge**: Enabled.

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

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend Renovate
CLI](https://redirect.github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xOTguMiIsInVwZGF0ZWRJblZlciI6IjQ0LjIwNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWF0aW9uIl19-->

---------

Co-authored-by: wardpeet <ward@coding-tech.com>
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-11-03 20:18:21 +01:00
Dane - AI (Mastra)
47a6cd82e5
chore(deps): update ai sdk (#29242)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-11-03 16:12:54 +01:00
Ehindero Israel
fe6eae5aef
feat(factory): support Vertex AI with ADC (#28850)
Adds native Google Vertex AI support to Code SDK and allows Factory
operators to expose it as a deployment model provider using Application
Default Credentials.

Configure `GOOGLE_VERTEX_PROJECT`, `GOOGLE_VERTEX_LOCATION`, and
`FACTORY_DEPLOYMENT_MODEL_PROVIDERS=google-vertex`. Vertex models are
resolved through `@ai-sdk/google-vertex` rather than the
OpenAI-compatible gateway, preserving native Gemini provider metadata
across tool calls. Signed-in tenants can only use the deployment
identity when the operator explicitly enables the provider.

Test plan: Code SDK model-resolution and catalog suites pass 85 tests,
Factory deployment-provider coverage passes 9 tests, Code SDK type-aware
lint passes, standalone web typecheck passes, and `git diff --check`
passes.

Linear:
https://linear.app/kepler-crm/issue/FACT-443/support-vertex-ai-with-adc-as-a-model-provider




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

## ELI5

This PR lets the Code SDK use Google Vertex AI with Google Cloud
credentials already available to the deployment. Factory operators can
choose whether deployments may use Vertex AI.

## Summary

- Adds a Google Vertex gateway that uses `GOOGLE_VERTEX_PROJECT` and
`GOOGLE_VERTEX_LOCATION` with Application Default Credentials (ADC).
- Resolves Vertex models through `@ai-sdk/google-vertex`. Adds a cached
model catalog that falls back to `gemini-3.8-flash` when it cannot
retrieve the catalog.
- Adds `google-vertex` to Factory’s deployment-provider allowlist.
Operators can enable it with
`FACTORY_DEPLOYMENT_MODEL_PROVIDERS=google-vertex`.
- Adds tests for Vertex model resolution, Factory provider access, and
catalog behavior.

The PR description reports that 85 Code SDK model-resolution and catalog
tests and 9 Factory provider tests passed. It also reports passing lint,
web typecheck, and `git diff --check`.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-11-02 19:32:46 +01:00
Dane - AI (Mastra)
d258f15eb1
chore(deps): update dependency varlock to ^1.24.0 (#29024) 2026-11-01 23:08:14 +01:00
Dane - AI (Mastra)
278ecceb2d
chore(deps): update ai sdk (#28928)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-30 17:19:19 +01:00
Ward Peeters
ba8b955b1a
fix(redis-streams,valkey-streams): expire idle streams by default and clear them on thread delete (#28968)
A production Factory deployment ran out of Redis memory. Every key was a
`mastra:topic:*` stream, and almost all of them (3,673 thread streams)
had no expiry. The deployment built `new RedisStreamsPubSub({ url })`
with defaults, and the default `streamIdleTtlMs` was `0`, meaning
streams never expire. Thread streams are open-ended and never get
`clearTopic()`, so they piled up forever. The Redis instance used
`volatile-lru`, which can't evict keys without a TTL, so writes just
started failing.

This PR makes `@mastra/redis-streams` and `@mastra/valkey-streams` give
every stream a sliding 7-day idle TTL by default. Writes refresh it, and
live subscribers keep receiving events after a stream expires because
the read loop recreates it. Streams are an event bus, not storage:
replay history lives in the caching layer and storage, so the backlog
only matters for grouped workers that are offline longer than the TTL.

```ts
// Before: streams never expire unless you opt in
new RedisStreamsPubSub({ url });

// After: 7-day idle TTL by default; opt out explicitly
new RedisStreamsPubSub({ url });
new RedisStreamsPubSub({ url, streamIdleTtlMs: 0 });
```

Both pubsubs now log one warning after they first connect if Redis has
`maxmemory` set with any policy other than `noeviction`. A TTL makes
streams, consumer groups and lease keys evictable under `volatile-*`,
which would silently drop events and leases (ElastiCache defaults to
`volatile-lru`). The check uses `INFO memory` because managed Redis
often blocks `CONFIG GET`.

`memory.deleteThread()` now also deletes the thread's event stream
through the registered Mastra pubsub. This runs fire-and-forget, so
neither deleting a thread nor `memory.settled()` waits on Redis during
an outage. It's skipped on older core versions. Agents configured with
their own pubsub still rely on the TTL.

The docs now require `noeviction`; the Helm guide used to say a
`volatile-*` policy was fine. They also add a runbook for reclaiming
streams created before the TTL: switch to `noeviction`, upgrade the
writers, then expire each stream relative to its last write. Tested
against real Redis/Valkey containers, including a real TTL expiry while
a subscriber is listening and a thread delete with Redis unreachable.


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

## ELI5

Redis and Valkey can keep old event streams forever, which uses storage.
This change removes streams after seven days without writes by default
and cleans up a thread’s stream when the thread is deleted.

## What changed

- Redis and Valkey streams now use a sliding seven-day idle TTL by
default. Writes refresh the TTL; reads do not. Set `streamIdleTtlMs: 0`
to disable expiry.
- The read loop recreates an expired stream so a live subscriber can
continue receiving events.
- After connecting, each pubsub warns once when `maxmemory` is enabled
with a policy other than `noeviction`. The check uses `INFO memory`.
- Thread deletion starts best-effort stream cleanup through the
registered Mastra pubsub without waiting for Redis. Older core versions
skip this cleanup.
- Documentation and the local Docker configuration now recommend
`noeviction`. The documentation also explains how to expire existing
streams that lack a TTL.

## Tests

Tests cover TTL behavior, delivery after expiry for live subscribers,
eviction-policy warnings, and thread-stream cleanup. Test execution
results were not provided.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-10-30 11:51:23 +01:00
Dane - AI (Mastra)
f6cd11f348
chore(deps): lock file maintenance (#28672)
This PR contains the following updates:

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

---

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

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

---

### Configuration

📅 **Schedule**: (UTC)

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

🚦 **Automerge**: Enabled.

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

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend Renovate
CLI](https://redirect.github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xOTAuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjE5MC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWF0aW9uIl19-->

---------

Co-authored-by: mastra-platform[bot] <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-10-29 10:02:15 +00:00
Caleb Barnes
4cd2abcbd9
feat(factory): browser tools in the local dev Factory (#28502)
`mastracode/web` is the Factory app we run locally for development. This
lets its sessions use browser tools, so agents can open pages, click
around, and take screenshots while we work on Factory.

## What

- `FACTORY_BROWSER=local` makes `mastracode/web` pass an `AgentBrowser`
to `MastraFactory`: a headless Chromium on the machine running Factory,
one per session thread so sessions don't share tabs. Unset, sessions
have no browser.
- Chromium only launches on a session's first browser tool call. Install
it once with `npx playwright install chromium`.
- `prebuild` now lists `@mastra/agent-browser` explicitly.

This doesn't change `@mastra/factory` (which already accepts `browser`),
the Factory templates, or Shipyard. A session's browser stays open until
the agent closes it or the server restarts.

## Local development only

This browser runs on the host, outside the sandbox, so the agent can
open host files (`file://`) and services on `localhost`. That's
acceptable on your own machine and is why it's opt-in, with a warning in
`.env.schema`. A shared or hosted Factory should run the browser inside
the sandbox or use a hosted browser instead; that's tracked separately.

## Test plan

- [x] `mastracode/web` typechecks
- [x] `turbo build --dry` for the `prebuild` filters includes
`@mastra/agent-browser#build`
- [ ] Start the local Factory with `FACTORY_BROWSER=local`, ask a
session to open a page and take a screenshot


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

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

## ELI5

This change lets a local Factory session use its own browser to open
pages and take screenshots. It is off by default because the browser
runs on the host, outside the sandbox.

## Changes

- Added `@mastra/agent-browser` to `mastracode/web` and included it in
the `prebuild` Turbo filters.
- When `FACTORY_BROWSER=local`, Factory creates a headless,
thread-scoped `AgentBrowser`. Otherwise, sessions do not receive browser
tools.
- Added a schema warning that browser access is for local development
only. Install Chromium on the host with `npx playwright install
chromium`.

## Testing

The author reports that `mastracode/web` typechecks. The planned manual
browser check was not reported as completed.

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

---------

Co-authored-by: CalebBarnes <CalebBarnes@users.noreply.github.com>
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-10-28 14:46:27 -07:00
Ehindero Israel
9f73a243dd
feat(factory): support Slack Socket Mode (#28449)
## Summary

Adds first-class Slack Socket Mode support to Factory while keeping
webhook mode as the default and preserving its existing behavior.

Slack integrations now validate credentials for the selected transport,
forwarding `appToken` only for Socket Mode and `signingSecret` for
webhook mode. Factory account-linking credentials remain separate from
Socket Mode transport configuration, avoiding the Slack adapter's
unsupported multi-workspace path.

Factory now owns cleanup for channel adapters that expose
`disconnect()`, so persistent Socket Mode connections close exactly once
during shutdown. The standalone Factory web template also supports
Socket Mode through `SLACK_APP_TOKEN` while retaining the existing
webhook configuration.

## Test plan

- Focused Slack integration tests: 17 passed
- Factory channel-adapter shutdown test: passed
- `@mastra/factory` lint: passed with no warnings or errors
- `mastracode/web` TypeScript check: passed
- Repository formatting check for the changed template: passed
- Live Slack validation: connected over Socket Mode, completed account
linking, received an `app_mention`, and posted a response


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

## ELI5

Factory can now talk to Slack through Socket Mode or HTTP webhooks.
Webhooks remain the default, and Factory disconnects channel adapters
when it shuts down.

## Summary

- Added Slack Socket Mode configuration with `mode: 'socket'` and
`appToken`. Slack validates the credentials required for the selected
transport.
- Kept OAuth client credentials for account linking separate from
transport credentials.
- Updated the web template to select Socket Mode when `SLACK_APP_TOKEN`
is set and webhook mode otherwise.
- Added shutdown handling for channel adapters that expose
`disconnect()`. Concurrent shutdown calls share the in-progress
shutdown, and failed disconnects can be retried.

## Validation

The PR objectives report that 17 focused Slack integration tests, the
Factory adapter-shutdown test, lint, the web TypeScript check, and the
changed-template formatting check passed. They also report live Slack
validation for Socket Mode, account linking, receiving an `app_mention`,
and posting a response.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-10-28 13:59:59 +01:00
Ward Peeters
84fa97871a
Validate the checked-in factory templates and retire the generated softwarefactory-template (#28436)
## Summary

`create-factory` now scaffolds the checked-in
`templates/template-factory` (platform) and
`templates/template-factory-self-hosted` (`--no-platform`) starters
(#28430). The old path — generating `mastra-ai/softwarefactory-template`
from `mastracode/web` with `sync-template.mjs` and pushing it from a
dedicated workflow — no longer feeds anything users receive, so this PR
removes it. The new templates sync through the same `sync-templates.yml`
as every other template.

| Before | After |
| --- | --- |
| `sync-softwarefactory-template.yml` generated a template from
`mastracode/web` and pushed it after an install/typecheck/build check
against published npm | Removed. Both factory templates sync through the
shared `sync-templates.yml`, unchanged |
| `e2e-softwarefactory` generated the template, scaffolded it, and
booted it with auth disabled | Scaffolds both checked-in templates
through the built CLI, typechecks and builds them against the local
package set, and boots the self-hosted template against its own Postgres
(`npm run db:up`) behind WorkOS auth |
| Template edits did not trigger the E2E suite | Changes under
`templates/template-factory*` run it |

Also removes `mastracode/mastra-factory/scripts/sync-template.mjs`, its
test, `template/README.md`, and the `template-out` ignores. The suite's
local registry setup is fixed: it could not resolve the verdaccio bin
(verdaccio 6 only exports `.` and `./package.json`) and, because that
failure happened after the repo was snapshot-versioned, left the working
tree mutated.

Stacked on #28430 → #28255.

## Follow-up after release

Once a `create-factory` release that uses the new templates is on
`latest`, archive `mastra-ai/softwarefactory-template` (don't delete it
— older CLI versions still clone it).

## Test plan

- [x] `create-factory`: tests (55), `tsc --noEmit`, lint
- [x] Both templates typecheck and bundle with `mastra build` against
workspace packages
- [x] Self-hosted template boots under `mastra factory dev` against
Postgres: `/signin` serves the Factory UI, `/auth/me` reports `workos`,
`/api/tools` returns 401
- [x] `e2e-softwarefactory` passes locally (7 tests, ~7 min): both
templates scaffold via the built CLI, typecheck, and build against the
local registry; the self-hosted template boots against `npm run db:up`
Postgres
- [ ] `e2e-softwarefactory` passes in CI

---------

Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-10-27 17:06:07 +01:00
Ehindero Israel
e638d5893b
fix(factory): support separate Jira API base URLs (#28569)
## Summary

Adds a separate Jira API base URL for direct Factory integrations so
scoped Atlassian API tokens can use the required gateway without
breaking browser-facing issue links.

- keeps `baseUrl` as the Jira site URL used for links such as
`https://acme.atlassian.net/browse/ENG-42`
- adds optional `apiBaseUrl`, defaulting to `baseUrl` for existing Jira
token configurations
- routes REST requests through `apiBaseUrl`, including scoped-token URLs
such as `https://api.atlassian.com/ex/jira/{cloudId}`
- adds optional `JIRA_API_BASE_URL` wiring to the standalone Factory web
host
- normalizes trailing slashes independently for site and API URLs

## Why

Factory previously used one URL for two different purposes: Jira REST
requests and human-facing issue links. Scoped Atlassian API tokens
require REST requests to use `api.atlassian.com/ex/jira/{cloudId}`, but
that gateway cannot be used to construct `/browse/{issueKey}` links.
This made scoped tokens impossible to configure correctly.

The new setting separates those roles while preserving the existing
behavior when `apiBaseUrl` is omitted.

## Test plan

- `pnpm --filter ./mastracode/factory exec vitest run
src/integrations/jira/api.test.ts
src/integrations/jira/integration.test.ts --reporter=dot --bail 1` — 41
tests passed
- `pnpm --filter ./mastracode/factory check`
- `pnpm --filter ./mastracode/factory lint` — 0 warnings, 0 errors
- `pnpm --filter ./mastracode/factory build:lib`
- `cd mastracode/web && pnpm check`
- `pnpm exec oxfmt --check $(git diff origin/main --name-only --
'*.ts')`
- `git diff --check origin/main`

Linear: FACT-445

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

## ELI5

This change lets Jira send API requests to a separate service while
keeping issue links pointed at the Jira website. If no separate API URL
is configured, requests use the existing Jira URL.

## Changes

- Added optional `apiBaseUrl` to `JiraIntegrationConfig`. Jira API
requests use this URL, while `baseUrl` remains the site URL for issue
links.
- Defaulted `apiBaseUrl` to `baseUrl` for existing configurations.
- Added optional `JIRA_API_BASE_URL` configuration for the standalone
Factory web host.
- Added tests for separate API and site URLs, URL forwarding, and the
default URL behavior.
- Added a changeset for `@mastra/factory`.

## Tests

The PR description reports 41 passing Jira tests and lists additional
Factory and web checks, lint, build, formatting, and diff-check
commands. Results for those additional checks are not provided.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-10-27 15:29:34 +01:00
Dane - AI (Mastra)
40a522c142
chore(deps): update build tools (#27997) 2026-10-22 14:33:21 +02:00
Dustin Schau
a1e248bfe0
feat(factory): let Slack runs attach workspace files to the thread (#27351)
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-10-21 10:39:13 -07:00
Dane - AI (Mastra)
9f84a1d6b4
chore(deps): update dependency varlock to ^1.23.0 (#27992)
This PR contains the following updates:

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

---

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

---

### Configuration

📅 **Schedule**: (UTC)

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

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

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

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

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend Renovate
CLI](https://redirect.github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xNzUuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjE3NS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWF0aW9uIl19-->
2026-10-21 13:16:18 +00:00
Dane - AI (Mastra)
4f60903242
chore(deps): lock file maintenance (#27013) 2026-10-21 09:25:38 +02:00
shreyas-mastra
f3cf77305f
security: Vanta remediation (2026-10-20) (#27828) 2026-10-20 08:39:07 -07:00
Damien Schneider
dda0406d8d
fix(factory): watch shared React components during development (#27657)
Factory's `dev:ui` and `factory:dev` commands build `@mastra/react`
initially but omit its watcher. Add `client-sdks/react` to the existing
Turbo filters and use the same build-before-watch ordering already
configured for Playground UI.

Validated both entrypoints with Turbo's dry run, including initial-build
ordering. Ran the actual React SDK watch command through Studio and
Factory's Vite configurations in Chromium: three consecutive component
edits per app rendered with the counter retained at 2 and no
edit-triggered page reloads. Targeted type-aware lint, types, formatting
and diff checks passed. API/Docker services were not started.

The redundant script-selection test is removed. Shared UI chunk
identities and Factory's Vite alignment are handled separately in draft
PR #27654; this change can be reviewed and merged independently.

Fixes #27656.
2026-10-20 10:41:48 +02:00
Dane - AI (Mastra)
dbde4bf36a
chore(deps): update ai sdk (#27728)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-19 19:04:28 -07:00
shreyas-mastra
fa409d430b
security: Vanta remediation pass 2026-10-14/15/19 (zod 4.6.7, @ai-sdk/provider-utils, @copilotkit template) (#27023) 2026-10-19 11:32:32 -07:00
mastra-platform[bot]
96206136bc
fix: only an explicit start creates an agent controller session, so the first prompt can't land on a stray thread (#27474) 2026-10-19 15:29:41 +02:00
mastra-platform[bot]
891f9dbd7a
test(mastracode-web): fix 14 stale create-factory web entry tests (#27518) 2026-10-18 14:02:22 -07:00
mastra-platform[bot]
870622d506
fix(create-factory): refuse to boot in production without credential encryption or an isolated sandbox (#27499) 2026-10-18 13:18:44 -07:00
Caleb Barnes
cc42d1431a
feat(factory, workspaces, factory-ui): environment builds on the FactorySandbox builds capability (#26479)
## What

A factory project's environment template can be built ahead of sessions,
so the next session finds the image warm instead of building it on first
boot.

The `FactorySandbox` `builds` capability is what makes this possible.
`DockerFactorySandbox` gains `start` and `get` here (platform and E2B
already have theirs), reporting the local image build as `building`,
`ready` or `failed` while the daemon runs it. A sandbox without `builds`
gets none of what follows: no routes, no triggers, no UI.

Factory runs a build:

- on **Build now** (`POST /web/factory/projects/:id/environment/build`,
the Environment page button, or `mastra api factory project environment
build <id>`)
- on a **cron schedule**, kept in core `Schedules` as one row per
project
- after a **push** to a linked repository's default branch, at most once
per debounce window (a single conditional update on the project row
decides the winner)

Saving settings never builds; the next trigger picks the changed
template up. No trigger starts a build while the last one is still
running. Scheduled and push builds also skip when the last build is
ready and no repository head moved. The build runs as a
`factory-environment-build` workflow registered through
`MastraFactory.prepare()`; its poll step pins the active template id and
heads on the project once the provider reports ready.

Factory stores four new columns on the project (`last_build_id`,
`last_build_attempted_at`, `build_on_push_enabled`,
`build_push_debounce_minutes`). Status and history come from the
provider through `GET …/environment/builds/:buildId` and `GET
…/environment/builds` (404 `no_history` when the provider keeps none),
with clone credentials redacted. The environment payload carries
`buildTriggers` and the last build.

After a session's own setup, each repository link records `configured`
or `failed` with the redacted error.

The Environment page gains a **Builds** section when the provider can
build: the last build's status and Build now in its header, a Build
schedule row (Off, Daily, Weekly or Custom, with the day and time or a
cron expression underneath), a Rebuild on push switch with its push
debounce in minutes, and the build history with logs when the provider
lists builds. The CLI gains `environment build`, `environment builds`
and `environment builds <buildId>`.

## How it works

- `environment/build.ts`: one build attempt. Resolves the environment,
claims the push debounce, reads the last build for schedule and push,
starts the provider build and records the id. A provider failure clears
the last build id so a later schedule cannot mistake the previous ready
build for the current template.
- `environment/build-workflow.ts`: the two-step workflow (start, await
build) and its schemas.
- `environment/build-runner.ts`: starts runs through the booted
`Mastra`, answers the start step's outcome to the caller while the poll
continues, handles the push hand-off from the GitHub webhook, and builds
the status-read context from the stored heads so a status read never
calls GitHub once a build is pinned.
- `environment/build-schedule.ts`: the per-project schedule in core
`Schedules`, cron validation with the validator `Schedules` uses, and
the availability probe.
- `environment/heads.ts`: head resolution and comparison, keyed by
repository slug.

## Test plan

- `mastracode/factory`: `pnpm exec vitest run` 3589 passed, `tsc
--noEmit` 0, `pnpm lint` 0
- `workspaces/docker`: `pnpm exec vitest run` green, including
`factory-sandbox.test.ts`
- `packages/cli`: `pnpm exec vitest run src/commands/api` 136 passed
- `mastracode/factory-ui`: `pnpm typecheck` 0, settings and workspaces
MSW suites 292 passed, `pnpm test:unit` 530 passed
- Live on the web host with a platform sandbox: Build now reached
`ready`, `GET …/builds` answered `no_history`, a schedule-triggered run
skipped as `unchanged` with a ready build and unmoved heads

Closes FACT-343






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

Factory can build a reusable environment for a project when the
project’s sandbox supports builds. Teams can start a build, set a
schedule, or rebuild after changes to a linked repository’s default
branch.

## What changed

- Added a build workflow that starts builds, checks their status, and
pins ready templates.
- Added build-start leases to prevent overlapping builds. Scheduled and
push builds skip when another build is running or when a ready build
still matches repository heads and template inputs.
- Added build status and history routes, project build settings, and CLI
commands.
- Added schedule and push-trigger controls, build status, and build
history to the Factory Environment settings page.
- Recorded per-repository setup outcomes after session setup. Setup
errors are recorded with credentials redacted.
- Saving environment settings does not start a build. Providers without
build history can return `no_history`.

## Validation

The PR description reports passing tests and type checks for Factory,
Docker workspaces, the CLI, and Factory UI. It also reports live testing
that reached `ready`, returned `no_history` from the builds endpoint,
and skipped a scheduled build as `unchanged`. The PR has a failing-tests
label, but the description does not identify a failing test.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: CalebBarnes <CalebBarnes@users.noreply.github.com>
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-10-13 20:57:44 -07:00
Caleb Barnes
001795671c
feat(factory): FactorySandbox, one host object for session sandbox, template and settings (#26467)
## Why

Factory keeps growing features that need something from the sandbox
provider: per-project settings (CPU, memory, idle timeout), a template
built ahead of a session, build history, and later builds on a schedule
or on push. Until now the only hook a host had was a bare callback that
returned a sandbox, so every new feature meant another callback on
`MastraFactory` and provider-specific knowledge leaking into factory.

`FactorySandbox` adds one object per provider with a stable contract
between factory and the provider. Factory asks the object what it can do
and renders accordingly; providers add features by implementing an
optional method, not by changing factory. The change is backwards
compatible: a host that passes the `sandbox` callback today keeps
working unchanged. Factory wraps it as a `custom` provider, so sessions
boot exactly as before; the host just does not get the new features
(per-project settings, template builds, or any later capability) until
it moves to a `FactorySandbox`.

## What

A host configures where Factory sessions run with one object:

```ts
new MastraFactory({
  sandbox: new PlatformFactorySandbox({ defaults: { cpuCount: 4, memoryMb: 8192 } }),
})
```

`FactorySandbox` (in `@mastra/core/workspace`) owns:

- **The session sandbox.** `create(ctx, settings)` constructs the
sandbox for a session, with the environment's working directory handed
through so the session finds the template's checkouts where the template
cloned them.
- **The template.** `template(ctx, settings)` describes the repository
template a session boots from, so the same definition drives a session
and an ahead-of-time build.
- **Settings.** Each provider declares the settings a user can tune per
project as a schema (`PublicSchema`, any flavor). Factory validates
against it on write and exposes the input-side JSON Schema on the wire,
which is what the Environment settings page renders: one row per
property, typed by the schema (integer, enum, boolean), with provider
defaults as placeholders. A provider with no settings renders nothing.
Adding a setting is a one-line change in the provider.
- **Optional capabilities.** `builds` (start, get, list) is the first
one. Factory describes what is present through
`MastraFactory.sandboxDescription` (`provider`, `settingsSchema`,
`capabilities`) and the UI shows a Builds section only when the provider
has it. A provider that does not build simply omits the method.

Factory detects the object by a `Symbol.for('mastra.factory.sandbox')`
brand, so no instanceof across package boundaries.

Providers:

- `@mastra/platform-workspace`: `PlatformFactorySandbox` (`cpuCount`,
`memoryMb`, `idleTimeoutMinutes`, provider-side `defaults`). The `start
complete` log line gains a `templateHash` of the serialized template.
- `@mastra/e2b`: `E2BFactorySandbox` (`cpuCount`, `memoryMb`,
`idleTimeoutMinutes`) with `builds` (`start` via
`Template.buildInBackground`, `get` with logs, `list` from the
template's build history).
- `@mastra/docker`: `DockerFactorySandbox` (`baseImage`, `owner`).
- `@mastra/factory`: `sandbox` accepts a `FactorySandbox` or the
existing callback. The callback keeps working, wrapped as `provider:
'custom'` with no settings and no capabilities; `LocalFactorySandbox({
root, env })` replaces hand-rolled local fallbacks.
- The web host constructs the class with the same
local/platform/E2B/local precedence it had.
- Docs: `reference/workspace/factory-sandbox` plus the E2B per-session
example.

The single-repo `createRepoTemplate` functions are unchanged; a unit
test pins that the class produces the same template definition and build
envs as the callback form for the web and shipyard hosts.

## Test plan

- `packages/core`: `vitest run src/workspace/factory-sandbox.test.ts`
(9), `src/workspace/factory-sandbox.test-d.ts` (2), `pnpm check`
- `workspaces/platform-workspace`: `vitest run` 268 passed, `tsc
--noEmit`
- `workspaces/e2b`: `vitest run` 265 passed (mocked SDK covers
`start`/`get`/`list`), `tsc --noEmit`
- `workspaces/docker`: `vitest run` 336 passed, `tsc --noEmit`
- `mastracode/factory`: `vitest run` 3589 passed, `tsc --noEmit`, `pnpm
lint`
- `mastracode/web`: `pnpm check`
- `docs`: `pnpm format:check`

Closes FACT-384


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

This PR gives Factory one consistent way to create a sandbox for each
session. It also lets sandbox providers describe their settings and
whether they can prepare repository templates or report build status.

## Changes

- Added the branded `FactorySandbox` contract to
`@mastra/core/workspace`. `MastraFactory` exposes the provider, settings
schema, and available capabilities through `sandboxDescription`.
- Updated `MastraFactory` to accept a `FactorySandbox` instance or the
existing callback. Factory wraps callbacks as `custom` providers without
settings or capabilities.
- Added `PlatformFactorySandbox`, `E2BFactorySandbox`,
`DockerFactorySandbox`, and `LocalFactorySandbox`.
- Updated Factory workspace and integration types to use
`FactorySandbox`. Updated the web host to select a provider using its
existing local, platform, and E2B configuration precedence.
- Added tests, exports, changesets, and documentation. Platform sandbox
start logs include a template hash when a template is used.

## Validation and review

The PR objectives report package tests, type checks, lint, and
documentation formatting checks. These results were not independently
verified. The PR objectives report the label `tests: green ✅`. The
supplied comments contain no review findings. Review severity counts are
unavailable.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: CalebBarnes <CalebBarnes@users.noreply.github.com>
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-10-13 20:57:41 -07:00
shreyas-mastra
7aec8b0d95
security: Vanta remediation pass 2026-10-12 (better-auth, MCP SDK) (#26773)
## Summary
Vanta remediation for 2026-10-12. Target list is today's live export (77
findings, 44 unique IDs). Platform findings are handled in
mastra-ai/platform#3317.

### What changed
| Package | From → To | Findings | Where | How |
|---|---|---|---|---|
| better-auth | 1.7.5 → 1.7.7 | AIKIDO-2026-373183 (Critical) | root +
`examples/agent` | raise override `better-auth: ^1.7.7`; direct dep
`@mastra/auth-better-auth` ^1.7.7 |
| @better-auth/drizzle-adapter | 1.7.5 → 1.7.7 | AIKIDO-2026-261025
(Low) | root + `examples/agent` | floor
`'@better-auth/drizzle-adapter@<1.7.7': 1.7.7` (also pulled by
better-auth 1.7.7) |
| @modelcontextprotocol/sdk | 1.31.0 → 1.32.1 | AIKIDO-2026-365378
(High), -156139, -344432 | root, nested locks, `scripts/gh-issue-triage`
| raise floor to `<1.32.0 → 1.32.1`; bump direct pins/ranges |

Nested `pnpm-workspace.yaml` floors raised in e2e-tests/*, examples/*,
integration-tests, etc., and those lockfiles regenerated. Versions used
were published >24h ago (minimumReleaseAge). Patch changeset included
for published packages whose dependency ranges changed.

Aikido lens on this branch: better-auth and MCP SDK findings are gone.
OSV: handlebars already clear on main; remaining high are
braces/extract-zip (no patch).

### Left as-is (no patch, or major-only)
- extract-zip ≤2.0.1: no fix (overdue; removed by #25855 when that
lands). Needs Vanta risk acceptance.
- braces 3.0.3, sprintf-js 1.0.3/1.1.3: no patched release
- postcss-selector-parser 6.x: @tailwindcss/typography pins 6.0.10
- katex 0.16: mermaid declares ^0.16.47
- @ag-ui/client 0.0.59: fix only in 1.0.0 (major). Parent
`@copilotkit/channels-*` 0.11.0 pins 0.0.59 exactly
(template-genui-data-explorer)
- @hono/node-server 1.19 (fix 2.1.3), undici 6.29 (fix 7.23/8.10),
raw-body 3 in templates (fix 4), bundle-name 3 (fix 4.1.1), got 15 (fix
16), zod 3.25 (fix 4.x), @bufbuild/protobuf 1.10 (fix 2.x), openai 6.49
(fix 7.x), jose 5.10 via @segment/analytics-node in template (fix 6.x),
@ai-sdk/provider-utils 2.2.8 / 3.0.x Aikido ranges wanting 4.0.18+:
major-only or scanner range noise

Do not merge unless reviewed. No CI weakened.


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

## ELI5

This PR updates shared dependency versions so the project uses newer
releases of Better Auth and the MCP SDK. It also updates workspace rules
to keep older versions from being selected.

## Changes

- Updated Better Auth requirements and workspace overrides to `^1.7.7`.
- Updated `@modelcontextprotocol/sdk` requirements and overrides to
`1.32.1` across affected packages and workspaces.
- Added overrides for older `@better-auth/drizzle-adapter` versions to
use `1.7.7`.
- Added a patch changeset for `@mastra/auth-better-auth`,
`@mastra/mcp-registry-registry`, and `@mastra/playground-ui`.

Test results and review findings were not provided.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-10-13 07:41:26 -07:00
mastra-platform[bot]
84312835a7
fix(factory): answer /auth/me with 404 when auth is disabled (#26797)
> Opened by @abhiaiyer91

## Summary
When a Factory runs with authentication disabled (`auth: null`, e.g.
`MASTRACODE_AUTH_DISABLED=1`), the web UI hung on the splash screen
forever.

No `/auth/me` route was registered in that mode, so the request fell
through to the deployer's HTML catch-all and came back as `200
text/html`. The UI only treats a `404` from `/auth/me` as "auth
disabled". It failed to parse the HTML as JSON, treated that as an
error, and retried every 2 seconds indefinitely.

## Changes
- `@mastra/factory`: new `buildAuthDisabledRoutes()` registers an
unauthenticated `GET /auth/me` that returns `404` with `{ authEnabled:
false, authenticated: false }`. `MastraFactory` uses it whenever `auth`
is null. The UI now resolves to its intended "no authentication provider
configured" screen instead of looping.
- `mastracode/web/.env.schema`: documents `MASTRACODE_AUTH_DISABLED` as
an API-only, local smoke-test mode. The web UI still requires a sign-in
provider.
- Patch changeset for `@mastra/factory`.

Out of scope: a supported no-auth UI mode (e.g. a built-in local-dev
provider). That is a separate product/security decision.

## Test plan
- [x] `auth-seam.test.ts`: `buildAuthDisabledRoutes` registers only `GET
/auth/me` (`requiresAuth: false`), and serving it through Hono returns
`404` JSON with the expected body.
- [x] `factory.test.ts`: with `auth: null`, the assembled API routes
contain exactly one `/auth/*` route (`GET /auth/me`), and its handler
responds `404` with `authEnabled: false`. This replaces the old "no auth
routes" assertion.
- [x] `vitest run` for `auth-seam`, `factory`, `auth`, and `spa-static`
tests (197 passing); `tsc --noEmit` clean; oxfmt clean.
- [x] `varlock load` accepts the new schema entry.

Fixes #26792

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

## ELI5
When authentication is disabled, the server now gives the UI a clear
response instead of sending it a web page by mistake. This lets the UI
detect that no authentication provider is configured.

## Changes
- Add a `GET /auth/me` route for `auth: null`. It returns status `404`
with `{ authEnabled: false, authenticated: false }`.
- Add tests for the route and its integration with the factory.
- Document `MASTRACODE_AUTH_DISABLED` as an API-only local smoke-test
option. A supported no-auth UI mode is out of scope.

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

Co-authored-by: mastra-platform[bot] <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-10-12 17:48:40 -07:00
Tyler Barnes
38643beb41
feat: automatic per-role memory model selection for Observational Memory (#24508)
## What this changes

Mastra Code and Factory run Observational Memory with two background
models: an **Observer** that condenses conversation into observations,
and a **Reflector** that compresses those observations. Both were pinned
to a materialized default (Gemini Flash) unless you picked one by hand.

That had two consequences:

- Memory work went to a provider you might not have credentials for, and
the failure surfaced as a warning instead of an invitation to choose a
role model.
- Changing your main model did not change the memory model, so a session
running on one provider still did its memory work on another.

Observer and Reflector now default to **Auto**. On every observation and
reflection, Auto picks a concrete model: Gemini Flash when a Google key
is set, otherwise the low-cost model of the active main model's provider
(for example `anthropic/claude-sonnet-4-6` →
`anthropic/claude-haiku-4-5`), otherwise the main model itself (which is
what custom providers get). Changing the main model changes the memory
model without rewriting saved settings or rebuilding `Memory`. Explicit
per-role choices stay pinned, and the two roles are independent of each
other.

## How it works

**`@mastra/memory` owns the Auto policy.** `model: 'auto'` is the new
default for the top-level, observation, and reflection model. Memory
resolves it from the active actor model on each call; literal `'auto'`
never reaches the model router. New options: `autoModels` (override the
per-provider low-cost table), `resolveModel` (turn the picked model ID
into a model instance, e.g. through a host's credential store), and an
exported pure `resolveAutoModelId(mainModelId)` for previews. A
`mastra/` gateway route is kept on the picked model.

**Core** — `AgentControllerOMConfig` gains
`observerModel`/`reflectorModel` (accepting `'auto'`) and an optional
`resolveAutoModelId` for reporting. Sessions persist per-role selection
intent separately from the concrete ID: `session.om.<role>.model()`
returns the intent, `modelId()` the effective concrete model,
`switchModel({ modelId: 'auto' })` returns a role to Auto, and
`om_model_changed` still carries a concrete ID. Dynamic model functions
may return `{ model, id }` so consumers like Memory can read the
provider/model ID of a resolved model; router models expose a read-only
`id`.

**Mastra Code SDK and TUI** — the SDK passes `'auto'` through to Memory
along with its credential-aware resolver. Onboarding, provider login,
ACP sign-in, and `mastracode login` no longer write a memory model.
`/om` shows **Auto (effective-model)** per role and resets either role
independently. A model pack's memory model has three states (unset → use
`/om`, Auto, concrete) and, when set, applies to both roles while the
pack is active; `/om` and the status line show the model the pack
selects.

**Factory** — Auto roles persist as `NULL` in the existing nullable
columns and explicit picks as concrete IDs; provider connection no
longer writes them, and the unused `POST
/web/config/om/provider-defaults` route is removed. The caller's row is
read per run and placed on the request context before memory runs, so a
stored pin takes effect on the same run; channel runs layer the sender's
saved knobs over the project's. If the row cannot load, memory falls
back to Auto and default thresholds and the thread shows an error. `GET
/web/config/om` returns intent, effective model, and provider
availability per role (`mastra/` models count as available with a Mastra
gateway key), and `PUT /web/config/om/:role/model` accepts `{ modelId:
'auto' }` to reset a role.

`MastraCodeConfig.inputProcessors` also accepts a function of `{
requestContext }` so Factory can add its per-run settings processor.

## Verification

- Focused suites for Core (`session-om`, `resolve-model`,
`dynamic-model-fallback`), Memory (`auto-model`, `observational-memory`,
type tests), SDK (memory, model, packs, schema, ACP), TUI (om,
om-settings, om-model, status-line, login), Factory (memory settings,
config routes, sessions, Slack, rules processor), and Factory UI MSW
tests.
- TUI E2E scenarios covering Auto selection, pack memory models,
onboarding, and the pack editor; ACP conformance.
- Typechecks, lint, and builds for Core, Memory, SDK, TUI, Factory,
Factory UI, and `packages/server`.
- Two deterministic end-to-end proofs driving the built TUI and a real
local Factory server against local model endpoints, with logs showing
which concrete model each role invoked, plus red runs of the same
scripts against the merge base. The green runs show both roles following
a main-model change and an explicit pin holding, with zero external
provider requests. Transcripts are session artifacts under
`.mastracode/plans/` and are not committed.
- CI adds a `mastracode-web-e2e` job that runs the web-host OM
scenarios.

## Changesets

`@mastra/memory` (minor: default model is now `'auto'`), `@mastra/core`
(minor), `@mastra/code-sdk` / `@mastra/factory` / `@mastra/server`
(patch), `mastracode` (patch). Saved Observer/Reflector choices stay
pinned after upgrading; `'auto'` in the Factory settings body now means
automatic selection rather than a model name.

---------

Co-authored-by: remy-builder[bot] <324360501+remy-builder[bot]@users.noreply.github.com>
2026-10-09 00:45:29 -07:00
shreyas-mastra
ea7ca755a4
security: Vanta remediation pass 2026-10-07 (MCP SDK, sharp, hono) (#26260) 2026-10-07 09:29:07 -07:00
mastra-platform[bot]
6d1307af4c
feat(factory): let deployments enable Amazon Bedrock for signed-in accounts (#26249) 2026-10-07 08:01:05 -07:00
shreyas-mastra
bf0dd07091
security: Vanta remediation pass 2026-10-05 (#25966)
Update 2026-10-06 (commits added on this branch; origin/main merged in
to clear the lockfile conflict)

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

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

---

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

What changed

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

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

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

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

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

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


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

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

## Changes

- Updates `probe-image-size` in `@mastra/memory` to `^7.4.0` and pins
`smol-toml` in `@mastra/code-sdk` to `1.9.0`.
- Updates Verdaccio to `^6.10.5` in nine end-to-end test projects.
- Raises `shell-quote` overrides to `1.11.0` and adds overrides for
transitive dependencies, including `yaml`, `source-map-js`,
`postcss-selector-parser`, `modern-tar`, `smol-toml`, `strnum`,
`inline-style-parser`, and `tinypool`.
- Updates `braintrust` to `^3.36.0`, `wrangler` to `^4.147.0`, and `tsx`
to `^4.23.15`.
- Adds patch changesets for `@mastra/memory`, `@mastra/code-sdk`, and
`@mastra/braintrust`. The changesets report no API changes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-10-06 10:35:09 -04:00
Ward Peeters
0a37598686
feat!: make controller sessions single-model and move packs to TUI (#25997)
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-10-06 15:33:14 +02:00
shreyas-mastra
4358322b7b
chore(deps): override upstream-blocked vulnerable transitive deps (#25853) 2026-10-02 18:03:50 -07:00
Ward Peeters
bc826e8fb1
refactor: use Web Crypto where synchronous contracts stay intact (#25462)
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-09-30 09:45:11 +02:00
mastra-platform[bot]
e4e0f9000d
Reattach the existing sandbox VM on Factory session resume instead of silently replacing it (#24004)
Co-authored-by: Abhi Aiyer <abhiaiyer91@gmail.com>
2026-09-29 10:00:34 -07:00
shreyas-mastra
aeddbc9909
security: Vanta 2026-09-28 residuals (template proxy-addr, nested undici/next/shell-quote/form-data, OTEL, onnxruntime) (#25344) 2026-09-28 10:45:13 -07:00
Tyler Barnes
96233975b7
fix(mastracode): correct tokens-per-second accounting in TUI and web (#25196)
Co-authored-by: remy-builder[bot] <324360501+remy-builder[bot]@users.noreply.github.com>
2026-09-25 18:50:57 -07:00
arctic-char
00e72fabd9
fix(mastracode-web): honor INCIDENT_IO_API_KEY on generated Factory Servers (#25178)
## Summary

Setting `INCIDENT_IO_API_KEY` on a generated Factory Server
(`mastracode/web`) did nothing: the entry constructed direct GitHub,
GitLab, Linear, and Jira integrations from their env groups but never
constructed `IncidentioIntegration`, so incident.io follow-up intake
only worked on Platform-backed servers. And even with the integration
constructed, the Work Intake settings section was gated solely on
Platform connect routes, leaving no way to select or route follow-up
sources on a Platform-less server. This surfaced while documenting the
integration in
[softwarefactory-docs#6](https://github.com/mastra-ai/softwarefactory-docs/pull/6).

### mastracode/web
- Construct `IncidentioIntegration` when `INCIDENT_IO_API_KEY` is set,
matching the direct-fallback pattern of the other providers.
Construction is gated on the env var because the constructor throws
without a key; an explicit integration takes precedence over the
factory's auto-installed `PlatformIncidentioIntegration`.
- Declare `INCIDENT_IO_API_KEY` in `.env.schema`.

### @mastra/factory
- `/web/incidentio/status` now reports the credential `mode` (`api-key`
| `platform`), mirroring Jira's status shape, so the SPA can tell a
deployment key from Platform connections.

### factory-ui
- The Work Intake incident.io section stays usable when a deployment API
key serves the feature: rendered without Platform connections, sync
toggle and source picker enabled, connect controls replaced with an "API
key configured on this server" caption (a direct key takes precedence
over Platform connections server-side).

## Test plan

- `mastracode/web` `src/mastra/index.test.ts`: direct integration
registered when the key is set; nothing registered without key or
Platform credentials; direct key preferred when Platform credentials are
also configured. The 3 pre-existing failures in that file reproduce
identically on clean `main` (GitHub rules routing, unrelated).
- `@mastra/factory`: new status-route test asserting `mode` passthrough;
all incidentio + platform/incidentio suites pass (92 tests); `tsc
--noEmit` clean.
- `factory-ui`: new MSW test — deployment API key without Platform
connections keeps the section usable for source selection and routing;
all 35 IntakeSection MSW tests pass; `typecheck` clean.
- `mastracode/web` `pnpm check` (tsc) clean.

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

Generated servers can now use an incident.io API key for intake without
a Platform connection. The settings page shows intake controls when the
key is ready, and keeps them hidden when the key still needs an
organization.

## Changes

- Added `INCIDENT_IO_API_KEY` to the generated server environment schema
and register `IncidentioIntegration` when the trimmed key is set. Direct
credentials take precedence over Platform credentials.
- Added credential `mode` to incident.io status responses to identify
API-key or Platform credentials.
- Updated Work Intake to load sources and enable controls when a direct
API key is ready, even if Platform connection data is unavailable. When
the key requires an organization, the section and sources request remain
gated.
- Added tests for integration registration and credential precedence,
status mode, and API-key Work Intake behavior.

Test results were not verified in the supplied evidence.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-09-25 16:19:42 -04:00
Ward Peeters
2f14fb37f3
fix(mastracode): simplify Factory web dev startup (#24996) 2026-09-24 08:12:47 -07:00
Ward Peeters
06605b4f04
chore(mastracode): let the Factory web dev server take a PORT override (#24953)
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: mastra-platform[bot] <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-09-24 07:39:33 -07:00
wardpeet
44510eebe0
remove secrets 2026-09-24 12:12:05 +02:00
Ward Peeters
1fd3abe7e5
fix template (#24937) 2026-09-24 10:18:42 +02:00
Ward Peeters
36a103bc9a
remove gh rules in template (#24934) 2026-09-24 09:39:42 +02:00
mastra-platform[bot]
af01f2dc29
feat(factory-ui): show your own sessions in the Factory sidebar by default (#24858)
Co-authored-by: mastra-platform[bot] <284800079+mastra-platform[bot]@users.noreply.github.com>
Co-authored-by: Tyler Barnes <tylerdbarnes@gmail.com>
2026-09-23 18:59:19 -07:00
arctic-char
e7d378f16e
fix(redis-streams): plug pubsub memory leaks in subscriptions, reply topics, and feed acks (#24580)
Co-authored-by: Mastra Code (anthropic/claude-fable-5) <noreply@mastra.ai>
Co-authored-by: Abhi Aiyer <abhiaiyer91@gmail.com>
2026-09-23 12:20:52 -07:00
Ward Peeters
7485da663e
feat(factory): place GitHub cards by label on arrival, reconcile, and PR review (#24649)
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-09-23 10:38:02 +02:00
Abhi Aiyer
ffc23d28fa
feat(mastracode): simplify Factory local development (#24632)
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-09-22 07:49:45 -07:00